Copy link to clipboard
Copied
Sticking points converting large Flash application
We have a large Flash web application we are looking to convert to HTML5 using Animate cc and have found 2 sticking points.
Firstly the application is highly modular with 100’s of swf loaded adHoc with loadMovieNum or LoadMovie, the only solution we have found so far is to create an iFrame and load in the HTML content, which is clunky and workarounds are needed for the JS to communicate across iFrames, which works but Is there a better way?
Secondly, we currently have an swf file containing all common movie clips (with functionality) , graphics and buttons used throughout the entire application which are exported for runtime sharing, allowing for a one place update for all instances. We are trying to replicate this by loading an HTML file into an iFrame and using createjs new lib[“libaryName”]() method which is causing scripting issues, mouse events not firing in the correct window and having to manually position each imported asset in the JavaScript.
We also found in the publish settings, under advanced, import new template. This however replaces the canvas with the imported file so unsure of it’s purpose.
Import from library appears to be author time sharing as opposed to runtime sharing.
Creating custom components didn’t visually scale with the canvas window when the browser was resized as well as having depth issues.
Is there currently a better way? Or does anyone know if this being developed?
There are a number of reasons in AS3 that you break things out into external SWFs. One example is that you don't want to have a massive SWF that includes all of the graphics and sounds for the entire projects.
With HTML5 Canvas all of those files are external anyway, and by having lots of FLAs that will publish into the same folders you could end up with confusion if different FLAs are using the same name for different images.
For what you're doing I would take every place where you use loadmovie
...Copy link to clipboard
Copied
Move it from the Lounge to AnimateCC forum.
Copy link to clipboard
Copied
Apologies.
Copy link to clipboard
Copied
There are a number of reasons in AS3 that you break things out into external SWFs. One example is that you don't want to have a massive SWF that includes all of the graphics and sounds for the entire projects.
With HTML5 Canvas all of those files are external anyway, and by having lots of FLAs that will publish into the same folders you could end up with confusion if different FLAs are using the same name for different images.
For what you're doing I would take every place where you use loadmovie and change it to use new LibrarySymbol() instead, where the library symbol is a movieclip version of what was the external SWF.
If that was the structure, the AS3 version should still work, and it would be much closer to what would work in HTML5 Canvas. That seems to be an easier than using iFrames.
A general problem with converting an AS3 project is that with AS3 you most likely used external Class AS files, and as far as I know JavaScript doesn't work with object oriented programmer in the same way. If you made the AS3 version work with just timeline code, it again would be closer to what Canvas needs.
I'm sure there are ways to have external JavaScript files that are effectively a set of static functions for your project to call, that would be more like how your external AS version is. Someone else can add comments about that approach, I haven't been brave enough to try it!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now