# Timer Event keeps triggering!?

**URL:** <https://forum.kirupa.com/t/timer-event-keeps-triggering/299723>\
**Category:** flash\
**Created:** [November 10, 2009, 3:47am UTC](https://forum.kirupa.com/t/timer-event-keeps-triggering/299723 "2009-11-10T03:47:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikiekwoods](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mikiekwoods](https://forum.kirupa.com/u/mikiekwoods)\
**Post date:** [November 10, 2009, 3:47am UTC](https://forum.kirupa.com/t/timer-event-keeps-triggering/299723/1 "2009-11-10T03:47:00Z")

</div>

I think I’m just missing something simple.

**Explanation of the Code**  
My code is contained in a movie clip that plays an animation on roll over and reverses the animation on roll off. The reverse uses a timer that backs up a frame on the each time event. It works for the most part.

**Problem**  
I tried to use watchTimer.stop(); to end the timer. But the eventListener that tracks timer events keeps triggering which I don’t want.

```auto

var watchTimer:Timer = new Timer(30);
this.addEventListener(MouseEvent.MOUSE_OVER, foldUp);
this.addEventListener(MouseEvent.MOUSE_OUT, foldDown);

//Play Animation on MOUSE_OVER
function foldUp(evt:MouseEvent):void {
    if (this.currentFrame != 11) {
        gotoAndPlay(currentFrame + 1);
    }
}

//Start Timer on Mouse Off
function foldDown (evt:MouseEvent):void {
    watchTimer.start();
}

//Play Reverse Animation on Timer Event
watchTimer.addEventListener(TimerEvent.TIMER, onTimer);
function onTimer(evt:TimerEvent):void {
    if (currentFrame != 1){
        gotoAndStop(currentFrame - 1)
    }
    else {
        //End Timer when Animation is completed
       watchTimer.stop();
    }
}

```
