OK...Flash is making me feel really dumb.
I have a simple movice clip, 72 frames. On Frame 42 I have this actionscript
//----------------------------------
function wait2() {
stop();
var myInterval = setInterval(function () {
play();
clearInterval(myInterval);
}, 10*1000); // stop for 10 seconds
}
wait2();
Also on frame 42 I have a button. I want the option of A) waiting while paused on frame 42...until my wait2() counts down and then moves to frame 43...OR option B) clicking the button which then takes me to frame 43.
My problem. I can wait....that works fine. But if I put
on (release) {
nextFrame();
}
OR
on (release) {
gotoAndPlay(43);
}
Sure it skips to the next frame....BUT that damn wait2() function is still running....and when it's done...IT ALSO goes to frame 43 so I get this weird "loop" error.
I've tried
on (release) {
wait2 = null;
nextFrame();
}
and a few other "possible" solutions I found on the web....but nothing works. If I click the damn button....I end up with a weird loop issue.
Any suggestions?