Copy link to clipboard
Copied
Greetings,
I have been trying to find the answer for a while, but they all say the same thing and I have already fixed my instance.
You are supposed to be able to click on the button and go to the next "page" (frame). I DO already have names for my instance. The button name is purple_btn and the instance is purple1_btn.
Here is my code.
stop();
purple1_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_4);
function fl_ClickToGoToAndPlayFromFrame_4(event:MouseEvent):void
{
gotoAndPlay(21);
}
My friend and I have tried moving things around and changing layers and so on, but nothing has been working, so any help would be greatly appreciated.
Thanks in advance.
I was able to figure it out. Thank you!
Copy link to clipboard
Copied
Hi.
The code seems correct to me.
Please double check that when you select your button on stage and go to the Properties panel (Ctrl/Cmd + F3) the name field (the first field on top) is really purple1_btn and that the code frame and the button frame are the same (not necessarily the same layer).
Regards,
JC
Copy link to clipboard
Copied
Hello,
I did both of those things already, but checked again and still no change.
Thank you
Copy link to clipboard
Copied
Can you post your FLA?
Copy link to clipboard
Copied
I was able to figure it out. Thank you!
Copy link to clipboard
Copied
Glad to hear that you're able to figure it out? Can you post your solution here for the benefit of other users?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now