Comunidad de diseño web y desarrollo en internet online

Ayuda! Flash detecta XML pero no sabe como reproducirlo

Citar            
MensajeEscrito el 08 Ago 2009 04:05 am
Estoy haciendo un reproductor de video mediante xml, el xml es demasiado simple:

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? :?

Por Brundows

131 de clabLevel



 

firefox
Citar            
MensajeEscrito el 09 Ago 2009 12:45 am
Porfavor ayudenme, estoy muy preocupado,

Por Brundows

131 de clabLevel



 

firefox
Citar            
MensajeEscrito el 09 Ago 2009 02:24 am
Problema solucionado, uff!

Por Brundows

131 de clabLevel



 

firefox
Citar            
MensajeEscrito el 09 Ago 2009 05:01 am
cOMO MEN?!

Por sforero

478 de clabLevel

1 tutorial

 

social media expert world

chrome
Citar            
MensajeEscrito el 09 Ago 2009 03:55 pm
Corregi el xml xD

Por Brundows

131 de clabLevel



 

firefox
Citar            
MensajeEscrito el 09 Ago 2009 05:01 pm
lol

Por sforero

478 de clabLevel

1 tutorial

 

social media expert world

msie8

 

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