Game Development Reference
In-Depth Information
General Flash
Flash Enabled : www.flashenabledblog.com
ActionScript.org : www.actionscript.org/
Flash Kit : www.flashkit.com/
Scott Jeppesen : scottjeppesen.blogspot.com/
Flash Focus : www.flashfocus.nl/
Kirupa : www.kirupa.com
Preparing to create our Tunnel Panic game
Our game will make use of the game com.efg.framework package along with some additions for
preloading and using Mochi Media services.
No matter if you are using Flex, Flash Develop, Flash Builder, or the Flash IDE, you should create
a new project folder to hold all of the code for this game.
Like all of the games in the topic, Tunnel Panic will use the framework package structure we
created in Chapter 2 (and have evolved over the last 10 chapters). Let's begin by creating the
package necessary for our game in both the Flash IDE and Flash Develop (for use with the Flex
SDK).
Creating the game project in the Flash IDE
By now, these steps to create the project in the Flash IDE should look very familiar to you:
1.
Start up your version of Flash. We are using CS3, but this should work exactly the
same in CS4 and CS5.
2.
Create a .fla file in the /source/projects/tunnelpanic/flashIDE/ folder called
tunnelpanic .
3.
In the /source/projects/tunnelpanic/flashIDE folder, create the package structure
for your game: com/efg/games/tunnelpanic/ .
4.
Set the frame rate of the Flash movie to 30 FPS. Set the width to 600 and the height
to 400.
5.
Set the document class to com.efg.games.tunnelpanic.Main .
6.
We have not yet created the Main.as class, so you will see a warning. We are going to
create this later in this chapter.
7.
Now, we need to add the framework reusable class package to the class path for the
FLA file. In the Publish settings, select Flash ActionScript 3 Setting.
8.
Click the Browse to Path button, and find the /source folder we created in Chapter 2 for
the package structure.
Search WWH ::




Custom Search