0

我用 Flash 创建了一个音频 swf 文件,其中包含一首 mp3 歌曲;没有其他的。因此,没有 ActionScript。我已经用 Dreamweaver 将它嵌入到一个 html 文件中,并且我有以下代码:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="20" height="20"   
id="FlashID"     title="test">
<param name="movie" value="struggle.swf">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="swfversion" value="6.0.65.0">
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest  
version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf">
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="struggle.swf" width="20" height="20">
<!--<![endif]-->
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="swfversion" value="6.0.65.0">
<param name="expressinstall" value="Scripts/expressInstall.swf">
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and  
older. -->
<div>
  <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
  <p><a href="http://www.adobe.com/go/getflashplayer"><img 
src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe 
Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

到目前为止,一切都很好。每次加载我的页面时都会播放这首歌。现在,我想在我的 html 文件中有一个按钮来控制 swf。按一次暂停歌曲,再按一次恢复。我尝试了很多方法,但没有一个有效。例如:

window.document.flashID.Play();

不起作用...
此外,jQuery SWFObject 插件不起作用(也许它仅适用于电影?)。而其他一些尝试也没有成功。请任何想法,因为我已经厌倦了。

4

0 回答 0