gentilissimi amci torno a tediarvi per chiedere aiuto in merito al problema che vado ad esporre
tramite un pulsante devo scorrere una serie di file mp3, di ognuno devo leggere i dati ID3.
i file si caricano regolarmente ma non riesco a leggere i dati ID3
[codice]
var track_number:Number=1;
var music:Sound=new Sound(new URLRequest("brano"+track_number+".mp3"))
var channel:SoundChannel;
music.addEventListener(Event.COMPLETE, Id3Info);
btn_ffwd.addEventListener(MouseEvent.CLICK, playsong);
function playsong(event:MouseEvent):void {
channel.stop();
track_number=track_number+1;
if (track_number>trackMAX){ //numero max di canzoni
track_number=1;
}
var music:Sound=new Sound(new URLRequest("brano"+track_number+".mp3"));
music.addEventListener(Event.COMPLETE, Id3Info);
channel=music.play()
}
btn_ffwd.addEventListener(MouseEvent.CLICK, playnext);
function Id3Info(event:Event){
var id3:ID3Info=event.target.id3;
trace("artista=" +music.id3.artist);
trace(music.id3.songName);
}
spero di aver postato tutto secondo i giusti presupposti
da come la vedo io pare che la pressione del tasto faccia cambiare il brano musicale ma non attivi la funzione Id3Info
ringrazio tutti per l'aiuto
ciao