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;
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__("40aebb0f", this, 10301, true);
i = 0;
Mouse.hide();
misid = 0;
_root.bestyet = 0;
mochi.MochiServices.connect("69cdfcf4adfd6540");
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain != "flashgamelicense.com") {
}
Frame 2
function move(sprite) {
sprite.timer--;
sprite._x = sprite._x + (sprite.dx / 2);
sprite._y = sprite._y + (sprite.dy / 2);
sprite._alpha = sprite._alpha - 3;
if (sprite.timer <= 0) {
sprite.removeMovieClip();
}
}
onEnterFrame = function () {
if ((Math.abs(player.dx) + Math.abs(player.dy)) > 5) {
var _local3 = _root.smole.attachMovie("shadow", "shadow" + i, i);
_local3._x = player._x;
_local3._y = player._y;
i++;
_local3.timer = 30;
_local3.dx = (((player.dx / 10) * -1) + random(6)) - random(6);
_local3.dy = (((player.dy / 10) * -1) + random(6)) - random(6);
_local3.onEnterFrame = function () {
move(this);
};
}
};
Instance of Symbol 121 MovieClip "smole" in Frame 2
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 123 MovieClip in Frame 2
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
this._rotation = this._rotation + 10;
}
Instance of Symbol 135 MovieClip "player" in Frame 2
onClipEvent (load) {
spd = 4;
dead = false;
health = 100;
}
onClipEvent (enterFrame) {
if (health <= 0) {
}
if (dead == false) {
dx = _root._xmouse - this._x;
dy = _root._ymouse - this._y;
if (dx < 0) {
this._xscale = 100;
}
if (dx > 0) {
this._xscale = -100;
}
distace = Math.round(Math.sqrt((dx * dx) + (dy * dy)));
angle = (180 * Math.atan2(dy, dx)) / Math.PI;
dir = angle + 90;
accelvarx = _root._xmouse - this._x;
accelvary = _root._ymouse - this._y;
if (Math.abs(dir) <= 180) {
}
if ((Math.abs(dx) + Math.abs(dy)) > 2) {
if (this._y >= 100) {
this._x = this._x + (spd * Math.sin((dir * Math.PI) / 180));
this._y = this._y + ((-spd) * Math.cos((dir * Math.PI) / 180));
this._x = this._x + (accelvarx / 10);
this._y = this._y + (accelvary / 10);
} else {
health--;
this._y++;
}
}
if (currentDistance < 3) {
spd = 0;
} else {
spd = 3;
}
} else {
_y = (_y + 5);
}
if (this._y > Stage.height) {
if (player.health <= 0) {
if (_root.levelover == false) {
_root.blackout.gotoAndPlay(2);
_root.levelover = true;
}
}
}
}
Frame 3
function move(sprite) {
sprite.timer--;
sprite._x = sprite._x + (sprite.dx / 2);
sprite._y = sprite._y + (sprite.dy / 2);
sprite._alpha = sprite._alpha - 3;
if (sprite.timer <= 0) {
sprite.removeMovieClip();
}
}
function launchmissile() {
misid++;
var missile = this.attachMovie("missile", "missile" + misid, _root.getNextHighestDepth());
missile._x = player._x;
missile._y = player._y;
missile.dy = (_root.power * -1) / 3;
_root.power = 0;
missile.onEnterFrame = function () {
var _local5 = 0;
while (_local5 <= 4) {
var _local4 = _root["boat" + _local5];
if (_local4.dead == false) {
if (this.hitTest(_local4)) {
_local4.dead = true;
_root.moded = _local4.typed;
_local4.gotoAndPlay(2);
missile.gotoAndPlay(2);
var _local3 = 0;
while (_local3 < 5) {
var plode = _root.smole.attachMovie("misplode", "misplode" + _local3, _local3);
plode.timer = 50;
plode._x = (missile._x + random(25)) - random(25);
plode._y = (missile._y + random(25)) - random(25);
plode.dx = missile._x - plode._x;
plode.dy = missile._y - plode._y;
plode.onEnterFrame = function () {
plode.timer--;
plode._x = plode._x + ((plode.dx / 10) * -1);
plode._y = plode._y + ((plode.dy / 10) * -1);
if (plode.timer <= 0) {
plode.removeMovieClip();
}
};
_local3++;
}
}
}
_local5++;
}
missile._y = missile._y + missile.dy;
if (missile._y < 0) {
missile.removeMovieClip();
}
};
}
stop();
var holdera = createEmptyMovieClip("holder");
boing = new Sound(holder);
boing.attachSound("underwater");
boing.start();
boinga = new Sound(holder);
boinga.attachSound("rpg");
rpg.setVolume(5);
i = 0;
moded = "rough";
score = 0;
levelover = false;
shaketimer = 30;
misid = 0;
Mouse.hide();
bombid = 0;
power = 0;
shipid = 1;
onMouseDown = function () {
if (player.dead == false) {
charging = true;
player.mech.gotoAndPlay(2);
}
};
onMouseUp = function () {
if (player.dead == false) {
charging = false;
if (power > 10) {
_root.launchmissile();
_root.player.mech.play();
}
}
};
onEnterFrame = function () {
function movesmoke(sprite) {
sprite.timer--;
if (sprite.timer <= 0) {
sprite.removeMovieClip();
}
sprite._x = sprite._x + sprite.dx;
sprite._y = sprite._y + sprite.dy;
if (sprite._y <= 0) {
sprite.removeMovieClip();
}
}
smoketimer--;
if (smoketimer <= 0) {
sid++;
var _local4 = 0;
while (_local4 <= 4) {
var _local5 = this["boat" + _local4];
if (_local5.dead == false) {
var _local3 = this.attachMovie("smokepart", "smoke" + _local4, _root.getNextHighestDepth());
_local3._x = _local5._x - 20;
_local3._y = _local5._y - 40;
_local3.dx = random(5) * -1;
_local3.dy = random(5) - 7;
_local3.timer = 30;
_local3.ver = boat.typed;
_local3.rotspeed = random(15) - random(15);
smoketimer = 3;
_local3.onEnterFrame = function () {
movesmoke(this);
};
}
_local4++;
}
}
if (player.dead == false) {
if (charging) {
if (power < 100) {
power++;
}
} else if (power > 0) {
power--;
}
if (player.dead == false) {
if ((Math.abs(player.dx) + Math.abs(player.dy)) > 5) {
var _local6 = _root.smole.attachMovie("shadow", "shadow" + i, i);
_local6._x = player._x;
_local6._y = player._y;
i++;
_local6.timer = 30;
_local6.dx = (((player.dx / 10) * -1) + random(6)) - random(6);
_local6.dy = (((player.dy / 10) * -1) + random(6)) - random(6);
_local6.onEnterFrame = function () {
move(this);
};
}
}
}
};
Instance of Symbol 143 MovieClip "boat4" in Frame 3
onClipEvent (load) {
dead = false;
typed = "highscores";
this.bb.diff.gotoAndStop(4);
this.bb.gotoAndPlay(5);
}
onClipEvent (enterFrame) {
this._x = this._x + 2;
if (this._x > (Stage.width + 50)) {
this._x = -70;
}
}
Instance of Symbol 144 MovieClip "boat3" in Frame 3
onClipEvent (load) {
dead = false;
typed = "brutal";
this.bb.diff.gotoAndStop(3);
this.bb.gotoAndPlay(25);
}
onClipEvent (enterFrame) {
this._x = this._x + 2;
if (this._x > (Stage.width + 50)) {
this._x = -70;
}
}
Instance of Symbol 145 MovieClip "boat2" in Frame 3
onClipEvent (load) {
dead = false;
typed = "rough";
this.bb.diff.gotoAndStop(2);
this.bb.gotoAndPlay(20);
}
onClipEvent (enterFrame) {
this._x = this._x + 2;
if (this._x > (Stage.width + 50)) {
this._x = -70;
}
}
Instance of Symbol 146 MovieClip "boat1" in Frame 3
onClipEvent (load) {
dead = false;
typed = "easy";
this.bb.diff.gotoAndStop(1);
}
onClipEvent (enterFrame) {
this._x = this._x + 2;
if (this._x > (Stage.width + 50)) {
this._x = -70;
}
}
Instance of Symbol 121 MovieClip "smole" in Frame 3
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 123 MovieClip in Frame 3
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
this._rotation = this._rotation + 10;
}
Instance of Symbol 135 MovieClip "player" in Frame 3
onClipEvent (load) {
spd = 4;
dead = false;
health = 100;
}
onClipEvent (enterFrame) {
if (health <= 0) {
}
if (dead == false) {
dx = _root._xmouse - this._x;
dy = _root._ymouse - this._y;
if (dx < 0) {
this._xscale = 100;
}
if (dx > 0) {
this._xscale = -100;
}
distace = Math.round(Math.sqrt((dx * dx) + (dy * dy)));
angle = (180 * Math.atan2(dy, dx)) / Math.PI;
dir = angle + 90;
accelvarx = _root._xmouse - this._x;
accelvary = _root._ymouse - this._y;
if (Math.abs(dir) <= 180) {
}
if ((Math.abs(dx) + Math.abs(dy)) > 4) {
if (this._y >= 100) {
this._x = this._x + (spd * Math.sin((dir * Math.PI) / 180));
this._y = this._y + ((-spd) * Math.cos((dir * Math.PI) / 180));
this._x = this._x + (accelvarx / 10);
this._y = this._y + (accelvary / 10);
} else {
health--;
this._y++;
}
}
if (currentDistance < 3) {
spd = 0;
} else {
spd = 3;
}
} else {
_y = (_y + 5);
}
if (this._y > Stage.height) {
if (player.health <= 0) {
if (_root.levelover == false) {
_root.blackout.gotoAndPlay(2);
_root.levelover = true;
}
}
}
}
Frame 4
function init() {
i = 0;
gravity = 7;
score = 0;
levelover = false;
shaketimer = 30;
misid = 0;
Mouse.hide();
bombid = 0;
power = 0;
shipid = 0;
sod = 0;
planeskilled = 0;
shipskilled = 0;
sid = 0;
smokebombid = 0;
if (_root.moded == "easy") {
timetillnewship = 40;
timetillnewplane = 200;
addplanetimer = 500;
addshiptimer = 5;
hp.timer = random(100) + 400;
}
if (_root.moded == "rough") {
timetillnewship = 20;
timetillnewplane = 100;
addplanetimer = 250;
addshiptimer = 5;
hp.timer = random(500) + 700;
}
if (_root.moded == "brutal") {
timetillnewship = 10;
timetillnewplane = 50;
addplanetimer = 125;
addshiptimer = 2;
hp.timer = random(500) + 200;
}
}
function addplane() {
var _local3 = this.attachMovie("plane", "plane" + shipid, _root.getNextHighestDepth());
shipid++;
rar = random(2);
_local3._x = rar * Stage.width;
_local3._y = random(50) + 10;
_local3.bombtimer = random(50) + 10;
_local3.dead = false;
_local3.size = random(50) + 100;
_local3._xscale = _local3.size;
_local3.dy = 0;
if (_root.moded == "brutal") {
_local3.ammoz = 6;
}
if (_root.moded == "rough") {
_local3.ammoz = 4;
}
if (_root.moded == "easy") {
_local3.ammoz = 3;
}
_local3._yscale = _local3.size;
_local3.onEnterFrame = function () {
moveplane(this);
};
if (rar == 0) {
_local3.dx = random(9) + 5;
_local3._rotation = 0;
} else {
_local3.dx = (random(9) + 5) * -1;
_local3._xscale = -_local3.size;
_local3._rotation = 0;
}
}
function addship() {
shipid++;
var _local3 = this.attachMovie("ship", "ship" + shipid, _root.getNextHighestDepth());
_local3.deathtimer = 30;
_local3.smoketimer = 10;
_local3.id = int(_root.shipid);
rar = random(2);
_local3._x = rar * Stage.width;
_local3._y = horizon._y;
_local3.bombtimer = random(50) + 10;
_local3.dead = false;
_local3.size = random(50) + 100;
_local3._xscale = _local3.size;
_local3._yscale = _local3.size;
_local3.destroyed = false;
if (rar == 0) {
_local3.dx = random(5) + 5;
} else {
_local3.dx = (random(5) + 5) * -1;
_local3._xscale = -_local3.size;
}
_local3.onEnterFrame = function () {
moveship(this);
};
}
function moveplane(sprite) {
sprite._x = sprite._x + sprite.dx;
sprite._y = sprite._y + sprite.dy;
if ((sprite._x > Stage.width) || (sprite._x < 0)) {
sprite.removeMovieClip();
}
sprite.pdx = _root.player._x - sprite._x;
if (sprite.dead == false) {
if (Math.abs(sprite.pdx) < 50) {
if (sprite.ammoz >= 0) {
sprite.ammoz--;
smokebombid++;
var _local4 = _root.attachMovie("smokebomb", "smokebomb" + smokebombid, _root.getNextHighestDepth());
_local4._x = sprite._x;
_local4._y = sprite._y;
_local4.dx = sprite.dx;
}
}
_local4.onEnterFrame = function () {
this._y = this._y + 9;
this._x = this._x + (this.dx / 4);
this.pdx = _root.player._x - this._x;
this.pdy = _root.player._y - this._y;
if ((Math.abs(this.pdy) + Math.abs(this.pdx)) <= 30) {
_root.shaking = true;
_root.shaketimer = 30;
this.bod.gotoAndPlay(2);
}
if (this._y > Stage.height) {
this.removeMovieClip();
}
};
}
if (sprite._y > Stage.height) {
sprite.removeMovieClip();
}
}
function moveship(sprite) {
if (sprite.dead == true) {
sprite.deathtimer--;
if (sprite.deathtimer <= 0) {
sprite._alpha = sprite._alpha - 10;
}
if (sprite.deathtimer <= -30) {
sprite.removeMovieClip();
}
}
sprite._x = sprite._x + ((sprite.blastdx * -1) / 2);
sprite._y = sprite._y + ((sprite.blastdy * -1) / 2);
sprite.blastdy = sprite.blastdy - 2;
sprite.blastdx = sprite.blastdx * 0.7;
sprite._rotation = sprite._rotation + (sprite.rotdir / 2);
if (sprite.dead == false) {
sprite._x = sprite._x + sprite.dx;
sprite._y = sprite._y + (sprite.dy / 2);
sprite.bombtimer--;
if (sprite.bombtimer <= 0) {
bombid++;
var bombeh = bombs.attachMovie("bomb", "bomb" + bombid, _root.getNextHighestDepth());
bombeh._x = sprite._x;
bombeh._y = sprite._y;
bombeh.diy = random(4) + 4;
bombeh.rotspeed = (random(3) - random(3)) * 10;
bombeh.sploded = false;
bombeh.onEnterFrame = function () {
bombeh.pdx = _root.player._x - bombeh._x;
bombeh.pdy = _root.player._y - bombeh._y;
if (bombeh.sploded == false) {
if ((Math.abs(bombeh.pdy) + Math.abs(bombeh.pdx)) <= 30) {
bombeh.sploded = true;
bombeh.gotoAndPlay(2);
_root.shaking = true;
_root.shaketimer = 30;
}
}
bombeh.dy = ((Stage.height + 50) - bombeh._y) + bombeh.diy;
bombeh.dx = sprite.dx;
bombeh._y = bombeh._y + (bombeh.dy / 40);
bombeh._x = bombeh._x + (bombeh.dx / 10);
bombeh.dx = bombeh.dx * 0.8;
bombeh._rotation = bombeh._rotation + bombeh.rotspeed;
if (bombeh._y > Stage.height) {
bombeh.removeMovieClip();
}
sprite.bombtimer = random(20) + 5;
};
}
if ((sprite._x > Stage.width) || (sprite._x < 0)) {
sprite.removeMovieClip();
}
} else if (sprite.destroyed == false) {
sprite.destroyed = true;
}
}
function move(sprite) {
sprite.timer--;
sprite._x = sprite._x + (sprite.dx / 2);
sprite._y = sprite._y + (sprite.dy / 2);
sprite._alpha = sprite._alpha - 3;
if (sprite.timer <= 0) {
sprite.removeMovieClip();
}
}
function launchmissile() {
misid++;
var missilez = this.attachMovie("missile", "missile" + misid, _root.getNextHighestDepth());
missilez._x = player._x;
missilez._y = player._y;
missilez.dy = _root.power * -1;
_root.power = 0;
missilez.onEnterFrame = function () {
var _local7 = 0;
while (_local7 <= (_root.shipid + 99)) {
var _local3 = _root["ship" + _local7];
if (_local3.dead == false) {
if (this.hitTest(_local3)) {
_root.shipskilled++;
_local3.blastdx = missilez._x - _local3._x;
_local3.blastdy = (missilez._y - _local3._y) / 2;
_local3.rotdir = _local3.blastdx * -1;
if (_local3.blastdy < 0) {
_local3.blastdy = _local3.blastdy * -1;
}
var _local5 = 0;
while (_local5 < 5) {
var plode = _root.smole.attachMovie("misplode", "misplode" + _local5, _local5);
plode.timer = 70;
plode._x = (missilez._x + random(25)) - random(25);
plode._y = (missilez._y + random(25)) - random(25);
plode.dx = missilez._x - plode._x;
plode.dy = missilez._y - plode._y;
plode._xscale = 70 + (missilez.dy * -1);
plode._yscale = 70 + (missilez.dy * -1);
plode.onEnterFrame = function () {
plode.timer--;
plode._x = plode._x + ((plode.dx / 10) * -1);
plode._y = plode._y + ((plode.dy / 10) * -1);
if (plode.timer <= 0) {
plode.removeMovieClip();
}
};
_local5++;
}
if (_root.moded == "easy") {
scoregained = Math.floor(_local3.size * ((missilez.dy / 70) * -0.6)) * 2;
}
if (_root.moded == "rough") {
scoregained = Math.floor(_local3.size * ((missilez.dy / 70) * -0.6)) * 4;
}
if (_root.moded == "brutal") {
scoregained = Math.floor(_local3.size * ((missilez.dy / 70) * -0.6)) * 6;
}
_root.score = _root.score + scoregained;
_root.p._x = _local3._x + 55;
_root.p._y = _local3._y;
_root.p.gotoAndPlay(2);
_root.play.swapDepths(_root.getNextHighestDepth());
_local3.dead = true;
_local3.gotoAndPlay(26);
missilez.gotoAndPlay(2);
}
}
_local7++;
}
var _local6 = 0;
while (_local6 < _root.shipid) {
var _local4 = _root["plane" + _local6];
if (_local4.dead == false) {
if (this.hitTest(_local4)) {
_root.planeskilled++;
_local4.gotoAndPlay(26);
missile.gotoAndPlay(2);
_local4.dx = _local4.dx * 0.5;
_local4.dy = _local4.dy + 5;
if (_root.moded == "easy") {
scoregained = _local4.size * 2;
}
if (_root.moded == "rough") {
scoregained = _local4.size * 4;
}
if (_root.moded == "brutal") {
scoregained = _local4.size * 6;
}
_root.score = _root.score + scoregained;
_root.p._x = _local4._x;
_root.p._y = _local4._y;
_root.p.gotoAndPlay(2);
_root.p.swapDepths(_root.getNextHighestDepth());
_local4.dead = true;
if (_local4.dx > 0) {
_local4._rotation = _local4._rotation + 25;
}
if (_local4.dx < 0) {
_local4._rotation = _local4._rotation - 25;
}
}
}
_local6++;
}
missilez._y = missilez._y + missilez.dy;
if (missilez._y < 0) {
missilez.removeMovieClip();
}
};
}
speaker.stop();
song = new Sound();
song.onSoundComplete = function () {
speaker.stop();
};
song.attachSound("thesong");
speaker.play();
stop();
init();
onMouseDown = function () {
if (player.dead == false) {
charging = true;
player.mech.gotoAndPlay(2);
}
};
onMouseUp = function () {
if (player.dead == false) {
charging = false;
if (power > 10) {
_root.launchmissile();
_root.player.mech.play();
}
}
};
onEnterFrame = function () {
function movesmoke(sprite) {
sprite.timer--;
if (sprite.timer <= 0) {
sprite.removeMovieClip();
}
sprite._x = sprite._x + sprite.dx;
sprite._y = sprite._y + sprite.dy;
if (sprite._y <= 0) {
sprite.removeMovieClip();
}
}
if (player.dead == false) {
if (charging) {
if (power < 100) {
power++;
}
} else if (power > 0) {
power--;
}
}
if (shaking) {
shaketimer--;
if (shaketimer >= 0) {
_x = ((0 + random(10)) - random(10));
_y = ((0 + random(10)) - random(10));
player.health--;
} else {
shaking = false;
shaketimer = 30;
_x = 0;
_y = 0;
}
}
if (player.dead == false) {
addshiptimer--;
if (addshiptimer <= 0) {
addship();
addshiptimer = random(timetillnewship) + 10;
timetillnewship--;
}
}
if (player.dead == false) {
addplanetimer--;
if (addplanetimer <= 0) {
addplane();
addplanetimer = random(timetillnewplane) + 10;
timetillnewplane = timetillnewplane - 2;
}
}
if (player.dead == false) {
if ((Math.abs(player.dx) + Math.abs(player.dy)) > 5) {
var _local6 = _root.smole.attachMovie("shadow", "shadow" + i, i);
_local6._x = player._x;
_local6._y = player._y;
i++;
_local6.timer = 30;
_local6.dx = (((player.dx / 10) * -1) + random(6)) - random(6);
_local6.dy = (((player.dy / 10) * -1) + random(6)) - random(6);
_local6.onEnterFrame = function () {
move(this);
};
}
}
var _local5 = 0;
while (_local5 <= shipid) {
var _local4 = this["ship" + _local5];
_local4.smoketimer--;
if (_local4.smoketimer <= 0) {
if (_local4.dead == false) {
sod++;
var _local3 = this.attachMovie("smokepart", "smoke" + _local5, _root.getNextHighestDepth());
_local3._x = _local4._x - 10;
_local3._y = _local4._y - 30;
_local3.dx = random(5) * -1;
_local3.dy = random(5) - 7;
_local3.timer = 30;
_local3.ver = boat.typed;
_local4.smoketimer = 4;
_local3.onEnterFrame = function () {
movesmoke(this);
};
}
}
_local5++;
}
};
Instance of Symbol 123 MovieClip "cursor" in Frame 4
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
this._rotation = this._rotation + 10;
}
Instance of Symbol 135 MovieClip "player" in Frame 4
onClipEvent (load) {
spd = 4;
dead = false;
health = 100;
}
onClipEvent (enterFrame) {
if (this._y > Stage.height) {
health--;
}
if (health <= 0) {
dead = true;
gotoAndStop (2);
}
if (dead == false) {
dx = _root._xmouse - this._x;
dy = _root._ymouse - this._y;
if (dx < 0) {
this._xscale = 100;
}
if (dx > 0) {
this._xscale = -100;
}
distace = Math.round(Math.sqrt((dx * dx) + (dy * dy)));
angle = (180 * Math.atan2(dy, dx)) / Math.PI;
dir = angle + 90;
accelvarx = _root._xmouse - this._x;
accelvary = _root._ymouse - this._y;
if (Math.abs(dir) <= 180) {
}
if ((Math.abs(dx) + Math.abs(dy)) > 4) {
if (this._y >= 100) {
this._x = this._x + (spd * Math.sin((dir * Math.PI) / 180));
this._y = this._y + ((-spd) * Math.cos((dir * Math.PI) / 180));
this._x = this._x + (accelvarx / 10);
this._y = this._y + (accelvary / 10);
} else {
health--;
this._y++;
}
}
if (currentDistance < 3) {
spd = 0;
} else {
spd = 3;
}
} else {
_y = (_y + 5);
}
if (dead == true) {
if (this._y > Stage.height) {
if (player.health <= 0) {
if (_root.levelover == false) {
_root.blackout.gotoAndPlay(2);
_root.levelover = true;
Mouse.show();
}
}
}
}
}
Instance of Symbol 206 MovieClip "bombs" in Frame 4
onClipEvent (load) {
this._x = 0;
this._y = 0;
}
Instance of Symbol 16 MovieClip [health] "hp" in Frame 4
onClipEvent (load) {
picked = false;
}
onClipEvent (enterFrame) {
timer--;
if (this.hitTest(_root.player)) {
if (!picked) {
_root.player.health = _root.player.health + 50;
this.gotoAndPlay(2);
if (_root.player.health > 100) {
_root.player.health = 100;
}
} else {
this.im.gotoAndStop(1);
}
picked = true;
}
this._rotation++;
if (timer <= 0) {
this._x = this._x - 7;
if (this._x < 0) {
this._x = Stage.width + 350;
if (_root.moded == "easy") {
timer = random(400) + 200;
this._y = random(400) + 100;
}
if (_root.moded == "rough") {
timer = random(600) + 200;
this._y = random(400) + 100;
}
if (_root.moded == "brutal") {
timer = random(800) + 200;
this._y = random(400) + 100;
}
}
}
}
Instance of Symbol 228 MovieClip "blackout" in Frame 4
onClipEvent (enterFrame) {
}
Frame 6
function showscores() {
if (_root.moded == "rough") {
mochi.MochiScores.showLeaderboard({boardID:"6c947834cd957b2e", score:_root.score});
}
if (_root.moded == "brutal") {
mochi.MochiScores.showLeaderboard({boardID:"0386159ec592e7c4", score:_root.score});
}
if (_root.moded == "easy") {
mochi.MochiScores.showLeaderboard({boardID:"8d567bd47e096591", score:_root.score});
}
}
Mouse.show();
showscores();
Instance of Symbol 123 MovieClip "cursor" in Frame 6
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
this._rotation = this._rotation + 10;
}
Frame 7
stop();
Mouse.hide();
if (_root.bestyet < _root.score) {
_root.bestyet = _root.score;
}
Frame 8
gotoAndStop (8);
Frame 9
function showscores() {
if (_root.moded == "rough") {
mochi.MochiScores.showLeaderboard({boardID:"6c947834cd957b2e"});
}
if (_root.moded == "brutal") {
mochi.MochiScores.showLeaderboard({boardID:"0386159ec592e7c4"});
}
if (_root.moded == "easy") {
mochi.MochiScores.showLeaderboard({boardID:"8d567bd47e096591"});
}
}
Mouse.show();
Frame 10
gotoAndStop (9);
Frame 100
stop();
Symbol 11 MovieClip [misplode] Frame 6
stop();
Symbol 16 MovieClip [health] Frame 1
stop();
Symbol 16 MovieClip [health] Frame 11
_root.hp._x = Stage.width + 150;
_root.hp.picked = false;
if (_root.moded == "easy") {
_root.hp.timer = random(400) + 200;
this._y = random(400) + 100;
}
if (_root.moded == "rough") {
_root.hp.timer = random(600) + 200;
this._y = random(400) + 100;
}
if (_root.moded == "brutal") {
_root.hp.timer = random(800) + 200;
this._y = random(400) + 100;
}
gotoAndStop (1);
Symbol 21 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 8
stop();
Symbol 32 MovieClip [plus] Frame 1
stop();
Symbol 32 MovieClip [plus] Frame 17
gotoAndStop (1);
Symbol 50 MovieClip [bomb] Frame 1
stop();
Symbol 50 MovieClip [bomb] Frame 11
stop();
Symbol 59 MovieClip [ship] Frame 25
gotoAndPlay (2);
Symbol 59 MovieClip [ship] Frame 45
stop();
Symbol 62 MovieClip [smokepart] Frame 46
stop();
Symbol 76 MovieClip [missile] Frame 1
stop();
Symbol 76 MovieClip [missile] Frame 11
stop();
Symbol 78 MovieClip Frame 1
Symbol 268 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.31");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 269 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.childClip._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.clip.stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.clip.play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 91 Button
on (release) {
_root.getURL("http://www.applecartgames.com", "_blank");
}
Symbol 97 Button
on (release) {
_root.getURL("http://elementrat.newgrounds.com", "_blank");
}
Symbol 118 Button
on (release) {
_root.removeStars();
_root.gotoAndStop(3);
}
on (rollOver) {
_root.possibletopaint = false;
}
on (rollOut) {
_root.possibletopaint = true;
}
Symbol 119 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 119 MovieClip Frame 2
gotoAndPlay (1);
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 13
stop();
Symbol 131 MovieClip Frame 23
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 2
stop();
Symbol 141 MovieClip Frame 3
stop();
Symbol 141 MovieClip Frame 4
stop();
Symbol 142 MovieClip Frame 25
gotoAndPlay (2);
Symbol 142 MovieClip Frame 75
stop();
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 53
stop();
_root.fader.gotoAndPlay(2);
_root.mode = "easy";
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 53
stop();
_root.fader.gotoAndPlay(2);
_root.mode = "easy";
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 53
stop();
_root.fader.gotoAndPlay(2);
_root.mode = "easy";
Symbol 146 MovieClip Frame 1
stop();
sid = 0;
Symbol 146 MovieClip Frame 53
stop();
_root.fader.gotoAndPlay(2);
_root.mode = "easy";
Symbol 153 MovieClip Frame 1
stop();
Instance of Symbol 153 MovieClip in Symbol 155 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.power < 25) {
this._yscale = _root.power * 4;
} else {
_root.power = 100;
this.gotoAndStop(3);
}
if (_root.power <= 10) {
this.gotoAndStop(2);
}
}
Symbol 159 Button
on (release) {
_root.getURL("http://www.applecartgames.com", "_blank");
}
Symbol 170 Button
on (release) {
previtem = "a";
gotoAndStop ("choose");
}
Symbol 172 Button
on (release) {
previtem = "b";
gotoAndStop ("choose");
}
Symbol 174 Button
on (release) {
previtem = "c";
gotoAndStop ("choose");
}
Symbol 176 Button
on (release) {
previtem = "d";
gotoAndStop ("choose");
}
Symbol 178 Button
on (release) {
previtem = "e";
gotoAndStop ("choose");
}
Symbol 181 Button
on (rollOver) {
gotoAndStop(previtem);
}
Symbol 184 Button
on (release) {
_parent.recentSetting = 100;
gotoAndStop ("e");
}
Symbol 185 Button
on (release) {
_parent.recentSetting = 75;
gotoAndStop ("b");
}
Symbol 186 Button
on (release) {
_parent.recentSetting = 50;
gotoAndStop ("c");
}
Symbol 187 Button
on (release) {
_parent.recentSetting = 25;
gotoAndStop ("d");
}
Symbol 188 Button
on (release) {
_parent.recentSetting = 10;
gotoAndStop ("a");
}
Symbol 189 Button
on (release) {
gotoAndStop(previtem);
}
Symbol 190 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 1
var startTime = getTimer();
var numFrames = 0;
var recentSetting = 10;
var recentNumFrames = 0;
var recentStartTime = startTime;
function calcFPS() {
numFrames++;
var _local1 = getTimer();
elapsedSeconds = (_local1 - startTime) / 1000;
actualFPS = numFrames / elapsedSeconds;
recentNumFrames++;
if (recentNumFrames == recentSetting) {
var _local2 = (_local1 - recentStartTime) / 1000;
recentFPSoutput = recentNumFrames / _local2;
recentStartTime = _local1;
recentNumFrames = 0;
}
}
Instance of Symbol 192 MovieClip "callCalcFPS" in Symbol 193 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.calcFPS();
}
Symbol 197 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 10
if (_root.moded == "highscores") {
_root.gotoAndStop(10);
}
_root.gotoAndStop(4);
Instance of Symbol 202 MovieClip in Symbol 204 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player.health >= 0) {
this._yscale = _root.player.health;
}
}
Symbol 225 Button
on (release) {
play();
var x = 0;
while (x < _root.shipid) {
var ship = _root["ship" + x];
ship.removeMovieClip();
x++;
}
}
Symbol 227 Button
on (release) {
var x = 0;
while (x < _root.shipid) {
var ship = _root["ship" + x];
ship.removeMovieClip();
x++;
}
gotoAndStop (1);
_root.gotoAndStop(2);
}
Symbol 228 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 14
var yegg = 0;
while (yegg <= (_root.shipid + 99)) {
var btk = _root["ship" + yegg];
btk.removeMovieClip();
var ptk = _root["plane" + yegg];
ptk.removeMovieClip();
yegg++;
}
var yagg = 0;
while (yagg <= (_root.misid + 99)) {
var batk = _root["missilez" + yagg];
batk.removeMovieClip();
yagg++;
}
var yigg = 0;
while (yigg <= (_root.bombid + 99)) {
var bitk = _root.bombs["bomb" + yigg];
bitk.removeMovieClip();
yigg++;
}
var yugg = 0;
while (yugg <= _root.smokebombid) {
var smb = _root["smokebomb" + yugg];
smb.removeMovieClip();
yugg++;
}
Symbol 228 MovieClip Frame 15
_root.gotoAndStop(6);
Symbol 228 MovieClip Frame 16
_root.player.dead = false;
_root.player.health = 100;
_root.player.gotoAndStop(1);
_root.levelover = false;
_root.player._y = Stage.height / 2;
_root.power = 0;
Mouse.hide();
_root.shipid = 0;
_root.bombid = 0;
_root.misid = 0;
_root.smokebombid = 0;
_root.hp._x = Stage.width + 50;
_root.init();
Symbol 228 MovieClip Frame 25
_root.player.dead = false;
_root.player.health = 100;
_root.player.gotoAndStop(1);
Symbol 235 Button
on (release) {
_root.gotoAndStop(4);
}
Symbol 236 Button
on (release) {
_root.gotoAndStop(3);
}
Symbol 255 Button
on (release) {
_root.moded = "easy";
_root.showscores();
}
Symbol 259 Button
on (release) {
_root.moded = "rough";
_root.showscores();
}
Symbol 265 Button
on (release) {
_root.moded = "brutal";
_root.showscores();
}
Symbol 267 Button
on (release) {
_root.gotoAndStop(3);
}