下記のfunctionを読込んで
playMP3(path:String);
//path:String -> 外部mp3ファイルのパス
とすればロード完了と同時に自動的に再生される。
(ver7以上)
var bgmMP3:Sound;
function playMP3(path:String):Void {
bgmMP3 = new Sound();
bgmMP3.onLoad = function() {
bgmMP3.start(0, 999);
delete this.onLoad;
};
bgmMP3.loadSound(path, false);
if (bgmMP3.getBytesLoaded()>bgmMP3.getBytesTotal-10) {
bgmMP3.onLoad();
}
}