1120: Access of undefined properties button2
Hello,
I'm hoping for some insight into an issue I am having. I am trying to create a series of buttons, one that sends you to another frame, that has a new button, which then sends you to a third frame. When I say buttons, in reality I am just using AS3 event handlers on movie clip symbols, so they act like buttons.
When I just have a handler for the first button with the code, and run the file, it works without fail.
button1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2);
function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void
{
gotoAndPlay(62);
}
But if I add a second movie Clip with a different instance name, and add the action
button2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_3);
function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void
{
gotoAndPlay(82);
}
I get the error on runtime "1120: Access of undefined properties button2".
I'm not sure when when I effectively duplicate the frames, change the instance name and function name, this does not run. Any insight would be wonderful.
Thank you!
