Skip to main content
Participant
August 1, 2019
Answered

Works in Animate Test but Not all works in html5

  • August 1, 2019
  • 1 reply
  • 5217 views

I am sure this has been asked many times but after searching I still can't find a solution.

I have created an animation in Adobe Animate that flows fine. I have set the sequnce to loop 3 times but adding this code on the 3nd to last frame.

if (!this.looped) this.looped = 1;

if (this.looped < 3) this.gotoAndPlay("start_frame");

if (this.looped++ == 3) this.stop();

Then on the last frame I show a final screen. I link to this with a button.

this.PopupBtn.addEventListener("click", fl_ClickToGoToFrame1.bind(this));

function fl_ClickToGoToFrame1()

{

    this.gotoAndStop("popup_frame");

}

on the popup frame I have a cancel button which used=s the following script:

this.cancelBtn.addEventListener("click", fl_ClickToGoToStart.bind(this));

function fl_ClickToGoToStart()

{

    this.gotoAndPlay("start_frame");

}

this all works fine in Test Mode, but as soon as I publish to html5 the canel button on the poup fails.

In the publishing settings 'Basic' I have set 'combined image into spritesheet' to off and in 'Image Settings' set this to export Image assets and also turned off combine images into spritesheet.

Why can the test work file but when I puiblish it fails?

This topic has been closed for replies.

1 reply

ClayUUIDCorrect answer
Legend
August 2, 2019
Participant
August 2, 2019

The idea that you need to test your files via a local server is rediculus. We get so many html packages that we can run and view via our browser. Why can't we simply just create and run from our folder. If the permissions or files are wrong then that is an issue in the way Adobe Animate has created the published files.

Participant
August 2, 2019

Actually found the issue with my animation was that the layers needed to be is a certain order for html5 so not to overlap. In test this didn't seem to effect the functionality. But by moving the button layers to the top and make sure they were never over lapped then things work even when publishing and then double clicking file to preview the result.