Game Development Reference
In-Depth Information
6.
Next, change the size of the output and frame rate. Go to the Project Properties
Classpaths menu item again, and set the frame rate to 30 , the width to 384 , and the
height to 404 .
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.
In a Flash Develop / 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.
This is the folder structure for the Flash IDE:
/source/projects/driveshesaid/flashIDE/com/efg/games/driveshesaid/
and for the Flex SDK (using Flash Develop):
/source/projects/driveshesaid/flexSDK/
assets/
bin/
obj/
lib/
src/com/efg/games/driveshesaid/
Updating the Main.as class for Drive She Said
We will be making the most significant changes to the Main.as so far in the topic. It is still going to
be a subclass of GameFrameWork.as , but we will be adding in some new functionality for fading and
moving the game screen as well as adding new text to the LevelInScreen .
Here is the file name and location for the Flash IDE.
/source/projects/driveshesaid/flashIDE/com/efg/games/driveshesaid/Main.as
Here is the file name and location for the Flex SDK.
/source/projects/driveshesaid/flexSDK/src/com/efg/games/driveshesaid/Main.as
And here's the entire Main.as class for Drive She Said:
package com.efg.games.driveshesaid
{
import flash.text.TextFormat;
import flash.text.TextField; //new
import flash.text.TextFormatAlign;
import flash.geom.Point;
import flash.events.Event;
import com.efg.framework.FrameWorkStates;
Search WWH ::




Custom Search