O'Reilly logo

Adobe® Flash® CS3 Professional Bible by Snow Dowd, Robert Reinhardt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required