3 Replies Latest reply on May 18, 2013 6:46 AM by kglad

    Why won't the button navigate to the next scene?

    flashylee

      I am currently making a game in Flash CS6.

       

      There are 4 levels, I have made each of these levels in a different 'scene'.

       

      From the home page to Level 1, I used the following code snippet and it worked fine :

       

      levelonebutton.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextScene);

       

       

      function fl_ClickToGoToNextScene(event:MouseEvent):void

      {

                MovieClip(this.root).nextScene();

      }

       

      Now when the user finishes each level, a "Next Level" button appears and obviously I want it to go to the next level/scene.. However, with any code I use, it does not navigate to the next scene but just repeats the same scene/level again. I have put a "stop();" at the begging of each level. The code I am trying to do this with is:

       

      nextlevelone.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextScene);

       

       

      function fl_ClickToGoToNextScene(event:MouseEvent):void

      {

                MovieClip(this.root).nextScene();

      }

       

      I've searched many forums but none are giving me the right answer.. Why won't the code take me to the next scene??