In This Chapter
Thinking about gameplan logic
Using the break and return functions
Asking questions with conditionals
Using arrays
Writing code with the new event model
Creating text fields dynamically
Creating Movie Clips dynamically
Using setInterval
Using SharedObject
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 |
In order to open the Flash Project file associated with this chapter's example, you need to be using Flash Professional 8. If you are using Flash Basic 8, you can open the ActionScript files (.as) in a separate text editor such as Macromedia Dreamweaver, Notepad, or TextEdit. |
On the CD-ROM |
Before reading through this chapter, copy the ch31 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 Professional 8. 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. |