1 Reply Latest reply on May 14, 2006 7:09 AM by blemmo

    Loadmovie action script help

    jeslone
      Hey there, just putting together a website using flash.

      Everythings great. My website is one flash file, i've also
      done a new document which is a page for my movie to
      play in. So i have jesl homepage.swf and now charles.swf
      On my homepage scene 3 theres a button you press
      using loadmovie script and it goes straight to the charles.swf and
      plays my movie which is awesome,
      and from charles.swf theres a go back button that goes straight back
      to my jesl homepage.swf which is great but.....

      im using this script for the back button from charles back to homepage
      which works great but....(getting there)

      on (release) {
      loadMovieNum("jesl homepage.swf", 0);
      }

      Now all i would like to do is from charles.swf
      go back to my jesl homepage.swf like it does,
      but go to scene 3. Maybe its simple and im stupid
      but i cant figure it out. Cause scene 3 is where the
      info and buttons are about my movie and it would
      make sense to go back where you started from...

      So yeah it goes back fine to my scene 1 homepage
      but i want scene 3 guys...

      Any help would be greatful

      As im pulling my hair out..
        • 1. Re: Loadmovie action script help
          blemmo Level 1
          You need some code in the homepage.swf that checks if some variable is set, and jumps to scene 3 if it's set. Then you could set this variable in the button of charles.swf, so that homepage.swf knows it should go to scene 3.
          To make this work, you have to load homepage.swf into another level than 0, otherwise you can't use any variables, because a movie loaded into level 0 replaces everything in the player, including all variables.
          In charles.swf:
          on (release) {
          _level0.jumpToScene = true;
          loadMovieNum("jesl homepage.swf", 1);
          }
          and in homepage.swf (first frame):
          if (_level0.jumpToScene){
          this.gotoAndPlay("Scene 3");
          _level0.jumpToScene = false; // reset variable
          }

          hth,
          blemmo