Freelancercafe

Friday, May 18th

Last update05:06:15 AM GMT

You are here: Web & Programming HTML Google Swiffy - Flash to HTML5

Google Swiffy - Flash to HTML5

E-mail Print

Google Labs has a new useful tool for developers: Swiffy. The application allows you to convert Flash SWF files to HTML5, so you can use any supported modern browser to load the content, even if the browser happens to be Mobile Safari. "Swiffy currently supports a subset of SWF 8 and ActionScript 2.0, and the output works in all Webkit browsers such as Chrome and Mobile Safari."

Swiffy uses some SVG features that are only available in WebKit browsers, so that's the reason why you can only use it in Chrome and Safari. Android's browser for smartphones doesn't support SVG and it's likely that the Android 3 implementation doesn't support the required features.

"A SWF file is converted in two phases: the Swiffy compiler (which you can use on this website) processes the SWF file and generates a JSON file. A client-side JavaScript runtime loads that JSON file and renders it using HTML, SVG and CSS. Swiffy supports many common SWF features such as vector graphics, embedded fonts, images and timeline animation. Basic ActionScript 2.0 code is also supported, but don't expect to convert your favorite Flash game yet. In general, Swiffy supports most of the features in Flash 5, so exporting your file as a Flash 5 will give the best results," explains Google.

Unfortunately, the code generated by Google is difficult to edit, so you still have to go back to the original Flash file. Adobe has its own tool for converting FLA files to HTML5.