2 Replies Latest reply: Jan 29, 2013 2:03 AM by rahimhaji RSS

    dynamically change the source flv video in flv play back...

    rahimhaji Community Member

      Dear Friends,

       

      Iam trying to load flv files in flash using flvplayerback components. iam using the following code. Initially iam loadign video1.flv. Then i want to load video2.flv when i press next button. It is loading video2 only when i press next button after finishing the full loaded video1. i want change the source anytime please tell the right way.

       

      import fl.video.VideoProgressEvent;
      import fl.video.VideoEvent;
      plr.source = "video1.flv";


      plr.addEventListener(VideoProgressEvent.PROGRESS,showmsg);
      function showmsg(event:ProgressEvent) {
      if (plr.bytesTotal == plr.bytesLoaded) {
        trace("Loaded");
      loaderpic.visible = false;
      }
      }

      plr.addEventListener(VideoEvent.COMPLETE, comple);
      function comple(event:VideoEvent) {
      trace("Movie Finished");
      }

       

      nxt.addEventListener(MouseEvent.CLICK, nxtclick);
      function nxtclick(event:MouseEvent) {
      plr.stop();
      plr.source = "video2.flv";
      plr.play();
      }

       

      Thanks in Advance,

      Syed Abdul Rahim