我在网上查到的是 使用 GotoFrame方法,但没有效果..
我使用的是adobe flash player 10 
IE 7请问有人知道怎么解决不..其它方法都运行正常.<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN "   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> 
<html   xmlns= "http://www.w3.org/1999/xhtml "> 
<head> 
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312" /> 
<title> </title> 
<script type="text/javascript">
function flash(ur,w,h){ 
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">'); 
document.write('<param name="movie" value="'+ur+'">'); 
document.write('<param name="quality" value="high"> '); 
document.write('<param name="wmode" value="transparent"> '); 
document.write('<param name="menu" value="false"> '); 
document.write('<embed src="'+ur+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="'+w+'" height="'+h+'" quality="High" wmode="transparent">'); 
document.write('</embed>'); 
document.write('</object>'); 
} </script>
</head> 
<body> <script language="javascript" type="text/javascript">flash('200910160847047.swf','529','600');</script>
<input type="button" onclick="obj1.Play();"  value="Play"/>
<input type="button" onclick="obj1.stop();"  value="Play"/>
<input type="button" onclick="alert(obj1.CurrentFrame());"  value="CurrentFrame"/>
<input type="button" onclick="alert(obj1.totalframes);"  value="totalframes"/>
<input type="button" onclick="obj1.GotoFrame(100);"  value="GotoFrame"/></body> </html>

解决方案 »

  1.   

    也许你可以通过js调用actionScript的方式实现,大致意思如下
    <script type="text/javascript">
    46    function callActionScript(value)
    47    {
    48        //根据id获取flash实例,在这里id是CallAsFromJs,可以从Embed
    49        var flash = (navigator.appName.indexOf ("Microsoft") !=-1)?window["obj1"]:document["obj2"];
    50        //调用ActionScript注册的回调方法
    51        flash.callActionScript(value);
    52    }
    53</script>
      

  2.   

    在flash中注册回调方法供JavaScript调用
    initialize="init()"private function init(): void
        {
          ExternalInterface.addCallback("callActionScript", xxMethod);
        }
               
    private function xxMethod(position: String): void
        {
         ....
        }