JavaScript Hack Enables Flash on iPhone

A rather clever programmer has managed to get the iPhone to run interactive apps created using Adobe’s Flash platform. And because it works inside the Safari browser, it isn’t subject to the dictatorial rules of Apple’s App Store. The software is called Gordon, and it doesn’t actually allow Flash itself to work on the iPhone. […]
Image may contain Text Advertisement Poster Brochure Paper and Flyer

img_0113
A rather clever programmer has managed to get the iPhone to run interactive apps created using Adobe's Flash platform. And because it works inside the Safari browser, it isn't subject to the dictatorial rules of Apple's App Store.

The software is called Gordon, and it doesn't actually allow Flash itself to work on the iPhone. Instead, Gordon is a JavaScript runtime written by Tobias Schneider which allows the browser to play and display .swf files (the Shockwave Flash file extension). A runtime is a collection of software that allows the running of code inside it. A helpful analogy is a software emulator for a games console which allows you to play the actual code of, say, Super Mario World on your PC.

Does this mean that the iPhone now supports Flash? Not really. You can't just visit any site that has Flash, because the hack only works on sites that have installed it. Developers would need to add this runtime to each instance of Flash on their sites (although calling the runtime only requires a few lines of code).

And while the open source project is available to all, it still doesn't solve one of Flash's biggest problems. These SWF files still hog the CPU. One demo, a simple vector graphic of a tiger, throws my desktop browser up to around 100 percent CPU usage.

Still, the hack potentially opens the door to a new class of interactive, animated mobile websites. While many web developers rely on Flash to accomplish things that can't easily be done in HTML, those Flash apps won't run on the iPhone. And while the lack of Flash support has been one of the most persistent criticisms of the iPhone platform, Apple has done nothing to rectify the problem. Adobe's workaround, announced in October, has been to offer developers a way of converting Flash apps to iPhone apps, but that wouldn't support Flash within the web browser, and those apps are still subject to Apple's approval before they're available.

You can see it in action yourself by heading over to this Gordon demonstration page (which works in both Mobile Safari, on your iPhone or any desktop browser). On a new iPod Touch, the animations run just fine, and as the runtime is directly displaying the SWF files it should also work with video.

Could we ever see a browser in the App Store which would let us view any Flash content this way? It's very doubtful, due to Apple's ban on anything which can run interpretive code.

Also, when naming the project, Tobias doesn't seem to have considered the search terms required to google it: Flash Gordon. Or maybe that's the joke?

Gordon demos [Paul Irish]

Gordon project code [Github/Tobias Schneider]