我无法得到ExternalInterface.call在IE7工作工作、ExternalInterface、call

2023-09-08 15:28:43 作者:- 骚年玩命不玩心

<script type="text/javascript" src="swfobject/swfobject.js"></script>

<script language="javascript" >
swfobject.registerObject("myId", "10.0.0");


function execute(){

return a;

}

</script>



<body style="margin:0">


<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="500">

<param name="movie" value="helpdeskApp_three.swf" />
<param name="allowScriptAccess" value="always" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="helpdeskApp_three.swf" width="800" height="500" >
<!--<![endif]-->
<div>
<h1>Alternative content</h1>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="https://m.xsw88.com/allimgs/daicuo/20230908/1153.png.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

我有这个它是基于断了这个问题:http://stackoverflow.com/questions/1478015/getting-current-url-in-flash-from-javascript-using-externalinterface-and-ie

然而,这在Firefox和IE既不工程。

However this neither works in firefox and ie.

如果我嵌入我闪进这样的浏览器:

If I embed my flash into the browser like this:

<embed src="helpdeskApp_three.swf" id="flash" quality="high" scale="exactfit" width="800" height="500" name="movie" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>

这在Firefox而不是IE浏览器。

This works in Firefox but not ie.

什么是嵌入我的Flash影片的正确方法因此它可以在所有浏览器?

What is the proper way of embedding my flash movie so it works across all browsers?

感谢

推荐答案

来自:http://$c$c.google.com/p/swfobject/wiki/documentation#STEP_1:_Embed_both_Flash_content_and_alternative_content_using_s

 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420">
    <param name="movie" value="myContent.swf" />
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420">
    <!--<![endif]-->
      <p>Alternative content</p>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
  </object>