7 Replies Latest reply: Apr 22, 2012 9:15 PM by Losan33 RSS

    ActionScript on two buttons works, ActionScript on one button doesn't.

    Losan33 Community Member

      For some reason, the ActionScript I have on two buttons in my game. When the program starts, it goes to the first page, which has two buttons leading to other scenes. Those two buttons work. One of them is a directions button that leads to the directions page. I have another button on my directions page that I want to go back to the title page, the scene with the two buttons. (By the way, I'm using ActionScript 2)

       

      The code I used for the first two buttons:

       

      DirectionsButton.onRelease=function(){

          gotoAndPlay("Directions",1);

      }

       

      PlayButton.onRelease=function(){

          gotoAndPlay("Game",1);

      }

       

      ------------------------------------------------------------------------------------------ --

       

      The code I used for the Back button on the Directions scene:

       

      BackButton.onRelease=function(){

          gotoAndPlay("Title",1);

      }

       

      ------------------------------------------------------------------------------------------ ---

       

      For some reason, it's in the exact same format and the exact same way as the other two buttons, but it WILL NOT work. The cursor turns into the hand instead of the arrow, but nothing happens when I click on it. The codes are in the background of each scene, and each of them are buttons. Two of them work, but the other doesn't!

       

      It's really annoying, so please help me. Thank you in advance!