0 Replies Latest reply on Sep 12, 2006 2:18 PM by citizen_paranoid

    help with flash video buffering

    citizen_paranoid
      I need help with flash video buffering. I've created a buffering graphic to show up when the clip is loading. The problem that I'm having is that when the video finishs playing, the buffer is empty and the graphic pops back on. The following is the code that I'm using to call and buffer the video. Any help would be great!

      stop();
      var nc:NetConnection = new NetConnection();
      nc.connect(null);
      var ns:NetStream = new NetStream(nc);
      ns.setBufferTime(10);

      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.Stop") {
      bufferClip._visible = false;
      }

      }
      theVideo.attachVideo (ns);
      ns.play("my_clip.flv");

      rewindButton.onRelease= function(){
      ns.seek(0);
      }
      playButton.onRelease= function(){
      ns.pause();
      }