tengo este codigo, para cambiar una cancion q esta en un xml, generando un menu xml dinamico, el nombre del boton me trae la variable, pero la variable de la cancion no cambia... por que razon??
Código ActionScript :
var opcionesXML:XML = new XML(); opcionesXML.ignoreWhite = true; opcionesXML.onLoad = function (sucess:Boolean) { if (sucess) { var opciones:Array = this.firstChild.childNodes; for(i = 0; i < opciones.length; i++) { p=i; _root.attachMovie("mcBoton", "boton"+i, _root.getNextHighestDepth()); _root["boton"+i]._x = 50; _root["boton"+i]._y = 30 + (i * 50); _root["boton"+i].texto = p; _root["boton"+i].onRelease = function () { current=i; if(track == "prev") current-1; else if(track == "start") current = 0; else current+1; if(current == song_list.length) current = 0; else if(current < 0) current = song_list.length - 1; s = new Sound(); s.loadSound(song_folder + song_list[current], true); s.setVolume(new_volume); track_title.text = track_list[current]; artist_name.text = artist_list[current]; album_title.text = album_list[current]; track_info.text = "Canción " + (current+1) + " de " + song_list.length; fm_play.gotoAndStop(1); } } } else { trace("Error al Leer archivo XML"); } } opcionesXML.load( "flashmo_songs.xml");