# Error in the middle of the game?! xD

**URL:** <https://forum.kirupa.com/t/error-in-the-middle-of-the-game-xd/310059>\
**Category:** Uncategorized\
**Created:** [May 31, 2010, 4:36pm UTC](https://forum.kirupa.com/t/error-in-the-middle-of-the-game-xd/310059 "2010-05-31T16:36:18Z")\
**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 31, 2010, 4:36pm UTC](https://forum.kirupa.com/t/error-in-the-middle-of-the-game-xd/310059/1 "2010-05-31T16:36:18Z")

</div>

i runned debuger  
(error shows sometimes, and sometimes not XD)

```auto

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at test_fla::MainTimeline/countdown()[test_fla.MainTimeline::frame571:14]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

```

i must go on continue to continue play  
debugger shows error

```auto
var count:Number = 60;

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

//3.
myTimer.addEventListener(TimerEvent.TIMER, countdown);

//4.
myTimer.start();

//5.
function countdown(event:TimerEvent):void {
counter.text = String((count)-myTimer.currentCount);//<-------- HERE

if(counter.text == "0"){
gotoAndPlay(1);
}
}

```

Any help?! Thanks  
Aleksandar
