# \[CS4/AS2\] Help with clearInterval

**URL:** https://forum.kirupa.com/t/cs4-as2-help-with-clearinterval/295682
**Category:** flash
**Created:** [September 2, 2009, 10:15pm UTC](https://forum.kirupa.com/t/cs4-as2-help-with-clearinterval/295682 "2009-09-02T22:15:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anna\_2010](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@anna\_2010](https://forum.kirupa.com/u/anna_2010)
#### Post date: [September 2, 2009, 10:15pm UTC](https://forum.kirupa.com/t/cs4-as2-help-with-clearinterval/295682/1 "2009-09-02T22:15:22Z")

</div>

Hi,

I have a Timeline sequence that goes for about 150 frames, then hits the 151st frame which is a movieClip with an AS to load a SWF file from an external folder. I have 3 such single frame movie clips in this sequence. (which are wedged between the 150 frame animations). On each single frame (that contains the movieclip/loaded SWF), I have the following AS code:

```auto

mc_demos.loadMovie("swf/swfName.swf");
stop();
function pauseIt () {
play();
clearInterval(this.advScene);
}
var advScene = setInterval (pauseIt, XX000);

```

So from a glance, this is what the structure of the timeline looks like:

[150 frames] [singleA] [150 frames] [singleB] [150 frames] [singleC] [Outtro]

So on the singles I have each a setInterval with a clearInterval in a function. Each AS (setInterval) on the single frames are also tailored to the individual swf’s time.

Everything works as it should until the timeline gets to the [singleC] movie which plays halfway then immediately goes to the [Outtro]. Additionally, if I let the compiled swf keep running, I noticed that the times get all messed up cutting off the movies or [single] frames durations.

I have clearIntervals - I thought that they’d be working. What am I doing wrong?

if it helps the files can be downloaded from this link:

[[COLOR=#000080]https://www.yousendit.com/download/YkxMa3ZObThRR2RjR0E9PQ[/COLOR]](https://www.yousendit.com/download/YkxMa3ZObThRR2RjR0E9PQ)

Thanks.  
:puzzle:
