error#1069 -- Please help
Hi could use some help. I'm learning AS and need some help. Im using AS3 and trying to use simple buttons and i have the fallowing code:
bHome.addEventListener(MouseEvent.MOUSE_DOWN, goMenu);
bClasses.addEventListener(MouseEvent.MOUSE_DOWN, goMenu);
bTeachers.addEventListener(MouseEvent.MOUSE_DOWN, goMenu);
bStudio.addEventListener(MouseEvent.MOUSE_DOWN, goMenu);
bContact.addEventListener(MouseEvent.MOUSE_DOWN, goMenu);
//
//
function goMenu(e:Event) {
var buttonName:String=e.target.name;
//
if (buttonName=="bHome") {
trace(e.target.name +" button selected");
this.gotoAndPlay("Home");
//
//
} else if (buttonName=="bClasses") {
trace(e.target.name +" button selected");
this.gotoAndPlay("Classes");
//
//
} else if (buttonName=="bTeachers") {
trace(e.target.name +" button selected");
this.gotoAndPlay("Teachers");
//
} else if (buttonName=="bStudio") {
trace(e.target.Name +" button selected");
this.gotoAndPlay("Studio");
//
//
} else if (buttonName=="bContact") {
trace(e.target.Name +" button selected");
this.gotoAndPlay("Contact");
}
};
The home button, classes button, and teachers button all work although the last two studio, and contact get the error:
ReferenceError: Error #1069: Property Name not found on flash.display.SimpleButton and there is no default value.
at SalutationsYoga_fla::MainTimeline/goMenu()
I have no idea why this is happeneing everything seems to be fine.
Any help would be great!
Thanks!!