Hola a todos!
Soy novato con el lenguaje XML y bueno, me estoy liando bastante.
Mi problema es el siguiente:
Tengo este código que me funciona muy bien:
Código:
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success) {
if (success) {
var gallery = this.firstChild;
gallery_txt.text = gallery.attributes.info;
for (var i = 0; i<gallery.childNodes.length; i++) {
tArray.push(gallery.childNodes[i].attributes.title);
pArray.push(gallery.childNodes[i].attributes.source);
}
containerMC.loadPic(0);
} else {
title_txt.text = "Error!";
}
};
gallery_xml.load("gallery.xml");
Como podreis ver , tengo ya una caja de texto. Quiero añadir otra. Declarar una variable tipo
Código:
var iArray = new Array();
//crear otra caja de texto
parrafo.text = iArray[pic];
//y meterme en el problema
iArray.push(gallery.childNodes[i].attributes.title1);
El title1 me suena a chino y además el attributo "title" ya està utilizado.
Que puedo hacer para añadir texto sin que este entre en conflicto con el primero.
Gracias a todos