# clearInterval for external swfs

**URL:** <https://forum.kirupa.com/t/clearinterval-for-external-swfs/184449>\
**Category:** flash\
**Created:** [April 5, 2006, 7:14am UTC](https://forum.kirupa.com/t/clearinterval-for-external-swfs/184449 "2006-04-05T07:14:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yem224](https://avatars.discourse-cdn.com/v4/letter/y/b38774/32.png) [@yem224](https://forum.kirupa.com/u/yem224)\
**Post date:** [April 5, 2006, 7:14am UTC](https://forum.kirupa.com/t/clearinterval-for-external-swfs/184449/1 "2006-04-05T07:14:11Z")

</div>

Hello all,  
I followed the tut:  
[http://www.kirupa.com/developer/mx/preloader\_transition.htm](http://www.kirupa.com/developer/mx/preloader_transition.htm)  
Some off the exterval swfs are slideshows with a setInterval.  
To no ones surprise the interval is not being cleared.  
When one manually hits a button to clearInterval(myInterval) and then loads another swf it works fine.  
I am under the assumption that the end user will not hit the stop\_btn before loading another gallery; therefore, how would I clearInterval when another swf is loaded into the empty\_mc?  
I went through the forums that dealt with this problem, but I didn’t understand them. I am not that proficient in using AS, but I am learning.  
I would appreciate any help,  
Best Regards,  
Brian

---

<div class="post-metadata">

**Author:** ![yem224](https://avatars.discourse-cdn.com/v4/letter/y/b38774/32.png) [@yem224](https://forum.kirupa.com/u/yem224)\
**Post date:** [April 6, 2006, 8:06am UTC](https://forum.kirupa.com/t/clearinterval-for-external-swfs/184449/2 "2006-04-06T08:06:31Z")

</div>

figured it out, after I read more about the clearInterval:

```auto
 your_btn.onPress = function() {
    clearInterval(content.intervalName);
}

```

works just fine  
Brian:beam:
