Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Animated Button Help! New to Animate

New Here ,
Dec 06, 2018 Dec 06, 2018

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.

518
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 06, 2018 Dec 06, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 06, 2018 Dec 06, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 07, 2018 Dec 07, 2018

Hi,

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2018 Dec 07, 2018
LATEST

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 06, 2018 Dec 06, 2018
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2018 Dec 07, 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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines