# Trying to Clear an Interval ... ? Help? Please!

**URL:** <https://forum.kirupa.com/t/trying-to-clear-an-interval-help-please/267390>\
**Category:** Uncategorized\
**Created:** [July 31, 2008, 3:36pm UTC](https://forum.kirupa.com/t/trying-to-clear-an-interval-help-please/267390 "2008-07-31T15:36:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BoonDock](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/boondock/32/1188_2.png) [@BoonDock](https://forum.kirupa.com/u/BoonDock)\
**Post date:** [July 31, 2008, 3:36pm UTC](https://forum.kirupa.com/t/trying-to-clear-an-interval-help-please/267390/1 "2008-07-31T15:36:47Z")

</div>

Kirupians,

Long time since posting my last help question…

Ok, so I’m using the script to do a Interval as I’ve always used …

```auto

stop();
function Go(frame){
clearInterval(myInterval);
_root.rotate1.gotoAndPlay(frame);
}
var myInterval = setInterval(Go, 5500, 21)

```

Once I go to another frame in the \_root. movie I’d like for that Interval to clear so that if I go back to the frame that ‘rotate1’ is on it will begin from the beginning again and play out as it was etc. etc.

I was using

```auto

onEnterFrame = function(){
clearInterval(myInterval);
delete this.onEnterFrame;
}

```

to do this on the next frame where ‘rotate1’ is not on any frame and when I go back, rotate1 acts like it’s still playing and was never told to stop (clear the interval etc.) …

Any help would be greatly appreciated! :thumb:

Thanks once again,  
Boon.
