200705091328修改ExoBUD背景音樂播放器

其實也是之前已經寫過的教學文章,只是又一堆人問起,所以再挖出來寫一次,因為發現之前有些語法錯誤( : p ,可能是文章反覆進入修改有錯亂掉),同時也發現有很多多餘沒有用的程式碼也移除,簡化播放器的功能。其播放器長相會變成這樣

這是放在自由欄位中的播放器,直接不囉唆,程式碼如下↓



<div>

 

<script language="JavaScript">
var objMmInfo = null;
var intMmCnt = 0;
var intSelMmCnt = 0;
var intActMmCnt = 0;
var cActIdx = 0;
var cActTit = "nAnT";

 

var blnfpl = false;
var blnEnabled = false;
var blnEOT = false;
var arrSelMm = null;
var arrActMm = null;
var intExobudStat = 0;
var tidTLab = null;
var tidErr = null;
var tidMsg = null;
var intErrCnt = 0;
var blnRept = false;

 

var blnAutoProc = true;

 

var blnElaps = true;

 

var intDelay = 500;

 

var vmax = 100;
var vmin = 0;
var vdep = 10;

 

var blnAutoStart = false;
var blnRndPlay = true;
var blnStatusBar = false;
var blnShowVolCtrl = true;
var blnShowPlist = true;
var blnLoopTrk = true;
var blnShowMmInfo = false;

 

function wmpInit(){
 var wmps = Exobud.settings;
 var wmpc = Exobud.ClosedCaption;

 

 wmps.autoStart = true;
 wmps.balance = 0;
 wmps.enableErrorDialogs = false;
 wmps.invokeURLs = false;
 wmps.mute = false;
 wmps.playCount = 1;
 wmps.rate = 1;
 wmps.volume = 100;
 
 Exobud.enabled = true;
}
function mkMmPath(u,t,f,s){
 this.mmUrl = u;
 this.mmTit = t;
 this.mmDur = 0;
 this.selMm = f;
 this.actMm = f;
 }

 

function mkMusicList(u,t,s,f){
 var cu = u;
 var ct = t;
 var cs = s;
 var cf = f;
 var idx = 0;

 

 if(objMmInfo == null){objMmInfo=new Array(); idx=0;}
 else {idx=objMmInfo.length;}
 if(u=="" || u==null){cu="mms://";}
 if(t=="" || t==null){ct="nAnT";}
 if(f=="f" || f=="F"){cf="f";}
 else {cf="t"; intSelMmCnt++;}

 

 objMmInfo[idx]=new mkMmPath(cu,ct,cf);
  intActMmCnt = intSelMmCnt;
 intMmCnt = objMmInfo.length;
}

 

function mkSel(){
 arrSelMm = null;
 intSelMmCnt = 0;
 var selidx = 0;

 

 if(intMmCnt<=0){intExobudStat=1; blnEnabled=false; return;}

 

 arrSelMm = new Array();
 for(var i=0; i<intMmCnt; i++){
   if(objMmInfo[i].selMm =="t"){arrSelMm[selidx]=i;selidx++;}
 }
 intSelMmCnt=arrSelMm.length;

 

 if(intSelMmCnt<=0){blnEnabled=false; intExobudStat=2; arrSelMm=null; return;}
 else {blnEnabled=true; mkAct();}
}

 

function mkAct(){
 arrActMm = null;
 intActMmCnt = 0;
 var selidx = 0;
 var actidx = 0;

 

 if(blnEnabled){
   arrActMm=new Array();
   for(var i=0; i<intSelMmCnt; i++){
     selidx=arrSelMm[i];
     if(objMmInfo[selidx].actMm=="t"){arrActMm[actidx]=selidx; actidx++;}
   }
   intActMmCnt=arrActMm.length;
 }
 else { return;}
 if(intActMmCnt<=0){blnEOT=true;arrActMm=null;}
 else {blnEOT=false;}
}

 

