AS3 Character jumping/falling problems
问题 I am having problems with getting the character to jump/fail when the up arrow is pressed. I'm trying to make it so when the up arrow key is pressed once it will jump a certain height then fall. Here is my movement code: public var gravity:int = 2; public function fireboyMovement(e:KeyboardEvent):void { if (e.keyCode == 37) //right { fireboy1.x = fireboy1.x -5; checkBorder() } else if (e.keyCode == 39) //left { fireboy1.x = fireboy1.x +5; checkBorder() } if (e.keyCode == 38) //up { fireboy1.y