PDA

View Full Version : variables accross scenes


Flash Gordon
02-28-2005, 11:04 PM
howday,

If var myVariable is in scene 1, can scene 9 access the value of myVariable?

thanks.

Gibberish
03-01-2005, 12:23 AM
not that I am aware of. You should be able to send it somehow. I do not use scenes though as they tend to be nothing but problems.

mancroft
03-01-2005, 12:33 AM
Simple answer: Don't use more than one scene.

Darkware
03-01-2005, 01:12 AM
scenes suck and create more problems than conveniences. I don't even know why Macromedia took the time to do them -_-

Flash Gordon
03-01-2005, 03:14 AM
ok but you can if it is in the same scene but different frames?

CyanBlue
03-01-2005, 03:29 AM
A scene is there to help you visualize the segment of your movie... It is not necessarily bad if you are visually impared... If you are not, it IS bad... :)

and if you have a variable set up in frame 1 of scene 5, you normally should be able to access that variable from frame 100 of scene 5 unless you are jumping around different scenes to mess with the variables that you have defined locally by using 'var'...

Gibberish
03-01-2005, 04:32 PM
ok but you can if it is in the same scene but different frames?

Yes. You can also access differnet variables in the same scene that are in differnet mc's.

such as if you are in root and you have a movieclip with a button inside you could call those instance names and get that variable inside that button.
myMC.myBtn.myVariable

Or you could post diectly to the root timeline by using _root.myVariable

Flash Gordon
03-02-2005, 05:06 AM
I answered my own question with a little test. So... variables are accessible across scenes and different frames. Thanks guys.