Comunidad de diseño web y desarrollo en internet online

flash - xml y html no carga!

Citar            
MensajeEscrito el 25 Feb 2007 12:46 am
Hola a todos
buueno al grano.

tengo un flash con dos textos dinamicos:

titulo_txt
cuerpo_txt

Y le asigne un xml para que se cargara en ellos siertos datos

Este es mi AS:

Código :

var obj_xml:XML = new XML();
obj_xml.ignoreWhite = true;
obj_xml.onLoad = function(exito) {
   if (exito) {
      titulo_txt.text = obj_xml.firstChild.childNodes[0].firstChild.nodeValue;
      cuerpo_txt.text = obj_xml.firstChild.childNodes[1].firstChild.nodeValue;
} else {

      cuerpo_txt.text = "No cargo";
   }
};

function cargarXML() {
   obj_xml.load("doc1.xml");
}
cargarXML();


Todo bien asta ahi pero quiero que se carge el texto en html
etiquetas basicas [las que puede cargar flash]
pero no se cargan
he intentado activando la caracteristica de html de las dos formas posibles
con el boton de propiedades y por AS.
pero nada

tambien intente poniendo las etiquetas < y > y tambien reemplazandolas por &lt; y &gt;
paro tampoco

mi xml porsi tiene algun error

Código :

<publicacion>
    <titulo>Titulo de la doc</titulo>
    <cuerpo><![CDATA[ Documento ,o cuerpo del mismo <b>SI cargo el html</b> en html ]]></cuerpo>
</publicacion>


muchas gracias tan solo por leer

Por egoman

61 de clabLevel



Genero:Masculino  

Concepción - Chile!

firefox
Citar            
MensajeEscrito el 27 Feb 2007 06:42 pm
Pruébalo así:

Código :

System.useCodepage = true;

var obj_xml:XML = new XML();
obj_xml.ignoreWhite = true;
obj_xml.onLoad = function (exito){
   if (exito){
      cargatextosXML();
   }
   else{
      cuerpo_txt("No se puede leer");
   }
}
// Leer el XML
obj_xml.load("doc1.xml");
function cargatextosXML(){
   titulo_txt= obj_xml.firstChild.childNodes[0].firstChild.nodeValue;
        cuerpo_txt= obj_xml.firstChild.childNodes[1].firstChild.nodeValue;
}


Copia y pega, no tiene xq dar fallos... Eso si, tienes que tener la casilla de html activada. Con eso valdría. Ya me contarás

Por pitger

Claber

201 de clabLevel



Genero:Masculino  

Cáceres

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.