# Timer not working

**URL:** <https://forum.kirupa.com/t/timer-not-working/282315>\
**Category:** flash\
**Created:** [February 20, 2009, 6:57am UTC](https://forum.kirupa.com/t/timer-not-working/282315 "2009-02-20T06:57:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smallDot](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@smallDot](https://forum.kirupa.com/u/smallDot)\
**Post date:** [February 20, 2009, 6:57am UTC](https://forum.kirupa.com/t/timer-not-working/282315/1 "2009-02-20T06:57:54Z")

</div>

there is no error in the Error window  
what is wrong with this code:

```php

function ShortTimer() {
    // creates a new five-second Timer
    var minuteTimer:Timer = new Timer(1000, 5);
    // designates listeners for the interval and completion events
    minuteTimer.addEventListener(TimerEvent.TIMER, onTick);
    minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE,onTimerComplete);
    // starts the timer ticking
    minuteTimer.start();
}
function onTick(event:TimerEvent):void {
    // displays the tick count so far
    // The target of this event is the Timer instance itself.
    trace("tick " + event.target.currentCount);
}
function onTimerComplete(event:TimerEvent):void {
    trace("Time's Up!");
}

```
