I'm proud to announce the availability of a 'proof of concept' for a Actionscript to HTML5/Javascript work flow. Standing on the shoulders of giants (Gordon, Mike, Alex et al., I'm looking at you!) I was able to piece together a working prototype of a full Flash Builder -> Browser application development tool chain.

The tools are:
- the Flex SDK. Most importantly, the goal is to allow developers to use the tools they know while giving them the ability to publish their work to a www-friendly format.
- the FalconJx browser, which can as of today output a pretty descent approximation of AS in JS, the 'goog' way.
- the ASJS Publisher, an ant script that takes the JS that FalconJx produces and puts it through the Google Closure Tools to create both intermediate and release versions of the web native application.
- the VanillaSDK, my attempt at an AS compatible JS framework. I have plan for a different type of framework, even better integrated with the current Flex SDK, but more on that later ;-)

With these new tools, you are now able (albeit in a very limited way) to use the regular Flex SDK for application development in your favorite development tool. Using the new ASJS Publisher script, you can compile your project into a highly optimized HTML5 application that will run in any modern browser. It's that simple... well, almost :-)

As this is a prototype, there are some (ha!) limitations:
- the VanillaSDK (the Javascript counterpart to the Flex SDK) is very basic indeed, with only 2 UI components: Button and Label. Both these components currently support only 1 or 2 properties (position and label or text). It does show, however, how easy it is to create these Flex SDK compatible UI elements.
- not all AS language features are fully supported on the JS side yet.
- there isn't (yet) support for MXML, but that's coming soon.
- since this is only a proof of concept, there is almost certainly a lot that doesn't work -- to be honest, I'd be suprised if anything works at all :-)

If you want to try this out, please get the latest version of the tool set from SVN, starting with here:

https://svn.apache.org/repos/asf/flex/asjs/branches/develop

Begin with the README you'll find there. After an initially non-trivial setup (SDK, Falcon, FalconJx and the new tools), the everyday use is really simple: just one command in a terminal, calling one ant script with one argument: this will publish your Flash Builder application to the 'js-intermediate' and 'js-release' directories in your FB project folder. Simply double click on the HTML files in either of these will run your application in your default browser, no Flash plugin needed!

Please let me know if this works for you and what issues you encounter. Should you feel inspired, feel free to contribute, this part of the project can use all the help it can get!

Have fun!

  • No labels