Accessibility

Flash Article

 

Train Simple videos: Introduction to Flash game development


Table of Contents

Character movement

The following video tutorials cover movement using onKeyDown and Key.isDown, and adding acceleration to a game.

Movement using onKeyDown

At this point in the course, Jiro has already discussed parallax scrolling to animate the background and foreground elements within the game. The focus of this movie is to get the hero ship to move based upon input from the user's keyboard.

Movement using onKeyDown

Figure 1. Movement using onKeyDown

Movement using Key.isDown

This movie continues the discussion of character movement. In the lesson movie, Jiro makes the ship move by changing its position every time the Key object receives an onKeyDown event. Since this results in erratic movement, Jiro explores how to use the enterFrame event to produce smoother motion.

Movement using Key.isDown

Figure 2. Movement using Key.isDown

Acceleration and velocity

Continuing on the quest of making fluid, life-like motion, Jiro provides you with a brief overview of acceleration and velocity.

Acceleration overview

Figure 3. Acceleration overview

Adding acceleration

After reviewing the principles of acceleration and velocity, in this movie Jiro adds those concepts to the movement of the hero ship.

Adding acceleration

Figure 4. Adding acceleration