2 Replies Latest reply on Feb 2, 2012 8:40 PM by adninjastrator

    Is it possible to resume play from any point on the progress bar in FLV player

    nikolaig Level 1

      Is there a way to allow a user to move playhead to any point on the progress bar (including much ahead of the loaded portion of the movie) and resume play from there?

      Presently a user can skip ahead only as far as the download happened.

       

      Just in case there is no conflict with my set up, here is the code I have:

       

       

      import fl.video.VideoProgressEvent;

       

       

      stop();

       

       

       

       

       

       

      close_btn.addEventListener(MouseEvent.CLICK, onClick_GoBackToHowTo2);

       

       

      function onClick_GoBackToHowTo2(event:MouseEvent) :void {

                gotoAndPlay("howto");

       

      }

       

       

       

       

       

       

      SWF_flv2.addEventListener(Event.REMOVED_FROM_STAGE,stopF2);

       

      function stopF2(e:Event):void{

      SWF_flv2.stop();

      SWF_flv2.closeVideoPlayer(1);  // actually, you can execute this after the stream completes, too so there's no need to check.

      }

       

       

       

       

                play_btn.addEventListener(MouseEvent.CLICK, onClick_Play);

       

       

                function onClick_Play(event:MouseEvent) :void {

                          SWF_flv2.play();

                          }    

       

       

       

       

       

       

      SWF_flv2.addEventListener(VideoProgressEvent.PROGRESS,progressF);

       

       

      function progressF(e:VideoProgressEvent):void{

      if(e.bytesLoaded == e.bytesTotal){

      trace(e.bytesLoaded,e.bytesTotal);

      SWF_flv2.play();

      }    

      }

       

       

       

      SWF_flv2.activeVideoPlayerIndex=1;  //this assigns the player index

      SWF_flv2.visibleVideoPlayerIndex=1; //this assigns the player index

       

       

       

       

       

      SWF_flv2.source = sourceVar;  //source must come after assigning the index/s

      SWF_flv2.play(); //starts buffering the sourceVar

      SWF_flv2.stop(); //starts buffering the sourceVar