Macromedia Flash 8 Bible Free Open Book

Macromedia Flash 8 Bible

Previous Page
Next Page

Chapter 31: Creating a Game in Flash

Overview

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.


Previous Page
Next Page
Index: [A][B][C][D][E][F][G][H][I][J][K][L][M][N][O][P][Q][R][S][T][U][V][W][X][Y][Z]


     Main Menu
Table of Contents
Back Cover
Macromedia Flash 8 Bible
Foreword
Preface
Part I: An Introduction to Flash Web Production
Part II: Mastering the Flash Environment
Part III: Creating Animation and Effects
Part IV: Integrating Media Files with Flash
Part V: Adding Basic Interactivity to Flash Movies
Part VI: Distributing Flash Movies
Part VII: Approaching ActionScript
Part VIII: Applying ActionScript
Chapter 28: Sharing and Loading Assets
Chapter 29: Sending Data In and Out of Flash
Chapter 30: Applying HTML and Text Field Formatting
Chapter 31: Creating a Game in Flash
The Game Plan: Four Phases of Game Design
Building the Project
Scripting the Game
Initializing the Game
Building the Interface
Starting the Game
The User Input
Interpreting the User Input
Checking the Status of the Game
Added Feature: Storing User and Game Information
Summary
Chapter 32: Managing and Troubleshooting Flash Movies
Part IX: Integrating Components and Data-Binding
Part X: Expanding Flash
Part XI: Appendixes
Index
List of Figures
List of Tables
List of Listings
List of Sidebars


More Books
PHP Hacks
Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
The Koran (Holy Qur'an)
Macromedia Flash 8 Bible
Search Engine Optimization for Dummies
YouTube Traffic
PHP 5 for Dummies
Harry Potter and The Chamber of Secrets
Harry Potter and the Sorcerer's Stone
The Pilgrim's Progress
Wireless Hacks
Flash Hacks. 100 Industrial-Strength Tips & Tools
PayPal Hacks. 100 Industrial-Strength Tips and Tools
Amazon Hacks
Pdf Hacks
The Da Vinci Code
Google Hacks
The Holy Bible
Windows XP For Dummies
Harry Potter and the Half-Blood Prince
Seo Book
Upgrading and Repairing Networks
Macromedia Dreamweaver 8 UNLEASHED
Windows XP Annoyances
Windows XP Hacks
Microsoft Windows XP Power Toolkit
Teach Yourself MS Office In 24Hours
iPod & iTunes Missing Manual
PC Hacks 100 Industrial-Strength Tips and Tools
PC Overclocking, Optimization, and Tuning - 2th Edition
PC Hardware In A Nutshell 3rd Edition
PC Hardware in a Nutshell, 2nd Edition
Upgrading and Repairing PCs
Google for Dummies
MySQL Cookbook
Teach Yourself Macromedia Flash 8 In 24 Hours
PHP CookBook
Sams Teach Yourself JavaScript in 24 Hours
PHP5 Manual
Free Games Paper Airplanes