
Embed Flash that is XHTML compliant
Ever try to embed flash with Macromedia Dreamweaver’s tools? You usually get something like this:
<script type=”text/javascript”>
AC_FL_RunContent( ‘codebase’,'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0′,’width’,
‘300′,’height’,'180′,’src’,'xml_rotator’,'quality’,'high’,'pluginspage’,'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,'movie’,'xml_rotator’ ); //end AC code
</script><noscript><object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0″ width=”300″ height=”180″>
<param name=”movie” value=”flashfile.swf” />
<param name=”quality” value=”high” />
<embed src=”flashfile.swf” quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash” type=”application/x-shockwave-flash” width=”300″ height=”180″></embed>
</object></noscript>
Well this isn’t going to be XHTML compliant. In order to fix this and still be compliant you have to enter something like this:
<script type=”text/javascript”>
AC_FL_RunContent( ‘type’,'application/x-shockwave-flash’,'data’,'xml_rotator.swf’,'height’,'180′,’width’,'300′,’movie’,'xml_rotator’ ); //end AC code
</script><noscript><object type=”application/x-shockwave-flash” data=”flashfile.swf” height=”180″ width=”300″><param name=”movie” value=”flashfile.swf” /></object></noscript>
The reason for this is that the <embed> tag isn’t supported XHTML markup. But not according to Macromedia. Hope this helps.
Additional Content Added 6-21-09:
The reason for the error is that the standard HTML code used to displayand embed flash is not W3C (World Wide Web Consortium) compliant. A work around this is to use Javascript to dynamically write the HTMLÂ code when the page is requested and populated at run-time. This will essentially hide the error causing code from the valuators.






