Skip navigation
kimbatruli
Currently Being Moderated

AS3 FLV progressive download problem with 11.2.202.228. Why FLV not run until is fully downloaded?

Apr 2, 2012 5:29 AM

I 've developed a code in AS3 that 's worked up to yesterday when I updated my flash player.

 

Here is the code:

 

var _textoPrecarga:TextField = new TextField();
_textoPrecarga.textColor=0xEC6E00;
addChild(_textoPrecarga);

var videoEstado:String = "0";
var videoBufferEstado:String = "0";

this.mon_flv.addEventListener(ProgressEvent.PROGRESS,cargandoVideo);
this.mon_flv.addEventListener(VideoEvent.STATE_CHANGE,cambioEstadoVide o);
this.mon_flv.addEventListener(VideoEvent.PLAYHEAD_UPDATE,avanceVideo);

function avanceVideo (event:VideoEvent): void{
  videocontrols.timer.text = formatTime(this.mon_flv.playheadTime) + " / " + formatTime(this.mon_flv.totalTime);
//  playheadPercentage
}

function cargandoVideo (event:ProgressEvent): void{
var cargado:Number = Math.floor( event.bytesLoaded*100/event.bytesTotal);
if (cargado >= 5){
  if (videoEstado!="Cargado") {
   videoEstado="Cargado";
   videoCargado= true;
   Launch();  
  }
  //_textoPrecarga.visible=false;
} else {
  if (videoEstado!="Espera") {
   videoEstado="Espera";
   this.mon_flv.stop();
  } 
}
_textoPrecarga.text = "Cargando..." + cargado.toString() + " %";
_textoPrecarga.x = (stage.width/2 ) - (_textoPrecarga.width);
_textoPrecarga.y = (stage.height/2) + 100;
_textoPrecarga.autoSize = TextFieldAutoSize.LEFT;
_textoPrecarga.setTextFormat(tf);
}
function cambioEstadoVideo (event:VideoEvent): void{
if (videoEstado=="Cargado") { 
  if (this.mon_flv.buffering){
   _textoPrecarga.visible = true;
   _textoPrecarga.text = "Buffering...";
   if (videoBufferEstado != "Buffering"){
    videoBufferEstado = "Buffering";
   }        
  }else{
   _textoPrecarga.text = "";
   _textoPrecarga.visible = false;  
   if (videoBufferEstado == "Buffering"){   
    videoBufferEstado = "0";
   }  
  }
}
}
//Fin control de Video
this.mon_flv.load(videoActual);


function Launch():void
{
this.mon_flv.play();
}

 

Can anyone help me.

 
Replies
  • Chris Campbell
    9,456 posts
    May 4, 2010
    Currently Being Moderated
    Apr 2, 2012 5:41 PM   in reply to kimbatruli

    Do you happen to have this hosted anywhere that I can test against?  Do you get an error when this code is executed?  Finally, could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.

     

    Thanks,

    Chris

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points