Flash Examples

Since about 2000 I have been teaching various versions of Flash as well as other programs such as C#, VB.Net, Photoshop etc.

Here are some examples of what I have taught.

Original Peg Game
New PegPuzzle Game

This is my favorite beginning game example. The original was written using brute force coding, that was a pain to write, but simple to explain and understand. This was a tutorial that was on the web in 2000, you can still find it by searching "How to Build the Peg Puzzle Game", it was originally created by David Brebner. The origianl game was written in ActionScript 1 and had a couple of problems.

  • It would not tell you when you lost the game
  • There was a problem when dragging the pegs (you could drop the peg behind other pegs and cause problems)
  • I've upgraded the game over the years to AS2 and then AS3. I have animated the pegs, added sound and fixed the previously mentioned problems. I have also created a version that uses a Hash Table to calculate the moves instead of the original brute force method. The latest version puts all of the code in Classes stored in external actionScript files.

Shooting Game:   Shooter Game

This game demonstrates a basic shooting game against a computer. Just to be different I had the users ship follow the mouse. The further away the mouse is from the ship, the brighter the thruster glows (and the louder it is). You fire by pressing the left mouse button. It still has some bugs to work out though.

Pie Charts:   Pie Chart

Flash has a hard time creating arcs (incomplete circles). This demo shows how to create a series of Pie slices to form a Pie Chart. You can click and drag individual slices out of the pie, and then drag them back to replace them, or you can double-click the individual slices to reset it. You can also press the button in the center of the pie to reset all of the slices at once. This lesson also uses and XML files to hold the data for the chart. 

Marble Madness:   Marble Madness

This one is a favorite of the students. It has been re-written in AS3 and has new features in it, like a time limit, penalties for clicking on the wrong object and points deducted based on the number of balls left on the screen when time runs out. It calculates it own movement routine, but my plan is to re-write it using Flashes Tween class.

Peg Game