如何制作音频自动播放

时间:2012-02-18 23:26:29

标签: audio autoplay flash-autoplay

我想在打开页面时自动播放音频文件。

以下是代码:

<object width="290" height="24" data="http://localhost/placement/theme/anomaly/sound/player.swf" type="application/x-shockwave-flash" id="audioplayer1">
    <param name="movie" value="/placement/theme/anomaly/sound/player.swf" />
    <param name="FlashVars" value="playerID=1&bg=0xCDDFF3&leftbg=0x357DCE&lefticon=0xF2F2F2&rightbg=0xE66511&rightbghover=0xEF9C10&righticon=0xF2F2F2&righticonhover=0xFFFFFF&text=0x357DCE&slider=0x357DCE&track=0xFFFFFF&border=0xFFFFFF&loader=0xAF2910&soundFile=/placement/theme/anomaly/sound/2.mp3" />       
    <param name="quality" value="high" />
    <param name="menu" value="false" />
    <param name="wmode" value="transparent" />

我尝试添加以下行:

<param value="true" name="autoplay" />

但它不起作用。请帮帮我。

1 个答案:

答案 0 :(得分:1)

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="590" height="475" ID="Captivate1">
    <param name="movie" value="untitled_skin.swf">
    <param name="quality" value="high">
    <param name="loop" value="0">
    <param name="play" value="false">
    <embed src="untitled_skin.swf" width="590" height="475" loop="0" quality="high" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" play="false" flashvars="autoplay=false&play=false" menu="false"></embed>
</object>