I am in the middle of migrating my website to HTML5. My website contains a few .swf files that I've
embedded in myt html code. When I am validation my site (at W3C) I get a few errors. I hope someone
can help me with this problem.
This is the code i am using:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=8,0,0,24" width="270" height="175">
<param name="movie" value="flash/header_v8_1_orangeflower.swf?button=1" />
<param name="quality" value="high" />
<param name="menu" value="false" />
When validating i get this error:
…ub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="270" height="175">
That looks like old-style embedding code and if it is it will not validate with the W3C standards. Look into using more modern embedding techniques. SWFObject might help... http://code.google.com/p/swfobject/
I also recommend swfobject... but sometimes all the extra IE conditional statements that comes with version 2+ can cause problems. I like the earlier 1.5 version myself.
Either version.... they are still both Flash detection methods. The real stregth of using Flash detection is the ability to add "Alternate content".... NOT as a mean of just placing Flash on a Web page. That can be done with just HTML <object> code.... no swfobject needed.
The single <object> method..... Very simple and clean:
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">
<param name="movie" value="path_to_file/file.swf">
<param name="SomeOtherParam" value="ParamValue">
Edit as needed for your content
Europe, Middle East and Africa