Sorry for the lack of a better title. This is a clear as I can postulate the question, so forgive me lack of coding background.
The situation is this: inside a MC there are frames with a pause script as such…
stop();
var interval:Number = setInterval(
function():Void {
play();
clearInterval(interval);
},
5000
);
At the same frame on a different layer resides a button with the function to disregard the pause and continue playing the timeline like so…
on (release){
gotoAndPlay(“l5”);
}
After pushing the button all appears to work fine until I reach a frame where I’ve placed…
stop();
clearInterval(interval);
It appears though whenever I override the pause script with the action of the button, the MC continues playing past the frame with the stop(); action and actually seems as though the pause script has been placed inside the frame where I want it to stop.
If I leave the MC to play on its own i.e. not pressing the button, the MC plays just perfectly and stops right where I want it to.
I’m not a programming kind of guy, so I would definitely appreciate all the help and suggestion you guys can throw at me. I’d like to understand why is it that when I call the action from the button, it essentially overrides my stop();.
I hope I’ve made a good effort in presenting you guys with a clear problem. Thanks in advance.