Buttons need multiple clicks before they work?
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);
}
