Necesito mucha ayuda!!!
Tengo que realizar un reproductor de mp3 y tengo el siguiente codigo
var s:Sound = new Sound();
s.onSoundComplete = playRola;
s.setVolume(75);
var sa:Array = new Array ("05AnotherWay_128K.mp3","06TellMeWhy(The Riddle)(Feat.St Etienne)_128K.mp3",
"08Words_128K_001.mp3","09TogetherWeWillConquer_128K.mp3","11ForAnAngel_128K.mp3");
var cancion = new Array("Another Way","Tell Me Why","Words",
"Together We Will Conquer","For An Angel");
//la rola que se esta tocando
var cps:Number = -1;
//posicion de la musica
var pos:Number;
function playRola():Void{
s.setVolume(75);
mute_mc.gotoAndPlay("on");
if(cps == sa.length -1){
cps = 0;
s.loadSound(sa[cps], true);
}else{
s.loadSound(sa[++cps], true);
}
trackInfo_txt.text = "Paul Van Dik - " + cancion[cps];
}
playRola();
//pausa de la musica
function pausa():Void{
pos = s.position;
s.stop();
}
//despausar la musica
function desPausar():Void{
s.start(pos/1000);
}
//Mute
mute_mc.onRollOver = function(){
if(this._currentframe == 1) this.gotoAndStop("onOver");
else this.gotoAndStop("offOver");
}
mute_mc.onRollOut = playPause_mc.onReleaseOutside = function(){
if(this._currentframe == 10) this.gotoAndStop("on");
else this.gotoAndStop("off");
}
mute_mc.onRelease = function(){
if(this._currentframe == 10){
this.gotoAndStop("offOver");
pausa();
}else{
this.gotoAndStop("onOver");
desPausar();
}
}
//los controles
//playpause
playPause_mc.onRollOver = function(){
if(this._currentframe == 1) this.gotoAndStop("pauseOver");
else this.gotoAndStop("playOver");
}
playPause_mc.onRollOut = playPause_mc.onReleaseOutside = function(){
if(this._currentframe == 10) this.gotoAndStop("pause");
else this.gotoAndStop("play");
}
playPause_mc.onRelease = function(){
if(this._currentframe == 10){
this.gotoAndStop("playOver");
pausa();
}else{
this.gotoAndStop("pauseOver");
desPausar();
}
}
sig_mc.onRollOver = function():Void{
this.gotoAndStop("sigOver");
}
sig_mc.onRollOut = sig_mc.onReleaseOutside = function():Void{
this.gotoAndStop("sig");
}
sig_mc.onRelease = function(){
playRola();
}
entonces, neceisto agregarle algo para que cuando le des click a cualquiera de las canciones la reprodusca pero cuando termine toque la cancion que sigue y no vuelva a iniciar con la primera, como le hago?
si alguien me puede ayudarlo agradecerè mucho
