3 Replies Latest reply on May 24, 2006 2:14 PM by MaxVT103

    FLV event help

      I have a flash presentation with a navigation and in each section it plays a short animation then loads a video. The idea was after the video click the next navigation item but now they want it to auto continue to the next swf (using loadmovieNum to layer 25) here is what i tried :

      var nc:NetConnection = new NetConnection();

      var ns:NetStream = new NetStream(nc);

      ns.onStatus = function(info) {
      if(info.code == "NetStream.Play.Stop") {
      loadMovieNum("customwellpages.swf", 25);

      This doesnt work, I was attempting to find when the movie reached the end and load the next swf file. i failed!

      Could anyone help me? Im using Flash 8 with the pre-built flv player. Maybe I have to make a flv player to have more control? thanks!

        • 1. Re: FLV event help
          Rothrock Level 5
          Well I must commend you on (most likely) looking through the help files. Is that where you got the NetStream.onStatus event?

          But that is for use with the NetStream class and you are using the pre-built player. Underneath it all, the pre-built player uses the same stuff, but it isn't directly exposed to the user.

          So check the help files for the Media Playback component. I don't have Flash 8 but you should be able to find an entry in the Component Dictionary for Media.complete. The code structure will be similar to what you have but a little bit different.
          • 2. Re: FLV event help
            maddcovv1 Level 1
            Buddy of mine sent me this, I think it will work, I'll let you know.

            var listenerObject bject = new Object();
            listenerObject.complete = function(eventObject bject):Void {
            getURL(" http://www.jsensei.com");
            my_FLVplybk.addEventListener("complete", listenerObject);
            • 3. Re: FLV event help
              Your origional code should work, I have done this before. However you must remember you have to call ns.play('url'); after you declare the onSync function or else it doesn't work properly alot of times. The NetStream.Play.Stop does work, it did for me, so check around on where you are calling things because that is most likely your problem.