andyz
惡靈退散 o(╬ ̄皿 ̄)=○ &nb ..
|
分享:
▲
var sound1="midi/1.mid" var sound2="midi/2.mid" var sound3="midi/3.mid" var sound4="midi/4.mid" var sound5="midi/5.mid" var sound6="midi/6.mid"
var x=Math.random()*5 ; //0~5 x=x+1; //1~6
switch (x){ case: "1" x=sound1;break; case: "2" x=sound2;break; case: "3" x=sound3;break; case: "4" x=sound4;break; case: "5" x=sound5;break; case: "6" x=sound6;break; default: x=sound1;break; }
就這樣吧 不確定能不能跑 先試試看吧 不行跑在討論
|