3 Replies Latest reply: Apr 24, 2012 10:43 AM by kglad RSS

    _root.gotoAndStop(2) leads to a blank screen?

    WitchXHunter

      So I've completed a script for one of the levels of my game and now I want to go for another, so I drag off the key frames to key fram 5 and duplicate the keyframes on frame2 so that I can work on another level

       

      but the thing is

      I put _root.gotoAndStop(2)/_root.gotoAndPlay(2) it doesn't work for frame 5 either

      it leads to a blank screen

      anyone encounter this before?

        • 1. Re: _root.gotoAndStop(2) leads to a blank screen?
          kglad MVP

          this sounds like a problem:  So I've completed a script for one of the levels of my game and now I want to go for another, so I drag off the key frames to key fram 5 and duplicate the keyframes on frame2 so that I can work on another level

           

          there's no need to drag anything anywhere to start a new level.

           

          are you using different scenes for different levels?

          • 2. Re: _root.gotoAndStop(2) leads to a blank screen?
            WitchXHunter

            I did that coz I want to reserve the frames for the game menu and such, but anyhow, now I'm using the scene method now it seems things are going well, except that after completing the first level I go to the second level, some script that were originally working when I directly play that level doesn't work anymore. Is there a way to reset all the variables in the game? coz I do declaration on each level, but it seems there might be some remained data.

            • 3. Re: _root.gotoAndStop(2) leads to a blank screen?
              kglad MVP

              you have to explicitly reset whatever values you want to reset.  in addition, all objects in other scenes are new objects even if they have the same name as objects in previous scenes.