Prueba este código
Código AS3:
Ver originalimport flash.media.Sound;
import flash.net.URLRequest;
import flash.media.SoundChannel;
import flash.events.Event;
playsong();
//var songs:Array=new Array("music1.mp3","music2.mp3","music3.mp3","music4.mp3");
var sound:Sound;
var soundChannel:SoundChannel;
var randnum:uint;
function playsong()
{
randnum=Math.floor(Math.random()*6);
sound=new Sound();
var songs:String= "music" + randnum + ".mp3";
sound.load(new URLRequest("musics/"+songs));
soundChannel=sound.play();
soundChannel.addEventListener(Event.SOUND_COMPLETE,playrandomsong);
}
function playrandomsong(e:Event)
{
playsong();
}