We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

mattkenefick on 05/19/08


Tagged

javascript include flash swfObject


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

mattkenefick


Include / Implement SWFObject


Published in: JavaScript 


Just to include and implement the SWFObject to an HTML body from a generic "/js/" directory with some basic varibles.

  1. <script src="js/swfobject.js" language="javascript"></script>
  2.  
  3. <div id="flashContent"></div>
  4.  
  5. <script type="text/javascript">
  6. // <![CDATA[
  7. var so = new SWFObject("flash/intro.swf?<?php echo rand(0,1000); ?>", "intro", "100%", "100%", "8", "#ffffff");
  8. so.addParam("wmode", "transparent");
  9. so.addParam("allowScriptAccess","always");
  10. so.addVariable("location","Manhattan New York");
  11. so.write("flashContent");
  12. // ]]>
  13. </script>

Report this snippet 

You need to login to post a comment.