Game Development Reference
In-Depth Information
2.
Create a .fla file in the /source/projects/stubgame/flashIDE/ folder called stubgame .
3.
In the /source/projects/stubgame/flashIDE/ folder, create the following package
structure for your game: /com/efg/games/stubgame/
4.
Set the frame rate of the Flash movie to 30 FPS. Set the width and height both to 400.
5.
Set the document class to com.efg.games.stubgame.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.
Add the framework reusable class package to the class path for the .fla file
In the publish settings, select [Flash] [ActionScript 3 Setting].
Click the Browse to Path button and find the /source folder we created earlier for
the package structure. Select the classes folder, and click the choose button.
Now the com.efg.framework package will be available for use when we begin to
create our game. We have not created the framework class files yet, but we will
be doing this very shortly.
Creating the stub game project in Flash Develop
And these are the steps to create the same project using Flash Develop:
1.
Create a folder inside the [source][projects][stubgame] folder called [flexSDK] (if
you have not already done so).
2.
Start Flash Develop, and create a new project:
Select Flex 3 Project.
Give the project the name stubgame .
The location should be the / source/projects/stubgame/flexSDK folder.
The package should be com.efg.games.stubgame .
Do not have Flash Develop create a project folder automatically. Make sure the
Create Folder For Project box is unchecked .
Click the OK button to create the project.
3.
Add the class path to the framework to the project:
Go to the [project]
[properties]
[classpaths] menu item.
Click the add class path button.
Find the /source folder we created earlier, and select the classes subfolder.
Click the ok button and then the apply button.
You now have the basic structure to start creating projects inside the framework. We are now
going to discuss a few topics concerning the structure of the framework classes and then move
into building the reusable framework code.
Search WWH ::




Custom Search