Frame 1
_level0.bitch = 0;
_root.onEnterFrame = function () {
_level0.warning._alpha = _level0.warning._alpha - 3;
};
stopAllSounds();
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar.gotoAndStop(percentLoaded);
Frame 2
if (_root.percentLoaded == 100) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 3
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);
}
__com_mochibot__("78c83f00", this, 10301, true);
Frame 344
sounds = new Sound();
for (instance in this) {
v = this[instance];
v.removeMovieClip();
}
delete onEnterFrame;
function itemHandler1(obj, item) {
getURL ("http://www.newgrounds.com/gold/profile/template.php3?id=1234803");
}
function itemHandler2(obj, item) {
getURL ("http://www.newgrounds.com/gold/profile/template.php3?id=1867305");
}
function itemHandler3(obj, item) {
getURL ("http://armorgames.com");
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.builtInItems.quality = true;
myMenu.customItems.push(new ContextMenuItem("Programmer: El-Presidente", itemHandler1), new ContextMenuItem("Graphics: St1k", itemHandler2), new ContextMenuItem("Sponser: BootGamer", itemHandler3));
_root.menu = myMenu;
stop();
Frame 345
MovieClip.prototype.inRadiusOf = function (target, radi) {
xd = target._x - this._x;
yd = target._y - this._y;
dis = Math.sqrt((xd * xd) + (yd * yd));
if ((target != "") || (target != undefined)) {
target.radius = target._width / 2;
} else {
return(false);
}
rads = target.radius + (radi / 2);
if (dis <= rads) {
return(true);
}
return(false);
};
MovieClip.prototype.showups = function () {
if (this.online == true) {
((this.upbar != undefined) ? (this.upbar.removeMovieClip()) : null);
} else {
((this.upbar == undefined) ? (this.attachMovie("bar", "upbar", 1)) : null);
this.upbar._y = this._height / 2;
this.upbar._x = (-this.upbar._width) / 2;
this.upbar.bar._width = (this.coff / this.offtime) * 36;
}
};
MovieClip.prototype.clearups = function () {
this.upbar.removeMovieClip();
};
MovieClip.prototype.showRange = function (range, x, y) {
this.clear();
this.lineStyle(2, 16777215, 64);
this.moveTo(x + ((1 * range) / 2), y + ((0 * range) / 2));
i = 1;
while (i < 360) {
this.lineTo(x + ((Math.cos(i * (Math.PI/180)) * range) / 2), y + ((Math.sin(i * (Math.PI/180)) * range) / 2));
i = i + 15;
}
};
MovieClip.prototype.showAmp = function (range, x, y) {
this.clear();
this.lineStyle(2, 3381708, 64);
this.beginFill(3394815, 32);
this.moveTo(x + ((1 * range) / 2), y + ((0 * range) / 2));
i = 1;
while (i < 360) {
this.lineTo(x + ((Math.cos(i * (Math.PI/180)) * range) / 2), y + ((Math.sin(i * (Math.PI/180)) * range) / 2));
i = i + 10;
}
};
MovieClip.prototype.drawLaser = function (fromX, fromY, toX, toY, offSetX, offSetY, amount, bottomCol, topCol, size) {
xrArr = new Array();
yrArr = new Array();
j = 1;
while (j <= amount) {
xrArr.push((Math.random() * offSetX) - (offSetX / 2));
yrArr.push((Math.random() * offSetY) - (offSetY / 2));
j++;
}
this.lineStyle(size, bottomCol, 100);
this.moveTo(fromX, fromY);
i = 1;
while (i < amount) {
this.lineTo(fromX + (((i * (toX - fromX)) / amount) + xrArr[i]), fromY + (((i * (toY - fromY)) / amount) + yrArr[i]));
i++;
}
this.lineTo(toX, toY);
this.lineStyle(size / 2, topCol, 100);
this.moveTo(fromX, fromY);
i = 1;
while (i < amount) {
this.lineTo(fromX + (((i * (toX - fromX)) / amount) + xrArr[i]), fromY + (((i * (toY - fromY)) / amount) + yrArr[i]));
i++;
}
this.lineTo(toX, toY);
};
MovieClip.prototype.fire = function () {
this.t = this.spd - this.spdplus;
_level0.shots.attachMovie(this.turrettype + this.shottype, (this.turrettype + this.shottype) + _level0.shots.count, _level0.shots.count);
_level0.shots[(this.turrettype + this.shottype) + _level0.shots.count].parent = this;
_level0.shots[(this.turrettype + this.shottype) + _level0.shots.count].cacheAsBitmap = true;
_level0.shots[(this.turrettype + this.shottype) + _level0.shots.count].shotload();
_level0.shots.count++;
};
MovieClip.prototype.shotload = function () {
this.xs = this.parent.shotspd;
this.ys = this.xs;
this._rotation = this.parent.turret._rotation;
this.equ = this._rotation * (Math.PI/180);
this._x = this.parent._x + (Math.cos(this.equ) * 16);
this._y = this.parent._y + (Math.sin(this.equ) * 16);
this.attack = this.parent.attack + this.parent.atkplus;
this.target_ = this.parent.target;
};
MovieClip.prototype.shotbehave = function () {
i = 0;
while (i <= _level0.earr.length) {
if (this.hitTest(_level0.enemies[_level0.earr[i]].body) && (_level0.enemies[_level0.earr[i]].alive == true)) {
_level0.enemies[_level0.earr[i]].chp = _level0.enemies[_level0.earr[i]].chp - this.attack;
this.removeMovieClip();
}
i++;
}
this._x = this._x + (Math.cos(this._rotation * (Math.PI/180)) * this.xs);
this._y = this._y + (Math.sin(this._rotation * (Math.PI/180)) * this.ys);
if ((((this._x > Stage.width) || (this._x < 0)) || (this._y < 0)) || (this._y > Stage.height)) {
this.removeMovieClip();
}
};
MovieClip.prototype.iceshotbehave = function () {
i = 0;
while (i <= _level0.earr.length) {
if (this.hitTest(_level0.enemies[_level0.earr[i]].body) && (_level0.enemies[_level0.earr[i]].alive == true)) {
_level0.enemies[_level0.earr[i]].chp = _level0.enemies[_level0.earr[i]].chp - this.attack;
_level0.enemies[_level0.earr[i]].xs = _level0.enemies[_level0.earr[i]].xs - this.freeze;
this.removeMovieClip();
}
i++;
}
this._x = this._x + (Math.cos(this._rotation * (Math.PI/180)) * this.xs);
this._y = this._y + (Math.sin(this._rotation * (Math.PI/180)) * this.ys);
if ((((this._x > Stage.width) || (this._x < 0)) || (this._y < 0)) || (this._y > Stage.height)) {
this.removeMovieClip();
}
};
MovieClip.prototype.turretbehaviour = function () {
this.atkplus = 0;
this.spdplus = 0;
this.rngplus = 0;
this.onPress = function () {
this.turretpress();
};
if (_level0.tum.target_ == this) {
_level0.tunderfx.showRange(this.range, this._x, this._y);
}
if (this.online == true) {
i = 0;
while (i < _level0.upsarr.length) {
if (_level0.toverfx.ups[_level0.upsarr[i]].hitTest(this._x, this._y, true)) {
this.atkplus = this.atkplus + (this.attack * _level0.toverfx.ups[_level0.upsarr[i]].parent.attackmultiplier);
this.spdplus = this.spdplus - (this.spd * _level0.toverfx.ups[_level0.upsarr[i]].parent.speedmultiplier);
this.rngplus = this.rngplus + (this.range * _level0.toverfx.ups[_level0.upsarr[i]].parent.rangemultiplier);
}
i++;
}
if (this.halt == false) {
((this.upbar != undefined) ? (this.upbar.removeMovieClip()) : null);
if (_level0.power >= 0) {
_level0.power = _level0.power - (0.1 * this._currentframe);
if (this.target_ == "") {
i = 0;
while (i <= _level0.earr.length) {
if ((_level0.earr[i] == "") || (_level0.earr[i] == null)) {
_level0.earr.splice(i, 1);
break;
}
if (this.inRadiusOf(_level0.enemies["e" + i], this.range) && (_level0.enemies["e" + i].alive == true)) {
this.target_ = _level0.enemies["e" + i];
}
i = i + Math.round(Math.random() * _level0.earr.length);
}
}
this.t--;
if ((!this.inRadiusOf(this.target_, this.range)) || (this.target_.alive == false)) {
this.target_ = "";
}
if (this.target_ != "") {
this.targetRot = (Math.atan2(this.target_._y - this._y, this.target_._x - this._x) * 180) / Math.PI;
if (this.t <= 0) {
if (Math.abs(((Math.atan2(this.target_._y - this._y, this.target_._x - this._x) * 180) / Math.PI) - this.turret._rotation) < 6) {
this.fire();
}
}
} else {
((this.targetRot == undefined) ? ((this.targetRot = 0)) : ((this.targetRot = this.targetRot)));
this.targetRot = this.targetRot + 4;
}
if ((this.turret._rotation - this.targetRot) > 180) {
this.targetRot = this.targetRot + 360;
} else if ((this.turret._rotation - this.targetRot) < -180) {
this.targetRot = this.targetRot - 360;
}
this.changeRot = (this.targetRot - this.turret._rotation) / this.ease;
this.turret._rotation = this.turret._rotation + this.changeRot;
}
}
}
if (((this.coff < this.offtime) && (this.online == false)) && (!(_level0.tum.target_ === this))) {
this.showups();
} else {
this.clearups();
}
};
MovieClip.prototype.boombehaviour = function () {
this.onPress = function () {
this.turretpress();
};
if (this.coff <= 0) {
this.online = true;
}
if (this.online == true) {
if (this.halt == false) {
((this.upbar != undefined) ? (this.upbar.removeMovieClip()) : null);
if (_level0.power >= 0) {
_level0.power = _level0.power - (0.1 * this._currentframe);
if (this.target_ == "") {
this.cutter.body.active = false;
i = 0;
while (i <= _level0.earr.length) {
if ((_level0.earr[i] == "") || (_level0.earr[i] == null)) {
_level0.earr.splice(i, 1);
break;
}
if (this.inRadiusOf(_level0.enemies["e" + i], this.range) && (_level0.enemies["e" + i].alive == true)) {
this.target_ = _level0.enemies["e" + i];
}
i = i + Math.round(Math.random() * _level0.earr.length);
}
}
this.t--;
if (this.target_ != "") {
if (this.t <= 0) {
this.targetRot = (Math.atan2(this.target_._y - this._y, this.target_._x - this._x) * 180) / Math.PI;
if (Math.abs(((Math.atan2(this.target_._y - this._y, this.target_._x - this._x) * 180) / Math.PI) - this.cutter.atkdir._rotation) < 18) {
this.fire();
}
}
if (this.cutter.body.hitTest(this.base) && (this.cutter.body.t <= 0)) {
this.target_ = "";
}
} else {
((this.targetRot == undefined) ? ((this.targetRot = 0)) : ((this.targetRot = this.targetRot)));
this.targetRot = this.targetRot + 4;
}
if ((this.cutter.atkdir._rotation - this.targetRot) > 180) {
this.targetRot = this.targetRot + 360;
} else if ((this.cutter.atkdir._rotation - this.targetRot) < -180) {
this.targetRot = this.targetRot - 360;
}
this.changeRot = (this.targetRot - this.cutter.atkdir._rotation) / this.ease;
this.cutter.atkdir._rotation = this.cutter.atkdir._rotation + this.changeRot;
}
}
}
if (((this.coff < this.offtime) && (this.online == false)) && (!(_level0.tum.target_ === this))) {
this.showups();
} else {
this.clearups();
}
};
MovieClip.prototype.laserbehaviour = function () {
this.onPress = function () {
this.turretpress();
};
_level0.lasers["laser" + this.num].clear();
if (this.coff <= 0) {
this.online = true;
}
if (this.online == true) {
if (this.halt == false) {
((this.upbar != undefined) ? (this.upbar.removeMovieClip()) : null);
if (_level0.power >= 0) {
_level0.power = _level0.power - (0.5 * this._currentframe);
if (this.target_ == "") {
i = 0;
while (i <= _level0.earr.length) {
if ((_level0.earr[i] == "") || (_level0.earr[i] == null)) {
_level0.earr.splice(i, 1);
break;
}
if (this.inRadiusOf(_level0.enemies["e" + i], this.range) && (_level0.enemies["e" + i].alive == true)) {
this.target_ = _level0.enemies["e" + i];
}
i = i + Math.round(Math.random() * _level0.earr.length);
}
}
if (((!this.inRadiusOf(this.target_, this.range)) && (this.target_ != "")) || (this.target_.alive == false)) {
this.target_ = "";
}
this.t--;
if (this.target_ != "") {
_level0.lasers["laser" + this.num].drawLaser(0, 0, this.target_._x - this._x, this.target_._y - this._y, 12, 12, 16, 11184810, 16777215, this.size_);
i = 0;
while (i <= _level0.earr.length) {
if (_level0.lasers["laser" + this.num].hitTest(_level0.enemies[_level0.earr[i]]._x, _level0.enemies[_level0.earr[i]]._y, true)) {
_level0.enemies[_level0.earr[i]].chp = _level0.enemies[_level0.earr[i]].chp - this.attack;
}
i++;
}
}
}
}
}
if (((this.coff < this.offtime) && (this.online == false)) && (!(_level0.tum.target_ === this))) {
this.showups();
} else {
this.clearups();
}
};
MovieClip.prototype.otherbehaviour = function () {
this.onPress = function () {
this.turretpress();
};
if (((this.coff < this.offtime) && (this.online == false)) && (!(_level0.tum.target_ === this))) {
this.showups();
} else {
this.clearups();
}
};
warning = function (ms) {
_level0.attachMovie("warning", "warn", 100);
_level0.warn.msg.htmlText = ("<b>" + ms) + "</b>";
};
mousemsg = function (ms) {
_level0.attachMovie("mousemsg", "mmsg", 20);
_level0.mmsg.msg.htmlText = ("<b>" + ms) + "</b>";
};
clearmousemsg = function () {
_level0.mmsg.removeMovieClip();
removeMovieClip(_level0.mousemsg);
};
nextwave = function () {
_level0.wave++;
if (!(_level0.wave === 0)) {
i = _level0.earr.length;
while (i > 0) {
if ((_level0.earr[i] == null) || (_level0.earr[i] == "")) {
_level0.earr.splice(i, 1);
}
i--;
}
_level0.enemies.count = 0;
_level0.ehp = _level0.ehp + (_level0.ehp / 2);
_level0.ereserve = 7;
_level0.cen = _level0.cen + 7;
}
_level0.wavetime = _level0.mwavetime;
var _local1 = SharedObject.getLocal("turdef");
if (_level0.wave > _local1.data["bestwave" + _level0.difficulty]) {
_local1.data["bestwave" + _level0.difficulty]++;
_local1.flush();
}
if (_local1.data["bestwave" + _level0.difficulty] != undefined) {
_level0["bestwave" + _level0.difficulty] = _local1.data["bestwave" + _level0.difficulty];
} else {
_local1.data["bestwave" + _level0.difficulty] = 1;
_level0["bestwave" + _level0.difficulty] = _local1.data["bestwave" + _level0.difficulty];
}
};
MovieClip.prototype.turretpress = function () {
if (Key.isDown(77)) {
_level0.attachMovie("tum", "tum", 98);
_level0.tum.target_ = this;
} else if (Key.isDown(72)) {
if (this.halt == false) {
this.halt = true;
} else {
this.halt = false;
}
} else if (Key.isDown(86)) {
_level0.upgradeTurret(this);
} else if (Key.isDown(68)) {
if ((this.coff < this.offtime) && (this.offline == false)) {
if ((this.online == false) && (_level0.money >= Math.round(this.cost / 6))) {
_level0.toverfx.attachMovie("drone2", "drone" + _level0.toverfx.count, _level0.toverfx.count);
_level0.toverfx["drone" + _level0.toverfx.count].target_ = this;
_level0.toverfx.count++;
_level0.money = _level0.money - Math.round(this.cost / 6);
} else {
_level0.warning("Insufficient Funds!");
}
} else {
_level0.warning("Not Upgrading!");
}
}
};
upgradeturret = function (target, time) {
target.offtime = time * 60;
target.coff = time * 60;
target.online = false;
_level0.money = _level0.money - target.toup;
i = 1;
while (i <= 2) {
_level0.toverfx.attachMovie("drone" + i, "drone" + _level0.toverfx.count, _level0.toverfx.count);
_level0.toverfx["drone" + _level0.toverfx.count].target_ = target;
_level0.toverfx.count++;
i++;
}
};
addpt = function (x, y) {
_level0.toverfx.attachMovie("pt", "pt" + _level0.toverfx.count, _level0.toverfx.count);
_level0.toverfx["pt" + _level0.toverfx.count]._x = x;
_level0.toverfx["pt" + _level0.toverfx.count]._y = y;
_level0.toverfx.count++;
};
addEnemy = function () {
while (_level0.enemies["e" + _level0.enemies.count] != undefined) {
_level0.enemies.count++;
}
_level0.enemies.attachMovie("enemy", "e" + _level0.enemies.count, _level0.enemies.count);
_level0.enemies["e" + _level0.enemies.count].num = _level0.enemies.count;
if (_level0.earr[_level0.enemies.count] != ("e" + _level0.enemies.count)) {
_level0.earr.push("e" + _level0.enemies.count);
}
_level0.enemies.count++;
};
addTurret = function (type, x, y) {
_level0.turrets.attachMovie(type + "turret", "t" + _level0.turrets.count, _level0.turrets.depths);
_level0.turrets["t" + _level0.turrets.count]._x = x;
_level0.turrets["t" + _level0.turrets.count]._y = y;
_level0.turrets["t" + _level0.turrets.count].num = _level0.turrets.count;
_level0.turrets.count++;
_level0.turrets.depths++;
_level0.placing = false;
};
stop();
tut.removeMovieClip();
attachMovie("level", "level", 1);
level._x = 36;
stations = this.createEmptyMovieClip("stations", 2);
eunderfx = this.createEmptyMovieClip("underfx", 3);
enemies = this.createEmptyMovieClip("enemies", 10);
enemies.count = 0;
tunderfx = this.createEmptyMovieClip("tunderfx", 5);
shots = this.createEmptyMovieClip("shots", 6);
shots.count = 0;
turrets = this.createEmptyMovieClip("turrets", 7);
turrets.count = 0;
turrets.depths = 0;
toverfx = this.createEmptyMovieClip("toverfx", 8);
toverfx.count = 0;
upsarr = new Array();
_level0.createEmptyMovieClip("lasers", 11);
_level0.createEmptyMovieClip("cutters", 12);
attachMovie("pth", "pth", 500);
attachMovie("menu", "menu_", 19);
alive = true;
earr = new Array();
menu_._x = 500;
wave = -1;
money = 100;
if (_level0.bitch > 100) {
money = 1100;
}
ehp = 12 * difficulty;
espd = 2;
fps = 40;
mwavetime = 900;
wavetime = mwavetime;
ereserve = 0;
cen = 0;
pttype = "fire";
placing = false;
skipwavek = new Object();
skipwavek.pressed = false;
maxpower = 875;
power = maxpower;
pup = 10;
chp = 7;
soundactive = true;
earr[0] = null;
powerk = new Object();
powerk.dir = -1;
powerk.onKeyDown = function () {
if ((Key.getCode() == 37) && (powerk.dir == -1)) {
power = power + pup;
powerk.dir = 1;
} else if ((Key.getCode() == 39) && (powerk.dir == 1)) {
power = power + pup;
powerk.dir = -1;
}
};
skipwavek.onKeyDown = function () {
if (((Key.getCode() == 32) && (skipwavek.pressed == false)) && (cen == 0)) {
nextwave();
skipwavek.pressed = true;
} else if (((Key.getCode() == 32) && (skipwavek.pressed == false)) && (cen != 0)) {
_level0.warning("Enemies Remain!");
skipwavek.pressed = true;
}
};
skipwavek.onKeyUp = function () {
skipwavek.pressed = false;
};
Key.addListener(skipwavek);
Key.addListener(powerk);
nextwave();
onEnterFrame = function () {
if (alive == true) {
if (power >= maxpower) {
power = maxpower;
}
if (chp <= 0) {
alive = false;
}
t--;
if ((t <= 0) && (ereserve > 0)) {
addEnemy();
t = 16;
ereserve--;
}
if (wavetime <= 0) {
nextwave();
} else {
wavetime--;
wavetimeleft = wavetime;
}
} else if (dead == undefined) {
for (instance in this) {
v = this[instance];
v.removeMovieClip();
}
_level0.attachMovie("dead", "dead", 11);
}
};
Frame 346
_level0.gotoAndStop("menu");
Symbol 20 Button
on (release) {
ab20_09 = new LoadVars();
ab20_09.z = mynamevar;
_root.score2;
ab20_09.x = myscorevar;
_root.score;
ab20_09.c = 1269;
ab20_09.v = "SZOVLG";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=1269", "_blank");
_root.gotoAndPlay("menu");
}
Symbol 24 Button
on (release) {
_root.gotoAndPlay("menu");
}
Symbol 27 MovieClip [dead] Frame 1
this.cacheAsBitmap = true;
waveshow.htmlText = ("<b>" + (_level0.wave - 1)) + "</b>";
_x = (Stage.width / 2);
_y = (Stage.height / 2);
myname = "none";
Symbol 32 MovieClip [mongenturret] Frame 1
online = true;
coff = 0;
halt = false;
offtime = 0;
stop();
onEnterFrame = function () {
this.otherbehaviour();
if (_level0.power > 0) {
if (halt == false) {
if (online == true) {
_level0.money = _level0.money + monplus;
_level0.power = _level0.power - powsuck;
_level0.addpt(_x, _y);
}
}
}
this.showups();
};
onPress = function () {
if (Key.isDown(77)) {
_level0.attachMovie("tum", "tum", 98);
_level0.tum.target_ = this;
}
};
cost = 435;
attack = 0;
range = 0;
spd = 0;
upt = 60;
nam = "Gold Extractor";
toup = 3000;
_level0.money = _level0.money - cost;
monplus = 0.3;
powsuck = 0.4;
Symbol 32 MovieClip [mongenturret] Frame 2
cost = 3000;
attack = 0;
range = 0;
spd = 0;
upt = 60;
nam = "lvl. 2 Gold Extractor";
toup = 15000;
monplus = 4;
powsuck = 3;
Symbol 32 MovieClip [mongenturret] Frame 3
cost = 15000;
attack = 0;
range = 0;
spd = 0;
upt = 60;
nam = "Lvl 3. Gold Extractor";
toup = null;
monplus = 20;
powsuck = 9;
Symbol 34 MovieClip [powgenturret] Frame 1
halt = false;
onEnterFrame = function () {
this.otherbehaviour();
if (_level0.power > 0) {
if (halt == false) {
if (online == true) {
_level0.power = _level0.power - 0.2;
laser.clear();
laser.drawLaser(0, -12, 0, 12, 4, 0, 4, 11184810, 16777215, 2);
laser.drawLaser(-9, -9, 9, 9, 4, 4, 8, 11184810, 16777215, 2);
laser.drawLaser(9, -9, -9, 9, 4, 4, 8, 11184810, 16777215, 2);
}
}
}
this.showups();
};
onPress = function () {
if (Key.isDown(77)) {
_level0.attachMovie("tum", "tum", 98);
_level0.tum.target_ = this;
}
};
_level0.maxpower = _level0.maxpower + 1000;
online = true;
offtime = 0;
coff = 0;
cost = 200;
spd = 0;
powersilo = true;
_level0.pup = _level0.pup + 10;
attack = 0;
range = 0;
nam = "Power Regulator";
toup = null;
_level0.money = _level0.money - cost;
createEmptyMovieClip("laser", 1);
Symbol 37 MovieClip [laserturret] Frame 1
stop();
halt = false;
online = true;
offtime = 0;
coff = 0;
this.cacheAsbitmap = true;
target_ = "";
createEmptyMovieClip("laser", 1);
_level0.lasers.createEmptyMovieClip("laser" + num, num);
_level0.lasers["laser" + num].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
onEnterFrame = function () {
this.laser.clear();
if (online == true) {
laser.drawLaser(0, -19, 0, 19, 8, 0, 8, 11184810, 16777215, size);
laser.drawLaser(-19, 0, 19, 0, 0, 8, 8, 11184810, 16777215, size);
_level0.lasers["laser" + num]._x = _x;
_level0.lasers["laser" + num]._y = _y;
}
this.laserbehaviour();
};
spd = 0;
attack = 16;
toup = 1000;
upt = 6;
range = 256;
cost = 450;
size_ = 2;
_level0.money = _level0.money - cost;
nam = "Lv.1 Laser Eruptor";
Symbol 37 MovieClip [laserturret] Frame 2
stop();
halt = false;
online = true;
offtime = 0;
coff = 0;
this.cacheAsbitmap = true;
target_ = "";
createEmptyMovieClip("laser", 1);
_level0.lasers.createEmptyMovieClip("laser" + num, num);
_level0.lasers["laser" + num].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
onEnterFrame = function () {
this.laser.clear();
if (online == true) {
laser.drawLaser(0, -19, 0, 19, 8, 0, 8, 11184810, 16777215, size);
laser.drawLaser(-19, 0, 19, 0, 0, 8, 8, 11184810, 16777215, size);
_level0.lasers["laser" + num]._x = _x;
_level0.lasers["laser" + num]._y = _y;
}
this.laserbehaviour();
};
spd = 0;
attack = 24;
toup = 5000;
upt = 32;
range = 256;
cost = 1000;
size_ = 4;
nam = "Lv.2 Laser Eruptor";
Symbol 37 MovieClip [laserturret] Frame 3
stop();
halt = false;
online = true;
offtime = 0;
coff = 0;
this.cacheAsbitmap = true;
target_ = "";
createEmptyMovieClip("laser", 1);
_level0.lasers.createEmptyMovieClip("laser" + num, num);
_level0.lasers["laser" + num].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
onEnterFrame = function () {
this.laser.clear();
if (online == true) {
laser.drawLaser(0, -19, 0, 19, 8, 0, 8, 11184810, 16777215, size);
laser.drawLaser(-19, 0, 19, 0, 0, 8, 8, 11184810, 16777215, size);
_level0.lasers["laser" + num]._x = _x;
_level0.lasers["laser" + num]._y = _y;
}
this.laserbehaviour();
};
spd = 0;
attack = 40;
toup = 16320;
upt = 64;
range = 280;
cost = 5000;
size_ = 6;
nam = "Lv.3 Laser Eruptor";
Symbol 37 MovieClip [laserturret] Frame 4
stop();
halt = false;
online = true;
offtime = 0;
coff = 0;
this.cacheAsbitmap = true;
target_ = "";
createEmptyMovieClip("laser", 1);
_level0.lasers.createEmptyMovieClip("laser" + num, num);
_level0.lasers["laser" + num].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
onEnterFrame = function () {
this.laser.clear();
if (online == true) {
laser.drawLaser(0, -19, 0, 19, 8, 0, 8, 11184810, 16777215, size);
laser.drawLaser(-19, 0, 19, 0, 0, 8, 8, 11184810, 16777215, size);
_level0.lasers["laser" + num]._x = _x;
_level0.lasers["laser" + num]._y = _y;
}
this.laserbehaviour();
};
spd = 0;
attack = 80;
toup = 32560;
upt = 96;
range = 280;
cost = 16320;
size_ = 8;
nam = "Lv.4 Laser Eruptor";
Symbol 37 MovieClip [laserturret] Frame 5
stop();
halt = false;
online = true;
offtime = 0;
coff = 0;
this.cacheAsbitmap = true;
target_ = "";
createEmptyMovieClip("laser", 1);
_level0.lasers.createEmptyMovieClip("laser" + num, num);
_level0.lasers["laser" + num].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
onEnterFrame = function () {
this.laser.clear();
if (online == true) {
laser.drawLaser(0, -19, 0, 19, 8, 0, 8, 11184810, 16777215, size);
laser.drawLaser(-19, 0, 19, 0, 0, 8, 8, 11184810, 16777215, size);
_level0.lasers["laser" + num]._x = _x;
_level0.lasers["laser" + num]._y = _y;
}
this.laserbehaviour();
};
spd = 0;
attack = 260;
toup = 64800;
upt = 128;
range = 312;
cost = 32560;
size_ = 10;
nam = "Lv.5 Laser Eruptor";
Symbol 37 MovieClip [laserturret] Frame 6
stop();
halt = false;
online = true;
offtime = 0;
coff = 0;
this.cacheAsbitmap = true;
target_ = "";
createEmptyMovieClip("laser", 1);
_level0.lasers.createEmptyMovieClip("laser" + num, num);
_level0.lasers["laser" + num].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
onEnterFrame = function () {
this.laser.clear();
if (online == true) {
laser.drawLaser(0, -19, 0, 19, 8, 0, 8, 11184810, 16777215, size);
laser.drawLaser(-19, 0, 19, 0, 0, 8, 8, 11184810, 16777215, size);
_level0.lasers["laser" + num]._x = _x;
_level0.lasers["laser" + num]._y = _y;
}
this.laserbehaviour();
};
spd = 0;
attack = 560;
toup = null;
upt = 128;
range = 336;
cost = 64800;
size_ = 12;
nam = "Ultimate Power Eruptor";
Symbol 40 MovieClip [powextturret] Frame 1
stop();
halt = false;
onEnterFrame = function () {
this.otherbehaviour();
if (_level0.power > 0) {
if (halt == false) {
if (online == true) {
_level0.power = _level0.power + powplus;
laser.clear();
laser.drawLaser(0, -12, 0, 12, 4, 0, 4, 11184810, 16777215, 2);
laser.drawLaser(-32, 0, 0, -32, 4, 4, 16, 11184810, 16777215, 4);
laser.drawLaser(0, -32, 32, 0, 4, 4, 16, 11184810, 16777215, 4);
laser.drawLaser(32, 0, 0, 32, 4, 4, 16, 11184810, 16777215, 4);
laser.drawLaser(0, 32, -32, 0, 4, 4, 16, 11184810, 16777215, 4);
}
}
}
this.showups();
};
onPress = function () {
if (Key.isDown(77)) {
_level0.attachMovie("tum", "tum", 98);
_level0.tum.target_ = this;
}
};
cost = 250;
online = true;
offtime = false;
coff = 0;
attack = 0;
range = 0;
spd = 0;
nam = "Power Crammer";
toup = 500;
upt = 30;
_level0.money = _level0.money - cost;
powplus = 2;
createEmptyMovieClip("laser", 1);
Symbol 40 MovieClip [powextturret] Frame 2
cost = 250;
online = true;
offtime = false;
coff = 0;
attack = 0;
range = 0;
spd = 0;
nam = "Upgraded Power Crammer";
toup = null;
upt = 30;
powplus = 6;
createEmptyMovieClip("laser", 1);
Symbol 43 MovieClip [warning] Frame 1
t = 16;
_y = (Stage.height / 2);
this.cacheAsBitmap = true;
onEnterFrame = function () {
_alpha = ((t / 16) * 100);
t--;
tm--;
((t <= 0) ? (this.removeMovieClip) : null);
};
Symbol 57 MovieClip Frame 1
stop();
onPress = function () {
if ((_parent.target_.online == false) && (_level0.money >= Math.round(_parent.target_.cost / 6))) {
_level0.toverfx.attachMovie("drone2", "drone" + _level0.toverfx.count, _level0.toverfx.count);
_level0.toverfx["drone" + _level0.toverfx.count].target_ = _parent.target_;
_level0.toverfx.count++;
_level0.money = _level0.money - Math.round(_parent.target_.cost / 6);
} else {
_level0.warning("Insufficient Funds!");
}
};
onRollOver = function () {
gotoAndStop (2);
_level0.mousemsg(Math.round(_parent.target_.cost / 6) + "g to add drone.");
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
_level0.clearmousemsg();
});
Symbol 60 MovieClip Frame 1
stop();
onPress = function () {
if (_parent.target_.halt == false) {
_parent.target_.halt = true;
} else {
_parent.target_.halt = false;
}
updateAfterEvent();
};
onRollOver = function () {
gotoAndStop (2);
if (_parent.target_.halt == false) {
_level0.mousemsg("Halt");
} else {
_level0.mousemsg("Start");
}
updateAfterEvent();
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
_level0.clearmousemsg();
updateAfterEvent();
});
Symbol 66 MovieClip Frame 1
stop();
onPress = function () {
_level0.tunderfx.clear();
_level0.money = _level0.money + (_parent.target_.cost / 2);
if (_parent.target_.powersilo == true) {
_level0.maxpower = _level0.maxpower - 1000;
_level0.pup = _level0.pup - 10;
}
if (_parent.target_.boomer == true) {
_parent.target_.cutter.removeMovieClip();
}
_parent.target_.removeMovieClip();
_level0.turrets.depths--;
_level0.clearmousemsg();
if (_level0.soundactive == true) {
_level0.sounds.attachSound("buysell");
_level0.sounds.start(0, 0);
}
_parent.removeMovieClip();
};
onRollOver = function () {
gotoAndStop (2);
_level0.mousemsg((_parent.target_.cost / 2) + "g for this turret");
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
_level0.clearmousemsg();
});
Symbol 70 MovieClip Frame 1
stop();
onPress = function () {
if (_parent.target_.online == true) {
if (_parent.target_.toup == null) {
_level0.warning("Already Max!");
} else if (_level0.money >= _parent.target_.toup) {
_level0.upgradeturret(_parent.target_, _parent.target_.upt);
} else {
_level0.warning("Insufficient Funds!");
}
} else {
_level0.warning("Already Upgrading");
}
};
onRollOver = function () {
gotoAndStop (2);
if (_parent.target_.toup == null) {
_level0.mousemsg("Already Max!");
} else {
_level0.mousemsg(_parent.target_.toup + "g to upgrade.");
}
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
_level0.clearmousemsg();
});
Symbol 83 MovieClip [tut] Frame 1
stop();
_x = (Stage.width / 2);
_y = (Stage.height / 2);
onPress = function () {
nextFrame();
};
onMouseDown = function () {
if (!this.hitTest(_level0._xmouse, _level0._ymouse, true)) {
this.removeMovieClip();
}
};
Symbol 83 MovieClip [tut] Frame 9
stop();
_x = (Stage.width / 2);
_y = (Stage.height / 2);
onPress = function () {
nextFrame();
};
onMouseDown = function () {
if (!this.hitTest(_level0._xmouse, _level0._ymouse, true)) {
this.removeMovieClip();
}
};
Symbol 83 MovieClip [tut] Frame 10
this.removeMovieClip();
Symbol 91 MovieClip [tum] Frame 1
_alpha = 75;
_x = target_._x;
_y = target_._y;
this.cacheAsBitmap = true;
onEnterFrame = function () {
while ((_x + _width) > Stage.width) {
_x = (_x-1);
}
while ((_y - _height) < 0) {
_y = (_y+1);
}
turname.htmlText = ("<b>" + target_.nam) + "</b>";
if ((target_.atkplus == 0) || (target_.atkplus == undefined)) {
atks = "Attack: " + target_.attack;
} else {
atks = (("Attack: " + target_.attack) + "+") + target_.atkplus;
}
if ((target_.spdplus == 0) || (target_.spdplus == undefined)) {
spds = "Reload Time: " + target_.spd;
} else {
spds = (("Reload Time: " + target_.spd) + "-") + target_.spdplus;
}
if ((target_.rangeplus == 0) || (target_.rangeplus == undefined)) {
rngs = "Reload Time: " + target_.range;
} else {
rngs = (("Reload Time: " + target_.range) + "-") + target_.rangeplus;
}
statshow.htmlText = ((((("<b>" + atks) + newline) + spds) + newline) + rngs) + "</b>";
ubar._width = (target_.coff / target_.offtime) * 64;
if (target_.online == false) {
drone._visible = true;
up._visible = false;
} else {
drone._visible = false;
up._visible = true;
}
};
onMouseDown = function () {
if (!this.hitTest(_level0._xmouse, _level0._ymouse, true)) {
_level0.tunderfx.clear();
this.removeMovieClip();
}
};
Symbol 101 MovieClip [rockturret] Frame 1
stop();
halt = false;
this.cacheAsbitmap = true;
online = true;
offtime = 0;
coff = 0;
t = 48;
target_ = "";
turrettype = "rock";
fire = function () {
t = spd;
_level0.shots.attachMovie(turrettype + shottype, (turrettype + shottype) + _level0.shots.count, _level0.shots.count);
_level0.shots[(turrettype + shottype) + _level0.shots.count].parent = this;
_level0.shots[(turrettype + shottype) + _level0.shots.count].cacheAsBitmap = true;
_level0.shots.count++;
};
onEnterFrame = function () {
this.turretbehaviour();
};
ease = 2;
shotspd = 6;
range = 128;
shottype = 1;
attack = 24;
spd = 48;
cost = 40;
toup = 212;
upt = 15;
nam = "Basic Rock Turret";
_level0.money = _level0.money - cost;
Symbol 101 MovieClip [rockturret] Frame 2
ease = 2;
shotspd = 6;
range = 128;
shottype = 2;
attack = 56;
spd = 56;
cost = 180;
toup = 560;
upt = 30;
nam = "Upgraded Rock Turret";
Symbol 101 MovieClip [rockturret] Frame 3
ease = 2;
shotspd = 6;
range = 128;
shottype = 3;
attack = 128;
spd = 64;
cost = 500;
toup = 2450;
upt = 30;
nam = "Granite Rock Turret";
Symbol 101 MovieClip [rockturret] Frame 4
ease = 2;
shotspd = 6;
range = 128;
shottype = 4;
attack = 200;
spd = 80;
cost = 2000;
toup = 4051;
upt = 35;
nam = "Boulder Turret";
Symbol 101 MovieClip [rockturret] Frame 5
ease = 2;
shotspd = 6;
range = 128;
shottype = 5;
attack = 460;
spd = 96;
cost = 4500;
toup = null;
upt = 35;
nam = "Mountain Turret";
Symbol 105 MovieClip [rock4] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
shotbehave();
};
Symbol 107 MovieClip [rock3] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
shotbehave();
};
Symbol 109 MovieClip [rock2] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
shotbehave();
};
Symbol 111 MovieClip [rock1] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
shotbehave();
};
Symbol 120 MovieClip [iceturret] Frame 1
stop();
halt = false;
this.cacheAsbitmap = true;
online = true;
offtime = 0;
coff = 0;
t = 12;
target_ = "";
turrettype = "ice";
fire = function () {
t = spd;
_level0.shots.attachMovie(turrettype + shottype, (turrettype + shottype) + _level0.shots.count, _level0.shots.count);
_level0.shots[(turrettype + shottype) + _level0.shots.count].parent = this;
_level0.shots[(turrettype + shottype) + _level0.shots.count].cacheAsBitmap = true;
_level0.shots.count++;
};
onEnterFrame = function () {
this.turretbehaviour();
};
ease = 1;
shotspd = 8;
range = 128;
shottype = 1;
attack = 1;
spd = 11;
cost = 16;
toup = 64;
upt = 9;
nam = "Basic Ice Turret";
_level0.money = _level0.money - cost;
Symbol 120 MovieClip [iceturret] Frame 2
ease = 1;
shotspd = 10;
range = 128;
shottype = 2;
attack = 7;
spd = 12;
cost = 70;
toup = 244;
upt = 16;
nam = "Upgraded Ice Turret";
Symbol 120 MovieClip [iceturret] Frame 3
ease = 1;
shotspd = 12;
range = 128;
shottype = 3;
attack = 12;
spd = 12;
cost = 240;
toup = 890;
upt = 23;
nam = "Heavy Ice Turret";
Symbol 120 MovieClip [iceturret] Frame 4
ease = 1;
shotspd = 12;
range = 128;
shottype = 4;
attack = 25;
spd = 13;
cost = 880;
toup = 2480;
upt = 32;
nam = "Frozen Ice Turret";
Symbol 120 MovieClip [iceturret] Frame 5
ease = 1;
shotspd = 12;
range = 128;
shottype = 5;
attack = 34;
spd = 14;
cost = 2480;
toup = null;
upt = 41;
nam = "Deadly Ice Turret";
Symbol 122 MovieClip [ice5] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
freeze = 3;
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
iceshotbehave();
};
Symbol 124 MovieClip [ice4] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
freeze = 2;
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
iceshotbehave();
};
Symbol 126 MovieClip [ice3] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
freeze = 1.5;
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
iceshotbehave();
};
Symbol 128 MovieClip [ice2] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
freeze = 1;
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
iceshotbehave();
};
Symbol 130 MovieClip [ice1] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
freeze = 0.5;
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
iceshotbehave();
};
Symbol 137 MovieClip [fireturret] Frame 1
stop();
halt = false;
this.cacheAsbitmap = true;
online = true;
offtime = 0;
coff = 0;
t = 16;
target_ = "";
turrettype = "fire";
atkplus = 0;
onEnterFrame = function () {
this.turretbehaviour();
};
ease = 2;
shotspd = 6;
range = 128;
shottype = 1;
attack = 2.5;
spd = 16;
cost = 26;
toup = 96;
nam = "Basic Fire Turret";
upt = 10;
_level0.money = _level0.money - cost;
Symbol 137 MovieClip [fireturret] Frame 2
ease = 2;
shotspd = 7;
range = 156;
shottype = 2;
attack = 12;
spd = 16;
cost = 120;
toup = 256;
nam = "Upgraded Fire Turret";
upt = 20;
Symbol 137 MovieClip [fireturret] Frame 3
ease = 2;
shotspd = 8;
range = 156;
shottype = 3;
attack = 30;
spd = 16;
cost = 260;
toup = 648;
nam = "Powerful Fire Turret";
upt = 30;
Symbol 137 MovieClip [fireturret] Frame 4
ease = 2;
shotspd = 9;
range = 256;
shottype = 4;
attack = 64;
spd = 12;
cost = 640;
toup = 2560;
nam = "Advanced Fire Turret";
upt = 40;
Symbol 137 MovieClip [fireturret] Frame 5
ease = 2;
shotspd = 10;
range = 256;
shottype = 5;
attack = 96;
spd = 14;
cost = 2400;
toup = null;
nam = "Ultimate Fire Turret";
upt = 50;
Symbol 142 MovieClip [fire1] Frame 1
onEnterFrame = function () {
shotbehave();
};
Symbol 143 MovieClip [fire5] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
i = 0;
while (i <= _level0.enemies.count) {
if (this.hitTest(_level0.enemies["e" + i])) {
_level0.enemies["e" + i].chp = _level0.enemies["e" + i].chp - attack;
this.removeMovieClip();
}
i++;
}
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * xs));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * ys));
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
};
Symbol 144 MovieClip [fire4] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
shotbehave();
};
Symbol 145 MovieClip [fire3] Frame 1
xs = parent.shotspd;
ys = xs;
_rotation = parent.turret._rotation;
equ = _rotation / 64;
_x = (parent._x + (Math.cos(equ) * 16));
_y = (parent._y + (Math.sin(equ) * 16));
attack = parent.attack;
target_ = parent.target;
onEnterFrame = function () {
shotbehave();
};
Symbol 146 MovieClip [fire2] Frame 1
onEnterFrame = function () {
shotbehave();
};
Symbol 152 MovieClip [earthturret] Frame 1
stop();
halt = false;
this.cacheAsbitmap = true;
online = true;
offtime = 0;
coff = 0;
t = 3;
target_ = "";
turrettype = "earth";
atkplus = 0;
fire = function () {
t = spd;
_level0.shots.attachMovie(turrettype + shottype, (turrettype + shottype) + _level0.shots.count, _level0.shots.count);
_level0.shots[(turrettype + shottype) + _level0.shots.count].parent = this;
_level0.shots[(turrettype + shottype) + _level0.shots.count].cacheAsBitmap = true;
_level0.shots.count++;
};
onEnterFrame = function () {
this.turretbehaviour();
};
ease = 2;
shotspd = 24;
range = 256;
shottype = 1;
attack = 0.4;
spd = 3;
cost = 10;
toup = 152;
upt = 5;
nam = "Basic Earth Turret";
_level0.money = _level0.money - cost;
Symbol 152 MovieClip [earthturret] Frame 2
ease = 2;
shotspd = 26;
range = 276;
shottype = 2;
attack = 3;
spd = 3;
cost = 140;
toup = 312;
upt = 17;
nam = "Upgraded Earth Turret";
Symbol 152 MovieClip [earthturret] Frame 3
ease = 1;
shotspd = 28;
range = 312;
shottype = 3;
attack = 9;
spd = 3;
cost = 300;
toup = 1765;
upt = 26;
nam = "Sharp Earth Turret";
Symbol 152 MovieClip [earthturret] Frame 4
ease = 1;
shotspd = 30;
range = 316;
shottype = 4;
attack = 24;
spd = 2;
cost = 1700;
toup = 4598;
upt = 30;
nam = "Great Earth Turret";
Symbol 152 MovieClip [earthturret] Frame 5
ease = 1;
shotspd = 30;
range = 360;
shottype = 5;
attack = 48;
spd = 2;
cost = 4600;
toup = null;
upt = 41;
nam = "Perfect Earth Turret";
Symbol 154 MovieClip [earth5] Frame 1
shotload();
onEnterFrame = function () {
shotbehave();
};
Symbol 156 MovieClip [earth4] Frame 1
shotload();
onEnterFrame = function () {
shotbehave();
};
Symbol 158 MovieClip [earth3] Frame 1
shotload();
onEnterFrame = function () {
shotbehave();
};
Symbol 160 MovieClip [earth2] Frame 1
shotload();
onEnterFrame = function () {
shotbehave();
};
Symbol 162 MovieClip [earth1] Frame 1
shotload();
onEnterFrame = function () {
shotbehave();
};
Symbol 163 MovieClip [pt] Frame 1
xs = (Math.random() * 4) - 2;
ys = (Math.random() * 4) - 2;
t = 4;
onEnterFrame = function () {
t--;
((t <= 0) ? (this.removeMovieClip()) : (_x = (_x + xs)_x + xs_y = (_y + ys)_y + ys));
};
Symbol 166 MovieClip [pth] Frame 1
onMouseDown = function () {
if (ok == true) {
_level0.addTurret(_level0.pttype, _x, _y);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("placetur");
_level0.sounds.start(0, 0);
}
ok = false;
}
};
onMouseUp = function () {
if (ok == true) {
_level0.addTurret(_level0.pttype, _x, _y);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("placetur");
_level0.sounds.start(0, 0);
}
ok = false;
}
};
onEnterFrame = function () {
if (_level0.pttype == "mongen") {
_width = 72;
_height = 67;
} else if ((_level0.pttype == "powgen") || (_level0.pttype == "laser")) {
_width = 54;
_height = 54;
} else if (_level0.pttype == "powext") {
_width = 80;
_height = 80;
} else if (_level0.pttype == "boom") {
_width = 24;
_height = 24;
} else {
_width = 28;
_height = 28;
}
if (_level0.placing == true) {
_alpha = 25;
_visible = true;
_x = _level0._xmouse;
_y = _level0._ymouse;
ok = true;
gotoAndStop (1);
} else {
_visible = false;
_x = -32;
_y = -32;
}
i = 0;
while (i < 360) {
e1 = (Math.cos(i * (Math.PI/180)) * _width) / 2;
e2 = (Math.sin(i * (Math.PI/180)) * _height) / 2;
if (_level0.level.hitTest(_x + e1, _y + e2, true) || (_level0.turrets.hitTest(_x + e1, _y + e2, true))) {
gotoAndStop (2);
ok = false;
}
i = i + 16;
}
};
Symbol 168 MovieClip [mousemsg] Frame 1
_alpha = 64;
this.cacheAsBitmap = true;
onEnterFrame = function () {
_x = (_level0._xmouse - _width);
_y = _level0._ymouse;
while (_x < 0) {
_x = (_x+1);
}
while ((_y - _height) < 0) {
_y = (_y+1);
}
};
Symbol 195 MovieClip Frame 1
stop();
onRollOver = function () {
gotoAndStop (2);
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
});
Symbol 205 MovieClip Frame 1
stop();
onPress = function () {
_level0.placing = false;
};
onRollOver = function () {
gotoAndStop (2);
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
});
Symbol 207 MovieClip [menu] Frame 1
blendMode = "overlay";
fnt = new TextFormat();
fnt.letterSpacing = 2.2;
fnt.size = 11;
fnt.bold = true;
stop();
this.cacheAsBitmap = true;
onEnterFrame = function () {
power.bar._width = (_level0.power / _level0.maxpower) * 95.6;
wavetimeshow.htmlText = ("<b>" + _level0.wavetimeleft) + "</b>";
waveshow.htmlText = (((("<b>" + _level0.wave) + "</b>") + "<font color='#FAE15D' size='14'><b>/") + _level0["bestwave" + _level0.difficulty]) + "</b></font>";
moneyshow.htmlText = ("<b>" + Math.round(_level0.money)) + "</b> G";
moneyshow.setTextFormat(fnt);
liveshow.htmlText = ("<b>" + _level0.chp) + "</b>";
firebuy.onRollOver = function () {
_level0.mousemsg("Fire Turret - 26g");
firebuy.gotoAndStop(2);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
}
};
firebuy.onRollOut = (firebuy.onDragOut = function () {
_level0.clearmousemsg();
firebuy.gotoAndStop(1);
});
icebuy.onRollOver = function () {
_level0.mousemsg("Ice Turret - 16g");
icebuy.gotoAndStop(2);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
}
};
icebuy.onRollOut = (icebuy.onDragOut = function () {
_level0.clearmousemsg();
icebuy.gotoAndStop(1);
});
earthbuy.onRollOver = function () {
_level0.mousemsg("Earth Turret - 10g");
earthbuy.gotoAndStop(2);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
}
};
earthbuy.onRollOut = (earthbuy.onDragOut = function () {
_level0.clearmousemsg();
earthbuy.gotoAndStop(1);
});
rockbuy.onRollOver = function () {
_level0.mousemsg("Rock Turret - 40g");
rockbuy.gotoAndStop(2);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
}
};
rockbuy.onRollOut = (rockbuy.onDragOut = function () {
_level0.clearmousemsg();
rockbuy.gotoAndStop(1);
});
};
firebuy.onPress = function () {
if (_level0.money >= 26) {
_level0.pttype = "fire";
_level0.placing = true;
} else {
_level0.warning("NOT ENOUGH FUNDING!");
}
};
icebuy.onPress = function () {
if (_level0.money >= 16) {
_level0.pttype = "ice";
_level0.placing = true;
} else {
_level0.warning("NOT ENOUGH FUNDING!");
}
};
earthbuy.onPress = function () {
if (_level0.money >= 10) {
_level0.pttype = "earth";
_level0.placing = true;
} else {
_level0.warning("NOT ENOUGH FUNDING!");
}
};
rockbuy.onPress = function () {
if (_level0.money >= 40) {
_level0.pttype = "rock";
_level0.placing = true;
} else {
_level0.warning("NOT ENOUGH FUNDING!");
}
};
forward.onPress = function () {
nextFrame();
};
Symbol 207 MovieClip [menu] Frame 2
blendMode = "overlay";
fnt = new TextFormat();
fnt.letterSpacing = 2.2;
fnt.size = 11;
fnt.bold = true;
stop();
this.cacheAsBitmap = true;
onEnterFrame = function () {
power.bar._width = (_level0.power / _level0.maxpower) * 95.6;
wavetimeshow.htmlText = ("<b>" + _level0.wavetimeleft) + "</b>";
waveshow.htmlText = (((("<b>" + _level0.wave) + "</b>") + "<font color='#FAE15D' size='14'><b>/") + _level0["bestwave" + _level0.difficulty]) + "</b></font>";
moneyshow.htmlText = ("<b>" + Math.round(_level0.money)) + "</b> G";
moneyshow.setTextFormat(fnt);
liveshow.htmlText = ("<b>" + _level0.chp) + "</b>";
mongenbuy.onRollOver = function () {
_level0.mousemsg("Gold Extractor - 435g");
mongenbuy.gotoAndStop(2);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
}
};
mongenbuy.onRollOut = (mongenbuy.onDragOut = function () {
_level0.clearmousemsg();
mongenbuy.gotoAndStop(1);
});
powgenbuy.onRollOver = function () {
_level0.mousemsg("Power Regulator - 200g");
powgenbuy.gotoAndStop(2);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
}
};
powgenbuy.onRollOut = (powgenbuy.onDragOut = function () {
_level0.clearmousemsg();
powgenbuy.gotoAndStop(1);
});
laserbuy.onRollOver = function () {
_level0.mousemsg("Laser Eruptor - 450g");
laserbuy.gotoAndStop(2);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
}
};
laserbuy.onRollOut = (laserbuy.onDragOut = function () {
_level0.clearmousemsg();
laserbuy.gotoAndStop(1);
});
powextbuy.onRollOver = function () {
_level0.mousemsg("Power Crammer - 250g");
powextbuy.gotoAndStop(2);
if (_level0.soundactive == true) {
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
}
};
powextbuy.onRollOut = (powextbuy.onDragOut = function () {
_level0.clearmousemsg();
powextbuy.gotoAndStop(1);
});
};
mongenbuy.onPress = function () {
if (_level0.money >= 435) {
_level0.pttype = "mongen";
_level0.placing = true;
} else {
_level0.warning("NOT ENOUGH FUNDING!");
}
};
powgenbuy.onPress = function () {
if (_level0.money >= 200) {
_level0.pttype = "powgen";
_level0.placing = true;
} else {
_level0.warning("NOT ENOUGH FUNDING!");
}
};
laserbuy.onPress = function () {
if (_level0.money >= 450) {
_level0.pttype = "laser";
_level0.placing = true;
} else {
_level0.warning("NOT ENOUGH FUNDING!");
}
};
powextbuy.onPress = function () {
if (_level0.money >= 250) {
_level0.pttype = "powext";
_level0.placing = true;
} else {
_level0.warning("NOT ENOUGH FUNDING!");
}
};
backward.onPress = function () {
prevFrame();
};
forward.onPress = function () {
nextFrame();
};
Symbol 212 MovieClip [level] Frame 1
gotoAndStop(_level0.difficulty);
_level0.esx = 46;
_level0.esy = 0;
_level0.esr = 90;
blendMode = "subtract";
Symbol 212 MovieClip [level] Frame 2
gotoAndStop(_level0.difficulty);
_level0.esx = 46;
_level0.esy = 0;
_level0.esr = 90;
_level0.money = _level0.money + 60;
blendMode = "subtract";
Symbol 212 MovieClip [level] Frame 3
gotoAndStop(_level0.difficulty);
_level0.esx = 0;
_level0.esy = 216;
_level0.esr = 0;
_level0.money = _level0.money + 80;
blendMode = "subtract";
Symbol 219 MovieClip Frame 1
_rotation = (_rotation - 4);
Symbol 219 MovieClip Frame 2
_rotation = (_rotation - 4);
Symbol 220 MovieClip Frame 1
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
Symbol 221 MovieClip [enemy] Frame 1
ease = 4 + (Math.random() * 2);
check_ = 1;
_x = ((_level0.esx + (Math.random() * 6)) - 3);
_y = ((_level0.esy + (Math.random() * 6)) - 3);
body._rotation = _level0.esr;
mhp = _level0.ehp;
chp = mhp;
spd = _level0.espd;
xs = spd;
alive = true;
ys = xs;
this.cacheAsBitmap = true;
onEnterFrame = function () {
if (alive == true) {
target = _level0.level["d" + check_];
xs = xs + ((spd - xs) / 4);
if (xs < 0) {
xs = 0;
}
ys = xs;
if (body.hitTest(target)) {
check_++;
}
if (chp <= 0) {
_level0.earr.slice(num, 1);
i = _level0.earr.length;
while (i > 0) {
if (_level0.enemies["e" + i].num > num) {
_level0.enemies["e" + i].num--;
}
i--;
}
_level0.money = _level0.money + Math.round(mhp / ((8 * Math.random()) + 3));
_level0.cen--;
this.alive = false;
}
_x = (_x + (Math.cos(body._rotation * (Math.PI/180)) * xs));
_y = (_y + (Math.sin(body._rotation * (Math.PI/180)) * ys));
if (target != undefined) {
targetRot = (Math.atan2((target._y + target._parent._y) - _y, (target._x + target._parent._x) - _x) * 180) / Math.PI;
} else {
((targetRot == undefined) ? ((targetRot = 0)) : ((targetRot = targetRot)));
targetRot = targetRot + 4;
}
if ((body._rotation - targetRot) > 180) {
targetRot = targetRot + 360;
} else if ((body._rotation - targetRot) < -180) {
targetRot = targetRot - 360;
}
changeRot = (targetRot - body._rotation) / ease;
body._rotation = body._rotation + changeRot;
if (target == undefined) {
_level0.chp--;
_level0.cen--;
_level0.earr.slice(num, 1);
i = _level0.earr.length;
while (i > 0) {
if (_level0.enemies["e" + i].num > num) {
_level0.enemies["e" + i].num--;
}
i--;
}
this.removeMovieClip();
}
} else {
_alpha = (_alpha - 4);
_yscale = (_yscale - 4);
_xscale = (_xscale - 4);
if (_xscale < 50) {
this.removeMovieClip();
}
}
if (chp > 0) {
hpbar.bar._width = (chp / mhp) * 36;
} else {
hpbar.swapDepths(2);
hpbar.removeMovieClip();
}
};
Symbol 225 MovieClip [drone2] Frame 1
xs = 8;
ys = 8;
ease = 4;
active = true;
((Math.random() > 0.5) ? (_y = (Stage.height + 16)Stage.height + 16) : (_y = -16-16));
_x = (Math.random() * Stage.width);
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
onEnterFrame = function () {
_alpha = 100;
if (this.hitTest(target_) && (target_.coff > 0)) {
xs = xs * 0.6;
_alpha = 50;
ys = ys * 0.6;
target_.coff--;
_level0.addpt(target_._x, target_._y);
}
if ((target_.coff <= 0) && (active == true)) {
xs = xs + ((8 - xs) / 2);
ys = ys + ((8 - ys) / 2);
targetRot = Math.random() * 360;
target_ = null;
active = false;
}
if (active == false) {
((_y < 0) ? (this.removeMovieClip()) : null);
((_y > Stage.height) ? (this.removeMovieClip()) : null);
((_x < 0) ? (this.removeMovieClip()) : null);
((_x > Stage.width) ? (this.removeMovieClip()) : null);
} else {
targetRot = (Math.atan2(target_._y - _y, target_._x - _x) * 180) / Math.PI;
}
_x = (_x + (Math.cos(body._rotation * (Math.PI/180)) * xs));
_y = (_y + (Math.sin(body._rotation * (Math.PI/180)) * ys));
if ((body._rotation - targetRot) > 180) {
targetRot = targetRot + 360;
} else if ((body._rotation - targetRot) < -180) {
targetRot = targetRot - 360;
}
changeRot = (targetRot - body._rotation) / ease;
body._rotation = body._rotation + changeRot;
};
Symbol 229 MovieClip [drone1] Frame 1
xs = 8;
ys = 8;
ease = 4;
active = true;
((Math.random() > 0.5) ? (_y = (Stage.height + 16)Stage.height + 16) : (_y = -16-16));
_x = (Math.random() * Stage.width);
this.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, (Math.random() * 256) - 128, (Math.random() * 256) - 128, (Math.random() * 256) - 128, 0);
onEnterFrame = function () {
_alpha = 100;
if (this.hitTest(target_) && (target_.coff > 0)) {
xs = xs * 0.6;
ys = ys * 0.6;
_alpha = 50;
target_.coff--;
_level0.addpt(target_._x, target_._y);
}
if ((target_.coff <= 0) && (active == true)) {
target_.coff = 0;
target_.nextFrame();
target_.online = true;
xs = xs + ((8 - xs) / 2);
ys = ys + ((8 - ys) / 2);
targetRot = Math.random() * 360;
target_ = null;
active = false;
}
if (active == false) {
((_y < 0) ? (this.removeMovieClip()) : null);
((_y > Stage.height) ? (this.removeMovieClip()) : null);
((_x < 0) ? (this.removeMovieClip()) : null);
((_x > Stage.width) ? (this.removeMovieClip()) : null);
} else {
targetRot = (Math.atan2(target_._y - _y, target_._x - _x) * 180) / Math.PI;
}
_x = (_x + (Math.cos(body._rotation * (Math.PI/180)) * xs));
_y = (_y + (Math.sin(body._rotation * (Math.PI/180)) * ys));
if ((body._rotation - targetRot) > 180) {
targetRot = targetRot + 360;
} else if ((body._rotation - targetRot) < -180) {
targetRot = targetRot - 360;
}
changeRot = (targetRot - body._rotation) / ease;
body._rotation = body._rotation + changeRot;
};
Symbol 250 Button
on (press) {
getURL ("http://armorgames.com/", "_blank_");
}
Symbol 276 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 283 MovieClip Frame 81
stop();
Symbol 298 MovieClip Frame 1
stop();
onPress = function () {
stopAllSounds();
gotoAndStop (2);
};
Symbol 298 MovieClip Frame 2
stop();
onPress = function () {
gotoAndStop (1);
};
Symbol 305 MovieClip Frame 1
stop();
onRollOver = function () {
this.useHandCursor = false;
_level0.difficulty = 1;
gotoAndStop (2);
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
});
onPress = function () {
_level0.gotoAndStop("game");
};
Symbol 311 MovieClip Frame 1
stop();
onRollOver = function () {
this.useHandCursor = false;
gotoAndStop (2);
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
});
onPress = function () {
_level0.attachMovie("tut", "tut", 1);
};
Symbol 316 MovieClip Frame 1
stop();
onRollOver = function () {
this.useHandCursor = false;
gotoAndStop (2);
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
});
onPress = function () {
getURL ("http://armorgames.com/", "_blank");
};
Symbol 321 MovieClip Frame 1
stop();
onRollOver = function () {
this.useHandCursor = false;
_level0.difficulty = 2;
gotoAndStop (2);
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
});
onPress = function () {
_level0.gotoAndStop("game");
};
Symbol 324 MovieClip Frame 1
stop();
onRollOver = function () {
this.useHandCursor = false;
_level0.difficulty = 3;
gotoAndStop (2);
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
});
onPress = function () {
_level0.gotoAndStop("game");
};
Symbol 329 MovieClip Frame 1
stop();
onRollOver = function () {
this.useHandCursor = false;
gotoAndStop (2);
_level0.sounds.attachSound("btns");
_level0.sounds.start(0, 0);
};
onRollOut = (onDragOut = function () {
gotoAndStop (1);
});
onPress = function () {
getURL ("http://www.armorgames.com/download.html", "_blank");
};
Symbol 354 Button
on (release) {
_level0.bitch = _level0.bitch + 1000;
trace("you got me");
}
Symbol 368 MovieClip Frame 72
stop();
Symbol 380 MovieClip Frame 1
onEnterFrame = function () {
_height = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
};
Symbol 382 MovieClip Frame 1
onEnterFrame = function () {
if ((_root.getBytesLoaded() / _root.getBytesTotal()) == 1) {
play();
} else {
stop();
_level0.stop();
}
};
Symbol 382 MovieClip Frame 41
_level0.play();