somascope
somascope

Reputation: 21

Flash Pro CC HTML5 Canvas & CreateJS - how to update the lib files to latest versions?

I'm using Flash Pro CC, and publishing as HTML5 Canvas. This incorporates & uses the CreateJS JavaScript libraries. I notice that, when the HTML file gets generated, the versions of the lib files are a bit older than what's available online on their CDN/GitHub. I know that what would beb online as recent will be ahead of what Flash Pro includes, so I'm wondering how I can tell Flash to use newer versions of these libraries.

Here are the script tags that Flash Pro CC added. I already switched from the option of using hosted libraries to using local libs... libs/easeljs-0.7.1.min.js libs/tweenjs-0.5.1.min.js libs/movieclip-0.7.1.min.js libs/preloadjs-0.4.1.min.js libs/soundjs-0.5.2.min.js

Of course, I can go and get the newer lib file(s) from the CDN and place it into the same folder, and edit the Flash-created HTML after publishing, but the HTML will get over-written during a subsequent publish. I see there's an option to uncheck "Overwrite HTML", which could solve this issue. After doing this there was obviously some incompatibility that prevented the page from even being displayed.

For example, I switched the JS tags from... libs/soundjs-0.5.2.min.js to libs/soundjs-0.6.0.min.js

...and my file no longer worked; no visuals were displayed in the browser.

Anybody know of how to smoothly update to new versions of the libs? Or thoughts on my approach just being wrong? MY goal was to try to use the latest versions for the max amount fo features that the CreateJS team has programmed into their libs.

Upvotes: 1

Views: 567

Answers (1)

gskinner
gskinner

Reputation: 2488

You should be able to swap the libraries as you suggested, but they need to all be swapped at once, otherwise you will run into incompatibilities around the event model and inheritance. Make sure to swap the MovieClip library as well.

As you suggested, the easiest way to do this is to publish once, then turn off "overwrite HTML" and modify the html to point to the new libraries. We tested fairly extensively, and the new libraries should be compatible with the latest Flash CC output. The only issue we encountered is with FlashCC's spritesheet export tool, which is not compatible with the latest version of EaselJS.

That's not to say that there may not be incompatibilities that we didn't find, so if you are able to reproduce an issue, let us know.

Upvotes: 3

Related Questions