Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
Media Apple

Smokescreen, a JavaScript-Based Flash Player 356

Tumbleweed writes "How to make Steve Jobs your mortal enemy: Smokescreen, a 175KB, 8,000-line JavaScript-based Flash player written by Chris Smoak at RevShock, a mobile ad startup, and to be open-sourced 'in the near future.' From Simon's blog: 'It runs entirely in the browser, reads in SWF binaries, unzips them (in native JS), extracts images and embedded audio, and turns them into base64 encoded data: URIs, then stitches the vector graphics back together as animated SVG. ... Smokescreen even implements its own ActionScript bytecode interpreter.' Badass!"
This discussion has been archived. No new comments can be posted.

Smokescreen, a JavaScript-Based Flash Player

Comments Filter:
  • Re:Impressive (Score:3, Interesting)

    by Anonymous Coward on Tuesday June 01, 2010 @02:23PM (#32421560)

    However, given Flash's performance issues even when compiled natively for mobile devices, this is more of a proof of concept then something usable.

    What performance issues are they?

    However wrong your claim might be, it is absolutely true that dynamic HTML 5 performance (e.g. SVG/ Canvas) is horrific on the iPhone / iPad, where such a technology would have the most utility. Which is why it's a bit humorous that Jobs talks it up, while delivering a replacement technology (he was talking up HTML5, right?) that is dramatically slower than the Android implementation.

  • by DavidR1991 ( 1047748 ) on Tuesday June 01, 2010 @02:28PM (#32421636) Homepage

    Adobe insisted Flash is an open platform: This will be a good test of their claims. Will they compete admirably against a JS re-implementation of their own wares (and improve their own runtime - hence Smokescreen as competition to foster improvement) or will they fight dirty?

  • by TeknoHog ( 164938 ) on Tuesday June 01, 2010 @02:33PM (#32421724) Homepage Journal
    There are already other open-source Flash players, notably Gnash, and the GPU-powered one that was discussed on /. recently. None of these is a complete implementation, but I like to think that competition between different OS projects will make things better.
  • Re:Impressive (Score:5, Interesting)

    by JackAxe ( 689361 ) on Tuesday June 01, 2010 @02:33PM (#32421726)
    Flash 10.1 runs quite well on my Nexus One. Overall its performance is excellent for being beta and for me it's been a non-issue.

    The mobile player uses the GPU for both animation(vector, bitmap, etc.) and video playback. JavaScript also runs fast on my Nexus, but when compared to Flash 10.1, it's downright slow.
  • Re:Impressive (Score:5, Interesting)

    by jmorris42 ( 1458 ) * <`gro.uaeb' `ta' `sirromj'> on Tuesday June 01, 2010 @02:44PM (#32421902)

    > Honestly, I think this will force most people to turn Javascript off if nothing else.

    Which just might be the point. Turn JS off and the browsing experience is degraded to the point of unusability on most of the current net. So now the choice is Flash delivered via the plugin or Flash delivered via this JS thing which will be REALLY slow and make i* products look underpowered when compared to competing products viewing the same content. Game, Set and Match. Flash is now going to run on Apple products, His Steveness's only remaining choice is does he want it to run well or not.

  • by mini me ( 132455 ) on Tuesday June 01, 2010 @02:46PM (#32421916)

    Who says it has anything to do with Adobe or Flash []?

  • Re:no. (Score:5, Interesting)

    by Shikaku ( 1129753 ) on Tuesday June 01, 2010 @02:48PM (#32421964)

    The point was to prove HTML5+Javascript can do everything Flash can do.

    Now the next step is to do it better.

  • Re:Impressive (Score:2, Interesting)

    by xfurious ( 832436 ) on Tuesday June 01, 2010 @02:52PM (#32422040)
    Op, just got one of the ad demos to work on my phone and it runs just fine, no slowdown in scrolling, a very slight slowdown when zooming. 20MB of free memory though, with one tab in Safari, Phone, and Springboard running.
  • by Shikaku ( 1129753 ) on Tuesday June 01, 2010 @02:56PM (#32422084) []

    Here it is after running it through a javascript beautifier. ... From what I see, yeah, he implemented it.

  • by tk77 ( 1774336 ) on Tuesday June 01, 2010 @03:05PM (#32422226)

    This works pretty well under the released version of Safari for OSX 10.6. In fact, in some of the samples where the flash version is provided as well, the Flash ones use more CPU then the HTML5 ones.

    There is a bit of degradation in some of the graphics, but hey its better then not seeing the graphics (ok, that really depends ... if its an ad and you prefer not to see it ... whatever).

    Now the question is, why can't Adobe add a feature to the Flash authoring tool to just output the HTML5 and whatever is needed, that smokescreen does in the browser?

    From some of the samples it would seem like you could just "drop in" the converted version with minimal loss of quality and reach a much larger audience.

    I would still prefer Flash, for the most part, go away, and this won't help that too much (initially anyway). But it seems like this would be a good way for many web sites to start using HTML5 now, while support and implementations mature, as well as giving all the Flash devs time to learn to write natively in HTML5.

  • by GreyLurk ( 35139 ) on Tuesday June 01, 2010 @03:06PM (#32422240) Homepage Journal
    No, it was compiling to native ARM bytecode from AVM3 bytecode. Very different. Apple does have a problem with Flash Content, because it threatens their API Lockin. All of the fluff about user experience and running slowly is just a smokescreen for the lockin problem. If it was a performance problem, due to bad software development, then they would catch it in their App Review process before putting it on the store.
  • by JackAxe ( 689361 ) on Tuesday June 01, 2010 @03:46PM (#32422684)
    HTML 5 AJAX can do what Flash was doing years back. It can't do what Flash does now.
  • Re:More efficient?? (Score:1, Interesting)

    by Anonymous Coward on Tuesday June 01, 2010 @04:01PM (#32422914)

    I did not monitor the CPU usage, but on Ubuntu with Firefox, Smokescreen seems to runs FASTER than Adobe's Flash plugin does. The MS Demo on their site allows you to run Smokescreen side by side with Flash and the animation finishes 15 seconds sooner when using Smokescreen. Sure, there is some minor image degradation (alpha gradients seem unsupported) but it is better than Adobe whom cannot even implement half-assed frame skipping (let alone a decent variation).

  • Size (Score:3, Interesting)

    by fsterman ( 519061 ) on Tuesday June 01, 2010 @04:31PM (#32423440) Homepage

    Using Packer (with variable renaming and 64bit encoding) it get's down to 105,177 -over 30% reduction in size. Using Gzip [], it could easily get below 50K.

  • Re:More efficient?? (Score:3, Interesting)

    by clone53421 ( 1310749 ) on Tuesday June 01, 2010 @04:44PM (#32423636) Journal

    I noticed the same thing on Windows XP, 1.8 GHz... although it was a much less drastic 2-3 sec. difference.

  • Re:Impressive (Score:3, Interesting)

    by clone53421 ( 1310749 ) on Tuesday June 01, 2010 @04:53PM (#32423778) Journal

    I don’t use noscript. I use ABP.

    When confronted with an annoying script, I’ll identify the script and block it in particular... and if I’m feeling particularly cranky, I’ll smack their entire site with a ##script, like this: (god damn you Snopes, for your copy protection script...)

  • by Anonymous Coward on Tuesday June 01, 2010 @06:18PM (#32424862)

    Ah yes. Python, where instead of optional semicolons, we get non-optional intelligent whitespace.

    Last incomprehensible python bug was caused by a mix of tab and spaces in just the wrong line causing indentation to apply to the wrong portion, causing a switch to fail, causing a DOS of our server.

    Thanks Python and your arrogant refusal to even support a braces mode.

    Thankfully, this idiocy can be handled to some extent with a wrapper.

No problem is so large it can't be fit in somewhere.