Código XML :
<video> <video ruta="video1.flv"></video> <video nombre="Loba - Shakira (Music Video)"></video> <video duracion="300"></video> </video>
El video1.flv esta en la misma carpeta que el xml y el flash. Tengo el siguiente codigo en flash:
Código ActionScript :
statefs.text = "normal" var videovis:Video; //my_video es un objeto Video del escenario var my_nc:NetConnection = new NetConnection(); my_nc.connect(null); var my_ns:NetStream = new NetStream(my_nc); var obj_xml:XML = new XML(); xml.ignoreWhite = true; obj_xml.onLoad = function(exito) { if (exito) { videovis.attachVideo(my_ns); my_ns.play(obj_xml.firstChild.childNodes[0].attribute.ruta); nombre.text = obj_xml.firstChild.childNodes[1].attribute.nombre; duracion.text = obj_xml.firstChild.childNodes[2].attribute.duracion; trace(objXML.firstChild.childNodes[0].attribute.ruta); trace(objXML.firstChild.childNodes[1].attribute.nombre); trace(objXML.firstChild.childNodes[2].attribute.duracion); } else { nombre.text = "Error"; duracion.text = "Error"; } }; function cargarXML() { obj_xml.load("video1.xml"); trace(obj_xml.load("video1.xml")) }
El ultimo trace dice "true" y los anteriores marcan undefined, que puedo hacer?
