2 Replies Latest reply on Sep 8, 2011 6:28 PM by BackyardMoonster

    button on frame 2 won't return to frame 1

    BackyardMoonster

      I have created a racing game and over all i got 3 frames and about 10 main layers (not sure if that matters for you to help?)

      Anyway, i have tried so many scripts now and they're not working :/ Please.... Please help if you can.

       

      The game begins on frame 2 while the main menu is on frame 1.

      Not sure if it matters but i have the menu copied on all the frame 1's of all the layers...

       

      Main menu instance is called menu

      The 2nd frame i have not named.

       

      Pleaseeee.....

        • 1. Re: button on frame 2 won't return to frame 1
          Ron Colmen Level 2

          It would be helpfull if you show your code for that perticular action.

           

          try: on frame 2

          InstanceOfYourButtonOnFrame2.onRelease = function () {

          gotoAndStop(1);

          }

          • 2. Re: button on frame 2 won't return to frame 1
            BackyardMoonster Level 1

            I have 4 frames and about 10 main layers.

            I Only need a code that allows me to have two key's pressed at the same time.

            my actions are both in frame 2 as my main menu is on frame 1 but in different layers.

            that's why I only need a code that lets me select both the LEFT key and SPACE key together.

            Here is the current game:

            http://thebackyardchampion.deviantart.com/#/d49807m -

            Please note! you won't see the booster in that version.

            you'll see what i mean by i want the left key and space key to work together.

            Because when booster is activated, it will need to have a more stiff rotation speed.

            HOLD ON

            i'll explain it a bit better!

             

            I want to know the left and space key not directly for the booster but for the rotations speed.

            For example I already got:

             

             

            acceleration = 0.5; (is asigned to the up key)

            acceleration2 = 0.7; (is asigned to the booster)

             

            maxSpeed = 20;

            maxSpeed2 = 20;

             

             

            Below is the actions asigned to the above..

             

             

            if (Key.isDown(Key.UP) && this["speed"+who]<_root.maxSpeed) {

            this["speed"+who] += _root.acceleration;

            }

            if (Key.isDown(Key.SPACE) && this["speed"+who]<_root.maxSpeed2) {

            this["speed"+who] += _root.acceleration2;

            }

             

            Hope you now see why I need an asignment for

             

            rotationStep = 15.3;

            rotationStep2 = 12.3;

            rotationStep2 will be for when the space bar and left key is pressed together.