Frame 1
this.preloader._width = 0;
this.onEnterFrame = function () {
tbytes = getBytesTotal();
bloaded = getBytesLoaded();
if (bloaded <= tbytes) {
var _local2 = 300 / tbytes;
this.preloader._width = (tbytes - (tbytes - bloaded)) * _local2;
}
if (bloaded == tbytes) {
gotoAndPlay (6);
kill();
}
};
kill = function () {
delete this.onEnterFrame;
delete this.preloader;
};
stop();
Frame 10
function EncrpytString(strVal) {
var _local7 = "aHfEjcDebChGiAfIjDbEjacD";
var _local8 = _local7.length;
var _local11 = "0";
var _local3 = "";
var _local9 = strVal.length;
var _local1 = 0;
_local3 = "";
var _local4;
var _local6;
var _local2;
var _local5 = 0;
nCnt = 0;
while (nCnt < _local9) {
_local4 = strVal.charCodeAt(nCnt);
if (_local4 >= 128) {
_local4 = "X";
}
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = (_local4 % 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local5 = _local5 + _local2;
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = Math.floor(_local4 / 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local5 = _local5 + _local2;
nCnt++;
}
_local5 = _local5 % 256;
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = (_local5 % 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
_local6 = _local7.charCodeAt(_local1);
_local1 = _local1 + 1;
if (_local1 >= _local8) {
_local1 = 0;
}
_local2 = Math.floor(_local5 / 16) + _local6;
_local3 = _local3 + String.fromCharCode(_local2);
return(_local3);
}
function GetUrlParam(strUrl, strParam) {
var _local4 = strUrl.toLowerCase();
var _local1 = _local4.indexOf(strParam);
var _local5 = strParam.length;
if (_local1 > 0) {
var _local3;
var _local2 = _local4.indexOf("&", _local1 + _local5);
if (_local2 > 0) {
_local3 = _local2 - _local1;
} else {
_local3 = strUrl.length - _local1;
}
return(strUrl.substr(_local1 + _local5, _local3));
}
return("");
}
function GetBaseUrl(strUrl) {
var _local1 = strUrl.toLowerCase();
var _local2 = _local1.length;
var _local3 = _local1.indexOf("?", 0);
if (_local3 > 0) {
_local2 = _local3;
}
var _local4 = "download";
if (_local1.substr(0, 4) == "http") {
_local4 = strUrl.substr(7, _local2 - 7);
}
return(_local4);
}
_global.pause = true;
_global.pauseDeploy = true;
_global.sound_music_volume = 100;
_global.sound_effect_volume = 40;
var ScoreVal = 0;
var listener = new Object();
var bulletcounter = 0;
Key.addListener(listener);
killListener = function () {
Key.removeListener(listener);
};
listener.onKeyDown = function () {
if (code == 80) {
if (_global.pause == false) {
_global.pause = true;
_global.pauseDeploy = true;
} else if (_global.pause == true) {
_global.pause = false;
_global.pauseDeploy = false;
}
}
};
_root.attachMovie("arcadetown_splash", "as", getNextHighestDepth());
_root.as._x = 320;
_root.as._y = 240;
init = function () {
_root.createEmptyMovieClip("stage", 3);
_root.createEmptyMovieClip("engine", -1);
_root.createEmptyMovieClip("turrets", 5);
_root.createEmptyMovieClip("stores", 15);
_root.createEmptyMovieClip("menus", 7);
_root.attachMovie("crosshairs", "crosshairs", 20);
stage.attachMovie("backGround", "backGround", 3);
stage.attachMovie("hitDetector", "hitDetector", -1);
turrets.attachMovie("Turret", "Turret", 10);
_root.turrets.Turret._x = 3.75;
_root.turrets.Turret._y = 240;
engine.attachMovie("ammoLoader", "ammoLoader", engine.getNextHighestDepth());
engine.attachMovie("healthRegen", "healthRegen", engine.getNextHighestDepth());
engine.attachMovie("badguysender", "badguysender", engine.getNextHighestDepth());
stage.attachMovie("healthCaller", "healthCaller", stage.getNextHighestDepth());
engine.attachMovie("levelCaller", "levelCaller", engine.getNextHighestDepth());
stores.attachMovie("storeValues", "storeValues", stores.getNextHighestDepth());
stage.attachMovie("scoreboard", "scoreboard", stage.getNextHighestDepth());
stage.scoreboard.score = 0;
};
_root.createEmptyMovieClip("sound_music_mc", -10);
_root.createEmptyMovieClip("sound_effect_mc", -11);
sound_effect = new Sound(_root.sound_effect_mc);
var path_mainbeat = ["groove", "heavy"];
var path_intrigue = ["intrigue2", "groove", "mainbeat"];
var path_intrigue2 = ["heavy", "intrigue"];
var path_heavy = ["groove", "intrigue", "intrigue2"];
var path_groove = ["heavy"];
var loop_current = "mainbeat";
var loop_next = "";
sound_music = new Sound(_root.sound_music_mc);
sound_music.attachSound("music_mainbeat");
sound_music.onSoundComplete = function () {
_root.loop_current = _root["path_" + _root.loop_current][random(_root["path_" + _root.loop_current].length)];
sound_music.attachSound("music_" + _root.loop_current);
sound_music.start();
};
sound_music.start();
this.onEnterFrame = function () {
sound_music.setVolume(_global.sound_music_volume);
sound_effect.setVolume(_global.sound_effect_volume);
};
stop();
Symbol 17 MovieClip [gameover] Frame 1
var score = _root.stage.scoreboard.score;
this.replay.onRelease = function () {
_root.stage.scoreboard.kill();
_root.engine.removeMovieClip();
_root.turrets.removeMovieClip();
_root.stores.removeMovieClip();
_root.menus.removeMovieClip();
_root.gotoAndPlay(6);
_root.stage.removeMovieClip();
};
this.startover.onRelease = function () {
_root.stage.scoreboard.kill();
_root.engine.removeMovieClip();
_root.turrets.removeMovieClip();
_root.stores.removeMovieClip();
_root.menus.removeMovieClip();
_root.gotoAndPlay(6);
_root.stage.removeMovieClip();
};
this.submitscore.onRelease = function () {
if (this._parent.playerName.text.length > 0) {
var _local3 = (this._parent.playerName.text + "|") + _root.ScoreVal;
var _local4 = _root.EncrpytString(_local3);
getURL ("http://www.arcadetown.com/armedinvasion/hs.asp?" + _local4, "_blank");
_root.stage.scoreboard.kill();
_root.engine.removeMovieClip();
_root.turrets.removeMovieClip();
_root.stores.removeMovieClip();
_root.menus.removeMovieClip();
_root.gotoAndPlay(6);
_root.stage.removeMovieClip();
}
};
this.finalfortress.onRelease = function () {
getURL ("http://www.arcadetown.com/finalfortress/game.asp");
};
Symbol 27 MovieClip [scoreboard] Frame 1
var rounds = 30;
var funds = 0;
var score = 0;
var level = 0;
this.onEnterFrame = function () {
level = _root.engine.levelCaller.level;
};
kill = function () {
delete eval (this.onEnterFrame());
this.removeMovieClip();
};
Symbol 32 MovieClip [crosshairs] Frame 1
Mouse.hide();
this.startDrag();
this.onEnterFrame = function () {
this._x = _root._xmouse;
this._y = _root._ymouse;
if (_root.turrets.Turret.inrange == true) {
gotoAndPlay (2);
}
};
stop();
Symbol 32 MovieClip [crosshairs] Frame 2
this.onEnterFrame = function () {
if (_root.turrets.Turret.inrange == false) {
gotoAndPlay (1);
}
};
stop();
Symbol 71 MovieClip Frame 15
stop();
Symbol 72 MovieClip [bullet1] Frame 1
stop();
Symbol 72 MovieClip [bullet1] Frame 15
delete this.onEnterFrame;
this._parent.killme = true;
Symbol 75 MovieClip [sound] Frame 1
stop();
Symbol 75 MovieClip [sound] Frame 2
stop();
Symbol 316 MovieClip [__Packages.Trig] Frame 0
class Trig
{
function Trig () {
}
static function getAngle(xFrom, yFrom, xTo, yTo) {
var _local1;
if ((xFrom == xTo) && (yFrom == yTo)) {
trace((xFrom + " ") + xTo);
_local1 = null;
} else {
var _local4 = xTo - xFrom;
var _local2 = yTo - yFrom;
_local1 = Math.atan2(_local2, _local4);
}
return(_local1);
}
static function objectDistance(object1_f, object2_f) {
return(Math.sqrt(((object2_f._x - object1_f._x) * (object2_f._x - object1_f._x)) + ((object2_f._y - object1_f._y) * (object2_f._y - object1_f._y))));
}
static function distance(object1_f_x, object1_f_y, object2_f_x, object2_f_y) {
return(Math.sqrt(((object2_f_x - object1_f_x) * (object2_f_x - object1_f_x)) + ((object2_f_y - object1_f_y) * (object2_f_y - object1_f_y))));
}
static function trueRadian(radian) {
var _local1;
if (radian > Math.PI) {
_local1 = radian;
while (_local1 > Math.PI) {
_local1 = _local1 - (Math.PI*2);
}
radian = _local1;
}
if (radian < -3.14159265358979) {
_local1 = radian;
while (_local1 < -3.14159265358979) {
_local1 = _local1 + (Math.PI*2);
}
radian = _local1;
}
return(radian);
}
static function positiveRadian(radian) {
radian = trueRadian(radian);
radian = ((radian < 0) ? (radian + (Math.PI*2)) : (radian));
return(radian);
}
static function cWiseRadian(radian1, radian2) {
var _local3;
radian1 = positiveRadian(radian1);
radian2 = positiveRadian(radian2);
if (radian2 >= radian1) {
_local3 = (Math.PI*2) - (radian1 + ((Math.PI*2) - radian2));
} else {
_local3 = ((Math.PI*2) - radian1) + radian2;
}
return(_local3);
}
static function ccWiseRadian(radian1, radian2) {
var _local3;
radian1 = positiveRadian(radian1);
radian2 = positiveRadian(radian2);
if (radian2 >= radian1) {
_local3 = radian1 + ((Math.PI*2) - radian2);
} else {
_local3 = (Math.PI*2) - (radian1 + ((Math.PI*2) - radian2));
}
return(_local3);
}
static function rotationDirection(radian1, radian2) {
var _local4;
var _local5;
var _local3;
radian1 = positiveRadian(radian1);
radian2 = positiveRadian(radian2);
if (radian2 >= radian1) {
_local4 = Math.abs(cWiseRadian(radian2, radian1));
_local5 = Math.abs(ccWiseRadian(radian2, radian1));
if (_local4 < _local5) {
_local3 = -1;
} else {
_local3 = 1;
}
} else {
_local4 = Math.abs(cWiseRadian(radian1, radian2));
_local5 = Math.abs(ccWiseRadian(radian1, radian2));
if (_local4 < _local5) {
_local3 = 1;
} else {
_local3 = -1;
}
}
return(_local3);
}
static function regularNormal(vector, angle) {
var _local1;
var _local6;
var _local3;
var _local4;
var _local2;
angle = trueRadian(angle);
_local2 = trueRadian(vector + Math.PI);
_local1 = positiveRadian(angle + (Math.PI/2));
_local6 = rotationDirection(_local2, _local1);
if (_local6 > 0) {
_local3 = Math.abs(cWiseRadian(_local2, _local1));
} else {
_local3 = Math.abs(ccWiseRadian(_local2, _local1));
}
if (_local3 < (Math.PI/2)) {
_local4 = trueRadian(_local1);
} else {
_local4 = trueRadian(_local1 + Math.PI);
}
return(_local4);
}
static function inverseNormal(vector, angle) {
var _local1;
_local1 = trueRadian(regularNormal(vector, angle) + Math.PI);
return(_local1);
}
static function aoi(vector, angle) {
var _local2;
var _local1;
var _local4;
var _local3;
_local2 = positiveRadian(vector + Math.PI);
_local1 = positiveRadian(regularNormal(vector, angle));
_local4 = rotationDirection(_local2, _local1);
if (_local4 > 0) {
_local3 = Math.abs(cWiseRadian(_local2, _local1));
} else {
_local3 = Math.abs(ccWiseRadian(_local2, _local1));
}
return(aoi);
}
static function vor(vector, angle) {
var _local3;
var _local1;
var _local5;
var _local4;
var _local2;
_local3 = positiveRadian(vector + Math.PI);
_local1 = positiveRadian(regularNormal(vector, angle));
_local5 = rotationDirection(_local3, _local1);
if (_local5 > 0) {
_local4 = Math.abs(cWiseRadian(_local3, _local1));
_local2 = _local1 + _local4;
} else {
_local4 = Math.abs(ccWiseRadian(_local3, _local1));
_local2 = _local1 - _local4;
}
if (_local3 == (_local1 - (Math.PI/2))) {
_local2 = _local3;
}
_local2 = trueRadian(_local2);
return(_local2);
}
static function dbp(vector1, vector2) {
var _local1 = 0;
_local1 = Math.abs(vector1 - vector2);
if (_local1 > (Math.PI/2)) {
_local1 = (Math.PI/2) - (_local1 - (Math.PI/2));
} else {
}
if (_local1 < 0.1) {
_local1 = (Math.PI/2);
}
return(_local1);
}
}
Symbol 80 MovieClip [Turret] Frame 1
var speed = 0.8;
var damage = 1;
var firing = false;
var machineFire = false;
var firemax = 5;
var firecounter = 5;
var inrange = true;
this.turretfire.gotoAndStop(1);
createEmptyMovieClip("Listener", -2);
Listener.onEnterFrame = function () {
if (_global.pause == false) {
this.fireDelay = 9;
this.fireCounter = 9;
this._parent._rotation = (Trig.getAngle(this._parent._x, this._parent._y, _root.turrets._xmouse, _root.turrets._ymouse) * 180) / Math.PI;
this._parent.inrange = true;
if (this._parent._rotation < -15) {
this._parent._rotation = -15;
this._parent.inrange = false;
this._parent._y = this._parent._y - speed;
_root.stage.backGround.tower._y = _root.stage.backGround.tower._y - speed;
}
if (this._parent._rotation > 15) {
this._parent._rotation = 15;
this._parent.inrange = false;
this._parent._y = this._parent._y + speed;
_root.stage.backGround.tower._y = _root.stage.backGround.tower._y + speed;
}
if (this._parent._y < 26.5) {
this._parent._y = 26.5;
_root.stage.backGround.tower._y = -1;
}
if (this._parent._y > 453.5) {
this._parent._y = 453.5;
_root.stage.backGround.tower._y = 426.5;
}
Listener.onMouseDown = function () {
if (machineFire == false) {
fire();
} else {
firing = true;
}
};
Listener.onMouseUp = function () {
if (machineFire == true) {
firing = false;
}
};
if (firing == true) {
firecounter++;
if (firecounter >= firemax) {
fire();
firecounter = 0;
}
}
}
};
fire = function () {
if (_root.stage.scoreboard.rounds >= 1) {
if (_global.pause == false) {
if (_root.stores.storeFront == undefined) {
_root.stage.scoreboard.rounds = _root.stage.scoreboard.rounds - 1;
this.turretfire.gotoAndPlay(2);
_root.turrets.createEmptyMovieClip("shell" + _root.bulletcounter, _root.turrets.getNextHighestDepth());
_root.stage.hitDetector.bulletArray.push("shell" + _root.bulletcounter);
this._parent["shell" + _root.bulletcounter].attachMovie("bullet1", "bullet1", getNextHighestDepth());
this._parent["shell" + _root.bulletcounter].sound = new Sound(_root.sound_effect_mc);
this._parent["shell" + _root.bulletcounter].sound.attachSound("gunShot");
this._parent["shell" + _root.bulletcounter].sound.start();
this._parent["shell" + _root.bulletcounter].damage = damage;
this._parent["shell" + _root.bulletcounter].bullet1._x = 70;
this._parent["shell" + _root.bulletcounter].speed = 25;
this._parent["shell" + _root.bulletcounter]._x = this._x;
this._parent["shell" + _root.bulletcounter]._y = this._y;
this._parent["shell" + _root.bulletcounter]._rotation = this._rotation;
this._parent["shell" + _root.bulletcounter].onEnterFrame = function () {
if (_global.pause == false) {
this.bullet1._x = this.bullet1._x + this.speed;
if (this.bullet1._x >= 700) {
var _local4 = String(this);
_local4 = this._name;
h = 0;
while (h < _root.stage.hitDetector.bulletArray.length) {
if (_local4 == _root.stage.hitDetector.bulletArray[h]) {
_root.stage.hitDetector.bulletArray.splice(h, 1);
}
h++;
}
this.killme = true;
}
}
if (this.killme) {
delete this.onEnterFrame;
this.bullet1.removeMovieClip();
this.removeMovieClip();
}
};
_root.bulletcounter++;
}
}
}
};
kill = function () {
delete this.onEnterFrame;
delete Listener.onEnterFrame;
removeMovieClip(Listener);
this.bulletcounter = 0;
this.speed = 0.8;
this.damage = 1;
this.fireDelay = 9;
this.fireCounter = 9;
this.removeMovieClip();
};
stop();
Symbol 129 MovieClip Frame 30
stop();
Symbol 135 MovieClip Frame 54
stop();
Symbol 136 MovieClip [tankGuy] Frame 1
this.onEnterFrame = function () {
if (_root.stores.storeFront == undefined) {
if (_global.pause == false) {
play();
} else {
stop();
}
}
};
Symbol 136 MovieClip [tankGuy] Frame 46
gotoAndPlay (1);
Symbol 136 MovieClip [tankGuy] Frame 47
this.sound = new Sound(_root.sound_effect_mc);
this.sound.attachSound("tanksound");
this.sound.start();
Symbol 136 MovieClip [tankGuy] Frame 110
gotoAndPlay ("fire");
Symbol 136 MovieClip [tankGuy] Frame 111
var counter = 0;
var countermax = 90;
this.sound = new Sound(_root.sound_effect_mc);
this.sound.attachSound("kaboom");
this.sound.start();
Symbol 136 MovieClip [tankGuy] Frame 139
counter++;
Symbol 136 MovieClip [tankGuy] Frame 140
if (counter < countermax) {
gotoAndPlay(this._currentframe - 1);
}
Symbol 136 MovieClip [tankGuy] Frame 153
delete eval (this.onEnterFrame());
this._parent.killme = true;
stop();
Symbol 147 MovieClip Frame 10
stop();
Symbol 150 MovieClip [badguySniper] Frame 1
this.onEnterFrame = function () {
if (_root.stores.storeFront == undefined) {
if (_global.pause == false) {
play();
} else {
stop();
}
}
};
Symbol 150 MovieClip [badguySniper] Frame 30
gotoAndPlay (1);
Symbol 150 MovieClip [badguySniper] Frame 31
this.sound = new Sound(_root.sound_effect_mc);
this.sound.attachSound("badguysound");
this.sound.start();
Symbol 150 MovieClip [badguySniper] Frame 51
gotoAndPlay ("fire");
Symbol 150 MovieClip [badguySniper] Frame 61
var counter = 0;
var countermax = 90;
Symbol 150 MovieClip [badguySniper] Frame 85
counter++;
Symbol 150 MovieClip [badguySniper] Frame 86
if (counter < countermax) {
gotoAndPlay(this._currentframe - 1);
}
Symbol 150 MovieClip [badguySniper] Frame 98
delete eval (this.onEnterFrame());
this._parent.killme = true;
stop();
Symbol 153 MovieClip [badguy] Frame 1
this.onEnterFrame = function () {
if (_root.stores.storeFront == undefined) {
if (_global.pause == false) {
play();
} else {
stop();
}
}
};
Symbol 153 MovieClip [badguy] Frame 30
gotoAndPlay (1);
Symbol 153 MovieClip [badguy] Frame 31
this.sound = new Sound(_root.sound_effect_mc);
this.sound.attachSound("badguysound");
this.sound.start();
Symbol 153 MovieClip [badguy] Frame 50
gotoAndPlay ("fire");
Symbol 153 MovieClip [badguy] Frame 61
var counter = 0;
var countermax = 60;
Symbol 153 MovieClip [badguy] Frame 85
counter++;
Symbol 153 MovieClip [badguy] Frame 86
if (counter < countermax) {
gotoAndPlay(this._currentframe - 1);
}
Symbol 153 MovieClip [badguy] Frame 98
delete eval (this.onEnterFrame());
this._parent.killme = true;
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 2
stop();
Symbol 162 MovieClip [backGround] Frame 1
this.onEnterFrame = function () {
if (_global.sound_music_volume == 0) {
this.sound1.gotoAndPlay(2);
} else {
this.sound1.gotoAndPlay(1);
}
if (_global.sound_effect_volume == 0) {
this.sound2.gotoAndPlay(2);
} else {
this.sound2.gotoAndPlay(1);
}
};
this.musicbutton.onRelease = function () {
if (_global.sound_music_volume != 0) {
_global.sound_music_volume = 0;
} else {
_global.sound_music_volume = 100;
}
};
this.effectsbutton.onRelease = function () {
if (_global.sound_effect_volume != 0) {
_global.sound_effect_volume = 0;
} else {
_global.sound_effect_volume = 40;
}
};
kill = function () {
delete this.onEnterFrame;
this.removeMovieClip();
};
Symbol 181 MovieClip [arcadetown_splash] Frame 85
_root.createEmptyMovieClip("menus", 4);
_root.menus.attachMovie("mainMenu", "mainMenu", _root.menus.getNextHighestDepth());
this.removeMovieClip();
Symbol 237 MovieClip [storeFront] Frame 1
this._alpha = 1;
this.alphacounter = 0;
this.onEnterFrame = function () {
_root.stores.storeFront.turretcost = _root.stores.storeValues.turretcost;
_root.stores.storeFront.turretmaxlevel = _root.stores.storeValues.turretmaxlevel;
_root.stores.storeFront.turretlevel = _root.stores.storeValues.turretlevel;
_root.stores.storeFront.damagecost = _root.stores.storeValues.damagecost;
_root.stores.storeFront.damagemaxlevel = _root.stores.storeValues.damagemaxlevel;
_root.stores.storeFront.damagelevel = _root.stores.storeValues.damagelevel;
_root.stores.storeFront.ammoloadercost = _root.stores.storeValues.ammoloadercost;
_root.stores.storeFront.ammoloadermaxlevel = _root.stores.storeValues.ammoloadermaxlevel;
_root.stores.storeFront.ammoloaderlevel = _root.stores.storeValues.ammoloaderlevel;
_root.stores.storeFront.medicalcost = _root.stores.storeValues.medicalcost;
_root.stores.storeFront.medicalmaxlevel = _root.stores.storeValues.medicalmaxlevel;
_root.stores.storeFront.medicallevel = _root.stores.storeValues.medicallevel;
_root.stores.storeFront.smartturretcost = _root.stores.storeValues.smartturretcost;
_root.stores.storeFront.smartturretmaxlevel = _root.stores.storeValues.smartturretmaxlevel;
_root.stores.storeFront.smartturretlevel = _root.stores.storeValues.smartturretlevel;
_root.stores.storeFront.rateoffirecost = _root.stores.storeValues.rateoffirecost;
_root.stores.storeFront.rateoffiremaxlevel = _root.stores.storeValues.rateoffiremaxlevel;
_root.stores.storeFront.rateoffirelevel = _root.stores.storeValues.rateoffirelevel;
_root.stores.storeFront.stspeedcost = _root.stores.storeValues.stspeedcost;
_root.stores.storeFront.stspeedmaxlevel = _root.stores.storeValues.stspeedmaxlevel;
_root.stores.storeFront.stspeedlevel = _root.stores.storeValues.stspeedlevel;
_root.stores.storeFront.machinecost = _root.stores.storeValues.machinecost;
_root.stores.storeFront.machinemaxlevel = _root.stores.storeValues.machinemaxlevel;
_root.stores.storeFront.machinelevel = _root.stores.storeValues.machinelevel;
_root.stores.storeFront.funds = _root.stage.scoreboard.funds;
if (this._alpha > this.alphacounter) {
this._alpha = this._alpha + 10;
if (this._alpha >= 100) {
this._alpha = 100;
}
}
};
_root.stores.storeFront.buydamage.onRelease = function () {
if (_root.stores.storeValues.damagecost <= _root.stage.scoreboard.funds) {
if (_root.stores.storeValues.damagemaxlevel > _root.stores.storeValues.damagelevel) {
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds - _root.stores.storeValues.damagecost;
increasedamage();
_root.stores.storeValues.damagelevel++;
}
}
};
_root.stores.storeFront.buyammoloader.onRelease = function () {
if (_root.stores.storeValues.ammoloadercost <= _root.stage.scoreboard.funds) {
if (_root.stores.storeValues.ammoloadermaxlevel > _root.stores.storeValues.ammoloaderlevel) {
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds - _root.stores.storeValues.ammoloadercost;
increaseammoloader();
_root.stores.storeValues.ammoloaderlevel++;
}
}
};
_root.stores.storeFront.buymedical.onRelease = function () {
if (_root.stores.storeValues.medicalcost <= _root.stage.scoreboard.funds) {
if (_root.stores.storeValues.medicalmaxlevel > _root.stores.storeValues.medicallevel) {
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds - _root.stores.storeValues.medicalcost;
increasemedical();
_root.stores.storeValues.medicallevel++;
}
}
};
_root.stores.storeFront.buysmartturret.onRelease = function () {
if (_root.stores.storeValues.smartturretcost <= _root.stage.scoreboard.funds) {
if (_root.stores.storeValues.smartturretmaxlevel > _root.stores.storeValues.smartturretlevel) {
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds - _root.stores.storeValues.smartturretcost;
addsmartturret();
_root.stores.storeValues.smartturretlevel++;
}
}
};
_root.stores.storeFront.rateoffire.onRelease = function () {
if (_root.stores.storeValues.rateoffirecost <= _root.stage.scoreboard.funds) {
if (_root.stores.storeValues.rateoffiremaxlevel > _root.stores.storeValues.rateoffirelevel) {
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds - _root.stores.storeValues.rateoffirecost;
increaserateoffire();
_root.stores.storeValues.rateoffirelevel++;
}
}
};
_root.stores.storeFront.stspeed.onRelease = function () {
if (_root.stores.storeValues.stspeedcost <= _root.stage.scoreboard.funds) {
if (_root.stores.storeValues.stspeedmaxlevel > _root.stores.storeValues.stspeedlevel) {
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds - _root.stores.storeValues.stspeedcost;
increasestspeed();
_root.stores.storeValues.stspeedlevel++;
}
}
};
_root.stores.storeFront.machine.onRelease = function () {
if (_root.stores.storeValues.machinecost <= _root.stage.scoreboard.funds) {
if (_root.stores.storeValues.machinemaxlevel > _root.stores.storeValues.machinelevel) {
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds - _root.stores.storeValues.machinecost;
increasemachine();
_root.stores.storeValues.machinelevel++;
}
}
};
_root.stores.storeFront.buyturret.onRelease = function () {
if (_root.stores.storeValues.turretcost <= _root.stage.scoreboard.funds) {
if (_root.stores.storeValues.turretmaxlevel > _root.stores.storeValues.turretlevel) {
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds - _root.stores.storeValues.turretcost;
increaseturret();
_root.stores.storeValues.turretlevel++;
}
}
};
_root.stores.storeFront.finished.onRelease = function () {
_root.engine.levelCaller.startNextLevel();
kill();
};
increaseturret = function () {
_root.stores.storeValues.turretincrease(_root.stores.storeValues.turretlevel);
};
increasedamage = function () {
_root.stores.storeValues.damageincrease(_root.stores.storeValues.damagelevel);
};
increaseammoloader = function () {
_root.stores.storeValues.ammoloaderincrease(_root.stores.storeValues.ammoloaderlevel);
};
increasemedical = function () {
_root.stores.storeValues.medicalincrease(_root.stores.storeValues.medicallevel);
};
addsmartturret = function () {
_root.stores.storeValues.addsmartturret(_root.stores.storeValues.smartturretlevel);
};
increaserateoffire = function () {
_root.stores.storeValues.rateoffireincrease(_root.stores.storeValues.rateoffirelevel);
};
increasestspeed = function () {
_root.stores.storeValues.stspeedincrease(_root.stores.storeValues.stspeedlevel);
};
increasemachine = function () {
_root.stores.storeValues.machineincrease(_root.stores.storeValues.machinelevel);
};
kill = function () {
delete this.onEnterFrame;
this.removeMovieClip();
};
Symbol 239 MovieClip [autoTurret] Frame 1
var speed = 0.8;
var damage = 1;
var fireDelay = 30;
var fireCounter = 30;
var finding = true;
var luckyGuy = 0;
var luckX = 0;
var luckY = 0;
var bulletSpeed = 25;
var target = "";
var rotationSpeed = 0.7;
var guyDefined = false;
var tracking = true;
this._parent.turretFire.gotoAndStop(5);
createEmptyMovieClip("smartEngine", -2);
smartEngine.onEnterFrame = function () {
if (_global.pause == false) {
if (_root.stage[target].killed) {
luckX = 0;
luckY = 0;
guyDefined = false;
finding = true;
tracking = true;
}
if (finding == true) {
target = _root.stage.hitDetector.badGuyArray[random(_root.stage.hitDetector.badGuyArray.length)];
if (target == undefined) {
} else {
luckyGuy = _root.stage[target].badguy;
finding = false;
guyDefined = true;
}
}
luckX = 640 - Math.abs(luckyGuy._x);
luckY = _root.stage[target]._y;
if (guyDefined == true) {
var _local5 = Trig.distance(this._parent._x, this._parent._y, luckX, luckY) / bulletSpeed;
var _local4 = (Trig.getAngle(this._parent._x, this._parent._y, luckX - (_local5 * _root.stage[target].speed), luckY) * 180) / Math.PI;
if (tracking == true) {
if (this._parent._rotation < _local4) {
this._parent._rotation = this._parent._rotation + rotationSpeed;
}
if (this._parent._rotation > _local4) {
this._parent._rotation = this._parent._rotation - rotationSpeed;
}
if (Math.abs(this._parent._rotation - _local4) <= rotationSpeed) {
this._parent._rotation = _local4;
tracking = false;
}
}
}
if (finding == false) {
if (tracking == false) {
fireCounter++;
if (fireCounter >= fireDelay) {
fire();
fireCounter = 0;
tracking = true;
}
if (fireCounter >= fireDelay) {
fireCounter = fireDelay;
}
}
}
}
};
fire = function () {
if (_global.pause == false) {
if (_root.stores.storeFront == undefined) {
this.turretFire.gotoAndPlay(1);
_root.turrets.createEmptyMovieClip("shell" + _root.bulletcounter, _root.turrets.getNextHighestDepth());
_root.stage.hitDetector.bulletArray.push("shell" + _root.bulletcounter);
this._parent["shell" + _root.bulletcounter].attachMovie("turretBullet", "bullet1", getNextHighestDepth());
this._parent["shell" + _root.bulletcounter].sound = new Sound(_root.sound_effect_mc);
this._parent["shell" + _root.bulletcounter].sound.attachSound("gunShot");
this._parent["shell" + _root.bulletcounter].sound.start();
this._parent["shell" + _root.bulletcounter].damage = damage;
this._parent["shell" + _root.bulletcounter].bullet1._x = 25;
this._parent["shell" + _root.bulletcounter].speed = bulletSpeed;
this._parent["shell" + _root.bulletcounter]._x = this._x;
this._parent["shell" + _root.bulletcounter]._y = this._y;
this._parent["shell" + _root.bulletcounter]._rotation = this._rotation;
this._parent["shell" + _root.bulletcounter].onEnterFrame = function () {
if (_global.pause == false) {
this.bullet1._x = this.bullet1._x + this.speed;
if (this.bullet1._x >= 700) {
var _local4 = String(this);
_local4 = this._name;
h = 0;
while (h < _root.stage.hitDetector.bulletArray.length) {
if (_local4 == _root.stage.hitDetector.bulletArray[h]) {
_root.stage.hitDetector.bulletArray.splice(h, 1);
}
h++;
}
this.killme = true;
}
}
if (this.killme) {
delete this.onEnterFrame;
this.bullet1.removeMovieClip();
this.removeMovieClip();
}
};
_root.bulletcounter++;
}
}
};
kill = function () {
delete this.onEnterFrame;
delete this.smartEngine.onEnterFrame;
this.smartEngine.removeMovieClip();
this._root.bulletcounter = 0;
this.speed = 0.8;
this.damage = 1;
this.fireDelay = 9;
this.fireCounter = 9;
this.removeMovieClip();
};
stop();
Symbol 243 MovieClip [bomber] Frame 1
this.onEnterFrame = function () {
if (_root.stores.storeFront == undefined) {
if (_global.pause == false) {
play();
} else {
stop();
}
}
};
Symbol 243 MovieClip [bomber] Frame 29
gotoAndPlay (1);
Symbol 243 MovieClip [bomber] Frame 30
_root.stage.healthCaller.healthBar._width = _root.stage.healthCaller.healthBar._width - 4;
this.sound = new Sound(_root.sound_effect_mc);
this.sound.attachSound("kaboom");
this.sound.start();
Symbol 243 MovieClip [bomber] Frame 40
var counter = 0;
var countermax = 90;
this.sound = new Sound(_root.sound_effect_mc);
this.sound.attachSound("kaboom");
this.sound.start();
Symbol 243 MovieClip [bomber] Frame 64
counter++;
Symbol 243 MovieClip [bomber] Frame 65
if (counter < countermax) {
gotoAndPlay(this._currentframe - 1);
}
Symbol 243 MovieClip [bomber] Frame 77
delete eval (this.onEnterFrame());
this._parent.killme = true;
stop();
Symbol 250 MovieClip [bomberWarning] Frame 1
this.exit.onRelease = function () {
if (_global.pause == true) {
_global.pause = false;
_global.pauseDeploy = false;
_root.stage.healthCaller.healthBar._width = 75;
_root.engine.badguysender.deployCounter = 0;
_root.stage.storeFront.kill();
_root.stage.attachMovie("levelChange", "levelChange", _root.stage.getNextHighestDepth());
_root.stage.levelChange.text = "Level " + _root.engine.levelCaller.level;
_root.stage.levelChange._x = 250;
_root.stage.levelChange._y = 195;
kill();
}
};
kill = function () {
this.removeMovieClip();
};
Symbol 257 MovieClip [sniperWarning] Frame 1
this.exit.onRelease = function () {
if (_global.pause == true) {
_global.pause = false;
_global.pauseDeploy = false;
_root.stage.healthCaller.healthBar._width = 75;
_root.engine.badguysender.deployCounter = 0;
_root.stores.storeFront.kill();
_root.stage.attachMovie("levelChange", "levelChange", _root.stage.getNextHighestDepth());
_root.stage.levelChange.text = "Level " + _root.engine.levelCaller.level;
_root.stage.levelChange._x = 250;
_root.stage.levelChange._y = 195;
kill();
}
};
kill = function () {
this.removeMovieClip();
};
Symbol 264 MovieClip [tankWarning] Frame 1
this.exit.onRelease = function () {
if (_global.pause == true) {
_global.pause = false;
_global.pauseDeploy = false;
_root.stage.healthCaller.healthBar._width = 75;
_root.engine.badguysender.deployCounter = 0;
_root.stores.storeFront.kill();
_root.stage.attachMovie("levelChange", "levelChange", _root.stage.getNextHighestDepth());
_root.stage.levelChange.text = "Level " + _root.engine.levelCaller.level;
_root.stage.levelChange._x = 250;
_root.stage.levelChange._y = 195;
kill();
}
};
kill = function () {
this.removeMovieClip();
};
Symbol 265 MovieClip [turretbullet] Frame 1
stop();
Symbol 265 MovieClip [turretbullet] Frame 15
delete this.onEnterFrame;
this._parent.killme = true;
Symbol 266 MovieClip [ammoLoader] Frame 1
var counter = 0;
var counterMax = 50;
this.onEnterFrame = function () {
if (_global.pause == false) {
counter++;
if (counter >= counterMax) {
_root.stage.scoreboard.rounds++;
counter = 0;
}
}
};
kill = function () {
delete this.onEnterFrame;
this.removeMovieClip();
};
Symbol 267 MovieClip [badguysender] Frame 1
var badguycounter = 0;
var badGuySpeed = 1;
var deployCounter = 0;
createEmptyMovieClip("badguyGenerator", -1);
badguyGenerator.counter = 0;
badguyGenerator.countermax = 100;
badguyGenerator.onEnterFrame = function () {
if (_global.pauseDeploy == false) {
this.counter++;
if (this.counter >= this.countermax) {
if (random(100) > 30) {
i = 1;
while (i < (random(4) + 1)) {
Deploy();
deployCounter = deployCounter + 1;
i++;
}
}
this.counter = 0;
}
}
};
Deploy = function () {
_root.stage.createEmptyMovieClip("sender" + badguycounter, _root.stage.getNextHighestDepth());
_root.stage.hitDetector.badGuyArray.push("sender" + badguycounter);
var _local4 = random(1000);
if ((_local4 > 900) && (_root.engine.levelCaller.level >= 6)) {
_root.stage["sender" + badguycounter].attachMovie("tankGuy", "badguy", _root.stage.getNextHighestDepth());
_root.stage["sender" + badguycounter].speed = badGuySpeed * 0.3;
_root.stage["sender" + badguycounter]._y = random(412) + 18.75;
_root.stage["sender" + badguycounter]._x = 650;
_root.stage["sender" + badguycounter].score = 150;
_root.stage["sender" + badguycounter].funds = 50;
_root.stage["sender" + badguycounter].health = 10;
_root.stage["sender" + badguycounter].killed = 0;
_root.stage["sender" + badguycounter].healthDrain = 0.12;
_root.stage["sender" + badguycounter].inRange = (random(200) * -1) + -100;
_root.stage["sender" + badguycounter].onEnterFrame = function () {
if (_global.pause == false) {
this.badguy._x = this.badguy._x - this.speed;
if (this.badguy._x <= this.inRange) {
this.speed = 0;
_root.stage.healthCaller.healthBar._width = _root.stage.healthCaller.healthBar._width - this.healthDrain;
if (this.badguy._currentframe < 30) {
this.badguy.gotoAndPlay("fire");
}
}
}
if (this.killme) {
this.badguy.removeMovieClip();
this.removeMovieClip();
}
};
} else if ((_local4 > 800) && (_root.engine.levelCaller.level >= 4)) {
_root.stage["sender" + badguycounter].attachMovie("bomber", "badguy", _root.stage.getNextHighestDepth());
_root.stage["sender" + badguycounter].speed = 3;
_root.stage["sender" + badguycounter]._y = random(412) + 18.75;
_root.stage["sender" + badguycounter]._x = 650;
_root.stage["sender" + badguycounter].score = 100;
_root.stage["sender" + badguycounter].funds = 40;
_root.stage["sender" + badguycounter].health = 2;
_root.stage["sender" + badguycounter].killed = 0;
_root.stage["sender" + badguycounter].inRange = -600;
_root.stage["sender" + badguycounter].onEnterFrame = function () {
if (_global.pause == false) {
this.badguy._x = this.badguy._x - this.speed;
if (this.badguy._x <= this.inRange) {
this.speed = 0;
if (this.badguy._currentframe < 30) {
this.badguy.gotoAndPlay("explode");
this.killed = 1;
i = 0;
while (i < _root.stage.hitDetector.badGuyArray.length) {
if (this._name == _root.stage.hitDetector.badGuyArray[i]) {
_root.stage.hitDetector.badGuyArray.splice(i, 1);
}
i++;
}
}
}
}
if (this.killme) {
this.badguy.removeMovieClip();
this.removeMovieClip();
}
};
} else if ((_local4 > 700) && (_root.engine.levelCaller.level >= 2)) {
_root.stage["sender" + badguycounter].attachMovie("badguySniper", "badguy", _root.stage.getNextHighestDepth());
_root.stage["sender" + badguycounter].speed = badGuySpeed * 0.75;
_root.stage["sender" + badguycounter]._y = random(412) + 18.75;
_root.stage["sender" + badguycounter]._x = 650;
_root.stage["sender" + badguycounter]._alpha = 40;
_root.stage["sender" + badguycounter].score = 75;
_root.stage["sender" + badguycounter].funds = 30;
_root.stage["sender" + badguycounter].health = 2;
_root.stage["sender" + badguycounter].killed = 0;
_root.stage["sender" + badguycounter].healthDrain = 0.028;
_root.stage["sender" + badguycounter].inRange = (random(200) * -1) + -100;
_root.stage["sender" + badguycounter].onEnterFrame = function () {
if (_global.pause == false) {
this.badguy._x = this.badguy._x - this.speed;
if (this.badguy._x <= this.inRange) {
this.speed = 0;
_root.stage.healthCaller.healthBar._width = _root.stage.healthCaller.healthBar._width - this.healthDrain;
if (this.badguy._currentframe < 30) {
this.badguy.gotoAndPlay("fire");
}
}
}
if (this.killme) {
this.badguy.removeMovieClip();
this.removeMovieClip();
}
};
} else {
_root.stage["sender" + badguycounter].attachMovie("badguy", "badguy", _root.stage.getNextHighestDepth());
_root.stage["sender" + badguycounter].speed = badGuySpeed;
_root.stage["sender" + badguycounter]._y = random(412) + 18.75;
_root.stage["sender" + badguycounter]._x = 650;
_root.stage["sender" + badguycounter].score = 50;
_root.stage["sender" + badguycounter].funds = 20;
_root.stage["sender" + badguycounter].health = 2;
_root.stage["sender" + badguycounter].killed = 0;
_root.stage["sender" + badguycounter].healthDrain = 0.026;
_root.stage["sender" + badguycounter].inRange = (random(100) * -1) + -400;
_root.stage["sender" + badguycounter].onEnterFrame = function () {
if (_global.pause == false) {
this.badguy._x = this.badguy._x - this.speed;
if (this.badguy._x <= this.inRange) {
this.speed = 0;
_root.stage.healthCaller.healthBar._width = _root.stage.healthCaller.healthBar._width - this.healthDrain;
if (this.badguy._currentframe < 30) {
this.badguy.gotoAndPlay("fire");
}
}
}
if (this.killme) {
this.badguy.removeMovieClip();
this.removeMovieClip();
}
};
}
badguycounter++;
};
kill = function () {
delete this.onEnterFrame;
delete _root.engine.badguysender.badguyGenerator.onEnterFrame;
removeMovieClip(_root.engine.badguysender.badguyGenerator);
this.badguycounter = 0;
this.badGuySpeed = 1;
this.deployCounter = 0;
this.removeMovieClip();
};
Symbol 268 MovieClip [healthCaller] Frame 1
attachMovie("healthBar", "healthBar", getNextHighestDepth());
attachMovie("healthText", "healthText", getNextHighestDepth());
this.healthBar._width = 75;
this.healthBar._x = 120;
this.healthBar._y = 6;
this.onEnterFrame = function () {
if (_global.pause == false) {
if (this.healthBar._width <= 1) {
killall();
}
}
};
killall = function () {
_root.stage.scoreboard._alpha = 0;
_root.engine.badguysender.kill();
i = 0;
while (i < _root.stage.hitDetector.badGuyArray.length) {
removeMovieClip(_root.stage[_root.stage.hitDetector.badGuyArray[i]]);
i++;
}
h = 0;
while (h < _root.stage.hitDetector.bulletArray.length) {
removeMovieClip(_root.stage[_root.stage.hitDetector.bulletArray[h]]);
h++;
}
i = 0;
while (i < _root.stage.hitDetector.badGuyArray.length) {
_root.stage.hitDetector.badGuyArray.pop();
i++;
}
h = 0;
while (h < _root.stage.hitDetector.bulletArray.length) {
_root.stage.hitDetector.bulletArray.pop();
h++;
}
_root.killListener();
_root.stores.storeValues.kill();
_root.stage.backGround.kill();
_root.turrets.Turret.kill();
_root.turrets.autoTurret.kill();
_root.turrets.autoTurret2.kill();
_root.engine.healthRegen.kill();
_root.engine.ammoLoader.kill();
_root.stage.hitDetector.kill();
_root.engine.levelCaller.kill();
_root.stage.attachMovie("gameover", "gameover", _root.stage.getNextHighestDepth());
_root.ScoreVal = _root.stage.scoreboard.score;
_root.stage.healthCaller.kill();
};
kill = function () {
delete this.onEnterFrame;
removeMovieClip(_root.stage.healthCaller.healthBar);
removeMovieClip(_root.stage.healthCaller.healthText);
this.removeMovieClip();
};
Symbol 269 MovieClip [healthRegen] Frame 1
var counter = 0;
var healthCounter = 50;
this.onEnterFrame = function () {
if (_global.pause == false) {
counter++;
if (counter >= healthCounter) {
if (_root.stage.healthCaller.healthBar._width < 75) {
_root.stage.healthCaller.healthBar._width++;
}
counter = 0;
}
}
};
kill = function () {
delete this.onEnterFrame;
this.counter = 0;
this.healthCounter = 50;
this.removeMovieClip();
};
Symbol 270 MovieClip [hitDetector] Frame 1
var bulletArray = new Array();
var badGuyArray = new Array();
createEmptyMovieClip("ArrayTests", -1);
this.ArrayTests.onEnterFrame = function () {
if (_global.pause == false) {
h = 0;
while (h < bulletArray.length) {
i = 0;
while (i < badGuyArray.length) {
if (_root.turrets[bulletArray[h]].hitTest(_root.stage[badGuyArray[i]])) {
_root.stage[badGuyArray[i]].health = _root.stage[badGuyArray[i]].health - _root.turrets[bulletArray[h]].damage;
if (_root.stage[badGuyArray[i]].health >= 1) {
_root.turrets[bulletArray[h]].speed = 0;
_root.turrets[bulletArray[h]].bullet1.gotoAndPlay("explosion");
_root.stage.hitDetector.bulletArray.splice(h, 1);
}
if (_root.stage[badGuyArray[i]].health <= 0) {
_root.turrets[bulletArray[h]].speed = 0;
_root.stage[badGuyArray[i]].badguy._rotation = _root.turrets[bulletArray[h]]._rotation;
_root.turrets[bulletArray[h]].bullet1.gotoAndPlay("explosion");
_root.stage[badGuyArray[i]].speed = 0;
_root.stage[badGuyArray[i]].killed = 1;
_root.stage[badGuyArray[i]]._alpha = 100;
_root.stage[badGuyArray[i]].badguy.gotoAndPlay("blood");
_root.stage[badGuyArray[i]].healthDrain = 0;
_root.stage.scoreboard.score = _root.stage.scoreboard.score + _root.stage[badGuyArray[i]].score;
_root.stage.scoreboard.funds = _root.stage.scoreboard.funds + _root.stage[badGuyArray[i]].funds;
_root.stage.hitDetector.bulletArray.splice(h, 1);
_root.stage.hitDetector.badGuyArray.splice(i, 1);
}
}
i++;
}
h++;
}
removeMovieClip(_root.turrets[bulletArray[h]]);
_root.stage.hitDetector.bulletArray.splice(h, 1);
}
};
kill = function () {
delete this.ArrayTests.onEnterFrame;
this.ArrayTests.removeMovieClip();
this.removeMovieClip();
};
Symbol 271 MovieClip [levelCaller] Frame 1
var level = 0;
var maxDeploy = 1;
this.onEnterFrame = function () {
if (_global.pause == false) {
if (_root.engine.badguysender.deployCounter >= maxDeploy) {
_global.pauseDeploy = true;
if (_root.stage.hitDetector.badGuyArray.length == 0) {
_root.stage.healthCaller.healthBar._width = 75;
_root.stage.scoreboard.rounds = _root.stage.scoreboard.rounds + 15;
openStore();
}
}
}
};
increaselevel = function (f_level) {
switch (f_level) {
case 1 :
_root.engine.badguysender.badGuySpeed = (random(10) / 10) + 0.5;
_root.engine.badguysender.badguyGenerator.countermax = 50;
maxDeploy = 7;
break;
case 2 :
_root.engine.badguysender.badGuySpeed = (random(15) / 10) + 0.5;
_root.engine.badguysender.badguyGenerator.countermax = 40;
maxDeploy = 12;
break;
case 3 :
_root.engine.badguysender.badGuySpeed = (random(20) / 10) + 0.75;
_root.engine.badguysender.badguyGenerator.countermax = 35;
maxDeploy = 18;
break;
case 4 :
_root.engine.badguysender.badGuySpeed = (random(25) / 10) + 1;
_root.engine.badguysender.badguyGenerator.countermax = 30;
maxDeploy = 30;
break;
case 5 :
_root.engine.badguysender.badGuySpeed = (random(30) / 10) + 1.1;
_root.engine.badguysender.badguyGenerator.countermax = 25;
maxDeploy = 40;
break;
case 6 :
_root.engine.badguysender.badGuySpeed = (random(35) / 10) + 1.3;
_root.engine.badguysender.badguyGenerator.countermax = 25;
maxDeploy = 50;
break;
case 7 :
_root.engine.badguysender.badGuySpeed = (random(40) / 10) + 1.6;
_root.engine.badguysender.badguyGenerator.countermax = 20;
maxDeploy = 60;
break;
case 8 :
_root.engine.badguysender.badGuySpeed = (random(45) / 10) + 1.9;
_root.engine.badguysender.badguyGenerator.countermax = 20;
maxDeploy = 80;
break;
case 9 :
_root.engine.badguysender.badGuySpeed = (random(55) / 10) + 2.1;
_root.engine.badguysender.badguyGenerator.countermax = 15;
maxDeploy = 100;
break;
case 10 :
_root.engine.badguysender.badGuySpeed = (random(55) / 10) + 2.4;
_root.engine.badguysender.badguyGenerator.countermax = 20;
maxDeploy = 120;
break;
case 11 :
_root.engine.badguysender.badGuySpeed = (random(55) / 10) + 2.7;
_root.engine.badguysender.badguyGenerator.countermax = 20;
maxDeploy = 150;
break;
case 12 :
_root.engine.badguysender.badGuySpeed = (random(55) / 10) + 3.2;
_root.engine.badguysender.badguyGenerator.countermax = 20;
maxDeploy = 180;
break;
case 13 :
_root.engine.badguysender.badGuySpeed = (random(55) / 10) + 4;
_root.engine.badguysender.badguyGenerator.countermax = 20;
maxDeploy = 220;
break;
case 14 :
_root.engine.badguysender.badGuySpeed = (random(55) / 10) + 5;
_root.engine.badguysender.badguyGenerator.countermax = 20;
maxDeploy = 10000;
}
};
startNextLevel = function () {
if (_root.engine.levelCaller.level == 2) {
_root.stores.storeFront._alpha = 0;
_root.stage.attachMovie("sniperWarning", "sniperWarning", _root.stage.getNextHighestDepth());
} else if (_root.engine.levelCaller.level == 4) {
_root.stores.storeFront._alpha = 0;
_root.stage.attachMovie("bomberWarning", "bomberWarning", _root.stage.getNextHighestDepth());
} else if (_root.engine.levelCaller.level == 6) {
_root.stores.storeFront._alpha = 0;
_root.stage.attachMovie("tankWarning", "tankWarning", _root.stage.getNextHighestDepth());
} else if (_global.pause == true) {
_global.pause = false;
_global.pauseDeploy = false;
_root.engine.badguysender.deployCounter = 0;
_root.stores.storeFront.kill();
_root.stage.attachMovie("levelChange", "levelChange", _root.stage.getNextHighestDepth());
_root.stage.levelChange.text = "Level " + level;
_root.stage.levelChange._x = 250;
_root.stage.levelChange._y = 195;
}
};
level++;
increaselevel(level);
startNextLevel();
kill = function () {
delete this.onEnterFrame;
this.level = 0;
this.maxDeploy = 1;
this.removeMovieClip();
};
openStore = function () {
_global.pause = true;
_root.stores.attachMovie("storeFront", "storeFront", _root.stores.getNextHighestDepth());
_root.turrets.autoTurret.finding = true;
_root.turrets.autoTurret2.finding = true;
level++;
increaselevel(level);
};
stop();
Symbol 273 MovieClip [levelChange] Frame 1
this._alpha = 1;
this.alphaCounter = 1;
this.onEnterFrame = function () {
if (this.alphaCounter > 0) {
this._alpha++;
} else {
this._alpha--;
}
if (this._alpha <= 0) {
delete onEnterFrame;
removeMovieClip(this);
} else if (this._alpha >= 100) {
this.alphaCounter = -1;
}
};
kill = function () {
delete this.onEnterFrame;
this.removeMovieClip();
};
Symbol 274 MovieClip [storeValues] Frame 1
var turretcost = 50;
var turretlevel = 0;
var turretmaxlevel = 5;
var damagecost = 50;
var damagelevel = 0;
var damagemaxlevel = 5;
var ammoloadercost = 50;
var ammoloaderlevel = 0;
var ammoloadermaxlevel = 5;
var medicalcost = 50;
var medicallevel = 0;
var medicalmaxlevel = 5;
var smartturretcost = 600;
var smartturretlevel = 0;
var smartturretmaxlevel = 2;
var rateoffirecost = 100;
var rateoffirelevel = 0;
var rateoffiremaxlevel = 5;
var stspeedcost = 100;
var stspeedlevel = 0;
var stspeedmaxlevel = 5;
var machinecost = 3000;
var machinelevel = 0;
var machinemaxlevel = 1;
turretincrease = function (f_turretlevel) {
switch (f_turretlevel) {
case 0 :
_root.turrets.Turret.speed = 1.2;
_root.stores.storeValues.turretcost = 100;
break;
case 1 :
_root.turrets.Turret.speed = 1.6;
_root.stores.storeValues.turretcost = 200;
break;
case 2 :
_root.turrets.Turret.speed = 2;
_root.stores.storeValues.turretcost = 400;
break;
case 3 :
_root.turrets.Turret.speed = 2.4;
_root.stores.storeValues.turretcost = 600;
break;
case 4 :
_root.turrets.Turret.speed = 3;
_root.stores.storeValues.turretcost = 1200;
}
};
damageincrease = function (f_damagelevel) {
switch (f_damagelevel) {
case 0 :
_root.turrets.Turret.damage = 2;
_root.stores.storeValues.damagecost = 100;
break;
case 1 :
_root.turrets.Turret.damage = 3;
_root.stores.storeValues.damagecost = 200;
break;
case 2 :
_root.turrets.Turret.damage = 4;
_root.stores.storeValues.damagecost = 400;
break;
case 3 :
_root.turrets.Turret.damage = 5;
_root.stores.storeValues.damagecost = 600;
break;
case 4 :
_root.turrets.Turret.damage = 6;
_root.stores.storeValues.damagecost = 1200;
}
};
ammoloaderincrease = function (f_ammoloaderlevel) {
switch (f_ammoloaderlevel) {
case 0 :
_root.engine.ammoLoader.counterMax = 50;
_root.stores.storeValues.ammoloadercost = 100;
break;
case 1 :
_root.engine.ammoLoader.counterMax = 40;
_root.stores.storeValues.ammoloadercost = 200;
break;
case 2 :
_root.engine.ammoLoader.counterMax = 20;
_root.stores.storeValues.ammoloadercost = 400;
break;
case 3 :
_root.engine.ammoLoader.counterMax = 10;
_root.stores.storeValues.ammoloadercost = 600;
break;
case 4 :
_root.engine.ammoLoader.counterMax = 5;
_root.stores.storeValues.ammoloadercost = 1200;
}
};
medicalincrease = function (f_medicallevel) {
switch (f_medicallevel) {
case 0 :
_root.engine.healthRegen.healthCounter = 45;
_root.stores.storeValues.medicalcost = 100;
break;
case 1 :
_root.engine.healthRegen.healthCounter = 40;
_root.stores.storeValues.medicalcost = 200;
break;
case 2 :
_root.engine.healthRegen.healthCounter = 35;
_root.stores.storeValues.medicalcost = 600;
break;
case 3 :
_root.engine.healthRegen.healthCounter = 30;
_root.stores.storeValues.medicalcost = 1200;
break;
case 4 :
_root.engine.healthRegen.healthCounter = 25;
_root.stores.storeValues.medicalcost = 2400;
}
};
addsmartturret = function (f_smartturretlevel) {
switch (f_smartturretlevel) {
case 0 :
_root.turrets.attachMovie("autoTurret", "autoTurret", 5);
_root.turrets.autoTurret._x = 60;
_root.turrets.autoTurret._y = 40;
_root.stores.storeValues.smartturretcost = 1200;
break;
case 1 :
_root.turrets.attachMovie("autoTurret", "autoTurret2", 6);
_root.turrets.autoTurret2._x = 60;
_root.turrets.autoTurret2._y = 440;
_root.stores.storeValues.smartturretcost = 2000;
}
};
rateoffireincrease = function (f_rateoffirelevel) {
switch (f_rateoffirelevel) {
case 0 :
_root.turrets.autoTurret.fireDelay = 25;
_root.turrets.autoTurret2.fireDelay = 25;
_root.stores.storeValues.rateoffirecost = 200;
break;
case 1 :
_root.turrets.autoTurret.fireDelay = 20;
_root.turrets.autoTurret2.fireDelay = 20;
_root.stores.storeValues.rateoffirecost = 400;
break;
case 2 :
_root.turrets.autoTurret.fireDelay = 15;
_root.turrets.autoTurret2.fireDelay = 15;
_root.stores.storeValues.rateoffirecost = 600;
break;
case 3 :
_root.turrets.autoTurret.fireDelay = 10;
_root.turrets.autoTurret2.fireDelay = 10;
_root.stores.storeValues.rateoffirecost = 1200;
break;
case 4 :
_root.turrets.autoTurret.fireDelay = 8;
_root.turrets.autoTurret2.fireDelay = 8;
_root.stores.storeValues.rateoffirecost = 2000;
}
};
stspeedincrease = function (f_stspeedlevel) {
switch (f_stspeedlevel) {
case 0 :
_root.turrets.autoTurret.rotationSpeed = 0.8;
_root.turrets.autoTurret2.rotationSpeed = 0.8;
_root.stores.storeValues.stspeedcost = 200;
break;
case 1 :
_root.turrets.autoTurret.rotationSpeed = 0.9;
_root.turrets.autoTurret2.rotationSpeed = 0.9;
_root.stores.storeValues.stspeedcost = 400;
break;
case 2 :
_root.turrets.autoTurret.rotationSpeed = 1;
_root.turrets.autoTurret2.rotationSpeed = 1;
_root.stores.storeValues.stspeedcost = 600;
break;
case 3 :
_root.turrets.autoTurret.rotationSpeed = 1.1;
_root.turrets.autoTurret2.rotationSpeed = 1.1;
_root.stores.storeValues.stspeedcost = 800;
break;
case 4 :
_root.turrets.autoTurret.rotationSpeed = 1.4;
_root.turrets.autoTurret2.rotationSpeed = 25;
_root.stores.storeValues.stspeedcost = 1000;
}
};
machineincrease = function (f_machinelevel) {
if (!(f_machinelevel === 0)) {
} else {
_root.turrets.Turret.machineFire = true;
_root.stores.storeValues.machinecost = 0;
}
};
kill = function () {
this.removeMovieClip();
};
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 2
stop();
Symbol 292 MovieClip [mainMenu] Frame 1
this.play.onRelease = function () {
_root.init();
this._parent.removeMovieClip();
};
this.controls.onRelease = function () {
this._alpha = 0;
_root.menus.attachMovie("menuControls", "menuControls", _root.menus.getNextHighestDepth());
};
this.arcadetown.onRelease = function () {
getURL ((("http://www.arcadetown.com/index.asp?gameid=armedinvasion&aid=" + _root.GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
};
this.highscores.onRelease = function () {
getURL ("http://www.arcadetown.com/armedinvasion/view_high_scores.asp", "_blank");
};
this.freecontent.onRelease = function () {
getURL ("http://www.arcadetown.com/free_content/index.asp", "_blank");
};
this.finalfortress.onRelease = function () {
getURL ("http://www.arcadetown.com/finalfortress/game.asp");
};
this.soundon.onRelease = function () {
_global.sound_music_volume = 100;
_global.sound_effect_volume = 40;
};
this.controls.onRollOver = function () {
this._parent.controlsborder.gotoAndPlay(2);
};
this.controls.onRollOut = function () {
this._parent.controlsborder.gotoAndPlay(1);
};
this.play.onRollOver = function () {
this._parent.playborder.gotoAndPlay(2);
};
this.play.onRollOut = function () {
this._parent.playborder.gotoAndPlay(1);
};
this.highscores.onRollOver = function () {
this._parent.highscoresborder.gotoAndPlay(2);
};
this.highscores.onRollOut = function () {
this._parent.highscoresborder.gotoAndPlay(1);
};
this.soundoff.onRelease = function () {
_global.sound_music_volume = 0;
_global.sound_effect_volume = 0;
};
Symbol 305 MovieClip [menuControls] Frame 1
_root.menus.menuControls.mainMenu.onRelease = function () {
_root.menus.menuControls._alpha = 0;
_root.menus.mainMenu._alpha = 100;
this._parent.removeMovieClip();
};
Symbol 315 MovieClip Frame 1
this._visible = false;
this.volume = 0;
stop();