# Stop a Function

**URL:** <https://forum.kirupa.com/t/stop-a-function/210444>\
**Category:** flash\
**Created:** [December 18, 2006, 8:52pm UTC](https://forum.kirupa.com/t/stop-a-function/210444 "2006-12-18T20:52:41Z")\
**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:** [December 18, 2006, 8:52pm UTC](https://forum.kirupa.com/t/stop-a-function/210444/1 "2006-12-18T20:52:41Z")

</div>

Ok - I’ve never claimed to be a Actionscript person … so this might be a simple question …

I’ve got this right here:

```auto
stop();
function Go(frame){
clearInterval(myInterval);
gotoAndPlay(frame);
}
var myInterval = setInterval(Go, 15000, 8061)

```

Now I would like to stop this from happening if a certain button is pressed … basically i’ve set this time interval to run in case no one presses the button to continue on in the movie - if the button is pressed I would like to stop the function/interval from running and do the action that the particular button is assigned … is this possible?

Any ideas?

Thanks! 🙂

Boon.
