我有一个非常简单的播放音乐的 Flash 程序。它由一个播放暂停按钮和一个显示歌曲当前位置的计时器组成。我正在尝试使用常规表单按钮来暂停或播放歌曲。
<div class="musicplayer_playpause">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','65','height','68','src','player','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','id','flashobject','movie','player','flashvars','id=<?=$cur_songid;?>&type=<?=$_GET["type"];?>&csid=<?=$cur_songid;?>&l=<?=$Arrcntt+1;?>"' ); //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" id="flashobject" width="65" height="68">
<param name="movie" value="player.swf" allowscriptaccess="always"/>
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="id" value="flashobject" />
<param name="swliveconnect" value="true" />
<embed src="player.swf" name="flashobject" width="65" height="68" quality="high" allowscriptaccess="always" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent" swliveconnect="true" ></embed>
</object>
</noscript></div>
这是我在该部分中放置的 Javascript 函数:
<script type="text/javascript">
function Pause() {
var flash = document.getElementById('flashobject');
flash.PlayPause;
}
</script>
最后是我正在使用的按钮:
<form>
<input type="button" value="Play" name="Play" onClick="Pause();">
</form>
当我单击按钮时,Firefox 的错误控制台显示“Flash 为空”我做错了什么?