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

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

Community Beginner ,
Aug 28, 2024 Aug 28, 2024

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

1 label.pngexpand image

 

2 label.pngexpand image


 

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

225
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 ,
Aug 28, 2024 Aug 28, 2024

Hi.

 

Are the labels and buttons in the same parent timeline?

 

Please let us know.

 

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
Community Beginner ,
Sep 05, 2024 Sep 05, 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 

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 ,
Aug 28, 2024 Aug 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.

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 Beginner ,
Sep 05, 2024 Sep 05, 2024

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

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 ,
Sep 05, 2024 Sep 05, 2024
LATEST

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

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