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

Animate Actionscript -> HTML5 canvas woes

Community Beginner ,
Feb 17, 2017 Feb 17, 2017

Copy link to clipboard

Copied

Hello everybody!

I really hope that I can pick the brains of people much smarter than myself to try and get me out of my little head scratcher!

My problem is that flash/actionscript is dying and with browsers now turning it off as standard its going to affect a large portion of my website.

So I really need to convert all my AS3 to HTML5.

Now... I am trying to cut as many corners as possible without having to redo the whole thing, so I copy pasted all the layers into a new HTML5 Canvas and have proceeded to configure the code so that it is HTML5 friendly. they are fairly simple little animations, purely mouseover and click, this on AS3 was done mostly by creating loads of buttons; for example:

a circle button b1, when over highlights an area of information on a table nearby, when clicked follows the code:

this.b1.addEventListener("click", fl_MouseClickHandler2.bind(this));

function fl_MouseClickHandler2()

{

    window.open("THE URL");

}

now, it does come up with a warning saying bitmaps and buttons having some kind of security issue, but it all completely works in the tests run through Animate.

I thought i'd succeeded, but now its all fallen down and gone wrong.

I've published it on Animate and uploaded both the HTML and the JS to the website, switched the information on the web so it loads the new HTML page instead of the old SWF file... and it doesn't work. Infact it would be more accurate to say it might work, but all I can see is a blank white screen, when inspecting the element it tells me that its there, the JS file is linked, all the information is there... but its not showing.

If I just double click on the HTML file on my MAC it opens up no trouble in a browser and everything works, so somewhere, somehow, its getting lost.

Maybe a simple open of the HTML page as a link is whats causing it to break? Although I feel like somehow the images aren't being linked, and I wouldn't have the slightest idea of how to fix that.

I've added a snapshot picture in a hope to help explain what i've got, it'd be amazing if its a really easy fix, although I do fear the answer may be that the old buttons are not the way to go, and i'm going to have to manually code the hover and click in HTML, I really don't want to spend hours doing that if smart people tell me it isn't necessary!

GTOrollerdiaC.jpg

I really appreciate any and all help in advance, and if you require any more information please let me know.

Thanks,

Peter

Views

859

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
LEGEND ,
Feb 17, 2017 Feb 17, 2017

Copy link to clipboard

Copied

Have you tried opening the developer console to see if there are any error messages?

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
Community Beginner ,
Feb 20, 2017 Feb 20, 2017

Copy link to clipboard

Copied

Hi Clay,

Thanks for the reply,

I did look at that section and it had a red block, but the information means nothing to me, i've added a screenshot below.

Screen Shot 2017-02-17 at 16.50.16.png

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
Community Beginner ,
Feb 23, 2017 Feb 23, 2017

Copy link to clipboard

Copied

Not sure if it will help, but Animate CC gives this warning when publishing:

WARNINGS:
** 7 Bitmaps packed successfully into 1 spritesheet(s).
Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (96)
Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.

i'm still trying different publish settings, testing to see what changes occur if any to warnings given on console or Animate.

So far nothing has fixed it, but i'll continue trying.

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
Community Beginner ,
Feb 23, 2017 Feb 23, 2017

Copy link to clipboard

Copied

First breakthrough has been not including the spritesheet, it now all works correctly, aside from the fact that none of the pictures are present,

I've tried just uploading the pictures onto the websites file location, but that hasn't seemed to make them all show up... still testing various other methods whatever I can think up.  Any input would be appreciated!

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 ,
Jan 16, 2018 Jan 16, 2018

Copy link to clipboard

Copied

LATEST

Hi, did you ever figure out how to fix this issue? I'm currently experiencing this same problem.

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