# Timer error :(

**URL:** https://forum.kirupa.com/t/timer-error/310028
**Category:** flash
**Created:** [May 30, 2010, 7:10pm UTC](https://forum.kirupa.com/t/timer-error/310028 "2010-05-30T19:10:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aleksandar28](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@aleksandar28](https://forum.kirupa.com/u/aleksandar28)
#### Post date: [May 30, 2010, 7:10pm UTC](https://forum.kirupa.com/t/timer-error/310028/1 "2010-05-30T19:10:50Z")

</div>

i made timer for my game, and code is

var countDownIncLvl2:Number=1;  
var totalSecsLvl2 = 60;  
var countDownSecsLvl2 = totalSecsLvl2;  
counterLvl2.text=countDownSecsLvl2;  
var timeLvl2:Timer = new Timer(countDownIncLvl2\*1000);  
time.addEventListener(TimerEvent.TIMER,tickLvl2);  
function tickLvl2(e:TimerEvent):void {  
if (countDownSecsLvl2 == 0){  
trace(“count down complete”);  
time.stop();  
countDownSecsLvl2 = totalSecsLvl2;gotoAndPlay(1);}  
else {  
countDownSecsLvl2= countDownSecsLvl2-countDownIncLvl2;  
counterLvl2.text=countDownSecsLvl2;  
}  
}

```
if(time.running == true) {
        trace("alredy running");
        } else {
            counterLvl2.text=totalSecsLvl2;
            time.start();
            }

```

but it keeps showing me error in output as:  
TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at proba1\_fla::MainTimeline/tickLvl2()  
at flash.utils::Timer/\_timerDispatch()  
at flash.utils::Timer/tick()

please somebody help :puzzled:
