home page icon Flash Bestiary / Classic Games / Asteroids


Spacebar = Fire
Left and Right Arrows = Rotate
Control or Up Arrow = Thrust
Down Arrow = Brake
J = Toggle Jitter Effect

If the keys don't work, click your mouse on the game.

The source for this game, which is almost entirely actionscript based, illustrates a number of techniques, including:

  • Velocity-based movement (with inertia)
  • Score keeping
  • Storing the shapes of objects (rocket, rocks, flying saucer, etc.) in arrays.
  • Using the information in this array to create an explosion effect.
  • Text animation
  • Jitter effect
The images in this game were plotted on graph paper, and then stored in arrays. A routine, drawModel(), is responsible for drawing the various models.


sourcecode iconDownload the flash project
book iconJim's Favorite Actionscript Books
wiki iconAsk Jim about Actionscript
Next: Jolly Roger

Having trouble opening the project? You may need to Upgrade to Flash MX 2004

Copyright © 2003,2004 by Jim Bumgardner. All Rights Reserved.        Leave Jim some feedback