1 Reply Latest reply on Aug 8, 2008 1:46 PM by BobMelnyk

    load a url automatically at end of movie

    jordan2318
      can you get flash to load a url at the end of a movie automatically without clicking a button etc?
        • 1. Re: load a url automatically at end of movie
          BobMelnyk Level 1
          Jordan,

          Yes, I believe you can. Just add an eventListener to detect the end of the movie and then take some action, like loading the url.

          For example, I had used this at one point:

          stop();
          myvideo.addEventListener("complete", the_end);
          function the_end(eventObject:Object):Void {
          gotoAndPlay(2);};

          myvideo was the name of an FLVPlayback instance which played a video clip. This code took me to frame 2 once the video ended, where I had this code:

          getURL(" http://www.mysite.com/mydir/thispage.html"); which loaded the new url

          Hope this helps.

          Bob