Quiero desarrollar esta parte de carga que siempre hago pero de una manera más "pensada", pero solo me encuentro con problemas. Este es el original, aunque no funciona ya probe a sustituir el xml por texto en los campos y no obtengo nada como htmlText
XML
Código :
<?xml version="1.0" encoding="utf-8"?> <root> <campodetexto><![CDATA[<p>designestylish<br>sensual<br>organic<br>Intelligent<br>contemporary.....<br><br>Scandinavian</p>]]></campodetexto> <campodetexto><![CDATA[<p>Brge<br>Mogensen<br>Finn Juhl<br>Hans Wegner<br>Arne Jacobsen<br>Poul Kjrholm<br>Poul Henningsen<br>Verner Panton</p>]]></campodetexto> </root>
Actionscript
Código :
stop();
my_XML = new XML();
my_XML.ignoreWhite = true;
my_XML.onLoad = function(success) {
if (success) {
mostrarXML();
}
else {
trace("Error loading XML");
}
}
my_XML.load("xml/textos.xml");
function mostrarXML():Void {
// creo el formato
var formato:TextFormat = new TextFormat("Frutiger75-Black", 11, 0xADA194, true);
var formato2:TextFormat = new TextFormat("Frutiger75-Black", 11, 0xD7BCBB, true);
// creo los campos de texto
createTextField("texto", getNextHighestDepth, 0, 0, "", "");
texto.html = true;
texto.multiline = true;
texto.autoSize = true;
texto.embedFonts = true;
texto.setTextFormat(formato);
texto.htmlText = my_XML.firstChild.childNodes[0].firstChild.nodeValue;
createTextField("texto2", getNextHighestDepth, 0, 245, "", "");
texto2.html = true;
texto2.multiline = true;
texto2.autoSize = true;
texto2.embedFonts = true;
texto2.setTextFormat(formato2);
texto2.htmlText = my_XML.firstChild.childNodes[1].firstChild.nodeValue;
} 