Frame 1
var keyListener = new Object();
keyListener.onKeyUp = function () {
k = Key.getCode();
if (k == 81) {
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else {
_quality = "HIGH";
}
} else if (k == 77) {
if (_root.globalSound.getVolume() == 0) {
_root.globalSound.setVolume(100);
} else {
_root.globalSound.setVolume(0);
}
}
};
Key.addListener(keyListener);
Frame 2
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
Stage.showMenu = false;
var loaded;
onEnterFrame = function () {
preloader.bar._xscale = (loaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
pretext.loadedTXT.text = (Math.floor(loaded * 100) / 100) + " %";
if (loaded == 100) {
pretext.gotoAndStop(2);
pretext.onRelease = function () {
play();
};
delete onEnterFrame;
}
};
__com_mochibot__("0b538cfa", this, 10301, true);
Instance of Symbol 26 MovieClip in Frame 2
on (release) {
getURL ("http://www.maxgames.com", _blank);
}
Frame 35
stop();
var missileSound = new Sound(this);
missileSound.attachSound("tankMissileSFX");
var menuMusic = new Sound(this);
menuMusic.attachSound("menumusic");
var gameMusic = new Sound(this);
gameMusic.attachSound("gamemusic");
var machineGunSound = new Sound(this);
machineGunSound.attachSound("tankMachineGunSFX");
machineGunSound.setVolume(60);
var globalSound = new Sound();
globalSound.setVolume(100);
Frame 37
menuMusic.start(0, 99);
var vol = 0;
onEnterFrame = function () {
vol = vol + 4;
menuMusic.setVolume(vol);
if (vol >= 100) {
delete onEnterFrame;
}
};
Frame 59
function saveGame(slot) {
var _local5 = "TanksSlot" + slot;
var _local2 = SharedObject.getLocal(_local5);
for (var _local4 in _root.loadSaveVars) {
_local2.data[_root.loadSaveVars[_local4]] = _root[_root.loadSaveVars[_local4]];
}
for (var _local3 in _root.aimsArray) {
_local2.data["aim" + _local3] = _root.aimsArray[_local3];
}
_local2.flush();
}
function loadGame(slot) {
var _local5 = "TanksSlot" + slot;
var _local2 = SharedObject.getLocal(_local5);
for (var _local4 in _root.loadSaveVars) {
_root[_root.loadSaveVars[_local4]] = _local2.data[_root.loadSaveVars[_local4]];
}
for (var _local3 in _root.aimsArray) {
_root.aimsArray[_local3] = _local2.data["aim" + _local3];
}
}
var FPS = 46;
var mKeyDown = false;
var vol = 100;
var enemiesArray;
var playerName;
var mainTimer;
var mainTimerRounded;
var level;
var GamePause;
var GameStarted;
var outsideArena;
var hudMessage;
var tankColor;
var tankColorHexa;
var missiles;
var powerUpRate;
var ownColorUnlock;
var maxUpgrades;
var speedUpgrades;
var accelerationUpgrades;
var armorUpgrades;
var turningUpgrades;
var fireRateMGUpgrades;
var fireRateMissilesUpgrades;
var health;
var healthUp;
var lives;
var mgDamage;
var missileDamage;
var enemy1Damage;
var cannon1Damage;
var mineDamage;
var explosionDamage;
var money;
var comboDecreaseSpeed;
var currentAim;
var totalAims = 5;
var timeTillCoinBlink;
var timeTillCoinFade;
var totalEnemies;
var requiredEnemies;
var cursorDepth;
var pauseMenuDepth;
var hudDepth;
var pickupsMax;
var pickupsMin;
var pickupsVariable;
var missileOfDoomDepth;
var turretDepth;
var missileDepthMax;
var missileDepthMin;
var mgBulletDepthMax;
var mgBulletDepthMin;
var effectDepthMax;
var effectDepthMin;
var effectDepthVariable;
var tankDepth;
var eBulletDepthMax;
var eBulletDepthMin;
var eBulletDepthVariable;
var enemyDepthMax;
var enemyDepthMin;
var enemyDepthVariable;
var cannonDepthMax;
var cannonDepthMin;
var cannonDepthVariable;
var powerupDepthMax;
var powerupVariable;
var powerupDepthMin;
var trackDepthMax;
var trackDepthMin;
var minesDepthMax;
var minesDepthMin;
var mouseDist;
var loadSaveVars = new Array("playerName", "level", "money", "currentAim", "tankColor", "speedUpgrades", "accelerationUpgrades", "armorUpgrades", "turningUpgrades", "fireRateMGUpgrades", "fireRateMissilesUpgrades");
Frame 60
function StartVariables() {
_root.enemiesArray = new Array();
_root.GamePause = false;
_root.GameStarted = false;
_root.outsideArena = false;
_root.hudMessage = " ";
_root.tankColorHexa = "0x" + _root.tankColor;
_root.missiles = 3;
_root.powerUpRate = 5 * _root.FPS;
_root.ownColorUnlock = 5;
_root.maxUpgrades = 5;
_root.health = 100;
_root.healthUp = 50;
_root.lives = 2;
_root.mgDamage = 60;
_root.missileDamage = 120;
_root.enemy1Damage = 8;
_root.cannon1Damage = 14;
_root.mineDamage = 30;
_root.explosionDamage = 15;
_root.comboDecreaseSpeed = 0.1;
_root.totalAims = 5;
_root.timeTillCoinBlink = 50;
_root.timeTillCoinFade = 8;
_root.cursorDepth = 10000;
_root.pauseMenuDepth = 9999;
_root.hudDepth = 9998;
_root.pickupsMax = 9000;
_root.pickupsMin = 8500;
_root.pickupsVariable = 0;
_root.missileOfDoomDepth = 8000;
_root.turretDepth = 7800;
_root.missileDepthMax = 7730;
_root.missileDepthMin = 7700;
_root.mgBulletDepthMax = 7030;
_root.mgBulletDepthMin = 7000;
_root.effectDepthMax = 6400;
_root.effectDepthMin = 5800;
_root.effectDepthVariable = 0;
_root.tankDepth = 5500;
_root.eBulletDepthMax = 5000;
_root.eBulletDepthMin = 4500;
_root.eBulletDepthVariable = 0;
_root.enemyDepthMax = 4000;
_root.enemyDepthMin = 3800;
_root.enemyDepthVariable = 0;
_root.cannonDepthMax = 3530;
_root.cannonDepthMin = 3500;
_root.cannonDepthVariable = 0;
_root.powerupDepthMax = 2500;
_root.powerupVariable = 0;
_root.powerupDepthMin = 2000;
_root.swampDepthVariable = 0;
_root.swampDepthMax = 1500;
_root.swampDepthMin = 1000;
_root.minesDepthMax = 600;
_root.minesDepthMin = 500;
_root.mouseDist = 50;
}
function newGameVars() {
_root.level = 1;
_root.speedUpgrades = 0;
_root.accelerationUpgrades = 0;
_root.armorUpgrades = 0;
_root.turningUpgrades = 0;
_root.fireRateMGUpgrades = 0;
_root.fireRateMissilesUpgrades = 0;
_root.money = 50;
_root.careerMoney = _root.money;
_root.currentAim = 1;
}
function removeEnemy(This) {
for (var _local3 in _root.enemiesArray) {
if (This == _root.enemiesArray[_local3]) {
_root.enemiesArray.splice(_local3, 1);
}
}
}
function removeBullet(This) {
for (var _local3 in _root.bullets) {
if (This == _root.bullets[_local3]) {
_root.bullets.splice(_local3, 1);
if (This.indexOf("Bullet") == -1) {
_root[This].play();
} else {
removeMovieClip(_root[This]);
}
}
}
}
function invincibleTime() {
_root.invincibleTimer--;
}
function mainTimerDecrease() {
_root.mainTimer--;
}
function powerUpTimerIncrease() {
_root.powerUpTimer++;
}
function outsideArenaTimerDecrease() {
_root.outsideArenaTimer--;
}
function speedFunction() {
_root.maxSpeed = (_root.speedUpgrades / 1.5) + 6;
}
function accelerationFunction() {
_root.acceleration = (0.04 * _root.accelerationUpgrades) + 0.15;
}
function turningSpeedFunction() {
_root.turningSpeed = (0.7 * _root.turningUpgrades) + 1.8;
}
function fireRateMGFunction() {
_root.fireRateMG = (0.03 * _root.fireRateMGUpgrades) + 0.05;
trace(_root.fireRateMGUpgrades);
}
function fireRateMissilesFunction() {
_root.fireRateMissiles = (0.002 * _root.fireRateMissilesUpgrades) + 0.008;
}
function armorFunction() {
_root.armor = (0.4 * _root.armorUpgrades) + 1;
}
function defencePowerupFunction(parent) {
_root.damageMultiplier = _root.damageMultiplier + 0.2;
_root[parent].removeMovieClip();
}
function extralifePowerupFunction(parent) {
if (_root.lives < 99) {
_root.lives++;
_root[parent].removeMovieClip();
}
}
function moneyPowerupFunction(parent) {
_root.levelMoney = _root.levelMoney + ((random(30) + 10) * _root.comboMultiplier);
_root[parent].removeMovieClip();
}
function missilePowerupFunction(parent) {
if (_root.missiles < 99) {
_root.missiles = _root.missiles + 3;
if (_root.missiles > 99) {
_root.missiles = 99;
}
_root[parent].removeMovieClip();
}
}
function timePowerupFunction(parent) {
_root.mainTimer = _root.mainTimer + (10 * _root.FPS);
_root[parent].removeMovieClip();
}
function comboPowerupFunction(parent) {
_root.combo = _root.combo + 50;
_root[parent].removeMovieClip();
}
function healthPowerupFunction(parent) {
_root.health = _root.health + _root.healthUp;
if (_root.health > 100) {
_root.health = 100;
}
_root[parent].removeMovieClip();
}
function invinciblePowerupFunction(parent) {
_root.tankStat = "invincible";
_root.invincibleTimer = 5 * _root.FPS;
_root[parent]._visible = false;
}
function levelVariables(level) {
_root.levelTime = (30 * _root.FPS) + ((level * 4) * _root.FPS);
_root.powerUpTimer = random(4);
_root.health = 100;
_root.levelMoney = 0;
_root.comboMultiplier = 1;
_root.battleArenaWidth = (_root.battleArenaHeight = (level * 90) + 900);
_root.outsideArenaTimer = 3;
tile.height = (tile.width = battleArenaWidth);
createEmptyMovieClip("battleAreaBounds", 1);
with (battleAreaBounds) {
beginBitmapFill(tile);
lineStyle(10, 16711680, 80);
moveTo((-_root.battleArenaWidth) / 2, (-_root.battleArenaHeight) / 2);
lineTo(_root.battleArenaWidth / 2, (-_root.battleArenaHeight) / 2);
lineTo(_root.battleArenaWidth / 2, _root.battleArenaHeight / 2);
lineTo((-_root.battleArenaWidth) / 2, _root.battleArenaHeight / 2);
lineTo((-_root.battleArenaWidth) / 2, (-_root.battleArenaHeight) / 2);
endFill();
}
_root.damageMultiplier = 1;
_root.combo = 0;
_root.enemy1s = 2 + Math.round(level / 2);
_root.cannon1s = 1 + Math.round(level / 3);
if (level >= 3) {
_root.enemy2s = 1 + Math.round(level / 2.5);
}
if (level >= 6) {
_root.cannon2s = 1 + Math.round(level / 3);
}
if (level >= 9) {
_root.enemy3s = 1 + Math.round(level / 5);
}
if (level >= 12) {
_root.cannon3s = 1 + Math.round(level / 6);
}
_root.swamps = 2 + Math.round(level / 2);
_root.mines = 4 + level;
_root.totalEnemies = 0;
_root.stuff = [];
_root.enemiesArray = [];
_root.cursorDepth = 10000;
_root.pauseMenuDepth = 9999;
_root.hudDepth = 9998;
_root.pickupsMax = 9000;
_root.pickupsMin = 8500;
_root.pickupsVariable = 0;
_root.missileOfDoomDepth = 8000;
_root.turretDepth = 7800;
_root.missileDepthMax = 7730;
_root.missileDepthMin = 7700;
_root.mgBulletDepthMax = 7030;
_root.mgBulletDepthMin = 7000;
_root.effectDepthMax = 6400;
_root.effectDepthMin = 5800;
_root.effectDepthVariable = 0;
_root.tankDepth = 5500;
_root.eBulletDepthMax = 5000;
_root.eBulletDepthMin = 4500;
_root.eBulletDepthVariable = 0;
_root.enemyDepthMax = 4000;
_root.enemyDepthMin = 3800;
_root.enemyDepthVariable = 0;
_root.cannonDepthMax = 3530;
_root.cannonDepthMin = 3500;
_root.cannonDepthVariable = 0;
_root.powerupDepthMax = 2500;
_root.powerupVariable = 0;
_root.powerupDepthMin = 2000;
_root.swampDepthVariable = 0;
_root.swampDepthMax = 1500;
_root.swampDepthMin = 1000;
_root.minesDepthMax = 600;
_root.minesDepthMin = 500;
}
stop();
_quality = "HIGH";
var paintCost = 20;
var upgradesCosts = new Array("Placeholder", 30, 45, 70, 100, 150);
var aimCosts = new Array("Placeholder", 50, 100, 150, 200, 250);
var aimsArray = new Array("Placeholder", "PURCHASED", 2, 4, 6, 8);
var powerupsArray = new Array("Placeholder", "healthPowerup", "moneyPowerup", "timePowerup", "missilePowerup", "comboPowerup", "invinciblePowerup", "extralifePowerup");
StartVariables();
speedFunction();
accelerationFunction();
turningSpeedFunction();
armorFunction();
fireRateMGFunction();
fireRateMissilesFunction();
Instance of Symbol 280 MovieClip in Frame 60
onClipEvent (load) {
var contentGoTo = "instructions";
}
Instance of Symbol 282 MovieClip "cam" in Frame 60
onClipEvent (enterFrame) {
_x = _root.tank._x;
_y = _root.tank._y;
_root.hud._x = _x;
_root.hud._y = _y;
}
Frame 61
stop();
_root.GameStarted = false;
menuMusic.stop();
gameMusic.start(0, 99);
gameMusic.setVolume(100);
var stuff = new Array();
enemiesArray = [];
var bullets = new Array();
var tile = flash.display.BitmapData.loadBitmap("pattern");
tankColorHexa = "0x" + _root.tankColor;
var tankColorTrans = (new flash.geom.ColorTransform());
var tankTrans = (new flash.geom.Transform(_root.tank.tankShadowed));
var turretColorTrans = (new flash.geom.ColorTransform());
var turretTrans = (new flash.geom.Transform(_root.turret.turretShadowed));
tankColorTrans.rgb = tankColorHexa;
tankTrans.colorTransform = tankColorTrans;
turretColorTrans.rgb = tankColorHexa;
turretTrans.colorTransform = turretColorTrans;
var b = 0;
var mouseIsDown = false;
onMouseDown = function () {
mouseIsDown = true;
};
onMouseUp = function () {
mouseIsDown = false;
};
onEnterFrame = function () {
if (Key.isDown(2)) {
Mouse.hide();
}
if (requiredEnemies <= 0) {
if (((Key.isDown(13) && (!_root.GamePause)) && (_root.pauseMenu._currentframe == 1)) && (!tank.outsideArena)) {
_root.GamePause = true;
_root.pauseMenu._x = (-_x) + (Stage.width / 2);
_root.pauseMenu._y = (-_y) + (Stage.height / 2);
_root.aim.removeMovieClip();
delete onEnterFrame;
_root.pauseMenu.gotoAndPlay("timeUp");
}
}
_root.totalMoney = _root.money + _root.levelMoney;
if ((mouseIsDown && (tank.machineGunReload >= 1)) && (!_root.GamePause)) {
machineGunSound.start(0, 1);
tank.machineGunReload = 0;
duplicateMovieClip (Bullet, "Bullet" + b, b + mgBulletDepthMin);
b++;
if ((b + mgBulletDepthMin) >= mgBulletDepthMax) {
b = 0;
}
}
if (((_root.GameStarted && ((_root.powerUpTimer % _root.powerUpRate) == 0)) && (_root.powerUpTimer > 0)) && (requiredEnemies > 0)) {
_root.powerUpTimer = 0;
dropPowerUp = random(100);
if (dropPowerUp < 25) {
drop = 1;
} else if (dropPowerUp < 45) {
drop = 2;
} else if (dropPowerUp < 62) {
drop = 3;
} else if (dropPowerUp < 76) {
drop = 4;
} else if (dropPowerUp < 86) {
drop = 5;
} else if (dropPowerUp < 99) {
drop = 6;
} else {
drop = 7;
}
duplicateMovieClip (_root[powerupsArray[drop]], "Powerup" + _root.powerupVariable, _root.powerupVariable + _root.powerupDepthMin);
_root.powerupVariable++;
if ((_root.powerupVariable + _root.powerupDepthMin) >= _root.powerupDepthMax) {
_root.powerupVariable = 0;
}
}
if (((_root.mainTimer <= 0) && (_root.GameStarted)) && (_root.pauseMenu._currentframe == 1)) {
_root.GamePause = true;
_root.pauseMenu._x = (-_x) + (Stage.width / 2);
_root.pauseMenu._y = (-_y) + (Stage.height / 2);
_root.aim.removeMovieClip();
delete onEnterFrame;
_root.pauseMenu.swapDepths(_root.getNextHighestDepth());
_root.pauseMenu.gotoAndPlay("timeUp");
}
if ((Key.isDown(80) && (_root.pauseMenu._currentframe == 1)) && (_root.GameStarted)) {
_root.GamePause = true;
_root.pauseMenu._x = (-_x) + (Stage.width / 2);
_root.pauseMenu._y = (-_y) + (Stage.height / 2);
_root.pauseMenu.play();
} else if (Key.isDown(80) && (_root.pauseMenu._currentframe == 25)) {
_root.pauseMenu.play();
}
if (_root.pauseMenu._currentframe == 52) {
if (_root.mines > 0) {
var _local2 = 0;
while (_local2 < _root.mines) {
duplicateMovieClip ("Mine", "Mine" + _local2, _local2 + _root.minesDepthMin);
_local2++;
}
}
if (_root.swamps > 0) {
var _local5 = 0;
while (_local5 < _root.swamps) {
duplicateMovieClip ("Swamp", "Swamp" + _root.swampDepthVariable, _root.swampDepthVariable + _root.swampDepthMin);
_root.swampDepthVariable++;
_local5++;
}
}
if (_root.enemy1s > 0) {
var _local3 = 0;
while (_local3 < _root.enemy1s) {
duplicateMovieClip ("Enemy1", "Enemy" + (_root.enemyDepthVariable + _root.enemyDepthMin), _root.enemyDepthVariable + _root.enemyDepthMin);
_root.enemyDepthVariable++;
_root.totalEnemies++;
_local3++;
}
}
if (_root.enemy2s > 0) {
var _local3 = 0;
while (_local3 < _root.enemy2s) {
duplicateMovieClip ("Enemy2", "Enemy" + (_root.enemyDepthVariable + _root.enemyDepthMin), _root.enemyDepthVariable + _root.enemyDepthMin);
_root.enemyDepthVariable++;
_root.totalEnemies++;
_local3++;
}
}
if (_root.enemy3s > 0) {
var _local3 = 0;
while (_local3 < _root.enemy3s) {
duplicateMovieClip ("Enemy3", "Enemy" + (_root.enemyDepthVariable + _root.enemyDepthMin), _root.enemyDepthVariable + _root.enemyDepthMin);
_root.enemyDepthVariable++;
_root.totalEnemies++;
_local3++;
}
}
if (_root.cannon1s > 0) {
var _local4 = 0;
while (_local4 < _root.cannon1s) {
duplicateMovieClip ("Cannon1", "Cannon" + (_root.cannonDepthVariable + _root.cannonDepthMin), _root.cannonDepthVariable + _root.cannonDepthMin);
_root.cannonDepthVariable++;
_root.totalEnemies++;
_local4++;
}
}
if (_root.cannon2s > 0) {
var _local4 = 0;
while (_local4 < _root.cannon2s) {
duplicateMovieClip ("Cannon2", "Cannon" + (_root.cannonDepthVariable + _root.cannonDepthMin), _root.cannonDepthVariable + _root.cannonDepthMin);
_root.cannonDepthVariable++;
_root.totalEnemies++;
_local4++;
}
}
if (_root.cannon3s > 0) {
var _local4 = 0;
while (_local4 < _root.cannon3s) {
duplicateMovieClip ("Cannon3", "Cannon" + (_root.cannonDepthVariable + _root.cannonDepthMin), _root.cannonDepthVariable + _root.cannonDepthMin);
_root.cannonDepthVariable++;
_root.totalEnemies++;
_local4++;
}
}
requiredEnemies = Math.floor(totalEnemies * 0.75);
}
};
Instance of Symbol 358 MovieClip "hud" in Frame 61
onClipEvent (load) {
swapDepths(_root.hudDepth);
comboBarLength = comboBar._width / 100;
combomax = 180;
combo1 = 0;
combo2 = 60;
combo3 = 120;
}
onClipEvent (enterFrame) {
if (_root.combo > 0) {
_root.combo = _root.combo - (_root.comboDecreaseSpeed * _root.comboMultiplier);
}
if (_root.combo < 0) {
_root.combo = 0;
} else if (_root.combo > 180) {
_root.combo = 180;
}
if (_root.combo > combo3) {
_root.comboMultiplier = 3;
} else if (_root.combo > combo2) {
_root.comboMultiplier = 2;
} else {
_root.comboMultiplier = 1;
}
comboBar._width = comboBarLength + _root.combo;
}
Instance of Symbol 307 MovieClip "aim" in Frame 61
onClipEvent (load) {
Mouse.hide();
swapDepths(_root.cursorDepth);
}
onClipEvent (enterFrame) {
i = 49;
while ((i - 48) <= _root.totalAims) {
if (Key.isDown(i)) {
if (_root.hud.chChooser._currentframe == 1) {
_root.hud.chChooser.play();
} else if ((_root.hud.chChooser._currentframe > 9) && (_root.hud.chChooser._currentframe < 35)) {
_root.hud.chChooser.gotoAndPlay("press");
}
}
if (Key.isDown(i) && (_root.aimsArray[i - 48] == "PURCHASED")) {
_root.currentAim = i - 48;
} else if (Key.isDown(i) && (_root.aimsArray[i - 48] != "PURCHASED")) {
}
i++;
}
gotoAndStop(_root.currentAim +58);
if (((_root.tank.missileReload < 1) && (_root.missiles >= 1)) && (missileStat._currentframe == 1)) {
missileStat.gotoAndPlay(2);
} else if (_root.tank.missileReload >= 1) {
missileStat.gotoAndStop(1);
}
if (!_root.GamePause) {
_x = _root._xmouse;
_y = _root._ymouse;
}
this.gotoAndStop(_root.currentAim);
}
Instance of Symbol 361 MovieClip "Bullet" in Frame 61
onClipEvent (load) {
if (_name == "Bullet") {
_visible = false;
} else {
_root.bullets.push(_name);
var radius = 35;
var speed = 20;
_xscale = (_xscale * (_root.damageMultiplier / 2));
_height = ((Math.random() * 2) + 10);
_rotation = _root.turret._rotation;
_x = _root.turret._x;
_y = _root.turret._y;
var Angle = (_rotation * (Math.PI/180));
var Angle2 = ((_rotation + 109) * (Math.PI/180));
_x = ((Math.cos(Angle2) * (-radius)) + _x);
_y = ((Math.sin(Angle2) * (-radius)) + _y);
_root.turret.mg.gotoAndPlay(2);
var distance = 800;
}
}
onClipEvent (enterFrame) {
if ((!_root.GamePause) && (_root.GameStarted)) {
if (_name != "Bullet") {
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
_x = (_x + (Math.sin(Angle) * speed));
_y = (_y - (Math.cos(Angle) * speed));
if (dist > distance) {
_root.removeBullet(_name);
this.removeMovieClip();
}
}
}
}
Instance of Symbol 376 MovieClip "Missile" in Frame 61
onClipEvent (load) {
if (_name == "Missile") {
_visible = false;
} else {
_root.bullets.push(_name);
var speed = 30;
var trail = 1;
var trailFrequency = 0.2;
_rotation = _root.turret._rotation;
_x = _root.turret._x;
_y = _root.turret._y;
var Angle = (_rotation * (Math.PI/180));
var radius = 60;
_x = (_x + (Math.sin(Angle) * radius));
_y = (_y - (Math.cos(Angle) * radius));
}
}
onClipEvent (enterFrame) {
if ((!_root.GamePause) && (_root.GameStarted)) {
if ((_name != "Missile") && (_currentframe == 1)) {
if (trail < 1) {
trail = trail + trailFrequency;
} else {
duplicateMovieClip (_root.missileTrail, "missileTrail" + m, m + _root.missileDepthMin);
_root["missileTrail" + m]._rotation = _rotation;
_root["missileTrail" + m]._x = _x;
_root["missileTrail" + m]._y = _y;
_root["missileTrail" + m].gotoAndPlay(2);
m++;
if ((m + _root.missileDepthMin) >= _root.missileDepthMax) {
m = 0;
}
}
_x = (_x + (Math.sin(Angle) * speed));
_y = (_y - (Math.cos(Angle) * speed));
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist > 650) {
this.removeMovieClip();
_root.removeBullet(_name);
}
}
}
}
Instance of Symbol 378 MovieClip "e1Bullet" in Frame 61
onClipEvent (load) {
if (_name == "e1Bullet") {
_visible = false;
} else {
speed = 10;
distance = 450;
Angle = _rotation * (Math.PI/180);
}
}
onClipEvent (enterFrame) {
if (!_root.GamePause) {
if (dist > distance) {
this.removeMovieClip();
}
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (((_name != "e1Bullet") && (dist < distance)) && (_root.GameStarted)) {
_x = (_x + (Math.sin(Angle) * speed));
_y = (_y - (Math.cos(Angle) * speed));
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]])) {
_root[_root.stuff[i]] = _root[_root.stuff[i]] - (_root.enemy1Damage / _root[_root.stuff[i]].defence);
this.removeMovieClip();
}
}
if (_root.tank.hitTest(_x, _y, true)) {
_root.health = _root.health - ((_root.enemy1Damage / _root.armor) * (_root.tankStat == "normal"));
this.removeMovieClip();
}
}
}
}
Instance of Symbol 382 MovieClip "Smoke" in Frame 61
onClipEvent (load) {
if (_name == "Smoke") {
_visible = false;
} else {
gotoAndStop(random(_totalframes - 1) + 1 +58);
radius = 30;
_x = _root.tank._x;
_y = _root.tank._y;
var rotationSpeed = (random(3) - 1);
_rotation = random(360);
_width = (_width * ((Math.random() * 0.5) + 0.9));
_height = (_height * ((Math.random() * 0.5) + 0.9));
_alpha = ((Math.random() * 10) + 35);
Angle = _root.tank._rotation * (Math.PI/180);
_x = (_x + (Math.sin(Angle) * (-radius)));
_y = (_y - (Math.cos(Angle) * (-radius)));
var blur = (new flash.filters.BlurFilter(random(4) + 2, random(4) + 2, 2));
filters = [blur];
}
}
onClipEvent (enterFrame) {
if ((!_root.GamePause) && (_root.GameStarted)) {
if (_name != "Smoke") {
_alpha = (_alpha - 3);
_width = (_width - 0.5);
_height = _width;
_rotation = (_rotation + rotationSpeed);
}
} else {
removeMovieClip(this);
}
if ((_alpha <= 0) || (_root.health <= 0)) {
this.removeMovieClip();
}
}
Instance of Symbol 391 MovieClip "invinciblePowerup" in Frame 61
onClipEvent (load) {
if (_name == "invinciblePowerup") {
stop();
_visible = false;
} else {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
}
}
onClipEvent (enterFrame) {
if (((_root.invincibleTimer <= 0) && (_root.tankStat == "invincible")) && (!_visible)) {
_root.tankStat = "normal";
_root.tank.gotoAndStop("normal");
_root.turret.gotoAndStop("normal");
_root.tankColorTrans.rgb = _root.tankColorHexa;
_root.tankTrans.colorTransform = _root.tankColorTrans;
_root.turretColorTrans.rgb = _root.tankColorHexa;
_root.turretTrans.colorTransform = _root.turretColorTrans;
this.removeMovieClip();
}
}
Instance of Symbol 412 MovieClip "Cannon1" in Frame 61
onClipEvent (load) {
if (_name == "Cannon1") {
_visible = false;
} else {
_root.stuff.push(_name);
_visible = false;
var hitTank = false;
var reloadSpeed = 0.02;
var reloaded = 1;
var healthBarLengthPercent = (healthBar.meter._width / 100);
var health = 100;
var defence = 1.5;
var killMoney = 20;
var combo = 10;
var radius = 15;
var range1 = 300;
var distance = 600;
var collisiondamage = 20;
var notHittest = 0;
var xDif;
var yDif;
var dist;
var xDif2;
var yDif2;
var dist2;
var inRange = false;
var placed = false;
var hit = false;
}
}
onClipEvent (enterFrame) {
if (_name != "Cannon1") {
while (!placed) {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist > distance) {
hit = false;
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]]) && (_root.stuff[i] != _name)) {
hit = true;
break;
}
}
if (!hit) {
placed = true;
var left = this.hitarea.getBounds(_root).xMin;
var right = this.hitarea.getBounds(_root).xMax;
var top = this.hitarea.getBounds(_root).yMin;
var bottom = this.hitarea.getBounds(_root).yMax;
}
}
}
if (((!_root.GamePause) && (_currentframe == 1)) && (_root.GameStarted)) {
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (reloaded < 1) {
reloaded = reloaded + reloadSpeed;
}
if (dist > distance) {
_visible = false;
if (inRange) {
inRange = false;
}
} else {
for (var b in _root.bullets) {
var currBullet = _root[_root.bullets[b]];
if (hitTest(currBullet)) {
if (currBullet._name.indexOf("Missile") != -1) {
health = health - ((_root.missileDamage * _root.damageMultiplier) / defence);
} else {
health = health - ((_root.mgDamage * _root.damageMultiplier) / defence);
}
_root.removeBullet(_root.bullets[b]);
break;
}
}
if (!inRange) {
inRange = true;
}
if (!_visible) {
_visible = true;
}
if ((dist < range1) && (reloaded >= 1)) {
reloaded = 0;
duplicateMovieClip (_root.c1Bullet, "c1Bullet" + _root.eBulletDepthVariable, _root.eBulletDepthVariable + _root.eBulletDepthMin);
_root["c1Bullet" + _root.eBulletDepthVariable]._x = _x;
_root["c1Bullet" + _root.eBulletDepthVariable]._y = _y;
_root["c1Bullet" + _root.eBulletDepthVariable]._rotation = myDegrees;
Angle2 = (myDegrees + 90) * (Math.PI/180);
_root["c1Bullet" + _root.eBulletDepthVariable]._x = (Math.cos(Angle2) * (-radius)) + _x;
_root["c1Bullet" + _root.eBulletDepthVariable]._y = (Math.sin(Angle2) * (-radius)) + _y;
_root.eBulletDepthVariable++;
if ((_root.eBulletDepthVariable + _root.eBulletDepthMin) > _root.eBulletDepthMax) {
_root.eBulletDepthVariable = 0;
}
}
myRadians = Math.atan2(_root.tank._y - _y, _root.tank._x - _x);
myDegrees = Math.round((myRadians * 180) / Math.PI) + 90;
if (_root.tank.hitTest(this)) {
var k = left;
while (k < right) {
if ((_root.tank.hitTest(k, top, true) || (_root.tank.hitTest(k, bottom, true))) && (!hitTank)) {
if (Math.abs(_root.tank.speed) < 2) {
_root.tank.speed = _root.tank.speed * -2;
_root.health = _root.health - ((5 * (_root.tankStat != "invincible")) / _root.armor);
health = health - 10;
} else {
_root.tank.speed = _root.tank.speed * 0.5;
health = 0;
_root.health = _root.health - ((40 * (_root.tankStat != "invincible")) / _root.armor);
hitTank = true;
}
break;
}
k = k + 10;
}
if (!hitTank) {
var l = top;
while (l < bottom) {
if (_root.tank.hitTest(left, l, true) || (_root.tank.hitTest(right, l, true))) {
if (Math.abs(_root.tank.speed) < 2) {
_root.tank.speed = _root.tank.speed * -2;
_root.health = _root.health - ((5 * (_root.tankStat != "invincible")) / _root.armor);
health = health - 10;
} else {
health = 0;
_root.tank.speed = _root.tank.speed * 0.5;
_root.health = _root.health - ((40 * (_root.tankStat != "invincible")) / _root.armor);
hitTank = true;
}
break;
}
l = l + 10;
}
}
hitTank = false;
}
if (health <= 0) {
_root.removeEnemy(_name);
_root.combo = _root.combo + combo;
_root.totalEnemies--;
_root.requiredEnemies--;
gotoAndPlay ("dead");
}
xDif2 = _x - _root._xmouse;
yDif2 = _y - _root._ymouse;
dist2 = Math.sqrt((xDif2 * xDif2) + (yDif2 * yDif2));
if (dist2 < _root.mouseDist) {
healthBar._alpha = 100;
} else {
healthBar._alpha = (_root.mouseDist * 100) / dist2;
}
healthBar.meter._width = healthBarLengthPercent * health;
}
}
}
}
Instance of Symbol 414 MovieClip "Mine" in Frame 61
onClipEvent (load) {
if (_name == "Mine") {
_visible = false;
} else {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
range = 50;
distance = 600;
var placed = false;
}
}
onClipEvent (enterFrame) {
if (_name != "Mine") {
while (!placed) {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
if (!this.hitTest(_root.tank)) {
hit = false;
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]]) && (_root.stuff[i] != _name)) {
hit = true;
break;
}
}
if (!hit) {
placed = true;
}
}
}
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if ((dist < distance) && (_root.enemy1s > 0)) {
e = 0;
while (e < _root.enemy1s) {
enemy1 = _root["Enemy1" + e];
if (hitTest(enemy1) && (enemy1._currentframe == 1)) {
swapDepths(enemy1);
gotoAndPlay ("explode");
enemy1.health = 0;
}
e++;
}
}
if ((dist < range) && (_currentframe == 1)) {
_root.health = _root.health - ((_root.mineDamage * (_root.tankStat == "normal")) / _root.armor);
gotoAndPlay ("explode");
}
}
}
Instance of Symbol 419 MovieClip "healthPowerup" in Frame 61
onClipEvent (load) {
if (_name == "healthPowerup") {
stop();
_visible = false;
} else {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
}
}
Instance of Symbol 378 MovieClip "c1Bullet" in Frame 61
onClipEvent (load) {
if (_name == "c1Bullet") {
_visible = false;
} else {
var speed = 10;
var Angle = (_rotation * (Math.PI/180));
var distance = 600;
}
}
onClipEvent (enterFrame) {
if (_name != "c1Bullet") {
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist > distance) {
this.removeMovieClip();
}
if ((!_root.GamePause) && (_root.GameStarted)) {
_x = (_x + (Math.sin(Angle) * speed));
_y = (_y - (Math.cos(Angle) * speed));
if ((_root.tank.hitTest(_x, _y, true) && (_root.tankStat == "normal")) && (_currentframe == 1)) {
_root.health = _root.health - (_root.cannon1Damage / _root.armor);
gotoAndPlay ("hit");
} else if (_root.tank.hitTest(_x, _y, true) && (_root.tankStat == "invincible")) {
this.unloadMovie();
}
}
}
}
Instance of Symbol 426 MovieClip "moneyPowerup" in Frame 61
onClipEvent (load) {
if (_name == "moneyPowerup") {
stop();
_visible = false;
} else {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
}
}
Instance of Symbol 430 MovieClip "extralifePowerup" in Frame 61
onClipEvent (load) {
if (_name == "extralifePowerup") {
stop();
_visible = false;
} else {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
}
}
Instance of Symbol 435 MovieClip "timePowerup" in Frame 61
onClipEvent (load) {
if (_name == "timePowerup") {
stop();
_visible = false;
} else {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
}
}
Instance of Symbol 376 MovieClip in Frame 61
onClipEvent (load) {
_visible = false;
boolean = false;
distance = 650;
swapDepths(_root.missileOfDoomDepth);
}
onClipEvent (enterFrame) {
if ((!_root.GamePause) && (_root.GameStarted)) {
if ((_root.outsideArenaTimer <= 0) && (!boolean)) {
speed = _root.maxSpeed + 15;
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
while (dist < distance) {
_x = ((random(1600) - 800) + _root.tank._x);
_y = ((random(1600) - 800) + _root.tank._y);
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
}
boolean = true;
_visible = true;
}
if (boolean && (_currentframe == 1)) {
myRadians = Math.atan2(_root.tank._y - _y, _root.tank._x - _x);
myDegrees = Math.round((myRadians * 180) / Math.PI) + 90;
_rotation = myDegrees;
Angle = _rotation * (Math.PI/180);
_x = (_x + (Math.sin(Angle) * speed));
_y = (_y - (Math.cos(Angle) * speed));
if (hitTest(_root.tank) && (_currentframe == 1)) {
_root.health = 0;
gotoAndPlay ("explode");
}
}
}
}
Instance of Symbol 438 MovieClip "missileTrail" in Frame 61
onClipEvent (load) {
if (_name == "missileTrail") {
_visible = false;
stop();
}
}
Instance of Symbol 149 MovieClip "tank" in Frame 61
onClipEvent (load) {
_root.tankStat = "normal";
var wheelFilter;
_x = 0;
_y = 0;
_root._x = _x + (Stage.width / 2);
_root._y = _y + (Stage.height / 2);
_root.turret._y = _y;
_root.turret._x = _x;
var b = 0;
var m = 20;
var t = 0;
var speed = 0;
var kickback = 0;
var friction = 0.95;
var machineGunReload = 1;
var missileReload = 1;
var missileMeterWidth = _root.hud.missileMeter._width;
var healthBarWidth = (_root.hud.healthBar._width / 100);
var trackSpeed = 2;
swapDepths(_root.tankDepth);
}
onClipEvent (enterFrame) {
if ((_root.health <= 0) && (_root.pauseMenu._currentframe == 1)) {
_root.hudMessage = " ";
_root.hud._visible = false;
delete _root.onEnterFrame;
_root.pauseMenu._x = (-_root._x) + (Stage.width / 2);
_root.pauseMenu._y = (-_root._y) + (Stage.height / 2);
_root.pauseMenu.swapDepths(_root.getNextHighestDepth());
_root.pauseMenu.gotoAndPlay("dead");
}
if (((!_root.GamePause) && (_root.GameStarted)) && (_root.health > 0)) {
if (_root.tankStat == "normal") {
gotoAndStop ("normal");
_root.turret.gotoAndStop("normal");
} else if ((_root.tankStat == "invincible") && (_currentframe == 1)) {
gotoAndPlay ("invincible");
_root.turret.gotoAndPlay("invincible");
}
if (_root.tankStat == "invincible") {
_root.invincibleTimer--;
}
_root.powerUpTimer++;
_root.mainTimer--;
_root.mainTimerRounded = Math.ceil(_root.mainTimer / _root.FPS);
if ((((_x < ((-_root.battleArenaWidth) / 2)) || (_x > (_root.battleArenaWidth / 2))) || (_y < ((-_root.battleArenaHeight) / 2))) || (_y > (_root.battleArenaHeight / 2))) {
outsideArena = true;
} else if (outsideArena) {
outsideArena = false;
}
if (outsideArena) {
_root.outsideArenaTimer--;
}
if (outsideArena && (_root.outsideArenaTimer > 0)) {
_root.hudMessage = "Cowards will be executed!\n" + Math.ceil(_root.outsideArenaTimer / _root.FPS);
} else if (outsideArena) {
_root.hudMessage = "I warned you!";
} else {
_root.outsideArenaTimer = 3 * _root.FPS;
if (_root.requiredEnemies > 0) {
_root.hudMessage = " ";
} else {
_root.hudMessage = "Mission Accomplished!\nPress Enter to continue";
}
}
if (Key.isDown(32)) {
if ((missileReload >= 1) && (_root.missiles >= 1)) {
_root.missileSound.start(0, 1);
missileReload = 0;
_root.missiles--;
kickback = -1;
Angle2 = _root.turret._rotation * (Math.PI/180);
duplicateMovieClip (_root.Missile, "Missile" + m, m + _root.missileDepthMin);
m++;
if ((m + _root.missileDepthMin) >= _root.missileDepthMax) {
m = 0;
}
}
}
if (machineGunReload < 1) {
machineGunReload = machineGunReload + _root.fireRateMG;
}
if (missileReload < 1) {
missileReload = missileReload + _root.fireRateMissiles;
}
if (Key.isDown(87) && ((speed + _root.acceleration) < _root.maxSpeed)) {
speed = speed + _root.acceleration;
} else if (Key.isDown(87) && ((speed + _root.acceleration) > _root.maxSpeed)) {
speed = _root.maxSpeed;
} else if (Key.isDown(83) && ((speed - _root.acceleration) > ((-_root.maxSpeed) / 1.4))) {
speed = speed - _root.acceleration;
} else if (Key.isDown(83) && ((speed - _root.acceleration) < ((-_root.maxSpeed) / 1.4))) {
speed = (-_root.maxSpeed) / 1.4;
} else {
speed = speed * friction;
if ((speed < 0.2) && (speed > -0.2)) {
speed = 0;
}
}
kickback = kickback * 0.9;
if ((kickback < 0.2) && (kickback > -0.2)) {
kickback = 0;
}
_rotation = (_rotation + ((Key.isDown(68) - Key.isDown(65)) * _root.turningSpeed));
Angle = _rotation * (Math.PI/180);
_x = (_x + (Math.sin(Angle) * speed));
_y = (_y - (Math.cos(Angle) * speed));
_x = (_x + (Math.sin(Angle2) * kickback));
_y = (_y - (Math.cos(Angle2) * kickback));
_root._x = Math.round(((-_x) + ((_x - _root._xmouse) / 5)) + (Stage.width / 2));
_root._y = Math.round(((-_y) + ((_y - _root._ymouse) / 5)) + (Stage.height / 2));
_root.hud._x = (-_root._x) + (Stage.width / 2);
_root.hud._y = (-_root._y) + (Stage.height / 2);
if (speed != 0) {
wheelFilter = new flash.filters.BlurFilter(Math.abs(speed / 3), Math.abs(speed / 3));
left_wheel.filters = (right_wheel.filters = [wheelFilter]);
}
leftspeed = (speed != 0) * Math.round(left_wheel._currentframe + speed);
rightspeed = (speed != 0) * Math.round(right_wheel._currentframe + speed);
rotationleft = (speed == 0) * Math.round((left_wheel._currentframe = left_wheel._currentframe + (((Key.isDown(68) - Key.isDown(65)) * _root.turningSpeed) / 2.5)));
rotationright = (speed == 0) * Math.round((right_wheel._currentframe = right_wheel._currentframe - (((Key.isDown(68) - Key.isDown(65)) * _root.turningSpeed) / 2.5)));
if (leftspeed > left_wheel._totalframes) {
left_wheel.gotoAndStop(leftspeed - left_wheel._totalframes);
left_wheel.filters = wheelFilter;
} else if (leftspeed < 0) {
left_wheel.gotoAndStop((left_wheel._currentframe + left_wheel._totalframes) - leftspeed);
left_wheel.filters = wheelFilter;
} else {
left_wheel.gotoAndStop(leftspeed);
}
if (rightspeed > right_wheel._totalframes) {
right_wheel.gotoAndStop(rightspeed - right_wheel._totalframes);
} else if (rightspeed < 0) {
right_wheel.gotoAndStop((right_wheel._currentframe + right_wheel._totalframes) - rightspeed);
} else if (rightspeed != 0) {
right_wheel.gotoAndStop(rightspeed);
}
if ((rotationleft > left_wheel._totalframes) && (leftspeed == 0)) {
left_wheel.gotoAndStop(rotationleft - left_wheel._totalframes);
} else if ((rotationleft <= 0) && (leftspeed == 0)) {
left_wheel.gotoAndStop((left_wheel._currentframe + left_wheel._totalframes) - rotationleft);
} else if (leftspeed == 0) {
left_wheel.gotoAndStop(rotationleft);
}
if ((rotationright > right_wheel._totalframes) && (rightspeed == 0)) {
right_wheel.gotoAndStop(rotationright - right_wheel._totalframes);
} else if ((rotationright <= 0) && (rightspeed == 0)) {
right_wheel.gotoAndStop((right_wheel._currentframe + right_wheel._totalframes) - rotationright);
} else if (rightspeed == 0) {
right_wheel.gotoAndStop(rotationright);
}
}
if (_root.health > 100) {
_root.health = 100;
} else if (_root.health < 30) {
if (random(3) == 0) {
duplicateMovieClip (_root.Smoke, "Smoke" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
}
}
_root.turret._y = _y;
_root.turret._x = _x;
}
Instance of Symbol 165 MovieClip "turret" in Frame 61
onClipEvent (load) {
swapDepths(_root.turretDepth);
}
onClipEvent (enterFrame) {
if (((!_root.GamePause) && (_root.GameStarted)) && (_root.health > 0)) {
myRadians = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
myDegrees = Math.round((myRadians * 180) / Math.PI) + 90;
_rotation = myDegrees;
}
if (_root.health < 0) {
_x = _root.tank._x;
_y = _root.tank._y;
}
}
Instance of Symbol 443 MovieClip "missilePowerup" in Frame 61
onClipEvent (load) {
if (_name == "missilePowerup") {
stop();
_visible = false;
} else {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
}
}
Instance of Symbol 449 MovieClip "comboPowerup" in Frame 61
onClipEvent (load) {
if (_name == "comboPowerup") {
stop();
_visible = false;
} else {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
}
}
Instance of Symbol 458 MovieClip "Enemy1" in Frame 61
onClipEvent (load) {
if (_name == "Enemy1") {
_visible = false;
} else {
_root.stuff.push(_name);
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
var speed = ((Math.random() * 0.5) + 0.7);
var reloadSpeed = 0.03;
var reloaded = 1;
var radius = 18;
var healthBarLengthPercent = (healthBar.meter._width / 100);
var health = 100;
var defence = 1;
var killMoney = 15;
var combo = 8;
var distance = 600;
var range1 = ((Math.random() * 50) + 160);
var range2 = ((Math.random() * 30) + 300);
var range3 = ((Math.random() * 30) + 40);
var inRange = false;
var xDif;
var yDif;
var dist;
var xDif2;
var yDif2;
var dist2;
var placed = false;
}
}
onClipEvent (enterFrame) {
if (_name != "Enemy1") {
while (!placed) {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist > distance) {
hit = false;
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]]) && (_root.stuff[i] != _name)) {
hit = true;
break;
}
}
if (!hit) {
placed = true;
}
}
}
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist < distance) {
if (!inRange) {
inRange = true;
}
} else if (inRange) {
inRange = false;
}
if ((((!_root.GamePause) && (_currentframe == 1)) && (_root.GameStarted)) && (dist < distance)) {
for (var b in _root.bullets) {
var currBullet = _root[_root.bullets[b]];
if (hitTest(currBullet)) {
if (currBullet._name.indexOf("Missile") != -1) {
health = health - ((_root.missileDamage * _root.damageMultiplier) / defence);
} else {
health = health - ((_root.mgDamage * _root.damageMultiplier) / defence);
}
_root.removeBullet(_root.bullets[b]);
break;
}
}
myRadians = Math.atan2(_root.tank._y - _y, _root.tank._x - _x);
myDegrees = Math.round((myRadians * 180) / Math.PI) + 90;
if (reloaded < 1) {
reloaded = reloaded + reloadSpeed;
}
if ((dist > range1) && (dist < range2)) {
if (_root.tank._x > _x) {
_x = (_x + speed);
} else if (_root.tank._x < _x) {
_x = (_x - speed);
}
if (_root.tank._y > _y) {
_y = (_y + speed);
} else if (_root.tank._y < _y) {
_y = (_y - speed);
}
}
if ((dist < (range1 + range3)) && (health > 0)) {
Enemy12.gotoAndStop("shooting");
} else if (health > 0) {
Enemy12.gotoAndStop("walking");
}
if ((dist < (range1 + range3)) && (reloaded >= 1)) {
Enemy12.gun.gotoAndPlay("fire");
duplicateMovieClip (_root.e1Bullet, "e1Bullet" + _root.eBulletDepthVariable, _root.eBulletDepthVariable + _root.eBulletDepthMin);
_root["e1Bullet" + _root.eBulletDepthVariable]._x = _x;
_root["e1Bullet" + _root.eBulletDepthVariable]._y = _y;
_root["e1Bullet" + _root.eBulletDepthVariable]._rotation = myDegrees;
Angle2 = (myDegrees + 110) * (Math.PI/180);
_root["e1Bullet" + _root.eBulletDepthVariable]._x = (Math.cos(Angle2) * (-radius)) + _x;
_root["e1Bullet" + _root.eBulletDepthVariable]._y = (Math.sin(Angle2) * (-radius)) + _y;
_root.eBulletDepthVariable++;
if ((_root.eBulletDepthVariable + _root.eBulletDepthMin) > _root.eBulletDepthMax) {
_root.eBulletDepthVariable = 0;
}
reloaded = 0;
}
healthBar.meter._width = healthBarLengthPercent * health;
if (health <= 0) {
_root.removeEnemy(_name);
_root.combo = _root.combo + combo;
_root.totalEnemies--;
_root.requiredEnemies--;
gotoAndPlay ("dead");
}
xDif2 = _x - _root._xmouse;
yDif2 = _y - _root._ymouse;
dist2 = Math.sqrt((xDif2 * xDif2) + (yDif2 * yDif2));
if (dist2 < _root.mouseDist) {
healthBar._alpha = 100;
} else {
healthBar._alpha = (_root.mouseDist * 100) / dist2;
}
}
}
}
Instance of Symbol 460 MovieClip "Swamp" in Frame 61
onClipEvent (load) {
if (_name == "Swamp") {
_visible = false;
} else {
_root.stuff.push(_name);
_yscale = (random(30) + 70);
_xscale = (random(30) + 70);
_rotation = random(360);
var hittank = false;
var placed = false;
this.swapDepths(2);
var counter = 0;
var maxSpeedTemp;
}
}
onClipEvent (enterFrame) {
if (_name != "Swamp") {
while (!placed) {
counter++;
if (counter > 35) {
removeMovieClip(this);
}
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
if (!hitTest(_root.tank._x, _root.tank._y, true)) {
hit = false;
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]]) && (_root.stuff[i] != _name)) {
hit = true;
break;
}
}
if (!hit) {
placed = true;
}
}
}
if (hitTest(_root.tank._x, _root.tank._y, true) && (!hittank)) {
hittank = true;
maxSpeedTemp = _root.maxSpeed;
_root.maxSpeed = _root.maxSpeed * 0.65;
} else if ((!hitTest(_root.tank._x, _root.tank._y, true)) && (hittank)) {
hittank = false;
_root.maxSpeed = maxSpeedTemp;
}
}
}
Instance of Symbol 463 MovieClip "Enemy2" in Frame 61
onClipEvent (load) {
if (_name == "Enemy2") {
_visible = false;
} else {
_root.stuff.push(_name);
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
var speed = ((Math.random() * 0.6) + 0.8);
var reloadSpeed = 0.05;
var reloaded = 1;
var radius = 18;
var healthBarLengthPercent = (healthBar.meter._width / 100);
var health = 100;
var defence = 2.5;
var killMoney = 30;
var combo = 18;
var distance = 600;
var range1 = ((Math.random() * 60) + 200);
var range2 = ((Math.random() * 50) + 350);
var range3 = ((Math.random() * 40) + 60);
var inRange = false;
var xDif;
var yDif;
var dist;
var xDif2;
var yDif2;
var dist2;
var placed = false;
}
}
onClipEvent (enterFrame) {
if (_name != "Enemy2") {
while (!placed) {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist > distance) {
hit = false;
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]]) && (_root.stuff[i] != _name)) {
hit = true;
break;
}
}
if (!hit) {
placed = true;
}
}
}
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist < distance) {
if (!inRange) {
inRange = true;
}
} else if (inRange) {
inRange = false;
}
if ((((!_root.GamePause) && (_currentframe == 1)) && (_root.GameStarted)) && (dist < distance)) {
for (var b in _root.bullets) {
var currBullet = _root[_root.bullets[b]];
if (hitTest(currBullet)) {
if (currBullet._name.indexOf("Missile") != -1) {
health = health - ((_root.missileDamage * _root.damageMultiplier) / defence);
} else {
health = health - ((_root.mgDamage * _root.damageMultiplier) / defence);
}
_root.removeBullet(_root.bullets[b]);
break;
}
}
myRadians = Math.atan2(_root.tank._y - _y, _root.tank._x - _x);
myDegrees = Math.round((myRadians * 180) / Math.PI) + 90;
if (reloaded < 1) {
reloaded = reloaded + reloadSpeed;
}
if ((dist > range1) && (dist < range2)) {
if (_root.tank._x > _x) {
_x = (_x + speed);
} else if (_root.tank._x < _x) {
_x = (_x - speed);
}
if (_root.tank._y > _y) {
_y = (_y + speed);
} else if (_root.tank._y < _y) {
_y = (_y - speed);
}
}
if ((dist < (range1 + range3)) && (health > 0)) {
Enemy12.gotoAndStop("shooting");
} else if (health > 0) {
Enemy12.gotoAndStop("walking");
}
if ((dist < (range1 + range3)) && (reloaded >= 1)) {
Enemy12.gun.gotoAndPlay("fire");
duplicateMovieClip (_root.e1Bullet, "e1Bullet" + _root.eBulletDepthVariable, _root.eBulletDepthVariable + _root.eBulletDepthMin);
_root["e1Bullet" + _root.eBulletDepthVariable]._x = _x;
_root["e1Bullet" + _root.eBulletDepthVariable]._y = _y;
_root["e1Bullet" + _root.eBulletDepthVariable]._rotation = myDegrees;
Angle2 = (myDegrees + 110) * (Math.PI/180);
_root["e1Bullet" + _root.eBulletDepthVariable]._x = (Math.cos(Angle2) * (-radius)) + _x;
_root["e1Bullet" + _root.eBulletDepthVariable]._y = (Math.sin(Angle2) * (-radius)) + _y;
_root.eBulletDepthVariable++;
if ((_root.eBulletDepthVariable + _root.eBulletDepthMin) > _root.eBulletDepthMax) {
_root.eBulletDepthVariable = 0;
}
reloaded = 0;
}
healthBar.meter._width = healthBarLengthPercent * health;
if (health <= 0) {
_root.removeEnemy(_name);
_root.combo = _root.combo + combo;
_root.totalEnemies--;
_root.requiredEnemies--;
gotoAndPlay ("dead");
}
xDif2 = _x - _root._xmouse;
yDif2 = _y - _root._ymouse;
dist2 = Math.sqrt((xDif2 * xDif2) + (yDif2 * yDif2));
if (dist2 < _root.mouseDist) {
healthBar._alpha = 100;
} else {
healthBar._alpha = (_root.mouseDist * 100) / dist2;
}
}
}
}
Instance of Symbol 466 MovieClip "Enemy3" in Frame 61
onClipEvent (load) {
if (_name == "Enemy3") {
_visible = false;
} else {
_root.stuff.push(_name);
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
var speed = (Math.random() + 0.8);
var reloadSpeed = 0.08;
var reloaded = 1;
var radius = 18;
var healthBarLengthPercent = (healthBar.meter._width / 100);
var health = 100;
var defence = 6;
var killMoney = 70;
var combo = 40;
var distance = 600;
var range1 = ((Math.random() * 50) + 300);
var range2 = ((Math.random() * 30) + 500);
var range3 = ((Math.random() * 50) + 100);
var inRange = false;
var xDif;
var yDif;
var dist;
var xDif2;
var yDif2;
var dist2;
var placed = false;
}
}
onClipEvent (enterFrame) {
if (_name != "Enemy3") {
while (!placed) {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist > distance) {
hit = false;
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]]) && (_root.stuff[i] != _name)) {
hit = true;
break;
}
}
if (!hit) {
placed = true;
}
}
}
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist < distance) {
if (!inRange) {
inRange = true;
}
} else if (inRange) {
inRange = false;
}
if ((((!_root.GamePause) && (_currentframe == 1)) && (_root.GameStarted)) && (dist < distance)) {
for (var b in _root.bullets) {
var currBullet = _root[_root.bullets[b]];
if (hitTest(currBullet)) {
if (currBullet._name.indexOf("Missile") != -1) {
health = health - ((_root.missileDamage * _root.damageMultiplier) / defence);
} else {
health = health - ((_root.mgDamage * _root.damageMultiplier) / defence);
}
_root.removeBullet(_root.bullets[b]);
break;
}
}
myRadians = Math.atan2(_root.tank._y - _y, _root.tank._x - _x);
myDegrees = Math.round((myRadians * 180) / Math.PI) + 90;
if (reloaded < 1) {
reloaded = reloaded + reloadSpeed;
}
if ((dist > range1) && (dist < range2)) {
if (_root.tank._x > _x) {
_x = (_x + speed);
} else if (_root.tank._x < _x) {
_x = (_x - speed);
}
if (_root.tank._y > _y) {
_y = (_y + speed);
} else if (_root.tank._y < _y) {
_y = (_y - speed);
}
}
if ((dist < (range1 + range3)) && (health > 0)) {
Enemy12.gotoAndStop("shooting");
} else if (health > 0) {
Enemy12.gotoAndStop("walking");
}
if ((dist < (range1 + range3)) && (reloaded >= 1)) {
Enemy12.gun.gotoAndPlay("fire");
duplicateMovieClip (_root.e1Bullet, "e1Bullet" + _root.eBulletDepthVariable, _root.eBulletDepthVariable + _root.eBulletDepthMin);
_root["e1Bullet" + _root.eBulletDepthVariable]._x = _x;
_root["e1Bullet" + _root.eBulletDepthVariable]._y = _y;
_root["e1Bullet" + _root.eBulletDepthVariable]._rotation = myDegrees;
Angle2 = (myDegrees + 110) * (Math.PI/180);
_root["e1Bullet" + _root.eBulletDepthVariable]._x = (Math.cos(Angle2) * (-radius)) + _x;
_root["e1Bullet" + _root.eBulletDepthVariable]._y = (Math.sin(Angle2) * (-radius)) + _y;
_root.eBulletDepthVariable++;
if ((_root.eBulletDepthVariable + _root.eBulletDepthMin) > _root.eBulletDepthMax) {
_root.eBulletDepthVariable = 0;
}
reloaded = 0;
}
healthBar.meter._width = healthBarLengthPercent * health;
if (health <= 0) {
_root.removeEnemy(_name);
_root.combo = _root.combo + combo;
_root.totalEnemies--;
_root.requiredEnemies--;
gotoAndPlay ("dead");
}
xDif2 = _x - _root._xmouse;
yDif2 = _y - _root._ymouse;
dist2 = Math.sqrt((xDif2 * xDif2) + (yDif2 * yDif2));
if (dist2 < _root.mouseDist) {
healthBar._alpha = 100;
} else {
healthBar._alpha = (_root.mouseDist * 100) / dist2;
}
}
}
}
Instance of Symbol 467 MovieClip "Cannon2" in Frame 61
onClipEvent (load) {
if (_name == "Cannon2") {
_visible = false;
} else {
_root.stuff.push(_name);
_visible = false;
var hitTank = false;
var reloadSpeed = 0.04;
var reloaded = 1;
var healthBarLengthPercent = (healthBar.meter._width / 100);
var health = 100;
var defence = 3;
var killMoney = 50;
var combo = 25;
var radius = 21;
var range1 = 400;
var distance = 600;
var collisiondamage = 20;
var notHittest = 0;
var xDif;
var yDif;
var dist;
var xDif2;
var yDif2;
var dist2;
var inRange = false;
var placed = false;
var hit = false;
}
}
onClipEvent (enterFrame) {
if (_name != "Cannon2") {
while (!placed) {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist > distance) {
hit = false;
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]]) && (_root.stuff[i] != _name)) {
hit = true;
break;
}
}
if (!hit) {
placed = true;
var left = this.hitarea.getBounds(_root).xMin;
var right = this.hitarea.getBounds(_root).xMax;
var top = this.hitarea.getBounds(_root).yMin;
var bottom = this.hitarea.getBounds(_root).yMax;
}
}
}
if (((!_root.GamePause) && (_currentframe == 1)) && (_root.GameStarted)) {
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (reloaded < 1) {
reloaded = reloaded + reloadSpeed;
}
if (dist > distance) {
_visible = false;
if (inRange) {
inRange = false;
}
} else {
for (var b in _root.bullets) {
var currBullet = _root[_root.bullets[b]];
if (hitTest(currBullet)) {
if (currBullet._name.indexOf("Missile") != -1) {
health = health - ((_root.missileDamage * _root.damageMultiplier) / defence);
} else {
health = health - ((_root.mgDamage * _root.damageMultiplier) / defence);
}
_root.removeBullet(_root.bullets[b]);
break;
}
}
if (!inRange) {
inRange = true;
}
if (!_visible) {
_visible = true;
}
if ((dist < range1) && (reloaded >= 1)) {
reloaded = 0;
duplicateMovieClip (_root.c1Bullet, "c1Bullet" + _root.eBulletDepthVariable, _root.eBulletDepthVariable + _root.eBulletDepthMin);
_root["c1Bullet" + _root.eBulletDepthVariable]._x = _x;
_root["c1Bullet" + _root.eBulletDepthVariable]._y = _y;
_root["c1Bullet" + _root.eBulletDepthVariable]._rotation = myDegrees;
Angle2 = (myDegrees + 90) * (Math.PI/180);
_root["c1Bullet" + _root.eBulletDepthVariable]._x = (Math.cos(Angle2) * (-radius)) + _x;
_root["c1Bullet" + _root.eBulletDepthVariable]._y = (Math.sin(Angle2) * (-radius)) + _y;
_root.eBulletDepthVariable++;
if ((_root.eBulletDepthVariable + _root.eBulletDepthMin) > _root.eBulletDepthMax) {
_root.eBulletDepthVariable = 0;
}
}
myRadians = Math.atan2(_root.tank._y - _y, _root.tank._x - _x);
myDegrees = Math.round((myRadians * 180) / Math.PI) + 90;
if (_root.tank.hitTest(this)) {
var k = left;
while (k < right) {
if ((_root.tank.hitTest(k, top, true) || (_root.tank.hitTest(k, bottom, true))) && (!hitTank)) {
if (Math.abs(_root.tank.speed) < 3) {
_root.tank.speed = _root.tank.speed * -2;
_root.health = _root.health - ((10 * (_root.tankStat != "invincible")) / _root.armor);
health = health - 10;
} else {
_root.tank.speed = _root.tank.speed * 0.5;
health = 0;
_root.health = _root.health - ((60 * (_root.tankStat != "invincible")) / _root.armor);
hitTank = true;
}
break;
}
k = k + 10;
}
if (!hitTank) {
var l = top;
while (l < bottom) {
if (_root.tank.hitTest(left, l, true) || (_root.tank.hitTest(right, l, true))) {
if (Math.abs(_root.tank.speed) < 3) {
_root.tank.speed = _root.tank.speed * -2;
_root.health = _root.health - ((10 * (_root.tankStat != "invincible")) / _root.armor);
health = health - 10;
} else {
health = 0;
_root.tank.speed = _root.tank.speed * 0.5;
_root.health = _root.health - ((60 * (_root.tankStat != "invincible")) / _root.armor);
hitTank = true;
}
break;
}
l = l + 10;
}
}
hitTank = false;
}
if (health <= 0) {
_root.removeEnemy(_name);
_root.combo = _root.combo + combo;
_root.totalEnemies--;
_root.requiredEnemies--;
gotoAndPlay ("dead");
}
xDif2 = _x - _root._xmouse;
yDif2 = _y - _root._ymouse;
dist2 = Math.sqrt((xDif2 * xDif2) + (yDif2 * yDif2));
if (dist2 < _root.mouseDist) {
healthBar._alpha = 100;
} else {
healthBar._alpha = (_root.mouseDist * 100) / dist2;
}
healthBar.meter._width = healthBarLengthPercent * health;
}
}
}
}
Instance of Symbol 468 MovieClip "Cannon3" in Frame 61
onClipEvent (load) {
if (_name == "Cannon3") {
_visible = false;
} else {
_root.stuff.push(_name);
_visible = false;
var hitTank = false;
var reloadSpeed = 0.06;
var reloaded = 1;
var healthBarLengthPercent = (healthBar.meter._width / 100);
var health = 100;
var defence = 5;
var killMoney = 100;
var combo = 50;
var radius = 26;
var range1 = 500;
var distance = 600;
var collisiondamage = 20;
var notHittest = 0;
var xDif;
var yDif;
var dist;
var xDif2;
var yDif2;
var dist2;
var inRange = false;
var placed = false;
var hit = false;
}
}
onClipEvent (enterFrame) {
if (_name != "Cannon3") {
while (!placed) {
_x = (random(_root.battleArenaWidth) - (_root.battleArenaWidth / 2));
_y = (random(_root.battleArenaHeight) - (_root.battleArenaHeight / 2));
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (dist > distance) {
hit = false;
for (i in _root.stuff) {
if (hitTest(_root[_root.stuff[i]]) && (_root.stuff[i] != _name)) {
hit = true;
break;
}
}
if (!hit) {
placed = true;
var left = this.hitarea.getBounds(_root).xMin;
var right = this.hitarea.getBounds(_root).xMax;
var top = this.hitarea.getBounds(_root).yMin;
var bottom = this.hitarea.getBounds(_root).yMax;
}
}
}
if (((!_root.GamePause) && (_currentframe == 1)) && (_root.GameStarted)) {
xDif = _x - _root.tank._x;
yDif = _y - _root.tank._y;
dist = Math.sqrt((xDif * xDif) + (yDif * yDif));
if (reloaded < 1) {
reloaded = reloaded + reloadSpeed;
}
if (dist > distance) {
_visible = false;
if (inRange) {
inRange = false;
}
} else {
for (var b in _root.bullets) {
var currBullet = _root[_root.bullets[b]];
if (hitTest(currBullet)) {
if (currBullet._name.indexOf("Missile") != -1) {
health = health - ((_root.missileDamage * _root.damageMultiplier) / defence);
} else {
health = health - ((_root.mgDamage * _root.damageMultiplier) / defence);
}
_root.removeBullet(_root.bullets[b]);
break;
}
}
if (!inRange) {
inRange = true;
}
if (!_visible) {
_visible = true;
}
if ((dist < range1) && (reloaded >= 1)) {
reloaded = 0;
duplicateMovieClip (_root.c1Bullet, "c1Bullet" + _root.eBulletDepthVariable, _root.eBulletDepthVariable + _root.eBulletDepthMin);
_root["c1Bullet" + _root.eBulletDepthVariable]._x = _x;
_root["c1Bullet" + _root.eBulletDepthVariable]._y = _y;
_root["c1Bullet" + _root.eBulletDepthVariable]._rotation = myDegrees;
Angle2 = (myDegrees + 90) * (Math.PI/180);
_root["c1Bullet" + _root.eBulletDepthVariable]._x = (Math.cos(Angle2) * (-radius)) + _x;
_root["c1Bullet" + _root.eBulletDepthVariable]._y = (Math.sin(Angle2) * (-radius)) + _y;
_root.eBulletDepthVariable++;
if ((_root.eBulletDepthVariable + _root.eBulletDepthMin) > _root.eBulletDepthMax) {
_root.eBulletDepthVariable = 0;
}
}
myRadians = Math.atan2(_root.tank._y - _y, _root.tank._x - _x);
myDegrees = Math.round((myRadians * 180) / Math.PI) + 90;
if (_root.tank.hitTest(this)) {
var k = left;
while (k < right) {
if ((_root.tank.hitTest(k, top, true) || (_root.tank.hitTest(k, bottom, true))) && (!hitTank)) {
if (Math.abs(_root.tank.speed) < 4) {
_root.tank.speed = _root.tank.speed * -2;
_root.health = _root.health - ((20 * (_root.tankStat != "invincible")) / _root.armor);
health = health - 10;
} else {
_root.tank.speed = _root.tank.speed * 0.5;
health = 0;
_root.health = _root.health - ((100 * (_root.tankStat != "invincible")) / _root.armor);
hitTank = true;
}
break;
}
k = k + 10;
}
if (!hitTank) {
var l = top;
while (l < bottom) {
if (_root.tank.hitTest(left, l, true) || (_root.tank.hitTest(right, l, true))) {
if (Math.abs(_root.tank.speed) < 4) {
_root.tank.speed = _root.tank.speed * -2;
_root.health = _root.health - ((20 * (_root.tankStat != "invincible")) / _root.armor);
health = health - 10;
} else {
health = 0;
_root.tank.speed = _root.tank.speed * 0.5;
_root.health = _root.health - ((100 * (_root.tankStat != "invincible")) / _root.armor);
hitTank = true;
}
break;
}
l = l + 10;
}
}
hitTank = false;
}
if (health <= 0) {
_root.removeEnemy(_name);
_root.combo = _root.combo + combo;
_root.totalEnemies--;
_root.requiredEnemies--;
gotoAndPlay ("dead");
}
xDif2 = _x - _root._xmouse;
yDif2 = _y - _root._ymouse;
dist2 = Math.sqrt((xDif2 * xDif2) + (yDif2 * yDif2));
if (dist2 < _root.mouseDist) {
healthBar._alpha = 100;
} else {
healthBar._alpha = (_root.mouseDist * 100) / dist2;
}
healthBar.meter._width = healthBarLengthPercent * health;
}
}
}
}
Instance of Symbol 535 MovieClip "pauseMenu" in Frame 61
onClipEvent (load) {
swapDepths(_root.getNextHighestDepth());
gotoAndPlay ("countdown");
}
Frame 62
_root.pauseMenu.removeMovieClip();
_root.levelVariables(_root.level);
_root.gotoAndStop("Game");
Frame 63
stop();
_root.pauseMenu.removeMovieClip();
_root.shopMessageOriginal = "Welcome to the shop!\nHere you can upgrade yout tank, paint it or unlock new crosshairs. You will see information about the products in this window.";
_root.shopMessage = _root.shopMessageOriginal;
_root.tankColorTemp = _root.tankColor;
var tankColorTrans = (new flash.geom.ColorTransform());
var tankTrans = (new flash.geom.Transform(_root.shopMC.tank.tankShadowed));
var turretColorTrans = (new flash.geom.ColorTransform());
var turretTrans = (new flash.geom.Transform(_root.shopMC.turret.turretShadowed));
this.onEnterFrame = function () {
_root.cash = "Cash: $" + _root.money;
_root.tankColorHexaTemp = "0x" + _root.tankColorTemp;
_root.tankColorTrans.rgb = _root.tankColorHexaTemp;
_root.tankTrans.colorTransform = _root.tankColorTrans;
_root.turretColorTrans.rgb = _root.tankColorHexaTemp;
_root.turretTrans.colorTransform = _root.turretColorTrans;
};
Instance of Symbol 26 MovieClip in Frame 63
on (release) {
getURL ("http://www.maxgames.com", _blank);
}
Symbol 24 MovieClip Frame 1
stop();
Symbol 36 Button
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 39 MovieClip Frame 60
stop();
Symbol 52 MovieClip Frame 14
stop();
Symbol 53 MovieClip Frame 240
_parent.play();
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 9
stop();
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 9
stop();
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 9
stop();
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 9
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 9
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 29
gotoAndPlay ("invincible");
Symbol 155 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 29
gotoAndPlay ("invincible");
Symbol 171 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 9
stop();
Symbol 180 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 9
stop();
Symbol 184 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 9
stop();
Symbol 199 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 1
stop();
Instance of Symbol 184 MovieClip in Symbol 204 MovieClip Frame 2
onClipEvent (load) {
useHandCursor = false;
}
on (release) {
}
on (press) {
}
on (rollOver) {
}
on (rollOut) {
}
Instance of Symbol 199 MovieClip in Symbol 204 MovieClip Frame 2
on (release) {
_parent.gotoAndStop(1);
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Instance of Symbol 202 MovieClip in Symbol 204 MovieClip Frame 2
on (release) {
_parent._parent.savefile.clear();
_parent._parent.savefile.flush();
if (_root._currentframe == 2) {
_parent._parent._alpha = 80;
delete _parent._parent.bg.onRollOver;
delete _parent._parent.bg.onRollOut;
delete _parent._parent.bg.onPress;
}
_parent._parent._parent.selectedSlot = "";
_parent._parent.gotoAndStop(1);
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Instance of Symbol 199 MovieClip in Symbol 204 MovieClip Frame 3
on (release) {
_parent.gotoAndStop(1);
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Instance of Symbol 202 MovieClip in Symbol 204 MovieClip Frame 3
on (release) {
_parent._parent._parent.selectedSlotNum = _parent._parent._parent.selectedSlot.charAt(_parent._parent._parent.selectedSlot.length - 1);
_root.saveGame(_parent._parent._parent.selectedSlotNum);
_parent._parent.gotoAndStop(3);
_parent._parent.gotoAndStop(2);
_parent.gotoAndStop(1);
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 2
var playerName = savefile.data.playerName;
var level = savefile.data.level;
var cash = savefile.data.money;
var color = savefile.data.tankColor;
tankColorHexa = "0x" + color;
var tankColorTrans = (new flash.geom.ColorTransform());
var tankTrans = (new flash.geom.Transform(tank.tankShadowed));
var turretColorTrans = (new flash.geom.ColorTransform());
var turretTrans = (new flash.geom.Transform(turret.turretShadowed));
tankColorTrans.rgb = tankColorHexa;
tankTrans.colorTransform = tankColorTrans;
turretColorTrans.rgb = tankColorHexa;
turretTrans.colorTransform = turretColorTrans;
Instance of Symbol 194 MovieClip in Symbol 205 MovieClip Frame 2
on (rollOver) {
this.gotoAndPlay("rollover");
}
on (rollOut) {
this.gotoAndPlay("rollout");
}
on (release) {
if (_parent.clearMC._currentframe == 1) {
_parent.clearMC.gotoAndStop(2);
}
}
Symbol 205 MovieClip Frame 3
gotoAndStop (2);
Symbol 221 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 9
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 9
stop();
Symbol 279 MovieClip Frame 1
stop();
var tankColorHexa = ("0x" + _root.tankColor);
onEnterFrame = function () {
tankColorHexa = "0x" + _root.tankColor;
var _local2 = new flash.geom.ColorTransform();
var _local4 = new flash.geom.Transform(tank.tankShadowed);
var _local3 = new flash.geom.ColorTransform();
var _local5 = new flash.geom.Transform(turret.turretShadowed);
_local2.rgb = tankColorHexa;
_local4.colorTransform = _local2;
_local3.rgb = tankColorHexa;
_local5.colorTransform = _local3;
};
Instance of Symbol 105 MovieClip "original" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColor = "9C9C73";
}
Instance of Symbol 105 MovieClip "white" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColor = "FFFFFF";
}
Instance of Symbol 105 MovieClip "red" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColor = "FF0000";
}
Instance of Symbol 105 MovieClip "green" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColor = "009900";
}
Instance of Symbol 105 MovieClip "pimp" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColor = "A801A9";
}
Instance of Symbol 105 MovieClip "black" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColor = "000000";
}
Instance of Symbol 171 MovieClip in Symbol 279 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
if (_root.menuFade._currentframe == 25) {
_root.StartVariables();
_root.newGameVars();
_root.speedFunction();
_root.accelerationFunction();
_root.turningSpeedFunction();
_root.armorFunction();
_root.fireRateMGFunction();
_root.fireRateMissilesFunction();
_root.menuGoto = "Game";
_root.menuFade.gotoAndPlay("fadeOut");
}
}
Instance of Symbol 175 MovieClip in Symbol 279 MovieClip Frame 1
on (release) {
_parent._parent.contentGoTo = "none";
_parent._parent.gotoAndStop(1);
}
Symbol 279 MovieClip Frame 2
var selectedSlot = "";
var selectedSlotNum;
selectSlotTXT._visible = false;
Instance of Symbol 180 MovieClip in Symbol 279 MovieClip Frame 2
on (rollOver) {
this.gotoAndPlay("rollover");
}
on (rollOut) {
this.gotoAndPlay("rollout");
}
on (release) {
if (_parent.selectedSlot != "") {
_parent.selectedSlotNum = _parent.selectedSlot.charAt(_parent.selectedSlot.length - 1);
_root.loadGame(_parent.selectedSlotNum);
if (_root.menuFade._currentframe == 25) {
_root.StartVariables();
_root.speedFunction();
_root.accelerationFunction();
_root.turningSpeedFunction();
_root.armorFunction();
_root.fireRateMGFunction();
_root.fireRateMissilesFunction();
_root.menuGoto = "Shop";
_root.menuFade.gotoAndPlay("fadeOut");
}
} else {
_parent.selectSlotTXT._visible = true;
}
}
Instance of Symbol 205 MovieClip "TanksSlot1" in Symbol 279 MovieClip Frame 2
onClipEvent (load) {
var savefile = SharedObject.getLocal(_name);
if (savefile.data.playerName == undefined) {
_alpha = 80;
} else {
gotoAndStop (2);
bg.onRollOver = function () {
bg.gotoAndStop(2);
};
bg.onRollOut = function () {
if (_parent.selectedSlot != _name) {
bg.gotoAndStop(1);
}
};
bg.onPress = function () {
if (_parent.selectedSlot != _name) {
_parent.selectSlotTXT._visible = false;
_parent[_parent.selectedSlot].bg.gotoAndStop(1);
_parent.selectedSlot = _name;
}
};
}
}
Instance of Symbol 205 MovieClip "TanksSlot2" in Symbol 279 MovieClip Frame 2
onClipEvent (load) {
var savefile = SharedObject.getLocal(_name);
if (savefile.data.playerName == undefined) {
_alpha = 80;
} else {
gotoAndStop (2);
bg.onRollOver = function () {
bg.gotoAndStop(2);
};
bg.onRollOut = function () {
if (_parent.selectedSlot != _name) {
bg.gotoAndStop(1);
}
};
bg.onPress = function () {
if (_parent.selectedSlot != _name) {
_parent.selectSlotTXT._visible = false;
_parent[_parent.selectedSlot].bg.gotoAndStop(1);
_parent.selectedSlot = _name;
}
};
}
}
Instance of Symbol 205 MovieClip "TanksSlot3" in Symbol 279 MovieClip Frame 2
onClipEvent (load) {
var savefile = SharedObject.getLocal(_name);
if (savefile.data.playerName == undefined) {
_alpha = 80;
} else {
gotoAndStop (2);
bg.onRollOver = function () {
bg.gotoAndStop(2);
};
bg.onRollOut = function () {
if (_parent.selectedSlot != _name) {
bg.gotoAndStop(1);
}
};
bg.onPress = function () {
if (_parent.selectedSlot != _name) {
_parent.selectSlotTXT._visible = false;
_parent[_parent.selectedSlot].bg.gotoAndStop(1);
_parent.selectedSlot = _name;
}
};
}
}
Instance of Symbol 224 MovieClip "insFwd" in Symbol 279 MovieClip Frame 3
onClipEvent (enterFrame) {
useHandCursor = _alpha == 100;
}
on (rollOver) {
if (_alpha == 100) {
_yscale = 120;
_xscale = 120;
}
}
on (rollOut) {
_yscale = 100;
_xscale = 100;
}
on (release) {
if (_visible) {
_parent.instructionsMC.nextFrame();
_parent.insPages.text = (("Page " + _parent.instructionsMC._currentframe) + "/") + _parent.instructionsMC._totalframes;
_parent.insBack._alpha = 100;
if (_parent.instructionsMC._currentframe == _parent.instructionsMC._totalframes) {
_alpha = 50;
_yscale = 100;
_xscale = 100;
}
}
}
Instance of Symbol 224 MovieClip "insBack" in Symbol 279 MovieClip Frame 3
onClipEvent (load) {
_alpha = 50;
}
onClipEvent (enterFrame) {
useHandCursor = _alpha == 100;
}
on (rollOver) {
if (_alpha == 100) {
_yscale = 120;
_xscale = 120;
}
}
on (rollOut) {
_yscale = 100;
_xscale = 100;
}
on (release) {
if (_visible) {
_parent.instructionsMC.prevFrame();
_parent.insPages.text = (("Page " + _parent.instructionsMC._currentframe) + "/") + _parent.instructionsMC._totalframes;
_parent.insFwd._alpha = 100;
if (_parent.instructionsMC._currentframe == 1) {
_alpha = 50;
_yscale = 100;
_xscale = 100;
}
}
}
Symbol 279 MovieClip Frame 5
rankz_t10_send = new LoadVars();
rankz_t10_receive = new LoadVars();
rankz_t10_send.SU0249 = "MTk5NmolZSVhJW4lcw==";
rankz_t10_send.flashkey = "ZW1ORU1YSlE=";
rankz_t10_receive.onLoad = function (success) {
if (success) {
_rankz_ar_ = rankz_t10_receive.top10.split("<u/*/u>");
i = 0;
while (i < _rankz_ar_.length) {
tempv = _rankz_ar_[i].split("</*/>");
top10["rankz_n" + (i + 1)].text = tempv[0];
top10["rankz_v" + (i + 1)].text = tempv[1];
i++;
}
} else {
trace("ERROR");
}
};
rankz_t10_send.sendAndLoad("http://rankz.armorbot.com/get/top10.php", rankz_t10_receive, "POST");
Symbol 279 MovieClip Frame 6
var selectedSlot = "";
var selectedSlotNum;
selectSlotTXT._visible = false;
Instance of Symbol 205 MovieClip "TanksSlot1" in Symbol 279 MovieClip Frame 6
onClipEvent (load) {
var savefile = SharedObject.getLocal(_name);
if (savefile.data.playerName != undefined) {
gotoAndStop (2);
}
bg.onRollOver = function () {
bg.gotoAndStop(2);
};
bg.onRollOut = function () {
if (_parent.selectedSlot != _name) {
bg.gotoAndStop(1);
}
};
bg.onPress = function () {
if (_parent.selectedSlot != _name) {
_parent.selectSlotTXT._visible = false;
_parent[_parent.selectedSlot].bg.gotoAndStop(1);
_parent.selectedSlot = _name;
}
};
}
Instance of Symbol 205 MovieClip "TanksSlot2" in Symbol 279 MovieClip Frame 6
onClipEvent (load) {
var savefile = SharedObject.getLocal(_name);
if (savefile.data.playerName != undefined) {
gotoAndStop (2);
}
bg.onRollOver = function () {
bg.gotoAndStop(2);
};
bg.onRollOut = function () {
if (_parent.selectedSlot != _name) {
bg.gotoAndStop(1);
}
};
bg.onPress = function () {
if (_parent.selectedSlot != _name) {
_parent.selectSlotTXT._visible = false;
_parent[_parent.selectedSlot].bg.gotoAndStop(1);
_parent.selectedSlot = _name;
}
};
}
Instance of Symbol 205 MovieClip "TanksSlot3" in Symbol 279 MovieClip Frame 6
onClipEvent (load) {
var savefile = SharedObject.getLocal(_name);
if (savefile.data.playerName != undefined) {
gotoAndStop (2);
}
bg.onRollOver = function () {
bg.gotoAndStop(2);
};
bg.onRollOut = function () {
if (_parent.selectedSlot != _name) {
bg.gotoAndStop(1);
}
};
bg.onPress = function () {
if (_parent.selectedSlot != _name) {
_parent.selectSlotTXT._visible = false;
_parent[_parent.selectedSlot].bg.gotoAndStop(1);
_parent.selectedSlot = _name;
}
};
}
Instance of Symbol 273 MovieClip in Symbol 279 MovieClip Frame 6
on (rollOver) {
this.gotoAndPlay("rollover");
}
on (rollOut) {
this.gotoAndPlay("rollout");
}
on (release) {
if (_parent._parent._currentframe == 20) {
if (_parent.selectedSlot != "") {
if (_parent[_parent.selectedSlot]._currentframe == 1) {
_parent.selectedSlotNum = _parent.selectedSlot.charAt(_parent.selectedSlot.length - 1);
_root.saveGame(_parent.selectedSlotNum);
_parent[_parent.selectedSlot].gotoAndStop(2);
} else {
_parent[_parent.selectedSlot].clearMC.gotoAndStop(3);
}
} else {
_parent.selectSlotTXT._visible = true;
}
}
}
Instance of Symbol 277 MovieClip in Symbol 279 MovieClip Frame 6
on (rollOver) {
this.gotoAndPlay("rollover");
}
on (rollOut) {
this.gotoAndPlay("rollout");
}
on (release) {
if (_parent._parent._currentframe == 20) {
_parent._parent.play();
}
}
Symbol 280 MovieClip Frame 1
if (contentGoTo == "none") {
stop();
}
Instance of Symbol 67 MovieClip in Symbol 280 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
if (((_parent._currentframe == 20) || (_parent._currentframe == 1)) && (_parent.contentGoTo != "newGame")) {
_parent.contentGoTo = "newGame";
_root.playerName = "Unknown Soldier";
_root.tankColor = "9C9C73";
_parent.play();
}
}
Instance of Symbol 72 MovieClip in Symbol 280 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
if (((_parent._currentframe == 20) || (_parent._currentframe == 1)) && (_parent.contentGoTo != "instructions")) {
_parent.contentGoTo = "instructions";
_parent.play();
}
}
Instance of Symbol 76 MovieClip in Symbol 280 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
if (((_parent._currentframe == 20) || (_parent._currentframe == 1)) && (_parent.contentGoTo != "load")) {
_parent.contentGoTo = "load";
_parent.play();
}
}
Instance of Symbol 80 MovieClip in Symbol 280 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
if (((_parent._currentframe == 20) || (_parent._currentframe == 1)) && (_parent.contentGoTo != "credits")) {
_parent.contentGoTo = "credits";
_parent.play();
}
}
Instance of Symbol 26 MovieClip in Symbol 280 MovieClip Frame 1
on (release) {
getURL ("http://www.maxgames.com", _blank);
}
Instance of Symbol 85 MovieClip in Symbol 280 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
getURL ("http://www.maxgames.com", _blank);
}
Instance of Symbol 279 MovieClip "content" in Symbol 280 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Symbol 280 MovieClip Frame 2
content.gotoAndStop(contentGoTo);
Symbol 280 MovieClip Frame 20
stop();
Instance of Symbol 279 MovieClip in Symbol 280 MovieClip Frame 20
onClipEvent (load) {
gotoAndStop(_parent.contentGoTo);
}
Instance of Symbol 279 MovieClip "content" in Symbol 280 MovieClip Frame 40
onClipEvent (load) {
gotoAndStop (1);
}
Symbol 282 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = reset;
Symbol 286 MovieClip Frame 2
for (j in _root) {
_root[j].removeMovieClip();
}
Symbol 286 MovieClip Frame 25
stop();
Symbol 286 MovieClip Frame 26
var vol = 100;
onEnterFrame = function () {
vol = vol - 4;
_root.menuMusic.setVolume(vol);
if (vol <= 0) {
delete onEnterFrame;
}
};
Symbol 286 MovieClip Frame 50
_root.gotoAndStop(_root.menuGoto);
Symbol 290 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 4
gotoAndPlay (2);
Symbol 307 MovieClip Frame 1
stop();
Instance of Symbol 302 MovieClip in Symbol 307 MovieClip Frame 4
onClipEvent (enterFrame) {
_rotation = (_rotation+1);
}
Symbol 318 MovieClip Frame 1
var notBoughtAlpha = 20;
Instance of Symbol 307 MovieClip "1" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
missileStat._visible = false;
gotoAndStop(_name);
}
Instance of Symbol 307 MovieClip "2" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
missileStat._visible = false;
gotoAndStop(_name);
if (_root.aimsArray[_currentframe] != "PURCHASED") {
_alpha = _parent.notBoughtAlpha;
}
}
Instance of Symbol 307 MovieClip "3" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
missileStat._visible = false;
gotoAndStop(_name);
if (_root.aimsArray[_currentframe] != "PURCHASED") {
_alpha = _parent.notBoughtAlpha;
}
}
Instance of Symbol 307 MovieClip "4" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
missileStat._visible = false;
gotoAndStop(_name);
if (_root.aimsArray[_currentframe] != "PURCHASED") {
_alpha = _parent.notBoughtAlpha;
}
}
Instance of Symbol 307 MovieClip "5" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
missileStat._visible = false;
gotoAndStop(_name);
if (_root.aimsArray[_currentframe] != "PURCHASED") {
_alpha = _parent.notBoughtAlpha;
}
}
Instance of Symbol 316 MovieClip in Symbol 318 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = _parent[_root.aim._currentframe]._x;
_y = _parent[_root.aim._currentframe]._y;
}
Symbol 319 MovieClip Frame 1
stop();
Instance of Symbol 322 MovieClip in Symbol 336 MovieClip Frame 1
onClipEvent (load) {
rot = _rotation;
}
onClipEvent (enterFrame) {
_rotation = (rot - _root.combo);
}
Instance of Symbol 331 MovieClip in Symbol 336 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_root.comboMultiplier);
}
Symbol 344 MovieClip Frame 1
this.onEnterFrame = function () {
tens = Math.floor(_root[_name] / 10);
ones = _root[_name] - (tens * 10);
};
Instance of Symbol 322 MovieClip in Symbol 345 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = ((-(_root.health - 100)) * 1.8);
}
Symbol 346 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 1
onEnterFrame = function () {
lives = _root.lives;
damage = (_root.damageMultiplier * 100) + " %";
xDif2 = hudTop._x - _xmouse;
yDif2 = hudTop._y - _ymouse;
dist2 = Math.sqrt((xDif2 * xDif2) + (yDif2 * yDif2));
if (dist2 > 150) {
hudTop._alpha = 100;
} else {
hudTop._alpha = dist2 / 2;
}
};
Instance of Symbol 346 MovieClip in Symbol 358 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("top");
top = _currentframe;
gotoAndStop (1);
health = _root.health;
}
onClipEvent (enterFrame) {
health2 = _root.health;
if (health2 < 30) {
gotoAndStop (12);
}
if (health2 < health) {
_parent.hurt.play();
if (_currentframe < 12) {
play();
} else if (_currentframe < top) {
gotoAndPlay (12);
} else {
play();
}
} else if (Key.isDown(69)) {
if (_currentframe < 12) {
play();
} else if (_currentframe < top) {
gotoAndPlay (12);
} else {
play();
}
}
health = health2;
}
Instance of Symbol 351 MovieClip in Symbol 358 MovieClip Frame 1
onClipEvent (load) {
mon = _root.totalMoney;
}
onClipEvent (enterFrame) {
mon2 = _root.totalMoney;
if (_root.GameStarted) {
if ((mon2 != mon) || (Key.isDown(69))) {
if (_currentframe < 12) {
play();
} else if (_currentframe < 38) {
gotoAndPlay (12);
} else {
play();
}
}
mon = mon2;
}
}
Instance of Symbol 357 MovieClip in Symbol 358 MovieClip Frame 1
onClipEvent (enterFrame) {
someText.text = (("Required/Total\n" + ((_root.requiredEnemies > 0) ? (_root.requiredEnemies) : 0)) + "/") + _root.totalEnemies;
}
Instance of Symbol 26 MovieClip in Symbol 358 MovieClip Frame 1
on (release) {
getURL ("http://www.maxgames.com", _blank);
}
Symbol 361 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 3
this.removeMovieClip();
Symbol 375 MovieClip Frame 34
stop();
Symbol 376 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 2
var hitTank = false;
this.onEnterFrame = function () {
if (hitTest(_root.tank) && (!hitTank)) {
hitTank = true;
_root.health = _root.health - _root.explosionDamage;
}
};
Symbol 376 MovieClip Frame 40
this.removeMovieClip();
Symbol 378 MovieClip Frame 1
stop();
Symbol 378 MovieClip Frame 4
this.unloadMovie();
Symbol 391 MovieClip Frame 13
stop();
Instance of Symbol 389 MovieClip in Symbol 391 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "invinciblePowerup") {
if ((_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (_root.tankStat == "normal")) && (_parent._visible)) {
_root.invinciblePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 391 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "invinciblePowerup") {
if ((_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (_root.tankStat == "normal")) && (_parent._visible)) {
_root.invinciblePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 391 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "invinciblePowerup") {
if ((_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (_root.tankStat == "normal")) && (_parent._visible)) {
_root.invinciblePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 391 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "invinciblePowerup") {
if ((_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (_root.tankStat == "normal")) && (_parent._visible)) {
_root.invinciblePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 397 MovieClip in Symbol 398 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = _parent._parent.myDegrees;
}
Symbol 410 MovieClip Frame 1
Text = _parent.Text;
Symbol 411 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 2
stop();
Symbol 411 MovieClip Frame 3
if ((_root.pickupsVariable + _root.pickupsMin) > _root.pickupsMax) {
_root.pickupsVariable = 0;
} else {
_root.pickupsVariable;
}
swapDepths(_root.pickupsVariable + _root.pickupsMin);
Text = "Money +" + (_parent.killMoney * _root.comboMultiplier);
_parent.killMoney = 0;
this.filters = [];
Symbol 411 MovieClip Frame 74
_parent.removeMovieClip();
Symbol 412 MovieClip Frame 1
stop();
Instance of Symbol 411 MovieClip in Symbol 412 MovieClip Frame 8
/* no clip actions */
Symbol 412 MovieClip Frame 14
stop();
Instance of Symbol 389 MovieClip in Symbol 412 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 412 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 412 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 412 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Symbol 414 MovieClip Frame 1
stop();
Symbol 414 MovieClip Frame 2
Symbol 414 MovieClip Frame 18
this.removeMovieClip();
Symbol 419 MovieClip Frame 13
stop();
Instance of Symbol 389 MovieClip in Symbol 419 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "healthPowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.healthPowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 419 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "healthPowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.healthPowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 419 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "healthPowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.healthPowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 419 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "healthPowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.healthPowerupFunction(_parent._name);
}
}
}
Symbol 426 MovieClip Frame 13
stop();
Instance of Symbol 389 MovieClip in Symbol 426 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "moneyPowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.moneyPowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 426 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "moneyPowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.moneyPowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 426 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "moneyPowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.moneyPowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 426 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "moneyPowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.moneyPowerupFunction(_parent._name);
}
}
}
Symbol 430 MovieClip Frame 13
stop();
Instance of Symbol 389 MovieClip in Symbol 430 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "extralifePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.extralifePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 430 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "extralifePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.extralifePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 430 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "extralifePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.extralifePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 430 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "extralifePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.extralifePowerupFunction(_parent._name);
}
}
}
Symbol 435 MovieClip Frame 13
stop();
Instance of Symbol 389 MovieClip in Symbol 435 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "timePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.timePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 435 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "timePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.timePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 435 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "timePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.timePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 435 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "timePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.timePowerupFunction(_parent._name);
}
}
}
Symbol 438 MovieClip Frame 45
this.removeMovieClip();
stop();
Symbol 443 MovieClip Frame 13
stop();
Instance of Symbol 389 MovieClip in Symbol 443 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "missilePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.missilePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 443 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "missilePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.missilePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 443 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "missilePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.missilePowerupFunction(_parent._name);
}
}
}
Instance of Symbol 389 MovieClip in Symbol 443 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_parent._name != "missilePowerup") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_root.missilePowerupFunction(_parent._name);
}
}
}
Symbol 449 MovieClip Frame 13
stop();
var hit = false;
Instance of Symbol 389 MovieClip in Symbol 449 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.comboPowerupFunction(_parent._name);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 449 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.comboPowerupFunction(_parent._name);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 449 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.comboPowerupFunction(_parent._name);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 449 MovieClip Frame 13
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.comboPowerupFunction(_parent._name);
_parent.removeMovieClip();
}
}
Symbol 453 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 1
stop();
Instance of Symbol 455 MovieClip "Enemy12" in Symbol 458 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = ((_parent.myDegrees + (Math.random() * 2)) - 4);
}
Instance of Symbol 389 MovieClip in Symbol 458 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 458 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 458 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 458 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 457 MovieClip in Symbol 458 MovieClip Frame 2
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 411 MovieClip "coin" in Symbol 458 MovieClip Frame 2
/* no clip actions */
Instance of Symbol 389 MovieClip "ht1" in Symbol 458 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht3" in Symbol 458 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht2" in Symbol 458 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht4" in Symbol 458 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 457 MovieClip in Symbol 458 MovieClip Frame 8
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 457 MovieClip in Symbol 458 MovieClip Frame 14
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 457 MovieClip in Symbol 458 MovieClip Frame 20
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 457 MovieClip in Symbol 458 MovieClip Frame 26
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Symbol 458 MovieClip Frame 30
stop();
Symbol 463 MovieClip Frame 1
stop();
Instance of Symbol 455 MovieClip "Enemy12" in Symbol 463 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = ((_parent.myDegrees + (Math.random() * 2)) - 4);
}
Instance of Symbol 389 MovieClip in Symbol 463 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 463 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 463 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 463 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 462 MovieClip in Symbol 463 MovieClip Frame 2
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 411 MovieClip "coin" in Symbol 463 MovieClip Frame 2
/* no clip actions */
Instance of Symbol 389 MovieClip "ht1" in Symbol 463 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht3" in Symbol 463 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht2" in Symbol 463 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht4" in Symbol 463 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 462 MovieClip in Symbol 463 MovieClip Frame 8
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 462 MovieClip in Symbol 463 MovieClip Frame 14
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 462 MovieClip in Symbol 463 MovieClip Frame 20
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 462 MovieClip in Symbol 463 MovieClip Frame 26
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Symbol 463 MovieClip Frame 30
stop();
Symbol 466 MovieClip Frame 1
stop();
Instance of Symbol 455 MovieClip "Enemy12" in Symbol 466 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = ((_parent.myDegrees + (Math.random() * 2)) - 4);
}
Instance of Symbol 389 MovieClip in Symbol 466 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 466 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 466 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 389 MovieClip in Symbol 466 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._name != "Enemy1") {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true)) {
_parent.health = 0;
}
}
}
Instance of Symbol 465 MovieClip in Symbol 466 MovieClip Frame 2
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 411 MovieClip "coin" in Symbol 466 MovieClip Frame 2
/* no clip actions */
Instance of Symbol 389 MovieClip "ht1" in Symbol 466 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht3" in Symbol 466 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht2" in Symbol 466 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip "ht4" in Symbol 466 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 465 MovieClip in Symbol 466 MovieClip Frame 8
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 465 MovieClip in Symbol 466 MovieClip Frame 14
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 465 MovieClip in Symbol 466 MovieClip Frame 20
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Instance of Symbol 465 MovieClip in Symbol 466 MovieClip Frame 26
onClipEvent (load) {
_rotation = _parent.myDegrees;
}
Symbol 466 MovieClip Frame 30
stop();
Symbol 467 MovieClip Frame 1
stop();
Instance of Symbol 411 MovieClip in Symbol 467 MovieClip Frame 8
/* no clip actions */
Symbol 467 MovieClip Frame 14
stop();
Instance of Symbol 389 MovieClip in Symbol 467 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 467 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 467 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 467 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Symbol 468 MovieClip Frame 1
stop();
Instance of Symbol 411 MovieClip in Symbol 468 MovieClip Frame 8
/* no clip actions */
Symbol 468 MovieClip Frame 14
stop();
Instance of Symbol 389 MovieClip in Symbol 468 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 468 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 468 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Instance of Symbol 389 MovieClip in Symbol 468 MovieClip Frame 14
onClipEvent (enterFrame) {
if (_root.tank.hitTest(_parent._x + _x, _parent._y + _y, true) && (!_parent.hit)) {
_parent.hit = true;
_root.levelMoney = _root.levelMoney + (_parent.killMoney * _root.comboMultiplier);
_parent.removeMovieClip();
}
}
Symbol 477 MovieClip Frame 1
stop();
Symbol 477 MovieClip Frame 9
stop();
Symbol 481 MovieClip Frame 1
stop();
Symbol 481 MovieClip Frame 9
stop();
Instance of Symbol 473 MovieClip in Symbol 483 MovieClip Frame 1
onClipEvent (load) {
var vol = ((_root.globalSound.getVolume() > 0) ? 0 : 100);
gotoAndStop((vol > 0) + 1);
}
on (release) {
_root.globalSound.setVolume(vol);
var vol = ((_root.globalSound.getVolume() > 0) ? 0 : 100);
gotoAndStop((vol > 0) + 1);
}
Instance of Symbol 477 MovieClip in Symbol 483 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("normal");
}
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
Mouse.hide();
_parent._parent.play();
}
Instance of Symbol 481 MovieClip in Symbol 483 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("normal");
}
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
Mouse.show();
for (i in _root) {
if ((_root[i] instanceof MovieClip) && (i != _parent._parent._name)) {
_root[i].removeMovieClip();
}
}
delete _root.onEnterFrame;
_root.gotoAndStop("MainMenu");
}
Instance of Symbol 26 MovieClip in Symbol 483 MovieClip Frame 1
on (release) {
getURL ("http://www.maxgames.com", _blank);
}
Symbol 507 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 9
stop();
Symbol 511 MovieClip Frame 1
stop();
Symbol 511 MovieClip Frame 9
stop();
Symbol 518 MovieClip Frame 1
stop();
Symbol 518 MovieClip Frame 9
stop();
Symbol 518 MovieClip Frame 15
gotoAndStop (1);
Symbol 518 MovieClip Frame 16
stop();
Symbol 526 MovieClip Frame 1
stop();
Symbol 526 MovieClip Frame 9
stop();
Instance of Symbol 507 MovieClip in Symbol 529 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
_root.GameStarted = false;
_parent._parent.goto = "Router";
_parent._parent.gotoAndPlay("cont");
}
on (keyPress "<Space>") {
_root.GameStarted = false;
_parent._parent.goto = "Router";
_parent._parent.gotoAndPlay("cont");
}
Instance of Symbol 511 MovieClip in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("normal");
}
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
_root.GameStarted = false;
_parent._parent.goto = "MainMenu";
_parent._parent.play();
}
Instance of Symbol 518 MovieClip in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
if (_root.level > 1) {
gotoAndStop ("normal");
} else {
gotoAndStop ("locked");
}
}
on (rollOver) {
if (_root.level > 1) {
gotoAndPlay ("rollover");
}
}
on (rollOut) {
if (_root.level > 1) {
gotoAndPlay ("rollout");
}
}
on (release) {
if (_root.level > 1) {
_root.GameStarted = false;
_parent._parent.goto = "Shop";
_parent._parent.play();
}
}
Instance of Symbol 521 MovieClip in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
lives_txt.text = ("You have " + _root.lives) + " lives left";
}
Instance of Symbol 85 MovieClip in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("normal");
}
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
getURL ("http://www.maxgames.com", _blank);
}
Instance of Symbol 26 MovieClip in Symbol 529 MovieClip Frame 1
on (release) {
getURL ("http://www.maxgames.com", _blank);
}
Symbol 529 MovieClip Frame 2
score_txt.text = "Total Money Earned In Career: $" + _root.careerMoney;
_root.HPScoreService.postScore(_root.careerMoney, "");
Instance of Symbol 526 MovieClip in Symbol 529 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop ("normal");
}
on (rollOver) {
gotoAndPlay ("rollover");
}
on (rollOut) {
gotoAndPlay ("rollout");
}
on (release) {
_root.GameStarted = false;
_parent._parent.goto = "MainMenu";
_parent._parent.play();
}
Symbol 535 MovieClip Frame 1
stop();
Symbol 535 MovieClip Frame 25
stop();
Mouse.show();
Symbol 535 MovieClip Frame 50
_root.GamePause = false;
gotoAndStop (1);
Symbol 535 MovieClip Frame 51
Mouse.hide();
_root.aim._visible = false;
_root.levelVariables(_root.level);
play();
Instance of Symbol 488 MovieClip in Symbol 535 MovieClip Frame 51
onClipEvent (load) {
level_txt.text = "Level " + _root.level;
}
Symbol 535 MovieClip Frame 184
_root.GameStarted = true;
_root.GamePause = false;
_root.aim._visible = true;
_root.mainTimer = _root.levelTime;
Symbol 535 MovieClip Frame 208
gotoAndStop (1);
Symbol 535 MovieClip Frame 209
var vol = 100;
onEnterFrame = function () {
vol = vol - 10;
_root.gameMusic.setVolume(vol);
if (vol <= 0) {
_root.gameMusic.stop();
_root.menuMusic.start(0, 99);
onEnterFrame = function () {
vol = vol + 2;
_root.menuMusic.setVolume(vol);
if (vol >= 100) {
delete onEnterFrame;
}
};
}
};
Symbol 535 MovieClip Frame 264
for (var m in _root) {
if ((_root[m] instanceof MovieClip) && (m != _name)) {
_root[m].removeMovieClip();
}
}
Symbol 535 MovieClip Frame 268
if (_root.requiredEnemies <= 0) {
_root.level++;
_root.money = _root.money + _root.levelMoney;
_root.careerMoney = _root.careerMoney + _root.levelMoney;
_root.levelMoney = 0;
_root.gotoAndStop("Shop");
this.removeMovieClip();
} else {
_root.lives--;
gotoAndPlay ("failure");
}
Symbol 535 MovieClip Frame 269
_root.lives--;
_root.GameStarted = false;
_root.GamePaused = true;
_root.aim._visible = false;
var vol = 100;
onEnterFrame = function () {
vol = vol - 10;
_root.gameMusic.setVolume(vol);
if (vol <= 0) {
_root.gameMusic.stop();
_root.menuMusic.start(0, 99);
onEnterFrame = function () {
vol = vol + 2;
_root.menuMusic.setVolume(vol);
if (vol >= 100) {
delete onEnterFrame;
}
};
}
};
Instance of Symbol 529 MovieClip in Symbol 535 MovieClip Frame 293
onClipEvent (load) {
if (_root.lives >= 1) {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 535 MovieClip Frame 315
stop();
_root.levelMoney = 0;
for (i in _root) {
if ((_root[i] instanceof MovieClip) && (i != _name)) {
_root[i].removeMovieClip();
}
}
Mouse.show();
Symbol 535 MovieClip Frame 337
_root.gotoAndPlay(goto);
this.removeMovieClip();
Symbol 535 MovieClip Frame 340
_root.GameStarted = false;
_root.GamePaused = true;
_root.aim._visible = false;
Symbol 535 MovieClip Frame 348
stop();
Mouse.show();
_root.levelMoney = 0;
Symbol 543 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 9
stop();
Instance of Symbol 550 MovieClip "1" in Symbol 551 MovieClip Frame 1
onClipEvent (enterFrame) {
part = _parent._name;
if (_root[part + "Upgrades"] >= _name) {
gotoAndStop ("upgraded");
} else {
gotoAndStop ("notUpgraded");
}
}
Instance of Symbol 550 MovieClip "2" in Symbol 551 MovieClip Frame 1
onClipEvent (enterFrame) {
part = _parent._name;
if (_root[part + "Upgrades"] >= _name) {
gotoAndStop ("upgraded");
} else {
gotoAndStop ("notUpgraded");
}
}
Instance of Symbol 550 MovieClip "3" in Symbol 551 MovieClip Frame 1
onClipEvent (enterFrame) {
part = _parent._name;
if (_root[part + "Upgrades"] >= _name) {
gotoAndStop ("upgraded");
} else {
gotoAndStop ("notUpgraded");
}
}
Instance of Symbol 550 MovieClip "4" in Symbol 551 MovieClip Frame 1
onClipEvent (enterFrame) {
part = _parent._name;
if (_root[part + "Upgrades"] >= _name) {
gotoAndStop ("upgraded");
} else {
gotoAndStop ("notUpgraded");
}
}
Instance of Symbol 550 MovieClip "5" in Symbol 551 MovieClip Frame 1
onClipEvent (enterFrame) {
part = _parent._name;
if (_root[part + "Upgrades"] >= _name) {
gotoAndStop ("upgraded");
} else {
gotoAndStop ("notUpgraded");
}
}
Symbol 554 MovieClip Frame 1
stop();
Symbol 572 MovieClip Frame 1
stop();
Symbol 572 MovieClip Frame 9
stop();
Symbol 576 MovieClip Frame 1
stop();
Symbol 576 MovieClip Frame 9
stop();
Symbol 580 MovieClip Frame 1
stop();
Symbol 594 MovieClip Frame 1
stop();
Symbol 594 MovieClip Frame 9
stop();
Symbol 594 MovieClip Frame 15
rollover = false;
gotoAndStop (1);
Symbol 594 MovieClip Frame 16
stop();
Symbol 594 MovieClip Frame 24
stop();
Symbol 594 MovieClip Frame 30
rollover = false;
gotoAndStop (16);
Symbol 600 MovieClip Frame 1
stop();
Symbol 600 MovieClip Frame 9
stop();
Symbol 612 MovieClip Frame 1
stop();
Instance of Symbol 279 MovieClip "content" in Symbol 612 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("save");
}
Instance of Symbol 610 MovieClip in Symbol 612 MovieClip Frame 2
onClipEvent (load) {
useHandCursor = false;
}
on (rollOver) {
}
on (release) {
}
on (rollOver) {
}
Symbol 612 MovieClip Frame 20
stop();
Instance of Symbol 279 MovieClip "content" in Symbol 612 MovieClip Frame 40
onClipEvent (load) {
gotoAndStop (1);
}
Symbol 613 MovieClip Frame 1
stop();
Instance of Symbol 543 MovieClip in Symbol 613 MovieClip Frame 1
on (rollOver) {
_root.shopMessage = "Save your game";
gotoAndPlay ("rollover");
}
on (rollOut) {
_root.shopMessage = _root.shopMessageOriginal;
gotoAndPlay ("rollout");
}
on (release) {
_parent.saveMC.gotoAndPlay(2);
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
on (release) {
if ((_root.armorUpgrades < _root.maxUpgrades) && (_root.money >= _root.upgradesCosts[_root.armorUpgrades + 1])) {
_root.money = _root.money - _root.upgradesCosts[_root.armorUpgrades + 1];
_root.armorUpgrades++;
} else if (_root.money < _root.upgradesCosts[_root.armorUpgrades + 1]) {
hit = true;
_root.shopMessage = "You don't have enough money!";
}
}
on (rollOut) {
hit = false;
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!hit)) {
if (_root.armorUpgrades < _root.maxUpgrades) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "Upgrade the armor of your tank!\nCost: $" + _root.upgradesCosts[_root.armorUpgrades + 1];
} else {
_root.shopMessage = "You can't upgrade armor any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
on (release) {
if ((_root.fireRateMissilesUpgrades < _root.maxUpgrades) && (_root.money >= _root.upgradesCosts[_root.fireRateMissilesUpgrades + 1])) {
_root.money = _root.money - _root.upgradesCosts[_root.fireRateMissilesUpgrades + 1];
_root.fireRateMissilesUpgrades++;
} else if (_root.money < _root.upgradesCosts[_root.fireRateMissilesUpgrades + 1]) {
hit = true;
_root.shopMessage = "You don't have enough money!";
}
}
on (rollOut) {
hit = false;
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!hit)) {
if (_root.fireRateMissilesUpgrades < _root.maxUpgrades) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "Upgrade the fire rate of the missiles!\nCost: $" + _root.upgradesCosts[_root.fireRateMissilesUpgrades + 1];
} else {
_root.shopMessage = "You can't upgrade the fire rate of the missiles any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
on (release) {
if ((_root.fireRateMGUpgrades < _root.maxUpgrades) && (_root.money >= _root.upgradesCosts[_root.fireRateMGUpgrades + 1])) {
_root.money = _root.money - _root.upgradesCosts[_root.fireRateMGUpgrades + 1];
_root.fireRateMGUpgrades++;
} else if (_root.money < _root.upgradesCosts[_root.fireRateMGUpgrades + 1]) {
hit = true;
_root.shopMessage = "You don't have enough money!";
}
}
on (rollOut) {
hit = false;
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!hit)) {
if (_root.fireRateMGUpgrades < _root.maxUpgrades) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "Upgrade the fire rate of the machine gun!\nCost: $" + _root.upgradesCosts[_root.fireRateMGUpgrades + 1];
} else {
_root.shopMessage = "You can't upgrade the fire rate of the machine gun any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
on (release) {
if ((_root.turningUpgrades < _root.maxUpgrades) && (_root.money >= _root.upgradesCosts[_root.turningUpgrades + 1])) {
_root.money = _root.money - _root.upgradesCosts[_root.turningUpgrades + 1];
_root.turningUpgrades++;
} else if (_root.money < _root.upgradesCosts[_root.turningUpgrades + 1]) {
hit = true;
_root.shopMessage = "You don't have enough money!";
}
}
on (rollOut) {
hit = false;
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!hit)) {
if (_root.turningUpgrades < _root.maxUpgrades) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "Upgrade the turning of your tank!\nCost: $" + _root.upgradesCosts[_root.turningUpgrades + 1];
} else {
_root.shopMessage = "You can't upgrade turning any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
on (release) {
if ((_root.accelerationUpgrades < _root.maxUpgrades) && (_root.money >= _root.upgradesCosts[_root.accelerationUpgrades + 1])) {
_root.money = _root.money - _root.upgradesCosts[_root.accelerationUpgrades + 1];
_root.accelerationUpgrades++;
} else if (_root.money < _root.upgradesCosts[_root.accelerationUpgrades + 1]) {
hit = true;
_root.shopMessage = "You don't have enough money!";
}
}
on (rollOut) {
hit = false;
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!hit)) {
if (_root.accelerationUpgrades < _root.maxUpgrades) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "Upgrade the acceleration of your tank!\nCost: $" + _root.upgradesCosts[_root.accelerationUpgrades + 1];
} else {
_root.shopMessage = "You can't upgrade acceleration any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
on (release) {
if ((_root.speedUpgrades < _root.maxUpgrades) && (_root.money >= _root.upgradesCosts[_root.speedUpgrades + 1])) {
_root.money = _root.money - _root.upgradesCosts[_root.speedUpgrades + 1];
_root.speedUpgrades++;
} else if (_root.money < _root.upgradesCosts[_root.speedUpgrades + 1]) {
hit = true;
_root.shopMessage = "You don't have enough money!";
}
}
on (rollOut) {
hit = false;
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (!hit)) {
if (_root.speedUpgrades < _root.maxUpgrades) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "Upgrade the speed of your tank!\nCost: $" + _root.upgradesCosts[_root.speedUpgrades + 1];
} else {
_root.shopMessage = "You can't upgrade speed any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
onClipEvent (load) {
gotoAndStop (2);
}
on (release) {
if (_root.speedUpgrades > 0) {
_root.money = _root.money + (_root.upgradesCosts[_root.speedUpgrades] / 2);
_root.speedUpgrades--;
}
}
on (rollOut) {
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.speedUpgrades > 0) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "If you for any reason would like to downgrade the speed you can do so, you will only get half the money back though.\nMoney back for downgrading: $" + (_root.upgradesCosts[_root.speedUpgrades] / 2);
} else {
_root.shopMessage = "You can't downgrade this any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
onClipEvent (load) {
gotoAndStop (2);
}
on (release) {
if (_root.accelerationUpgrades > 0) {
_root.money = _root.money + (_root.upgradesCosts[_root.accelerationUpgrades] / 2);
_root.accelerationUpgrades--;
}
}
on (rollOut) {
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.accelerationUpgrades > 0) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "If you for any reason would like to downgrade the acceleration you can do so, you will only get half the money back though.\nMoney back for downgrading: $" + (_root.upgradesCosts[_root.accelerationUpgrades] / 2);
} else {
_root.shopMessage = "You can't downgrade this any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
onClipEvent (load) {
gotoAndStop (2);
}
on (release) {
if (_root.turningUpgrades > 0) {
_root.money = _root.money + (_root.upgradesCosts[_root.turningUpgrades] / 2);
_root.turningUpgrades--;
}
}
on (rollOut) {
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.turningUpgrades > 0) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "If you for any reason would like to downgrade the turning you can do so, you will only get half the money back though.\nMoney back for downgrading: $" + (_root.upgradesCosts[_root.turningUpgrades] / 2);
} else {
_root.shopMessage = "You can't downgrade this any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
onClipEvent (load) {
gotoAndStop (2);
}
on (release) {
if (_root.armorUpgrades > 0) {
_root.money = _root.money + (_root.upgradesCosts[_root.armorUpgrades] / 2);
_root.armorUpgrades--;
}
}
on (rollOut) {
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.armorUpgrades > 0) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "If you for any reason would like to downgrade the armor you can do so, you will only get half the money back though.\nMoney back for downgrading: $" + (_root.upgradesCosts[_root.armorUpgrades] / 2);
} else {
_root.shopMessage = "You can't downgrade this any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
onClipEvent (load) {
gotoAndStop (2);
}
on (release) {
if (_root.fireRateMGUpgrades > 0) {
_root.money = _root.money + (_root.upgradesCosts[_root.fireRateMGUpgrades] / 2);
_root.fireRateMGUpgrades--;
}
}
on (rollOut) {
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.fireRateMGUpgrades > 0) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "If you for any reason would like to downgrade the fire rate of the machine gun you can do so, you will only get half the money back though.\nMoney back for downgrading: $" + (_root.upgradesCosts[_root.fireRateMGUpgrades] / 2);
} else {
_root.shopMessage = "You can't downgrade this any further.";
}
}
}
Instance of Symbol 554 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
onClipEvent (load) {
gotoAndStop (2);
}
on (release) {
if (_root.fireRateMissilesUpgrades > 0) {
_root.money = _root.money + (_root.upgradesCosts[_root.fireRateMissilesUpgrades] / 2);
_root.fireRateMissilesUpgrades--;
}
}
on (rollOut) {
_width = orgWidth;
_height = orgHeight;
_root.shopMessage = _root.shopMessageOriginal;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.fireRateMissilesUpgrades > 0) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
_root.shopMessage = "If you for any reason would like to downgrade the fire rate of the missiles you can do so, you will only get half the money back though.\nMoney back for downgrading: $" + (_root.upgradesCosts[_root.fireRateMissilesUpgrades] / 2);
} else {
_root.shopMessage = "You can't downgrade this any further.";
}
}
}
Instance of Symbol 572 MovieClip in Symbol 613 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("rollover");
_root.shopMessage = (("Paint your tank in the color #" + _root.tankColorTemp) + ".\nCost: $") + _root.paintCost;
}
on (rollOut) {
_root.shopMessage = _root.shopMessageOriginal;
gotoAndPlay ("rollout");
}
on (release) {
if ((_root.tankColor != _root.tankColorTemp) && (_root.money >= _root.paintCost)) {
_root.money = _root.money - _root.paintCost;
_root.tankColor = _root.tankColorTemp;
_root.tankColorHexa = _root.tankColorHexaTemp;
_root.shopMessage = ("Your tank now has the color #" + _root.tankColor) + "!";
} else if ((_root.tankColor != _root.tankColorTemp) && (_root.money < _root.paintCost)) {
_root.shopMessage = "You don't have enough money!";
} else if (_root.tankColor == _root.tankColorTemp) {
_root.shopMessage = "Would be pretty dumb to paint it the same color as it already is, don't you think?";
}
}
Instance of Symbol 105 MovieClip "original" in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColorTemp = "9C9C73";
}
Instance of Symbol 105 MovieClip "white" in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColorTemp = "FFFFFF";
}
Instance of Symbol 105 MovieClip "red" in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColorTemp = "FF0000";
}
Instance of Symbol 105 MovieClip "green" in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColorTemp = "009900";
}
Instance of Symbol 105 MovieClip "pimp" in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColorTemp = "A801A9";
}
Instance of Symbol 105 MovieClip "black" in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_name);
hoverframe = _name + "hover";
}
on (rollOver) {
gotoAndStop(hoverframe);
}
on (rollOut) {
gotoAndStop(_name);
}
on (release) {
_root.tankColorTemp = "000000";
}
Instance of Symbol 576 MovieClip in Symbol 613 MovieClip Frame 1
on (rollOver) {
_root.shopMessage = "Reset the color of the preview.";
gotoAndPlay ("rollover");
}
on (rollOut) {
_root.shopMessage = _root.shopMessageOriginal;
gotoAndPlay ("rollout");
}
on (release) {
_root.tankColorTemp = _root.tankColor;
_root.tankColorHexaTemp = _root.tankColorHexa;
}
Instance of Symbol 580 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
hit = false;
if (_root.level > (_root.ownColorUnlock - 1)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
onClipEvent (enterFrame) {
if (hitTest(_root._xmouse, _root._ymouse, true)) {
hit = true;
if (_root.level > (_root.ownColorUnlock - 1)) {
_root.shopMessage = "Paint the tank in any color! Input the RGB of desired color in the box.";
} else {
_root.shopMessage = ("Once you have finished level " + _root.ownColorUnlock) + " you can paint your tank in any color of your choice!";
}
} else if (hit) {
hit = false;
_root.shopMessage = _root.shopMessageOriginal;
if (_root.tankColorTemp == "") {
_root.tankColorTemp = _root.tankColor;
}
}
}
Instance of Symbol 594 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
var rollover = false;
var aimstatus = "buy";
}
onClipEvent (enterFrame) {
if ((_root.aimsArray[_parent.aim._currentframe] == "PURCHASED") && (!rollover)) {
_root.aimPrice = "PURCHASED";
aimstatus = "equip";
gotoAndStop ("equip");
}
if ((_root.aimsArray[_parent.aim._currentframe] > _root.level) && (!rollover)) {
_root.aimPrice = "Unlocks after level " + _root.aimsArray[_parent.aim._currentframe];
aimstatus = "locked";
gotoAndStop ("locked");
}
if (((_root.aimsArray[_parent.aim._currentframe] <= _root.level) && (_root.aimsArray[_parent.aim._currentframe] != "PURCHASED")) && (!rollover)) {
_root.aimPrice = "$ " + _root.aimCosts[_parent.aim._currentframe];
aimstatus = "buy";
gotoAndStop ("buy");
}
if (hitTest(_root._xmouse, _root._ymouse, true) && (rollover)) {
if (aimstatus == "locked") {
_root.shopMessage = "You haven't unlocked this crosshair yet.";
} else if (aimstatus == "buy") {
_root.shopMessage = (("Once you have bought this crosshair, press " + _parent.aim._currentframe) + " anytime during play to equip it.\nCost: $") + _root.aimCosts[_parent.aim._currentframe];
} else if (aimstatus == "equip") {
_root.shopMessage = ("Equip this crosshair. You can also equip it during play by pressing " + _parent.aim._currentframe) + ".";
} else if (aimstatus == "equipped") {
_root.shopMessage = ("You have equipped crosshair " + _parent.aim._currentframe) + ".";
} else if (aimstatus == "nomoney") {
_root.shopMessage = "You don't have enough money!";
}
}
}
on (rollOver) {
rollover = true;
if (aimstatus != "locked") {
gotoAndPlay(aimstatus + "rollover");
} else {
gotoAndStop ("locked");
}
}
on (rollOut) {
if (aimstatus == "equipped") {
aimstatus = "equip";
} else if ((aimstatus == "locked") || (aimstatus == "nomoney")) {
rollover = false;
}
_root.shopMessage = _root.shopMessageOriginal;
((aimstatus != "locked") ? (gotoAndPlay(aimstatus + "rollout")) : (gotoAndStop ("locked")));
}
on (release) {
if (aimstatus == "equip") {
_root.currentAim = _parent.aim._currentframe;
aimstatus = "equipped";
} else if ((aimstatus == "buy") && (_root.money >= _root.aimCosts[_parent.aim._currentframe])) {
_root.money = _root.money - _root.aimCosts[_parent.aim._currentframe];
_root.aimPrice = "PURCHASED";
aimstatus = "equip";
gotoAndStop ("equip");
_root.aimsArray[_parent.aim._currentframe] = "PURCHASED";
} else if ((aimstatus == "buy") && (_root.money < _root.aimCosts[_parent.aim._currentframe])) {
aimstatus = "nomoney";
_root.shopMessage = "You don't have enough money!";
}
}
Instance of Symbol 307 MovieClip "aim" in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
missileStat._visible = false;
}
Instance of Symbol 223 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
on (rollOver) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
}
on (rollOut) {
_width = orgWidth;
_height = orgHeight;
}
on (release) {
_parent.aim.gotoAndStop(_parent.aim._currentframe - 1);
}
Instance of Symbol 223 MovieClip in Symbol 613 MovieClip Frame 1
onClipEvent (load) {
orgWidth = _width;
orgHeight = _height;
hoverMultiplier = 1.2;
}
on (rollOver) {
_width = (orgWidth * hoverMultiplier);
_height = (orgHeight * hoverMultiplier);
}
on (rollOut) {
_width = orgWidth;
_height = orgHeight;
}
on (release) {
_parent.aim.gotoAndStop(_parent.aim._currentframe + 1);
}
Instance of Symbol 600 MovieClip in Symbol 613 MovieClip Frame 1
on (rollOver) {
_root.shopMessage = "Go to next mission.";
gotoAndPlay ("rollover");
}
on (rollOut) {
_root.shopMessage = _root.shopMessageOriginal;
gotoAndPlay ("rollout");
}
on (release) {
_root.fade.swapDepths(_root.getNextHighestDepth());
_root.fade.gotoAndPlay("fadeOut");
}
Symbol 616 MovieClip Frame 1
_parent.shopMC.swapDepths(_root.getNextHighestDepth());
swapDepths(_root.getNextHighestDepth());
Symbol 616 MovieClip Frame 20
stop();
Mouse.show();
_parent.shopMC.swapDepths(_root.getNextHighestDepth());
Symbol 616 MovieClip Frame 21
Mouse.hide();
onRollOver = function () {
};
play();
Symbol 616 MovieClip Frame 40
_root.speedFunction();
_root.accelerationFunction();
_root.turningSpeedFunction();
_root.fireRateMGFunction();
_root.fireRateMissilesFunction();
_root.armorFunction();
_root.levelVariables(_root.level);
delete onRollOver;
_root.shopMC.removeMovieClip();
_root.gotoAndStop("Game");
this.removeMovieClip();