Frame 1
_root.kongregateServices.connect();
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__("3f8a0fc7", this, 10301, true);
shot = new Sound();
shot.loadSound("shot.mp3", false);
pop = new Sound();
pop.loadSound("pop.mp3", false);
Frame 2
k = 0;
while (k < 2) {
duplicateMovieClip (_root.snow, "snow" + k, k);
k++;
}
stop();
Mouse.show();
Stage.showMenu = false;
Instance of Symbol 126 MovieClip "snow" in Frame 2
onClipEvent (load) {
movieWidth = Stage.width;
movieHeight = Stage.height;
i = 1 + (Math.random() * 2);
k = -3.14159265358979 + (Math.random() * Math.PI);
this._xscale = (this._yscale = 75 + (Math.random() * 100));
this._alpha = 75 + (Math.random() * 100);
this._x = -10 + (Math.random() * movieWidth);
this._y = -10 + (Math.random() * movieHeight);
}
onClipEvent (enterFrame) {
rad = rad + ((k / 180) * Math.PI);
this._x = this._x - Math.cos(rad);
this._y = this._y + i;
if (this._y >= movieHeight) {
this._y = -5;
}
if ((this._x >= movieWidth) || (this._x <= 0)) {
this._x = -10 + (Math.random() * movieWidth);
this._y = -5;
}
}
Frame 3
Mouse.hide();
_root.mouse.gotoAndStop(1);
_root.status_menu._visible = false;
_root.total_score = Math.round(_root.kill_txt + (_root.wave / 2));
_root.bub._x = 2000;
Mouse.show();
if (_root.wave == 31) {
gotoAndStop (10);
_root.wave = 30;
}
Frame 4
_root.attachMovie("fake_mouse", "mouse", getNextHighestDepth());
_root.mouse._width = 19.2;
_root.mouse._height = 30.6;
stopAllSounds();
stop();
function moveBullet() {
if ((((this._x > 780) || (this._x < -20)) || (this._y < -20)) || (this._y > 680)) {
this.removeMovieClip();
} else {
var _local4 = ((this._rotation > 180) ? -1 : 1);
this._y = this._y + ((this.spd * Math.cos((mPI / 180) * this._rotation)) * _local4);
this._x = this._x - ((this.spd * Math.sin((mPI / 180) * this._rotation)) * _local4);
var _local3 = 1;
while (_local3 <= (numofEnemies + 1)) {
var _local2 = this._parent["k" + _local3];
if (this.hitTest(_local2)) {
if (this.type == 3) {
_local2.health = _local2.health - this.damage;
this.gotoAndStop(4);
this.spd = 0;
} else {
if (this.type == 5) {
_local2.health = _local2.health - this.damage;
_local2.speed = 2;
this.removeMovieClip();
break;
}
_local2.health = _local2.health - this.damage;
this.removeMovieClip();
break;
}
}
_local3++;
}
}
}
function badguystuff() {
if (_root.wave == boss_wave) {
this._y = 1500;
}
if (this._x < 138.9) {
this._x = 139;
}
_root.again.onRelease = function () {
gotoAndStop (1);
_root.mainm.gotoAndStop(1);
removeMovieClip(this);
};
if (!pause) {
if (level_timer > 2000) {
if (ekills >= 7) {
this._y = (Math.random() * 200) + 3000;
this._x = (Math.random() * 500) + 100;
} else if (ekills < 7) {
level_timer = 2001;
}
}
if (level_timer >= 2005) {
shootin = false;
_root.scroll._x = _root.scroll._x - 2.5;
_root.scroll.stage_num = _root.wave + 1;
level_timer = 2006;
}
if (_root.scroll._x < -500) {
_root.scroll._x = 1003.2;
level++;
level_timer = 0;
_global.badh = _global.badh * 1.35;
_global.g_money = _global.g_money + 4;
_global.dmg = _global.dmg + 0.1;
_root.wave++;
}
}
if ((level_timer > 0) & (level_timer < 10)) {
ekills = 0;
this._y = (Math.random() * 200) + 600;
if (_root.wave == 1) {
this._y = (Math.random() * 200) + 600;
}
}
this.target = _root.castle;
if (!pause) {
p = 0;
while (p <= numofGuns) {
if (this.hitTest(_root["gun" + p].thit2)) {
this.target = _root["gun" + p];
}
p++;
}
mm = 0;
while (mm <= numofMen) {
if (this.hitTest(_root["good" + mm])) {
this.target = _root["good" + mm];
}
if (this.hitTest(_root["archer" + mm])) {
this.target = _root["archer" + mm];
}
mm++;
}
}
if (_root._currentframe == 6) {
if (!pause) {
if (!this.dead) {
if (!this.hitTest(this.target)) {
this.gotoAndStop(3 + this.bad_type);
var _local7 = this.target._x - this._x;
var _local6 = this.target._y - this._y;
var _local5 = (180 * Math.atan2(_local6, _local7)) / Math.PI;
this._rotation = 90 + _local5;
this._x = this._x + (this.speed * Math.sin((this._rotation * Math.PI) / 180));
this._y = this._y + ((-this.speed) * Math.cos((this._rotation * Math.PI) / 180));
}
}
}
if (!pause) {
if (this.hitTest(_root.castle)) {
this.attacking = true;
cattacking = true;
}
if (!this.dead) {
if (this.hitTest(this.target)) {
if (!this.target.dead) {
this.gotoAndStop(4 + this.bad_type);
this.target.health = this.target.health - _global.dmg;
if (this.target.health <= 0) {
this.target.removeMovieClip();
if (this.target != _root.castle) {
this.target.gotoAndPlay("dead");
this.target.dead = true;
} else {
reset();
}
}
}
}
}
}
if (pause) {
if (!this.dead) {
this.gotoAndStop(2 + this.bad_type);
}
}
if ((this.health <= 0) || (_root.mbullet.hitTest(this))) {
blood_num++;
var _local4 = _root.attachMovie("bloode", "bloode" + blood_num, getNextHighestDepth());
_local4.bloodi.gotoAndStop((Math.random() * 1) + 1);
_local4._alpha = (Math.random() * 15) + 60;
_local4._rotation = Math.random() * 360;
_local4._xscale = (_xscale + (Math.random() * 2)) - 4;
_local4._yscale = _local4._xscale;
_local4._x = this._x;
_local4._y = this._y;
_local4.onEnterFrame = bloodd;
this.dead = true;
if (level_timer <= 2000) {
this._y = (Math.random() * 50) + 600;
}
if (level_timer > 2000) {
if (ekills < 7) {
this._y = 9500;
ekills++;
}
}
this._x = (Math.random() * 475) + 145;
this.attacking = false;
cattacking = false;
this.health = _global.badh;
this.speed = (Math.random() * 1.5) + 3.5;
this.bad_type = Math.ceil((Math.random() * 5) + 1) * 3;
money = money + _global.g_money;
this._alpha = 100;
kills++;
this.dead = false;
}
}
}
function reset() {
p = 0;
while (p <= numofGuns) {
removeMovieClip(_root["gun" + p]);
p++;
}
mm = 0;
while (mm <= numofMen) {
removeMovieClip(_root["good" + mm]);
removeMovieClip(_root["archer" + mm]);
mm++;
}
pp = 0;
while (pp <= numofPoisen) {
removeMovieClip(_root["poisen" + pp]);
removeMovieClip(_root["bomb" + pp]);
pp++;
}
bd = 0;
while (bd <= blood_num) {
removeMovieClip(_root["bloode" + bd]);
bd++;
}
_global.level = 0;
bad_type = bad_type - 1;
_global.sped = 3.5;
_global.badh = 5;
_global.dmg = 0.5;
_global.g_money = 5;
_global.cdmg = 0;
_global.blood_num = 0;
if (_root.modis == "reg") {
_root.diff_menu.gotoAndStop(1);
money = 1500;
} else if (_root.modis == "fp") {
_root.diff_menu.gotoAndStop(2);
}
_root.status_menu.def_lvl = 0;
_root.status_menu.rate_lvl = 0;
_root.status_menu.life_lvl = 0;
_root.status_menu.dmg_lvl = 0;
_root.status_menu.cdmg_lvl = 0;
_root.status_menu.crate_lvl = 0;
_root.status_menu.vis_lvl = 0;
_root.status_menu.steel_btn.gotoAndStop(1);
_root.status_menu.fire_btn.gotoAndStop(1);
if (_root.modis == "fp") {
gotoAndStop (7);
} else {
gotoAndStop (3);
}
}
function bloodd() {
this._alpha = this._alpha - 5;
if (this._alpha <= 10) {
removeMovieClip(this);
}
}
var cattacking = false;
var cplayer = null;
_global.auto = false;
_global.manual = false;
_quality = "medium";
Mouse.hide();
var shootin = false;
var npdmg = 0;
_root.menu_b.amount = 0;
_root.menu_b.amount2 = 0;
_root.menu_b.amount3 = 0;
var ice_mode = false;
var nume = 0;
var cshoot_timer = 10;
var cfiring = false;
var zudo = 0;
var extra = 0;
var boss_wave = 10;
_global.level = 0;
_global.badh = 5;
_global.dmg = 0.5;
_global.g_money = 5;
maxmousemove = 3;
_global.cdmg = 0;
var ekills = 0;
var mousethreshold = 2;
var blah = null;
var timer = 0;
var speed = 7;
var range = 150;
var range2 = 750;
var numofPoisen = 0;
var numofGuns = 0;
var numofGunsb = 0;
var numofGunsc = 0;
var numofGunsd = 0;
var numofGunse = 0;
var numofEnemies = 7;
var numofMen = 2;
var bc = 1000;
var mPI = Math.PI;
var cbad = null;
var gunn = null;
var zunn = null;
var cbad2 = null;
var gunn2 = null;
var zunn2 = null;
_global.blood_num = 0;
var enemyspd = 5;
var select = false;
var sguna = null;
var hit = false;
var blood_num = 0;
var level_timer = 0;
if (_root.modis == "reg") {
_root.diff_menu.gotoAndStop(1);
money = 2000;
} else if (_root.modis == "fp") {
_root.diff_menu.gotoAndStop(2);
money >= 0;
}
var pause = false;
var kills = 0;
_root.wave = 1;
var fire_mode = false;
var modes = -3;
_root.onEnterFrame = function () {
function cshoot() {
if (this.hitTest(_root.menu_b)) {
this.removeMovieClip();
}
if ((((this._x > 780) || (this._x < -20)) || (this._y < -20)) || (this._y > 680)) {
this.removeMovieClip();
} else {
this._x = this._x + (this.spd * Math.sin((this._rotation * Math.PI) / 180));
this._y = this._y + ((-this.spd) * Math.cos((this._rotation * Math.PI) / 180));
}
var _local4 = 1;
while (_local4 <= (numofEnemies + 1)) {
var _local3 = this._parent["k" + _local4];
if (this.hitTest(_local3)) {
if (ice_mode) {
_local3.health = _local3.health - (10 + npdmg);
_local3.speed = 2;
this.removeMovieClip();
break;
}
this.removeMovieClip();
_local3.health = _local3.health - (10 + npdmg);
this.removeMovieClip();
break;
}
_local4++;
}
}
if (_root.wave == 31) {
if (_root.modis == "reg") {
reset();
}
}
k = 0;
while (k < 50) {
removeMovieClip(_root["snow" + k]);
k++;
}
if (_root.menu_b.des_txt._visible == true) {
upgrade_menu._visible = false;
arrow._x = 1500;
} else if (upgrade_menu._visible == true) {
_root.menu_b.des_txt._visible = false;
upgrade_menu.name.arrow._alpha = 0;
}
_root.billy.onRelease = function () {
reset();
};
_root.mouse.swapDepths(getNextHighestDepth());
_root.diff_menu.nextup.onRelease = function () {
if (_root.diff_menu.c1._currentframe == 2) {
_global.auto = true;
} else {
_global.manual = true;
}
if (_root.modis == "fp") {
sped = _root.diff_menu.textInput.emyspd;
money = _root.diff_menu.textInput2.money_amount - 1;
money = money + 1;
nextFrame();
}
};
_root.diff_menu.easy_btn.onRelease = function () {
_root.diff_show.gotoAndStop(1);
if (_root.diff_menu.c1._currentframe == 2) {
_global.auto = true;
} else {
_global.manual = true;
}
_root.kongregateScores.setMode("Easy");
nextFrame();
};
_root.diff_menu.medium_btn.onRelease = function () {
_root.diff_show.gotoAndStop(2);
if (_root.diff_menu.c1._currentframe == 2) {
_global.auto = true;
} else {
_global.manual = true;
}
_root.kongregateScores.setMode("Medium");
money = money - 500;
nextFrame();
};
_root.diff_menu.hard_btn.onRelease = function () {
_root.diff_show.gotoAndStop(3);
if (_root.diff_menu.c1._currentframe == 2) {
_global.auto = true;
} else {
_global.manual = true;
}
_root.kongregateScores.setMode("Hard");
money = money - 800;
nextFrame();
};
if (_root.modis == "fp") {
_root.diff_show.gotoAndStop(4);
}
_root.mouse._x = 2000;
_root.kill_txt = kills;
_root.money_txt = money;
_root.mouse._x = _root._xmouse;
_root.mouse._y = _root._ymouse;
_root.pb.pa.onRelease = function () {
_root.pb.gotoAndStop("play");
pause = true;
};
_root.pb.pl.onRelease = function () {
_root.pb.gotoAndStop("pause");
pause = false;
};
if (pause) {
_root.pb.gotoAndStop("play");
}
if (!pause) {
_root.pb.gotoAndStop("pause");
}
if (Key.isDown(80)) {
pause = true;
}
if (Key.isDown(85)) {
pause = false;
}
d = 1;
while (d <= numofEnemies) {
if (_root._currentframe == 6) {
_root["k" + d].onEnterFrame = badguystuff;
if (!pause) {
level_timer++;
}
}
d++;
}
_root.menu_b.dmg_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("dmg");
};
_root.menu_b.dmg_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.dmg_btn.onRelease = function () {
if (money >= 300) {
npdmg = npdmg + 5;
_root.menu_b.amount = _root.menu_b.amount + 1;
money = money - 300;
}
};
_root.menu_b.vis_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("vis");
};
_root.menu_b.vis_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.vis_btn.onRelease = function () {
if (money >= 300) {
range = range + 30;
_root.menu_b.amount2 = _root.menu_b.amount2 + 1;
money = money - 300;
}
};
_root.menu_b.life_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("life");
};
_root.menu_b.life_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.life_btn.onRelease = function () {
if (money >= 300) {
_root.castle.health = _root.castle.health + 100;
_root.menu_b.amount3 = _root.menu_b.amount3 + 1;
money = money - 300;
}
};
_root.menu_b.ice_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("icec");
};
_root.menu_b.ice_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.ice_btn.onRelease = function () {
if (money >= 400) {
if (_root.menu_b.ice_btn._currentframe == 1) {
ice_mode = true;
_root.menu_b.ice_btn.gotoAndStop(2);
money = money - 400;
}
}
};
_root.menu_b.guna_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop(1);
};
_root.menu_b.guna_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.guna_btn.onPress = function () {
_root.mouse.gotoAndStop("gun1");
};
_root.menu_b.guna_btn.onRelease = (_root.menu_b.guna_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
var _local2 = _root.menu_b._parent;
var _local6 = true;
p = 0;
while (p <= numofGuns) {
var _local4 = _local2._xmouse - (_local2["gun" + p]._x + _local2["gun" + p].thit._x);
var _local3 = _local2._ymouse - (_local2["gun" + p]._y + _local2["gun" + p].thit._y);
var _local5 = Math.floor(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
if (_local2["gun" + p].thit._width > _local5) {
_local6 = false;
}
if (((_root.castle.hitTest(_root._xmouse, _root._ymouse, true) or _root.button.hitTest(_root._xmouse, _root._ymouse, true)) or _root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) or _root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
_local6 = false;
}
p++;
}
if (money >= 300) {
if (_local6) {
_root.menu_b.des_txt._visible = false;
var _local7 = _local2.attachMovie("gun", "gun" + (numofGuns++), _local2.getNextHighestDepth());
pop.loadSound("pop.mp3", true);
_local7.hp._visible = false;
_local7.gotoAndStop(1);
_local7._x = _local2._xmouse;
_local7._y = _local2._ymouse;
_local7.type = 1;
_local7.delay = 8;
_local7.damage = 8;
_local7.isFiring = false;
_local7.shot_timer = 1;
_local7.onEnterFrame = dub;
money = money - 300;
}
}
});
_root.menu_b.gunb_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop(2);
};
_root.menu_b.gunb_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.gunb_btn.onPress = function () {
_root.mouse.gotoAndStop("gun2");
};
_root.menu_b.gunb_btn.onRelease = (_root.menu_b.gunb_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
var _local2 = _root.menu_b._parent;
var _local6 = true;
p = 0;
while (p <= numofGuns) {
var _local4 = _local2._xmouse - (_local2["gun" + p]._x + _local2["gun" + p].thit._x);
var _local3 = _local2._ymouse - (_local2["gun" + p]._y + _local2["gun" + p].thit._y);
var _local5 = Math.floor(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
if (_local2["gun" + p].thit._width > _local5) {
_local6 = false;
}
if (((_root.castle.hitTest(_root._xmouse, _root._ymouse, true) or _root.button.hitTest(_root._xmouse, _root._ymouse, true)) or _root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) or _root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
_local6 = false;
}
p++;
}
if (money >= 500) {
if (_local6) {
_root.menu_b.des_txt._visible = false;
var _local7 = _local2.attachMovie("gun", "gun" + (numofGuns++), _local2.getNextHighestDepth());
pop.loadSound("pop.mp3", false);
pop.start();
_local7.hp._visible = false;
_local7.gotoAndStop(2);
_local7._x = _local2._xmouse;
_local7._y = _local2._ymouse;
_local7.type = 2;
_local7.delay = 8;
_local7.damage = 9;
_local7.isFiring = false;
_local7.shot_timer = 1;
_local7.onEnterFrame = dub;
money = money - 500;
}
}
});
_root.menu_b.gunc_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop(3);
};
_root.menu_b.gunc_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.gunc_btn.onPress = function () {
_root.mouse.gotoAndStop("gun3");
};
_root.menu_b.gunc_btn.onRelease = (_root.menu_b.gunc_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
var _local2 = _root.menu_b._parent;
var _local6 = true;
p = 0;
while (p <= numofGuns) {
var _local4 = _local2._xmouse - (_local2["gun" + p]._x + _local2["gun" + p].thit._x);
var _local3 = _local2._ymouse - (_local2["gun" + p]._y + _local2["gun" + p].thit._y);
var _local5 = Math.floor(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
if (_local2["gun" + p].thit._width > _local5) {
_local6 = false;
}
if (((_root.castle.hitTest(_root._xmouse, _root._ymouse, true) or _root.button.hitTest(_root._xmouse, _root._ymouse, true)) or _root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) or _root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
_local6 = false;
}
p++;
}
if (money >= 1000) {
if (_local6) {
_root.menu_b.des_txt._visible = false;
var _local7 = _local2.attachMovie("gun", "gun" + (numofGuns++), _local2.getNextHighestDepth());
pop.loadSound("pop.mp3", true);
_local7.gotoAndStop(3);
_local7.hp._visible = false;
_local7._x = _local2._xmouse;
_local7._y = _local2._ymouse;
_local7.type = 3;
_local7.delay = 19;
_local7.damage = 6;
_local7.isFiring = false;
_local7.shot_timer = 1;
_local7.onEnterFrame = dub;
money = money - 1000;
}
}
});
_root.menu_b.gund_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("tree");
};
_root.menu_b.gund_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.gund_btn.onPress = function () {
_root.mouse.gotoAndStop("gun4");
};
_root.menu_b.gund_btn.onRelease = (_root.menu_b.gund_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
var _local2 = _root.menu_b._parent;
var _local6 = true;
p = 0;
while (p <= numofGuns) {
var _local4 = _local2._xmouse - (_local2["gun" + p]._x + _local2["gun" + p].thit._x);
var _local3 = _local2._ymouse - (_local2["gun" + p]._y + _local2["gun" + p].thit._y);
var _local5 = Math.floor(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
if (_local2["gun" + p].thit._width > _local5) {
_local6 = false;
}
if (((_root.castle.hitTest(_root._xmouse, _root._ymouse, true) or _root.button.hitTest(_root._xmouse, _root._ymouse, true)) or _root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) or _root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
_local6 = false;
}
p++;
}
if (money >= 700) {
if (_local6) {
_root.menu_b.des_txt._visible = false;
var _local7 = _local2.attachMovie("gun", "gun" + (numofGuns++), _local2.getNextHighestDepth());
pop.loadSound("pop.mp3", true);
_local7.gotoAndStop(4);
_local7.hp._visible = false;
_local7._x = _local2._xmouse;
_local7._y = _local2._ymouse;
_local7.type = 4;
_local7.delay = 10;
_local7.damage = 12;
_local7.isFiring = false;
_local7.shot_timer = 1;
_local7.onEnterFrame = dub;
money = money - 700;
}
}
});
_root.menu_b.gune_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("icec");
};
_root.menu_b.gune_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.gune_btn.onPress = function () {
_root.mouse.gotoAndStop("gun5");
};
_root.menu_b.gune_btn.onRelease = (_root.menu_b.gune_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
var _local2 = _root.menu_b._parent;
var _local6 = true;
p = 0;
while (p <= numofGuns) {
var _local4 = _local2._xmouse - (_local2["gun" + p]._x + _local2["gun" + p].thit._x);
var _local3 = _local2._ymouse - (_local2["gun" + p]._y + _local2["gun" + p].thit._y);
var _local5 = Math.floor(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
if (_local2["gun" + p].thit._width > _local5) {
_local6 = false;
}
if (((_root.castle.hitTest(_root._xmouse, _root._ymouse, true) or _root.button.hitTest(_root._xmouse, _root._ymouse, true)) or _root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) or _root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
_local6 = false;
}
p++;
}
if (money >= 400) {
if (_local6) {
_root.menu_b.des_txt._visible = false;
var _local7 = _local2.attachMovie("gun", "gun" + (numofGuns++), _local2.getNextHighestDepth());
pop.loadSound("pop.mp3", true);
_local7.gotoAndStop(5);
_local7.hp._visible = false;
_local7._x = _local2._xmouse;
_local7._y = _local2._ymouse;
_local7.type = 5;
_local7.delay = 10;
_local7.damage = 6;
_local7.isFiring = false;
_local7.shot_timer = 1;
_local7.onEnterFrame = dub;
money = money - 400;
}
}
});
_root.menu_b.gunf_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("uber");
};
_root.menu_b.gunf_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.gunf_btn.onPress = function () {
_root.mouse.gotoAndStop("uber");
};
_root.menu_b.gunf_btn.onRelease = (_root.menu_b.gunf_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
var _local2 = _root.menu_b._parent;
var _local5 = true;
p = 0;
while (p <= numofGuns) {
var _local4 = _local2._xmouse - (_local2["gun" + p]._x + _local2["gun" + p].thit._x);
var _local3 = _local2._ymouse - (_local2["gun" + p]._y + _local2["gun" + p].thit._y);
var _local6 = Math.floor(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
if (_local2["gun" + p].thit._width > dist4) {
_local5 = false;
}
if (((_root.castle.hitTest(_root._xmouse, _root._ymouse, true) or _root.button.hitTest(_root._xmouse, _root._ymouse, true)) or _root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) or _root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
_local5 = false;
}
p++;
}
if (money >= 4000) {
if (_local5) {
_root.menu_b.des_txt._visible = false;
var _local7 = _local2.attachMovie("gun", "gun" + (numofGuns++), _local2.getNextHighestDepth());
pop.loadSound("pop.mp3", true);
_local7.gotoAndStop(6);
_local7.hp._visible = false;
_local7._x = _local2._xmouse;
_local7._y = _local2._ymouse;
_local7.type = 6;
_local7.damage = 4;
_local7.isFiring = false;
_local7.shot_timer = 2;
_local7.onEnterFrame = dub;
money = money - 4000;
}
}
});
_root.button.onRollOver = function () {
this.gotoAndStop(2);
};
_root.button.onRollOut = function () {
this.gotoAndStop(1);
};
_root.castle.onRollOver = function () {
this.gotoAndStop(3);
};
_root.castle.onRollOut = function () {
this.gotoAndStop(4);
};
_root.button2.onRollOver = function () {
this.gotoAndStop(2);
};
_root.button2.onRollOut = function () {
this.gotoAndStop(1);
};
_root.menu_b.s1_btn.onPress = function () {
_root.mouse.gotoAndStop("s1");
};
_root.menu_b.s1_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop(5);
};
_root.menu_b.s1_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.s1_btn.onRelease = (_root.menu_b.s1_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
if (!_root.castle.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) {
if (money >= 50) {
_root.good.duplicateMovieClip("good" + numofMen, getNextHighestDepth());
_root.menu_b.des_txt._visible = false;
pop.loadSound("pop.mp3", true);
_root["good" + numofMen]._x = _root._xmouse;
_root["good" + numofMen]._y = _root._ymouse;
_root.bob = 0;
numofMen = numofMen + 1;
money = money - 50;
}
}
}
}
}
});
_root.menu_b.s2_btn.onPress = function () {
_root.mouse.gotoAndStop("s2");
};
_root.menu_b.s2_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop(6);
};
_root.menu_b.s2_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.s2_btn.onRelease = (_root.menu_b.s2_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
if (!_root.castle.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) {
if (money >= 150) {
_root.good.duplicateMovieClip("good" + numofMen, getNextHighestDepth());
_root.menu_b.des_txt._visible = false;
pop.loadSound("pop.mp3", true);
_root["good" + numofMen]._x = _root._xmouse;
_root["good" + numofMen]._y = _root._ymouse;
_root.bob = 3;
numofMen = numofMen + 1;
money = money - 150;
}
}
}
}
}
});
_root.menu_b.s3_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop(8);
};
_root.menu_b.s3_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.s3_btn.onPress = function () {
_root.mouse.gotoAndStop("s3");
};
_root.menu_b.s3_btn.onRelease = (_root.menu_b.s3_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
if (!_root.castle.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) {
if (money >= 100) {
_root.archer.duplicateMovieClip("archer" + numofMen, getNextHighestDepth());
_root.menu_b.des_txt._visible = false;
pop.loadSound("pop.mp3", true);
_root["archer" + numofMen]._x = _root._xmouse;
_root["archer" + numofMen]._y = _root._ymouse;
_root.bob = 6;
numofMen = numofMen + 1;
money = money - 100;
}
}
}
}
}
});
_root.menu_b.s4_btn.onPress = function () {
_root.mouse.gotoAndStop("s4");
};
_root.menu_b.s4_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop(7);
};
_root.menu_b.s4_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.s4_btn.onRelease = (_root.menu_b.s4_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
if (!_root.castle.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) {
if (money >= 250) {
horse = new Sound();
kirupaSound2 = new Sound(this);
kirupaSound2.attachSound("horse");
kirupaSound2.start();
_root.menu_b.des_txt._visible = false;
_root.good.duplicateMovieClip("good" + numofMen, getNextHighestDepth());
_root["good" + numofMen]._x = _root._xmouse;
_root["good" + numofMen]._y = _root._ymouse;
_root.bob = 6;
numofMen = numofMen + 1;
money = money - 250;
}
}
}
}
}
});
_root.menu_b.s5_btn.onPress = function () {
_root.mouse.gotoAndStop("s5");
};
_root.menu_b.s5_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop(4);
};
_root.menu_b.s5_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.s5_btn.onRelease = (_root.menu_b.s5_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
if (!_root.castle.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) {
if (money >= 250) {
_root.good.duplicateMovieClip("good" + numofMen, getNextHighestDepth());
_root.menu_b.des_txt._visible = false;
pop.loadSound("pop.mp3", true);
_root["good" + numofMen]._x = _root._xmouse;
_root["good" + numofMen]._y = _root._ymouse;
_root.bob = 9;
numofMen = numofMen + 1;
money = money - 250;
}
}
}
}
}
});
_root.menu_b.s6_btn.onPress = function () {
_root.mouse.gotoAndStop("santa");
};
_root.menu_b.s6_btn.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("santa");
};
_root.menu_b.s6_btn.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.s6_btn.onRelease = (_root.menu_b.s6_btn.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
if (!_root.castle.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) {
if (money >= 1500) {
_root.good.duplicateMovieClip("good" + numofMen, getNextHighestDepth());
_root.menu_b.des_txt._visible = false;
pop.loadSound("pop.mp3", true);
_root["good" + numofMen]._x = _root._xmouse;
_root["good" + numofMen]._y = _root._ymouse;
_root.bob = 12;
numofMen = numofMen + 1;
money = money - 1500;
}
}
}
}
}
});
_root.menu_b.bomb.onPress = function () {
_root.mouse.gotoAndStop("bomb");
};
_root.menu_b.bomb.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("bomb");
};
_root.menu_b.bomb.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.bomb.onRelease = (_root.menu_b.bomb.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
if (!_root.castle.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) {
if (money >= 350) {
_root.bomb_box.duplicateMovieClip("bomb" + numofPoisen, getNextHighestDepth());
_root.menu_b.des_txt._visible = false;
pop.loadSound("pop.mp3", true);
_root["bomb" + numofPoisen]._x = _root._xmouse;
_root["bomb" + numofPoisen]._y = _root._ymouse;
numofPoisen = numofPoisen + 1;
money = money - 350;
}
}
}
}
}
});
_root.menu_b.poisen.onPress = function () {
_root.mouse.gotoAndStop("poisen");
};
_root.menu_b.poisen.onRollOver = function () {
_root.menu_b.des_txt._visible = true;
_root.menu_b.des_txt.gotoAndStop("poisen");
};
_root.menu_b.poisen.onRollOut = function () {
_root.menu_b.des_txt._visible = false;
};
_root.menu_b.poisen.onRelease = (_root.menu_b.poisen.onReleaseOutside = function () {
_root.mouse.gotoAndStop(1);
if (!_root.castle.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
if (!_root.menu_b.hitTest(_root._xmouse, _root._ymouse, true)) {
if (money >= 300) {
_root.poisen.duplicateMovieClip("poisen" + numofPoisen, getNextHighestDepth());
_root.menu_b.des_txt._visible = false;
pop.loadSound("pop.mp3", true);
_root["poisen" + numofPoisen]._x = _root._xmouse;
_root["poisen" + numofPoisen]._y = _root._ymouse;
_root["poisen" + numofPoisen]._rotation = Math.random() * 360;
numofPoisen = numofPoisen + 1;
money = money - 300;
}
}
}
}
}
});
if (_global.auto == true) {
d = 1;
while (d <= (numofEnemies + 1)) {
if (_root["k" + d]._y < 650) {
shootin = true;
}
d++;
}
_root.np.onEnterFrame = yub;
}
if (_global.manual == true) {
_root.onMouseDown = function () {
shootin = true;
};
_root.onMouseUp = function () {
shootin = false;
};
}
if (shootin) {
if (!cfiring) {
if (!pause) {
nume++;
var _local31 = _root.attachMovie("bulletMC2", "bulletMC2" + nume, getNextHighestDepth());
_local31._x = _root.np._x;
_local31._y = _root.np._y;
if (ice_mode) {
_local31.gotoAndStop(2);
}
_local31._rotation = _root.np.turret._rotation;
_local31.spd = 30;
_local31.onEnterFrame = cshoot;
cfiring = true;
}
}
}
if (cfiring) {
zudo++;
}
if (zudo > ((cshoot_timer - (Math.random() * 2)) + 1)) {
cfiring = false;
zudo = 0;
}
};
dub = function () {
if (_root.arrow.name.health <= 1) {
_root.arrow._x = 1500;
_root.upgrade_menu._visible = false;
}
this.onRollOver = function () {
this.hp._visible = true;
this.rangemc._visible = true;
};
this.onRollOut = function () {
this.hp._visible = false;
this.rangemc._visible = false;
};
if ((!bad.currentDistance) < range) {
this.isFiring = false;
}
if (this.shot_timer > 0) {
this.isFiring = false;
}
this.shot_timer++;
if (this.shot_timer > this.delay) {
this.shot_timer = 0;
}
this.onPress = function () {
_root.menu_b.des_txt._visible = false;
_root.upgrade_menu._visible = true;
_root.upgrade_menu.rate_lvl = this.rate_lvl;
_root.upgrade_menu.dmg_lvl = this.dmg_lvl;
_root.upgrade_menu.name = this;
_root.arrow._x = this._x - 5;
_root.arrow._y = this._y - 60;
_root.arrow.name = this;
};
d = 1;
while (d <= (numofEnemies + 1)) {
if (Key.isDown(83)) {
this.onPress = function () {
money = money + this.smon;
removeMovieClip(this);
};
}
var bad = _root["k" + d];
var _local4 = this._x - bad._x;
var _local3 = this._y - bad._y;
currentDistance = Math.round(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
if (currentDistance < range) {
if (bad._y < 650) {
cbad = bad;
gunn = this.turret;
zunn = this;
var _local6 = (this._x + gunn._x) - cbad._x;
var _local5 = (this._y + gunn._y) - cbad._y;
var _local7 = (180 * Math.atan2(_local5, _local6)) / Math.PI;
gunn._rotation = 90 + _local7;
if (!pause) {
if (this.shot_timer == 0) {
this.isFiring = true;
}
}
}
}
d++;
}
if (this.isFiring) {
var _local8 = this._parent;
(((++bc) > 1100) ? ((bc = 100)) : "");
this.myBulleta = _local8.attachMovie("bulletMC", "b" + bc, _local8.getNextHighestDepth());
p = 0;
while (p <= numofGuns) {
t = 0;
while (t <= numofGunsb) {
e = 0;
while (e <= numofGunsc) {
aa = 0;
while (aa <= numofGunsd) {
bb = 0;
while (bb <= numofGunse) {
if (this.type == 2) {
this.myBulleta.type = 2;
this.myBulleta.gotoAndStop(2);
}
if (this.type == 3) {
this.myBulleta.type = 3;
this.myBulleta.gotoAndStop(3);
}
if (this.type == 4) {
this.myBulleta.type = 4;
this.myBulleta.gotoAndStop(5);
}
if (this.type == 5) {
this.myBulleta.type = 5;
this.myBulleta.gotoAndStop(6);
}
this.myBulleta.spd = 20;
this.myBulleta.damage = this.damage;
trace(this.damage);
this.myBulleta._x = this._x;
this.myBulleta._y = this._y - 15;
this.myBulleta._rotation = this.turret._rotation;
this.myBulleta.onEnterFrame = moveBullet;
bb++;
}
aa++;
}
e++;
}
t++;
}
p++;
}
}
};
yub = function () {
d = 1;
while (d <= (numofEnemies + 1)) {
var _local3 = _root["k" + d];
var _local5 = this._x - _local3._x;
var _local4 = this._y - _local3._y;
currentDistance = Math.round(Math.sqrt((_local5 * _local5) + (_local4 * _local4)));
if (cattacking == true) {
if (_local3.attacking == true) {
if (currentDistance < (range + 600)) {
if (_local3._y < 650) {
cbad = _local3;
gunn = this.turret;
zunn = this;
var _local7 = (this._x + gunn._x) - cbad._x;
var _local6 = (this._y + gunn._y) - cbad._y;
var _local8 = (180 * Math.atan2(_local6, _local7)) / Math.PI;
gunn._rotation = 270 + _local8;
}
}
}
} else if (currentDistance < (range + 600)) {
if (_local3._y < 650) {
cbad = _local3;
gunn = this.turret;
zunn = this;
var _local7 = (this._x + gunn._x) - cbad._x;
var _local6 = (this._y + gunn._y) - cbad._y;
var _local8 = (180 * Math.atan2(_local6, _local7)) / Math.PI;
gunn._rotation = 270 + _local8;
}
}
d++;
}
};
Instance of Symbol 197 MovieClip "archer" in Frame 4
onClipEvent (load) {
this.i = Math.round((Math.random() * 6) + 1);
var towerHit = false;
var maxmousemove = 0.5;
var mousethreshold = 2;
var blah = null;
var maxmousemoveb = 2;
var mousethresholdb = 20;
var blahb = null;
var maxmousemove3 = 2;
var mousethreshold3 = 5;
var blah3 = null;
var dead = false;
var good_type = 0;
var range = 700;
}
onClipEvent (enterFrame) {
if (_root.wave == _root.boss_wave) {
this.i = 8;
}
if (this._y >= 615) {
this._y = 615;
}
if (this._currentframe >= 17) {
dead = true;
}
if (this._x == 1500) {
removeMovieClip(this);
}
if (!dead) {
s = 0;
while (s <= _root.numofMen) {
if (_root["archer" + s] != this) {
if (this.hitTest(_root["good" + s]) or this.hitTest(_root["archer" + s])) {
blah = _root["good" + s];
blahb = _root["archer" + s];
var moverate = (maxmousemove - (maxmousemove / mousethreshold));
if ((this._x < blah._x) or (this._x < blahb._x)) {
this._x = this._x - moverate;
} else {
this._x = this._x + moverate;
}
if ((this._y < blah._y) or (this._y < blahb._y)) {
this._y = this._y - moverate;
} else {
this._y = this._y + moverate;
}
}
}
s++;
}
var x_cord = (this._x - _root["k" + this.i]._x);
var y_cord = (this._y - _root["k" + this.i]._y);
badD = Math.round(Math.sqrt((x_cord * x_cord) + (y_cord * y_cord)));
if (!_root.pause) {
if (_root["k" + this.i]._y < 625) {
if ((badD <= 700) and (badD > 350)) {
gotoAndStop(3 + good_type);
var bx = (_root["k" + this.i]._x - this._x);
var by = (_root["k" + this.i]._y - this._y);
var angleb = ((180 * Math.atan2(by, bx)) / Math.PI);
this._rotation = 90 + angleb;
this._x = this._x + (5 * Math.sin((this._rotation * Math.PI) / 180));
this._y = this._y + (-5 * Math.cos((this._rotation * Math.PI) / 180));
} else if (badD < 350) {
gotoAndStop(4 + good_type);
var bx = (_root["k" + this.i]._x - this._x);
var by = (_root["k" + this.i]._y - this._y);
var angleb = ((180 * Math.atan2(by, bx)) / Math.PI);
this._rotation = 90 + angleb;
} else {
gotoAndStop(2 + good_type);
}
} else {
gotoAndStop(2 + good_type);
this.i = this.i + ((Math.random() * 2) + 1);
if (this.i > _root.numofEnemies) {
this.i = Math.round((Math.random() * 6) + 1);
}
}
} else {
gotoAndStop(2 + good_type);
}
}
}
Frame 5
stop();
_root.status_menu._visible = false;
_root.upgrade_menu._visible = false;
_root.menu_b.amount = 0;
_root.menu_b.amount2 = 0;
_root.menu_b.amount3 = 0;
Instance of Symbol 70 MovieClip "poisen" in Frame 5
onClipEvent (enterFrame) {
var i = 1;
while (i <= (_root.numofEnemies + 1)) {
var myEnemy = _root["k" + i];
if (!_root.pause) {
if (this.hitTest(myEnemy)) {
myEnemy.health = myEnemy.health - 0.5;
myEnemy.speed = 2;
}
}
i++;
}
}
Instance of Symbol 374 MovieClip "good" in Frame 5
onClipEvent (load) {
this.i = Math.round((Math.random() * 6) + 1);
var towerHit = false;
var maxmousemove = 3;
var mousethreshold = 2;
var blah = null;
var maxmousemoveb = 2;
var mousethresholdb = 20;
var blahb = null;
var maxmousemove3 = 2;
var mousethreshold3 = 20;
var blah3 = null;
var dead = false;
var good_type = _root.bob;
var range = 700;
}
onClipEvent (enterFrame) {
if (_root._currentframe == 6) {
if (_root.wave == _root.boss_wave) {
this.i = 8;
}
if (this._y >= 615) {
this._y = 615;
}
if (this._currentframe >= 17) {
dead = true;
}
if (this._x == 1500) {
removeMovieClip(this);
}
if (!dead) {
s = 0;
while (s <= _root.numofMen) {
if (_root["good" + s] != this) {
if (this.hitTest(_root["good" + s])) {
blah = _root["good" + s];
var moverate = (maxmousemove - (maxmousemove / mousethreshold));
if (this._x < blah._x) {
this._x = this._x - moverate;
} else {
this._x = this._x + moverate;
}
if (this._y < blah._y) {
this._y = this._y - moverate;
} else {
this._y = this._y + moverate;
}
}
}
s++;
}
var x_cord = (this._x - _root["k" + this.i]._x);
var y_cord = (this._y - _root["k" + this.i]._y);
badD = Math.round(Math.sqrt((x_cord * x_cord) + (y_cord * y_cord)));
if (!_root.pause) {
if (!this.hitTest(_root["k" + this.i])) {
if (badD <= range) {
gotoAndStop(3 + good_type);
var bx = (_root["k" + this.i]._x - this._x);
var by = (_root["k" + this.i]._y - this._y);
var angleb = ((180 * Math.atan2(by, bx)) / Math.PI);
this._rotation = 90 + angleb;
this._x = this._x + (this.spd * Math.sin((this._rotation * Math.PI) / 180));
this._y = this._y + ((-this.spd) * Math.cos((this._rotation * Math.PI) / 180));
} else if ((badD > range) or (_root["k" + this.i]._y > 605)) {
gotoAndStop(2 + good_type);
this.i++;
if (this.i > _root.numofEnemies) {
this.i = Math.round((Math.random() * 6) + 1);
}
}
} else {
_root["k" + this.i].health = _root["k" + this.i].health - this.dmg;
this._y = this._y - 0.5;
_root["k" + this.i].target = this;
gotoAndStop(4 + good_type);
}
} else {
gotoAndStop(2 + good_type);
}
}
} else {
gotoAndStop(2 + good_type);
}
}
Instance of Symbol 67 MovieClip "bomb_box" in Frame 5
onClipEvent (enterFrame) {
var i = 1;
while (i <= (_root.numofEnemies + 1)) {
var myEnemy = _root["k" + i];
if (!_root.pause) {
if (this.hitTest(myEnemy)) {
this.gotoAndStop(2);
myEnemy.health = myEnemy.health - 150;
}
}
i++;
}
}
Frame 6
_root.bub._x = 1500;
_root.bub.removeMovieClip();
Mouse.hide();
Instance of Symbol 675 MovieClip "k8" in Frame 6
onClipEvent (load) {
var boss_type = 3;
var spd = 2;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (_root.wave == _root.boss_wave) {
if (!this.hitTest(_root.castle)) {
this.gotoAndStop(boss_type - 1);
var zx = (_root.castle._x - this._x);
var zy = (_root.castle._y - this._y);
var anglez = ((180 * Math.atan2(zy, zx)) / Math.PI);
this._rotation = 90 + anglez;
this._x = this._x + (spd * Math.sin((this._rotation * Math.PI) / 180));
this._y = this._y + ((-spd) * Math.cos((this._rotation * Math.PI) / 180));
} else {
this.gotoAndStop(boss_type);
_root.castle.health = _root.castle.health - 3;
if (_root.castle.health <= 1) {
_root.reset();
}
}
}
if (this.health <= 1) {
s = 0;
while (s <= _root.numofMen) {
_root["good" + s].i = Math.round((Math.random() * 6) + 1);
s++;
}
}
if (this.health <= 0) {
_root.money = _root.money + 150;
boss_type = boss_type + 3;
this._y = 790;
_root.ekills = 7;
this.health = 2000;
_root.level_timer = 2005;
_root.boss_wave = _root.boss_wave + 10;
}
} else {
this.gotoAndStop(1 + boss_type);
}
p = 0;
while (p <= _root.numofGuns) {
if (this.hitTest(_root["gun" + p].thit)) {
this._alpha = 20;
} else {
_alpha = 100;
}
p++;
}
}
Frame 7
nextFrame();
Mouse.hide();
_root.mouse.gotoAndStop(1);
_root.status_menu._visible = false;
removeMovieClip(_root.mouse);
Frame 8
MochiAd.showInterLevelAd({id:"d712e2e9cc2d4890", res:"750x650"});
Frame 9
gotoAndStop (2);
Symbol 6 MovieClip [bulletMC2] Frame 1
stop();
Symbol 29 MovieClip [gun] Frame 1
var health = 500;
var smon = 250;
rate_lvl = 1;
dmg_lvl = 1;
rate_lvl2 = 9;
stop();
Instance of Symbol 16 MovieClip "hp" in Symbol 29 MovieClip [gun] Frame 1
onClipEvent (load) {
var maxWidth = 45;
}
onClipEvent (enterFrame) {
var myPercentage = (this._parent.health / 500);
this._width = Math.round(myPercentage * maxWidth);
}
Symbol 29 MovieClip [gun] Frame 2
var health = 400;
var smon = 400;
rate_lvl = 1;
dmg_lvl = 1;
stop();
Symbol 29 MovieClip [gun] Frame 3
var health = 450;
var smon = 800;
rate_lvl = 1;
dmg_lvl = 1;
stop();
Symbol 29 MovieClip [gun] Frame 4
var health = 450;
var smon = 600;
rate_lvl = 1;
dmg_lvl = 1;
stop();
Symbol 29 MovieClip [gun] Frame 5
var health = 400;
var smon = 400;
rate_lvl = 1;
dmg_lvl = 1;
stop();
Symbol 29 MovieClip [gun] Frame 6
var health = 150;
var delay = 2;
var smon = 1200;
rate_lvl = 1;
dmg_lvl = 1;
stop();
Symbol 29 MovieClip [gun] Frame 20
removeMovieClip(this);
this._x = 1500;
stop();
Symbol 39 MovieClip Frame 7
removeMovieClip(this._parent);
Symbol 42 MovieClip [bulletMC] Frame 1
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 75 MovieClip [fake_mouse] Frame 1
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 84 Button
on (release) {
getURL ("http://www.flashninjaclan.com/");
}
Symbol 95 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndPlay ("loaded");
}
Symbol 95 MovieClip Frame 2
gotoAndPlay (1);
Symbol 95 MovieClip Frame 58
_root.play();
Symbol 696 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 108 Button
on (release) {
_root.modis = "reg";
_root.gotoAndStop("start");
}
Symbol 111 Button
on (release) {
_root.modis = "fp";
_root.gotoAndStop("start");
}
Symbol 114 Button
on (release) {
getURL ("http://www.flashninjaclan.com/");
}
Symbol 117 Button
on (release) {
getURL ("http://www.flashninjaclan.com/games/flashempires2/topscores.php");
}
Symbol 120 MovieClip Frame 1
k = 0;
while (k < 50) {
duplicateMovieClip (_root.snow, "snow" + k, k);
k++;
}
Symbol 136 Button
on (release) {
removeMovieClip(_root.mouse);
gotoAndStop (7);
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 162 Button
on (release) {
nukescore = _root.total_score;
nukename = _root.player_score;
loadVariablesNum ("http://www.flashninjaclan.com/games/flashempires2/newscore.php", 0, "POST");
removeMovieClip(_root.mouse);
gotoAndStop (7);
}
Symbol 197 MovieClip Frame 1
stop();
health = 200;
Instance of Symbol 196 MovieClip in Symbol 197 MovieClip Frame 4
onClipEvent (load) {
var bc = 1000;
var shot_timer = 0;
var range = 100;
var isFiring = false;
var delay = 8;
var mPI = Math.PI;
}
onClipEvent (enterFrame) {
function moveBullet() {
if ((((this._parent._x > 880) || (this._parent._x < -100)) || (this._parent._y < -100)) || (this._parent._y > 780)) {
this.removeMovieClip();
} else {
var _local5 = ((this._rotation > 180) ? -1 : 1);
this._y = this._y + ((this.spd * Math.cos((mPI / 180) * this._rotation)) * _local5);
this._x = this._x - ((this.spd * Math.sin((mPI / 180) * this._rotation)) * _local5);
var _local3 = 1;
while (_local3 <= (_root.numofEnemies + 1)) {
var _local4 = _root["k" + _local3];
if (this.hitTest(_local4)) {
_local4.health = _local4.health - 13;
this.removeMovieClip();
break;
}
_local3++;
}
}
}
if (this._currentframe == 5) {
isFiring = true;
} else {
isFiring = false;
}
if (isFiring) {
var tic = this;
(((++bc) > 1100) ? ((bc = 100)) : "");
bullet = tic.attachMovie("bulletMC3", "b" + bc, tic.getNextHighestDepth());
bullet.spd = 30;
bullet._x = _root.range_unites._x;
bullet._y = _root.range_unites._y;
bullet._rotation = this._rotation + 180;
bullet.onEnterFrame = moveBullet;
}
}
Symbol 232 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 1
emyspd = 3;
onEnterFrame = function () {
if (emyspd < 1) {
emyspd = 1;
}
if (emyspd > 10) {
emyspd = 10;
}
if (emyspd == "") {
emyspd = 3;
}
};
Symbol 241 MovieClip Frame 1
money_amount = 1500;
onEnterFrame = function () {
if (money_amount > 20000) {
money_amount = 20000;
}
if (money_amount == "") {
money_amount = 1500;
}
};
Symbol 248 MovieClip Frame 1
stop();
_root.diff_menu.c2.gotoAndStop(2);
_root.diff_menu.c1.onRelease = function () {
if (_root.diff_menu.c1._currentframe == 1) {
_root.diff_menu.c1.gotoAndStop(2);
_root.diff_menu.c2.gotoAndStop(1);
} else if (_root.diff_menu.c1._currentframe == 2) {
_root.diff_menu.c1.gotoAndStop(1);
_root.diff_menu.c2.gotoAndStop(2);
}
};
_root.diff_menu.c2.onRelease = function () {
if (_root.diff_menu.c2._currentframe == 1) {
_root.diff_menu.c2.gotoAndStop(2);
_root.diff_menu.c1.gotoAndStop(1);
} else if (_root.diff_menu.c2._currentframe == 2) {
_root.diff_menu.c1.gotoAndStop(2);
_root.diff_menu.c2.gotoAndStop(1);
}
};
Symbol 253 MovieClip Frame 1
var health = 600;
stop();
Instance of Symbol 16 MovieClip in Symbol 253 MovieClip Frame 1
onClipEvent (load) {
var maxWidth = 100;
var maxHealth = this._parent.health;
}
onClipEvent (enterFrame) {
var myPercentage = (this._parent.health / maxHealth);
this._width = Math.round(myPercentage * maxWidth);
}
Symbol 373 MovieClip Frame 11
gotoAndPlay (5);
Symbol 374 MovieClip Frame 2
stop();
spd = (Math.random() * 3) + 5;
dmg = 3;
health = 250;
Symbol 374 MovieClip Frame 5
stop();
spd = (Math.random() * 3) + 5;
dmg = 4;
health = 330;
Symbol 374 MovieClip Frame 8
stop();
spd = (Math.random() * 4) + 7;
dmg = 5;
health = 430;
Symbol 374 MovieClip Frame 11
stop();
spd = (Math.random() * 3) + 5;
dmg = 15;
health = 250;
Symbol 374 MovieClip Frame 14
stop();
spd = 7;
dmg = 35;
health = 550;
Symbol 385 Button
on (release) {
_quality = "high";
gotoAndStop (3);
}
Symbol 388 Button
on (release) {
_quality = "medium";
ocover = 27.3;
}
Symbol 392 Button
on (release) {
_quality = "low";
gotoAndStop (2);
}
Symbol 394 Button
on (release) {
_quality = "medium";
gotoAndStop (1);
}
Symbol 395 Button
on (release) {
_quality = "low";
ocover._x = 41.3;
}
Symbol 397 Button
on (release) {
_quality = "high";
ocover = 12.8;
}
Symbol 399 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 1
stop();
Symbol 483 Button
on (release) {
nextFrame();
}
Symbol 491 MovieClip Frame 1
stop();
Symbol 494 Button
on (release) {
gotoAndStop (1);
}
Symbol 511 MovieClip Frame 1
in_btn.onRelease = function () {
nextFrame();
};
stop();
Instance of Symbol 468 MovieClip "des_txt" in Symbol 511 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 511 MovieClip Frame 2
stop();
Symbol 511 MovieClip Frame 3
stop();
Symbol 516 Button
on (release) {
nextFrame();
}
Symbol 528 Button
on (release) {
if (name.dmg_lvl < 10) {
if (_root.money >= dmg_money) {
_root.money = _root.money - dmg_money;
name.dmg_lvl = name.dmg_lvl + 1;
name.damage = name.damage * 1.1;
dmg_lvl = dmg_lvl + 1;
}
}
}
Symbol 533 Button
on (release) {
if (name.rate_lvl < 10) {
if (_root.money >= rate_money) {
_root.money = _root.money - rate_money;
name.rate_lvl = name.rate_lvl + 1;
rate_lvl = rate_lvl + 1;
rate_money = rate_money * 2;
name.delay = name.delay / 1.1;
}
}
}
Symbol 537 Button
on (release) {
_root.money = _root.money + name.smon;
removeMovieClip(name);
_root.upgrade_menu._visible = false;
}
Symbol 538 MovieClip Frame 1
var name = null;
onEnterFrame = function () {
dmg_money = dmg_lvl * 75;
rate_money = rate_lvl * 75;
if (name.dmg_lvl == 10) {
dmg_lvl = "Max";
dmg_money = "N/A";
}
if (name.rate_lvl == 10) {
rate_lvl = "Max";
rate_money = "N/A";
}
};
Instance of Symbol 543 MovieClip "turret" in Symbol 544 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_global.manual == true) {
ax = _root._xmouse - (_root.np._x + this._x);
ay = _root._ymouse - (_root.np._y + this._y);
angle = (180 * Math.atan2(ay, ax)) / Math.PI;
this._rotation = 90 + angle;
}
}
Symbol 546 MovieClip Frame 1
name = null;
Symbol 560 MovieClip Frame 1
stop();
Instance of Symbol 551 MovieClip "exit" in Symbol 560 MovieClip Frame 1
on (release) {
this._parent._x = 1500;
}
Symbol 560 MovieClip Frame 6
stop();
Symbol 621 MovieClip Frame 1
stop();
var g_money = 5;
var dmg = 0.5;
var speed = 4;
var health = 5;
var bhealth = 5;
var dead = false;
var bad_type = (Math.ceil(Math.random() * 5) * 3);
var attacking = false;
Instance of Symbol 16 MovieClip "hp" in Symbol 621 MovieClip Frame 1
onClipEvent (load) {
var maxWidth = 45;
}
onClipEvent (enterFrame) {
var myPercentage = (this._parent.health / _global.badh);
this._width = Math.round(myPercentage * maxWidth);
}
Instance of Symbol 590 MovieClip in Symbol 621 MovieClip Frame 9
onClipEvent (enterFrame) {
this.play();
}
Instance of Symbol 600 MovieClip in Symbol 621 MovieClip Frame 10
onClipEvent (enterFrame) {
this.play();
}
Symbol 654 MovieClip Frame 16
gotoAndPlay (10);
Symbol 675 MovieClip Frame 1
health = 3000;
stop();
Instance of Symbol 16 MovieClip "hp" in Symbol 675 MovieClip Frame 2
onClipEvent (load) {
var maxWidth = 45;
}
onClipEvent (enterFrame) {
var myPercentage = (this._parent.health / 2000);
this._width = Math.round(myPercentage * maxWidth);
}
Symbol 675 MovieClip Frame 5
health = 4000;
stop();
Symbol 675 MovieClip Frame 8
health = 6000;
stop();
Symbol 683 MovieClip Frame 1
stop();
Symbol 685 Button
on (release) {
nextFrame();
}
Symbol 687 Button
on (release) {
prevFrame();
}
Symbol 688 MovieClip Frame 1
kirupaSound4 = new Sound(this);
kirupaSound4.attachSound("main_loop");
kirupaSound4.start(0, 99);
stop();
Symbol 688 MovieClip Frame 2
stopAllSounds();
Symbol 695 Button
on (release) {
gotoAndStop (3);
}