Created
December 17, 2013 09:49
-
-
Save nadav-dav/8002502 to your computer and use it in GitHub Desktop.
example: how to user swfobject
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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