# Dudes this is pissing me off

**URL:** <https://forum.kirupa.com/t/dudes-this-is-pissing-me-off/311584>\
**Category:** Uncategorized\
**Created:** [July 11, 2010, 10:54am UTC](https://forum.kirupa.com/t/dudes-this-is-pissing-me-off/311584 "2010-07-11T10:54:30Z")\
**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:** [July 11, 2010, 10:54am UTC](https://forum.kirupa.com/t/dudes-this-is-pissing-me-off/311584/1 "2010-07-11T10:54:30Z")

</div>

my game timer code is :

```auto
var count:Number = 36;

var myTimer:Timer = new Timer(1000,count);

myTimer.addEventListener(TimerEvent.TIMER, countdown);

myTimer.start();

function countdown(event:TimerEvent):void {
    counter.text = String((count)-myTimer.currentCount);//<----- debugger is showing error here

    if(count <= 0){
         myTimer.removeEventListener(TimerEvent.TIMER, countdown);
         myTimer.stop();           
}
if (counter.text == String("0")) {
    gotoAndPlay(426);
   }
}

```

and sometimes in middle of playing it shows me this error :

```auto
TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at TestYourLogic_fla::MainTimeline/countdown()
   at flash.utils::Timer/_timerDispatch()
   at flash.utils::Timer/tick()

```

What to do, please answer. Thanks  
Aleksandar
