Hey all,

Having a bit of trouble with my menu. I have buttons located on 3 different scenes in the FLA, and want to link between them. All my code is located on one AS file.

My code setup is as follows:

In the main function I have my even listeners. For example, for the "help" button:

Code:
help_btn.addEventListener(MouseEvent.MOUSE_UP, helpPressed);
Which calls the "helpPressed" function:

Code:
public function helpPressed(myEvent:MouseEvent):void {
			gotoAndPlay(1, "Help");
		}
Which goes to frame 1 of the "Help" scene.

Now on the "Help" scene, I have another button called "help_rtn", which is to return to the main menu. Again, I have an event listener:

Code:
help_rtn.addEventListener(MouseEvent.MOUSE_UP, helpRtnPressed);
and the function:

Code:
public function helpRtnPressed(myEvent:MouseEvent):void {
			gotoAndPlay(1, "MainMenu");
		}
But as this button is not on the first scene, I get the following error:

Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at MenuInit$iinit()
I think this has something to do with the event listerners, and that I must define what scene the button is on. But I have no idea how to do this... can someone help me?