4 Replies Latest reply on May 17, 2007 5:38 AM by Newsgroup_User

    AS 2.0 gotoAndStop Issue

    vnorthw
      I'm having an interesting problem with a flash game I'm creating.

      It is a basic space ship shooter game I'm making and my issue at the moment is with the gotoAndStop function.

      I have several labeled frames, at the moment specifically "intro" and "game."

      While in the game I want the user to be able to exit to the intro page with 'x'. In my key listener I coded gotoAndStop( "intro" ) to the x button. However, when the code is executed the space ship and enemy crafts continue to exist and fly through my intro screen.

      If anyone has any insight as to how I may rectify this, It would be appreciated.

      Thanks!
        • 1. Re: AS 2.0 gotoAndStop Issue
          WebXperience Level 1
          Make sure there is a stop() action in the intro frame.
          • 2. Re: AS 2.0 gotoAndStop Issue
            MurMeeKeer Level 1
            gotoAndPlay() and gotoAndStop() methods expect frame number as their parameter and not a string.

            Replace "intro" by a frame number to which frame it is labelled.
            • 3. Re: AS 2.0 gotoAndStop Issue
              MurMeeKeer Level 1
              sorry.........ignore my previous reply
              • 4. Re: AS 2.0 gotoAndStop Issue
                Level 7
                Hello,

                declare x to be global in the very first frame .

                "vnorthw" <webforumsuser@macromedia.com> wrote in message
                news:f2h8g8$elg$1@forums.macromedia.com...
                > I'm having an interesting problem with a flash game I'm creating.
                >
                > It is a basic space ship shooter game I'm making and my issue at the
                > moment is
                > with the gotoAndStop function.
                >
                > I have several labeled frames, at the moment specifically "intro" and
                > "game."
                >
                > While in the game I want the user to be able to exit to the intro page
                > with
                > 'x'. In my key listener I coded gotoAndStop( "intro" ) to the x button.
                > However, when the code is executed the space ship and enemy crafts
                > continue to
                > exist and fly through my intro screen.
                >
                > If anyone has any insight as to how I may rectify this, It would be
                > appreciated.
                >
                > Thanks!
                >