Question
Cancelling a wait function
I have this wait function applied to a frame:
function wait() {
stop();
var myInterval = setInterval(function () {
play();
clearInterval(myInterval);
}, 26*1000);
}
wait();
and I would like to cancel this wait function, when a button is clicked. This is a skip button that takes you to a frame label, but I need to somehow cancel that wait function or it still takes affect in the movie. Could someone help with the code that needs to be added?
Thanks.
function wait() {
stop();
var myInterval = setInterval(function () {
play();
clearInterval(myInterval);
}, 26*1000);
}
wait();
and I would like to cancel this wait function, when a button is clicked. This is a skip button that takes you to a frame label, but I need to somehow cancel that wait function or it still takes affect in the movie. Could someone help with the code that needs to be added?
Thanks.