Looking at the blazing-fast JavaScript in IE9 Preview 4 made me wonder if anyone had tried to write a SWF renderer in JavaScript. SWF is the Adobe Flash file format and a published specification.
Of course someone has. Tobias Schneider has been working on Gordon and built his first full release in June.
Gordon is a little behind in terms of version support:
In this build, Gordon can read and parse all valid SWF’s, even if they are compressed with ZLIB, but plays only SWF1 files completely, as well as the most of the SWF2 features.
The Adobe SWF specification is now up to version 10.
It is still an interesting exercise. Consider Google Web Toolkit, which compiles Java to JavaScript. What if Adobe did something similar for Flash? In fact, if you look at the Smart Paste “sneak peak” from Adobe Max 09 something like this was demonstrated.
The Flash player includes some proprietary codecs that could not easily be replicated in JavaScript. Still, given such limitations, “Export to HTML 5” would be a nice option to find on some future version of Flash Professional, and would help Adobe’s tools business even if it also dented its ambitions for Flash as the universal runtime.