# as3 error message

**URL:** <https://forum.kirupa.com/t/as3-error-message/263062>\
**Category:** flash\
**Created:** [June 12, 2008, 9:36am UTC](https://forum.kirupa.com/t/as3-error-message/263062 "2008-06-12T09:36:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![highway81](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@highway81](https://forum.kirupa.com/u/highway81)\
**Post date:** [June 12, 2008, 9:36am UTC](https://forum.kirupa.com/t/as3-error-message/263062/1 "2008-06-12T09:36:42Z")

</div>

hi,

i a currently developing a space invaders style flash game and have came across the following error message:

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at UFOGame/endGameLevel2()  
at UFOGame/checkForAlienHits()

i have searched through the code and am unsure what it means. the function endGameLevel2() is to display the game over screen but this error is only displayed when you advance to level3 and not when it is game over.

any help would be greatly appreciated.

thanks

---

<div class="post-metadata">

**Author:** ![pensamente](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pensamente/32/1208_2.png) [@pensamente](https://forum.kirupa.com/u/pensamente)\
**Post date:** [June 12, 2008, 9:50am UTC](https://forum.kirupa.com/t/as3-error-message/263062/2 "2008-06-12T09:50:24Z")

</div>

some code would help to understand your problem, but it seams you are trying to acess a property or method of a null object reference… what more can I say 😛

---

<div class="post-metadata">

**Author:** ![highway81](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@highway81](https://forum.kirupa.com/u/highway81)\
**Post date:** [June 12, 2008, 12:19pm UTC](https://forum.kirupa.com/t/as3-error-message/263062/3 "2008-06-12T12:19:27Z")

</div>

thanks smartarse

---

<div class="post-metadata">

**Author:** ![dthought](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dthought/32/3573_2.png) [@dthought](https://forum.kirupa.com/u/dthought)\
**Post date:** [June 12, 2008, 1:18pm UTC](https://forum.kirupa.com/t/as3-error-message/263062/4 "2008-06-12T13:18:20Z")

</div>

pensamente is correct - without seeing more of the code, that error is virtually meaningless on its own.

---

<div class="post-metadata">

**Author:** ![Fidodo](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@Fidodo](https://forum.kirupa.com/u/Fidodo)\
**Post date:** [June 12, 2008, 4:26pm UTC](https://forum.kirupa.com/t/as3-error-message/263062/5 "2008-06-12T16:26:22Z")

</div>

Cannot access a property or method of a null object reference. means this:  
You Cannot access a property or method of a null object reference.

Something is not instantiated or defined, so ya didn’t set a variable. Ya can’t access a variable that doesn’t have a value obviously. What exactly do you expect us to tell you without any code? Anyways don’t bother posting it because this type of error happens because you were sloppy and didn’t set a variable so you should fix that yourself.
