Endless Paradigm

Full Version: Javascript based Flash renderer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Quite an interesting piece of work, despite being rather impractical to some degree:

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.
Very interesting indeed.
I heard that HTML5 is supposed to do exactly what this javascript does. Is that just me, or is there truth in the madness?
Silvertie Wrote: [ -> ]I heard that HTML5 is supposed to do exactly what this javascript does. Is that just me, or is there truth in the madness?
No it doesn't.  I think you're confusing it with people saying that HTML5(+JS) offers similar functionality to Flash - it doesn't actually do the same thing as Flash and it won't render it either.

I believe this piece of JS relies on some HTML5 anyway.
ZiNgA BuRgA Wrote: [ -> ]
Silvertie Wrote: [ -> ]I heard that HTML5 is supposed to do exactly what this javascript does. Is that just me, or is there truth in the madness?
No it doesn't.  I think you're confusing it with people saying that HTML5(+JS) offers similar functionality to Flash - it doesn't actually do the same thing as Flash and it won't render it either.

I believe this piece of JS relies on some HTML5 anyway.

Ahk. Wasn't sure if I'd heard that rumor right, anyway.
Looks like Macfa- I mean, Mac Enthusiasts get to enjoy more emulated, second-rate, last-year media.
It says to disable Adblock? Is this because Adblock checks every dynamically created piece of web page as its created? I did notice that it ran a lot better whith Adblock disabled.
I take it this will be a GOD send for the flashless iPad ?
Mr. Shizzy Wrote: [ -> ]I take it this will be a GOD send for the flashless iPad ?

Read what Zinga said.

ZiNgA BuRgA Wrote: [ -> ]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.

So, yeah, it's interesting the he's been able to make such a thing but any reasonable real-world use seems unlikely.. [especially for the iPad ¬_¬]

May I also say such a thing should never reach the iPad after Apple blocked Adobe products from converting Flash to code that works on the iDevices. They really don't deserve it.
Actually, it can be useful for Flash based banner ads.  Probably not Flash based games, as they involve a bit of ActionScript, but basic ads which are just a slideshow, for example, probably work reasonably well through this JS emulation on the iPad.

In other words, you get all the downsides of Flash on the iPad :)
Reference URL's