Replacing Flash with something else

Benjamin Otte writes about replacing Flash with SVG, HTML, and JavaScript. It’s possible — look at the OpenLaszlo LZPIX demo for the same app in Flash and HTML to see that it can be done — but there are a few things in the way. Flash has a number of advantages which would need to be replicated.

  1. Multimedia support. YouTube and the like have recently become the biggest Flash users in the world, I imagine, and what makes that possible is Flash’s support for video; similarly, there are lots of in-browser mp3 players (like XSPF) which use Flash because of its support for audio. Existing play-sound-from-JavaScript projects like SoundManager2 use Flash to actually play the sounds. The WHATWG-proposed <video> and <audio> elements will provide this in the browser eventually, assuming that they’re actually implemented and we can get around the issues of what video formats are supported (Apple are lobbying hard for video format support to not be mandated, meaning that the element will be broadly useless on the web itself — Safari will support QuickTime-supported videos, IE will support WMV, Firefox and Opera will support Ogg Theora). This is a big problem, but there are tentative steps toward solving it.
  2. Single-file deployment. Once you’ve made a Flash file it’s one file — whatever.swf. That’s highly easy to deploy. It will be possible to make single-file deployments of a scripting+SVG+HTML+images bundle, but it’s harder; images are a particular problem if you intend to support Internet Explorer.
  3. An IDE. This is what Otte calls for, above, noting that animations require coding in an HTML+SVG+JS environment and they don’t in Flash, and that “the best Free authoring tool is either vim or emacs”; not what he’s suggesting that we do use, but a wry comment on the lack of authoring tools for standards-compliant rich web apps. An IDE is fairly critical to get this sort of technology out to the masses.

Ignoring the elephant in the corner of multimedia support for the moment (but it’s a big elephant, and mustn’t be forgotten), everything else is pretty much doable. Creating an IDE would be possible; SVG is available most places now (and is emulable in IE, and there’s always the <canvas> element, which is also emulable in IE); single-file-deployment isn’t critical, really (instead of a complicated <object> tag to embed a Flash file, it’s <iframe src="mywidget/">, with your JS/HTML/SVG widget in a folder). It’d be supported everywhere, you wouldn’t have to worry about the direction being solely controlled by one vendor, and it uses technologies we already know rather than trying to supplant the open web as Microsoft’s Silverlight is doing. Those of you who doubt that HTML is capable of this sort of thing, take a look at Apple’s Dashboard widgets, which do many cool things and are pure HTML, JavaScript, and <canvas>.

You might even be able to convert existing Flash movies to it using flasm, which would get the project up and running pretty quickly.

Of course, the idea needs a name. It would be nice to have it not be named after toilet cleaner, like Flash or Ajax. Whoever writes the IDE gets to think of the catchy name and be immortalised for ever. If you need a name, call it “April”. No catchy acronym, it’s just a nice word, and it’s when my daughter was born.

Currently desperately trying to not start writing this.

12 Responses to “Replacing Flash with something else”

  1. Wow that’s really impressive! Surprised I’ve not heard of it before, just downloaded now, gona have a cheeky play with it

    Thom
  2. So - Domestos not on the proposed list of names?

    mrben
  3. This isn’t going to help steer you away from building this, and I’m sure you’ve considered both options already, but anyway ..

    Ok, so the single-file problem: zip it, zip it good.

    Jar/XPI/etc etc etc are just zip files with “stuff” in them. So why not compress the “widget/” path, give it a “.apr” extension and call that problem solved?

    (added bonus - compressed for transfer by default!)

    For now, use SoundManager2 (or similar) to work around the lack of the appropriate cross-platform options, but keep things extensible enough that you can drop in <video> and <audio> tags when they become supportable.

    Cheers.

    David
  4. David: zipping it doesn’t help. The browser can’t open a zip file. SWF is good because it’s single-file both for the browser reading it *and* for the user uploading it.

    mrben: you ain’t the first to make that joke ;)

    sil
  5. Oh, I just worked it out - you want to replace flash “in place”, ie: without creating a plugin/extension? Well that scrubs the .apr concept.

    But realistically, robots will already have replaced us if you wait for the WHATWG to come to the party.

    David
  6. OMFG, I am officially going to bed. I’ve confused WHATWG with the W3C. I’m handing in my Web-Nerd badge until I’ve got some sleep.

    Yes, you’re right - the only thing holding this back is browser support for the video/audio bits, and a dead-simple IDE.

    I for one, welcome our SVG/HTML5/JS overlords, or whatever the kids say these days.

    David
  7. David: precisely. :) It’s all doable. You could even fall back to embedding a Windows Media Player/QuickTime/Totem/MPplayer widget until <video> exists.

    sil
  8. geeze just call it Messiah, I’d love to never have to use flash ever again.

    kenrick
  9. [...] Replacing Flash with something else Didn’t I read almost this exact same article once before already? (tags: Flash) [...]

    All in a days work…
  10. If the issue is an IDE, then take a look at http://www.synfig.com, and/or the roadmap for inkscape. It’s not a proper IDE (as in, you can only make an animation, not an app), but it’s a start that can be built on.

    spool
  11. I’m not sure single-file is an issue. It’s certainly a huge reason for files that are exchanged between people. But none of the file formats used on the web are single-file. And that includes Flash. In particular the video sites. But most other Flashs often load context-specific data on-demand. (If you don’t believe me, just look at the huge amount of APIs in Flash for loading files into running Flash movies.)

    Benjamin Otte
  12. Benjamin: yeah, I suppose you’re right about Flash loading files. Single-file is a jolly nice thing to aim for, but I agree it’s not necessarily a hard criterion.

    sil

Leave a Reply