Skip to main content
Participant
January 9, 2022
Question

Help with getting a button to escape a loop

  • January 9, 2022
  • 1 reply
  • 108 views

I have an animation that is 448 frames long and I have the following actions:

FRAME 365

this.button.on("click", function(a) {
window.open("http://www.adobe.com", "_blank");
gotoAndPlay(437);
});

 

FRAME 436

this.gotoAndPlay(365);

 

FRAME 448

stop();

 

I cannot seem to get the button, labled 'button', to escape the loop created in frame 436.  I added the 'window.open("http://www.adobe.com", "_blank");' bit as just a sanity check to make sure the button is working. It is.

 

Does anyone know how to get this to work? 

Thanks

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 9, 2022

you need to explicitly "scope" all methods and properties in canvas:

 

this.gotoAndPlay(437);

 

and

 

this.stop();