Animate CC-Button On Click ActionScript/Coding
Copy link to clipboard
Copied
Hey guys! I have a question that I am struggling for some time that is the action script for "button on click" as picture below.
For my part: (look at 1st picture below) When I click "Product" button below, I want the "Product" information to pop out (2nd picture below). But I couldn't solve it with that. Maybe there's a problem on my action script/coding (3rd picture)
My problem is after I click the "product"button (1st picture) it didn't appear anything.
Anyone Professional can help me with that? Thanks a lot! 😄🙏🏻
Copy link to clipboard
Copied
Make sure the code for the btn and function is on the "start page frame", (probably frame number 1).
Copy link to clipboard
Copied
Yep, for the frame no 1 is okay but other frame, it couldn't "pop out" information. This is what I am struggling for...
Copy link to clipboard
Copied
Is the "pop out" information a single image directly on frame 3? Or is it an animation inside a MovieClip somewhere?
Copy link to clipboard
Copied
Yes, I already convert the "pop out" information to Button.
Copy link to clipboard
Copied
I’m not sure what else you are doing here, but the code on the picture is on frame 3 and is only triggered when you enter that frame. When your button - that should have the instance name btn_Product - is clicked, the main timeline should play from frame 3 - the frame you already are on. This is probably not what you want.
You should share some more info on the other code you have, and where it is located.
Copy link to clipboard
Copied
To go to frame 3 you have to write gotoAndStop (3); not gotoAndPlay (3);
Copy link to clipboard
Copied
I tried already but is still the same...couldn't work...
Copy link to clipboard
Copied
Hi.
I think it's like Lars said. You're on frame 3 of the main timeline and your code sends the playhead to the frame 3 of the main timeline. The result is that you stay in the same place.
Please confirm if this is the case or please add more infos so we can help you out.
Regards,
JC

