How To Embed SWF In HTML?
How To开发者_高级运维 Embed SWF In HTML?
The non-official industry standard is to use SWFObject
<script type="text/javascript">
swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
</script>
Documentation
Use SWFObject
as apphacker mentiond. Just in case you cannot use it (to support browsers with JS disabled), here is how to do it with HTML alone.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="myMovie" width="300" height="200"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="Movie.swf"/>
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="Movie.swf" quality="high" bgcolor="#ffffff"
width="300" height="200" name="myMovie" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
Is this what you want to know?
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
WIDTH="850"
HEIGHT="610"
CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="MOVIE" VALUE="2bigpinkballs2.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="QUALITY" VALUE="high">
<PARAM NAME="SCALE" value="noborder">
<EMBED SRC="2bigpinkballs2.swf" WIDTH="850" HEIGHT="610" PLAY="true" LOOP="true" QUALITY="high"
scale="noborder"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED></OBJECT>
精彩评论