Skip to main content
Known Participant
June 13, 2007
Question

error 1009 buttons

  • June 13, 2007
  • 1 reply
  • 281 views
I have used the following code:

stop();

cap_Btn.addEventListener(
MouseEvent.MOUSE_DOWN,
function(evt:MouseEvent):void {
gotoAndPlay("_cap");
}
);

samp_Btn.addEventListener(
MouseEvent.MOUSE_DOWN,
function(evt:MouseEvent):void {
gotoAndPlay("_samp");
}
);

and received this error when I click on the button:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MethodInfo-63()

What am I doing wrong?

Thanks in advance for any help with this issue.

Rob
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
June 13, 2007
you're not referencing a movieclip for flash to locate "_cap" and "_samp".

where are those frames labels? in cap_Btn and samp_btn, resp? both on the main timeline? elsewhere?
adamonAuthor
Known Participant
June 13, 2007
The frame labels are located within a movie that is in the main scene. The two buttons are also located in that movie. I also get that error message when I click a button that is not in that movie. The button is located in the main scene. You can see the error code at visionaryfusion.com. It is in the work section of the site, capabilities or our work.

Thanks again for your help.

Rob