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

Button in HTML5 do not work

New Here ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

Hi. Button that works in Test mode does not work when I publish and open in Safari. I made the buttons in Illustrator, Converted to Symbol and Buttons. And again, It works fine in Test mode. 

 

The script is:

this.Knapp3btn.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_4.bind(this));
function fl_ClickToGoToAndPlayFromFrame_4()
{
this.gotoAndPlay("Dia2000Frame");
 
this.stop();

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

I dont now if these warnings are relevant:

 

WARNINGS: ** 759 Bitmaps packed successfully into 11 spritesheet(s). Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (74) Modifying the transform point in a tween can produce unexpected results. Color effects are published as a filter and subject to the same limitations. (807) Feature not supported: Bevel, gradient glow, and gradient bevel filters. Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system. Motion tweens are published as frame by frame animations. Use classic tweens where possible. (28)

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

Mac, Safari, Animate, HTML5 Canvas

TOPICS
Error

Views

209

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
Community Expert ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

LATEST

Hi.

 

This is the most relevant warning for your issue:

Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.

 

It means you're gonna need to host your content in a local or online server.

 

Phaser website has a really nice tutorial about this browser issue.

https://phaser.io/tutorials/getting-started-phaser3

 

Also, you should really fix/improve these four warnings:

 

Affects perfomance. Try to simplify your shapes.

759 Bitmaps packed successfully into 11 spritesheet(s).

 

May result in unwanted motion.

Modifying the transform point in a tween can produce unexpected results.

 

May cause browser incompatibility and impact on performance.

Color effects are published as a filter and subject to the same limitations.

 

May cause browser incompatibility.

Feature not supported: Bevel, gradient glow, and gradient bevel filters.

 

HTML5 and browsers have a lot of limitations/issues that the Flash Player and The Adobe/HARMAN AIR runtimes didn't have. This is the reason we need to take some precautions.

 

Regards,

JC

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