0 Replies Latest reply on Jun 25, 2008 8:32 AM by socodevil

    NetStream.close method

    socodevil
      I need help desperately. I have been trying and searching for a reason why the NetStream.close method does not work. sure it will stop the flv playing but it does not stop the download. it does not "makes the stream available for another use". i have several Flvs being used in a course. each on a different frame of the maintime_line. I need to have one flv completely stop downloading before the next one start otherwise my course freezes until all the downloads are done. I have used this code:

      var myVid:Video;
      var playButton:Button;
      var stopButton:Button;

      var nc:NetConnection = new NetConnection();
      nc.connect(null);
      var ns:NetStream = new NetStream(nc);
      myVid.attachVideo(ns);
      ns.play("reach_01.flv");
      ns.pause(false);



      playButton.onPress = function() {
      ns.pause(false);
      if (video_mc._currentframe>=4) {
      video_mc.gotoAndStop(4);
      } else {
      video_mc.play();
      }
      };

      stopButton.onPress = function() {
      ns.close();
      };

      and several other variations that i have found on the net.

      please someone help with this. it is driving me crazy!