Comunidad de diseño web y desarrollo en internet online

problemas con FLVPlayBack, List y XML

Citar            
MensajeEscrito el 11 Abr 2006 12:08 pm
Hola:
Llevo un buen rato buscando una solución para crear un reproductor FLV con estos componentes. Ya he conseguido que se llene el componente List con el XML, pero no puedo hacer que se reproduzca.
Aquí esta el AS

Código :

import mx.controls.List;
import mx.video.*;
//Cargamos el XML
var listaXML:XML = new XML();
listaXML.ignoreWhite = true;
listaXML.onLoad = function(exito) {
   if (exito) {
      video = this.firstChild;
      num_total = this.firstChild.childNodes.length;
      crearLista();
   } else
      trace("No se pudo cargar la lista de videos");
};
listaXML.load("php/lista.xml");

lista.addEventListener("change", alCambiar);

function crearLista() {
   //Posicionamos la lista de los videos
   lista.setSize(180, 80);
   //Llenamos la lista con las canciones
   misDatos = new Array();
   lista.dataProvider = misDatos;
   for (var i = 0; i<num_total; i++) {
      misDatos.addItem({label:video.childNodes[i].firstChild, data:video.childNodes[i].firstChild});
   }
}
//Cuando cambiamos el video seleccionado en la lista... cargamos el nuevo video, y ejecutamos
function alCambiar(evento) {
   if (evento.type == "change") {
      flvPlayBack.autoRewind = false;
      flvPlayBack.bufferTime = 5;
      flvPlayBack.contentPath("flv/"+lista.selectedItem.data);
      flvPlayBack.play();
   }
}

Por frenadoll

922 de clabLevel

6 tutoriales

Genero:Masculino  

Barcelona

firefox
Citar            
MensajeEscrito el 25 Ago 2006 07:06 pm
Se ve bien el codigo!!,tienes un link para hacer la prueba_

Por Rafeo

650 de clabLevel

3 tutoriales
1 articulo

Genero:Masculino  

firefox

 

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