Getting stop(); to override setInterval?

I have a movie that goes through a spiel and I want to be able to stop it then hit play and have it continue. Easy enough IF the movie just goes straight through. But what mine does is pauses at certain places to make way for some spoken word (to be added later) using setInterval.

My problem is (seems to be) if I hit my stop button while it’s doing it’s 1.5 second pause, then the stop button gets ignored.

Here’s the swf: (around 300k)
http://ww.pseudodigm.com/testing/automated.swf

here’s the fla: (about 3mb)
http://www.pseudodigm.com/testing/automated.fla

I really appreciate the help (this site and these forums have REALLY helped me. You should have seen my flash BEFORE! ; ) )

-Rick

when you stop, stop and clear the interval

Yes sir, I’ve tried that too.

Here’s the code for my stop button:

on(press)
{
voip.stop();
_root.voip.clearInterval(myTimer);
}

(voip is the instance name of the movie clip I’m trying to control)

if u declared the interval in that movieclip you want this cde:

clearInterval(_root.voip.myTimer)

clearInterval is a global method but its arguement is a variable, hence if you defined the interval elsewhere with a variable, you need to clear it with the path to the variable… if that makes sense… :S

Prophet.

Yaayyyy, that did it. I learn so much here. thanks!

Edit: Jeez whiz, I can’t win today. New problem: Is there any reason that the stop button would not work correctly if the whole movie was loaded within another movie?

See, there are two versions of the movie. One is interactive, one runs on it’s own (this is the one with the stop button). I want it to look seamless, but I also want to download them separately (for bandwidth and because I don’t know how to shove all of that interactivity together). And they load in sort of a tv container that has buttons “interactive” and “automated” (so the viewer has a choice).

So if I run automated on its own, it works great. But if I load the container thing that loads automated the the stop button doesn’t function correctly (it acts as it did previously - it acts as if the clearinterval function is not there).

I hope I’ve made sense of all of this.

EDIT AGAIN: (but I’m keeping the above there in the hopes it helps someone else)

I was using setInterval(_root.voip.mytimer), but as a hunch I removed the “_root” thinking “I wonder if, once I load a movie into another, the timelines merge and maybe my absolute path is no longer correct”.

Is that true? Because changing it to

setInterval(voip.mytimer)

works the way I want it to.

Thank you SO much.

yup was just about to say as soon as your swf is loaded its main timeline is no longer the master timeline and hence not the _root :wink:

Prophet.