Copy link to clipboard
Copied
ahhh someone please help, cant seem to figure out what is wrong here
keep getting the 1120: access of undefined property go1button/go2button/go3button for this code
go1Button.addEventListener(MouseEvent.CLICK, screenOneHandler);
go2Button.addEventListener(MouseEvent.CLICK, screenTwoHandler);
go3Button.addEventListener(MouseEvent.CLICK, screenThreeHandler);
function screenOneHandler(evt:MouseEvent):void {
gotoAndStop("screenOne");
}
function screenTwoHandler(evt:MouseEvent):void {
gotoAndStop("screenTwo");
}
function screenThreeHandler(evt:MouseEvent):void {
gotoAndStop("screenThree");
}
Copy link to clipboard
Copied
this mean go1Button, go2Button and go3Button don't exist
are these buttons you have added to the stage using CS5 ? if so make sure they have instance names
Copy link to clipboard
Copied
If you added those objects on the stage, once check those instance names. Those instance names should be same as in the code including case sensitivity. If you access those buttons from library, create instances in the code and then apply event.
OR
may be there is another reason for this error. As I expect,
check whether you gave the name for frame or not (as you used in gotoAndStop() function).