Chapter 32. Creating a Game in Flash
IN THIS CHAPTER
Thinking about game-plan logic
Using the break and return functions
Asking questions with conditionals
Using arrays
Writing ActionScript 2.0 code with an event model
Creating text fields dynamically
Creating Movie Clips dynamically
Using setInterval
Creating a game requires much more than programming. It is a combination of many skills — game design, interaction design, visual and sound design, and scripting — that brings it all together. These skills also represent the different phases of game design and are covered in this chapter. You must devote your attention to all these aspects of design to produce a successful game.
To illustrate the different aspects of game design, we deconstruct a simple game, the universally known Hangman.
Note
Before reading through this chapter, copy the ch32
folder of the CD-ROM onto your hard drive. Double-click the hangman.html
file located inside of the copied folder to play the game in a Web browser and become acquainted with our project. Now, open the hangman.flp
file in the Project panel of Flash CS3. The functionality of the game is broken down into three classes: GameModel, GameView
, and GameController
. You learn about the purpose of each class file as you proceed with this chapter.
The Game Plan: Four Phases of Game Design
Game development includes the four phases we introduced earlier. The following sections discuss those phases in detail.
Note
Many thanks to Jonathan Brzyski for contributing his illustrations ...
Get Adobe® Flash® CS3 Professional Bible now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.