# Error #1009 help please

**URL:** https://forum.kirupa.com/t/error-1009-help-please/325937
**Category:** flash
**Created:** [November 12, 2011, 3:30pm UTC](https://forum.kirupa.com/t/error-1009-help-please/325937 "2011-11-12T15:30:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Virtual\_Machine](https://avatars.discourse-cdn.com/v4/letter/v/a698b9/32.png) [@Virtual\_Machine](https://forum.kirupa.com/u/Virtual_Machine)
#### Post date: [November 12, 2011, 3:30pm UTC](https://forum.kirupa.com/t/error-1009-help-please/325937/1 "2011-11-12T15:30:57Z")

</div>

Hi all

I’m relatively new to Flash but can anybody help me with a particular problem I’m having please? Within Adobe Flash Professional CS3 I’ve managed to develop a button that tracks mouse movement; whilst also implementing the ability for the button to skip to a particular frame within the timeline once it is clicked on. My problem that I’ve encountered with this is that in the output console window, when I go to test the file, I keep getting a:

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

The two scripts that are in my actions layer are:

startbutton.addEventListener(MouseEvent.CLICK, fl\_MouseClickHandler);  
function fl\_MouseClickHandler(event:MouseEvent):void  
{  
gotoAndStop(16);  
}  
stage.addEventListener(Event.ENTER\_FRAME, update);  
function update(evt:Event):void  
{  
startbutton.x = stage.mouseX - startbutton.width \* 0.3;  
startbutton.y = stage.mouseY - startbutton.height \* 0.3;  
}

AND

stop();

Does anyone know that solution to this issue. Help much appreciated.
