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

17 of 356 comments (clear)

  1. 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.
  2. 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 Anonymous Coward · · Score: 2, Informative

      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.

    2. Re:Slow on Firefox by BZ · · Score: 2, Informative

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

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

  3. 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?
  4. Re:Impressive by Demonantis · · Score: 4, Informative

    Adblock seems to make smokescreen stop working.

  5. 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?
  6. Re:I only wonder how the speed will be by Shikaku · · Score: 2, Informative

    http://smokescreen.us/demos/sb45demo.html

    Just open it in Chrome. I can't tell the difference between the flash and the javascript version.

    (Also oddly enough the source code is right here? http://smokescreen.us/demos/js/smokescreen.0.1.3-min.js or did he mean he'll clean it up...)

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

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

  9. Re:I'm not so sure about that... by Theaetetus · · Score: 2, Informative

    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.

    ... except that they built in the ability to turn a web page into an app that sits on the home screen. So, for example, I have a Google Latitude app, and a Google Calendar app. Furthermore, it's not about profit, because there are many, many free apps in the Apple App Store. Flash does seem to be the clincher.

  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: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/

  12. 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.
  13. Re:Impressive by 10101001+10101001 · · Score: 2, Informative

    Because people have a strong obsession with infornography on the internet.

    --
    Eurohacker European paranoia, gun rights, and h
  14. Re:Impressive by nicknamesarefunny · · Score: 2, Informative

    Or Opera 10.6, which supposedly outperformed Chrome in the PeaceKeeper benchmark tests (http://www.downloadsquad.com/2010/05/31/forget-the-potato-opera-10-6-speeds-past-google-chrome-6/)