Simple XHTML Flash Embedding
Filed under HTML
The typical way mot people embed flash is pure ugly. Not only is it ugly, but it breaks the XHTML standard. Luckily, there’s a way around it which is much better than the traditional way, and as an added bonus, has a built in flash plugin check without any javascript!
<object type="application/x-shockwave-flash" data="yourswf.swf" width="100" height="100">
<param name="movie" value="yourswf.swf" />
<img src="no-flash.png" width="100" height="100" alt="" />
</object>
The data in the object tag (beside the param tag) is only called if the flash plugin is not available. Meaning you can put any html you want there as an alternative. I’m sure if you play around with it you will find how much better this is.
May 25th, 2008 at 12:37 pm
And you don’t think this one is ogly?
Try SWFObject instead!
May 25th, 2008 at 12:49 pm
Yes, SWFObject is great. But I am showing you how to make flash embedding work in XHTML without javascript.
August 19th, 2008 at 12:42 pm
[...] will use the script I put together in the “Simple XHTML Flash Embedding [...]
September 19th, 2008 at 1:41 am
I think the Satay method is the ideal way of embedding Flash in xhtml pages.