Basically, I have a presentation movie with a few complexities to it.
- The movie Plays, then waits an interval of time, then resumes (works alright)
- The movie needs to have a pause button (that will pause the action) and a play button that will resume the action.
My problem: Once I pause and then hit play the play button ignores the “countdown” of setInterval and just “skips” ahead to the next part.
I’m putting in a voice over and I really need that interval of time there or stuff will run into each other.
Can anyone help?
Here’s a sample of code:
On the first frame (but indicative of the rest):
stop();
/* Sound Stuff */
var mySound = new Sound(this);
mySound.attachSound("soundIntroduction");
mySound.start();
mySound01.onSoundComplete = function()
{
_root.nextFrame();
}
function wait() {
gotoAndPlay(2);
clearInterval(myTimer);
}
myTimer = setInterval(wait, 61000);
The play button there’s a clearInterval in here, but without it the play button will keep repeating everything. I guess this is the key, but I don’t know how to get around this:
on(press)
{
voip.play();
clearInterval(voip.myTimer);
/* Sound stuff */
voip.mySound.stop("testSound");
voip.mySound.start(pauseTime/1000);
}
What do you think? (I can provide you with the files if you like)
Rick