We Recommend

HTML: The Definitive Guide HTML: The Definitive Guide
They teach you that learning HTML is like learning any other language and that reading a book of rules can only take you so far. Readers begin writing what may be their first Web page just two pages into the book's second chapter. From there on, they provide a wide range of HTML coding to allow readers to learn from good examples. The book includes a handy "cheat sheet" of HTML codes for quick reference.


Posted By

imhugo on 01/13/08


Tagged

embed swfObject


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

jonhenshaw
uisluu


Using swfObject


Published in: HTML 


URL: httP://blog.deconcept.com/swfobject/

Put swf files in html using swfObject

  1. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  2. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  3. <title>Set Title</title>
  4.  
  5. <link href="css/flash_style.css" rel="stylesheet" type="text/css">
  6.  
  7. <script language="javascript" type="text/javascript" src="js/swfobject.js"></script>
  8.  
  9. </head>
  10.  
  11.  
  12. <div id="content">(install flash player)</div>
  13.  
  14. <script type="text/javascript">
  15. // <![CDATA[
  16.  
  17. var mySWFObject = new SWFObject("flash/index.swf", "flashID", "950px", "600px", "8", "#CCCCCC");
  18.  
  19. mySWFObject.addParam("scale", "noscale");
  20. mySWFObject.addParam("menu", "false");
  21. mySWFObject.addParam("quality", "high");
  22. mySWFObject.addParam("base", ".");
  23.  
  24. mySWFObject.write("content");
  25.  
  26. // ]]>
  27. </script>
  28.  
  29. </body>
  30. </html>

Report this snippet 

You need to login to post a comment.