SETTING UP FLASH FOR A MOBILE GAME

When you first start Flash, you will want to start a new Flash Lite Document. In CS3 this is called a Flash File (Mobile). You can find this in the welcome screen or in the 'File > New...' menu.

 

When you create a new Flash Mobile File, you'll notice that Device Central is automatically launched.

 

Device Central

 

Device Central is a little tool that helps you make mobile phone applications. You can use it to test your game without having to send it to your phone everytime you make a change. The panel on the left lists all the device profiles that you have currently downloaded. This is also a good way of seeing if your phone is Flash Lite compatable. You can narrow down the compatable devices by selecting 'Flash Lite 2.0' in the Player Version dropdown box at the top of Device Central. Incompatable devices will be greyed out.

Now, select your phone if it's Flash Lite 2.0 compatable, otherwise you can use my phone's profile, a Nokia 6300. Make sure that the Player Version is set to Flash Lite 2.0 and the ActionScript Version is set to ActionScript 2.0.

When you hit Create, Flash will open again and setup the stage for you. This is a good time to Save your project.

An organised directory structure is very important so create a folder called 'Game' and then create a folder inside Game called 'flash'.

Folder Structure

 

Now save your document in the flash folder and call it 'main.fla'.

 

Ok, now you are ready to play around in Flash a bit. For this game we are going to use a visual technique to help us create this game. Rather than just putting all the code for our whole game on one frame, we're going to use the Flash API (Application Programming Interface - google this if you like coding) to make things easier.

 

1. Add a new Layer and call it 'as' (for ActionScript). You can do this by clicking on the little icon that looks like a folded page.

 

New Layer

 

2. Add a new Keyframe for the first five frames of your 'as' layer. You can do this by clicking on the frame and pressing F6 or go to 'Insert > Timeline > Keyframe'.

 

Keyframes

 

What we've done here is split our timeline up into stages. The frames are used for the following:

 

Frame 1: Title Screen

Frame 2: Game Initialisation

Frame 3 - 4: Game Loop

Frame 5: Game Over Screen