5 Replies Latest reply on May 9, 2006 5:53 AM by Newsgroup_User

    Exit Button

    lukea37
      I have created an Exit button. When the user clicks on Exit it then prompts them "Are you sure you want to exit?" with either "Yes" or "No"

      When the user clicks yes it quits the presentation. How do I make it so if they click "No" it goes to the frame they were previously on before they clicked exit?

      Any help would be great.

      Thanks
        • 1. Re: Exit Button
          Level 7
          Hu Lukea,

          Have you used MIAWs (Movie in A Window) before? Using this technique, you can
          open one movie over another. So, if you wanted a quit messgae to come up, this
          could be a separate movie that opens above your main application. A 'yes' could
          quit the entire application, a 'no' could just close the window. That way, your
          quit option window can be available at any time, you wouldn't need to jump to a
          specific quit screen and going back to where you were would be simple as you'd
          never really leave that scene.

          You can find more on MIAWs at:
          http://www.fbe.unsw.edu.au/learning/director/Lingo/MIAWs.asp

          regards
          Dean

          Director Lecturer / Consultant
          http://www.fbe.unsw.edu.au/learning/director
          http://www.multimediacreative.com.au

          • 2. Re: Exit Button
            Level 7
            The quickest solution might be to have a dedicated QuitDialog marker
            accessed with

            play frame "QuitDialog"


            The cancel button script can simply invoke

            play done -- which returns to calling frame


            if you had puppet sprite or the like setup of the caller frame,
            returning out of context might leave things on an odd state.


            -------

            The MIAW approach mentioned in the other reply avoids leaving the
            current frame.

            ----


            Another way to present a generic Yes/No dialog is with the MUIdialog
            xtra, there's example code on the macromedia site, the code to generate
            a 2 button dialog is not too complex.
            • 3. Re: Exit Button
              lukea37 Level 1
              Great! That sounds exactly like I want. I will let you know how I go.

              Thanks.
              • 4. Re: Exit Button
                lukea37 Level 1
                This worked perfectly! Thanks for your help!

                quote:

                Originally posted by: Newsgroup User
                The quickest solution might be to have a dedicated QuitDialog marker
                accessed with

                play frame "QuitDialog"


                The cancel button script can simply invoke

                play done -- which returns to calling frame


                if you had puppet sprite or the like setup of the caller frame,
                returning out of context might leave things on an odd state.


                -------

                The MIAW approach mentioned in the other reply avoids leaving the
                current frame.

                ----


                Another way to present a generic Yes/No dialog is with the MUIdialog
                xtra, there's example code on the macromedia site, the code to generate
                a 2 button dialog is not too complex.



                • 5. Re: Exit Button
                  Level 7
                  JB wrote:

                  > The quickest solution might be to have a dedicated QuitDialog marker
                  > accessed with
                  >
                  > play frame "QuitDialog"
                  >
                  > The cancel button script can simply invoke
                  >
                  > play done -- which returns to calling frame

                  Yes, play and play done are the quickest solution. Guess it depends on what
                  effect you want. I've experienced a number of bugs with using play and play
                  done many times, so would suggest using 'play' only for the link to the
                  quit screen and 'go to' for all other links.

                  JB - by the way, did you get my email? If not, could you send me one at
                  d.utian@unsw.edu.au ?

                  regards
                  Dean

                  Director Lecturer / Consultant
                  http://www.fbe.unsw.edu.au/learning/director
                  http://www.multimediacreative.com.au