Game Movement [the basics] - Part 1
Please note that the examples below show only movement and allow you to move off the stage.

If you've ever wanted to create a game in Flash that uses the arrow keys as the controls, here's the quick and easy way to do it. First, you need to draw the player. I used a circle, but you can use as much detail as you want. Next, make the drawing a movie clip and name it whatever you want (I named mine "player"). Add the player MC to the stage. Finally, you need to add the code. Open the actions for your player movie clip and add the following code:
onClipEvent (load) {
  speed = 4;
}
onClipEvent (enterFrame) {
  if (Key.isDown(Key.LEFT)) {
    _x -= speed;
  }
if (Key.isDown(Key.RIGHT)) {
  _x += speed;
}
if (Key.isDown(Key.UP)) {
  _y -= speed;
}
if (Key.isDown(Key.DOWN)) {
  _y += speed;
}

Test your movie. The arrow keys now make your player slide around. If it's choppy, change your frame rate to 30FPS.

Source .fla (Flash 8 format)

Now, you may be thinking, "this is all well and good, but I want to have a side-scroller where the player changes directions." This is a very simple effect to achieve using the _xscale property. To make your MC move only left and right and face the direction it's moving you just need to doctor the above code like so:
onClipEvent (load) {
  speed = 4;
}
onClipEvent (enterFrame) {
  if (Key.isDown(Key.LEFT)) {
    _x -= speed;
    _xscale = -100;
  }
if (Key.isDown(Key.RIGHT)) {
  _x += speed;
  _xscale = 100;
}

Source .fla (Flash 8 format)

By changing the _xscale to -100, you're stretching the MC's right edge to where the left edge is, and vice versa. This effectively flips the MC left-to-right. Setting _xscale back to 100 restores the MC to it's original position. Using this trick always you to have a walk cycle that faces right, and have it work seamlessly when you want the player to face left.

There's only one thing missing from the side-scroller controls: jumping. Adding a jump key is also simple and here's how we're going to do it: when the user presses the spacebar we'll set a variable that makes the player jump. It's that simple. Using some math, we'll calculate the jump arc on a frame-by-frame basis.

onClipEvent (load) {
  speed = 4;
  isJumping = false;
  jumpSpeed = 0;
  startY = _y;
}
onClipEvent (enterFrame) {
  if (isJumping) {
    _y += jumpSpeed;
    jumpSpeed += 1;
    if (_y>=startY) {
      _y = startY;
      isJumping = false;
    }
  }else{
    if (Key.isDown(Key.LEFT)) {
      _x -= speed;
      _xscale = -100;
    }
    if (Key.isDown(Key.RIGHT)) {
      _x += speed;
      _xscale = 100;
    }
    if (Key.isDown(Key.SPACE)) {
      isJumping = true;
      jumpSpeed = -10;
    }
  }
}

Source .fla (Flash 8 format)

This is a good start, but maybe you want to be able to retain some left/right control while in the air. This is a simple tweak and looks like this:

onClipEvent (load) {
  speed = 4;
  isJumping = false;
  jumpSpeed = 0;
  startY = _y;
}
onClipEvent (enterFrame) {
  if (isJumping) {
    _y += jumpSpeed;
    jumpSpeed += 1;
    if (_y>=startY) {
      _y = startY;
      isJumping = false;
      speed = 4;
    }
  } else {
    if (Key.isDown(Key.SPACE)) {
      isJumping = true;
      jumpSpeed = -10;
      speed = 2;
    }
  }
  if (Key.isDown(Key.LEFT)) {
    _x -= speed;
    _xscale = -100;
  }
  if (Key.isDown(Key.RIGHT)) {
    _x += speed;
    _xscale = 100;
  }
}

Source .fla (Flash 8 format)

How the new jumping code works is that when the player is jumping, the left/right speed is reduced and then, upon landing, the speed is restored.

In part 2, I'll go into how to make an asteroids-like space game with rotation/thrust and how to add friction, drag, gravity, and other variables that make your games more realistic.

If you can't see the examples, try upgrading to the latest Flash Player and try the file again.