function chkItemAct(idx){
 objMmInfo[idx].actMm="f";
 mkAct();
}

 

function mkSelAct(){
 var idx=0;
 for(var i=0; i<intSelMmCnt; i++){
   idx=arrSelMm[i];
   objMmInfo[idx].actMm="t";
 }
 mkAct();
}

 

function initExobud(){
 wmpInit();
 mkSel();
 blnfpl = false;

 

 if(!blnShowVolCtrl) {
   document.images['vmute'].style.display = "none";
   document.images['vdn'].style.display = "none";
   document.images['vup'].style.display = "none";
 }
 if(!blnShowPlist){ document.images['plist'].style.display = "none";}

 

 if(blnRept){imgChanged('rept',1);}
 else {imgChanged('rept',0);}

 

 if(blnRndPlay){imgChanged('pmode',1);}
 else {imgChanged('pmode',0);}
 showTLab();
 displ1.innerHTML = "
聽音樂請按播放鈕>";
 if(blnStatusBar){ window.status=('
聽音樂請按播放鈕>');}
 if(blnAutoStart){startExobud();}
}

 

function startExobud(){
 var wmps = Exobud.playState;
 if(wmps==2){Exobud.controls.play(); return;}
 if(wmps==3){ return;}

 

 blnfpl=false;
 if(!blnEnabled){waitMsg();return;}
 if(blnEOT){mkSelAct();}
 if(intErrCnt>0){intErrCnt=0;tidErr=setTimeout('retryPlay(),1000');return;}
 if(blnRndPlay){rndPlay();}
 else {cActIdx=arrActMm[0]; selMmPlay(cActIdx);}
}

 

function selMmPlay(idx){
 clearTimeout(tidErr);
 cActIdx=idx;
 var trknum=idx+1;
 var ctit =objMmInfo[idx].mmTit;
 if(ctit=="nAnT"){ctit="(
沒有媒體標題)"}

 Exobud.URL = objMmInfo[idx].mmUrl;
 cActTit = "T" + trknum + ". " + ctit;
 displ1.innerHTML = cActTit;
 if(blnStatusBar){ window.status=(cActTit);}
 chkItemAct(cActIdx);
}

 

function wmpPlay(){Exobud.controls.play();}

 

function wmpStop(){
 intErrCnt=0;
 clearTimeout(tidErr);
 clearInterval(tidTLab);
 imgChanged("stopt",1);
 imgChanged("pauzt",0);
 imgChanged("scope",0);
 showTLab();
 mkSelAct();
 Exobud.controls.stop();
 Exobud.close();
 displ1.innerHTML = "
播放停止;聽音樂請按播放鈕>";
 if(blnStatusBar){ window.status=('
播放停止;聽音樂請按播放鈕>');return true;}
}

 

function wmpPause(){Exobud.controls.pause();}

 

function wmpPP(){
 var wmps = Exobud.playState;
 var wmpc = Exobud.controls;
 clearInterval(tidTLab);
 clearTimeout(tidMsg);
 if(wmps==2){wmpc.play();}
 if(wmps==3){wmpc.pause(); displ2.innerHTML="
暫停"; tidMsg=setTimeout('rtnTLab()',1500);}
 return;
}

 

function rndPlay(){
 if(!blnEnabled){waitMsg();return;}
 intErrCnt=0;
 var idx=Math.floor(Math.random() * intActMmCnt);
 cActIdx=arrActMm[idx];
 selMmPlay(cActIdx);
}

 

function playAuto(){
 if(blnRept){selMmPlay(cActIdx);return;}
 if(!blnAutoProc){wmpStop();return;}
 if(blnfpl){wmpStop();return;}
 if(!blnEnabled){wmpStop();return;}
 if(blnEOT){
   if(blnLoopTrk){startExobud();}
   else {wmpStop();}
 } else {
   if(blnRndPlay){rndPlay();}
   else {cActIdx=arrActMm[0]; selMmPlay(cActIdx);}
 }
}

 

function selPlPlay(idx){
 blnfpl=true;
 selMmPlay(idx);
}

 

function playPrev(){
 var wmps = Exobud.playState;
 if(wmps==2 || wmps==3){Exobud.controls.stop();}
 blnfpl=false;
 if(!blnEnabled){waitMsg();return;}
 if(blnEOT){mkSelAct();}

 

 intErrCnt=0;
 if(blnRndPlay){rndPlay();}
 else {
   var idx=cActIdx;
   var blnFind=false;
   for(var i=0;i<intSelMmCnt;i++){ if(cActIdx==arrSelMm[i]){idx=i-1; blnFind=true;}}
   if(!blnFind){startExobud();return;}
   if(idx<0){idx=intSelMmCnt-1;cActIdx=arrSelMm[idx];}
   else {cActIdx=arrSelMm[idx];}
   selMmPlay(cActIdx);
 }
}

 

function playNext(){
 var wmps = Exobud.playState;
 if(wmps==2 || wmps==3){Exobud.controls.stop();}
 blnfpl=false;
 if(!blnEnabled){waitMsg();return;}
 if(blnEOT){mkSelAct();}

 

 intErrCnt=0;
 if(blnRndPlay){rndPlay();}
 else {
   var idx=cActIdx;
   var blnFind=false;
   for(var i=0;i<intSelMmCnt;i++){ if(cActIdx==arrSelMm[i]){idx=i+1; blnFind=true;}}
   if(!blnFind){startExobud();return;}
   if(idx>=intSelMmCnt){idx=0;cActIdx=arrSelMm[idx];}
   else {cActIdx=arrSelMm[idx];}
   selMmPlay(cActIdx);
 }
}

 

function retryPlay(){
 selMmPlay(cActIdx);
}

 

function chkRept(){
 var wmps = Exobud.playState;
 if(wmps==3){clearInterval(tidTLab);}
 if(blnRept){
   blnRept=false; imgChanged('rept',0); displ2.innerHTML="
不重複播放";
 } else {
   blnRept=true; imgChanged('rept',1); displ2.innerHTML="
重複播放";
 }
 tidMsg=setTimeout('rtnTLab()',1000);
}

 

function chgPMode(){
 var wmps = Exobud.playState;
 if(wmps==3){clearInterval(tidTLab);}
 if(blnRndPlay){
   blnRndPlay=false; imgChanged('pmode',0); displ2.innerHTML="
循序播放";
 } else {
   blnRndPlay=true; imgChanged('pmode',1); displ2.innerHTML="
隨機播放";
 }
 tidMsg=setTimeout('rtnTLab()',1000);
}

 


function evtPSChg(f){

 

 switch(f){
   case 1:
     evtStop();
     break;
   case 2:
     evtPause();
     break;
   case 3:
     evtPlay();
     break;
   case 8:
     setTimeout('playAuto()', intDelay);
     break;
 }
}

 


function evtWmpBuff(f){
 if(f){
   displ2.innerHTML = "
緩衝處理中";
   var msg = "(
緩衝處理中) " + cActTit;
   displ1.innerHTML = msg;
   if(blnStatusBar){ window.status=(msg);}
 } else {
   displ1.innerHTML = cActTit; showTLab();
 }
}

 


function evtWmpError(){
 intErrCnt++;
 Exobud.Error.clearErrorQueue();
 if(intErrCnt<=3){
   displ2.innerHTML = "
嘗試連線 (" + intErrCnt + ")";
   var msg = "(
嘗試第 " + intErrCnt + " 次連線) " + cActTit;
   displ1.innerHTML = "<
無法播放> " + cActTit;
   if(blnStatusBar){ window.status=(msg);}
   tidErr=setTimeout('retryPlay()',1000);
 } else {
   clearTimeout(tidErr);
   intErrCnt=0;showTLab();
   var msg = "
放棄嘗試再連線。改播下一首";
   if(blnStatusBar){ window.status=(msg);}
   setTimeout('playAuto()',1000);}
}

 


function evtStop(){
 clearTimeout(tidErr);
 clearInterval(tidTLab);
 showTLab();
 intErrCnt=0;
 imgChanged("pauzt",0);
 imgChanged("playt",0);
 imgChanged("scope",0);
 displ1.innerHTML = "[
等待播放下一首曲目]";
 if(blnStatusBar){ window.status=('[
等待播放下一首曲目]');return true;}
}

 


function evtPause(){
 imgChanged("pauzt",1)
 imgChanged("playt",0);
 imgChanged("stopt",0);
 imgChanged("scope",0);
 clearInterval(tidTLab);
 showTLab();
}

 


function evtPlay(){
 imgChanged("pauzt",0)
 imgChanged("playt",1);
 imgChanged("stopt",0);
 imgChanged("scope",1);
 tidTLab=setInterval('showTLab()',1000);
}

 


function showTLab(){
 var ps = Exobud.playState;
 if(ps==2 || ps==3){
   var cp=Exobud.controls.currentPosition;
   var cps=Exobud.controls.currentPositionString;
   var dur=Exobud.currentMedia.duration;
   var durs=Exobud.currentMedia.durationString;
   if(blnElaps){
     displ2.innerHTML = cps + " | " + durs;
     var msg = cActTit + " (" + cps + " | " + durs + ")";
     if(ps==2){msg = "(
暫停) " + msg;}
     if(blnStatusBar){ window.status=(msg);return true;}
   } else {
     var laps = dur-cp;
     var strLaps = wmpTime(laps);
     displ2.innerHTML = strLaps + " | " + durs;
     var msg = cActTit + " (" + strLaps + " | " + durs + ")";
     if(ps==2){msg = "(
暫停) " + msg;}
     if(blnStatusBar){ window.status=(msg);return true;}
   }

 

 } else {
   displ2.innerHTML = "
| ";
 }
}

 


function chgTimeFmt(){
 var wmps = Exobud.playState;
 if(wmps==3){clearInterval(tidTLab);}
 if(blnElaps){
   blnElaps=false; displ2.innerHTML="
倒數方式";
 } else {
   blnElaps=true; displ2.innerHTML="
正常方式";
 }
 tidMsg=setTimeout('rtnTLab()',1000);
}

 


function rtnTLab(){
 clearTimeout(tidMsg);
 var wmps = Exobud.playState;
 if(wmps==3){tidTLab=setInterval('showTLab()',1000);}
 else {showTLab();}
}

 


function wmpTime(dur){
 var hh, min, sec, timeLabel;
 hh=Math.floor(dur/3600);
 min=Math.floor(dur/60)%60;
 sec=Math.floor(dur%60);
 if(isNaN(min)){ return "00:00";}
 if(isNaN(hh) || hh==0){timeLabel="";}
 else {
   if(hh>9){timeLabel = hh.toString() + ":";}
   else {timeLabel = "0" + hh.toString() + ":";}
 }
 if(min>9){timeLabel = timeLabel + min.toString() + ":";}
 else {timeLabel = timeLabel + "0" + min.toString() + ":";}
 if(sec>9){timeLabel = timeLabel + sec.toString();}
 else {timeLabel = timeLabel + "0" + sec.toString();}
 return timeLabel;
}

 


function wmpVolUp(){
 var wmps = Exobud.playState;
 if(wmps==3){clearInterval(tidTLab);}
 var ps = Exobud.settings;
 if(ps.mute){ps.mute=false; displ2.innerHTML="
音量恢復"; imgChanged('vmute',0);}
 else {
   if(ps.volume >= (vmax-vdep)){ps.volume = vmax;}
   else {ps.volume = ps.volume + vdep;}
   displ2.innerHTML = "
音量: " + ps.volume + "%";
 }
 tidMsg=setTimeout('rtnTLab()',1000);
}

 


function wmpVolDn(){
 var wmps = Exobud.playState;
 if(wmps==3){clearInterval(tidTLab);}
 var ps = Exobud.settings;
 if(ps.mute){ps.mute=false; displ2.innerHTML="
音量恢復"; imgChanged('vmute',0);}
 else {
   if(ps.volume <= vdep){ps.volume = vmin;}
   else {ps.volume = ps.volume - vdep;}
   displ2.innerHTML = "
音量: " + ps.volume + "%";
 }
 tidMsg=setTimeout('rtnTLab()',1000);
}

 


function wmpMute(){
 var wmps = Exobud.playState;
 if(wmps==3){clearInterval(tidTLab);}
 var ps = Exobud.settings;
 if(!ps.mute){
   ps.mute=true; displ2.innerHTML="
開啟靜音模式"; imgChanged("vmute",1);
 } else {
   ps.mute=false; displ2.innerHTML="
關閉靜音模式"; imgChanged("vmute",0);
 }
 tidMsg=setTimeout('rtnTLab()',1000);
}

 


function waitMsg(){
  if(intExobudStat==1){displ1.innerHTML = "
無法播放播放清單上沒有任何曲目。";}
 if(intExobudStat==2){displ1.innerHTML = "
無法播放您沒有選取播放清單上任何一首曲目。";}
 if(blnStatusBar){
   if(intExobudStat==1){ window.status=('
無法播放-播放清單上沒有設定任何曲目。'); return true;}
   if(intExobudStat==2){ window.status=('
無法播放-您沒有選取播放清單上任何一首曲目。'); return true;}
 }
}

 

function openPlist(){
 window.open("http://blog.xuite.net/jeanson61/xuite/11497956","mplist",",scrollbars=yes,resizable=yes,copyhistory=no");
}

 

function chkWmpState(){
 return Exobud.playState;
}

 


function chkWmpOState(){
 return Exobud.openState;
}

 


function chkOnline(){
 return Exobud.isOnline;
}

 


function vizExobud(){
 window.open("http://exobud.nayana.org","vizExobud");
}
 mkMusicList("http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/195477/195477.mp3 ","古典鋼琴小品1");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/195476/195476.mp3 ","古典鋼琴小品2");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/195474/195474.mp3 ","古典鋼琴小品3");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/195473/195473.mp3 ","古典鋼琴小品4");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/170761/170761.mp3 ","古典音樂小品5");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/170755/170755.mp3 ","古典音樂小品6");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/170748/170748.mp3 ","古典音樂小品7");
</script>

 

<script language="JavaScript">
toggleKey = new Object();
toggleKey[0] = "_off";
toggleKey[1] = "_on";
toggleKey[2] = "_ovr";
toggleKey[3] = "_out";
toggleKey[4] = "_mdn";
toggleKey[5] = "_mup";

 

function imgChanged(id,act){
 if(document.images){ document.images[id].src = eval("imgBtn." + id + toggleKey[act] + ".src");}
}

 

if(document.images){
 imgBtn = new Object();
 imgBtn.vmute_off = new Image();
 imgBtn.vmute_off.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_5.gif";
 imgBtn.vmute_on = new Image();
 imgBtn.vmute_on.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_18.gif"; 
 imgBtn.pmode_off = new Image();
 imgBtn.pmode_off.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_8.gif";
 imgBtn.pmode_on = new Image();
 imgBtn.pmode_on.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_19.gif";
 imgBtn.rept_off = new Image();
 imgBtn.rept_off.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_9.gif";
 imgBtn.rept_on = new Image();
 imgBtn.rept_on.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_20.gif";
 imgBtn.playt_off = new Image();
 imgBtn.playt_off.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_14.gif";
 imgBtn.playt_on = new Image();
 imgBtn.playt_on.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_21.gif";
 imgBtn.pauzt_off = new Image();
 imgBtn.pauzt_off.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_12.gif";
 imgBtn.pauzt_on = new Image();
 imgBtn.pauzt_on.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_22.gif";
 imgBtn.stopt_off = new Image();
 imgBtn.stopt_off.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_13.gif";
 imgBtn.stopt_on = new Image();
 imgBtn.stopt_on.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_23.gif";
 imgBtn.scope_off = new Image();
 imgBtn.scope_off.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_17.gif";
 imgBtn.scope_on = new Image();
 imgBtn.scope_on.src = "http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_16.gif";
}
</script>

 

<script language="javascript">
window.onload = initExobud;
</script>

 

<div><object id="Exobud" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" width="0" height="0" style="position:relative;left:0px;top:0px;width:0px;height:0px;">
  <param name="autoStart" value="true">
  <param name="balance" value="0">
  <param name="currentPosition" value="0">
  <param name="currentMarker" value="0">
  <param name="enableContextMenu" value="false">
  <param name="enableErrorDialogs" value="false">
  <param name="enabled" value="true">
  <param name="fullScreen" value="false">
  <param name="invokeURLs" value="false">
  <param name="mute" value="false">
  <param name="playCount" value="1">
  <param name="rate" value="1">
  <param name="uiMode" value="none">
  <param name="volume" value="100">
</object></div>

 

<div><table height=25 width=170 align=center cellpadding=0 cellspacing=0 border=0> 
<tr>
  <td COLSPAN=2 width=170 height=25 background="http://c.blog.xuite.net/cf/7b/11732000/blog_698/txt/3993452/3993452_0.gif">
      <marquee behavior="scroll" width=170 height=25 scrollamount=2 scrolldelay=70>
        <span id="displ1" class="title" style="background:transparent">
聽音樂請按播放鈕</span>
      </marquee>
  </td> </tr>
<tr>  
  <td width=85 height=25 align=center background="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_3.gif" nowrap onClick="chgTimeFmt()">
      <span id="displ2" class="time" title="
時間長度顯示方式 (正常/倒數)" style="width:85; cursor:hand">00:00 | 00:00</span>
  </td>
  <td width=85 height=25 align=right background="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_1.gif" onClick="vizExobud()" style="cursor:help" title="
到訪 ExoBUD MP 原作者 Jinwoong Yu 的網站 [韓文]"></td></tr>
<tr> 
<td COLSPAN=2 height=25 background="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_0.gif" nowrap>&nbsp;      
      <img name="playt" src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_14.gif" width=16 height=18 border=0 onClick="startExobud()" style="cursor:hand" title="
播放">
      <img name="pauzt" src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_12.gif" width=16 height=18 border=0 onClick="wmpPP()" style="cursor:hand" title="
暫停.繼續">
      <img name="stopt" src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_13.gif" width=16 height=18 border=0 onClick="wmpStop()" style="cursor:hand" title="
停止">
     <img name="prevt" src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_10.gif" width=16 height=18 border=0 onClick="playPrev()" style="cursor:hand" title="
上一首曲目">
<img name="nextt" src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_11.gif" width=16 height=18 border=0 onClick="playNext()" style="cursor:hand" title="
下一首曲目">
<img name="scope" src="http://c.blog.xuite.net/cf/7b/11732000/blog_698/txt/3993452/3993452_17.gif" height=18>
  </td>  </tr>
 <tr>   
  <td COLSPAN=2 height=25 style="vertical-align:text-top" background="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_0.gif" nowrap>&nbsp;      
      <img name="vmute" src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_5.gif" width=16 height=18 border=0 onClick="wmpMute()" style="cursor:hand" title="
靜音模式">
      <img name="vdn"   src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_6.gif" width=16 height=18 border=0 onClick="wmpVolDn()" style="cursor:hand" title="
減少音量">
      <img  name="vup"   src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_7.gif" width=16 height=18 border=0 onClick="wmpVolUp()" style="cursor:hand" title="
增加音量">
      <img name="pmode" src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_8.gif" width=16 height=18 border=0 onClick="chgPMode()" style="cursor:hand" title="
播放順序 (S=循序 R=隨機)">
      <img name="rept"  src="http://blog.xuite.net/_users/cf/7b/11732000/blog_698/txt/3993452/3993452_9.gif" width=16 height=18 border=0 onClick="chkRept()" style="cursor:hand" title="
切換是否重複播放目前的曲目">
     <img name="plist" src="
 http://c.blog.xuite.net/c/f/7/b/11732000/blog_698/txt/3993452/33.jpg" height=18 border=0 onClick="openPlist()" style="cursor:hand" title="修改者狗貓的網站">
  </td></tr>
     </table></div>

 

<script language="JScript" for="Exobud" event="playStateChange(ns)">evtPSChg(ns);</script>
<script language="JScript" for="Exobud" event="error()">evtWmpError();</script>
<script language="JScript" for="Exobud" event="Buffering(bf)">evtWmpBuff(bf);</script>

 

</div>

 

 


 

使用者需要做的事很簡單,就是將上面語法中的這一段改成你自己的音樂網址以及音樂說明就可以了↓
 mkMusicList("http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/195477/195477.mp3 ","古典鋼琴小品1");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/195476/195476.mp3 ","古典鋼琴小品2");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/195474/195474.mp3 ","古典鋼琴小品3");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/195473/195473.mp3 ","古典鋼琴小品4");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/170761/170761.mp3 ","古典音樂小品5");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/170755/170755.mp3 ","古典音樂小品6");
mkMusicList("
http://c.mms.blog.xuite.net/c/f/7/b/11732000/blog_102/dv/170748/170748.mp3 ","古典音樂小品7");

 

裡面的語法其實只有一行↓
mkMusicList("音樂網址URL", "音樂說明");
可以自己增加,寫兩行就有兩首,寫N行就N首。很簡單的!

另外如果想要一開始就播放音樂請改藍色字體部份var blnAutoStart = false; 改為var blnAutoStart = true;

回應

瘋狂亂收藏家、收藏CPU、手表以及Xuiters

今天去哪玩??
天氣
累積 | 今日
loading......
訂閱狗猫電子報

輸入你的email address:

Delivered by FeedBurner

    沒有新回應!
關鍵字
Xuite電影貼紙
平均分數:0 顆星
投票人數:0
我要評分:





Powered by Xuite
Re:[台北搬家公司 ...],By 搬家公司-賴工匠 於2016-08-15
Re:[讚!!!],By blog 於2015-06-18
Re:[謝謝],By blog 於2015-06-15
Re:[[Xuite秘笈]上傳M...],By ★ㄚ進のsmile加油站★ 於2015-05-03
Re:[隨意聽App推薦],By ★ㄚ進のsmile加油站★ 於2015-05-03
Re:[新版CSS]欄位的...],By 天使的花園 於2015-04-12
Re:[[Xuite秘笈]背景...],By 天使的花園 於2015-04-05
Re:[[Xuite秘笈]背景...],By 天使的花園 於2015-04-05
Re:[名器],By 名器 於2014-12-16
Re:[棋牌游戏平台,...],By 棋牌游戏平台,网上棋牌游戏平台,棋牌游戏平台网站,易发棋牌游戏平台-228238.com 於2014-11-24
CSS樣版三欄兩欄倒數冬季計時居家右欄黑色系藍色風水語法自由欄位保健播放器浮動寬度步道如果劇團行動兒童劇夢想兩欄右iPAD裝潢CSS語法border耶誕iPhone影音系統家具手機客廳L型家具望洋山登入問題Pixar幾何影音播放器邊框標題名稱粉紅基礎入門圖片縮小Style Information文章鎖餐廳密碼鎖影音選單more
不顯示的自由欄位