Skip to main content
Participating Frequently
April 20, 2025
Answered

Animate Button not working on separate layer

  • April 20, 2025
  • 2 replies
  • 1081 views

Hello! 

 

I am fairly new to Adobe Animate. I have a presentation im working on for an organizational chart. I have buttons navigating throught a website. 

 

In one area, our Org chart, I am trying to make a button that returns to another frame. However, when I click it, it doesnt move. 

 

I have searched the community forums and troubleshooted what I could. I feel like there is something simple im missing and Im hoping someone can point me in the right direction. 


Here is my code snip for this layer/timeline

/* Click to Go to Frame and Stop
Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.
Can be used on the main timeline or on movie clip timelines.

Instructions:
1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
2.Frame numbers in EaselJS start at 0 instead of 1
*/


this.RCCR_Button5.addEventListener("click", fl_ClickToGoToAndStopAtFrame_22.bind(this));

function fl_ClickToGoToAndStopAtFrame_22()
{
	this.gotoAndStop(0);
}


/* Click to Go to Frame and Stop
Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.
Can be used on the main timeline or on movie clip timelines.

Instructions:
1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
2.Frame numbers in EaselJS start at 0 instead of 1
*/


this.NVOButton5.addEventListener("click", fl_ClickToGoToAndStopAtFrame_23.bind(this));

function fl_ClickToGoToAndStopAtFrame_23()
{
	this.gotoAndStop(97);
}


/* Click to Go to Frame and Stop
Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.
Can be used on the main timeline or on movie clip timelines.

Instructions:
1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
2.Frame numbers in EaselJS start at 0 instead of 1
*/


this.SASButton5.addEventListener("click", fl_ClickToGoToAndStopAtFrame_24.bind(this));

function fl_ClickToGoToAndStopAtFrame_24()
{
	this.gotoAndStop(146);

 

    Correct answer JoãoCésar17023019

    Thanks.

     

    Try moving the code that adds the listeners to the first frame instead.

    2 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    April 21, 2025

    Hi.

     

    Are the buttons and code in the main timeline?

     

    Please let us know.

     

    Regards,

    JC

    JoãoCésar17023019
    Community Expert
    Community Expert
    April 21, 2025

    Thanks.

     

    Which frame is the code for adding event listeners to the buttons is located in?

    JoãoCésar17023019
    Community Expert
    JoãoCésar17023019Community ExpertCorrect answer
    Community Expert
    April 21, 2025

    Thanks.

     

    Try moving the code that adds the listeners to the first frame instead.

    kglad
    Community Expert
    Community Expert
    April 20, 2025

    which button's not working?

    Participating Frequently
    April 20, 2025

    Hello! In the video on the last page I click three buttons. None of them work to bring the slide back to their designated pages and I am unsure why. Let me know if you need any more information, and I am happy to provide anything I can! 

    kglad
    Community Expert
    Community Expert
    April 20, 2025

    re-enter their instance names in the properties panel