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

Buttons need multiple clicks before they work?

Participant ,
Mar 27, 2017 Mar 27, 2017

Hi, I made this example test

I use standard code snippets from within Animate CC. The green button restarts the animation, the red button stops it. However, upon loading the animation, I have to click a button 2 times before it does what it's supposed to: Reload the animation, click the red button once (nothing happens), click it again (nothin happens), click it a third time, and it does what it's supposed to. Same goes for the green button. What's causing this?

Heres the code snippets I use (as I said, they're standard, from the 'Code Snippets' panel):

Green button:

this.button_1.addEventListener("click", fl_ClickToGoToAndPlayFromFrame.bind(this));

function fl_ClickToGoToAndPlayFromFrame()

{

  this.gotoAndPlay(1);

}

Red button:

this.button_2.addEventListener("click", fl_ClickToGoToAndStopAtFrame.bind(this));

function fl_ClickToGoToAndStopAtFrame()

{

  this.gotoAndStop(1);

}

405
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 , Mar 27, 2017 Mar 27, 2017

The test works all the time on my Mac, but on iPad Pro it sometimes misses. I think that's because you have the HTML set up to allow highlighting and scrolling of the page. If those were disabled I would expect iPad to work the same.

Translate
Community Expert ,
Mar 27, 2017 Mar 27, 2017

the 2nd frame has to load before you can goto 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 ,
Mar 27, 2017 Mar 27, 2017
LATEST

The test works all the time on my Mac, but on iPad Pro it sometimes misses. I think that's because you have the HTML set up to allow highlighting and scrolling of the page. If those were disabled I would expect iPad to work the same.

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