Book Image

Flash Game Development by Example

By : Emanuele Feronato
Book Image

Flash Game Development by Example

By: Emanuele Feronato

Overview of this book

<p>You can't call yourself a Flash game developer unless you know how to build certain essential games, and can quickly use the skills and techniques that make them up.<br /><br />Flash Game Development by Example is an ultra-fast paced game development course. Learn step-by-step how to build 10 classic games. Each game introduces new game development skills, techniques, and concepts. By the end of the book you will have built ten complete games &ndash; and have the skills you need to design and build your own game ideas.<br /><br />The book starts with simple well known puzzle games: Concentration and Minesweeper. After learning the basics of game design you&rsquo;ll introduce AI with a four-in-a-row game. Then as you build your own versions of old arcade games such as Snake, Tetris, and Astro Panic. The book ends with a collection of modern casual classics.</p>
Table of Contents (17 chapters)
Flash Game Development by Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Where to Go Now
Index

Creating documents and objects


Create a new file (File | New) then from New Document window select Actionscript 3.0. Set its properties as width to 640px, height to 480px, background color to #000033 (a dark blue), and frame rate to 30. Also define the Document Class as Main and save the file as bejeweled.fla.

We are using two objects: one with seven frames containing all gems, called gem_mc, and one for the square that will indicate the gems we are selecting, called selector_mc.

All assets will be drawn with registration point at 0,0 and designed to fit in a 60x60 tile.

In bejeweled.fla, create two new Movie Clip symbols and call them selector_mc and gem_mc. Set them as exportable for ActionScript and leave all other settings at their default values, just like you did in previous chapters.

Then draw something like this:

In the upper left corner you can see selector_mc, while the remaining pictures represent the seven gems used in the game.