Google announces Swiffy: Flash to HTML5 conversion tool

Published Date
29 - Jun - 2011
| Last Updated
29 - Jun - 2011
 
Google announces Swiffy: Flash to HTML5 conversion tool

Not too long ago, Adobe released the first preview of a project code-named Wallaby, which is a tool that can input Flash project files and convert them to use HTML5 and other new web technologies. Google’s latest lab project has a similar purpose, but works in quite a different way.

Visit the Swiffy lab page and you will be asked to upload a SWF file, which their tool will then convert into a version that uses HTML, JavaScript, CSS and SVG; taking advantage of some of the latest web standards. Currently their output will only work on WebKit-based browsers such as Google Chrome and Apple Safari.

Swiffy converts the imported Flash animation into JSON, which is a JavaScript-based plain text data format. This data is read by the pure JavaScript Swiffy runtime, which then renders the animations described by the JSON object as SVG, making use of newer features offered by HTML5 and CSS3.

SVG or Scalable Vector Graphics is an XML based format for describing vector artwork, which is essential what Flash is. Flash adds animations, which Swiffy uses JavaScript for. Flash also uses ActionScript for scripting animations, and writing applications. Swiffy is able to handle that as well, although only up to ActionScript 2, which was replaced by ActionScript 3 in Flash Player 9. It will work only with animations exported to at most the SWF 8 format.

While superficially this may seem similar to Adobe’s Wallaby, they are in fact quite different. While they both input Flash content and output HTML content, the natures of these inputs and outputs is quite different.

Wallaby works on FLA files, which are Flash project files that are used by Adobe’s Flash Professional program. On the other hand Swiffy inputs SWF files, which are what software like Flash Professional, Flash Builder, and other tools capable of exporting to Flash create. It is SWF files that are embedded in web pages and rendered using the Flash Player runtime.

Also, Wallaby’s aim is not to render the Flash content exactly as it is, but to allow web developers / designers to extract relevant animations from an existing Flash project and reuse them elsewhere. As such, the HTML content output by Wallaby is designed to be easy to edit. On the other hand Swiffy doesn’t make it easy to extract specific parts of a Flash animation, but is intended to be a way to convert entire Flash projects to HTML5 and related web technologies so that they can be played back anywhere, even if Flash support is absent (for example on the iPad and iPhone).

Unfortunately the fact that it works only with animations and content created using Flash 8, and best with Flash 5 – both of which are now many years old – means that you all you will see converted from Flash to HTML, for now, are some banner advertisements that don’t take advantage of the features in recent versions of Flash player. Google will obviously improve the technology as time goes on.

Currently Swiffy isn’t open source, and Google is “not sure yet” if it ever will be. Nevertheless it is another great addition to Google’s numerous labs project. Hopefully it won’t go the way of Google Wave.