Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global variables in Flash MX 1

Status
Not open for further replies.

shaddow

Programmer
Mar 22, 2001
1,862
RO
Here is what i have.
I have a main movie that loads when needed other movies on diferent layers.
What i need to knw is that is posible to see the main movie variable in the loaded movie.

Or somehow to not relay on loadVariableNum, it's preatty anoying to check on the server each time you do an task

________
George, M
 
im not very sure what you are asking. can you give more details?

if you just want to pass a variable to other movies thats easy enough
 
If you're loading external movies on other levels, or in empty movie clip containers, you can easily check or set any variable of the main movie, if the variables were set with _level0.my_var to start with... In MX you can even use _global.my_var.

In the main movie...

_level0.my_var = value;

Then in the loaded movie... (level or container clip)

trace(_level0.my_var);

Or...

_level5.my_var5 = _level0.my_var;

Or...

_level0.my_var = new_value;



Regards,

cubalibre2.gif
 
Thnx a bunch, i forgot the damn _level hehe, it works like a charm

________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top