Game Development Reference
In-Depth Information
Figure 12-1. The Flash Develop Compiler Options screen
Adding the Preloader class code
Next, we need to create a new class called Preloader.as :
package com.efg.games.tunnelpanic
{
//Must set compiler option of "-frame start Main" in Additional compiler options
//for this to work.
//not needed with Mochi pre-loader ad
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.utils.getDefinitionByName;
public class Preloader extends MovieClip
{
private var appBackBD:BitmapData = new BitmapData(600, 400, false, 0x000000);
private var appBackBitmap:Bitmap = new Bitmap(appBackBD);
Search WWH ::




Custom Search