Slashdot Mirror


Smokescreen, a JavaScript-Based Flash Player

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!"

39 of 356 comments (clear)

  1. Impressive by Dan+East · · Score: 5, Insightful

    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.

    --
    Better known as 318230.
    1. Re:Impressive by Monkeedude1212 · · Score: 3, Insightful

      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.

    2. Re:Impressive by Anonymous Coward · · Score: 3, Interesting

      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.

    3. Re:Impressive by bsDaemon · · Score: 5, Insightful

      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.

    4. Re:Impressive by Dan+East · · Score: 5, Informative

      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...

      --
      Better known as 318230.
    5. Re:Impressive by Demonantis · · Score: 4, Informative

      Adblock seems to make smokescreen stop working.

    6. Re:Impressive by JackAxe · · Score: 5, Interesting

      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.

    7. Re:Impressive by nine-times · · Score: 4, Insightful

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

    8. Re:Impressive by jmorris42 · · Score: 5, Interesting

      > 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.

      --
      Democrat delenda est
    9. Re:Impressive by God'sDuck · · Score: 4, Insightful

      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.

    10. Re:Impressive by truthsearch · · Score: 4, Informative

      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).

    11. Re:Impressive by RulerOf · · Score: 3, Informative

      "Turn off JS these days, and practically nothing works."

      Um, Nope, that is wrong. I run both noscript and adblock plus and after giving my bank and the biggies like youtube permissions through both the only sites that don't work are the ones that are a bit dodgy in the first place.

      It's much, much simpler to just install Chrome and not have to worry about javascript performance.

      --
      Boot Windows, Linux, and ESX over the network for free.
    12. Re:Impressive by oasisbob · · Score: 4, Insightful

      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.

    13. Re:Impressive by aliquis · · Score: 4, Insightful

      Times I've used a webcam or mic on flash: 0

    14. Re:Impressive by nine-times · · Score: 5, Funny

      Oh, thanks helpfriendinator. Without your inforeply I wouldn't have been able to think outside the box to architect a synergistic model of Web 2.0 paradigms that enable me to comprehend the emergent properties of the cloud.

  2. Apple just updated its EUA... by Anonymous Coward · · Score: 5, Funny

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

    1. Re:Apple just updated its EUA... by ChefInnocent · · Score: 3, Insightful

      Like others have said, you are confused about JS. It is a beautiful language that has been cursed by the browser. The only features I'd like to add would be (explicit) multi-threading, and typing beyond var. JS is a truly object oriented language that offers dynamic scoping and functions as first class objects. I understand there are some command-line interpreters that actually allow those, but I've only used it in the browser. If any of those languages you mentioned had made their introduction via the browser, you'd hate them equally or more so.

  3. I only wonder how the speed will be by gearloos · · Score: 3, Insightful

    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.

    --
    "Computers are a lot like Air Conditioners" "They both work great until you start opening Windows"
  4. No, they'll be Steve Jobs' Best Friend by mveloso · · Score: 5, Insightful

    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!"

    1. Re:No, they'll be Steve Jobs' Best Friend by famanz · · Score: 5, Insightful

      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? 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.

    2. Re:No, they'll be Steve Jobs' Best Friend by Achromatic1978 · · Score: 3, Informative

      No he doesn't. Steve cares that Flash provides the end user a rich framework for applications or games that would be easy to circumvent the App Store with.

  5. Javascript trumps Flash? by RLBrown · · Score: 4, Insightful

    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.

    --
    -- Perhaps I see less than some, but more than many.
    1. Re:Javascript trumps Flash? by JackAxe · · Score: 3, Interesting

      HTML 5 AJAX can do what Flash was doing years back. It can't do what Flash does now.

  6. the iPad needs this by Lord+Ender · · Score: 3, Insightful

    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.

    --
    A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
  7. Good test of 'open platform' by DavidR1991 · · Score: 4, Interesting

    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?

    1. Re:Good test of 'open platform' by Jer · · Score: 3, Insightful

      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.

  8. Slow on Firefox by maccodemonkey · · Score: 4, Informative

    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.

    1. Re:Slow on Firefox by tralfaz2001 · · Score: 3, Informative

      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.

  9. Gordon? by Jorl17 · · Score: 5, Informative

    What about Gordon? That one *is* open-source. Is it different from what TFS refers to in terms of goals (not current state)?

    --
    Have you heard about SoylentNews?
  10. Why on apple.*? by The+MAZZTer · · Score: 4, Insightful

    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.

  11. Re:Great news for Intel and AMD. by Pharmboy · · Score: 4, Funny

    Crap like this is why we need to buy a new computer with a faster processor every year, just to do the same shit we were able to do last year.

    But this is a NEW way to watch those 15 year old videos! That alone makes it better.

    --
    Tequila: It's not just for breakfast anymore!
  12. Re:Too slow or just me? by pushing-robot · · Score: 4, Informative

    Runs fine for me (OS X 10.6.3/Safari 4.0.5).

    CPU usage averages 15% (of one core) on the Strong Bad demo, except during the first bit with the Cheat, where it spikes to ~40%.

    Using Flash 10, CPU usage averages 8-9%, but during the same scene jumps to ~30%.

    Which is pretty damn impressive for an emulator. And proves that there's really nothing Flash can do that HTML 5 can't.

    --
    How can I believe you when you tell me what I don't want to hear?
  13. Rube Goldberg by MrTripps · · Score: 5, Funny

    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.

    --
    "I'm not a quack, I'm a mad scientist! There's a difference." - Dr. Cockroach
  14. I'm not so sure about that... by N0Man74 · · Score: 3, Insightful

    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.

  15. Re:no. by Shikaku · · Score: 4, Interesting

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

    Now the next step is to do it better.

  16. Re:Flash without the memory leak !?!? by JackAxe · · Score: 3, Informative

    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.

  17. And Adobe can't do this, why? by tk77 · · Score: 5, Interesting

    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.

  18. Re:Too slow or just me? by JackAxe · · Score: 4, Informative

    And proves that there's really nothing Flash can do that HTML 5 can't.

    No it doesn't. These are simple animation examples from years back . StrongBad was originally created in Flash 4. It's 2010, we're now using Flash 10.1. Flash has evolved quite a bit.

    Here's a list of what Flash can do, that HTML 5 can not; http://www.wirelust.com/2010/05/21/10-things-flash-can-do-today-that-html5-cant/

  19. Comment removed by account_deleted · · Score: 4, Insightful

    Comment removed based on user account deletion