Tema: xml y flash
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 23/05/2007, 16:33
Rizzo
 
Fecha de Ingreso: septiembre-2006
Mensajes: 1.193
Antigüedad: 17 años, 6 meses
Puntos: 30
Re: xml y flash

puedes tambien leer los atributos del archivo xml por ejejmplo.


crea un archivo xml y escribe esto:(nombralo lista.xml)

Código:
<lista>

   
    <alumno nombre='Diego'>2007</alumno>
  
</lista>
ahora en flash en un frame vacio:

Código:
var obj_xml:XML = new XML();
//
obj_xml.ignoreWhite = true;
//
obj_xml.onLoad = function(ok) {
	//
	if (ok) {
		//
		trace(obj_xml.firstChild.childNodes[0].attributes.nombre);
		//
	} else {
		//
		trace("Error");
	}
};
//
function cargar() {
	//
	obj_xml.load("lista.xml");
	//
}
cargar();