• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

New Here ,
Apr 02, 2012 Apr 02, 2012

Copy link to clipboard

Copied

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,cambioEstadoVideo);
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.

Views

708

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 02, 2012 Apr 02, 2012

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines