Properly embedding Flash into WordPress without embed tags

I was tired of places like YouTube handing me <EMBED> tags to place flash files in my blog when they are not now (and never have been) part ofany HTML or XHTML standard. So, I took a look at how different browsers use <OBJECT> tags to achieve the same thing. Then, I tested my results in Safari, Firefox, Opera, Explorer, and Lynx. My experiements resulted in the following code:


<object type="application/x-shockwave-flash" width="425" height="350" data="http://url.to/file.swf">
 <param name="movie" value="http://url.to/file.swf" />
 <param name="quality"value="high" />
 <param name="wmode" value="transparent" />
 <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />
 MOVIE: <a href="http://url.to/file.swf" mce_href="http://url.to/file.swf">HERE</a>
</object>

Unfortunately, the redundancy is necessary. It compensates for differences between the major browsers. Remember to set your height and width, and to change the URL in all 3 places. If anyone would like to help me encase this in a wordpress plugin, I'd appreciate it.

Tags: 

Comments

But...

But...

Which versions of each of those browsers did you test?

There is actually a good reason for the EMBED nonsense (and I agree it's nonsense and non-standard) -- and that's basically compatibility with older browsers (primarily IE, if I remember rightly).

Newer browsers that deal correctly with the OBJECTs get them -- within the EMBED, as I recall, which EMBED is ignored as an unrecognized tag, as HTML renderers are supposed to do....

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.