Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/11/2007, 01:46
Avatar de Mahalo
Mahalo
 
Fecha de Ingreso: julio-2004
Ubicación: Mallorca (Illes Balears)
Mensajes: 1.121
Antigüedad: 19 años, 8 meses
Puntos: 12
Re: xml y variables

Código:
var ruta:String;
tema = new Sound();
var tema_xml:XML = new XML();
tema_xml.ignoreWhite = true;
tema_xml.onLoad = funcion(exito)
{
    ruta = this.firstChild.childNodes[0].childNodes[0].firstChild.toString();
}

tema_xml.load("lista.xml");
tema.loadSound(ruta,true);
Declarabas la variable ruta dentro de la función por lo que restringías su uso a ese ámbito.

Saludos!
__________________
Los ignorantes se empeñan en enseñar. Los sabios en aprender.
SourceForge