Google has released the first version of Swiffy, a Google Labs product that converts SWF files (Flash) to HTML5. Swiffy allows Flash authors to make their animations available on modern browsers without the need for a plugin.
Users only need to upload a SWF file and Swiffy produces an HTML5 version which runs in modern browsers with lots of SVG support such as Chrom and Safari.
You can save the output HTML file that is generated and include it on your website using an <iframe> tag. Swiffy uses SVG features that are currently only supported by Webkit-based browsers such as Safari (on desktop and mobile) and Chrome.
Swiffy uses a compact JSON representation of the animation, which is rendered using SVG and a bit of HTML5 and CSS3. ActionScript 2.0 is also present in the JSON object, and is interpreted in JavaScript in the browser. This representation makes the Swiffy animations almost as compact as the original SWF files.
[advt]A SWF file is converted in two phases: the Swiffy compiler 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.
The JSON objects, when gzipped, are slightly larger than the input SWF file in most cases. For example, the increase in file size for the Chrome ad in the gallery is about 10%.
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. The Swiffy compiler will warn you when unsupported SWF features are encountered.
Swiffy supports most of the Flash 5 ActionScript specification. Swiffy will inform you when unsupported ActionScript code is encountered. Exporting your file as a Flash 5 file will give the best results. Performance for timelined animations is quite good in most cases. However, there are still many rendering optimizations to be done, so stay tuned.
The result is that anyone creating rich or interactive ads can continue to get all the authoring benefits of Flash Pro and have the flexibility to run the ad in the Flash Player or HTML depending on what’s available on the system. Google and Adobe look forward to close collaboration around efforts like these.[source]
Be the first to comment