Comunidad de diseño web y desarrollo en internet online

Duda sobre acceso a etiquetas ID3

Citar            
MensajeEscrito el 17 Mar 2005 04:38 pm
Tengo un tutorial (en inglés) llamado "Accessing ID3 Tags (external .mp3)" y no tengo la menor idea de que sea el ID3. Por el código que trae, trabaja con loadSound(), pero como no se que hace, lo pongo en e primer fotograma de una pelicula en blanco y no hace nada.

El código en cuestión es este:

//create an onEnterFrame event with
//listener capabilities
ASBroadcaster.initialize(Movieclip);
_root.createEmptyMovieClip("__enterFrame",-9799);
__enterFrame.onEnterFrame=function(){
Movieclip.broadcastMessage("onEnterFrame");
}
mysound=new Sound(this);
mysound.loadSound("an_mp3.mp3");
mysound.onLoad=function(){
Movieclip.addListener(this);
//redefine the onLoad event handler
this.onLoad=function(){
//iterate over all the id3 tags
//and trace their names and values
for(var i in this.id3){
trace(i+":"+this.id3[i]);
}
}
//when the onEnterFrame broadcast
//is recieved, call the newly defined
//onLoad evet handler and then
//stop listening to the broadcast
this.onEnterFrame=function(){
this.onLoad();
Movieclip.removeListener(this);
delete this.onEnterFrame;
}
}


:? :crap: :oops: Un saludo ^^

Por elav

Claber

1461 de clabLevel

9 tutoriales

Genero:Masculino  

Administrador de Sistemas

msie
Citar            
MensajeEscrito el 17 Mar 2005 04:52 pm
Vamos por partes:

1.- crear el sonido mp3:

miMp3:Sound = new Sound();

2.- cargalo:

miMp3.loadSound("micancion.mp3", true) // el true es para que se reproduzca automáticamente cuando exista suficiente sonido descargado.

3.- Acceso a las etiquetas:

miMp3.onID3 = function(){
nombreCancion_txt.text = this.id3.TIT2;
artista_txt.text = this.ide3.TPE1;
//etc.
}

Así que busca en la ayuda un listado de cada etiqueta ide3 y asigna los valores a tus campos de texto.

a probar! :wink:

Por Sisco

BOFH

3700 de clabLevel

12 tutoriales
4 articulos

Genero:Masculino   Bastard Operators From Hell

Catalunya

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.