Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
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:
  • Impressive (Score:5, Insightful)

    by Dan East ( 318230 ) on Tuesday June 01, 2010 @01:19PM (#32421500) Journal

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

    • Re:Impressive (Score:4, Insightful)

      by Monkeedude1212 ( 1560403 ) on Tuesday June 01, 2010 @01:21PM (#32421540) Journal

      Hey, now those flash ads can bog you down EVEN MORE, and just in case you left Javascript on with flash uninstalled, you get the benefit of it as well!

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

      • Re:Impressive (Score:5, Insightful)

        by bsDaemon ( 87307 ) on Tuesday June 01, 2010 @01:26PM (#32421602)

        most people or most nerds? I don't think most people even get ABP, even if they run Firefox, let alone actually know what Javascript is or that its something that can be disabled. Turn off JS these days, and practically nothing works. better would be a plug-in which just prevents Smokescreen from being loaded in particular.

      • Re:Impressive (Score:5, Informative)

        by Dan East ( 318230 ) on Tuesday June 01, 2010 @01:28PM (#32421640) Journal

        Unfortunately, you're exactly right. From the blog:

        (sic)"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)."

        There would be a lot of money to be made in cajoling those flash-based banner ads onto iPad / iPhone. Yep, lots o' money...

        • Re:Impressive (Score:5, Insightful)

          by nine-times ( 778537 ) <nine.times@gmail.com> on Tuesday June 01, 2010 @01:34PM (#32421744) Homepage

          On a side note, why are people suddenly so in love with the term "infographic"? Can't we call it a "graph" or "chart"?

          • by hesiod ( 111176 )

            That's, like, so Web 1.0!

          • Re:Impressive (Score:5, Insightful)

            by God'sDuck ( 837829 ) on Tuesday June 01, 2010 @01:47PM (#32421950)

            On a side note, why are people suddenly so in love with the term "infographic"? Can't we call it a "graph" or "chart"?

            It is because your boss's nephew knows how to make graphs and charts. Never word anything in a way that might cause you to be replaced by your boss's nephew.

          • On a side note, why are people suddenly so in love with the term "infographic"? Can't we call it a "graph" or "chart"?

            Because it sounds like 'pornographic'. That makes every single marketing degree person perk up their ears. And everybody knows management loves the info-porn.

          • Re:Impressive (Score:5, Insightful)

            by oasisbob ( 460665 ) on Tuesday June 01, 2010 @03:06PM (#32423018)

            On a side note, why are people suddenly so in love with the term "infographic"? Can't we call it a "graph" or "chart"?

            First, infographics isn't a new term, it's a been around since the early 1990s, at least.

            Second, infographics is a more inclusive category than charts or graphs. Charts and graphs tend to be quantitative in nature. A good example of an infographic is a map: calling a subway map a chart is a stretch. (Yes, I'm aware of nautical and aeronautical charts.)

            So, when Dan suggests that Flash has legitimate uses for infographics, I think that's a perfectly legitimate use of the term.

            • Re: (Score:3, Insightful)

              by nine-times ( 778537 )

              Maps are considered "infographics"? That's crazy. Why aren't maps just "maps"?

      • Re:Impressive (Score:5, Informative)

        by Demonantis ( 1340557 ) on Tuesday June 01, 2010 @01:32PM (#32421704)
        Adblock seems to make smokescreen stop working.
        • It's probably noscript, not adblock. I allowed a script from smokescreen.us and it's working albeit very slow

          • It depends on your subscriptions/past blocking history. I am using easylist on adblock on chromium from the daily ppa (the beta I had installed started leaking all my memory, the current dailies are working nicely for me on lucid) and only had to enable scripts, didn't have to disable adblock. but the page explicitly says to disable adblock if it's failing. nice sneaky way around flashblock but noscript &c are still proof against.

      • Re: (Score:3, Insightful)

        by Twillerror ( 536681 )

        Bog down? And an 8000 line JS program isn't?

        Are you running a lappy 386 like in the video?

        I don't know about you, but I go to sites with lots of flash and it doesn't bog me down...maybe your on dialup or something....

        You can be annoyed with Flash ads sure...but on a free content site like this one STFU...it's free...just ignore them. Bunch of cry babies out there.

        And like it our not Flash has brought me and millions countless hours of enjoyment thru YouTube, Hulu, etc. Even strongbad was cool in it's day. I

      • Re:Impressive (Score:5, Interesting)

        by jmorris42 ( 1458 ) * <jmorris@bea u . o rg> on Tuesday June 01, 2010 @01: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.

    • Re: (Score:3, Interesting)

      by Anonymous Coward

      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

      • Re:Impressive (Score:5, Informative)

        by truthsearch ( 249536 ) on Tuesday June 01, 2010 @02:31PM (#32422528) Homepage Journal

        it is absolutely true that dynamic HTML 5 performance (e.g. SVG/ Canvas) is horrific on the iPhone / iPad

        It is absolutely not true. We're developing an HTML5 replacement for a flash app on a major brand's website and it's working perfectly on the iPad and iPhone. It's got moving images, videos, downloaded fonts (CSS3), etc. We haven't run into a single performance problem.

        (Can't speak for SVG, though. Never tried it).

    • Re:Impressive (Score:5, Interesting)

      by JackAxe ( 689361 ) on Tuesday June 01, 2010 @01: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.
      • by LWATCDR ( 28044 )

        Funny but from what I have heard the performance is pretty hit or miss.
        Just about every review I hard also said it made the phone hot and really did a job on battery life.

        As an Android users that just got 2.1 I really want 2.2.

        • by JackAxe ( 689361 )
          Most of the videos I've seen have been completely biased. Most of what I've tried works great -- especially considering this is a phone. I have "On Demand" selected under plug-in settings, so Flash only loads when I allow it. Flash content also properly disables itself when I quit the browser, or open a new window.

          Hot is a new one on me? I've felt a bit of warmth when playing Genesoid and SNESoid, but nothing has ever got hot on my phone.

          I did a search for the 2.2 updater and found it online. It w
  • by opencity ( 582224 ) on Tuesday June 01, 2010 @01:20PM (#32421524) Homepage

    This sounds better than the actual Flash player! I've been playing with canvas in an effort to get away from Actionscript but this, especially open sourced, sounds like the best of both worlds.

    • by JackAxe ( 689361 ) on Tuesday June 01, 2010 @02:03PM (#32422192)
      The problem with a JS based player, besides being very limited, is performance and of course cross-browser/cross-platform inconstancies. HTML 5 AJAX is way slower than Flash Player 10.1 on my Nexus One. It's slower across the board when compared to Flash, weather it's a newer PC, or old Mac.

      What memory leak? From my experience, especially in recent years, it's been the developer's inexperienced bloat that's been an issue. It's up to you to manage your loops, listeners, objects created, and so on, as to keep memory and cpu usage low. It just takes competence and experience, which most of these so called Flash guys lack.

      Flash Player 10.1 mobile actually prevents the poorly developed bloat from using up too many resources, even on the pages that have more than one SWF running at once. The desktop version will hopefully implement this soon.

      Your comment about canvas to me says you're not that experienced with Flash. ActionScript 3's drawing API is a huge step up from Canvas. It's years ahead of SVG, or canvas, and it's not at the mercy of the browser for what it can do.
      • As far as I know Flash Player 10.1 has not fixed the graphics memory leak which was not caused by delveloper bloat. Flash was not releasing memory from loaded graphics according to Macromedia/Adobe. This was a big problem for developing browser based state pages. That may, however, be fixed in 10.1. Were you aware of that problem? Curious why my comment says I'm not experienced. The main problem I have with Actionscript is mobile penetration, and if canvas allows me to port client games and animations to iP

  • by Anonymous Coward on Tuesday June 01, 2010 @01:21PM (#32421538)

    Apple just updated its EUA to exclude javascript, Steve Jobs reports that this will improve the user experience

    • Re: (Score:3, Insightful)

      by v1 ( 525388 )

      If apple was being honest about the reasons for not including flash, things like problems with sandboxing and concurrent app access etc, this probably inciodentally solves those problems so Steve may not actually care.

      And it's a EULA btw.

  • by gearloos ( 816828 ) on Tuesday June 01, 2010 @01:22PM (#32421550)
    I just wonder how efficient it will be for the rendering times. Some flash is already bordering on bloatware. Add in taking it apart and re-rendering and I start to wonder if its worth it to wait that long.
  • by mveloso ( 325617 ) on Tuesday June 01, 2010 @01:24PM (#32421576)

    Jobs doesn't care about flash content, he cares about flash. If the flash content can be used without flash itself, well, that'd be great.

    Not sure why, but slashdot's headline writers are starting to sound more and more like tabloid writers. Why not say "Smokescreen to Adobe: flash off!"

    • by famanz ( 1447895 ) on Tuesday June 01, 2010 @01:31PM (#32421686)

      Jobs doesn't care about flash content, he cares about flash.

      Sorry but that's just not true. Did you miss the recent uproar about the new iPhone SDK agreement [slashdot.org]? The new agreement bans any applications that were not natively written in C/C++/Objective C. This updated agreement was released only weeks before Adobe CS5 was to debut with advanced tools that would allow the porting of flash apps to the iPhone. If flash itself was the problem then such a clause would not have been added.

      • Re: (Score:3, Interesting)

        by mini me ( 132455 )

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

      • by gaspyy ( 514539 )

        not weeks before -- it was released on a Friday, with CS5 launch on next Monday.

      • Adobe CS5 was to debut with advanced tools that would allow the porting of flash apps to the iPhone. If flash itself was the problem then such a clause would not have been added.

        Funny, you say advanced porting tools in your first sentence, then flash itself in the second. I think Apple is really more concerned about losing control of the iPhone/iPad development environment. I don't think they even particularly care to exercise their own control, just keep it away from outsiders. I mean, if they wished to really lock it down, they could pick one language, one IDE, and stop pursuing HTML5, right? Just my own opinions, and Apple is very hard to read.

      • by sjonke ( 457707 )

        I'm not sure I understand what else it's about if it's not about Flash itself. Flash does suck. I don't like it on our Macs. Either it performs poorly, it crashes or the arrow keys don't work, or all the above (we experience all of these on our Macs at home, the latter being just as irritatingly vexing as the other two issues). But what is the reason for not wanting Flash apps to be convertible to iPhone apps? iPhone apps, if sold, make Apple money. if they aren't sold, they don't, but there's lots of free

      • And you can include an Objective C app that has nothing but a UIWebView window loading a SWF file from Javascript.

      • by rsborg ( 111459 )

        This updated agreement was released only weeks before Adobe CS5 was to debut with advanced tools that would allow the porting of flash apps to the iPhone.

        Actually it was released the Thursday before CS5's release, and was a twist of the knife into Adobe (with whom Apple has a love/hate relationship -- more hate, actually).

        Steve has been screwed by Warnock, Gates and their like before, and took this action at the worst possible time for Adobe as repayment. The last thing Steve wants is to get screwed again,

      • The CS5 program was apparently just going to compile the Flash interpreter into your program, so banning that could still mean that he doesn't like the performance of the Flash interpreter. I do think that there are lots of secondary side-effects of banning Flash that he loves though (fewer online video sites that you can use on your iPhone means more iTunes sales, fewer free Flash game sites that you can use means more crapware games sales), and most of his arguments can be easily waved aside by making Fl
    • by N0Man74 ( 1620447 ) on Tuesday June 01, 2010 @01:47PM (#32421954)

      I don't buy your take on things.

      I think it has a lot more to do with being the gatekeepers for content (and continuing to get a cut of the profit) than with flash content itself. They don't want people using apps and games on their platform that you didn't buy from the app store, hence no Flash or Java on the i-devices.

    • No, he cares about iAd.

      http://en.wikipedia.org/wiki/IAd [wikipedia.org]

      He doesn't want others from profiting where he wants to be the gatekeeper.

    • Actually, Flash allows all those little Flash games, which would cut out Apple's 40% for an AppStore game sale.
  • by RLBrown ( 889443 ) on Tuesday June 01, 2010 @01:26PM (#32421606) Homepage
    My take is that this proves, perhaps to a significant degree if not completely, that Javascript/HTML5 can do anything that a native Flash engine could do . So why build in Flash? Go straight to Javascript/HTML5. I do not think Steve Jobs will be unhappy about this at all.
  • by Lord Ender ( 156273 ) on Tuesday June 01, 2010 @01:28PM (#32421632) Homepage

    A certain sort of video (the kind you can't find on Youtube) comes primarily in Flash format. This sort of video seems to drive the adoption of new technology. If this can bring said video to the iPad, sales are certain to engorge.

  • by DavidR1991 ( 1047748 ) on Tuesday June 01, 2010 @01: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?

    • Re: (Score:3, Interesting)

      by TeknoHog ( 164938 )
      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.
      • Oh yeah, I know of Gnash et al. - but I think this is going to hit a nerve much more than those projects because it has "You are obsolete" written all over it: Not only can JS displace Flash, it can bend over backwards and run Flash itself. It's a big statement. I don't think Adobe will take kindly to it (or not as kindly as they've accepted generic FOSS re-implementations)

        • by Jer ( 18391 ) on Tuesday June 01, 2010 @01:52PM (#32422030) Homepage

          Why should Adobe care? As far as their history goes, I think Adobe would love it if they didn't need to support a flash plug-in. They certainly don't seem to want to invest a lot of time/money into keeping it up-to-date.

          Adobe makes their money on Flash development tools. They give the plug-ins away for free to sell more dev kits. I could see them kicking up a fuss over open source compilers, but not interpreters.

          • Adobe makes their money on Flash development tools. They give the plug-ins away for free to sell more dev kits. I could see them kicking up a fuss over open source compilers, but not interpreters

            And what happens when a 3rd party plugin gets popular, but omits feature X, or adds feature Y?

            Adobe's dev tools then need to be modified to disable some favored feature, which will then piss of developers who use it and want it. Or perhaps Adobe can't add feature Y, giving some 3rd party an advantage in Flash dev t

  • Slow on Firefox (Score:5, Informative)

    by maccodemonkey ( 1438585 ) on Tuesday June 01, 2010 @01:28PM (#32421646)

    This is running like a dream on my Mac running Safari, but I tried it on a co-workers Mac running Firefox, and it crawled...

    Just for reference if you're trying this on Firefox.

    • Same here with firefox 3.6.3 + Windows (vista). crawwwlllll
    • Re: (Score:2, Informative)

      by Anonymous Coward

      Slow on Firefox at initial attempt.
      Then I turned off AdBlock (as it visibly recommends), refreshed and it's as fast as it gets.
      So it's possibly some anti-adblock check, not a problem with Firefox.
      Which makes sense because those guys are advertisers and would like to see adblock go away.

    • Re: (Score:3, Informative)

      by BZ ( 40346 )

      It also uses broken browser-sniffing, so it's not possible to easily test what it would behave like on development Firefox versions....

    • Sounds like a job for Chrome 4 and its supposedly lightning-fast JS/HTML5 engine.
    • I want to throw in that it's really slow in Firefox under XP as well, but it runs great with Chrome.

      I think they are suffering from the slashdot effect though. It took a few tries to successfully load.

    • Re: (Score:3, Informative)

      by tralfaz2001 ( 652552 )
      I had the same experience the first time I attempted to load the page. It was absolutely glacial. Then ,I tried to load the page a second time and it seemed to run just fine. I'm guessing some timing was altered when certain chunks of data got cached on the client. Try letting the page begin rendering, then reload the page. It worked for me on FF 3.6.3 on a MacBookPro3,1 2.6GHz. Curious if anyone else has similar results.
  • If the player will work without being slow, then it's a welcome addition. Just a thought - what if it grows up to be faster in later editions?
  • Gordon? (Score:5, Informative)

    by Jorl17 ( 1716772 ) on Tuesday June 01, 2010 @01:31PM (#32421688)
    What about Gordon [paulirish.com]? That one *is* open-source. Is it different from what TFS refers to in terms of goals (not current state)?
  • Why on apple.*? (Score:5, Insightful)

    by The MAZZTer ( 911996 ) <megazzt&gmail,com> on Tuesday June 01, 2010 @01:34PM (#32421740) Homepage
    Other than Apple's non-support of Flash on the iPad, this has nothing to do with Apple. This is an Adobe Flash emulator written in JavaScript.
    • by mini me ( 132455 )

      Because it proves (again) that Adobe can bring Flash to the iPhone/iPad without breaking agreements with Apple. It shows that Adobe would rather cry about the situation instead of actually supporting the product they claim to stand behind.

  • Interesting. It seems to use less CPU in Chrome on my Linux box than the actual Flash plugin, too!
  • More like 'slowass'.

  • Pretty nifty anyway, and if the browser has (much) faster Javascript, maybe it will run well? Did anyone try this on an Android 2.2 phone which is suppose to have such?

  • by MrTripps ( 1306469 ) on Tuesday June 01, 2010 @01:46PM (#32421920)
    It opens SWF binaries, unzips them (in native JS),follows a little ball down a wire track, knocks over domino that begins a chain of falling dominoes, the last of which frightens a chicken into laying an egg, which rolls down a ramp, cracks into a frying pan, flipped by a spring loaded spatula onto a plate with bacon attached to a remote control car, that drives it to the kitchen table. Then a counter weight pulls up the plate, puts on the table, then extracts images and embedded audio and turns them into base64 encoded data. That is a lot of trouble just because Jobs is being prissy about what runs on his over priced under powered eye candy.
  • by tk77 ( 1774336 ) on Tuesday June 01, 2010 @02: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.

  • Named after a curious side effect after a while running it, they had to choose between that name and FriedMobo.
  • Size (Score:3, Interesting)

    by fsterman ( 519061 ) on Tuesday June 01, 2010 @03: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 [gidnetwork.com], it could easily get below 50K.

"Out of register space (ugh)" -- vi

Working...