Reputation: 47
I'm trying to create a small website that has a large amount of .swf files. However, I can't figure out how to embed them. I plan on just placing them all in the same folder as the .html file and have them embedded on the website. I also want this to be portable, so it accesses the .swf files based on the folder rather than the whole file location. Is there a piece of code that I can just enter the name of the .swf file and have it be embedded?
Upvotes: 1
Views: 5306
Reputation: 829
Here is a nice example for you. You need to change example.swf to your own.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>example SWF</title>
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffff99;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>
</head>
<body>
<div id="flashContent">
<object type="application/x-shockwave-flash" data="example.swf" width="822" height="550" id="example" style="float: none; vertical-align:middle">
<param name="movie" value="example.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffff99" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</object>
</div>
</body>
</html>
Upvotes: 0
Reputation: 26
Use embed in your HTML code :
<embed src="myFile.swf" height="800px" width="600px">
source tutorial: html5 embed flash element
Upvotes: 1