01/06/2010, 08:56 PM
Quite an interesting piece of work, despite being rather impractical to some degree:
For the uninitiated, Flash is already slow, although it's semi-compiled. Now getting an interpreted language to emulate Flash... well, you can make that slow several times over.
Quote:Smokescreen demo: a Flash player in JavaScript. Chris Smoak’s Smokescreen, “a Flash player written in JavaScript”, is an incredible piece of work. It runs entirely in the browser, reads in SWF binaries, unzips them (in native JS), extracts images and embedded audio and turns them in to base64 encoded data:uris, then stitches the vector graphics back together as animated SVG. Open up the Chrome Web Inspector while the demo is running and you can see the SVG changing in real time. Smokescreen even implements its own ActionScript bytecode interpreter. It’s stated intention is to allow Flash banner ads to execute on the iPad and iPhone, but there are plenty of other interesting applications (such as news site infographics). The company behind it have announced plans to open source it in the near future. My one concern is performance—the library is 175 KB and over 8,000 lines of JavaScript which might cause problems on low powered mobile devices.Source: http://simonwillison.net/2010/May/29/smokescreen/
For the uninitiated, Flash is already slow, although it's semi-compiled. Now getting an interpreted language to emulate Flash... well, you can make that slow several times over.