Skip to content

Instantly share code, notes, and snippets.

@lukebayes
Created February 17, 2010 05:31
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 lukebayes/306334 to your computer and use it in GitHub Desktop.
Save lukebayes/306334 to your computer and use it in GitHub Desktop.
desc "Create the index.html file"
erb_resolver 'bin/index.html' do |t|
t.swf_file = 'SomeProject.swf'
t.layout = 'Layout.xml'
end
<html>
<head>
<script type="text/javascript" src="scripts/swfobject-1.5.1.js"></script>
<script>
function embed() {
var so = new SWFObject("<%= swf_file %>", "swf", "420", "360", "9.0.0", "#ffffff", []);
so.addVariable("layout", "<%= layout %>");
so.write("flash-content");
}
</script>
</head>
<body onload="embed()">
<center>
<div id="flash-content"></div>
</center>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment