1 Reply Latest reply on Apr 2, 2007 12:18 PM by arturo.delamora

    How can I know when a Loaded Video file flv has finished?

    arturo.delamora
      I'm using Flash8 to create some video intro and then go to next scene... is there a way to know when the video has finished and then go to the next scene??
        • 1. Re: How can I know when a Loaded Video file flv has finished?
          arturo.delamora Level 1
          Ok... i did'it... on the hard way...

          import mx.video.*;
          my_FLVPlybk.contentPath = " http://www.flamingoroad.org/video/Untitled2.flv";
          var listenerObject:Object = new Object();
          listenerObject.ready = function(eventObject:Object):Void {
          my_FLVPlybk.activeVideoPlayerIndex = 1;
          my_FLVPlybk.contentPath = "null";
          my_FLVPlybk.activeVideoPlayerIndex = 0;
          };
          my_FLVPlybk.addEventListener("ready", listenerObject);
          listenerObject.complete = function(eventObject:Object):Void {
          if (eventObject.vp == 1) {
          my_FLVPlybk.activeVideoPlayerIndex = 0;
          my_FLVPlybk.visibleVideoPlayerIndex = 0;
          my_FLVPlybk.closeVideoPlayer(1);
          } else {
          my_FLVPlybk.activeVideoPlayerIndex = 1;
          my_FLVPlybk.visibleVideoPlayerIndex = 1;
          gotoAndPlay("Video");
          }
          };
          my_FLVPlybk.addEventListener("complete", listenerObject);