Skip to main content
Inspiring
July 16, 2017
Answered

Please help- Clicking not working in publish only in preview with html5

  • July 16, 2017
  • 1 reply
  • 3769 views

With html5 canvas, clicking to go to a frame and play doesn't seem to work when publishing and opening the published file in chrome. Well, any type of clicking code doesn't work really...This happens when using imported images or any graphics and making movie clips out of them.

Code is fine, just using the basic example snippets. The weird thing is, everything works perfect in preview mode when pressing control enter to preview in chrome. But nothing works when publishing and opening the published file. Only displays the canvas but with non working buttons. What is the issue here? Is this a bug in a new update or should I reinstall or what?

    This topic has been closed for replies.
    Correct answer NeoInTheMatrix

    Each time you Test Movie there is a unique ID attached, and it should work in Chrome and another browser. If you Publish, then there is no unique ID, and you may need to clear cache to get the latest version.


    After reading about a similar console error here:

    javascript - Cross-origin data in HTML5 canvas - Stack Overflow

    it seems as you say unless its a web file I need to give chrome a parameter to allow it locally so adding --allow-file-access-from-files in target shortcut of chrome seemed to help. Is this an ok solution?

    1 reply

    Colin Holgate
    Inspiring
    July 16, 2017

    It's common for test movie to work but opening the published file won't work Either put the files on the server they are due to go to, or use the developer tools in your browser to see what error message is being shown in Console/Errors.

    In older versions of Animate the most likely culprit was using Spritesheets. Turning that off would fix the local testing.

    Inspiring
    July 16, 2017

    Thanks for the reply!

    The error in chrome tools console is:

    createjs-2015.11.26.min.js:13 Uncaught An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images.

    So the only way to fix this is uploading all the files somewhere? No other way?

    The reason I prefer to publish offline and then refresh the published file in chrome is because its faster than animates preview, because sometimes the preview freezes or takes a while to load when you keep using it back to back and it gets frustrating..

    Colin Holgate
    Inspiring
    July 16, 2017

    Each time you Test Movie there is a unique ID attached, and it should work in Chrome and another browser. If you Publish, then there is no unique ID, and you may need to clear cache to get the latest version.