• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Works in Animate Test but Not all works in html5

New Here ,
Aug 01, 2019 Aug 01, 2019

Copy link to clipboard

Copied

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?

Views

4.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 01, 2019 Aug 01, 2019

Votes

Translate

Translate
LEGEND ,
Aug 01, 2019 Aug 01, 2019

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2019 Aug 02, 2019

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2019 Aug 02, 2019

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines