How To: Make your game character jump with Flash CS4

Make your game character jump with Flash CS4

One of the first daunting tasks that confronts most aspiring gamemakers is a simple one: making a character jump and land predictably. If you're gotten to this point and wonder what to do, you're in the right place. This video will teach you how to use Actionscript 3 in Flash CS4 to make your character jump like Mario (or Sonic if you prefer) making your game much closer to being the playable, fun entity that it will soon be.

Download the AS3 files used in the video here.

While you're stuck at home, make the most of your time by learning a new language, skill, or even train for a remote-work job with our new premium online courses.

Check them out >

Our Best Phone Hacks

Gadget Hacks' tips — delivered daily.


how do u make the character jump once for every pressed key? like say the jump key?

var inFlight:Boolean=false;

//in character function of movements

if(event.keyCode==38//up arrow key//{
//make var for height//heightvar+=20;

now your character will move up by 20 pixels and wont be able to jump a second time while still "above", or simply put: until inFlight==true, hero=/=inFlight

Share Your Thoughts

  • Hot
  • Latest