I\'m moving from AS2 to AS3 and probably as many ppl before found this incompatibility:
I used quite often code like:
gotoAndStop(5);
trace(box); //w
There is an easy way to solve this, but it is undocumented:
addFrameScript(1, update);
gotoAndStop(2);
function update() {
trace(box); // outputs [object MovieClip]
}
Please note that the first argument for addFrameScript is the frame number but it's 0-based, i.e. 0 is frame 1, 1 is frame 2, etc... The second argument is the function you would like to call.