Button
Because there are some bugs in the fast forward/rewind button of the Mediaplayback component, so the function is not able to be reflected, I here through these two buttons to achieve the first song of the next selection function. Implemented as follows:
Drag the Mediaplayback component to the scene with the instance named: Mymedia, and then write the code on the first true.
var list:array = ["Cookies-Party animals. mp3", "mina-answer the phone. mp3", "tank-thousand Years of Tears. mp3"];
MP3 List
var i:number = 0;
Pointer
Mymedia.contentpath = List[i];
var controllisten:object = {};
Controllisten.playheadchange = function (eventobj:object) {
var len = list.length;
Eventobj.detail? (I=++i%len): (I=int (--i+len)%len));
EventObj.target.contentPath = "";//set to NULL here is the key, remove the words on the problem ....
EventObj.target.contentPath = List[i];
};
Mymedia.addeventlistener ("Playheadchange", Controllisten);
Registering an Back/next event
Place under the same directory "cookies-party animals. mp3", "mina-answer the phone." MP3 "," tank-thousand Years of Tears. mp3 "MP3 file (name change, and the corresponding in the array)
Run the listening effect bar.