Skip to main content
Inspiring
March 1, 2018
Answered

Html 5 ClickToGoToAndStop causing freeze

  • March 1, 2018
  • 2 replies
  • 1084 views

I started a project back in Flash 2014 Canvas that use the code below. Over the last several years I have made updates to it. It has worked fine until recently.

The project has 5 frames. Each frame contains its own MovieClip. In some of the MovieClips I use the code below. As I navigate through my 5 frames if I click on a frame that includes a movie clip with the code below the project freezes when testing in web browser. I have tried Safari, Firefox and Chrome and they all freeze.

If I remove the code I can navigate through the 5 frames without a problem. I have opened the file in Flash 2014, 2015 and Animate and get the same error. The code I am using is the html code snippet Flash provides.

Does anyone know if something has changed with HTML 5 or JS that Adobe didn't update and the newer browser don't like it?

- - - - - - - - - - -  -

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

function fl_ClickToGoToAndStopAtFrame()

{

  this.gotoAndStop(1);

}

- - - - - - - - - -  - - -

Any insight is appreciated.

Thank you,

Brett

This topic has been closed for replies.
Correct answer ClayUUID

The images are in the library - none are being pulled from other places..

Test viewing in Animate works. No issues. All images display fine. ClickToGoToAndStop works fine.

When I open a browser and open the html file it freezes. Then the JS console gives the same error about cross-origins security. But the images are displaying fine. If I remove the ClickToGoToAndStop code it works fine and the images display fine. It is the code that seems to be making an issue.

I opened some older files where I used the same code that worked perfectly 12 months ago. They are also now freezing when I view in a browser. I have tested in Safari, Chrome and Firefox. I sent html file to a friend and they also run into freeze.

Everything seemed fine until I downloaded Animate and used it. I have tested these files backward in Flash 2014 & 2015 and now get this error there too. Would installing Animate do anything?

Thanks for your help.


74designer  wrote

Test viewing in Animate works. No issues. All images display fine. ClickToGoToAndStop works fine.

Then stop worrying about it. Some browsers freak out and trigger false cross-domain security warnings when content is loaded from the local file system instead of a web server. That's why test mode in Animate runs the page through a local web server. Your content will work fine when uploaded to a web host.

What's changed to cause the errors is most likely your web browsers, not Animate.

Also I wouldn't recommend forcing Animate to use a version of CreateJS other than the version it publishes. We have no idea what dependencies exist between Animate and that specific version. I'm sure Adobe will update Animate to use the latest version of CreateJS when they've verified that it's compatible.

2 replies

Legend
March 2, 2018

What messages do you see in the developer console?

kglad
Community Expert
Community Expert
March 2, 2018

try:

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

function fl_ClickToGoToAndStopAtFrame(e)

{

e.stopImmediatePropagation();

  this.gotoAndStop(1);

}

[moved from ActionScript 3 to Adobe Animate CC - General]

Inspiring
March 2, 2018

Kglad - thanks for suggestion but that did not correct things.

ClayUUID - attached is a screen shot of the web console. I am not sure what the error means.

Thank you both for the help.

Does someone have any insight to what the errors in the screen shot are and how I can correct them?

Thank you.

Legend
March 2, 2018

Well, it clearly says it's having a cross-origin security issue. Are you loading an image into the canvas from somewhere else? Does this happen even when testing the document from within Animate?