<!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=utf-8" /> 
<title>无标题文档 </title> 
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"> </script> 
<SCRIPT LANGUAGE=JavaScript> 
<!-- 
function stopPlay(){ 
var movie=document.getElementById("myFlash"); 
movie.StopPlay(); 

function play(){ 
var movie= document.getElementById("myFlash"); 
alert(movie); //测试时,这里提示movie的值为null,为什么会这样,如何才能获得flash对象? 
movie.Play(); 

//--> 
</SCRIPT> </head> <body> 
<script type="text/javascript"> 
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','240','height','530','src','No_N95_190','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','No_N95_190' ); //end AC code 
</script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="240" height="530" id="myFlash"> 
  <param name="movie" value="No_N95_190.swf" /> 
  <param name="quality" value="high" /> 
  <embed src="No_N95_190.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="240" height="530" name="myFlash" swLiveConnect="true"> </embed> 
</object> 
</noscript> 
<input type="button" value="停止播放" onclick="stopPlay()" /> 
<input type="button" value="开始播放" onclick="play()" /> 
</body> 
</html>

解决方案 »

  1.   

    试试这个:
    <!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=utf-8" /> 
    <title>无标题文档 </title> 
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"> </script> 
    <SCRIPT LANGUAGE=JavaScript> 
    <!-- 
    function stopPlay(){ 
    var movie=document.getElementById("myFlash"); 
    movie.StopPlay(); 

    function play(){ 
    var movie= document.getElementById("myFlash"); 
    alert(movie); //测试时,这里提示movie的值为null,为什么会这样,如何才能获得flash对象? 
    movie.Play(); 
    } //--> 
    </SCRIPT> 
    </head> 
    <body> 
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="240" height="530" id="myFlash"> 
      <param name="movie" value="No_N95_190.swf" /> 
      <param name="quality" value="high" /> 
      <embed src="No_N95_190.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="240" height="530" name="myFlash" swLiveConnect="true"> </embed> 
    </object>
    <input type="button" value="停止播放" onclick="stopPlay()" /> 
    <input type="button" value="开始播放" onclick="play()" /> 
    </body> 
    </html>
      

  2.   

    复制jmshl大虾的代码运行后,终于可以了。但我还是看不出我贴出的代码哪里有错误,我细看了下,好像我贴出的代码与你给出的代码基本一样,请这位大虾再给俺指出错误的地点和原因。小弟谢先啦!