How To: Make your game character jump with Flash CS4

Make your game character jump with Flash CS4

How to 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.

2 Comments

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

Glenn:
example:
var inFlight:Boolean=false;

//in character function of movements

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

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