首页 > 代码库 > HTML插入FLASH

HTML插入FLASH


<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="420" height="336" >
                    <param name="movie" value="http://vxxx.com/player/player.swf" />
                    <param name="quality" value="http://www.mamicode.com/high" />
                    <param name="allowScriptAccess" value="http://www.mamicode.com/always" />
                    <param name="allowFullScreen" value="http://www.mamicode.com/true" />
                    <param name="wmode" value="http://www.mamicode.com/opaque" />
                    <embed wmode="opaque" src="http://v.nie.netease.com/com/player/player.swf" quality="high" allowscriptaccess="always" allowFullScreen="true"  pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="420" height="336"></embed>
 </object>

后在一次,我在html中用js调用flash里面的函数:
document.getElementById(‘player2‘).Reset();

在ie中死活在报错,firefox,chrome则没有问题。

现在用了一个更简单的代码,执行上述js在ie678,firefox,chrome下没有问题,我确实搞不懂上面的<embed>标签是用来干嘛的:

<object id="player2"  width="488" height="518"type="application/x-shockwave-flash" data="http://www.mamicode.com/swf/flash.swf">
          <param value="http://www.mamicode.com/transparent" name="wmode">
          <param value="http://www.mamicode.com/always" name="allowScriptAccess">
          <param value="http://www.mamicode.com/swf/flash.swf" name="movie">
          <param value="http://www.mamicode.com/high" name="quality">
 </object>

HTML插入FLASH