temp = 1;//音樂序號
function aa() {
mysound = new Sound();
mymusic_array = new Array("E:/music/夏天的風.mp3", "E:/music/鏗鏘玫瑰.mp3", "E:/music/芙蓉姐姐.mp3", "E:/music/海盜.mp3");
mysound.loadSound(mymusic_array[temp-1], false);
mysound.onLoad = function(success) {
if (success == true) {
mysound.start();
}
};
mysound.onSoundComplete = function() {
temp++;
if (temp>4) {//如果妳設置了10首音樂,就把4改成10
temp = 1;
}
aa();
};
myarray = new Array("夏天的風-溫嵐", "鏗鏘玫瑰", "芙蓉姐姐", "海盜");//歌曲名字數組
music_name = myarray[temp-1];//輸出歌曲名字
aa();
stop();