Código :
//Cargar XML
xmlformat = new XML();
xmlformat.ignoreWhite = true;
xmlformat.onLoad = function (){
//Variable para contener la CSS
var miCSS = new TextField.StyleSheet();
//Cargamos la CSS
miCSS.onLoad = function() {
//Cantidad de textos
numtext = xmlformat.firstChild.childNodes.length;
//Array con los textos
texto = new Array(numtext);
for (i=0; i<numtext; i++){
texto[i] = xmlformat.firstChild.childNodes[i];
}
//Atacheamos la CSS a la caja de texto y ponemos el primer texto
texto_actual = 3;
cajatexto.styleSheet = miCSS;
cajatexto.text = texto[texto_actual];
}
miCSS.load("estilo.css");
}
//Cargamos XML
xmlformat.load("texto.xml");
Si pongo en texto_actual= 5 me sale undefined
Les agradezco si me pueden ayudar lo que estoy seguro es que el problema no esta en el .xml
