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

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

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

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

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

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