Game Development Reference
In-Depth Information
Creating the Super Click game project in the Flash Develop
Here are the steps we will go through to create the project in Flash Develop:
1.
Create a folder inside the [source][projects][superclick] folder called flexSDK (if
you have not already done so).
2.
Start Flash Develop, and create a new project. Select Flex 3 Project, and give the project
the name superclick. The location should be the /source/projects/superclick/flexSDK
folder, and the package should be com.efg.games.superclick .
Do not have Flash Develop create a project folder automatically. Make sure Create
Folder For Project is unchecked .
3.
Click the OK button to create the project.
4.
To add the class path to the framework to the project, go to the Project
Properties
Classpaths menu item.
5.
Click the Add Classpath button. Find the /source folder we created earlier, and select the
classes subfolder.
6.
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.
For Flex Builder, Flash Builder, or another IDE, please refer to the documentation provided for
that product to create a new project and set the default compile class.
Here's a note on the Flash Develop and Flash IDE workflow: A common method of Flash
development is to use the Flash IDE for assets and organization and Flash Develop for code
editing. If this is your workflow of choice, you will want to follow the Flash IDE folder and package
structure rather than the Flex SDK folder structure.
The Class file list
The class file list is a list of all the classes that that we will need to create to successfully compile
and run the Super Click game. All of these will reside in the com.efg.games.superclick package:
Main.as (will extend the GameFrameWork.as framework class)
SuperClick.as (will extend the Game.as framework class)
Circle.as
ScoreTextField.as
Creating the Main.as class
Let's get to the goods now. After the next few pages, you will have created your first game within
the framework and will be ready to create the rest of the games in this topic. We covered creating
a project for two different development environments earlier in this chapter. If you have not done
Search WWH ::




Custom Search