Aflaxtm stands for Asynchronous Flash and XML. Defined simply, Aflax is a development methodology which combines Ajax and Flash to create more dynamic web based applications. Developed by Paul Colton, the Aflax technology is available as a library that enables developers to use JavaScript to fully utilize all of the features of Adobe's Flash runtime -- including graphics, networking, video and camera support. What's NewVersion 1.0 has been released and includes updated documentation along with a great set of samples. Quick ExampleThere are a lot of really cool demos online, but here's a quick example of Aflax's Canvas object:
First we include aflax.js and other libraries in our HTML page and create a new AFLAX.Canvas object. We tell it to render using the best available renderer, Flash, Canvas tag, or even HTML. <script> new AFLAX.Canvas("canvas1", onReady, AFLAX.Canvas.RENDERER_BEST); </script> When Aflax is ready, it calls the 'onReady' function as we defined below:
function onReady(canvas) { makeImage(); drawShapes(canvas); } 'drawShapes()' takes some path data that looks like this: fill="#005BAB"; addPath("M205.2,17.1 C171.6,7.4,163.2,36.2,157,39.7..."); And renders it directly into a DIV.
FAQQ. Who was Aflax created by and why?
Q. Why not use the existing Flash JavaScript gateway? A. The Flash JavaScript gateway that was released by Macromedia was only for Flash 7 or earlier. It was a very low performance library as well. It seems to now have been deprecated in favor of Flash 8's new ExternalInterface which is much faster and more capable. The ExternalInterface is what Aflax is using. Q. How is this different than just calling functions directly in Flash? A. The biggest difference is that you don't need to use ActionScript or the Flash IDE -- and you don't need to compile anything. The point of Aflax is that you can do all of your Flash development in JavaScript, which also gains you the ability to seamlessly mix the two worlds (JavaScript and Flash) with a single language. Aflax hides all the communications to the Flash object so all of your logic can remain in one place. DocumentationFor documentation on the API offered by Aflax, please see the API Docs.A good reference to use during development is the ActionScript documentation which are located here. SupportFor questions, please use the forums. Known Issues
LicenseLICENSE: This software is licensed under the Mozilla Public License Version 1.1 (the "License"); you may not use this library except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL THE SOFTWARE IS SUPPLIED "AS IS". THIS SITE DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE SOFTWARE. | Latest Aflax Blog Posts![]() Loading... |



