4 Replies Latest reply on May 8, 2006 8:08 PM by kglad

    1 button - two sequential actions?

      Hi All,

      Is is it possible to have a button on release go to and play a certain
      frame in the current scene and only then go to another scene?

      I'm providing the best "shot" at the code below, but would appreciate
      someone correcting it, as it doesn't work.

      on (release) {

      gotoAndPlay("1"); // frame from current scene


      gotoAndPlay("scene 2", "frame id");


      Thank you!

        • 1. Re: 1 button - two sequential actions?
          kglad Adobe Community Professional & MVP
          yes, but you'll need to do more than that. first, don't use the goto functions (and therefore don't use scene info for navigation). use the goto methods, label your frames and use the frame labels .

          second, both those statements will execute and then your stage will update. so, you'll not see frame "1" on-stage.

          to see frame "1" you'll need to use more coding and you'll need to inform flash what exactly you want to do. for example, do you want to play from "1" to a certain frame and when that frame is reached then goto "frame id"? if so, you'll need to either put a goto "frame id" on that frame or you'll need to initiate a loop that will continually check the playhead's currentframe and see if it matches the one you want to play just before jumping to "frame id".
          • 2. Re: 1 button - two sequential actions?
            vl_on Level 1
            I am trying to figure out (hopefully by code example) what's the best way to setup a flash movie/site so that on a click of a button it loads Page 1, then, being on that Page 1, if a visitor clicks button leading to Page 2, some movie will be played that will first clean up content of Page 1, and only then load content of Page 2.

            Is there any best practive code /rule I can use here? A code sample would be oh so helpful!
            • 3. Re: 1 button - two sequential actions?
              vl_on Level 1
              P.S. and also, what's the best practice for creating different pages in different scenes/parts of time line/external swf?

              • 4. Re: 1 button - two sequential actions?
                kglad Adobe Community Professional & MVP
                there is no best practice for having an outro movie. it depends upon your needs.

                does each movieclip have a unique outro? or are all the outros the same. eg, does each movieclip fade out before displaying the next movieclip? how is the next movieclip instantiated? is it loaded, attached or on a main timeline frame and you need to direct the main timeline to that frame?

                there's also no best for displaying different "pages". it depends upon your needs.