November 27, 2006

How to correctly insert a Flash into XHTML ?La Trine

Filed under: flash — michaelangela @ 1:42 am

Always looking for a way to embed Flash without causing trouble… Not always easy. This is interesting because it doesn’t require Javascript, validates, and allows for alternate content.

How to correctly insert a Flash into XHTML – La Trine:

Final Solution The complete code will then look like this (example + validator):

<!--[if !IE]> -->
<object type="application/x-shockwave-flash"
data="movie.swf" width="300" height="135">
<!-- <![endif]-->

<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="300" height="135">
<param name="movie" value="movie.swf" />
<param name="loop" value="true" />
<param name="menu" value="false" />

<p>This is <strong>alternative</strong> content.</p>
<!-- <![endif]-->

Maybe it’s not a brilliantly elegant solution, but it’s only truly functional solution that I have found.

  • it’s valid

  • it’s functional in all browsers that I know

  • it always show alternative content if the plugin is missing

  • it can be combined with Eolas workaround trick

  • it doesn’t require javascript

  • tags <param> are not doubled


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: