how i suppose to do to read global variable in actionscript 2.0?
i've declared _global.MyVar="dummyContent";
may i write MyVar="anotherContent";
?
or it should _global.MyVar="anotherContent"?
how i suppose to do to read global variable in actionscript 2.0?
i've declared _global.MyVar="dummyContent";
may i write MyVar="anotherContent";
?
or it should _global.MyVar="anotherContent"?
The latter is correct, unless you're in the same scope as the global was declared I believe, so:
Diff scope: _root > nested mc > nested mc > nested mc > nested mc: _global.MyVar = "anotherContent" ;
Same scope: _root: MyVar = "anotherContent" ;
Though for consistency, perhaps use _global.MyVar = "anotherContent", so you always know you're setting a global var.
d