# Please Help! TypeError: Error #1009

**URL:** <https://forum.kirupa.com/t/please-help-typeerror-error-1009/316212>\
**Category:** flash\
**Created:** [November 16, 2010, 5:56am UTC](https://forum.kirupa.com/t/please-help-typeerror-error-1009/316212 "2010-11-16T05:56:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pogo03](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@Pogo03](https://forum.kirupa.com/u/Pogo03)\
**Post date:** [November 16, 2010, 5:56am UTC](https://forum.kirupa.com/t/please-help-typeerror-error-1009/316212/1 "2010-11-16T05:56:20Z")

</div>

Hey guys,

I’m new to flash and actionscript, and am stuck with one particular problem that is preventing me from completing a game for my class.

My game is a typical shooting gallery style game. The player shoots at zombies moving towards a house. If the zombie touches the house, then the player is meant to be taken to a game over screen. While this does work if a zombie touches the house, half the time no zombie will be near the house, and the player will still be taken to the game over screen. I keep getting this error in the output:

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at zombieonslaught\_fla::MainTimeline/movetarget()

Here’s the code that the TypeError is reffering to:

```auto

function movetarget(evt:Event):void {
    for (var i:int = 0; i < zombies.length; i++) {
        zombies*.x+=zombies*.pointsValue/zombieSpeed;
        if (zombies*.hitTestObject(house)) {
            lose=true;
            gameOver();
        }
    }
}

```

Any help will be greatly appreciated, thank you! 🙂
