How to Make a Simple Flash Game

How to Make a Simple Flash Game thumbnail
A simple Flash game with a static background

Flash games don't need to be complicated. Some of the best games are simple to use and simple to make, especially if they are children's educational games. In fact, for children you don't want a complicated game. Their motor skills are not fully developed and they often don't have an interest in busy complicated games.

To make a simple flash game you don't need advanced flash programming skills. Just a knowledge of simple Flash Actionscript commands will do. You should also be able to work the Flash timeline, be able to draw graphics with Flash drawiing tools and import pictures into flash.

Things You'll Need

  • Adobe Flash Software
  • Computer with 1 GB of RAM Memory
Show More

Instructions

    • 1

      Design the flash game with simplicity in mind, therefore limit the number of players to one. The more players the more complex your game will be to code. Minimize the number of playing pieces. More playing pieces will also require more code. Remember that the simplest flash games use just one frame.

    • 2

      Setup your game layers. Name the first layer on the timeline, actionscript. Now, select the layer icon on the timeline panel and add four layers. Name each of the added layers. Game board, game pieces, and dice are good names to use for these layers.

    • 3

      Add content to each layers' frame. Select "Frame 1" of the game board layer. Then import a picture or drawing of the game board onto the flash stage.

      Select the first frame of the game pieces layer, and import a picture or drawing of the game piece.

      Select the first frame of the dice layer. Then place a dynamic text box on the stage. Size the text box and place it so that it will not obstruct the view of the game. Also add a button on this layer. Label it "Roll dice."

    • 4

      Add actionscript code. Select the first frame of the actionscript layer. Next select Windows from the main menu. On the pull-down menu that appears select action. Use the action window to type in your code.

      Write the actionscript code that will display a number in the dice dynamic text box whenever the roll dice button is activated. Actionscript code needed include the addEventlistener method, the math random method and the class function. Code these commands so that when the roll dice button is selected, a random number between one and six will be displayed in the dice dynamic text box.

      Also include code that will automatically move the game piece the number of spaces on the board that the random number generator produces. To do this, use the "X " and "Y" property associated with the game piece.

    • 5

      Test the game. Select the dice roll button and then check the dice display box to see if it displays different numbers after each roll. Check to see if the game piece moves by itself. Keep rolling until the piece makes it completely around the board. Make sure that the game piece actually moves the number of spaces that the number in the roll dice text box indicates. If not, go back and check your code.

Related Searches:

References

Resources

  • Photo Credit game of love abstract image by robert mobley from Fotolia.com

Comments

You May Also Like

Related Ads

Featured