Book Detailed Table of Contents
- Introduction
- Flash and Game Development
- Who Is This Book For?
- What Do You Need To Use This Book?
- Using the Example Games in Your Projects
- What You'll Find in This Book
- The FlashGameU.com Web Site
- 1. Using Flash and ActionScript 3.0
- What Is ActionScript 3.0?
- Creating a Simple ActionScript Program
- A Simple Use of trace
- Creating Screen Output
- Our First ActionScript 3.0 Class
- Working with Flash CS3
- Display Objects and Display Lists
- The Stage
The Library - The Timeline
- Writing and Editing ActionScript
- ActionScript Game Programming Strategies
- Single Class Method
- Smallest Step Approach
- Good Programming Practices
- Basic ActionScript Concepts
- Creating and Using Variables
- Condition Statements
- Loops
- Functions
- Testing and Debugging
- Types of Bugs
- Methods of Testing
- Using the Debugger
- Publishing Your Game
- Formats
- Flash
- HTML
- ActionScript Game Programming Checklist
- Publishing and Document Settings
- Class, Function, and Variable Names
- Runtime Issues
- Testing Issues
- What Is ActionScript 3.0?
- 2. ActionScript Game Elements
- Creating Visual Objects
- Using Movie Clips
- Making Buttons
- Drawing Shapes
- Drawing Text
- Creating Linked Text
- Creating Sprite Groups
- Setting Sprite Depth
- Accepting Player Input
- Mouse Input
- Keyboard Input
- Text Input
- Creating Animation
- Sprite Movement
- Using Timers
- Time-Based Animation
- Physics-Based Animation
- Programming User Interaction
- Moving Sprites
- Dragging Sprites
- Collision Detection
- Accessing External Data
- External Variables
- Loading Data
- Saving Local Data
- Miscellaneous Game Elements
- Custom Cursors
- Playing Sounds
- Loading Screen
- Random Numbers
- Shuffling an Array
- Displaying a Clock
- System Data
- Game Theft and Security
- Creating Visual Objects
- 3. Basic Game Framework: A Matching Game
- Placing Interactive Elements
- Methods for Creating Game Pieces
- Setting Up the Flash Movie
- Creating the Basic ActionScript Class
- Using Constants for Better Coding
- Shuffling and Assigning Cards
- Game Play
- Adding Keyboard Listeners
- Setting Up Game Logic
- Checking for Game Over
- Encapsulating the Game
- Creating the Game Movie Clip
- Adding an Introduction Screen
- Adding a Play Again Button
- Adding Scoring and a Clock
- Adding Scoring
- Adding a Clock
- Displaying Time
- Displaying Score and Time after the Game Is Over
- Adding Game Effects
- Animated Card Flips
- Limited Card-Viewing Time
- Sound Effects
- Modifying the Game
- Placing Interactive Elements
- 4. Brain Games: Memory and Deduction
- Arrays and Data Objects
- Arrays
- Data Objects
- Arrays of Data Objects
- Memory Game
- Preparing the Movie
- Programming Strategy
- Class Definition
- Setting the Text, Lights, and Sounds
- Playing the Sequence
- Switching Lights On and Off
- Accepting and Checking Player Input
- Modifying the Game
- Deduction Game
- Setting Up the Movie
- Defining the Class
- Starting a New Game
- Checking Player Guesses
- Evaluating Player Moves
- Ending the Game
- Clearing Game Elements
- Modifying the Game
- Arrays and Data Objects
- 5. Game Animation: Shooting and Bouncing Games
- Game Animation
- Time-Based Animation
- Coding Time-Based Animation
- Air Raid
- Movie Setup and Approach
- Flying Airplanes
- Moving Gun
- Skyward Bullets
- The Game Class
- Modifying the Game
- Paddle Ball
- Setting Up the Movie
- Class Definition
- Starting the Game
- Starting a New Ball
- Game Animation and Collision Detection
- Game Over
- Modifying the Game
- Game Animation
- 6. Picture Puzzles: Sliding and Jigsaw
- Manipulating Bitmap Images
- Loading a Bitmap
- Breaking a Bitmap into Pieces
- Sliding Puzzle Game
- Setting Up the Movie
- Setting Up the Class
- Loading the Image
- Cutting the Bitmap into Pieces
- Shuffling the Pieces
- Reacting to Player Clicks
- Animating the Slide
- Game Over and Cleanup
- Modifying the Game
- Jigsaw Puzzle Game
- Setting Up the Class
- Loading and Cutting the Image
- Dragging Puzzle Pieces
- Game Over
- Modifying the Game
- Manipulating Bitmap Images
- 7. Direction and Movement: Space Rocks
- Using Math to Rotate and Move Objects
- The Sin and Cos Functions
- Using Cos and Sin to Drive a Car
- Calculating an Angle from a Location
- Air Raid II
- Altering the Gun
- Changing the Bullets
- Changes to AirRaid2.as
- Space Rocks
- Game Elements and Design
- Setting Up the Graphics
- Setting Up the Class
- Starting the Game
- Score and Status Display Objects
- Ship Movement and Player Input
- Shields Up!
- Rocks
- Missiles
- Game Control
- Modifying the Game
- Using Math to Rotate and Move Objects
- 8. Casual Games: Match Three
- Reusable Class: Point Bursts
- Developing the Point Burst Class
- Using Point Bursts in a Movie
- Match Three
- Playing Match Three
- Game Functionality Overview
- The Movie and MatchThree Class
- Setting Up the Grid
- Player Interaction
- Animating Piece Movement
- Finding Matches
- Finding Possible Moves
- Score Keeping and Game Over
- Modifying the Game
- Reusable Class: Point Bursts
- 9. Word Games: Hangman and Word Search
- Strings and Text Fields
- ActionScript 3.0 String Handling
- Applying Text Formatting to Text Fields
- Hangman
- Setting Up the Hangman
- The Hangman Class
- Word Search
- Development Strategy
- Defining the Class
- Creating the Word Search Grid
- User Interaction
- Dealing With Found Words
- Modifying the Game
- Strings and Text Fields
- 10. Questions and Answers: Trivia and Quiz Games
- Storing and Retrieving Game Data
- Understanding XML Data
- Importing External XML Files
- Trapping Load Errors
- Trivia Quiz
- Designing a Simple Quiz Game
- Setting Up the Movie
- Setting Up the Class
- Loading the Quiz Data
- Message Text and Game Button
- Moving the Game Forward
- Displaying the Questions and Answers
- Judging the Answers
- Ending the Game
- Deluxe Trivia Quiz
- Adding a Time Limit
- Adding Hints
- Adding a Factoid
- Adding Complex Scoring
- Randomizing the Questions
- Picture Quiz
- Better Answer Arrangement
- Recognizing Two Types of Answers
- Creating Loader Objects
- Determining the Right Answer
- Expanding the Click Area
- Images for Questions
- Modifying the Game
- Storing and Retrieving Game Data
- 11. Action Games: Platform Games
- Designing the Game
- Level Design
- Designing the Class
- Planning Which Functions Are Needed
- Building the Class
- Class Definition
- Starting the Game and Level
- Keyboard Input
- The Main Game Loop
- Character Movement
- Scrolling the Game Level
- Checking for Collisions
- Enemy and Player Death
- Collecting Points and Objects
- Showing Player Status
- Ending the Levels and the Game
- The Game Dialog Box
- Modifying the Game
- Designing the Game
- 12. Game Worlds: Driving and Exploration Game
- Creating a Top-Down Driving Game
- Creating a Top-Down World
- Game Design
- The Class Definition
- The Constructor Function
- Finding the Blocks
- Placing the Trash
- Keyboard Input
- The Game Loop
- Moving the Car
- Checking for Trash and Trashcan Collisions
- The Clock
- The Score Indicators
- Game End
- Modifying the Game
- Building a Flash Racing Game
- Racing Game Elements
- Making the Track
- Sound Effects
- Constants and Variables
- Starting the Game
- The Main Game Loop
- Car Movement
- Checking Progress
- The Countdown and the Clock
- Game Over
- Modifying the Game
- Creating a Top-Down Driving Game
- Index
Copyright Gary Rosenzweig
