I’m having trouble communicating globals bewteen a main swf and a loaded swf.
Someone posted code that works for them, but not for me:
In global1.swf:
stop();
_global.testValue=5;
_global.theThing=“Hello there world!”;
loadMovieNum(“global2.swf”, 10);
In global2.swf:
stop();
trace(_global.testValue);
if(_global.testValue==5){
_global.testValue+=3;
trace(_global.theThing);
}
The trace in global2.swf gives me “undefined” so the trace in the “if” statement doesn’t appear at all.
Does the code work for you?
What could I be doing wrong?