Section 1
//aim2_76 (battlefield5_fla.aim2_76)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class aim2_76 extends MovieClip {
public function aim2_76(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 2
//bazAmmo_92 (battlefield5_fla.bazAmmo_92)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class bazAmmo_92 extends MovieClip {
public var rocket_mc:MovieClip;
public function bazAmmo_92(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
this.visible = false;
if (!root.isPause){
if (root != null){
if (parent.parent != null){
if (parent != null){
if ((((parent.parent.parent.gOver == false)) && ((parent.parent.visible == true)))){
this.x = 49;
this.y = 1;
};
};
};
};
};
}
function frame1(){
stop();
}
function frame4(){
if (root != null){
if (parent.parent != null){
if (parent != null){
if ((((parent.parent.parent.gOver == false)) && ((parent.parent.parent.shopOn == false)))){
parent.gotoAndPlay("shoot");
gotoAndStop(1);
};
};
};
};
}
function frame2(){
stop();
if (!root.isPause){
if (parent.parent.getChildByName("bazBodyMask").visible == true){
parent.parent.parent.bazookaSd.play();
};
};
}
}
}//package battlefield5_fla
Section 3
//bazookaAnim_91 (battlefield5_fla.bazookaAnim_91)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class bazookaAnim_91 extends MovieClip {
public var bazAmmo:MovieClip;
public var bazX:uint;
public var mcFireGun:MovieClip;
public var bFire:Boolean;
public var deadSwitch:Boolean;
public function bazookaAnim_91(){
addFrameScript(0, frame1, 21, frame22, 26, frame27, 48, frame49, 57, frame58, 87, frame88, 97, frame98, 127, frame128, 131, frame132, 160, frame161);
}
public function activateBazAmmo():void{
mcFireGun.gotoAndPlay(2);
bazAmmo.visible = true;
bazAmmo.addEventListener(Event.ENTER_FRAME, moveBazAmmo);
}
function frame88(){
stop();
if (root != null){
if (!deadSwitch){
parent.parent.deadUnits++;
parent.parent.levelMoney = (parent.parent.levelMoney + 25);
parent.visible = false;
deadSwitch = true;
bazAmmo.gotoAndStop(1);
bazAmmo.removeEventListener(Event.ENTER_FRAME, moveBazAmmo);
};
};
}
public function stopBazAmmo():void{
bazAmmo.removeEventListener(Event.ENTER_FRAME, moveBazAmmo);
bazAmmo.gotoAndStop(1);
}
function frame98(){
if ((((parent.getChildByName("bazBodyMask").visible == true)) && ((parent.parent.gOver == false)))){
if (parent.parent.wallDemageBazookas > 0){
parent.parent.wallDemageBazookas = (parent.parent.wallDemageBazookas - parent.parent.bazookaDemage);
};
parent.getChildByName("bazBodyMask").visible = false;
};
}
function frame1(){
bazAmmo.visible = false;
}
function frame22(){
gotoAndPlay("run");
}
public function moveBazAmmo(_arg1:Event):void{
if (!root.isPause){
if (root != null){
if ((((((parent.parent.gOver == false)) && ((parent.visible == true)))) && ((parent.parent.shopOn == false)))){
bazAmmo.x = (bazAmmo.x + bazX);
bazAmmo.y = (bazAmmo.y - 1);
bazX = (bazX + 3);
if (bazAmmo.hitTestObject(parent.parent.wall_mc)){
bazAmmo.removeEventListener(Event.ENTER_FRAME, moveBazAmmo);
bazAmmo.gotoAndPlay(2);
};
};
};
};
}
function frame27(){
deadSwitch = false;
if (root != null){
if ((((parent.parent.gOver == false)) && ((parent.visible == true)))){
if (!root.isPause){
activateBazAmmo();
};
};
};
bazX = 3;
bFire = true;
stop();
}
function frame128(){
stop();
if (root != null){
parent.parent.deadUnits++;
parent.parent.headshotsNum++;
parent.parent.levelMoney = (parent.parent.levelMoney + 25);
parent.parent.levelMoney = (parent.parent.levelMoney + 50);
parent.parent.headshotBonus = (parent.parent.headshotBonus + 30);
parent.visible = false;
bazAmmo.gotoAndStop(1);
bazAmmo.removeEventListener(Event.ENTER_FRAME, moveBazAmmo);
};
}
function frame161(){
stop();
if (root != null){
parent.parent.deadUnits++;
parent.parent.legshotsNum++;
parent.parent.levelMoney = (parent.parent.levelMoney + 25);
parent.visible = false;
bazAmmo.gotoAndStop(1);
bazAmmo.removeEventListener(Event.ENTER_FRAME, moveBazAmmo);
};
}
function frame49(){
if (root != null){
if (parent.getChildByName("bazBodyMask").visible == true){
gotoAndPlay("shoot");
} else {
gotoAndStop("deathComplete");
};
};
}
function frame132(){
if (root != null){
if ((((parent.getChildByName("bazBodyMask").visible == true)) && ((parent.parent.gOver == false)))){
if (parent.parent.wallDemageBazookas > 0){
parent.parent.wallDemageBazookas = (parent.parent.wallDemageBazookas - parent.parent.bazookaDemage);
};
parent.getChildByName("bazBodyMask").visible = false;
};
};
}
function frame58(){
if (root != null){
if ((((parent.getChildByName("bazBodyMask").visible == true)) && ((parent.parent.gOver == false)))){
if (parent.parent.wallDemageBazookas > 0){
parent.parent.wallDemageBazookas = (parent.parent.wallDemageBazookas - parent.parent.bazookaDemage);
};
bazAmmo.visible = false;
stopBazAmmo();
parent.getChildByName("bazBodyMask").visible = false;
};
};
}
}
}//package battlefield5_fla
Section 4
//bazookaHealth_113 (battlefield5_fla.bazookaHealth_113)
package battlefield5_fla {
import flash.display.*;
public dynamic class bazookaHealth_113 extends MovieClip {
public var bazHealthMask:MovieClip;
}
}//package battlefield5_fla
Section 5
//bg_mc_44 (battlefield5_fla.bg_mc_44)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class bg_mc_44 extends MovieClip {
public function bg_mc_44(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 6
//Credits_mc_79 (battlefield5_fla.Credits_mc_79)
package battlefield5_fla {
import flash.display.*;
public dynamic class Credits_mc_79 extends MovieClip {
public var mainMenu:MovieClip;
}
}//package battlefield5_fla
Section 7
//debrieGr_89 (battlefield5_fla.debrieGr_89)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class debrieGr_89 extends MovieClip {
public function debrieGr_89(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package battlefield5_fla
Section 8
//fire_48 (battlefield5_fla.fire_48)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class fire_48 extends MovieClip {
public function fire_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 9
//fire2_50 (battlefield5_fla.fire2_50)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class fire2_50 extends MovieClip {
public function fire2_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 10
//fire3_51 (battlefield5_fla.fire3_51)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class fire3_51 extends MovieClip {
public function fire3_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 11
//fire4_52 (battlefield5_fla.fire4_52)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class fire4_52 extends MovieClip {
public function fire4_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 12
//fire5_53 (battlefield5_fla.fire5_53)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class fire5_53 extends MovieClip {
public function fire5_53(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 13
//fire6_54 (battlefield5_fla.fire6_54)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class fire6_54 extends MovieClip {
public function fire6_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 14
//game_mc_43 (battlefield5_fla.game_mc_43)
package battlefield5_fla {
import flash.events.*;
import fl.transitions.*;
import flash.display.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class game_mc_43 extends MovieClip {
public var moreGames_btn:SimpleButton;
public var deadJeeps:uint;
public var shootingSpeedSingle:uint;
public var jeepSd:JeepSound;
public var bazookaSd:BazookaSound;
public var legshotsNum:uint;
public var soldiersDestination:Array;
public var buyedWeapon:uint;
public var turretsHealthArr:Array;
public var solHealth:uint;
public var demSolLegs:Number;
public var wall_mc:MovieClip;
public var wallDemageJeeps:uint;
public var jeepDemage:uint;
public var ammoTimerSingle:Timer;
public var speed:uint;
public var helicopterDemage:uint;
public var helicopterNum:int;
public var wallAttackTimerSoldier:Timer;
public var helicoptersTime:int;
public var startTank:uint;
public var helicoptersZ:Array;
public var turretNum:int;
public var solTime:Timer;
public var deadTurrets:uint;
public var wallAttackTimerTurret:Timer;
public var solMTimer:Timer;
public var volumeLevel:SoundTransform;
public var gameOver_mc:MovieClip;
public var ctrl_Level:SoundChannel;
public var jeepPartNum:uint;
public var deadHelicopters:uint;
public var sortTanksArr:Array;
public var aimForce:Boolean;
public var ammo_mc:MovieClip;
public var turTime:Timer;
public var debries:Array;
public var helicopterFlySd:HelicopterFlySound;
public var gameBrightnessNormal:ColorTransform;
public var maxSoldiers:uint;
public var tanksZ:Array;
public var destHelicopterNum:uint;
public var wallAttackTimerBazooka:Timer;
public var wallHealth:int;
public var bazookas:Array;
public var soldierIsDead:Boolean;
public var solMusicNum:int;
public var angle;
public var rewind_btn:SimpleButton;
public var sortJeepsArr:Array;
public var tankSd:TankSound;
public var tanks:Array;
public var level_sd:Sound;
public var currentWeapon:int;
public var maxElement:uint;
public var sortSoldiersArr:Array;
public var destTurNum:uint;
public var currentGun:uint;
public var buyedWeaponsArray:Array;
public var tank_mc:Tank;
public var ammoTimer:Timer;
public var destSolNum:uint;
public var jeepHealth:uint;
public var helicopterHealth:uint;
public var reloadTimer:Timer;
public var tanksNum_txt:TextField;
public var demBazLegs:Number;
public var destTankNum:uint;
public var wallAttackTimerTank:Timer;
public var deadBazookas:uint;
public var demJeep:Number;
public var jeep_mc:Jeep;
public var levelNum:uint;
public var deadUnits:uint;
public var soldier_mc:Soldier;
public var destJeepNum:uint;
public var turrets:Array;
public var bazTime:Timer;
public var soldierDemage:uint;
public var soldiersTime:uint;
public var wallSwitch:uint;
public var tweenDown:Tween;
public var tkName:uint;
public var tweenAlpha:Tween;
public var demSolBody:Number;
public var turretIsDead:Boolean;
public var sName:uint;
public var sortBazookasArr:Array;
public var maxTanks:uint;
public var soldiersNum_txt:TextField;
public var startHelicopter:uint;
public var gOver:Boolean;
public var demSolHead:Number;
public var bazookaIsDead:Boolean;
public var headshotsNum:uint;
public var wallAttackTimerHelicopter:Timer;
public var bullet_mc:Bullet;
public var bazPartNum:uint;
public var bazookasDestination:Array;
public var mSwitch:Boolean;
public var radiusX;
public var radiusY;
public var sortHelicopterArr:Array;
public var jeeps:Array;
public var levelNum_txt:TextField;
public var bulletsNum:uint;
public var reloadingTime:uint;
public var sortTurretsArr:Array;
public var jName:uint;
public var gunShop_mc:MovieClip;
public var trName:uint;
public var wallDemageSoldiers:uint;
public var bName:uint;
public var soldiersHealthArr:Array;
public var tankNum:int;
public var debriesTimer:Timer;
public var tankPartNum:uint;
public var maxAmmo:int;
public var bazHealth:uint;
public var maxBazookas:uint;
public var elementsNow:uint;
public var demTur:Number;
public var tweenUp:Tween;
public var helicoptersHealthArr:Array;
public var tankIsDead:Boolean;
public var radians:Number;
public var jeepsTime:int;
public var wall_txt:TextField;
public var jeepNum:int;
public var turretDemage:uint;
public var turretsDestination:Array;
public var shootingSpeed:uint;
public var startJeep:uint;
public var destBazNum:uint;
public var bazookasTime:int;
public var demBazBody:Number;
public var soldierNum:int;
public var reload_sd:Reload;
public var helicopterPartNum:uint;
public var bazookaDemage:uint;
public var startSoldier:uint;
public var bazooka_mc:Bazooka;
public var deadTanks:uint;
public var allBullets:uint;
public var helicTime:Timer;
public var tankTime:Timer;
public var debrieNum:uint;
public var currentAngle:Number;
public var allLevelUnits:uint;
public var wallDemageTurrets:uint;
public var jeepsHealthArr:Array;
public var demBazHead:Number;
public var turretsTime:int;
public var wallDemageTanks:uint;
public var solSounds:uint;
public var solPartNum:uint;
public var tankDemage:uint;
public var target_mc:Target;
public var maxJeeps:uint;
public var jeepTime:Timer;
public var helicoptersDestination:Array;
public var bazookasNum_txt:TextField;
public var demTank:Number;
public var hName:uint;
public var helicoptersNum_txt:TextField;
public var helicopter_mc:Helicopter;
public var ammoElement_mc:AmmoElement;
public var solDebrieNum:uint;
public var startBazooka:uint;
public var tanksTime:int;
public var turretsZ:Array;
public var turretsNum_txt:TextField;
public var soldiers:Array;
public var turPartNum:uint;
public var turret_mc:Turret;
public var soldiersZ:Array;
public var gameBrigthness:ColorTransform;
public var wallDemageHelicopters:uint;
public var helicopterIsDead:Boolean;
public var debriesTimerSingle:Timer;
public var turretSd:TurretSound;
public var jeepsNum_txt:TextField;
public var soldierSd:SoldierSound;
public var shopOn:Boolean;
public var wallHealth_txt:TextField;
public var maxHelicopters:uint;
public var switch1:Boolean;
public var wallAttackTimerJeep:Timer;
public var jeepIsDead:Boolean;
public var switch3:Boolean;
public var helicopters:Array;
public var switch2:Boolean;
public var maxTurrets:uint;
public var levelMoney:int;
public var tanksDestination:Array;
public var tanksHealthArr:Array;
public var gunHolder_mc:MovieClip;
public var reloading:Boolean;
public var deadSoldiers:uint;
public var demHelic:Number;
public var wallDemageBazookas:uint;
public var jeepsDestination:Array;
public var bazookasHealthArr:Array;
public var weaponNum:uint;
public var turHealth:uint;
public var bg_mc:MovieClip;
public var totalMoney:int;
public var wallDemage:uint;
public var bazookasZ:Array;
public var startTurret:uint;
public var jeepsZ:Array;
public var bazookaNum:int;
public var tankHealth:uint;
public function game_mc_43(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function reloadAmmo():void{
reload_sd.play();
addAmmo();
reloading = false;
reloadTimer.removeEventListener(TimerEvent.TIMER, reloadAmmo);
if (!shopOn){
stage.addEventListener(MouseEvent.MOUSE_UP, holdAmmo);
stage.addEventListener(MouseEvent.MOUSE_DOWN, downAmmo);
};
}
public function startAgain(_arg1:MouseEvent):void{
solTime.reset();
solTime.start();
}
public function moveTurret(_arg1:Event):void{
if (!root.isPause){
if (root.isGame){
if (_arg1.target.x > turretsDestination[destTurNum]){
_arg1.target.x = (_arg1.target.x - 1);
_arg1.target.y = (_arg1.target.y - 0.05);
_arg1.target.scaleX = (_arg1.target.scaleY = (_arg1.target.scaleY - 0.0005));
} else {
_arg1.target.getChildAt(0).gotoAndPlay("shoot");
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveTurret);
wallAttackTimerTurret.addEventListener(TimerEvent.TIMER, attackWallTurret);
wallAttackTimerTurret.start();
wallDemageTurrets = (wallDemageTurrets + turretDemage);
trace("Turret is firing the wall");
destTurNum++;
};
};
};
}
public function holdAmmo(_arg1:Event):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
ammoTimer.reset();
ammoTimer.removeEventListener(TimerEvent.TIMER, removeAmmo);
ammoTimerSingle.removeEventListener(TimerEvent.TIMER, removeAmmo);
ammoTimerSingle.reset();
_local2 = 0;
while (_local2 < soldiers.length) {
soldiers[_local2].removeEventListener(Event.ENTER_FRAME, hitSoldier);
_local2++;
};
_local3 = 0;
while (_local3 < bazookas.length) {
bazookas[_local3].removeEventListener(Event.ENTER_FRAME, hitBazooka);
_local3++;
};
_local4 = 0;
while (_local4 < turrets.length) {
turrets[_local4].removeEventListener(Event.ENTER_FRAME, hitTurret);
_local4++;
};
_local5 = 0;
while (_local5 < jeeps.length) {
jeeps[_local5].removeEventListener(Event.ENTER_FRAME, hitJeep);
_local5++;
};
_local6 = 0;
while (_local6 < tanks.length) {
tanks[_local6].removeEventListener(Event.ENTER_FRAME, hitTank);
_local6++;
};
_local7 = 0;
while (_local7 < helicopters.length) {
helicopters[_local7].removeEventListener(Event.ENTER_FRAME, hitHelicopter);
_local7++;
};
shrinkTarget();
}
public function startMovingSoldier(_arg1:Event):void{
addChild(soldiers[soldierNum]);
soldiers[soldierNum].addEventListener(Event.ENTER_FRAME, moveSoldier);
soldierNum++;
}
public function deactivateAim(_arg1:KeyboardEvent):void{
if (!root.isPause){
if (levelNum != 2){
if (_arg1.keyCode == 32){
if (!shopOn){
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveTarget);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
stage.addEventListener(MouseEvent.MOUSE_MOVE, circMove);
stage.addEventListener(KeyboardEvent.KEY_UP, activateAim);
stage.removeEventListener(KeyboardEvent.KEY_UP, deactivateAim);
moveTargetSingle();
circleMoveSingle();
target_mc.visible = true;
gunHolder_mc.visible = true;
};
};
};
};
}
public function attackWallTank(_arg1:Event):void{
if (gOver == false){
if (!root.isPause){
if (wallHealth > 0){
wallHealth = (wallHealth - (wallDemageTanks + (5 * root.wallPlus)));
wallHealth_txt.text = String(wallHealth);
} else {
gameOver();
};
};
};
}
public function createSoldiers():void{
var _local1:uint;
_local1 = 0;
while (_local1 < soldiersTime) {
soldier_mc = new Soldier();
soldier_mc.x = ((Math.random() * 125) + stage.stageWidth);
soldier_mc.y = ((Math.random() * 100) + 290);
soldier_mc.name = ("soldier" + _local1);
soldiers.push(soldier_mc);
soldiersDestination[_local1] = ((Math.random() * 200) + 355);
solHealth = (soldiers[_local1].getChildByName("soldiersHealth").getChildAt(1).scaleX * 100);
soldiersHealthArr.push(solHealth);
_local1++;
};
}
public function startMovingTank(_arg1:Event):void{
addChild(tanks[tankNum]);
tanks[tankNum].addEventListener(Event.ENTER_FRAME, moveTank);
tankNum++;
}
public function startMovingBazooka(_arg1:Event):void{
addChild(bazookas[bazookaNum]);
bazookas[bazookaNum].addEventListener(Event.ENTER_FRAME, moveBazooka);
bazookaNum++;
}
public function moveTank(_arg1:Event):void{
if (!root.isPause){
if (root.isGame){
if (_arg1.target.x > tanksDestination[destTankNum]){
_arg1.target.x = (_arg1.target.x - 1.5);
_arg1.target.y = (_arg1.target.y - 0.05);
_arg1.target.scaleX = (_arg1.target.scaleY = (_arg1.target.scaleY - 0.0005));
} else {
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveTank);
_arg1.target.getChildAt(0).gotoAndPlay("shoot");
wallAttackTimerTank.addEventListener(TimerEvent.TIMER, attackWallTank);
wallAttackTimerTank.start();
wallDemageTanks = (wallDemageTanks + tankDemage);
destTankNum++;
};
};
};
}
function frame1(){
gameBrigthness = new ColorTransform();
gameBrigthness.redOffset = -100;
gameBrigthness.greenOffset = -100;
gameBrigthness.blueOffset = -100;
gameBrightnessNormal = new ColorTransform();
gameBrightnessNormal.redOffset = 0;
gameBrightnessNormal.greenOffset = 0;
gameBrightnessNormal.blueOffset = 0;
if (levelNum == 0){
wallHealth = 1000;
if (root.isHard == false){
soldiersTime = 8;
bazookasTime = 1;
turretsTime = 0;
jeepsTime = 0;
tanksTime = 0;
helicoptersTime = 0;
} else {
if (root.isHard){
soldiersTime = 15;
bazookasTime = 3;
turretsTime = 0;
jeepsTime = 0;
tanksTime = 0;
helicoptersTime = 0;
};
};
} else {
if (levelNum != 0){
soldiersTime = ((levelNum + 8) + Math.sqrt(Math.pow(Math.floor((root.hardMult - (Math.random() * 3))), 2)));
bazookasTime = (levelNum + Math.sqrt(Math.pow(Math.floor((root.hardMult - (Math.random() * 3))), 2)));
turretsTime = ((levelNum - 2) + Math.sqrt(Math.pow(Math.floor((root.hardMult - (Math.random() * 3))), 2)));
jeepsTime = ((levelNum - 3) + Math.sqrt(Math.pow(Math.floor((root.hardMult - (Math.random() * 3))), 2)));
tanksTime = ((levelNum - 4) + Math.sqrt(Math.pow(Math.floor((root.hardMult - (Math.random() * 3))), 2)));
helicoptersTime = ((levelNum - 5) + Math.sqrt(Math.pow(Math.floor((root.hardMult - (Math.random() * 3))), 2)));
};
};
root.isGame = true;
trace(("LEVEL NUM : " + levelNum));
trace(("SOLDIERS TIME : " + soldiersTime));
trace(("BAZOOKAS TIME : " + bazookasTime));
trace(("TURRERS TIME : " + turretsTime));
trace(("JEEPS TIME : " + jeepsTime));
trace(("TANKS TIME : " + tanksTime));
trace(("HELICOPTERS TIME : " + helicoptersTime));
levelNum++;
}
public function killSoldier(_arg1:MouseEvent):void{
if (sName < soldiers.length){
removeChild(getChildByName(("soldier" + sName)));
sName++;
};
if (bName < bazookas.length){
removeChild(getChildByName(("bazooka" + bName)));
bName++;
};
if (trName < turrets.length){
removeChild(getChildByName(("turret" + trName)));
trName++;
};
if (jName < jeeps.length){
removeChild(getChildByName(("jeep" + jName)));
jName++;
};
if (tkName < tanks.length){
removeChild(getChildByName(("tank" + tkName)));
tkName++;
};
if (hName < helicopters.length){
removeChild(getChildByName(("helicopter" + hName)));
hName++;
};
}
public function startMovingTurret(_arg1:Event):void{
addChild(turrets[turretNum]);
turrets[turretNum].addEventListener(Event.ENTER_FRAME, moveTurret);
turretNum++;
}
public function circleMoveSingle():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
currentAngle = -((((mouseX - (stage.stageWidth / 2)) / 5) + 180));
radians = ((currentAngle * Math.PI) / 180);
gunHolder_mc.x = ((stage.stageWidth / 2) + (radiusX * Math.sin(radians)));
gunHolder_mc.y = (600 + (radiusY * Math.cos(radians)));
_local1 = (mouseX - gunHolder_mc.x);
_local2 = (mouseY - gunHolder_mc.y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = Math.atan2(_local2, _local1);
if (mouseY < 375){
gunHolder_mc.rotation = ((_local4 * 180) / Math.PI);
gunHolder_mc.y = (gunHolder_mc.y + (-(_local3) / 5));
} else {
gunHolder_mc.rotation = -90;
gunHolder_mc.y = (mouseY + 100);
};
}
public function moveSoldier(_arg1:Event):void{
if (!root.isPause){
if (root.isGame){
if (_arg1.target.x > soldiersDestination[destSolNum]){
_arg1.target.x = (_arg1.target.x - 2);
_arg1.target.y = (_arg1.target.y - 0.15);
_arg1.target.scaleX = (_arg1.target.scaleY = (_arg1.target.scaleY - 0.0015));
} else {
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveSoldier);
_arg1.target.getChildAt(0).gotoAndPlay("shoot");
wallAttackTimerSoldier.addEventListener(TimerEvent.TIMER, attackWallSoldier);
wallAttackTimerSoldier.start();
wallDemageSoldiers = (wallDemageSoldiers + soldierDemage);
destSolNum++;
};
};
};
}
public function moreGames(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.google.com";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
function frame2(){
level_sd = new LevelSound();
solMusicNum = 0;
ctrl_Level = level_sd.play();
volumeLevel = ctrl_Level.soundTransform;
solMTimer = new Timer(2500);
solMTimer.addEventListener(TimerEvent.TIMER, playSolMusic);
if (levelNum == 3){
this.transform.colorTransform = gameBrigthness;
};
aimForce = true;
if (levelNum == 1){
buyedWeaponsArray = new Array();
buyedWeaponsArray.push(0);
};
if (levelNum == 1){
buyedWeapon++;
};
stage.addEventListener(KeyboardEvent.KEY_DOWN, selectWeapon);
stage.addEventListener(KeyboardEvent.KEY_UP, activateAim);
stage.addEventListener(Event.ENTER_FRAME, activateAimForce);
wallAttackTimerSoldier = new Timer(500);
wallAttackTimerBazooka = new Timer(1000);
wallAttackTimerTurret = new Timer(3000);
wallAttackTimerJeep = new Timer(2000);
wallAttackTimerTank = new Timer(5000);
wallAttackTimerHelicopter = new Timer(5000);
wallHealth_txt.visible = true;
wall_txt.visible = true;
wallHealth_txt.text = String(wallHealth);
stage.addEventListener(Event.ENTER_FRAME, destroyWall);
checkDemage();
target_mc = new Target();
addChild(target_mc);
addChild(gunHolder_mc);
target_mc.visible = false;
target_mc.mouseEnabled = false;
target_mc.mouseChildren = false;
Mouse.hide();
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveTarget);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
stage.addEventListener(MouseEvent.MOUSE_MOVE, circMove);
radiusX = 270;
radiusY = 100;
angle = 0;
circleMoveSingle();
reload_sd = new Reload();
reloadingTime = 500;
shootingSpeed = 100;
shootingSpeedSingle = 1;
ammoTimer = new Timer(shootingSpeed, maxAmmo);
ammoTimerSingle = new Timer(shootingSpeedSingle, 1);
reloadTimer = new Timer(reloadingTime, 1);
reloading = false;
weaponNum = 0;
bulletsNum = 0;
allBullets = 0;
debries = new Array();
debrieNum = 0;
speed = 10;
debriesTimer = new Timer(shootingSpeed);
debriesTimerSingle = new Timer(shootingSpeedSingle, 1);
setAmmo();
stage.addEventListener(MouseEvent.MOUSE_DOWN, downAmmo);
stage.addEventListener(KeyboardEvent.KEY_DOWN, reloadOnDemand);
addAmmo();
stop();
solTime = new Timer(500, soldiersTime);
bazTime = new Timer(1000, bazookasTime);
turTime = new Timer(1000, turretsTime);
jeepTime = new Timer(1500, jeepsTime);
tankTime = new Timer(3000, tanksTime);
helicTime = new Timer(4000, helicoptersTime);
if (soldiersTime > 0){
solTime.addEventListener(TimerEvent.TIMER, createSoldiersNum);
solTime.addEventListener(TimerEvent.TIMER, startMovingSoldier);
solTime.start();
};
if (bazookasTime > 0){
bazTime.addEventListener(TimerEvent.TIMER, createBazookasNum);
bazTime.addEventListener(TimerEvent.TIMER, startMovingBazooka);
bazTime.start();
} else {
bazookasTime = -1;
};
if (turretsTime > 0){
turTime.addEventListener(TimerEvent.TIMER, createTurretsNum);
turTime.addEventListener(TimerEvent.TIMER, startMovingTurret);
turTime.start();
} else {
turretsTime = -2;
};
if (jeepsTime > 0){
jeepTime.addEventListener(TimerEvent.TIMER, createJeepsNum);
jeepTime.addEventListener(TimerEvent.TIMER, startMovingJeep);
jeepTime.start();
} else {
jeepsTime = -3;
};
if (tanksTime > 0){
tankTime.addEventListener(TimerEvent.TIMER, createTanksNum);
tankTime.addEventListener(TimerEvent.TIMER, startMovingTank);
tankTime.start();
} else {
tanksTime = -4;
};
if (helicoptersTime > 0){
helicTime.addEventListener(TimerEvent.TIMER, createHelicoptersNum);
helicTime.addEventListener(TimerEvent.TIMER, startMovingHelicopter);
helicTime.start();
} else {
helicoptersTime = -5;
};
startSoldier = 0;
startBazooka = 0;
startTurret = 0;
startJeep = 0;
startTank = 0;
startHelicopter = 0;
levelNum_txt.text = String(levelNum);
stage.addEventListener(Event.ENTER_FRAME, shopHandler);
soldiers = new Array();
soldiersHealthArr = new Array();
solPartNum = 0;
soldierIsDead = false;
soldiersDestination = new Array();
destSolNum = 0;
soldierNum = 0;
sortSoldiersArr = new Array();
soldiersZ = new Array();
soldierDemage = 1;
maxSoldiers = 20;
solDebrieNum = 0;
soldierSd = new SoldierSound();
bazookas = new Array();
bazookasHealthArr = new Array();
bazPartNum = 0;
bazookaIsDead = false;
bazookasDestination = new Array();
destBazNum = 0;
bazookaNum = 0;
sortBazookasArr = new Array();
bazookasZ = new Array();
bazookaDemage = 3;
maxBazookas = 20;
bazookaSd = new BazookaSound();
turrets = new Array();
turretsHealthArr = new Array();
turPartNum = 0;
turretIsDead = false;
turretsDestination = new Array();
destTurNum = 0;
turretNum = 0;
sortTurretsArr = new Array();
turretsZ = new Array();
turretDemage = 10;
maxTurrets = 20;
turretSd = new TurretSound();
jeeps = new Array();
jeepsHealthArr = new Array();
jeepPartNum = 0;
jeepIsDead = false;
jeepsDestination = new Array();
destJeepNum = 0;
jeepNum = 0;
sortJeepsArr = new Array();
jeepsZ = new Array();
jeepDemage = 15;
maxJeeps = 20;
jeepSd = new JeepSound();
tanks = new Array();
tanksHealthArr = new Array();
tankPartNum = 0;
tankIsDead = false;
tanksDestination = new Array();
destTankNum = 0;
tankNum = 0;
sortTanksArr = new Array();
tanksZ = new Array();
tankDemage = 50;
maxTanks = 20;
tankSd = new TankSound();
helicopters = new Array();
helicoptersHealthArr = new Array();
helicopterPartNum = 0;
helicopterIsDead = false;
helicoptersDestination = new Array();
destHelicopterNum = 0;
helicopterNum = 0;
sortHelicopterArr = new Array();
helicoptersZ = new Array();
helicopterDemage = 50;
maxHelicopters = 20;
helicopterFlySd = new HelicopterFlySound();
if ((((((((((((soldiersTime > 0)) && ((bazookasTime > 0)))) && ((turretsTime > 0)))) && ((jeepsTime > 0)))) && ((tanksTime > 0)))) && ((helicoptersTime > 0)))){
allLevelUnits = (((((soldiersTime + bazookasTime) + turretsTime) + jeepsTime) + tanksTime) + helicoptersTime);
} else {
if ((((((((((soldiersTime > 0)) && ((bazookasTime > 0)))) && ((turretsTime > 0)))) && ((jeepsTime > 0)))) && ((tanksTime > 0)))){
allLevelUnits = ((((soldiersTime + bazookasTime) + turretsTime) + jeepsTime) + tanksTime);
} else {
if ((((((((soldiersTime > 0)) && ((bazookasTime > 0)))) && ((turretsTime > 0)))) && ((jeepsTime > 0)))){
allLevelUnits = (((soldiersTime + bazookasTime) + turretsTime) + jeepsTime);
} else {
if ((((((soldiersTime > 0)) && ((bazookasTime > 0)))) && ((turretsTime > 0)))){
allLevelUnits = ((soldiersTime + bazookasTime) + turretsTime);
} else {
if ((((soldiersTime > 0)) && ((bazookasTime > 0)))){
allLevelUnits = (soldiersTime + bazookasTime);
} else {
if (soldiersTime > 0){
allLevelUnits = soldiersTime;
};
};
};
};
};
};
trace(("All Level Units" + allLevelUnits));
createSoldiers();
createBazookas();
createTurrets();
createJeeps();
createTanks();
createHelicopters();
sName = 0;
trName = 0;
tkName = 0;
jName = 0;
hName = 0;
bName = 0;
}
function frame3(){
stop();
root.isGame = false;
rewind_btn.addEventListener(MouseEvent.CLICK, rewind);
moreGames_btn.addEventListener(MouseEvent.CLICK, moreGames);
trace(("Soldiers Length" + soldiers.length));
}
function frame4(){
stop();
gOver = true;
gameOver_mc.tryAgain_mc.addEventListener(MouseEvent.CLICK, backToGame);
gameOver_mc.mainMenu.addEventListener(MouseEvent.CLICK, backToWelcome);
gameOver_mc.moreGames_btn.addEventListener(MouseEvent.CLICK, moreGamesOver);
gameOver_mc.tryAgain_mc.buttonMode = true;
gameOver_mc.mainMenu.buttonMode = true;
gameOver_mc.moreGames_btn.buttonMode = true;
}
public function levelDownTrigger():void{
stage.addEventListener(Event.ENTER_FRAME, levelDown);
}
public function checkDemage():void{
if ((((wallHealth <= 1000)) && ((wallHealth > 750)))){
bg_mc.gotoAndStop(1);
} else {
if ((((wallHealth < 750)) && ((wallHealth > 500)))){
bg_mc.gotoAndStop(2);
} else {
if ((((wallHealth < 500)) && ((wallHealth > 300)))){
bg_mc.gotoAndStop(3);
} else {
if ((((wallHealth < 300)) && ((wallHealth > 150)))){
bg_mc.gotoAndStop(4);
} else {
if ((((wallHealth < 150)) && ((wallHealth > 0)))){
bg_mc.gotoAndStop(5);
};
};
};
};
};
}
public function rewind(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
root.WNum = (root.ar_Weapons.length - 1);
root.gunSelectHolder.gotoAndStop((root.ar_Weapons[root.WNum] + 1));
mSwitch = false;
root.downMusic();
gunShop_mc.winDownTimer.stop();
_local2 = (soldiers.length - 1);
while (_local2 >= 0) {
if (getChildByName(("soldier" + _local2)) != null){
removeChild(getChildByName(("soldier" + _local2)));
soldiers.pop();
};
_local2--;
};
_local3 = (bazookas.length - 1);
while (_local3 >= 0) {
if (getChildByName(("bazooka" + _local3)) != null){
removeChild(getChildByName(("bazooka" + _local3)));
bazookas.pop();
};
_local3--;
};
_local4 = (turrets.length - 1);
while (_local4 >= 0) {
if (getChildByName(("turret" + _local4)) != null){
removeChild(getChildByName(("turret" + _local4)));
turrets.pop();
};
_local4--;
};
_local5 = (jeeps.length - 1);
while (_local5 >= 0) {
if (getChildByName(("jeep" + _local5)) != null){
removeChild(getChildByName(("jeep" + _local5)));
jeeps.pop();
};
_local5--;
};
_local6 = (tanks.length - 1);
while (_local6 >= 0) {
if (getChildByName(("jeep" + _local5)) != null){
removeChild(getChildByName(("tank" + _local6)));
tanks.pop();
};
_local6--;
};
_local7 = (helicopters.length - 1);
while (_local7 >= 0) {
if (getChildByName(("jeep" + _local5)) != null){
removeChild(getChildByName(("helicopter" + _local7)));
helicopters.pop();
};
_local7--;
};
allBullets = 0;
headshotsNum = 0;
legshotsNum = 0;
levelMoney = 0;
accuracy = 0;
solDebrieNum = 0;
shopOn = false;
parent.gunSelectHolder.visible = true;
root.curFrame = 0;
parent.second = false;
parent.checkActivity();
gunShop_mc.winDownTrigger();
wallAttackTimerSoldier.stop();
wallAttackTimerBazooka.stop();
wallAttackTimerTurret.stop();
wallAttackTimerJeep.stop();
wallAttackTimerTank.stop();
wallAttackTimerHelicopter.stop();
root.addZoom();
gotoAndPlay("initGame");
}
public function moveTarget(_arg1:MouseEvent):void{
if (!root.isPause){
moveTargetSingle();
};
}
public function gun1Fire():void{
var _local1:int;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
if (!gOver){
if (debrieNum < maxAmmo){
bullet_mc = new Bullet();
if (root.ar_Weapons[root.WNum] == 0){
_local2 = 0;
while (_local2 < bullet_mc.numChildren) {
bullet_mc.getChildAt(_local2).visible = false;
_local2++;
};
bullet_mc.getChildAt(0).visible = true;
gunHolder_mc.fire_mc.play();
} else {
if (root.ar_Weapons[root.WNum] == 1){
_local3 = 0;
while (_local3 < bullet_mc.numChildren) {
bullet_mc.getChildAt(_local3).visible = false;
_local3++;
};
bullet_mc.getChildAt(1).visible = true;
gunHolder_mc.fire_mc.play();
} else {
if (root.ar_Weapons[root.WNum] == 2){
_local4 = 0;
while (_local4 < bullet_mc.numChildren) {
bullet_mc.getChildAt(_local4).visible = false;
_local4++;
};
bullet_mc.getChildAt(2).visible = true;
gunHolder_mc.fire_mc.play();
} else {
if (root.ar_Weapons[root.WNum] == 3){
_local5 = 0;
while (_local5 < bullet_mc.numChildren) {
bullet_mc.getChildAt(_local5).visible = false;
_local5++;
};
bullet_mc.getChildAt(3).visible = true;
gunHolder_mc.fire_mc.play();
} else {
if (root.ar_Weapons[root.WNum] == 4){
_local6 = 0;
while (_local6 < bullet_mc.numChildren) {
bullet_mc.getChildAt(_local6).visible = false;
_local6++;
};
bullet_mc.getChildAt(4).visible = true;
gunHolder_mc.fire_mc.play();
} else {
if (root.ar_Weapons[root.WNum] == 5){
_local7 = 0;
while (_local7 < bullet_mc.numChildren) {
bullet_mc.getChildAt(_local7).visible = false;
_local7++;
};
bullet_mc.getChildAt(5).visible = true;
gunHolder_mc.fire_mc.play();
} else {
if (root.ar_Weapons[root.WNum] == 6){
_local8 = 0;
while (_local8 < bullet_mc.numChildren) {
bullet_mc.getChildAt(_local8).visible = false;
_local8++;
};
bullet_mc.getChildAt(6).visible = true;
gunHolder_mc.fire_mc.play();
};
};
};
};
};
};
};
addChild(bullet_mc);
bullet_mc.name = ("debrie" + debrieNum);
debries.push(bullet_mc);
if (debrieNum < maxAmmo){
debries[debrieNum].x = (mouseX + (((Math.random() * debrieNum) * 4) * (Math.round(Math.random()) - Math.round(Math.random()))));
debries[debrieNum].y = (mouseY + (((Math.random() * debrieNum) * 4) * (Math.round(Math.random()) - Math.round(Math.random()))));
} else {
debries[debrieNum].x = (mouseX + (Math.random() * 30));
debries[debrieNum].y = (mouseY + (Math.random() * 30));
};
maxElement = (debries.length - 1);
_local1 = (debries.length - 1);
while (_local1 >= 0) {
debries[_local1].alpha = (debries[_local1].alpha - (speed / 100));
debries[_local1].scaleX = (debries[_local1].scaleX - (speed / 100));
debries[_local1].scaleY = (debries[_local1].scaleY - (speed / 100));
_local1--;
};
debrieNum++;
} else {
debriesClear();
};
};
}
public function createBazookasNum(_arg1:Event):void{
bazookasNum_txt.text = String(startBazooka);
startBazooka++;
}
public function moveBazooka(_arg1:Event):void{
if (!root.isPause){
if (root.isGame){
if (_arg1.target.x > bazookasDestination[destBazNum]){
_arg1.target.x = (_arg1.target.x - 2);
_arg1.target.y = (_arg1.target.y - 0.15);
_arg1.target.scaleX = (_arg1.target.scaleY = (_arg1.target.scaleY - 0.0015));
} else {
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveBazooka);
_arg1.target.getChildAt(0).gotoAndStop("shoot");
wallAttackTimerBazooka.addEventListener(TimerEvent.TIMER, attackWallBazooka);
wallAttackTimerBazooka.start();
wallDemageBazookas = (wallDemageBazookas + bazookaDemage);
destBazNum++;
};
};
};
}
public function backToGame(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
levelNum = 0;
parent.curFrame = 0;
second = false;
parent.zoomForce = true;
gOver = false;
mSwitch = false;
parent.addZoom();
root.gunSelectHolder.visible = true;
wallSwitch = 0;
_local2 = (soldiers.length - 1);
while (_local2 >= 0) {
if (getChildByName(("soldier" + _local2)) != null){
removeChild(getChildByName(("soldier" + _local2)));
soldiers.pop();
};
_local2--;
};
_local3 = (bazookas.length - 1);
while (_local3 >= 0) {
if (getChildByName(("bazooka" + _local3)) != null){
removeChild(getChildByName(("bazooka" + _local3)));
bazookas.pop();
};
_local3--;
};
_local4 = (turrets.length - 1);
while (_local4 >= 0) {
if (getChildByName(("turret" + _local4)) != null){
removeChild(getChildByName(("turret" + _local4)));
turrets.pop();
};
_local4--;
};
_local5 = (jeeps.length - 1);
while (_local5 >= 0) {
if (getChildByName(("jeep" + _local5)) != null){
removeChild(getChildByName(("jeep" + _local5)));
jeeps.pop();
};
_local5--;
};
_local6 = (tanks.length - 1);
while (_local6 >= 0) {
if (getChildByName(("tank" + _local6)) != null){
removeChild(getChildByName(("tank" + _local6)));
tanks.pop();
};
_local6--;
};
_local7 = (helicopters.length - 1);
while (_local7 >= 0) {
if (getChildByName(("helicopter" + _local7)) != null){
removeChild(getChildByName(("helicopter" + _local7)));
helicopters.pop();
};
_local7--;
};
gotoAndPlay("initGame");
}
public function createHelicopters():void{
var _local1:uint;
_local1 = 0;
while (_local1 < helicoptersTime) {
helicopter_mc = new Helicopter();
helicopter_mc.x = ((Math.random() * 100) + stage.stageWidth);
helicopter_mc.y = ((Math.random() * 50) + 25);
helicopter_mc.name = ("helicopter" + _local1);
helicopters.push(helicopter_mc);
helicoptersDestination[_local1] = ((Math.random() * 125) + 275);
helicopterHealth = (helicopters[_local1].getChildByName("helicopterHealth_mc").getChildAt(1).scaleX * 100);
helicoptersHealthArr.push(helicopterHealth);
_local1++;
};
}
public function createTurrets():void{
var _local1:uint;
_local1 = 0;
while (_local1 < turretsTime) {
turret_mc = new Turret();
turret_mc.x = ((Math.random() * 100) + stage.stageWidth);
turret_mc.y = ((Math.random() * 80) + 250);
turret_mc.name = ("turret" + _local1);
turrets.push(turret_mc);
turretsDestination[_local1] = ((Math.random() * 100) + 400);
turHealth = (turrets[_local1].getChildByName("turretHealth_mc").getChildAt(1).scaleX * 100);
turretsHealthArr.push(turHealth);
_local1++;
};
}
public function destroyWall(_arg1:Event):void{
if ((((wallHealth < 750)) && ((wallHealth > 500)))){
if (wallSwitch == 0){
bg_mc.nextFrame();
wallSwitch++;
};
} else {
if ((((wallHealth < 500)) && ((wallHealth > 300)))){
if (wallSwitch == 1){
bg_mc.nextFrame();
wallSwitch++;
};
} else {
if ((((wallHealth < 300)) && ((wallHealth > 150)))){
if (wallSwitch == 2){
bg_mc.nextFrame();
wallSwitch++;
};
} else {
if ((((wallHealth < 150)) && ((wallHealth > 0)))){
if (wallSwitch == 3){
bg_mc.nextFrame();
wallSwitch++;
};
};
};
};
};
}
public function growTargetSingle():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (!root.isPause){
_local1 = new Tween(target_mc.tPart1_mc, "y", Regular.easeOut, target_mc.tPart1_mc.y, (target_mc.tPart1_mc.y - 15), 5, false);
_local2 = new Tween(target_mc.tPart2_mc, "y", Regular.easeOut, target_mc.tPart2_mc.y, (target_mc.tPart2_mc.y + 15), 5, false);
_local3 = new Tween(target_mc.tPart3_mc, "x", Regular.easeOut, target_mc.tPart3_mc.x, (target_mc.tPart1_mc.x + 15), 5, false);
_local4 = new Tween(target_mc.tPart4_mc, "x", Regular.easeOut, target_mc.tPart4_mc.x, (target_mc.tPart1_mc.x - 15), 5, false);
_local1.addEventListener(TweenEvent.MOTION_FINISH, shrinkTargetSingle);
};
}
public function attackWallSoldier(_arg1:Event):void{
if (gOver == false){
if (!root.isPause){
if (wallHealth > 0){
wallHealth = (wallHealth - (wallDemageSoldiers + (1 * root.wallPlus)));
wallHealth_txt.text = String(wallHealth);
} else {
gameOver();
};
};
};
}
public function shrinkTarget():void{
new Tween(target_mc.tPart1_mc, "y", Regular.easeOut, target_mc.tPart1_mc.y, -4.7, 10, false);
new Tween(target_mc.tPart2_mc, "y", Regular.easeOut, target_mc.tPart2_mc.y, 4.7, 10, false);
new Tween(target_mc.tPart3_mc, "x", Regular.easeOut, target_mc.tPart3_mc.x, 4.6, 10, false);
new Tween(target_mc.tPart4_mc, "x", Regular.easeOut, target_mc.tPart4_mc.x, -4.6, 10, false);
}
public function createTurretsNum(_arg1:Event):void{
turretsNum_txt.text = String(startTurret);
startTurret++;
}
public function debriesOn():void{
if (!gOver){
if (!root.isPause){
if (root.ar_Weapons[root.WNum] == 0){
gun1Fire();
stage.addEventListener(MouseEvent.MOUSE_UP, debriesOff);
};
if (root.ar_Weapons[root.WNum] == 1){
gun1Fire();
stage.addEventListener(MouseEvent.MOUSE_UP, debriesOff);
};
if (root.ar_Weapons[root.WNum] == 2){
gun1Fire();
stage.addEventListener(MouseEvent.MOUSE_UP, debriesOff);
};
if (root.ar_Weapons[root.WNum] == 3){
gun1Fire();
stage.addEventListener(MouseEvent.MOUSE_UP, debriesOff);
};
if (root.ar_Weapons[root.WNum] == 4){
gun1Fire();
stage.addEventListener(MouseEvent.MOUSE_UP, debriesOff);
};
if (root.ar_Weapons[root.WNum] == 5){
gun1Fire();
stage.addEventListener(MouseEvent.MOUSE_UP, debriesOff);
};
};
};
}
public function createTanks():void{
var _local1:uint;
_local1 = 0;
while (_local1 < tanksTime) {
tank_mc = new Tank();
tank_mc.x = ((Math.random() * 100) + stage.stageWidth);
tank_mc.y = ((Math.random() * 80) + 300);
tank_mc.name = ("tank" + _local1);
tanks.push(tank_mc);
tanksDestination[_local1] = ((Math.random() * 150) + 350);
tankHealth = (tanks[_local1].getChildByName("tankHealth_mc").getChildAt(1).scaleX * 100);
tanksHealthArr.push(tankHealth);
_local1++;
};
}
public function levelUp(_arg1:Event):void{
if (volumeLevel.volume <= 0.5){
volumeLevel.volume = (volumeLevel.volume + 0.025);
ctrl_Level.soundTransform = volumeLevel;
} else {
stage.removeEventListener(Event.ENTER_FRAME, levelUp);
};
}
public function attackWallBazooka(_arg1:Event):void{
if (gOver == false){
if (!root.isPause){
if (wallHealth > 0){
wallHealth = (wallHealth - (wallDemageBazookas + (3 * root.wallPlus)));
wallHealth_txt.text = String(wallHealth);
} else {
gameOver();
};
};
};
}
public function debriesClear():void{
var _local1:int;
debrieNum = 0;
_local1 = (debries.length - 1);
while (_local1 >= 0) {
debries.shift();
removeChild(getChildByName(("debrie" + _local1)));
_local1--;
};
}
public function hitJeep(_arg1:Event):void{
var _local2:*;
var _local3:int;
_local2 = _arg1.target.getChildByName("jeepHealth").getChildAt(1);
if (_arg1.target.getChildByName("bodyMask").visible == true){
_local3 = (debries.length - 1);
while (_local3 >= 0) {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("bodyMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demJeep);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitJeep);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveJeep);
_arg1.target.getChildByName("jeepAnim_mc").gotoAndPlay("die");
};
};
};
_local3--;
};
};
}
public function removeAmmo(_arg1:Event):void{
if (!gOver){
if (!root.isPause){
if (ammo_mc.numChildren > 0){
ammo_mc.removeChild(ammo_mc.getChildAt((ammo_mc.numChildren - 1)));
growTarget();
debriesOn();
} else {
if (ammo_mc.numChildren == 0){
debriesClear();
reloadTimer.addEventListener(TimerEvent.TIMER, reloadAmmoEvent);
reloadTimer.start();
stage.removeEventListener(MouseEvent.MOUSE_DOWN, downAmmo);
shrinkTarget();
};
};
allBullets++;
};
};
}
public function circMove(_arg1:Event):void{
if (!root.isPause){
circleMoveSingle();
};
}
public function attackWallHelicopter(_arg1:Event):void{
if (gOver == false){
if (!root.isPause){
if (wallHealth > 0){
wallHealth = (wallHealth - (wallDemageHelicopters + (10 * root.wallPlus)));
wallHealth_txt.text = String(wallHealth);
} else {
gameOver();
};
};
};
}
public function reloadOnDemand(_arg1:KeyboardEvent):void{
if (!root.isPause){
if (_arg1.keyCode == 82){
if (!reloading){
clearAmmo();
reloading = true;
reloadTimer.addEventListener(TimerEvent.TIMER, reloadAmmoEvent);
reloadTimer.start();
stage.removeEventListener(MouseEvent.MOUSE_DOWN, downAmmo);
debriesClear();
};
};
};
}
public function playSolMusic(_arg1:TimerEvent):void{
if (solMusicNum > 1){
soldierSd.play();
};
}
public function shrinkTargetSingle(_arg1:TweenEvent):void{
shrinkTarget();
}
public function createBazookas():void{
var _local1:uint;
_local1 = 0;
while (_local1 < bazookasTime) {
bazooka_mc = new Bazooka();
bazooka_mc.x = ((Math.random() * 100) + stage.stageWidth);
bazooka_mc.y = ((Math.random() * 50) + 275);
bazooka_mc.name = ("bazooka" + _local1);
bazookas.push(bazooka_mc);
bazookasDestination[_local1] = ((Math.random() * 100) + 400);
bazHealth = (bazookas[_local1].getChildByName("bazookasHealth").getChildAt(1).scaleX * 100);
bazookasHealthArr.push(bazHealth);
trace(bazookas[_local1].getChildAt(4).getChildAt(1).name);
_local1++;
};
}
public function mouseLeaveHandler(_arg1:Event):void{
target_mc.visible = false;
}
public function selectWeapon(_arg1:KeyboardEvent):void{
if (!root.isPause){
if (levelNum != 2){
if (root.WNum > 0){
if (_arg1.keyCode == 40){
root.WNum--;
root.gunSelectHolder.gotoAndStop((root.ar_Weapons[root.WNum] + 1));
gunHolder_mc.gotoAndStop((root.ar_Weapons[root.WNum] + 1));
clearAmmo();
setAmmo();
addAmmo();
ammoTimer = new Timer(shootingSpeed, maxAmmo);
ammoTimer.reset();
};
};
if (root.WNum < (root.ar_Weapons.length - 1)){
if (_arg1.keyCode == 38){
root.WNum++;
root.gunSelectHolder.gotoAndStop((root.ar_Weapons[root.WNum] + 1));
gunHolder_mc.gotoAndStop((root.ar_Weapons[root.WNum] + 1));
clearAmmo();
setAmmo();
addAmmo();
ammoTimer = new Timer(shootingSpeed, maxAmmo);
ammoTimer.reset();
};
};
};
};
}
public function levelDown(_arg1:Event):void{
if (volumeLevel.volume > 0){
volumeLevel.volume = (volumeLevel.volume - 0.025);
ctrl_Level.soundTransform = volumeLevel;
} else {
stage.removeEventListener(Event.ENTER_FRAME, levelDown);
};
}
public function setAmmo():void{
if (root.ar_Weapons[root.WNum] == 0){
maxAmmo = 15;
shootingSpeed = 100;
demSolHead = 1;
demSolBody = (0.05 - (root.healthMult * 10));
demSolLegs = (0.005 - (root.healthMult * 10));
demBazHead = 0.8;
demBazBody = (0.05 - (root.healthMult * 10));
demBazLegs = (0.001 - (root.healthMult * 10));
demTurret = (0.003 - (root.healthMult * 10));
demJeep = (0.005 - (root.healthMult * 10));
demTank = (0.001 - (root.healthMult * 10));
demHelic = (0.003 - (root.healthMult * 10));
} else {
if (root.ar_Weapons[root.WNum] == 1){
maxAmmo = 25;
shootingSpeed = 100;
demSolHead = 1;
demSolBody = (0.07 - (root.healthMult * 10));
demSolLegs = (0.01 - (root.healthMult * 10));
demBazHead = 0.8;
demBazBody = (0.08 - (root.healthMult * 10));
demBazLegs = (0.08 - (root.healthMult * 10));
demTurret = (0.01 - (root.healthMult * 10));
demJeep = (0.01 - (root.healthMult * 10));
demTank = (0.007 - root.healthMult);
demHelic = (0.005 - root.healthMult);
} else {
if (root.ar_Weapons[root.WNum] == 2){
maxAmmo = 15;
shootingSpeed = 100;
demSolHead = (1 - (root.healthMult * 10));
demSolBody = (0.5 - (root.healthMult * 10));
demSolLegs = (1 - (root.healthMult * 10));
demBazHead = 1;
demBazBody = (0.3 - (root.healthMult * 10));
demBazLegs = (0.05 - (root.healthMult * 10));
demTurret = (0.05 - (root.healthMult * 10));
demJeep = (0.03 - (root.healthMult * 10));
demTank = (0.05 - (root.healthMult * 10));
demHelic = (0.08 - (root.healthMult * 10));
} else {
if (root.ar_Weapons[root.WNum] == 3){
maxAmmo = 25;
shootingSpeed = 200;
demSolHead = 1;
demSolBody = (0.3 - (root.healthMult * 10));
demSolLegs = (0.5 - (root.healthMult * 10));
demBazHead = 1;
demBazBody = (0.3 - (root.healthMult * 10));
demBazLegs = (0.5 - (root.healthMult * 10));
demTurret = (0.01 - (root.healthMult * 10));
demJeep = (0.05 - (root.healthMult * 10));
demTank = (0.01 - (root.healthMult * 10));
demHelic = (0.05 - (root.healthMult * 10));
} else {
if (root.ar_Weapons[root.WNum] == 4){
maxAmmo = 35;
shootingSpeed = 100;
demSolHead = 1;
demSolBody = (0.1 - (root.healthMult * 100));
demSolLegs = (0.03 - (root.healthMult * 10));
demBazHead = 1;
demBazBody = (0.05 - (root.healthMult * 10));
demBazLegs = (0.03 - (root.healthMult * 10));
demTurret = (0.008 - (root.healthMult * 10));
demJeep = (0.03 - (root.healthMult * 100));
demTank = (0.005 - (root.healthMult * 10));
demHelic = (0.003 - (root.healthMult * 10));
} else {
if (root.ar_Weapons[root.WNum] == 5){
maxAmmo = 50;
shootingSpeed = 100;
demSolHead = 1;
demSolBody = (1 - (root.healthMult * 100));
demSolLegs = (0.1 - (root.healthMult * 100));
demBazHead = (1 - (root.healthMult * 100));
demBazBody = (1 - (root.healthMult * 100));
demBazLegs = (0.05 - (root.healthMult * 100));
demTurret = (0.5 - (root.healthMult * 10));
demJeep = (0.3 - (root.healthMult * 10));
demTank = (0.1 - (root.healthMult * 10));
demHelic = (0.5 - (root.healthMult * 10));
};
};
};
};
};
};
}
public function runMusic():void{
if (solMusicNum <= 10){
solMusicNum++;
solMTimer.delay = (2500 / solMusicNum);
};
}
public function hitTurret(_arg1:Event):void{
var _local2:*;
var _local3:int;
_local2 = _arg1.target.getChildByName("turretHealth_mc").getChildAt(1);
if (_arg1.target.getChildByName("bodyMask").visible == true){
_local3 = (debries.length - 1);
while (_local3 >= 0) {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("bodyMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demTurret);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitTurret);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveTurret);
_arg1.target.getChildByName("turAnim_mc").gotoAndPlay("die");
};
};
};
_local3--;
};
};
}
public function hitSoldier(_arg1:Event):void{
var _local2:*;
var _local3:int;
_local2 = _arg1.target.getChildByName("soldiersHealth").getChildAt(1);
if (gOver == false){
if (_arg1.target.getChildByName("bodyMask").visible == true){
_local3 = (debries.length - 1);
while (_local3 >= 0) {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("headMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demSolHead);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitSoldier);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveSoldier);
_arg1.target.getChildByName("guy").gotoAndPlay("headShot");
};
};
} else {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("bodyMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demSolBody);
} else {
if ((((_local2.scaleX <= 0)) && (!((_arg1.target == null))))){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitSoldier);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveSoldier);
_arg1.target.getChildByName("guy").gotoAndPlay("die");
};
};
} else {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("legsMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demSolLegs);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitSoldier);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveSoldier);
_arg1.target.getChildByName("guy").gotoAndPlay("legShot");
};
};
};
};
};
_local3--;
};
};
};
}
public function attackWallJeep(_arg1:Event):void{
if (gOver == false){
if (!root.isPause){
if (wallHealth > 0){
wallHealth = (wallHealth - (wallDemageJeeps + (5 * root.wallPlus)));
wallHealth_txt.text = String(wallHealth);
} else {
gameOver();
};
};
};
}
public function createHelicoptersNum(_arg1:Event):void{
helicoptersNum_txt.text = String(startHelicopter);
startHelicopter++;
}
public function moveHelicopter(_arg1:Event):void{
if (!root.isPause){
if (root.isGame){
if (_arg1.target.x > helicoptersDestination[destHelicopterNum]){
_arg1.target.x = (_arg1.target.x - 3);
_arg1.target.y = (_arg1.target.y - 0.2);
_arg1.target.scaleX = (_arg1.target.scaleY = (_arg1.target.scaleY - 0.0005));
} else {
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveHelicopter);
_arg1.target.getChildAt(0).gotoAndPlay("shoot");
wallAttackTimerHelicopter.addEventListener(TimerEvent.TIMER, attackWallHelicopter);
wallAttackTimerHelicopter.start();
wallDemageHelicopters = (wallDemageHelicopters + helicopterDemage);
destHelicopterNum++;
};
};
};
}
public function downAmmo(_arg1:MouseEvent):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
ammoTimer.addEventListener(TimerEvent.TIMER, removeAmmo);
ammoTimer.start();
ammoTimerSingle.addEventListener(TimerEvent.TIMER, removeAmmo);
ammoTimerSingle.start();
stage.addEventListener(MouseEvent.MOUSE_UP, holdAmmo);
_local2 = 0;
while (_local2 < soldiers.length) {
soldiers[_local2].addEventListener(Event.ENTER_FRAME, hitSoldier);
_local2++;
};
_local3 = 0;
while (_local3 < bazookas.length) {
bazookas[_local3].addEventListener(Event.ENTER_FRAME, hitBazooka);
_local3++;
};
_local4 = 0;
while (_local4 < turrets.length) {
turrets[_local4].addEventListener(Event.ENTER_FRAME, hitTurret);
_local4++;
};
_local5 = 0;
while (_local5 < jeeps.length) {
jeeps[_local5].addEventListener(Event.ENTER_FRAME, hitJeep);
_local5++;
};
_local6 = 0;
while (_local6 < tanks.length) {
tanks[_local6].addEventListener(Event.ENTER_FRAME, hitTank);
_local6++;
};
_local7 = 0;
while (_local7 < helicopters.length) {
helicopters[_local7].addEventListener(Event.ENTER_FRAME, hitHelicopter);
_local7++;
};
}
public function moveJeep(_arg1:Event):void{
if (!root.isPause){
if (root.isGame){
if (_arg1.target.x > jeepsDestination[destJeepNum]){
_arg1.target.x = (_arg1.target.x - 1.5);
_arg1.target.y = (_arg1.target.y - 0.1);
_arg1.target.scaleX = (_arg1.target.scaleY = (_arg1.target.scaleY - 0.001));
} else {
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveJeep);
_arg1.target.getChildAt(0).gotoAndPlay("shoot");
wallAttackTimerJeep.addEventListener(TimerEvent.TIMER, attackWallJeep);
wallAttackTimerJeep.start();
wallDemageJeeps = (wallDemageJeeps + jeepDemage);
destJeepNum++;
};
};
};
}
public function backToMain():void{
levelNum = 0;
parent.curFrame = 0;
second = false;
parent.zoomForce = true;
gOver = false;
parent.addZoom();
}
public function startMovingJeep(_arg1:Event):void{
addChild(jeeps[jeepNum]);
jeeps[jeepNum].addEventListener(Event.ENTER_FRAME, moveJeep);
jeepNum++;
}
public function restoreSelection(_arg1:TweenEvent):void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, selectWeapon);
}
public function createJeeps():void{
var _local1:uint;
_local1 = 0;
while (_local1 < jeepsTime) {
jeep_mc = new Jeep();
jeep_mc.x = ((Math.random() * 100) + stage.stageWidth);
jeep_mc.y = ((Math.random() * 80) + 300);
jeep_mc.name = ("jeep" + _local1);
jeeps.push(jeep_mc);
jeepsDestination[_local1] = ((Math.random() * 100) + 350);
jeepHealth = (jeeps[_local1].getChildByName("jeepHealth").getChildAt(1).scaleX * 100);
jeepsHealthArr.push(jeepHealth);
_local1++;
};
}
public function activateAimForce(_arg1:Event):void{
if (!root.isPause){
if ((((levelNum == 2)) && ((aimForce == true)))){
if (!shopOn){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveTarget);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, circMove);
stage.addEventListener(KeyboardEvent.KEY_UP, deactivateAim);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, activateAim);
target_mc.visible = false;
gunHolder_mc.visible = false;
};
aimForce = false;
};
};
}
public function clearAmmo():void{
var _local1:int;
_local1 = (ammo_mc.numChildren - 1);
while (_local1 >= 0) {
ammo_mc.removeChild(ammo_mc.getChildAt(_local1));
_local1--;
};
}
public function hitBazooka(_arg1:Event):void{
var _local2:*;
var _local3:int;
if (gOver == false){
_local2 = _arg1.target.getChildByName("bazookasHealth").getChildAt(1);
if (_arg1.target.getChildByName("bazBodyMask").visible == true){
_local3 = (debries.length - 1);
while (_local3 >= 0) {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("bazHeadMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demBazHead);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitBazooka);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveBazooka);
_arg1.target.getChildByName("bazookaAnim").gotoAndPlay("headShot");
};
};
} else {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("bazBodyMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demBazBody);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitBazooka);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveBazooka);
_arg1.target.getChildByName("bazookaAnim").gotoAndPlay("die");
};
};
} else {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("bazLegsMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demBazLegs);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitBazooka);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveBazooka);
_arg1.target.getChildByName("bazookaAnim").gotoAndPlay("legShot");
};
};
};
};
};
_local3--;
};
};
};
}
public function reloadAmmoEvent(_arg1:Event):void{
if (!gOver){
reloadAmmo();
};
}
public function debriesOff(_arg1:Event):void{
debriesClear();
}
public function gotoShop():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
trace(("DEAD UNITS : " + deadUnits));
solMTimer.delay = 2500;
solMTimer.stop();
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveTarget);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, circMove);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, downAmmo);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, reloadOnDemand);
wallAttackTimerSoldier.removeEventListener(TimerEvent.TIMER, attackWallSoldier);
wallAttackTimerBazooka.removeEventListener(TimerEvent.TIMER, attackWallBazooka);
wallAttackTimerTurret.removeEventListener(TimerEvent.TIMER, attackWallTurret);
wallAttackTimerJeep.removeEventListener(TimerEvent.TIMER, attackWallJeep);
wallAttackTimerTank.removeEventListener(TimerEvent.TIMER, attackWallTank);
wallAttackTimerHelicopter.removeEventListener(TimerEvent.TIMER, attackWallHelicopter);
solTime.reset();
turTime.reset();
jeepTime.reset();
tankTime.reset();
_local1 = (soldiers.length - 1);
while (_local1 >= 0) {
removeChild(getChildByName(("soldier" + _local1)));
soldiers.pop();
_local1--;
};
_local2 = (bazookas.length - 1);
while (_local2 >= 0) {
removeChild(getChildByName(("bazooka" + _local2)));
bazookas.pop();
_local2--;
};
_local3 = (turrets.length - 1);
while (_local3 >= 0) {
removeChild(getChildByName(("turret" + _local3)));
turrets.pop();
_local3--;
};
_local4 = (jeeps.length - 1);
while (_local4 >= 0) {
removeChild(getChildByName(("jeep" + _local4)));
jeeps.pop();
_local4--;
};
_local5 = (tanks.length - 1);
while (_local5 >= 0) {
removeChild(getChildByName(("tank" + _local5)));
tanks.pop();
_local5--;
};
_local6 = (helicopters.length - 1);
while (_local6 >= 0) {
removeChild(getChildByName(("helicopter" + _local6)));
helicopters.pop();
_local6--;
};
removeChild(gunHolder_mc);
removeChild(target_mc);
Mouse.show();
shopOn = true;
parent.gunSelectHolder.visible = false;
ammoTimerSingle.stop();
ammoTimer.stop();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, activateAim);
stage.removeEventListener(KeyboardEvent.KEY_UP, deactivateAim);
parent.shopFrame();
parent.spaceDown = false;
wallDemage = 0;
wallDemageSoldiers = 0;
wallDemageBazookas = 0;
wallDemageTurrets = 0;
wallDemageJeeps = 0;
wallDemageTanks = 0;
wallDemageHelicopters = 0;
deadUnits = 0;
this.transform.colorTransform = gameBrightnessNormal;
levelDownTrigger();
gotoAndStop("shop");
}
public function createTanksNum(_arg1:Event):void{
tanksNum_txt.text = String(startTank);
startTank++;
}
public function addAmmo():void{
var _local1:uint;
if (!gOver){
_local1 = 0;
while (_local1 < maxAmmo) {
ammoElement_mc = new AmmoElement();
ammo_mc.addChild(ammoElement_mc);
ammoElement_mc.x = (ammoElement_mc.x + (ammoElement_mc.width * _local1));
ammoElement_mc.name = ("ammoElement" + _local1);
_local1++;
};
};
}
public function hitTank(_arg1:Event):void{
var _local2:*;
var _local3:int;
_local2 = _arg1.target.getChildByName("tankHealth_mc").getChildAt(1);
if (_arg1.target.getChildByName("bodyMask").visible == true){
_local3 = (debries.length - 1);
while (_local3 >= 0) {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("bodyMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demTank);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitTank);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveTank);
_arg1.target.getChildByName("tankAnim_mc").gotoAndPlay("die");
};
};
};
_local3--;
};
};
}
public function stopMusic():void{
if (solMusicNum > 1){
solMusicNum--;
};
}
public function startMovingHelicopter(_arg1:Event):void{
addChild(helicopters[helicopterNum]);
helicopters[helicopterNum].addEventListener(Event.ENTER_FRAME, moveHelicopter);
helicopterNum++;
}
public function backToWelcome(_arg1:MouseEvent):void{
backToWelcomeSingle();
}
public function createJeepsNum(_arg1:Event):void{
jeepsNum_txt.text = String(startJeep);
startJeep++;
}
public function activateAim(_arg1:KeyboardEvent):void{
if (!root.isPause){
if (levelNum != 2){
if (_arg1.keyCode == 32){
if (!shopOn){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveTarget);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, circMove);
stage.addEventListener(KeyboardEvent.KEY_UP, deactivateAim);
stage.removeEventListener(KeyboardEvent.KEY_UP, activateAim);
target_mc.visible = false;
gunHolder_mc.x = mouseX;
gunHolder_mc.y = mouseY;
setChildIndex(gunHolder_mc, (this.numChildren - 2));
gunHolder_mc.visible = false;
};
};
};
};
}
public function moreGamesOver(_arg1:MouseEvent):void{
root.moreGamesMain();
}
public function levelUpTrigger():void{
stage.addEventListener(Event.ENTER_FRAME, levelUp);
}
public function shopHandler(_arg1:Event):void{
if (deadUnits >= allLevelUnits){
stage.removeEventListener(Event.ENTER_FRAME, shopHandler);
gotoShop();
deadUnits = 0;
};
}
public function growTarget():void{
if (!root.isPause){
target_mc.tPart1_mc.y = (target_mc.tPart1_mc.y - 1.5);
target_mc.tPart2_mc.y = (target_mc.tPart2_mc.y + 1.5);
target_mc.tPart3_mc.x = (target_mc.tPart3_mc.x + 1.5);
target_mc.tPart4_mc.x = (target_mc.tPart4_mc.x - 1.5);
};
}
public function hitSoldierSingle(_arg1:MouseEvent):void{
}
public function backToWelcomeSingle():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
root.wasCredits = false;
root.upMusic();
ctrl_Level.stop();
levelNum = 0;
parent.curFrame = 0;
second = false;
parent.zoomForce = true;
gOver = false;
parent.addZoom();
root.gunSelectHolder.visible = true;
wallSwitch = 0;
_local1 = (soldiers.length - 1);
while (_local1 >= 0) {
removeChild(getChildByName(("soldier" + _local1)));
soldiers.pop();
_local1--;
};
_local2 = (bazookas.length - 1);
while (_local2 >= 0) {
removeChild(getChildByName(("bazooka" + _local2)));
bazookas.pop();
_local2--;
};
_local3 = (turrets.length - 1);
while (_local3 >= 0) {
removeChild(getChildByName(("turret" + _local3)));
turrets.pop();
_local3--;
};
_local4 = (jeeps.length - 1);
while (_local4 >= 0) {
removeChild(getChildByName(("jeep" + _local4)));
jeeps.pop();
_local4--;
};
_local5 = (tanks.length - 1);
while (_local5 >= 0) {
removeChild(getChildByName(("tank" + _local5)));
tanks.pop();
_local5--;
};
_local6 = (helicopters.length - 1);
while (_local6 >= 0) {
removeChild(getChildByName(("helicopter" + _local6)));
helicopters.pop();
_local6--;
};
parent.gotoAndStop("mainMenu");
}
public function moveTargetSingle():void{
setChildIndex(target_mc, (this.numChildren - 2));
setChildIndex(gunHolder_mc, (this.numChildren - 1));
target_mc.visible = true;
target_mc.x = mouseX;
target_mc.y = mouseY;
}
public function attackWallTurret(_arg1:Event):void{
if (gOver == false){
if (!root.isPause){
if (wallHealth > 0){
wallHealth = (wallHealth - (wallDemageTurrets + (5 * root.wallPlus)));
wallHealth_txt.text = String(wallHealth);
} else {
gameOver();
};
};
};
}
public function hitHelicopter(_arg1:Event):void{
var _local2:*;
var _local3:int;
_local2 = _arg1.target.getChildByName("helicopterHealth_mc").getChildAt(1);
if (_arg1.target.getChildByName("bodyMask").visible == true){
_local3 = (debries.length - 1);
while (_local3 >= 0) {
if (debries[_local3].hitTestObject(_arg1.target.getChildByName("bodyMask"))){
if (_local2.scaleX > 0){
_local2.scaleX = (_local2.scaleX - demHelic);
} else {
if (_local2.scaleX <= 0){
_local2.scaleX = 0;
_arg1.target.removeEventListener(Event.ENTER_FRAME, hitHelicopter);
_arg1.target.removeEventListener(Event.ENTER_FRAME, moveHelicopter);
_arg1.target.getChildByName("helicAnim_mc").gotoAndPlay("die");
};
};
};
_local3--;
};
};
}
public function gameOver():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:uint;
solMTimer.stop();
gOver = true;
root.isGame = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveTarget);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, circMove);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, downAmmo);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, reloadOnDemand);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, activateAim);
stage.removeEventListener(KeyboardEvent.KEY_UP, deactivateAim);
if (target_mc != null){
removeChild(target_mc);
};
if (gunHolder_mc != null){
removeChild(gunHolder_mc);
};
Mouse.show();
allBullets = 0;
headshotsNum = 0;
legshotsNum = 0;
levelMoney = 0;
accuracy = 0;
shopOn = false;
solTime.reset();
turTime.reset();
jeepTime.reset();
tankTime.reset();
helicTime.reset();
bazTime.reset();
levelNum = 0;
buyedWeapon = 0;
parent.gunSelectHolder.visible = false;
wallDemage = 0;
wallDemageSoldiers = 0;
wallDemageBazookas = 0;
wallDemageTurrets = 0;
wallDemageJeeps = 0;
wallDemageTanks = 0;
wallDemageHelicopters = 0;
deadUnits = 0;
wallHealth = 1000;
totalMoney = 0;
ammoTimerSingle.stop();
ammoTimer.stop();
parent.shopFrame();
parent.spaceDown = false;
parent.curFrame = 0;
wallHealth = 0;
wallHealth_txt.text = "0";
_local1 = (soldiers.length - 1);
while (_local1 >= 0) {
wallAttackTimerSoldier.removeEventListener(TimerEvent.TIMER, attackWallSoldier);
wallAttackTimerSoldier.stop();
soldiers[_local1].guy.gotoAndStop(1);
_local1--;
};
_local2 = (bazookas.length - 1);
while (_local2 >= 0) {
wallAttackTimerBazooka.removeEventListener(TimerEvent.TIMER, attackWallBazooka);
bazookas[_local2].bazookaAnim.bazAmmo.removeEventListener(Event.ENTER_FRAME, bazookas[_local2].bazookaAnim.moveBazAmmo);
bazookas[_local2].bazookaAnim.bazAmmo.gotoAndStop(1);
wallAttackTimerBazooka.stop();
_local2--;
};
_local3 = (turrets.length - 1);
while (_local3 >= 0) {
wallAttackTimerTurret.removeEventListener(TimerEvent.TIMER, attackWallTurret);
wallAttackTimerTurret.stop();
turrets[_local3].turAnim_mc.gotoAndStop(1);
_local3--;
};
_local4 = (jeeps.length - 1);
while (_local4 >= 0) {
wallAttackTimerJeep.removeEventListener(TimerEvent.TIMER, attackWallJeep);
wallAttackTimerJeep.stop();
jeeps[_local4].jeepAnim_mc.gotoAndStop(1);
_local4--;
};
_local5 = (tanks.length - 1);
while (_local5 >= 0) {
wallAttackTimerTank.removeEventListener(TimerEvent.TIMER, attackWallTank);
wallAttackTimerTank.stop();
tanks[_local5].tankAnim_mc.gotoAndStop(1);
_local5--;
};
_local6 = (helicopters.length - 1);
while (_local6 >= 0) {
wallAttackTimerHelicopter.removeEventListener(TimerEvent.TIMER, attackWallHelicopter);
wallAttackTimerHelicopter.stop();
helicopters[_local6].helicAnim_mc.gotoAndStop(1);
_local6--;
};
_local7 = 1;
while (_local7 < (wall_mc.numChildren - 1)) {
wall_mc.getChildAt(_local7).gotoAndStop(3);
_local7++;
};
this.transform.colorTransform = gameBrightnessNormal;
gotoAndStop("gameOver");
}
public function createSoldiersNum(_arg1:Event):void{
soldiersNum_txt.text = String(startSoldier);
startSoldier++;
}
}
}//package battlefield5_fla
Section 15
//gameOver_mc_69 (battlefield5_fla.gameOver_mc_69)
package battlefield5_fla {
import flash.display.*;
public dynamic class gameOver_mc_69 extends MovieClip {
public var moreGames_btn:MovieClip;
public var tryAgain_mc:MovieClip;
public var mainMenu:MovieClip;
}
}//package battlefield5_fla
Section 16
//gr_Firebazuka_101 (battlefield5_fla.gr_Firebazuka_101)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class gr_Firebazuka_101 extends MovieClip {
public function gr_Firebazuka_101(){
addFrameScript(0, frame1, 16, frame17);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
}
}//package battlefield5_fla
Section 17
//gunHolder_mc_47 (battlefield5_fla.gunHolder_mc_47)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class gunHolder_mc_47 extends MovieClip {
public var fire_mc:MovieClip;
public function gunHolder_mc_47(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop((root.ar_Weapons[root.WNum] + 1));
}
}
}//package battlefield5_fla
Section 18
//gunSelectHolder_72 (battlefield5_fla.gunSelectHolder_72)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class gunSelectHolder_72 extends MovieClip {
public function gunSelectHolder_72(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 19
//helicopterAnim_mc_116 (battlefield5_fla.helicopterAnim_mc_116)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class helicopterAnim_mc_116 extends MovieClip {
public var helicAnimElement:MovieClip;
public var deadSwitch:Boolean;
public function helicopterAnim_mc_116(){
addFrameScript(0, frame1, 3, frame4, 4, frame5, 17, frame18, 18, frame19, 28, frame29);
}
public function flySd(_arg1:TimerEvent):void{
if (parent.parent.gOver == false){
parent.parent.helicopterFlySd.play();
};
}
function frame18(){
gotoAndPlay("shoot");
}
function frame1(){
}
function frame19(){
if (root != null){
if ((((parent.getChildByName("bodyMask").visible == true)) && ((parent.parent.gOver == false)))){
parent.getChildByName("bodyMask").visible = false;
};
};
}
function frame4(){
gotoAndPlay("run");
}
function frame5(){
deadSwitch = false;
}
function frame29(){
stop();
if (root != null){
if (parent.parent != null){
if (parent != null){
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (!deadSwitch){
if (parent.parent.wallDemageHelicopters > 0){
parent.parent.wallDemageHelicopters = (parent.parent.wallDemageHelicopters - parent.parent.helicopterDemage);
};
parent.parent.deadUnits++;
parent.parent.levelMoney = (parent.parent.levelMoney + 150);
parent.visible = false;
};
};
};
};
};
}
}
}//package battlefield5_fla
Section 20
//helicopterHealth_119 (battlefield5_fla.helicopterHealth_119)
package battlefield5_fla {
import flash.display.*;
public dynamic class helicopterHealth_119 extends MovieClip {
public var helicopterHealthMask:MovieClip;
}
}//package battlefield5_fla
Section 21
//instructions_mc_39 (battlefield5_fla.instructions_mc_39)
package battlefield5_fla {
import flash.display.*;
public dynamic class instructions_mc_39 extends MovieClip {
public var startGame_btn:MovieClip;
}
}//package battlefield5_fla
Section 22
//jeepAnim_mc_128 (battlefield5_fla.jeepAnim_mc_128)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class jeepAnim_mc_128 extends MovieClip {
public var jeepAnimElement:MovieClip;
public var deadSwitch:Boolean;
public function jeepAnim_mc_128(){
addFrameScript(14, frame15, 15, frame16, 62, frame63, 63, frame64, 76, frame77);
}
function frame64(){
if ((((parent.getChildByName("bodyMask").visible == true)) && ((parent.parent.gOver == false)))){
parent.getChildByName("bodyMask").visible = false;
};
}
function frame77(){
stop();
if (root != null){
if (parent.parent != null){
if (parent != null){
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (!deadSwitch){
if (parent.parent.wallDemageJeeps > 0){
parent.parent.wallDemageJeeps = (parent.parent.wallDemageJeeps - parent.parent.jeepDemage);
};
parent.parent.deadJeeps++;
parent.parent.deadUnits++;
parent.parent.levelMoney = (parent.parent.levelMoney + 75);
parent.visible = false;
deadSwitch = true;
};
};
};
};
};
}
function frame15(){
gotoAndPlay("run");
}
function frame16(){
deadSwitch = false;
if (root != null){
if (parent.parent != null){
if (parent != null){
if (parent.parent.gOver == false){
parent.parent.jeepSd.play();
};
};
};
};
}
function frame63(){
gotoAndPlay("shoot");
}
}
}//package battlefield5_fla
Section 23
//jeepHealth_131 (battlefield5_fla.jeepHealth_131)
package battlefield5_fla {
import flash.display.*;
public dynamic class jeepHealth_131 extends MovieClip {
public var jeepHealthMask:MovieClip;
}
}//package battlefield5_fla
Section 24
//logo_mc_2 (battlefield5_fla.logo_mc_2)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class logo_mc_2 extends MovieClip {
public var loading_mc:MovieClip;
public var link_btn:SimpleButton;
public function logo_mc_2(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
stop();
root.nextFrame();
}
function frame1(){
stop();
link_btn.addEventListener(MouseEvent.CLICK, gotoWeb);
}
public function gotoWeb(_arg1:MouseEvent):void{
}
}
}//package battlefield5_fla
Section 25
//MainTimeline (battlefield5_fla.MainTimeline)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MainTimeline extends MovieClip {
public var nigthVision_cmf:ColorMatrixFilter;
public var volumeAmbient:SoundTransform;
public var selectabl_arr:Array;
public var isGame:Boolean;
public var bf:BlurFilter;
public var bm:Bitmap;
public var amount:Number;
public var dMap:BitmapData;
public var welcomeScreen:MovieClip;
public var second:Boolean;
public var preloader:MovieClip;
public var pause_mc:MovieClip;
public var wallPlus:uint;
public var bdHolder:MovieClip;
public var infrared_cf:ConvolutionFilter;
public var ctrl_Ambient:SoundChannel;
public var nigthVision_cf:ConvolutionFilter;
public var hardMult:uint;
public var infrared_cmf:ColorMatrixFilter;
public var aim_mc:MovieClip;
public var zoomForce:Boolean;
public var our_btn:SimpleButton;
public var isPause:Boolean;
public var game_mc:MovieClip;
public var space:Boolean;
public var curFrame:int;
public var playerName:String;
public var termalHeat_cmf:ColorMatrixFilter;
public var gunSelectHolder:MovieClip;
public var ambient_sd:Sound;
public var credits_mc:MovieClip;
public var hard_mc:MovieClip;
public var wasCredits:Boolean;
public var toolTip_mc:MovieClip;
public var termalHeat_cf:ConvolutionFilter;
public var mLogo_mc:MovieClip;
public var ar_Weapons:Array;
public var WNum:Number;
public var healthMult:uint;
public var instructions:MovieClip;
public var wPrice_arr:Array;
public var mask_mc:MovieClip;
public var name_mc:MovieClip;
public var black_mc:MovieClip;
public var normal_mc:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
public function shopFrame():void{
deactivateZoomSingle();
stage.removeEventListener(KeyboardEvent.KEY_UP, activateZoom);
stage.removeEventListener(KeyboardEvent.KEY_UP, deactivateZoom);
space = false;
}
public function addZoom():void{
stage.addEventListener(KeyboardEvent.KEY_UP, activateZoom);
stage.removeEventListener(KeyboardEvent.KEY_UP, deactivateZoom);
}
public function checkActivity():void{
stage.addEventListener(KeyboardEvent.KEY_UP, activateZoom);
stage.addEventListener(KeyboardEvent.KEY_UP, deactivateZoom);
stage.addEventListener(Event.ENTER_FRAME, drawScene);
space = false;
}
public function moreGamesMain():void{
var _local1:String;
var _local2:URLRequest;
_local1 = "http://www.gameshok.com/index.php?action=branded";
_local2 = new URLRequest(_local1);
navigateToURL(_local2, "_blank");
}
public function showTooltip(_arg1:MouseEvent):void{
toolTip_mc.visible = true;
}
public function buyWeapon(_arg1:Number):void{
if (ar_Weapons.indexOf(_arg1) == -1){
ar_Weapons.push(_arg1);
};
}
public function upMusic():void{
stage.addEventListener(Event.ENTER_FRAME, ambientUp);
}
public function logoLink(_arg1:Event):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.gameshok.com/index.php?action=branded";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function hideTooltip(_arg1:MouseEvent):void{
toolTip_mc.visible = false;
}
function frame2(){
ambient_sd = new Ambient();
if (!wasCredits){
ctrl_Ambient = ambient_sd.play(0, 0xFFFF);
volumeAmbient = ctrl_Ambient.soundTransform;
wasCredits = true;
};
stop();
welcomeScreen.play_btn.addEventListener(MouseEvent.CLICK, playGame);
welcomeScreen.credits_btn.addEventListener(MouseEvent.CLICK, creditsScreen);
welcomeScreen.moreGames_btn.addEventListener(MouseEvent.CLICK, moreGames);
welcomeScreen.gamingNews_btn.addEventListener(MouseEvent.CLICK, gamingNews);
welcomeScreen.logo_mc.addEventListener(MouseEvent.CLICK, logoLink);
mLogo_mc.addEventListener(MouseEvent.CLICK, moreGames);
welcomeScreen.play_btn.buttonMode = true;
welcomeScreen.credits_btn.buttonMode = true;
welcomeScreen.moreGames_btn.buttonMode = true;
welcomeScreen.gamingNews_btn.buttonMode = true;
welcomeScreen.logo_mc.buttonMode = true;
mLogo_mc.buttonMode = true;
}
function frame3(){
name_mc.okName_btn.addEventListener(MouseEvent.CLICK, gotoInstructions);
name_mc.okName_btn.buttonMode = true;
}
public function deactivateZoom(_arg1:KeyboardEvent):void{
if (!root.isPause){
if (game_mc.levelNum != 2){
if (_arg1.keyCode == 32){
if (space){
stage.removeEventListener(KeyboardEvent.KEY_UP, deactivateZoom);
stage.addEventListener(KeyboardEvent.KEY_UP, activateZoom);
deactivateZoomSingle();
};
};
};
};
}
function frame5(){
pause_mc.visible = false;
stage.addEventListener(KeyboardEvent.KEY_UP, pauseOn);
ar_Weapons = new Array();
wPrice_arr = ["Purchased", 1500, 3000, 5000, 8300, 10000];
selectabl_arr = [false, true, true, true, true, true];
WNum = 0;
ar_Weapons.push(0);
stop();
zoomForce = true;
dMap = new BitmapData(650, 450, false, 0);
bf = new BlurFilter(3, 3, 1);
nigthVision_cmf = new ColorMatrixFilter([1.3, 0, 0, -1, 0, 0, 0.5, -0.1, 0, 0, 0, 0, -1, 0.3, 0, 0, 0, 0, 1, 0]);
nigthVision_cf = new ConvolutionFilter(3, 3, new Array(0, 0, 0, 0, 1.3, 0, 0, 0, 1.3), 0);
infrared_cmf = new ColorMatrixFilter([2, 1.5, -5, 0, 45, 0.3, -0.15, 1, 0, -28, 0, 0.3, 2, 0, 0, 0, 0, 0, 1, 0]);
infrared_cf = new ConvolutionFilter(3, 3, new Array(0, 0, 0, 0, 1, 0, 0, 0, 0), 0);
termalHeat_cmf = new ColorMatrixFilter([4, 1.5, -3.5, 0, 0, 1.3, 0, -1.5, 0, 0, -0.4, 0, 1.5, 0, 0, 0, 0, 0, 1, 0]);
termalHeat_cf = new ConvolutionFilter(3, 3, new Array(0, 0, 0, 0, 1, 0, 0, 0, 0), 0);
bm = new Bitmap(dMap);
bdHolder.scaleX = 1.5;
bdHolder.scaleY = 1.5;
bm.smoothing = true;
black_mc.visible = false;
stage.addEventListener(KeyboardEvent.KEY_UP, activateZoom);
stage.addEventListener(Event.ENTER_FRAME, activateZoomForce);
trace(("CURRENT FRAME : " + curFrame));
}
function frame6(){
stage.removeEventListener(Event.ENTER_FRAME, activateZoomForce);
}
function frame7(){
toolTip_mc.visible = false;
credits_mc.mainMenu.addEventListener(MouseEvent.CLICK, backToMain);
our_btn.addEventListener(MouseEvent.CLICK, toFirefly);
our_btn.addEventListener(MouseEvent.ROLL_OVER, showTooltip);
our_btn.addEventListener(MouseEvent.ROLL_OUT, hideTooltip);
credits_mc.mainMenu.buttonMode = true;
}
function frame1(){
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
}
public function moreGames(_arg1:MouseEvent):void{
moreGamesMain();
}
public function pauseOn(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 27){
if (!isPause){
if (isGame){
pauseOnSingle();
};
} else {
if (isPause){
if (isGame){
pauseOffSingle();
};
};
};
};
}
function frame4(){
normal_mc.addEventListener(MouseEvent.CLICK, normalMode);
hard_mc.addEventListener(MouseEvent.CLICK, hardMode);
normal_mc.buttonMode = true;
hard_mc.buttonMode = true;
}
public function backToMain(_arg1:MouseEvent):void{
gotoAndStop("mainMenu");
}
public function downMusic():void{
stage.addEventListener(Event.ENTER_FRAME, ambientDown);
}
public function gotoInstructions(_arg1:MouseEvent):void{
if (name_mc.name_txt.text == ""){
playerName = "Player1";
} else {
playerName = name_mc.name_txt.text;
};
nextFrame();
trace(playerName);
}
public function fadeMusic():void{
stage.addEventListener(Event.ENTER_FRAME, ambientDown);
}
public function activateZoomForce(_arg1:Event):void{
if (!root.isPause){
if ((((game_mc.levelNum == 2)) && ((zoomForce == true)))){
curFrame = 2;
activateZoomSingle();
second = true;
space = false;
zoomForce = false;
};
};
}
public function normalMode(_arg1:MouseEvent):void{
fadeMusic();
root.wallPlus = 0;
root.isHard = false;
root.hardMult = 1;
root.healthMult = 0;
play();
}
public function pauseOnSingle():void{
var _local1:uint;
var _local2:uint;
trace("Pause is ON");
pause_mc.visible = true;
isPause = true;
game_mc.solMTimer.stop();
Mouse.show();
while (_local1 < game_mc.soldiers.length) {
if (game_mc.getChildByName(("soldier" + _local1)) != null){
game_mc.getChildByName(("soldier" + _local1)).guy.stop();
};
_local1++;
};
while (_local2 < game_mc.bazookas.length) {
if (game_mc.getChildByName(("bazooka" + _local2)) != null){
game_mc.getChildByName(("bazooka" + _local2)).bazookaAnim.stop();
};
_local2++;
};
}
public function hardMode(_arg1:MouseEvent):void{
fadeMusic();
root.wallPlus = 1;
root.isHard = true;
root.hardMult = 2;
root.healthMult = 0.0005;
play();
}
public function loading(_arg1:ProgressEvent):void{
trace("dasdasd");
amount = (_arg1.bytesLoaded / _arg1.bytesTotal);
preloader.logo2_mc.loading_mc.loader_txt.text = Math.round((String(amount) * 100));
preloader.logo2_mc.loading_mc.bar_mc.scaleX = amount;
if (amount == 1){
preloader.logo2_mc.play();
};
}
public function playGame(_arg1:MouseEvent):void{
nextFrame();
}
public function activateZoomSingle():void{
if (!root.isPause){
stage.addEventListener(Event.ENTER_FRAME, drawScene);
stage.addEventListener(KeyboardEvent.KEY_UP, deactivateZoom);
trace("ZOOM ACTIVATED");
space = true;
};
}
public function pauseOffSingle():void{
var _local1:uint;
var _local2:uint;
var _local3:uint;
var _local4:uint;
pause_mc.visible = false;
isPause = false;
if (isGame){
Mouse.hide();
game_mc.solMTimer.reset();
game_mc.solMTimer.start();
while (_local1 < game_mc.soldiers.length) {
if (game_mc.getChildByName(("soldier" + _local1)) != null){
game_mc.getChildByName(("soldier" + _local1)).guy.play();
};
_local1++;
};
while (_local2 < game_mc.bazookas.length) {
if (game_mc.getChildByName(("bazooka" + _local2)) != null){
game_mc.getChildByName(("bazooka" + _local2)).bazookaAnim.play();
};
_local2++;
};
while (_local3 < game_mc.bazookas.length) {
if (game_mc.bazookas[_local3].bazookaAnim.bFire == true){
game_mc.bazookas[_local3].bazookaAnim.bazAmmo.play();
};
_local3++;
};
_local4 = 1;
while (_local4 < game_mc.wall_mc.numChildren) {
if (game_mc.wall_mc.numChildren > 1){
};
_local4++;
};
};
}
public function ambientUp(_arg1:Event):void{
if (volumeAmbient.volume < 1){
volumeAmbient.volume = (volumeAmbient.volume + 0.05);
ctrl_Ambient.soundTransform = volumeAmbient;
} else {
stage.removeEventListener(Event.ENTER_FRAME, ambientUp);
};
}
public function hideMask():void{
mask_mc.visible = false;
}
public function ambientDown(_arg1:Event):void{
if (volumeAmbient.volume >= 0.1){
volumeAmbient.volume = (volumeAmbient.volume - 0.025);
ctrl_Ambient.soundTransform = volumeAmbient;
} else {
stage.removeEventListener(Event.ENTER_FRAME, ambientDown);
};
}
public function activateZoom(_arg1:KeyboardEvent):void{
if (!root.isPause){
if (_arg1.keyCode == 32){
if (!space){
trace("ZOOM EVENT");
activateZoomSingle();
second = true;
curFrame = 2;
};
};
};
}
public function toFirefly(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.ffly.com.ua";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function removePL():void{
stage.removeEventListener(KeyboardEvent.KEY_UP, pauseOn);
game_mc.solMTimer.stop();
}
public function deactivateZoomSingle():void{
if (!root.isPause){
trace(("LEVEL NUM IS : " + game_mc.levelNum));
stage.removeEventListener(Event.ENTER_FRAME, drawScene);
mask_mc.stopDrag();
bdHolder.visible = false;
mask_mc.visible = false;
aim_mc.visible = false;
black_mc.visible = false;
curFrame = 2;
second = true;
space = false;
trace("ZOOM DEACTIVATED");
};
}
public function gamingNews(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.gameshok.com/index.php?action=branded";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function creditsScreen(_arg1:MouseEvent):void{
gotoAndStop("credits");
}
public function drawScene(_arg1:Event):void{
if (!root.isPause){
if (!game_mc.shopOn){
if (second){
mask_mc.startDrag();
bdHolder.visible = true;
mask_mc.visible = true;
black_mc.visible = true;
aim_mc.visible = true;
stage.addEventListener(KeyboardEvent.KEY_UP, deactivateZoom);
second = false;
};
if (curFrame == 2){
bdHolder.mask = mask_mc;
mask_mc.startDrag(true);
bdHolder.addChild(bm);
curFrame++;
};
if (curFrame == 3){
dMap.draw(game_mc);
bdHolder.x = (-(mouseX) * 0.5);
bdHolder.y = (-(mouseY) * 0.5);
mask_mc.x = mouseX;
mask_mc.y = mouseY;
aim_mc.x = mouseX;
aim_mc.y = mouseY;
if (game_mc.levelNum == 3){
dMap.applyFilter(dMap, dMap.rect, new Point(0, 0), nigthVision_cmf);
dMap.applyFilter(dMap, dMap.rect, new Point(0, 0), nigthVision_cf);
};
};
};
} else {
if (root.isPause){
mask_mc.stopDrag();
};
};
}
}
}//package battlefield5_fla
Section 26
//mcdeathbazuka_102 (battlefield5_fla.mcdeathbazuka_102)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class mcdeathbazuka_102 extends MovieClip {
public function mcdeathbazuka_102(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package battlefield5_fla
Section 27
//mcrifleman_die_152 (battlefield5_fla.mcrifleman_die_152)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class mcrifleman_die_152 extends MovieClip {
public function mcrifleman_die_152(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package battlefield5_fla
Section 28
//message_mc_58 (battlefield5_fla.message_mc_58)
package battlefield5_fla {
import flash.display.*;
public dynamic class message_mc_58 extends MovieClip {
public var noWeapon_mc:MovieClip;
public var oneW_mc:MovieClip;
public var alreadyP_mc:MovieClip;
public var purchased_mc:MovieClip;
public var lowMoney_mc:MovieClip;
}
}//package battlefield5_fla
Section 29
//NameEnter_mc_37 (battlefield5_fla.NameEnter_mc_37)
package battlefield5_fla {
import flash.display.*;
import flash.text.*;
public dynamic class NameEnter_mc_37 extends MovieClip {
public var okName_btn:MovieClip;
public var name_txt:TextField;
}
}//package battlefield5_fla
Section 30
//pause_mc_77 (battlefield5_fla.pause_mc_77)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class pause_mc_77 extends MovieClip {
public var back_btn:SimpleButton;
public var moreGames_btn:SimpleButton;
public var backPause_btn:SimpleButton;
public var instructions_btn:SimpleButton;
public var main_btn:SimpleButton;
public function pause_mc_77(){
addFrameScript(0, frame1, 1, frame2);
}
public function backToPause(_arg1:MouseEvent):void{
prevFrame();
}
function frame1(){
stop();
main_btn.addEventListener(MouseEvent.CLICK, goMain);
instructions_btn.addEventListener(MouseEvent.CLICK, goIns);
back_btn.addEventListener(MouseEvent.CLICK, goBack);
moreGames_btn.addEventListener(MouseEvent.CLICK, moreGames);
}
function frame2(){
backPause_btn.addEventListener(MouseEvent.CLICK, backToPause);
}
public function moreGames(_arg1:MouseEvent):void{
root.moreGamesMain();
}
public function goMain(_arg1:MouseEvent):void{
parent.removePL();
parent.isGame = false;
parent.pauseOffSingle();
root.wasCredits = false;
root.upMusic();
root.game_mc.ctrl_Level.stop();
root.game_mc.ammoTimer.stop();
root.game_mc.ammoTimerSingle.stop();
root.game_mc.backToMain();
root.game_mc.levelDownTrigger();
stage.removeEventListener(MouseEvent.MOUSE_DOWN, root.game_mc.downAmmo);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, root.game_mc.reloadOnDemand);
root.gotoAndStop("mainMenu");
}
public function goIns(_arg1:MouseEvent):void{
nextFrame();
}
public function goBack(_arg1:MouseEvent):void{
parent.pauseOffSingle();
}
}
}//package battlefield5_fla
Section 31
//preloader_1 (battlefield5_fla.preloader_1)
package battlefield5_fla {
import flash.display.*;
public dynamic class preloader_1 extends MovieClip {
public var logo2_mc:MovieClip;
}
}//package battlefield5_fla
Section 32
//shop_mc_57 (battlefield5_fla.shop_mc_57)
package battlefield5_fla {
import flash.events.*;
import fl.transitions.*;
import flash.display.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class shop_mc_57 extends MovieClip {
public var headshots_txt:TextField;
public var levelNum_txt:TextField;
public var toBuy_arr:Array;
public var accuracy_txt:TextField;
public var volumeWinLevel:SoundTransform;
public var numJeeps_txt:TextField;
public var ctrl_winLevel:SoundChannel;
public var numTurrets_txt:TextField;
public var headshotBonus_txt:TextField;
public var price_txt:TextField;
public var weaponIconHolder:Sprite;
public var buyed_arr:Array;
public var message_mc:MovieClip;
public var buyWeapon_btn:MovieClip;
public var winLevel_sd:Sound;
public var legshotBonus:uint;
public var accuracy:Number;
public var numSoldiers_txt:TextField;
public var acuracyBonus:Number;
public var numTanks_txt:TextField;
public var legshotBonus_txt:TextField;
public var wIcon_arr:Array;
public var noWeapon:uint;
public var winDownTimer:Timer;
public var weaponIconContainer:WeaponIconHolder;
public var levelMoney_txt:TextField;
public var fadeTween:Tween;
public var accuracyBonus_txt:TextField;
public var headshotBonus:uint;
public var wLimit:Boolean;
public var totalMoney_txt:TextField;
public var scrollTween:Tween;
public var wallRecover_mc:MovieClip;
public var weapon_arr:Array;
public var legshots_txt:TextField;
public var levelMoney:uint;
public var totalMoney:int;
public function shop_mc_57(){
addFrameScript(0, frame1);
}
public function addScrollUp(_arg1:TweenEvent):void{
weaponIconContainer.arrowUp.addEventListener(MouseEvent.CLICK, scrollWeapon);
}
public function selectWeapon(_arg1:MouseEvent):void{
var _local2:uint;
if (_arg1.currentTarget.selectabl){
price_txt.text = String(_arg1.currentTarget.wPrice);
_arg1.currentTarget.gunPrice_txt.text = String(_arg1.currentTarget.wPrice);
while (_local2 < weaponIconHolder.numChildren) {
weapon_arr[_local2].select = false;
weapon_arr[_local2].gotoAndStop(1);
_local2++;
};
_arg1.currentTarget.gotoAndStop(2);
_arg1.currentTarget.select = true;
};
}
public function buyWeapon(_arg1:MouseEvent):void{
var _local2:uint;
while (_local2 < weaponIconHolder.numChildren) {
if (weapon_arr[_local2].select){
if ((((((weapon_arr[_local2].wPrice <= parent.totalMoney)) && ((wLimit == false)))) && (!((weapon_arr[_local2].wPrice == "Purchased"))))){
root.buyWeapon(weapon_arr[_local2].numer);
parent.totalMoney = (parent.totalMoney - weapon_arr[_local2].wPrice);
weapon_arr[_local2].wPrice = "Purchased";
root.wPrice_arr[_local2] = "Purchased";
root.selectabl_arr[_local2] = false;
weapon_arr[_local2].selectabl = false;
weapon_arr[_local2].select = false;
weapon_arr[_local2].gotoAndStop(1);
buyed_arr.push(toBuy_arr[_local2]);
totalMoney_txt.text = (String(parent.totalMoney) + "$");
price_txt.text = "Purchased";
fadeFunc(message_mc.purchased_mc);
wLimit = true;
} else {
if (wLimit){
trace("Only one buy per level allowed");
fadeFunc(message_mc.oneW_mc);
} else {
if (weapon_arr[_local2].wPrice == "Purchased"){
trace("Already Purchased");
fadeFunc(message_mc.alreadyP_mc);
} else {
if (weapon_arr[_local2].wPrice > parent.totalMoney){
trace("No money - no honey, loverboy!");
fadeFunc(message_mc.lowMoney_mc);
};
};
};
};
} else {
if (!weapon_arr[_local2].select){
noWeapon++;
};
};
if (noWeapon >= 6){
trace("Please, select a weapon!");
fadeFunc(message_mc.noWeapon_mc);
break;
};
_local2++;
};
noWeapon = 0;
}
function frame1(){
winLevel_sd = new WinLevel();
winDownTimer = new Timer(7000, 1);
winDownTimer.start();
winDownTimer.addEventListener(TimerEvent.TIMER, upLevel);
ctrl_winLevel = winLevel_sd.play();
volumeWinLevel = ctrl_winLevel.soundTransform;
wIcon_arr = [{className:WIcon1}, {className:WIcon2}, {className:WIcon3}, {className:WIcon4}, {className:WIcon5}, {className:WIcon6}];
weapon_arr = new Array();
weaponIconHolder = new Sprite();
totalMoney = parent.totalMoney;
toBuy_arr = new Array();
buyed_arr = new Array();
buyWeapon_btn.addEventListener(MouseEvent.CLICK, buyWeapon);
buyWeapon_btn.buttonMode = true;
wallRecover_mc.buttonMode = true;
trace(totalMoney);
weaponIconContainer.arrowUp.addEventListener(MouseEvent.CLICK, scrollWeapon);
weaponIconContainer.arrowDown.addEventListener(MouseEvent.CLICK, scrollWeapon);
wallRecover_mc.addEventListener(MouseEvent.CLICK, recoverWall);
wallRecover_mc.buttonMode = true;
hideMeassages();
createWIcons();
levelMoney = parent.levelMoney;
accuracy = ((parent.soldiersTime / parent.allBullets) * 100);
accuracyBonus = (Math.round((accuracy * 100)) / 100);
headshotBonus = (parent.headshotsNum * 20);
legshotBonus = (parent.legshotsNum * 5);
totalMoney = (totalMoney + (((levelMoney + headshotBonus) + legshotBonus) + accuracyBonus));
parent.totalMoney = (parent.totalMoney + totalMoney);
numSoldiers_txt.text = (((String(parent.soldiersTime) + " of ") + String(parent.soldiersTime)) + " Soldiers");
if (parent.turretsTime > 0){
numTurrets_txt.text = (((String(parent.turretsTime) + " of ") + String(parent.turretsTime)) + " Turrets");
} else {
numTurrets_txt.text = "0 of 0 Turrets";
};
if (parent.jeepsTime > 0){
numJeeps_txt.text = (((String(parent.jeepsTime) + " of ") + String(parent.jeepsTime)) + "Jeeps");
} else {
numJeeps_txt.text = "0 of 0 Jeeps";
};
if (parent.tanksTime > 0){
numTanks_txt.text = (((String(parent.tanksTime) + " of ") + String(parent.tanksTime)) + " Tanks");
} else {
numTanks_txt.text = "0 of 0 Tanks";
};
levelNum_txt.text = String(parent.levelNum);
accuracy_txt.text = (String((Math.round((accuracy * 100)) / 100)) + "% Accuracy");
headshots_txt.text = (String(parent.headshotsNum) + " Headshots");
legshots_txt.text = (String(parent.legshotsNum) + " Legshots");
levelMoney_txt.text = (String(levelMoney) + "$");
accuracyBonus_txt.text = (String(accuracyBonus) + "$");
headshotBonus_txt.text = (String(headshotBonus) + "$");
legshotBonus_txt.text = (String(legshotBonus) + "$");
totalMoney_txt.text = (String(parent.totalMoney) + "$");
}
public function addScrollDown(_arg1:TweenEvent):void{
weaponIconContainer.arrowDown.addEventListener(MouseEvent.CLICK, scrollWeapon);
}
public function createWIcons():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:Class;
var _local4:uint;
while (_local4 < 6) {
_local3 = Class(wIcon_arr[_local4].className);
_local1 = new (_local3);
_local2 = new (_local3);
_local1.buyed = false;
_local1.wPrice = root.wPrice_arr[_local4];
_local1.gunPrice_txt.text = root.wPrice_arr[_local4];
_local1.select = false;
_local1.selectabl = root.selectabl_arr[_local4];
_local1.numer = _local4;
_local1.name = ("wIcon" + _local4);
_local1.addEventListener(MouseEvent.CLICK, selectWeapon);
_local1.addEventListener(MouseEvent.ROLL_OVER, checkSelection);
_local1.x = 0;
_local1.y = ((_local1.height + 10) * _local4);
weapon_arr.push(_local1);
toBuy_arr.push(_local2);
weaponIconHolder.addChild(weapon_arr[_local4]);
_local4++;
};
weaponIconHolder.x = 15;
weaponIconHolder.y = 20;
weaponIconContainer.addChild(weaponIconHolder);
weaponIconHolder.mask = weaponIconContainer.mask_mc;
buyed_arr.push(toBuy_arr[0]);
trace(("toBuy has : " + toBuy_arr));
}
public function fadeOut(_arg1:TweenEvent):void{
fadeTween = new Tween(_arg1.currentTarget.obj, "alpha", Regular.easeOut, 1, 0, 15, false);
}
public function winDownTrigger():void{
stage.addEventListener(Event.ENTER_FRAME, winLevelDown);
}
public function scrollWeapon(_arg1:MouseEvent):void{
if (_arg1.currentTarget == weaponIconContainer.arrowUp){
if (weaponIconHolder.y <= -20){
trace(weaponIconHolder.y);
scrollTween = new Tween(weaponIconHolder, "y", Regular.easeOut, weaponIconHolder.y, (weaponIconHolder.y + 85), 10, false);
weaponIconContainer.arrowUp.removeEventListener(MouseEvent.CLICK, scrollWeapon);
scrollTween.addEventListener(TweenEvent.MOTION_FINISH, addScrollUp);
};
} else {
if (_arg1.currentTarget == weaponIconContainer.arrowDown){
if (weaponIconHolder.y >= -235){
trace(weaponIconHolder.y);
scrollTween = new Tween(weaponIconHolder, "y", Regular.easeOut, weaponIconHolder.y, (weaponIconHolder.y - 85), 10, false);
weaponIconContainer.arrowDown.removeEventListener(MouseEvent.CLICK, scrollWeapon);
scrollTween.addEventListener(TweenEvent.MOTION_FINISH, addScrollDown);
};
};
};
}
public function recoverWall(_arg1:MouseEvent):void{
if ((((parent.wallHealth < 1000)) && ((parent.totalMoney > 0)))){
parent.wallHealth = (parent.wallHealth + 25);
parent.totalMoney = (parent.totalMoney - 20);
parent.wallHealth_txt.text = parent.wallHealth;
totalMoney_txt.text = (String(parent.totalMoney) + "$");
};
if (parent.wallHealth >= 1000){
parent.wallHealth = 1000;
parent.wallHealth_txt.text = parent.wallHealth;
};
if (parseFloat(totalMoney_txt.text) <= 0){
parent.totalMoney = 0;
totalMoney_txt.text = parent.totalMoney;
};
}
public function checkSelection(_arg1:MouseEvent):void{
trace(_arg1.currentTarget.select);
if (_arg1.currentTarget.select == true){
trace(_arg1.currentTarget.wPrice);
};
}
public function fadeFunc(_arg1:MovieClip):void{
fadeTween = new Tween(_arg1, "alpha", Regular.easeOut, 0, 1, 15, false);
fadeTween.addEventListener(TweenEvent.MOTION_FINISH, fadeOut);
}
public function hideMeassages():void{
var _local1:uint;
while (_local1 < message_mc.numChildren) {
message_mc.getChildAt(_local1).alpha = 0;
_local1++;
};
}
public function upLevel(_arg1:TimerEvent):void{
winDownTrigger();
root.upMusic();
}
public function winLevelDown(_arg1:Event):void{
if (volumeWinLevel.volume >= 0){
volumeWinLevel.volume = (volumeWinLevel.volume - 0.025);
ctrl_winLevel.soundTransform = volumeWinLevel;
} else {
stage.removeEventListener(Event.ENTER_FRAME, winLevelDown);
};
}
}
}//package battlefield5_fla
Section 33
//sprite63_3 (battlefield5_fla.sprite63_3)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class sprite63_3 extends MovieClip {
public var loader_txt:TextField;
public var bar_mc:MovieClip;
public function sprite63_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package battlefield5_fla
Section 34
//tankAnim_mc_134 (battlefield5_fla.tankAnim_mc_134)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class tankAnim_mc_134 extends MovieClip {
public var deadSwitch:Boolean;
public function tankAnim_mc_134(){
addFrameScript(9, frame10, 10, frame11, 130, frame131, 131, frame132, 141, frame142);
}
function frame10(){
gotoAndPlay("run");
}
function frame11(){
deadSwitch = false;
if (parent.parent.gOver == false){
parent.parent.tankSd.play();
};
}
function frame131(){
gotoAndPlay("shoot");
}
function frame132(){
if ((((parent.getChildByName("bodyMask").visible == true)) && ((parent.parent.gOver == false)))){
parent.getChildByName("bodyMask").visible = false;
};
}
function frame142(){
stop();
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (!deadSwitch){
if (parent.parent.wallDemageTanks > 0){
parent.parent.wallDemageTanks = (parent.parent.wallDemageTanks - parent.parent.tankDemage);
};
parent.parent.deadUnits++;
parent.parent.levelMoney = (parent.parent.levelMoney + 100);
deadSwitch = true;
parent.visible = false;
};
};
}
}
}//package battlefield5_fla
Section 35
//tankHealth_137 (battlefield5_fla.tankHealth_137)
package battlefield5_fla {
import flash.display.*;
public dynamic class tankHealth_137 extends MovieClip {
public var helicopterHealthMask:MovieClip;
}
}//package battlefield5_fla
Section 36
//turAnim_mc_140 (battlefield5_fla.turAnim_mc_140)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class turAnim_mc_140 extends MovieClip {
public var deadSwitch:Boolean;
public var turAnimElement:MovieClip;
public function turAnim_mc_140(){
addFrameScript(13, frame14, 14, frame15, 86, frame87, 87, frame88, 101, frame102);
}
function frame87(){
gotoAndPlay("shoot");
}
function frame88(){
if (root != null){
if (parent.parent != null){
if (parent != null){
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (parent.parent.wallDemageTurrets > 0){
parent.parent.wallDemageTurrets = (parent.parent.wallDemageTurrets - parent.parent.turretDemage);
parent.getChildByName("bodyMask").visible = false;
};
};
};
};
};
}
function frame14(){
gotoAndPlay("run");
}
function frame102(){
stop();
if (root != null){
if (parent.parent != null){
if (parent != null){
if (this != null){
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (!deadSwitch){
parent.parent.deadUnits++;
parent.parent.levelMoney = (parent.parent.levelMoney + 50);
deadSwitch = true;
parent.visible = false;
};
};
};
};
};
};
}
function frame15(){
deadSwitch = false;
if (root != null){
if (parent.parent != null){
if (parent != null){
if (parent.parent.gOver == false){
parent.parent.turretSd.play();
};
};
};
};
}
}
}//package battlefield5_fla
Section 37
//turretHealth_143 (battlefield5_fla.turretHealth_143)
package battlefield5_fla {
import flash.display.*;
public dynamic class turretHealth_143 extends MovieClip {
public var turHealthMask:MovieClip;
}
}//package battlefield5_fla
Section 38
//wall_mc_46 (battlefield5_fla.wall_mc_46)
package battlefield5_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class wall_mc_46 extends MovieClip {
public function wall_mc_46(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package battlefield5_fla
Section 39
//WelcomeScreen_mc_29 (battlefield5_fla.WelcomeScreen_mc_29)
package battlefield5_fla {
import flash.display.*;
public dynamic class WelcomeScreen_mc_29 extends MovieClip {
public var moreGames_btn:MovieClip;
public var credits_btn:MovieClip;
public var gamingNews_btn:MovieClip;
public var logo_mc:MovieClip;
public var play_btn:MovieClip;
}
}//package battlefield5_fla
Section 40
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 41
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 42
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 43
//missile_explosion_192 (main_fla.missile_explosion_192)
package main_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class missile_explosion_192 extends MovieClip {
public function missile_explosion_192(){
addFrameScript(26, frame27);
}
function frame27(){
parent.play();
}
}
}//package main_fla
Section 44
//Aim (Aim)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Aim extends MovieClip {
public function Aim(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 45
//Ambient (Ambient)
package {
import flash.media.*;
public dynamic class Ambient extends Sound {
}
}//package
Section 46
//AmmoElement (AmmoElement)
package {
import flash.display.*;
public dynamic class AmmoElement extends MovieClip {
}
}//package
Section 47
//Bazooka (Bazooka)
package {
import flash.display.*;
public dynamic class Bazooka extends MovieClip {
public var bazLegsMask:MovieClip;
public var bazHeadMask:MovieClip;
public var bazookaAnim:MovieClip;
public var bazookasHealth:MovieClip;
public var bazBodyMask:MovieClip;
}
}//package
Section 48
//BazookaSound (BazookaSound)
package {
import flash.media.*;
public dynamic class BazookaSound extends Sound {
}
}//package
Section 49
//BodyMask (BodyMask)
package {
import flash.display.*;
public dynamic class BodyMask extends MovieClip {
}
}//package
Section 50
//Bullet (Bullet)
package {
import flash.display.*;
public dynamic class Bullet extends MovieClip {
}
}//package
Section 51
//DebrieSoldier (DebrieSoldier)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class DebrieSoldier extends MovieClip {
public var debriePart:MovieClip;
public var debriesTimer:Timer;
public function DebrieSoldier(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function randomMove(_arg1:TimerEvent):void{
if (!root.isPause){
debriePart.x = ((Math.random() * parent.getChildAt(0).width) / 2);
debriePart.y = (((Math.random() * parent.getChildAt(0).height) / 2) - 80);
};
}
function frame3(){
if (this != null){
if (debriesTimer != null){
debriesTimer.removeEventListener(TimerEvent.TIMER, randomMove);
};
this.visible = false;
};
}
function frame1(){
stop();
}
function frame2(){
stop();
debriesTimer = new Timer(250);
debriesTimer.addEventListener(TimerEvent.TIMER, randomMove);
debriesTimer.start();
}
}
}//package
Section 52
//Gun1 (Gun1)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Gun1 extends MovieClip {
public var gunInerAim1_mc:Aim;
public function Gun1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 53
//Gun2 (Gun2)
package {
import flash.display.*;
public dynamic class Gun2 extends MovieClip {
public var gunInnerAim2_mc:Aim;
}
}//package
Section 54
//Gun3 (Gun3)
package {
import flash.display.*;
public dynamic class Gun3 extends MovieClip {
public var gunInnerAim3_mc:Aim;
}
}//package
Section 55
//Gun4 (Gun4)
package {
import flash.display.*;
public dynamic class Gun4 extends MovieClip {
public var gunInnerAim4_mc:Aim;
public var gunInner4_mc:MovieClip;
}
}//package
Section 56
//Gun5 (Gun5)
package {
import flash.display.*;
public dynamic class Gun5 extends MovieClip {
public var gunInnerAim5_mc:Aim;
public var gunInner5_mc:MovieClip;
}
}//package
Section 57
//Gun6 (Gun6)
package {
import flash.display.*;
public dynamic class Gun6 extends MovieClip {
public var gunInnerAim6_mc:Aim;
}
}//package
Section 58
//GunHolder (GunHolder)
package {
import flash.display.*;
public dynamic class GunHolder extends MovieClip {
}
}//package
Section 59
//GunIcon1 (GunIcon1)
package {
import flash.display.*;
public dynamic class GunIcon1 extends MovieClip {
}
}//package
Section 60
//GunIcon2 (GunIcon2)
package {
import flash.display.*;
public dynamic class GunIcon2 extends MovieClip {
}
}//package
Section 61
//GunIcon3 (GunIcon3)
package {
import flash.display.*;
public dynamic class GunIcon3 extends MovieClip {
}
}//package
Section 62
//GunIcon4 (GunIcon4)
package {
import flash.display.*;
public dynamic class GunIcon4 extends MovieClip {
}
}//package
Section 63
//GunIcon5 (GunIcon5)
package {
import flash.display.*;
public dynamic class GunIcon5 extends MovieClip {
}
}//package
Section 64
//GunIcon6 (GunIcon6)
package {
import flash.display.*;
public dynamic class GunIcon6 extends MovieClip {
}
}//package
Section 65
//Guy (Guy)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Guy extends MovieClip {
public var myPoint:Point;
public var debrie_mc:MovieClip;
public var deadSwitch:Boolean;
public function Guy(){
addFrameScript(11, frame12, 12, frame13, 69, frame70, 74, frame75, 119, frame120, 132, frame133, 170, frame171, 175, frame176, 213, frame214);
}
function frame70(){
if (!root.isPause){
if (root != null){
if (parent.parent != null){
if (parent != null){
if (this != null){
if (parent.parent.gOver == false){
parent.parent.stopMusic();
gotoAndPlay("shoot");
};
};
};
};
};
};
}
function frame75(){
if (root != null){
if (parent.parent.solMusicNum != undefined){
if (parent.parent.solMusicNum > 1){
parent.parent.solMusicNum--;
parent.parent.solMTimer.delay = (1000 / parent.parent.solMusicNum);
};
};
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (parent.parent.wallDemageSoldiers > 0){
parent.parent.wallDemageSoldiers--;
};
parent.getChildByName("bodyMask").visible = false;
if ((((parent.parent.wall_mc.numChildren > 1)) && (!((parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum] == null))))){
trace(("WALL CHILD IS : " + parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].name));
parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].gotoAndStop(3);
parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].visible = false;
parent.parent.solDebrieNum++;
trace(("solDebrieNum : " + parent.parent.solDebrieNum));
};
};
};
}
function frame171(){
stop();
if (root != null){
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
parent.parent.deadUnits++;
parent.parent.headshotsNum++;
parent.parent.levelMoney = (parent.parent.levelMoney + 10);
parent.parent.headshotBonus = (parent.parent.headshotBonus + 30);
parent.visible = false;
trace(("Wall demage soldiers is : " + parent.parent.wallDemageSoldiers));
};
};
}
function frame176(){
if (root != null){
if (parent.parent.solMusicNum != undefined){
if (parent.parent.solMusicNum > 1){
parent.parent.solMusicNum--;
parent.parent.solMTimer.delay = (1000 / parent.parent.solMusicNum);
};
};
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (parent.parent.wallDemageSoldiers > 0){
parent.parent.wallDemageSoldiers--;
};
parent.getChildByName("bodyMask").visible = false;
if ((((parent.parent.wall_mc.numChildren > 1)) && (!((parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum] == null))))){
trace(("WALL CHILD IS : " + parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].name));
parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].gotoAndStop(3);
parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].visible = false;
parent.parent.solDebrieNum++;
trace(("solDebrieNum : " + parent.parent.solDebrieNum));
};
};
};
}
function frame214(){
stop();
if (root != null){
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
trace(("GOVER == " + parent.parent.gOver));
parent.parent.deadUnits++;
parent.parent.legshotsNum++;
parent.parent.levelMoney = (parent.parent.levelMoney + 10);
parent.visible = false;
};
};
}
function frame12(){
gotoAndPlay("run");
}
function frame13(){
myPoint = new Point(0, 0);
deadSwitch = false;
if (root != null){
if (!root.isPause){
if (parent.parent.gOver == false){
parent.gotoAndStop(2);
debrie_mc.x = ((parent.parent.wall_mc.x - parent.x) + (parent.parent.wall_mc.width * (Math.random() * -1)));
debrie_mc.y = ((parent.parent.wall_mc.y - parent.y) - (parent.parent.wall_mc.height * (Math.random() * -1)));
if (!parent.parent.mSwitch){
parent.parent.solMTimer.start();
parent.parent.mSwitch = true;
};
parent.parent.runMusic();
};
} else {
if (root.isPause){
stop();
};
};
};
}
function frame120(){
stop();
if (root != null){
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (!deadSwitch){
parent.parent.deadUnits++;
parent.parent.levelMoney = (parent.parent.levelMoney + 10);
parent.visible = false;
deadSwitch = true;
if ((((parent.parent.wall_mc.numChildren > 1)) && (!((parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum] == null))))){
trace(("WALL CHILD IS : " + parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].name));
parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].gotoAndStop(3);
parent.parent.solDebrieNum++;
trace(("solDebrieNum : " + parent.parent.solDebrieNum));
};
};
};
};
}
function frame133(){
if (root != 0){
if (parent.parent.solMusicNum != undefined){
if (parent.parent.solMusicNum > 1){
parent.parent.solMusicNum--;
parent.parent.solMTimer.delay = (1000 / parent.parent.solMusicNum);
};
};
if ((((parent.parent.gOver == false)) && ((parent.parent.shopOn == false)))){
if (parent.parent.wallDemageSoldiers > 0){
parent.parent.wallDemageSoldiers--;
};
if (parent != null){
parent.getChildByName("bodyMask").visible = false;
};
if ((((parent.parent.wall_mc.numChildren > 1)) && (!((parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum] == null))))){
trace(("WALL CHILD IS : " + parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].name));
parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].gotoAndStop(3);
parent.parent.wall_mc.debrieSolArr[parent.parent.solDebrieNum].visible = false;
parent.parent.solDebrieNum++;
trace(("solDebrieNum : " + parent.parent.solDebrieNum));
};
};
};
}
}
}//package
Section 66
//HeadMask (HeadMask)
package {
import flash.display.*;
public dynamic class HeadMask extends MovieClip {
}
}//package
Section 67
//HealthMask (HealthMask)
package {
import flash.display.*;
public dynamic class HealthMask extends MovieClip {
}
}//package
Section 68
//Helicopter (Helicopter)
package {
import flash.display.*;
public dynamic class Helicopter extends MovieClip {
public var helicopterHealth_mc:MovieClip;
public var bodyMask:MovieClip;
public var helicAnim_mc:MovieClip;
}
}//package
Section 69
//HelicopterFlySound (HelicopterFlySound)
package {
import flash.media.*;
public dynamic class HelicopterFlySound extends Sound {
}
}//package
Section 70
//IinBullet4 (IinBullet4)
package {
import flash.display.*;
public dynamic class IinBullet4 extends MovieClip {
}
}//package
Section 71
//InBullet1 (InBullet1)
package {
import flash.display.*;
public dynamic class InBullet1 extends MovieClip {
}
}//package
Section 72
//InBullet2 (InBullet2)
package {
import flash.display.*;
public dynamic class InBullet2 extends MovieClip {
}
}//package
Section 73
//InBullet3 (InBullet3)
package {
import flash.display.*;
public dynamic class InBullet3 extends MovieClip {
}
}//package
Section 74
//InBullet5 (InBullet5)
package {
import flash.display.*;
public dynamic class InBullet5 extends MovieClip {
}
}//package
Section 75
//InBullet6 (InBullet6)
package {
import flash.display.*;
public dynamic class InBullet6 extends MovieClip {
}
}//package
Section 76
//Jeep (Jeep)
package {
import flash.display.*;
public dynamic class Jeep extends MovieClip {
public var jeepHealth:MovieClip;
public var bodyMask:MovieClip;
public var jeepAnim_mc:MovieClip;
}
}//package
Section 77
//JeepSound (JeepSound)
package {
import flash.media.*;
public dynamic class JeepSound extends Sound {
}
}//package
Section 78
//LegsMask (LegsMask)
package {
import flash.display.*;
public dynamic class LegsMask extends MovieClip {
}
}//package
Section 79
//LevelSound (LevelSound)
package {
import flash.media.*;
public dynamic class LevelSound extends Sound {
}
}//package
Section 80
//Reload (Reload)
package {
import flash.media.*;
public dynamic class Reload extends Sound {
}
}//package
Section 81
//Shot1 (Shot1)
package {
import flash.media.*;
public dynamic class Shot1 extends Sound {
}
}//package
Section 82
//Soldier (Soldier)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Soldier extends MovieClip {
public var headMask:MovieClip;
public var guy:Guy;
public var legsMask:MovieClip;
public var bodyMask:MovieClip;
public var soldiersHealth:SoldierHealth;
public function Soldier(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 83
//SoldierHealth (SoldierHealth)
package {
import flash.display.*;
public dynamic class SoldierHealth extends MovieClip {
public var solHealthMask:MovieClip;
}
}//package
Section 84
//SoldierSound (SoldierSound)
package {
import flash.media.*;
public dynamic class SoldierSound extends Sound {
}
}//package
Section 85
//Tank (Tank)
package {
import flash.display.*;
public dynamic class Tank extends MovieClip {
public var tankAnim_mc:MovieClip;
public var tankHealth_mc:MovieClip;
public var bodyMask:MovieClip;
}
}//package
Section 86
//TankSound (TankSound)
package {
import flash.media.*;
public dynamic class TankSound extends Sound {
}
}//package
Section 87
//Target (Target)
package {
import flash.display.*;
public dynamic class Target extends MovieClip {
public var tPart3_mc:MovieClip;
public var tPart1_mc:MovieClip;
public var tPart4_mc:MovieClip;
public var tPart2_mc:MovieClip;
}
}//package
Section 88
//Turret (Turret)
package {
import flash.display.*;
public dynamic class Turret extends MovieClip {
public var turAnim_mc:MovieClip;
public var turretHealth_mc:MovieClip;
public var bodyMask:MovieClip;
}
}//package
Section 89
//TurretSound (TurretSound)
package {
import flash.media.*;
public dynamic class TurretSound extends Sound {
}
}//package
Section 90
//Weapon1 (Weapon1)
package {
import flash.display.*;
public dynamic class Weapon1 extends MovieClip {
}
}//package
Section 91
//Weapon2 (Weapon2)
package {
import flash.display.*;
public dynamic class Weapon2 extends MovieClip {
}
}//package
Section 92
//Weapon3 (Weapon3)
package {
import flash.display.*;
public dynamic class Weapon3 extends MovieClip {
}
}//package
Section 93
//Weapon4 (Weapon4)
package {
import flash.display.*;
public dynamic class Weapon4 extends MovieClip {
}
}//package
Section 94
//Weapon5 (Weapon5)
package {
import flash.display.*;
public dynamic class Weapon5 extends MovieClip {
}
}//package
Section 95
//Weapon6 (Weapon6)
package {
import flash.display.*;
public dynamic class Weapon6 extends MovieClip {
}
}//package
Section 96
//WeaponIconHolder (WeaponIconHolder)
package {
import flash.display.*;
public dynamic class WeaponIconHolder extends Sprite {
public var arrowDown:MovieClip;
public var arrowUp:MovieClip;
public var mask_mc:MovieClip;
}
}//package
Section 97
//WIcon1 (WIcon1)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class WIcon1 extends MovieClip {
public var gunPrice_txt:TextField;
public function WIcon1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 98
//WIcon2 (WIcon2)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class WIcon2 extends MovieClip {
public var gunPrice_txt:TextField;
public function WIcon2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 99
//WIcon3 (WIcon3)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class WIcon3 extends MovieClip {
public var gunPrice_txt:TextField;
public function WIcon3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 100
//WIcon4 (WIcon4)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class WIcon4 extends MovieClip {
public var gunPrice_txt:TextField;
public function WIcon4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 101
//WIcon5 (WIcon5)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class WIcon5 extends MovieClip {
public var gunPrice_txt:TextField;
public function WIcon5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 102
//WIcon6 (WIcon6)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class WIcon6 extends MovieClip {
public var gunPrice_txt:TextField;
public function WIcon6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 103
//WinLevel (WinLevel)
package {
import flash.media.*;
public dynamic class WinLevel extends Sound {
}
}//package