13 Replies Latest reply on Aug 20, 2009 3:58 AM by dalcde

    Help with Bouncing Ball AS2

    fiveflightsup

      I'm using the actionscript below to Move Object Using The Arrow Keys and it works fine but I want to modify it so that when I press the up key it goes to and play a movie clip. Basically it's a ball movie clip that responds to the arrow key but on the up key it plays a bouncing movieclip and everything remains aligned. Can anyone help?

       

      Thanks in advance

       

      Here is the script-

       

      var speed =5;

       

      this.onEnterFrame =function(){
          if(Key.isDown(Key.UP)) {
              circle._y -= speed;
          }
          if(Key.isDown(Key.DOWN)) {
              circle._y += speed;
          }
          if(Key.isDown(Key.LEFT)) {
              circle._x -= speed;
          }
          if(Key.isDown(Key.RIGHT)) {
              circle._x += speed;
          }
      };