Skip to main content
Participant
December 6, 2018
Question

Animated Button Help! New to Animate

  • December 6, 2018
  • 2 replies
  • 610 views

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.

This topic has been closed for replies.

2 replies

Community Expert
December 6, 2018
JoannwAuthor
Participant
December 7, 2018

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!

JoãoCésar17023019
Community Expert
Community Expert
December 6, 2018

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

JoannwAuthor
Participant
December 6, 2018

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.

Inspiring
December 7, 2018

Hi,

select CTRL and J and make sure 'Use Advanced Layers' is not ticked. Give that a try.