This script shows how to play audio (mp3) files in a row.
// creating a new array var myArray:Array = new Array (); // filling the array with audio titles for (var i = 1; i<=3; i++) { myArray.push ("mp3/track"+i+".mp3"); } var j:Number; j = 0; // creating a sound object var piano:Sound = new Sound (); // playing the first audio piano.onLoad = function () { piano.start (); }; piano.loadSound (myArray[j]); // then playing all others piano.onSoundComplete = function () { j++; if (j>myArray.length) { trace ("stopped"); this.stop (); } else { this.onLoad = function () { this.start (); }; this.loadSound (myArray[j]); } };