Hi … I am fairly new to Flash AS. I have this problem I am unable to wrap my head around. I am writing a small game, and basically I would like events happening in say frame1 to go to frame2 to execute, but it seems code only run once on frame2 and then when gotoAndStop at again, it does not execute.
Here’s the code to illustrate my point:
_global.testnum = 0;
timerInterval = setInterval(this, “processInterval”, 1000);
if (_global.testnum % 2 == 0)
trace("f1 " + _global.testnum);
trace("f2 " + _global.testnum);
I was expecting this output instead:
But I never did get this. I’ve tried various methods and it doesn’t work. For the purpose of my game design, I need the events triggered in frame 1 to be executed in frame 2 (which is designed to do a bunch of stuff like update the interface, etc etc), so I wouldn’t want to put those code into the processInterval() function in frame 1 above.
I’ll really appreciate any help / enlightenment on this problem …
Thanks a million in advance for any insights!