Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » Creating Variable in on page and using it in different Flash page


Creating Variable in on page and using it in different Flash page

Reply
  #1 (permalink)  
Old 03-06-07, 07:17 PM
fazil_murthuza fazil_murthuza is offline
Newbie Coder
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Creating Variable in on page and using it in different Flash page

Hello Guyz,

Can any of you help me in using the flash variables in one page which are created in other page. I want to use session in my flash project using PHP. Thank You.
Reply With Quote
  #2 (permalink)  
Old 03-07-07, 05:57 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
you'll have to explain a little more. Could you give an example of how you want to do it? Do you mean the html flashvars?

I would store a session in the php files, and then simply use php to handle the sessions. In flash you won't have to do anything (unless you want to check whether the user is logged in or not on every frame or something).
So basicly: you have to make a login form in the flash application (unless you allready log in via php), then check via php if the login information is correct, then store the information in a session. In flash you can check the sessions when necessary.

btw: if you're gonna use html flashvars, everyone will be able to see what you are passing to flash, and will be able to implement your swf, using the correct values of the flashvars.

UnrealEd
Reply With Quote
  #3 (permalink)  
Old 03-14-07, 09:45 PM
fazil_murthuza fazil_murthuza is offline
Newbie Coder
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
My question is:

suppose that I have 10 users. I want to maintain a session for a user until some time (actually user is the kid. He is taking a test), and I want to use his id to store the responses he is giving to the questions in the test. For that I want his user id which is entered in the first scene (login page) until the end of the test.
Reply With Quote
  #4 (permalink)  
Old 03-14-07, 10:28 PM
daveganley daveganley is offline
Newbie Coder
 
Join Date: Jun 2003
Location: London UK
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by fazil_murthuza View Post
suppose that I have 10 users. I want to maintain a session for a user until some time (actually user is the kid. He is taking a test), and I want to use his id to store the responses he is giving to the questions in the test. For that I want his user id which is entered in the first scene (login page) until the end of the test.
Use flashes sharedobject it's like a cookie.

You could store just the userID or the userID and all the answers and then submit them at the end.
Reply With Quote
  #5 (permalink)  
Old 03-15-07, 04:05 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
I merged you other topic with this one. Please don't open 2 topics about the same question.

i suggest you store the session in php, and use LoadVars to send the entered data of the test to php. In php you will save the data into a database, or a textfile.

have a look at LoadVars

UnrealEd

Last edited by UnrealEd; 03-15-07 at 04:09 AM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 06:30 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.