1 Reply Latest reply on Nov 23, 2006 7:24 AM by Peter Lorent

    really need help with  netstream

    Level 7
      Hi...need some advice on things I can't seem to grasp

      Can it seem to get a working AS on a button or event to unload a imported
      FLV

      tried
      ns.Close();

      and this jsut stops the playhead. Doens't unload the movie
      also tried.
      ns.play("");

      to no avail.

      Also is there a way to know when the flv is finshed playing so I can key an
      event without cue points in the video? tried this as well...

      if(info.code == "NetStream.Play.Stop") {
      ns.play("");


      thanks for any help.


        • 1. Re: really need help with  netstream
          Peter Lorent Level 2
          Assuming:
          -you are using the Video Class
          -the instance of the Video Object on the stage is called my_video:
          var connection_nc:NetConnection = new NetConnection();
          connection_nc.connect(null);
          var stream_ns:NetStream = new NetStream(connection_nc);
          my_video.attachVideo(stream_ns);
          stream_ns.play("yourflv.flv");
          stream_ns.onStatus = function(infoObject:Object) {
          if(infoObject.code=="NetStream.Buffer.Empty"){//reached the end, stopped and cleared the stream
          trace("The video stopped.");
          my_video._visible=false;
          }
          };
          You cannot unload the video. It is in the cache. With Communication Server, you can.