Jump to content

Using public variables across keyframes - simple


Recommended Posts

Hi its been a while since I tried my hand at AS3.

 

What I want to build is a questionaire. Not a basic questionaire, more like a decision tool. The user will answer one question at a time. When they give an answer they click the 'next' button which takes the timeline to the next question.

 

What I would like to know is how can I use a variable accross different keyframes?

 

Basically I am sending a request to a .php file from flash, which then checks to see if their email address is already stored in mysql. Now I also want to store their email address locally in flash so that I can use it thoughout the keyframes.

 

Lets say I have a keyframe on the timeline called 'question_1'. Here I have got the users email address and stored it as 'email_add'.

In the next keyframe called 'question_2' I want to use this email, so can I just do 'question_1.email_add' ?

 

The tutorial I am reading is http://www.gotoandlearn.com/play.php?id=50

 

Any help or guidance appreciated.

I thought I would just update this question and explain what I mean a little better....

 

 

1) The user enters their email in a text field

2) Keyframe 1 grabs this via the variable email_text = emailText.text

3) The user is then taken to keyframe 2

4) In keyframe 2 I want to use the variable email_text

5) Do I access this variable like keyframe_1.email_text ?

 

 

Basically I just want to use a variable created in the beggining keyframe and use for all keyframes.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.