# Stop timer inside TimerEvent

**URL:** <https://forum.kirupa.com/t/stop-timer-inside-timerevent/331787>\
**Category:** flash\
**Created:** [October 22, 2013, 12:35am UTC](https://forum.kirupa.com/t/stop-timer-inside-timerevent/331787 "2013-10-22T00:35:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightkarnation](https://avatars.discourse-cdn.com/v4/letter/n/a5b964/32.png) [@nightkarnation](https://forum.kirupa.com/u/nightkarnation)\
**Post date:** [October 22, 2013, 12:35am UTC](https://forum.kirupa.com/t/stop-timer-inside-timerevent/331787/1 "2013-10-22T00:35:56Z")

</div>

Hey guys! basic question here…  
I am stopping a testTimer variable inside a timer handler… (simple code, as an example)  
Works like a charm, but…I would like testTimer.stop(); to stop the handler before trace(“LOOPINGG”); is processed…  
Any ideas?  
Here’s the simple code:

```auto

var testTimer:Timer = new Timer(1000);

testTimer.addEventListener(TimerEvent.TIMER, onTestTimer);
testTimer.start();

function onTestTimer(event:TimerEvent)
{
    trace("LOOPING");
    testTimer.stop(); //stops the timer, but trace("LOOPINGG") is still traced...
    trace("LOOPINGG"); //I don't want this to be traced, right now...
}

```
