Copy link to clipboard
Copied
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
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 Animat
...Copy link to clipboard
Copied
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]
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
use easeljs 1.0
Copy link to clipboard
Copied
Where do I go to select that? Under Publish Setting? I do not see it there.
Thanks.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
I loaded to server and all seems to be working fine.
I had sent the file off thinking it was working fine but I was told of this freeze error. Which I did encounter when I would open the file on my HD using a web browser. That must be why they are also getting the same error as they are viewing it on their HD to review before upload and found the freeze error.
Thank you everyone for your input. I will look at using the CreateJS for the future.
Thank you.
Copy link to clipboard
Copied
What messages do you see in the developer console?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now