Skip to content

Instantly share code, notes, and snippets.

@nadav-dav
Created December 17, 2013 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nadav-dav/8002502 to your computer and use it in GitHub Desktop.
Save nadav-dav/8002502 to your computer and use it in GitHub Desktop.
example: how to user swfobject
<head>
<!--
first, download "swfobject.js" from the site i sent you and place it in your folder
-->
<script type="application/javascript" src="swfobject.js"></script> <!-- this make sure the swfobject.js is loaded -->
<script type="application/javascript">
document.onreadystatechange = function () {
if(document.readyState === "complete"){
// insert here the container id you wish to embed the swf in it
var el = document.getElementById("my-target-element");
// change the "myContent.swf" to your file, and update the sized (replace 300,120)
swfobject.embedSWF("myContent.swf", el, 300, 120, 10);
}
}
</script>
</head>
<body>
<div id="my-target-element"></div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment