Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader {
private static var cpmstarLoader:Loader;
public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{
var _local3:String;
Security.allowDomain("server.cpmstar.com");
_local3 = "http://server.cpmstar.com/adviewas3.swf";
cpmstarLoader = new Loader();
cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (cpmstarLoader);
}
}
}//package CPMStar
Section 2
//Enemy_UPmenu_34 (ITankAE_fla.Enemy_UPmenu_34)
package ITankAE_fla {
import flash.display.*;
public dynamic class Enemy_UPmenu_34 extends MovieClip {
public function Enemy_UPmenu_34(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package ITankAE_fla
Section 3
//Fader_16 (ITankAE_fla.Fader_16)
package ITankAE_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Fader_16 extends MovieClip {
public function Fader_16(){
addFrameScript(19, frame20, 39, frame40);
}
function frame20(){
if (MovieClip(parent).faderMusic == false){
SoundMixer.stopAll();
};
MovieClip(parent).gotoAndStop(MovieClip(parent).faderTarget);
}
function frame40(){
gotoAndStop(1);
}
}
}//package ITankAE_fla
Section 4
//GAME_ENGINE_27 (ITankAE_fla.GAME_ENGINE_27)
package ITankAE_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class GAME_ENGINE_27 extends MovieClip {
public var FRAGMENTS;
public var enemyHealth:Array;
public var MISSILES;
public var missileYSpeed:Array;
public var enemyFreqArray:Array;
public var pilotYSpeed:Array;
public var ICOPMISSILE;
public var pauseFreeze:Boolean;
public var enemyBounce:Array;
public var enemyIncline:Array;
public var enemyData_Bounce:Array;
public var fragmentArray_shadow:Array;
public var tankXSpeed:Number;
public var explosionArray:Array;
public var dead:Boolean;
public var tankSpin:Number;
public var deadX:Number;
public var deadY:Number;
public var bloodArray:Array;
public var experiencePot:Number;
public var BOMBSCARS;
public var IShotTrailScaleArray:Array;
public var updateComponentCounterStore:Number;
public var cursorArray:Array;
public var enemyBombType:Array;
public var smokeDiv:Number;
public var shakeScreenActive:Boolean;
public var pilotState:Array;
public var PILOTS;
public var missileArray:Array;
public var HUD;
public var tankYSpeed:Number;
public var missileArray_Homer:Array;
public var fragLimit:Number;
public var icopMissileArray:Array;
public var dropShadow:DropShadowFilter;
public var enemyYSpeed:Array;
public var mopTimer:Number;
public var enemyData_Speed:Array;
public var destroyEngineActive:Boolean;
public var icopRadarPoint:Array;
public var enemyYStart:Array;
public var shadowArray:Array;
public var updateComponentCounter:Number;
public var IShotTrailSpeed:Array;
public var SHADOW;
public var IShotArray:Array;
public var ii;
public var maxFuel:Number;
public var smokeArray_spin:Array;
public var deadTimer:Number;
public var bloodXSpeed:Array;
public var SMOKE;
public var bloodSpin:Array;
public var missileArray_Gunner:Array;
public var experience:Number;
public var upgradeMenuArray:Array;
public var missileType:Array;
public var combo:Number;
public var gameActive:Boolean;
public var enemySpeed:Array;
public var bloodActive:Boolean;
public var fuel:Number;
public var fragmentArray_xSpeed:Array;
public var BLOOD;
public var tankMaxHeight:Number;
public var bloodYSpeed:Array;
public var fragmentArray:Array;
public var maxExperience:Number;
public var forceEnemyTimer:Number;
public var pilotShadow:Array;
public var gameYOffset:Number;
public var smokeArray:Array;
public var TANK_I;
public var altSwitch:Boolean;
public var messageFilter:GlowFilter;
public var mopHolder:Array;
public var fragmentArray_ySpeed:Array;
public var maxBoom:Number;
public var gameTimer:Number;
public var enemyAmmo:Array;
public var pilotArray:Array;
public var maxCombo:Number;
public var enemyWave:Array;
public var missileHoming:Array;
public var tankLightDir:Number;
public var tankShadow:Array;
public var fireTimer:Number;
public var mopCheck:Boolean;
public var messageArray:Array;
public var upgradeMenuPos:Number;
public var tankRadarPoint;
public var blurFilter:BlurFilter;
public var tankHeight:Number;
public var enemyShadow:Array;
public var enemyData_Height:Array;
public var gameXOffset:Number;
public var boom:Number;
public var shakeArray:Array;
public var radarArray:Array;
public var smokeArray_ySpeed:Array;
public var pilotSpin:Array;
public var IShotTrailArray:Array;
public var gameComplete:Boolean;
public var groundPos:Number;
public var enemyDestroy:Array;
public var cursorTrailLength;
public var cursor:MovieClip;
public var missileArray_Bouncer:Array;
public var ENEMY;
public var enemyData_BombType:Array;
public var pilotTimer:Array;
public var missileXSpeed:Array;
public var level:Number;
public var missileStrength:Array;
public var pilotXSpeed:Array;
public var smokeLimit:Number;
public var enemyArray:Array;
public var enemyData_HeightVar:Array;
public var enemyData_Ammo:Array;
public var enemyRadarPoint:Array;
public var bombScarArray:Array;
public var spaceSwitch:Boolean;
public var missileArray_Bomber:Array;
public var mopActive:Boolean;
public var upgradeFreeze:Boolean;
public var enemyNameArray:Array;
public var MESSAGE;
public var enemyData_Wave:Array;
public var GAME;
public var experienceTotal:Number;
public var FPSTimer:Number;
public var cameraType:Number;
public function GAME_ENGINE_27(){
addFrameScript(0, frame1);
}
public function checkRightClick(_arg1){
if (mopCheck == false){
mopCheck = true;
};
}
public function updateMissile(){
var _local1:*;
_local1 = 0;
while (_local1 < missileArray.length) {
if ((((((((missileArray[_local1].y < groundPos)) && ((missileArray[_local1].y > -800)))) && ((missileArray[_local1].x < 500)))) && ((missileArray[_local1].x > -500)))){
missileArray[_local1].y = (missileArray[_local1].y + missileYSpeed[_local1]);
missileArray[_local1].x = (missileArray[_local1].x + missileXSpeed[_local1]);
if ((((missileType[_local1] == 1)) || ((missileType[_local1] == 2)))){
var _local2 = missileYSpeed;
var _local3 = _local1;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
missileArray[_local1].rotation = (missileArray[_local1].rotation / 1.05);
missileYSpeed[_local1] = (missileYSpeed[_local1] / 1.1);
missileXSpeed[_local1] = (missileXSpeed[_local1] / 1.1);
} else {
if ((((missileType[_local1] == 3)) || ((missileType[_local1] == 4)))){
if (missileHoming[_local1] > 0){
missileArray[_local1].rotation = (angle(missileArray[_local1].x, missileArray[_local1].y, GAME.TANK.x, GAME.TANK.y) - 90);
missileXSpeed[_local1] = (((3 * missileType[_local1]) - 2) * Math.cos((missileArray[_local1].rotation * 0.01745329)));
missileYSpeed[_local1] = (((3 * missileType[_local1]) - 2) * Math.sin((missileArray[_local1].rotation * 0.01745329)));
_local2 = missileHoming;
_local3 = _local1;
_local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
} else {
missileArray[_local1].sprite.gotoAndStop(1);
};
};
};
if (pythag(missileArray[_local1].x, missileArray[_local1].y, GAME.TANK.x, GAME.TANK.y) < 30){
newExplosion(missileArray[_local1].x, missileArray[_local1].y, 0.5);
tankYSpeed = missileStrength[missileType[_local1]];
tankXSpeed = ((Math.random() * 20) - 10);
tankSpin = ((Math.random() * 100) - 50);
destroyMissile(_local1);
shakeScreen(1.8, 2, 2, 2);
_local1--;
};
} else {
if (missileType[_local1] == 2){
missileYSpeed[_local1] = -17;
missileArray[_local1].y = (groundPos - 1);
missileType[_local1] = 1;
} else {
newExplosion(missileArray[_local1].x, missileArray[_local1].y, 0.5);
shakeScreen(8, 1, 1, 1);
destroyMissile(_local1);
_local1--;
};
};
_local1++;
};
}
public function updateBombScar(){
var _local1:Number;
_local1 = 0;
while (_local1 < bombScarArray.length) {
if (bombScarArray[_local1].x > -300){
bombScarArray[_local1].x = (bombScarArray[_local1].x - 15);
} else {
destroyBombScar(_local1);
};
_local1++;
};
}
public function newBlast(_arg1, _arg2){
tankXSpeed = (tankXSpeed - (100 / ((_arg1 - GAME.TANK.x) / 5)));
tankYSpeed = -20;
}
public function newBlood(_arg1, _arg2){
var _local3:Number;
var _local4:MovieClip;
if (bloodActive == true){
if (_arg2 > (groundPos - 2)){
_arg2 = (groundPos - 2);
};
_local3 = 0;
while (_local3 < 20) {
_local4 = new Blood();
_local4.x = _arg1;
_local4.scaleX = ((Math.random() * 1) + 0.5);
_local4.scaleY = _local4.scaleX;
_local4.rotation = (Math.random() * 360);
_local4.y = _arg2;
_local4.alpha = (Math.round((Math.random() * 10)) / 10);
bloodXSpeed.push(((Math.random() * 10) - 5));
bloodYSpeed.push(-(((Math.random() * 5) - 2)));
bloodArray.push(_local4);
bloodSpin.push(((Math.random() * 10) - 5));
BLOOD.addChild(_local4);
_local3++;
};
};
}
public function destroyExplosion(_arg1){
FRAGMENTS.removeChild(explosionArray[_arg1]);
delete explosionArray[_arg1];
explosionArray.splice(_arg1, 1);
}
public function updateEnemy(){
var _local1:*;
_local1 = 0;
while (_local1 < enemyArray.length) {
if ((((((Math.round((Math.random() * 10)) == 1)) && ((enemyAmmo[_local1] > 0)))) && (((((enemyArray[_local1].x - GAME.TANK.x) < 50)) && (((enemyArray[_local1].x - GAME.TANK.x) > -50)))))){
var _local2 = enemyAmmo;
var _local3 = _local1;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
newMissile(enemyArray[_local1].x, (enemyArray[_local1].y + 10), enemyBombType[_local1], enemyArray[_local1].scaleX);
};
enemyArray[_local1].x = (enemyArray[_local1].x + enemySpeed[_local1]);
processShadow(enemyArray[_local1].x, enemyArray[_local1].y, (enemyArray[_local1].width / 1.3), enemyShadow[_local1]);
if (enemyArray[_local1].y < (enemyYStart[_local1] + enemyWave[_local1])){
enemyYSpeed[_local1] = (enemyYSpeed[_local1] + 0.1);
} else {
if (enemyArray[_local1].y > (enemyYStart[_local1] + enemyWave[_local1])){
enemyYSpeed[_local1] = (enemyYSpeed[_local1] - 0.1);
};
};
enemyArray[_local1].y = (enemyArray[_local1].y + enemyYSpeed[_local1]);
if (enemyArray[_local1].y < enemyYStart[_local1]){
enemyArray[_local1].y++;
} else {
enemyArray[_local1].y = (enemyArray[_local1].y - 0.334);
};
if (enemyHealth[_local1] == 1){
processRadarPoint(enemyArray[_local1].x, enemyArray[_local1].y, enemyRadarPoint[_local1]);
} else {
enemyYSpeed[_local1] = (enemyYSpeed[_local1] + 1.1);
if ((Math.random() * 10) < 1){
newExplosion(enemyArray[_local1].x, enemyArray[_local1].y, 0.3);
};
enemyYSpeed[_local1] = (enemyYSpeed[_local1] / 1.02);
if ((Math.random() * 20) < 1){
newPilot(enemyArray[_local1].x, enemyArray[_local1].y, enemyArray[_local1].scaleX);
};
enemySpeed[_local1] = (enemySpeed[_local1] * 1.01);
enemyArray[_local1].rotation = (enemyArray[_local1].rotation + (1 * enemyArray[_local1].scaleX));
newSmoke(enemyArray[_local1].x, enemyArray[_local1].y, 0.2);
if (enemyArray[_local1].y > groundPos){
newExplosion(enemyArray[_local1].x, enemyArray[_local1].y, 1);
newFragments(enemyArray[_local1].x, enemyArray[_local1].y, 5);
enemyArray[_local1].x = 400;
};
};
if ((((pythag(enemyArray[_local1].x, enemyArray[_local1].y, GAME.TANK.x, GAME.TANK.y) < 50)) && ((enemyHealth[_local1] == 1)))){
boom = (boom + ((Math.random() * 20) + 20));
newFragments(enemyArray[_local1].x, enemyArray[_local1].y, 5);
combo++;
if (combo == 25){
MovieClip(parent).newMedal(3);
} else {
if (combo == 50){
MovieClip(parent).newMedal(4);
} else {
if (combo == 75){
MovieClip(parent).newMedal(5);
};
};
};
newMessage(enemyArray[_local1].x, enemyArray[_local1].y, 1, combo, 4);
blastRadius(enemyArray[_local1].x, enemyArray[_local1].y, 2);
tankYSpeed = enemyBounce[_local1];
if ((Math.random() * 2) < 1){
newExplosion(enemyArray[_local1].x, enemyArray[_local1].y, 1);
enemyHealth[_local1] = 0;
enemyYSpeed[_local1] = 0;
} else {
newExplosion(enemyArray[_local1].x, enemyArray[_local1].y, 1);
enemyArray[_local1].x = 400;
};
};
if ((((enemyArray[_local1].x > 340)) || ((enemyArray[_local1].x < -340)))){
destroyEnemy(_local1);
_local1--;
};
_local1++;
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
addEventListener(MouseEvent.MOUSE_UP, MouseUp);
addEventListener(MouseEvent.MOUSE_MOVE, MouseMove);
Key.initialize(stage);
destroyEngineActive = false;
bloodXSpeed = new Array();
bloodYSpeed = new Array();
bloodArray = new Array();
bloodSpin = new Array();
bloodActive = false;
spaceSwitch = false;
gameComplete = false;
focusRect = false;
icopMissileArray = new Array();
icopRadarPoint = new Array();
if (MovieClip(parent).gameType == 0){
enemyFreqArray = new Array(null, 50, 50, 50, 0, 0);
} else {
enemyFreqArray = new Array(null, 50, 0, 0, 0, 0);
};
gameTimer = 0;
enemyData_Speed = new Array(null, 5, 7, 6, 4, 3);
enemyData_Wave = new Array(null, 40, 60, 50, 20, 0);
enemyData_BombType = new Array(null, 1, 2, 3, 4, 4);
enemyData_Ammo = new Array(null, 1, 1, 1, 1, 0);
enemyData_Height = new Array(null, -200, -300, -400, -500, 50);
enemyData_HeightVar = new Array(null, 100, 200, 300, 400, 0);
enemyData_Bounce = new Array(null, -15, -15, -15, -15, -25);
missileStrength = new Array(null, -20, -20, -20, -15);
upgradeMenuArray = new Array();
shakeScreenActive = true;
shadowArray = new Array();
explosionArray = new Array();
smokeArray = new Array();
smokeArray_spin = new Array();
smokeArray_ySpeed = new Array();
shakeArray = new Array(0, 0, 0, 0);
enemyNameArray = new Array(null, "Bomber", "Bouncer", "Gunner", "Homer", "Miner");
missileArray = new Array();
missileArray_Bomber = new Array();
missileArray_Bouncer = new Array();
missileArray_Gunner = new Array();
missileArray_Homer = new Array();
missileHoming = new Array();
missileXSpeed = new Array();
missileYSpeed = new Array();
missileType = new Array();
enemyArray = new Array();
enemyRadarPoint = new Array();
enemyShadow = new Array();
enemySpeed = new Array();
enemyDestroy = new Array();
enemyBombType = new Array();
enemyAmmo = new Array();
enemyHealth = new Array();
enemyIncline = new Array();
enemyYSpeed = new Array();
enemyWave = new Array();
enemyYStart = new Array();
enemyBounce = new Array();
fragmentArray = new Array();
fragmentArray_ySpeed = new Array();
fragmentArray_xSpeed = new Array();
fragmentArray_shadow = new Array();
bombScarArray = new Array();
messageArray = new Array();
pilotArray = new Array();
pilotXSpeed = new Array();
pilotYSpeed = new Array();
pilotState = new Array();
pilotShadow = new Array();
pilotSpin = new Array();
pilotTimer = new Array();
radarArray = new Array();
tankXSpeed = 0;
tankYSpeed = 0;
gameXOffset = 0;
gameYOffset = 0;
updateComponentCounter = 0;
updateComponentCounterStore = 1;
cameraType = 1;
tankSpin = 0;
smokeDiv = 2;
boom = 0;
maxBoom = 500;
maxFuel = 2000;
fuel = maxFuel;
level = 1;
dead = false;
experience = 0;
experienceTotal = 0;
maxExperience = 100;
experiencePot = 0;
combo = 0;
maxCombo = 0;
tankHeight = 0;
tankMaxHeight = 0;
fireTimer = 20000;
GAME = new GAMEMC();
addChild(GAME);
HUD = new HUDMC();
addChild(HUD);
HUD.y = 290;
GAME.x = 200;
GAME.y = 200;
BOMBSCARS = new MovieClip();
GAME.addChild(BOMBSCARS);
SHADOW = new MovieClip();
GAME.addChild(SHADOW);
SMOKE = new MovieClip();
GAME.addChild(SMOKE);
MISSILES = new MovieClip();
GAME.addChild(MISSILES);
ICOPMISSILE = new MovieClip();
GAME.addChild(ICOPMISSILE);
ENEMY = new MovieClip();
GAME.addChild(ENEMY);
PILOTS = new MovieClip();
GAME.addChild(PILOTS);
FRAGMENTS = new MovieClip();
GAME.addChild(FRAGMENTS);
BLOOD = new MovieClip();
GAME.addChild(BLOOD);
TANK_I = new TankI();
GAME.addChild(TANK_I);
TANK_I.visible = false;
TANK_I.y = -550;
MESSAGE = new MovieClip();
GAME.addChild(MESSAGE);
GAME.setChildIndex(GAME.BORDERS, 19);
HUD.warnSign.visible = false;
HUD.covers.visible = false;
FPSTimer = 0;
upgradeFreeze = false;
upgradeMenuPos = 0;
gameActive = true;
pauseFreeze = false;
forceEnemyTimer = 200;
deadTimer = 0;
deadX = 0;
deadY = 0;
groundPos = GAME.TANK.y;
tankShadow = new Array(newShadow());
tankRadarPoint = newRadarPoint(1);
tankLightDir = 0;
dropShadow = new DropShadowFilter();
dropShadow.hideObject = true;
dropShadow.strength = 0.4;
dropShadow.quality = BitmapFilterQuality.LOW;
SHADOW.filters = [dropShadow];
blurFilter = new BlurFilter();
blurFilter.blurX = 8;
blurFilter.blurY = 8;
blurFilter.quality = BitmapFilterQuality.LOW;
SMOKE.filters = [blurFilter];
messageFilter = new GlowFilter();
messageFilter.blurX = 4;
messageFilter.blurY = 4;
messageFilter.color = 0xFFFFFF;
messageFilter.strength = 4;
messageFilter.quality = BitmapFilterQuality.LOW;
MESSAGE.filters = [messageFilter];
cursorArray = new Array();
cursorTrailLength = 10;
ii = 0;
while (ii < cursorTrailLength) {
cursorArray[ii] = 0;
ii++;
};
cursor = new Cursor();
if (MovieClip(parent).gameType != 2){
cursor.visible = false;
};
FRAGMENTS.addChild(cursor);
IShotArray = new Array();
IShotTrailArray = new Array();
IShotTrailSpeed = new Array();
IShotTrailScaleArray = new Array();
altSwitch = false;
stage.addEventListener(Event.MOUSE_LEAVE, checkRightClick);
mopCheck = false;
mopHolder = new Array();
mopTimer = 0;
mopActive = false;
smokeLimit = 200;
fragLimit = 10;
shakeScreen(2, 0, 0, 0);
loadSettings();
stage.focus = this;
HUD.heightMaxText.text = tankMaxHeight;
}
public function processShadow(_arg1, _arg2, _arg3, _arg4){
if ((((updateComponentCounter == 0)) || ((_arg4 == tankShadow[0])))){
_arg4.x = _arg1;
_arg4.width = (((groundPos + (_arg2 / 6)) + 10) * (_arg3 / 65));
if (_arg2 < -220){
_arg4.alpha = 0;
} else {
_arg4.scaleY = _arg4.scaleX;
_arg4.alpha = (_arg4.scaleY * 2);
};
};
}
public function destroyFragment(_arg1){
FRAGMENTS.removeChild(fragmentArray[_arg1]);
delete fragmentArray[_arg1];
fragmentArray.splice(_arg1, 1);
fragmentArray_xSpeed.splice(_arg1, 1);
fragmentArray_ySpeed.splice(_arg1, 1);
SHADOW.removeChild(fragmentArray_shadow[_arg1]);
delete fragmentArray_shadow[_arg1];
fragmentArray_shadow.splice(_arg1, 1);
}
public function updateExplosion(){
var _local1:Number;
var _local2:Number;
_local1 = 0;
while (_local1 < explosionArray.length) {
if (explosionArray[_local1].currentFrame < 9){
explosionArray[_local1].alpha = (explosionArray[_local1].alpha - 0.05);
if ((((explosionArray[_local1].currentFrame > 4)) && ((pythag(explosionArray[_local1].x, explosionArray[_local1].y, GAME.TANK.x, GAME.TANK.y) < 50)))){
_local2 = (-10 - (Math.random() * 5));
if (_local2 < tankYSpeed){
tankYSpeed = _local2;
};
tankSpin = ((Math.random() * 100) - 50);
};
} else {
destroyExplosion(_local1);
_local1--;
};
_local1++;
};
}
public function destroyIShotTrail(_arg1){
GAME.BGItems.removeChild(IShotTrailArray[_arg1]);
delete IShotTrailArray[_arg1];
IShotTrailArray.splice(_arg1, 1);
IShotTrailSpeed.splice(_arg1, 1);
IShotTrailScaleArray.splice(_arg1, 1);
}
public function blastRadius(_arg1, _arg2, _arg3){
tankXSpeed = ((GAME.TANK.x - _arg1) / _arg3);
shakeScreen(1.8, 2, 2, 2);
tankSpin = tankXSpeed;
}
public function updateComponents(){
if (updateComponentCounter < updateComponentCounterStore){
updateComponentCounter++;
} else {
updateComponentCounter = 0;
};
}
public function onEnterFrame(_arg1){
var _local2:Number;
pauseGame();
if ((((upgradeFreeze == true)) || ((pauseFreeze == true)))){
gameActive = false;
} else {
gameActive = true;
};
if (gameActive == true){
gameTimer++;
if ((((((MovieClip(parent).gameType == 0)) && ((gameTimer == 750)))) && ((experienceTotal == 0)))){
MovieClip(parent).newMedal(7);
};
if ((((((MovieClip(parent).gameType == 0)) && ((gameTimer == 1500)))) && ((experienceTotal == 0)))){
MovieClip(parent).newMedal(8);
};
if (GAME.TANK.y < -575){
TANK_I.visible = true;
TANK_I.x = GAME.TANK.x;
} else {
TANK_I.visible = false;
};
if (gameComplete == false){
fuel--;
if (fuel == 0){
dead = true;
};
} else {
HUD.covers.visible = true;
experience = 0;
};
forceEnemyTimer--;
if (forceEnemyTimer == 0){
forceEnemyTimer = (Math.round((Math.random() * 80)) + 100);
newEnemy(1);
};
_local2 = 1;
while (_local2 < 6) {
if (Math.round(((Math.random() * (6000 + ((600 * _local2) / 2))) / enemyFreqArray[_local2])) == 1){
newEnemy(_local2);
forceEnemyTimer = (Math.round((Math.random() * 40)) + 50);
};
_local2++;
};
updateShake();
if (dead == false){
TANK();
camera();
updateMop();
} else {
if (deadTimer == 0){
newExplosion(GAME.TANK.x, GAME.TANK.y, 2);
deadX = GAME.TANK.x;
deadY = GAME.TANK.y;
SHADOW.removeChild(tankShadow[0]);
delete tankShadow[_local2];
tankShadow.splice(0, 1);
};
deadTimer++;
GAME.TANK.y = -1000;
GAME.TANK.visible = false;
if (deadTimer < 40){
if ((Math.random() * 2) < 1){
newFragments(((deadX + (Math.random() * 30)) - 15), (deadY - (Math.random() * 10)), 10);
newExplosion(((deadX + (Math.random() * 30)) - 15), ((deadY + (Math.random() * 10)) - 5), ((Math.random() * 0.6) + 0.2));
};
};
};
updateMessages();
updateSmoke();
updateCursor();
updateIShot();
updateEnemy();
updateMissile();
updateFragments();
updateGround();
updatePilots();
updateBlood();
updateExplosion();
updateHUD();
updateComponents();
updateICOPMISSILE();
updateBombScar();
if (boom >= maxBoom){
boom = maxBoom;
if (Key.isDown(Keyboard.UP)){
newExplosion(GAME.TANK.x, GAME.TANK.y, 0.4);
tankYSpeed = -20;
boom = 0;
};
};
setFPS();
} else {
if (upgradeFreeze == true){
upgradeMenuArray[0].x = (upgradeMenuArray[0].x - ((upgradeMenuArray[0].x - upgradeMenuPos) / 5));
if (upgradeMenuArray[0].alpha < 0.85){
upgradeMenuArray[0].alpha = (upgradeMenuArray[0].alpha + 0.05);
};
if (upgradeMenuArray[0].x > 399){
removeChild(upgradeMenuArray[0]);
delete upgradeMenuArray[0];
upgradeMenuArray.splice(0, 1);
Key.clearKeys();
upgradeFreeze = false;
upgradeMenuPos = 0;
};
};
};
if (deadTimer == 40){
newMessage(0, -300, "FAILURE", 3, 4);
} else {
if (deadTimer == 100){
MovieClip(parent).gotoFrame("TITLE", false);
} else {
if (deadTimer == 120){
destroyEngine();
};
};
};
}
public function angle(_arg1, _arg2, _arg3, _arg4){
return ((Math.round(((Math.atan2((_arg4 - _arg2), (_arg3 - _arg1)) / 3.141593) * 180)) + 90));
}
public function TANK(){
var _local1:*;
if (Key.isDown(Keyboard.RIGHT)){
tankXSpeed = (tankXSpeed + 2);
GAME.TANK.body.rotation = (GAME.TANK.body.rotation + 2);
} else {
if (Key.isDown(Keyboard.LEFT)){
tankXSpeed = (tankXSpeed - 2);
GAME.TANK.body.rotation = (GAME.TANK.body.rotation - 2);
};
};
tankXSpeed = (tankXSpeed / 1.1);
tankYSpeed++;
tankXSpeed = (tankXSpeed - 0.2);
_local1 = 0;
while (_local1 < smokeDiv) {
GAME.TANK.y = (GAME.TANK.y + (tankYSpeed / smokeDiv));
GAME.TANK.x = (GAME.TANK.x + (tankXSpeed / smokeDiv));
_local1++;
};
if (GAME.TANK.x < -300){
GAME.TANK.x = -300;
tankXSpeed = 0;
} else {
if (GAME.TANK.x > 300){
GAME.TANK.x = 299;
tankXSpeed = 0;
};
};
if (GAME.TANK.y >= groundPos){
calcScore();
GAME.TANK.rotation = (GAME.TANK.rotation / 1.5);
tankSpin = (tankSpin / 1.5);
GAME.TANK.y = groundPos;
tankYSpeed = (-(tankYSpeed) / 2);
if (tankYSpeed > -0.5){
tankYSpeed = 0;
};
};
GAME.TANK.rotation = (GAME.TANK.rotation + tankSpin);
tankSpin = (tankSpin / 1.01);
GAME.TANK.wheelB.rotation = (GAME.TANK.wheelB.rotation + 60);
GAME.TANK.wheelF.rotation = (GAME.TANK.wheelF.rotation + 60);
GAME.TANK.wheelBB.rotation = (GAME.TANK.wheelBB.rotation + 60);
GAME.TANK.wheelFB.rotation = (GAME.TANK.wheelFB.rotation + 60);
GAME.TANK.wheelBB.x = (-10 - (GAME.TANK.x / 45));
GAME.TANK.wheelFB.x = (10 - (GAME.TANK.x / 45));
GAME.TANK.body.rotation = (GAME.TANK.body.rotation + ((Math.random() * 5) - 2.5));
GAME.TANK.body.rotation = (GAME.TANK.body.rotation / 1.1);
processShadow(GAME.TANK.x, GAME.TANK.y, GAME.TANK.width, tankShadow[0]);
processRadarPoint(GAME.TANK.x, GAME.TANK.y, tankRadarPoint);
}
public function newPilot(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:*;
_local4 = new Pilot();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.rotation = (Math.random() * 360);
pilotArray.push(_local4);
pilotXSpeed.push(((((Math.random() * 10) + 2) * _arg3) * -1));
pilotYSpeed.push(((Math.random() * 10) - 15));
pilotState.push(false);
pilotTimer.push(0);
pilotShadow.push(newShadow());
pilotSpin.push(((Math.random() * 30) - 15));
PILOTS.addChild(_local4);
}
public function setFPS(){
var _local1:Date;
var _local2:Number;
_local1 = new Date();
_local2 = 0;
while (_local1.getTime() < FPSTimer) {
_local1 = new Date();
_local2++;
};
FPSTimer = (_local1.getTime() + 32);
}
public function updateMessages(){
var _local1:*;
_local1 = 0;
while (_local1 < messageArray.length) {
if (messageArray[_local1].alpha > 0){
messageArray[_local1].alpha = (messageArray[_local1].alpha - 0.2);
} else {
destroyMessage(_local1);
_local1--;
};
_local1++;
};
}
public function calcScore(){
var _local1:*;
if (combo > 0){
if (combo > maxCombo){
maxCombo = combo;
HUD.comboMaxText.text = combo;
};
_local1 = ((combo * 10) + Math.round((combo * ((combo / 5) + 1))));
if (gameComplete == false){
experiencePot = (experiencePot + _local1);
experienceTotal = (experienceTotal + _local1);
};
newMessage((30 + (GAME.TANK.x / 4)), (groundPos + 30), 1, (((combo + " COMBO - ") + _local1) + " EXPERIENCE"), 15);
if (tankMaxHeight > 90){
MovieClip(parent).newMedal(6);
};
HUD.heightMaxText.text = tankMaxHeight;
combo = 0;
};
}
public function newIShot(_arg1, _arg2){
var _local3:MovieClip;
if (MovieClip(parent).gameType == 2){
_local3 = new IShot();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.scaleX = 1.65;
_local3.scaleY = 1.65;
ENEMY.addChild(_local3);
IShotArray.push(_local3);
};
}
public function newExplosion(_arg1, _arg2, _arg3){
var _local4:MovieClip;
_local4 = new Explosion();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.scaleX = (_arg3 / 2);
_local4.scaleY = (_arg3 / 2);
_local4.rotation = (Math.random() * 360);
newSmoke(_arg1, _arg2, 0.3);
FRAGMENTS.addChild(_local4);
explosionArray.push(_local4);
if (_arg2 > (groundPos - 20)){
newBombScar(_arg1);
};
}
public function updateFragments(){
var _local1:*;
_local1 = 0;
while (_local1 < fragmentArray.length) {
if (fragmentArray[_local1].x > -300){
processShadow((fragmentArray[_local1].x - 10), fragmentArray[_local1].y, 30, fragmentArray_shadow[_local1]);
fragmentArray[_local1].y = (fragmentArray[_local1].y + fragmentArray_ySpeed[_local1]);
var _local2 = fragmentArray_ySpeed;
var _local3 = _local1;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
fragmentArray[_local1].rotation = (fragmentArray[_local1].rotation + 10);
fragmentArray[_local1].x = (fragmentArray[_local1].x + fragmentArray_xSpeed[_local1]);
fragmentArray[_local1].x = (fragmentArray[_local1].x - 10);
fragmentArray_xSpeed[_local1] = (fragmentArray_xSpeed[_local1] / 1.1);
newSmoke(fragmentArray[_local1].x, fragmentArray[_local1].y, 0.7);
if (fragmentArray[_local1].y > (groundPos + 10)){
fragmentArray[_local1].y = (groundPos + 10);
fragmentArray_ySpeed[_local1] = (fragmentArray_ySpeed[_local1] * -0.4);
};
} else {
destroyFragment(_local1);
_local1--;
};
_local1++;
};
}
public function updateCursor(){
var _local1:Number;
if (MovieClip(parent).gameType == 2){
cursor.x = (cursor.x + ((FRAGMENTS.mouseX - cursor.x) / 1.5));
cursor.y = (cursor.y + ((FRAGMENTS.mouseY - cursor.y) / 1.5));
cursorArray.push(cursor.x);
cursorArray.push(cursor.y);
cursorArray.splice(0, 2);
FRAGMENTS.graphics.clear();
_local1 = 0;
while (_local1 < (cursorArray.length - 2)) {
FRAGMENTS.graphics.lineStyle((_local1 / (cursorTrailLength / 10)), 0xFF0000, 0.5);
FRAGMENTS.graphics.moveTo(cursorArray[_local1], cursorArray[(_local1 + 1)]);
_local1 = (_local1 + 2);
FRAGMENTS.graphics.lineTo(cursorArray[_local1], cursorArray[(_local1 + 1)]);
};
};
}
public function destroySmoke(_arg1){
SMOKE.removeChild(smokeArray[_arg1]);
delete smokeArray[_arg1];
smokeArray.splice(_arg1, 1);
smokeArray_ySpeed.splice(_arg1, 1);
smokeArray_spin.splice(_arg1, 1);
_arg1--;
}
public function updateMop(){
var _local1:*;
stage.focus = this;
if (GAME.TANK.x > 298){
GAME.TANK.x = 298;
tankXSpeed = 0;
Key.clearKeys();
} else {
if (GAME.TANK.x < -298){
GAME.TANK.x = -298;
tankXSpeed = 0;
Key.clearKeys();
};
};
if (mopCheck == true){
if (mopTimer < 20){
mopTimer++;
} else {
mopActive = true;
Key.clearKeys();
_local1 = new MOP();
addChild(_local1);
mopHolder[0] = _local1;
mopTimer = 0;
stage.frameRate = 0;
};
} else {
mopTimer = 0;
};
}
public function newEnemy(_arg1:Number){
var _local2:*;
_local2 = new Enemy();
_local2.y = (enemyData_Height[_arg1] + (Math.random() * enemyData_HeightVar[_arg1]));
if (Math.round((Math.random() * 2)) == 1){
_local2.x = -340;
enemySpeed.push(enemyData_Speed[_arg1]);
} else {
_local2.x = 340;
_local2.scaleX = (_local2.scaleX * -1);
enemySpeed.push((enemyData_Speed[_arg1] * -1));
};
_local2.gotoAndStop(_arg1);
enemyHealth.push(1);
enemyAmmo.push(enemyData_Ammo[_arg1]);
enemyShadow.push(newShadow());
enemyShadow[(enemyShadow.length - 1)].x = _local2.x;
enemyBombType.push(_arg1);
enemyRadarPoint.push(newRadarPoint(2));
enemyRadarPoint[(enemyRadarPoint.length - 1)].x = 400;
enemyArray.push(_local2);
enemyWave.push(enemyData_Wave[_arg1]);
enemyIncline.push(_local2.y);
enemyYSpeed.push(0);
enemyYStart.push(_local2.y);
enemyBounce.push(enemyData_Bounce[_arg1]);
ENEMY.addChild(_local2);
}
public function MouseMove(_arg1){
if (mopActive == true){
removeChild(mopHolder[0]);
delete mopHolder[0];
mopActive = false;
stage.frameRate = 60;
};
mopCheck = false;
}
public function processRadarPoint(_arg1:Number, _arg2:Number, _arg3:MovieClip){
if (updateComponentCounter == 0){
_arg3.x = ((_arg1 / 10) + 35);
_arg3.y = ((_arg2 / 10) + 50);
if (_arg3.y < 0){
_arg3.alpha = 0;
} else {
_arg3.alpha = 1;
};
};
}
public function MouseUp(_arg1){
if (mopActive == true){
removeChild(mopHolder[0]);
delete mopHolder[0];
stage.frameRate = 60;
mopActive = false;
};
mopCheck = false;
}
public function newBombScar(_arg1:Number){
var _local2:*;
_local2 = new BombScar();
_local2.x = _arg1;
_local2.y = groundPos;
bombScarArray.push(_local2);
BOMBSCARS.addChild(_local2);
}
public function destroyBlood(_arg1){
BLOOD.removeChild(bloodArray[_arg1]);
delete bloodArray[_arg1];
bloodArray.splice(_arg1, 1);
bloodXSpeed.splice(_arg1, 1);
bloodYSpeed.splice(_arg1, 1);
bloodSpin.splice(_arg1, 1);
}
public function updateSmoke(){
var _local1:*;
_local1 = 0;
while (_local1 < smokeArray.length) {
if (smokeArray[_local1].x > -350){
smokeArray[_local1].y = (smokeArray[_local1].y - smokeArray_ySpeed[_local1]);
smokeArray_ySpeed[_local1] = (smokeArray_ySpeed[_local1] + 0.1);
smokeArray[_local1].x = (smokeArray[_local1].x - 10);
smokeArray[_local1].rotation = (smokeArray[_local1].rotation + smokeArray_spin[_local1]);
smokeArray_ySpeed[_local1] = (smokeArray_ySpeed[_local1] - 0.01);
} else {
destroySmoke(_local1);
};
_local1++;
};
}
public function newMessage(_arg1, _arg2, _arg3, _arg4, _arg5){
var _local6:*;
_local6 = new Message();
_local6.x = _arg1;
_local6.y = _arg2;
_local6.scaleX = _arg3;
_local6.scaleY = _arg3;
_local6.alpha = _arg5;
_local6.textBox.text = _arg4;
MESSAGE.addChild(_local6);
messageArray.push(_local6);
}
public function destroyBombScar(_arg1){
BOMBSCARS.removeChild(bombScarArray[_arg1]);
delete bombScarArray[_arg1];
bombScarArray.splice(_arg1, 1);
_arg1--;
}
public function newFragments(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
if (fragmentArray.length < fragLimit){
_local4 = 0;
while (_local4 < _arg3) {
_local5 = new Fragment();
_local5.x = _arg1;
_local5.y = _arg2;
FRAGMENTS.addChild(_local5);
fragmentArray.push(_local5);
fragmentArray_ySpeed.push(((Math.random() * 20) * -1));
fragmentArray_xSpeed.push(((Math.random() * 60) - 20));
fragmentArray_shadow.push(newShadow());
_local4++;
};
};
}
public function newIShotTrail(_arg1, _arg2){
var _local3:MovieClip;
_local3 = new IShot();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.scaleX = 0.695;
_local3.scaleY = 0.695;
if (_arg2 > (groundPos + 20)){
IShotTrailScaleArray.push(0.6);
} else {
if (_arg2 > (groundPos + 10)){
IShotTrailScaleArray.push(0.45);
} else {
if (_arg2 > groundPos){
IShotTrailScaleArray.push(0.3);
} else {
IShotTrailScaleArray.push(0);
};
};
};
GAME.BGItems.addChild(_local3);
IShotTrailArray.push(_local3);
IShotTrailSpeed.push(0);
}
public function scrollLayer(_arg1:MovieClip, _arg2:Number){
_arg1.x = (_arg1.x - _arg2);
if (_arg1.x < -1000){
_arg1.x = (_arg1.x + (_arg1.width / 2));
};
}
public function newICOPMISSILE(){
var _local1:MovieClip;
_local1 = new ICopterMissile();
_local1.y = -(((Math.random() * 300) + 100));
if ((Math.random() * 2) > 1){
_local1.x = 350;
} else {
_local1.x = -350;
};
ICOPMISSILE.addChild(_local1);
icopMissileArray.push(_local1);
icopRadarPoint.push(newRadarPoint(3));
}
public function destroyMessage(_arg1){
MESSAGE.removeChild(messageArray[_arg1]);
delete messageArray[_arg1];
messageArray.splice(_arg1, 1);
}
public function updateBlood(){
var _local1:Number;
_local1 = 0;
while (_local1 < bloodArray.length) {
if (bloodArray[_local1].y < (groundPos + 10)){
bloodArray[_local1].x = (bloodArray[_local1].x + bloodXSpeed[_local1]);
bloodArray[_local1].y = (bloodArray[_local1].y + bloodYSpeed[_local1]);
bloodYSpeed[_local1] = (bloodYSpeed[_local1] + 0.5);
bloodXSpeed[_local1] = (bloodXSpeed[_local1] / 1.2);
bloodArray[_local1].rotation = (bloodArray[_local1].rotation + bloodSpin[_local1]);
} else {
bloodArray[_local1].x = (bloodArray[_local1].x - 15);
if (bloodArray[_local1].x < -300){
destroyBlood(_local1);
};
};
_local1++;
};
}
public function MouseDown(_arg1){
if (gameActive == true){
newIShot(cursor.x, cursor.y);
};
}
public function unPause(){
removeChild(upgradeMenuArray[0]);
delete upgradeMenuArray[0];
upgradeMenuArray.splice(0, 1);
Key.clearKeys();
pauseFreeze = false;
stage.focus = this;
}
public function newShadow(){
var _local1:*;
_local1 = new Shadow();
_local1.y = ((groundPos + 15) + (Math.random() * 5));
SHADOW.addChild(_local1);
return (_local1);
}
public function updatePilots(){
var _local1:int;
_local1 = 0;
while (_local1 < pilotArray.length) {
var _local2 = pilotTimer;
var _local3 = _local1;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
if ((((pythag(pilotArray[_local1].x, pilotArray[_local1].y, GAME.TANK.x, GAME.TANK.y) < 30)) && ((pilotTimer[_local1] > 10)))){
pilotTimer[_local1] = -10000;
newBlood(pilotArray[_local1].x, pilotArray[_local1].y);
if (Math.round((Math.random() * 2)) == 1){
pilotXSpeed[_local1] = ((Math.random() * 5) + 10);
pilotArray[_local1].scaleX = (pilotArray[_local1].scaleX * -1);
} else {
pilotXSpeed[_local1] = -(((Math.random() * 5) + 10));
};
pilotArray[_local1].rotation = (Math.random() * 360);
pilotArray[_local1].gotoAndStop(4);
pilotState[_local1] = false;
pilotYSpeed[_local1] = -5;
} else {
pilotArray[_local1].y = (pilotArray[_local1].y + pilotYSpeed[_local1]);
pilotYSpeed[_local1] = (pilotYSpeed[_local1] + 0.5);
pilotArray[_local1].x = (pilotArray[_local1].x - pilotXSpeed[_local1]);
pilotXSpeed[_local1] = (pilotXSpeed[_local1] / 1.05);
if (pilotState[_local1] == true){
pilotArray[_local1].rotation = (pilotArray[_local1].rotation / 1.1);
pilotYSpeed[_local1] = (pilotYSpeed[_local1] / 1.2);
pilotArray[_local1].x = (pilotArray[_local1].x - 5);
} else {
pilotArray[_local1].rotation = (pilotArray[_local1].rotation + pilotSpin[_local1]);
if ((((pilotTimer[_local1] > -1)) && (((((Math.random() * 80) < 1)) || ((pilotArray[_local1].y > (groundPos - 150))))))){
pilotState[_local1] = true;
pilotArray[_local1].gotoAndStop(2);
};
};
if (pilotArray[_local1].y > (groundPos + 10)){
if (pilotTimer[_local1] > -1){
if (pilotArray[_local1].currentFrame != 3){
pilotArray[_local1].gotoAndStop(3);
};
pilotArray[_local1].y = (groundPos + 10);
pilotArray[_local1].x = (pilotArray[_local1].x - 5);
} else {
newBlood(pilotArray[_local1].x, (groundPos - 2));
pilotArray[_local1].x = -500;
};
};
processShadow(pilotArray[_local1].x, pilotArray[_local1].y, 40, pilotShadow[_local1]);
if (pilotArray[_local1].x < -350){
PILOTS.removeChild(pilotArray[_local1]);
delete pilotArray[_local1];
pilotArray.splice(_local1, 1);
pilotXSpeed.splice(_local1, 1);
pilotYSpeed.splice(_local1, 1);
pilotState.splice(_local1, 1);
pilotTimer.splice(_local1, 1);
pilotSpin.splice(_local1, 1);
SHADOW.removeChild(pilotShadow[_local1]);
delete pilotShadow[_local1];
pilotShadow.splice(_local1, 1);
_local1--;
};
};
_local1++;
};
}
public function destroyEngine(){
var _local1:Number;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
removeEventListener(MouseEvent.MOUSE_MOVE, MouseMove);
_local1 = 0;
_local1 = 0;
while (_local1 < smokeArray.length) {
destroySmoke(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < enemyArray.length) {
destroyEnemy(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < missileArray.length) {
destroyMissile(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < icopMissileArray.length) {
destroyICOPMISSILE(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < bloodArray.length) {
destroyBlood(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < bombScarArray.length) {
destroyBombScar(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < explosionArray.length) {
destroyExplosion(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < fragmentArray.length) {
destroyFragment(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < messageArray.length) {
destroyMessage(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < IShotArray.length) {
destroyIShot(_local1);
_local1--;
_local1++;
};
_local1 = 0;
while (_local1 < IShotTrailArray.length) {
destroyIShotTrail(_local1);
_local1--;
_local1++;
};
removeChild(HUD);
HUD = null;
GAME.removeChild(BOMBSCARS);
BOMBSCARS = null;
GAME.removeChild(SHADOW);
SHADOW = null;
GAME.removeChild(SMOKE);
SMOKE = null;
GAME.removeChild(MISSILES);
MISSILES = null;
GAME.removeChild(ICOPMISSILE);
ICOPMISSILE = null;
GAME.removeChild(ENEMY);
ENEMY = null;
GAME.removeChild(PILOTS);
PILOTS = null;
FRAGMENTS.removeChild(cursor);
cursor = null;
GAME.removeChild(BLOOD);
BLOOD = null;
GAME.removeChild(TANK_I);
TANK_I = null;
GAME.removeChild(MESSAGE);
MESSAGE = null;
GAME.removeChild(FRAGMENTS);
FRAGMENTS = null;
this.removeChild(GAME);
GAME = null;
}
public function pauseGame(){
var _local1:MovieClip;
if ((((dead == false)) || ((pauseFreeze == true)))){
if (((((((Key.isDown(Keyboard.SPACE)) && ((spaceSwitch == false)))) && ((upgradeFreeze == false)))) && ((gameActive == true)))){
spaceSwitch = true;
_local1 = new PAUSEMENU();
addChild(_local1);
_local1.alpha = 0;
upgradeMenuArray[0] = _local1;
pauseFreeze = true;
stage.focus = this;
};
if (pauseFreeze == true){
if (upgradeMenuArray[0].alpha < 0.9){
upgradeMenuArray[0].alpha = (upgradeMenuArray[0].alpha + 0.1);
};
};
if ((((pauseFreeze == true)) && (((((Key.isDown(Keyboard.SPACE)) && ((spaceSwitch == false)))) || ((dead == true)))))){
upgradeMenuArray[0].purgeListeners();
unPause();
loadSettings();
} else {
if (Key.isDown(Keyboard.SPACE) == false){
spaceSwitch = false;
};
};
};
}
public function shakeScreen(_arg1, _arg2, _arg3, _arg4){
if (shakeScreenActive == true){
shakeArray[0] = _arg1;
shakeArray[1] = (_arg2 * GAME.scaleX);
shakeArray[2] = (_arg3 * GAME.scaleY);
shakeArray[3] = (_arg4 * GAME.scaleX);
};
}
public function pythag(_arg1, _arg2, _arg3, _arg4){
return (Math.sqrt((Math.pow((_arg2 - _arg4), 2) + Math.pow((_arg1 - _arg3), 2))));
}
public function camera(){
if (cameraType == 0){
} else {
if (cameraType == 1){
GAME.scaleY = ((((GAME.TANK.y - groundPos) - 50) / 1000) + 1);
gameYOffset = (((GAME.TANK.y - groundPos) - 50) * -0.1);
if (GAME.scaleY < 0.4){
GAME.scaleY = 0.4;
gameYOffset = 60;
};
GAME.scaleX = GAME.scaleY;
gameXOffset = ((-(GAME.TANK.x) / 3) * GAME.scaleX);
} else {
if (cameraType == 2){
if (GAME.TANK.y < -175){
gameYOffset = (-(GAME.TANK.y) - 175);
};
};
};
};
}
public function destroyIShot(_arg1){
ENEMY.removeChild(IShotArray[_arg1]);
delete IShotArray[_arg1];
IShotArray.splice(_arg1, 1);
}
public function loadSettings(){
MovieClip(parent).playMusic("GAME");
if (MovieClip(parent).smokeActive == true){
smokeLimit = 200;
} else {
smokeLimit = 0;
};
if (MovieClip(parent).fragsActive == true){
fragLimit = 10;
} else {
fragLimit = 0;
};
if (MovieClip(parent).shadowsActive == true){
SHADOW.visible = true;
} else {
SHADOW.visible = false;
};
if (MovieClip(parent).shakeActive == true){
shakeScreenActive = true;
} else {
shakeScreenActive = false;
};
if (MovieClip(parent).bloodActive == true){
bloodActive = true;
} else {
bloodActive = false;
};
if (MovieClip(parent).smoothActive == true){
stage.quality = StageQuality.MEDIUM;
} else {
stage.quality = StageQuality.LOW;
};
}
public function changeFilter(_arg1, _arg2){
}
public function updateHUD(){
var _local1:MovieClip;
if (updateComponentCounter == 0){
HUD.comboText.text = combo;
tankHeight = -(Math.round(((GAME.TANK.y - 39) / 10)));
if (tankHeight > tankMaxHeight){
tankMaxHeight = tankHeight;
};
HUD.heightText.text = tankHeight;
if (HUD.fuelBar.width < 50){
HUD.fuelBar.alpha = (HUD.fuelBar.alpha * -1);
HUD.warnSign.visible = true;
} else {
HUD.fuelBar.alpha = 1;
HUD.warnSign.visible = false;
};
if (HUD.boomBar.width == 75){
HUD.boomSign.gotoAndStop(2);
HUD.boomBar.alpha = (HUD.boomBar.alpha * -1);
} else {
HUD.boomBar.alpha = 1;
HUD.boomSign.gotoAndStop(1);
};
HUD.fuelBar.width = ((fuel / maxFuel) * 200);
HUD.boomBar.width = ((boom / maxBoom) * 75);
HUD.levelText.text = ("LEVEL: " + level);
};
if (experiencePot > 0){
experience = (experience + (2 * level));
experiencePot = (experiencePot - (2 * level));
if (experiencePot < 0){
experience = (experience + experiencePot);
experiencePot = 0;
};
};
if (experience >= maxExperience){
if (dead == false){
experience = (experience - maxExperience);
level++;
fuel = maxFuel;
_local1 = new UPGRADEMENU();
_local1.x = -400;
_local1.alpha = 0;
addChild(_local1);
upgradeMenuArray[0] = _local1;
upgradeFreeze = true;
maxExperience = Math.round((maxExperience * 1.3));
};
};
HUD.expText.text = ((("EXP " + experience) + "/") + maxExperience);
HUD.expBar.width = ((experience / maxExperience) * 200);
}
public function newMissile(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
_local5 = new Missile();
_local5.x = _arg1;
_local5.scaleX = _arg4;
_local5.y = _arg2;
_local5.scaleX = 1;
_local5.scaleY = 1;
_local5.gotoAndStop(_arg3);
MISSILES.addChild(_local5);
missileArray.push(_local5);
missileXSpeed.push((10 * _arg4));
missileYSpeed.push(0);
missileType.push(_arg3);
if (_arg3 == 3){
missileHoming.push(15);
} else {
if (_arg3 == 4){
missileHoming.push(9000);
} else {
_local5.rotation = (-90 * _arg4);
missileHoming.push(0);
};
};
}
public function destroyEnemy(_arg1){
ENEMY.removeChild(enemyArray[_arg1]);
delete enemyArray[_arg1];
enemyArray.splice(_arg1, 1);
SHADOW.removeChild(enemyShadow[_arg1]);
delete enemyShadow[_arg1];
enemyShadow.splice(_arg1, 1);
HUD.RADAR.removeChild(enemyRadarPoint[_arg1]);
delete enemyRadarPoint[_arg1];
enemyRadarPoint.splice(_arg1, 1);
enemySpeed.splice(_arg1, 1);
enemyYSpeed.splice(_arg1, 1);
enemyYStart.splice(_arg1, 1);
enemyHealth.splice(_arg1, 1);
enemyWave.splice(_arg1, 1);
enemyBounce.splice(_arg1, 1);
enemyIncline.splice(_arg1, 1);
enemyAmmo.splice(_arg1, 1);
enemyBombType.splice(_arg1, 1);
}
public function newSmoke(_arg1, _arg2, _arg3){
var _local4:MovieClip;
if (smokeArray.length < smokeLimit){
_local4 = new Smoke();
_local4.x = ((_arg1 + (Math.random() * 10)) - 5);
_local4.y = ((_arg2 + (Math.random() * 10)) - 5);
_local4.scaleX = (((Math.random() * 1) - 0.5) / _arg3);
_local4.scaleY = (((Math.random() * 1) - 0.5) / _arg3);
_local4.alpha = ((Math.random() * 5) / 10);
_local4.rotation = (Math.random() * 360);
SMOKE.addChild(_local4);
smokeArray.push(_local4);
smokeArray_ySpeed.push(0);
smokeArray_spin.push(((Math.random() * 20) - 10));
};
}
public function updateGround(){
scrollLayer(GAME.FG, 20);
scrollLayer(GAME.MG, 8);
scrollLayer(GAME.BG, 4);
scrollLayer(GAME.BG_FG, 1.5);
scrollLayer(GAME.BG_MG, 0.8);
scrollLayer(GAME.BG_BG, 0.3);
}
public function updateIShot(){
var _local1:Number;
var _local2:Boolean;
var _local3:Number;
_local1 = 0;
while (_local1 < IShotArray.length) {
if (IShotArray[_local1].scaleX > 1){
IShotArray[_local1].scaleX = (IShotArray[_local1].scaleX - 0.2);
IShotArray[_local1].scaleY = (IShotArray[_local1].scaleY - 0.2);
} else {
_local2 = true;
_local3 = 0;
while (_local3 < enemyArray.length) {
if (pythag(IShotArray[_local1].x, IShotArray[_local1].y, enemyArray[_local3].x, enemyArray[_local3].y) < 30){
newFragments(enemyArray[_local3].x, enemyArray[_local3].y, 5);
enemyArray[_local3].x = 400;
_local2 = false;
};
_local3++;
};
if (MovieClip(parent).gameType == 2){
_local3 = 0;
while (_local3 < icopMissileArray.length) {
if (pythag(IShotArray[_local1].x, IShotArray[_local1].y, icopMissileArray[_local3].x, icopMissileArray[_local3].y) < 30){
newFragments(icopMissileArray[_local3].x, icopMissileArray[_local3].y, 5);
experiencePot = (experiencePot + (10 * level));
experienceTotal = (experienceTotal + (10 * level));
newMessage(icopMissileArray[_local3].x, icopMissileArray[_local3].y, 1, ("+" + (10 * level)), 2);
destroyICOPMISSILE(_local3);
_local3--;
_local2 = false;
};
_local3++;
};
};
if (_local2 == true){
newIShotTrail(IShotArray[_local1].x, IShotArray[_local1].y);
} else {
newExplosion(IShotArray[_local1].x, IShotArray[_local1].y, 1);
};
destroyIShot(_local1);
_local1--;
};
_local1++;
};
_local1 = 0;
while (_local1 < IShotTrailArray.length) {
if (IShotTrailArray[_local1].scaleX > (IShotTrailScaleArray[_local1] + 0.2)){
altSwitch = true;
newSmoke(IShotTrailArray[_local1].x, IShotTrailArray[_local1].y, 0.7);
IShotTrailArray[_local1].scaleX = (IShotTrailArray[_local1].scaleX - 0.02);
IShotTrailArray[_local1].scaleY = (IShotTrailArray[_local1].scaleY - 0.02);
IShotTrailArray[_local1].x = (IShotTrailArray[_local1].x - IShotTrailSpeed[_local1]);
IShotTrailSpeed[_local1] = (IShotTrailSpeed[_local1] + 0.2);
} else {
if ((((IShotTrailScaleArray[_local1] == 0)) && ((IShotTrailArray[_local1].scaleX > 0)))){
IShotTrailArray[_local1].scaleX = (IShotTrailArray[_local1].scaleX - 0.002);
IShotTrailArray[_local1].scaleY = (IShotTrailArray[_local1].scaleY - 0.002);
IShotTrailArray[_local1].x = (IShotTrailArray[_local1].x - IShotTrailSpeed[_local1]);
IShotTrailSpeed[_local1] = (IShotTrailSpeed[_local1] / 1.02);
} else {
if (IShotTrailScaleArray[_local1] > 0){
newExplosion(IShotTrailArray[_local1].x, IShotTrailArray[_local1].y, (IShotTrailArray[_local1].scaleX / 2));
};
destroyIShotTrail(_local1);
_local1--;
};
};
_local1++;
};
}
public function updateShake(){
GAME.x = (((shakeArray[1] * 8) + 200) + gameXOffset);
shakeArray[1] = (-(shakeArray[1]) / shakeArray[0]);
GAME.y = (((shakeArray[2] * 8) + 200) + gameYOffset);
shakeArray[2] = (-(shakeArray[2]) / shakeArray[0]);
GAME.rotation = shakeArray[3];
shakeArray[3] = (-(shakeArray[3]) / shakeArray[0]);
}
public function updateICOPMISSILE(){
var _local1:Number;
if (MovieClip(parent).gameType == 2){
if (Math.round(((Math.random() * 250) / (level / 2))) == 1){
newICOPMISSILE();
};
_local1 = 0;
while (_local1 < icopMissileArray.length) {
processRadarPoint(icopMissileArray[_local1].x, icopMissileArray[_local1].y, icopRadarPoint[_local1]);
icopMissileArray[_local1].rotation = (angle(icopMissileArray[_local1].x, icopMissileArray[_local1].y, GAME.TANK.x, GAME.TANK.y) - 90);
icopMissileArray[_local1].x = (icopMissileArray[_local1].x + (2 * Math.cos((icopMissileArray[_local1].rotation * 0.01745329))));
icopMissileArray[_local1].y = (icopMissileArray[_local1].y + (2 * Math.sin((icopMissileArray[_local1].rotation * 0.01745329))));
if (pythag(icopMissileArray[_local1].x, icopMissileArray[_local1].y, GAME.TANK.x, GAME.TANK.y) < 20){
dead = true;
destroyICOPMISSILE(_local1);
};
_local1++;
};
};
}
public function destroyMissile(_arg1){
var _local2:Number;
_local2 = 0;
while (_local2 < 10) {
newSmoke(((missileArray[_arg1].x + (Math.random() * 20)) - 10), ((missileArray[_arg1].y + (Math.random() * 20)) - 10), 0.4);
_local2++;
};
MISSILES.removeChild(missileArray[_arg1]);
delete missileArray[_arg1];
missileArray.splice(_arg1, 1);
missileType.splice(_arg1, 1);
missileXSpeed.splice(_arg1, 1);
missileYSpeed.splice(_arg1, 1);
missileHoming.splice(_arg1, 1);
}
public function destroyICOPMISSILE(_arg1){
ICOPMISSILE.removeChild(icopMissileArray[_arg1]);
delete icopMissileArray[_arg1];
icopMissileArray.splice(_arg1, 1);
HUD.RADAR.removeChild(icopRadarPoint[_arg1]);
delete icopRadarPoint[_arg1];
icopRadarPoint.splice(_arg1, 1);
}
public function newRadarPoint(_arg1){
var _local2:*;
_local2 = new RadarPoint();
HUD.RADAR.addChild(_local2);
_local2.gotoAndStop(_arg1);
return (_local2);
}
}
}//package ITankAE_fla
Section 5
//HUDBoomSign_48 (ITankAE_fla.HUDBoomSign_48)
package ITankAE_fla {
import flash.display.*;
public dynamic class HUDBoomSign_48 extends MovieClip {
public function HUDBoomSign_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ITankAE_fla
Section 6
//MainTimeline (ITankAE_fla.MainTimeline)
package ITankAE_fla {
import flash.display.*;
import flash.events.*;
import CPMStar.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var L_JA:SimpleButton;
public var ad:DisplayObject;
public var urlStart:Number;
public var domEnd:Number;
public var gameType:Number;
public var BM:SimpleButton;
public var BS:SimpleButton;
public var shadowsActive:Boolean;
public var myContextMenu:ContextMenu;
public var smoothActive:Boolean;
public var I3_S:SimpleButton;
public var BF:SimpleButton;
public var faderMusic:Boolean;
public var i:Number;
public var I3_B:SimpleButton;
public var CO_Button:SimpleButton;
public var saveFile:SharedObject;
public var I2_B:SimpleButton;
public var I2_S:SimpleButton;
public var faderTarget;
public var adBox:MovieClip;
public var L_ICOPTER:SimpleButton;
public var LastDot:Number;
public var domain:String;
public var CPMStarSubPoolID:int;
public var L_I2TANK:SimpleButton;
public var CPMStarPoolID:int;
public var I1_B:SimpleButton;
public var I1_S:SimpleButton;
public var medal_1:MovieClip;
public var medal_2:MovieClip;
public var medal_5:MovieClip;
public var medal_6:MovieClip;
public var medal_7:MovieClip;
public var soundActive:Boolean;
public var medal_8:MovieClip;
public var L_AG:SimpleButton;
public var L_AK:SimpleButton;
public var L_AL:SimpleButton;
public var L_ITANK:SimpleButton;
public var infoText:TextField;
public var tVid:MovieClip;
public var medal_3:MovieClip;
public var medal_4:MovieClip;
public var L_SB:SimpleButton;
public var urlEnd:Number;
public var CR_Button:SimpleButton;
public var fragsActive:Boolean;
public var L_CI:SimpleButton;
public var medalSign:MovieClip;
public var smokeActive:Boolean;
public var C_BACK:SimpleButton;
public var url:String;
public var QP_Button:SimpleButton;
public var fader:MovieClip;
public var musicActive:Boolean;
public var playB:MovieClip;
public var L_EX:SimpleButton;
public var MG_Button:SimpleButton;
public var M_BACK:SimpleButton;
public var SG_Button:SimpleButton;
public var bloodActive:Boolean;
public var medalArray:Array;
public var titleText:TextField;
public var shakeActive:Boolean;
public var ME_Button:SimpleButton;
public var plb:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 12, frame13, 21, frame22);
}
public function I3_S_FUNC(_arg1){
I3_S.removeEventListener(MouseEvent.MOUSE_UP, I3_S_FUNC);
I3_B.removeEventListener(MouseEvent.MOUSE_UP, I3_B_FUNC);
gotoFrame("GAME", false);
}
public function C_BACK_FUNC(_arg1){
purgeCredits();
gotoFrame("TITLEBLANK", false);
}
public function L_CI_FUNC(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.fengrush.com/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function BM_func(_arg1){
musicActive = true;
soundActive = true;
smokeActive = false;
shakeActive = true;
fragsActive = true;
shadowsActive = false;
bloodActive = true;
smoothActive = true;
saveData();
BS.removeEventListener(MouseEvent.MOUSE_UP, BS_func);
BM.removeEventListener(MouseEvent.MOUSE_UP, BM_func);
BF.removeEventListener(MouseEvent.MOUSE_UP, BF_func);
nextFrame();
}
public function MG_func(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.armorgames.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function L_AG_FUNC(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.armorgames.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function I1_S_FUNC(_arg1){
I1_S.removeEventListener(MouseEvent.MOUSE_UP, I1_S_FUNC);
I1_B.removeEventListener(MouseEvent.MOUSE_UP, I1_B_FUNC);
gotoFrame("GAME", false);
}
function frame5(){
playMusic("TITLE");
stop();
gameType = 0;
QP_Button.addEventListener(MouseEvent.MOUSE_UP, QP_func);
QP_Button.addEventListener(MouseEvent.MOUSE_OVER, QP_O_func);
SG_Button.addEventListener(MouseEvent.MOUSE_UP, SG_func);
SG_Button.addEventListener(MouseEvent.MOUSE_OVER, SG_O_func);
CO_Button.addEventListener(MouseEvent.MOUSE_UP, CO_func);
CO_Button.addEventListener(MouseEvent.MOUSE_OVER, CO_O_func);
ME_Button.addEventListener(MouseEvent.MOUSE_UP, ME_func);
ME_Button.addEventListener(MouseEvent.MOUSE_OVER, ME_O_func);
MG_Button.addEventListener(MouseEvent.MOUSE_UP, MG_func);
MG_Button.addEventListener(MouseEvent.MOUSE_OVER, MG_O_func);
CR_Button.addEventListener(MouseEvent.MOUSE_UP, CR_func);
CR_Button.addEventListener(MouseEvent.MOUSE_OVER, CR_O_func);
L_ITANK.addEventListener(MouseEvent.MOUSE_UP, L_ITANK_func);
L_ITANK.addEventListener(MouseEvent.MOUSE_OVER, L_ITANK_O_func);
L_I2TANK.addEventListener(MouseEvent.MOUSE_UP, L_I2TANK_func);
L_I2TANK.addEventListener(MouseEvent.MOUSE_OVER, L_I2TANK_O_func);
L_ICOPTER.addEventListener(MouseEvent.MOUSE_UP, L_ICOPTER_func);
L_ICOPTER.addEventListener(MouseEvent.MOUSE_OVER, L_ICOPTER_O_func);
}
function frame7(){
i = 1;
while (i < 9) {
this[("medal_" + i)].gotoAndStop(i);
if (medalArray[i] == true){
this[("medal_" + i)].alpha = 1;
} else {
this[("medal_" + i)].alpha = 0.2;
};
i++;
};
M_BACK.addEventListener(MouseEvent.MOUSE_UP, M_BACK_FUNC);
}
function frame1(){
url = stage.loaderInfo.url;
urlStart = (url.indexOf("://") + 3);
urlEnd = url.indexOf("/", urlStart);
domain = url.substring(urlStart, urlEnd);
LastDot = (domain.lastIndexOf(".") - 1);
domEnd = (domain.lastIndexOf(".", LastDot) + 1);
domain = domain.substring(domEnd, domain.length);
if (domain != ""){
playB.visible = false;
CPMStarPoolID = 1052;
CPMStarSubPoolID = 1;
ad = AdLoader.LoadAd(CPMStarPoolID, CPMStarSubPoolID);
adBox.addChild(ad);
};
stop();
addEventListener(Event.ENTER_FRAME, preLoader);
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
contextMenu = myContextMenu;
playB.addEventListener(MouseEvent.CLICK, clickHandler);
}
function frame4(){
stop();
}
function frame6(){
L_AG.addEventListener(MouseEvent.MOUSE_UP, L_AG_FUNC);
L_AL.addEventListener(MouseEvent.MOUSE_UP, L_AL_FUNC);
L_JA.addEventListener(MouseEvent.MOUSE_UP, L_JA_FUNC);
L_SB.addEventListener(MouseEvent.MOUSE_UP, L_SB_FUNC);
L_CI.addEventListener(MouseEvent.MOUSE_UP, L_CI_FUNC);
L_AK.addEventListener(MouseEvent.MOUSE_UP, L_AK_FUNC);
L_EX.addEventListener(MouseEvent.MOUSE_UP, L_EX_FUNC);
C_BACK.addEventListener(MouseEvent.MOUSE_UP, C_BACK_FUNC);
}
function frame9(){
I2_S.addEventListener(MouseEvent.MOUSE_UP, I1_S_FUNC);
I2_B.addEventListener(MouseEvent.MOUSE_UP, I1_B_FUNC);
}
function frame2(){
stop();
faderMusic = false;
fader.stop();
musicActive = true;
soundActive = true;
smokeActive = true;
shakeActive = true;
fragsActive = true;
shadowsActive = true;
bloodActive = true;
smoothActive = true;
medalArray = new Array(null, false, false, false, false, false, false, false, false);
saveFile = SharedObject.getLocal("ITANKAEDATAB");
if (saveFile.data.saveFileActive == true){
nextFrame();
};
loadData();
saveData();
focusRect = false;
stop();
BS.addEventListener(MouseEvent.MOUSE_UP, BS_func);
BM.addEventListener(MouseEvent.MOUSE_UP, BM_func);
BF.addEventListener(MouseEvent.MOUSE_UP, BF_func);
}
function frame3(){
gotoFrame("AGINTRO", false);
}
function frame13(){
gotoAndStop("TITLE");
}
function frame8(){
I1_S.addEventListener(MouseEvent.MOUSE_UP, I1_S_FUNC);
I1_B.addEventListener(MouseEvent.MOUSE_UP, I1_B_FUNC);
}
public function CR_O_func(_arg1){
titleText.text = "CREDITS";
infoText.text = "FIND OUT WHO CREATED THIS GAME.";
}
public function L_I2TANK_O_func(_arg1){
titleText.text = "";
infoText.text = "INDESTRUC2TANK - PLAY THE SEQUEL TO THE SMASH HIT INDESTRUCTOTANK";
}
public function I2_B_FUNC(_arg1){
I2_S.removeEventListener(MouseEvent.MOUSE_UP, I2_S_FUNC);
I2_B.removeEventListener(MouseEvent.MOUSE_UP, I2_B_FUNC);
gotoFrame("TITLE", false);
}
public function L_ITANK_func(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://armorgames.com/play/24/indestructotank";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function L_I2TANK_func(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://armorgames.com/play/28/indestruc2tank";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function preLoader(_arg1:Event){
var _local2:*;
var _local3:*;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
plb.scaleX = ((1 / _local2) * _local3);
if (_local3 >= _local2){
removeEventListener(Event.ENTER_FRAME, preLoader);
playB.visible = true;
};
}
function frame22(){
stop();
playMusic("GAME");
}
public function CR_func(_arg1){
purgeListeners();
gotoFrame("CREDITS", true);
}
public function clickHandler(_arg1:Event):void{
this.removeChild(adBox);
play();
playB.removeEventListener(MouseEvent.CLICK, clickHandler);
}
public function CO_func(_arg1){
purgeListeners();
gameType = 2;
gotoFrame("INST2", true);
}
function frame10(){
I3_S.addEventListener(MouseEvent.MOUSE_UP, I3_S_FUNC);
I3_B.addEventListener(MouseEvent.MOUSE_UP, I3_B_FUNC);
}
public function saveData(){
saveFile.data.musicActive = musicActive;
saveFile.data.soundActive = soundActive;
saveFile.data.smokeActive = smokeActive;
saveFile.data.shakeActive = shakeActive;
saveFile.data.fragsActive = fragsActive;
saveFile.data.shadowsActive = shadowsActive;
saveFile.data.bloodActive = bloodActive;
saveFile.data.smoothActive = smoothActive;
saveFile.data.medalArray = medalArray;
saveFile.data.saveFileActive = true;
saveFile.flush();
}
public function L_ICOPTER_func(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://armorgames.com/play/538/indestructocopter";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function QP_O_func(_arg1){
titleText.text = "QUICK PLAY";
infoText.text = "BORED IN CLASS? PROCRASTINATING HOMEWORK? THIS MODE IS FOR YOU. A SET AMMOUNT OF SHIPS WITH YOUR AIM BEING TO EARN THE HIGHEST COMBO.";
}
public function L_AK_FUNC(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.planet-essenz.co.uk/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function L_ITANK_O_func(_arg1){
titleText.text = "";
infoText.text = "INDESTRUCTOTANK - PLAY THE ORIGINAL INDESTRUCTOTANK, RELEASED 31ST MARCH 2007";
}
public function SG_O_func(_arg1){
titleText.text = "START GAME";
infoText.text = "AN UPDATE OF 2007'S INDESTRUCTOTANK. IMPROVED GRAPHICS AND TIGHTENED GAMEPLAY INCLUDING ELEMENTS OF INDESTRUC2TANK SUCH AS THE BOOM BAR.";
}
public function QP_func(_arg1){
purgeListeners();
gameType = 0;
gotoFrame("INST3", true);
}
public function MG_O_func(_arg1){
titleText.text = "MORE GAMES";
infoText.text = "PLAY MOR FREE ONLINE GAMES AT ARMORGAMES.COM BY CLICKING HERE";
}
public function ME_func(_arg1){
purgeListeners();
gotoFrame("MEDALS", true);
}
public function I2_S_FUNC(_arg1){
I2_S.removeEventListener(MouseEvent.MOUSE_UP, I2_S_FUNC);
I2_B.removeEventListener(MouseEvent.MOUSE_UP, I2_B_FUNC);
gotoFrame("GAME", false);
}
public function ME_O_func(_arg1){
titleText.text = "MEDALS";
infoText.text = "VIEW THE MEDALS THAT YOU HAVE WON. CAN YOU COLLECT THEM ALL? MEDALS ARE AWARDED FOR ACHIEVING SPECIFIC THINGS WITHIN THE GAME.";
}
public function newMedal(_arg1){
if (medalArray[_arg1] == false){
medalSign.sprite.gotoAndStop(_arg1);
medalSign.alpha = 10;
medalArray[_arg1] = true;
saveData();
};
}
public function L_AL_FUNC(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.armorblog.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function playMusic(_arg1){
if (musicActive == true){
};
}
public function I3_B_FUNC(_arg1){
I3_S.removeEventListener(MouseEvent.MOUSE_UP, I3_S_FUNC);
I3_B.removeEventListener(MouseEvent.MOUSE_UP, I3_B_FUNC);
gotoFrame("TITLE", false);
}
public function purgeCredits(){
L_AG.removeEventListener(MouseEvent.MOUSE_UP, L_AG_FUNC);
L_AL.removeEventListener(MouseEvent.MOUSE_UP, L_AL_FUNC);
L_JA.removeEventListener(MouseEvent.MOUSE_UP, L_JA_FUNC);
L_SB.removeEventListener(MouseEvent.MOUSE_UP, L_SB_FUNC);
L_CI.removeEventListener(MouseEvent.MOUSE_UP, L_CI_FUNC);
L_AK.removeEventListener(MouseEvent.MOUSE_UP, L_AK_FUNC);
L_EX.removeEventListener(MouseEvent.MOUSE_UP, L_EX_FUNC);
C_BACK.removeEventListener(MouseEvent.MOUSE_UP, C_BACK_FUNC);
}
public function M_BACK_FUNC(_arg1){
M_BACK.removeEventListener(MouseEvent.MOUSE_UP, M_BACK_FUNC);
gotoFrame("TITLEBLANK", false);
}
public function loadData(){
if (saveFile.data.saveFileActive == true){
musicActive = saveFile.data.musicActive;
soundActive = saveFile.data.soundActive;
smokeActive = saveFile.data.smokeActive;
shakeActive = saveFile.data.shakeActive;
fragsActive = saveFile.data.fragsActive;
shadowsActive = saveFile.data.shadowsActive;
bloodActive = saveFile.data.bloodActive;
smoothActive = saveFile.data.smoothActive;
medalArray = saveFile.data.medalArray;
};
}
public function L_ICOPTER_O_func(_arg1){
titleText.text = "";
infoText.text = "INDESTRUCTOCOPTER - A SPINOFF OF THE SERIES WITH A STORY MODE WHICH RUNS PARRALLEL TO THAT OF INDESTRUC2TANK";
}
public function L_SB_FUNC(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://poisonous22.newgrounds.com/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function gotoFrame(_arg1, _arg2){
faderMusic = _arg2;
faderTarget = _arg1;
fader.play();
}
public function SG_func(_arg1){
purgeListeners();
gameType = 1;
gotoFrame("INST1", true);
}
public function purgeListeners(){
QP_Button.removeEventListener(MouseEvent.MOUSE_UP, QP_func);
QP_Button.removeEventListener(MouseEvent.MOUSE_OVER, QP_O_func);
SG_Button.removeEventListener(MouseEvent.MOUSE_UP, SG_func);
SG_Button.removeEventListener(MouseEvent.MOUSE_OVER, SG_O_func);
CO_Button.removeEventListener(MouseEvent.MOUSE_UP, CO_func);
CO_Button.removeEventListener(MouseEvent.MOUSE_OVER, CO_O_func);
ME_Button.removeEventListener(MouseEvent.MOUSE_UP, ME_func);
ME_Button.removeEventListener(MouseEvent.MOUSE_OVER, ME_O_func);
MG_Button.removeEventListener(MouseEvent.MOUSE_UP, MG_func);
MG_Button.removeEventListener(MouseEvent.MOUSE_OVER, MG_O_func);
CR_Button.removeEventListener(MouseEvent.MOUSE_UP, CR_func);
CR_Button.removeEventListener(MouseEvent.MOUSE_OVER, CR_O_func);
L_ITANK.removeEventListener(MouseEvent.MOUSE_UP, L_ITANK_func);
L_ITANK.removeEventListener(MouseEvent.MOUSE_OVER, L_ITANK_O_func);
L_I2TANK.removeEventListener(MouseEvent.MOUSE_UP, L_I2TANK_func);
L_I2TANK.removeEventListener(MouseEvent.MOUSE_OVER, L_I2TANK_O_func);
L_ICOPTER.removeEventListener(MouseEvent.MOUSE_UP, L_ICOPTER_func);
L_ICOPTER.removeEventListener(MouseEvent.MOUSE_OVER, L_ICOPTER_O_func);
}
public function L_EX_FUNC(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://extractor.newgrounds.com/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function I1_B_FUNC(_arg1){
I1_S.removeEventListener(MouseEvent.MOUSE_UP, I1_S_FUNC);
I1_B.removeEventListener(MouseEvent.MOUSE_UP, I1_B_FUNC);
gotoFrame("TITLEBLANK", false);
}
public function L_JA_FUNC(_arg1){
var url:String;
var request:URLRequest;
var event = _arg1;
url = "http://www.joelatkinson.blogspot.com";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
public function BF_func(_arg1){
musicActive = true;
soundActive = true;
smokeActive = true;
shakeActive = true;
fragsActive = true;
shadowsActive = true;
bloodActive = true;
smoothActive = true;
saveData();
BS.removeEventListener(MouseEvent.MOUSE_UP, BS_func);
BM.removeEventListener(MouseEvent.MOUSE_UP, BM_func);
BF.removeEventListener(MouseEvent.MOUSE_UP, BF_func);
nextFrame();
}
public function BS_func(_arg1){
musicActive = true;
soundActive = true;
smokeActive = false;
shakeActive = false;
fragsActive = false;
shadowsActive = false;
bloodActive = true;
smoothActive = false;
saveData();
BS.removeEventListener(MouseEvent.MOUSE_UP, BS_func);
BM.removeEventListener(MouseEvent.MOUSE_UP, BM_func);
BF.removeEventListener(MouseEvent.MOUSE_UP, BF_func);
nextFrame();
}
public function CO_O_func(_arg1){
titleText.text = "CO-OP GAME";
infoText.text = "WHILE ONE PLAYER USES THE KEYBOARD TO PLAY, THE SECOND PLAYER MUST USE THE MOUSE TO TAKE ON THE ROLE OF THE INDESTRUCTOCOPTER!";
}
}
}//package ITankAE_fla
Section 7
//MedalSign_18 (ITankAE_fla.MedalSign_18)
package ITankAE_fla {
import flash.display.*;
import flash.events.*;
public dynamic class MedalSign_18 extends MovieClip {
public var sprite:MovieClip;
public function MedalSign_18(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, onEnterFrame);
alpha = 0;
}
public function onEnterFrame(_arg1){
if (alpha > 0){
scaleX = 1;
alpha = (alpha - 0.05);
} else {
scaleX = 0;
};
}
}
}//package ITankAE_fla
Section 8
//Missile_seekerSprite_72 (ITankAE_fla.Missile_seekerSprite_72)
package ITankAE_fla {
import flash.display.*;
public dynamic class Missile_seekerSprite_72 extends MovieClip {
public function Missile_seekerSprite_72(){
addFrameScript(107, frame108);
}
function frame108(){
stop();
}
}
}//package ITankAE_fla
Section 9
//Pause_Quitgame_36 (ITankAE_fla.Pause_Quitgame_36)
package ITankAE_fla {
import flash.display.*;
public dynamic class Pause_Quitgame_36 extends MovieClip {
public var quit_No:SimpleButton;
public var quit_Yes:SimpleButton;
}
}//package ITankAE_fla
Section 10
//Pilot_chute_52 (ITankAE_fla.Pilot_chute_52)
package ITankAE_fla {
import flash.display.*;
public dynamic class Pilot_chute_52 extends MovieClip {
public var sprite:MovieClip;
public function Pilot_chute_52(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package ITankAE_fla
Section 11
//Pilot_floor_53 (ITankAE_fla.Pilot_floor_53)
package ITankAE_fla {
import flash.display.*;
public dynamic class Pilot_floor_53 extends MovieClip {
public var sprite:MovieClip;
public function Pilot_floor_53(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package ITankAE_fla
Section 12
//playB_7 (ITankAE_fla.playB_7)
package ITankAE_fla {
import flash.display.*;
public dynamic class playB_7 extends MovieClip {
public var playB:SimpleButton;
}
}//package ITankAE_fla
Section 13
//TANK_66 (ITankAE_fla.TANK_66)
package ITankAE_fla {
import flash.display.*;
public dynamic class TANK_66 extends MovieClip {
public var wheelFB:MovieClip;
public var wheelB:MovieClip;
public var wheelF:MovieClip;
public var body:MovieClip;
public var wheelBB:MovieClip;
}
}//package ITankAE_fla
Section 14
//xczcxzc_20 (ITankAE_fla.xczcxzc_20)
package ITankAE_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class xczcxzc_20 extends MovieClip {
public function xczcxzc_20(){
addFrameScript(539, frame540);
}
function frame540(){
MovieClip(parent).gotoFrame("TITLE", false);
}
}
}//package ITankAE_fla
Section 15
//Blood (Blood)
package {
import flash.display.*;
public dynamic class Blood extends MovieClip {
}
}//package
Section 16
//BombScar (BombScar)
package {
import flash.display.*;
public dynamic class BombScar extends MovieClip {
}
}//package
Section 17
//Cursor (Cursor)
package {
import flash.display.*;
public dynamic class Cursor extends MovieClip {
}
}//package
Section 18
//Enemy (Enemy)
package {
import flash.display.*;
public dynamic class Enemy extends MovieClip {
public function Enemy(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package
Section 19
//Explosion (Explosion)
package {
import flash.display.*;
public dynamic class Explosion extends MovieClip {
public function Explosion(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package
Section 20
//Fragment (Fragment)
package {
import flash.display.*;
public dynamic class Fragment extends MovieClip {
}
}//package
Section 21
//GAMEMC (GAMEMC)
package {
import flash.display.*;
public dynamic class GAMEMC extends MovieClip {
public var BG:MovieClip;
public var BGItems:MovieClip;
public var BG_BG:MovieClip;
public var MG:MovieClip;
public var BORDERS:MovieClip;
public var FG:MovieClip;
public var BG_FG:MovieClip;
public var BG_MG:MovieClip;
public var TANK:MovieClip;
}
}//package
Section 22
//HUDMC (HUDMC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class HUDMC extends MovieClip {
public var heightText:TextField;
public var comboMaxText:TextField;
public var boomSign:MovieClip;
public var warnSign:MovieClip;
public var boomBar:MovieClip;
public var fuelBar:MovieClip;
public var heightMaxText:TextField;
public var covers:MovieClip;
public var expBar:MovieClip;
public var levelText:TextField;
public var comboText:TextField;
public var RADAR:MovieClip;
public var expText:TextField;
public function HUDMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 23
//ICopterMissile (ICopterMissile)
package {
import flash.display.*;
public dynamic class ICopterMissile extends MovieClip {
}
}//package
Section 24
//IShot (IShot)
package {
import flash.display.*;
public dynamic class IShot extends MovieClip {
}
}//package
Section 25
//Key (Key)
package {
import flash.display.*;
import flash.events.*;
public class Key {
private static var initialized:Boolean = false;
private static var keysDown:Object = new Object();
public static function initialize(_arg1:Stage){
if (!initialized){
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.addEventListener(Event.DEACTIVATE, clearKeysDeactive);
initialized = true;
};
}
public static function clearKeys():void{
keysDown = new Object();
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
throw (new Error("Key class has yet been initialized."));
};
return (Boolean((_arg1 in keysDown)));
}
private static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
private static function keyReleased(_arg1:KeyboardEvent):void{
if ((_arg1.keyCode in keysDown)){
delete keysDown[_arg1.keyCode];
};
}
private static function clearKeysDeactive(_arg1:Event):void{
clearKeys();
}
}
}//package
Section 26
//Message (Message)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Message extends MovieClip {
public var textBox:TextField;
}
}//package
Section 27
//Missile (Missile)
package {
import flash.display.*;
public dynamic class Missile extends MovieClip {
public var sprite:MovieClip;
}
}//package
Section 28
//MOP (MOP)
package {
import flash.display.*;
public dynamic class MOP extends MovieClip {
}
}//package
Section 29
//PAUSEMENU (PAUSEMENU)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class PAUSEMENU extends MovieClip {
public var smoothText:TextField;
public var buy_Bouncer:SimpleButton;
public var buy_Quality:SimpleButton;
public var info_Bouncer:SimpleButton;
public var buy_Gunner:SimpleButton;
public var info_Quality:SimpleButton;
public var bloodText:TextField;
public var buy_Homer:SimpleButton;
public var button_done:SimpleButton;
public var info_Homer:SimpleButton;
public var buy_Shadows:SimpleButton;
public var info_Shadows:SimpleButton;
public var buy_Bomber:SimpleButton;
public var soundText:TextField;
public var buy_Blood:SimpleButton;
public var quitGame:MovieClip;
public var musicText:TextField;
public var info_Blood:SimpleButton;
public var infoText:TextField;
public var shadowsText:TextField;
public var info_Gunner:SimpleButton;
public var smokeText:TextField;
public var shakeText:TextField;
public var buy_Miner:SimpleButton;
public var info_Miner:SimpleButton;
public var fragsText:TextField;
public var info_Bomber:SimpleButton;
public function PAUSEMENU(){
addFrameScript(0, frame1);
}
public function info_Bomber_func(_arg1){
stage.focus = parent;
infoText.text = "ADJUST WHETHER YOU WANT BACKGROUND MUSIC TO PLAY DURING THE GAME.";
}
public function info_Quality_func(_arg1){
infoText.text = "ADJUST WHETHER THE IMAGE IS SMOOTHED OR NOT. TURNING SMOOTHING TO OFF WILL INCREASE SPEED GREATLY, BUT MAKE THE SCREEN APPEAR MORE JAGGED IN PLACES";
}
public function buy_Bouncer_func(_arg1){
if (MovieClip(parent.parent).soundActive == false){
MovieClip(parent.parent).soundActive = true;
} else {
MovieClip(parent.parent).soundActive = false;
};
updateStats();
}
public function info_Blood_func(_arg1){
infoText.text = "CHOOSE WHETHER PILOTS WILL BLEED WHEN YOU HIT THEM. BLOOD DOESN'T REALLY AFFECT PERFORMANCE OF THE GAME BUT SOME PEOPLE MAY PREFER IT TURNED OFF.";
}
public function info_Shadows_func(_arg1){
infoText.text = "CHOOSE WHETHER YOU WOULD LIKE SHADOWS TO BE VISIBLE OR NOT. RENDERING SHADOWS REDUCES PERFORMANCE BUT HAVING SHADOWS ON INCREASES REALISM";
}
public function info_Homer_func(_arg1){
infoText.text = "TOGGLE WHETHER YOU PREFER TO HAVE THE SCREEN SHAKE IN RESPONSE TO EXPLOSIONS OR NOT. THIS DOES NOT AFFECT PERFORMANCE BUT YOU MAY PREFER IT ONE WAY OR THE OTHER.";
}
function frame1(){
updateStats();
button_done.addEventListener(MouseEvent.MOUSE_UP, button_done_func);
buy_Bomber.addEventListener(MouseEvent.MOUSE_UP, buy_Bomber_func);
buy_Bouncer.addEventListener(MouseEvent.MOUSE_UP, buy_Bouncer_func);
buy_Gunner.addEventListener(MouseEvent.MOUSE_UP, buy_Gunner_func);
buy_Homer.addEventListener(MouseEvent.MOUSE_UP, buy_Homer_func);
buy_Miner.addEventListener(MouseEvent.MOUSE_UP, buy_Miner_func);
buy_Shadows.addEventListener(MouseEvent.MOUSE_UP, buy_Shadows_func);
buy_Blood.addEventListener(MouseEvent.MOUSE_UP, buy_Blood_func);
buy_Quality.addEventListener(MouseEvent.MOUSE_UP, buy_Quality_func);
buy_Bomber.addEventListener(MouseEvent.MOUSE_OVER, info_Bomber_func);
buy_Bouncer.addEventListener(MouseEvent.MOUSE_OVER, info_Bouncer_func);
buy_Gunner.addEventListener(MouseEvent.MOUSE_OVER, info_Gunner_func);
buy_Homer.addEventListener(MouseEvent.MOUSE_OVER, info_Homer_func);
buy_Miner.addEventListener(MouseEvent.MOUSE_OVER, info_Miner_func);
buy_Shadows.addEventListener(MouseEvent.MOUSE_OVER, info_Shadows_func);
buy_Blood.addEventListener(MouseEvent.MOUSE_OVER, info_Blood_func);
buy_Quality.addEventListener(MouseEvent.MOUSE_OVER, info_Quality_func);
info_Bomber.addEventListener(MouseEvent.MOUSE_OVER, info_Bomber_func);
info_Bouncer.addEventListener(MouseEvent.MOUSE_OVER, info_Bouncer_func);
info_Gunner.addEventListener(MouseEvent.MOUSE_OVER, info_Gunner_func);
info_Homer.addEventListener(MouseEvent.MOUSE_OVER, info_Homer_func);
info_Miner.addEventListener(MouseEvent.MOUSE_OVER, info_Miner_func);
info_Shadows.addEventListener(MouseEvent.MOUSE_OVER, info_Shadows_func);
info_Blood.addEventListener(MouseEvent.MOUSE_OVER, info_Blood_func);
info_Quality.addEventListener(MouseEvent.MOUSE_OVER, info_Quality_func);
quitGame.quit_Yes.addEventListener(MouseEvent.MOUSE_UP, quit_Yes_func);
quitGame.quit_No.addEventListener(MouseEvent.MOUSE_UP, button_done_func);
stage.focus = parent;
}
public function button_done_func(_arg1){
if (quitGame.y != 309){
quitGame.y = 309;
} else {
quitGame.y = 800;
};
}
public function buyUpgrade(_arg1){
updateStats();
}
public function info_Miner_func(_arg1){
infoText.text = "TOGGLE WHETHER YOU WOULD LIKE FRAGMENTS TO FLY FROM EXPLOSIONS. FRAGMENTS REDUCE PERFORMANCE BUT INCREASE GRAPHICAL INTENSITY TO THE MAX!";
}
public function info_Bouncer_func(_arg1){
infoText.text = "ADJUST WHETHER YOU WANT SOUND EFFECTS TO PLAY DURING THE GAME.";
}
public function quit_Yes_func(_arg1){
purgeListeners();
MovieClip(parent).dead = true;
}
public function buy_Quality_func(_arg1){
if (MovieClip(parent.parent).smoothActive == false){
MovieClip(parent.parent).smoothActive = true;
} else {
MovieClip(parent.parent).smoothActive = false;
};
updateStats();
}
public function updateStats(){
musicText.text = ("" + MovieClip(parent.parent).musicActive);
soundText.text = ("" + MovieClip(parent.parent).soundActive);
smokeText.text = ("" + MovieClip(parent.parent).smokeActive);
shakeText.text = ("" + MovieClip(parent.parent).shakeActive);
fragsText.text = ("" + MovieClip(parent.parent).fragsActive);
shadowsText.text = ("" + MovieClip(parent.parent).shadowsActive);
bloodText.text = ("" + MovieClip(parent.parent).bloodActive);
smoothText.text = ("" + MovieClip(parent.parent).smoothActive);
MovieClip(parent.parent).saveData();
}
public function buy_Blood_func(_arg1){
if (MovieClip(parent.parent).bloodActive == false){
MovieClip(parent.parent).bloodActive = true;
} else {
MovieClip(parent.parent).bloodActive = false;
};
updateStats();
}
public function buy_Shadows_func(_arg1){
if (MovieClip(parent.parent).shadowsActive == false){
MovieClip(parent.parent).shadowsActive = true;
} else {
MovieClip(parent.parent).shadowsActive = false;
};
updateStats();
}
public function exitPause(){
stage.focus = parent;
MovieClip(parent).destroyEngineActive = true;
MovieClip(parent).loadSettings();
MovieClip(parent).unPause();
}
public function buy_Homer_func(_arg1){
if (MovieClip(parent.parent).shakeActive == false){
MovieClip(parent.parent).shakeActive = true;
} else {
MovieClip(parent.parent).shakeActive = false;
};
updateStats();
}
public function buy_Gunner_func(_arg1){
if (MovieClip(parent.parent).smokeActive == false){
MovieClip(parent.parent).smokeActive = true;
} else {
MovieClip(parent.parent).smokeActive = false;
};
updateStats();
}
public function purgeListeners(){
quitGame.quit_Yes.removeEventListener(MouseEvent.MOUSE_UP, quit_Yes_func);
quitGame.quit_No.removeEventListener(MouseEvent.MOUSE_UP, button_done_func);
button_done.removeEventListener(MouseEvent.MOUSE_UP, button_done_func);
buy_Bomber.removeEventListener(MouseEvent.MOUSE_UP, buy_Bomber_func);
buy_Bouncer.removeEventListener(MouseEvent.MOUSE_UP, buy_Bouncer_func);
buy_Gunner.removeEventListener(MouseEvent.MOUSE_UP, buy_Gunner_func);
buy_Homer.removeEventListener(MouseEvent.MOUSE_UP, buy_Homer_func);
buy_Miner.removeEventListener(MouseEvent.MOUSE_UP, buy_Miner_func);
buy_Shadows.removeEventListener(MouseEvent.MOUSE_UP, buy_Shadows_func);
buy_Blood.removeEventListener(MouseEvent.MOUSE_UP, buy_Blood_func);
buy_Quality.removeEventListener(MouseEvent.MOUSE_UP, buy_Quality_func);
buy_Bomber.removeEventListener(MouseEvent.MOUSE_OVER, info_Bomber_func);
buy_Bouncer.removeEventListener(MouseEvent.MOUSE_OVER, info_Bouncer_func);
buy_Gunner.removeEventListener(MouseEvent.MOUSE_OVER, info_Gunner_func);
buy_Homer.removeEventListener(MouseEvent.MOUSE_OVER, info_Homer_func);
buy_Miner.removeEventListener(MouseEvent.MOUSE_OVER, info_Miner_func);
buy_Shadows.removeEventListener(MouseEvent.MOUSE_OVER, info_Shadows_func);
buy_Blood.removeEventListener(MouseEvent.MOUSE_OVER, info_Blood_func);
buy_Quality.removeEventListener(MouseEvent.MOUSE_OVER, info_Quality_func);
info_Bomber.removeEventListener(MouseEvent.MOUSE_OVER, info_Bomber_func);
info_Bouncer.removeEventListener(MouseEvent.MOUSE_OVER, info_Bouncer_func);
info_Gunner.removeEventListener(MouseEvent.MOUSE_OVER, info_Gunner_func);
info_Homer.removeEventListener(MouseEvent.MOUSE_OVER, info_Homer_func);
info_Miner.removeEventListener(MouseEvent.MOUSE_OVER, info_Miner_func);
info_Shadows.removeEventListener(MouseEvent.MOUSE_OVER, info_Shadows_func);
info_Blood.removeEventListener(MouseEvent.MOUSE_OVER, info_Blood_func);
info_Quality.removeEventListener(MouseEvent.MOUSE_OVER, info_Quality_func);
}
public function buy_Bomber_func(_arg1){
if (MovieClip(parent.parent).musicActive == false){
MovieClip(parent.parent).musicActive = true;
} else {
MovieClip(parent.parent).musicActive = false;
};
updateStats();
}
public function info_Gunner_func(_arg1){
infoText.text = "TOGGLE WHETHER YOU WANT A SMOKE EFFECT IN THE GAME. SMOKE WILL REDUCE PERFORMANCE BUT LOOKS AWESOME.";
}
public function buy_Miner_func(_arg1){
if (MovieClip(parent.parent).fragsActive == false){
MovieClip(parent.parent).fragsActive = true;
} else {
MovieClip(parent.parent).fragsActive = false;
};
updateStats();
}
}
}//package
Section 30
//Pilot (Pilot)
package {
import flash.display.*;
public dynamic class Pilot extends MovieClip {
public var sprite:MovieClip;
public function Pilot(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 31
//RadarPoint (RadarPoint)
package {
import flash.display.*;
public dynamic class RadarPoint extends MovieClip {
}
}//package
Section 32
//Shadow (Shadow)
package {
import flash.display.*;
public dynamic class Shadow extends MovieClip {
}
}//package
Section 33
//Smoke (Smoke)
package {
import flash.display.*;
public dynamic class Smoke extends MovieClip {
public function Smoke(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 34
//TankI (TankI)
package {
import flash.display.*;
public dynamic class TankI extends MovieClip {
}
}//package
Section 35
//UPGRADEMENU (UPGRADEMENU)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.media.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class UPGRADEMENU extends MovieClip {
public var costText_Bouncer:TextField;
public var buy_Bouncer:SimpleButton;
public var info_Gunner:SimpleButton;
public var freqText_Gunner:TextField;
public var costText_Bomber:TextField;
public var info_Bouncer:SimpleButton;
public var freqText_Bouncer:TextField;
public var buy_Gunner:SimpleButton;
public var buy_Miner:SimpleButton;
public var buy_Homer:SimpleButton;
public var freqText_Homer:TextField;
public var costText_Homer:TextField;
public var button_done:SimpleButton;
public var infoText:TextField;
public var info_Homer:SimpleButton;
public var info_Miner:SimpleButton;
public var info_Bomber:SimpleButton;
public var freqText_Bomber:TextField;
public var pic_Enemy:MovieClip;
public var costText_Miner:TextField;
public var freqText_Miner:TextField;
public var priceBase:Array;
public var compScore:Number;
public var buy_Bomber:SimpleButton;
public var costText_Gunner:TextField;
public var expText:TextField;
public function UPGRADEMENU(){
addFrameScript(0, frame1, 1, frame2);
}
public function purgeListeners(){
button_done.removeEventListener(MouseEvent.MOUSE_UP, button_done_func);
buy_Bomber.removeEventListener(MouseEvent.MOUSE_UP, buy_Bomber_func);
buy_Bouncer.removeEventListener(MouseEvent.MOUSE_UP, buy_Bouncer_func);
buy_Gunner.removeEventListener(MouseEvent.MOUSE_UP, buy_Gunner_func);
buy_Homer.removeEventListener(MouseEvent.MOUSE_UP, buy_Homer_func);
buy_Miner.removeEventListener(MouseEvent.MOUSE_UP, buy_Miner_func);
buy_Bomber.removeEventListener(MouseEvent.MOUSE_OVER, info_Bomber_func);
buy_Bouncer.removeEventListener(MouseEvent.MOUSE_OVER, info_Bouncer_func);
buy_Gunner.removeEventListener(MouseEvent.MOUSE_OVER, info_Gunner_func);
buy_Homer.removeEventListener(MouseEvent.MOUSE_OVER, info_Homer_func);
buy_Miner.removeEventListener(MouseEvent.MOUSE_OVER, info_Miner_func);
info_Bomber.removeEventListener(MouseEvent.MOUSE_OVER, info_Bomber_func);
info_Bouncer.removeEventListener(MouseEvent.MOUSE_OVER, info_Bouncer_func);
info_Gunner.removeEventListener(MouseEvent.MOUSE_OVER, info_Gunner_func);
info_Homer.removeEventListener(MouseEvent.MOUSE_OVER, info_Homer_func);
info_Miner.removeEventListener(MouseEvent.MOUSE_OVER, info_Miner_func);
}
public function info_Gunner_func(_arg1){
pic_Enemy.gotoAndStop(3);
infoText.text = "THE GUNNER WILL AIM IT'S MISSILES AT YOU BEFORE FIRING. THE WILL TRACK YOU FOR A SHORT TIME BEFORE HEADING IN A STRAIGHT LINE. EXCELLENT FOR GAINING HEIGHT.";
}
public function info_Bomber_func(_arg1){
pic_Enemy.gotoAndStop(1);
infoText.text = "THE BOMBER IS THE STANDARD ENEMY. THE BOMBS IT DROPS WILL FALL AND EXPLODE ON IMPACT WITH THE GROUND OR THE INDESTRUCTOTANK AND PROVIDE A MEDIUM AMMOUNT OF LIFT. AN ALL ROUND ENEMY.";
}
public function button_done_func2(_arg1){
button_done.removeEventListener(MouseEvent.MOUSE_UP, button_done_func2);
stage.focus = parent;
MovieClip(parent).upgradeMenuPos = 400;
}
public function buy_Bouncer_func(_arg1){
buyUpgrade(2);
}
public function buy_Miner_func(_arg1){
buyUpgrade(5);
}
public function info_Bouncer_func(_arg1){
pic_Enemy.gotoAndStop(2);
infoText.text = "THE BOUNCER DELIVERS A WEAPON WITH A DELAYED EXPLOSION. THE BOMB IT DROPS WILL BOUNCE ONCE BEFORE EXPLODING ON IMPACT WITH THE FLOOR, DELIVERING MEDIUM LIFT FOR THE INDESTRUCTOTANK.";
}
public function updateStats(){
var _local1:Number;
compScore = 0;
_local1 = 1;
while (_local1 < 6) {
this[("freqText_" + MovieClip(parent).enemyNameArray[_local1])].text = MovieClip(parent).enemyFreqArray[_local1];
if (this[("freqText_" + MovieClip(parent).enemyNameArray[_local1])].text != "100"){
this[("costText_" + MovieClip(parent).enemyNameArray[_local1])].text = (priceBase[_local1] + ((MovieClip(parent).enemyFreqArray[_local1] / 10) * priceBase[_local1]));
} else {
this[("costText_" + MovieClip(parent).enemyNameArray[_local1])].text = "FULL";
compScore++;
};
_local1++;
};
expText.text = MovieClip(parent).experienceTotal;
if (compScore == 5){
purgeListeners();
gotoAndStop(2);
};
}
function frame1(){
priceBase = new Array(null, 10, 20, 30, 40, 50);
compScore = 0;
stop();
updateStats();
button_done.addEventListener(MouseEvent.MOUSE_UP, button_done_func);
buy_Bomber.addEventListener(MouseEvent.MOUSE_UP, buy_Bomber_func);
buy_Bouncer.addEventListener(MouseEvent.MOUSE_UP, buy_Bouncer_func);
buy_Gunner.addEventListener(MouseEvent.MOUSE_UP, buy_Gunner_func);
buy_Homer.addEventListener(MouseEvent.MOUSE_UP, buy_Homer_func);
buy_Miner.addEventListener(MouseEvent.MOUSE_UP, buy_Miner_func);
buy_Bomber.addEventListener(MouseEvent.MOUSE_OVER, info_Bomber_func);
buy_Bouncer.addEventListener(MouseEvent.MOUSE_OVER, info_Bouncer_func);
buy_Gunner.addEventListener(MouseEvent.MOUSE_OVER, info_Gunner_func);
buy_Homer.addEventListener(MouseEvent.MOUSE_OVER, info_Homer_func);
buy_Miner.addEventListener(MouseEvent.MOUSE_OVER, info_Miner_func);
info_Bomber.addEventListener(MouseEvent.MOUSE_OVER, info_Bomber_func);
info_Bouncer.addEventListener(MouseEvent.MOUSE_OVER, info_Bouncer_func);
info_Gunner.addEventListener(MouseEvent.MOUSE_OVER, info_Gunner_func);
info_Homer.addEventListener(MouseEvent.MOUSE_OVER, info_Homer_func);
info_Miner.addEventListener(MouseEvent.MOUSE_OVER, info_Miner_func);
}
public function info_Homer_func(_arg1){
pic_Enemy.gotoAndStop(4);
infoText.text = "THE HOMER'S MISSILES WILL ALWAYS HIT THEIR TARGET, EACH PROVIDES A SMALL AMMOUNT OF LIFT.";
}
public function buyUpgrade(_arg1){
if ((((MovieClip(parent).enemyFreqArray[_arg1] < 100)) && ((MovieClip(parent).experienceTotal >= Number(this[("costText_" + MovieClip(parent).enemyNameArray[_arg1])].text))))){
MovieClip(parent).enemyFreqArray[_arg1] = (MovieClip(parent).enemyFreqArray[_arg1] + 10);
MovieClip(parent).experienceTotal = (MovieClip(parent).experienceTotal - Number(this[("costText_" + MovieClip(parent).enemyNameArray[_arg1])].text));
updateStats();
};
}
public function buy_Homer_func(_arg1){
buyUpgrade(4);
}
public function button_done_func(_arg1){
purgeListeners();
stage.focus = parent;
MovieClip(parent).upgradeMenuPos = 400;
}
public function info_Miner_func(_arg1){
pic_Enemy.gotoAndStop(5);
infoText.text = "THE MINER WILL TRVEL ALONG THE FLOOR AND PROVIDE MAXIMUM LIFT WHEN HIT. GREAT FOR SAVING THOSE COMBOS AT THE LAST SECOND.";
}
public function buy_Gunner_func(_arg1){
buyUpgrade(3);
}
public function buy_Bomber_func(_arg1){
buyUpgrade(1);
}
function frame2(){
MovieClip(parent).gameComplete = true;
if (MovieClip(parent.parent).gameType == 2){
MovieClip(parent.parent).newMedal(2);
} else {
if (MovieClip(parent.parent).gameType == 1){
MovieClip(parent.parent).newMedal(1);
};
};
button_done.addEventListener(MouseEvent.MOUSE_UP, button_done_func2);
}
}
}//package