Section 1
//dayNumber_55 (stronghold_fla.dayNumber_55)
package stronghold_fla {
import flash.display.*;
import flash.text.*;
public dynamic class dayNumber_55 extends MovieClip {
public var dayNum:TextField;
}
}//package stronghold_fla
Section 2
//errorMessage_50 (stronghold_fla.errorMessage_50)
package stronghold_fla {
import flash.display.*;
public dynamic class errorMessage_50 extends MovieClip {
public var errorMessageInner:MovieClip;
public function errorMessage_50(){
addFrameScript(0, frame1, 54, frame55, 104, frame105);
}
function frame105(){
gotoAndPlay(1);
}
function frame1(){
stop();
}
function frame55(){
gotoAndPlay(1);
}
}
}//package stronghold_fla
Section 3
//fadeIn_7 (stronghold_fla.fadeIn_7)
package stronghold_fla {
import flash.display.*;
public dynamic class fadeIn_7 extends MovieClip {
public function fadeIn_7(){
addFrameScript(99, frame100, 164, frame165);
}
function frame165(){
stop();
}
function frame100(){
stop();
}
}
}//package stronghold_fla
Section 4
//infoBoxU_47 (stronghold_fla.infoBoxU_47)
package stronghold_fla {
import flash.display.*;
import flash.text.*;
public dynamic class infoBoxU_47 extends MovieClip {
public var itemPrice:TextField;
public function infoBoxU_47(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
stop();
}
function frame14(){
stop();
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame19(){
stop();
}
function frame13(){
stop();
}
function frame17(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame16(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame20(){
stop();
}
function frame11(){
stop();
}
}
}//package stronghold_fla
Section 5
//infoBoxU2_48 (stronghold_fla.infoBoxU2_48)
package stronghold_fla {
import flash.display.*;
import flash.text.*;
public dynamic class infoBoxU2_48 extends MovieClip {
public var reloadTime:TextField;
public var clipSize:TextField;
public var upgradeButton:MovieClip;
public var weaponAttack:TextField;
public var upgradePrice:TextField;
public var weaponLevel:TextField;
public function infoBoxU2_48(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 6
//MainTimeline (stronghold_fla.MainTimeline)
package stronghold_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var reloadTime:Number;
public var fireWeapon1Timer:Timer;
public var bar:MovieClip;
public var whichDay:TextField;
public var enemy3Timer:Timer;
public var skipBtn:MovieClip;
public var a:Sound;
public var l:Sound;
public var p:Sound;
public var reloadingText:MovieClip;
public var crosshairs:MovieClip;
public var enemyTimer:Timer;
public var fireWeapon2Timer:Timer;
public var continueButtonU:MovieClip;
public var money:TextField;
public var fadeIn:MovieClip;
public var killedToday:TextField;
public var startBtn2:MovieClip;
public var errorMessage:MovieClip;
public var sponsorBtn:MovieClip;
public var weaponInfo:MovieClip;
public var enemy4Timer:Timer;
public var enemyCountToday:TextField;
public var background:Background;
public var E1A:TextField;
public var weapon10:MovieClip;
public var fireWeapon3Timer:Timer;
public var E1L:TextField;
public var E1T:TextField;
public var okBtn1:MovieClip;
public var E2A:TextField;
public var buyButton:MovieClip;
public var myChannel2:SoundChannel;
public var myChannel3:SoundChannel;
public var E2L:TextField;
public var E2T:TextField;
public var E3A:TextField;
public var infoBoxU2:MovieClip;
public var E3L:TextField;
public var E4A:TextField;
public var E3T:TextField;
public var weapon2:MovieClip;
public var weapon3:MovieClip;
public var weaponU10:MovieClip;
public var weaponU2:MovieClip;
public var weaponU3:MovieClip;
public var weaponU4:MovieClip;
public var weapon1:MovieClip;
public var weapon9:MovieClip;
public var weaponU7:MovieClip;
public var introText1:MovieClip;
public var weapon5:MovieClip;
public var weapon6:MovieClip;
public var weapon7:MovieClip;
public var E4L:TextField;
public var E4T:TextField;
public var weaponU8:MovieClip;
public var enemy5Timer:Timer;
public var introText2:MovieClip;
public var introText3:MovieClip;
public var repairIcon:MovieClip;
public var weaponU9:MovieClip;
public var weaponU1:MovieClip;
public var E5A:TextField;
public var weaponU6:MovieClip;
public var wallInfo:MovieClip;
public var E5L:TextField;
public var weaponU5:MovieClip;
public var weapon4:MovieClip;
public var wallU3:MovieClip;
public var wallU4:MovieClip;
public var wallU5:MovieClip;
public var wallU7:MovieClip;
public var wallU2:MovieClip;
public var myChannel:SoundChannel;
public var infoBoxU:MovieClip;
public var wallU6:MovieClip;
public var wallU1:MovieClip;
public var weapon8:MovieClip;
public var wallU8:MovieClip;
public var E5T:TextField;
public var dayNumber:MovieClip;
public var repairSkillText:TextField;
public var damageBar:DamageBar;
public var ra:Number;
public var wallLifeText:TextField;
public var infoBox:MovieClip;
public var rs:Number;
public var reloadText:TextField;
public var repairZone1:RepairZone;
public var repairZone2:RepairZone;
public var repairZone3:RepairZone;
public var repairZone4:RepairZone;
public var startBtn:MovieClip;
public var ammo:TextField;
public var icon1:RepairIcon;
public var icon2:RepairIcon;
public var icon3:RepairIcon;
public var icon4:RepairIcon;
public var player:Player;
public var cashText:TextField;
public var InfoText:MovieClip;
public var fail:Sound;
public var deployedToday:TextField;
public var cancelButtonU:MovieClip;
public var attackText:TextField;
public var wall1:Wall;
public var wall2:Wall;
public var wall3:Wall;
public var wall4:Wall;
public var enemy2Timer:Timer;
public var repairTime:Timer;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
public function wallU2Click(_arg1:MouseEvent):void{
if (!Engine.wall2IsOwned){
Engine.frameNumber = 14;
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.wall2Price;
playClick();
disableButtons();
};
}
public function weapon5Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 5;
reloadTime = Engine.weapon5ReloadTime;
Engine.playerAttack = Engine.weapon5Attack;
_local2 = new Click1();
_local2.play();
}
public function weaponU3Click(_arg1:MouseEvent):void{
Engine.frameNumber = 3;
if (Engine.weapon3IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon3Price;
};
playClick();
disableButtons();
}
public function enemyDieSound(){
var _local1:Number;
var _local2:Number;
var _local3:Sound;
var _local4:Sound;
var _local5:Sound;
var _local6:Sound;
var _local7:Sound;
var _local8:Sound;
var _local9:Sound;
var _local10:Sound;
var _local11:Sound;
_local1 = Math.random();
_local2 = Math.round((_local1 * 8));
if (_local2 == 0){
_local3 = new Creature();
_local3.play();
};
if (_local2 == 1){
_local4 = new Monster2();
_local4.play();
};
if (_local2 == 2){
_local5 = new Monster3();
_local5.play();
};
if (_local2 == 3){
_local6 = new Monster4();
_local6.play();
};
if (_local2 == 4){
_local7 = new CreatureDie1();
_local7.play();
};
if (_local2 == 5){
_local8 = new CreatureDie2();
_local8.play();
};
if (_local2 == 6){
_local9 = new CreatureDie3();
_local9.play();
};
if (_local2 == 7){
_local10 = new CreatureDie4();
_local10.play();
};
if (_local2 == 8){
_local11 = new CreatureDie5();
_local11.play();
};
}
public function skipIntro(_arg1:MouseEvent):void{
var _local2:Sound;
_local2 = new Click1();
_local2.play();
endLevelA1();
}
public function fireWeapon1Bullet(_arg1:TimerEvent):void{
var _local2:Bullet;
var _local3:Sound;
if (Engine.currentWeapon == 8){
_local2 = new Bullet();
player.gotoAndPlay("fire");
addChild(_local2);
Engine.bullets.push(_local2);
Engine.weapon8Ammo = (Engine.weapon8Ammo + 1);
_local3 = new Shot2();
_local3.play();
};
}
function frame1(){
stop();
addEventListener(Event.ENTER_FRAME, loading);
}
function frame4(){
stop();
sponsorBtn.buttonMode = true;
sponsorBtn.addEventListener(MouseEvent.CLICK, sponsorBtnClick);
rs = Engine.repairSkill;
reloadTime = Engine.weapon1ReloadTime;
infoBox.visible = false;
reloadingText.visible = false;
Engine.gameOver = false;
Engine.dayOver = false;
Engine.enemiesSlain = 0;
Engine.enemiesDeployed = 0;
Engine.currentWeapon = 1;
Engine.playerAttack = Engine.weapon1Attack;
weaponInfo.gotoAndPlay(1);
weapon1.gotoAndPlay(2);
Engine.isReloading = false;
enableWeaponSelect();
setWeapons();
if (Engine.dayNumber == 6){
Engine.enemyTime = (Engine.enemyTime + 1000);
Engine.enemy2Time = (Engine.enemy2Time + 1000);
Engine.enemy3Time = (Engine.enemy3Time + 1000);
Engine.enemyLife = (Engine.enemyLife + 1);
Engine.enemy2Life = (Engine.enemy2Life + 1);
Engine.enemy3Life = (Engine.enemy3Life + 1);
InfoText.gotoAndPlay(2);
};
if (Engine.dayNumber == 8){
Engine.enemyLife = (Engine.enemyLife + 1);
Engine.enemy2Life = (Engine.enemy2Life + 1);
Engine.enemy3Life = (Engine.enemy3Life + 1);
InfoText.gotoAndPlay(2);
};
if (Engine.dayNumber == 13){
Engine.enemyTime = (Engine.enemyTime + 2000);
Engine.enemy2Time = (Engine.enemy2Time + 2000);
Engine.enemy3Time = (Engine.enemy3Time + 2000);
Engine.enemy4Time = (Engine.enemy4Time + 2000);
InfoText.gotoAndPlay(2);
};
if (Engine.dayNumber == 18){
Engine.enemyTime = (Engine.enemyTime - 2000);
Engine.enemy2Time = (Engine.enemy2Time - 2000);
Engine.enemy3Time = (Engine.enemy3Time - 1000);
Engine.enemy4Time = (Engine.enemy4Time - 1000);
InfoText.gotoAndPlay(2);
};
if (Engine.dayNumber == 19){
Engine.enemyTime = (Engine.enemyTime - 1000);
Engine.enemy2Time = (Engine.enemy2Time - 1000);
Engine.enemy3Time = (Engine.enemy3Time - 1500);
Engine.enemy4Time = (Engine.enemy4Time - 1500);
Engine.enemyLife = (Engine.enemyLife + 1);
Engine.enemy2Life = (Engine.enemy2Life + 1);
Engine.enemy3Life = (Engine.enemy3Life + 1);
Engine.enemy4Life = (Engine.enemy4Life + 2);
Engine.enemy5Life = (Engine.enemy5Life + 2);
Engine.enemyAttack = (Engine.enemyAttack + 1);
Engine.enemy2Attack = (Engine.enemy2Attack + 1);
Engine.enemy3Attack = (Engine.enemy3Attack + 1);
Engine.enemy4Attack = (Engine.enemy4Attack + 1);
Engine.enemy5Attack = (Engine.enemy5Attack + 1);
InfoText.gotoAndPlay(2);
};
if (Engine.dayNumber == 26){
Engine.enemyTime = (Engine.enemyTime - 500);
Engine.enemy2Time = (Engine.enemy2Time - 500);
Engine.enemy3Time = (Engine.enemy3Time - 500);
Engine.enemy4Time = (Engine.enemy4Time - 500);
Engine.enemy5Time = (Engine.enemy5Time - 500);
InfoText.gotoAndPlay(2);
};
if (Engine.dayNumber == 33){
Engine.enemyTime = (Engine.enemyTime - 600);
Engine.enemy2Time = (Engine.enemy2Time - 600);
Engine.enemy3Time = (Engine.enemy3Time - 600);
Engine.enemy4Time = (Engine.enemy4Time - 600);
Engine.enemy5Time = (Engine.enemy5Time - 600);
Engine.enemyLife = (Engine.enemyLife + 0.5);
Engine.enemy2Life = (Engine.enemy2Life + 1);
Engine.enemy3Life = (Engine.enemy3Life + 1);
Engine.enemy4Life = (Engine.enemy4Life + 1);
Engine.enemy5Life = (Engine.enemy5Life + 1);
Engine.enemyAttack = (Engine.enemyAttack + 0.5);
Engine.enemy2Attack = (Engine.enemy2Attack + 0.5);
Engine.enemy3Attack = (Engine.enemy3Attack + 0.5);
Engine.enemy4Attack = (Engine.enemy4Attack + 0.5);
Engine.enemy5Attack = (Engine.enemy5Attack + 0.5);
InfoText.gotoAndPlay(2);
};
p = new Music2();
myChannel = new SoundChannel();
myChannel = p.play(0, int.MAX_VALUE);
repairTime = new Timer(1000, 2);
repairTime.addEventListener(TimerEvent.TIMER_COMPLETE, repair, false, 0, true);
repairZone1 = new RepairZone();
repairZone2 = new RepairZone();
repairZone3 = new RepairZone();
repairZone4 = new RepairZone();
background = new Background();
damageBar = new DamageBar();
stage.addChildAt(repairZone1, 0);
stage.addChildAt(repairZone2, 0);
stage.addChildAt(repairZone3, 0);
stage.addChildAt(repairZone4, 0);
stage.addChildAt(background, 0);
repairZone1.x = 350;
repairZone1.y = 200;
repairZone2.x = 490;
repairZone2.y = 350;
repairZone2.rotation = 90;
repairZone3.x = 350;
repairZone3.y = 490;
repairZone4.x = 200;
repairZone4.y = 350;
repairZone4.rotation = 90;
player = new Player(stage);
addChild(player);
stage.addEventListener(Event.ENTER_FRAME, loop);
fireWeapon1Timer = new Timer(95, 1000);
fireWeapon2Timer = new Timer(85, 1000);
fireWeapon3Timer = new Timer(100, 1000);
fireWeapon1Timer.addEventListener(TimerEvent.TIMER, fireWeapon1Bullet, false, 0, true);
fireWeapon2Timer.addEventListener(TimerEvent.TIMER, fireWeapon2Bullet, false, 0, true);
fireWeapon3Timer.addEventListener(TimerEvent.TIMER, fireWeapon3Bullet, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_DOWN, fireWeapon3);
stage.addEventListener(MouseEvent.MOUSE_UP, fireWeapon3Stop);
stage.addEventListener(MouseEvent.CLICK, fireWeapon);
enemyTimer = new Timer(Engine.enemyTime, 1);
enemyTimer.start();
enemyTimer.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy, false, 0, true);
enemy2Timer = new Timer(Engine.enemy2Time, 1);
enemy2Timer.start();
enemy2Timer.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy2, false, 0, true);
enemy3Timer = new Timer(Engine.enemy3Time, 1);
enemy3Timer.start();
enemy3Timer.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy3, false, 0, true);
enemy4Timer = new Timer(Engine.enemy4Time, 1);
enemy4Timer.start();
enemy4Timer.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy4, false, 0, true);
enemy5Timer = new Timer(Engine.enemy5Time, 1);
enemy5Timer.start();
enemy5Timer.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy5, false, 0, true);
}
function frame6(){
stop();
dayNumber.dayNum.text = String(Engine.dayNumber);
stage.addEventListener(MouseEvent.CLICK, continueClick);
}
function frame7(){
stop();
fail = new Fail();
fail.play();
Engine.bullets = [];
Engine.dayNumber = 1;
Engine.enemiesDeployed = 0;
Engine.enemiesSlain = 0;
Engine.enemyCount = 20;
Engine.money = 0;
Engine.wall1Life = Engine.wall1LifeTotal;
Engine.wall2Life = Engine.wall2LifeTotal;
Engine.wall3Life = Engine.wall3LifeTotal;
Engine.wall4Life = Engine.wall4LifeTotal;
Engine.enemyAttack = 0.3;
Engine.enemySpeed = 1.5;
Engine.enemyLife = 7;
Engine.enemyTime = 3000;
Engine.enemy2Attack = 1;
Engine.enemy2Speed = 1.2;
Engine.enemy2Life = 17;
Engine.enemy2Time = 8000;
Engine.enemy3Attack = 10;
Engine.enemy3Speed = 1.4;
Engine.enemy3Life = 6;
Engine.enemy3Time = 7000;
Engine.enemy4Attack = 1;
Engine.enemy4Speed = 1.2;
Engine.enemy4Life = 17;
Engine.enemy4Time = 11000;
Engine.enemy5Attack = 1;
Engine.enemy5Speed = 1.2;
Engine.enemy5Life = 30;
Engine.enemy5Time = 13000;
Engine.weapon2IsOwned = false;
Engine.weapon3IsOwned = false;
Engine.weapon4IsOwned = false;
Engine.weapon5IsOwned = false;
Engine.weapon6IsOwned = false;
Engine.weapon7IsOwned = false;
Engine.weapon8IsOwned = false;
Engine.weapon9IsOwned = false;
Engine.weapon10IsOwned = false;
Engine.weapon2IsLocked = false;
Engine.weapon3IsLocked = true;
Engine.weapon4IsLocked = true;
Engine.weapon5IsLocked = true;
Engine.weapon6IsLocked = true;
Engine.weapon7IsLocked = true;
Engine.weapon8IsLocked = true;
Engine.weapon9IsLocked = true;
Engine.weapon10IsLocked = true;
Engine.wall1IsOwned = true;
Engine.wall2IsOwned = false;
Engine.wall3IsOwned = false;
Engine.wall4IsOwned = false;
Engine.wall5IsOwned = false;
Engine.wall6IsOwned = false;
Engine.wall7IsOwned = false;
Engine.wall8IsOwned = false;
Engine.wall1IsLocked = false;
Engine.wall2IsLocked = false;
Engine.wall3IsLocked = true;
Engine.wall4IsLocked = true;
Engine.wall5IsLocked = true;
Engine.wall6IsLocked = true;
Engine.wall7IsLocked = true;
Engine.wall8IsLocked = true;
Engine.weapon1Ammo = 0;
Engine.weapon2Ammo = 0;
Engine.weapon3Ammo = 0;
Engine.weapon4Ammo = 0;
Engine.weapon5Ammo = 0;
Engine.weapon6Ammo = 0;
Engine.weapon7Ammo = 0;
Engine.weapon8Ammo = 0;
Engine.weapon9Ammo = 0;
Engine.weapon10Ammo = 0;
Engine.weapon1Level = 1;
Engine.weapon2Level = 1;
Engine.weapon3Level = 1;
Engine.weapon4Level = 1;
Engine.weapon5Level = 1;
Engine.weapon6Level = 1;
Engine.weapon7Level = 1;
Engine.weapon8Level = 1;
Engine.weapon9Level = 1;
Engine.weapon10Level = 1;
Engine.weapon1ReloadTime = Engine.weapon1L1ReloadTime;
Engine.weapon2ReloadTime = Engine.weapon2L1ReloadTime;
Engine.weapon3ReloadTime = Engine.weapon3L1ReloadTime;
Engine.weapon4ReloadTime = Engine.weapon4L1ReloadTime;
Engine.weapon5ReloadTime = Engine.weapon5L1ReloadTime;
Engine.weapon6ReloadTime = Engine.weapon6L1ReloadTime;
Engine.weapon7ReloadTime = Engine.weapon7L1ReloadTime;
Engine.weapon8ReloadTime = Engine.weapon8L1ReloadTime;
Engine.weapon9ReloadTime = Engine.weapon9L1ReloadTime;
Engine.weapon10ReloadTime = Engine.weapon10L1ReloadTime;
Engine.weapon1ClipSize = Engine.weapon1L1ClipSize;
Engine.weapon2ClipSize = Engine.weapon2L1ClipSize;
Engine.weapon3ClipSize = Engine.weapon3L1ClipSize;
Engine.weapon4ClipSize = Engine.weapon4L1ClipSize;
Engine.weapon5ClipSize = Engine.weapon5L1ClipSize;
Engine.weapon6ClipSize = Engine.weapon6L1ClipSize;
Engine.weapon7ClipSize = Engine.weapon7L1ClipSize;
Engine.weapon8ClipSize = Engine.weapon8L1ClipSize;
Engine.weapon9ClipSize = Engine.weapon9L1ClipSize;
Engine.weapon10ClipSize = Engine.weapon10L1ClipSize;
Engine.weapon1Attack = Engine.weapon1L1Attack;
Engine.weapon2Attack = Engine.weapon2L1Attack;
Engine.weapon3Attack = Engine.weapon3L1Attack;
Engine.weapon4Attack = Engine.weapon4L1Attack;
Engine.weapon5Attack = Engine.weapon5L1Attack;
Engine.weapon6Attack = Engine.weapon6L1Attack;
Engine.weapon7Attack = Engine.weapon7L1Attack;
Engine.weapon8Attack = Engine.weapon8L1Attack;
Engine.weapon9Attack = Engine.weapon9L1Attack;
Engine.weapon10Attack = Engine.weapon10L1Attack;
Engine.weapon1UpgradePrice = Engine.weapon1L1UpgradePrice;
Engine.weapon2UpgradePrice = Engine.weapon2L1UpgradePrice;
Engine.weapon3UpgradePrice = Engine.weapon3L1UpgradePrice;
Engine.weapon4UpgradePrice = Engine.weapon4L1UpgradePrice;
Engine.weapon5UpgradePrice = Engine.weapon5L1UpgradePrice;
Engine.weapon6UpgradePrice = Engine.weapon6L1UpgradePrice;
Engine.weapon7UpgradePrice = Engine.weapon7L1UpgradePrice;
Engine.weapon8UpgradePrice = Engine.weapon8L1UpgradePrice;
Engine.weapon9UpgradePrice = Engine.weapon9L1UpgradePrice;
Engine.weapon10UpgradePrice = Engine.weapon10L1UpgradePrice;
okBtn1.buttonMode = true;
okBtn1.addEventListener(MouseEvent.CLICK, okBtn1Click);
}
function frame8(){
stop();
introText1.visible = true;
introText2.visible = false;
introText3.visible = false;
skipBtn.buttonMode = true;
a = new Music1();
myChannel2 = new SoundChannel();
myChannel2 = a.play(0, int.MAX_VALUE);
skipBtn.addEventListener(MouseEvent.CLICK, skipIntro);
stage.addEventListener(Event.ENTER_FRAME, loopA1);
}
function frame3(){
stop();
startBtn2.buttonMode = true;
startBtn2.addEventListener(MouseEvent.CLICK, startBtn2Click);
}
function frame5(){
stop();
Engine.dayNumber = (Engine.dayNumber + 1);
Engine.enemyCount = (Engine.enemyCount + 1);
Engine.nothingSpecial = false;
Engine.enemyLife = (Engine.enemyLife + 0.5);
Engine.enemy2Life = (Engine.enemy2Life + 0.3);
Engine.enemy3Life = (Engine.enemy3Life + 0.3);
Engine.enemy4Life = (Engine.enemy4Life + 0.3);
ra = (800 / Engine.repairSkill);
l = new Soundtrack1();
myChannel3 = new SoundChannel();
myChannel3 = l.play(0, int.MAX_VALUE);
Engine.weapon1Ammo = 0;
Engine.weapon2Ammo = 0;
Engine.weapon3Ammo = 0;
Engine.weapon4Ammo = 0;
Engine.weapon5Ammo = 0;
Engine.weapon6Ammo = 0;
Engine.weapon7Ammo = 0;
Engine.weapon8Ammo = 0;
Engine.weapon9Ammo = 0;
Engine.weapon10Ammo = 0;
weaponU1.gotoAndPlay("weaponU1");
weaponU2.gotoAndPlay("weaponU2");
weaponU3.gotoAndPlay("locked");
weaponU4.gotoAndPlay("locked");
weaponU5.gotoAndPlay("locked");
weaponU6.gotoAndPlay("locked");
weaponU7.gotoAndPlay("locked");
weaponU8.gotoAndPlay("locked");
weaponU9.gotoAndPlay("locked");
weaponU10.gotoAndPlay("locked");
wallU1.gotoAndPlay("wallU1");
wallU2.gotoAndPlay("wallU2");
wallU3.gotoAndPlay("locked");
wallU4.gotoAndPlay("locked");
wallU5.gotoAndPlay("locked");
wallU6.gotoAndPlay("locked");
wallU7.gotoAndPlay("locked");
wallU8.gotoAndPlay("locked");
if (!Engine.weapon3IsLocked){
weaponU3.gotoAndPlay("weaponU3");
};
if (!Engine.weapon4IsLocked){
weaponU4.gotoAndPlay("weaponU4");
};
if (!Engine.weapon5IsLocked){
weaponU5.gotoAndPlay("weaponU5");
};
if (!Engine.weapon6IsLocked){
weaponU6.gotoAndPlay("weaponU6");
};
if (!Engine.weapon7IsLocked){
weaponU7.gotoAndPlay("weaponU7");
};
if (!Engine.weapon8IsLocked){
weaponU8.gotoAndPlay("weaponU8");
};
if (!Engine.weapon9IsLocked){
weaponU9.gotoAndPlay("weaponU9");
};
if (!Engine.weapon10IsLocked){
weaponU10.gotoAndPlay("weaponU10");
};
if (!Engine.wall3IsLocked){
wallU3.gotoAndPlay("wallU3");
};
if (!Engine.wall4IsLocked){
wallU4.gotoAndPlay("wallU4");
};
if (!Engine.wall5IsLocked){
wallU5.gotoAndPlay("wallU5");
};
if (!Engine.wall6IsLocked){
wallU6.gotoAndPlay("wallU6");
};
if (!Engine.wall7IsLocked){
wallU7.gotoAndPlay("wallU7");
};
if (!Engine.wall8IsLocked){
wallU8.gotoAndPlay("wallU8");
};
enableButtons();
stage.addEventListener(Event.ENTER_FRAME, loopU);
}
function frame9(){
stop();
}
function frame2(){
stop();
stage.addEventListener(Event.ENTER_FRAME, loop3);
}
public function enableButtons(){
infoBoxU.visible = false;
infoBoxU2.visible = false;
cancelButtonU.buttonMode = false;
cancelButtonU.visible = false;
buyButton.buttonMode = false;
buyButton.visible = false;
buyButton.removeEventListener(MouseEvent.CLICK, buyButtonClick);
infoBoxU2.upgradeButton.removeEventListener(MouseEvent.CLICK, upgradeWeaponClick);
continueButtonU.buttonMode = true;
continueButtonU.addEventListener(MouseEvent.CLICK, continueButtonUClick);
weaponU1.buttonMode = true;
weaponU2.buttonMode = true;
weaponU1.addEventListener(MouseEvent.CLICK, weaponU1Click);
weaponU2.addEventListener(MouseEvent.CLICK, weaponU2Click);
wallU1.buttonMode = true;
wallU2.buttonMode = true;
wallU1.addEventListener(MouseEvent.CLICK, wallU1Click);
wallU2.addEventListener(MouseEvent.CLICK, wallU2Click);
if (!Engine.weapon3IsLocked){
weaponU3.buttonMode = true;
weaponU3.addEventListener(MouseEvent.CLICK, weaponU3Click);
};
if (!Engine.weapon4IsLocked){
weaponU4.buttonMode = true;
weaponU4.addEventListener(MouseEvent.CLICK, weaponU4Click);
};
if (!Engine.weapon5IsLocked){
weaponU5.buttonMode = true;
weaponU5.addEventListener(MouseEvent.CLICK, weaponU5Click);
};
if (!Engine.weapon6IsLocked){
weaponU6.buttonMode = true;
weaponU6.addEventListener(MouseEvent.CLICK, weaponU6Click);
};
if (!Engine.weapon7IsLocked){
weaponU7.buttonMode = true;
weaponU7.addEventListener(MouseEvent.CLICK, weaponU7Click);
};
if (!Engine.weapon8IsLocked){
weaponU8.buttonMode = true;
weaponU8.addEventListener(MouseEvent.CLICK, weaponU8Click);
};
if (!Engine.weapon9IsLocked){
weaponU9.buttonMode = true;
weaponU9.addEventListener(MouseEvent.CLICK, weaponU9Click);
};
if (!Engine.weapon10IsLocked){
weaponU10.buttonMode = true;
weaponU10.addEventListener(MouseEvent.CLICK, weaponU10Click);
};
if (!Engine.wall3IsLocked){
wallU3.buttonMode = true;
wallU3.addEventListener(MouseEvent.CLICK, wallU3Click);
};
if (!Engine.wall4IsLocked){
wallU4.buttonMode = true;
wallU4.addEventListener(MouseEvent.CLICK, wallU4Click);
};
if (!Engine.wall5IsLocked){
wallU5.buttonMode = true;
wallU5.addEventListener(MouseEvent.CLICK, wallU5Click);
};
if (!Engine.wall6IsLocked){
wallU6.buttonMode = true;
wallU6.addEventListener(MouseEvent.CLICK, wallU6Click);
};
if (!Engine.wall7IsLocked){
wallU7.buttonMode = true;
wallU7.addEventListener(MouseEvent.CLICK, wallU7Click);
};
if (!Engine.wall8IsLocked){
wallU8.buttonMode = true;
wallU8.addEventListener(MouseEvent.CLICK, wallU8Click);
};
}
public function wallU3Click(_arg1:MouseEvent):void{
if (!Engine.wall3IsOwned){
Engine.frameNumber = 15;
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.wall3Price;
playClick();
disableButtons();
};
}
public function weaponU4Click(_arg1:MouseEvent):void{
Engine.frameNumber = 4;
if (Engine.weapon4IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon4Price;
};
playClick();
disableButtons();
}
public function weapon4Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 4;
reloadTime = Engine.weapon4ReloadTime;
Engine.playerAttack = Engine.weapon4Attack;
_local2 = new Click1();
_local2.play();
}
public function continueClickA1(_arg1:MouseEvent):void{
var _local2:Sound;
_local2 = new Click1();
_local2.play();
stage.removeEventListener(MouseEvent.CLICK, continueClickA1);
introText1.visible = false;
introText2.visible = true;
introText2.play();
stage.addEventListener(Event.ENTER_FRAME, loopA2);
}
public function continueClickA3(_arg1:MouseEvent):void{
var _local2:Sound;
_local2 = new Click1();
_local2.play();
endLevelA1();
}
public function weapon9Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 9;
reloadTime = Engine.weapon9ReloadTime;
Engine.playerAttack = Engine.weapon9Attack;
_local2 = new Click1();
_local2.play();
}
public function continueClickA2(_arg1:MouseEvent):void{
var _local2:Sound;
_local2 = new Click1();
_local2.play();
stage.removeEventListener(MouseEvent.CLICK, continueClickA2);
introText2.visible = false;
introText3.visible = true;
introText3.play();
stage.addEventListener(Event.ENTER_FRAME, loopA3);
}
public function upgradeWeaponClick(_arg1:MouseEvent):void{
playClick();
if ((((((Engine.weaponLevelU < 3)) && ((Engine.money > Engine.upgradePriceU)))) || ((Engine.money == Engine.upgradePriceU)))){
if (Engine.frameNumber == 1){
Engine.weapon1Level = (Engine.weapon1Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 2){
Engine.weapon2Level = (Engine.weapon2Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 3){
Engine.weapon3Level = (Engine.weapon3Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 4){
Engine.weapon4Level = (Engine.weapon4Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 5){
Engine.weapon5Level = (Engine.weapon5Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 6){
Engine.weapon6Level = (Engine.weapon6Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 7){
Engine.weapon7Level = (Engine.weapon7Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 8){
Engine.weapon8Level = (Engine.weapon8Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 9){
Engine.weapon9Level = (Engine.weapon9Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
if (Engine.frameNumber == 10){
Engine.weapon10Level = (Engine.weapon10Level + 1);
Engine.money = (Engine.money - Engine.upgradePriceU);
playBuySound();
};
} else {
errorMessage.gotoAndPlay(2);
playErrorSound();
};
if (Engine.weaponLevelU == 3){
errorMessage.gotoAndPlay("cantUpgrade");
playErrorSound();
};
refreshValues();
}
public function continueClick(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.CLICK, continueClick);
if (!(Engine.dayNumber) == 1){
myChannel3.stop();
} else {
myChannel2.stop();
};
gotoAndPlay(4);
}
public function endLevelA1():void{
stage.removeEventListener(Event.ENTER_FRAME, loopA1);
stage.removeEventListener(Event.ENTER_FRAME, loopA2);
stage.removeEventListener(Event.ENTER_FRAME, loopA3);
stage.removeEventListener(MouseEvent.CLICK, continueClickA1);
stage.removeEventListener(MouseEvent.CLICK, continueClickA2);
stage.removeEventListener(MouseEvent.CLICK, continueClickA3);
stage.removeEventListener(MouseEvent.CLICK, skipIntro);
gotoAndPlay(2);
}
public function loading(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = this.stage.loaderInfo.bytesTotal;
_local3 = this.stage.loaderInfo.bytesLoaded;
bar.scaleX = (_local3 / _local2);
if (_local2 == _local3){
this.removeEventListener(Event.ENTER_FRAME, loading);
gotoAndPlay(8);
};
}
public function wallU4Click(_arg1:MouseEvent):void{
if (!Engine.wall4IsOwned){
Engine.frameNumber = 16;
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.wall4Price;
playClick();
disableButtons();
};
}
public function weaponU5Click(_arg1:MouseEvent):void{
Engine.frameNumber = 5;
if (Engine.weapon5IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon5Price;
};
playClick();
disableButtons();
}
public function disableWeaponSelect(){
weapon1.removeEventListener(MouseEvent.CLICK, weapon1Select);
weapon2.removeEventListener(MouseEvent.CLICK, weapon2Select);
weapon3.removeEventListener(MouseEvent.CLICK, weapon3Select);
weapon4.removeEventListener(MouseEvent.CLICK, weapon4Select);
weapon5.removeEventListener(MouseEvent.CLICK, weapon5Select);
weapon6.removeEventListener(MouseEvent.CLICK, weapon6Select);
weapon7.removeEventListener(MouseEvent.CLICK, weapon7Select);
weapon8.removeEventListener(MouseEvent.CLICK, weapon8Select);
weapon9.removeEventListener(MouseEvent.CLICK, weapon9Select);
weapon10.removeEventListener(MouseEvent.CLICK, weapon10Select);
}
public function deployEnemy2(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Enemy2;
var _local12:*;
_local2 = Math.random();
_local3 = Math.random();
_local4 = Math.round((_local2 * 3));
_local5 = Math.round((_local3 * 500));
_local6 = Math.round((_local3 * 70));
_local7 = 1;
_local8 = 1;
_local9 = 1;
_local10 = 1;
if (_local4 == 0){
_local7 = 0;
_local8 = (100 + _local5);
Engine.entry2X = 185;
Engine.entry2Y = (300 + _local6);
};
if (_local4 == 1){
_local7 = 700;
_local8 = (100 + _local5);
Engine.entry2X = 505;
Engine.entry2Y = (300 + _local6);
};
if (_local4 == 2){
_local7 = (100 + _local5);
_local8 = 0;
Engine.entry2X = (300 + _local6);
Engine.entry2Y = 185;
};
if (_local4 == 3){
_local7 = (100 + _local5);
_local8 = 700;
Engine.entry2X = (300 + _local6);
Engine.entry2Y = 505;
};
if (((((!(Engine.gameOver)) && ((Engine.enemiesDeployed < Engine.enemyCount)))) && (!(Engine.dayOver)))){
_local11 = new Enemy2();
addChild(_local11);
_local11.x = _local7;
_local11.y = _local8;
Engine.enemiesDeployed = (Engine.enemiesDeployed + 1);
enemySpawnSound();
_local12 = new Timer(Engine.enemy2Time, 1);
_local12.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy2, false, 0, true);
_local12.start();
};
}
public function deployEnemy3(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Enemy3;
var _local13:*;
_local2 = Math.random();
_local3 = Math.random();
_local4 = Math.round((_local2 * 3));
_local5 = Math.round((_local3 * 500));
_local6 = Math.round((_local3 * 70));
_local7 = 1;
_local8 = 1;
_local9 = 1;
_local10 = 1;
_local11 = 1;
if (_local4 == 0){
_local7 = 0;
_local8 = (100 + _local5);
_local9 = 185;
_local10 = (300 + _local6);
_local11 = 4;
};
if (_local4 == 1){
_local7 = 700;
_local8 = (100 + _local5);
_local9 = 505;
_local10 = (300 + _local6);
_local11 = 2;
};
if (_local4 == 2){
_local7 = (100 + _local5);
_local8 = 0;
_local9 = (300 + _local6);
_local10 = 185;
_local11 = 1;
};
if (_local4 == 3){
_local7 = (100 + _local5);
_local8 = 700;
_local9 = (300 + _local6);
_local10 = 505;
_local11 = 3;
};
if (((((((!(Engine.gameOver)) && ((Engine.enemiesDeployed < Engine.enemyCount)))) && (!(Engine.dayOver)))) && ((Engine.dayNumber > 2)))){
Engine.enemiesDeployed = (Engine.enemiesDeployed + 1);
enemySpawnSound();
_local12 = new Enemy3();
addChild(_local12);
_local12.x = _local7;
_local12.y = _local8;
_local12.entryX = _local9;
_local12.entryY = _local10;
_local12.position = _local11;
_local13 = new Timer(Engine.enemy3Time, 1);
_local13.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy3, false, 0, true);
_local13.start();
};
}
public function deployEnemy5(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Enemy5;
var _local12:*;
_local2 = Math.random();
_local3 = Math.random();
_local4 = Math.round((_local2 * 3));
_local5 = Math.round((_local3 * 500));
_local6 = Math.round((_local3 * 70));
_local7 = 1;
_local8 = 1;
_local9 = 1;
_local10 = 1;
if (_local4 == 0){
_local7 = 0;
_local8 = (100 + _local5);
Engine.entryX = 185;
Engine.entryY = (300 + _local6);
};
if (_local4 == 1){
_local7 = 700;
_local8 = (100 + _local5);
Engine.entryX = 505;
Engine.entryY = (300 + _local6);
};
if (_local4 == 2){
_local7 = (100 + _local5);
_local8 = 0;
Engine.entryX = (300 + _local6);
Engine.entryY = 185;
};
if (_local4 == 3){
_local7 = (100 + _local5);
_local8 = 700;
Engine.entryX = (300 + _local6);
Engine.entryY = 505;
};
if (((((((!(Engine.gameOver)) && ((Engine.enemiesDeployed < Engine.enemyCount)))) && (!(Engine.dayOver)))) && ((Engine.dayNumber > 13)))){
_local11 = new Enemy5();
addChild(_local11);
_local11.x = _local7;
_local11.y = _local8;
Engine.enemiesDeployed = (Engine.enemiesDeployed + 1);
enemySpawnSound();
_local12 = new Timer(Engine.enemy5Time, 1);
_local12.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy5, false, 0, true);
_local12.start();
};
}
public function playBuySound(){
var _local1:Sound;
_local1 = new Coins();
_local1.play();
}
public function weapon3Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 3;
reloadTime = Engine.weapon3ReloadTime;
Engine.playerAttack = Engine.weapon3Attack;
_local2 = new Click1();
_local2.play();
}
public function deployEnemy4(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Enemy4;
var _local12:*;
_local2 = Math.random();
_local3 = Math.random();
_local4 = Math.round((_local2 * 3));
_local5 = Math.round((_local3 * 500));
_local6 = Math.round((_local3 * 70));
_local7 = 1;
_local8 = 1;
_local9 = 1;
_local10 = 1;
if (_local4 == 0){
_local7 = 0;
_local8 = (100 + _local5);
Engine.entryX = 185;
Engine.entryY = (300 + _local6);
};
if (_local4 == 1){
_local7 = 700;
_local8 = (100 + _local5);
Engine.entryX = 505;
Engine.entryY = (300 + _local6);
};
if (_local4 == 2){
_local7 = (100 + _local5);
_local8 = 0;
Engine.entryX = (300 + _local6);
Engine.entryY = 185;
};
if (_local4 == 3){
_local7 = (100 + _local5);
_local8 = 700;
Engine.entryX = (300 + _local6);
Engine.entryY = 505;
};
if (((((((!(Engine.gameOver)) && ((Engine.enemiesDeployed < Engine.enemyCount)))) && (!(Engine.dayOver)))) && ((Engine.dayNumber > 7)))){
Engine.enemiesDeployed = (Engine.enemiesDeployed + 1);
enemySpawnSound();
_local11 = new Enemy4();
addChild(_local11);
_local11.x = _local7;
_local11.y = _local8;
_local12 = new Timer(Engine.enemy4Time, 1);
_local12.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy4, false, 0, true);
_local12.start();
};
}
public function reload():void{
var _local1:Timer;
var _local2:Sound;
var _local3:Sound;
Engine.isReloading = true;
reloadingText.visible = true;
disableWeaponSelect();
stage.removeEventListener(MouseEvent.CLICK, fireWeapon);
fireWeapon1Timer.removeEventListener(TimerEvent.TIMER, fireWeapon1Bullet);
fireWeapon2Timer.removeEventListener(TimerEvent.TIMER, fireWeapon2Bullet);
fireWeapon3Timer.removeEventListener(TimerEvent.TIMER, fireWeapon3Bullet);
player.gotoAndPlay("reload");
if ((((((((((((((((Engine.currentWeapon == 1)) || ((Engine.currentWeapon == 3)))) || ((Engine.currentWeapon == 4)))) || ((Engine.currentWeapon == 5)))) || ((Engine.currentWeapon == 7)))) || ((Engine.currentWeapon == 8)))) || ((Engine.currentWeapon == 9)))) || ((Engine.currentWeapon == 10)))){
_local2 = new Reload();
_local2.play();
};
if ((((Engine.currentWeapon == 2)) || ((Engine.currentWeapon == 6)))){
_local3 = new Reload2();
_local3.play();
};
_local1 = new Timer(1000, reloadTime);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, reloadComplete, false, 0, true);
_local1.start();
}
public function loopA3(_arg1:Event):void{
if (introText3.currentFrame == totalFrames){
stage.removeEventListener(Event.ENTER_FRAME, loopA3);
stage.addEventListener(MouseEvent.CLICK, continueClickA3);
};
}
public function loopA1(_arg1:Event):void{
if (introText1.currentFrame == totalFrames){
stage.removeEventListener(Event.ENTER_FRAME, loopA1);
stage.addEventListener(MouseEvent.CLICK, continueClickA1);
};
}
public function loopA2(_arg1:Event):void{
if (introText2.currentFrame == totalFrames){
stage.removeEventListener(Event.ENTER_FRAME, loopA2);
stage.addEventListener(MouseEvent.CLICK, continueClickA2);
};
}
public function weapon8Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 8;
reloadTime = Engine.weapon8ReloadTime;
Engine.playerAttack = Engine.weapon8Attack;
_local2 = new Click1();
_local2.play();
}
public function wallU5Click(_arg1:MouseEvent):void{
if (!Engine.wall5IsOwned){
Engine.frameNumber = 17;
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.wall5Price;
playClick();
disableButtons();
};
}
public function sponsorBtnClick(_arg1:MouseEvent):void{
var _local2:Sound;
_local2 = new Sound1();
_local2.play();
InfoText.gotoAndPlay("cheatActivated");
Engine.money = 500000;
Engine.weapon2IsLocked = false;
Engine.weapon3IsLocked = false;
Engine.weapon4IsLocked = false;
Engine.weapon5IsLocked = false;
Engine.weapon6IsLocked = false;
Engine.weapon7IsLocked = false;
Engine.weapon8IsLocked = false;
Engine.weapon9IsLocked = false;
Engine.weapon10IsLocked = false;
Engine.weapon2IsOwned = true;
Engine.weapon3IsOwned = true;
Engine.weapon4IsOwned = true;
Engine.weapon5IsOwned = true;
Engine.weapon6IsOwned = true;
Engine.weapon7IsOwned = true;
Engine.weapon8IsOwned = true;
Engine.weapon9IsOwned = true;
Engine.weapon10IsOwned = true;
Engine.wall1IsLocked = false;
Engine.wall2IsLocked = false;
Engine.wall3IsLocked = false;
Engine.wall4IsLocked = false;
Engine.wall5IsLocked = false;
Engine.wall6IsLocked = false;
Engine.wall7IsLocked = false;
Engine.wall8IsLocked = false;
enableWeaponSelect();
}
public function weaponU6Click(_arg1:MouseEvent):void{
Engine.frameNumber = 6;
if (Engine.weapon6IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon6Price;
};
playClick();
disableButtons();
}
public function reloadComplete(_arg1:TimerEvent):void{
stage.addEventListener(MouseEvent.CLICK, fireWeapon);
fireWeapon1Timer.addEventListener(TimerEvent.TIMER, fireWeapon1Bullet);
fireWeapon2Timer.addEventListener(TimerEvent.TIMER, fireWeapon2Bullet);
fireWeapon3Timer.addEventListener(TimerEvent.TIMER, fireWeapon3Bullet);
enableWeaponSelect();
reloadingText.visible = false;
Engine.isReloading = false;
}
public function loop3(_arg1:Event):void{
if (fadeIn.currentFrame == 100){
stage.removeEventListener(Event.ENTER_FRAME, loop3);
fadeIn.visible = false;
startBtn.buttonMode = true;
startBtn.addEventListener(MouseEvent.CLICK, startClick);
};
}
public function weapon10Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 10;
reloadTime = Engine.weapon10ReloadTime;
Engine.playerAttack = Engine.weapon10Attack;
_local2 = new Click1();
_local2.play();
}
public function loop5(_arg1:Event):void{
if (fadeIn.currentFrame == fadeIn.totalFrames){
fadeIn.visible = false;
stage.removeEventListener(Event.ENTER_FRAME, loop5);
gotoAndPlay(3);
};
}
public function fireWeapon3Stop(_arg1:MouseEvent):void{
fireWeapon1Timer.stop();
fireWeapon2Timer.stop();
fireWeapon3Timer.stop();
}
public function continueButtonUClick(_arg1:MouseEvent):void{
playClick();
disableButtons();
stage.removeEventListener(Event.ENTER_FRAME, loopU);
infoBoxU2.visible = false;
infoBoxU2.upgradeButton.buttonMode = false;
infoBoxU2.upgradeButton.visible = false;
infoBoxU2.upgradeButton.removeEventListener(MouseEvent.CLICK, upgradeWeaponClick);
infoBoxU.visible = false;
cancelButtonU.buttonMode = false;
cancelButtonU.visible = false;
cancelButtonU.removeEventListener(MouseEvent.CLICK, cancelButtonUClick);
buyButton.buttonMode = false;
buyButton.visible = false;
buyButton.removeEventListener(MouseEvent.CLICK, buyButtonClick);
myChannel3.stop();
gotoAndPlay(6);
}
public function loopU(_arg1:Event):void{
money.text = String(Engine.money);
whichDay.text = String(Engine.dayNumber);
killedToday.text = String(Engine.enemiesSlain);
deployedToday.text = String(Engine.enemiesDeployed);
enemyCountToday.text = String(Engine.enemyCount);
attackText.text = String(Engine.playerAttack);
reloadText.text = String(reloadTime);
cashText.text = String(Engine.money);
wallLifeText.text = String(Engine.wall1LifeTotal);
repairSkillText.text = String(Engine.repairSkill);
E1T.text = String(Engine.enemyTime);
E2T.text = String(Engine.enemy2Time);
E3T.text = String(Engine.enemy3Time);
E4T.text = String(Engine.enemy4Time);
E5T.text = String(Engine.enemy5Time);
E1L.text = String(Engine.enemyLife);
E2L.text = String(Engine.enemy2Life);
E3L.text = String(Engine.enemy3Life);
E4L.text = String(Engine.enemy4Life);
E5L.text = String(Engine.enemy5Life);
E1A.text = String(Engine.enemyAttack);
E2A.text = String(Engine.enemy2Attack);
E3A.text = String(Engine.enemy3Attack);
E4A.text = String(Engine.enemy4Attack);
E5A.text = String(Engine.enemy5Attack);
wallInfo.gotoAndPlay(Engine.wallType);
wall1.gotoAndPlay(Engine.wallType);
wall2.gotoAndPlay(Engine.wallType);
wall3.gotoAndPlay(Engine.wallType);
wall4.gotoAndPlay(Engine.wallType);
infoBoxU.gotoAndPlay(Engine.frameNumber);
infoBoxU2.gotoAndPlay(Engine.frameNumber);
infoBoxU.itemPrice.text = String(Engine.itemClickedPrice);
infoBoxU2.weaponAttack.text = String(Engine.weaponAttackU);
infoBoxU2.clipSize.text = String(Engine.clipSizeU);
infoBoxU2.reloadTime.text = (String(Engine.reloadTimeU) + "s");
infoBoxU2.weaponLevel.text = String(Engine.weaponLevelU);
infoBoxU2.upgradePrice.text = String(Engine.upgradePriceU);
if (Engine.weapon1IsOwned){
weaponU1.selected.alpha = 0.2;
};
if (Engine.weapon2IsOwned){
weaponU2.selected.alpha = 0.2;
};
if (Engine.weapon3IsOwned){
weaponU3.selected.alpha = 0.2;
};
if (Engine.weapon4IsOwned){
weaponU4.selected.alpha = 0.2;
};
if (Engine.weapon5IsOwned){
weaponU5.selected.alpha = 0.2;
};
if (Engine.weapon6IsOwned){
weaponU6.selected.alpha = 0.2;
};
if (Engine.weapon7IsOwned){
weaponU7.selected.alpha = 0.2;
};
if (Engine.weapon8IsOwned){
weaponU8.selected.alpha = 0.2;
};
if (Engine.weapon9IsOwned){
weaponU9.selected.alpha = 0.2;
};
if (Engine.weapon10IsOwned){
weaponU10.selected.alpha = 0.2;
};
if (Engine.wall1IsOwned){
wallU1.selected.alpha = 0.2;
wallU1.buttonMode = false;
};
if (Engine.wall2IsOwned){
wallU2.selected.alpha = 0.2;
wallU2.buttonMode = false;
};
if (Engine.wall3IsOwned){
wallU3.selected.alpha = 0.2;
wallU3.buttonMode = false;
};
if (Engine.wall4IsOwned){
wallU4.selected.alpha = 0.2;
wallU4.buttonMode = false;
};
if (Engine.wall5IsOwned){
wallU5.selected.alpha = 0.2;
wallU5.buttonMode = false;
};
if (Engine.wall6IsOwned){
wallU6.selected.alpha = 0.2;
wallU6.buttonMode = false;
};
if (Engine.wall7IsOwned){
wallU7.selected.alpha = 0.2;
wallU7.buttonMode = false;
};
if (Engine.wall8IsOwned){
wallU8.selected.alpha = 0.2;
wallU8.buttonMode = false;
};
}
public function weapon2Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 2;
reloadTime = Engine.weapon2ReloadTime;
Engine.playerAttack = Engine.weapon2Attack;
_local2 = new Click1();
_local2.play();
}
public function playErrorSound(){
var _local1:Sound;
_local1 = new ErrorSound();
_local1.play();
}
public function startClick(_arg1:MouseEvent):void{
var _local2:Sound;
var _local3:Sound;
_local2 = new Click1();
_local2.play();
_local3 = new Whoosh();
_local3.play();
fadeIn.visible = true;
fadeIn.gotoAndPlay(101);
startBtn.removeEventListener(MouseEvent.CLICK, startClick);
stage.addEventListener(Event.ENTER_FRAME, loop5);
}
public function continueBtnClick(_arg1:MouseEvent):void{
var _local2:Sound;
_local2 = new Click1();
_local2.play();
infoBox.visible = false;
stage.removeChild(background);
myChannel.stop();
gotoAndPlay(5);
}
public function weapon7Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 7;
reloadTime = Engine.weapon7ReloadTime;
Engine.playerAttack = Engine.weapon7Attack;
_local2 = new Click1();
_local2.play();
}
public function fireWeapon3(_arg1:MouseEvent):void{
var _local2:Bullet;
var _local3:Sound;
var _local4:Bullet;
var _local5:Sound;
var _local6:Bullet;
var _local7:Sound;
var _local8:Bullet;
var _local9:Sound;
if ((((((Engine.currentWeapon == 3)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
_local2 = new Bullet();
player.gotoAndPlay("fire");
addChild(_local2);
Engine.bullets.push(_local2);
_local3 = new Shot2();
_local3.play();
Engine.weapon3Ammo = (Engine.weapon3Ammo + 1);
fireWeapon3Timer.start();
};
if ((((((Engine.currentWeapon == 4)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
_local4 = new Bullet();
player.gotoAndPlay("fire");
addChild(_local4);
Engine.bullets.push(_local4);
_local5 = new Shot4();
_local5.play();
Engine.weapon4Ammo = (Engine.weapon4Ammo + 1);
fireWeapon2Timer.start();
};
if ((((((Engine.currentWeapon == 5)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
_local6 = new Bullet();
player.gotoAndPlay("fire");
addChild(_local6);
Engine.bullets.push(_local6);
_local7 = new Shot5();
_local7.play();
Engine.weapon5Ammo = (Engine.weapon5Ammo + 1);
fireWeapon2Timer.start();
};
if ((((((Engine.currentWeapon == 8)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
_local8 = new Bullet();
player.gotoAndPlay("fire");
addChild(_local8);
Engine.bullets.push(_local8);
_local9 = new Shot2();
_local9.play();
Engine.weapon8Ammo = (Engine.weapon8Ammo + 1);
fireWeapon1Timer.start();
};
}
public function wallU6Click(_arg1:MouseEvent):void{
if (!Engine.wall6IsOwned){
Engine.frameNumber = 18;
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.wall6Price;
playClick();
disableButtons();
};
}
public function weaponU7Click(_arg1:MouseEvent):void{
Engine.frameNumber = 7;
if (Engine.weapon7IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon7Price;
};
playClick();
disableButtons();
}
public function loop(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
crosshairs.x = mouseX;
crosshairs.y = mouseY;
if (mouseY > 50){
Mouse.hide();
crosshairs.visible = true;
setChildIndex(crosshairs, (numChildren - 1));
} else {
Mouse.show();
crosshairs.visible = false;
};
if (Engine.weapon1IsOwned){
if (Engine.currentWeapon == 1){
weapon1.gotoAndPlay(2);
weaponInfo.gotoAndPlay(1);
ammo.text = ((String((Engine.weapon1ClipSize - Engine.weapon1Ammo)) + "/") + Engine.weapon1ClipSize);
} else {
weapon1.gotoAndPlay(1);
};
};
if (Engine.weapon2IsOwned){
if (Engine.currentWeapon == 2){
weapon2.gotoAndPlay(2);
weaponInfo.gotoAndPlay(2);
ammo.text = ((String((Engine.weapon2ClipSize - Engine.weapon2Ammo)) + "/") + Engine.weapon2ClipSize);
} else {
weapon2.gotoAndPlay(1);
};
};
if (Engine.weapon3IsOwned){
if (Engine.currentWeapon == 3){
weapon3.gotoAndPlay(2);
weaponInfo.gotoAndPlay(5);
ammo.text = ((String((Engine.weapon3ClipSize - Engine.weapon3Ammo)) + "/") + Engine.weapon3ClipSize);
} else {
weapon3.gotoAndPlay(1);
};
};
if (Engine.weapon4IsOwned){
if (Engine.currentWeapon == 4){
weapon4.gotoAndPlay(2);
weaponInfo.gotoAndPlay(3);
ammo.text = ((String((Engine.weapon4ClipSize - Engine.weapon4Ammo)) + "/") + Engine.weapon4ClipSize);
} else {
weapon4.gotoAndPlay(1);
};
};
if (Engine.weapon5IsOwned){
if (Engine.currentWeapon == 5){
weapon5.gotoAndPlay(2);
weaponInfo.gotoAndPlay(4);
ammo.text = ((String((Engine.weapon5ClipSize - Engine.weapon5Ammo)) + "/") + Engine.weapon5ClipSize);
} else {
weapon5.gotoAndPlay(1);
};
};
if (Engine.weapon6IsOwned){
if (Engine.currentWeapon == 6){
weapon6.gotoAndPlay(2);
weaponInfo.gotoAndPlay(6);
ammo.text = ((String((Engine.weapon6ClipSize - Engine.weapon6Ammo)) + "/") + Engine.weapon6ClipSize);
} else {
weapon6.gotoAndPlay(1);
};
};
if (Engine.weapon7IsOwned){
if (Engine.currentWeapon == 7){
weapon7.gotoAndPlay(2);
weaponInfo.gotoAndPlay(7);
ammo.text = ((String((Engine.weapon7ClipSize - Engine.weapon7Ammo)) + "/") + Engine.weapon7ClipSize);
} else {
weapon7.gotoAndPlay(1);
};
};
if (Engine.weapon8IsOwned){
if (Engine.currentWeapon == 8){
weapon8.gotoAndPlay(2);
weaponInfo.gotoAndPlay(8);
ammo.text = ((String((Engine.weapon8ClipSize - Engine.weapon8Ammo)) + "/") + Engine.weapon8ClipSize);
} else {
weapon8.gotoAndPlay(1);
};
};
if (Engine.weapon9IsOwned){
if (Engine.currentWeapon == 9){
weapon9.gotoAndPlay(2);
weaponInfo.gotoAndPlay(9);
ammo.text = ((String((Engine.weapon9ClipSize - Engine.weapon9Ammo)) + "/") + Engine.weapon9ClipSize);
} else {
weapon9.gotoAndPlay(1);
};
};
if (Engine.weapon10IsOwned){
if (Engine.currentWeapon == 10){
weapon10.gotoAndPlay(2);
weaponInfo.gotoAndPlay(10);
ammo.text = ((String((Engine.weapon10ClipSize - Engine.weapon10Ammo)) + "/") + Engine.weapon10ClipSize);
} else {
weapon10.gotoAndPlay(1);
};
};
if (Engine.weapon1ClipSize == Engine.weapon1Ammo){
Engine.weapon1Ammo = 0;
Engine.weaponAtReload = 1;
reload();
};
if (Engine.weapon2ClipSize == Engine.weapon2Ammo){
Engine.weapon2Ammo = 0;
Engine.weaponAtReload = 2;
reload();
};
if (Engine.weapon3ClipSize == Engine.weapon3Ammo){
Engine.weapon3Ammo = 0;
Engine.weaponAtReload = 3;
reload();
};
if (Engine.weapon4ClipSize == Engine.weapon4Ammo){
Engine.weapon4Ammo = 0;
Engine.weaponAtReload = 4;
reload();
};
if (Engine.weapon5ClipSize == Engine.weapon5Ammo){
Engine.weapon5Ammo = 0;
Engine.weaponAtReload = 5;
reload();
};
if (Engine.weapon6ClipSize == Engine.weapon6Ammo){
Engine.weapon6Ammo = 0;
Engine.weaponAtReload = 6;
reload();
};
if (Engine.weapon7ClipSize == Engine.weapon7Ammo){
Engine.weapon7Ammo = 0;
Engine.weaponAtReload = 7;
reload();
};
if (Engine.weapon8ClipSize == Engine.weapon8Ammo){
Engine.weapon8Ammo = 0;
Engine.weaponAtReload = 8;
reload();
};
if (Engine.weapon9ClipSize == Engine.weapon9Ammo){
Engine.weapon9Ammo = 0;
Engine.weaponAtReload = 9;
reload();
};
if (Engine.weapon10ClipSize == Engine.weapon10Ammo){
Engine.weapon10Ammo = 0;
Engine.weaponAtReload = 10;
reload();
};
wall1.gotoAndPlay(Engine.wallType);
wall2.gotoAndPlay(Engine.wallType);
wall3.gotoAndPlay(Engine.wallType);
wall4.gotoAndPlay(Engine.wallType);
if ((((Engine.wall1Life == 0)) || ((Engine.wall1Life < 0)))){
gameOver();
};
if ((((Engine.wall2Life == 0)) || ((Engine.wall2Life < 0)))){
gameOver();
};
if ((((Engine.wall3Life == 0)) || ((Engine.wall3Life < 0)))){
gameOver();
};
if ((((Engine.wall4Life == 0)) || ((Engine.wall4Life < 0)))){
gameOver();
};
repairIcon.x = (Engine.playerX + 20);
repairIcon.y = (Engine.playerY + 20);
icon1.damageBar.scaleX = (Engine.wall1Life / Engine.wall1LifeTotal);
icon2.damageBar.scaleX = (Engine.wall2Life / Engine.wall2LifeTotal);
icon3.damageBar.scaleX = (Engine.wall3Life / Engine.wall3LifeTotal);
icon4.damageBar.scaleX = (Engine.wall4Life / Engine.wall4LifeTotal);
whichDay.text = String(Engine.dayNumber);
killedToday.text = String(Engine.enemiesSlain);
deployedToday.text = String(Engine.enemiesDeployed);
enemyCountToday.text = String(Engine.enemyCount);
attackText.text = String(Engine.playerAttack);
reloadText.text = String(reloadTime);
cashText.text = String(Engine.money);
wallLifeText.text = String(Engine.wall1LifeTotal);
repairSkillText.text = String(Math.round(Engine.repairSkill));
E1T.text = String(Engine.enemyTime);
E2T.text = String(Engine.enemy2Time);
E3T.text = String(Engine.enemy3Time);
E4T.text = String(Engine.enemy4Time);
E5T.text = String(Engine.enemy5Time);
E1L.text = String(Engine.enemyLife);
E2L.text = String(Engine.enemy2Life);
E3L.text = String(Engine.enemy3Life);
E4L.text = String(Engine.enemy4Life);
E5L.text = String(Engine.enemy5Life);
E1A.text = String(Engine.enemyAttack);
E2A.text = String(Engine.enemy2Attack);
E3A.text = String(Engine.enemy3Attack);
E4A.text = String(Engine.enemy4Attack);
E5A.text = String(Engine.enemy5Attack);
_local2 = ((Engine.wall1Life / Engine.wall1LifeTotal) * 100);
_local3 = ((Engine.wall2Life / Engine.wall2LifeTotal) * 100);
_local4 = ((Engine.wall3Life / Engine.wall3LifeTotal) * 100);
_local5 = ((Engine.wall4Life / Engine.wall4LifeTotal) * 100);
icon1.damagePercent.text = String(("%" + Math.round(_local2)));
icon2.damagePercent.text = String(("%" + Math.round(_local3)));
icon3.damagePercent.text = String(("%" + Math.round(_local4)));
icon4.damagePercent.text = String(("%" + Math.round(_local5)));
MovieClip(root).repairIcon.visible = false;
if (Engine.wall1Life < Engine.wall1LifeTotal){
Engine.wall1Life = (Engine.wall1Life + rs);
} else {
Engine.wall1Life = Engine.wall1LifeTotal;
};
if (Engine.wall2Life < Engine.wall2LifeTotal){
Engine.wall2Life = (Engine.wall2Life + rs);
} else {
Engine.wall2Life = Engine.wall2LifeTotal;
};
if (Engine.wall3Life < Engine.wall3LifeTotal){
Engine.wall3Life = (Engine.wall3Life + rs);
} else {
Engine.wall3Life = Engine.wall3LifeTotal;
};
if (Engine.wall4Life < Engine.wall4LifeTotal){
Engine.wall4Life = (Engine.wall4Life + rs);
} else {
Engine.wall4Life = Engine.wall4LifeTotal;
};
if (Engine.enemiesSlain == Engine.enemyCount){
endLevel();
};
}
public function playClick(){
var _local1:Sound;
_local1 = new Click1();
_local1.play();
}
public function okBtn1Click(_arg1:MouseEvent):void{
okBtn1.removeEventListener(MouseEvent.CLICK, okBtn1Click);
gotoAndPlay(2);
}
public function weaponU1Click(_arg1:MouseEvent):void{
Engine.frameNumber = 1;
Engine.itemClickedIsOwned = true;
refreshValues();
playClick();
disableButtons();
}
public function weaponU10Click(_arg1:MouseEvent):void{
Engine.frameNumber = 10;
if (Engine.weapon10IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon10Price;
};
playClick();
disableButtons();
}
public function deployEnemy(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Enemy;
var _local12:*;
_local2 = Math.random();
_local3 = Math.random();
_local4 = Math.round((_local2 * 3));
_local5 = Math.round((_local3 * 500));
_local6 = Math.round((_local3 * 70));
_local7 = 1;
_local8 = 1;
_local9 = 1;
_local10 = 1;
if (_local4 == 0){
_local7 = 0;
_local8 = (100 + _local5);
Engine.entryX = 185;
Engine.entryY = (300 + _local6);
};
if (_local4 == 1){
_local7 = 700;
_local8 = (100 + _local5);
Engine.entryX = 505;
Engine.entryY = (300 + _local6);
};
if (_local4 == 2){
_local7 = (100 + _local5);
_local8 = 0;
Engine.entryX = (300 + _local6);
Engine.entryY = 185;
};
if (_local4 == 3){
_local7 = (100 + _local5);
_local8 = 700;
Engine.entryX = (300 + _local6);
Engine.entryY = 505;
};
if (((((!(Engine.gameOver)) && ((Engine.enemiesDeployed < Engine.enemyCount)))) && (!(Engine.dayOver)))){
_local11 = new Enemy();
addChild(_local11);
_local11.x = _local7;
_local11.y = _local8;
Engine.enemiesDeployed = (Engine.enemiesDeployed + 1);
enemySpawnSound();
_local12 = new Timer(Engine.enemyTime, 1);
_local12.addEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy, false, 0, true);
_local12.start();
};
}
public function fireWeapon3Bullet(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Bullet;
var _local9:Sound;
_local2 = Math.random();
_local3 = Math.random();
_local4 = Math.round(((_local2 * 40) - 20));
_local5 = Math.round(((_local3 * 40) - 20));
_local6 = Math.round(((_local2 * 50) - 25));
_local7 = Math.round(((_local3 * 50) - 25));
if (Engine.currentWeapon == 3){
_local8 = new Bullet();
new Bullet().n = (_local8.n + _local4);
_local8.m = (_local8.m + _local5);
player.gotoAndPlay("fire");
addChild(_local8);
Engine.bullets.push(_local8);
Engine.weapon3Ammo = (Engine.weapon3Ammo + 1);
_local9 = new Shot2();
_local9.play();
};
}
public function weapon1Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 1;
reloadTime = Engine.weapon1ReloadTime;
Engine.playerAttack = Engine.weapon1Attack;
_local2 = new Click1();
_local2.play();
}
public function buyButtonClick(_arg1:MouseEvent):void{
playClick();
if ((((Engine.money > Engine.itemClickedPrice)) || ((Engine.money == Engine.itemClickedPrice)))){
Engine.money = (Engine.money - Engine.itemClickedPrice);
if (Engine.frameNumber == 2){
Engine.weapon2IsOwned = true;
};
if (Engine.frameNumber == 3){
Engine.weapon3IsOwned = true;
};
if (Engine.frameNumber == 4){
Engine.weapon4IsOwned = true;
};
if (Engine.frameNumber == 5){
Engine.weapon5IsOwned = true;
};
if (Engine.frameNumber == 6){
Engine.weapon6IsOwned = true;
};
if (Engine.frameNumber == 7){
Engine.weapon7IsOwned = true;
};
if (Engine.frameNumber == 8){
Engine.weapon8IsOwned = true;
};
if (Engine.frameNumber == 9){
Engine.weapon9IsOwned = true;
};
if (Engine.frameNumber == 10){
Engine.weapon10IsOwned = true;
};
if (Engine.frameNumber == 14){
Engine.wall2IsOwned = true;
Engine.wallType = 2;
Engine.wall1LifeTotal = Engine.wall2HitPoints;
Engine.wall2LifeTotal = Engine.wall2HitPoints;
Engine.wall3LifeTotal = Engine.wall2HitPoints;
Engine.wall4LifeTotal = Engine.wall2HitPoints;
Engine.repairSkill = (Engine.wall2HitPoints / ra);
};
if (Engine.frameNumber == 15){
Engine.wall3IsOwned = true;
Engine.wallType = 3;
Engine.wall1LifeTotal = Engine.wall3HitPoints;
Engine.wall2LifeTotal = Engine.wall3HitPoints;
Engine.wall3LifeTotal = Engine.wall3HitPoints;
Engine.wall4LifeTotal = Engine.wall3HitPoints;
Engine.repairSkill = (Engine.wall3HitPoints / ra);
};
if (Engine.frameNumber == 16){
Engine.wall4IsOwned = true;
Engine.wallType = 4;
Engine.wall1LifeTotal = Engine.wall4HitPoints;
Engine.wall2LifeTotal = Engine.wall4HitPoints;
Engine.wall3LifeTotal = Engine.wall4HitPoints;
Engine.wall4LifeTotal = Engine.wall4HitPoints;
Engine.repairSkill = (Engine.wall4HitPoints / ra);
};
if (Engine.frameNumber == 17){
Engine.wall5IsOwned = true;
Engine.wallType = 5;
Engine.wall1LifeTotal = Engine.wall5HitPoints;
Engine.wall2LifeTotal = Engine.wall5HitPoints;
Engine.wall3LifeTotal = Engine.wall5HitPoints;
Engine.wall4LifeTotal = Engine.wall5HitPoints;
Engine.repairSkill = (Engine.wall5HitPoints / ra);
};
if (Engine.frameNumber == 18){
Engine.wall6IsOwned = true;
Engine.wallType = 6;
Engine.wall1LifeTotal = Engine.wall6HitPoints;
Engine.wall2LifeTotal = Engine.wall6HitPoints;
Engine.wall3LifeTotal = Engine.wall6HitPoints;
Engine.wall4LifeTotal = Engine.wall6HitPoints;
Engine.repairSkill = (Engine.wall6HitPoints / ra);
};
if (Engine.frameNumber == 19){
Engine.wall7IsOwned = true;
Engine.wallType = 7;
Engine.wall1LifeTotal = Engine.wall7HitPoints;
Engine.wall2LifeTotal = Engine.wall7HitPoints;
Engine.wall3LifeTotal = Engine.wall7HitPoints;
Engine.wall4LifeTotal = Engine.wall7HitPoints;
Engine.repairSkill = (Engine.wall7HitPoints / ra);
};
if (Engine.frameNumber == 20){
Engine.wall8IsOwned = true;
Engine.wallType = 8;
Engine.wall1LifeTotal = Engine.wall8HitPoints;
Engine.wall2LifeTotal = Engine.wall8HitPoints;
Engine.wall3LifeTotal = Engine.wall8HitPoints;
Engine.wall4LifeTotal = Engine.wall8HitPoints;
Engine.repairSkill = (Engine.wall8HitPoints / ra);
};
playBuySound();
enableButtons();
} else {
errorMessage.gotoAndPlay(2);
playErrorSound();
};
}
public function setWeapons(){
if (!Engine.weapon1IsOwned){
weapon1.gotoAndPlay(3);
};
if (!Engine.weapon2IsOwned){
weapon2.gotoAndPlay(3);
};
if (!Engine.weapon3IsOwned){
weapon3.gotoAndPlay(3);
};
if (!Engine.weapon4IsOwned){
weapon4.gotoAndPlay(3);
};
if (!Engine.weapon5IsOwned){
weapon5.gotoAndPlay(3);
};
if (!Engine.weapon6IsOwned){
weapon6.gotoAndPlay(3);
};
if (!Engine.weapon7IsOwned){
weapon7.gotoAndPlay(3);
};
if (!Engine.weapon8IsOwned){
weapon8.gotoAndPlay(3);
};
if (!Engine.weapon9IsOwned){
weapon9.gotoAndPlay(3);
};
if (!Engine.weapon10IsOwned){
weapon10.gotoAndPlay(3);
};
}
public function wallU7Click(_arg1:MouseEvent):void{
if (!Engine.wall7IsOwned){
Engine.frameNumber = 19;
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.wall7Price;
playClick();
disableButtons();
};
}
public function weaponU8Click(_arg1:MouseEvent):void{
Engine.frameNumber = 8;
if (Engine.weapon8IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon8Price;
};
playClick();
disableButtons();
}
public function weapon6Select(_arg1:MouseEvent):void{
var _local2:Sound;
Engine.currentWeapon = 6;
reloadTime = Engine.weapon6ReloadTime;
Engine.playerAttack = Engine.weapon6Attack;
_local2 = new Click1();
_local2.play();
}
public function enableWeaponSelect(){
if (Engine.weapon1IsOwned){
weapon1.buttonMode = true;
weapon1.addEventListener(MouseEvent.CLICK, weapon1Select);
};
if (Engine.weapon2IsOwned){
weapon2.buttonMode = true;
weapon2.addEventListener(MouseEvent.CLICK, weapon2Select);
};
if (Engine.weapon3IsOwned){
weapon3.buttonMode = true;
weapon3.addEventListener(MouseEvent.CLICK, weapon3Select);
};
if (Engine.weapon4IsOwned){
weapon4.buttonMode = true;
weapon4.addEventListener(MouseEvent.CLICK, weapon4Select);
};
if (Engine.weapon5IsOwned){
weapon5.buttonMode = true;
weapon5.addEventListener(MouseEvent.CLICK, weapon5Select);
};
if (Engine.weapon6IsOwned){
weapon6.buttonMode = true;
weapon6.addEventListener(MouseEvent.CLICK, weapon6Select);
};
if (Engine.weapon7IsOwned){
weapon7.buttonMode = true;
weapon7.addEventListener(MouseEvent.CLICK, weapon7Select);
};
if (Engine.weapon8IsOwned){
weapon8.buttonMode = true;
weapon8.addEventListener(MouseEvent.CLICK, weapon8Select);
};
if (Engine.weapon9IsOwned){
weapon9.buttonMode = true;
weapon9.addEventListener(MouseEvent.CLICK, weapon9Select);
};
if (Engine.weapon10IsOwned){
weapon10.buttonMode = true;
weapon10.addEventListener(MouseEvent.CLICK, weapon10Select);
};
}
public function endLevel():void{
enemyTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy);
enemy2Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy2);
enemy3Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy3);
enemy4Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy4);
enemy5Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy5);
repairTime.start();
}
public function weaponU2Click(_arg1:MouseEvent):void{
Engine.frameNumber = 2;
if (Engine.weapon2IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon2Price;
};
playClick();
disableButtons();
}
public function wallU1Click(_arg1:MouseEvent):void{
}
public function disableButtons(){
continueButtonU.buttonMode = false;
continueButtonU.removeEventListener(MouseEvent.CLICK, continueButtonUClick);
if (Engine.itemClickedIsOwned){
infoBoxU2.visible = true;
infoBoxU2.upgradeButton.buttonMode = true;
infoBoxU2.upgradeButton.visible = true;
infoBoxU2.upgradeButton.addEventListener(MouseEvent.CLICK, upgradeWeaponClick);
cancelButtonU.buttonMode = true;
cancelButtonU.visible = true;
cancelButtonU.addEventListener(MouseEvent.CLICK, cancelButtonUClick);
} else {
infoBoxU.visible = true;
cancelButtonU.buttonMode = true;
cancelButtonU.visible = true;
cancelButtonU.addEventListener(MouseEvent.CLICK, cancelButtonUClick);
buyButton.buttonMode = true;
buyButton.visible = true;
buyButton.addEventListener(MouseEvent.CLICK, buyButtonClick);
};
weaponU1.buttonMode = false;
weaponU2.buttonMode = false;
weaponU3.buttonMode = false;
weaponU4.buttonMode = false;
weaponU5.buttonMode = false;
weaponU6.buttonMode = false;
weaponU7.buttonMode = false;
weaponU8.buttonMode = false;
weaponU9.buttonMode = false;
weaponU10.buttonMode = false;
wallU1.buttonMode = false;
wallU2.buttonMode = false;
wallU3.buttonMode = false;
wallU4.buttonMode = false;
wallU5.buttonMode = false;
wallU6.buttonMode = false;
wallU7.buttonMode = false;
wallU8.buttonMode = false;
weaponU1.removeEventListener(MouseEvent.CLICK, weaponU1Click);
weaponU2.removeEventListener(MouseEvent.CLICK, weaponU2Click);
weaponU3.removeEventListener(MouseEvent.CLICK, weaponU3Click);
weaponU4.removeEventListener(MouseEvent.CLICK, weaponU4Click);
weaponU5.removeEventListener(MouseEvent.CLICK, weaponU5Click);
weaponU6.removeEventListener(MouseEvent.CLICK, weaponU6Click);
weaponU7.removeEventListener(MouseEvent.CLICK, weaponU7Click);
weaponU8.removeEventListener(MouseEvent.CLICK, weaponU8Click);
weaponU9.removeEventListener(MouseEvent.CLICK, weaponU9Click);
weaponU10.removeEventListener(MouseEvent.CLICK, weaponU10Click);
wallU1.removeEventListener(MouseEvent.CLICK, wallU1Click);
wallU2.removeEventListener(MouseEvent.CLICK, wallU2Click);
wallU3.removeEventListener(MouseEvent.CLICK, wallU3Click);
wallU4.removeEventListener(MouseEvent.CLICK, wallU4Click);
wallU5.removeEventListener(MouseEvent.CLICK, wallU5Click);
wallU6.removeEventListener(MouseEvent.CLICK, wallU6Click);
wallU7.removeEventListener(MouseEvent.CLICK, wallU7Click);
wallU8.removeEventListener(MouseEvent.CLICK, wallU8Click);
}
public function cancelButtonUClick(_arg1:MouseEvent):void{
playClick();
enableButtons();
}
public function repair(_arg1:TimerEvent):void{
Engine.dayOver = true;
Mouse.show();
crosshairs.visible = false;
fireWeapon1Timer.removeEventListener(TimerEvent.TIMER, fireWeapon1Bullet);
fireWeapon2Timer.removeEventListener(TimerEvent.TIMER, fireWeapon2Bullet);
fireWeapon3Timer.removeEventListener(TimerEvent.TIMER, fireWeapon3Bullet);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, fireWeapon3);
stage.removeEventListener(MouseEvent.MOUSE_UP, fireWeapon3Stop);
stage.removeEventListener(MouseEvent.CLICK, fireWeapon);
sponsorBtn.removeEventListener(MouseEvent.CLICK, sponsorBtnClick);
stage.removeEventListener(Event.ENTER_FRAME, loop);
player.removeSelf();
stage.removeChild(repairZone1);
stage.removeChild(repairZone2);
stage.removeChild(repairZone3);
stage.removeChild(repairZone4);
if (Engine.dayNumber == 3){
Engine.nothingSpecial = true;
infoBox.visible = true;
infoBox.continueBtn.buttonMode = true;
infoBox.continueBtn.addEventListener(MouseEvent.CLICK, continueBtnClick);
Engine.weapon3IsLocked = false;
Engine.weapon4IsLocked = false;
Engine.weapon5IsLocked = false;
Engine.wall3IsLocked = false;
Engine.wall4IsLocked = false;
Engine.wall5IsLocked = false;
};
if (Engine.dayNumber == 31){
Engine.nothingSpecial = true;
infoBox.visible = true;
infoBox.gotoAndPlay(2);
infoBox.continueBtn.buttonMode = true;
infoBox.continueBtn.addEventListener(MouseEvent.CLICK, continueBtnClick);
Engine.weapon6IsLocked = false;
Engine.weapon7IsLocked = false;
Engine.weapon8IsLocked = false;
Engine.weapon9IsLocked = false;
Engine.weapon10IsLocked = false;
Engine.wall6IsLocked = false;
Engine.wall7IsLocked = false;
Engine.wall8IsLocked = false;
};
if (Engine.nothingSpecial == false){
stage.removeChild(background);
myChannel.stop();
gotoAndPlay(5);
};
}
public function startBtn2Click(_arg1:MouseEvent):void{
var _local2:Sound;
_local2 = new Click1();
_local2.play();
startBtn2.removeEventListener(MouseEvent.CLICK, startBtn2Click);
gotoAndPlay(6);
}
public function fireWeapon2Bullet(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Bullet;
var _local9:Sound;
var _local10:Bullet;
var _local11:Sound;
_local2 = Math.random();
_local3 = Math.random();
_local4 = Math.round(((_local2 * 40) - 20));
_local5 = Math.round(((_local3 * 40) - 20));
_local6 = Math.round(((_local2 * 50) - 25));
_local7 = Math.round(((_local3 * 50) - 25));
if (Engine.currentWeapon == 4){
_local8 = new Bullet();
new Bullet().n = (_local8.n + _local4);
_local8.m = (_local8.m + _local5);
player.gotoAndPlay("fire");
addChild(_local8);
Engine.bullets.push(_local8);
Engine.weapon4Ammo = (Engine.weapon4Ammo + 1);
_local9 = new Shot3();
_local9.play();
};
if (Engine.currentWeapon == 5){
_local10 = new Bullet();
new Bullet().n = (_local10.n + _local4);
_local10.m = (_local10.m + _local5);
player.gotoAndPlay("fire");
addChild(_local10);
Engine.bullets.push(_local10);
Engine.weapon5Ammo = (Engine.weapon5Ammo + 1);
_local11 = new Shot5();
_local11.play();
};
}
public function wallU8Click(_arg1:MouseEvent):void{
if (!Engine.wall8IsOwned){
Engine.frameNumber = 20;
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.wall8Price;
playClick();
disableButtons();
};
}
public function weaponU9Click(_arg1:MouseEvent):void{
Engine.frameNumber = 9;
if (Engine.weapon9IsOwned){
Engine.itemClickedIsOwned = true;
refreshValues();
} else {
Engine.itemClickedIsOwned = false;
Engine.itemClickedPrice = Engine.weapon9Price;
};
playClick();
disableButtons();
}
public function refreshValues(){
if (Engine.frameNumber == 1){
if (Engine.weapon1Level == 1){
Engine.weapon1Attack = Engine.weapon1L1Attack;
Engine.weapon1ClipSize = Engine.weapon1L1ClipSize;
Engine.weapon1ReloadTime = Engine.weapon1L1ReloadTime;
Engine.weapon1UpgradePrice = Engine.weapon1L1UpgradePrice;
};
if (Engine.weapon1Level == 2){
Engine.weapon1Attack = Engine.weapon1L2Attack;
Engine.weapon1ClipSize = Engine.weapon1L2ClipSize;
Engine.weapon1ReloadTime = Engine.weapon1L2ReloadTime;
Engine.weapon1UpgradePrice = Engine.weapon1L2UpgradePrice;
};
if (Engine.weapon1Level == 3){
Engine.weapon1Attack = Engine.weapon1L3Attack;
Engine.weapon1ClipSize = Engine.weapon1L3ClipSize;
Engine.weapon1ReloadTime = Engine.weapon1L3ReloadTime;
Engine.weapon1UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon1Attack;
Engine.clipSizeU = Engine.weapon1ClipSize;
Engine.reloadTimeU = Engine.weapon1ReloadTime;
Engine.weaponLevelU = Engine.weapon1Level;
Engine.upgradePriceU = Engine.weapon1UpgradePrice;
};
if (Engine.frameNumber == 2){
if (Engine.weapon2Level == 1){
Engine.weapon2Attack = Engine.weapon2L1Attack;
Engine.weapon2ClipSize = Engine.weapon2L1ClipSize;
Engine.weapon2ReloadTime = Engine.weapon2L1ReloadTime;
Engine.weapon2UpgradePrice = Engine.weapon2L1UpgradePrice;
};
if (Engine.weapon2Level == 2){
Engine.weapon2Attack = Engine.weapon2L2Attack;
Engine.weapon2ClipSize = Engine.weapon2L2ClipSize;
Engine.weapon2ReloadTime = Engine.weapon2L2ReloadTime;
Engine.weapon2UpgradePrice = Engine.weapon2L2UpgradePrice;
};
if (Engine.weapon2Level == 3){
Engine.weapon2Attack = Engine.weapon2L3Attack;
Engine.weapon2ClipSize = Engine.weapon2L3ClipSize;
Engine.weapon2ReloadTime = Engine.weapon2L3ReloadTime;
Engine.weapon2UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon2Attack;
Engine.clipSizeU = Engine.weapon2ClipSize;
Engine.reloadTimeU = Engine.weapon2ReloadTime;
Engine.weaponLevelU = Engine.weapon2Level;
Engine.upgradePriceU = Engine.weapon2UpgradePrice;
};
if (Engine.frameNumber == 3){
if (Engine.weapon3Level == 1){
Engine.weapon3Attack = Engine.weapon3L1Attack;
Engine.weapon3ClipSize = Engine.weapon3L1ClipSize;
Engine.weapon3ReloadTime = Engine.weapon3L1ReloadTime;
Engine.weapon3UpgradePrice = Engine.weapon3L1UpgradePrice;
};
if (Engine.weapon3Level == 2){
Engine.weapon3Attack = Engine.weapon3L2Attack;
Engine.weapon3ClipSize = Engine.weapon3L2ClipSize;
Engine.weapon3ReloadTime = Engine.weapon3L2ReloadTime;
Engine.weapon3UpgradePrice = Engine.weapon3L2UpgradePrice;
};
if (Engine.weapon3Level == 3){
Engine.weapon3Attack = Engine.weapon3L3Attack;
Engine.weapon3ClipSize = Engine.weapon3L3ClipSize;
Engine.weapon3ReloadTime = Engine.weapon3L3ReloadTime;
Engine.weapon3UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon3Attack;
Engine.clipSizeU = Engine.weapon3ClipSize;
Engine.reloadTimeU = Engine.weapon3ReloadTime;
Engine.weaponLevelU = Engine.weapon3Level;
Engine.upgradePriceU = Engine.weapon3UpgradePrice;
};
if (Engine.frameNumber == 4){
if (Engine.weapon4Level == 1){
Engine.weapon4Attack = Engine.weapon4L1Attack;
Engine.weapon4ClipSize = Engine.weapon4L1ClipSize;
Engine.weapon4ReloadTime = Engine.weapon4L1ReloadTime;
Engine.weapon4UpgradePrice = Engine.weapon4L1UpgradePrice;
};
if (Engine.weapon4Level == 2){
Engine.weapon4Attack = Engine.weapon4L2Attack;
Engine.weapon4ClipSize = Engine.weapon4L2ClipSize;
Engine.weapon4ReloadTime = Engine.weapon4L2ReloadTime;
Engine.weapon4UpgradePrice = Engine.weapon4L2UpgradePrice;
};
if (Engine.weapon4Level == 3){
Engine.weapon4Attack = Engine.weapon4L3Attack;
Engine.weapon4ClipSize = Engine.weapon4L3ClipSize;
Engine.weapon4ReloadTime = Engine.weapon4L3ReloadTime;
Engine.weapon4UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon4Attack;
Engine.clipSizeU = Engine.weapon4ClipSize;
Engine.reloadTimeU = Engine.weapon4ReloadTime;
Engine.weaponLevelU = Engine.weapon4Level;
Engine.upgradePriceU = Engine.weapon4UpgradePrice;
};
if (Engine.frameNumber == 5){
if (Engine.weapon5Level == 1){
Engine.weapon5Attack = Engine.weapon5L1Attack;
Engine.weapon5ClipSize = Engine.weapon5L1ClipSize;
Engine.weapon5ReloadTime = Engine.weapon5L1ReloadTime;
Engine.weapon5UpgradePrice = Engine.weapon5L1UpgradePrice;
};
if (Engine.weapon5Level == 2){
Engine.weapon5Attack = Engine.weapon5L2Attack;
Engine.weapon5ClipSize = Engine.weapon5L2ClipSize;
Engine.weapon5ReloadTime = Engine.weapon5L2ReloadTime;
Engine.weapon5UpgradePrice = Engine.weapon5L2UpgradePrice;
};
if (Engine.weapon5Level == 3){
Engine.weapon5Attack = Engine.weapon5L3Attack;
Engine.weapon5ClipSize = Engine.weapon5L3ClipSize;
Engine.weapon5ReloadTime = Engine.weapon5L3ReloadTime;
Engine.weapon5UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon5Attack;
Engine.clipSizeU = Engine.weapon5ClipSize;
Engine.reloadTimeU = Engine.weapon5ReloadTime;
Engine.weaponLevelU = Engine.weapon5Level;
Engine.upgradePriceU = Engine.weapon5UpgradePrice;
};
if (Engine.frameNumber == 6){
if (Engine.weapon6Level == 1){
Engine.weapon6Attack = Engine.weapon6L1Attack;
Engine.weapon6ClipSize = Engine.weapon6L1ClipSize;
Engine.weapon6ReloadTime = Engine.weapon6L1ReloadTime;
Engine.weapon6UpgradePrice = Engine.weapon6L1UpgradePrice;
};
if (Engine.weapon6Level == 2){
Engine.weapon6Attack = Engine.weapon6L2Attack;
Engine.weapon6ClipSize = Engine.weapon6L2ClipSize;
Engine.weapon6ReloadTime = Engine.weapon6L2ReloadTime;
Engine.weapon6UpgradePrice = Engine.weapon6L2UpgradePrice;
};
if (Engine.weapon6Level == 3){
Engine.weapon6Attack = Engine.weapon6L3Attack;
Engine.weapon6ClipSize = Engine.weapon6L3ClipSize;
Engine.weapon6ReloadTime = Engine.weapon6L3ReloadTime;
Engine.weapon6UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon6Attack;
Engine.clipSizeU = Engine.weapon6ClipSize;
Engine.reloadTimeU = Engine.weapon6ReloadTime;
Engine.weaponLevelU = Engine.weapon6Level;
Engine.upgradePriceU = Engine.weapon6UpgradePrice;
};
if (Engine.frameNumber == 7){
if (Engine.weapon7Level == 1){
Engine.weapon7Attack = Engine.weapon7L1Attack;
Engine.weapon7ClipSize = Engine.weapon7L1ClipSize;
Engine.weapon7ReloadTime = Engine.weapon7L1ReloadTime;
Engine.weapon7UpgradePrice = Engine.weapon7L1UpgradePrice;
};
if (Engine.weapon7Level == 2){
Engine.weapon7Attack = Engine.weapon7L2Attack;
Engine.weapon7ClipSize = Engine.weapon7L2ClipSize;
Engine.weapon7ReloadTime = Engine.weapon7L2ReloadTime;
Engine.weapon7UpgradePrice = Engine.weapon7L2UpgradePrice;
};
if (Engine.weapon7Level == 3){
Engine.weapon7Attack = Engine.weapon7L3Attack;
Engine.weapon7ClipSize = Engine.weapon7L3ClipSize;
Engine.weapon7ReloadTime = Engine.weapon7L3ReloadTime;
Engine.weapon7UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon7Attack;
Engine.clipSizeU = Engine.weapon7ClipSize;
Engine.reloadTimeU = Engine.weapon7ReloadTime;
Engine.weaponLevelU = Engine.weapon7Level;
Engine.upgradePriceU = Engine.weapon7UpgradePrice;
};
if (Engine.frameNumber == 8){
if (Engine.weapon8Level == 1){
Engine.weapon8Attack = Engine.weapon8L1Attack;
Engine.weapon8ClipSize = Engine.weapon8L1ClipSize;
Engine.weapon8ReloadTime = Engine.weapon8L1ReloadTime;
Engine.weapon8UpgradePrice = Engine.weapon8L1UpgradePrice;
};
if (Engine.weapon8Level == 2){
Engine.weapon8Attack = Engine.weapon8L2Attack;
Engine.weapon8ClipSize = Engine.weapon8L2ClipSize;
Engine.weapon8ReloadTime = Engine.weapon8L2ReloadTime;
Engine.weapon8UpgradePrice = Engine.weapon8L2UpgradePrice;
};
if (Engine.weapon8Level == 3){
Engine.weapon8Attack = Engine.weapon8L3Attack;
Engine.weapon8ClipSize = Engine.weapon8L3ClipSize;
Engine.weapon8ReloadTime = Engine.weapon8L3ReloadTime;
Engine.weapon8UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon8Attack;
Engine.clipSizeU = Engine.weapon8ClipSize;
Engine.reloadTimeU = Engine.weapon8ReloadTime;
Engine.weaponLevelU = Engine.weapon8Level;
Engine.upgradePriceU = Engine.weapon8UpgradePrice;
};
if (Engine.frameNumber == 9){
if (Engine.weapon9Level == 1){
Engine.weapon9Attack = Engine.weapon9L1Attack;
Engine.weapon9ClipSize = Engine.weapon9L1ClipSize;
Engine.weapon9ReloadTime = Engine.weapon9L1ReloadTime;
Engine.weapon9UpgradePrice = Engine.weapon9L1UpgradePrice;
};
if (Engine.weapon9Level == 2){
Engine.weapon9Attack = Engine.weapon9L2Attack;
Engine.weapon9ClipSize = Engine.weapon9L2ClipSize;
Engine.weapon9ReloadTime = Engine.weapon9L2ReloadTime;
Engine.weapon9UpgradePrice = Engine.weapon9L2UpgradePrice;
};
if (Engine.weapon9Level == 3){
Engine.weapon9Attack = Engine.weapon9L3Attack;
Engine.weapon9ClipSize = Engine.weapon9L3ClipSize;
Engine.weapon9ReloadTime = Engine.weapon9L3ReloadTime;
Engine.weapon9UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon9Attack;
Engine.clipSizeU = Engine.weapon9ClipSize;
Engine.reloadTimeU = Engine.weapon9ReloadTime;
Engine.weaponLevelU = Engine.weapon9Level;
Engine.upgradePriceU = Engine.weapon9UpgradePrice;
};
if (Engine.frameNumber == 10){
if (Engine.weapon10Level == 1){
Engine.weapon10Attack = Engine.weapon10L1Attack;
Engine.weapon10ClipSize = Engine.weapon10L1ClipSize;
Engine.weapon10ReloadTime = Engine.weapon10L1ReloadTime;
Engine.weapon10UpgradePrice = Engine.weapon10L1UpgradePrice;
};
if (Engine.weapon10Level == 2){
Engine.weapon10Attack = Engine.weapon10L2Attack;
Engine.weapon10ClipSize = Engine.weapon10L2ClipSize;
Engine.weapon10ReloadTime = Engine.weapon10L2ReloadTime;
Engine.weapon10UpgradePrice = Engine.weapon10L2UpgradePrice;
};
if (Engine.weapon10Level == 3){
Engine.weapon10Attack = Engine.weapon10L3Attack;
Engine.weapon10ClipSize = Engine.weapon10L3ClipSize;
Engine.weapon10ReloadTime = Engine.weapon10L3ReloadTime;
Engine.weapon10UpgradePrice = 0;
};
Engine.weaponAttackU = Engine.weapon10Attack;
Engine.clipSizeU = Engine.weapon10ClipSize;
Engine.reloadTimeU = Engine.weapon10ReloadTime;
Engine.weaponLevelU = Engine.weapon10Level;
Engine.upgradePriceU = Engine.weapon10UpgradePrice;
};
}
public function gameOver():void{
Engine.gameOver = true;
Mouse.show();
crosshairs.visible = false;
enemyTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy);
enemy2Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy2);
enemy3Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy3);
enemy4Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy4);
enemy5Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployEnemy5);
fireWeapon1Timer.removeEventListener(TimerEvent.TIMER, fireWeapon1Bullet);
fireWeapon2Timer.removeEventListener(TimerEvent.TIMER, fireWeapon2Bullet);
fireWeapon3Timer.removeEventListener(TimerEvent.TIMER, fireWeapon3Bullet);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, fireWeapon3);
stage.removeEventListener(MouseEvent.MOUSE_UP, fireWeapon3Stop);
stage.removeEventListener(Event.ENTER_FRAME, loop);
stage.removeEventListener(MouseEvent.CLICK, fireWeapon);
sponsorBtn.removeEventListener(MouseEvent.CLICK, sponsorBtnClick);
stage.removeChild(repairZone1);
stage.removeChild(repairZone2);
stage.removeChild(repairZone3);
stage.removeChild(repairZone4);
stage.removeChild(background);
player.removeSelf();
myChannel.stop();
gotoAndPlay(7);
}
public function fireWeapon(_arg1:MouseEvent):void{
var _local2:Bullet;
var _local3:Sound;
var _local4:Bullet;
var _local5:Sound;
var _local6:Bullet;
var _local7:Sound;
var _local8:Bullet;
var _local9:Sound;
var _local10:Bullet;
var _local11:Sound;
var _local12:Bullet;
var _local13:Sound;
if ((((((Engine.currentWeapon == 1)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
player.gotoAndPlay("fire");
_local2 = new Bullet();
addChild(_local2);
Engine.weapon1Ammo = (Engine.weapon1Ammo + 1);
Engine.bullets.push(_local2);
_local3 = new Shot1();
_local3.play();
};
if ((((((Engine.currentWeapon == 2)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
player.gotoAndPlay("fire");
_local4 = new Bullet();
addChild(_local4);
Engine.bullets.push(_local4);
Engine.weapon2Ammo = (Engine.weapon2Ammo + 1);
_local5 = new Shotgun();
_local5.play();
};
if ((((((Engine.currentWeapon == 6)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
player.gotoAndPlay("fire");
_local6 = new Bullet();
addChild(_local6);
Engine.bullets.push(_local6);
Engine.weapon6Ammo = (Engine.weapon6Ammo + 1);
_local7 = new Shotgun2();
_local7.play();
};
if ((((((Engine.currentWeapon == 7)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
player.gotoAndPlay("fire");
_local8 = new Bullet();
addChild(_local8);
Engine.bullets.push(_local8);
Engine.weapon7Ammo = (Engine.weapon7Ammo + 1);
_local9 = new Deagle();
_local9.play();
};
if ((((((Engine.currentWeapon == 9)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
player.gotoAndPlay("fire");
_local10 = new Bullet();
addChild(_local10);
Engine.bullets.push(_local10);
Engine.weapon9Ammo = (Engine.weapon9Ammo + 1);
_local11 = new Zap1();
_local11.play();
};
if ((((((Engine.currentWeapon == 10)) && (!(Engine.isReloading)))) && ((mouseY > 40)))){
player.gotoAndPlay("fire");
_local12 = new Bullet();
addChild(_local12);
Engine.bullets.push(_local12);
Engine.weapon10Ammo = (Engine.weapon10Ammo + 1);
_local13 = new PlasmaCannon();
_local13.play();
};
}
public function enemySpawnSound(){
var _local1:Number;
var _local2:Number;
var _local3:Sound;
var _local4:Sound;
var _local5:Sound;
var _local6:Sound;
_local1 = Math.random();
_local2 = Math.round((_local1 * 3));
if (_local2 == 0){
_local3 = new Insect1();
_local3.play();
};
if (_local2 == 1){
_local4 = new Insect2();
_local4.play();
};
if (_local2 == 2){
_local5 = new Insect3();
_local5.play();
};
if (_local2 == 3){
_local6 = new Monster2();
_local6.play();
};
}
}
}//package stronghold_fla
Section 7
//Symbol41_41 (stronghold_fla.Symbol41_41)
package stronghold_fla {
import flash.display.*;
public dynamic class Symbol41_41 extends MovieClip {
public var selected:MovieClip;
public function Symbol41_41(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19);
}
function frame10(){
stop();
}
function frame14(){
stop();
}
function frame18(){
stop();
}
function frame12(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame19(){
stop();
}
function frame13(){
stop();
}
function frame17(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame16(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame11(){
stop();
}
}
}//package stronghold_fla
Section 8
//Symbol64_33 (stronghold_fla.Symbol64_33)
package stronghold_fla {
import flash.display.*;
public dynamic class Symbol64_33 extends MovieClip {
public var continueBtn:MovieClip;
public function Symbol64_33(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 9
//Symbol65_45 (stronghold_fla.Symbol65_45)
package stronghold_fla {
import flash.display.*;
public dynamic class Symbol65_45 extends MovieClip {
public function Symbol65_45(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 10
//Symbol68_36 (stronghold_fla.Symbol68_36)
package stronghold_fla {
import flash.display.*;
public dynamic class Symbol68_36 extends MovieClip {
public var inner:MovieClip;
public function Symbol68_36(){
addFrameScript(0, frame1, 50, frame51, 151, frame152);
}
function frame152(){
gotoAndPlay(1);
}
function frame1(){
stop();
}
function frame51(){
gotoAndPlay(1);
}
}
}//package stronghold_fla
Section 11
//Symbol74_63 (stronghold_fla.Symbol74_63)
package stronghold_fla {
import flash.display.*;
public dynamic class Symbol74_63 extends MovieClip {
public function Symbol74_63(){
addFrameScript(136, frame137);
}
function frame137(){
stop();
}
}
}//package stronghold_fla
Section 12
//Symbol78_59 (stronghold_fla.Symbol78_59)
package stronghold_fla {
import flash.display.*;
public dynamic class Symbol78_59 extends MovieClip {
public function Symbol78_59(){
addFrameScript(0, frame1, 94, frame95);
}
function frame95(){
stop();
}
function frame1(){
stop();
}
}
}//package stronghold_fla
Section 13
//Symbol80_61 (stronghold_fla.Symbol80_61)
package stronghold_fla {
import flash.display.*;
public dynamic class Symbol80_61 extends MovieClip {
public function Symbol80_61(){
addFrameScript(0, frame1, 94, frame95);
}
function frame95(){
stop();
}
function frame1(){
stop();
}
}
}//package stronghold_fla
Section 14
//weapon1_17 (stronghold_fla.weapon1_17)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon1_17 extends MovieClip {
public function weapon1_17(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 15
//weapon10_27 (stronghold_fla.weapon10_27)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon10_27 extends MovieClip {
public function weapon10_27(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 16
//weapon2_19 (stronghold_fla.weapon2_19)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon2_19 extends MovieClip {
public function weapon2_19(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 17
//weapon3_18 (stronghold_fla.weapon3_18)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon3_18 extends MovieClip {
public function weapon3_18(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 18
//weapon4_21 (stronghold_fla.weapon4_21)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon4_21 extends MovieClip {
public function weapon4_21(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 19
//weapon5_23 (stronghold_fla.weapon5_23)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon5_23 extends MovieClip {
public function weapon5_23(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 20
//weapon6_22 (stronghold_fla.weapon6_22)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon6_22 extends MovieClip {
public function weapon6_22(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 21
//weapon7_24 (stronghold_fla.weapon7_24)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon7_24 extends MovieClip {
public function weapon7_24(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 22
//weapon8_26 (stronghold_fla.weapon8_26)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon8_26 extends MovieClip {
public function weapon8_26(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 23
//weapon9_25 (stronghold_fla.weapon9_25)
package stronghold_fla {
import flash.display.*;
public dynamic class weapon9_25 extends MovieClip {
public function weapon9_25(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 24
//weaponInfo_20 (stronghold_fla.weaponInfo_20)
package stronghold_fla {
import flash.display.*;
public dynamic class weaponInfo_20 extends MovieClip {
public function weaponInfo_20(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package stronghold_fla
Section 25
//Background (Background)
package {
import flash.display.*;
public dynamic class Background extends MovieClip {
}
}//package
Section 26
//Blood (Blood)
package {
import flash.display.*;
import flash.events.*;
public class Blood extends MovieClip {
var m:Number;
var n:Number;
public function Blood(){
var _local1:Number;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
super();
scaleX = 0.3;
scaleY = 0.3;
_local1 = Math.atan2(n, m);
rotation = ((_local1 * 180) / Math.PI);
addEventListener(Event.ENTER_FRAME, loop);
}
private function loop(_arg1:Event):void{
if ((((((currentFrame == totalFrames)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 27
//BodyPart (BodyPart)
package {
import flash.display.*;
import flash.events.*;
public class BodyPart extends MovieClip {
private var friction:Number;
private var speed:Number;// = 10
private var c:Number;
private var f:Number;
private var b:Number;
private var d:Number;
private var m:Number;
private var a:Number;
private var n:Number;
private var e:Number;
private var style:Number;
private var clearTime:Number;// = 0
private var stopped:Boolean;// = false
public function BodyPart(){
stopped = false;
clearTime = 0;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
a = Math.random();
b = Math.random();
c = Math.round(((a * 500) - 250));
d = Math.round(((b * 500) - 250));
e = Math.round((a * 2));
f = Math.round(((a * 7) + 1));
friction = (1 + e);
speed = 10;
style = Math.round((a * 1));
super();
addFrameScript(7, frame8, 14, frame15, 20, frame21);
n = (n + c);
m = (m + d);
if (style == 1){
this.gotoAndPlay("style2");
};
addEventListener(Event.ENTER_FRAME, loop);
}
function frame8(){
stop();
}
function frame21(){
stop();
}
function frame15(){
stop();
}
private function loop(_arg1:Event):void{
var _local2:Number;
clearTime = (clearTime + 0.1);
if ((((((clearTime > 30)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
if ((((((currentFrame > 10)) || ((speed > 0)))) || (!(stopped)))){
speed = (speed - friction);
};
if (speed < 0){
stopped = true;
speed = 0;
};
_local2 = Math.atan2(n, m);
x = (x + (Math.cos(_local2) * speed));
y = (y + (Math.sin(_local2) * speed));
rotation = ((_local2 * 180) / Math.PI);
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 28
//BodyPart2 (BodyPart2)
package {
import flash.display.*;
import flash.events.*;
public class BodyPart2 extends MovieClip {
private var friction:Number;
private var speed:Number;// = 10
private var c:Number;
private var f:Number;
private var b:Number;
private var d:Number;
private var m:Number;
private var a:Number;
private var n:Number;
private var e:Number;
public var style:Number;// = 1
private var clearTime:Number;// = 0
private var stopped:Boolean;// = false
public function BodyPart2(){
stopped = false;
clearTime = 0;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
a = Math.random();
b = Math.random();
c = Math.round(((a * 500) - 250));
d = Math.round(((b * 500) - 250));
e = Math.round((a * 2));
f = Math.round(((a * 7) + 1));
friction = (1 + e);
speed = 10;
style = 1;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
n = (n + c);
m = (m + d);
addEventListener(Event.ENTER_FRAME, loop);
}
function frame4(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
private function loop(_arg1:Event):void{
var _local2:Number;
clearTime = (clearTime + 0.1);
this.gotoAndPlay(style);
if ((((((clearTime > 30)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
if ((((((currentFrame > 10)) || ((speed > 0)))) || (!(stopped)))){
speed = (speed - friction);
};
if (speed < 0){
stopped = true;
speed = 0;
};
_local2 = Math.atan2(n, m);
x = (x + (Math.cos(_local2) * speed));
y = (y + (Math.sin(_local2) * speed));
rotation = ((_local2 * 180) / Math.PI);
}
function frame2(){
stop();
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 29
//BodyPart4 (BodyPart4)
package {
import flash.display.*;
import flash.events.*;
public class BodyPart4 extends MovieClip {
private var friction:Number;
private var speed:Number;// = 10
private var c:Number;
private var f:Number;
private var b:Number;
private var d:Number;
private var m:Number;
private var a:Number;
private var n:Number;
private var e:Number;
public var style:Number;// = 1
private var clearTime:Number;// = 0
private var stopped:Boolean;// = false
public function BodyPart4(){
stopped = false;
clearTime = 0;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
a = Math.random();
b = Math.random();
c = Math.round(((a * 500) - 250));
d = Math.round(((b * 500) - 250));
e = Math.round((a * 2));
f = Math.round(((a * 7) + 1));
friction = (1 + e);
speed = 10;
style = 1;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
n = (n + c);
m = (m + d);
addEventListener(Event.ENTER_FRAME, loop);
}
function frame4(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
private function loop(_arg1:Event):void{
var _local2:Number;
clearTime = (clearTime + 0.1);
this.gotoAndPlay(style);
if ((((((clearTime > 30)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
if ((((((currentFrame > 10)) || ((speed > 0)))) || (!(stopped)))){
speed = (speed - friction);
};
if (speed < 0){
stopped = true;
speed = 0;
};
_local2 = Math.atan2(n, m);
x = (x + (Math.cos(_local2) * speed));
y = (y + (Math.sin(_local2) * speed));
rotation = ((_local2 * 180) / Math.PI);
}
function frame2(){
stop();
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 30
//BodyPart5 (BodyPart5)
package {
import flash.display.*;
import flash.events.*;
public class BodyPart5 extends MovieClip {
private var friction:Number;
private var speed:Number;// = 10
private var c:Number;
private var f:Number;
private var b:Number;
private var d:Number;
private var m:Number;
private var a:Number;
private var n:Number;
private var e:Number;
public var style:Number;// = 1
private var clearTime:Number;// = 0
private var stopped:Boolean;// = false
public function BodyPart5(){
stopped = false;
clearTime = 0;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
a = Math.random();
b = Math.random();
c = Math.round(((a * 500) - 250));
d = Math.round(((b * 500) - 250));
e = Math.round((a * 2));
f = Math.round(((a * 7) + 1));
friction = (1 + e);
speed = 10;
style = 1;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
n = (n + c);
m = (m + d);
addEventListener(Event.ENTER_FRAME, loop);
}
function frame4(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
private function loop(_arg1:Event):void{
var _local2:Number;
clearTime = (clearTime + 0.1);
this.gotoAndPlay(style);
if ((((((clearTime > 30)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
if ((((((currentFrame > 10)) || ((speed > 0)))) || (!(stopped)))){
speed = (speed - friction);
};
if (speed < 0){
stopped = true;
speed = 0;
};
_local2 = Math.atan2(n, m);
x = (x + (Math.cos(_local2) * speed));
y = (y + (Math.sin(_local2) * speed));
rotation = ((_local2 * 180) / Math.PI);
}
function frame2(){
stop();
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 31
//Bullet (Bullet)
package {
import flash.display.*;
import flash.events.*;
public class Bullet extends MovieClip {
private var speed:Number;// = 35
public var m:Number;
public var n:Number;
public function Bullet(){
var _local1:Number;
var _local2:Number;
speed = 35;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
if (Engine.currentWeapon == 1){
this.gotoAndPlay(5);
};
if ((((Engine.currentWeapon == 2)) || ((Engine.currentWeapon == 6)))){
_local1 = Math.random();
_local2 = Math.round((_local1 * 2));
if (_local2 == 0){
this.gotoAndPlay(2);
};
if (_local2 == 1){
this.gotoAndPlay(3);
};
if (_local2 == 2){
this.gotoAndPlay(4);
};
};
if (Engine.currentWeapon == 3){
this.gotoAndPlay(1);
};
if (Engine.currentWeapon == 4){
this.gotoAndPlay(5);
};
if (Engine.currentWeapon == 5){
this.gotoAndPlay(5);
};
if (Engine.currentWeapon == 7){
this.gotoAndPlay(1);
};
if (Engine.currentWeapon == 8){
this.gotoAndPlay(7);
};
if ((((Engine.currentWeapon == 9)) || ((Engine.currentWeapon == 10)))){
this.gotoAndPlay(6);
};
this.x = Engine.playerX;
this.y = Engine.playerY;
addEventListener(Event.ENTER_FRAME, loop);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
private function loop(_arg1:Event):void{
var _local2:Number;
_local2 = Math.atan2(n, m);
x = (x + (Math.cos(_local2) * speed));
y = (y + (Math.sin(_local2) * speed));
rotation = ((_local2 * 180) / Math.PI);
if ((((((((((((this.y > 700)) || ((this.x < 0)))) || ((this.x > 700)))) || ((this.y < 40)))) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
public function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
Engine.bullets.splice(this, 1);
parent.removeChild(this);
}
}
}//package
Section 32
//BulletCostume (BulletCostume)
package {
import flash.display.*;
public dynamic class BulletCostume extends MovieClip {
}
}//package
Section 33
//Click1 (Click1)
package {
import flash.media.*;
public dynamic class Click1 extends Sound {
}
}//package
Section 34
//Coins (Coins)
package {
import flash.media.*;
public dynamic class Coins extends Sound {
}
}//package
Section 35
//Creature (Creature)
package {
import flash.media.*;
public dynamic class Creature extends Sound {
}
}//package
Section 36
//CreatureDie1 (CreatureDie1)
package {
import flash.media.*;
public dynamic class CreatureDie1 extends Sound {
}
}//package
Section 37
//CreatureDie2 (CreatureDie2)
package {
import flash.media.*;
public dynamic class CreatureDie2 extends Sound {
}
}//package
Section 38
//CreatureDie3 (CreatureDie3)
package {
import flash.media.*;
public dynamic class CreatureDie3 extends Sound {
}
}//package
Section 39
//CreatureDie4 (CreatureDie4)
package {
import flash.media.*;
public dynamic class CreatureDie4 extends Sound {
}
}//package
Section 40
//CreatureDie5 (CreatureDie5)
package {
import flash.media.*;
public dynamic class CreatureDie5 extends Sound {
}
}//package
Section 41
//CreatureDie6 (CreatureDie6)
package {
import flash.media.*;
public dynamic class CreatureDie6 extends Sound {
}
}//package
Section 42
//CreatureSpawn1 (CreatureSpawn1)
package {
import flash.media.*;
public dynamic class CreatureSpawn1 extends Sound {
}
}//package
Section 43
//DamageBar (DamageBar)
package {
import flash.display.*;
public dynamic class DamageBar extends MovieClip {
}
}//package
Section 44
//DeadBody (DeadBody)
package {
import flash.display.*;
import flash.events.*;
public class DeadBody extends MovieClip {
var m:Number;
var n:Number;
public function DeadBody(){
var _local1:Number;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
super();
addEventListener(Event.ENTER_FRAME, loop);
scaleX = -1;
_local1 = Math.atan2(n, m);
rotation = ((_local1 * 180) / Math.PI);
}
private function loop(_arg1:Event):void{
if ((((((currentFrame == totalFrames)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 45
//DeadBody2 (DeadBody2)
package {
import flash.display.*;
import flash.events.*;
public class DeadBody2 extends MovieClip {
var m:Number;
var n:Number;
public function DeadBody2(){
var _local1:Number;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
super();
addEventListener(Event.ENTER_FRAME, loop);
scaleX = 1.2;
scaleY = 1.2;
_local1 = Math.atan2(n, m);
rotation = ((_local1 * 180) / Math.PI);
}
private function loop(_arg1:Event):void{
if ((((((currentFrame == totalFrames)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 46
//DeadBody4 (DeadBody4)
package {
import flash.display.*;
import flash.events.*;
public class DeadBody4 extends MovieClip {
var m:Number;
var n:Number;
public function DeadBody4(){
var _local1:Number;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
super();
addEventListener(Event.ENTER_FRAME, loop);
scaleX = -1;
_local1 = Math.atan2(n, m);
rotation = ((_local1 * 180) / Math.PI);
}
private function loop(_arg1:Event):void{
if ((((((currentFrame == totalFrames)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 47
//Deagle (Deagle)
package {
import flash.media.*;
public dynamic class Deagle extends Sound {
}
}//package
Section 48
//Enemy (Enemy)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class Enemy extends MovieClip {
private var randomNumber:Number;
public var life:Number;
private var entryX:Number;
private var entryY:Number;
private var number:Number;
public var speed:Number;// = 0
private var maxspeed:Number;
private var g:Number;
private var acceleration:Number;// = 0.2
private var attacking:Boolean;// = false
private var stageRef:Stage;
private var vx:Number;// = 0
private var vy:Number;// = 0
public function Enemy(){
speed = 0;
life = Engine.enemyLife;
entryX = Engine.entryX;
entryY = Engine.entryY;
acceleration = 0.2;
vx = 0;
vy = 0;
maxspeed = Engine.enemySpeed;
g = Engine.enemyAttack;
attacking = false;
randomNumber = Math.random();
number = Math.round((randomNumber * 1));
super();
addFrameScript(14, frame15, 21, frame22);
visible = false;
addEventListener(Event.ENTER_FRAME, loop);
}
public function removeSelf():void{
var _local1:Sound;
var _local2:Sound;
if (!Engine.gameOver){
addGuts();
addGuts();
addGuts();
addBodyPart();
addBodyPart();
addBodyPart();
addBodyPart();
Engine.enemiesSlain = (Engine.enemiesSlain + 1);
Engine.money = (Engine.money + 15);
_local1 = new Splat2();
_local1.play();
_local2 = new Splat1();
_local2.play();
};
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
private function addGuts(){
var _local1:Guts;
_local1 = new Guts();
stage.addChildAt(_local1, 3);
_local1.x = this.x;
_local1.y = this.y;
}
private function attack(){
if (!attacking){
gotoAndPlay("attack");
attacking = true;
};
if (currentFrame == totalFrames){
attacking = false;
};
}
function frame15(){
gotoAndPlay(1);
}
function frame22(){
gotoAndPlay(1);
}
private function addBodyPart(){
var _local1:BodyPart;
_local1 = new BodyPart();
stage.addChildAt(_local1, 3);
_local1.x = this.x;
_local1.y = this.y;
}
public function loop(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Sound;
if (((Engine.gameOver) || (Engine.dayOver))){
removeSelf();
};
if (y > 40){
visible = true;
};
_local2 = (entryY - y);
_local3 = (entryX - x);
_local4 = Math.atan2(_local2, _local3);
x = (x + (Math.cos(_local4) * speed));
y = (y + (Math.sin(_local4) * speed));
rotation = ((_local4 * 180) / Math.PI);
speed = (speed + acceleration);
if (speed > maxspeed){
speed = maxspeed;
};
if (hitTestObject(MovieClip(root).wall1)){
if (Engine.wall1Life > 0){
Engine.wall1Life = (Engine.wall1Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall2)){
if (Engine.wall2Life > 0){
Engine.wall2Life = (Engine.wall2Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall3)){
if (Engine.wall3Life > 0){
Engine.wall3Life = (Engine.wall3Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall4)){
if (Engine.wall4Life > 0){
Engine.wall4Life = (Engine.wall4Life - g);
maxspeed = 0;
attack();
};
};
_local5 = 0;
while (_local5 < Engine.bullets.length) {
_local6 = Engine.bullets[_local5];
if (hitTestObject(_local6)){
if (life > 0){
_local7 = new Splat1();
_local7.play();
speed = 0;
life = (life - Engine.playerAttack);
this.gotoAndPlay("hit");
addGuts();
_local6.removeSelf();
attacking = false;
} else {
removeSelf();
};
};
_local5++;
};
}
}
}//package
Section 49
//Enemy2 (Enemy2)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class Enemy2 extends MovieClip {
private var randomNumber:Number;
public var life:Number;
private var entryX:Number;
private var entryY:Number;
private var number:Number;
public var speed:Number;// = 0
private var maxspeed:Number;
private var g:Number;
private var acceleration:Number;// = 0.2
private var attacking:Boolean;// = false
private var stageRef:Stage;
private var vx:Number;// = 0
private var vy:Number;// = 0
public function Enemy2(){
speed = 0;
life = Engine.enemy2Life;
entryX = Engine.entry2X;
entryY = Engine.entry2Y;
acceleration = 0.2;
vx = 0;
vy = 0;
maxspeed = Engine.enemy2Speed;
g = Engine.enemy2Attack;
attacking = false;
randomNumber = Math.random();
number = Math.round((randomNumber * 1));
super();
addFrameScript(16, frame17, 25, frame26);
visible = false;
addEventListener(Event.ENTER_FRAME, loop);
}
public function removeSelf():void{
var _local1:Sound;
var _local2:Sound;
if (!Engine.gameOver){
addGuts();
addGuts();
addGuts();
addBodyPart();
Engine.enemiesSlain = (Engine.enemiesSlain + 1);
Engine.money = (Engine.money + 22);
_local1 = new Splat2();
_local1.play();
_local2 = new Splat1();
_local2.play();
};
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
private function addGuts(){
var _local1:Guts;
_local1 = new Guts();
stage.addChildAt(_local1, 3);
_local1.x = this.x;
_local1.y = this.y;
}
private function attack(){
if (!attacking){
gotoAndPlay("attack");
attacking = true;
};
if (currentFrame == totalFrames){
attacking = false;
};
}
function frame17(){
gotoAndPlay(1);
}
function frame26(){
gotoAndPlay(1);
}
private function addBodyPart(){
var _local1:BodyPart2;
var _local2:BodyPart2;
var _local3:BodyPart2;
var _local4:BodyPart2;
var _local5:BodyPart2;
_local1 = new BodyPart2();
_local2 = new BodyPart2();
_local3 = new BodyPart2();
_local4 = new BodyPart2();
_local5 = new BodyPart2();
_local1.style = 1;
_local2.style = 2;
_local3.style = 3;
_local4.style = 4;
_local5.style = 5;
stage.addChildAt(_local1, 3);
stage.addChildAt(_local2, 3);
stage.addChildAt(_local3, 3);
stage.addChildAt(_local4, 3);
stage.addChildAt(_local5, 3);
_local1.x = this.x;
_local1.y = this.y;
_local2.x = this.x;
_local2.y = this.y;
_local3.x = this.x;
_local3.y = this.y;
_local4.x = this.x;
_local4.y = this.y;
_local5.x = this.x;
_local5.y = this.y;
}
public function loop(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Sound;
if (((Engine.gameOver) || (Engine.dayOver))){
removeSelf();
};
if (y > 40){
visible = true;
};
_local2 = (entryY - y);
_local3 = (entryX - x);
_local4 = Math.atan2(_local2, _local3);
x = (x + (Math.cos(_local4) * speed));
y = (y + (Math.sin(_local4) * speed));
rotation = ((_local4 * 180) / Math.PI);
speed = (speed + acceleration);
if (speed > maxspeed){
speed = maxspeed;
};
if (hitTestObject(MovieClip(root).wall1)){
if (Engine.wall1Life > 0){
Engine.wall1Life = (Engine.wall1Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall2)){
if (Engine.wall2Life > 0){
Engine.wall2Life = (Engine.wall2Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall3)){
if (Engine.wall3Life > 0){
Engine.wall3Life = (Engine.wall3Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall4)){
if (Engine.wall4Life > 0){
Engine.wall4Life = (Engine.wall4Life - g);
maxspeed = 0;
attack();
};
};
_local5 = 0;
while (_local5 < Engine.bullets.length) {
_local6 = Engine.bullets[_local5];
if (hitTestObject(_local6)){
if (life > 0){
_local6.removeSelf();
addGuts();
_local7 = new Splat1();
_local7.play();
speed = 0;
life = (life - Engine.playerAttack);
this.gotoAndPlay("hit");
attacking = false;
} else {
removeSelf();
};
};
_local5++;
};
}
}
}//package
Section 50
//Enemy3 (Enemy3)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class Enemy3 extends MovieClip {
private var randomNumber:Number;
public var life:Number;
public var position:Number;// = 0
public var entryX:Number;// = 0
public var entryY:Number;// = 0
private var range:Number;// = 120
private var number:Number;
public var speed:Number;// = 0
private var maxspeed:Number;
private var shootTimer:Timer;
private var g:Number;
private var acceleration:Number;// = 0.2
private var stageRef:Stage;
private var vx:Number;// = 0
private var vy:Number;// = 0
public function Enemy3(){
acceleration = 0.2;
vx = 0;
vy = 0;
maxspeed = Engine.enemy3Speed;
g = Engine.enemy3Attack;
range = 120;
speed = 0;
life = Engine.enemy3Life;
entryX = 0;
entryY = 0;
position = 0;
randomNumber = Math.random();
number = Math.round((randomNumber * 1));
shootTimer = new Timer(1000, 2);
super();
addFrameScript(14, frame15, 21, frame22);
visible = false;
addEventListener(Event.ENTER_FRAME, loop);
shootTimer.addEventListener(TimerEvent.TIMER_COMPLETE, deployBullet, false, 0, true);
}
public function removeSelf():void{
var _local1:DeadBody;
var _local2:Sound;
if (!Engine.gameOver){
MovieClip(root).enemyDieSound();
shootTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, deployBullet);
_local1 = new DeadBody();
stage.addChild(_local1);
_local1.x = this.x;
_local1.y = this.y;
addGuts();
addGuts();
addGuts();
Engine.enemiesSlain = (Engine.enemiesSlain + 1);
Engine.money = (Engine.money + 15);
_local2 = new Splat2();
_local2.play();
};
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
private function addGuts(){
var _local1:Guts;
_local1 = new Guts();
stage.addChildAt(_local1, 3);
_local1.x = this.x;
_local1.y = this.y;
}
function frame15(){
gotoAndPlay(1);
}
function frame22(){
gotoAndPlay(1);
}
public function loop(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Sound;
if (((Engine.gameOver) || (Engine.dayOver))){
removeSelf();
};
if (y > 40){
visible = true;
};
if (position == 1){
if ((MovieClip(root).repairZone1.y - this.y) < range){
speed = 0;
gotoAndStop("idle");
shootTimer.start();
};
};
if (position == 2){
if ((this.y - MovieClip(root).repairZone2.y) < range){
speed = 0;
gotoAndStop("idle");
shootTimer.start();
};
};
if (position == 3){
if ((this.y - MovieClip(root).repairZone3.y) < range){
speed = 0;
gotoAndStop("idle");
shootTimer.start();
};
};
if (position == 4){
if ((MovieClip(root).repairZone4.x - this.x) < range){
speed = 0;
gotoAndStop("idle");
shootTimer.start();
};
};
_local2 = (entryY - y);
_local3 = (entryX - x);
_local4 = Math.atan2(_local2, _local3);
x = (x + (Math.cos(_local4) * speed));
y = (y + (Math.sin(_local4) * speed));
rotation = ((_local4 * 180) / Math.PI);
speed = (speed + acceleration);
if (speed > maxspeed){
speed = maxspeed;
};
_local5 = 0;
while (_local5 < Engine.bullets.length) {
_local6 = Engine.bullets[_local5];
if (hitTestObject(_local6)){
if (life > 0){
_local6.removeSelf();
addGuts();
_local7 = new Splat1();
_local7.play();
speed = 0;
life = (life - Engine.playerAttack);
this.gotoAndPlay("hit");
} else {
removeSelf();
};
};
_local5++;
};
}
function deployBullet(_arg1:TimerEvent):void{
var _local2:EnemyBullet;
_local2 = new EnemyBullet();
stage.addChild(_local2);
_local2.x = this.x;
_local2.y = this.y;
_local2.targetX = entryX;
_local2.targetY = entryY;
_local2.posX = this.x;
_local2.posY = this.y;
}
}
}//package
Section 51
//Enemy4 (Enemy4)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class Enemy4 extends MovieClip {
private var randomNumber:Number;
public var life:Number;
private var entryX:Number;
private var entryY:Number;
private var number:Number;
public var speed:Number;// = 0
private var maxspeed:Number;
private var g:Number;
private var acceleration:Number;// = 0.2
private var attacking:Boolean;// = false
private var stageRef:Stage;
private var vx:Number;// = 0
private var vy:Number;// = 0
public function Enemy4(){
speed = 0;
life = Engine.enemy4Life;
entryX = Engine.entryX;
entryY = Engine.entryY;
acceleration = 0.2;
vx = 0;
vy = 0;
maxspeed = Engine.enemy4Speed;
g = Engine.enemy4Attack;
attacking = false;
randomNumber = Math.random();
number = Math.round((randomNumber * 1));
super();
addFrameScript(14, frame15, 23, frame24);
visible = false;
addEventListener(Event.ENTER_FRAME, loop);
}
public function removeSelf():void{
var _local1:Sound;
if (!Engine.gameOver){
MovieClip(root).enemyDieSound();
addGuts();
addGuts();
addGuts();
addBodyPart();
Engine.enemiesSlain = (Engine.enemiesSlain + 1);
Engine.money = (Engine.money + 23);
_local1 = new Splat2();
_local1.play();
};
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
private function addGuts(){
var _local1:Guts;
_local1 = new Guts();
stage.addChildAt(_local1, 3);
_local1.x = this.x;
_local1.y = this.y;
}
private function attack(){
if (!attacking){
gotoAndPlay("attack");
attacking = true;
};
if (currentFrame == totalFrames){
attacking = false;
};
}
function frame15(){
gotoAndPlay(1);
}
function frame24(){
gotoAndPlay(1);
}
private function addBodyPart(){
var _local1:BodyPart4;
var _local2:BodyPart4;
var _local3:BodyPart4;
var _local4:BodyPart4;
var _local5:BodyPart4;
_local1 = new BodyPart4();
_local2 = new BodyPart4();
_local3 = new BodyPart4();
_local4 = new BodyPart4();
_local5 = new BodyPart4();
_local1.style = 1;
_local2.style = 2;
_local3.style = 3;
_local4.style = 4;
_local5.style = 5;
stage.addChildAt(_local1, 3);
stage.addChildAt(_local2, 3);
stage.addChildAt(_local3, 3);
stage.addChildAt(_local4, 3);
stage.addChildAt(_local5, 3);
_local1.x = this.x;
_local1.y = this.y;
_local2.x = this.x;
_local2.y = this.y;
_local3.x = this.x;
_local3.y = this.y;
_local4.x = this.x;
_local4.y = this.y;
_local5.x = this.x;
_local5.y = this.y;
}
public function loop(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Sound;
if (((Engine.gameOver) || (Engine.dayOver))){
removeSelf();
};
if (y > 40){
visible = true;
};
_local2 = (entryY - y);
_local3 = (entryX - x);
_local4 = Math.atan2(_local2, _local3);
x = (x + (Math.cos(_local4) * speed));
y = (y + (Math.sin(_local4) * speed));
rotation = ((_local4 * 180) / Math.PI);
speed = (speed + acceleration);
if (speed > maxspeed){
speed = maxspeed;
};
if (hitTestObject(MovieClip(root).wall1)){
if (Engine.wall1Life > 0){
Engine.wall1Life = (Engine.wall1Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall2)){
if (Engine.wall2Life > 0){
Engine.wall2Life = (Engine.wall2Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall3)){
if (Engine.wall3Life > 0){
Engine.wall3Life = (Engine.wall3Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall4)){
if (Engine.wall4Life > 0){
Engine.wall4Life = (Engine.wall4Life - g);
maxspeed = 0;
attack();
};
};
_local5 = 0;
while (_local5 < Engine.bullets.length) {
_local6 = Engine.bullets[_local5];
if (hitTestObject(_local6)){
if (life > 0){
_local6.removeSelf();
addGuts();
_local7 = new Splat1();
_local7.play();
speed = 0;
life = (life - Engine.playerAttack);
this.gotoAndPlay("hit");
attacking = false;
} else {
removeSelf();
};
};
_local5++;
};
}
}
}//package
Section 52
//Enemy5 (Enemy5)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class Enemy5 extends MovieClip {
private var randomNumber:Number;
public var life:Number;
private var entryX:Number;
private var entryY:Number;
private var number:Number;
public var speed:Number;// = 0
private var maxspeed:Number;
private var g:Number;
private var acceleration:Number;// = 0.2
private var attacking:Boolean;// = false
private var stageRef:Stage;
private var vx:Number;// = 0
private var vy:Number;// = 0
public function Enemy5(){
speed = 0;
life = Engine.enemy5Life;
entryX = Engine.entryX;
entryY = Engine.entryY;
acceleration = 0.2;
vx = 0;
vy = 0;
maxspeed = Engine.enemy5Speed;
g = Engine.enemy5Attack;
attacking = false;
randomNumber = Math.random();
number = Math.round((randomNumber * 1));
super();
addFrameScript(28, frame29, 42, frame43);
visible = false;
addEventListener(Event.ENTER_FRAME, loop);
}
public function removeSelf():void{
var _local1:Sound;
var _local2:Sound;
if (!Engine.gameOver){
addGuts();
addGuts();
addGuts();
addBodyPart();
Engine.enemiesSlain = (Engine.enemiesSlain + 1);
Engine.money = (Engine.money + 25);
_local1 = new Splat2();
_local1.play();
_local2 = new Splat1();
_local2.play();
};
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
private function addGuts(){
var _local1:Guts;
_local1 = new Guts();
stage.addChildAt(_local1, 3);
_local1.x = this.x;
_local1.y = this.y;
}
private function attack(){
if (!attacking){
gotoAndPlay("attack");
attacking = true;
};
if (currentFrame == totalFrames){
attacking = false;
};
}
function frame29(){
gotoAndPlay(1);
}
private function addBodyPart(){
var _local1:BodyPart5;
var _local2:BodyPart5;
var _local3:BodyPart5;
var _local4:BodyPart5;
var _local5:BodyPart5;
_local1 = new BodyPart5();
_local2 = new BodyPart5();
_local3 = new BodyPart5();
_local4 = new BodyPart5();
_local5 = new BodyPart5();
_local1.style = 1;
_local2.style = 2;
_local3.style = 3;
_local4.style = 4;
_local5.style = 5;
stage.addChildAt(_local1, 3);
stage.addChildAt(_local2, 3);
stage.addChildAt(_local3, 3);
stage.addChildAt(_local4, 3);
stage.addChildAt(_local5, 3);
_local1.x = this.x;
_local1.y = this.y;
_local2.x = this.x;
_local2.y = this.y;
_local3.x = this.x;
_local3.y = this.y;
_local4.x = this.x;
_local4.y = this.y;
_local5.x = this.x;
_local5.y = this.y;
}
function frame43(){
gotoAndPlay(1);
}
public function loop(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Sound;
if (((Engine.gameOver) || (Engine.dayOver))){
removeSelf();
};
if (y > 40){
visible = true;
};
_local2 = (entryY - y);
_local3 = (entryX - x);
_local4 = Math.atan2(_local2, _local3);
x = (x + (Math.cos(_local4) * speed));
y = (y + (Math.sin(_local4) * speed));
rotation = ((_local4 * 180) / Math.PI);
speed = (speed + acceleration);
if (speed > maxspeed){
speed = maxspeed;
};
if (hitTestObject(MovieClip(root).wall1)){
if (Engine.wall1Life > 0){
Engine.wall1Life = (Engine.wall1Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall2)){
if (Engine.wall2Life > 0){
Engine.wall2Life = (Engine.wall2Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall3)){
if (Engine.wall3Life > 0){
Engine.wall3Life = (Engine.wall3Life - g);
maxspeed = 0;
attack();
};
};
if (hitTestObject(MovieClip(root).wall4)){
if (Engine.wall4Life > 0){
Engine.wall4Life = (Engine.wall4Life - g);
maxspeed = 0;
attack();
};
};
_local5 = 0;
while (_local5 < Engine.bullets.length) {
_local6 = Engine.bullets[_local5];
if (hitTestObject(_local6)){
if (life > 0){
_local7 = new Splat1();
_local7.play();
speed = 0;
life = (life - Engine.playerAttack);
this.gotoAndPlay("hit");
addGuts();
_local6.removeSelf();
attacking = false;
} else {
removeSelf();
};
};
_local5++;
};
}
}
}//package
Section 53
//EnemyBullet (EnemyBullet)
package {
import flash.display.*;
import flash.events.*;
public class EnemyBullet extends MovieClip {
private var speed:Number;// = 5
private var m:Number;// = 0
private var n:Number;// = 0
public var posX:Number;// = 0
public var posY:Number;// = 0
public var targetY:Number;// = 0
public var targetX:Number;// = 0
public function EnemyBullet(){
speed = 5;
targetX = 0;
targetY = 0;
posX = 0;
posY = 0;
m = 0;
n = 0;
super();
addEventListener(Event.ENTER_FRAME, loop);
}
private function loop(_arg1:Event):void{
var _local2:Trail;
var _local3:Number;
_local2 = new Trail();
stage.addChild(_local2);
_local2.x = this.x;
_local2.y = this.y;
m = (targetX - posX);
n = (targetY - posY);
_local3 = Math.atan2(n, m);
this.x = (this.x + (Math.cos(_local3) * speed));
this.y = (this.y + (Math.sin(_local3) * speed));
rotation = ((_local3 * 180) / Math.PI);
if ((((targetX > posX)) && ((this.x > (targetX + 8))))){
Engine.wall4Life = (Engine.wall4Life - Engine.enemy3Attack);
removeSelf();
};
if ((((targetX < posX)) && ((this.x < (targetX - 5))))){
Engine.wall2Life = (Engine.wall2Life - Engine.enemy3Attack);
removeSelf();
};
if ((((targetY > posY)) && ((this.y > (targetY + 5))))){
Engine.wall1Life = (Engine.wall1Life - Engine.enemy3Attack);
removeSelf();
};
if ((((targetY < posY)) && ((this.y < (targetY - 5))))){
Engine.wall3Life = (Engine.wall3Life - Engine.enemy3Attack);
removeSelf();
};
if ((((((((((((this.y > 700)) || ((this.x < 0)))) || ((this.x > 700)))) || ((this.y < 0)))) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
public function removeSelf():void{
var _local1:Explosion;
removeEventListener(Event.ENTER_FRAME, loop);
_local1 = new Explosion();
stage.addChild(_local1);
_local1.x = this.x;
_local1.y = this.y;
parent.removeChild(this);
}
}
}//package
Section 54
//Engine (Engine)
package {
import flash.display.*;
public class Engine extends MovieClip {
public static var weapon7ReloadTime:Number = weapon7L1ReloadTime;
public static var weapon5Ammo:Number = 0;
public static var enemiesDeployed:Number = 0;
public static var wall8IsOwned:Boolean = false;
public static var wall6HitPoints:Number = 2000;
public static var itemClickedPrice:Number = 0;
public static var weapon2L3ClipSize:Number = 4;
public static var weapon10L1ReloadTime:Number = 1.5;
public static var weapon6L2ClipSize:Number = 5;
public static var weapon1L2ReloadTime:Number = 1.5;
public static var wallType:Number = 1;
public static var weapon1ClipSize:Number = weapon1L1ClipSize;
public static var weapon4L3Attack:Number = 3.8;
public static var weapon9L2ReloadTime:Number = 1.2;
public static var weapon8L3Attack:Number = 7;
public static var nothingSpecial:Boolean = false;
public static var weapon3Level:Number = 1;
public static var weapon9ClipSize:Number = weapon9L1ClipSize;
public static var weapon2L2UpgradePrice:Number = 375;
public static var weapon5ClipSize:Number = weapon5L1ClipSize;
public static var originalRepairSkill:Number = 2;
public static var weapon1Attack:Number = weapon1L1Attack;
public static var weapon1IsOwned:Boolean = true;
public static var weapon8UpgradePrice:Number = weapon8L1UpgradePrice;
public static var weapon5L3ClipSize:Number = 24;
public static var weapon9L2ClipSize:Number = 13;
public static var wall5Price:Number = 1150;
public static var weapon8L3ReloadTime:Number = 1;
public static var weapon5L1UpgradePrice:Number = 189;
public static var weapon7L1ReloadTime:Number = 1.7;
public static var weapon7Price:Number = 1600;
public static var weapon6Attack:Number = weapon6L1Attack;
public static var weapon4Ammo:Number = 0;
public static var playerAttack:Number = 0;
public static var weapon10L1UpgradePrice:Number = 249;
public static var weapon6IsLocked:Boolean = true;
public static var wall4IsOwned:Boolean = false;
public static var weapon8L3ClipSize:Number = 24;
public static var enemy2Attack:Number = 1;
public static var wall2IsLocked:Boolean = false;
public static var wall6IsLocked:Boolean = true;
public static var weapon6IsOwned:Boolean = false;
public static var weapon2IsLocked:Boolean = false;
public static var weapon6L2ReloadTime:Number = 1.42;
public static var weapon4L2UpgradePrice:Number = 287;
public static var wall3HitPoints:Number = 1200;
public static var weapon1L1Attack:Number = 4;
public static var weapon5L1Attack:Number = 3.4;
public static var weapon9L1Attack:Number = 7;
public static var enemy2Speed:Number = 1.2;
public static var money:Number = 0;
public static var weapon5UpgradePrice:Number = weapon5L1UpgradePrice;
public static var weapon4Level:Number = 1;
public static var weapon3L1ClipSize:Number = 15;
public static var weapon10L3Attack:Number = 12;
public static var weapon10Price:Number = 2200;
public static var weapon4L1ReloadTime:Number = 1.75;
public static var weapon5L3ReloadTime:Number = 1.1;
public static var weapon4L2Attack:Number = 3.5;
public static var weapon8L2Attack:Number = 6.5;
public static var weapon7L1UpgradePrice:Number = 236;
public static var currentWeapon:Number = 1;
public static var wall6Price:Number = 1230;
public static var weapon3Ammo:Number = 0;
public static var weapon8Price:Number = 1800;
public static var reloadTimeU:Number = 0;
public static var weapon6L1ClipSize:Number = 4;
public static var weapon3ReloadTime:Number = weapon3L1ReloadTime;
public static var wall4LifeTotal:Number = 800;
public static var weapon3L2ReloadTime:Number = 1.8;
public static var weapon2IsOwned:Boolean = false;
public static var weapon3L3Attack:Number = 6;
public static var weapon7L3Attack:Number = 11;
public static var weapon8ClipSize:Number = weapon8L1ClipSize;
public static var weapon2L2ClipSize:Number = 3;
public static var wall7HitPoints:Number = 2200;
public static var weapon4ClipSize:Number = weapon4L1ClipSize;
public static var weapon2UpgradePrice:Number = weapon2L1UpgradePrice;
public static var weapon6L2UpgradePrice:Number = 323;
public static var weapon6ReloadTime:Number = weapon6L1ReloadTime;
public static var weapon1L3ClipSize:Number = 12;
public static var weapon5Attack:Number = weapon5L1Attack;
public static var weaponAttackU:Number = 0;
public static var weapon2Price:Number = 600;
public static var weapon5L2ClipSize:Number = 22;
public static var enemy3Speed:Number = 1.4;
public static var weapon1L1ReloadTime:Number = 1.8;
public static var weapon9L1ClipSize:Number = 10;
public static var weapon2L3ReloadTime:Number = 1.1;
public static var upgradePriceU:Number = 0;
public static var weapon5Level:Number = 1;
public static var weapon10UpgradePrice:Number = weapon10L1UpgradePrice;
public static var wall5IsOwned:Boolean = false;
public static var weapon10L3ClipSize:Number = 16;
public static var weapon9L1UpgradePrice:Number = 245;
public static var weapon9L1ReloadTime:Number = 1.5;
public static var weapon9ReloadTime:Number = weapon9L1ReloadTime;
public static var weapon2Ammo:Number = 0;
public static var weapon7IsOwned:Boolean = false;
public static var weapon1IsLocked:Boolean = false;
public static var weapon5IsLocked:Boolean = true;
public static var weapon9IsLocked:Boolean = true;
public static var playerX:Number = 0;
public static var playerY:Number = 0;
public static var reload:Boolean = false;
public static var wall1IsLocked:Boolean = false;
public static var isReloading:Boolean = false;
public static var weapon10L3ReloadTime:Number = 1;
public static var weapon10L2Attack:Number = 9;
public static var weapon8L2ClipSize:Number = 21;
public static var wall7Price:Number = 1400;
public static var weapon4L1Attack:Number = 3.2;
public static var weapon8L2ReloadTime:Number = 1.2;
public static var weapon8L1Attack:Number = 6;
public static var weapon12Ammo:Number = 0;
public static var weapon9Price:Number = 2000;
public static var enemySpeed:Number = 1.5;
public static var weapon2L1UpgradePrice:Number = 220;
public static var weapon4L3ClipSize:Number = 26;
public static var wall5IsLocked:Boolean = true;
public static var weapon8L2UpgradePrice:Number = 309;
public static var wall1LifeTotal:Number = 800;
public static var wall4Life:Number = 800;
public static var enemiesSlain:Number = 0;
public static var weapon7UpgradePrice:Number = weapon7L1UpgradePrice;
public static var wall4HitPoints:Number = 1400;
public static var weapon7L3ClipSize:Number = 12;
public static var weapon10ClipSize:Number = weapon10L1ClipSize;
public static var weapon10IsOwned:Boolean = false;
public static var weapon6L1ReloadTime:Number = 1.82;
public static var weaponAtReload:Number = 0;
public static var weapon7L2Attack:Number = 9.5;
public static var weapon3L2Attack:Number = 5.5;
public static var weapon7L3ReloadTime:Number = 1.1;
public static var weapon3Price:Number = 1030;
public static var wall1IsOwned:Boolean = true;
public static var weapon1L2UpgradePrice:Number = 170;
public static var enemy4Speed:Number = 1.4;
public static var weapon4Attack:Number = weapon4L1Attack;
public static var weapon1Ammo:Number = 0;
public static var weapon3IsOwned:Boolean = false;
public static var dayNumber:Number = 1;
public static var weapon9Ammo:Number = 0;
public static var weapon2L1ClipSize:Number = 2;
public static var weapon6Level:Number = 1;
public static var enemy5Time:Number = 13000;
public static var weapon5L2ReloadTime:Number = 1.45;
public static var entryX:Number = 0;
public static var entryY:Number = 0;
public static var weapon11Ammo:Number = 0;
public static var canShoot:Boolean = true;
public static var weapon4L1UpgradePrice:Number = 196;
public static var weapon7ClipSize:Number = weapon7L1ClipSize;
public static var weapon2L3Attack:Number = 7.5;
public static var weapon3ClipSize:Number = weapon3L1ClipSize;
public static var weapon6L3Attack:Number = 14;
public static var wall8Price:Number = 1600;
public static var weapon2ReloadTime:Number = weapon2L1ReloadTime;
public static var wall3Life:Number = 800;
public static var wall8HitPoints:Number = 2500;
public static var enemy5Life:Number = 30;
public static var weapon9Attack:Number = weapon9L1Attack;
public static var wall6IsOwned:Boolean = false;
public static var weapon1L2ClipSize:Number = 10;
public static var weapon4UpgradePrice:Number = weapon4L1UpgradePrice;
public static var enemy5Attack:Number = 1.2;
public static var entry2X:Number = 0;
public static var entry2Y:Number = 0;
public static var weapon8IsOwned:Boolean = false;
public static var weapon3L1ReloadTime:Number = 2;
public static var weapon4L3ReloadTime:Number = 1.05;
public static var enemyCount:Number = 20;
public static var weapon10L1Attack:Number = 7;
public static var wall1HitPoints:Number = 800;
public static var weapon5L1ClipSize:Number = 20;
public static var weapon10L2ClipSize:Number = 13;
public static var enemyTime:Number = 3000;
public static var entry3X:Number = 0;
public static var entry3Y:Number = 0;
public static var weapon3L2UpgradePrice:Number = 293;
public static var weapon5ReloadTime:Number = weapon5L1ReloadTime;
public static var wall2Price:Number = 700;
public static var weapon8Ammo:Number = 0;
public static var weapon4IsLocked:Boolean = true;
public static var weaponLevelU:Number = 0;
public static var weapon4L2ClipSize:Number = 23;
public static var dayOver:Boolean = false;
public static var weapon4Price:Number = 1110;
public static var weapon8L1ClipSize:Number = 18;
public static var weapon8IsLocked:Boolean = true;
public static var enemy4Time:Number = 11000;
public static var enemy5Speed:Number = 1.2;
public static var wall4IsLocked:Boolean = true;
public static var enemyLife:Number = 7;
public static var weapon10Ammo:Number = 0;
public static var weapon3L1Attack:Number = 5;
public static var weapon6L1UpgradePrice:Number = 217;
public static var weapon7L1Attack:Number = 8;
public static var weapon7Level:Number = 1;
public static var wall8IsLocked:Boolean = true;
public static var weapon2L2ReloadTime:Number = 1.4;
public static var weapon3Attack:Number = weapon3L1Attack;
public static var weapon8ReloadTime:Number = weapon8L1ReloadTime;
public static var wall2Life:Number = 800;
public static var weapon10L2ReloadTime:Number = 1.2;
public static var enemy4Life:Number = 22;
public static var weapon1UpgradePrice:Number = weapon1L1UpgradePrice;
public static var weapon9UpgradePrice:Number = weapon9L1UpgradePrice;
public static var repairSkill:Number = 2;
public static var weapon7L2ClipSize:Number = 10;
public static var wall2IsOwned:Boolean = false;
public static var weapon3L3ClipSize:Number = 20;
public static var wall2LifeTotal:Number = 800;
public static var weapon1L3ReloadTime:Number = 1.2;
public static var weapon4IsOwned:Boolean = false;
public static var weapon2L2Attack:Number = 7;
public static var weapon6L2Attack:Number = 13;
public static var weapon9L3ReloadTime:Number = 1;
public static var wall5HitPoints:Number = 1600;
public static var weapon5L2UpgradePrice:Number = 307;
public static var weapon8L1ReloadTime:Number = 1.5;
public static var weapon1Level:Number = 1;
public static var clipSizeU:Number = 0;
public static var weapon7Ammo:Number = 0;
public static var weapon8Attack:Number = weapon8L1Attack;
public static var weapon10L2UpgradePrice:Number = 324;
public static var enemy4Attack:Number = 1;
public static var frameNumber:Number = 0;
public static var enemy3Time:Number = 7000;
public static var weapon6L3ClipSize:Number = 6;
public static var wall3Price:Number = 900;
public static var weapon10Level:Number = 1;
public static var weapon1L3Attack:Number = 5;
public static var weapon2ClipSize:Number = weapon2L1ClipSize;
public static var weapon5L3Attack:Number = 4.1;
public static var weapon6ClipSize:Number = weapon6L1ClipSize;
public static var weapon9L3Attack:Number = 12;
public static var weapon10IsLocked:Boolean = true;
public static var weapon5Price:Number = 1230;
public static var wall7IsOwned:Boolean = false;
public static var weapon7L2ReloadTime:Number = 1.3;
public static var wall1Life:Number = 800;
public static var enemy3Life:Number = 6;
public static var weapon8Level:Number = 1;
public static var weapon1L1ClipSize:Number = 8;
public static var weapon6UpgradePrice:Number = weapon6L1UpgradePrice;
public static var weapon9L3ClipSize:Number = 16;
public static var weapon8L1UpgradePrice:Number = 238;
public static var weapon9IsOwned:Boolean = false;
public static var weapon10Attack:Number = weapon10L1Attack;
public static var itemClickedIsOwned:Boolean = false;
public static var weapon5L1ReloadTime:Number = 1.85;
public static var weapon6L3ReloadTime:Number = 1.1;
public static var weapon10L1ClipSize:Number = 10;
public static var weapon7L2UpgradePrice:Number = 324;
public static var weapon1L1UpgradePrice:Number = 135;
public static var weapon1ReloadTime:Number = weapon1L1ReloadTime;
public static var weapon2Attack:Number = weapon2L1Attack;
public static var weapon6Ammo:Number = 0;
public static var weapon3IsLocked:Boolean = true;
public static var weapon7IsLocked:Boolean = true;
public static var wall2HitPoints:Number = 1000;
public static var enemy2Time:Number = 8000;
public static var wall3IsLocked:Boolean = true;
public static var wall7IsLocked:Boolean = true;
public static var weapon2L1Attack:Number = 6.5;
public static var weapon4L2ReloadTime:Number = 1.44;
public static var weapon6L1Attack:Number = 11;
public static var weapon10ReloadTime:Number = weapon10L1ReloadTime;
public static var weapon2Level:Number = 1;
public static var bullets:Array = new Array();
public static var wall3IsOwned:Boolean = false;
public static var weapon4L1ClipSize:Number = 20;
public static var weapon4ReloadTime:Number = weapon4L1ReloadTime;
public static var wall4Price:Number = 1000;
public static var weapon5IsOwned:Boolean = false;
public static var weapon7Attack:Number = weapon7L1Attack;
public static var weapon3UpgradePrice:Number = weapon3L1UpgradePrice;
public static var enemy2Life:Number = 17;
public static var weapon6Price:Number = 1400;
public static var weapon7L1ClipSize:Number = 8;
public static var enemy3Attack:Number = 10;
public static var weapon3L2ClipSize:Number = 17;
public static var weapon2L1ReloadTime:Number = 1.8;
public static var weapon1L2Attack:Number = 4.5;
public static var gameOver:Boolean = false;
public static var weapon9Level:Number = 1;
public static var weapon3L1UpgradePrice:Number = 195;
public static var weapon3L3ReloadTime:Number = 1.5;
public static var weapon5L2Attack:Number = 3.8;
public static var enemyAttack:Number = 0.3;
public static var weapon9L2Attack:Number = 9;
public static var weapon9L2UpgradePrice:Number = 335;
public static var wall3LifeTotal:Number = 800;
}
}//package
Section 55
//ErrorSound (ErrorSound)
package {
import flash.media.*;
public dynamic class ErrorSound extends Sound {
}
}//package
Section 56
//Explosion (Explosion)
package {
import flash.display.*;
import flash.events.*;
public class Explosion extends MovieClip {
public function Explosion(){
addEventListener(Event.ENTER_FRAME, loop);
}
private function loop(_arg1:Event):void{
if ((((((currentFrame == totalFrames)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 57
//Fail (Fail)
package {
import flash.media.*;
public dynamic class Fail extends Sound {
}
}//package
Section 58
//Flame (Flame)
package {
import flash.display.*;
import flash.events.*;
public class Flame extends MovieClip {
private var speed:Number;// = 6
public var m:Number;
public var n:Number;
public function Flame(){
speed = 6;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
super();
scaleX = 1.5;
scaleY = 1.5;
this.x = Engine.playerX;
this.y = Engine.playerY;
addEventListener(Event.ENTER_FRAME, loop);
}
private function loop(_arg1:Event):void{
var _local2:Number;
if ((((speed < 0)) || (Engine.gameOver))){
removeSelf();
};
if ((((currentFrame > 25)) || ((speed > 0)))){
speed = (speed - 0.15);
};
_local2 = Math.atan2(n, m);
x = (x + (Math.cos(_local2) * speed));
y = (y + (Math.sin(_local2) * speed));
rotation = ((_local2 * 180) / Math.PI);
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 59
//Flash (Flash)
package {
import flash.display.*;
import flash.events.*;
public class Flash extends MovieClip {
public var m:Number;
public var n:Number;
public function Flash(){
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
super();
this.x = Engine.playerX;
this.y = Engine.playerY;
addEventListener(Event.ENTER_FRAME, loop);
}
private function loop(_arg1:Event):void{
var _local2:Number;
_local2 = Math.atan2(n, m);
rotation = ((_local2 * 180) / Math.PI);
if (currentFrame == totalFrames){
removeSelf();
};
}
public function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 60
//GunFlash (GunFlash)
package {
import flash.display.*;
public dynamic class GunFlash extends MovieClip {
}
}//package
Section 61
//Guts (Guts)
package {
import flash.display.*;
import flash.events.*;
public class Guts extends MovieClip {
private var friction:Number;
private var speed:Number;// = 20
private var c:Number;
private var f:Number;
private var b:Number;
private var d:Number;
private var m:Number;
private var a:Number;
private var n:Number;
private var e:Number;
private var clearTime:Number;// = 0
private var stopped:Boolean;// = false
public function Guts(){
stopped = false;
clearTime = 0;
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
a = Math.random();
b = Math.random();
c = Math.round(((a * 200) - 100));
d = Math.round(((b * 200) - 100));
e = Math.round((a * 2));
f = Math.round(((a * 7) + 1));
friction = (2 + e);
speed = 20;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
scaleX = 1.3;
scaleY = 1.3;
n = (n + c);
m = (m + d);
this.gotoAndPlay(f);
addEventListener(Event.ENTER_FRAME, loop);
}
function frame7(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame1(){
stop();
}
function frame8(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
private function loop(_arg1:Event):void{
var _local2:Number;
clearTime = (clearTime + 0.1);
if ((((((clearTime > 30)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
if ((((((currentFrame > 10)) || ((speed > 0)))) || (!(stopped)))){
speed = (speed - friction);
};
if (speed < 0){
stopped = true;
speed = 0;
};
_local2 = Math.atan2(n, m);
x = (x + (Math.cos(_local2) * speed));
y = (y + (Math.sin(_local2) * speed));
rotation = ((_local2 * 180) / Math.PI);
}
function frame2(){
stop();
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 62
//Insect1 (Insect1)
package {
import flash.media.*;
public dynamic class Insect1 extends Sound {
}
}//package
Section 63
//Insect2 (Insect2)
package {
import flash.media.*;
public dynamic class Insect2 extends Sound {
}
}//package
Section 64
//Insect3 (Insect3)
package {
import flash.media.*;
public dynamic class Insect3 extends Sound {
}
}//package
Section 65
//KeyObject (KeyObject)
package {
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
Section 66
//Laser1 (Laser1)
package {
import flash.media.*;
public dynamic class Laser1 extends Sound {
}
}//package
Section 67
//Laser2 (Laser2)
package {
import flash.media.*;
public dynamic class Laser2 extends Sound {
}
}//package
Section 68
//Laser3 (Laser3)
package {
import flash.media.*;
public dynamic class Laser3 extends Sound {
}
}//package
Section 69
//Lasergun (Lasergun)
package {
import flash.media.*;
public dynamic class Lasergun extends Sound {
}
}//package
Section 70
//Lasergun2 (Lasergun2)
package {
import flash.media.*;
public dynamic class Lasergun2 extends Sound {
}
}//package
Section 71
//Monster2 (Monster2)
package {
import flash.media.*;
public dynamic class Monster2 extends Sound {
}
}//package
Section 72
//Monster3 (Monster3)
package {
import flash.media.*;
public dynamic class Monster3 extends Sound {
}
}//package
Section 73
//Monster4 (Monster4)
package {
import flash.media.*;
public dynamic class Monster4 extends Sound {
}
}//package
Section 74
//Monster5 (Monster5)
package {
import flash.media.*;
public dynamic class Monster5 extends Sound {
}
}//package
Section 75
//Music1 (Music1)
package {
import flash.media.*;
public dynamic class Music1 extends Sound {
}
}//package
Section 76
//Music2 (Music2)
package {
import flash.media.*;
public dynamic class Music2 extends Sound {
}
}//package
Section 77
//PlasmaCannon (PlasmaCannon)
package {
import flash.media.*;
public dynamic class PlasmaCannon extends Sound {
}
}//package
Section 78
//PlasmaCostume (PlasmaCostume)
package {
import flash.display.*;
public dynamic class PlasmaCostume extends MovieClip {
}
}//package
Section 79
//Player (Player)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class Player extends MovieClip {
private var friction:Number;// = 0.7
private var movingDown:Boolean;// = false
private var key:KeyObject;
private var maxspeed:Number;// = 2.5
private var speed:Number;// = 1
private var movingLeft:Boolean;// = false
private var movingRight:Boolean;// = false
private var movingUp:Boolean;// = false
private var stageRef:Stage;
private var vx:Number;// = 0
private var vy:Number;// = 0
public function Player(_arg1:Stage):void{
speed = 1;
vx = 0;
vy = 0;
friction = 0.7;
maxspeed = 2.5;
movingLeft = false;
movingRight = false;
movingUp = false;
movingDown = false;
super();
addFrameScript(39, frame40, 93, frame94);
x = (_arg1.stageWidth / 2);
y = (_arg1.stageHeight / 2);
this.stageRef = _arg1;
key = new KeyObject(_arg1);
addEventListener(Event.ENTER_FRAME, loop);
}
function frame94(){
gotoAndPlay(1);
}
function frame40(){
gotoAndPlay(1);
}
public function loop(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
Engine.playerX = this.x;
Engine.playerY = this.y;
_local2 = (stageRef.mouseY - y);
_local3 = (stageRef.mouseX - x);
_local4 = Math.atan2(_local2, _local3);
rotation = ((_local4 * 180) / Math.PI);
if (((key.isDown(65)) || (key.isDown(Keyboard.LEFT)))){
vx = (vx - speed);
} else {
if (((key.isDown(68)) || (key.isDown(Keyboard.RIGHT)))){
vx = (vx + speed);
} else {
vx = (vx * friction);
};
};
if (((key.isDown(87)) || (key.isDown(Keyboard.UP)))){
vy = (vy - speed);
} else {
if (((key.isDown(83)) || (key.isDown(Keyboard.DOWN)))){
vy = (vy + speed);
} else {
vy = (vy * friction);
};
};
x = (x + vx);
y = (y + vy);
if (vx > maxspeed){
vx = maxspeed;
} else {
if (vx < -(maxspeed)){
vx = -(maxspeed);
};
};
if (vy > maxspeed){
vy = maxspeed;
} else {
if (vy < -(maxspeed)){
vy = -(maxspeed);
};
};
if (x > 480){
x = 480;
vx = -(vx);
} else {
if (x < 215){
x = 215;
vx = -(vx);
};
};
if (y > 480){
y = 480;
vy = -(vy);
} else {
if (y < 215){
y = 215;
vy = -(vy);
};
};
}
public function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 80
//Reload (Reload)
package {
import flash.media.*;
public dynamic class Reload extends Sound {
}
}//package
Section 81
//Reload2 (Reload2)
package {
import flash.media.*;
public dynamic class Reload2 extends Sound {
}
}//package
Section 82
//Reload3 (Reload3)
package {
import flash.media.*;
public dynamic class Reload3 extends Sound {
}
}//package
Section 83
//RepairIcon (RepairIcon)
package {
import flash.display.*;
import flash.text.*;
public dynamic class RepairIcon extends MovieClip {
public var damageBar:DamageBar;
public var damagePercent:TextField;
}
}//package
Section 84
//RepairZone (RepairZone)
package {
import flash.display.*;
public class RepairZone extends MovieClip {
public function RepairZone():void{
visible = false;
}
}
}//package
Section 85
//Shot1 (Shot1)
package {
import flash.media.*;
public dynamic class Shot1 extends Sound {
}
}//package
Section 86
//Shot2 (Shot2)
package {
import flash.media.*;
public dynamic class Shot2 extends Sound {
}
}//package
Section 87
//Shot3 (Shot3)
package {
import flash.media.*;
public dynamic class Shot3 extends Sound {
}
}//package
Section 88
//Shot4 (Shot4)
package {
import flash.media.*;
public dynamic class Shot4 extends Sound {
}
}//package
Section 89
//Shot5 (Shot5)
package {
import flash.media.*;
public dynamic class Shot5 extends Sound {
}
}//package
Section 90
//Shot6 (Shot6)
package {
import flash.media.*;
public dynamic class Shot6 extends Sound {
}
}//package
Section 91
//Shot7 (Shot7)
package {
import flash.media.*;
public dynamic class Shot7 extends Sound {
}
}//package
Section 92
//Shotgun (Shotgun)
package {
import flash.media.*;
public dynamic class Shotgun extends Sound {
}
}//package
Section 93
//Shotgun2 (Shotgun2)
package {
import flash.media.*;
public dynamic class Shotgun2 extends Sound {
}
}//package
Section 94
//Smoke (Smoke)
package {
import flash.display.*;
import flash.events.*;
public class Smoke extends MovieClip {
public var m:Number;
public var n:Number;
public function Smoke(){
m = (mouseX - Engine.playerX);
n = (mouseY - Engine.playerY);
super();
this.x = Engine.playerX;
this.y = Engine.playerY;
addEventListener(Event.ENTER_FRAME, loop);
}
private function loop(_arg1:Event):void{
var _local2:Number;
_local2 = Math.atan2(n, m);
rotation = ((_local2 * 180) / Math.PI);
if ((((((currentFrame == totalFrames)) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 95
//Sound1 (Sound1)
package {
import flash.media.*;
public dynamic class Sound1 extends Sound {
}
}//package
Section 96
//Soundtrack1 (Soundtrack1)
package {
import flash.media.*;
public dynamic class Soundtrack1 extends Sound {
}
}//package
Section 97
//Splat1 (Splat1)
package {
import flash.media.*;
public dynamic class Splat1 extends Sound {
}
}//package
Section 98
//Splat2 (Splat2)
package {
import flash.media.*;
public dynamic class Splat2 extends Sound {
}
}//package
Section 99
//Trail (Trail)
package {
import flash.display.*;
import flash.events.*;
public class Trail extends MovieClip {
var randomNumber:Number;
var number:Number;
public function Trail(){
randomNumber = Math.random();
number = Math.round((randomNumber * 2));
super();
addEventListener(Event.ENTER_FRAME, loop);
}
private function loop(_arg1:Event):void{
if ((((((((currentFrame == totalFrames)) || ((!(number) == 0)))) || (Engine.gameOver))) || (Engine.dayOver))){
removeSelf();
};
}
private function removeSelf():void{
removeEventListener(Event.ENTER_FRAME, loop);
parent.removeChild(this);
}
}
}//package
Section 100
//Wall (Wall)
package {
import flash.display.*;
import flash.events.*;
public class Wall extends MovieClip {
public function Wall():void{
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
addEventListener(Event.ENTER_FRAME, loop);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
public function loop(_arg1:Event):void{
}
}
}//package
Section 101
//Whoosh (Whoosh)
package {
import flash.media.*;
public dynamic class Whoosh extends Sound {
}
}//package
Section 102
//Zap1 (Zap1)
package {
import flash.media.*;
public dynamic class Zap1 extends Sound {
}
}//package