Código :
function LeeXML(cargador, textos) {
text_txt = cargador;
datos = textos;
trace("te instancie");
}
//
function cargarDatos() {
var owner = this;
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.load(datos);
my_xml.onLoad = function() {
//trace(this);
var largo = this.firstChild.childNodes.length;
trace(largo);
for (var i = 0; i<largo; i++) {
var obj = new Object();
obj.address = this.firstChild.attributes.ADDRESS;
obj.port = this.firstChild.attributes.PORT;
obj.name = this.firstChild.childNodes[i].attributes.NAME;
obj.argValue = this.firstChild.childNodes[i].childNodes[1].attributes.VALUE;
obj.argValue2 = this.firstChild.childNodes[i].childNodes[0].attributes.VALUE;
obj.argType = this.firstChild.childNodes[i].childNodes[0].attributes.TYPE;
obj.argType2 = this.firstChild.childNodes[i].childNodes[1].attributes.TYPE;
//
trace(obj.name);
/*
trace("argument Typo2: "+obj.argType2);
trace("argument Typo: "+obj.argType);
trace("argument value: "+obj.argValue);
trace("nombre del puerto: "+obj.port);
trace("numero de ip: "+obj.address);
*/
//
text_txt.htmlText = true;
owner.text_txt.text = obj.name;
my_mc.loadMovie(obj.argType+".jpg");
}
};
}
System.useCodepage = true;
limon = text_txt;
xml = new LeeXML(limon, "test.xml");
cargarDatos();mi pregunta es como puedo mostrar todos los registros de obj.name en el campo de text_txt, pues en el trace (obj.name) me muestra los registros de cada loop que hace el for en la ventana de output;
en el campo de texto solo me muestra el ultimo registro que es el quinto en mi xml.
si me pueden aconsejar al respecto se los agradeceria mucho,
[moderador]agregada etiquetas code para mejor lectura[/moderador]
