1 Reply Latest reply on Apr 29, 2007 8:45 PM by Scott S_DW

    Automatically closing a Flash Video

      I am currently working on a project for my Flash class and I have a media section where movies are selected from a menu and the video opens inside the same movie (beside the menu). I wanted to know if there was a way (through ActionScript) to have the movie automatically close when it is over, so the user can select another movie from the menu.
        • 1. Re: Automatically closing a Flash Video
          Scott S_DW
          create a listener that listens for the movie (videoPlayer in this script) to finish, and then unload the movie when it is called.


          var listener:Object = new Object();
          listener.complete = function(evt:Object):Void {
          trace("Video complete");
          videoPlayer.addEventListener("complete", listener);

          hope this helps