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

multiple buttons not working in Adobe Animate HTML5 Canvas doc

Community Beginner ,
Jan 17, 2019 Jan 17, 2019

I'm having trouble with multiple buttons (all with unique instance names) working. Some do but when I have an arrow cycling through some content, the first one works, then the subsequent ones don't. I'm using this code for each button and changing the instance name and function name each time. Other buttons work in layout but where they are replaced with another in the same spot, it doesn't work. Any idea how to fix?

this.Next2_btn.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_44.bind(this));

function fl_ClickToGoToAndPlayFromFrame_44()

{

this.gotoAndStop(1);

}

610
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

correct answers 1 Correct answer

LEGEND , Jan 17, 2019 Jan 17, 2019

If you're just swapping out one button for an identical button, then... why? Why not remove and replace the event listeners instead?

Translate
LEGEND ,
Jan 17, 2019 Jan 17, 2019

Open your browser dev console and check for errors.

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 ,
Jan 17, 2019 Jan 17, 2019

doesn't seem to be any, is there any reason different buttons with different instance names shouldn't click to frame numbers? Sooo frustrating. Other btns work ok, it's the ones in the same spot that replace eachother (arrowing through page content, for instance) that do it...

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
LEGEND ,
Jan 17, 2019 Jan 17, 2019
LATEST

If you're just swapping out one button for an identical button, then... why? Why not remove and replace the event listeners instead?

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