Skip to content

Instantly share code, notes, and snippets.

@planetoftheweb
Created March 8, 2011 16:09
Show Gist options
  • Save planetoftheweb/860455 to your computer and use it in GitHub Desktop.
Save planetoftheweb/860455 to your computer and use it in GitHub Desktop.
A simple JavaScript function for inserting SWFs into an HTML page.
<script type="text/javascript" >
function writeFlash(movieLocation,mywidth,myheight,myname) {
if (myname) { myid=myname; } else { myid="flashanimation"; }
document.write('<object type="application/x-shockwave-flash"id="'+myid+'"width="'+mywidth+'"height="'+myheight+'"data="'+movieLocation+'"> <param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+movieLocation+'" /><param name="quality" value="high" /><param name="scale"value="noscale" /><param name="wmode" value="transparent"/></object>');
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment