# setTimeout/clearTimeout

**URL:** https://forum.kirupa.com/t/settimeout-cleartimeout/326364
**Category:** flash
**Created:** [December 8, 2011, 10:23pm UTC](https://forum.kirupa.com/t/settimeout-cleartimeout/326364 "2011-12-08T22:23:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mikedkap](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mikedkap](https://forum.kirupa.com/u/mikedkap)
#### Post date: [December 8, 2011, 10:23pm UTC](https://forum.kirupa.com/t/settimeout-cleartimeout/326364/1 "2011-12-08T22:23:08Z")

</div>

Hey all -

I have a mouse over event that triggers a setTimeout event. I’d like to clear that event from happening if the user rollOuts of the button. I basically need to figure out how to clear my setTimeout event. Can anyone help?

```auto

bButton.onRollOver = function()
{
    _root.countdown._visible = true;
    _root.countdown.gotoAndPlay('1');
    setTimeout(function ()
    {
    ExternalInterface.call("prettyLaunch","http://bolle.com/news/official-eyewear-telluride.aspx?ie=UTF-8&amp;oe=UTF-8&amp;q=prettyphoto&amp;iframe=true&amp;width=100%&amp;height=100%","");
    trace('time');
    },3000);

};

bButton.onRollOut = function()
{
    _root.countdown._visible = false;
    _root.countdown.gotoAndStop('1');
/*clearTimeout code here...*/

};

```
