Copy link to clipboard
Copied
I'm creating a navigation bar with adobe animate and I have created an animated button but I do not know how to make something, such as text, to show up once I click the button as well as a back button. I tried inserting an action on the main timeline, the second layer timeline, on the down state of the button etc. I just can't seem to get it to work without a compiler error.
Update: My animated button isn't an animation when you hover over the button but rather it is an animation where the symbol enters the stage as a movie clip but it is also a button... I just need this button to do something like have text appear when it is clicked and also have a back button option to return to the first frame before the first button was clicked.
Copy link to clipboard
Copied
Hi.
I'm not really sure of what exactly you want to achieve.
Anyway, to simply show a text field with a button, add a click event listener to the button and set the visibility or the text field to true in the handler function. Like this:
import flash.events.MouseEvent;
function onClick(e:MouseEvent):void
{
yourTextField.visible = true;
}
yourTextField.visible = false;
yourButton.addEventListener(MouseEvent.CLICK, onClick);
If this is not what you want, can you provide more details?
Regards,
JC
Copy link to clipboard
Copied
It tells me "access of undefined property ____button" whenever I try to incorporate my button. Why is it an undefined property when it is a button? I can click the button and it shows me the hover/down/hit states so it has to be a button but when I try to give it an event listener, it shows me that compiler error.
Copy link to clipboard
Copied
Hi,
select CTRL and J and make sure 'Use Advanced Layers' is not ticked. Give that a try.
Copy link to clipboard
Copied
What does advance layering do and what difference does it make if it is not ticked rather than ticked? Will it affect the work I've done up till this point?
Copy link to clipboard
Copied
try this tutorial
Copy link to clipboard
Copied
I took a look at the video but my problem seems to be more complicated with the whole layering issue. I will try to work on it some more!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now