les comento soy nuevo en esto del xml y actionscript, vengo del mundo del diseño

<mensaje>
<asunto>Aviso de suspension</asunto>
</mensaje>
cuerpo_txt.text = obj_xml.firstChild.childNodes[asunto].firstChild.nodeValue;
Algo como eso?????.
| ||||
Re: xml y flash mmmm. . . yo no soy nuy bueno en el tema pero se me ocurre declatar la variable asunto. asunto = obj_xml.firstChild.childNodes[1].firstChild.nodeValue; y despues si cuerpo_txt.text = obj_xml.firstChild.childNodes[asunto].firstChild.nodeValue; no se.
__________________ pituu2 |
| |||
Re: xml y flash puedes tambien leer los atributos del archivo xml por ejejmplo. crea un archivo xml y escribe esto:(nombralo lista.xml)
Código:
ahora en flash en un frame vacio:<lista> <alumno nombre='Diego'>2007</alumno> </lista>
Código:
var obj_xml:XML = new XML(); // obj_xml.ignoreWhite = true; // obj_xml.onLoad = function(ok) { // if (ok) { // trace(obj_xml.firstChild.childNodes[0].attributes.nombre); // } else { // trace("Error"); } }; // function cargar() { // obj_xml.load("lista.xml"); // } cargar(); |