Skip to main content
josephf61175
Participant
April 23, 2020
Question

Animate CC button rollover pop up event

  • April 23, 2020
  • 1 reply
  • 1054 views

Hi;

 

I have three buttons in Anumate CC. I want each to display a different block of text. Is it best to use Javascript or HTML5? Is an event listener the primary means to do this?

 

Thanks

 

jjfjr

 

    This topic has been closed for replies.

    1 reply

    avtutorials
    Known Participant
    April 23, 2020

    Hi Joseph,

    You won't use HTML5 to do this; you'll use Javascript.  Put a dynamic text object on the stage, named myTextObject1.  Have your button object named button1.  This code should work:

    var root = this;
    this.button1.addEventListener("click", button1Function);
    function button1Function() {
    	root.textObject1.text = "hello";
    }

     

    josephf61175
    Participant
    April 27, 2020
    Hi;

    Thanks for the response. I'm rather new to Animate. Where / how do I insert this code?
    Joe
    avtutorials
    Known Participant
    April 27, 2020

    Timeline, select the frame, and hit F9 key.  That's one of the basics of using Adobe Animate -- the beginner tutorials that Adobe offers for learning the interface are essential before you do anything else.