Skip to main content
Known Participant
Aug 28, 2024 11:51 AM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

    5 replies

    kglad
    Community Expert
    Community Expert
    Aug 28, 2024 1:26 PM UTC

    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.

    Translate
    Known Participant
    Sep 5, 2024 9:47 AM UTC

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

    Translate
    kglad
    Community Expert
    Community Expert
    Sep 5, 2024 12:32 PM UTC

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

    Translate
    JoãoCésar17023019
    Community Expert
    Community Expert
    Aug 28, 2024 12:37 PM UTC

    Hi.

     

    Are the labels and buttons in the same parent timeline?

     

    Please let us know.

     

    Regards,

    JC

    Translate
    Known Participant
    Sep 5, 2024 9:45 AM UTC

    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 

    Translate