Embedding Macromedia Flash in XHTML
A couple of years ago, I wrote an article for A List Apart detailing a method that could be used to embed Macromedia Flash movies in a valid XHTML document. For those not familiar with the thorny issue, traditional techniques involve using both XHTML’s object
element and HTML’s embed
element to support all browsers. The XHTML specification cast aside the embed
element, leaving developers high and dry when it came to adding a Flash movie to an XHTML document.
After some experimentation and testing (quite a bit, in fact), I discovered a method of using the object
element alone to get Flash playing in pretty much every commonly used browser. The technique had one problem, however, and that was that Internet Explorer wouldn’t start the Player until the entire file had been downloaded – the user would have to wait for the entire movie to download before it would even play the first frame.
After a bit of thinking, I devised a work-around that used a small container movie as a loader. By referencing the container movie in the code and then having this movie load the real movie, the effect of streaming was reinstated for IE users. I wrote up my experience, explaining the steps I’d been through, and we called it Flash Satay.
Well, that was two years ago now, and the technique has seen a pretty good uptake. You can even see it in use at Disney. At the time of writing I believed that someone would quickly pick up the work I’d done and come up with the next magical step that made the technique even more usable – to my mind we were at the start of the valid Flash journey, not the end of it. But apart from techniques which rely on JavaScript (something that Satay avoids, and in many cases cannot be relied upon), I’ve seen nothing which particularly furthers what I wrote about in November 2002. Perhaps we’ve hit the limitations of the current browsers already – it wouldn’t be the first time.
So as you can imagine, I was interested to see a technique by Daniel Duris posted around a lot lately. Daniel claims to have a technique that improves on Flash Satay by eliminating the need for a container movie. ‘Great!’ I thought. However, careful readers will note that, erm, it’s just Satay without the container. Go figure.
In September 2003 there was a lot of fuss kicked up over patents on embedding plugins in web pages. This was going to be a big deal, and Microsoft went as far as engineering a patched version of IE which had the user click OK to prompt before starting any Flash on a page. The development community and big players like Macromedia scrambled, and came up with a whole bunch of methods to circumnavigate the new code. As it turns out, the whole thing blew over and it wasn’t necessary.
Following the incident, Jeffrey Zeldman asked if I wanted to write a follow-up piece to Flash Satay, reflecting on the changes since the article was first published. The truth was, however, that there had been no changes. There was nothing new to add. There still isn’t.
So, Ladies and Gentlemen, introducing the new old way to embed Flash movies in XHTML: Flash Satay.