Skip to main content
Known Participant
August 28, 2024
Question

why I can't use click go to frame and stop in HTML5 Canvas , is there any limit in using it ?

  • August 28, 2024
  • 2 replies
  • 344 views

Hello I'm new in Adobe Animate 
I wanna create an interactive multimedia using Adobe Animate with HTML5 Canvas,  I use several buttons and labels on other buttons, I don't experience any problems, why can't the code go to Frame and stop be run in this section? I feel that I have used the labels correctly.

here the SS from previous label, I wanna goto next frame, I want to go to the next frame after that label


this.bt_back.addEventListener("click", fl_ClickToGoToAndStopAtFrame_33.bind(this));

function fl_ClickToGoToAndStopAtFrame_33()
{
this.gotoAndStop("LB_ProsedurBekam");
}

this.bt_home.addEventListener("click", fl_ClickToGoToAndStopAtFrame_34.bind(this));

function fl_ClickToGoToAndStopAtFrame_34()
{
this.gotoAndStop("LB_Home");
}

this.bt_nextmateri.addEventListener("click", fl_ClickToGoToAndStopAtFrame_35.bind(this));

function fl_ClickToGoToAndStopAtFrame_35()
{
this.gotoAndStop("LB_Kontraindikasi3");
}

this.bt_backmateri.addEventListener("click", fl_ClickToGoToAndStopAtFrame_41.bind(this));

function fl_ClickToGoToAndStopAtFrame_41()
{
this.gotoAndStop("LB_Kontraindikasi1");
}

Here the script I use 
thank you for helping me

    This topic has been closed for replies.

    2 replies

    kglad
    Community Expert
    Community Expert
    August 28, 2024

    you probably need to readd the buttons so they call their listener functions.  to confirm, put a console.log() or alert() in the listener function and see if it's being called.

    Known Participant
    September 5, 2024

    Thanks for the suggestion, I'll use that method next time.

    kglad
    Community Expert
    Community Expert
    September 5, 2024

    yes, that was the problem and yes, console.log() would have confirmed you needed to re-add (or rename) those buttons.

    JoãoCésar17023019
    Community Expert
    Community Expert
    August 28, 2024

    Hi.

     

    Are the labels and buttons in the same parent timeline?

     

    Please let us know.

     

    Regards,

    JC

    Known Participant
    September 5, 2024

    I've found it, it turns out I was using the same instance name on the button so it didn't work, thanks for helping answer