Frame 1
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;
var pv;
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);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
_root.kongregateServices.connect();
var CPMStarContentSpotID = "0";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=923QC5D21352");
__com_mochibot__("85d28cd2", this, 10301, true);
Frame 2
function fade() {
var _local2 = _root.attachMovie("fade", "fade", _root.getNextHighestDepth());
_local2._x = _root.hero._x;
_local2._y = _root.hero._y;
}
stop();
_root.day = 0;
_root.health = 100;
_root.firsttank = false;
intro = 0;
_root.sound = true;
_root.money = 325;
back = false;
_root.hint1 = 0;
_root.hint3 = 0;
_root.kills = 0;
_root.depth = 5;
_root.bumperdmg = 0;
_root.hasturn = 1;
_root.hasrocket = 0;
_root.armor = 1;
_root.hasfturret = 0;
_root.fturretdmg = 2;
_root.fturretspd = 20;
_root.fturretdmglvl = 1;
_root.fturretspdlvl = 1;
_root.hasmines = 0;
_root.hassplitshot = 0;
_root.hasgoldbullets = 0;
_root.hasgunman = 0;
_root.gunmandmg = 2;
_root.gunmanspd = 20;
_root.gunmandmglvl = 1;
_root.gunmanspdlvl = 1;
_root.haspowercore = 0;
bombnum = 0;
badnum = 1;
_root.ingame = false;
_root.comefrom = null;
stopAllSounds();
Frame 3
stop();
trace("story");
Frame 4
stop();
delete eval (makebad());
_root.topbar.removeMovieClip();
a = 0;
while (a <= _root.badnum) {
_root["mane" + a].removeMovieClip();
a++;
}
a = 0;
while (a <= _root.bombnum) {
_root["mine" + a].removeMovieClip();
a++;
}
a = 0;
while (a <= 9) {
_root["blood" + a].removeMovieClip();
a++;
}
message.removeMovieClip();
delete eval (onEnterFrame());
delete onEnterFrame;
Frame 5
stop();
delete eval (makebad());
_root.topbar.removeMovieClip();
a = 0;
while (a <= _root.badnum) {
_root["mane" + a].removeMovieClip();
a++;
}
a = 0;
while (a <= _root.bombnum) {
_root["mine" + a].removeMovieClip();
a++;
}
a = 0;
while (a <= 9) {
_root["blood" + a].removeMovieClip();
a++;
}
if ((_root.difficulty = "noob")) {
_root.kongregateStats.submit("Beat game noob", 1);
} else if ((_root.difficulty = "average")) {
_root.kongregateStats.submit("Beat game average", 1);
} else if ((_root.difficulty = "hard core")) {
_root.kongregateStats.submit("Beat game hard core", 1);
}
message.removeMovieClip();
delete eval (onEnterFrame());
delete onEnterFrame;
Frame 6
stopAllSounds();
if (back == true) {
kirupaSound = new Sound(this);
kirupaSound.attachSound("welcome");
kirupaSound.start(0, 1);
back = false;
}
function dooropen(who) {
var _local4 = who._x - _root.hero._x;
var _local3 = who._y - _root.hero._y;
dist = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (dist < 150) {
if (who.closed) {
who.play();
}
}
if (dist > 150) {
if (!who.closed) {
who.play();
} else {
who.gotoAndStop(1);
}
}
}
stop();
_root.hero.removeMovieClip();
_root.cframe = 3;
daytimer = 0;
_root.game = false;
_root.ingame = false;
instruc3.removeMovieClip();
delete eval (makebad());
a = 0;
while (a <= _root.bombnum) {
_root["mine" + a].removeMovieClip();
a++;
}
a = 0;
while (a <= 9) {
_root["blood" + a].removeMovieClip();
a++;
}
var t = _root.attachMovie("topbar", "topbar", _root.depth++);
_root.changedepth();
_root.topbar._x = _root.cam._x;
_root.topbar._y = _root.cam._y;
if (_root.hint1 == 0) {
var ins = _root.attachMovie("instructions", "instruc", _root.depth++);
_root.changedepth();
ins._x = _root.cam._x;
ins._y = _root.cam._y - (_root.cam._height / 2);
ins.timer = 0;
ins.onEnterFrame = function () {
this.timer++;
if (this.timer <= 15) {
this._y = this._y + 4;
}
if (this.timer >= 100) {
this._y = this._y - 5;
}
if (this.timer >= 140) {
this.removeMovieClip();
}
};
var insb = _root.attachMovie("instructions2", "instruc2", _root.depth++);
_root.changedepth();
insb._x = _root.cam._x;
insb._y = (_root.cam._y - (_root.cam._height / 2)) - 15;
insb.timer = 0;
_root.hint1 = 1;
insb.onEnterFrame = function () {
this.timer++;
if ((this.timer <= 145) and (this.timer > 130)) {
this._y = this._y + 4;
}
if (this.timer >= 230) {
this._y = this._y - 5;
}
if (this.timer >= 260) {
this.removeMovieClip();
}
};
}
_root.hero.body.gotoAndStop(_root.armor);
a = 0;
while (a <= _root.badnum) {
_root["mane" + a].removeMovieClip();
a++;
}
if (_root.comefrom == "shop2") {
_root.hero._y = 120.5;
_root.hero._rotation = _root.hero._rotation + 180;
} else if (_root.comefrom == "shop") {
_root.hero._y = 190;
_root.hero._x = 135;
_root.hero._rotation = _root.hero._rotation - 225;
}
_root.comefrom = null;
i = 0;
while (i <= bombnum) {
_root["mine" + i].removeMovieClip();
i++;
}
_root.fade();
Instance of Symbol 452 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.hero.hitTest(this)) {
_root.topbar.removeMovieClip();
_root.gotoAndStop("shop");
}
}
Instance of Symbol 452 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.hero.hitTest(this)) {
_root.topbar.removeMovieClip();
_root.gotoAndStop("shop2");
}
}
Instance of Symbol 472 MovieClip "hero" in Frame 6
onClipEvent (load) {
decay = 0.92;
xspeed = 0;
yspeed = 0;
maxspeed = 17;
minspeed = -17;
speed = 0;
}
onClipEvent (enterFrame) {
rads = (Math.PI/180);
vx = Math.sin((this._rotation + 90) * rads) * speed;
vy = (-Math.cos((this._rotation + 90) * rads)) * speed;
this._x = this._x + (speed * Math.sin(((this._rotation + 90) * Math.PI) / 180));
this._y = this._y + ((-speed) * Math.cos(((this._rotation + 90) * Math.PI) / 180));
this._x = this._x + (xspeed / 4);
this._y = this._y + (yspeed / 4);
if (_root.land.hitTest(_x, _y, true)) {
if (Math.abs(speed) < 2) {
this._x = this._x - xspeed;
this._y = this._y - yspeed;
speed = speed * -1;
xspeed = xspeed * -1;
yspeed = yspeed * -1;
} else {
this._x = this._x - (xspeed / 1.2);
this._y = this._y - (yspeed / 1.2);
speed = speed * -0.6;
xspeed = xspeed * -0.6;
yspeed = yspeed * -0.6;
}
}
if (Math.abs(speed) < 0.1) {
speed = 0;
xspeed = 0;
yspeed = 0;
}
if (Key.isDown(38) or Key.isDown(87)) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation - ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation + ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
} else if (Key.isDown(40) or Key.isDown(83)) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation - ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation + ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
} else if (speed < 0) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation - ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation + ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
} else {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation - ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation + (((speed * 1.5) + (_root.hasturn / 1.5)) * 1.5);
}
}
}
if (Key.isDown(38) or Key.isDown(87)) {
speed = speed + 0.15;
xspeed = xspeed + vx;
yspeed = yspeed + vy;
} else if (Key.isDown(40) or Key.isDown(83)) {
speed = speed - 0.15;
xspeed = xspeed + vx;
yspeed = yspeed + vy;
} else {
speed = speed * decay;
}
if (speed > 3.1) {
speed = speed * 0.8;
}
if (speed < -3.1) {
speed = speed * 0.8;
}
xspeed = xspeed * (decay - 0.03);
yspeed = yspeed * (decay - 0.03);
}
Instance of Symbol 473 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.hero.hitTest(this)) {
_root.topbar.removeMovieClip();
_root.gotoAndStop("battle");
}
}
Instance of Symbol 485 MovieClip in Frame 6
onClipEvent (enterFrame) {
_root.dooropen(this);
}
Instance of Symbol 485 MovieClip in Frame 6
onClipEvent (enterFrame) {
_root.dooropen(this);
}
Frame 7
function herohit() {
_root.hero.cover.play();
}
function changedepth() {
_root.topbar.swapDepths(_root.getNextHighestDepth() + 2);
}
function hurthero(dmg) {
if (_root.difficulty == "noob") {
_root.health = _root.health - (dmg / ((1 + (_root.armor / 10)) + 0.4));
} else if (_root.difficulty == "average") {
_root.health = _root.health - (dmg / (1 + (_root.armor / 10)));
} else {
_root.health = _root.health - (dmg / ((1 + (_root.armor / 10)) - 0.2));
}
}
herox = _root.hero._x;
heroy = _root.hero._y;
instruc.removeMovieClip();
instruc2.removeMovieClip();
stop();
back = true;
if (_root.mode == "fun") {
_quality = "medium";
_root.day = 30;
_root.bumperdmg = 4;
_root.hasturn = 6;
_root.hasrocket = 1;
_root.armor = 7;
_root.hasfturret = 1;
_root.fturretdmg = 7;
_root.fturretspd = 4;
_root.fturretdmglvl = 9;
_root.fturretspdlvl = 14;
_root.hasmines = 7;
_root.hassplitshot = 1;
_root.hasgoldbullets = 1;
_root.hasgunman = 1;
_root.gunmandmg = 6;
_root.gunmanspd = 4.1;
_root.gunmandmglvl = 7;
_root.gunmanspdlvl = 7;
_root.haspowercore = 1;
} else {
_quality = "high";
}
_root.day++;
tracknum = 1;
atimer = 110;
btimer = 160;
ctimer = 40;
dtimer = 0;
etimer = 450;
badnum = 0;
_root.hero.body.gotoAndStop(_root.armor);
var spawnenemyatime = (120 / (_root.day / 3));
var spawnenemybtime = (165 / (_root.day / 2));
spawnenemyctime = 380 / (_root.day / 3.5);
spawnenemydtime = 450 - (_root.day * 3);
spawnenemyetime = 500 - (_root.day * 2);
_root.shake = false;
_root.shaketimer = 0;
_root.ingame = true;
daytimer = 0;
_root.hero.gunner.dmg = 1;
bombtime = _root.hasmines * 18;
bombnum = 0;
var t = _root.attachMovie("topbar", "topbar", _root.depth++);
_root.changedepth();
_root.topbar._x = (_root.cam._x + (_root.cam._width / 2)) - (_root.topbar._width / 2);
_root.topbar._y = (_root.cam._y - (_root.cam._height / 2)) + (_root.topbar._height / 2);
if (_root.mode == "play") {
var d = _root.attachMovie("daynumber", "daynumber", _root.getNextHighestDepth());
d._x = _root.hero._x + 300;
d._y = _root.hero._y;
go = false;
d.onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
this._x = this._x - 10;
if (this._x < (_root.hero._x - 400)) {
nomove = false;
this.removeMovieClip();
go = true;
} else {
nomove = true;
}
};
} else {
_root.difficulty = "average";
}
if (_root.mode == "play") {
var da = _root.attachMovie("message", "messages", _root.getNextHighestDepth());
da.onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
this._x = ((_root.cam._x + (_root.cam._width / 2)) - (_root.da._width / 2)) + 85;
this._y = (_root.cam._y + (_root.cam._height / 2)) - (_root.da._height / 2);
};
}
_root.game = true;
_root.fade();
_root.lastkill = _root.kills;
onEnterFrame = function () {
function makebad(healthe, speed, linkage, distance, type) {
if (_root.ingame) {
var bad = _root.attachMovie(linkage, "mane" + badnum, depth++);
}
changedepth();
badnum++;
bad.rnd = Math.round(Math.random() * 3);
bad.spd = speed;
bad.health = healthe;
bad._xscale = 120;
bad._yscale = 120;
bad.first = false;
bad.type = type;
bad.hit = false;
if (bad.rnd == 1) {
bad._x = (Math.random() * 50) + 875;
bad._y = (Math.random() * 1158) - 372;
}
if (bad.rnd == 2) {
bad._x = (Math.random() * -50) - 325;
bad._y = (Math.random() * 1158) - 372;
}
if (bad.rnd == 3) {
bad._y = (Math.random() * 50) + 800;
bad._x = (Math.random() * 1267) - 428;
}
if (bad.rnd == 0) {
bad._y = (Math.random() * -50) - 400;
bad._x = (Math.random() * 1267) - 428;
}
if (type >= 3) {
bad.health = bad.health + (_root.day / 1.5);
}
if ((distance == 2) or (distance == 3)) {
bad.decay = 0.93;
bad.xspeed = 0;
bad.yspeed = 0;
bad.maxspeed = 17;
bad.minspeed = -17;
bad.rotationspd = speed;
bad.speed = 0;
}
bad.down = false;
bad.onPress = function () {
trace(bad);
};
bad.onEnterFrame = function () {
if (_root.game and (_root.pause == undefined)) {
if (distance == 2) {
if (this.health <= 0) {
this.dead = true;
this.gotoAndStop(2);
} else {
rads = (Math.PI/180);
vx = Math.sin((this._rotation - 270) * rads) * this.speed;
vy = (-Math.cos((this._rotation - 270) * rads)) * this.speed;
this._x = this._x + (this.xspeed / 2);
this._y = this._y + (this.yspeed / 2);
if (this.hitTest(_root.hero)) {
if (this.speed > _root.hero.speed) {
_root.hurthero(1);
}
if (this.first == false) {
this.health = this.health - (_root.hero.speed + _root.bumperdmg);
this.first = true;
}
_root.shake = true;
this._x = this._x - (this.xspeed / 1.4);
this._y = this._y - (this.yspeed / 1.4);
this.speed = this.speed * -0.7;
this.xspeed = this.xspeed * -0.7;
this.yspeed = this.yspeed * -0.7;
if (!_root.land.hitTest(_root.hero._x, _root.hero._y, true)) {
_root.hero._x = _root.hero._x - (this.xspeed / 4);
_root.hero._y = _root.hero._y - (this.yspeed / 4);
_root.hero.xspeed = _root.hero.xspeed - (this.xspeed / 3);
_root.hero.yspeed = _root.hero.yspeed - (this.yspeed / 3);
}
if (this._x < _root.hero._x) {
if (this._y > _root.hero._y) {
_root.hero._rotation = _root.hero._rotation - 10;
} else {
_root.hero._rotation = _root.hero._rotation + 10;
}
} else if (this._y > _root.hero._y) {
_root.hero._rotation = _root.hero._rotation + 10;
} else {
_root.hero._rotation = _root.hero._rotation - 10;
}
} else {
this.first = false;
}
boom = (Math.atan2(_root.hero._y - this._y, _root.hero._x - this._x) / Math.PI) * 180;
this.gunner.rot = boom;
if (this._rotation < 0) {
yum = -1;
rot = 360 + this._rotation;
} else {
yum = 1;
rot = this._rotation;
}
if (boom < 0) {
boomb = 360 + boom;
} else {
boomb = boom;
}
if ((rot < (boomb + 10)) and (rot > (boomb - 10))) {
} else {
one = boomb - rot;
if (one < 0) {
if (Math.abs(one) <= 180) {
this._rotation = this._rotation - (this.speed * this.rotationspd);
} else {
this._rotation = this._rotation + (this.speed * this.rotationspd);
}
} else if (Math.abs(one) <= 180) {
this._rotation = this._rotation + (this.speed * this.rotationspd);
} else {
this._rotation = this._rotation - (this.speed * this.rotationspd);
}
}
if (this.type == 3) {
this.speed = this.speed + 0.3;
if (this.speed > 2.8) {
this.speed = this.speed * 0.8;
}
} else {
this.speed = this.speed + 0.23;
if (this.speed > 2.3) {
this.speed = this.speed * 0.8;
}
}
this.xspeed = this.xspeed + vx;
this.yspeed = this.yspeed + vy;
this.speed = this.speed * this.decay;
this.xspeed = this.xspeed * this.decay;
this.yspeed = this.yspeed * this.decay;
i = 0;
while (i <= _root.bombnum) {
if (this.hitTest(_root["mine" + i])) {
rots = this._rotation + 180;
this.health = this.health / 5;
var _local3 = _root.attachMovie("explosion", "explosion" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
_local3._x = _root["mine" + i]._x;
_local3._y = _root["mine" + i]._y;
_local3._xscale = 800;
_local3._yscale = 800;
_local3._rotation = Math.random() * 360;
_local3.play();
_root["mine" + i].removeMovieClip();
}
i++;
}
i = 0;
while (i <= 100) {
if (this.hitTest(_root["shotr" + i])) {
if (_root.haspowercore == 1) {
this.health = this.health - (_root.fturretdmg + (_root.fturretdmg * 2));
} else {
this.health = this.health - _root.fturretdmg;
}
if (_root.hasgoldbullets == 1) {
this.health = this.health - 2;
}
this.cover.play();
var _local4 = _root.attachMovie("reflect", "reflect", _root.depth++);
_local4._x = _root["shotr" + i]._x;
_local4._y = _root["shotr" + i]._y;
_local4._rotation = _root["shotr" + i]._rotation;
_root["shotr" + i].removeMovieClip();
}
i++;
}
}
} else if (distance == 3) {
if (this.health <= 0) {
this.dead = true;
this.gotoAndStop(2);
} 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));
rads = (Math.PI/180);
vx = Math.sin((this._rotation - 270) * rads) * this.spd;
vy = (-Math.cos((this._rotation - 270) * rads)) * this.spd;
this._x = this._x + (this.xspeed / 2);
this._y = this._y + (this.yspeed / 2);
if (this.hitTest(_root.hero._x, _root.hero._y, true)) {
if (this.first == false) {
if (_root.hero.speed > 1) {
this.health = this.health - (_root.hero.speed + _root.bumperdmg);
this.first = true;
}
}
_root.shake = true;
if (!_root.hero.hitTest(_root.land._x, _root.land._y, true)) {
if (_root.hero.speed > 1) {
_root.hero._x = _root.hero._x - (_root.hero.xspeed / 1.2);
_root.hero._y = _root.hero._y - (_root.hero.yspeed / 1.2);
} else {
_root.hurthero(1);
_root.hero._x = _root.hero._x + (this.spd + (4 * Math.sin(((this._rotation + 5) * Math.PI) / 180)));
_root.hero._y = _root.hero._y + ((-this.spd) + (4 * Math.cos(((this._rotation + 5) * Math.PI) / 180)));
}
_root.hero._x = _root.hero._x - (this.xspeed / 4);
_root.hero._y = _root.hero._y - (this.yspeed / 4);
_root.hero.xspeed = _root.hero.xspeed - (this.xspeed / 3);
_root.hero.yspeed = _root.hero.yspeed - (this.yspeed / 3);
}
if (this._x < _root.hero._x) {
if (this._y > _root.hero._y) {
_root.hero._rotation = _root.hero._rotation - 10;
} else {
_root.hero._rotation = _root.hero._rotation + 10;
}
} else if (this._y > _root.hero._y) {
_root.hero._rotation = _root.hero._rotation + 10;
} else {
_root.hero._rotation = _root.hero._rotation - 10;
}
} else {
this.first = false;
}
boom = 90 + ((Math.atan2(_root.hero._y - this._y, _root.hero._x - this._x) / Math.PI) * 180);
if (this._rotation < 0) {
yum = -1;
rot = 360 + this._rotation;
} else {
yum = 1;
rot = this._rotation;
}
if (boom < 0) {
boomb = 360 + boom;
} else {
boomb = boom;
}
if ((rot < (boomb + 5)) and (rot > (boomb - 5))) {
} else {
one = boomb - rot;
if (one < 0) {
if (Math.abs(one) <= 180) {
this._rotation = this._rotation - 3;
} else {
this._rotation = this._rotation + 3;
}
} else if (Math.abs(one) <= 180) {
this._rotation = this._rotation + 3;
} else {
this._rotation = this._rotation - 3;
}
}
i = 0;
while (i <= _root.bombnum) {
if (this.hitTest(_root["mine" + i])) {
rots = this._rotation + 180;
this.health = 0;
var _local3 = _root.attachMovie("explosion", "explosion" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
_local3._x = _root["mine" + i]._x;
_local3._y = _root["mine" + i]._y;
_local3._xscale = 800;
_local3._yscale = 800;
_local3._rotation = Math.random() * 360;
_local3.play();
_root["mine" + i].removeMovieClip();
}
i++;
}
i = 0;
while (i <= 100) {
if (this.hitTest(_root["shotr" + i])) {
if (_root.haspowercore == 1) {
this.health = this.health - (_root.fturretdmg + (_root.fturretdmg * 2));
} else {
this.health = this.health - _root.fturretdmg;
}
this.cover.play();
var _local4 = _root.attachMovie("reflect", "reflect", _root.depth++);
_local4._x = _root["shotr" + i]._x;
_local4._y = _root["shotr" + i]._y;
_local4._rotation = _root["shotr" + i]._rotation;
_root["shotr" + i].removeMovieClip();
}
i++;
}
}
} else {
i = 0;
while (i <= _root.bombnum) {
if (this.hitTest(_root["mine" + i])) {
rots = this._rotation + 180;
this.hit = true;
this.dead = true;
this.hspd = 90;
this.rot = rots;
this.gotoAndStop("die");
var _local3 = _root.attachMovie("explosion", "explosion" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
_local3._x = _root["mine" + i]._x;
_local3._y = _root["mine" + i]._y;
_local3._xscale = 800;
_local3._yscale = 800;
_local3._rotation = Math.random() * 360;
_local3.play();
_root["mine" + i].removeMovieClip();
}
i++;
}
i = 0;
while (i <= 100) {
if (this.hitTest(_root["shotr" + i])) {
this.health = this.health - _root.fturretdmg;
if (this.health > 0) {
this.hspd = 20;
this.rot = _root["shotr" + i]._rotation;
this.down = true;
this.dead = false;
this.gotoAndStop("hit");
this.hit = true;
var _local4 = _root.attachMovie("reflect", "reflect", _root.depth++);
_local4._x = _root["shotr" + i]._x;
_local4._y = _root["shotr" + i]._y;
_local4._rotation = _root["shotr" + i]._rotation;
_root["shotr" + i].removeMovieClip();
} else {
this.hit = true;
this.dead = true;
this.hspd = 20;
this.rot = _root["shotr" + i]._rotation;
this.gotoAndStop("die");
}
}
i++;
}
if (this.hitTest(_root.hero)) {
if (_root.day >= 12) {
var _local5 = _root.attachMovie("blood", "blood" + (Math.random() * 5), depth++);
changedepth();
_local5._x = (this._x + (Math.random() * 10)) - 5;
_local5._y = (this._y + (Math.random() * 10)) - 5;
_local5.timer = 0;
_local5._rotation = Math.random() * 360;
_local5.onEnterFrame = function () {
this.timer++;
if (this.timer >= 30) {
this.removeMovieClip();
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
}
if (this.down == false) {
ksb = new Sound(this);
ksb.attachSound("squash");
ksb.start(0, 1);
_root.shake = true;
this.health = this.health - ((_root.hero.speed * 1.3) + _root.bumperdmg);
}
if (this.health > 0) {
if ((_root.hero.speed > 0.5) or (_root.hero.speed < -0.5)) {
if (this.down == false) {
this.hspd = _root.hero.speed * 6;
}
this.rot = _root.hero._rotation - 270;
this.down = true;
this.dead = false;
this.gotoAndStop("hit");
this.hit = true;
}
} else {
this.hit = true;
this.dead = true;
if (this.down == false) {
this.hspd = _root.hero.speed * 9;
}
this.rot = _root.hero._rotation - 270;
this.gotoAndStop("die");
}
} else if (this.health <= 0) {
this.hit = true;
this.dead = true;
if (this.down == false) {
this.hspd = 6;
}
this.rot = this._rotation + 180;
this.gotoAndStop("die");
}
if (this.hit) {
this.down = true;
if (this.hspd > 0.4) {
if (_root.day < 12) {
var _local5 = _root.attachMovie("blood", "blood" + (Math.random() * 5), depth++);
changedepth();
_local5._x = (this._x + (Math.random() * 10)) - 5;
_local5._y = (this._y + (Math.random() * 10)) - 5;
_local5.timer = 0;
_local5._rotation = Math.random() * 360;
_local5.onEnterFrame = function () {
this.timer++;
if (_root.day < 7) {
if (this.timer >= 60) {
this._alpha = this._alpha - 2;
}
} else if (this.timer >= 30) {
this.removeMovieClip();
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
}
}
this._x = this._x + (this.hspd * Math.sin((this.rot * Math.PI) / 180));
this._y = this._y + ((-this.hspd) * Math.cos((this.rot * Math.PI) / 180));
this.hspd = this.hspd * 0.5;
if (this.hspd < 0.4) {
this.hit = false;
}
}
if (!this.down) {
if (!this.dead) {
if (_root.game and (_root.pause == undefined)) {
var _local6 = this._x - _root.hero._x;
var _local7 = this._y - _root.hero._y;
distb = Math.sqrt((_local6 * _local6) + (_local7 * _local7));
this._rotation = 90 + ((Math.atan2(_root.hero._y - this._y, _root.hero._x - this._x) / Math.PI) * 180);
if (distb < distance) {
this.gotoAndStop("attack");
} else {
this.gotoAndStop("walk");
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));
}
}
}
}
}
}
};
}
spotter._x = _root.hero._x;
spotter._y = _root.hero._y;
spotter._rotation = (Math.atan2(_root._ymouse - spotter._y, _root._xmouse - spotter._x) / Math.PI) * 180;
if (_root.lastkill != _root.kills) {
_root.kongregateStats.submit("kills", _root.kills);
var _local13 = _root.kills;
}
if (_root.daynumber == undefined) {
_root.nomove = false;
if ((_root.pause == undefined) and (daytimer < 1190)) {
_root.game = true;
}
}
if (_root.health <= 0) {
_root.hero.play();
}
if (Key.isDown(80)) {
if (_root.pause == undefined) {
var pa = _root.attachMovie("pause", "pause", _root.getNextHighestDepth());
pa._x = _root.cam._x;
pa._y = _root.cam._y;
pa.onEnterFrame = function () {
pa._x = _root.cam._x;
pa._y = _root.cam._y;
if (_root._currentframe != 7) {
this.removeMovieClip();
}
};
}
}
if (_root.game and (_root.pause == undefined)) {
if (_root.hasmines > 0) {
if (bombtime < 200) {
bombtime++;
} else if (_root._currentframe == 7) {
var _local8 = _root.attachMovie("mine", "mine" + (bombnum++), _root.depth++);
_root.changedepth();
_local8._x = _root.hero._x;
_local8._y = _root.hero._y;
_local8._rotation = Math.random() * 360;
bombtime = _root.hasmines;
}
if (bombnum > 40) {
bombnum = 0;
}
}
}
if (_root.mode == "play") {
if (daytimer == 1190) {
var _local6 = _root.attachMovie("portal", "portal", _root.depth++);
_root.changedepth();
_local6._x = _root.hero._x;
_local6._y = _root.hero._y;
nomove = true;
_local6._alpha = 80;
_local6.play();
_local6.onEnterFrame = function () {
this._x = _root.hero._x;
this._y = _root.hero._y;
};
delete eval (makebad());
a = 0;
while (a <= _root.badnum) {
_root["mane" + a].removeMovieClip();
a++;
}
}
if (daytimer >= 1200) {
_root.topbar.removeMovieClip();
a = 0;
while (a <= _root.badnum) {
_root["mane" + a].removeMovieClip();
a++;
}
a = 0;
while (a <= _root.bombnum) {
_root["mine" + a].removeMovieClip();
a++;
}
daytimer = 0;
delete daytimer;
if (_root.day == 19) {
_root.gotoAndStop("win");
} else {
_root.gotoAndStop("base");
}
}
} else if (daytimer >= 400) {
_root.day++;
spawnenemyatime = 120 / (_root.day / 3);
spawnenemybtime = 165 / (_root.day / 2);
spawnenemyctime = 380 / (_root.day / 3.5);
spawnenemydtime = 450 - (_root.day * 3);
spawnenemyetime = 500 - (_root.day * 2);
daytimer = 0;
}
if (_root._currentframe == 7) {
if (_root.pause == undefined) {
daytimer++;
}
}
_root.topbar._x = _root.cam._x;
_root.topbar._y = _root.cam._y;
var _local12 = _root.hero._x - herox;
var _local11 = _root.hero._y - heroy;
dist = Math.sqrt((_local12 * _local12) + (_local11 * _local11));
if (dist >= 11) {
if (Key.isDown(38)) {
var _local7 = _root.attachMovie("track", "tracke" + tracknum, depth++);
changedepth();
tracknum++;
_local7._x = _root.hero._x;
_local7._y = _root.hero._y;
_local7._rotation = hero._rotation;
herox = _root.hero._x;
heroy = _root.hero._y;
}
}
if (_root.day <= 8) {
atimer++;
}
if (_root.game) {
if (_root.pause == undefined) {
btimer++;
ctimer++;
dtimer++;
etimer++;
if (atimer >= spawnenemyatime) {
makebad(4, 2, "mana", 35, 1);
atimer = 0;
}
if (btimer >= spawnenemybtime) {
makebad(6, 2, "manb", (Math.random() * 100) + 210, 2);
btimer = 0;
}
if (ctimer >= spawnenemyctime) {
if (_root.day >= 4) {
makebad(45, (Math.random() * 1) + 1, "enemy3", 2, 3);
ctimer = 0;
}
}
if (dtimer >= spawnenemydtime) {
if (_root.day >= 7) {
makebad(65, (Math.random() * 1) + 1, "enemy4", 2, 4);
dtimer = 0;
}
}
if (etimer >= spawnenemyetime) {
if (_root.day >= 10) {
makebad(135, 2, "enemy5", 3, 5);
etimer = 0;
}
}
}
} else {
trace("ddd");
}
};
Instance of Symbol 497 MovieClip "cam" in Frame 7
onClipEvent (load) {
_root.hero._x = 240;
}
onClipEvent (enterFrame) {
this._x = (_root.hero._x - ((_root.hero._x * 275) / 600)) + 100;
this._y = (_root.hero._y - ((_root.hero._y * 200) / 600)) + 80;
if (_root.shake) {
ks = new Sound(this);
ks.attachSound("hit");
ks.start(0, 1);
this._x = this._x + ((Math.random() * -1.5) + 3);
this._y = this._y + ((Math.random() * -1.5) + 3);
this._x = this._x + ((Math.random() * -1.5) + 3);
this._y = this._y + ((Math.random() * -1.5) + 3);
_root.shake = false;
}
}
Instance of Symbol 472 MovieClip "hero" in Frame 7
onClipEvent (load) {
decay = 0.89;
xspeed = 0;
yspeed = 0;
maxspeed = 17;
minspeed = -17;
speed = 0;
}
onClipEvent (enterFrame) {
rads = (Math.PI/180);
vx = Math.sin((this._rotation + 90) * rads) * speed;
vy = (-Math.cos((this._rotation + 90) * rads)) * speed;
this._x = this._x + ((speed * Math.sin(((this._rotation + 90) * Math.PI) / 180)) / 3);
this._y = this._y + (((-speed) * Math.cos(((this._rotation + 90) * Math.PI) / 180)) / 3);
this._x = this._x + (xspeed / 3);
this._y = this._y + (yspeed / 3);
if (Math.abs(speed) < 0.1) {
speed = 0;
xspeed = 0;
yspeed = 0;
}
if (_root.game == true) {
if (_root.nomove == false) {
if (_root.land.hitTest(_x, _y, true)) {
if (Math.abs(speed) < 2) {
this._x = this._x - xspeed;
this._y = this._y - yspeed;
speed = speed * -1;
xspeed = xspeed * -1;
yspeed = yspeed * -1;
} else {
this._x = this._x - (xspeed / 1.2);
this._y = this._y - (yspeed / 1.2);
speed = speed * -0.6;
xspeed = xspeed * -0.6;
yspeed = yspeed * -0.6;
}
}
if (Key.isDown(38) or Key.isDown(87)) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.1) {
this._rotation = this._rotation - (speed + _root.hasturn);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.1) {
this._rotation = this._rotation + (speed + _root.hasturn);
}
}
} else if (Key.isDown(40) or Key.isDown(83)) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.1) {
this._rotation = this._rotation - (speed + _root.hasturn);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.1) {
this._rotation = this._rotation + (speed + _root.hasturn);
}
}
} else if (speed < 0) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.1) {
this._rotation = this._rotation - (speed + _root.hasturn);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.1) {
this._rotation = this._rotation + (speed + _root.hasturn);
}
}
} else {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.1) {
this._rotation = this._rotation - (speed + _root.hasturn);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.1) {
this._rotation = this._rotation + (speed + _root.hasturn);
}
}
}
if (Key.isDown(38) or Key.isDown(87)) {
if (!_root.hasrocket) {
speed = speed + 0.25;
} else {
speed = speed + 0.35;
}
xspeed = xspeed + vx;
yspeed = yspeed + vy;
} else if (Key.isDown(40) or Key.isDown(83)) {
if (!_root.hasrocket) {
speed = speed - 0.25;
} else {
speed = speed - 0.35;
}
xspeed = xspeed + vx;
yspeed = yspeed + vy;
} else {
speed = speed * decay;
}
if (!_root.hasrocket) {
if (speed > 8.1) {
speed = speed * 0.8;
}
if (speed < -8.1) {
speed = speed * 0.8;
}
} else {
if (speed > 10.1) {
speed = speed * 0.8;
}
if (speed < -10.1) {
speed = speed * 0.8;
}
}
}
}
xspeed = xspeed * decay;
yspeed = yspeed * decay;
}
Instance of Symbol 505 MovieClip in Frame 7
onClipEvent (enterFrame) {
_x = _root.cam._x;
_y = _root.cam._y;
this._alpha = 75 - _root.health;
}
Frame 8
function dodesc(who, frame) {
if (_root.hero.hitTest(who)) {
who.hit = true;
_root.description._visible = true;
_root.description.desc.gotoAndStop(frame);
}
if (!_root.hero.hitTest(who)) {
_root.onone = false;
if (who.hit) {
_root.description._visible = false;
who.hit = false;
}
}
}
delete eval (onEnterFrame());
temp = false;
daytimer = 0;
_root.game = false;
instruc.removeMovieClip();
instruc2.removeMovieClip();
_root.topbar.removeMovieClip();
var t = _root.attachMovie("topbar", "topbar", _root.depth++);
_root.changedepth();
_root.topbar._x = _root.cam._x;
_root.topbar._y = _root.cam._y;
_root.hero.body.gotoAndStop(_root.armor);
_root.description._visible = false;
if (_root.hint3 == 0) {
var ins = _root.attachMovie("instructions3", "instruc3", _root.depth++);
_root.changedepth();
ins._x = _root.cam._x;
ins._y = _root.cam._y - (_root.cam._height / 2);
ins.timer = 0;
ins.onEnterFrame = function () {
this.timer++;
if (this.timer <= 15) {
this._y = this._y + 4;
}
if (this.timer >= 100) {
this._y = this._y - 5;
}
if (this.timer >= 170) {
this.removeMovieClip();
}
};
_root.hint3 = 1;
}
_root.fade();
Instance of Symbol 513 MovieClip "u6" in Frame 8
onClipEvent (enterFrame) {
_root.dodesc(this, 9);
}
Instance of Symbol 516 MovieClip "u3" in Frame 8
onClipEvent (enterFrame) {
_root.dodesc(this, 1);
_root.daytimer = 0;
}
Instance of Symbol 519 MovieClip "u5" in Frame 8
onClipEvent (enterFrame) {
_root.dodesc(this, 3);
}
Instance of Symbol 522 MovieClip "u4" in Frame 8
onClipEvent (enterFrame) {
_root.dodesc(this, 2);
}
Instance of Symbol 524 MovieClip "u7" in Frame 8
onClipEvent (enterFrame) {
_root.dodesc(this, 4);
}
Instance of Symbol 528 MovieClip "u2" in Frame 8
onClipEvent (enterFrame) {
_root.dodesc(this, 8);
}
Instance of Symbol 530 MovieClip "u1" in Frame 8
onClipEvent (enterFrame) {
_root.dodesc(this, 5);
}
Instance of Symbol 472 MovieClip "hero" in Frame 8
onClipEvent (load) {
decay = 0.92;
xspeed = 0;
yspeed = 0;
maxspeed = 17;
minspeed = -17;
speed = 0;
}
onClipEvent (enterFrame) {
rads = (Math.PI/180);
vx = Math.sin((this._rotation + 90) * rads) * speed;
vy = (-Math.cos((this._rotation + 90) * rads)) * speed;
this._x = this._x + (speed * Math.sin(((this._rotation + 90) * Math.PI) / 180));
this._y = this._y + ((-speed) * Math.cos(((this._rotation + 90) * Math.PI) / 180));
this._x = this._x + (xspeed / 4);
this._y = this._y + (yspeed / 4);
if (_root.land.hitTest(_x, _y, true)) {
if (Math.abs(speed) < 2) {
this._x = this._x - xspeed;
this._y = this._y - yspeed;
speed = speed * -1;
xspeed = xspeed * -1;
yspeed = yspeed * -1;
} else {
this._x = this._x - (xspeed / 1.2);
this._y = this._y - (yspeed / 1.2);
speed = speed * -0.6;
xspeed = xspeed * -0.6;
yspeed = yspeed * -0.6;
}
}
if (Math.abs(speed) < 0.1) {
speed = 0;
xspeed = 0;
yspeed = 0;
}
if (Key.isDown(38) or Key.isDown(87)) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation - ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation + ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
} else if (Key.isDown(40) or Key.isDown(83)) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation - ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation + ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
} else if (speed < 0) {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation - ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation + ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
} else {
if (Key.isDown(37) or Key.isDown(65)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation - ((speed + (_root.hasturn / 1.5)) * 1.5);
}
}
if (Key.isDown(39) or Key.isDown(68)) {
if (Math.abs(speed) > 0.4) {
this._rotation = this._rotation + (((speed * 1.5) + (_root.hasturn / 1.5)) * 1.5);
}
}
}
if (Key.isDown(38) or Key.isDown(87)) {
speed = speed + 0.15;
xspeed = xspeed + vx;
yspeed = yspeed + vy;
} else if (Key.isDown(40) or Key.isDown(83)) {
speed = speed - 0.15;
xspeed = xspeed + vx;
yspeed = yspeed + vy;
} else {
speed = speed * decay;
}
if (speed > 3.1) {
speed = speed * 0.8;
}
if (speed < -3.1) {
speed = speed * 0.8;
}
xspeed = xspeed * (decay - 0.03);
yspeed = yspeed * (decay - 0.03);
}
Instance of Symbol 473 MovieClip in Frame 8
onClipEvent (enterFrame) {
if (_root.hero.hitTest(this)) {
_root.topbar.removeMovieClip();
_root.comefrom = "shop";
_root.gotoAndStop("base");
}
}
Frame 9
function dodesc(who, frame) {
if (_root.hero.hitTest(who)) {
who.hit = true;
_root.description._visible = true;
_root.description.desc.gotoAndStop(frame);
}
if (!_root.hero.hitTest(who)) {
_root.onone = false;
if (who.hit) {
_root.description._visible = false;
who.hit = false;
}
}
}
delete eval (onEnterFrame());
temp = false;
daytimer = 0;
_root.game = false;
_root.topbar.removeMovieClip();
var t = _root.attachMovie("topbar", "topbar", _root.depth++);
_root.changedepth();
_root.topbar._x = _root.cam._x;
_root.topbar._y = _root.cam._y;
_root.description._visible = false;
_root.hero.body.gotoAndStop(_root.armor);
instruc.removeMovieClip();
instruc2.removeMovieClip();
if (_root.hint3 == 0) {
var ins = _root.attachMovie("instructions3", "instruc3", _root.depth++);
_root.changedepth();
ins._x = _root.cam._x;
ins._y = _root.cam._y - (_root.cam._height / 2);
ins.timer = 0;
ins.onEnterFrame = function () {
this.timer++;
if (this.timer <= 15) {
this._y = this._y + 4;
}
if (this.timer >= 100) {
this._y = this._y - 5;
}
if (this.timer >= 170) {
this.removeMovieClip();
}
};
_root.hint3 = 1;
}
_root.fade();
Instance of Symbol 608 MovieClip "u6" in Frame 9
onClipEvent (enterFrame) {
_root.dodesc(this, 11);
_root.daytimer = 0;
}
Instance of Symbol 611 MovieClip "u8" in Frame 9
onClipEvent (enterFrame) {
_root.dodesc(this, 7);
}
Instance of Symbol 614 MovieClip in Frame 9
onClipEvent (enterFrame) {
_root.dodesc(this, 12);
}
Instance of Symbol 618 MovieClip in Frame 9
onClipEvent (enterFrame) {
_root.dodesc(this, 13);
}
Instance of Symbol 619 MovieClip in Frame 9
onClipEvent (enterFrame) {
_root.dodesc(this, 10);
}
Instance of Symbol 623 MovieClip in Frame 9
onClipEvent (enterFrame) {
_root.dodesc(this, 14);
}
Instance of Symbol 473 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (_root.hero.hitTest(this)) {
_root.topbar.removeMovieClip();
_root.comefrom = "shop2";
_root.gotoAndStop("base");
}
}
Instance of Symbol 630 MovieClip in Frame 11
on (release) {
getURL ("http://www.hiddenninjagames.com", _blank);
}
Symbol 15 MovieClip [explosion] Frame 11
stop();
this.removeMovieClip();
Symbol 20 MovieClip [fire] Frame 15
this.removeMovieClip();
Symbol 24 MovieClip [rocket] Frame 4
stop();
Symbol 27 MovieClip [fade] Frame 12
this.removeMovieClip();
Symbol 29 MovieClip [coinage] Frame 27
this.removeMovieClip();
Symbol 33 MovieClip [daynumber] Frame 1
day = _root.day;
Symbol 36 MovieClip [behind] Frame 3
stop();
Symbol 72 Button
on (release) {
_root.game = true;
_root.nomove = false;
trace("ok");
this.removeMovieClip();
}
Symbol 73 MovieClip [pause] Frame 1
_root.game = false;
_root.nomove = true;
Symbol 76 MovieClip [portal] Frame 29
stop();
this.removeMovieClip();
Symbol 81 MovieClip [cover] Frame 1
stop();
Symbol 81 MovieClip [cover] Frame 7
this.removeMovieClip();
Symbol 111 MovieClip Frame 109
stop();
Symbol 117 Button
on (release) {
_root.adBox.removeMovieClip();
_root.gotoAndStop("logo");
}
Symbol 118 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndPlay ("loaded");
}
Symbol 118 MovieClip Frame 2
gotoAndPlay (1);
Symbol 118 MovieClip Frame 191
stop();
Symbol 150 MovieClip Frame 11
if (_root.pause != undefined) {
gotoAndPlay (10);
}
Symbol 150 MovieClip Frame 12
if (_root.game == true) {
var shot = _root.attachMovie("shot2", "shot" + _root.getNextHighestDepth(), _root.depth++);
_root.changedepth();
shot._x = _parent._x;
shot._y = _parent._y;
shot._rotation = _parent._rotation;
shot.spd = 30;
shot.onEnterFrame = function () {
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));
if (this.hitTest(_root.hero)) {
_root.herohit();
_root.hurthero(1.5);
this.removeMovieClip();
this.cover.play();
var _local3 = _root.attachMovie("reflect", "reflect", _root.depth++);
_root.changedepth();
_local3._x = this._x;
_local3._y = this._y;
_local3._rotation = this._rotation;
this.removeMovieClip();
}
if (_root.land.hitTest(_x, _y, true)) {
this.removeMovieClip();
}
};
}
Symbol 150 MovieClip Frame 21
if (_root.game == true) {
gotoAndPlay (7);
}
Symbol 176 MovieClip Frame 38
_parent.gotoAndStop(1);
Symbol 188 MovieClip Frame 63
_parent._parent.removeMovieClip();
Symbol 193 MovieClip Frame 64
_parent._parent.removeMovieClip();
Symbol 194 MovieClip Frame 1
stop();
rnd = Math.round((Math.random() * 1) + 2);
_root.money = _root.money + 8;
var co = _root.attachMovie("coinage", "coinage" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
co._x = _parent._x;
co._y = _parent._y;
co.amount = 8;
co.onEnterFrame = function () {
co._y = co._y - 1;
co._alpha = co._alpha - 1;
if (co._alpha <= 0) {
co.removeMovieClip();
}
};
gotoAndStop(rnd);
Symbol 194 MovieClip Frame 2
_root.kills++;
Symbol 194 MovieClip Frame 3
_root.kills++;
Symbol 195 MovieClip [manb] Frame 1
stop();
this.down = false;
Symbol 195 MovieClip [manb] Frame 2
this.down = false;
Symbol 195 MovieClip [manb] Frame 3
this.down = true;
Symbol 195 MovieClip [manb] Frame 4
this.down = true;
health = 0;
var co = _root.attachMovie("coinage", "coinage" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
co._x = _x;
co._y = _y;
Symbol 214 MovieClip Frame 5
if (this.hitTest(_root.hero)) {
_root.herohit();
_root.hurthero(2);
}
Symbol 231 MovieClip Frame 35
_parent.gotoAndStop(1);
Symbol 239 MovieClip Frame 68
_parent._parent.removeMovieClip();
Symbol 250 MovieClip Frame 60
_parent._parent.removeMovieClip();
Symbol 251 MovieClip Frame 1
stop();
rnd = Math.round((Math.random() * 1) + 2);
_root.money = _root.money + 6;
gotoAndStop(rnd);
Symbol 251 MovieClip Frame 2
_root.kills++;
Symbol 251 MovieClip Frame 3
_root.kills++;
Symbol 252 MovieClip [mana] Frame 1
stop();
down = false;
Symbol 252 MovieClip [mana] Frame 2
down = false;
Symbol 252 MovieClip [mana] Frame 3
stop();
down = true;
Symbol 252 MovieClip [mana] Frame 4
stop();
health = 0;
down = true;
var co = _root.attachMovie("coinage", "coinage" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
co._x = _x;
co._y = _y;
Symbol 263 MovieClip Frame 1
stop();
Symbol 263 MovieClip Frame 3
var shot = _root.attachMovie("rocket", "shot" + _root.getNextHighestDepth(), _root.depth++);
_root.changedepth();
shot._x = _parent._x;
shot._y = _parent._y;
shot._rotation = 90 + ((Math.atan2(_root.hero._y - (_parent._y + this._y), _root.hero._x - (_parent._x + this._x)) / Math.PI) * 180);
shot.spd = 15;
shot.onEnterFrame = function () {
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));
if (this.hitTest(_root.hero)) {
_root.shake = true;
_root.herohit();
_root.hurthero(8);
this.removeMovieClip();
this.cover.play();
var _local3 = _root.attachMovie("explosion", "explosion" + (Math.random() * 100), _root.depth++);
_root.changedepth();
_local3._x = _root.hero._x;
_local3._y = _root.hero._y;
_local3._xscale = 500;
_local3._yscale = 500;
_local3._rotation = this._rotation;
this.removeMovieClip();
}
if (_root.land.hitTest(_x, _y, true)) {
this.removeMovieClip();
}
};
Symbol 274 MovieClip Frame 11
stop();
this.removeMovieClip();
Symbol 277 MovieClip Frame 3
if (_root.firsttank == false) {
_root.kongregateStats.submit("Destroy first tank", 1);
_root.firsttank = true;
}
Symbol 277 MovieClip Frame 43
_parent.removeMovieClip();
Symbol 278 MovieClip [enemy5] Frame 1
stop();
Instance of Symbol 263 MovieClip "gunner" in Symbol 278 MovieClip [enemy5] Frame 1
onClipEvent (load) {
time = 0;
rot = null;
}
onClipEvent (enterFrame) {
if (_root.game == true) {
boom = (90 + ((Math.atan2(_root.hero._y - (this._y + _parent._y), _root.hero._x - (this._x + _parent._x)) / Math.PI) * 180)) - _parent._rotation;
if (this._rotation < 0) {
yum = -1;
rot = 360 + this._rotation;
} else {
yum = 1;
rot = this._rotation;
}
if (boom < 0) {
boomb = 360 + boom;
} else {
boomb = boom;
}
if ((rot < (boomb + 3)) and (rot > (boomb - 3))) {
} else {
one = boomb - rot;
if (one < 0) {
if (Math.abs(one) <= 180) {
this._rotation = this._rotation - 1;
} else {
this._rotation = this._rotation + 1;
}
} else if (Math.abs(one) <= 180) {
this._rotation = this._rotation + 1;
} else {
this._rotation = this._rotation - 1;
}
}
tempDistX = Math.pow((_parent._x + this._x) - _root.hero._x, 2);
tempDistY = Math.pow((_parent._y + this._y) - _root.hero._y, 2);
tempDist = Math.pow(tempDistX + tempDistY, 0.5);
if (time <= 30) {
time++;
} else if (tempDist < 275) {
this.gotoAndPlay(2);
time = 0;
}
}
}
Symbol 278 MovieClip [enemy5] Frame 2
_root.kills++;
_root.money = _root.money + 30;
var co = _root.attachMovie("coinage", "coinage" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
co._x = _x;
co._y = _y;
Symbol 284 MovieClip Frame 1
stop();
if (_parent._parent.type == 3) {
gotoAndStop (2);
}
Symbol 284 MovieClip Frame 2
stop();
Symbol 290 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 2
if (_root.pause != undefined) {
gotoAndStop (1);
}
Symbol 290 MovieClip Frame 3
if (_parent == _root.hero) {
if ((_root.hasgoldbullets == 1) and (_root.hero.gunner.closestmc.type == 5)) {
_root.hero.gunner.closestmc.health = _root.hero.gunner.closestmc.health - 4;
}
if (_root.haspowercore == 1) {
_root.hero.gunner.closestmc.health = _root.hero.gunner.closestmc.health - (_root.gunmandmg + (_root.gunmandmg * 0.2));
} else {
_root.hero.gunner.closestmc.health = _root.hero.gunner.closestmc.health - _root.gunmandmg;
}
} else {
_root.hurthero(1);
}
Symbol 292 MovieClip Frame 54
_parent.removeMovieClip();
Symbol 293 MovieClip [enemy4] Frame 1
stop();
Instance of Symbol 290 MovieClip "gunner" in Symbol 293 MovieClip [enemy4] Frame 1
onClipEvent (load) {
time = 0;
rot = null;
}
onClipEvent (enterFrame) {
if (_root.game == true) {
tempDistX = Math.pow((_parent._x + this._x) - _root.hero._x, 2);
tempDistY = Math.pow((_parent._y + this._y) - _root.hero._y, 2);
tempDist = Math.pow(tempDistX + tempDistY, 0.5);
if (time <= 25) {
time++;
} else if (tempDist < 220) {
this.gotoAndPlay(2);
time = 0;
}
endname = undefined;
}
}
Symbol 293 MovieClip [enemy4] Frame 2
_root.kills++;
_root.money = _root.money + 20;
var co = _root.attachMovie("coinage", "coinage" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
co._x = _x;
co._y = _y;
Symbol 295 MovieClip [enemy3] Frame 1
stop();
Symbol 295 MovieClip [enemy3] Frame 2
_root.kills++;
_root.money = _root.money + 10;
var co = _root.attachMovie("coinage", "coinage" + (Math.random() * 1000), _root.depth++);
_root.changedepth();
co._x = _x;
co._y = _y;
Symbol 296 MovieClip [man] Frame 1
stop();
Symbol 300 MovieClip [shot] Frame 3
stop();
Symbol 306 MovieClip [reflect] Frame 6
this.removeMovieClip();
Symbol 308 MovieClip [shot2] Frame 3
stop();
Symbol 319 MovieClip Frame 124
stop();
Symbol 321 Button
on (release) {
_parent.gotoAndPlay("done");
}
Symbol 323 Button
on (release) {
nextFrame();
}
Symbol 335 MovieClip Frame 1
if (_root.day == 1) {
gotoAndStop (1);
} else if (_root.day == 3) {
gotoAndStop (5);
} else if (_root.day == 4) {
gotoAndStop (6);
} else if (_root.day == 7) {
gotoAndStop (7);
} else if (_root.day == 9) {
gotoAndStop (8);
} else if (_root.day == 10) {
gotoAndStop (9);
} else {
gotoAndStop (10);
}
stop();
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 130) {
thing.gotoAndPlay(1);
gotoAndStop (2);
}
};
Symbol 335 MovieClip Frame 2
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 130) {
thing.gotoAndPlay(1);
gotoAndStop (3);
}
};
Symbol 335 MovieClip Frame 3
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 130) {
thing.gotoAndPlay(1);
gotoAndStop (4);
}
};
Symbol 335 MovieClip Frame 4
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 50) {
_parent.play();
}
};
Symbol 335 MovieClip Frame 5
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 130) {
_parent.play();
_root.game = true;
}
};
Symbol 335 MovieClip Frame 6
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 130) {
_parent.play();
_root.game = true;
}
};
Symbol 335 MovieClip Frame 7
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 130) {
_parent.play();
_root.game = true;
}
};
Symbol 335 MovieClip Frame 8
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 130) {
_parent.play();
_root.game = true;
}
};
Symbol 335 MovieClip Frame 9
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 130) {
_parent.play();
_root.game = true;
}
};
Symbol 335 MovieClip Frame 10
timer = 0;
onEnterFrame = function () {
timer++;
if (timer > 50) {
_parent.play();
_root.game = true;
}
};
Symbol 336 MovieClip [message] Frame 1
_root.game = false;
Symbol 336 MovieClip [message] Frame 12
stop();
Symbol 336 MovieClip [message] Frame 23
_root.game = true;
this.removeMovieClip();
Symbol 347 Button
on (release) {
_root.gotoAndStop("dead");
}
Symbol 350 Button
on (release) {
stopAllSounds();
nextFrame();
}
Symbol 352 Button
on (release) {
kirupaSound = new Sound(this);
kirupaSound.attachSound("music");
kirupaSound.start(0, 99);
gotoAndStop (1);
}
Symbol 353 MovieClip Frame 1
stop();
Symbol 353 MovieClip Frame 2
stop();
_root.sound = true;
trace("d");
if ((_root._currentframe == 7) and _root.sound) {
kirupaSound = new Sound(this);
kirupaSound.attachSound("music");
kirupaSound.start(0, 99);
}
Symbol 353 MovieClip Frame 3
_root.sound = false;
Instance of Symbol 356 MovieClip "health" in Symbol 358 MovieClip Frame 1
onClipEvent (load) {
var owidth = this._width;
}
onClipEvent (enterFrame) {
var rs = (owidth * _root.health);
this._width = rs / 100;
}
Symbol 361 MovieClip [topbar] Frame 1
this.onEnterFrame = function () {
money_txt = _root.money;
health_txt = _root.health + " / 100";
kills = _root.kills;
day = _root.day;
};
if (_root.sound) {
music.gotoAndStop(2);
} else {
music.gotoAndStop(3);
}
Symbol 376 MovieClip Frame 19
stop();
Symbol 393 Button
on (release) {
_root.mode = "play";
play();
where = 2;
}
Symbol 394 Button
on (release) {
_root.mode = "fun";
play();
where = 3;
}
Symbol 395 Button
on (release) {
getURL ("http://www.hiddenninjagames.com");
}
Symbol 396 Button
on (release) {
getURL ("http://www.hiddenninjagames.com/?static=wk", _blank);
}
Symbol 397 MovieClip Frame 20
stop();
Symbol 397 MovieClip Frame 36
stop();
if (where == 2) {
trace("d");
_parent.gotoAndStop("next");
}
if (where == 3) {
_root.gotoAndStop("story");
}
Symbol 408 Button
on (release) {
_root.difficulty = "noob";
play();
}
Symbol 409 Button
on (release) {
_root.difficulty = "average";
play();
}
Symbol 410 Button
on (release) {
_root.difficulty = "hard core";
play();
}
Symbol 411 MovieClip Frame 19
stop();
Symbol 411 MovieClip Frame 38
_root.gotoAndStop("story");
Symbol 412 MovieClip Frame 20
stop();
Symbol 418 Button
on (release) {
if (_root.mode == "play") {
_root.gotoAndStop("base");
} else {
_root.gotoAndStop("battle");
}
}
Symbol 427 MovieClip Frame 1
stop();
time = 0;
_alpha = 0;
onEnterFrame = function () {
time++;
if (time > 140) {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
nextFrame();
}
} else if (_alpha < 100) {
_alpha = (_alpha + 5);
}
};
Symbol 427 MovieClip Frame 2
time = 0;
_alpha = 0;
onEnterFrame = function () {
time++;
if (time > 140) {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
nextFrame();
}
} else if (_alpha < 100) {
_alpha = (_alpha + 5);
}
};
Symbol 427 MovieClip Frame 3
time = 0;
_alpha = 0;
onEnterFrame = function () {
time++;
if (time > 140) {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
nextFrame();
}
} else if (_alpha < 100) {
_alpha = (_alpha + 5);
}
};
Symbol 427 MovieClip Frame 4
time = 0;
_alpha = 0;
onEnterFrame = function () {
time++;
if (time > 140) {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
nextFrame();
}
} else if (_alpha < 100) {
_alpha = (_alpha + 5);
}
};
Symbol 427 MovieClip Frame 5
time = 0;
_alpha = 0;
onEnterFrame = function () {
time++;
if (time > 140) {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
if (_root.mode == "play") {
_root.gotoAndStop("base");
} else {
_root.gotoAndStop("battle");
}
}
} else if (_alpha < 100) {
_alpha = (_alpha + 5);
}
};
Symbol 432 Button
on (release) {
_root.gotoAndPlay(1);
}
Symbol 433 MovieClip Frame 1
stop();
time = 0;
_alpha = 0;
onEnterFrame = function () {
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
};
Symbol 436 Button
on (release) {
getURL ("http://www.hiddenninjagames.com", _blank);
}
Symbol 439 MovieClip Frame 1
stop();
time = 0;
_alpha = 0;
onEnterFrame = function () {
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
};
Symbol 458 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 1
stop();
Instance of Symbol 280 MovieClip in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
rot = this._rotation;
}
onClipEvent (enterFrame) {
trace(_rotation);
if (Key.isDown(39)) {
_rotation = (rot + 15);
} else if (Key.isDown(37)) {
_rotation = (rot - 15);
} else {
_rotation = rot;
}
}
Instance of Symbol 280 MovieClip in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
rot = this._rotation;
}
onClipEvent (enterFrame) {
trace(_rotation);
if (Key.isDown(39)) {
_rotation = (rot + 15);
} else if (Key.isDown(37)) {
_rotation = (rot - 15);
} else {
_rotation = rot;
}
}
Instance of Symbol 280 MovieClip in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
rot = this._rotation;
}
onClipEvent (enterFrame) {
trace(_rotation);
if (Key.isDown(39)) {
_rotation = (rot + 15);
} else if (Key.isDown(37)) {
_rotation = (rot - 15);
} else {
_rotation = rot;
}
}
Instance of Symbol 280 MovieClip in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
rot = this._rotation;
}
onClipEvent (enterFrame) {
trace(_rotation);
if (Key.isDown(39)) {
_rotation = (rot + 15);
} else if (Key.isDown(37)) {
_rotation = (rot - 15);
} else {
_rotation = rot;
}
}
Instance of Symbol 290 MovieClip "gunner" in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
var closet;
_root.closestmc;
time = 0;
}
onClipEvent (enterFrame) {
if (_root.hasgunman == 1) {
if (_root.game == true) {
_visible = true;
if (7 == _root._currentframe) {
i = 0;
while (i <= _root.badnum) {
tempDistX = Math.pow((_parent._x + this._x) - _root["mane" + i]._x, 2);
tempDistY = Math.pow((_parent._y + this._y) - _root["mane" + i]._y, 2);
tempDist = Math.pow(tempDistX + tempDistY, 0.5);
tempName = _root["mane" + i];
if (tempDist < 250) {
if (!tempName.dead) {
if (((tempDist < closet) || (closet == undefined)) || (endname == undefined)) {
closet = tempDist;
endname = tempName;
if (endname.type != 3) {
this._rotation = (endname._rotation - _root.hero._rotation) + 181;
} else {
this._rotation = (endname.gunner.rot - _root.hero._rotation) + 271;
}
}
}
}
i++;
}
closestmc = endname;
if (time <= _root.gunmanspd) {
time++;
} else if (closestmc != undefined) {
this.gotoAndPlay(2);
time = 0;
}
endname = undefined;
}
}
} else {
this._visible = false;
}
}
Instance of Symbol 461 MovieClip in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
timer = 5;
}
onClipEvent (enterFrame) {
if (_root.hasrocket == 1) {
_visible = true;
if (Key.isDown(39)) {
_rotation = -35;
} else if (Key.isDown(37)) {
_rotation = 35;
} else {
_rotation = 0;
}
if (Key.isDown(38)) {
i = 0;
while (i <= 2) {
var b = this.attachMovie("fire", "fire" + _root.depth, _root.depth++);
_root.changedepth();
b._x = ((this._x + 90) + (Math.random() * 18)) - 9;
b._y = ((this._y - 50) + (Math.random() * 18)) - 9;
b._xscale = 70;
b._yscale = 70;
b.gotoAndPlay((Math.random() * 16) + 1);
i++;
}
}
} else {
_visible = false;
}
}
Instance of Symbol 461 MovieClip in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
timer = 5;
}
onClipEvent (enterFrame) {
if (_root.hasrocket == 1) {
_visible = true;
if (Key.isDown(39)) {
_rotation = -35;
} else if (Key.isDown(37)) {
_rotation = 35;
} else {
_rotation = 0;
}
if (Key.isDown(38)) {
i = 0;
while (i <= 2) {
var b = this.attachMovie("fire", "fire" + _root.depth, _root.depth++);
_root.changedepth();
b._x = ((this._x + 90) + (Math.random() * 18)) - 9;
b._y = ((this._y + 70) + (Math.random() * 18)) - 9;
b._xscale = 70;
b._yscale = 70;
b.gotoAndPlay((Math.random() * 16) + 1);
i++;
}
}
} else {
_visible = false;
}
}
Instance of Symbol 467 MovieClip "gun" in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
function bulletstuff() {
if (this.time > 0) {
this._x = this._x + (_root.hero.xspeed / 2);
this._y = this._y + (_root.hero.yspeed / 2);
this.time--;
}
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));
if ((((this._x > 1000) or (this._x < -1000)) or (this._y < -1000)) or (this._y > 1000)) {
this.removeMovieClip();
}
}
shoot = false;
shotnum = 1;
time = 1;
shotnum = 1;
down = false;
}
onClipEvent (enterFrame) {
if (_root.hasfturret == 1) {
if (shotnum > 100) {
shotnum = 0;
}
_visible = true;
if (time <= _root.fturretspd) {
time++;
}
this._rotation = (_root.spotter._rotation - _root.hero._rotation) - 90;
if ((shoot and (time > _root.fturretspd)) and _root.game) {
if (_root._currentframe == 7) {
if (_root.hassplitshot == 0) {
var shots = _root.attachMovie("shot2", "shotr" + (shotnum++), _root.depth++);
_root.changedepth();
shots._rotation = _root.spotter._rotation + 90;
shots._x = _root.spotter._x;
shots._y = _root.spotter._y;
shots.spd = 50;
shots.time = 4;
this.gotoAndPlay(2);
shots.onEnterFrame = bulletstuff;
time = 0;
} else {
k = -1;
while (k <= 1) {
var shots = _root.attachMovie("shot2", "shotr" + (shotnum++), _root.depth++);
_root.changedepth();
shots._rotation = (_root.spotter._rotation + 90) + (k * 15);
shots._x = _root.spotter._x;
shots._y = _root.spotter._y;
shots.spd = 50;
shots.time = 4;
this.gotoAndPlay(2);
shots.onEnterFrame = bulletstuff;
time = 0;
k++;
}
}
}
}
} else {
_visible = false;
}
if (Key.isDown(32)) {
shoot = true;
} else if (down == false) {
shoot = false;
}
}
onClipEvent (mouseDown) {
down = true;
shoot = true;
}
onClipEvent (mouseUp) {
down = false;
shoot = false;
}
Symbol 472 MovieClip Frame 2
_root.nomove = true;
_root.game = false;
speed = 0;
xspeed = 0;
yspeed = 0;
Symbol 472 MovieClip Frame 13
_root.fade();
Symbol 472 MovieClip Frame 18
_root.gotoAndStop("dead");
trace(_root._currentframe);
Symbol 485 MovieClip Frame 1
closed = true;
Symbol 485 MovieClip Frame 2
closed = true;
Symbol 485 MovieClip Frame 13
stop();
closed = false;
Symbol 497 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
parentColor.setTransform(camColor.getTransform());
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 501 MovieClip [track] Frame 12
this.removeMovieClip();
Symbol 516 MovieClip Frame 1
onEnterFrame = function () {
if (_root.bumperdmg >= 2) {
_alpha = 50;
}
};
Symbol 519 MovieClip Frame 1
onEnterFrame = function () {
if (_root.bumperdmg >= 8) {
this._alpha = 50;
}
};
Symbol 522 MovieClip Frame 1
onEnterFrame = function () {
if (_root.bumperdmg >= 5) {
_alpha = 50;
}
};
Symbol 530 MovieClip Frame 1
onEnterFrame = function () {
if (_root.hasrocket == 1) {
this._alpha = 50;
}
};
Symbol 573 MovieClip Frame 1
stop();
health = 1;
cost = 100;
ug = 0;
if (_root.bumperdmg != 10) {
has = false;
} else {
has = true;
}
Symbol 573 MovieClip Frame 2
cost = 200;
ug = 0;
if (_root.bumperdmg != 16) {
has = false;
} else {
has = true;
}
Symbol 573 MovieClip Frame 3
cost = 350;
ug = 0;
if (_root.bumperdmg != 25) {
has = false;
} else {
has = true;
}
Symbol 573 MovieClip Frame 4
cost = _root.hasturn * 100;
ug = 1;
if (_root.hasturn == 0) {
has = false;
} else {
has = true;
}
Symbol 573 MovieClip Frame 5
cost = 250;
ug = 0;
if (_root.hasrocket == 0) {
has = false;
} else {
has = true;
}
Symbol 573 MovieClip Frame 6
cost = 200;
ug = 1;
if (_root.hasfturret == 0) {
has = false;
} else {
has = true;
}
Symbol 573 MovieClip Frame 7
cost = 200;
if (_root.hasmines == 0) {
has = false;
} else {
has = true;
ug = 1;
}
Symbol 573 MovieClip Frame 8
cost = 125;
ug = 1;
if (_root.armor == 0) {
has = false;
} else {
has = true;
}
trace(has);
Symbol 573 MovieClip Frame 9
cost = 75;
ug = 2;
has = true;
Symbol 573 MovieClip Frame 10
cost = 150;
if (_root.hasgunman == 1) {
has = true;
ug = 3;
} else {
has = false;
}
Symbol 573 MovieClip Frame 11
cost = 125;
if (_root.hasfturret == 1) {
ug = 3;
has = true;
} else {
has = false;
}
Symbol 573 MovieClip Frame 12
ug = 0;
cost = 200;
if (_root.hassplitshot == 1) {
has = true;
} else {
has = false;
}
Symbol 573 MovieClip Frame 13
ug = 0;
cost = 175;
if (_root.hasgoldbullets == 1) {
has = true;
} else {
has = false;
}
Symbol 573 MovieClip Frame 14
ug = 0;
cost = 250;
if (_root.haspowercore == 1) {
has = true;
} else {
has = false;
}
Symbol 579 Button
on (release) {
if (_root.money >= _root.description.desc.cost) {
_root.money = _root.money - _root.description.desc.cost;
if (_root.description.desc._currentframe == 1) {
_root.bumperdmg = 2;
_root.description.desc.ug = 0;
_root.description.desc.has = true;
gotoAndStop (2);
} else if (_root.description.desc._currentframe == 2) {
_root.bumperdmg = 5;
_root.description.desc.ug = 0;
_root.description.desc.has = true;
gotoAndStop (2);
} else if (_root.description.desc._currentframe == 3) {
_root.bumperdmg = 8;
_root.description.desc.ug = 0;
_root.description.desc.has = true;
gotoAndStop (2);
} else if (_root.description.desc._currentframe == 5) {
_root.hasrocket = 1;
_root.description.desc.ug = 0;
_root.description.desc.has = true;
gotoAndStop (2);
} else if (_root.description.desc._currentframe == 12) {
_root.hassplitshot = 1;
_root.description.desc.ug = 0;
_root.description.desc.has = true;
gotoAndStop (2);
} else if (_root.description.desc._currentframe == 13) {
_root.hasgoldbullets = 1;
_root.description.desc.ug = 0;
_root.description.desc.has = true;
gotoAndStop (2);
} else if (_root.description.desc._currentframe == 14) {
_root.haspowercore = 1;
_root.description.desc.ug = 0;
_root.description.desc.has = true;
gotoAndStop (2);
} else if (_root.description.desc._currentframe == 11) {
_root.hasfturret = 1;
_root.description.desc.ug = 3;
_root.description.desc.has = true;
gotoAndStop (5);
} else if (_root.description.desc._currentframe == 10) {
_root.hasgunman = 1;
_root.description.desc.ug = 3;
_root.description.desc.has = true;
gotoAndStop (5);
} else if (_root.description.desc._currentframe == 7) {
_root.hasmines = 1;
_root.description.desc.ug = 1;
_root.description.desc.has = true;
gotoAndStop (3);
}
}
}
Symbol 583 Button
on (release) {
if (_root.money >= cost) {
if (level._currentframe < 7) {
_root.money = _root.money - cost;
if (_root.description.desc._currentframe == 4) {
_root.hasturn++;
}
if (_root.description.desc._currentframe == 8) {
_root.armor++;
}
if (_root.description.desc._currentframe == 7) {
_root.hasmines++;
}
}
}
}
Symbol 592 MovieClip Frame 1
stop();
Symbol 593 Button
on (release) {
if (_root.money >= 75) {
if (_root.health <= 75) {
_root.health = _root.health + 25;
_root.money = _root.money - 75;
}
}
}
Symbol 599 Button
on (release) {
if (_root.money >= cost1) {
if (level1._currentframe < 7) {
if (_root.description.desc._currentframe == 11) {
_root.fturretdmglvl++;
_root.fturretdmg = _root.fturretdmg + 1.5;
} else if (_root.description.desc._currentframe == 10) {
_root.gunmandmglvl++;
_root.gunmandmg = _root.gunmandmg + 1;
}
_root.money = _root.money - cost1;
} else {
}
}
}
Symbol 600 Button
on (release) {
if (_root.money >= cost2) {
if (level2._currentframe < 7) {
if (_root.description.desc._currentframe == 11) {
_root.fturretspdlvl++;
_root.fturretspd = _root.fturretspd / 1.4;
} else if (_root.description.desc._currentframe == 10) {
_root.gunmanspdlvl++;
_root.gunmanspd = _root.gunmanspd / 1.3;
}
_root.money = _root.money - cost2;
}
}
}
Symbol 603 MovieClip Frame 1
stop();
Symbol 603 MovieClip Frame 3
onEnterFrame = function () {
if (_root.description.desc._currentframe == 4) {
cost = 75;
if (_root.hasturn != 0) {
level._visible = true;
level.gotoAndStop(_root.hasturn);
} else {
level._visible = false;
}
}
if (_root.description.desc._currentframe == 8) {
cost = 125;
if (_root.armor != 0) {
level._visible = true;
level.gotoAndStop(_root.armor);
} else {
level._visible = false;
}
}
if (_root.description.desc._currentframe == 7) {
cost = 200;
if (_root.hasmines != 0) {
level._visible = true;
level.gotoAndStop(_root.hasmines);
} else {
level._visible = false;
}
}
};
Symbol 603 MovieClip Frame 4
stop();
Symbol 603 MovieClip Frame 5
onEnterFrame = function () {
if (_root.description.desc._currentframe == 10) {
cost1 = Math.round(_root.gunmandmg * 40);
cost2 = Math.round((21 - _root.gunmanspd) * 20);
level1.gotoAndStop(_root.gunmandmglvl);
level2.gotoAndStop(_root.gunmanspdlvl);
} else if (_root.description.desc._currentframe == 11) {
cost1 = Math.round(_root.fturretdmg * 40);
cost2 = Math.round((21 - _root.fturretspd) * 20);
level1.gotoAndStop(_root.fturretdmglvl);
level2.gotoAndStop(_root.fturretspdlvl);
}
};
Instance of Symbol 603 MovieClip "upgrade" in Symbol 604 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.hero.body.gotoAndStop(_root.armor);
if (_parent.desc.has) {
if (_parent.desc.ug == 1) {
this.gotoAndStop(3);
}
if (_parent.desc.ug == 0) {
this.gotoAndStop(2);
}
if (_parent.desc.ug == 2) {
this.gotoAndStop(4);
}
if (_parent.desc.ug == 3) {
this.gotoAndStop(5);
}
} else {
this.gotoAndStop(1);
}
}
Symbol 614 MovieClip Frame 1
onEnterFrame = function () {
if (_root.hassplitshot == 1) {
this._alpha = 50;
}
};
Symbol 618 MovieClip Frame 1
onEnterFrame = function () {
if (_root.hasgoldbullets == 1) {
this._alpha = 50;
}
};
Symbol 623 MovieClip Frame 1
onEnterFrame = function () {
if (_root.haspowercore == 1) {
this._alpha = 50;
}
};
Symbol 629 MovieClip Frame 20
stop();
Symbol 630 MovieClip Frame 19
stop();
Symbol 640 MovieClip Frame 171
_root.gotoAndStop("menu");
stop();