Comunidad de diseño web y desarrollo en internet online

ayuda con flv player

Citar            
MensajeEscrito el 11 Mar 2007 02:08 pm
hola atodos maestros
estoy haciendo una pagina con videos, y me arme mi flv player ya tengo todos los controles y funciona todo bien pero, lo que me falta es un reloj abajo( como el del youtube) que diga cuantos minutos y segundos tiene la peli, y cuantos minutos y segundos han transcurrido de la peli.
me ayudaria nucho que alguien me escribiera el codigo para hacerlo.
aqui va el script que tengo hasta ahora (el cual esta perfecto pero lo pongo para que tengan una idea de lo que estoy haciendo).

Código :

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(30);
ns.onStatus = function(info) {
   if(info.code == "NetStream.Buffer.Full") {
      bufferClip._visible = false;
   }
   if(info.code == "NetStream.Buffer.Empty") {
      bufferClip._visible = true;
   }
   if(info.code == "NetStream.Play.Stop") {
      ns.seek(0);
   }
}
suono = newSound("Stream.flv")
suono.setVolume(1)

thevideo.attachVideo(ns);
ns.play("YoNad.flv");

rewind.onRelease = function() {
    ns.seek(0);
}
playb.onRelease = function() {
    ns.pause();
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
var duration:Number;

ns["onMetaData"] = function(obj){
   duration = obj.duration;
}
function videoStatus(){
   amountLoaded = ns.bytesLoaded / ns.bytesTotal;
   loader.loadbar._width = amountLoaded * 256 ;
   loader.scrub._x = ns.time / duration * 256 ;
}
var scrubInterval;
loader.scrub.onPress = function() {
   clearInterval(videoInterval)
   scrubInterval = setInterval(scrubit,10);
   this.startDrag(false,0,this._y,256,this._y);
}
loader.scrub.onRelease = loader.scrub.onReleaseOutside = function() {
   clearInterval(scrubInterval);
   videoInterval = setInterval(videoStatus,100);
   this.stopDrag();
}
function scrubit () {
   ns.seek(Math.floor((loader.scrub._x/256) *duration));
}

gracias a todos de anticipado.

Por novaton

10 de clabLevel



 

msie
Citar            
MensajeEscrito el 12 Mar 2007 03:38 pm
bueno .......
si alguien puede pasar un link con un tutorial por lo menos
gracias

Por novaton

10 de clabLevel



 

msie

 

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