1
我有我的網站的音樂播放器,這裏是代碼:如何「點擊」功能控制兩個圖像狀態
<!-- player -->
<div id="player">
<div class="playerIcon"><img src="../img/musicIcon.gif" alt="" width="21" height="19" border="0"></div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30" id="player1">
<PARAM NAME=movie VALUE="audioplay.swf?playerid=1">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=wmode VALUE="transparent">
<PARAM NAME="allowScriptAccess" value="always" />
<embed wmode="transparent" src="audioplay.swf?playerid=1" quality=high width="30" height="30" name="player1" allowScriptAccess="always"
align="" TYPE="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
<script language="javascript">
function getPlayer(movieName){
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];}
else {
return document[movieName];
}
}
function play1() {
getPlayer('player1').playMusic();
}
function stop1(){
getPlayer('player1').stopMusic();
}
</script>
</div>
<!-- end player -->
這裏,PLAYER1都有自己的圖標,並在關閉狀態時,點擊暫停音樂。我想改變動畫musicIcon.gif IMG到非動畫時,當我點擊播放器圖標。我怎樣才能做到這一點? 感謝和問候
謝謝,我會嘗試,如果我能正確理解。 – pleaides