Create a Whack-a-Mole Game in Flash With AS3 by Preview

Tutorial DetailsProgram: Flash ProfessionalDifficulty: IntermediateEstimated Completion Time: 2h
Join to Access

In this tutorial, you’ll learn how to create your own version of the classic Whack-a-Mole game – only, our unfortunate creatures of choice will be worms. You’ll be able to modify the speed of the game and the hit boxes of the worms.


Step 1: Brief Overview

We’ll use common ActionScript 3 classes, specially Mouse Events to create an entertaining Whack A Mole like game in Flash


Step 2: Flash Document Settings

Open Flash and create a 480 pixels wide, 320 pixels tall document. Set the Frame rate to 24fps.

(Note: there’s a mistake in the image above; the width and height are the wrong way round! Thanks to Roel Traa for pointing this out.)


Step 3: Interface

A simple and friendly interface will be used, featuring several shapes, buttons and MovieClips, continue to the next steps to build this GUI.


Step 4: Background

Select the Rectangle Tool (R) to create a 320x480px #CC9866, #BA7743 rectangle and center it in the stage.


Step 5: Title

Use the Text Tool (T) to add a title using your favorite font. You can also use some of the graphics of the game to make it nicer. The worm graphic used in this tutorial was downloaded from here under a Creative Commons License.

...and that's the end of the preview!

Unlock the full tutorial by becoming a member of Tuts+ Premium

Including...

  • 886 Exclusive Tutorials

  • Course Library

  • 35 Top-selling eBooks

  • New Content Weekly

Take the Tour or Join Tuts+ Premium

If you've already got a Premium account, just Sign in to Access