Section 1
//TCircleCollision (com.chocorobokun.CollisionDetection.TCircleCollision)
package com.chocorobokun.CollisionDetection {
import flash.display.*;
public class TCircleCollision {
private var objA:Sprite;
private var objB:Sprite;
private static var allowInstantiation:Boolean;
private static var instance:TCircleCollision;
public function TCircleCollision(){
if (!allowInstantiation){
throw (new Error("Error: use getInstance() instead of new"));
};
}
public function checkCollision(_arg1:Sprite, _arg2:Sprite, _arg3:int=0, _arg4:int=0):Boolean{
var _local5:Boolean;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (_arg3 == 0){
_local6 = (_arg1.width / 2);
} else {
_local6 = _arg3;
};
if (_arg4 == 0){
_local7 = (_arg2.width / 2);
} else {
_local7 = _arg4;
};
_local8 = (_arg1.x - _arg2.x);
_local9 = (_arg1.y - _arg2.y);
_local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
if (_local10 <= (_local6 + _local7)){
_local5 = true;
} else {
_local5 = false;
};
return (_local5);
}
public static function getInstance():TCircleCollision{
if (!instance){
allowInstantiation = true;
instance = new (TCircleCollision);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.chocorobokun.CollisionDetection
Section 2
//AchievementManager (com.chocorobokun.managers.AchievementManager)
package com.chocorobokun.managers {
public class AchievementManager {
private var callback:Function;
private var initiated:Boolean;
private var numIndex:int;
private var achievementArray:Array;
private static var allowInstantiation:Boolean;
private static var instance:AchievementManager;
public function AchievementManager(){
if (!allowInstantiation){
throw (new Error("Error: use AchievementManager.getInstance() instead of new"));
};
}
public function setAchievement(_arg1:int, _arg2:int, _arg3:Boolean=true):Boolean{
if (((!(_arg3)) && ((achievementArray[_arg1][numIndex] >= _arg2)))){
return (false);
};
if (achievementArray[_arg1][numIndex] <= 0){
return (false);
};
achievementArray[_arg1][numIndex] = (achievementArray[_arg1][numIndex] - _arg2);
if (achievementArray[_arg1][numIndex] <= 0){
if (callback != null){
callback();
};
return (true);
//unresolved jump
};
return (false);
}
public function init(_arg1:Array, _arg2:int, _arg3:Function=null):void{
if (!initiated){
achievementArray = _arg1.concat();
numIndex = _arg2;
callback = _arg3;
initiated = true;
};
}
public static function getInstance():AchievementManager{
if (!instance){
allowInstantiation = true;
instance = new (AchievementManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.chocorobokun.managers
Section 3
//LevelManager (com.chocorobokun.managers.LevelManager)
package com.chocorobokun.managers {
import flash.display.*;
public class LevelManager {
private var bestLevel:int;// = 0
private var levelsData:Array;
private var currentLevel:int;// = 0
private var main:Sprite;
private var initiated:Boolean;// = false
private static var allowInstantiation:Boolean;
private static var instance:LevelManager;
public function LevelManager(){
initiated = false;
levelsData = [];
currentLevel = 0;
bestLevel = 0;
super();
if (!allowInstantiation){
throw (new Error("Error: use LevelManager.getInstance() instead of new"));
};
}
public function setLevel(_arg1:int){
currentLevel = _arg1;
bestLevel = _arg1;
}
public function getCurrentLevel():int{
return (currentLevel);
}
public function getLevelProp(_arg1:int){
return (levelsData[_arg1]);
}
public function setCurrentLevel(_arg1:int){
currentLevel = _arg1;
}
public function init(_arg1:Sprite, _arg2:Array){
if (!initiated){
main = _arg1;
levelsData = _arg2;
initiated = true;
};
}
public function getBestLevel():int{
return (bestLevel);
}
public function setBestLevel(_arg1:int){
bestLevel = _arg1;
}
public static function getInstance():LevelManager{
if (!instance){
allowInstantiation = true;
instance = new (LevelManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.chocorobokun.managers
Section 4
//ScreenManager (com.chocorobokun.managers.ScreenManager)
package com.chocorobokun.managers {
import flash.display.*;
import flash.utils.*;
public class ScreenManager {
private var screenDict:Dictionary;
public var currentScreen:String;
private var screenArray:Array;
private var view:DisplayObjectContainer;
private var activeScreenArray:Array;
private var initiated:Boolean;// = false
private var main:Sprite;
private var prevScreen:String;
private static var allowInstantiation:Boolean;
private static var instance:ScreenManager;
public function ScreenManager(){
initiated = false;
activeScreenArray = [];
super();
screenDict = new Dictionary(true);
screenArray = [];
if (!allowInstantiation){
throw (new Error("Error: use ScreenManager.getInstance() instead of new"));
};
}
public function removeScreen(_arg1:String){
var _local2:Object;
var _local3:*;
_local2 = screenDict[_arg1];
view.removeChild(_local2.screen);
trace((_local2.name + " Removed!!"));
if (_arg1 == currentScreen){
for (_local3 in activeScreenArray) {
if (activeScreenArray[_local3] == currentScreen){
activeScreenArray.splice(_local3, 1);
break;
};
};
if (activeScreenArray[(activeScreenArray.length - 1)]){
currentScreen = activeScreenArray[(activeScreenArray.length - 1)];
} else {
currentScreen = null;
};
};
trace(("CURRENT SCREEN IS " + currentScreen));
}
public function init(_arg1:Sprite, _arg2:DisplayObjectContainer){
if (!initiated){
main = _arg1;
view = _arg2;
initiated = true;
};
}
public function changeToScreen(_arg1:String, _arg2:Boolean=true, _arg3:Number=0, _arg4:Number=0):void{
var _local5:Object;
var _local6:*;
if (((_arg2) && (currentScreen))){
trace("CURRENT SCREEN DETECTED");
_local5 = screenDict[currentScreen];
view.removeChild(_local5.screen);
for (_local6 in activeScreenArray) {
if (activeScreenArray[_local6] == currentScreen){
activeScreenArray.splice(_local6, 1);
break;
};
};
};
_local5 = screenDict[_arg1];
_local5.screen.x = _arg3;
_local5.screen.y = _arg4;
view.addChild(_local5.screen);
activeScreenArray.push(_arg1);
trace(("CURRENT SCREEN 1:" + currentScreen));
currentScreen = activeScreenArray[(activeScreenArray.length - 1)];
trace(("CURRENT SCREEN 2:" + currentScreen));
}
public function getScreen(_arg1:String){
return (screenDict[_arg1].screen);
}
public function addScreen(_arg1:MovieClip, _arg2:String):Boolean{
var _local3:*;
var _local4:Object;
var _local5:MovieClip;
for (_local3 in screenArray) {
if (screenArray[_local3].name == _arg2){
return (false);
};
};
_local4 = new Object();
_local5 = _arg1;
_local4.name = _arg2;
_local4.screen = _local5;
screenDict[_arg2] = _local4;
screenArray.push(_local4);
trace((_arg2 + " Stored!"));
return (true);
}
public function getCurrentScreenName():String{
return (currentScreen);
}
public static function getInstance():ScreenManager{
if (!instance){
allowInstantiation = true;
instance = new (ScreenManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.chocorobokun.managers
Section 5
//SoundManager (com.chocorobokun.managers.SoundManager)
package com.chocorobokun.managers {
import flash.media.*;
import flash.utils.*;
import flash.net.*;
public class SoundManager {
private var _soundsDict:Dictionary;
private var _sounds:Array;
private static var _instance:SoundManager;
private static var _allowInstance:Boolean;
public function SoundManager(){
this._soundsDict = new Dictionary(true);
this._sounds = new Array();
if (!SoundManager._allowInstance){
throw (new Error("Error: Use SoundManager.getInstance() instead of the new keyword."));
};
}
public function fadeSound(_arg1:String, _arg2:Number=0, _arg3:Number=1):void{
}
public function get sounds():Array{
return (this._sounds);
}
public function getSoundDuration(_arg1:String):Number{
return (this._soundsDict[_arg1].sound.length);
}
public function setSoundVolume(_arg1:String, _arg2:Number):void{
var _local3:Object;
var _local4:SoundTransform;
_local3 = this._soundsDict[_arg1];
_local4 = _local3.channel.soundTransform;
_local4.volume = _arg2;
_local3.channel.soundTransform = _local4;
}
public function getSoundVolume(_arg1:String):Number{
return (this._soundsDict[_arg1].channel.soundTransform.volume);
}
public function addLibrarySound(_arg1, _arg2:String):Boolean{
var _local3:int;
var _local4:Object;
var _local5:Sound;
_local3 = 0;
while (_local3 < this._sounds.length) {
if (this._sounds[_local3].name == _arg2){
return (false);
};
_local3++;
};
_local4 = new Object();
_local5 = new (_arg1);
_local4.name = _arg2;
_local4.sound = _local5;
_local4.channel = new SoundChannel();
_local4.position = 0;
_local4.paused = true;
_local4.volume = 1;
_local4.startTime = 0;
_local4.loops = 0;
_local4.pausedByAll = false;
this._soundsDict[_arg2] = _local4;
this._sounds.push(_local4);
return (true);
}
public function toString():String{
return (getQualifiedClassName(this));
}
public function isSoundPaused(_arg1:String):Boolean{
return (this._soundsDict[_arg1].paused);
}
public function removeAllSounds():void{
var _local1:int;
_local1 = 0;
while (_local1 < this._sounds.length) {
this._sounds[_local1] = null;
_local1++;
};
this._sounds = new Array();
this._soundsDict = new Dictionary(true);
}
public function getSoundPosition(_arg1:String):Number{
return (this._soundsDict[_arg1].channel.position);
}
public function stopAllSounds(_arg1:Boolean=true):void{
var _local2:int;
var _local3:String;
_local2 = 0;
while (_local2 < this._sounds.length) {
_local3 = this._sounds[_local2].name;
if (_arg1){
if (!this._soundsDict[_local3].paused){
this._soundsDict[_local3].pausedByAll = true;
this.stopSound(_local3);
};
} else {
this.stopSound(_local3);
};
_local2++;
};
}
public function removeSound(_arg1:String):void{
var _local2:int;
_local2 = 0;
while (_local2 < this._sounds.length) {
if (this._sounds[_local2].name == _arg1){
this._sounds[_local2] = null;
this._sounds.splice(_local2, 1);
};
_local2++;
};
delete this._soundsDict[_arg1];
}
public function muteAllSounds():void{
var _local1:int;
var _local2:String;
_local1 = 0;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
this.setSoundVolume(_local2, 0);
_local1++;
};
}
public function stopSound(_arg1:String):void{
var _local2:Object;
_local2 = this._soundsDict[_arg1];
_local2.paused = true;
_local2.channel.stop();
_local2.position = _local2.channel.position;
}
public function pauseAllSounds(_arg1:Boolean=true):void{
var _local2:int;
var _local3:String;
_local2 = 0;
while (_local2 < this._sounds.length) {
_local3 = this._sounds[_local2].name;
if (_arg1){
if (!this._soundsDict[_local3].paused){
this._soundsDict[_local3].pausedByAll = true;
this.pauseSound(_local3);
};
} else {
this.pauseSound(_local3);
};
_local2++;
};
}
public function playAllSounds(_arg1:Boolean=false):void{
var _local2:int;
var _local3:String;
_local2 = 0;
while (_local2 < this._sounds.length) {
_local3 = this._sounds[_local2].name;
if (_arg1){
if (this._soundsDict[_local3].pausedByAll){
this._soundsDict[_local3].pausedByAll = false;
this.playSound(_local3);
};
} else {
this.playSound(_local3);
};
_local2++;
};
}
public function addExternalSound(_arg1:String, _arg2:String, _arg3:Number=1000, _arg4:Boolean=false):Boolean{
var _local5:int;
var _local6:Object;
var _local7:Sound;
_local5 = 0;
while (_local5 < this._sounds.length) {
if (this._sounds[_local5].name == _arg2){
return (false);
};
_local5++;
};
_local6 = new Object();
_local7 = new Sound(new URLRequest(_arg1), new SoundLoaderContext(_arg3, _arg4));
_local6.name = _arg2;
_local6.sound = _local7;
_local6.channel = new SoundChannel();
_local6.position = 0;
_local6.paused = true;
_local6.volume = 1;
_local6.startTime = 0;
_local6.loops = 0;
_local6.pausedByAll = false;
this._soundsDict[_arg2] = _local6;
this._sounds.push(_local6);
return (true);
}
public function unmuteAllSounds():void{
var _local1:int;
var _local2:String;
var _local3:Object;
var _local4:SoundTransform;
_local1 = 0;
while (_local1 < this._sounds.length) {
_local2 = this._sounds[_local1].name;
_local3 = this._soundsDict[_local2];
_local4 = _local3.channel.soundTransform;
_local4.volume = _local3.volume;
_local3.channel.soundTransform = _local4;
_local1++;
};
}
public function isSoundPausedByAll(_arg1:String):Boolean{
return (this._soundsDict[_arg1].pausedByAll);
}
public function getSoundObject(_arg1:String):Sound{
return (this._soundsDict[_arg1].sound);
}
public function pauseSound(_arg1:String):void{
var _local2:Object;
_local2 = this._soundsDict[_arg1];
_local2.paused = true;
_local2.position = _local2.channel.position;
_local2.channel.stop();
}
public function playSound(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4:int=0):void{
var _local5:Object;
_local5 = this._soundsDict[_arg1];
_local5.volume = _arg2;
_local5.startTime = _arg3;
_local5.loops = _arg4;
if (_local5.paused){
_local5.channel = _local5.sound.play(_local5.position, _local5.loops, new SoundTransform(_local5.volume));
} else {
_local5.channel = _local5.sound.play(_arg3, _local5.loops, new SoundTransform(_local5.volume));
};
_local5.paused = false;
}
public static function getInstance():SoundManager{
if (SoundManager._instance == null){
SoundManager._allowInstance = true;
SoundManager._instance = new (SoundManager);
SoundManager._allowInstance = false;
};
return (SoundManager._instance);
}
}
}//package com.chocorobokun.managers
Section 6
//IPreloader (com.chocorobokun.preloader.IPreloader)
package com.chocorobokun.preloader {
public interface IPreloader {
function update(_arg1:int):void;
}
}//package com.chocorobokun.preloader
Section 7
//CustomTrigon (com.chocorobokun.util.CustomTrigon)
package com.chocorobokun.util {
public class CustomTrigon {
private static var cAngle:Number;
private static var distY:Number;
private static var allowInstantiation:Boolean;
private static var instance:CustomTrigon;
private static var distX:Number;
public static function getAngle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
distX = (_arg3 - _arg1);
distY = (_arg4 - _arg2);
cAngle = Math.atan2(distY, distX);
return (cAngle);
}
}
}//package com.chocorobokun.util
Section 8
//OpenURL (com.chocorobokun.util.OpenURL)
package com.chocorobokun.util {
import flash.net.*;
public class OpenURL {
public static function callURL(_arg1:String, _arg2:Function=null, _arg3:String="_blank"){
var _local4:URLRequest;
_local4 = new URLRequest(_arg1);
navigateToURL(_local4, _arg3);
if (_arg2 != null){
_arg2();
};
}
}
}//package com.chocorobokun.util
Section 9
//CDK (com.coreyoneil.collision.CDK)
package com.coreyoneil.collision {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.text.*;
import flash.errors.*;
public class CDK {
private var colorTransform1:ColorTransform;
private var colorTransform2:ColorTransform;
private var _returnAngleType:String;
private var pixels1:ByteArray;
private var pixels2:ByteArray;
private var bmdResample:BitmapData;
private var _returnAngle:Boolean;
private var transMatrix2:Matrix;
private var rect1:Rectangle;
private var rect2:Rectangle;
private var transMatrix1:Matrix;
protected var objectCheckArray:Array;
private var _alphaThreshold:Number;
private var item1Registration:Point;
private var bmd1:BitmapData;
private var bmd2:BitmapData;
protected var objectArray:Array;
private var item2Registration:Point;
protected var objectCollisionArray:Array;
private var _numChildren:uint;
private var colorExclusionArray:Array;
public function CDK():void{
if (getQualifiedClassName(this) == "com.coreyoneil.collision::CDK"){
throw (new Error("CDK is an abstract class and is not meant for instantiation - use CollisionGroup or CollisionList"));
};
init();
}
public function get returnAngle():Boolean{
return (_returnAngle);
}
public function set returnAngle(_arg1:Boolean):void{
_returnAngle = _arg1;
}
private function init():void{
objectCheckArray = [];
objectCollisionArray = [];
objectArray = [];
colorExclusionArray = [];
_alphaThreshold = 0;
_returnAngle = true;
_returnAngleType = "RADIANS";
}
protected function findCollisions(_arg1, _arg2):void{
var item1_isText:Boolean;
var item2_isText:Boolean;
var item1xDiff:Number;
var item1yDiff:Number;
var currentObj:*;
var k:uint;
var value1:uint;
var value2:uint;
var collisionPoint:Number;
var overlap:Boolean;
var overlapping:Array;
var locY:Number;
var locX:Number;
var locStage:Point;
var hasColors:int;
var pixelLength:int;
var alpha1:uint;
var alpha2:uint;
var colorFlag:Boolean;
var red1:uint;
var red2:uint;
var green1:uint;
var green2:uint;
var blue1:uint;
var blue2:uint;
var colorObj:Object;
var aPlus:uint;
var aMinus:uint;
var rPlus:uint;
var rMinus:uint;
var gPlus:uint;
var gMinus:uint;
var bPlus:uint;
var bMinus:uint;
var item1Flags:uint;
var item2Flags:uint;
var n:uint;
var angle:Number;
var recordedCollision:Object;
var item1 = _arg1;
var item2 = _arg2;
item1_isText = false;
item2_isText = false;
if ((item1 is TextField)){
item1_isText = ((item1.antiAliasType)=="advanced") ? true : false;
item1.antiAliasType = ((item1.antiAliasType)=="advanced") ? "normal" : item1.antiAliasType;
};
if ((item2 is TextField)){
item2_isText = ((item2.antiAliasType)=="advanced") ? true : false;
item2.antiAliasType = ((item2.antiAliasType)=="advanced") ? "normal" : item2.antiAliasType;
};
colorTransform1 = item1.transform.colorTransform;
colorTransform2 = item2.transform.colorTransform;
item1Registration = new Point();
item2Registration = new Point();
item1Registration = item1.localToGlobal(item1Registration);
item2Registration = item2.localToGlobal(item2Registration);
bmd1 = new BitmapData(item1.width, item1.height, true, 0xFFFFFF);
bmd2 = new BitmapData(item1.width, item1.height, true, 0xFFFFFF);
transMatrix1 = item1.transform.matrix;
currentObj = item1;
while (currentObj.parent != null) {
transMatrix1.concat(currentObj.parent.transform.matrix);
currentObj = currentObj.parent;
};
rect1 = item1.getBounds(currentObj);
if (item1 != currentObj){
rect1.x = (rect1.x + currentObj.x);
rect1.y = (rect1.y + currentObj.y);
};
var _local4 = (item1Registration.x - rect1.left);
item1xDiff = _local4;
transMatrix1.tx = _local4;
_local4 = (item1Registration.y - rect1.top);
item1yDiff = _local4;
transMatrix1.ty = _local4;
transMatrix2 = item2.transform.matrix;
currentObj = item2;
while (currentObj.parent != null) {
transMatrix2.concat(currentObj.parent.transform.matrix);
currentObj = currentObj.parent;
};
transMatrix2.tx = (item2Registration.x - rect1.left);
transMatrix2.ty = (item2Registration.y - rect1.top);
bmd1.draw(item1, transMatrix1, colorTransform1, null, null, true);
bmd2.draw(item2, transMatrix2, colorTransform2, null, null, true);
pixels1 = bmd1.getPixels(new Rectangle(0, 0, bmd1.width, bmd1.height));
pixels2 = bmd2.getPixels(new Rectangle(0, 0, bmd1.width, bmd1.height));
k = 0;
value1 = 0;
value2 = 0;
collisionPoint = -1;
overlap = false;
overlapping = [];
hasColors = colorExclusionArray.length;
pixels1.position = 0;
pixels2.position = 0;
pixelLength = pixels1.length;
while (k < pixelLength) {
k = pixels1.position;
try {
value1 = pixels1.readUnsignedInt();
value2 = pixels2.readUnsignedInt();
} catch(e:EOFError) {
break;
};
alpha1 = ((value1 >> 24) & 0xFF);
alpha2 = ((value2 >> 24) & 0xFF);
if ((((alpha1 > _alphaThreshold)) && ((alpha2 > _alphaThreshold)))){
colorFlag = false;
if (hasColors){
red1 = ((value1 >> 16) & 0xFF);
red2 = ((value2 >> 16) & 0xFF);
green1 = ((value1 >> 8) & 0xFF);
green2 = ((value2 >> 8) & 0xFF);
blue1 = (value1 & 0xFF);
blue2 = (value2 & 0xFF);
n = 0;
while (n < hasColors) {
colorObj = Object(colorExclusionArray[n]);
item1Flags = 0;
item2Flags = 0;
if ((((blue1 >= colorObj.bMinus)) && ((blue1 <= colorObj.bPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((blue2 >= colorObj.bMinus)) && ((blue2 <= colorObj.bPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((green1 >= colorObj.gMinus)) && ((green1 <= colorObj.gPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((green2 >= colorObj.gMinus)) && ((green2 <= colorObj.gPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((red1 >= colorObj.rMinus)) && ((red1 <= colorObj.rPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((red2 >= colorObj.rMinus)) && ((red2 <= colorObj.rPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((alpha1 >= colorObj.aMinus)) && ((alpha1 <= colorObj.aPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((alpha2 >= colorObj.aMinus)) && ((alpha2 <= colorObj.aPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((item1Flags == 4)) || ((item2Flags == 4)))){
colorFlag = true;
};
n = (n + 1);
};
};
if (!colorFlag){
overlap = true;
collisionPoint = (k >> 2);
locY = (collisionPoint / bmd1.width);
locX = (collisionPoint % bmd1.width);
locY = (locY - item1yDiff);
locX = (locX - item1xDiff);
locStage = item1.localToGlobal(new Point(locX, locY));
overlapping.push(locStage);
};
};
};
if (overlap){
angle = (_returnAngle) ? findAngle(item1, item2) : 0;
recordedCollision = {object1:item1, object2:item2, angle:angle, overlapping:overlapping};
objectCollisionArray.push(recordedCollision);
};
if (item1_isText){
item1.antiAliasType = "advanced";
};
if (item2_isText){
item2.antiAliasType = "advanced";
};
_local4 = false;
item2_isText = _local4;
item1_isText = _local4;
}
public function dispose():void{
objectArray = [];
}
public function excludeColor(_arg1:uint, _arg2:uint=0xFF, _arg3:uint=20, _arg4:uint=20, _arg5:uint=20):void{
var _local6:int;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:Object;
_local6 = colorExclusionArray.length;
_local7 = 0;
while (_local7 < _local6) {
if (colorExclusionArray[_local7].color == _arg1){
throw (new Error((("Color could not be added - color already in the exclusion list [" + _arg1) + "]")));
};
_local7++;
};
_local8 = (((_arg1 >> 24) & 0xFF) + _arg2);
_local9 = (_local8 - (_arg2 << 1));
_local10 = (((_arg1 >> 16) & 0xFF) + _arg3);
_local11 = (_local10 - (_arg3 << 1));
_local12 = (((_arg1 >> 8) & 0xFF) + _arg4);
_local13 = (_local12 - (_arg4 << 1));
_local14 = ((_arg1 & 0xFF) + _arg5);
_local15 = (_local14 - (_arg5 << 1));
_local16 = {color:_arg1, aPlus:_local8, aMinus:_local9, rPlus:_local10, rMinus:_local11, gPlus:_local12, gMinus:_local13, bPlus:_local14, bMinus:_local15};
colorExclusionArray.push(_local16);
}
public function get numChildren():uint{
return (objectArray.length);
}
public function get alphaThreshold():Number{
return (_alphaThreshold);
}
public function removeItem(_arg1):void{
var _local2:int;
_local2 = objectArray.indexOf(_arg1);
if (_local2 > -1){
objectArray.splice(_local2, 1);
} else {
throw (new Error((_arg1 + " could not be removed - object not found in item list.")));
};
}
public function set returnAngleType(_arg1:String):void{
_arg1 = _arg1.toUpperCase();
switch (_arg1){
case "DEGREES":
case "DEGREE":
case "DEG":
case "DEGS":
_returnAngleType = "DEGREES";
break;
case "RADIANS":
case "RADIAN":
case "RAD":
case "RADS":
_returnAngleType = "RADIANS";
break;
default:
throw (new Error("returnAngleType expects 'DEGREES' or 'RADIANS'"));
};
}
private function findAngle(_arg1:DisplayObject, _arg2:DisplayObject):Number{
var center:Point;
var pixels:ByteArray;
var columnHeight:uint;
var rowWidth:uint;
var pixel:uint;
var thisAlpha:uint;
var lastAlpha:int;
var edgeArray:Array;
var hasColors:int;
var j:uint;
var edgePoint:int;
var numEdges:int;
var slopeYAvg:Number;
var slopeXAvg:Number;
var average:Number;
var k:uint;
var upperLimit:int;
var colorFlag:Boolean;
var red1:uint;
var green1:uint;
var blue1:uint;
var colorObj:Object;
var a:uint;
var r:uint;
var g:uint;
var b:uint;
var item1Flags:uint;
var n:uint;
var item1 = _arg1;
var item2 = _arg2;
center = new Point((item1.width >> 1), (item1.height >> 1));
pixels = pixels2;
transMatrix2.tx = (transMatrix2.tx + center.x);
transMatrix2.ty = (transMatrix2.ty + center.y);
bmdResample = new BitmapData((item1.width << 1), (item1.height << 1), true, 0xFFFFFF);
bmdResample.draw(item2, transMatrix2, colorTransform2, null, null, true);
pixels = bmdResample.getPixels(new Rectangle(0, 0, bmdResample.width, bmdResample.height));
center.x = (bmdResample.width >> 1);
center.y = (bmdResample.height >> 1);
columnHeight = Math.round(bmdResample.height);
rowWidth = Math.round(bmdResample.width);
edgeArray = [];
hasColors = colorExclusionArray.length;
j = 0;
while (j < columnHeight) {
k = ((j * rowWidth) << 2);
pixels.position = k;
lastAlpha = -1;
upperLimit = (((j + 1) * rowWidth) << 2);
while (k < upperLimit) {
k = pixels.position;
try {
pixel = pixels.readUnsignedInt();
} catch(e:EOFError) {
break;
};
thisAlpha = ((pixel >> 24) & 0xFF);
if (lastAlpha == -1){
lastAlpha = thisAlpha;
} else {
if (thisAlpha > _alphaThreshold){
colorFlag = false;
if (hasColors){
red1 = ((pixel >> 16) & 0xFF);
green1 = ((pixel >> 8) & 0xFF);
blue1 = (pixel & 0xFF);
n = 0;
while (n < hasColors) {
colorObj = Object(colorExclusionArray[n]);
item1Flags = 0;
if ((((blue1 >= colorObj.bMinus)) && ((blue1 <= colorObj.bPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((green1 >= colorObj.gMinus)) && ((green1 <= colorObj.gPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((red1 >= colorObj.rMinus)) && ((red1 <= colorObj.rPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((thisAlpha >= colorObj.aMinus)) && ((thisAlpha <= colorObj.aPlus)))){
item1Flags = (item1Flags + 1);
};
if (item1Flags == 4){
colorFlag = true;
};
n = (n + 1);
};
};
if (!colorFlag){
edgeArray.push((k >> 2));
};
};
};
};
j = (j + 1);
};
numEdges = edgeArray.length;
slopeYAvg = 0;
slopeXAvg = 0;
j = 0;
while (j < numEdges) {
edgePoint = int(edgeArray[j]);
slopeYAvg = (slopeYAvg + (center.y - (edgePoint / rowWidth)));
slopeXAvg = (slopeXAvg + ((edgePoint % rowWidth) - center.x));
j = (j + 1);
};
average = -(Math.atan2(slopeYAvg, slopeXAvg));
average = ((_returnAngleType == "RADIANS")) ? average : (average * 57.2957795);
return (average);
}
public function addItem(_arg1):void{
if ((_arg1 is DisplayObject)){
objectArray.push(_arg1);
} else {
throw (new Error((("Cannot add item: " + _arg1) + " - item must be a Display Object.")));
};
}
public function get returnAngleType():String{
return (_returnAngleType);
}
public function set alphaThreshold(_arg1:Number):void{
if ((((_arg1 <= 1)) && ((_arg1 >= 0)))){
_alphaThreshold = (_arg1 * 0xFF);
} else {
throw (new Error("alphaThreshold expects a value from 0 to 1"));
};
}
public function removeExcludeColor(_arg1:uint):void{
var _local2:Boolean;
var _local3:int;
var _local4:uint;
_local2 = false;
_local3 = colorExclusionArray.length;
_local4 = 0;
while (_local4 < _local3) {
if (colorExclusionArray[_local4].color == _arg1){
colorExclusionArray.splice(_local4, 1);
_local2 = true;
break;
};
_local4++;
};
if (!_local2){
throw (new Error((("Color could not be removed - color not found in exclusion list [" + _arg1) + "]")));
};
}
protected function clearArrays():void{
objectCheckArray = [];
objectCollisionArray = [];
}
}
}//package com.coreyoneil.collision
Section 10
//CollisionList (com.coreyoneil.collision.CollisionList)
package com.coreyoneil.collision {
import flash.display.*;
public class CollisionList extends CDK {
public function CollisionList(_arg1, ... _args):void{
var _local3:uint;
super();
addItem(_arg1);
_local3 = 0;
while (_local3 < _args.length) {
addItem(_args[_local3]);
_local3++;
};
}
public function swapTarget(_arg1):void{
if ((_arg1 is DisplayObject)){
objectArray[0] = _arg1;
} else {
throw (new Error((("Cannot swap target: " + _arg1) + " - item must be a Display Object.")));
};
}
public function checkCollisions():Array{
var _local1:uint;
var _local2:*;
var _local3:DisplayObject;
var _local4:uint;
clearArrays();
_local1 = objectArray.length;
_local2 = DisplayObject(objectArray[0]);
_local4 = 1;
while (_local4 < _local1) {
_local3 = DisplayObject(objectArray[_local4]);
if (_local2.hitTestObject(_local3)){
if ((_local3.width * _local3.height) > (_local2.width * _local2.height)){
objectCheckArray.push([_local2, _local3]);
} else {
objectCheckArray.push([_local3, _local2]);
};
};
_local4++;
};
_local1 = objectCheckArray.length;
_local4 = 0;
while (_local4 < _local1) {
findCollisions(DisplayObject(objectCheckArray[_local4][0]), DisplayObject(objectCheckArray[_local4][1]));
_local4++;
};
return (objectCollisionArray);
}
override public function removeItem(_arg1):void{
var _local2:int;
_local2 = objectArray.indexOf(_arg1);
if (_local2 > 0){
objectArray.splice(_local2, 1);
} else {
if (_local2 == 0){
throw (new Error("You cannot remove the target from CollisionList. Use swapTarget to change the target."));
};
throw (new Error((_arg1 + " could not be removed - object not found in item list.")));
};
}
}
}//package com.coreyoneil.collision
Section 11
//Bullet (com.laststand.bullet.Bullet)
package com.laststand.bullet {
import com.chocorobokun.managers.*;
import com.laststand.manager.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Bullet extends MovieClip {
public var bBox:MovieClip;
private var bulletRange:Number;
public var bulletType:String;
private var sourceAngle:Number;
private var bulletSpeed:Number;// = 50
private var distX:Number;
public var timerTick:Timer;
private var distY:Number;
public var survivorBullet:Boolean;
public var bulletID:int;
public function Bullet(){
bulletSpeed = 50;
super();
addEventListener(Event.ADDED_TO_STAGE, onStage);
}
public function destroy(){
timerTick.stop();
timerTick.removeEventListener(TimerEvent.TIMER, onTick);
removeEventListener(Event.ENTER_FRAME, mainLoop);
}
public function init(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:int=0, _arg7:Boolean=false){
this.alpha = 0;
bulletType = _arg1;
bulletRange = _arg5;
survivorBullet = _arg7;
bulletID = _arg6;
switch (bulletType){
case "bat":
bulletSpeed = 80;
gotoAndStop("flame");
break;
case "flame":
bulletSpeed = 8;
gotoAndStop("flame");
break;
case "granade":
bulletSpeed = 80;
gotoAndStop("granade");
break;
case "big":
bulletSpeed = 80;
gotoAndStop("small");
break;
case "laser":
bulletSpeed = 80;
gotoAndStop("laser");
break;
default:
bulletSpeed = 80;
gotoAndStop("small");
break;
};
sourceAngle = _arg4;
x = _arg2;
y = _arg3;
rotation = (((sourceAngle * 180) / Math.PI) + 180);
distX = (Math.cos(sourceAngle) * bulletSpeed);
distY = (Math.sin(sourceAngle) * bulletSpeed);
if (bulletType == "machineGun"){
if ((MainClass(root).mainStage.weaponInterval % 2) != 0){
x = -100;
y = 600;
var _local8 = WeaponManager.getInstance().weaponAmmoArray;
var _local9:int;
var _local10 = (_local8[_local9] + 1);
_local8[_local9] = _local10;
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("machineGunShotSound");
};
};
};
if (bulletType == "uzi"){
if ((MainClass(root).mainStage.weaponInterval % 2) != 0){
x = -100;
y = 600;
_local8 = WeaponManager.getInstance().weaponAmmoArray;
_local9 = 0;
_local10 = (_local8[_local9] + 1);
_local8[_local9] = _local10;
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("uziShotSound", 1, 500);
};
};
};
if (bulletType == "AK47"){
if ((MainClass(root).mainStage.weaponInterval % 2) != 0){
x = -100;
y = 600;
_local8 = WeaponManager.getInstance().weaponAmmoArray;
_local9 = 0;
_local10 = (_local8[_local9] + 1);
_local8[_local9] = _local10;
};
if ((MainClass(root).mainStage.weaponInterval % 4) == 0){
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("ak47ShotSound");
};
};
};
if (bulletType == "rifle"){
if ((MainClass(root).mainStage.weaponInterval % 3) != 0){
x = -100;
y = 600;
_local8 = WeaponManager.getInstance().weaponAmmoArray;
_local9 = 0;
_local10 = (_local8[_local9] + 1);
_local8[_local9] = _local10;
};
if ((MainClass(root).mainStage.weaponInterval % 4) == 0){
SoundManager.getInstance().stopSound("rifleShotSound");
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("rifleShotSound");
};
};
};
timerTick = new Timer(50, -1);
timerTick.start();
timerTick.addEventListener(TimerEvent.TIMER, onTick);
addEventListener(Event.ENTER_FRAME, mainLoop);
}
private function onTick(_arg1:Event){
this.alpha = ((this.alpha)==1) ? 0 : 1;
}
private function onStage(_arg1:Event){
}
private function mainLoop(_arg1:Event){
this.x = (this.x + distX);
this.y = (this.y + distY);
if (bulletRange > 0){
bulletRange--;
};
if ((((((x < -250)) || ((y < -250)))) || ((y > 700)))){
BulletManager.getInstance().destroyBullet(this);
};
switch (bulletType){
case "bat":
SoundManager.getInstance().stopSound("batMissSound");
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("batMissSound");
};
case "flame":
if (bulletRange == 0){
trace("BULLET DESTROYED");
BulletManager.getInstance().destroyBullet(this);
};
break;
};
}
}
}//package com.laststand.bullet
Section 12
//AchievementData (com.laststand.data.AchievementData)
package com.laststand.data {
public class AchievementData {
public static var achievementDataArray:Array = [["ACHIEVEMENT NAME", "ACHIEVEMENT STATUS", "DESCRIPTION", "COUNTER"], ["Awesome Ak", false, "Kill 50 enemies with Ak-47", 50], ["Badass Bat", false, "Kill 5 enemies with Bat", 5], ["Crazy Uzi", false, "Kill 20 enemies with Uzi", 20], ["Bronze Zombie Killer", false, "Kill 70 enemies in total", 70], ["Silver Zombie Killer", false, "Kill 250 enemies in total", 250], ["Gold Zombie Killer", false, "Kill 500 enemies in total", 500], ["Super Zombie Killer", false, "Kill 850 enemies in total", 850], ["Reinforcements", false, "Find 3 survivors", 3], ["Head Shot Honcho", false, "Complete a level with headshots only", 1], ["Game Complete", false, "Beat the game", 1]];
}
}//package com.laststand.data
Section 13
//EnemyData (com.laststand.data.EnemyData)
package com.laststand.data {
public class EnemyData {
public static var enemyTypeArray:Array = ["bear", "chav", "cop", "disco", "elder", "fatMan", "gothic", "granny", "guy", "mj", "obese", "punk", "schoolGirl"];
public static var enemyDataArray:Array = [["name", "speed", "attackPower", "health"], ["bear", 3, 1, 10], ["chav", 3, 1, 5], ["cop", 3, 1, 5], ["disco", 3, 1, 5], ["elder", 3, 1, 5], ["fatMan", 2, 1, 8], ["gothic", 3, 1, 5], ["granny", 3, 1, 5], ["guy", 3, 1, 5], ["mj", 3, 1, 5], ["obese", 1.5, 1, 8], ["punk", 3, 1, 5], ["schoolGirl", 3, 1, 5]];
}
}//package com.laststand.data
Section 14
//LevelData (com.laststand.data.LevelData)
package com.laststand.data {
public class LevelData {
public static var levelDataArray:Array = [["bear", "chav", "cop", "disco", "elder", "fatMan", "gothic", "granny", "guy", "mj", "obese", "punk", "schoolGirl"], [0, 5, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 0, 0, 5, 0, 0, 1, 0, 0], [0, 8, 0, 0, 0, 1, 0, 6, 1, 0, 0, 1, 0], [0, 10, 0, 4, 0, 1, 0, 6, 0, 0, 2, 0, 1], [0, 5, 0, 4, 0, 2, 0, 10, 0, 1, 3, 1, 4], [0, 7, 1, 3, 0, 2, 0, 7, 1, 1, 3, 0, 2], [0, 10, 0, 5, 0, 5, 0, 8, 2, 1, 3, 1, 2], [0, 5, 0, 9, 0, 2, 6, 10, 3, 1, 5, 1, 5], [1, 10, 0, 10, 0, 2, 0, 10, 4, 1, 3, 1, 3], [2, 10, 0, 4, 0, 2, 0, 10, 4, 1, 3, 1, 2], [8, 5, 0, 10, 0, 2, 0, 5, 6, 1, 3, 10, 4], [3, 15, 0, 10, 0, 2, 0, 10, 7, 1, 3, 1, 5], [8, 5, 0, 10, 0, 2, 0, 5, 8, 1, 3, 1, 5], [12, 10, 0, 10, 0, 2, 0, 5, 6, 1, 3, 1, 3], [20, 15, 0, 10, 0, 2, 0, 10, 7, 1, 3, 1, 4], [20, 10, 0, 10, 8, 2, 0, 10, 0, 1, 3, 1, 4], [11, 10, 0, 10, 0, 9, 0, 10, 8, 1, 5, 1, 4], [13, 10, 0, 10, 0, 7, 0, 10, 7, 1, 5, 1, 4], [10, 5, 3, 15, 0, 7, 0, 10, 8, 1, 5, 1, 4], [10, 5, 3, 15, 0, 7, 0, 10, 8, 1, 5, 1, 4]];
}
}//package com.laststand.data
Section 15
//WeaponData (com.laststand.data.WeaponData)
package com.laststand.data {
public class WeaponData {
public static var weaponNameArray:Array = ["Pistol", "Desert Eagle", "Magnum", "Uzi", "Bat", "AK-47", "Rifle", "Machine Gun", "Flame Thrower", "Laser Gun", "Grenade Launcher"];
public static var weaponDataArray:Array = [["power", "ammo", "range", "reloadTime", "coolDown"], [0.6, 8, 0, 0, 1], [0.8, 8, 0, 0, 1], [1.5, 6, 0, 0, 1], [0.3, 22, 0, 0, 0], [4, 8, 0, 0, 10], [0.45, 30, 0, 0, 0], [0.65, 30, 0, 0, 0], [0.55, 50, 0, 0, 0], [1, 8, 0, 0, 10], [1, 1, 0, 0, 1], [1, 4, 0, 0, 1]];
public static var weaponTypeArray:Array = ["pistol", "dEagle", "magnum", "uzi", "bat", "AK47", "rifle", "machineGun", "flameThrower", "laser", "gLauncher"];
}
}//package com.laststand.data
Section 16
//ZombieAbstract (com.laststand.enemy.ZombieAbstract)
package com.laststand.enemy {
import com.chocorobokun.managers.*;
import com.laststand.manager.*;
import flash.display.*;
import flash.events.*;
import com.chocorobokun.CollisionDetection.*;
import com.coreyoneil.collision.*;
import com.laststand.data.*;
import rl.dev.*;
public class ZombieAbstract extends MovieClip {
protected var walkSpeed:Number;
public var zombieState:String;
protected var boxBody:MovieClip;
protected var standAnim:MovieClip;
protected var headshotAnim:MovieClip;
protected var cdk:CDK;
protected var hitAnim:MovieClip;
protected var health:Number;
public var isDeadAnimFinish:Boolean;
protected var boxHead:MovieClip;
protected var isHitted:Boolean;
public var zombieType:String;
protected var eatAnim:MovieClip;
protected var burnAnim:MovieClip;
protected var explodeAnim:MovieClip;
protected var attackPower:Number;
protected var walkAnim:MovieClip;
protected var dieAnim:MovieClip;
protected var isStatAssigned:Boolean;
public var deadType:String;
public var zombieID:int;
protected var attackAnim:MovieClip;
protected var attackCooldown:int;
public var zombieRow:int;
protected var collisionList:CollisionList;
public static const ZOMBIE_STATE_CHASE:String = "CHASE";
public static const ZOMBIE_STATE_STAND:String = "STAND";
public static const ZOMBIE_STATE_WALK:String = "WALK";
public static const ZOMBIE_STATE_EAT:String = "EAT";
public static const ZOMBIE_STATE_ATTACK:String = "ATTACK";
public static const ZOMBIE_STATE_DIE:String = "DIE";
public function ZombieAbstract(){
assignAnim();
walkSpeed = 1;
addEventListener(Event.ADDED_TO_STAGE, onStage);
}
public function destroy(){
if (hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, mainLoop);
};
}
public function init(_arg1:String){
zombieState = ZOMBIE_STATE_WALK;
isDeadAnimFinish = false;
zombieType = _arg1;
assignStat();
resetAnim();
eatAnim.gotoAndStop(1);
zombieID = EnemyData.enemyTypeArray.indexOf(zombieType);
health = EnemyData.enemyDataArray[(zombieID + 1)][3];
if ((((LevelManager.getInstance().getCurrentLevel() >= 8)) && ((LevelManager.getInstance().getCurrentLevel() <= 10)))){
health = (health + int(((EnemyData.enemyDataArray[(zombieID + 1)][3] * 20) / 100)));
trace("BOOST 20%");
};
if ((((LevelManager.getInstance().getCurrentLevel() >= 11)) && ((LevelManager.getInstance().getCurrentLevel() <= 15)))){
health = (health + int(((EnemyData.enemyDataArray[(zombieID + 1)][3] * 40) / 100)));
trace("BOOST 40%");
};
if ((((LevelManager.getInstance().getCurrentLevel() >= 16)) && ((LevelManager.getInstance().getCurrentLevel() <= 20)))){
health = (health + int(((EnemyData.enemyDataArray[(zombieID + 1)][3] * 60) / 100)));
trace("BOOST 60%");
};
walkAnim.visible = true;
walkAnim.gotoAndPlay(1);
attackCooldown = 0;
zombieRow = (Math.random() * 8);
x = -110;
y = (108 + (zombieRow * 20));
collisionList = new CollisionList(this.boxBody);
addEventListener(Event.ENTER_FRAME, mainLoop);
}
protected function assignStat(){
if (isStatAssigned){
return;
};
isStatAssigned = true;
walkSpeed = EnemyData.enemyDataArray[(EnemyData.enemyTypeArray.indexOf(zombieType) + 1)][1];
attackPower = EnemyData.enemyDataArray[(EnemyData.enemyTypeArray.indexOf(zombieType) + 1)][2];
}
protected function checkCollision(){
var _local1:Array;
var _local2:String;
var _local3:int;
var _local4:*;
_local1 = BulletManager.getInstance().activeBulletArray;
_local2 = "die";
_local3 = 0;
if (_local1.length <= 0){
return;
};
for (_local4 in _local1) {
if (boxBody.hitTestObject(_local1[_local4].bBox)){
if ((((zombieState == ZOMBIE_STATE_WALK)) && ((_local1[_local4].bulletType == "bat")))){
SWFConsole.output("BAT HIT WHEN WALKING");
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("batHitSound");
};
BulletManager.getInstance().destroyBullet(_local1[_local4]);
return;
};
health = (health - WeaponData.weaponDataArray[(_local1[_local4].bulletID + 1)][0]);
switch (_local1[_local4].bulletType){
case "granade":
_local2 = "explode";
zombieDead(_local2);
ParticleManager.getInstance().addBlood((x + 50), _local1[_local4].y, "explosion");
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("granadeShotSound");
};
break;
case "flame":
_local2 = "burn";
zombieDead(_local2);
break;
case "big":
if (health <= 0){
zombieDead(_local2);
};
ParticleManager.getInstance().addBlood((x + 50), _local1[_local4].y, "big");
break;
case "laser":
_local2 = "explode";
zombieDead(_local2);
break;
default:
if (_local1[_local4].bulletType == "bat"){
hitted();
};
if (health <= 0){
zombieDead(_local2);
};
ParticleManager.getInstance().addBlood((x + 50), _local1[_local4].y, "small");
break;
};
BulletManager.getInstance().destroyBullet(_local1[_local4]);
break;
};
if (boxHead.hitTestObject(_local1[_local4].bBox)){
switch (_local1[_local4].bulletType){
case "granade":
_local2 = "explode";
zombieDead(_local2);
ParticleManager.getInstance().addBlood((x + 50), _local1[_local4].y, "explosion");
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("granadeShotSound");
};
break;
case "flame":
_local2 = "burn";
zombieDead(_local2);
break;
case "big":
health = (health - (WeaponData.weaponDataArray[(_local1[_local4].bulletID + 1)][0] + int((Math.random() * 2))));
ParticleManager.getInstance().addBlood((x + 50), (y + 17), "small");
if (health <= 0){
zombieDead("headshot");
};
break;
case "laser":
_local2 = "explode";
zombieDead(_local2);
break;
default:
health = (health - (WeaponData.weaponDataArray[(_local1[_local4].bulletID + 1)][0] + int((Math.random() * 2))));
ParticleManager.getInstance().addBlood((x + 50), (y + 17), "small");
if (_local1[_local4].bulletType == "bat"){
hitted();
};
if (health <= 0){
zombieDead("headshot");
};
break;
};
if (_local1[_local4].bulletType != "laser"){
BulletManager.getInstance().destroyBullet(_local1[_local4]);
};
break;
};
};
}
protected function onDie(){
if (this[(deadType + "Anim")].currentFrame == this[(deadType + "Anim")].totalFrames){
this[(deadType + "Anim")].stop();
isDeadAnimFinish = true;
MainClass(root).mainStage.checkIfLevelComplete();
destroy();
return;
};
if (MainClass(root).mainStage.isPaused){
this[(deadType + "Anim")].stop();
} else {
this[(deadType + "Anim")].play();
};
}
protected function onStage(_arg1:Event){
}
protected function resetAnim(){
eatAnim.visible = false;
explodeAnim.visible = false;
burnAnim.visible = false;
headshotAnim.visible = false;
dieAnim.visible = false;
hitAnim.visible = false;
attackAnim.visible = false;
walkAnim.visible = false;
standAnim.visible = false;
}
protected function onChase(){
checkCollision();
if (isHitted){
return;
};
if (MainClass(root).mainStage.isPaused){
walkAnim.stop();
return;
};
walkAnim.play();
if ((MainClass(root).mainStage.mainChar.x - 50) > x){
x++;
};
if (MainClass(root).mainStage.mainChar.y >= y){
y++;
} else {
y--;
};
if (((TCircleCollision.getInstance().checkCollision(this, MainClass(root).mainStage.mainChar, 10)) && (((((y - MainClass(root).mainStage.mainChar.y) <= 10)) && (((y - MainClass(root).mainStage.mainChar.y) > -10)))))){
zombieState = ZOMBIE_STATE_EAT;
resetAnim();
eatAnim.visible = true;
eatAnim.play();
MainClass(root).mainStage.isDead = true;
};
}
protected function assignAnim():void{
}
public function zombieDead(_arg1:String){
zombieState = ZOMBIE_STATE_DIE;
resetAnim();
deadType = _arg1;
this[(deadType + "Anim")].visible = true;
this[(deadType + "Anim")].gotoAndPlay(1);
if (deadType != "headshot"){
MainClass(root).mainStage.defaultZombieDead++;
};
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_BRONZEZOMBIEKILLER, 1)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_BRONZEZOMBIEKILLER);
};
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_SILVERZOMBIEKILLER, 1)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_SILVERZOMBIEKILLER);
};
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_GOLDZOMBIEKILLER, 1)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_GOLDZOMBIEKILLER);
};
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_SUPERZOMBIEKILLER, 1)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_SUPERZOMBIEKILLER);
};
switch (WeaponManager.getInstance().weaponUsedArray[0]){
case "bat":
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_BADASSBAT, 1)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_BADASSBAT);
};
break;
case "uzi":
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_CRAZYUZI, 1)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_CRAZYUZI);
};
break;
case "AK47":
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_AWESOMEAK, 1)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_AWESOMEAK);
};
break;
};
}
protected function hitted(){
resetAnim();
if (!MainClass(root).mainStage.isMute){
SoundManager.getInstance().playSound("batHitSound");
};
hitAnim.visible = true;
hitAnim.gotoAndPlay(1);
isHitted = true;
}
protected function onClick(_arg1:Event){
trace("CLICK");
zombieDead("die");
}
protected function mainLoop(_arg1:Event){
if (zombieState == ZOMBIE_STATE_ATTACK){
if (attackAnim.currentFrame == int((attackAnim.totalFrames / 2))){
if (MainClass(root).mainStage.isPaused){
attackAnim.stop();
return;
};
attackAnim.play();
if (MainClass(root).mainStage.barricadeHealth > 0){
MainClass(root).mainStage.barricadeHealth = (MainClass(root).mainStage.barricadeHealth - attackPower);
} else {
zombieState = ZOMBIE_STATE_CHASE;
resetAnim();
walkAnim.visible = true;
};
};
checkCollision();
};
if (zombieState == ZOMBIE_STATE_WALK){
if (MainClass(root).mainStage.isPaused){
walkAnim.stop();
return;
};
walkAnim.play();
checkCollision();
if (!isHitted){
x = (x + walkSpeed);
if (x > 510){
if (MainClass(root).mainStage.isPaused){
attackAnim.stop();
return;
};
zombieState = ZOMBIE_STATE_ATTACK;
resetAnim();
attackAnim.visible = true;
attackAnim.play();
};
};
};
if (zombieState == ZOMBIE_STATE_DIE){
onDie();
};
if (zombieState == ZOMBIE_STATE_CHASE){
onChase();
};
if (isHitted){
if (hitAnim.currentFrame == hitAnim.totalFrames){
isHitted = false;
switch (zombieState){
case ZOMBIE_STATE_ATTACK:
resetAnim();
attackAnim.visible = true;
attackAnim.gotoAndPlay(1);
break;
case ZOMBIE_STATE_WALK:
case ZOMBIE_STATE_CHASE:
resetAnim();
walkAnim.visible = true;
walkAnim.gotoAndPlay(1);
break;
case ZOMBIE_STATE_DIE:
break;
};
};
};
}
}
}//package com.laststand.enemy
Section 17
//ZombieBear (com.laststand.enemy.ZombieBear)
package com.laststand.enemy {
import flash.display.*;
public class ZombieBear extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieBear(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 18
//ZombieChav (com.laststand.enemy.ZombieChav)
package com.laststand.enemy {
import flash.display.*;
public class ZombieChav extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieChav(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 19
//ZombieCop (com.laststand.enemy.ZombieCop)
package com.laststand.enemy {
import flash.display.*;
public class ZombieCop extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieCop(){
walkSpeed = 1;
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 20
//ZombieDisco (com.laststand.enemy.ZombieDisco)
package com.laststand.enemy {
import flash.display.*;
public class ZombieDisco extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieDisco(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 21
//ZombieElder (com.laststand.enemy.ZombieElder)
package com.laststand.enemy {
import flash.display.*;
public class ZombieElder extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieElder(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 22
//ZombieFatMan (com.laststand.enemy.ZombieFatMan)
package com.laststand.enemy {
import flash.display.*;
public class ZombieFatMan extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieFatMan(){
walkSpeed = 1;
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 23
//ZombieGothic (com.laststand.enemy.ZombieGothic)
package com.laststand.enemy {
import flash.display.*;
public class ZombieGothic extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieGothic(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 24
//ZombieGranny (com.laststand.enemy.ZombieGranny)
package com.laststand.enemy {
import flash.display.*;
import flash.events.*;
public class ZombieGranny extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieGranny(){
walkSpeed = 1;
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
override protected function mainLoop(_arg1:Event){
if (zombieState == ZOMBIE_STATE_ATTACK){
if (attackAnim.currentFrame == int((attackAnim.totalFrames / 2))){
if (MainClass(root).mainStage.isPaused){
attackAnim.stop();
return;
};
attackAnim.play();
if (MainClass(root).mainStage.barricadeHealth > 0){
MainClass(root).mainStage.barricadeHealth = (MainClass(root).mainStage.barricadeHealth - attackPower);
} else {
zombieState = ZOMBIE_STATE_CHASE;
resetAnim();
walkAnim.visible = true;
};
};
checkCollision();
};
if (zombieState == ZOMBIE_STATE_WALK){
if (MainClass(root).mainStage.isPaused){
walkAnim.stop();
return;
};
walkAnim.play();
if (!isHitted){
if ((((this.walkAnim.currentFrame > 7)) && ((this.walkAnim.currentFrame < 15)))){
x = (x + walkSpeed);
};
if (x > 510){
zombieState = ZOMBIE_STATE_ATTACK;
if (MainClass(root).mainStage.isPaused){
attackAnim.stop();
return;
};
resetAnim();
attackAnim.visible = true;
attackAnim.play();
};
};
checkCollision();
};
if (zombieState == ZOMBIE_STATE_DIE){
onDie();
};
if (zombieState == ZOMBIE_STATE_CHASE){
onChase();
};
if (isHitted){
if (hitAnim.currentFrame == hitAnim.totalFrames){
isHitted = false;
switch (zombieState){
case ZOMBIE_STATE_ATTACK:
resetAnim();
attackAnim.visible = true;
attackAnim.gotoAndPlay(1);
break;
case ZOMBIE_STATE_WALK:
case ZOMBIE_STATE_CHASE:
resetAnim();
walkAnim.visible = true;
walkAnim.gotoAndPlay(1);
break;
case ZOMBIE_STATE_DIE:
break;
};
};
};
}
}
}//package com.laststand.enemy
Section 25
//ZombieGuy (com.laststand.enemy.ZombieGuy)
package com.laststand.enemy {
import flash.display.*;
public class ZombieGuy extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieGuy(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 26
//ZombieMJ (com.laststand.enemy.ZombieMJ)
package com.laststand.enemy {
import flash.display.*;
public class ZombieMJ extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieMJ(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 27
//ZombieObese (com.laststand.enemy.ZombieObese)
package com.laststand.enemy {
import flash.display.*;
public class ZombieObese extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieObese(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 28
//ZombiePunk (com.laststand.enemy.ZombiePunk)
package com.laststand.enemy {
import flash.display.*;
public class ZombiePunk extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombiePunk(){
trace("CALL ZOMBIE");
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 29
//ZombieSchoolGirl (com.laststand.enemy.ZombieSchoolGirl)
package com.laststand.enemy {
import flash.display.*;
public class ZombieSchoolGirl extends ZombieAbstract {
public var attack:MovieClip;
public var die:MovieClip;
public var headshot:MovieClip;
public var explode:MovieClip;
public var eat:MovieClip;
public var bBoxBody:MovieClip;
public var bBoxHead:MovieClip;
public var hit:MovieClip;
public var walk:MovieClip;
public var burn:MovieClip;
public var stand:MovieClip;
public function ZombieSchoolGirl(){
walkSpeed = 1;
}
override protected function assignAnim():void{
explodeAnim = explode;
eatAnim = eat;
burnAnim = burn;
headshotAnim = headshot;
dieAnim = die;
hitAnim = hit;
attackAnim = attack;
walkAnim = walk;
standAnim = stand;
boxBody = bBoxBody;
boxHead = bBoxHead;
}
}
}//package com.laststand.enemy
Section 30
//BulletManager (com.laststand.manager.BulletManager)
package com.laststand.manager {
import com.laststand.bullet.*;
import de.polygonal.core.*;
public class BulletManager {
private var initiated:Boolean;// = false
public var activeBulletArray:Array;
private var main;
public var bulletPool:ObjectPool;
private static var allowInstantiation:Boolean;
private static var instance:BulletManager;
public function BulletManager(){
initiated = false;
super();
if (!allowInstantiation){
throw (new Error("Error: use EnemyManager.getInstance() instead of new"));
};
}
public function addBullet(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:int=0, _arg7:Boolean=false){
var _local8:Bullet;
if (!initiated){
throw (new Error("Error: initiate the manager first before use"));
};
_local8 = bulletPool.object;
main.addChild(_local8);
activeBulletArray.push(_local8);
_local8.init(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
private function setPool(){
bulletPool = new ObjectPool(true);
bulletPool.allocate(1, Bullet);
}
public function init(_arg1){
if (!initiated){
main = _arg1;
activeBulletArray = [];
setPool();
initiated = true;
};
}
public function destroyBullet(_arg1:Bullet){
var _local2:*;
_arg1.destroy();
main.removeChild(_arg1);
bulletPool.object = _arg1;
for (_local2 in activeBulletArray) {
if (activeBulletArray[_local2] == _arg1){
activeBulletArray.splice(_local2, 1);
};
};
}
public static function getInstance():BulletManager{
if (!instance){
allowInstantiation = true;
instance = new (BulletManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.laststand.manager
Section 31
//EnemyManager (com.laststand.manager.EnemyManager)
package com.laststand.manager {
import com.laststand.enemy.*;
import de.polygonal.core.*;
public class EnemyManager {
private var copPool:ObjectPool;
private var elderPool:ObjectPool;
private var main;
private var gothicPool:ObjectPool;
private var guyPool:ObjectPool;
public var activeEnemyArray:Array;
private var mjPool:ObjectPool;
private var chavPool:ObjectPool;
private var grannyPool:ObjectPool;
private var initiated:Boolean;// = false
private var obesePool:ObjectPool;
private var bearPool:ObjectPool;
private var schoolGirlPool:ObjectPool;
private var discoPool:ObjectPool;
private var fatManPool:ObjectPool;
private var punkPool:ObjectPool;
private static var allowInstantiation:Boolean;
private static var instance:EnemyManager;
public function EnemyManager(){
initiated = false;
super();
if (!allowInstantiation){
throw (new Error("Error: use EnemyManager.getInstance() instead of new"));
};
}
public function init(_arg1){
if (!initiated){
main = _arg1;
activeEnemyArray = [];
setPool();
initiated = true;
};
}
private function getEnemy(_arg1:String){
return (this[(_arg1 + "Pool")].object);
}
public function clearEnemy(){
var _local1:*;
trace(("CLEAR ENEMY : " + activeEnemyArray.length));
for (_local1 in activeEnemyArray) {
main.removeChild(activeEnemyArray[_local1]);
activeEnemyArray[_local1].destroy();
this[(activeEnemyArray[_local1].zombieType + "Pool")].object = activeEnemyArray[_local1];
};
activeEnemyArray = [];
}
private function setPool(){
chavPool = new ObjectPool(true);
chavPool.allocate(1, ZombieChav);
grannyPool = new ObjectPool(true);
grannyPool.allocate(1, ZombieGranny);
copPool = new ObjectPool(true);
copPool.allocate(1, ZombieCop);
fatManPool = new ObjectPool(true);
fatManPool.allocate(1, ZombieFatMan);
schoolGirlPool = new ObjectPool(true);
schoolGirlPool.allocate(1, ZombieSchoolGirl);
bearPool = new ObjectPool(true);
bearPool.allocate(1, ZombieBear);
discoPool = new ObjectPool(true);
discoPool.allocate(1, ZombieDisco);
elderPool = new ObjectPool(true);
elderPool.allocate(1, ZombieElder);
gothicPool = new ObjectPool(true);
gothicPool.allocate(1, ZombieGothic);
guyPool = new ObjectPool(true);
guyPool.allocate(1, ZombieGuy);
mjPool = new ObjectPool(true);
mjPool.allocate(1, ZombieMJ);
obesePool = new ObjectPool(true);
obesePool.allocate(1, ZombieObese);
punkPool = new ObjectPool(true);
punkPool.allocate(1, ZombiePunk);
}
private function manageDepth(){
var _local1:*;
trace("MANAGE DEPTH");
activeEnemyArray.sort(order);
for (_local1 in activeEnemyArray) {
main.addChild(activeEnemyArray[_local1]);
};
}
private function order(_arg1:ZombieAbstract, _arg2:ZombieAbstract){
var _local3:int;
var _local4:int;
_local3 = ((_arg1.zombieRow * 100) + _arg1.zombieID);
_local4 = ((_arg2.zombieRow * 100) + _arg2.zombieID);
if (_local3 < _local4){
return (-1);
};
if (_local3 > _local4){
return (1);
};
return (0);
}
public function addEnemy(_arg1:String){
var _local2:ZombieAbstract;
if (!initiated){
throw (new Error("Error: initiate the manager first before use"));
};
_local2 = getEnemy(_arg1);
main.addChild(_local2);
activeEnemyArray.push(_local2);
_local2.init(_arg1);
manageDepth();
}
public function destroyEnemy(_arg1:ZombieAbstract){
var _local2:*;
main.removeChild(_arg1);
_arg1.destroy();
this[(_arg1.zombieType + "Pool")].object = _arg1;
for (_local2 in activeEnemyArray) {
if (activeEnemyArray[_local2] == _arg1){
activeEnemyArray.splice(_local2, 1);
};
};
}
private function storeEnemy(_arg1){
}
public static function getInstance():EnemyManager{
if (!instance){
allowInstantiation = true;
instance = new (EnemyManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.laststand.manager
Section 32
//GameAchievementManager (com.laststand.manager.GameAchievementManager)
package com.laststand.manager {
import com.laststand.world.*;
public class GameAchievementManager {
private var achievementArray:Array;
private var initiated:Boolean;
private var main:MainStage;
public static const ACHIEVEMENT_GOLDZOMBIEKILLER:int = 6;
public static const ACHIEVEMENT_AWESOMEAK:int = 1;
public static const ACHIEVEMENT_HEADSHOTHONCHO:int = 9;
public static const ACHIEVEMENT_REINFORCEMENTS:int = 8;
public static const ACHIEVEMENT_GAMECOMPLETE:int = 10;
public static const ACHIEVEMENT_SUPERZOMBIEKILLER:int = 7;
public static const ACHIEVEMENT_CRAZYUZI:int = 3;
public static const ACHIEVEMENT_BADASSBAT:int = 2;
public static const ACHIEVEMENT_SILVERZOMBIEKILLER:int = 5;
public static const ACHIEVEMENT_BRONZEZOMBIEKILLER:int = 4;
private static var allowInstantiation:Boolean;
private static var instance:GameAchievementManager;
public function GameAchievementManager(){
if (!allowInstantiation){
throw (new Error("Error: use AchievementManager.getInstance() instead of new"));
};
}
public function bestowAchievement(_arg1:int){
if (!initiated){
return;
};
if (achievementArray[_arg1][1]){
return;
};
achievementArray[_arg1][1] = true;
main.addChild(main.achievementPanel);
main.achievementPanel[(("achievement" + _arg1) + "Anim")].gotoAndPlay(1);
}
public function init(_arg1:MainStage, _arg2:Array):void{
if (initiated){
return;
};
main = _arg1;
achievementArray = _arg2.concat();
initiated = true;
}
public function isAchievementAchieved(_arg1:int):Boolean{
return (this.achievementArray[_arg1][1]);
}
public static function getInstance():GameAchievementManager{
if (!instance){
allowInstantiation = true;
instance = new (GameAchievementManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.laststand.manager
Section 33
//LevelPropertiesManager (com.laststand.manager.LevelPropertiesManager)
package com.laststand.manager {
import com.laststand.world.*;
import flash.events.*;
import flash.utils.*;
import com.laststand.data.*;
public class LevelPropertiesManager {
private var main:MainStage;
private var initiated:Boolean;// = false
private var enemyCount:int;
private var levelPropArray:Array;
private var tick:Timer;
private static var allowInstantiation:Boolean;
private static var instance:LevelPropertiesManager;
public function LevelPropertiesManager(){
initiated = false;
super();
if (!allowInstantiation){
throw (new Error("Error: use EnemyManager.getInstance() instead of new"));
};
}
public function startLevel(_arg1:Array){
var _local2:*;
levelPropArray = _arg1.concat();
enemyCount = 0;
for (_local2 in levelPropArray) {
enemyCount = (enemyCount + levelPropArray[_local2]);
};
tick = new Timer(1000, 1);
tick.start();
tick.addEventListener(TimerEvent.TIMER, addWave);
}
private function addWave(_arg1:TimerEvent=null){
var _local2:Number;
if (main.isDead){
return;
};
_local2 = int((Math.random() * 13));
if (levelPropArray[_local2] <= 0){
addWave();
return;
};
if (!main.isPaused){
trace(("ADD ZOMBIE" + levelPropArray));
EnemyManager.getInstance().addEnemy(EnemyData.enemyTypeArray[_local2]);
var _local3 = levelPropArray;
var _local4 = _local2;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
enemyCount--;
};
tick.stop();
tick.removeEventListener(TimerEvent.TIMER, addWave);
if (enemyCount <= 0){
return;
};
tick = new Timer(1000, 1);
tick.start();
tick.addEventListener(TimerEvent.TIMER, addWave);
}
public function getEnemyCount():int{
return (enemyCount);
}
public function init(_arg1){
if (!initiated){
main = _arg1;
initiated = true;
};
}
public function clearLevel(){
tick.removeEventListener(TimerEvent.TIMER, addWave);
tick.stop();
EnemyManager.getInstance().clearEnemy();
}
public static function getInstance():LevelPropertiesManager{
if (!instance){
allowInstantiation = true;
instance = new (LevelPropertiesManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.laststand.manager
Section 34
//NPCManager (com.laststand.manager.NPCManager)
package com.laststand.manager {
public class NPCManager {
private var main;
private var activeNPCNum:int;
private var initiated:Boolean;
private static var allowInstantiation:Boolean;
private static var instance:NPCManager;
public function NPCManager(){
if (!allowInstantiation){
throw (new Error("Error: use NPCManager.getInstance() instead of new"));
};
}
public function getActiveNPCNum():int{
return (activeNPCNum);
}
public function init(_arg1){
var _local2:int;
if (!initiated){
main = _arg1;
activeNPCNum = 0;
_local2 = 1;
while (_local2 <= 6) {
main[("npc" + _local2)].init();
_local2++;
};
initiated = true;
};
}
public function clearNPC(){
var _local1:int;
_local1 = 1;
while (_local1 <= activeNPCNum) {
main[("npc" + _local1)].init();
_local1++;
};
activeNPCNum = 0;
}
public function addNPC(_arg1:int=1){
var _local2:int;
if (!initiated){
throw (new Error("Error: initiate the manager first before use"));
};
if ((_arg1 + activeNPCNum) > 6){
_arg1 = (6 - activeNPCNum);
};
if (activeNPCNum >= 6){
return;
};
_local2 = (activeNPCNum + 1);
while (_local2 <= (activeNPCNum + _arg1)) {
main[("npc" + _local2)].activate();
_local2++;
};
activeNPCNum = (activeNPCNum + _arg1);
}
public function resetNPC(){
var _local1:int;
_local1 = 1;
while (_local1 <= activeNPCNum) {
main[("npc" + _local1)].reset();
_local1++;
};
}
public static function getInstance():NPCManager{
if (!instance){
allowInstantiation = true;
instance = new (NPCManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.laststand.manager
Section 35
//ParticleManager (com.laststand.manager.ParticleManager)
package com.laststand.manager {
import com.laststand.particle.*;
import de.polygonal.core.*;
public class ParticleManager {
private var main;
private var initiated:Boolean;
private var bloodPool:ObjectPool;
private static var allowInstantiation:Boolean;
private static var instance:ParticleManager;
public function ParticleManager(){
if (!allowInstantiation){
throw (new Error("Error: use .getInstance() instead of new"));
};
}
public function removeBlood(_arg1:BloodParticle){
_arg1.removeBlood();
main.removeChild(_arg1);
bloodPool.object = _arg1;
}
public function init(_arg1){
if (!initiated){
main = _arg1;
initPool();
initiated = true;
};
}
public function addBlood(_arg1:Number, _arg2:Number, _arg3:String){
var _local4:BloodParticle;
_local4 = bloodPool.object;
main.addChild(_local4);
_local4.x = _arg1;
_local4.y = _arg2;
_local4.init(_arg3);
}
public function initPool(){
bloodPool = new ObjectPool(true);
bloodPool.allocate(1, BloodParticle);
}
public static function getInstance():ParticleManager{
if (!instance){
allowInstantiation = true;
instance = new (ParticleManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.laststand.manager
Section 36
//WeaponManager (com.laststand.manager.WeaponManager)
package com.laststand.manager {
import com.chocorobokun.managers.*;
import com.laststand.data.*;
public class WeaponManager {
private var laserYPos:Number;
private var laserAngle:Number;
public var weaponArray:Array;
public var weaponUsedArray:Array;
private var laserXPos:Number;
private var reloading:Boolean;
private var initiated:Boolean;// = false
public var weaponAmmoArray:Array;
private var main;
private static var allowInstantiation:Boolean;
private static var instance:WeaponManager;
public function WeaponManager(){
initiated = false;
super();
if (!allowInstantiation){
throw (new Error("Error: use .getInstance() instead of new"));
};
}
public function resetWeapon(){
weaponArray = ["pistol"];
weaponUsedArray = ["pistol", ""];
}
public function initWeapon(){
var _local1:*;
resetAnim();
weaponAmmoArray = [];
for (_local1 in weaponUsedArray) {
weaponAmmoArray.push(WeaponData.weaponDataArray[(WeaponData.weaponTypeArray.indexOf(weaponUsedArray[_local1]) + 1)][1]);
};
main.mainChar.torso[(weaponUsedArray[0] + "Shoot")].visible = true;
main.inGameScreen.healthUI.ammoDisp.text = String(weaponAmmoArray[0]);
}
public function reloadWeapon(){
if (isReloading()){
return;
};
resetAnim();
reloading = true;
main.mainChar.torso[(weaponUsedArray[0] + "Load")].visible = true;
main.mainChar.torso[(weaponUsedArray[0] + "Load")].play();
trace(WeaponData.weaponDataArray[(WeaponData.weaponTypeArray.indexOf(weaponUsedArray[0]) + 1)][1]);
if (main.isMute){
return;
};
switch (weaponUsedArray[0]){
case "dEagle":
case "pistol":
SoundManager.getInstance().playSound("pistolReloadSound");
break;
case "magnum":
SoundManager.getInstance().playSound("magnumReloadSound");
break;
case "uzi":
case "AK47":
case "rifle":
case "machineGun":
SoundManager.getInstance().playSound("autoReloadSound");
break;
};
}
public function init(_arg1){
if (initiated){
return;
};
main = _arg1;
weaponArray = ["pistol"];
weaponUsedArray = ["pistol", ""];
weaponAmmoArray = [];
initiated = true;
}
private function resetAnim(){
main.mainChar.torso.rifleStand.visible = false;
main.mainChar.torso.rifleShoot.visible = false;
main.mainChar.torso.rifleLoad.visible = false;
main.mainChar.torso.pistolStand.visible = false;
main.mainChar.torso.pistolShoot.visible = false;
main.mainChar.torso.pistolLoad.visible = false;
main.mainChar.torso.magnumStand.visible = false;
main.mainChar.torso.magnumShoot.visible = false;
main.mainChar.torso.magnumLoad.visible = false;
main.mainChar.torso.uziStand.visible = false;
main.mainChar.torso.uziShoot.visible = false;
main.mainChar.torso.uziLoad.visible = false;
main.mainChar.torso.machineGunStand.visible = false;
main.mainChar.torso.machineGunShoot.visible = false;
main.mainChar.torso.machineGunLoad.visible = false;
main.mainChar.torso.laserStand.visible = false;
main.mainChar.torso.laserShoot.visible = false;
main.mainChar.torso.laserLoad.visible = false;
main.mainChar.torso.dEagleStand.visible = false;
main.mainChar.torso.dEagleShoot.visible = false;
main.mainChar.torso.dEagleLoad.visible = false;
main.mainChar.torso.AK47Stand.visible = false;
main.mainChar.torso.AK47Shoot.visible = false;
main.mainChar.torso.AK47Load.visible = false;
main.mainChar.torso.batStand.visible = false;
main.mainChar.torso.batShoot.visible = false;
main.mainChar.torso.batLoad.visible = false;
main.mainChar.torso.gLauncherStand.visible = false;
main.mainChar.torso.gLauncherShoot.visible = false;
main.mainChar.torso.gLauncherLoad.visible = false;
main.mainChar.torso.flameThrowerStand.visible = false;
main.mainChar.torso.flameThrowerShoot.visible = false;
main.mainChar.torso.flameThrowerLoad.visible = false;
}
public function shootWeapon(){
if (weaponUsedArray[0] == "laser"){
return;
};
if (weaponAmmoArray[0] == 0){
return;
};
main.mainChar.torso[(weaponUsedArray[0] + "Shoot")].visible = true;
main.mainChar.torso[(weaponUsedArray[0] + "Shoot")].gotoAndPlay(1);
var _local1 = weaponAmmoArray;
var _local2:int;
var _local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
main.inGameScreen.healthUI.ammoDisp.text = String(weaponAmmoArray[0]);
if (weaponAmmoArray[0] == 0){
reloadWeapon();
};
if (main.isMute){
return;
};
switch (weaponUsedArray[0]){
case "dEagle":
SoundManager.getInstance().playSound("dEagleShotSound");
break;
case "pistol":
SoundManager.getInstance().playSound("pistolShotSound");
break;
case "magnum":
SoundManager.getInstance().playSound("magnumShotSound", 1, 200);
break;
case "uzi":
case "AK47":
case "rifle":
case "machineGun":
break;
case "laser":
SoundManager.getInstance().playSound("laserShotSound");
break;
case "flameThrower":
SoundManager.getInstance().playSound("flameThrowerShotSound", 1, 1500);
break;
};
}
public function isReloading():Boolean{
return (reloading);
}
public function setWeapon(_arg1:String){
weaponArray.push(_arg1);
}
public function shootLaser(_arg1:Number, _arg2:Number, _arg3:Number){
main.mainChar.torso[(weaponUsedArray[0] + "Shoot")].visible = true;
main.mainChar.torso[(weaponUsedArray[0] + "Shoot")].play();
laserXPos = _arg1;
laserYPos = _arg2;
laserAngle = _arg3;
}
public function render(){
if (reloading){
if (main.mainChar.torso[(weaponUsedArray[0] + "Load")].currentFrame == main.mainChar.torso[(weaponUsedArray[0] + "Load")].totalFrames){
main.mainChar.torso[(weaponUsedArray[0] + "Load")].visible = false;
main.mainChar.torso[(weaponUsedArray[0] + "Shoot")].visible = true;
weaponAmmoArray[0] = WeaponData.weaponDataArray[(WeaponData.weaponTypeArray.indexOf(weaponUsedArray[0]) + 1)][1];
main.inGameScreen.healthUI.ammoDisp.text = String(weaponAmmoArray[0]);
reloading = false;
};
};
if (weaponUsedArray[0] == "laser"){
if (main.mainChar.torso[(weaponUsedArray[0] + "Shoot")].currentFrame == 30){
BulletManager.getInstance().addBullet("laser", ((main.mainChar.x + 37) + (60 * Math.cos(main.shootAngle))), ((main.mainChar.y + 18.5) + (60 * Math.sin(main.shootAngle))), main.shootAngle);
if (!main.isMute){
SoundManager.getInstance().playSound("laserShotSound");
};
};
};
}
public function switchWeapon(){
if (weaponUsedArray[1] == ""){
return;
};
weaponUsedArray.reverse();
weaponAmmoArray.reverse();
resetAnim();
main.mainChar.torso[(weaponUsedArray[0] + "Shoot")].visible = true;
main.mainChar.gas.visible = ((weaponUsedArray[0])=="flameThrower") ? true : false;
main.inGameScreen.healthUI.ammoDisp.text = String(weaponAmmoArray[0]);
}
public function activateWeapon(_arg1:String){
weaponArray.push(_arg1);
}
public static function getInstance():WeaponManager{
if (!instance){
allowInstantiation = true;
instance = new (WeaponManager);
allowInstantiation = false;
};
return (instance);
}
}
}//package com.laststand.manager
Section 37
//NPC (com.laststand.npc.NPC)
package com.laststand.npc {
import com.laststand.manager.*;
import flash.display.*;
import com.laststand.enemy.*;
import flash.events.*;
import com.chocorobokun.util.*;
public dynamic class NPC extends MovieClip {
public const NPC_STATE_SHOOT:String = "SHOOT";
protected const SHOOTING_RANGE:int = 50;
public const NPC_STATE_INACTIVE:String = "INACTIVE";
public const NPC_STATE_RETREAT:String = "RETREAT";
public const NPC_STATE_STAND:String = "STAND";
protected var cooldownTime:int;// = 30
protected var standAnim:MovieClip;
public var yPos:Number;
public var npcState:String;
protected var enemyManager:EnemyManager;
protected var enemyTarget:ZombieAbstract;
protected var retreatAnim:MovieClip;
protected var coolDown:int;
public var xPos:Number;
protected var shootAnim:MovieClip;
public var gunPointMov:MovieClip;
public function NPC(){
cooldownTime = 30;
super();
assignAnim();
enemyManager = EnemyManager.getInstance();
}
protected function resetAnim(){
standAnim.visible = false;
shootAnim.visible = false;
retreatAnim.visible = false;
}
public function activate(){
npcState = NPC_STATE_STAND;
standAnim.visible = true;
}
public function init(){
npcState = NPC_STATE_INACTIVE;
standAnim.visible = false;
shootAnim.visible = false;
retreatAnim.visible = false;
coolDown = 0;
xPos = x;
yPos = y;
addEventListener(Event.ENTER_FRAME, mainLoop);
}
protected function checkDistance(){
var _local1:*;
if (coolDown > 0){
return;
};
if (npcState != NPC_STATE_STAND){
return;
};
for (_local1 in enemyManager.activeEnemyArray) {
if (enemyManager.activeEnemyArray[_local1].zombieState == ZombieAbstract.ZOMBIE_STATE_DIE){
} else {
if ((((((enemyManager.activeEnemyArray[_local1].x > 1)) && ((-(SHOOTING_RANGE) < (enemyManager.activeEnemyArray[_local1].y - this.y))))) && ((SHOOTING_RANGE > (enemyManager.activeEnemyArray[_local1].y - this.y))))){
shootEnemy(enemyManager.activeEnemyArray[_local1]);
coolDown = cooldownTime;
break;
};
};
};
}
public function reset(){
x = xPos;
y = yPos;
if (npcState != NPC_STATE_INACTIVE){
npcState = NPC_STATE_STAND;
};
retreatAnim.visible = false;
}
protected function onShoot(){
if (shootAnim.currentFrame == shootAnim.totalFrames){
npcState = NPC_STATE_STAND;
resetAnim();
standAnim.visible = true;
shootAnim.gotoAndStop(1);
};
}
protected function shootEnemy(_arg1:ZombieAbstract){
if (coolDown > 0){
return;
};
if (MainClass(root).mainStage.isPaused){
return;
};
npcState = NPC_STATE_SHOOT;
BulletManager.getInstance().addBullet("small", (this.x + gunPointMov.x), (this.y + gunPointMov.y), CustomTrigon.getAngle(this.x, this.y, _arg1.x, (_arg1.y + 50)));
resetAnim();
shootAnim.visible = true;
shootAnim.gotoAndPlay(1);
}
protected function assignAnim():void{
}
protected function mainLoop(_arg1:Event){
if (npcState == NPC_STATE_INACTIVE){
return;
};
if (coolDown > 0){
coolDown--;
};
checkDistance();
if ((((MainClass(root).mainStage.barricadeHealth <= 0)) && (!((npcState == NPC_STATE_RETREAT))))){
npcState = NPC_STATE_RETREAT;
resetAnim();
retreatAnim.visible = true;
};
switch (npcState){
case NPC_STATE_STAND:
standAnim.visible = true;
break;
case NPC_STATE_SHOOT:
onShoot();
break;
case NPC_STATE_RETREAT:
if (x < 800){
x++;
};
break;
};
}
}
}//package com.laststand.npc
Section 38
//NPCBush (com.laststand.npc.NPCBush)
package com.laststand.npc {
import com.laststand.manager.*;
import flash.display.*;
import com.laststand.enemy.*;
import flash.events.*;
import com.chocorobokun.util.*;
public class NPCBush extends NPC {
private const WEAPON_BURST_TIME:int = 5;
public var shoot:MovieClip;
public var gunPoint:MovieClip;
private var burstFire:int;// = 0
public var retreat:MovieClip;
public var stand:MovieClip;
public function NPCBush(){
burstFire = 0;
super();
}
override protected function onShoot(){
if (enemyTarget){
burstFire++;
standAnim.visible = false;
shootAnim.visible = true;
if (MainClass(root).mainStage.isPaused){
shootAnim.play();
} else {
shootAnim.stop();
};
BulletManager.getInstance().addBullet("small", (this.x + gunPointMov.x), (this.y + gunPointMov.y), (CustomTrigon.getAngle(this.x, this.y, enemyTarget.x, (enemyTarget.y + 50)) + (int((Math.random() * 5)) / 100)), 0, 3);
if (burstFire == WEAPON_BURST_TIME){
npcState = NPC_STATE_STAND;
coolDown = cooldownTime;
resetAnim();
standAnim.visible = true;
shootAnim.gotoAndStop(1);
burstFire = 0;
};
};
}
override protected function shootEnemy(_arg1:ZombieAbstract){
npcState = NPC_STATE_SHOOT;
enemyTarget = _arg1;
}
override protected function assignAnim():void{
gunPointMov = gunPoint;
shootAnim = shoot;
standAnim = stand;
retreatAnim = retreat;
}
override protected function mainLoop(_arg1:Event){
if ((((npcState == NPC_STATE_INACTIVE)) || (MainClass(root).mainStage.isPaused))){
return;
};
if (coolDown > 0){
coolDown--;
};
checkDistance();
if ((((MainClass(root).mainStage.barricadeHealth <= 0)) && (!((npcState == NPC_STATE_RETREAT))))){
npcState = NPC_STATE_RETREAT;
resetAnim();
retreatAnim.visible = true;
};
switch (npcState){
case NPC_STATE_STAND:
standAnim.visible = true;
break;
case NPC_STATE_SHOOT:
onShoot();
break;
case NPC_STATE_RETREAT:
if (x < 800){
x++;
};
break;
};
}
}
}//package com.laststand.npc
Section 39
//NPCChef (com.laststand.npc.NPCChef)
package com.laststand.npc {
import com.laststand.manager.*;
import flash.display.*;
import com.laststand.enemy.*;
import flash.events.*;
import com.chocorobokun.util.*;
public class NPCChef extends NPC {
private const WEAPON_BURST_TIME:int = 5;
public var shoot:MovieClip;
public var gunPoint:MovieClip;
private var burstFire:int;// = 0
public var retreat:MovieClip;
public var stand:MovieClip;
public function NPCChef(){
burstFire = 0;
super();
}
override protected function onShoot(){
if (enemyTarget){
burstFire++;
standAnim.visible = false;
shootAnim.visible = true;
if (MainClass(root).mainStage.isPaused){
shootAnim.play();
} else {
shootAnim.stop();
};
BulletManager.getInstance().addBullet("small", (this.x + gunPointMov.x), (this.y + gunPointMov.y), (CustomTrigon.getAngle(this.x, this.y, enemyTarget.x, (enemyTarget.y + 50)) + (int((Math.random() * 5)) / 100)), 0, 3);
if (burstFire == WEAPON_BURST_TIME){
npcState = NPC_STATE_STAND;
coolDown = cooldownTime;
resetAnim();
standAnim.visible = true;
shootAnim.gotoAndStop(1);
burstFire = 0;
};
};
}
override protected function shootEnemy(_arg1:ZombieAbstract){
npcState = NPC_STATE_SHOOT;
enemyTarget = _arg1;
}
private function endRifle(_arg1:TimerEvent){
_arg1.currentTarget.stop();
}
override protected function assignAnim():void{
shootAnim = shoot;
standAnim = stand;
retreatAnim = retreat;
gunPointMov = gunPoint;
}
override protected function mainLoop(_arg1:Event){
if ((((npcState == NPC_STATE_INACTIVE)) || (MainClass(root).mainStage.isPaused))){
return;
};
if (coolDown > 0){
coolDown--;
};
checkDistance();
if ((((MainClass(root).mainStage.barricadeHealth <= 0)) && (!((npcState == NPC_STATE_RETREAT))))){
npcState = NPC_STATE_RETREAT;
resetAnim();
retreatAnim.visible = true;
};
switch (npcState){
case NPC_STATE_STAND:
standAnim.visible = true;
break;
case NPC_STATE_SHOOT:
onShoot();
break;
case NPC_STATE_RETREAT:
if (x < 800){
x++;
};
break;
};
}
}
}//package com.laststand.npc
Section 40
//NPCCowboy (com.laststand.npc.NPCCowboy)
package com.laststand.npc {
import flash.display.*;
public class NPCCowboy extends NPC {
public var shoot:MovieClip;
public var gunPoint:MovieClip;
public var retreat:MovieClip;
public var stand:MovieClip;
override protected function assignAnim():void{
shootAnim = shoot;
standAnim = stand;
retreatAnim = retreat;
gunPointMov = gunPoint;
}
}
}//package com.laststand.npc
Section 41
//NPCJanitor (com.laststand.npc.NPCJanitor)
package com.laststand.npc {
import flash.display.*;
public class NPCJanitor extends NPC {
public var shoot:MovieClip;
public var gunPoint:MovieClip;
public var retreat:MovieClip;
public var stand:MovieClip;
override protected function assignAnim():void{
shootAnim = shoot;
standAnim = stand;
retreatAnim = retreat;
gunPointMov = gunPoint;
}
}
}//package com.laststand.npc
Section 42
//NPCMichelle (com.laststand.npc.NPCMichelle)
package com.laststand.npc {
import flash.display.*;
public class NPCMichelle extends NPC {
public var shoot:MovieClip;
public var gunPoint:MovieClip;
public var retreat:MovieClip;
public var stand:MovieClip;
override protected function assignAnim():void{
shootAnim = shoot;
standAnim = stand;
retreatAnim = retreat;
gunPointMov = gunPoint;
}
}
}//package com.laststand.npc
Section 43
//NPCTrucker (com.laststand.npc.NPCTrucker)
package com.laststand.npc {
import com.laststand.manager.*;
import flash.display.*;
import com.laststand.enemy.*;
import flash.events.*;
import com.chocorobokun.util.*;
public class NPCTrucker extends NPC {
private const WEAPON_BURST_TIME:int = 5;
public var shoot:MovieClip;
public var gunPoint:MovieClip;
private var burstFire:int;// = 0
public var retreat:MovieClip;
public var stand:MovieClip;
public function NPCTrucker(){
burstFire = 0;
super();
}
override protected function onShoot(){
if (enemyTarget){
burstFire++;
standAnim.visible = false;
shootAnim.visible = true;
if (MainClass(root).mainStage.isPaused){
shootAnim.play();
} else {
shootAnim.stop();
};
BulletManager.getInstance().addBullet("small", (this.x + gunPointMov.x), (this.y + gunPointMov.y), (CustomTrigon.getAngle(this.x, this.y, enemyTarget.x, (enemyTarget.y + 50)) + (int((Math.random() * 5)) / 100)), 0, 3);
if (burstFire == WEAPON_BURST_TIME){
npcState = NPC_STATE_STAND;
coolDown = cooldownTime;
resetAnim();
standAnim.visible = true;
shootAnim.gotoAndStop(1);
burstFire = 0;
};
};
}
override protected function shootEnemy(_arg1:ZombieAbstract){
npcState = NPC_STATE_SHOOT;
enemyTarget = _arg1;
}
override protected function assignAnim():void{
shootAnim = shoot;
standAnim = stand;
retreatAnim = retreat;
gunPointMov = gunPoint;
}
override protected function mainLoop(_arg1:Event){
if ((((npcState == NPC_STATE_INACTIVE)) || (MainClass(root).mainStage.isPaused))){
return;
};
if (coolDown > 0){
coolDown--;
};
checkDistance();
if ((((MainClass(root).mainStage.barricadeHealth <= 0)) && (!((npcState == NPC_STATE_RETREAT))))){
npcState = NPC_STATE_RETREAT;
resetAnim();
retreatAnim.visible = true;
};
switch (npcState){
case NPC_STATE_STAND:
standAnim.visible = true;
break;
case NPC_STATE_SHOOT:
onShoot();
break;
case NPC_STATE_RETREAT:
if (x < 800){
x++;
};
break;
};
}
}
}//package com.laststand.npc
Section 44
//BloodParticle (com.laststand.particle.BloodParticle)
package com.laststand.particle {
import com.laststand.manager.*;
import flash.display.*;
import flash.events.*;
public class BloodParticle extends MovieClip {
public var explosion:MovieClip;
public var smallBlood:MovieClip;
public var bigBlood:MovieClip;
public function init(_arg1:String){
bigBlood.visible = false;
smallBlood.visible = false;
explosion.visible = false;
switch (_arg1){
case "big":
bigBlood.visible = true;
bigBlood.gotoAndPlay(1);
break;
case "small":
smallBlood.visible = true;
smallBlood.gotoAndPlay(1);
break;
case "explosion":
explosion.visible = true;
explosion.gotoAndPlay(1);
break;
};
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function removeBlood(){
bigBlood.visible = false;
smallBlood.visible = false;
bigBlood.gotoAndStop(1);
smallBlood.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, mainLoop);
}
private function mainLoop(_arg1:Event){
if ((((bigBlood.currentFrame == bigBlood.totalFrames)) || ((smallBlood.currentFrame == smallBlood.totalFrames)))){
ParticleManager.getInstance().removeBlood(this);
};
}
}
}//package com.laststand.particle
Section 45
//AdsPreloader (com.laststand.preloader.AdsPreloader)
package com.laststand.preloader {
import flash.display.*;
import flash.events.*;
import com.chocorobokun.preloader.*;
import com.chocorobokun.util.*;
import flash.text.*;
public class AdsPreloader extends MovieClip implements IPreloader {
public var moreBut:SimpleButton;
public var loadingDisp:TextField;
public var adsMov:MovieClip;
public var startBut:SimpleButton;
public function AdsPreloader(){
startBut.visible = false;
adsMov.addEventListener(MouseEvent.CLICK, onAds);
startBut.addEventListener(MouseEvent.CLICK, onStart);
moreBut.addEventListener(MouseEvent.CLICK, onMore);
}
public function onAds(_arg1:Event){
OpenURL.callURL("http://www.thelostrunes.com/?r=obvz");
}
public function onStart(_arg1:Event){
this.visible = false;
MainClass(root).finishPreload();
}
public function update(_arg1:int):void{
loadingDisp.text = (("LOADING.. " + _arg1) + "%");
if (_arg1 >= 100){
startBut.visible = true;
loadingDisp.visible = false;
};
}
private function onMore(_arg1:Event){
OpenURL.callURL("http://www.flashgames247.com/tag/zombie.html?utm_source=brandedgames&utm_medium=obamavszombies");
}
}
}//package com.laststand.preloader
Section 46
//ObamaPreloader (com.laststand.preloader.ObamaPreloader)
package com.laststand.preloader {
import flash.display.*;
import flash.events.*;
import com.chocorobokun.preloader.*;
import com.chocorobokun.util.*;
import flash.text.*;
public class ObamaPreloader extends MovieClip implements IPreloader {
public var loaderMov:MovieClip;
public var loadingDisp:TextField;
private var callback:Function;
public var logoMov:MovieClip;
public var gameLoaded:Boolean;
private var isReady:Boolean;
public var startBut:SimpleButton;
public function ObamaPreloader(_arg1:Function, _arg2:Boolean=false){
callback = _arg1;
isReady = _arg2;
startBut.visible = false;
if (!isReady){
logoMov.gotoAndStop((logoMov.totalFrames - 1));
} else {
loaderMov.loadingBar.gotoAndStop(50);
loadingDisp.text = "100%";
};
startBut.addEventListener(MouseEvent.CLICK, onStart);
logoMov.addEventListener(MouseEvent.CLICK, onClick);
addEventListener(Event.ENTER_FRAME, onRender);
}
private function onRender(_arg1:Event){
if (logoMov.currentFrame == logoMov.totalFrames){
stop();
loaderMov.visible = false;
loadingDisp.visible = false;
startBut.visible = true;
gameLoaded = true;
};
}
public function loadingComplete(){
}
private function onStart(_arg1:Event){
callback();
}
public function update(_arg1:int):void{
loadingDisp.text = (_arg1 + "%");
if (_arg1 >= 100){
this.visible = false;
};
loaderMov.loadingBar.gotoAndStop(int((_arg1 / 2)));
}
private function onClick(_arg1:Event){
OpenURL.callURL("http://www.flashgames247.com/tag/zombie.html?utm_source=brandedgames&utm_medium=obamavszombies");
}
}
}//package com.laststand.preloader
Section 47
//AchievementScreen (com.laststand.screen.AchievementScreen)
package com.laststand.screen {
import com.chocorobokun.managers.*;
import com.laststand.manager.*;
import flash.display.*;
import flash.events.*;
import com.chocorobokun.util.*;
import com.laststand.data.*;
public class AchievementScreen extends MovieClip {
public var descPanel:MovieClip;
public var achievementPanel:MovieClip;
public var continueBut:SimpleButton;
public function AchievementScreen(){
var _local1:int;
super();
addFrameScript(8, frame9);
addEventListener(Event.ADDED_TO_STAGE, onStage);
continueBut.addEventListener(MouseEvent.CLICK, onContinue);
_local1 = 1;
while (_local1 <= 10) {
this.achievementPanel[(("achievement" + _local1) + "But")].addEventListener(MouseEvent.ROLL_OVER, overIcon);
this.achievementPanel[(("achievement" + _local1) + "But")].addEventListener(MouseEvent.ROLL_OUT, outIcon);
_local1++;
};
descPanel.moreBut.addEventListener(MouseEvent.CLICK, onMore);
}
private function onStage(_arg1:Event){
descPanel.titleDisp.text = "";
descPanel.descDisp.text = "";
gotoAndPlay(1);
setIcon();
}
private function overIcon(_arg1:Event){
var _local2:String;
_local2 = _arg1.currentTarget.name.slice(11, _arg1.currentTarget.name.indexOf("But"));
if (_arg1.currentTarget.alpha == 1){
descPanel.titleDisp.text = AchievementData.achievementDataArray[int(_local2)][0];
} else {
descPanel.titleDisp.text = "";
};
descPanel.descDisp.text = AchievementData.achievementDataArray[int(_local2)][2];
}
function frame9(){
stop();
}
private function setIcon(){
var _local1:int;
_local1 = 1;
while (_local1 <= 10) {
if (GameAchievementManager.getInstance().isAchievementAchieved(_local1)){
this.achievementPanel[(("achievement" + _local1) + "But")].alpha = 1;
} else {
this.achievementPanel[(("achievement" + _local1) + "But")].alpha = 0;
};
_local1++;
};
}
private function onContinue(_arg1:Event){
if (LevelManager.getInstance().getCurrentLevel() > 1){
ScreenManager.getInstance().removeScreen("achievementScreen");
} else {
ScreenManager.getInstance().changeToScreen("menuScreen");
};
}
private function onMore(_arg1:Event){
OpenURL.callURL(MainClass(root).mainStage.FG247_URL);
}
private function outIcon(_arg1:Event){
descPanel.titleDisp.text = "";
descPanel.descDisp.text = "";
}
}
}//package com.laststand.screen
Section 48
//CompleteScreen (com.laststand.screen.CompleteScreen)
package com.laststand.screen {
import com.chocorobokun.managers.*;
import flash.display.*;
import flash.events.*;
import com.chocorobokun.util.*;
public class CompleteScreen extends MovieClip {
public var mainBut:SimpleButton;
public var menuBut:SimpleButton;
public function CompleteScreen(){
addFrameScript(9, frame10);
menuBut.addEventListener(MouseEvent.CLICK, onMenu);
mainBut.addEventListener(MouseEvent.CLICK, onMain);
addEventListener(Event.ADDED_TO_STAGE, onStage);
}
private function onMain(_arg1:Event){
ScreenManager.getInstance().changeToScreen("menuScreen");
}
function frame10(){
stop();
}
private function onStage(_arg1:Event){
gotoAndPlay(1);
SoundManager.getInstance().playSound("completeSound", 1, 0, 99999);
}
private function onMenu(_arg1:Event){
OpenURL.callURL(MainClass(root).mainStage.FG247_URL);
}
}
}//package com.laststand.screen
Section 49
//GameOverScreen (com.laststand.screen.GameOverScreen)
package com.laststand.screen {
import flash.display.*;
import flash.events.*;
import com.chocorobokun.util.*;
public class GameOverScreen extends MovieClip {
public var retryBut:SimpleButton;
public var gameOverPanel:MovieClip;
public function GameOverScreen(){
addFrameScript(6, frame7);
addEventListener(Event.ADDED_TO_STAGE, onStage);
retryBut.addEventListener(MouseEvent.CLICK, onRetry);
gameOverPanel.moreBut.addEventListener(MouseEvent.CLICK, onMore);
}
private function onRetry(_arg1:Event){
MainClass(root).mainStage.retryLevel();
}
private function onStage(_arg1:Event){
gotoAndPlay(1);
}
function frame7(){
stop();
}
private function onMore(_arg1:Event){
OpenURL.callURL(MainClass(root).mainStage.FG247_URL);
}
}
}//package com.laststand.screen
Section 50
//InstructionScreen (com.laststand.screen.InstructionScreen)
package com.laststand.screen {
import com.chocorobokun.managers.*;
import com.laststand.manager.*;
import flash.display.*;
import flash.events.*;
import com.chocorobokun.util.*;
public class InstructionScreen extends MovieClip {
public var moreBut:SimpleButton;
public var continueBut:SimpleButton;
public var unlockBut:SimpleButton;
public function InstructionScreen(){
addFrameScript(0, frame1, 8, frame9);
addEventListener(Event.ADDED_TO_STAGE, onStage);
continueBut.addEventListener(MouseEvent.CLICK, onContinue);
moreBut.addEventListener(MouseEvent.CLICK, onMore);
unlockBut.addEventListener(MouseEvent.CLICK, onUnlock);
}
private function onUnlock(_arg1:Event){
SoundManager.getInstance().playSound("pistolReloadSound");
WeaponManager.getInstance().weaponArray = ["pistol", "dEagle", "magnum", "uzi", "bat", "AK47", "rifle", "machineGun", "flameThrower", "laser", "gLauncher"];
WeaponManager.getInstance().weaponUsedArray = ["magnum", "rifle"];
}
private function onStage(_arg1:Event){
gotoAndPlay(1);
}
function frame1(){
}
function frame9(){
stop();
}
private function onContinue(_arg1:Event){
ScreenManager.getInstance().changeToScreen("menuScreen");
}
private function onMore(_arg1:Event){
OpenURL.callURL(MainClass(root).mainStage.FG247_URL);
}
}
}//package com.laststand.screen
Section 51
//MenuScreen (com.laststand.screen.MenuScreen)
package com.laststand.screen {
import com.chocorobokun.managers.*;
import flash.display.*;
import flash.events.*;
import com.chocorobokun.util.*;
public class MenuScreen extends MovieClip {
public var introMov:MovieClip;
public var instructionBut:SimpleButton;
public var moreGamesBut:SimpleButton;
public var playBut:SimpleButton;
public var achievementBut:SimpleButton;
public function MenuScreen(){
addFrameScript(20, frame21);
addEventListener(Event.ADDED_TO_STAGE, onStage);
instructionBut.addEventListener(MouseEvent.CLICK, onPlay);
introMov.closeBut.addEventListener(MouseEvent.CLICK, onIntro);
achievementBut.addEventListener(MouseEvent.CLICK, onInstruction);
moreGamesBut.addEventListener(MouseEvent.CLICK, onAchievement);
playBut.addEventListener(MouseEvent.CLICK, onMore);
}
private function outAchievement(_arg1:Event){
_arg1.currentTarget.x = (_arg1.currentTarget.x + 20);
}
private function onInstruction(_arg1:Event){
ScreenManager.getInstance().changeToScreen("instructionScreen");
}
private function onStage(_arg1:Event){
gotoAndPlay(1);
introMov.visible = false;
}
function frame21(){
stop();
}
private function onPlay(_arg1:Event){
trace("PLAY CLICKED");
introMov.visible = true;
SoundManager.getInstance().stopAllSounds();
}
private function overAchievement(_arg1:Event){
_arg1.currentTarget.x = (_arg1.currentTarget.x - 20);
}
private function onIntro(_arg1:Event){
MainClass(root).mainStage.gameInit();
MainClass(root).mainStage.levelInit();
SoundManager.getInstance().playSound("inGameSound", 1, 0, 9999);
ScreenManager.getInstance().removeScreen("menuScreen");
}
private function onAchievement(_arg1:Event){
ScreenManager.getInstance().changeToScreen("achievementScreen");
}
private function onMore(_arg1:Event){
OpenURL.callURL(MainClass(root).mainStage.FG247_URL);
}
}
}//package com.laststand.screen
Section 52
//PauseScreen (com.laststand.screen.PauseScreen)
package com.laststand.screen {
import com.chocorobokun.managers.*;
import flash.display.*;
import flash.events.*;
import com.chocorobokun.util.*;
import flash.text.*;
public class PauseScreen extends MovieClip {
public var qualityBut:SimpleButton;
public var moreBut:SimpleButton;
public var resumeBut:SimpleButton;
public var muteMov:MovieClip;
public var qualityDisp:TextField;
private var qualityArray:Array;
public var muteBut:SimpleButton;
public var menuBut:SimpleButton;
public function PauseScreen(){
addFrameScript(4, frame5);
qualityArray = [];
qualityArray = ["BEST", "HIGH", "MEDIUM", "LOW"];
qualityBut.addEventListener(MouseEvent.CLICK, onQuality);
resumeBut.addEventListener(MouseEvent.CLICK, onResume);
menuBut.addEventListener(MouseEvent.CLICK, onMenu);
moreBut.addEventListener(MouseEvent.CLICK, onMore);
muteBut.addEventListener(MouseEvent.CLICK, onMute);
addEventListener(Event.ADDED_TO_STAGE, onStage);
}
private function onResume(_arg1:Event){
MainClass(root).mainStage.mainCharState = MainClass(root).mainStage.CHAR_STATE_STAND;
MainClass(root).mainStage.isPaused = false;
MainClass(root).mainStage.stage.focus = MainClass(root).mainStage;
ScreenManager.getInstance().removeScreen("pauseScreen");
}
private function onQuality(_arg1:Event){
stage.quality = ((qualityArray.indexOf(stage.quality))!=3) ? qualityArray[(qualityArray.indexOf(stage.quality) + 1)] : qualityArray[0];
qualityDisp.text = stage.quality;
}
private function onStage(_arg1:Event){
gotoAndPlay(1);
if (MainClass(root).mainStage.isMute){
muteMov.gotoAndStop("unmute");
} else {
muteMov.gotoAndStop("mute");
};
}
function frame5(){
stop();
}
private function onMute(_arg1:Event){
if (MainClass(root).mainStage.isMute){
MainClass(root).mainStage.isMute = false;
SoundManager.getInstance().unmuteAllSounds();
muteMov.gotoAndStop("mute");
} else {
MainClass(root).mainStage.isMute = true;
muteMov.gotoAndStop("unmute");
};
}
private function onMore(_arg1:Event){
OpenURL.callURL(MainClass(root).mainStage.FG247_URL);
}
private function onMenu(_arg1:Event){
MainClass(root).mainStage.resetGame();
ScreenManager.getInstance().changeToScreen("menuScreen");
}
}
}//package com.laststand.screen
Section 53
//ShopScreen (com.laststand.screen.ShopScreen)
package com.laststand.screen {
import com.chocorobokun.managers.*;
import com.laststand.manager.*;
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import com.chocorobokun.util.*;
import com.laststand.data.*;
public class ShopScreen extends MovieClip {
private var survivorHour:int;
public var summaryPanel:MovieClip;
private var weaponHour:int;
private var totalHour:int;
public var continueBut:SimpleButton;
private var summaryArray:Array;
private var barricadeHour:int;
private var arrowButArray:Array;
public var shopPanel:MovieClip;
public var achievementBut:SimpleButton;
private var isAccepted:Boolean;
public function ShopScreen(){
var _local1:*;
var _local2:Timer;
super();
addFrameScript(7, frame8, 15, frame16);
continueBut.addEventListener(MouseEvent.CLICK, onContinue);
addEventListener(Event.ADDED_TO_STAGE, onStage);
shopPanel.acceptBut.addEventListener(MouseEvent.CLICK, onAccept);
achievementBut.addEventListener(MouseEvent.CLICK, onAchievement);
arrowButArray = [shopPanel.weaponLeftBut, shopPanel.weaponRightBut, shopPanel.survivorLeftBut, shopPanel.survivorRightBut, shopPanel.barricadeLeftBut, shopPanel.barricadeRightBut];
for (_local1 in arrowButArray) {
arrowButArray[_local1].addEventListener(MouseEvent.CLICK, onArrow);
};
_local2 = new Timer(100);
_local2.start();
_local2.addEventListener(TimerEvent.TIMER, onTimer);
summaryPanel.moreBut.addEventListener(MouseEvent.CLICK, onMore);
summaryPanel.moreBut2.addEventListener(MouseEvent.CLICK, onMore);
}
private function setSummary(){
var _local1:String;
shopPanel.currentBarricadeDisp.text = (MainClass(root).mainStage.barricadeHealth + "%");
summaryPanel.survivorDisp.text = "0";
summaryPanel.barricadeDisp.text = "1";
summaryPanel.weaponDisp.text = "";
summaryPanel.dayDisp.text = ("DAY " + (LevelManager.getInstance().getCurrentLevel() - 1));
trace(summaryArray);
summaryPanel.survivorDisp.text = summaryArray[2];
summaryPanel.barricadeDisp.text = summaryArray[0];
trace(("SET SUMMARY -> " + summaryArray));
if (summaryArray[1][0] != ""){
_local1 = WeaponData.weaponNameArray[WeaponData.weaponTypeArray.indexOf(summaryArray[1][0])];
summaryPanel.weaponDisp.text = _local1;
} else {
summaryPanel.weaponDisp.text = "";
};
}
private function onStage(_arg1:Event){
var _local2:*;
shopPanel.noVacancyMov.visible = false;
shopPanel.armoryFullMov.visible = false;
shopPanel.survivorLeftBut.visible = true;
shopPanel.survivorRightBut.visible = true;
gotoAndPlay(1);
barricadeHour = 0;
survivorHour = 0;
weaponHour = 0;
totalHour = 12;
isAccepted = false;
shopPanel.barricadeDisp.text = "0";
shopPanel.survivorDisp.text = "0";
shopPanel.weaponDisp.text = "0";
shopPanel.hourDisp.text = "12";
shopPanel.currentBarricadeDisp.text = (MainClass(root).mainStage.barricadeHealth + "%");
shopPanel.repairDisp.text = (String(((NPCManager.getInstance().getActiveNPCNum() * 5) + 5)) + "%");
shopPanel.acceptBut.visible = true;
for (_local2 in arrowButArray) {
arrowButArray[_local2].visible = true;
};
summaryArray = [];
summaryPanel.weaponDisp.text = "";
if (NPCManager.getInstance().getActiveNPCNum() >= 6){
shopPanel.noVacancyMov.visible = true;
shopPanel.survivorLeftBut.visible = false;
shopPanel.survivorRightBut.visible = false;
};
if (WeaponManager.getInstance().weaponArray.length == WeaponData.weaponTypeArray.length){
shopPanel.armoryFullMov.visible = true;
shopPanel.weaponLeftBut.visible = false;
shopPanel.weaponRightBut.visible = false;
};
}
private function onArrow(_arg1:Event){
var _local2:String;
var _local3:Boolean;
_local2 = _arg1.currentTarget.name;
if (_local2.indexOf("Left") != -1){
_local3 = true;
};
if (_local3){
_local2 = _local2.substring(0, _local2.indexOf("Left"));
if (this[(_local2 + "Hour")] <= 0){
return;
};
totalHour++;
} else {
_local2 = _local2.substring(0, _local2.indexOf("Right"));
if (totalHour <= 0){
return;
};
totalHour--;
};
this[(_local2 + "Hour")] = (_local3) ? (this[(_local2 + "Hour")] - 1) : (this[(_local2 + "Hour")] + 1);
shopPanel[(_local2 + "Disp")].text = String(this[(_local2 + "Hour")]);
shopPanel.hourDisp.text = String(totalHour);
}
private function resetButton(){
var _local1:*;
shopPanel.acceptBut.visible = false;
for (_local1 in arrowButArray) {
arrowButArray[_local1].visible = false;
};
}
function frame16(){
stop();
}
function frame8(){
stop();
}
private function onContinue(_arg1:Event){
ScreenManager.getInstance().changeToScreen("weaponScreen");
}
private function onTimer(_arg1:Event){
if (summaryPanel.weaponDisp.textColor == 0xFFFFFF){
summaryPanel.weaponDisp.textColor = 0xFF0000;
} else {
summaryPanel.weaponDisp.textColor = 0xFFFFFF;
};
}
private function onAccept(_arg1:Event){
if (isAccepted){
return;
};
resetButton();
summaryArray = MainClass(root).mainStage.executeDay(barricadeHour, weaponHour, survivorHour);
isAccepted = true;
if (summaryArray[1][0] != ""){
trace(("SET WEAPON " + summaryArray[1][0]));
WeaponManager.getInstance().setWeapon(summaryArray[1][0]);
};
setSummary();
gotoAndPlay("summary");
}
private function onAchievement(_arg1:Event){
ScreenManager.getInstance().changeToScreen("achievementScreen", false);
}
private function onMore(_arg1:Event){
OpenURL.callURL(MainClass(root).mainStage.FG247_URL);
}
}
}//package com.laststand.screen
Section 54
//WeaponScreen (com.laststand.screen.WeaponScreen)
package com.laststand.screen {
import com.chocorobokun.managers.*;
import com.laststand.manager.*;
import flash.display.*;
import flash.events.*;
import com.chocorobokun.util.*;
import com.laststand.data.*;
public class WeaponScreen extends MovieClip {
public var weaponDisplay:MovieClip;
public var weaponPanel:MovieClip;
public var continueBut:SimpleButton;
public var zombieBut:SimpleButton;
private var isSelectMain:Boolean;
private var weaponButArray:Array;
public function WeaponScreen(){
var _local1:*;
super();
addFrameScript(6, frame7);
continueBut.addEventListener(MouseEvent.CLICK, onContinue);
addEventListener(Event.ADDED_TO_STAGE, onStage);
weaponButArray = [];
for (_local1 in WeaponData.weaponTypeArray) {
weaponButArray.push(weaponPanel[(WeaponData.weaponTypeArray[_local1] + "But")]);
weaponPanel[(WeaponData.weaponTypeArray[_local1] + "But")].addEventListener(MouseEvent.CLICK, onWeapon);
weaponPanel[(WeaponData.weaponTypeArray[_local1] + "But")].buttonMode = (weaponPanel[(WeaponData.weaponTypeArray[_local1] + "But")].useHandCursor = true);
};
weaponDisplay.mainBut.addEventListener(MouseEvent.CLICK, onRemove);
weaponDisplay.backupBut.addEventListener(MouseEvent.CLICK, onRemove);
zombieBut.addEventListener(MouseEvent.CLICK, onZombie);
}
private function setWeapon(){
weaponDisplay.backupBut.visible = false;
weaponDisplay.mainDisp.gotoAndStop(WeaponManager.getInstance().weaponUsedArray[0]);
weaponDisplay.backupDisp.visible = false;
if (!WeaponManager.getInstance().weaponUsedArray[1]){
return;
};
weaponDisplay.backupDisp.visible = true;
weaponDisplay.backupBut.visible = true;
weaponDisplay.backupDisp.gotoAndStop(WeaponManager.getInstance().weaponUsedArray[1]);
}
private function onRemove(_arg1:Event){
_arg1.currentTarget.visible = false;
switch (_arg1.currentTarget){
case weaponDisplay.mainBut:
WeaponManager.getInstance().weaponUsedArray[0] = "";
weaponDisplay.mainDisp.visible = false;
break;
case weaponDisplay.backupBut:
WeaponManager.getInstance().weaponUsedArray[1] = "";
weaponDisplay.backupDisp.visible = false;
break;
};
}
private function resetWeaponButton(){
var _local1:*;
for (_local1 in WeaponData.weaponTypeArray) {
weaponPanel[(WeaponData.weaponTypeArray[_local1] + "But")].visible = false;
};
}
private function onStage(_arg1:Event){
gotoAndPlay(1);
setWeapon();
isSelectMain = true;
resetWeaponButton();
setWeaponButton();
weaponDisplay.noMainWeaponMov.gotoAndStop(1);
}
function frame7(){
stop();
}
private function onContinue(_arg1:Event){
trace("ON CONTINUE : WEAPON SCREEN");
if (WeaponManager.getInstance().weaponUsedArray[0] == ""){
trace("NO MAIN WEAPON");
weaponDisplay.noMainWeaponMov.gotoAndPlay(1);
return;
};
MainClass(root).mainStage.levelInit();
ScreenManager.getInstance().removeScreen("weaponScreen");
}
private function onWeapon(_arg1:Event){
var _local2:String;
_local2 = _arg1.currentTarget.name;
trace(_local2.substring(0, _local2.indexOf("But")));
_local2 = _local2.substring(0, _local2.indexOf("But"));
if (WeaponManager.getInstance().weaponUsedArray[0] == _local2){
return;
};
if (WeaponManager.getInstance().weaponUsedArray[1] == _local2){
return;
};
if (((!((WeaponManager.getInstance().weaponUsedArray[0] == ""))) && (!((WeaponManager.getInstance().weaponUsedArray[1] == ""))))){
return;
};
if (WeaponManager.getInstance().weaponUsedArray[0] == ""){
WeaponManager.getInstance().weaponUsedArray[0] = _local2;
weaponDisplay.mainDisp.visible = true;
weaponDisplay.mainBut.visible = true;
weaponDisplay.noMainWeaponMov.gotoAndStop(1);
} else {
if (WeaponManager.getInstance().weaponUsedArray[1] == ""){
WeaponManager.getInstance().weaponUsedArray[1] = _local2;
weaponDisplay.backupDisp.visible = true;
weaponDisplay.backupBut.visible = true;
};
};
setWeapon();
}
private function onZombie(_arg1:Event){
OpenURL.callURL(MainClass(root).mainStage.FG247_URL);
}
private function setWeaponButton(){
var _local1:*;
weaponPanel.pistolBut.visible = true;
trace(WeaponManager.getInstance().weaponArray.length);
if (WeaponManager.getInstance().weaponArray.length <= 1){
return;
};
for (_local1 in WeaponManager.getInstance().weaponArray) {
weaponPanel[(WeaponManager.getInstance().weaponArray[_local1] + "But")].visible = true;
};
}
}
}//package com.laststand.screen
Section 55
//MainStage (com.laststand.world.MainStage)
package com.laststand.world {
import com.chocorobokun.managers.*;
import com.laststand.manager.*;
import flash.display.*;
import com.laststand.enemy.*;
import flash.events.*;
import flash.utils.*;
import com.chocorobokun.util.*;
import com.laststand.data.*;
import com.senocular.utils.*;
import rl.dev.*;
import com.laststand.screen.*;
import flash.ui.*;
import com.laststand.npc.*;
public class MainStage extends MovieClip {
public const CHAR_STATE_DEAD:String = "DEAD";
public const WEAPON_INTERVAL_MAX:int = 100;
public const CHAR_STATE_SCREEN:String = "SCREEN";
public const SURVIVOR_SEARCH_HOUR:int = 18;
public const FG247_URL:String = "http://www.flashgames247.com/tag/zombie.html?utm_source=brandedgames&utm_medium=obamavszombies";
public const WEAPON_SEARCH_HOUR:int = 12;
public const MAX_LEVEL:int = 20;
public const TORSO_LENGTH:Number = 120;
public const CHAR_STATE_STAND:String = "STAND";
public const CHAR_STATE_WALK:String = "WALK";
public const CHAR_SPEED:int = 3;
public var inGameScreen:MovieClip;
public var fg247But:SimpleButton;
public var achievementPanel:MovieClip;
public var survivorHourSearchTotal:int;// = 0
public var weaponHourSearchTotal:int;// = 0
public var keyLimiter:int;// = 0
public var key:KeyObject;
public var cMenu:ContextMenu;
public var isMute:Boolean;
public var swfConsole:SWFConsole;
public var torsoAngle:Number;
public var isDead:Boolean;
public var mainChar:MovieClip;
public var maxZombie:int;// = 40
public var survivorMovArray:Array;
public var shootingHold:Boolean;
public var defaultZombieDead:int;// = 0
public var isPaused:Boolean;
public var weaponInterval:int;// = 0
public var gameAchievementManager:GameAchievementManager;
public var mainCharState:String;
public var walkingCount:int;
public var bBox1:MovieClip;
public var bBox2:MovieClip;
public var bBox5:MovieClip;
public var bBox6:MovieClip;
public var bBox4:MovieClip;
public var bBox3:MovieClip;
public var npc1:NPCJanitor;
public var npc2:NPCMichelle;
public var npc3:NPCCowboy;
public var npc4:NPCChef;
public var npc6:NPCBush;
public var npc5:NPCTrucker;
public var storedBarricadeHealth:int;
public var achievementManager:AchievementManager;
public var soundManager:SoundManager;
public var barricadeHealth:int;
public var charMov:MovieClip;
public var shootingCooldown:int;
public var weaponManager:WeaponManager;
public var shootAngle:Number;
public function MainStage(){
var _local1:ContextMenuItem;
survivorHourSearchTotal = 0;
weaponHourSearchTotal = 0;
weaponInterval = 0;
defaultZombieDead = 0;
keyLimiter = 0;
maxZombie = 40;
cMenu = new ContextMenu();
super();
trace("START LAST STAND");
this.contextMenu = cMenu;
cMenu.hideBuiltInItems();
_local1 = new ContextMenuItem("FlashGames247.com");
_local1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, onFG247);
cMenu.customItems.push(_local1);
addEventListener(Event.ADDED_TO_STAGE, onStage);
fg247But.addEventListener(MouseEvent.CLICK, onFG247);
}
private function onKey(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case 27:
case 80:
SWFConsole.output("P PRESSED");
if (isPaused){
return;
};
ScreenManager.getInstance().changeToScreen("pauseScreen");
mainCharState = CHAR_STATE_SCREEN;
isPaused = (isPaused) ? false : true;
break;
};
}
private function mainLoop(_arg1:Event){
addChild(fg247But);
if (weaponInterval >= WEAPON_INTERVAL_MAX){
weaponInterval = 0;
};
setBarricade();
if (isMute){
soundManager.muteAllSounds();
};
if (mainCharState == CHAR_STATE_SCREEN){
return;
};
playRandomZombieSound();
weaponManager.render();
inGameScreen.healthUI.healthDisp.text = barricadeHealth;
if (isDead){
mainCharState = CHAR_STATE_DEAD;
mainChar.body.visible = false;
mainChar.torso.visible = false;
mainChar.feet.visible = false;
mainChar.dead.visible = true;
mainChar.gas.visible = false;
mainChar.dead.play();
if (!ScreenManager.getInstance().getCurrentScreenName()){
ScreenManager.getInstance().changeToScreen("gameOverScreen", false);
soundManager.playSound("gameOverSound");
};
};
shootingMechanic();
if (mainCharState == CHAR_STATE_WALK){
survivorDepthManage();
};
moveTorso();
if (walkingCount != 0){
walkingCount--;
};
if (walkingCount <= 0){
charWalkAnimStop();
};
if (keyLimiter != 0){
keyLimiter--;
};
if (isDead){
return;
};
if (key.isDown(32)){
if ((((keyLimiter == 0)) && (!(weaponManager.isReloading())))){
weaponManager.switchWeapon();
SWFConsole.output("SPACE PRESSED");
keyLimiter = 10;
};
};
if (key.isDown(65)){
charWalkAnimPlay();
mainChar.x = (mainChar.x - CHAR_SPEED);
if (checkCollision()){
mainChar.x = (mainChar.x + CHAR_SPEED);
};
};
if (key.isDown(87)){
charWalkAnimPlay();
mainChar.y = (mainChar.y - CHAR_SPEED);
if (checkCollision()){
mainChar.y = (mainChar.y + CHAR_SPEED);
};
};
if (key.isDown(83)){
charWalkAnimPlay();
mainChar.y = (mainChar.y + CHAR_SPEED);
if (checkCollision()){
mainChar.y = (mainChar.y - CHAR_SPEED);
};
};
if (key.isDown(68)){
charWalkAnimPlay();
mainChar.x = (mainChar.x + CHAR_SPEED);
if (checkCollision()){
mainChar.x = (mainChar.x - CHAR_SPEED);
};
};
if (key.isDown(82)){
weaponManager.reloadWeapon();
};
if (key.isDown(77)){
trace("M KEY PRESSED");
if (keyLimiter == 0){
if (isMute){
soundManager.unmuteAllSounds();
};
isMute = (isMute) ? false : true;
keyLimiter = 10;
};
};
if (((key.isDown(80)) || (key.isDown(27)))){
if (((isPaused) || ((mainCharState == CHAR_STATE_SCREEN)))){
return;
};
ScreenManager.getInstance().changeToScreen("pauseScreen");
mainCharState = CHAR_STATE_SCREEN;
isPaused = (isPaused) ? false : true;
};
}
private function shootingMechanic(){
if (weaponManager.isReloading()){
return;
};
if ((((shootingCooldown > 0)) && (!(shootingHold)))){
shootingCooldown--;
};
if (((shootingHold) && ((shootingCooldown == 0)))){
weaponInterval++;
WeaponManager.getInstance().shootWeapon();
switch (weaponManager.weaponUsedArray[0]){
case "bat":
BulletManager.getInstance().addBullet("bat", ((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 30) + (TORSO_LENGTH * Math.sin(shootAngle))), shootAngle, 2, WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]));
break;
case "gLauncher":
trace("IS GRANADE");
BulletManager.getInstance().addBullet("granade", ((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 18.5) + (TORSO_LENGTH * Math.sin(shootAngle))), shootAngle, 0, WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]));
break;
case "flameThrower":
trace("IS FLAME");
BulletManager.getInstance().addBullet("flame", ((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 18.5) + (TORSO_LENGTH * Math.sin(shootAngle))), shootAngle, 25, WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]));
break;
case "AK47":
BulletManager.getInstance().addBullet("AK47", ((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 18.5) + (TORSO_LENGTH * Math.sin(shootAngle))), (shootAngle + (int((Math.random() * 5)) / 100)), 0, WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]));
break;
case "rifle":
BulletManager.getInstance().addBullet("rifle", ((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 18.5) + (TORSO_LENGTH * Math.sin(shootAngle))), (shootAngle + (int((Math.random() * 5)) / 100)), 0, WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]));
break;
case "machineGun":
BulletManager.getInstance().addBullet("machineGun", ((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 18.5) + (TORSO_LENGTH * Math.sin(shootAngle))), (shootAngle + (int((Math.random() * 5)) / 100)), 0, WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]));
break;
case "uzi":
BulletManager.getInstance().addBullet("uzi", ((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 18.5) + (TORSO_LENGTH * Math.sin(shootAngle))), (shootAngle + (int((Math.random() * 5)) / 100)), 0, WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]));
break;
case "laser":
weaponManager.shootLaser(((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 18.5) + (TORSO_LENGTH * Math.sin(shootAngle))), shootAngle);
break;
default:
BulletManager.getInstance().addBullet("small", ((mainChar.x + 37) + (TORSO_LENGTH * Math.cos(shootAngle))), ((mainChar.y + 18.5) + (TORSO_LENGTH * Math.sin(shootAngle))), shootAngle, 0, WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]));
break;
};
shootingCooldown = WeaponData.weaponDataArray[(WeaponData.weaponTypeArray.indexOf(weaponManager.weaponUsedArray[0]) + 1)][4];
};
}
public function gameInit(){
barricadeHealth = 100;
storedBarricadeHealth = 100;
LevelManager.getInstance().setLevel(1);
NPCManager.getInstance().clearNPC();
}
private function onStage(_arg1:Event){
var _local2:int;
swfConsole = new SWFConsole(760, 420, true);
SWFConsole._activated = false;
addChild(swfConsole);
mainChar = charMov;
mainChar.feet.walkFeet.visible = false;
mainChar.dead.visible = false;
mainChar.dead.gotoAndStop(1);
shootAngle = 0;
key = new KeyObject(stage);
mainCharState = CHAR_STATE_SCREEN;
EnemyManager.getInstance().init(this);
BulletManager.getInstance().init(this);
NPCManager.getInstance().init(this);
ParticleManager.getInstance().init(this);
ScreenManager.getInstance().init(this, this);
LevelManager.getInstance().init(this, LevelData.levelDataArray);
LevelPropertiesManager.getInstance().init(this);
WeaponManager.getInstance().init(this);
GameAchievementManager.getInstance().init(this, AchievementData.achievementDataArray);
AchievementManager.getInstance().init(AchievementData.achievementDataArray, 3);
weaponManager = WeaponManager.getInstance();
gameAchievementManager = GameAchievementManager.getInstance();
achievementManager = AchievementManager.getInstance();
soundManager = SoundManager.getInstance();
ScreenManager.getInstance().addScreen(new MenuScreen(), "menuScreen");
ScreenManager.getInstance().addScreen(new ShopScreen(), "shopScreen");
ScreenManager.getInstance().addScreen(new WeaponScreen(), "weaponScreen");
ScreenManager.getInstance().addScreen(new GameOverScreen(), "gameOverScreen");
ScreenManager.getInstance().addScreen(new CompleteScreen(), "completeScreen");
ScreenManager.getInstance().addScreen(new AchievementScreen(), "achievementScreen");
ScreenManager.getInstance().addScreen(new PauseScreen(), "pauseScreen");
ScreenManager.getInstance().addScreen(new InstructionScreen(), "instructionScreen");
ScreenManager.getInstance().changeToScreen("menuScreen", false);
barricadeHealth = 100;
LevelManager.getInstance().setLevel(1);
survivorMovArray = [];
survivorMovArray.push(mainChar);
_local2 = 1;
while (_local2 <= 6) {
survivorMovArray.push(this[("npc" + _local2)]);
_local2++;
};
stage.scaleMode = StageScaleMode.NO_SCALE;
inGameScreen.menuBut.addEventListener(MouseEvent.CLICK, onMenu);
addEventListener(Event.ENTER_FRAME, mainLoop);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
stage.addEventListener(MouseEvent.MOUSE_UP, onUp);
soundManager.addLibrarySound(MainSound, "mainSound");
soundManager.addLibrarySound(GameOverSound, "gameOverSound");
soundManager.addLibrarySound(PistolReloadSound, "pistolReloadSound");
soundManager.addLibrarySound(AK47ShotSound, "ak47ShotSound");
soundManager.addLibrarySound(AutoReloadSound, "autoReloadSound");
soundManager.addLibrarySound(BatHitSound, "batHitSound");
soundManager.addLibrarySound(BatMissSound, "batMissSound");
soundManager.addLibrarySound(DeagleShotSound, "dEagleShotSound");
soundManager.addLibrarySound(InGameSound, "inGameSound");
soundManager.addLibrarySound(MachineGunShotSound, "machineGunShotSound");
soundManager.addLibrarySound(MagnumShotSound, "magnumShotSound");
soundManager.addLibrarySound(MagnumReloadSound, "magnumReloadSound");
soundManager.addLibrarySound(PistolShotSound, "pistolShotSound");
soundManager.addLibrarySound(UziShotSound, "uziShotSound");
soundManager.addLibrarySound(CompleteSound, "completeSound");
soundManager.addLibrarySound(LaserShotSound, "laserShotSound");
soundManager.addLibrarySound(FlameThrowerShotSound, "flameThrowerShotSound");
soundManager.addLibrarySound(GranadeShotSound, "granadeShotSound");
soundManager.addLibrarySound(RifleShotSound, "rifleShotSound");
soundManager.addLibrarySound(ZombieSound1, "zombieSound1");
soundManager.addLibrarySound(ZombieSound2, "zombieSound2");
soundManager.addLibrarySound(ZombieSound3, "zombieSound3");
soundManager.addLibrarySound(ZombieSound3, "zombieSound4");
soundManager.playSound("mainSound", 1, 0, 99999);
soundManager.playSound("magnumShotSound", 0);
}
private function charWalkAnimPlay(){
mainCharState = CHAR_STATE_WALK;
walkingCount = 3;
mainChar.feet.walkFeet.visible = true;
mainChar.feet.standFeet.visible = false;
mainChar.feet.walkFeet.play();
}
private function testBed(){
var timer:Timer;
var randomVar:Number;
if (maxZombie > 0){
randomVar = Math.floor((Math.random() * EnemyData.enemyTypeArray.length));
EnemyManager.getInstance().addEnemy(EnemyData.enemyTypeArray[randomVar]);
maxZombie--;
trace("ADD ZOMBIE");
};
timer = new Timer((1000 + (Math.random() * 1000)), 1);
timer.start();
timer.addEventListener(TimerEvent.TIMER, function (){
testBed();
});
}
public function checkIfLevelComplete(){
var _local1:*;
if (LevelPropertiesManager.getInstance().getEnemyCount() > 0){
return;
};
for (_local1 in EnemyManager.getInstance().activeEnemyArray) {
if (EnemyManager.getInstance().activeEnemyArray[_local1].zombieState != ZombieAbstract.ZOMBIE_STATE_DIE){
return;
};
if (!EnemyManager.getInstance().activeEnemyArray[_local1].isDeadAnimFinish){
return;
};
};
levelComplete();
}
private function moveTorso(){
var _local1:Number;
var _local2:Number;
_local1 = (mouseX - (mainChar.x + 37));
_local2 = (mouseY - (mainChar.y + 18.5));
torsoAngle = Math.atan2(_local2, _local1);
if (((((180 + ((torsoAngle * 180) / Math.PI)) > 30)) && (((180 + ((torsoAngle * 180) / Math.PI)) < 330)))){
return;
};
if (weaponManager.weaponUsedArray[0] == "bat"){
torsoAngle = -3.05015225076998;
};
shootAngle = torsoAngle;
mainChar.torso.rotation = (180 + ((torsoAngle * 180) / Math.PI));
}
public function levelInit(){
soundManager.stopSound("mainSound");
NPCManager.getInstance().resetNPC();
SWFConsole.output("LEVEL INIT");
stage.focus = this;
isPaused = false;
isDead = false;
BulletManager.getInstance().activeBulletArray = [];
inGameScreen.dayPanel.dayDisp.text = ("DAY " + String(LevelManager.getInstance().getCurrentLevel()));
storedBarricadeHealth = barricadeHealth;
defaultZombieDead = 0;
mainChar.body.visible = true;
mainChar.torso.visible = true;
mainChar.feet.visible = true;
mainChar.dead.visible = false;
mainChar.gas.visible = false;
mainChar.dead.gotoAndStop(1);
WeaponManager.getInstance().initWeapon();
EnemyManager.getInstance().clearEnemy();
LevelPropertiesManager.getInstance().startLevel(LevelManager.getInstance().getLevelProp(LevelManager.getInstance().getCurrentLevel()));
mainCharState = CHAR_STATE_STAND;
}
private function onUp(_arg1:Event){
shootingHold = false;
}
public function levelComplete(){
NPCManager.getInstance().resetNPC();
if (LevelManager.getInstance().getCurrentLevel() < MAX_LEVEL){
mainCharState = CHAR_STATE_SCREEN;
ScreenManager.getInstance().changeToScreen("shopScreen");
LevelManager.getInstance().setLevel((LevelManager.getInstance().getCurrentLevel() + 1));
LevelPropertiesManager.getInstance().clearLevel();
NPCManager.getInstance().resetNPC();
} else {
gameComplete();
};
trace(("DEFAULT ZOMBIE DEAD : " + defaultZombieDead));
if (defaultZombieDead == 0){
if (achievementManager.setAchievement(GameAchievementManager.ACHIEVEMENT_HEADSHOTHONCHO, 1)){
gameAchievementManager.bestowAchievement(GameAchievementManager.ACHIEVEMENT_HEADSHOTHONCHO);
};
};
}
public function playRandomZombieSound(){
if (int((Math.random() * 150)) == 1){
trace("PLAY RANDOM ZOMBIE SOUND");
soundManager.playSound(("zombieSound" + (int((Math.random() * 3)) + 1)));
};
}
private function charWalkAnimStop(){
mainCharState = CHAR_STATE_STAND;
mainChar.feet.walkFeet.visible = false;
mainChar.feet.standFeet.visible = true;
mainChar.feet.walkFeet.gotoAndStop(1);
}
private function checkCollision(){
var _local1:int;
_local1 = 1;
while (_local1 <= 6) {
if (mainChar.bBox.hitTestObject(this[("bBox" + _local1)])){
return (true);
};
_local1++;
};
}
private function onUpKey(_arg1:KeyboardEvent){
charWalkAnimStop();
}
private function onClick(_arg1:MouseEvent){
if ((((mainCharState == CHAR_STATE_DEAD)) || ((mainCharState == CHAR_STATE_SCREEN)))){
return;
};
if (isDead){
return;
};
if (WeaponManager.getInstance().isReloading()){
return;
};
shootingHold = true;
}
private function survivorDepthManage(){
var _local1:*;
survivorMovArray.sort(order);
for (_local1 in survivorMovArray) {
addChild(survivorMovArray[_local1]);
};
}
private function order(_arg1:MovieClip, _arg2:MovieClip){
var _local3:*;
var _local4:*;
_local3 = _arg1.y;
_local4 = _arg2.y;
if (_local3 < _local4){
return (-1);
};
if (_local3 > _local4){
return (1);
};
return (0);
}
private function onFG247(_arg1:Event){
OpenURL.callURL(FG247_URL);
}
public function gameComplete(){
mainCharState = CHAR_STATE_SCREEN;
resetGame();
NPCManager.getInstance().resetNPC();
ScreenManager.getInstance().changeToScreen("completeScreen");
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_GAMECOMPLETE, 1)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_GAMECOMPLETE);
};
}
private function setBarricade(){
inGameScreen.barricadeAnim.gotoAndStop((9 - Math.round(((barricadeHealth * 9) / 100))));
}
public function retryLevel(){
mainCharState = CHAR_STATE_SCREEN;
barricadeHealth = storedBarricadeHealth;
if (barricadeHealth <= 0){
barricadeHealth = 1;
};
NPCManager.getInstance().resetNPC();
LevelPropertiesManager.getInstance().clearLevel();
ScreenManager.getInstance().changeToScreen("weaponScreen");
}
public function resetGame(){
soundManager.stopAllSounds();
soundManager.playSound("mainSound", 1, 0, 9999);
LevelManager.getInstance().setLevel(1);
NPCManager.getInstance().resetNPC();
weaponManager.resetWeapon();
barricadeHealth = 100;
survivorHourSearchTotal = 0;
weaponHourSearchTotal = 0;
LevelPropertiesManager.getInstance().clearLevel();
}
private function onMenu(_arg1:Event){
trace("menuBut CLICKED");
ScreenManager.getInstance().changeToScreen("pauseScreen");
mainCharState = CHAR_STATE_SCREEN;
isPaused = (isPaused) ? false : true;
}
public function executeDay(_arg1:int, _arg2:int, _arg3:int):Array{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Array;
var _local8:int;
var _local9:Array;
var _local10:*;
trace(("EXECUTE DAY BARRICADE :" + _arg1));
_local4 = [0, [""], 0];
_local5 = 1;
_local6 = 0;
_local7 = [""];
if ((barricadeHealth + ((_arg1 * 5) * (NPCManager.getInstance().getActiveNPCNum() + 1))) < 100){
_local5 = (_local5 + ((_arg1 * 5) * (NPCManager.getInstance().getActiveNPCNum() + 1)));
} else {
_local5 = (100 - barricadeHealth);
};
barricadeHealth = (barricadeHealth + _local5);
if ((survivorHourSearchTotal + _arg3) >= SURVIVOR_SEARCH_HOUR){
survivorHourSearchTotal = ((survivorHourSearchTotal + _arg3) - SURVIVOR_SEARCH_HOUR);
_local6 = 1;
NPCManager.getInstance().addNPC(_local6);
if (AchievementManager.getInstance().setAchievement(GameAchievementManager.ACHIEVEMENT_REINFORCEMENTS, _local6)){
GameAchievementManager.getInstance().bestowAchievement(GameAchievementManager.ACHIEVEMENT_REINFORCEMENTS);
};
} else {
survivorHourSearchTotal = (survivorHourSearchTotal + _arg3);
};
_local8 = 0;
_local9 = WeaponData.weaponTypeArray.concat();
if ((((_arg2 > 0)) && (!((WeaponManager.getInstance().weaponArray.length == WeaponData.weaponTypeArray.length))))){
for (_local10 in WeaponManager.getInstance().weaponArray) {
if (_local9.indexOf(WeaponManager.getInstance().weaponArray[_local10]) != -1){
_local9.splice(_local9.indexOf(WeaponManager.getInstance().weaponArray[_local10]), 1);
};
};
if ((weaponHourSearchTotal + _arg2) >= WEAPON_SEARCH_HOUR){
weaponHourSearchTotal = ((weaponHourSearchTotal + _arg2) - WEAPON_SEARCH_HOUR);
_local8 = 1;
} else {
weaponHourSearchTotal = (weaponHourSearchTotal + _arg2);
};
if (_local8 == 1){
_local7[0] = _local9[0];
};
};
_local4 = [_local5, _local7, _local6];
trace(("RESULT SUMMARY : " + _local4));
return (_local4);
}
}
}//package com.laststand.world
Section 56
//KeyObject (com.senocular.utils.KeyObject)
package com.senocular.utils {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.ui.*;
public dynamic class KeyObject extends Proxy {
private static var keysDown:Object;
private static var stage:Stage;
public function KeyObject(_arg1:Stage){
construct(_arg1);
}
private function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
public function construct(_arg1:Stage):void{
KeyObject.stage = _arg1;
keysDown = new Object();
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
return (((_arg1 in Keyboard)) ? Keyboard[_arg1] : -1);
}
public function isDown(_arg1:uint):Boolean{
return (Boolean((_arg1 in keysDown)));
}
private function keyReleased(_arg1:KeyboardEvent):void{
delete keysDown[_arg1.keyCode];
}
public function deconstruct():void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased);
keysDown = new Object();
KeyObject.stage = null;
}
}
}//package com.senocular.utils
Section 57
//ObjectPool (de.polygonal.core.ObjectPool)
package de.polygonal.core {
public class ObjectPool {
private var _factory:ObjectPoolFactory;
private var _usageCount:int;
private var _initSize:int;
private var _allocNode:ObjNode;
private var _tail:ObjNode;
private var _currSize:int;
private var _emptyNode:ObjNode;
private var _grow:Boolean;// = true
private var _head:ObjNode;
public function ObjectPool(_arg1:Boolean=false){
_grow = true;
super();
_grow = _arg1;
}
public function set object(_arg1):void{
if (_usageCount > 0){
_usageCount--;
_emptyNode.data = _arg1;
_emptyNode = _emptyNode.next;
};
}
public function get object(){
var _local1:ObjNode;
var _local2:ObjNode;
var _local3:ObjNode;
var _local4:int;
var _local5:*;
if (_usageCount == _currSize){
if (_grow){
_currSize = (_currSize + _initSize);
_local1 = _tail;
_local2 = _tail;
_local4 = 0;
while (_local4 < _initSize) {
_local3 = new ObjNode();
_local3.data = _factory.create();
_local2.next = _local3;
_local2 = _local3;
_local4++;
};
_tail = _local2;
_tail.next = (_emptyNode = _head);
_allocNode = _local1.next;
return (object);
} else {
throw (new Error("object pool exhausted."));
};
} else {
_local5 = _allocNode.data;
_allocNode.data = null;
_allocNode = _allocNode.next;
_usageCount++;
};
return (_local5);
}
public function get size():int{
return (_currSize);
}
public function initialze(_arg1:String, _arg2:Array):void{
var _local3:ObjNode;
_local3 = _head;
while (_local3) {
_local3.data[_arg1].apply(_local3.data, _arg2);
if (_local3 == _tail){
break;
};
_local3 = _local3.next;
};
}
public function get wasteCount():int{
return ((_currSize - _usageCount));
}
public function setFactory(_arg1:ObjectPoolFactory):void{
_factory = _arg1;
}
public function get usageCount():int{
return (_usageCount);
}
public function deconstruct():void{
var _local1:ObjNode;
var _local2:ObjNode;
_local1 = _head;
while (_local1) {
_local2 = _local1.next;
_local1.next = null;
_local1.data = null;
_local1 = _local2;
};
_head = (_tail = (_emptyNode = (_allocNode = null)));
}
public function purge():void{
var _local1:int;
var _local2:ObjNode;
var _local3:Array;
var _local4:ObjNode;
var _local5:ObjNode;
var _local6:int;
if (_usageCount == 0){
if (_currSize == _initSize){
return;
};
if (_currSize > _initSize){
_local1 = 0;
_local2 = _head;
while (++_local1 < _initSize) {
_local2 = _local2.next;
};
_tail = _local2;
_allocNode = (_emptyNode = _head);
_currSize = _initSize;
return;
};
} else {
_local3 = [];
_local2 = _head;
while (_local2) {
if (!_local2.data){
var _temp1 = _local1;
_local1 = (_local1 + 1);
_local3[int(_temp1)] = _local2;
};
if (_local2 == _tail){
break;
};
_local2 = _local2.next;
};
_currSize = _local3.length;
_usageCount = _currSize;
_head = (_tail = _local3[0]);
_local1 = 1;
while (_local1 < _currSize) {
_local2 = _local3[_local1];
_local2.next = _head;
_head = _local2;
_local1++;
};
_emptyNode = (_allocNode = _head);
_tail.next = _head;
if (_usageCount < _initSize){
_currSize = _initSize;
_local4 = _tail;
_local5 = _tail;
_local6 = (_initSize - _usageCount);
_local1 = 0;
while (_local1 < _local6) {
_local2 = new ObjNode();
_local2.data = _factory.create();
_local5.next = _local2;
_local5 = _local2;
_local1++;
};
_tail = _local5;
_tail.next = (_emptyNode = _head);
_allocNode = _local4.next;
};
};
}
public function allocate(_arg1:uint, _arg2:Class=null):void{
var _local3:ObjNode;
var _local4:int;
deconstruct();
if (_arg2){
_factory = new SimpleFactory(_arg2);
} else {
if (!_factory){
throw (new Error("nothing to instantiate."));
};
};
_initSize = (_currSize = _arg1);
_head = (_tail = new ObjNode());
_head.data = _factory.create();
_local4 = 1;
while (_local4 < _initSize) {
_local3 = new ObjNode();
_local3.data = _factory.create();
_local3.next = _head;
_head = _local3;
_local4++;
};
_emptyNode = (_allocNode = _head);
_tail.next = _head;
}
}
}//package de.polygonal.core
class SimpleFactory implements ObjectPoolFactory {
private var _class:Class;
private function SimpleFactory(_arg1:Class){
_class = _arg1;
}
public function create(){
return (new _class());
}
}
class ObjNode {
public var next:ObjNode;
public var data;
private function ObjNode(){
}
}
Section 58
//ObjectPoolFactory (de.polygonal.core.ObjectPoolFactory)
package de.polygonal.core {
public interface ObjectPoolFactory {
function create();
}
}//package de.polygonal.core
Section 59
//_back_wheel_2w_378 (Main_fla._back_wheel_2w_378)
package Main_fla {
import flash.display.*;
public dynamic class _back_wheel_2w_378 extends MovieClip {
public var mc:MovieClip;
}
}//package Main_fla
Section 60
//_back_wheel2w_379 (Main_fla._back_wheel2w_379)
package Main_fla {
import flash.display.*;
public dynamic class _back_wheel2w_379 extends MovieClip {
public var mc_rim:MovieClip;
}
}//package Main_fla
Section 61
//_bike_body_387 (Main_fla._bike_body_387)
package Main_fla {
import flash.display.*;
public dynamic class _bike_body_387 extends MovieClip {
public var mc:MovieClip;
}
}//package Main_fla
Section 62
//_bike_bodyw_383 (Main_fla._bike_bodyw_383)
package Main_fla {
import flash.display.*;
public dynamic class _bike_bodyw_383 extends MovieClip {
public var mc_b_spring:MovieClip;
public var mc_f_spring:MovieClip;
public var mc_body_man:MovieClip;
}
}//package Main_fla
Section 63
//_bike_f_springw_384 (Main_fla._bike_f_springw_384)
package Main_fla {
import flash.display.*;
public dynamic class _bike_f_springw_384 extends MovieClip {
public var mc_spring:MovieClip;
}
}//package Main_fla
Section 64
//_forward_wheel_w_372 (Main_fla._forward_wheel_w_372)
package Main_fla {
import flash.display.*;
public dynamic class _forward_wheel_w_372 extends MovieClip {
public var mc:MovieClip;
}
}//package Main_fla
Section 65
//_forward_wheelw_373 (Main_fla._forward_wheelw_373)
package Main_fla {
import flash.display.*;
public dynamic class _forward_wheelw_373 extends MovieClip {
public var mc_rim:MovieClip;
}
}//package Main_fla
Section 66
//_man_allw_391 (Main_fla._man_allw_391)
package Main_fla {
import flash.display.*;
public dynamic class _man_allw_391 extends MovieClip {
public var b:MovieClip;
public var h:MovieClip;
public var l:MovieClip;
}
}//package Main_fla
Section 67
//ACHIEVEMENT10display_88 (Main_fla.ACHIEVEMENT10display_88)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT10display_88 extends MovieClip {
public function ACHIEVEMENT10display_88(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 68
//ACHIEVEMENT1display_77 (Main_fla.ACHIEVEMENT1display_77)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT1display_77 extends MovieClip {
public function ACHIEVEMENT1display_77(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 69
//ACHIEVEMENT2display_80 (Main_fla.ACHIEVEMENT2display_80)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT2display_80 extends MovieClip {
public function ACHIEVEMENT2display_80(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 70
//ACHIEVEMENT3display_81 (Main_fla.ACHIEVEMENT3display_81)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT3display_81 extends MovieClip {
public function ACHIEVEMENT3display_81(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 71
//ACHIEVEMENT4display_82 (Main_fla.ACHIEVEMENT4display_82)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT4display_82 extends MovieClip {
public function ACHIEVEMENT4display_82(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 72
//ACHIEVEMENT5display_83 (Main_fla.ACHIEVEMENT5display_83)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT5display_83 extends MovieClip {
public function ACHIEVEMENT5display_83(){
addFrameScript(51, frame52);
}
function frame52(){
stop();
}
}
}//package Main_fla
Section 73
//ACHIEVEMENT6display_84 (Main_fla.ACHIEVEMENT6display_84)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT6display_84 extends MovieClip {
public function ACHIEVEMENT6display_84(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 74
//ACHIEVEMENT7display_85 (Main_fla.ACHIEVEMENT7display_85)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT7display_85 extends MovieClip {
public function ACHIEVEMENT7display_85(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 75
//ACHIEVEMENT8display_86 (Main_fla.ACHIEVEMENT8display_86)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT8display_86 extends MovieClip {
public function ACHIEVEMENT8display_86(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 76
//ACHIEVEMENT9display_87 (Main_fla.ACHIEVEMENT9display_87)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENT9display_87 extends MovieClip {
public function ACHIEVEMENT9display_87(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Main_fla
Section 77
//AchievementPanel_115 (Main_fla.AchievementPanel_115)
package Main_fla {
import flash.display.*;
public dynamic class AchievementPanel_115 extends MovieClip {
public var achievement8But:MovieClip;
public var achievement10But:MovieClip;
public var achievement6But:MovieClip;
public var achievement9But:MovieClip;
public var achievement1But:MovieClip;
public var achievement4But:MovieClip;
public var lock1:MovieClip;
public var lock4:MovieClip;
public var lock5:MovieClip;
public var lock6:MovieClip;
public var lock8:MovieClip;
public var lock9:MovieClip;
public var lock3:MovieClip;
public var lock7:MovieClip;
public var lock2:MovieClip;
public var lock10:MovieClip;
public var achievement7But:MovieClip;
public var achievement2But:MovieClip;
public var achievement5But:MovieClip;
public var achievement3But:MovieClip;
}
}//package Main_fla
Section 78
//ACHIEVEMENTSANIM_76 (Main_fla.ACHIEVEMENTSANIM_76)
package Main_fla {
import flash.display.*;
public dynamic class ACHIEVEMENTSANIM_76 extends MovieClip {
public var achievement5Anim:MovieClip;
public var achievement1Anim:MovieClip;
public var achievement9Anim:MovieClip;
public var achievement3Anim:MovieClip;
public var achievement7Anim:MovieClip;
public var achievement6Anim:MovieClip;
public var achievement8Anim:MovieClip;
public var achievement4Anim:MovieClip;
public var achievement2Anim:MovieClip;
public var achievement10Anim:MovieClip;
}
}//package Main_fla
Section 79
//AK47Load_37 (Main_fla.AK47Load_37)
package Main_fla {
import flash.display.*;
public dynamic class AK47Load_37 extends MovieClip {
public function AK47Load_37(){
addFrameScript(26, frame27);
}
function frame27(){
stop();
}
}
}//package Main_fla
Section 80
//AK47Shoot_36 (Main_fla.AK47Shoot_36)
package Main_fla {
import flash.display.*;
public dynamic class AK47Shoot_36 extends MovieClip {
public function AK47Shoot_36(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package Main_fla
Section 81
//ARM_29 (Main_fla.ARM_29)
package Main_fla {
import flash.display.*;
public dynamic class ARM_29 extends MovieClip {
public var dEagleLoad:MovieClip;
public var dEagleShoot:MovieClip;
public var uziShoot:MovieClip;
public var batShoot:MovieClip;
public var machineGunShoot:MovieClip;
public var gLauncherShoot:MovieClip;
public var magnumStand:MovieClip;
public var flameThrowerStand:MovieClip;
public var uziLoad:MovieClip;
public var flameThrowerLoad:MovieClip;
public var laserShoot:MovieClip;
public var laserLoad:MovieClip;
public var rifleShoot:MovieClip;
public var pistolStand:MovieClip;
public var flameThrowerShoot:MovieClip;
public var AK47Stand:MovieClip;
public var gLauncherLoad:MovieClip;
public var magnumShoot:MovieClip;
public var AK47Load:MovieClip;
public var batLoad:MovieClip;
public var batStand:MovieClip;
public var dEagleStand:MovieClip;
public var rifleLoad:MovieClip;
public var uziStand:MovieClip;
public var magnumLoad:MovieClip;
public var laserStand:MovieClip;
public var machineGunStand:MovieClip;
public var pistolShoot:MovieClip;
public var rifleStand:MovieClip;
public var gLauncherStand:MovieClip;
public var AK47Shoot:MovieClip;
public var pistolLoad:MovieClip;
public var machineGunLoad:MovieClip;
}
}//package Main_fla
Section 82
//AssetHolder_1 (Main_fla.AssetHolder_1)
package Main_fla {
import flash.display.*;
public dynamic class AssetHolder_1 extends MovieClip {
public function AssetHolder_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 83
//BASEBALLBATOBAMA_34 (Main_fla.BASEBALLBATOBAMA_34)
package Main_fla {
import flash.display.*;
public dynamic class BASEBALLBATOBAMA_34 extends MovieClip {
public function BASEBALLBATOBAMA_34(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 84
//BLOODBIG_233 (Main_fla.BLOODBIG_233)
package Main_fla {
import flash.display.*;
public dynamic class BLOODBIG_233 extends MovieClip {
public function BLOODBIG_233(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 85
//BODYOBAMA_27 (Main_fla.BODYOBAMA_27)
package Main_fla {
import flash.display.*;
public dynamic class BODYOBAMA_27 extends MovieClip {
public function BODYOBAMA_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 86
//bodyw_397 (Main_fla.bodyw_397)
package Main_fla {
import flash.display.*;
public dynamic class bodyw_397 extends MovieClip {
public var p:MovieClip;
}
}//package Main_fla
Section 87
//COWBOYShoot_70 (Main_fla.COWBOYShoot_70)
package Main_fla {
import flash.display.*;
public dynamic class COWBOYShoot_70 extends MovieClip {
public function COWBOYShoot_70(){
addFrameScript(2, frame3);
}
function frame3(){
}
}
}//package Main_fla
Section 88
//DAY_6 (Main_fla.DAY_6)
package Main_fla {
import flash.display.*;
import flash.text.*;
public dynamic class DAY_6 extends MovieClip {
public var dayDisp:TextField;
}
}//package Main_fla
Section 89
//descriptionPanel_113 (Main_fla.descriptionPanel_113)
package Main_fla {
import flash.display.*;
import flash.text.*;
public dynamic class descriptionPanel_113 extends MovieClip {
public var moreBut:SimpleButton;
public var titleDisp:TextField;
public var descDisp:TextField;
}
}//package Main_fla
Section 90
//DESERTEAGLELoad_40 (Main_fla.DESERTEAGLELoad_40)
package Main_fla {
import flash.display.*;
public dynamic class DESERTEAGLELoad_40 extends MovieClip {
public function DESERTEAGLELoad_40(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 91
//DESERTEAGLEShoot_39 (Main_fla.DESERTEAGLEShoot_39)
package Main_fla {
import flash.display.*;
public dynamic class DESERTEAGLEShoot_39 extends MovieClip {
public function DESERTEAGLEShoot_39(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package Main_fla
Section 92
//DUBYAShoot_66 (Main_fla.DUBYAShoot_66)
package Main_fla {
import flash.display.*;
public dynamic class DUBYAShoot_66 extends MovieClip {
public function DUBYAShoot_66(){
addFrameScript(2, frame3);
}
function frame3(){
}
}
}//package Main_fla
Section 93
//EXPLOSIONGRENADELAUNCHER_231 (Main_fla.EXPLOSIONGRENADELAUNCHER_231)
package Main_fla {
import flash.display.*;
public dynamic class EXPLOSIONGRENADELAUNCHER_231 extends MovieClip {
public function EXPLOSIONGRENADELAUNCHER_231(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package Main_fla
Section 94
//FEETOBAMA_24 (Main_fla.FEETOBAMA_24)
package Main_fla {
import flash.display.*;
public dynamic class FEETOBAMA_24 extends MovieClip {
public var walkFeet:MovieClip;
public var standFeet:MovieClip;
public function FEETOBAMA_24(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 95
//FLAMETHROWERShoot_42 (Main_fla.FLAMETHROWERShoot_42)
package Main_fla {
import flash.display.*;
public dynamic class FLAMETHROWERShoot_42 extends MovieClip {
public function FLAMETHROWERShoot_42(){
addFrameScript(26, frame27);
}
function frame27(){
stop();
}
}
}//package Main_fla
Section 96
//gameoverPanel_219 (Main_fla.gameoverPanel_219)
package Main_fla {
import flash.display.*;
public dynamic class gameoverPanel_219 extends MovieClip {
public var moreBut:SimpleButton;
}
}//package Main_fla
Section 97
//GRENADELAUNCHERLoad_43 (Main_fla.GRENADELAUNCHERLoad_43)
package Main_fla {
import flash.display.*;
public dynamic class GRENADELAUNCHERLoad_43 extends MovieClip {
public function GRENADELAUNCHERLoad_43(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
}
}
}//package Main_fla
Section 98
//GRENADELAUNCHERShoot_45 (Main_fla.GRENADELAUNCHERShoot_45)
package Main_fla {
import flash.display.*;
public dynamic class GRENADELAUNCHERShoot_45 extends MovieClip {
public function GRENADELAUNCHERShoot_45(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package Main_fla
Section 99
//headw_395 (Main_fla.headw_395)
package Main_fla {
import flash.display.*;
public dynamic class headw_395 extends MovieClip {
public var p:MovieClip;
}
}//package Main_fla
Section 100
//HEALTH_5 (Main_fla.HEALTH_5)
package Main_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HEALTH_5 extends MovieClip {
public var healthDisp:TextField;
public var ammoDisp:TextField;
}
}//package Main_fla
Section 101
//JANITORShoot_62 (Main_fla.JANITORShoot_62)
package Main_fla {
import flash.display.*;
public dynamic class JANITORShoot_62 extends MovieClip {
public function JANITORShoot_62(){
addFrameScript(2, frame3);
}
function frame3(){
}
}
}//package Main_fla
Section 102
//LAZERShoot_47 (Main_fla.LAZERShoot_47)
package Main_fla {
import flash.display.*;
public dynamic class LAZERShoot_47 extends MovieClip {
public function LAZERShoot_47(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package Main_fla
Section 103
//legw_398 (Main_fla.legw_398)
package Main_fla {
import flash.display.*;
public dynamic class legw_398 extends MovieClip {
public var p:MovieClip;
}
}//package Main_fla
Section 104
//Loader_399 (Main_fla.Loader_399)
package Main_fla {
import flash.display.*;
public dynamic class Loader_399 extends MovieClip {
public var loadingBar:MovieClip;
public var mcStripe:MovieClip;
public function Loader_399(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package Main_fla
Section 105
//logoaniinit_366 (Main_fla.logoaniinit_366)
package Main_fla {
import flash.display.*;
public dynamic class logoaniinit_366 extends MovieClip {
public function logoaniinit_366(){
addFrameScript(0, frame1, 193, frame194);
}
function frame1(){
}
function frame194(){
stop();
}
}
}//package Main_fla
Section 106
//MACHINEGUNLoad_53 (Main_fla.MACHINEGUNLoad_53)
package Main_fla {
import flash.display.*;
public dynamic class MACHINEGUNLoad_53 extends MovieClip {
public function MACHINEGUNLoad_53(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
}
}
}//package Main_fla
Section 107
//MACHINEGUNShoot_52 (Main_fla.MACHINEGUNShoot_52)
package Main_fla {
import flash.display.*;
public dynamic class MACHINEGUNShoot_52 extends MovieClip {
public function MACHINEGUNShoot_52(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package Main_fla
Section 108
//MAGNUMLoad_56 (Main_fla.MAGNUMLoad_56)
package Main_fla {
import flash.display.*;
public dynamic class MAGNUMLoad_56 extends MovieClip {
public function MAGNUMLoad_56(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package Main_fla
Section 109
//MAGNUMShoot_55 (Main_fla.MAGNUMShoot_55)
package Main_fla {
import flash.display.*;
public dynamic class MAGNUMShoot_55 extends MovieClip {
public function MAGNUMShoot_55(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package Main_fla
Section 110
//MainCharacter_22 (Main_fla.MainCharacter_22)
package Main_fla {
import flash.display.*;
public dynamic class MainCharacter_22 extends MovieClip {
public var bBox:MovieClip;
public var torso:MovieClip;
public var dead:MovieClip;
public var body:MovieClip;
public var feet:MovieClip;
public var gas:MovieClip;
}
}//package Main_fla
Section 111
//MICHELLEShoot_15 (Main_fla.MICHELLEShoot_15)
package Main_fla {
import flash.display.*;
public dynamic class MICHELLEShoot_15 extends MovieClip {
public function MICHELLEShoot_15(){
addFrameScript(2, frame3);
}
function frame3(){
}
}
}//package Main_fla
Section 112
//MuteMov_225 (Main_fla.MuteMov_225)
package Main_fla {
import flash.display.*;
public dynamic class MuteMov_225 extends MovieClip {
public function MuteMov_225(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Main_fla
Section 113
//OBAMADIE_23 (Main_fla.OBAMADIE_23)
package Main_fla {
import flash.display.*;
public dynamic class OBAMADIE_23 extends MovieClip {
public function OBAMADIE_23(){
addFrameScript(38, frame39);
}
function frame39(){
gotoAndPlay(29);
}
}
}//package Main_fla
Section 114
//PISTOLLoading_32 (Main_fla.PISTOLLoading_32)
package Main_fla {
import flash.display.*;
public dynamic class PISTOLLoading_32 extends MovieClip {
public function PISTOLLoading_32(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 115
//PISTOLShoot_31 (Main_fla.PISTOLShoot_31)
package Main_fla {
import flash.display.*;
public dynamic class PISTOLShoot_31 extends MovieClip {
public function PISTOLShoot_31(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package Main_fla
Section 116
//PLAYGAME_3 (Main_fla.PLAYGAME_3)
package Main_fla {
import flash.display.*;
public dynamic class PLAYGAME_3 extends MovieClip {
public var barricadeAnim:MovieClip;
public var menuBut:SimpleButton;
public var dayPanel:MovieClip;
public var healthUI:MovieClip;
public function PLAYGAME_3(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package Main_fla
Section 117
//RIFLELoad_58 (Main_fla.RIFLELoad_58)
package Main_fla {
import flash.display.*;
public dynamic class RIFLELoad_58 extends MovieClip {
public function RIFLELoad_58(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package Main_fla
Section 118
//RIFLEShoot_57 (Main_fla.RIFLEShoot_57)
package Main_fla {
import flash.display.*;
public dynamic class RIFLEShoot_57 extends MovieClip {
public function RIFLEShoot_57(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package Main_fla
Section 119
//SCREENHOWTOPLAY_98 (Main_fla.SCREENHOWTOPLAY_98)
package Main_fla {
import flash.display.*;
public dynamic class SCREENHOWTOPLAY_98 extends MovieClip {
public var closeBut:SimpleButton;
}
}//package Main_fla
Section 120
//SCREENWEAPON_141 (Main_fla.SCREENWEAPON_141)
package Main_fla {
import flash.display.*;
public dynamic class SCREENWEAPON_141 extends MovieClip {
public var flameThrowerBut:MovieClip;
public var AK47But:MovieClip;
public var batBut:MovieClip;
public var magnumBut:MovieClip;
public var machineGunBut:MovieClip;
public var backupLabel:MovieClip;
public var dEagleBut:MovieClip;
public var uziBut:MovieClip;
public var pistolBut:MovieClip;
public var rifleBut:MovieClip;
public var mainLabel:MovieClip;
public var laserBut:MovieClip;
public var gLauncherBut:MovieClip;
}
}//package Main_fla
Section 121
//ShopPanel_134 (Main_fla.ShopPanel_134)
package Main_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ShopPanel_134 extends MovieClip {
public var weaponRightBut:SimpleButton;
public var survivorLeftBut:SimpleButton;
public var currentBarricadeDisp:TextField;
public var weaponLeftBut:SimpleButton;
public var barricadeDisp:TextField;
public var acceptBut:SimpleButton;
public var armoryFullMov:MovieClip;
public var noVacancyMov:MovieClip;
public var hourDisp:TextField;
public var barricadeRightBut:SimpleButton;
public var repairDisp:TextField;
public var survivorDisp:TextField;
public var barricadeLeftBut:SimpleButton;
public var survivorRightBut:SimpleButton;
public var weaponDisp:TextField;
}
}//package Main_fla
Section 122
//SmallBloodParticle_232 (Main_fla.SmallBloodParticle_232)
package Main_fla {
import flash.display.*;
public dynamic class SmallBloodParticle_232 extends MovieClip {
public function SmallBloodParticle_232(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 123
//SummaryPanel_132 (Main_fla.SummaryPanel_132)
package Main_fla {
import flash.display.*;
import flash.text.*;
public dynamic class SummaryPanel_132 extends MovieClip {
public var moreBut:SimpleButton;
public var barricadeDisp:TextField;
public var dayDisp:TextField;
public var moreBut2:SimpleButton;
public var survivorDisp:TextField;
public var weaponDisp:TextField;
}
}//package Main_fla
Section 124
//Tween59_155 (Main_fla.Tween59_155)
package Main_fla {
import flash.display.*;
public dynamic class Tween59_155 extends MovieClip {
public var mainBut:SimpleButton;
public var backupBut:SimpleButton;
public var noMainWeaponMov:MovieClip;
public var mainDisp:MovieClip;
public var backupDisp:MovieClip;
}
}//package Main_fla
Section 125
//UZILoad_50 (Main_fla.UZILoad_50)
package Main_fla {
import flash.display.*;
public dynamic class UZILoad_50 extends MovieClip {
public function UZILoad_50(){
addFrameScript(26, frame27);
}
function frame27(){
stop();
}
}
}//package Main_fla
Section 126
//UZIShoot_49 (Main_fla.UZIShoot_49)
package Main_fla {
import flash.display.*;
public dynamic class UZIShoot_49 extends MovieClip {
public function UZIShoot_49(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package Main_fla
Section 127
//VIEWACHIEVEMENTshadow_130 (Main_fla.VIEWACHIEVEMENTshadow_130)
package Main_fla {
import flash.display.*;
public dynamic class VIEWACHIEVEMENTshadow_130 extends MovieClip {
public function VIEWACHIEVEMENTshadow_130(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package Main_fla
Section 128
//ZOMBIE01Attack_267 (Main_fla.ZOMBIE01Attack_267)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE01Attack_267 extends MovieClip {
public function ZOMBIE01Attack_267(){
addFrameScript(16, frame17);
}
function frame17(){
}
}
}//package Main_fla
Section 129
//ZOMBIE01Burn_268 (Main_fla.ZOMBIE01Burn_268)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE01Burn_268 extends MovieClip {
public function ZOMBIE01Burn_268(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 130
//ZOMBIE01Die_269 (Main_fla.ZOMBIE01Die_269)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE01Die_269 extends MovieClip {
public function ZOMBIE01Die_269(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Main_fla
Section 131
//ZOMBIE01EatObama_274 (Main_fla.ZOMBIE01EatObama_274)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE01EatObama_274 extends MovieClip {
public function ZOMBIE01EatObama_274(){
addFrameScript(46, frame47);
}
function frame47(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 132
//ZOMBIE01Explode_270 (Main_fla.ZOMBIE01Explode_270)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE01Explode_270 extends MovieClip {
public function ZOMBIE01Explode_270(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 133
//ZOMBIE01Headshot_271 (Main_fla.ZOMBIE01Headshot_271)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE01Headshot_271 extends MovieClip {
public function ZOMBIE01Headshot_271(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 134
//ZOMBIE01Hit_272 (Main_fla.ZOMBIE01Hit_272)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE01Hit_272 extends MovieClip {
public function ZOMBIE01Hit_272(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 135
//ZOMBIE02Attack_258 (Main_fla.ZOMBIE02Attack_258)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE02Attack_258 extends MovieClip {
public function ZOMBIE02Attack_258(){
addFrameScript(20, frame21);
}
function frame21(){
}
}
}//package Main_fla
Section 136
//ZOMBIE02Burn_262 (Main_fla.ZOMBIE02Burn_262)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE02Burn_262 extends MovieClip {
public function ZOMBIE02Burn_262(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 137
//ZOMBIE02Die_260 (Main_fla.ZOMBIE02Die_260)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE02Die_260 extends MovieClip {
public function ZOMBIE02Die_260(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Main_fla
Section 138
//ZOMBIE02EatObama_264 (Main_fla.ZOMBIE02EatObama_264)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE02EatObama_264 extends MovieClip {
public function ZOMBIE02EatObama_264(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 139
//ZOMBIE02Explode_263 (Main_fla.ZOMBIE02Explode_263)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE02Explode_263 extends MovieClip {
public function ZOMBIE02Explode_263(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 140
//ZOMBIE02Headshot_261 (Main_fla.ZOMBIE02Headshot_261)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE02Headshot_261 extends MovieClip {
public function ZOMBIE02Headshot_261(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 141
//ZOMBIE02Hit_259 (Main_fla.ZOMBIE02Hit_259)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE02Hit_259 extends MovieClip {
public function ZOMBIE02Hit_259(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 142
//ZOMBIE03Attack_248 (Main_fla.ZOMBIE03Attack_248)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE03Attack_248 extends MovieClip {
public function ZOMBIE03Attack_248(){
addFrameScript(16, frame17);
}
function frame17(){
}
}
}//package Main_fla
Section 143
//ZOMBIE03burn_252 (Main_fla.ZOMBIE03burn_252)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE03burn_252 extends MovieClip {
public function ZOMBIE03burn_252(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 144
//ZOMBIE03Die_250 (Main_fla.ZOMBIE03Die_250)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE03Die_250 extends MovieClip {
public function ZOMBIE03Die_250(){
addFrameScript(12, frame13);
}
function frame13(){
}
}
}//package Main_fla
Section 145
//ZOMBIE03EatObama_254 (Main_fla.ZOMBIE03EatObama_254)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE03EatObama_254 extends MovieClip {
public function ZOMBIE03EatObama_254(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 146
//ZOMBIE03Explode_253 (Main_fla.ZOMBIE03Explode_253)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE03Explode_253 extends MovieClip {
public function ZOMBIE03Explode_253(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 147
//ZOMBIE03Headshot_251 (Main_fla.ZOMBIE03Headshot_251)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE03Headshot_251 extends MovieClip {
public function ZOMBIE03Headshot_251(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 148
//ZOMBIE03Hit_249 (Main_fla.ZOMBIE03Hit_249)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE03Hit_249 extends MovieClip {
public function ZOMBIE03Hit_249(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 149
//ZOMBIE04Attack_278 (Main_fla.ZOMBIE04Attack_278)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE04Attack_278 extends MovieClip {
public function ZOMBIE04Attack_278(){
addFrameScript(20, frame21);
}
function frame21(){
}
}
}//package Main_fla
Section 150
//ZOMBIE04burn_282 (Main_fla.ZOMBIE04burn_282)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE04burn_282 extends MovieClip {
public function ZOMBIE04burn_282(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 151
//ZOMBIE04Die_280 (Main_fla.ZOMBIE04Die_280)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE04Die_280 extends MovieClip {
public function ZOMBIE04Die_280(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Main_fla
Section 152
//ZOMBIE04EatObama_284 (Main_fla.ZOMBIE04EatObama_284)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE04EatObama_284 extends MovieClip {
public function ZOMBIE04EatObama_284(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 153
//ZOMBIE04Explode_283 (Main_fla.ZOMBIE04Explode_283)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE04Explode_283 extends MovieClip {
public function ZOMBIE04Explode_283(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 154
//ZOMBIE04Headshot_281 (Main_fla.ZOMBIE04Headshot_281)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE04Headshot_281 extends MovieClip {
public function ZOMBIE04Headshot_281(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 155
//ZOMBIE04Hit_279 (Main_fla.ZOMBIE04Hit_279)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE04Hit_279 extends MovieClip {
public function ZOMBIE04Hit_279(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 156
//ZOMBIE05Attack_288 (Main_fla.ZOMBIE05Attack_288)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE05Attack_288 extends MovieClip {
public function ZOMBIE05Attack_288(){
addFrameScript(16, frame17);
}
function frame17(){
}
}
}//package Main_fla
Section 157
//ZOMBIE05burn_292 (Main_fla.ZOMBIE05burn_292)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE05burn_292 extends MovieClip {
public function ZOMBIE05burn_292(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 158
//ZOMBIE05Die_290 (Main_fla.ZOMBIE05Die_290)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE05Die_290 extends MovieClip {
public function ZOMBIE05Die_290(){
addFrameScript(12, frame13);
}
function frame13(){
}
}
}//package Main_fla
Section 159
//ZOMBIE05EatObama_294 (Main_fla.ZOMBIE05EatObama_294)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE05EatObama_294 extends MovieClip {
public function ZOMBIE05EatObama_294(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 160
//ZOMBIE05Explode_293 (Main_fla.ZOMBIE05Explode_293)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE05Explode_293 extends MovieClip {
public function ZOMBIE05Explode_293(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 161
//ZOMBIE05Headshot_291 (Main_fla.ZOMBIE05Headshot_291)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE05Headshot_291 extends MovieClip {
public function ZOMBIE05Headshot_291(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 162
//ZOMBIE05Hit_289 (Main_fla.ZOMBIE05Hit_289)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE05Hit_289 extends MovieClip {
public function ZOMBIE05Hit_289(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 163
//ZOMBIE06Attack_298 (Main_fla.ZOMBIE06Attack_298)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE06Attack_298 extends MovieClip {
public function ZOMBIE06Attack_298(){
addFrameScript(24, frame25);
}
function frame25(){
}
}
}//package Main_fla
Section 164
//ZOMBIE06burn_302 (Main_fla.ZOMBIE06burn_302)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE06burn_302 extends MovieClip {
public function ZOMBIE06burn_302(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 165
//ZOMBIE06Die_300 (Main_fla.ZOMBIE06Die_300)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE06Die_300 extends MovieClip {
public function ZOMBIE06Die_300(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Main_fla
Section 166
//ZOMBIE06EatObama_304 (Main_fla.ZOMBIE06EatObama_304)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE06EatObama_304 extends MovieClip {
public function ZOMBIE06EatObama_304(){
addFrameScript(41, frame42);
}
function frame42(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 167
//ZOMBIE06Explode_303 (Main_fla.ZOMBIE06Explode_303)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE06Explode_303 extends MovieClip {
public function ZOMBIE06Explode_303(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 168
//ZOMBIE06Headshot_301 (Main_fla.ZOMBIE06Headshot_301)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE06Headshot_301 extends MovieClip {
public function ZOMBIE06Headshot_301(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 169
//ZOMBIE06Hit_299 (Main_fla.ZOMBIE06Hit_299)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE06Hit_299 extends MovieClip {
public function ZOMBIE06Hit_299(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 170
//ZOMBIE07Attack_308 (Main_fla.ZOMBIE07Attack_308)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE07Attack_308 extends MovieClip {
public function ZOMBIE07Attack_308(){
addFrameScript(16, frame17);
}
function frame17(){
}
}
}//package Main_fla
Section 171
//ZOMBIE07burn_312 (Main_fla.ZOMBIE07burn_312)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE07burn_312 extends MovieClip {
public function ZOMBIE07burn_312(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 172
//ZOMBIE07Die_310 (Main_fla.ZOMBIE07Die_310)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE07Die_310 extends MovieClip {
public function ZOMBIE07Die_310(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Main_fla
Section 173
//ZOMBIE07EatObama_314 (Main_fla.ZOMBIE07EatObama_314)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE07EatObama_314 extends MovieClip {
public function ZOMBIE07EatObama_314(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 174
//ZOMBIE07Explode_313 (Main_fla.ZOMBIE07Explode_313)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE07Explode_313 extends MovieClip {
public function ZOMBIE07Explode_313(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 175
//ZOMBIE07Headshot_311 (Main_fla.ZOMBIE07Headshot_311)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE07Headshot_311 extends MovieClip {
public function ZOMBIE07Headshot_311(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 176
//ZOMBIE07Hit_309 (Main_fla.ZOMBIE07Hit_309)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE07Hit_309 extends MovieClip {
public function ZOMBIE07Hit_309(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 177
//ZOMBIE08burn_322 (Main_fla.ZOMBIE08burn_322)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE08burn_322 extends MovieClip {
public function ZOMBIE08burn_322(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 178
//ZOMBIE08Die_320 (Main_fla.ZOMBIE08Die_320)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE08Die_320 extends MovieClip {
public function ZOMBIE08Die_320(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Main_fla
Section 179
//ZOMBIE08EatObama_324 (Main_fla.ZOMBIE08EatObama_324)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE08EatObama_324 extends MovieClip {
public function ZOMBIE08EatObama_324(){
addFrameScript(47, frame48);
}
function frame48(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 180
//ZOMBIE08Explode_323 (Main_fla.ZOMBIE08Explode_323)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE08Explode_323 extends MovieClip {
public function ZOMBIE08Explode_323(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 181
//ZOMBIE08Headshot_321 (Main_fla.ZOMBIE08Headshot_321)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE08Headshot_321 extends MovieClip {
public function ZOMBIE08Headshot_321(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 182
//ZOMBIE08Hit_319 (Main_fla.ZOMBIE08Hit_319)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE08Hit_319 extends MovieClip {
public function ZOMBIE08Hit_319(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 183
//ZOMBIE09burn_362 (Main_fla.ZOMBIE09burn_362)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE09burn_362 extends MovieClip {
public function ZOMBIE09burn_362(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 184
//ZOMBIE09EatObama_364 (Main_fla.ZOMBIE09EatObama_364)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE09EatObama_364 extends MovieClip {
public function ZOMBIE09EatObama_364(){
addFrameScript(46, frame47);
}
function frame47(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 185
//ZOMBIE09Explode_363 (Main_fla.ZOMBIE09Explode_363)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE09Explode_363 extends MovieClip {
public function ZOMBIE09Explode_363(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 186
//ZOMBIE09Headshot_361 (Main_fla.ZOMBIE09Headshot_361)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE09Headshot_361 extends MovieClip {
public function ZOMBIE09Headshot_361(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 187
//ZOMBIE09Hit_359 (Main_fla.ZOMBIE09Hit_359)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE09Hit_359 extends MovieClip {
public function ZOMBIE09Hit_359(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 188
//ZOMBIE10burn_342 (Main_fla.ZOMBIE10burn_342)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE10burn_342 extends MovieClip {
public function ZOMBIE10burn_342(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 189
//ZOMBIE10Die_340 (Main_fla.ZOMBIE10Die_340)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE10Die_340 extends MovieClip {
public function ZOMBIE10Die_340(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Main_fla
Section 190
//ZOMBIE10EatObama_344 (Main_fla.ZOMBIE10EatObama_344)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE10EatObama_344 extends MovieClip {
public function ZOMBIE10EatObama_344(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 191
//ZOMBIE10Explode_343 (Main_fla.ZOMBIE10Explode_343)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE10Explode_343 extends MovieClip {
public function ZOMBIE10Explode_343(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 192
//ZOMBIE10Headshot_341 (Main_fla.ZOMBIE10Headshot_341)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE10Headshot_341 extends MovieClip {
public function ZOMBIE10Headshot_341(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
}
}//package Main_fla
Section 193
//ZOMBIE10Hit_339 (Main_fla.ZOMBIE10Hit_339)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE10Hit_339 extends MovieClip {
public function ZOMBIE10Hit_339(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 194
//ZOMBIE11burn_352 (Main_fla.ZOMBIE11burn_352)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE11burn_352 extends MovieClip {
public function ZOMBIE11burn_352(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 195
//ZOMBIE11Die_350 (Main_fla.ZOMBIE11Die_350)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE11Die_350 extends MovieClip {
public function ZOMBIE11Die_350(){
addFrameScript(12, frame13);
}
function frame13(){
}
}
}//package Main_fla
Section 196
//ZOMBIE11EatObama_354 (Main_fla.ZOMBIE11EatObama_354)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE11EatObama_354 extends MovieClip {
public function ZOMBIE11EatObama_354(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 197
//ZOMBIE11Explode_353 (Main_fla.ZOMBIE11Explode_353)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE11Explode_353 extends MovieClip {
public function ZOMBIE11Explode_353(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 198
//ZOMBIE11Headshot_351 (Main_fla.ZOMBIE11Headshot_351)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE11Headshot_351 extends MovieClip {
public function ZOMBIE11Headshot_351(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 199
//ZOMBIE11Hit_349 (Main_fla.ZOMBIE11Hit_349)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE11Hit_349 extends MovieClip {
public function ZOMBIE11Hit_349(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 200
//ZOMBIE12Attack_238 (Main_fla.ZOMBIE12Attack_238)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE12Attack_238 extends MovieClip {
public function ZOMBIE12Attack_238(){
addFrameScript(16, frame17);
}
function frame17(){
}
}
}//package Main_fla
Section 201
//ZOMBIE12burn_242 (Main_fla.ZOMBIE12burn_242)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE12burn_242 extends MovieClip {
public function ZOMBIE12burn_242(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 202
//ZOMBIE12Die_240 (Main_fla.ZOMBIE12Die_240)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE12Die_240 extends MovieClip {
public function ZOMBIE12Die_240(){
addFrameScript(12, frame13);
}
function frame13(){
}
}
}//package Main_fla
Section 203
//ZOMBIE12EatObama_244 (Main_fla.ZOMBIE12EatObama_244)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE12EatObama_244 extends MovieClip {
public function ZOMBIE12EatObama_244(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 204
//ZOMBIE12Explode_243 (Main_fla.ZOMBIE12Explode_243)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE12Explode_243 extends MovieClip {
public function ZOMBIE12Explode_243(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 205
//ZOMBIE12Headshot_241 (Main_fla.ZOMBIE12Headshot_241)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE12Headshot_241 extends MovieClip {
public function ZOMBIE12Headshot_241(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 206
//ZOMBIE12Hit_239 (Main_fla.ZOMBIE12Hit_239)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE12Hit_239 extends MovieClip {
public function ZOMBIE12Hit_239(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 207
//ZOMBIE13burn_332 (Main_fla.ZOMBIE13burn_332)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE13burn_332 extends MovieClip {
public function ZOMBIE13burn_332(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package Main_fla
Section 208
//ZOMBIE13Die_330 (Main_fla.ZOMBIE13Die_330)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE13Die_330 extends MovieClip {
public function ZOMBIE13Die_330(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package Main_fla
Section 209
//ZOMBIE13EatObama_334 (Main_fla.ZOMBIE13EatObama_334)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE13EatObama_334 extends MovieClip {
public function ZOMBIE13EatObama_334(){
addFrameScript(35, frame36);
}
function frame36(){
gotoAndPlay(7);
}
}
}//package Main_fla
Section 210
//ZOMBIE13Explode_333 (Main_fla.ZOMBIE13Explode_333)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE13Explode_333 extends MovieClip {
public function ZOMBIE13Explode_333(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package Main_fla
Section 211
//ZOMBIE13Headshot_331 (Main_fla.ZOMBIE13Headshot_331)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE13Headshot_331 extends MovieClip {
public function ZOMBIE13Headshot_331(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package Main_fla
Section 212
//ZOMBIE13Hit_329 (Main_fla.ZOMBIE13Hit_329)
package Main_fla {
import flash.display.*;
public dynamic class ZOMBIE13Hit_329 extends MovieClip {
public function ZOMBIE13Hit_329(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Main_fla
Section 213
//SWFConsole (rl.dev.SWFConsole)
package rl.dev {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.system.*;
public class SWFConsole extends Sprite {
private static const INPUT_BG_HEIGHT:int = 20;
private static const _FPS_REFRESH_RATE:uint = 1000;
private static const SCROLLHANDLE_COLOUR:int = 0xFFFFFF;
private static const HEADER_HEIGHT:int = 20;
private static const SCROLLHANDLE_WIDTH:int = 10;
private static const TEXT_COLOUR:int = 0xFFFFFF;
private static const HEADER_BG_ALPHA:Number = 0.6;
private static const SCROLLTRACK_ALPHA:Number = 0.5;
private static const SCROLLBUTTON_ALPHA:Number = 0.9;
private static const _HISTORY_STATES:uint = 20;
private static const BACKGROUND_HEIGHT:int = 200;
private static const INPUTAREA_BG_HEIGHT:int = 30;
private static const SCROLLHANDLE_HEIGHT:int = 60;
private static const UPDATE_INTERVAL:int = 1000;
private static const SCROLLTRACK_WIDTH:int = 10;
private static const SCROLLTRACK_COLOUR:int = 0;
private static const INPUT_BG_COLOUR:int = 0xFFFFFF;
private static const SCROLLHANDLE_ALPHA:Number = 0.9;
private static const VERSION:String = "1.1";
private static const INPUT_BG_ALPHA:Number = 0.2;
private static const SHADOW_COLOUR:int = 0;
private static const SCROLLBUTTON_COLOUR:int = 0xFFFFFF;
private static const INPUTAREA_BG_ALPHA:Number = 0.7;
private static const HEADER_BG_COLOUR:int = 0;
private static const WELCOME_MESSAGE:String = "============================================================
New features:
- Resource Monitor - type !resmon to activate
============================================================";
private static const BACKGROUND_ALPHA:Number = 0.7;
private static const BACKGROUND_COLOUR:int = 0;
private static const INPUTAREA_BG_COLOUR:int = 0;
private static var _scrollButtonDown:Sprite;
private static var _enabled:Boolean = false;
private static var _stageHeight:Number;
private static var _stageWidth:Number;
private static var _headerText:TextField;
private static var _percent:Number;
private static var _text:TextField;
private static var _lastcommands:Array;
private static var _avg:Number = 0;
private static var _traceEnabled:Boolean = false;
private static var _textFormat:TextFormat;
private static var _fpsBg:Shape;
private static var _fps:Sprite;
private static var _memUsage:Sprite;
private static var _outputMask:Shape;
private static var _scrollHandle:Sprite;
private static var _fpsTimer:Timer;
private static var _txt_avgfps:TextField;
private static var _timer:Timer;
private static var _txt_mem:TextField;
public static var _activated:Boolean = false;
private static var _history:Array;
private static var _headerTextFormat:TextFormat;
private static var _txt_fps:TextField;
private static var _inputAreaBg:Shape;
private static var _fpsValue:uint = 0;
private static var _inputBg:Shape;
private static var _headerTextShadow:TextField;
private static var _scrollButtonUp:Sprite;
private static var _scrollButtonDownShape:Shape;
private static var _min:Number;
private static var _max:Number;
private static var _stageFrameRate:uint;
private static var _scrollButtonUpShape:Shape;
private static var _scrollTrack:Shape;
private static var _offset:Number;
private static var _inputText:TextField;
private static var _scrollHandleShape:Shape;
private static var _headerTextShadowFormat:TextFormat;
private static var _frames:uint = 0;
private static var _bg:Shape;
private static var _headerbg:Shape;
private static var _lastcommandsindex:Number;
private static var _memBg:Shape;
public function SWFConsole(_arg1:Number, _arg2:Number, _arg3:Boolean=false){
_stageWidth = _arg1;
_stageHeight = _arg2;
_traceEnabled = _arg3;
if (stage){
_init();
} else {
addEventListener(Event.ADDED_TO_STAGE, _init, false, 0, true);
};
}
private function _findChar(_arg1:String, _arg2:String):Boolean{
var _local3:*;
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == _arg2){
return (true);
};
_local3++;
};
return (false);
}
private function _createScrollHandle():void{
_scrollHandleShape = new Shape();
_scrollHandleShape.graphics.beginFill(SCROLLHANDLE_COLOUR, SCROLLHANDLE_ALPHA);
_scrollHandleShape.graphics.drawRect(0, 0, SCROLLHANDLE_WIDTH, SCROLLHANDLE_HEIGHT);
_scrollHandleShape.graphics.endFill();
_scrollHandleShape.cacheAsBitmap = true;
_scrollHandle = new Sprite();
_scrollHandle.addChild(_scrollHandleShape);
_scrollHandle.x = (_scrollTrack.x - (SCROLLHANDLE_WIDTH - SCROLLTRACK_WIDTH));
_scrollHandle.y = _scrollTrack.y;
addChild(_scrollHandle);
}
private function _processCommand(_arg1:String):void{
output(("> " + _arg1));
_lastcommands.push(_arg1);
_lastcommandsindex = (_lastcommands.length - 1);
_arg1 = _removeWhitespace(_arg1);
if (_arg1 == ""){
return;
};
if (_arg1.charAt(0) == "!"){
_runCommand(_arg1);
} else {
if (_findChar(_arg1, "(")){
_runFunc(_arg1);
} else {
_runProperty(_arg1);
};
};
}
private function _recurseChildren(_arg1:Object, _arg2:String):Object{
var _local3:Object;
var _local4:*;
if ((((((_arg1.hasOwnProperty("numChildren") == false)) || ((_arg1.numChildren == null)))) || ((_arg1.numChildren == 0)))){
return (_local3);
};
_local4 = 0;
while (_local4 < _arg1.numChildren) {
if (_arg1.getChildAt(_local4).name == _arg2){
return (_arg1.getChildAt(_local4));
};
if (_local3 == null){
_local3 = _recurseChildren((_arg1.getChildAt(_local4) as Object), _arg2);
};
_local4++;
};
return (_local3);
}
private function _createScrollBar():void{
_createScrollTrack();
_createScrollButtons();
_createScrollHandle();
_scrollTrack.visible = false;
_scrollButtonUp.visible = false;
_scrollButtonDown.visible = false;
_scrollHandle.visible = false;
_min = _scrollTrack.y;
_max = ((_scrollTrack.y + _scrollTrack.height) - _scrollHandle.height);
_scrollHandle.buttonMode = true;
_scrollHandle.addEventListener(MouseEvent.MOUSE_DOWN, _handleDown, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, _handleUp, false, 0, true);
addEventListener(MouseEvent.MOUSE_WHEEL, _scrollWheel, false, 0, true);
}
private function _handleUp(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, _handleMove);
}
private function _createScrollTrack():void{
_scrollTrack = new Shape();
_scrollTrack.graphics.beginFill(SCROLLTRACK_COLOUR, SCROLLTRACK_ALPHA);
_scrollTrack.graphics.drawRect(0, 0, SCROLLTRACK_WIDTH, (BACKGROUND_HEIGHT - 60));
_scrollTrack.graphics.endFill();
_scrollTrack.x = (stage.stageWidth - 30);
_scrollTrack.y = (HEADER_HEIGHT + 30);
_scrollTrack.cacheAsBitmap = true;
addChild(_scrollTrack);
}
public function hide():void{
alpha = 0;
visible = false;
}
private function _keyListener(_arg1:KeyboardEvent):void{
if (_activated){
switch (_arg1.keyCode){
case 192:
if (_enabled){
hide();
} else {
_inputText.text = "";
show();
stage.focus = _inputText;
};
_enabled = !(_enabled);
break;
case 13:
_processCommand(_inputText.text);
_inputText.text = "";
break;
case 38:
if (_lastcommands.length > 0){
_inputText.text = _lastcommands[_lastcommandsindex];
_inputText.setSelection(_inputText.length, _inputText.length);
_lastcommandsindex--;
if (_lastcommandsindex < 0){
_lastcommandsindex = 0;
};
};
break;
};
};
}
private function _calculateFPS(_arg1:TimerEvent):void{
var _local2:uint;
_fpsValue = ((_frames)>_stageFrameRate) ? _stageFrameRate : _frames;
_txt_fps.text = ("FPS: " + String(_fpsValue));
_frames = 0;
_history.unshift(_fpsValue);
if (_history.length > _HISTORY_STATES){
_history.pop();
};
_avg = 0;
_local2 = 0;
while (_local2 < _history.length) {
_avg = (_avg + _history[_local2]);
_local2++;
};
_txt_avgfps.text = ("AVG: " + String(Math.round((_avg / _history.length))));
}
private function _removeWhitespace(_arg1:String):String{
var _local2:String;
var _local3:*;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) != " "){
_local2 = (_local2 + _arg1.charAt(_local3));
};
_local3++;
};
return (_local2);
}
private function _handleDown(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, _handleMove, false, 0, true);
_offset = (mouseY - _scrollHandle.y);
}
private function _createHeader():void{
_headerbg = new Shape();
_headerbg.graphics.beginFill(HEADER_BG_COLOUR, HEADER_BG_ALPHA);
_headerbg.graphics.drawRect(0, 0, stage.stageWidth, HEADER_HEIGHT);
_headerbg.graphics.endFill();
_headerbg.cacheAsBitmap = true;
addChild(_headerbg);
_headerTextShadowFormat = new TextFormat();
_headerTextShadowFormat.font = "_typewriter";
_headerTextShadowFormat.color = SHADOW_COLOUR;
_headerTextShadowFormat.italic = true;
_headerTextShadow = new TextField();
_headerTextShadow.x = 12;
_headerTextShadow.y = 2;
_headerTextShadow.height = HEADER_HEIGHT;
_headerTextShadow.autoSize = TextFieldAutoSize.LEFT;
_headerTextShadow.multiline = false;
_headerTextShadow.defaultTextFormat = _headerTextShadowFormat;
_headerTextShadow.text = ("SWFConsole v" + VERSION);
_headerTextFormat = new TextFormat();
_headerTextFormat.font = "_typewriter";
_headerTextFormat.color = TEXT_COLOUR;
_headerTextFormat.bold;
_headerTextFormat.italic = true;
_headerText = new TextField();
_headerText.x = 10;
_headerText.height = HEADER_HEIGHT;
_headerText.autoSize = TextFieldAutoSize.LEFT;
_headerText.multiline = false;
_headerText.defaultTextFormat = _headerTextFormat;
_headerText.text = ("SWFConsole v" + VERSION);
addChild(_headerTextShadow);
addChild(_headerText);
}
private function _createScrollButtons():void{
_scrollButtonUpShape = new Shape();
_scrollButtonDownShape = new Shape();
_createScrollButtonShape(_scrollButtonUpShape);
_createScrollButtonShape(_scrollButtonDownShape);
_scrollButtonUp = new Sprite();
_scrollButtonUp.addChild(_scrollButtonUpShape);
_scrollButtonUp.x = (stage.stageWidth - 30);
_scrollButtonUp.y = 40;
_scrollButtonUp.buttonMode = true;
_scrollButtonUp.addEventListener(MouseEvent.MOUSE_DOWN, _scrollButtonUpDown, false, 0, true);
addChild(_scrollButtonUp);
_scrollButtonDown = new Sprite();
_scrollButtonDown.addChild(_scrollButtonDownShape);
_scrollButtonDown.scaleY = -1;
_scrollButtonDown.x = (stage.stageWidth - 30);
_scrollButtonDown.y = ((_scrollTrack.y + _scrollTrack.height) + 10);
_scrollButtonDown.buttonMode = true;
_scrollButtonDown.addEventListener(MouseEvent.MOUSE_DOWN, _scrollButtonDownDown, false, 0, true);
addChild(_scrollButtonDown);
}
private function _relocate(_arg1:Event):void{
_headerbg.width = stage.stageWidth;
_bg.width = stage.stageWidth;
_text.width = (stage.stageWidth - 50);
_outputMask.width = (stage.stageWidth - 50);
_inputText.width = (stage.stageWidth - 50);
_inputAreaBg.width = stage.stageWidth;
_inputBg.width = (stage.stageWidth - 50);
_scrollTrack.x = Math.ceil((stage.stageWidth - 30));
_scrollButtonUp.x = Math.ceil((stage.stageWidth - 30));
_scrollButtonDown.x = Math.ceil((stage.stageWidth - 30));
_scrollHandle.x = Math.ceil((stage.stageWidth - 30));
x = Math.ceil((-((stage.stageWidth - _stageWidth)) * 0.5));
y = Math.ceil((-((stage.stageHeight - _stageHeight)) * 0.5));
if (_fps){
_fps.x = Math.ceil(((-((stage.stageWidth - _stageWidth)) * 0.5) + (stage.stageWidth - _fps.width)));
_fps.y = Math.ceil(((-((stage.stageHeight - _stageHeight)) * 0.5) + (stage.stageHeight - _fps.height)));
};
if (_memUsage){
_memUsage.x = Math.ceil(((-((stage.stageWidth - _stageWidth)) * 0.5) + (stage.stageWidth - _memUsage.width)));
_memUsage.y = Math.ceil((((-((stage.stageHeight - _stageHeight)) * 0.5) + (stage.stageHeight - _memUsage.height)) - 32));
};
}
private function _createScrollButtonShape(_arg1:Shape):void{
_arg1.graphics.beginFill(SCROLLBUTTON_COLOUR, SCROLLBUTTON_ALPHA);
_arg1.graphics.moveTo(0, 0);
_arg1.graphics.lineTo(5, -8);
_arg1.graphics.lineTo(10, 0);
_arg1.graphics.lineTo(0, 0);
_arg1.graphics.endFill();
_arg1.cacheAsBitmap = true;
}
private function _removeChar(_arg1:String, _arg2:String):String{
var _local3:String;
var _local4:*;
_local3 = "";
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg1.charAt(_local4) != _arg2){
_local3 = (_local3 + _arg1.charAt(_local4));
};
_local4++;
};
return (_local3);
}
private function _createBackground():void{
_bg = new Shape();
_bg.graphics.beginFill(BACKGROUND_COLOUR, BACKGROUND_ALPHA);
_bg.graphics.drawRect(0, 0, stage.stageWidth, BACKGROUND_HEIGHT);
_bg.graphics.endFill();
_bg.cacheAsBitmap = true;
_bg.y = HEADER_HEIGHT;
addChild(_bg);
}
private function _createOutputArea():void{
_text = new TextField();
_text.width = (stage.stageWidth - 50);
_text.x = 10;
_text.y = HEADER_HEIGHT;
_text.height = BACKGROUND_HEIGHT;
_text.multiline = true;
_text.wordWrap = true;
_text.autoSize = TextFieldAutoSize.LEFT;
_textFormat = new TextFormat();
_textFormat.color = TEXT_COLOUR;
_textFormat.font = "_typewriter";
_text.defaultTextFormat = _textFormat;
addChild(_text);
_outputMask = new Shape();
_outputMask.graphics.beginFill(0xFF00FF);
_outputMask.graphics.drawRect(0, 0, (stage.stageWidth - 50), BACKGROUND_HEIGHT);
_outputMask.graphics.endFill();
_outputMask.x = 10;
_outputMask.y = HEADER_HEIGHT;
addChild(_outputMask);
_text.mask = _outputMask;
}
private function _initFPS(){
var _local1:TextFormat;
_fps = new Sprite();
stage.addChild(_fps);
_stageFrameRate = stage.frameRate;
_history = new Array();
_txt_fps = new TextField();
_txt_fps.width = 100;
_txt_fps.height = 16;
_txt_fps.border = false;
_txt_fps.selectable = false;
_txt_avgfps = new TextField();
_txt_avgfps.width = 100;
_txt_avgfps.height = 16;
_txt_avgfps.border = false;
_txt_avgfps.selectable = false;
_local1 = new TextFormat();
_local1.font = "Verdana";
_local1.color = 0xFFCC00;
_local1.size = 10;
_txt_fps.defaultTextFormat = _local1;
_txt_avgfps.defaultTextFormat = _local1;
_txt_fps.text = ("FPS: " + _stageFrameRate);
_txt_avgfps.text = ("AVG: " + _stageFrameRate);
_txt_fps.x = (_txt_fps.width - _txt_avgfps.width);
_txt_avgfps.x = 0;
_txt_avgfps.y = _txt_fps.height;
_fps.addChild(_txt_fps);
_fps.addChild(_txt_avgfps);
_fpsBg = new Shape();
_fpsBg.graphics.beginFill(0, 0.7);
_fpsBg.graphics.drawRect(0, 0, _fps.width, _fps.height);
_fpsBg.graphics.endFill();
_fps.addChildAt(_fpsBg, 0);
_fps.x = Math.ceil(((-((stage.stageWidth - _stageWidth)) * 0.5) + (stage.stageWidth - _fps.width)));
_fps.y = Math.ceil(((-((stage.stageHeight - _stageHeight)) * 0.5) + (stage.stageHeight - _fps.height)));
_fpsTimer = new Timer(_FPS_REFRESH_RATE);
_fpsTimer.addEventListener(TimerEvent.TIMER, _calculateFPS, false, 0, true);
_fpsTimer.start();
addEventListener(Event.ENTER_FRAME, _updateFrames, false, 0, true);
}
private function _updateFrames(_arg1:Event):void{
_frames++;
}
private function _runFunc(_arg1:String):void{
var instanceSplit:Array;
var functionSplit:Array;
var parametersSplit:Array;
var instance:Object;
var command = _arg1;
if (_findChar(command, ".")){
instanceSplit = command.split(".");
instance = _recurseChildren(stage, instanceSplit[0]);
functionSplit = instanceSplit[1].split("(");
parametersSplit = functionSplit[1].split(")");
if (instance){
if (instance.hasOwnProperty(functionSplit[0])){
try {
if (parametersSplit[0] == ""){
output(instance[functionSplit[0]]());
} else {
if (_findChar(parametersSplit[0], "\"")){
parametersSplit[0] = _removeChar(parametersSplit[0], "\"");
};
output(instance[functionSplit[0]](parametersSplit[0]));
};
} catch(e:Error) {
output(e);
};
} else {
output(((("Function " + functionSplit[0]) + " not found on ") + instanceSplit[0]));
};
} else {
output("Instance not found");
};
} else {
functionSplit = command.split("(");
parametersSplit = functionSplit[1].split(")");
if (stage.hasOwnProperty(functionSplit[0])){
try {
if (parametersSplit[0] == ""){
output(stage[functionSplit[0]]());
} else {
if (_findChar(parametersSplit[0], "\"")){
parametersSplit[0] = _removeChar(parametersSplit[0], "\"");
};
output(stage[functionSplit[0]](parametersSplit[0]));
};
} catch(e:Error) {
output(e);
};
} else {
output(((("Function " + functionSplit[0]) + " not found on ") + instanceSplit[0]));
};
};
}
private function _scrollButtonUpDown(_arg1:MouseEvent):void{
_percent = (_percent - 0.1);
if (_percent < 0){
_percent = 0;
};
_text.y = (_headerbg.height + (-(_percent) * (_text.height - _outputMask.height)));
_scrollHandle.y = (_min + ((_max - _min) * _percent));
}
private function _createInputArea():void{
_inputAreaBg = new Shape();
_inputAreaBg.graphics.beginFill(INPUTAREA_BG_COLOUR, INPUTAREA_BG_ALPHA);
_inputAreaBg.graphics.drawRect(0, 0, stage.stageWidth, INPUTAREA_BG_HEIGHT);
_inputAreaBg.graphics.endFill();
_inputAreaBg.y = (HEADER_HEIGHT + BACKGROUND_HEIGHT);
addChild(_inputAreaBg);
_inputBg = new Shape();
_inputBg.graphics.beginFill(INPUT_BG_COLOUR, INPUT_BG_ALPHA);
_inputBg.graphics.drawRect(0, 0, (stage.stageWidth - 50), INPUT_BG_HEIGHT);
_inputBg.graphics.endFill();
_inputBg.x = 10;
_inputBg.y = (_inputAreaBg.y + 5);
addChild(_inputBg);
_inputText = new TextField();
_inputText.width = (stage.stageWidth - 50);
_inputText.x = 10;
_inputText.y = (_inputAreaBg.y + 5);
_inputText.height = INPUT_BG_HEIGHT;
_inputText.multiline = false;
_inputText.type = TextFieldType.INPUT;
_inputText.restrict = "^`";
_inputText.defaultTextFormat = _textFormat;
addChild(_inputText);
}
private function _runProperty(_arg1:String):void{
var instanceSplit:Array;
var propertySplit:Array;
var instance:Object;
var command = _arg1;
if (_findChar(command, "=")){
propertySplit = command.split("=");
if (_findChar(propertySplit[0], ".")){
instanceSplit = propertySplit[0].split(".");
instance = _recurseChildren(stage, instanceSplit[0]);
if (instance){
if (instance.hasOwnProperty(instanceSplit[1])){
if (propertySplit[1] == "false"){
propertySplit[1] = false;
};
instance[instanceSplit[1]] = propertySplit[1];
} else {
output(((("Property " + instanceSplit[1]) + " not found on ") + instanceSplit[0]));
};
} else {
output("Instance not found");
};
} else {
if (stage.hasOwnProperty(propertySplit[0])){
if (propertySplit[1] == "false"){
propertySplit[1] = false;
};
try {
stage[propertySplit[0]] = propertySplit[1];
} catch(e:Error) {
output("*** ERROR: this property of stage cannot be set ***");
};
} else {
output((("Property " + propertySplit[0]) + " not found on stage"));
};
};
} else {
if (_findChar(command, ".")){
instanceSplit = command.split(".");
instance = _recurseChildren(stage, instanceSplit[0]);
if (instance){
if (instance.hasOwnProperty(instanceSplit[1])){
output(((((instance.name + ".") + instanceSplit[1]) + " = ") + instance[instanceSplit[1]]));
} else {
output(((("Property " + instanceSplit[1]) + " not found on ") + instanceSplit[0]));
};
} else {
output("Instance not found");
};
} else {
if (stage.hasOwnProperty(command)){
output(((("stage." + command) + " = ") + stage[command]));
} else {
output((("Property " + command) + " not found on stage"));
};
};
};
}
private function _scrollButtonDownDown(_arg1:MouseEvent):void{
_percent = (_percent + 0.1);
if (_percent > 1){
_percent = 1;
};
_text.y = (_headerbg.height + (-(_percent) * (_text.height - _outputMask.height)));
_scrollHandle.y = (_min + ((_max - _min) * _percent));
}
private function _handleMove(_arg1:MouseEvent):void{
_scrollHandle.y = (mouseY - _offset);
if (_scrollHandle.y <= _min){
_scrollHandle.y = _min;
};
if (_scrollHandle.y >= _max){
_scrollHandle.y = _max;
};
_percent = ((_scrollHandle.y - _min) / (_max - _min));
if (_text.height > _outputMask.height){
_text.y = (_headerbg.height + (-(_percent) * (_text.height - _outputMask.height)));
};
_arg1.updateAfterEvent();
}
private function _scrollWheel(_arg1:MouseEvent):void{
if (_scrollButtonDown.visible){
if (_arg1.delta > 0){
_percent = (_percent - 0.1);
if (_percent < 0){
_percent = 0;
};
} else {
if (_arg1.delta < 0){
_percent = (_percent + 0.1);
if (_percent > 1){
_percent = 1;
};
};
};
_text.y = (_headerbg.height + (-(_percent) * (_text.height - _outputMask.height)));
_scrollHandle.y = (_min + ((_max - _min) * _percent));
};
}
private function _initMemUsage():void{
var _local1:TextFormat;
_memUsage = new Sprite();
stage.addChild(_memUsage);
_txt_mem = new TextField();
_txt_mem.width = 100;
_txt_mem.height = 16;
_txt_mem.border = false;
_txt_mem.selectable = false;
_local1 = new TextFormat();
_local1.font = "Verdana";
_local1.color = 6750054;
_local1.size = 10;
_txt_mem.defaultTextFormat = _local1;
_txt_mem.text = "MEM: 0 MB";
_memUsage.addChild(_txt_mem);
_memBg = new Shape();
_memBg.graphics.beginFill(0, 0.7);
_memBg.graphics.drawRect(0, 0, _memUsage.width, _memUsage.height);
_memBg.graphics.endFill();
_memUsage.addChildAt(_memBg, 0);
_memUsage.x = Math.ceil(((-((stage.stageWidth - _stageWidth)) * 0.5) + (stage.stageWidth - _memUsage.width)));
_memUsage.y = Math.ceil((((-((stage.stageHeight - _stageHeight)) * 0.5) + (stage.stageHeight - _memUsage.height)) - 32));
_timer = new Timer(UPDATE_INTERVAL);
_timer.addEventListener(TimerEvent.TIMER, displayUsage, false, 0, true);
_timer.start();
}
private function _runCommand(_arg1:String):void{
if (_arg1.substr(0, 7).toLowerCase() == "!resmon"){
if (_arg1.charAt(7) == "0"){
if (_fps != null){
_fps.visible = false;
};
if (_memUsage != null){
_memUsage.visible = false;
};
output("*** RESOURCE MONITOR DISABLED ***");
} else {
if (_fps == null){
_initFPS();
} else {
_fps.visible = true;
};
if (_memUsage == null){
_initMemUsage();
} else {
_memUsage.visible = true;
};
output("*** RESOURCE MONITOR ENABLED ***");
};
return;
};
output("Invalid command");
}
private function _init(_arg1:Event=null):void{
removeEventListener(Event.ADDED_TO_STAGE, _init);
trace("SWFConsole Initialised - ( ` ) to activate");
hide();
_createHeader();
_createBackground();
_createOutputArea();
_createScrollBar();
_createInputArea();
x = -(Math.ceil(((stage.stageWidth - _stageWidth) * 0.5)));
y = -(Math.ceil(((stage.stageHeight - _stageHeight) * 0.5)));
_activated = true;
_lastcommands = new Array();
_lastcommandsindex = 0;
output(WELCOME_MESSAGE);
stage.addEventListener(KeyboardEvent.KEY_UP, _keyListener, false, 0, true);
stage.addEventListener(Event.RESIZE, _relocate, false, 0, true);
}
public function show():void{
alpha = 1;
visible = true;
stage.focus = _inputText;
}
private function displayUsage(_arg1:TimerEvent):void{
_txt_mem.text = ("MEM: " + String((Number(((System.totalMemory / 0x0400) / 0x0400)).toFixed(2) + "MB")));
}
public static function init(_arg1:Object, _arg2:Boolean=false):void{
_arg1.stage.addChild(new SWFConsole(_arg1.stage.width, _arg1.stage.height, _arg2));
}
public static function output(_arg1:Object):void{
if (_activated){
_text.appendText((String(_arg1) + "\n"));
if (_text.height > _outputMask.height){
_text.y = (_headerbg.height - (_text.height - _outputMask.height));
_scrollHandle.y = _max;
_percent = 1;
if (!_scrollButtonDown.visible){
_scrollTrack.visible = true;
_scrollButtonUp.visible = true;
_scrollButtonDown.visible = true;
_scrollHandle.visible = true;
};
};
};
if (_traceEnabled){
trace(String(_arg1));
};
}
}
}//package rl.dev
Section 214
//AK47ShotSound (AK47ShotSound)
package {
import flash.media.*;
public dynamic class AK47ShotSound extends Sound {
}
}//package
Section 215
//AutoReloadSound (AutoReloadSound)
package {
import flash.media.*;
public dynamic class AutoReloadSound extends Sound {
}
}//package
Section 216
//BatHitSound (BatHitSound)
package {
import flash.media.*;
public dynamic class BatHitSound extends Sound {
}
}//package
Section 217
//BatMissSound (BatMissSound)
package {
import flash.media.*;
public dynamic class BatMissSound extends Sound {
}
}//package
Section 218
//CompleteSound (CompleteSound)
package {
import flash.media.*;
public dynamic class CompleteSound extends Sound {
}
}//package
Section 219
//DeagleShotSound (DeagleShotSound)
package {
import flash.media.*;
public dynamic class DeagleShotSound extends Sound {
}
}//package
Section 220
//FlameThrowerShotSound (FlameThrowerShotSound)
package {
import flash.media.*;
public dynamic class FlameThrowerShotSound extends Sound {
}
}//package
Section 221
//GameOverSound (GameOverSound)
package {
import flash.media.*;
public dynamic class GameOverSound extends Sound {
}
}//package
Section 222
//GranadeShotSound (GranadeShotSound)
package {
import flash.media.*;
public dynamic class GranadeShotSound extends Sound {
}
}//package
Section 223
//InGameSound (InGameSound)
package {
import flash.media.*;
public dynamic class InGameSound extends Sound {
}
}//package
Section 224
//LaserShotSound (LaserShotSound)
package {
import flash.media.*;
public dynamic class LaserShotSound extends Sound {
}
}//package
Section 225
//lib_bike_body (lib_bike_body)
package {
import flash.display.*;
public dynamic class lib_bike_body extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 226
//MachineGunShotSound (MachineGunShotSound)
package {
import flash.media.*;
public dynamic class MachineGunShotSound extends Sound {
}
}//package
Section 227
//MagnumReloadSound (MagnumReloadSound)
package {
import flash.media.*;
public dynamic class MagnumReloadSound extends Sound {
}
}//package
Section 228
//MagnumShotSound (MagnumShotSound)
package {
import flash.media.*;
public dynamic class MagnumShotSound extends Sound {
}
}//package
Section 229
//MainClass (MainClass)
package {
import com.laststand.world.*;
import flash.display.*;
import flash.events.*;
import com.laststand.preloader.*;
public class MainClass extends MovieClip {
public var state:int;// = 0
public var isReady:Boolean;
public var siteStarted:Boolean;
public var loadingStarted:Boolean;
public var percentLoaded:int;
public var obamaPreloader:MovieClip;
public var mainStage:MainStage;
public static const STATE_SYSTEM_LOADING:int = 0;
public static const STATE_SYSTEM_LOADED:int = 1;
public function MainClass(){
state = STATE_SYSTEM_LOADING;
super();
addFrameScript(0, frame1, 2, frame3);
addEventListener(Event.ENTER_FRAME, mainLoop);
}
public function finishPreload(){
this.play();
state = STATE_SYSTEM_LOADED;
}
public function initGame(){
mainStage = new MainStage();
addChild(mainStage);
siteStarted = true;
}
public function loaded(){
if (((!(siteStarted)) && ((currentFrame == 3)))){
gameReady();
siteStarted = true;
};
}
public function onLoading(){
trace("ONLOADING");
trace(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100));
if (!loadingStarted){
loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadingProgress);
loaderInfo.addEventListener(Event.COMPLETE, onLoadingComplete);
trace("ADS PRELOADER");
obamaPreloader = new AdsPreloader();
addChild(obamaPreloader);
loadingStarted = true;
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
obamaPreloader.update(100);
};
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
public function onLoadingProgress(_arg1:Event){
percentLoaded = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100);
obamaPreloader.update(percentLoaded);
}
public function onLoadingComplete(_arg1:Event){
this.loaderInfo.removeEventListener(Event.INIT, onLoadingComplete);
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoadingProgress);
}
public function gameReady(){
obamaPreloader = new ObamaPreloader(initGame, true);
addChild(obamaPreloader);
}
public function mainLoop(_arg1:Event){
switch (state){
case STATE_SYSTEM_LOADING:
onLoading();
break;
case STATE_SYSTEM_LOADED:
loaded();
break;
};
}
}
}//package
Section 230
//MainSound (MainSound)
package {
import flash.media.*;
public dynamic class MainSound extends Sound {
}
}//package
Section 231
//PistolReloadSound (PistolReloadSound)
package {
import flash.media.*;
public dynamic class PistolReloadSound extends Sound {
}
}//package
Section 232
//PistolShotSound (PistolShotSound)
package {
import flash.media.*;
public dynamic class PistolShotSound extends Sound {
}
}//package
Section 233
//RifleShotSound (RifleShotSound)
package {
import flash.media.*;
public dynamic class RifleShotSound extends Sound {
}
}//package
Section 234
//UziShotSound (UziShotSound)
package {
import flash.media.*;
public dynamic class UziShotSound extends Sound {
}
}//package
Section 235
//ZombieSound1 (ZombieSound1)
package {
import flash.media.*;
public dynamic class ZombieSound1 extends Sound {
}
}//package
Section 236
//ZombieSound2 (ZombieSound2)
package {
import flash.media.*;
public dynamic class ZombieSound2 extends Sound {
}
}//package
Section 237
//ZombieSound3 (ZombieSound3)
package {
import flash.media.*;
public dynamic class ZombieSound3 extends Sound {
}
}//package