Sembra che venga ignorato il ClearInterval ???
codice:function the_action(brano){ song_sound.loadSound(brano, true); clearInterval(my_interval); my_interval = setInterval(updateProgressBar, 100, song_sound); loading.play() } function updateProgressBar(the_sound:Sound):Void { var nowSeconds:Number = the_sound.position/1000; var nowM = Math.floor(nowSeconds/60); if (nowM<10) {nowM = "0"+nowM;} var nowS = Math.floor(nowSeconds)%60; if (nowS<10) {nowS = "0"+nowS;} Min.text = nowM Sec.text = nowS posizione = the_sound.position durata = the_sound.duration pos = Math.round(posizione / durata * 100); pb.bar_mc._xscale = pos; pb.vBar_mc._x = pb.bar_mc._width; } Pffw.onPress=function(){ if(current<brani_A.length-1){ current++ reset(current) // serve per evidenza brani clearInterval(my_interval);trace("Stop interval"); song_sound.stop() totTime.text="0" Min.text = "00" Sec.text = "00" restart = 0 posizione=0 durata=0 pos=0 pb.bar_mc._xscale = pos; pb.vBar_mc._x = pb.bar_mc._width; // fin qui tutto ok songTitle.text = brani_A[current] trackN.text = Number(current)+"/ "+(brani_A.length-1) the_action(file_A[current]); da qui il brano successivo riparte da zero ma il conteggio dei secondi invece che da zero parte dal punto dove č stato interrotto il brano precedente } }
Non ne esco![]()

Rispondi quotando
