# Flash AS3: Null object reference...WHY?

**URL:** <https://forum.kirupa.com/t/flash-as3-null-object-reference-why/296052>\
**Category:** flash\
**Created:** [September 9, 2009, 2:52am UTC](https://forum.kirupa.com/t/flash-as3-null-object-reference-why/296052 "2009-09-09T02:52:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![digs20](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@digs20](https://forum.kirupa.com/u/digs20)\
**Post date:** [September 9, 2009, 2:52am UTC](https://forum.kirupa.com/t/flash-as3-null-object-reference-why/296052/1 "2009-09-09T02:52:50Z")

</div>

Hi Here’s my code:

preloaderMC.addEventListener (Event.ENTER\_FRAME, startSite);

function startSite(event:Event):void  
{  
if(preloaderMC.currentLabel == “tapeRollEnd”)  
{  
nextFrame();  
}  
}

Why do I get an error of:

“TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at MMFinalSite\_AS3\_2\_fla::MainTimeline/startSite()”

I’m just asking it to go to next frame (which is frame 1 of next scene) when it enters the described frame label.

So any idea of how to avoid this error message?
