I have a timer that seems to work for me in one scene and is suppose to send the action to the next scene, but the “if” loop is still looping when the action is in the next scene. The “stops” I put in don’t seem to stop anything. I am a beginner who needs help, thanks.
//wait 5 seconds
onEnterFrame = function () {
if (timed) {
elapsedTime = getTimer()-startTime; //startTime was picked up in previous frame
elapsedSec = Math.floor(elapsedTime/1000);
if (elapsedSec<5) {
trace(elapsedSec); //this works
} else {
timed = false;
}
} else {
stop();
trace(“I am here”); ///this trace keeps going and going through the next scene
gotoAndPlay(“Scene 4”, 1);
}
};
stop();