(as2/cs3)
I’m trying to get my movie to play a closing animation then open an external swf inside it, but my global variables don’t seem to work entirely.
stop();
_global.austinVar = 1;
_global.atlantaVar = 2;
cityAspen.cityfade.city.text = "ASPEN";
cityAspen.onRollOver = over;
cityAspen.onRollOut = out;
cityAspen.onRelease = function() {
_global.austinVar = 1;
_root.gotoAndPlay("start2OUT");
};
cityAtlanta.cityfade.city.text = "ATLANTA";
cityAtlanta.onRollOver = over;
cityAtlanta.onRollOut = out;
cityAtlanta.onRelease = function() {
_global.atlantaVar = 2;
_root.gotoAndPlay("start2OUT");
};
This is the code calling the global variable, then it loads the closing animation “start2OUT” and then at the end of that tween (on a seperate fla), there this:
stop();
if(_global.austinVar == 1) {
gotoAndPlay("aspenIN");
trace("load aspen");
} else if(_global.atlantaVar == 2) {
gotoAndPlay("atlantaIN");
trace("load atlanta");
} else {
gotoAndPlay("philadelphiaIN");
}
If I click either of my city cuttons, they both goto the same location “aspenIN”. Even buttons with no variable yet go to the same page, so I’m guessing it has to do with my last script. What am I doing wrong? I think when you click the button and it loads the parent swf, it’s resetting the variable value and only loading the first swf in the script. Any advice would be awesome!
Thank you.