Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.system.*;
import flash.net.*;
public class AdLoader {
private static var cpmstarLoader:Loader;
public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{
var _local3:String;
Security.allowDomain("server.cpmstar.com");
_local3 = "http://server.cpmstar.com/adviewas3.swf";
cpmstarLoader = new Loader();
cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (cpmstarLoader);
}
}
}//package CPMStar
Section 2
//FLOOR_28 (Zomgregate2_fla.FLOOR_28)
package Zomgregate2_fla {
import flash.display.*;
public dynamic class FLOOR_28 extends MovieClip {
public function FLOOR_28(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Zomgregate2_fla
Section 3
//MainTimeline (Zomgregate2_fla.MainTimeline)
package Zomgregate2_fla {
import flash.display.*;
import flash.events.*;
import CPMStar.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var MUSIC:MovieClip;
public var expMax:Number;
public var exp:Number;
public var ad:DisplayObject;
public var shell:Number;
public var fireRate:Number;
public var SHAFT:MovieClip;
public var myContextMenu:ContextMenu;
public var health:Number;
public var SFX:Boolean;
public var btn_Inst:SimpleButton;
public var tranDest;
public var stamina:Number;
public var zombieText:TextField;
public var levelNo:Number;
public var btn_rightHand:SimpleButton;
public var score:Number;
public var adBox:MovieClip;
public var HBar:MovieClip;
public var CPMStarSubPoolID:int;
public var CPMStarPoolID:int;
public var scoreText:TextField;
public var expText:TextField;
public var floorNo:Number;
public var SOUND:MovieClip;
public var CMeter:MovieClip;
public var manSpeed:Number;
public var lives:Number;
public var btn_Back:SimpleButton;
public var expPot:Number;
public var startTick:Number;
public var btn_Play:SimpleButton;
public var controlScheme:Number;
public var fpsMon;
public var floorType:Number;
public var DAMAGE:MovieClip;
public var Data_bulletSpeed:Number;
public var floorText:TextField;
public var btn_Armor:SimpleButton;
public var btn_mouseA:SimpleButton;
public var playB:MovieClip;
public var EBar:MovieClip;
public var btn_Credits:SimpleButton;
public var btn_leftHand:SimpleButton;
public var btn_mouseW:SimpleButton;
public var combo:Number;
public var Data_bulletSpeedVar:Number;
public var bloodEffects:Boolean;
public var MUS:Boolean;
public var difficulty:Number;
public var fpsText:TextField;
public var btn_High:SimpleButton;
public var TRANSISTION:MovieClip;
public var btn_ArmorButton:SimpleButton;
public var numFrames:Number;
public var comboText:TextField;
public var curMusic:String;
public var plb:MovieClip;
public var qualityLevel:Boolean;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 9, frame10);
}
public function newTransistion(_arg1){
tranDest = _arg1;
TRANSISTION.gotoAndPlay(1);
}
public function playSound(_arg1){
if (SFX == true){
SOUND.gotoAndStop(_arg1);
SOUND.gotoAndStop(1);
};
}
function frame10(){
difficulty = (difficulty + 5);
floorNo++;
floorType++;
if (floorType > 4){
floorType = 1;
};
gotoAndStop("GAME");
}
function frame3(){
stop();
SFX = true;
MUS = true;
curMusic = "";
setMusic("ELEV");
tranDest = "TITLE";
}
function frame4(){
btn_Play.addEventListener(MouseEvent.MOUSE_DOWN, btn_Play_Func);
btn_Inst.addEventListener(MouseEvent.MOUSE_DOWN, btn_Inst_Func);
btn_High.addEventListener(MouseEvent.MOUSE_DOWN, btn_High_Func);
btn_Armor.addEventListener(MouseEvent.MOUSE_DOWN, btn_Armor_Func);
btn_Credits.addEventListener(MouseEvent.MOUSE_DOWN, btn_Cred_Func);
}
function frame5(){
btn_Back.addEventListener(MouseEvent.MOUSE_UP, btn_Back_Func);
}
function frame7(){
manSpeed = 1;
fireRate = 1;
stamina = 1;
shell = 1;
lives = 3;
bloodEffects = true;
qualityLevel = true;
Data_bulletSpeed = 10;
Data_bulletSpeedVar = 2;
score = 0;
difficulty = 10;
exp = 0;
expPot = 50;
expMax = 100;
levelNo = 1;
combo = 1;
health = 1;
floorNo = 1;
floorType = 1;
stop();
controlScheme = 0;
btn_rightHand.addEventListener(MouseEvent.MOUSE_DOWN, setRightHand);
btn_leftHand.addEventListener(MouseEvent.MOUSE_DOWN, setLeftHand);
btn_mouseW.addEventListener(MouseEvent.MOUSE_DOWN, setMouseW);
btn_mouseA.addEventListener(MouseEvent.MOUSE_DOWN, setMouseA);
}
function frame1(){
stop();
playB.visible = false;
CPMStarPoolID = 1052;
CPMStarSubPoolID = 1;
ad = AdLoader.LoadAd(CPMStarPoolID, CPMStarSubPoolID);
adBox.addChild(ad);
addEventListener(Event.ENTER_FRAME, preLoader);
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
contextMenu = myContextMenu;
playB.addEventListener(MouseEvent.CLICK, clickHandler);
}
public function setRightHand(_arg1){
controlScheme = 0;
playGame();
}
function frame2(){
startTick = getTimer();
numFrames = 0;
fpsMon = 0;
addEventListener(Event.ENTER_FRAME, fpsListener);
stop();
}
public function preLoader(_arg1:Event){
var _local2:*;
var _local3:*;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
plb.scaleX = ((1 / _local2) * _local3);
if (_local3 >= _local2){
removeEventListener(Event.ENTER_FRAME, preLoader);
playB.visible = true;
};
}
public function clickHandler(_arg1:Event):void{
this.removeChild(adBox);
play();
playB.removeEventListener(MouseEvent.CLICK, clickHandler);
}
function frame6(){
btn_Back.addEventListener(MouseEvent.MOUSE_UP, btn_Back_Func);
}
public function fpsListener(_arg1:Event):void{
var _local2:Number;
numFrames++;
_local2 = ((getTimer() - startTick) * 0.001);
if (_local2 > 0.1){
fpsMon = (Math.floor(((numFrames / _local2) * 10)) / 10);
};
}
public function btn_Play_Func(_arg1){
purgeListeners_Menu();
newTransistion("CONTROLS");
}
public function btn_Cred_Func(_arg1){
purgeListeners_Menu();
newTransistion("CRED");
}
public function btn_Back_Func(_arg1){
btn_Back.removeEventListener(MouseEvent.MOUSE_UP, btn_Back_Func);
newTransistion("TITLE");
}
public function btn_Inst_Func(_arg1){
purgeListeners_Menu();
newTransistion("INST");
}
public function btn_High_Func(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://rankz.armorbot.com/DIEDHARD/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function purgeListeners_Menu(){
btn_Credits.removeEventListener(MouseEvent.MOUSE_DOWN, btn_Cred_Func);
btn_Play.removeEventListener(MouseEvent.MOUSE_DOWN, btn_Play_Func);
btn_Inst.removeEventListener(MouseEvent.MOUSE_DOWN, btn_Inst_Func);
btn_High.removeEventListener(MouseEvent.MOUSE_DOWN, btn_High_Func);
btn_Armor.removeEventListener(MouseEvent.MOUSE_DOWN, btn_Armor_Func);
}
public function setMusic(_arg1){
if (MUS == true){
curMusic = _arg1;
SoundMixer.stopAll();
MUSIC.gotoAndStop(_arg1);
MUSIC.gotoAndStop(1);
};
}
public function setMouseA(_arg1){
controlScheme = 3;
playGame();
}
public function playGame(){
purgeListeners();
newTransistion("GAME");
}
public function setMouseW(_arg1){
controlScheme = 2;
playGame();
}
public function submitScore(_arg1, _arg2){
var abrazor30Data:URLRequest;
var variables:URLVariables;
var verbs:Number;
var viper:String;
var loader:URLLoader;
var dataOnLoad:Function;
var nameVar = _arg1;
var scoreVar = _arg2;
try {
dataOnLoad = function (_arg1:Event){
};
abrazor30Data = new URLRequest("http://rankz.armorbot.com/submit/as3_v0.php");
abrazor30Data.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.flashkey = "QXp3Y3F0QVc=";
variables.SU0249 = "MjM1NmolZSVhJW4lcw==";
variables.bmFtZTE = nameVar;
verbs = scoreVar;
viper = (verbs + "Z");
variables.c2NvcmUx = viper.split("0").join("U");
variables.c2NvcmUx = variables.c2NvcmUx.split("").join("A");
variables.c2NvcmUx = variables.c2NvcmUx.split("AU").join("Y");
variables.c2NvcmUx = variables.c2NvcmUx.split("A1").join("B");
variables.c2NvcmUx = variables.c2NvcmUx.split(".").join("N");
abrazor30Data.data = variables;
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, dataOnLoad);
loader.load(abrazor30Data);
} catch(Error) {
};
}
public function setLeftHand(_arg1){
controlScheme = 1;
playGame();
}
public function btn_Armor_Func(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.armorgames.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function purgeListeners(){
btn_rightHand.removeEventListener(MouseEvent.MOUSE_DOWN, setRightHand);
btn_leftHand.removeEventListener(MouseEvent.MOUSE_DOWN, setLeftHand);
btn_mouseW.removeEventListener(MouseEvent.MOUSE_DOWN, setMouseW);
btn_mouseA.removeEventListener(MouseEvent.MOUSE_DOWN, setMouseA);
}
}
}//package Zomgregate2_fla
Section 4
//MUSIC_18 (Zomgregate2_fla.MUSIC_18)
package Zomgregate2_fla {
import flash.display.*;
public dynamic class MUSIC_18 extends MovieClip {
public function MUSIC_18(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Zomgregate2_fla
Section 5
//MUSIC_SFX_19 (Zomgregate2_fla.MUSIC_SFX_19)
package Zomgregate2_fla {
import flash.display.*;
public dynamic class MUSIC_SFX_19 extends MovieClip {
public function MUSIC_SFX_19(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Zomgregate2_fla
Section 6
//playB_13 (Zomgregate2_fla.playB_13)
package Zomgregate2_fla {
import flash.display.*;
public dynamic class playB_13 extends MovieClip {
public var playB:SimpleButton;
}
}//package Zomgregate2_fla
Section 7
//ShooterEngine_26 (Zomgregate2_fla.ShooterEngine_26)
package Zomgregate2_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class ShooterEngine_26 extends MovieClip {
public var entry2:MovieClip;
public var entry3:MovieClip;
public var entry5:MovieClip;
public var entry7:MovieClip;
public var entry6:MovieClip;
public var moveDown;
public var entry4:MovieClip;
public var gamePauseStore:Boolean;
public var zombieHealth:Array;
public var quitTimer:Number;
public var hostageArray:Array;
public var moveUp;
public var bulletXSpeed:Array;
public var health:Number;
public var levelStarted:Boolean;
public var hostageActive:Array;
public var mouseAim:Boolean;
public var multiPromptArray:Array;
public var MANHoldX:Number;
public var bloodSpeed:Array;
public var bmpScaler;
public var zombieXSpeed:Array;
public var bulletArray:Array;
public var zombieDroneTime:Array;
public var zombieType:Array;
public var bloodArray:Array;
public var pauseKey;
public var trans_m:Matrix;
public var yOffset:Number;
public var bulletDestroy:Array;
public var bloodTypes:Number;
public var bloodDestroy:Array;
public var GIBS:MovieClip;
public var EOLCounter:Number;
public var fireRateTimer:Number;
public var efxStageBmp:Bitmap;
public var moveRight;
public var aimUp;
public var spawnCarnageArray:Array;
public var deathSwitch:Boolean;
public var aimLeft;
public var zombieCounter:Number;
public var HOSTAGES:MovieClip;
public var bulletYSpeed:Array;
public var arenaWidth;
public var MANHoldY:Number;
public var LIFT:MovieClip;
public var arenaHeight;
public var zombieYSpeed:Array;
public var manSpeed:Number;
public var deathTimer:Number;
public var hostageTimer:Array;
public var TARGETSpeed:Number;
public var upgradePause:Boolean;
public var xOffset:Number;
public var MAN:MovieClip;
public var MESSAGES:MovieClip;
public var currentGun:Number;
public var bloodXSpeed:Array;
public var gibsXSpeed:Array;
public var gibsArray:Array;
public var ENEMY:MovieClip;
public var Data_bulletSpeed:Number;
public var pauseKeyPressed:Boolean;
public var moveLeft;
public var MANHoldActive:Boolean;
public var bmp:BitmapData;
public var zombieCounterStore:Number;
public var aimDown;
public var BULLETS:MovieClip;
public var Data_bulletSpeedVar:Number;
public var TARGET:MovieClip;
public var hostageHealth:Number;
public var BLOODIMAGE:MovieClip;
public var hostageCounter:Number;
public var spawnCarnage:Number;
public var spawnCarnageTimer:Number;
public var mousePressed:Boolean;
public var gamePaused:Boolean;
public var zombieSpeed:Array;
public var WALLS:MovieClip;
public var zombieArray:Array;
public var aimRight;
public var BLOOD:MovieClip;
public var gibsYSpeed:Array;
public var zombieHealthStore:Number;
public var bloodYSpeed:Array;
public var FLOOR:MovieClip;
public var gameOver:Boolean;
public var zombiesKilled:Number;
public var zombieRotation:Array;
public var entry1:MovieClip;
public function ShooterEngine_26(){
addFrameScript(0, frame1);
}
public function MouseUp(_arg1){
mousePressed = false;
}
public function checkConfine(_arg1:MovieClip){
if (_arg1.x < (40 - x)){
_arg1.x = (40 - x);
} else {
if (_arg1.x > (360 - x)){
_arg1.x = (360 - x);
};
};
if (_arg1.y < (40 - x)){
_arg1.y = (40 - x);
} else {
if (_arg1.y > (360 - x)){
_arg1.y = (360 - x);
};
};
}
public function spawnManagement(){
var _local1:Number;
var _local2:*;
if ((Math.random() * 100) < 1){
doorZombie(0);
};
if (spawnCarnageTimer == 10){
spawnCarnageTimer = 0;
if (spawnCarnageArray.length > 0){
doorZombie(spawnCarnageArray[0]);
spawnCarnageArray.splice(0, 1);
};
} else {
spawnCarnageTimer++;
};
if (((Math.random() * 5000) / MovieClip(parent).difficulty) < 1){
_local1 = (Math.floor((Math.random() * 7)) + 1);
spawnCarnageArray.splice(0, spawnCarnageArray.length);
_local2 = 0;
while (_local2 < 10) {
spawnCarnageArray.push(_local1);
_local2++;
};
};
if (((Math.random() * 5000) / MovieClip(parent).difficulty) < 1){
spawnCarnageArray.splice(0, spawnCarnageArray.length);
_local2 = 0;
while (_local2 < 8) {
spawnCarnageArray.push((_local2 + 1));
_local2++;
};
};
if ((Math.random() * 500) < 1){
spawnCarnageArray.splice(0, spawnCarnageArray.length);
_local1 = (Math.round(((Math.random() * 10) * MovieClip(parent).difficulty)) + 5);
_local2 = 0;
while (_local2 < _local1) {
spawnCarnageArray.push((Math.floor((Math.random() * 7)) + 1));
_local2++;
};
};
}
public function destroyBlood(_arg1){
BLOOD.removeChild(bloodArray[_arg1]);
delete bloodArray[_arg1];
bloodDestroy.splice(_arg1, 1);
bloodSpeed.splice(_arg1, 1);
bloodXSpeed.splice(_arg1, 1);
bloodYSpeed.splice(_arg1, 1);
bloodArray.splice(_arg1, 1);
}
public function newZombie(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:MovieClip;
var _local5:Number;
if (zombieCounter > 0){
zombieCounter--;
_local4 = new Zombie();
if ((Math.random() * 2) < 1){
_local4.sprite.scaleX = (_local4.sprite.scaleX * -1);
};
_local4.x = _arg1;
_local4.y = _arg2;
_local4.rotation = _arg3;
zombieArray.push(_local4);
zombieXSpeed.push(0);
zombieYSpeed.push(0);
_local5 = (Math.random() * MovieClip(parent).difficulty);
if (_local5 < 40){
zombieType.push(1);
_local4.sprite.gotoAndStop(1);
} else {
if (_local5 < 65){
zombieType.push(2);
_local4.sprite.gotoAndStop(2);
} else {
zombieType.push(3);
_local4.sprite.gotoAndStop(3);
};
};
zombieHealth.push(zombieHealthStore);
zombieSpeed.push(((Math.random() * 0.05) + 0.2));
zombieRotation.push(0);
zombieDroneTime.push(60);
ENEMY.addChild(_local4);
};
}
public function setColor(_arg1, _arg2, _arg3, _arg4, _arg5){
var _local6:Array;
var _local7:ColorMatrixFilter;
_local6 = [_arg2, 0, 0, 0, 0, 0, _arg3, 0, 0, 0, 0, 0, _arg4, 0, 0, 0, 0, 0, _arg5, 0];
_local7 = new ColorMatrixFilter(_local6);
_arg1.filters = [_local7];
}
public function killAllZombies(){
var _local1:Number;
_local1 = 0;
while (_local1 < zombieArray.length) {
zombieHealth[_local1] = 0;
_local1++;
};
}
public function paintBlood(){
drawBlur();
fadeBlood();
}
public function updateZombie(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = 0;
while (_local1 < zombieArray.length) {
_local2 = 0;
while (_local2 < bulletArray.length) {
if (pythag(zombieArray[_local1].x, zombieArray[_local1].y, bulletArray[_local2].x, bulletArray[_local2].y) < 15){
zombieHealth[_local1] = (zombieHealth[_local1] - (1 / zombieType[_local1]));
zombieXSpeed[_local1] = (zombieXSpeed[_local1] / 1.5);
zombieYSpeed[_local1] = (zombieYSpeed[_local1] / 1.5);
paintBlood();
newBlood((bulletArray[_local2].x + bulletXSpeed[_local2]), (bulletArray[_local2].y + bulletYSpeed[_local2]), bulletXSpeed[_local2], bulletYSpeed[_local2], 100);
zombieArray[_local1].sprite.rotation = (zombieArray[_local1].sprite.rotation + ((Math.random() * 100) - 50));
zombieXSpeed[_local1] = (zombieXSpeed[_local1] + (bulletXSpeed[_local2] / 20));
zombieYSpeed[_local1] = (zombieYSpeed[_local1] + (bulletYSpeed[_local2] / 20));
break;
};
_local2++;
};
if (zombieHealth[_local1] <= 0){
newMultiPrompt(zombieArray[_local1].x, zombieArray[_local1].y, Math.round((MovieClip(parent).combo + 1)), 4);
newGibs(zombieArray[_local1].x, zombieArray[_local1].y);
MovieClip(parent).expPot = (MovieClip(parent).expPot + MovieClip(parent).combo);
destroyZombie(_local1);
zombiesKilled++;
_local1--;
} else {
if ((((((zombieType[_local1] == 2)) || ((zombieType[_local1] == 3)))) && ((zombieHealth[_local1] < zombieHealthStore)))){
zombieHealth[_local1] = (zombieHealth[_local1] + 0.05);
};
if (pythag(zombieArray[_local1].x, zombieArray[_local1].y, MAN.x, MAN.y) < 20){
manSpeed = (manSpeed / 1.3);
health = (health - 0.02);
MovieClip(parent).playSound("HURT");
MovieClip(parent).DAMAGE.alpha = (Math.random() * 0.3);
MovieClip(parent).combo = 0;
shakeScreen();
};
_local3 = Math.round(((zombieHealth[_local1] / zombieHealthStore) * 6));
zombieArray[_local1].sprite.SC.gotoAndStop(_local3);
zombieArray[_local1].sprite.rotation = (zombieArray[_local1].sprite.rotation / 1.1);
zombieXSpeed[_local1] = (zombieXSpeed[_local1] - (zombieSpeed[_local1] * Math.cos(((zombieArray[_local1].rotation + 90) * 0.01745329))));
zombieYSpeed[_local1] = (zombieYSpeed[_local1] - (zombieSpeed[_local1] * Math.sin(((zombieArray[_local1].rotation + 90) * 0.01745329))));
zombieXSpeed[_local1] = (zombieXSpeed[_local1] / 1.1);
zombieYSpeed[_local1] = (zombieYSpeed[_local1] / 1.1);
zombieArray[_local1].x = (zombieArray[_local1].x + (((zombieXSpeed[_local1] / 6) * _local3) * ((zombieType[_local1] + 1) / 2)));
zombieArray[_local1].y = (zombieArray[_local1].y + (((zombieYSpeed[_local1] / 6) * _local3) * ((zombieType[_local1] + 1) / 2)));
if ((Math.random() * 20) < 1){
zombieArray[_local1].sprite.rotation = (zombieArray[_local1].sprite.rotation + ((((Math.random() * 40) - 20) / _local3) * 6));
};
if ((((zombieDroneTime[_local1] > 0)) || ((gameOver == true)))){
var _local4 = zombieDroneTime;
var _local5 = _local1;
var _local6 = (_local4[_local5] - 1);
_local4[_local5] = _local6;
} else {
checkConfine(zombieArray[_local1]);
zombieArray[_local1].rotation = angle(zombieArray[_local1].x, zombieArray[_local1].y, MAN.x, MAN.y);
};
};
_local1++;
};
}
public function newMultiPrompt(_arg1, _arg2, _arg3, _arg4){
var _local5:MovieClip;
MovieClip(parent).combo++;
_local5 = new MULTIPROMPT();
_local5.x = _arg1;
_local5.y = _arg2;
_local5.ammount.text = ("+" + _arg3);
_local5.alpha = _arg4;
MESSAGES.addChild(_local5);
multiPromptArray.push(_local5);
}
function frame1(){
stage.quality = StageQuality.MEDIUM;
Key.initialize(stage);
upgradePause = false;
stage.addEventListener(Event.MOUSE_LEAVE, checkRightClick);
FLOOR.gotoAndStop(MovieClip(parent).floorType);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
addEventListener(MouseEvent.MOUSE_UP, MouseUp);
mousePressed = false;
mouseAim = false;
if (MovieClip(parent).controlScheme == 0){
setControls(87, 83, 65, 68, Keyboard.UP, Keyboard.DOWN, Keyboard.LEFT, Keyboard.RIGHT, Keyboard.SPACE);
} else {
if (MovieClip(parent).controlScheme == 1){
setControls(Keyboard.UP, Keyboard.DOWN, Keyboard.LEFT, Keyboard.RIGHT, 87, 83, 65, 68, Keyboard.SPACE);
} else {
if (MovieClip(parent).controlScheme == 2){
setControls(87, 83, 65, 68, null, null, null, null, Keyboard.SPACE);
mouseAim = true;
} else {
if (MovieClip(parent).controlScheme == 3){
setControls(Keyboard.UP, Keyboard.DOWN, Keyboard.LEFT, Keyboard.RIGHT, null, null, null, null, Keyboard.SPACE);
mouseAim = true;
};
};
};
};
BLOODIMAGE = new MovieClip();
addChild(BLOODIMAGE);
BLOODIMAGE.alpha = 0.6;
BLOODIMAGE.x = -(x);
BLOODIMAGE.y = -(y);
BLOOD = new MovieClip();
addChild(BLOOD);
BLOOD.x = -(x);
BLOOD.y = -(y);
HOSTAGES = new MovieClip();
addChild(HOSTAGES);
GIBS = new MovieClip();
addChild(GIBS);
BULLETS = new MovieClip();
addChild(BULLETS);
MAN = new MANMC();
addChild(MAN);
MAN.x = 0;
MAN.y = -150;
MAN.alpha = 0;
MAN.rotation = 180;
ENEMY = new MovieClip();
addChild(ENEMY);
TARGET = new TARGETMC();
addChild(TARGET);
WALLS = new WALLSMC();
addChild(WALLS);
WALLS.x = -202;
WALLS.y = -202;
LIFT = new LIFTMC();
addChild(LIFT);
LIFT.x = 0;
LIFT.y = -220;
MESSAGES = new MovieClip();
addChild(MESSAGES);
Data_bulletSpeed = MovieClip(parent).Data_bulletSpeed;
Data_bulletSpeedVar = MovieClip(parent).Data_bulletSpeedVar;
health = MovieClip(parent).health;
zombiesKilled = 0;
hostageCounter = 0;
bulletArray = new Array();
bulletXSpeed = new Array();
bulletYSpeed = new Array();
bulletDestroy = new Array();
zombieHealthStore = 6;
zombieArray = new Array();
zombieXSpeed = new Array();
zombieYSpeed = new Array();
zombieHealth = new Array();
zombieSpeed = new Array();
zombieRotation = new Array();
zombieDroneTime = new Array();
zombieType = new Array();
bloodArray = new Array();
bloodSpeed = new Array();
bloodXSpeed = new Array();
bloodYSpeed = new Array();
bloodDestroy = new Array();
gibsArray = new Array();
gibsXSpeed = new Array();
gibsYSpeed = new Array();
multiPromptArray = new Array();
hostageArray = new Array();
hostageActive = new Array();
hostageTimer = new Array();
currentGun = 1;
manSpeed = (MovieClip(parent).manSpeed + 3);
TARGETSpeed = 40;
zombieCounterStore = Math.round((2 * (MovieClip(parent).difficulty / 2)));
zombieCounter = zombieCounterStore;
fireRateTimer = 0;
MovieClip(parent).SHAFT.visible = false;
MovieClip(parent).DAMAGE.alpha = 0;
gamePaused = false;
pauseKeyPressed = false;
gamePauseStore = false;
gameOver = false;
bloodTypes = 5;
arenaWidth = 400;
arenaHeight = 400;
bmpScaler = 2;
trans_m = new Matrix();
trans_m.scale((1 / bmpScaler), (1 / bmpScaler));
BLOODIMAGE.scaleX = bmpScaler;
BLOODIMAGE.scaleY = bmpScaler;
bmp = new BitmapData((arenaHeight / bmpScaler), (arenaWidth / bmpScaler), true, 0);
efxStageBmp = new Bitmap(bmp);
efxStageBmp.x = 0;
efxStageBmp.y = 0;
BLOODIMAGE.addChild(efxStageBmp);
spawnCarnage = 0;
spawnCarnageTimer = 0;
spawnCarnageArray = new Array();
HUDManagement();
EOLCounter = 0;
MANHoldX = MAN.x;
MANHoldY = MAN.y;
MANHoldActive = false;
TARGET.visible = false;
scaleX = 5;
scaleY = 5;
alpha = 1;
levelStarted = false;
xOffset = x;
yOffset = y;
hostageHealth = 120;
quitTimer = 0;
deathTimer = 40;
deathSwitch = false;
}
public function newGibs(_arg1, _arg2){
var _local3:Number;
var _local4:MovieClip;
_local3 = 0;
while (_local3 < 10) {
_local4 = new GIB();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.scaleX = ((Math.random() * 0.8) + 0.2);
_local4.scaleY = _local4.scaleX;
_local4.rotation = (Math.random() * 360);
gibsXSpeed.push(((Math.random() * 12) - 6));
gibsYSpeed.push(((Math.random() * 12) - 6));
GIBS.addChild(_local4);
gibsArray.push(_local4);
_local3++;
};
}
public function newHostage(_arg1, _arg2){
var _local3:MovieClip;
if (hostageCounter < 5){
while (pythag(_arg1, _arg2, MAN.x, MAN.y) < 100) {
_arg1 = (((Math.random() * 250) + 75) - x);
_arg2 = (((Math.random() * 250) + 75) - y);
};
_local3 = new Hostage();
_local3.x = _arg1;
_local3.y = _arg2;
if ((Math.random() * 2) < 1){
_local3.sprite.scaleX = (_local3.sprite.scaleX * -1);
};
_local3.sprite.rotation = (Math.random() * 360);
hostageArray.push(_local3);
hostageTimer.push(hostageHealth);
hostageActive.push(false);
HOSTAGES.addChild(_local3);
_local3.alpha = 0;
hostageCounter++;
};
}
public function newBlood(_arg1, _arg2, _arg3, _arg4, _arg5){
var _local6:Number;
var _local7:*;
_local6 = 0;
while (_local6 < (_arg5 / 5)) {
if (bloodArray.length < 300){
_local7 = new Blood();
_local7.x = (_arg1 + x);
_local7.y = (_arg2 + y);
_local7.gotoAndStop((Math.round((Math.random() * bloodTypes)) + 1));
_local7.rotation = (Math.random() * 360);
_local7.scaleX = (Math.random() * 3);
_local7.scaleY = _local7.scaleX;
bloodSpeed.push((Math.round((Math.random() * 20)) / 10));
bloodXSpeed.push((_arg3 + ((Math.random() * 6) - 3)));
bloodYSpeed.push((_arg4 + ((Math.random() * 6) - 3)));
bloodDestroy.push(false);
bloodArray.push(_local7);
BLOOD.addChild(_local7);
};
_local6++;
};
}
public function endOfLevel(){
if (zombiesKilled == zombieCounterStore){
MovieClip(parent).SHAFT.visible = true;
EOLCounter++;
if ((((((LIFT.currentFrame < 30)) && ((EOLCounter > 50)))) && ((MANHoldActive == false)))){
if (LIFT.currentFrame == 1){
MovieClip(parent).setMusic("ELEV");
MovieClip(parent).playSound("LIFT");
};
LIFT.nextFrame();
} else {
if ((((LIFT.currentFrame == 30)) && ((MANHoldActive == false)))){
if (MAN.hitTestObject(LIFT.hit)){
if (MAN.alpha > 0){
MAN.alpha = (MAN.alpha - 0.05);
};
manSpeed = 0;
MANHoldActive = true;
EOLCounter = 1;
};
} else {
if (MANHoldActive == true){
if (MAN.alpha > 0){
MAN.alpha = (MAN.alpha - 0.05);
};
MAN.x = MANHoldX;
MAN.y = MANHoldY;
if ((((LIFT.currentFrame < 60)) && ((EOLCounter > 50)))){
LIFT.nextFrame();
} else {
if ((((LIFT.currentFrame == 60)) && ((upgradePause == false)))){
scaleX = (scaleX / 1.05);
scaleY = (scaleY / 1.05);
if (scaleX < 0.4){
return (true);
};
};
};
};
};
};
};
}
public function DESTROYENGINE(){
var _local1:Number;
_local1 = 0;
while (_local1 < hostageArray.length) {
destroyHostage(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < bulletArray.length) {
destroyBullet(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < zombieArray.length) {
destroyZombie(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < bloodArray.length) {
destroyBlood(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < gibsArray.length) {
destroyGib(_local1);
_local1--;
_local1++;
};
removeChild(BLOOD);
removeChild(GIBS);
removeChild(ENEMY);
removeChild(TARGET);
removeChild(MAN);
removeChild(WALLS);
removeChild(LIFT);
removeChild(MESSAGES);
removeChild(BLOODIMAGE);
removeChild(HOSTAGES);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.removeEventListener(Event.MOUSE_LEAVE, checkRightClick);
}
public function updateBullets(){
var _local1:Number;
_local1 = 0;
while (_local1 < bulletArray.length) {
if ((((pythag((200 - x), (200 - x), bulletArray[_local1].x, bulletArray[_local1].y) > 250)) || ((bulletDestroy[_local1] == true)))){
destroyBullet(_local1);
} else {
bulletArray[_local1].x = (bulletArray[_local1].x + bulletXSpeed[_local1]);
bulletArray[_local1].y = (bulletArray[_local1].y + bulletYSpeed[_local1]);
};
_local1++;
};
}
public function updateBlood(){
var _local1:Number;
paintBlood();
_local1 = 0;
while (_local1 < bloodArray.length) {
bloodArray[_local1].x = (bloodArray[_local1].x + (bloodXSpeed[_local1] * bloodSpeed[_local1]));
bloodArray[_local1].y = (bloodArray[_local1].y + (bloodYSpeed[_local1] * bloodSpeed[_local1]));
if (bloodSpeed[_local1] > 0){
bloodSpeed[_local1] = (bloodSpeed[_local1] - 0.1);
if (bloodSpeed[_local1] < 0){
bloodSpeed[_local1] = 0;
};
};
bloodArray[_local1].alpha = (bloodArray[_local1].alpha - 0.05);
if (bloodArray[_local1].alpha <= 0){
destroyBlood(_local1);
};
_local1++;
};
}
public function onEnterFrame(_arg1){
var _local2:MovieClip;
if (Number(MovieClip(parent).fpsMon) < 25){
MovieClip(parent).qualityLevel = false;
stage.quality = StageQuality.LOW;
MovieClip(parent).bloodEffects = false;
};
if (gameOver == true){
MovieClip(parent).DAMAGE.scaleX = 0;
} else {
if (gameOver == false){
if (((((((Key.isDown(pauseKey)) && ((pauseKeyPressed == false)))) && ((scaleX == 1)))) && ((upgradePause == false)))){
pauseKeyPressed = true;
if (gamePaused == false){
gamePaused = true;
_local2 = new PAUSEMENU();
addChild(_local2);
_local2.x = -10;
} else {
if (gamePauseStore == false){
gamePaused = false;
};
};
} else {
if (Key.isDown(pauseKey) == false){
pauseKeyPressed = false;
};
};
if ((((MovieClip(parent).DAMAGE.alpha == 0)) || ((gamePaused == true)))){
MovieClip(parent).DAMAGE.scaleX = 0;
} else {
MovieClip(parent).DAMAGE.scaleX = 1;
};
MovieClip(parent).DAMAGE.alpha = 0;
if (stage.focus != this){
};
stage.stageFocusRect = false;
if (gamePaused == false){
MovieClip(parent).health = health;
if (upgradePause == false){
healthManagement();
shakeControl();
if (levelStarted == false){
startOfLevel();
} else {
spawnManagement();
};
if (((((((Math.random() * 200) < 1)) && ((zombiesKilled < zombieCounterStore)))) && ((levelStarted == true)))){
newHostage((((Math.random() * 250) + 75) - x), (((Math.random() * 250) + 75) - y));
};
updateHostages();
updateGibs();
updateMultiPrompt();
gunManagement();
moveMan();
if (gameOver != true){
checkConfine(MAN);
};
manAngleManagement();
checkCol();
updateBullets();
updateZombie();
updateBlood();
HUDManagement();
} else {
MAN.feet.stop();
};
if (endOfLevel() == true){
DESTROYENGINE();
MovieClip(parent).gotoAndStop("INCREASEFLOOR");
};
quitTimer = 0;
} else {
if (((Key.isDown(81)) && ((quitTimer < 80)))){
quitTimer++;
} else {
if (((Key.isDown(81)) && ((quitTimer == 8000)))){
DESTROYENGINE();
MovieClip(parent).setMusic("ELEV");
MovieClip(parent).newTransistion("TITLE");
} else {
if (Key.isDown(81) == false){
quitTimer = 0;
};
};
};
};
};
};
}
public function newBullet(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Number;
var _local5:MovieClip;
var _local6:Number;
MovieClip(parent).playSound("FIRE");
_local4 = 0;
while (_local4 < MovieClip(parent).shell) {
_local5 = new Bullet();
_local5.x = _arg1;
_local5.y = _arg2;
bulletArray.push(_local5);
_local6 = (Data_bulletSpeed + (Math.random() * Data_bulletSpeedVar));
bulletXSpeed.push((((_local6 * Math.cos((_arg3 * 0.01745329))) + (Math.random() * MovieClip(parent).shell)) - (MovieClip(parent).shell / 2)));
bulletYSpeed.push((((_local6 * Math.sin((_arg3 * 0.01745329))) + (Math.random() * MovieClip(parent).shell)) - (MovieClip(parent).shell / 2)));
bulletDestroy.push(false);
BULLETS.addChild(_local5);
_local4++;
};
}
public function manAngleManagement(){
if (MANHoldActive == false){
if (mouseAim == false){
TARGET.x = (TARGET.x + ((MAN.x - TARGET.x) / 2));
TARGET.y = (TARGET.y + ((MAN.y - TARGET.y) / 2));
if (Key.isDown(aimUp)){
TARGET.y = (TARGET.y - TARGETSpeed);
};
if (Key.isDown(aimLeft)){
TARGET.x = (TARGET.x - TARGETSpeed);
};
if (Key.isDown(aimRight)){
TARGET.x = (TARGET.x + TARGETSpeed);
};
if (Key.isDown(aimDown)){
TARGET.y = (TARGET.y + TARGETSpeed);
};
} else {
TARGET.x = (TARGET.x + ((mouseX - TARGET.x) / 3));
TARGET.y = (TARGET.y + ((mouseY - TARGET.y) / 3));
};
} else {
TARGET.x = MAN.x;
TARGET.y = MAN.y;
};
}
public function MouseDown(_arg1){
mousePressed = true;
}
public function angle(_arg1, _arg2, _arg3, _arg4){
return ((Math.round(((Math.atan2((_arg4 - _arg2), (_arg3 - _arg1)) / 3.141593) * 180)) + 90));
}
public function HUDManagement(){
var _local1:MovieClip;
if (MovieClip(parent).combo > 16){
MovieClip(parent).combo = 16;
} else {
if (MovieClip(parent).combo > 1){
MovieClip(parent).combo = (MovieClip(parent).combo - 0.05);
};
};
if (health < 0){
health = 0;
} else {
if ((((health < 1)) && ((deathSwitch == false)))){
health = (health + ((MovieClip(parent).stamina / 2) / 500));
};
};
if (MovieClip(parent).expPot > 0){
MovieClip(parent).exp = (MovieClip(parent).exp + Math.round((MovieClip(parent).expPot / 5)));
MovieClip(parent).score = (MovieClip(parent).score + Math.round((MovieClip(parent).expPot / 5)));
MovieClip(parent).expPot = (MovieClip(parent).expPot - Math.round((MovieClip(parent).expPot / 5)));
};
if (MovieClip(parent).exp > MovieClip(parent).expMax){
MovieClip(parent).playSound("LEVELUP");
_local1 = new UPGRADEMENU();
addChild(_local1);
MovieClip(parent).levelNo++;
MovieClip(parent).exp = 0;
MovieClip(parent).expPot = 0;
MovieClip(parent).expMax = (MovieClip(parent).expMax * 1.5);
};
MovieClip(parent).expText.text = ((("EXP TO LEVEL " + (MovieClip(parent).levelNo + 1)) + " : ") + Math.ceil((MovieClip(parent).expMax - MovieClip(parent).exp)));
MovieClip(parent).zombieText.text = ((zombiesKilled + " / ") + zombieCounterStore);
MovieClip(parent).floorText.text = MovieClip(parent).floorNo;
MovieClip(parent).scoreText.text = MovieClip(parent).score;
MovieClip(parent).comboText.text = Math.round(MovieClip(parent).combo);
MovieClip(parent).EBar.scaleX = (MovieClip(parent).exp / MovieClip(parent).expMax);
MovieClip(parent).HBar.scaleX = (health / 1);
MovieClip(parent).CMeter.rotation = (MovieClip(parent).combo * 10);
}
public function fadeBlood(){
var _local1:Number;
_local1 = 0;
while (_local1 < bloodArray.length) {
bloodDestroy[_local1] = true;
_local1++;
};
}
public function updateHostages(){
var _local1:Number;
_local1 = 0;
while (_local1 < hostageArray.length) {
if (hostageActive[_local1] == false){
if (hostageArray[_local1].alpha < 1){
hostageArray[_local1].alpha = (hostageArray[_local1].alpha + 0.1);
};
if (pythag(hostageArray[_local1].x, hostageArray[_local1].y, MAN.x, MAN.y) < 20){
hostageActive[_local1] = true;
newMultiPrompt(hostageArray[_local1].x, (hostageArray[_local1].y - 20), "THANKYOU+", 4);
hostageActive[_local1] = true;
if (hostageArray[_local1].alpha < 0){
hostageArray[_local1].alpha = (hostageArray[_local1].alpha * -1);
};
MovieClip(parent).expPot = (MovieClip(parent).expPot + hostageTimer[_local1]);
newMultiPrompt(hostageArray[_local1].x, hostageArray[_local1].y, hostageTimer[_local1], 4);
} else {
if (hostageTimer[_local1] > 0){
if ((Math.random() * 20) < 1){
hostageArray[_local1].sprite.rotation = (hostageArray[_local1].sprite.rotation + ((Math.random() * 20) - 10));
};
if ((Math.random() * 150) < 1){
newMultiPrompt(hostageArray[_local1].x, (hostageArray[_local1].y - 20), "HELP+", 4);
};
var _local2 = hostageTimer;
var _local3 = _local1;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
hostageArray[_local1].health.scaleX = (hostageTimer[_local1] / hostageHealth);
if (hostageArray[_local1].health.scaleX < 0.25){
hostageArray[_local1].alpha = (hostageArray[_local1].alpha * -1);
};
} else {
newZombie(hostageArray[_local1].x, hostageArray[_local1].y, hostageArray[_local1].sprite.rotation);
newGibs(hostageArray[_local1].x, hostageArray[_local1].y);
destroyHostage(_local1);
};
};
} else {
if (hostageArray[_local1].alpha > 0){
hostageArray[_local1].alpha = (hostageArray[_local1].alpha - 0.1);
} else {
destroyHostage(_local1);
};
};
_local1++;
};
}
public function destroyZombie(_arg1:Number){
ENEMY.removeChild(zombieArray[_arg1]);
delete zombieArray[_arg1];
zombieArray.splice(_arg1, 1);
zombieXSpeed.splice(_arg1, 1);
zombieYSpeed.splice(_arg1, 1);
zombieHealth.splice(_arg1, 1);
zombieSpeed.splice(_arg1, 1);
zombieRotation.splice(_arg1, 1);
zombieDroneTime.splice(_arg1, 1);
zombieType.splice(_arg1, 1);
}
public function destroyHostage(_arg1){
HOSTAGES.removeChild(hostageArray[_arg1]);
delete hostageArray[_arg1];
hostageArray.splice(_arg1, 1);
hostageTimer.splice(_arg1, 1);
hostageActive.splice(_arg1, 1);
}
public function pythag(_arg1, _arg2, _arg3, _arg4){
return (Math.sqrt((Math.pow((_arg2 - _arg4), 2) + Math.pow((_arg1 - _arg3), 2))));
}
public function shakeScreen(){
x = (x + ((Math.random() * 10) - 5));
y = (y + ((Math.random() * 10) - 5));
rotation = (rotation + ((Math.random() * 6) - 3));
}
public function updateGibs(){
var _local1:Number;
_local1 = 0;
while (_local1 < gibsArray.length) {
gibsArray[_local1].x = (gibsArray[_local1].x + gibsXSpeed[_local1]);
gibsArray[_local1].y = (gibsArray[_local1].y + gibsYSpeed[_local1]);
gibsXSpeed[_local1] = (gibsXSpeed[_local1] / 1.2);
gibsYSpeed[_local1] = (gibsYSpeed[_local1] / 1.2);
if (Math.round(gibsXSpeed[_local1]) == 0){
if (gibsArray[_local1].alpha > 0){
gibsArray[_local1].alpha = (gibsArray[_local1].alpha - 0.1);
} else {
destroyGib(_local1);
};
};
_local1++;
};
}
public function startOfLevel(){
var _local1:Number;
if (scaleX > 1){
scaleX = (scaleX / 1.1);
scaleY = (scaleY / 1.1);
if (scaleX <= 1){
MovieClip(parent).playSound("LIFT");
};
};
if (scaleX <= 1){
scaleX = 1;
scaleY = 1;
if (LIFT.currentFrame < 30){
LIFT.nextFrame();
MAN.x = MANHoldX;
MAN.y = MANHoldY;
} else {
if (MAN.hitTestObject(LIFT.hit) == true){
if (MAN.alpha < 1){
MAN.alpha = (MAN.alpha + 0.05);
};
} else {
if (LIFT.currentFrame < 60){
LIFT.nextFrame();
if (MAN.alpha < 1){
MAN.alpha = (MAN.alpha + 0.05);
};
if (LIFT.currentFrame == 45){
MovieClip(parent).setMusic("TRANCE");
};
} else {
if (LIFT.currentFrame == 60){
levelStarted = true;
_local1 = 0;
while (_local1 < 5) {
doorZombie(0);
_local1++;
};
LIFT.gotoAndStop(1);
};
};
};
};
};
}
public function setControls(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9){
moveUp = _arg1;
moveDown = _arg2;
moveLeft = _arg3;
moveRight = _arg4;
aimUp = _arg5;
aimDown = _arg6;
aimLeft = _arg7;
aimRight = _arg8;
pauseKey = _arg9;
}
public function checkCol(){
}
public function destroyGib(_arg1){
GIBS.removeChild(gibsArray[_arg1]);
delete gibsArray[_arg1];
gibsArray.splice(_arg1, 1);
gibsXSpeed.splice(_arg1, 1);
gibsYSpeed.splice(_arg1, 1);
}
public function shakeControl(){
x = (x + ((xOffset - x) / 5));
y = (y + ((yOffset - y) / 5));
rotation = (rotation / 1.1);
}
public function doorZombie(_arg1){
var _local2:Number;
if (_arg1 == 0){
_arg1 = Math.ceil(((Math.random() * 7) + 0.1));
};
if (_arg1 > 7){
_arg1 = 7;
};
newZombie(this[("entry" + _arg1)].x, this[("entry" + _arg1)].y, this[("entry" + _arg1)].rotation);
_local2 = zombieArray.length;
}
public function updateMultiPrompt(){
var _local1:Number;
_local1 = 0;
while (_local1 < multiPromptArray.length) {
multiPromptArray[_local1].alpha = (multiPromptArray[_local1].alpha - 0.1);
if (multiPromptArray[_local1].alpha <= 0){
destroyMultiPrompt(_local1);
};
_local1++;
};
}
public function destroyBullet(_arg1:Number){
BULLETS.removeChild(bulletArray[_arg1]);
delete bulletArray[_arg1];
bulletArray.splice(_arg1, 1);
bulletXSpeed.splice(_arg1, 1);
bulletYSpeed.splice(_arg1, 1);
bulletDestroy.splice(_arg1, 1);
}
public function gunManagement(){
if ((((pythag(MAN.x, MAN.y, TARGET.x, TARGET.y) > 30)) || ((mouseAim == true)))){
MAN.rotation = angle(MAN.x, MAN.y, TARGET.x, TARGET.y);
if ((((((mouseAim == false)) || ((mousePressed == true)))) && ((fireRateTimer >= (8 / ((MovieClip(parent).fireRate + 1) / 2)))))){
newBullet(MAN.x, MAN.y, (MAN.rotation - 90));
fireRateTimer = 0;
};
};
if (fireRateTimer < (8 / ((MovieClip(parent).fireRate + 1) / 2))){
fireRateTimer++;
};
}
public function destroyMultiPrompt(_arg1){
MESSAGES.removeChild(multiPromptArray[_arg1]);
delete multiPromptArray[_arg1];
multiPromptArray.splice(_arg1, 1);
}
public function healthManagement(){
var _local1:MovieClip;
if ((((health <= 0)) && ((deathTimer == 40)))){
newGibs(MAN.x, MAN.y);
deathTimer--;
deathSwitch = true;
MAN.visible = false;
} else {
if ((((health <= 0)) && ((deathTimer > 0)))){
deathTimer--;
MAN.x = ((Math.random() * 200) - 800);
MAN.y = ((Math.random() * 200) - 800);
} else {
if ((((health <= 0)) && ((deathTimer == 0)))){
_local1 = new CONTMENU();
addChild(_local1);
_local1.x = -10;
deathTimer = 40;
gameOver = true;
};
};
};
}
public function drawBlur(){
if (MovieClip(parent).bloodEffects == true){
bmp.draw(BLOOD, trans_m, null, null);
};
}
public function moveMan(){
MAN.feet.stop();
if (Key.isDown(moveUp)){
MAN.feet.play();
MAN.y = (MAN.y - manSpeed);
};
if (Key.isDown(moveDown)){
MAN.feet.play();
MAN.y = (MAN.y + manSpeed);
};
if (Key.isDown(moveLeft)){
MAN.feet.play();
MAN.x = (MAN.x - manSpeed);
};
if (Key.isDown(moveRight)){
MAN.feet.play();
MAN.x = (MAN.x + manSpeed);
};
if (manSpeed < (MovieClip(parent).manSpeed + 2)){
manSpeed = (manSpeed + 0.5);
} else {
manSpeed = (MovieClip(parent).manSpeed + 2);
};
}
public function checkRightClick(_arg1){
Key.clearKeys();
}
}
}//package Zomgregate2_fla
Section 8
//SpawnPoint_27 (Zomgregate2_fla.SpawnPoint_27)
package Zomgregate2_fla {
import flash.display.*;
public dynamic class SpawnPoint_27 extends MovieClip {
public function SpawnPoint_27(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
}
}
}//package Zomgregate2_fla
Section 9
//Transistion_20 (Zomgregate2_fla.Transistion_20)
package Zomgregate2_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Transistion_20 extends MovieClip {
public function Transistion_20(){
addFrameScript(9, frame10, 18, frame19);
}
function frame10(){
MovieClip(parent).gotoAndStop(MovieClip(parent).tranDest);
}
function frame19(){
stop();
}
}
}//package Zomgregate2_fla
Section 10
//xczcxzc_15 (Zomgregate2_fla.xczcxzc_15)
package Zomgregate2_fla {
import flash.display.*;
public dynamic class xczcxzc_15 extends MovieClip {
public function xczcxzc_15(){
addFrameScript(125, frame126);
}
function frame126(){
MovieClip(parent).play();
}
}
}//package Zomgregate2_fla
Section 11
//Zombie_Sprite_Container_47 (Zomgregate2_fla.Zombie_Sprite_Container_47)
package Zomgregate2_fla {
import flash.display.*;
public dynamic class Zombie_Sprite_Container_47 extends MovieClip {
public var SC:MovieClip;
}
}//package Zomgregate2_fla
Section 12
//Blood (Blood)
package {
import flash.display.*;
public dynamic class Blood extends MovieClip {
}
}//package
Section 13
//Bullet (Bullet)
package {
import flash.display.*;
public dynamic class Bullet extends MovieClip {
}
}//package
Section 14
//CONTMENU (CONTMENU)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class CONTMENU extends MovieClip {
public var btn_CONT:SimpleButton;
public var btn_QUIT:SimpleButton;
public var SUBMITNAME:TextField;
public var creditText:TextField;
public var endMenu:Boolean;
public function CONTMENU(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
stage.focus = this;
if (MovieClip(parent.parent).lives > 0){
MovieClip(parent.parent).lives--;
creditText.text = ("CREDITS REMAINING: " + MovieClip(parent.parent).lives);
btn_CONT.addEventListener(MouseEvent.CLICK, click_CONT);
} else {
creditText.text = "YOU ARE OUT OF CREDITS";
btn_CONT.alpha = 0.3;
};
MovieClip(parent).rotation = 0;
if (x == -10){
y = 0;
x = -800;
};
endMenu = false;
addEventListener(Event.ENTER_FRAME, EnterFrame);
btn_QUIT.addEventListener(MouseEvent.CLICK, click_QUIT);
}
public function click_CONT(_arg1){
btn_QUIT.removeEventListener(MouseEvent.CLICK, click_QUIT);
btn_CONT.removeEventListener(MouseEvent.CLICK, click_CONT);
MovieClip(parent).killAllZombies();
MovieClip(parent).health = 1;
MovieClip(parent).gameOver = false;
MovieClip(parent).MAN.x = 0;
MovieClip(parent).MAN.y = -150;
MovieClip(parent).MAN.visible = true;
}
public function EnterFrame(_arg1){
if (MovieClip(parent).gameOver == true){
x = (x + ((0 - x) / 5));
} else {
x = (x + ((600 - x) / 10));
if (x > 500){
removeEventListener(Event.ENTER_FRAME, EnterFrame);
stage.focus = parent;
parent.removeChild(this);
delete ??getglobalscope
[this];
};
};
}
public function click_QUIT(_arg1){
MovieClip(parent.parent).submitScore(SUBMITNAME.text, MovieClip(parent.parent).score);
btn_QUIT.removeEventListener(MouseEvent.CLICK, click_QUIT);
btn_CONT.removeEventListener(MouseEvent.CLICK, click_CONT);
removeEventListener(Event.ENTER_FRAME, EnterFrame);
MovieClip(parent).DESTROYENGINE();
MovieClip(parent.parent).setMusic("ELEV");
MovieClip(parent.parent).newTransistion("TITLE");
parent.removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 15
//FOOTPRINT (FOOTPRINT)
package {
import flash.display.*;
public dynamic class FOOTPRINT extends MovieClip {
}
}//package
Section 16
//GIB (GIB)
package {
import flash.display.*;
public dynamic class GIB extends MovieClip {
}
}//package
Section 17
//Hostage (Hostage)
package {
import flash.display.*;
public dynamic class Hostage extends MovieClip {
public var health:MovieClip;
public var sprite:MovieClip;
}
}//package
Section 18
//Key (Key)
package {
import flash.display.*;
import flash.events.*;
public class Key {
private static var initialized:Boolean = false;
private static var keysDown:Object = new Object();
public static function initialize(_arg1:Stage){
if (!initialized){
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.addEventListener(Event.DEACTIVATE, clearKeysDeactive);
initialized = true;
};
}
public static function clearKeys():void{
keysDown = new Object();
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
throw (new Error("Key class has yet been initialized."));
};
return (Boolean((_arg1 in keysDown)));
}
private static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
private static function keyReleased(_arg1:KeyboardEvent):void{
if ((_arg1.keyCode in keysDown)){
delete keysDown[_arg1.keyCode];
};
}
private static function clearKeysDeactive(_arg1:Event):void{
clearKeys();
}
}
}//package
Section 19
//LIFTMC (LIFTMC)
package {
import flash.display.*;
public dynamic class LIFTMC extends MovieClip {
public var hit:TARGETMC;
public function LIFTMC(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
stop();
}
}
}//package
Section 20
//MANMC (MANMC)
package {
import flash.display.*;
public dynamic class MANMC extends MovieClip {
public var feet:MovieClip;
}
}//package
Section 21
//MULTIPROMPT (MULTIPROMPT)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MULTIPROMPT extends MovieClip {
public var ammount:TextField;
}
}//package
Section 22
//PAUSEMENU (PAUSEMENU)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class PAUSEMENU extends MovieClip {
public var btn_MUSIC_on:SimpleButton;
public var btn_GRAPHICS:SimpleButton;
public var btn_MUSIC_off:SimpleButton;
public var btn_SFX:SimpleButton;
public var btn_GraphicsBack:SimpleButton;
public var AA_light:MovieClip;
public var btn_MUSIC:SimpleButton;
public var btn_QUIT:SimpleButton;
public var btn_SoundBack:SimpleButton;
public var MUS_light:MovieClip;
public var btn_SFX_low:SimpleButton;
public var btn_QUIT_yes:SimpleButton;
public var btn_BE_off:SimpleButton;
public var SFX_light:MovieClip;
public var btn_SFX_high:SimpleButton;
public var btn_AA_high:SimpleButton;
public var btn_QUIT_no:SimpleButton;
public var bloodEffects_light:MovieClip;
public var btn_BE_on:SimpleButton;
public var endMenu:Boolean;
public var btn_AA_low:SimpleButton;
public function PAUSEMENU(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function GraphicsBack(_arg1){
btn_AA_low.removeEventListener(MouseEvent.MOUSE_DOWN, AA_low);
btn_AA_high.removeEventListener(MouseEvent.MOUSE_DOWN, AA_high);
btn_BE_off.removeEventListener(MouseEvent.MOUSE_DOWN, BE_off);
btn_BE_on.removeEventListener(MouseEvent.MOUSE_DOWN, BE_on);
btn_GraphicsBack.removeEventListener(MouseEvent.MOUSE_DOWN, GraphicsBack);
this.gotoAndStop("MAIN");
}
public function SFX_high(_arg1){
SFX_light.rotation = 180;
MovieClip(parent.parent).SFX = true;
}
public function MUSIC_off(_arg1){
MUS_light.rotation = 0;
MovieClip(parent.parent).MUS = false;
SoundMixer.stopAll();
}
public function click_SFX(_arg1){
purgeListeners();
}
public function BE_on(_arg1){
bloodEffects_light.rotation = 180;
MovieClip(parent.parent).bloodEffects = true;
}
function frame3(){
MovieClip(parent).gamePauseStore = true;
if (MovieClip(parent.parent).SFX == true){
SFX_light.rotation = 180;
};
if (MovieClip(parent.parent).MUS == true){
MUS_light.rotation = 180;
};
btn_SFX_low.addEventListener(MouseEvent.MOUSE_DOWN, SFX_low);
btn_SFX_high.addEventListener(MouseEvent.MOUSE_DOWN, SFX_high);
btn_MUSIC_off.addEventListener(MouseEvent.MOUSE_DOWN, MUSIC_off);
btn_MUSIC_on.addEventListener(MouseEvent.MOUSE_DOWN, MUSIC_on);
btn_SoundBack.addEventListener(MouseEvent.MOUSE_DOWN, SoundBack);
}
public function SoundBack(_arg1){
btn_SFX_low.removeEventListener(MouseEvent.MOUSE_DOWN, SFX_low);
btn_SFX_high.removeEventListener(MouseEvent.MOUSE_DOWN, SFX_high);
btn_MUSIC_off.removeEventListener(MouseEvent.MOUSE_DOWN, MUSIC_off);
btn_MUSIC_on.removeEventListener(MouseEvent.MOUSE_DOWN, MUSIC_on);
btn_SoundBack.removeEventListener(MouseEvent.MOUSE_DOWN, SoundBack);
this.gotoAndStop("MAIN");
}
function frame1(){
stop();
stage.focus = this;
MovieClip(parent).rotation = 0;
MovieClip(parent).gamePauseStore = false;
if (x == -10){
y = 0;
x = -800;
};
endMenu = false;
addEventListener(Event.ENTER_FRAME, EnterFrame);
btn_GRAPHICS.addEventListener(MouseEvent.CLICK, click_GRAPHICS);
btn_QUIT.addEventListener(MouseEvent.CLICK, click_QUIT);
btn_MUSIC.addEventListener(MouseEvent.CLICK, click_MUSIC);
btn_SFX.addEventListener(MouseEvent.CLICK, click_SFX);
btn_GRAPHICS.addEventListener(MouseEvent.MOUSE_OVER, over_GRAPHICS);
btn_QUIT.addEventListener(MouseEvent.MOUSE_OVER, over_QUIT);
btn_MUSIC.addEventListener(MouseEvent.MOUSE_OVER, over_MUSIC);
btn_SFX.addEventListener(MouseEvent.MOUSE_OVER, over_SFX);
}
public function over_MUSIC(_arg1){
}
public function click_GRAPHICS(_arg1){
purgeListeners();
gotoAndStop("GRAPHICS");
}
function frame2(){
MovieClip(parent).gamePauseStore = true;
if (MovieClip(parent.parent).qualityLevel == true){
AA_light.rotation = 180;
};
if (MovieClip(parent.parent).bloodEffects == true){
bloodEffects_light.rotation = 180;
};
btn_AA_low.addEventListener(MouseEvent.MOUSE_DOWN, AA_low);
btn_AA_high.addEventListener(MouseEvent.MOUSE_DOWN, AA_high);
btn_BE_off.addEventListener(MouseEvent.MOUSE_DOWN, BE_off);
btn_BE_on.addEventListener(MouseEvent.MOUSE_DOWN, BE_on);
btn_GraphicsBack.addEventListener(MouseEvent.MOUSE_DOWN, GraphicsBack);
}
public function click_MUSIC(_arg1){
purgeListeners();
gotoAndStop("SOUND");
}
public function AA_high(_arg1){
AA_light.rotation = 180;
MovieClip(parent.parent).qualityLevel = true;
stage.quality = StageQuality.MEDIUM;
}
public function over_GRAPHICS(_arg1){
}
public function MUSIC_on(_arg1){
MUS_light.rotation = 180;
MovieClip(parent.parent).MUS = true;
MovieClip(parent.parent).setMusic(MovieClip(parent.parent).curMusic);
}
public function funcQuit_no(_arg1){
btn_QUIT_yes.removeEventListener(MouseEvent.MOUSE_DOWN, funcQuit_yes);
btn_QUIT_no.removeEventListener(MouseEvent.MOUSE_DOWN, funcQuit_no);
gotoAndStop("MAIN");
}
public function over_QUIT(_arg1){
}
public function click_QUIT(_arg1){
purgeListeners();
gotoAndStop("QUIT");
}
public function AA_low(_arg1){
AA_light.rotation = 0;
MovieClip(parent.parent).qualityLevel = false;
stage.quality = StageQuality.LOW;
}
public function BE_off(_arg1){
bloodEffects_light.rotation = 0;
MovieClip(parent.parent).bloodEffects = false;
}
public function EnterFrame(_arg1){
if (MovieClip(parent).gamePaused == true){
x = (x + ((0 - x) / 5));
} else {
x = (x + ((600 - x) / 2));
if (x > 300){
purgeListeners();
stage.focus = parent;
parent.removeChild(this);
delete ??getglobalscope
[this];
};
};
}
function frame4(){
MovieClip(parent).gamePauseStore = true;
btn_QUIT_yes.addEventListener(MouseEvent.MOUSE_DOWN, funcQuit_yes);
btn_QUIT_no.addEventListener(MouseEvent.MOUSE_DOWN, funcQuit_no);
}
public function purgeListeners(){
btn_GRAPHICS.removeEventListener(MouseEvent.CLICK, click_GRAPHICS);
btn_QUIT.removeEventListener(MouseEvent.CLICK, click_QUIT);
btn_MUSIC.removeEventListener(MouseEvent.CLICK, click_MUSIC);
btn_SFX.removeEventListener(MouseEvent.CLICK, click_SFX);
btn_GRAPHICS.removeEventListener(MouseEvent.MOUSE_OVER, over_GRAPHICS);
btn_QUIT.removeEventListener(MouseEvent.MOUSE_OVER, over_QUIT);
btn_MUSIC.removeEventListener(MouseEvent.MOUSE_OVER, over_MUSIC);
btn_SFX.removeEventListener(MouseEvent.MOUSE_OVER, over_SFX);
removeEventListener(Event.ENTER_FRAME, EnterFrame);
}
public function funcQuit_yes(_arg1){
btn_QUIT_yes.removeEventListener(MouseEvent.MOUSE_DOWN, funcQuit_yes);
btn_QUIT_no.removeEventListener(MouseEvent.MOUSE_DOWN, funcQuit_no);
MovieClip(parent).DESTROYENGINE();
MovieClip(parent.parent).setMusic("ELEV");
MovieClip(parent.parent).newTransistion("TITLE");
parent.removeChild(this);
delete ??getglobalscope
[this];
}
public function over_SFX(_arg1){
}
public function SFX_low(_arg1){
SFX_light.rotation = 0;
MovieClip(parent.parent).SFX = false;
}
}
}//package
Section 23
//TARGETMC (TARGETMC)
package {
import flash.display.*;
public dynamic class TARGETMC extends MovieClip {
}
}//package
Section 24
//UPGRADEMENU (UPGRADEMENU)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UPGRADEMENU extends MovieClip {
public var speedText:TextField;
public var staminaText:TextField;
public var btn_FIRE:SimpleButton;
public var btn_SHELL:SimpleButton;
public var btn_STAMINA:SimpleButton;
public var infoText:TextField;
public var fireText:TextField;
public var btn_SPEED:SimpleButton;
public var shellText:TextField;
public var endMenu:Boolean;
public function UPGRADEMENU(){
addFrameScript(0, frame1);
}
public function over_SPEED(_arg1){
infoText.text = "INCREASE YOUR RUNNING SPEED.";
}
public function over_STAMINA(_arg1){
infoText.text = "INCREASE HEALING SPEED AFTER ZOMBIE EXPOSURE.";
}
public function updateStats(){
speedText.text = MovieClip(parent.parent).manSpeed;
fireText.text = MovieClip(parent.parent).fireRate;
staminaText.text = MovieClip(parent.parent).stamina;
shellText.text = MovieClip(parent.parent).shell;
}
function frame1(){
MovieClip(parent).upgradePause = true;
MovieClip(parent).rotation = 0;
updateStats();
y = 0;
x = -800;
endMenu = false;
addEventListener(Event.ENTER_FRAME, EnterFrame);
btn_SPEED.addEventListener(MouseEvent.CLICK, click_SPEED);
btn_FIRE.addEventListener(MouseEvent.CLICK, click_FIRE);
btn_STAMINA.addEventListener(MouseEvent.CLICK, click_STAMINA);
btn_SHELL.addEventListener(MouseEvent.CLICK, click_SHELL);
btn_SPEED.addEventListener(MouseEvent.MOUSE_OVER, over_SPEED);
btn_FIRE.addEventListener(MouseEvent.MOUSE_OVER, over_FIRE);
btn_STAMINA.addEventListener(MouseEvent.MOUSE_OVER, over_STAMINA);
btn_SHELL.addEventListener(MouseEvent.MOUSE_OVER, over_SHELL);
}
public function click_STAMINA(_arg1){
MovieClip(parent.parent).stamina++;
purgeListeners();
updateStats();
endMenu = true;
}
public function click_SHELL(_arg1){
MovieClip(parent.parent).shell++;
purgeListeners();
updateStats();
endMenu = true;
}
public function EnterFrame(_arg1){
if (endMenu == false){
x = (x + ((0 - x) / 5));
} else {
x = (x + ((600 - x) / 10));
if (x > 500){
stage.focus = parent;
MovieClip(parent).upgradePause = false;
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, EnterFrame);
delete ??getglobalscope
[this];
};
};
}
public function click_FIRE(_arg1){
MovieClip(parent.parent).fireRate++;
purgeListeners();
updateStats();
endMenu = true;
}
public function click_SPEED(_arg1){
MovieClip(parent.parent).manSpeed++;
purgeListeners();
updateStats();
endMenu = true;
}
public function over_FIRE(_arg1){
infoText.text = "INCREASE THE FIRING SPEED OF YOUR GUN.";
}
public function purgeListeners(){
btn_SPEED.removeEventListener(MouseEvent.CLICK, click_SPEED);
btn_FIRE.removeEventListener(MouseEvent.CLICK, click_FIRE);
btn_STAMINA.removeEventListener(MouseEvent.CLICK, click_STAMINA);
btn_SHELL.removeEventListener(MouseEvent.CLICK, click_SHELL);
btn_SPEED.removeEventListener(MouseEvent.MOUSE_OVER, over_SPEED);
btn_FIRE.removeEventListener(MouseEvent.MOUSE_OVER, over_FIRE);
btn_STAMINA.removeEventListener(MouseEvent.MOUSE_OVER, over_STAMINA);
btn_SHELL.removeEventListener(MouseEvent.MOUSE_OVER, over_SHELL);
}
public function over_SHELL(_arg1){
infoText.text = "INCREASE THE NUMBER OF BULLETS PER SHOT.";
}
}
}//package
Section 25
//WALLSMC (WALLSMC)
package {
import flash.display.*;
public dynamic class WALLSMC extends MovieClip {
}
}//package
Section 26
//Zombie (Zombie)
package {
import flash.display.*;
public dynamic class Zombie extends MovieClip {
public var sprite:MovieClip;
}
}//package