Ver Mensaje Individual
  #4 (permalink)  
Antiguo 18/03/2009, 17:51
Avatar de Diegoazul
Diegoazul
 
Fecha de Ingreso: mayo-2007
Ubicación: { Dash Berlin }
Mensajes: 1.879
Antigüedad: 16 años, 10 meses
Puntos: 67
Respuesta: Cargar datos xml en flash as2

A ver asi:

Código:
var obj_xml:XML = new XML();
obj_xml.ignoreWhite = true;
obj_xml.onLoad = function(exito) {
	if (exito) {
		articulo.text = obj_xml.firstChild.childNodes[0].firstChild.nodeValue;
		descripcion.text = obj_xml.firstChild.childNodes[1].firstChild.nodeValue;
		precio.text = obj_xml.firstChild.childNodes[2].firstChild.nodeValue;

		_root.pantalla_mc.loadMovie(String(obj_xml.firstChild.childNodes[3].firstChild.nodeValue));
	} else {
		cuerpo_txt.text = "Error";
	}
};

obj_xml.load("OFERTAS-WEB.xml");

Escribe tu archivo XML, ó si lo tienes en la web coloca la liga del xml.