Flash on the iPhone

There may be times when it is essential that a Flash animation is available to users on Apple devices such as the iPhone and the iPad. Here is a technique that addresses this requirement using Google’s rather wonderful open source project Swiffy.

Firstly, your Flash movie should be no larger than 1MB and ideally exported for Flash Player 5 although Swiffy supports most of the AS2 specification. For those of you who don’t remember, you can do a great deal with Flash 5 and AS2. Probably a great deal more than Safari on the iPhone will allow us to do.

Under the hood, Swiffy 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 which is supported by Webkit-based browsers such as Safari running on Apple devices.

When you process your swf, Swiffy outputs an html page that you can place on your page using an iFrame. I know, I know an iFrame! However we’re only using our iFrame to serve alternative content to less than 5% of our visitors. There’s nothing for Google to index so it makes very little difference to the end user. I’ve added an alternative version to the header of this page, making the animation, podman cursor follower and all, viewable to iPhone users, for what it’s worth. It’s pretty clunky, probably only making 8 frames a second on my iPhone, but it’s a pretty complex multilayered animation, with lots of bitmaps and transparency. While the animation in the header of this page may not have been designed for WebKit, it could probably be optimised quite easily. A little trial and error goes a long way. Maybe I’ll follow this article up with a sequel.

Comments

Fla Exporter
Reply

For those looking for a Google Swiffy replacement now that the Swiffy service has been closed, FlaExporter provides a viable alternative.
http://www.flash-to-html5.com/Google-Swiffy-Alternative-to-Convert-Flash-to-HTML5

Here’s why this is important–
1)Google shut down Swiffy on July 1st.
http://venturebeat.com/2016/06/15/google-is-killing-its-swiffy-tool-for-converting-flash-files-into-html5-on-july-1/

2)Development on Mozilla Shumway seems to have stopped.
http://www.ghacks.net/2016/02/23/flash-replacement-shumway-is-as-good-as-dead/

3)Fortunately a new tool, FlaExporter, picks up where Swiffy left off. FlaExporter is a new way to publish high-performance HTML5 content directly from your Adobe Flash or Animate files without having to restructure anything. It even has an option to auto-optimize during publish that typically results in files that are 60-80% smaller. Some key features —
* Blazing fast mobile and desktop web performance (60 FPS)
* No .fla restructuring required
* Reduce file sizes 2-10X
* Use advanced features like mask layers, blend modes, and timeline ActionScript

More Info —
http://www.flash-to-html5.com/Google-Swiffy-Alternative-to-Convert-Flash-to-HTML5?

Leave a comment

name*

email* (not published)

website