Posted By

trusktr on 11/25/10


Tagged

valid object html flash code w3c


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

DrPepper
michellebracken
raz


100% W3C-valid flash embed code using <object>.


 / Published in: HTML
 

This code will allow you to embed flash on websites and those sites will validate on w3c validator.

Unfortunately, sloppy developers don't usually care about validation. :/

  1. <!--[if !IE]> -->
  2. <object type="application/x-shockwave-flash"
  3. data="foobar.swf" width="100%" height="100%">
  4. <!-- <![endif]-->
  5.  
  6. <!--[if IE]>
  7. <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  8. codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
  9. width="100%" height="100%">
  10. <param name="movie" value="foobar.swf" />
  11. <!--><!--dgx-->
  12. <param name="loop" value="false" />
  13. <param name="menu" value="false" />
  14. <param name="wmode" value="transparent" />
  15. <param name="bgcolor" value="#000000" />
  16. <param name="FlashVars" value="first=ryan&last=hodek&foo=bar&etc=etc" />
  17.  
  18. <p>This is <b>alternative</b> content.</p>
  19. <!-- <![endif]-->

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: trusktr on February 10, 2011

I don't know why major sites all use invalid code. Oh well.

You need to login to post a comment.