Frame 1
function cannonframe() {
speed = -2;
if (resettime > -5) {
resettime--;
}
if (resettime == 0) {
_root.control = true;
a = false;
}
if (a == false) {
if (_root.tar == null) {
_root.arrow._alpha = 0;
} else {
_root.arrow._alpha = 100;
}
if (_root.tar.g == null) {
xdist = _root.cannon._x - _root.tar._x;
ydist = _root.cannon._y - _root.tar._y;
} else {
xdist = _root.cannon._x - (_root.tar._x + _root.tar.g._x);
ydist = _root.cannon._y - (_root.tar._y + _root.tar.g._y);
}
_root.arrow._x = _root.cannon._x;
_root.arrow._y = _root.cannon._y;
_root._x = (-_root.cannon._x) + 275;
_root._y = (-_root.cannon._y) + 200;
if (acontrol == true) {
if (Key.isDown(37)) {
_root.cannon._rotation = _root.cannon._rotation + speed;
}
if (Key.isDown(39)) {
_root.cannon._rotation = _root.cannon._rotation - speed;
}
} else {
if (Key.isDown(65)) {
_root.cannon._rotation = _root.cannon._rotation + speed;
}
if (Key.isDown(83)) {
_root.cannon._rotation = _root.cannon._rotation - speed;
}
}
LPx = 97 * Math.cos(angle);
LPy = 97 * Math.sin(angle);
rot = _root.cannon._rotation;
angle = ((rot + 270) * Math.PI) / 180;
if (resettime < -2) {
if (Key.isDown(32)) {
a = true;
smoke = true;
j = 0;
t = 0;
_root.cannon.play();
_root.attachMovie("proj", "proj", 900);
_root.proj._x = _root.cannon._x + LPx;
_root.proj._y = _root.cannon._y + LPy;
_root.proj._rotation = _root.cannon._rotation;
mangle = ((270 + _root.proj._rotation) * Math.PI) / 180;
mxspeed = mspeed * Math.cos(mangle);
myspeed = mspeed * Math.sin(mangle);
_root.proj.missile.gotoAndStop(Mtype);
}
}
}
if (a == true) {
if (control == true) {
_root.missile();
}
if (t < 11) {
t++;
}
if (t > 10) {
if (_root.control == true) {
if (Key.isDown(32)) {
_root.MBTNH();
}
}
}
if (_root.tar.g == null) {
xdist = _root.proj._x - _root.tar._x;
ydist = _root.proj._y - _root.tar._y;
} else {
xdist = _root.proj._x - (_root.tar._x + _root.tar.g._x);
ydist = _root.proj._y - (_root.tar._y + _root.tar.g._y);
}
_root.arrow._x = _root.proj._x;
_root.arrow._y = _root.proj._y;
_root._x = (-_root.proj._x) + 275;
_root._y = (-_root.proj._y) + 200;
}
_root.arrow._rotation = rotat;
rotat = (57.2957795130823 * Math.atan2(ydist, xdist)) + 270;
bonus();
}
function cannonload() {
a = false;
k = 0;
sc = 0;
control = true;
tlaunched = false;
goaudio = true;
smoke = false;
_root.targethit = false;
_root.attachMovie("arrow", "arrow", 901);
_root.arrow._x = _root.cannon._x;
_root.arrow._y = _root.cannon._y;
_root.attachMovie("a2", "a2", 902);
_root.a2._alpha = 0;
objs = new Array(x, s, d, f, z);
i = 0;
while (i < 5) {
objs[i].gotoAndStop(2);
i++;
}
turs = new Array(io, oo, po, lo, jo, ho, go, ko);
renewHighest();
if (diff == "easy") {
diffId = 0;
mspeed = 9;
mrspeed = 2.5;
} else if (diff == "normal") {
diffId = 1;
mspeed = 10;
mrspeed = 2;
} else {
diffId = 2;
mspeed = 12;
mrspeed = 2.3;
}
}
function missile() {
_root.proj._x = _root.proj._x + mxspeed;
_root.proj._y = _root.proj._y + myspeed;
if (acontrol == true) {
if (Key.isDown(39)) {
_root.proj._rotation = _root.proj._rotation + mrspeed;
}
if (Key.isDown(37)) {
_root.proj._rotation = _root.proj._rotation - mrspeed;
}
} else {
if (Key.isDown(83)) {
_root.proj._rotation = _root.proj._rotation + mrspeed;
}
if (Key.isDown(65)) {
_root.proj._rotation = _root.proj._rotation - mrspeed;
}
}
mangle = ((270 + _root.proj._rotation) * Math.PI) / 180;
mxspeed = mspeed * Math.cos(mangle);
myspeed = mspeed * Math.sin(mangle);
if (_root.tar.hitTest(projhitx, projhity, true) == true) {
MBTH();
}
projhitx = _root.proj._x + (25 * Math.cos(mangle));
projhity = _root.proj._y + (25 * Math.sin(mangle));
if (_root.walls.hitTest(projhitx, projhity, true)) {
MBTNH();
}
}
function MBTNH() {
score = 0;
control = false;
_root.proj.play();
smoke = false;
targethit = false;
}
function MBTH() {
_root.targethit = true;
_root.tlaunched = false;
_root.control = false;
if (_root.tar.g != null) {
_root.tar.g.gotoAndStop(2);
_root.tar.stop();
}
if (_root.g.to != null) {
_root.g.to.gotoAndStop(2);
}
_root.g.gotoAndStop(2);
_root.proj.play();
_root.proj2.play();
smoke = false;
}
function turret() {
_root.a2._rotation = a2rot;
a2rot = 270 + (57.2957795130823 * Math.atan2(a2yd, a2xd));
a2yd = _root.proj._y - _root.proj2._y;
a2xd = _root.proj._x - _root.proj2._x;
if (_root.proj2 == null) {
_root.a2._alpha = 0;
}
if (_root.proj2._currentframe == 1) {
_root.a2._alpha = 100;
} else {
_root.a2._alpha = 0;
}
_root.a2._x = _root.arrow._x;
_root.a2._y = _root.arrow._y;
smallestdist = Infinity;
i = 0;
while (i < 9) {
te = turs[i];
if (a == false) {
_root["tydist" + i] = _root.te._x - _root.cannon._x;
_root["txdist" + i] = _root.te._y - _root.cannon._y;
} else {
_root["tydist" + i] = _root.te._x - _root.proj._x;
_root["txdist" + i] = _root.te._y - _root.proj._y;
}
_root["totaldist" + i] = Math.sqrt(Math.pow(_root["tydist" + i], 2) + Math.pow(_root["txdist" + i], 2));
if (_root["totaldist" + i] < smallestdist) {
smallestdist = _root["totaldist" + i];
shooting = turs[i];
}
_root["trot" + i] = -57.2957795130823 * Math.atan2(_root["tydist" + i], _root["txdist" + i]);
_root.te.to._rotation = _root["trot" + i];
if (control == true) {
if (a == true) {
if (smallestdist < 500) {
if (tlaunched == false) {
tlaunched = true;
_root.attachMovie("proj2", "proj2", 1000);
_root.proj2._x = _root.shooting._x + (1.74532925199433 * Math.cos(_root["trot" + i]));
_root.proj2._y = _root.shooting._y + (1.74532925199433 * Math.sin(_root["trot" + i]));
_root.proj2._rotation = _root["trot" + i];
}
}
}
}
i++;
}
if (tlaunched == true) {
dspeed = mspeed + 1;
trs = mrspeed - 0.3;
px = _root.proj._x;
py = _root.proj._y;
cr = _root.proj2._rotation;
cx = _root.proj2._x;
cy = _root.proj2._y;
dx = cx - px;
dy = cy - py;
drot = (57.2957795130823 * Math.atan2(dy, dx)) + 270;
if (cd > 360) {
cd = cd - 360;
}
if (cd < 0) {
cd = cd + 360;
}
if (cr > 360) {
cr = cr - 360;
}
if (cr < 0) {
cr = cr + 360;
}
if (drot > 360) {
drot = drot - 360;
}
if (drot < 0) {
drot = drot + 360;
}
cd = cr - drot;
acd = Math.abs(cd);
if (acd > (trs + 1)) {
_root.proj2._rotation = _root.proj2._rotation + sp;
}
if (cd >= 0) {
if (acd >= 180) {
sp = trs;
} else {
sp = -trs;
}
} else if (acd >= 180) {
sp = -trs;
} else {
sp = trs;
}
dangle = (Math.PI/180) * (cr + 270);
dxspeed = dspeed * Math.cos(dangle);
dyspeed = dspeed * Math.sin(dangle);
_root.proj2._x = _root.proj2._x + dxspeed;
_root.proj2._y = _root.proj2._y + dyspeed;
if (_root.proj.hitTest(_root.proj2) == true) {
MBTNH();
score = 0;
_root.proj2.play();
_root.tlaunched = false;
}
if (_root.walls.hitTest(_root.proj2._x, _root.proj2._y, true) == true) {
_root.tlaunched = false;
if (control == true) {
score++;
fscore();
}
smoke2 = false;
_root.proj2.play();
}
}
}
function turret2() {
_root.a2._rotation = a2rot;
a2rot = 270 + (57.2957795130823 * Math.atan2(a2yd, a2xd));
a2yd = _root.proj._y - _root.proj2._y;
a2xd = _root.proj._x - _root.proj2._x;
if (_root.proj2 == null) {
_root.a2._alpha = 0;
}
if (_root.proj2._currentframe == 1) {
_root.a2._alpha = 100;
} else {
_root.a2._alpha = 0;
}
_root.a2._x = _root.arrow._x;
_root.a2._y = _root.arrow._y;
trxdist = _root.g._x - _root.proj._x;
trydist = _root.g._y - _root.proj._y;
totaldist = Math.sqrt((trxdist * trxdist) + (trydist * trydist));
trrot = -90 + (57.2957795130823 * Math.atan2(trydist, trxdist));
_root.g.to._rotation = trrot;
if (control == true) {
if (a == true) {
if (totaldist < 500) {
if (tlaunched == false) {
tlaunched = true;
_root.attachMovie("proj2", "proj2", 1000);
_root.proj2._x = _root.g._x;
_root.proj2._y = _root.g._y;
_root.proj2._rotation = ttrot;
}
}
}
}
if (_root.tlaunched == true) {
dspeed = mspeed - 1;
px = _root.proj._x;
py = _root.proj._y;
cx = _root.proj2._x;
cy = _root.proj2._y;
dx = cx - px;
dy = cy - py;
drot = (57.2957795130823 * Math.atan2(dy, dx)) + 270;
_root.proj2._rotation = drot;
dangle = ((270 + _root.proj2._rotation) * Math.PI) / 180;
dxspeed = dspeed * Math.cos(dangle);
dyspeed = dspeed * Math.sin(dangle);
_root.proj2._x = _root.proj2._x + dxspeed;
_root.proj2._y = _root.proj2._y + dyspeed;
if (_root.proj.hitTest(_root.proj2)) {
MBTNH();
_root.proj2.play();
_root.tlaunched = false;
}
if (_root.walls.hitTest(_root.proj2._x, _root.proj2._y, true) == true) {
_root.tlaunched = false;
_root.proj2.play();
}
}
}
function fscore() {
if (score > highestscore) {
highestscore = score;
savehighscore();
}
}
function savehighscore() {
_root.savefile = SharedObject.getLocal("mgame");
_root.savefile.data.highestscore = _root.highestscore;
_root.savefile.flush();
}
function saveHighest() {
_root.savefile = SharedObject.getLocal("mgame");
_root.savefile.data.highestL = _root.highestL;
_root.savefile.flush();
}
function savegame() {
_root.savefile = SharedObject.getLocal("mgame");
_root.savefile.data.currentL = _root.currentL;
_root.savefile.data.diff = _root.diff;
_root.savefile.data.Mtype = _root.Mtype;
_root.savefile.data.acontrol = _root.acontrol;
_root.savefile.flush();
}
function loadHighest() {
_root.savefile = SharedObject.getLocal("mgame");
_root.highestL = _root.savefile.data.highestL;
if (_root.highestL == null) {
_root.highestL = 0;
saveHighest();
}
}
function loadgame() {
_root.savefile = SharedObject.getLocal("mgame");
_root.currentL = _root.savefile.data.currentL;
_root.diff = _root.savefile.data.diff;
if (diff == null) {
diff = "normal";
}
_root.Mtype = _root.savefile.data.Mtype;
if (Mtype == null) {
Mtype = 1;
}
_root.acontrol = _root.savefile.data.acontrol;
if (acontrol == null) {
acontrol = true;
}
if (_root.currentL > levels.length) {
_root.currentL = 0;
savegame();
}
_root.highestscore = _root.savefile.data.highestscore;
if (_root.highestscore == null) {
highestscore = 0;
}
_root.bul = _root.savefile.data.bul;
}
function init() {
protectFlash();
levels = new Array("D1", "D2", "D3", "J1", "J2", "J3", "J4", "J5", "C1", "C2", "C3", "C4", "f1", "f2", "f3", "f4", "f5", "f6", "win");
leveldisp = new Array(levels.length);
loadgame();
loadHighest();
if (highestL == null) {
highestL = 0;
saveHighest();
}
if (currentL == null) {
currentL = 0;
}
soundstopped = false;
soundN = 1;
resettime = 0;
score = 0;
bul = _root.savefile.data.bul;
if (bul == null) {
bul = false;
}
soundplay();
}
function renewHighest() {
if (currentL > highestL) {
highestL = currentL;
saveHighest();
}
}
function levelUp() {
currentL = currentL + 1;
_root.savefile = SharedObject.getLocal("mgame");
if (currentL > _root.savefile.data.currentL) {
savegame();
}
_root.gotoAndStop(levels[currentL]);
}
function newGame() {
currentL = 0;
_root.gotoAndStop("newg");
}
function resume() {
if (_root.savefile.data.currentL == null) {
_root.savefile.data.currentL = 0;
_root.savefile.flush();
currentL = 0;
_root.gotoAndStop("newg");
} else {
_root.gotoAndStop(levels[currentL]);
}
}
function levSel() {
_root.gotoAndStop("levsel");
renewHighest();
leveldisp[0] = "Tutorial";
i = levels.length - highestL;
while (i > 0) {
leveldisp[i] = "unlocked";
i--;
}
i = levels.length;
while (i > highestL) {
leveldisp[i] = "locked";
i--;
}
}
function clearData() {
currentL = null;
highestL = null;
mtype = null;
diff = null;
highestscore = null;
bul = null;
savebonus();
savegame();
saveHighest();
saveHighscore();
}
function quit() {
smoke = false;
_root.gotoAndStop("menu");
_root.proj.unloadMovie();
_root.proj2.unloadMovie();
_root.arrow.unloadMovie();
_root._x = 0;
_root._y = 0;
_root.audio._x = (-_root._x) + (540 - (_root.audio._width / 2));
_root.audio._y = (-_root._y) + (10 + (_root.audio._height / 2));
if (_root.audio._currentframe != 1) {
_root.audio.gotoAndStop(1);
}
}
function moveBlocks() {
_root.onMouseUp = function () {
mouseup = true;
seltimer = 1;
};
if (seltimer > 0) {
seltimer--;
} else {
seltimer = 0;
mouseup = false;
}
i = 0;
while (i < levels.length) {
if (leveldisp[i] == "locked") {
_root.box["l" + (i + 1)].gotoAndStop("lock");
} else {
_root.box["l" + (i + 1)].gotoAndStop(i + 1);
if (_root.box["l" + (i + 1)].hitTest(_xmouse, _ymouse, true)) {
if (mouseup == true) {
currentL = i;
_root.gotoAndStop(levels[currentL]);
}
}
}
i++;
}
fspeed = 20;
finalx = 95.5;
defaulty = 179.5;
finaly = defaulty + 130;
if (h == true) {
i = 0;
while (i < 4) {
p = i + 1;
if (tair == null) {
disp = 1;
if (!(Z[i]._y === defaulty)) {
Z[i]._y = Z[i]._y - ((finaly - defaulty) / fspeed);
}
if (!(Z[i]._x === defaultx[i])) {
Z[i]._x = defaultx[i];
}
if (Z[i]._y == defaulty) {
counter++;
}
} else if (O[i] == tair) {
disp = i + 2;
if (!(Z[i]._y === defaulty)) {
Z[i]._y = Z[i]._y - ((finaly - defaulty) / fspeed);
}
if (!(Z[i]._x === finalx)) {
Z[i]._x = finalx;
}
if (Z[i]._y == defaulty) {
counter++;
}
} else {
if (!(Z[i]._y === finaly)) {
Z[i]._y = Z[i]._y + ((finaly - defaulty) / fspeed);
}
if (!(Z[i]._x === defaultx[i])) {
Z[i]._x = defaultx[i];
}
if (Z[i]._y == finaly) {
counter++;
}
}
if (counter == 4) {
_root.box.gotoAndStop(disp);
h = false;
}
i++;
}
counter = 0;
}
}
function Linit() {
disp = 1;
tair = null;
h = false;
defaultx = new Array(4);
defaultx[0] = 95.5;
defaultx[1] = 215.6;
defaultx[2] = 335.6;
defaultx[3] = 455.6;
Z = new Array(z1, z2, z3, z4);
O = new Array("z1", "z2", "z3", "z4");
i = 0;
while (i < 4) {
_root.Z[i].gotoAndStop(i + 1);
i++;
}
}
function protectFlash() {
LC = new LocalConnection();
targetdomain = "localhost";
newgrounds = "upload.ungrounded.net";
currentdomain = LC.domain();
if ((!(currentdomain === targetdomain)) && (!(currentdomain === newgrounds))) {
stolen = true;
} else {
stolen = false;
}
if (stolen == true) {
_root.gotoAndStop("stolen");
}
}
function savebonus() {
_root.savefile.data.bul = bul;
_root.savefile.flush();
}
function soundplay() {
stopsounds();
if (!soundstopped) {
my_sound = new Sound();
my_sound.attachSound("music" + soundN);
my_sound.start(0, 10000);
}
}
function stopsounds() {
my_sound.stop();
}
_root.onEnterFrame = function () {
if (k > 200) {
k = 0;
}
if (smoke == true) {
ran1 = 20 - (40 * Math.random());
k++;
if (_root._quality == "HIGH") {
_root.attachMovie("ex", "ex" + k, k);
_root["ex" + k]._x = _root.proj._x;
_root["ex" + k]._y = _root.proj._y;
_root["ex" + k]._rotation = _root.proj._rotation + ran1;
_root["ex" + k]._xscale = 50;
_root["ex" + k]._yscale = 50;
} else if (_root._quality == "MEDIUM") {
sc++;
if (sc > 1) {
sc = 0;
_root.attachMovie("ex", "ex" + k, k);
_root["ex" + k]._x = _root.proj._x;
_root["ex" + k]._y = _root.proj._y;
_root["ex" + k]._rotation = _root.proj._rotation + ran1;
_root["ex" + k]._xscale = 50;
_root["ex" + k]._yscale = 50;
}
} else {
sc++;
if (sc > 2) {
_root.attachMovie("ex", "ex" + k, k);
_root["ex" + k]._x = _root.proj._x;
_root["ex" + k]._y = _root.proj._y;
_root["ex" + k]._rotation = _root.proj._rotation + ran1;
_root["ex" + k]._xscale = 50;
_root["ex" + k]._yscale = 50;
sc = 0;
}
}
}
};
Instance of Symbol 132 MovieClip in Frame 1
onClipEvent (load) {
_root.protectFlash();
}
Frame 2
function cannonframe() {
speed = -2;
if (resettime > -5) {
resettime--;
}
if (resettime == 0) {
_root.control = true;
a = false;
}
if (a == false) {
if (_root.tar == null) {
_root.arrow._alpha = 0;
} else {
_root.arrow._alpha = 100;
}
if (_root.tar.g == null) {
xdist = _root.cannon._x - _root.tar._x;
ydist = _root.cannon._y - _root.tar._y;
} else {
xdist = _root.cannon._x - (_root.tar._x + _root.tar.g._x);
ydist = _root.cannon._y - (_root.tar._y + _root.tar.g._y);
}
_root.arrow._x = _root.cannon._x;
_root.arrow._y = _root.cannon._y;
_root._x = (-_root.cannon._x) + 275;
_root._y = (-_root.cannon._y) + 200;
if (acontrol == true) {
if (Key.isDown(37)) {
_root.cannon._rotation = _root.cannon._rotation + speed;
}
if (Key.isDown(39)) {
_root.cannon._rotation = _root.cannon._rotation - speed;
}
} else {
if (Key.isDown(65)) {
_root.cannon._rotation = _root.cannon._rotation + speed;
}
if (Key.isDown(83)) {
_root.cannon._rotation = _root.cannon._rotation - speed;
}
}
LPx = 97 * Math.cos(angle);
LPy = 97 * Math.sin(angle);
rot = _root.cannon._rotation;
angle = ((rot + 270) * Math.PI) / 180;
if (resettime < -2) {
if (Key.isDown(32)) {
a = true;
smoke = true;
j = 0;
t = 0;
_root.cannon.play();
_root.attachMovie("proj", "proj", 900);
_root.proj._x = _root.cannon._x + LPx;
_root.proj._y = _root.cannon._y + LPy;
_root.proj._rotation = _root.cannon._rotation;
mangle = ((270 + _root.proj._rotation) * Math.PI) / 180;
mxspeed = mspeed * Math.cos(mangle);
myspeed = mspeed * Math.sin(mangle);
_root.proj.missile.gotoAndStop(Mtype);
}
}
}
if (a == true) {
if (control == true) {
_root.missile();
}
if (t < 11) {
t++;
}
if (t > 10) {
if (_root.control == true) {
if (Key.isDown(32)) {
_root.MBTNH();
}
}
}
if (_root.tar.g == null) {
xdist = _root.proj._x - _root.tar._x;
ydist = _root.proj._y - _root.tar._y;
} else {
xdist = _root.proj._x - (_root.tar._x + _root.tar.g._x);
ydist = _root.proj._y - (_root.tar._y + _root.tar.g._y);
}
_root.arrow._x = _root.proj._x;
_root.arrow._y = _root.proj._y;
_root._x = (-_root.proj._x) + 275;
_root._y = (-_root.proj._y) + 200;
}
_root.arrow._rotation = rotat;
rotat = (57.2957795130823 * Math.atan2(ydist, xdist)) + 270;
bonus();
}
function cannonload() {
a = false;
k = 0;
sc = 0;
control = true;
tlaunched = false;
goaudio = true;
smoke = false;
_root.targethit = false;
_root.attachMovie("arrow", "arrow", 901);
_root.arrow._x = _root.cannon._x;
_root.arrow._y = _root.cannon._y;
_root.attachMovie("a2", "a2", 902);
_root.a2._alpha = 0;
objs = new Array(x, s, d, f, z);
i = 0;
while (i < 5) {
objs[i].gotoAndStop(2);
i++;
}
turs = new Array(io, oo, po, lo, jo, ho, go, ko);
renewHighest();
if (diff == "easy") {
diffId = 0;
mspeed = 9;
mrspeed = 2.5;
} else if (diff == "normal") {
diffId = 1;
mspeed = 10;
mrspeed = 2;
} else {
diffId = 2;
mspeed = 12;
mrspeed = 2.3;
}
}
function missile() {
_root.proj._x = _root.proj._x + mxspeed;
_root.proj._y = _root.proj._y + myspeed;
if (acontrol == true) {
if (Key.isDown(39)) {
_root.proj._rotation = _root.proj._rotation + mrspeed;
}
if (Key.isDown(37)) {
_root.proj._rotation = _root.proj._rotation - mrspeed;
}
} else {
if (Key.isDown(83)) {
_root.proj._rotation = _root.proj._rotation + mrspeed;
}
if (Key.isDown(65)) {
_root.proj._rotation = _root.proj._rotation - mrspeed;
}
}
mangle = ((270 + _root.proj._rotation) * Math.PI) / 180;
mxspeed = mspeed * Math.cos(mangle);
myspeed = mspeed * Math.sin(mangle);
if (_root.tar.hitTest(projhitx, projhity, true) == true) {
MBTH();
}
projhitx = _root.proj._x + (25 * Math.cos(mangle));
projhity = _root.proj._y + (25 * Math.sin(mangle));
if (_root.walls.hitTest(projhitx, projhity, true)) {
MBTNH();
}
}
function MBTNH() {
score = 0;
control = false;
_root.proj.play();
smoke = false;
targethit = false;
}
function MBTH() {
_root.targethit = true;
_root.tlaunched = false;
_root.control = false;
if (_root.tar.g != null) {
_root.tar.g.gotoAndStop(2);
_root.tar.stop();
}
if (_root.g.to != null) {
_root.g.to.gotoAndStop(2);
}
_root.g.gotoAndStop(2);
_root.proj.play();
_root.proj2.play();
smoke = false;
}
function turret() {
_root.a2._rotation = a2rot;
a2rot = 270 + (57.2957795130823 * Math.atan2(a2yd, a2xd));
a2yd = _root.proj._y - _root.proj2._y;
a2xd = _root.proj._x - _root.proj2._x;
if (_root.proj2 == null) {
_root.a2._alpha = 0;
}
if (_root.proj2._currentframe == 1) {
_root.a2._alpha = 100;
} else {
_root.a2._alpha = 0;
}
_root.a2._x = _root.arrow._x;
_root.a2._y = _root.arrow._y;
smallestdist = Infinity;
i = 0;
while (i < 9) {
te = turs[i];
if (a == false) {
_root["tydist" + i] = _root.te._x - _root.cannon._x;
_root["txdist" + i] = _root.te._y - _root.cannon._y;
} else {
_root["tydist" + i] = _root.te._x - _root.proj._x;
_root["txdist" + i] = _root.te._y - _root.proj._y;
}
_root["totaldist" + i] = Math.sqrt(Math.pow(_root["tydist" + i], 2) + Math.pow(_root["txdist" + i], 2));
if (_root["totaldist" + i] < smallestdist) {
smallestdist = _root["totaldist" + i];
shooting = turs[i];
}
_root["trot" + i] = -57.2957795130823 * Math.atan2(_root["tydist" + i], _root["txdist" + i]);
_root.te.to._rotation = _root["trot" + i];
if (control == true) {
if (a == true) {
if (smallestdist < 500) {
if (tlaunched == false) {
tlaunched = true;
_root.attachMovie("proj2", "proj2", 1000);
_root.proj2._x = _root.shooting._x + (1.74532925199433 * Math.cos(_root["trot" + i]));
_root.proj2._y = _root.shooting._y + (1.74532925199433 * Math.sin(_root["trot" + i]));
_root.proj2._rotation = _root["trot" + i];
}
}
}
}
i++;
}
if (tlaunched == true) {
dspeed = mspeed + 1;
trs = mrspeed - 0.3;
px = _root.proj._x;
py = _root.proj._y;
cr = _root.proj2._rotation;
cx = _root.proj2._x;
cy = _root.proj2._y;
dx = cx - px;
dy = cy - py;
drot = (57.2957795130823 * Math.atan2(dy, dx)) + 270;
if (cd > 360) {
cd = cd - 360;
}
if (cd < 0) {
cd = cd + 360;
}
if (cr > 360) {
cr = cr - 360;
}
if (cr < 0) {
cr = cr + 360;
}
if (drot > 360) {
drot = drot - 360;
}
if (drot < 0) {
drot = drot + 360;
}
cd = cr - drot;
acd = Math.abs(cd);
if (acd > (trs + 1)) {
_root.proj2._rotation = _root.proj2._rotation + sp;
}
if (cd >= 0) {
if (acd >= 180) {
sp = trs;
} else {
sp = -trs;
}
} else if (acd >= 180) {
sp = -trs;
} else {
sp = trs;
}
dangle = (Math.PI/180) * (cr + 270);
dxspeed = dspeed * Math.cos(dangle);
dyspeed = dspeed * Math.sin(dangle);
_root.proj2._x = _root.proj2._x + dxspeed;
_root.proj2._y = _root.proj2._y + dyspeed;
if (_root.proj.hitTest(_root.proj2) == true) {
MBTNH();
score = 0;
_root.proj2.play();
_root.tlaunched = false;
}
if (_root.walls.hitTest(_root.proj2._x, _root.proj2._y, true) == true) {
_root.tlaunched = false;
if (control == true) {
score++;
fscore();
}
smoke2 = false;
_root.proj2.play();
}
}
}
function turret2() {
_root.a2._rotation = a2rot;
a2rot = 270 + (57.2957795130823 * Math.atan2(a2yd, a2xd));
a2yd = _root.proj._y - _root.proj2._y;
a2xd = _root.proj._x - _root.proj2._x;
if (_root.proj2 == null) {
_root.a2._alpha = 0;
}
if (_root.proj2._currentframe == 1) {
_root.a2._alpha = 100;
} else {
_root.a2._alpha = 0;
}
_root.a2._x = _root.arrow._x;
_root.a2._y = _root.arrow._y;
trxdist = _root.g._x - _root.proj._x;
trydist = _root.g._y - _root.proj._y;
totaldist = Math.sqrt((trxdist * trxdist) + (trydist * trydist));
trrot = -90 + (57.2957795130823 * Math.atan2(trydist, trxdist));
_root.g.to._rotation = trrot;
if (control == true) {
if (a == true) {
if (totaldist < 500) {
if (tlaunched == false) {
tlaunched = true;
_root.attachMovie("proj2", "proj2", 1000);
_root.proj2._x = _root.g._x;
_root.proj2._y = _root.g._y;
_root.proj2._rotation = ttrot;
}
}
}
}
if (_root.tlaunched == true) {
dspeed = mspeed - 1;
px = _root.proj._x;
py = _root.proj._y;
cx = _root.proj2._x;
cy = _root.proj2._y;
dx = cx - px;
dy = cy - py;
drot = (57.2957795130823 * Math.atan2(dy, dx)) + 270;
_root.proj2._rotation = drot;
dangle = ((270 + _root.proj2._rotation) * Math.PI) / 180;
dxspeed = dspeed * Math.cos(dangle);
dyspeed = dspeed * Math.sin(dangle);
_root.proj2._x = _root.proj2._x + dxspeed;
_root.proj2._y = _root.proj2._y + dyspeed;
if (_root.proj.hitTest(_root.proj2)) {
MBTNH();
_root.proj2.play();
_root.tlaunched = false;
}
if (_root.walls.hitTest(_root.proj2._x, _root.proj2._y, true) == true) {
_root.tlaunched = false;
_root.proj2.play();
}
}
}
function fscore() {
if (score > highestscore) {
highestscore = score;
savehighscore();
}
}
function savehighscore() {
_root.savefile = SharedObject.getLocal("mgame");
_root.savefile.data.highestscore = _root.highestscore;
_root.savefile.flush();
}
function saveHighest() {
_root.savefile = SharedObject.getLocal("mgame");
_root.savefile.data.highestL = _root.highestL;
_root.savefile.flush();
}
function savegame() {
_root.savefile = SharedObject.getLocal("mgame");
_root.savefile.data.currentL = _root.currentL;
_root.savefile.data.diff = _root.diff;
_root.savefile.data.Mtype = _root.Mtype;
_root.savefile.data.acontrol = _root.acontrol;
_root.savefile.flush();
}
function loadHighest() {
_root.savefile = SharedObject.getLocal("mgame");
_root.highestL = _root.savefile.data.highestL;
if (_root.highestL == null) {
_root.highestL = 0;
saveHighest();
}
}
function loadgame() {
_root.savefile = SharedObject.getLocal("mgame");
_root.currentL = _root.savefile.data.currentL;
_root.diff = _root.savefile.data.diff;
if (diff == null) {
diff = "normal";
}
_root.Mtype = _root.savefile.data.Mtype;
if (Mtype == null) {
Mtype = 1;
}
_root.acontrol = _root.savefile.data.acontrol;
if (acontrol == null) {
acontrol = true;
}
if (_root.currentL > levels.length) {
_root.currentL = 0;
savegame();
}
_root.highestscore = _root.savefile.data.highestscore;
if (_root.highestscore == null) {
highestscore = 0;
}
_root.bul = _root.savefile.data.bul;
}
function init() {
protectFlash();
levels = new Array("D1", "D2", "D3", "J1", "J2", "J3", "J4", "J5", "C1", "C2", "C3", "C4", "f1", "f2", "f3", "f4", "f5", "f6", "win");
leveldisp = new Array(levels.length);
loadgame();
loadHighest();
if (highestL == null) {
highestL = 0;
saveHighest();
}
if (currentL == null) {
currentL = 0;
}
soundstopped = false;
soundN = 1;
resettime = 0;
score = 0;
bul = _root.savefile.data.bul;
if (bul == null) {
bul = false;
}
soundplay();
}
function renewHighest() {
if (currentL > highestL) {
highestL = currentL;
saveHighest();
}
}
function levelUp() {
currentL = currentL + 1;
_root.savefile = SharedObject.getLocal("mgame");
if (currentL > _root.savefile.data.currentL) {
savegame();
}
_root.gotoAndStop(levels[currentL]);
}
function newGame() {
currentL = 0;
_root.gotoAndStop("newg");
}
function resume() {
if (_root.savefile.data.currentL == null) {
_root.savefile.data.currentL = 0;
_root.savefile.flush();
currentL = 0;
_root.gotoAndStop("newg");
} else {
_root.gotoAndStop(levels[currentL]);
}
}
function levSel() {
_root.gotoAndStop("levsel");
renewHighest();
leveldisp[0] = "Tutorial";
i = levels.length - highestL;
while (i > 0) {
leveldisp[i] = "unlocked";
i--;
}
i = levels.length;
while (i > highestL) {
leveldisp[i] = "locked";
i--;
}
}
function clearData() {
currentL = null;
highestL = null;
mtype = null;
diff = null;
highestscore = null;
bul = null;
savebonus();
savegame();
saveHighest();
saveHighscore();
}
function quit() {
smoke = false;
_root.gotoAndStop("menu");
_root.proj.unloadMovie();
_root.proj2.unloadMovie();
_root.arrow.unloadMovie();
_root._x = 0;
_root._y = 0;
_root.audio._x = (-_root._x) + (540 - (_root.audio._width / 2));
_root.audio._y = (-_root._y) + (10 + (_root.audio._height / 2));
if (_root.audio._currentframe != 1) {
_root.audio.gotoAndStop(1);
}
}
function moveBlocks() {
_root.onMouseUp = function () {
mouseup = true;
seltimer = 1;
};
if (seltimer > 0) {
seltimer--;
} else {
seltimer = 0;
mouseup = false;
}
i = 0;
while (i < levels.length) {
if (leveldisp[i] == "locked") {
_root.box["l" + (i + 1)].gotoAndStop("lock");
} else {
_root.box["l" + (i + 1)].gotoAndStop(i + 1);
if (_root.box["l" + (i + 1)].hitTest(_xmouse, _ymouse, true)) {
if (mouseup == true) {
currentL = i;
_root.gotoAndStop(levels[currentL]);
}
}
}
i++;
}
fspeed = 20;
finalx = 95.5;
defaulty = 179.5;
finaly = defaulty + 130;
if (h == true) {
i = 0;
while (i < 4) {
p = i + 1;
if (tair == null) {
disp = 1;
if (!(Z[i]._y === defaulty)) {
Z[i]._y = Z[i]._y - ((finaly - defaulty) / fspeed);
}
if (!(Z[i]._x === defaultx[i])) {
Z[i]._x = defaultx[i];
}
if (Z[i]._y == defaulty) {
counter++;
}
} else if (O[i] == tair) {
disp = i + 2;
if (!(Z[i]._y === defaulty)) {
Z[i]._y = Z[i]._y - ((finaly - defaulty) / fspeed);
}
if (!(Z[i]._x === finalx)) {
Z[i]._x = finalx;
}
if (Z[i]._y == defaulty) {
counter++;
}
} else {
if (!(Z[i]._y === finaly)) {
Z[i]._y = Z[i]._y + ((finaly - defaulty) / fspeed);
}
if (!(Z[i]._x === defaultx[i])) {
Z[i]._x = defaultx[i];
}
if (Z[i]._y == finaly) {
counter++;
}
}
if (counter == 4) {
_root.box.gotoAndStop(disp);
h = false;
}
i++;
}
counter = 0;
}
}
function Linit() {
disp = 1;
tair = null;
h = false;
defaultx = new Array(4);
defaultx[0] = 95.5;
defaultx[1] = 215.6;
defaultx[2] = 335.6;
defaultx[3] = 455.6;
Z = new Array(z1, z2, z3, z4);
O = new Array("z1", "z2", "z3", "z4");
i = 0;
while (i < 4) {
_root.Z[i].gotoAndStop(i + 1);
i++;
}
}
function protectFlash() {
LC = new LocalConnection();
targetdomain = "localhost";
newgrounds = "http://uploads.ungrounded.net";
currentdomain = LC.domain();
if (!(currentdomain === "uploads.ungrounded.net")) {
stolen = true;
} else {
stolen = false;
}
if (stolen == true) {
_root.gotoAndStop("stolen");
}
}
function savebonus() {
_root.savefile.data.bul = bul;
_root.savefile.flush();
}
function soundplay() {
stopsounds();
if (!soundstopped) {
my_sound = new Sound();
my_sound.attachSound("music" + soundN);
my_sound.start(0, 10000);
}
}
function stopsounds() {
my_sound.stop();
}
_root.onEnterFrame = function () {
if (k > 200) {
k = 0;
}
if (smoke == true) {
ran1 = 20 - (40 * Math.random());
k++;
if (_root._quality == "HIGH") {
_root.attachMovie("ex", "ex" + k, k);
_root["ex" + k]._x = _root.proj._x;
_root["ex" + k]._y = _root.proj._y;
_root["ex" + k]._rotation = _root.proj._rotation + ran1;
_root["ex" + k]._xscale = 50;
_root["ex" + k]._yscale = 50;
} else if (_root._quality == "MEDIUM") {
sc++;
if (sc > 1) {
sc = 0;
_root.attachMovie("ex", "ex" + k, k);
_root["ex" + k]._x = _root.proj._x;
_root["ex" + k]._y = _root.proj._y;
_root["ex" + k]._rotation = _root.proj._rotation + ran1;
_root["ex" + k]._xscale = 50;
_root["ex" + k]._yscale = 50;
}
} else {
sc++;
if (sc > 2) {
_root.attachMovie("ex", "ex" + k, k);
_root["ex" + k]._x = _root.proj._x;
_root["ex" + k]._y = _root.proj._y;
_root["ex" + k]._rotation = _root.proj._rotation + ran1;
_root["ex" + k]._xscale = 50;
_root["ex" + k]._yscale = 50;
sc = 0;
}
}
}
};
stop();
Instance of Symbol 122 MovieClip [audio] "audio" in Frame 2
onClipEvent (load) {
_root.init();
}
onClipEvent (enterFrame) {
if (Key.isDown(81)) {
if (!KD) {
KD = true;
if (_root._quality == "LOW") {
_root._quality = "HIGH";
} else if (_root._quality == "MEDIUM") {
_root._quality = "LOW";
} else {
_root._quality = "MEDIUM";
}
}
} else {
KD = false;
}
if (_root.bul == true) {
_root.bonusb._x = 200;
} else {
_root.bonusb._x = 700;
}
_root.audio._x = (-_root._x) + (540 - (_root.audio._width / 2));
_root.audio._y = (-_root._y) + (10 + (_root.audio._height / 2));
}
Instance of Symbol 31 MovieClip in Frame 4
onClipEvent (enterFrame) {
_root.diffmc.gotoAndStop(_root.diff);
}
Instance of Symbol 249 MovieClip in Frame 6
onClipEvent (load) {
_root.Linit();
}
onClipEvent (enterFrame) {
_root.moveBlocks();
}
Instance of Symbol 249 MovieClip "z4" in Frame 6
on (release) {
if (_root.tair == "z4") {
_root.tair = null;
} else {
_root.tair = "z4";
}
_root.h = true;
}
Instance of Symbol 249 MovieClip "z2" in Frame 6
on (release) {
if (_root.tair == "z2") {
_root.tair = null;
} else {
_root.tair = "z2";
}
_root.h = true;
}
Instance of Symbol 249 MovieClip "z1" in Frame 6
on (release) {
if (_root.tair == "z1") {
_root.tair = null;
} else {
_root.tair = "z1";
}
_root.h = true;
}
Instance of Symbol 249 MovieClip "z3" in Frame 6
on (release) {
if (_root.tair == "z3") {
_root.tair = null;
} else {
_root.tair = "z3";
}
_root.h = true;
}
Frame 10
stop();
Frame 12
_root.gotoAndStop("menu");
Instance of Symbol 312 MovieClip "cannon" in Frame 13
onClipEvent (load) {
_root.cannonload();
if (!(_root.bul === true)) {
_root.bonus._alpha = 100;
_root.bul = true;
_root.savebonus();
} else {
_root.bonus._alpha = 0;
}
}
onClipEvent (enterFrame) {
_root.cannonframe();
_root.turret();
}
Frame 14
_root.gotoAndStop("menu");
Frame 18
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 18
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 20
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 20
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 22
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 22
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 24
stop();
Instance of Symbol 369 MovieClip "enem" in Frame 24
onClipEvent (enterFrame) {
if (_root.a) {
if (_root.enem.hitTest(_root.projhitx, _root.projhity, true)) {
_root.MBTNH();
}
}
}
Instance of Symbol 312 MovieClip "cannon" in Frame 24
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 26
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 26
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 28
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 28
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 30
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 30
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 32
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 32
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 34
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 34
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 36
stop();
if (_root.targethit == true) {
_root.tar.stop();
}
Instance of Symbol 312 MovieClip "cannon" in Frame 36
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 38
stop();
if (_root.targethit == true) {
_root.tar.stop();
}
Instance of Symbol 312 MovieClip "cannon" in Frame 38
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 40
stop();
if (_root.targethit == true) {
_root.tar.stop();
}
Instance of Symbol 312 MovieClip "cannon" in Frame 40
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 42
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 42
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 44
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 44
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 46
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 46
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 48
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 48
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 50
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 50
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Frame 52
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 52
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Instance of Symbol 302 MovieClip "g" in Frame 52
onClipEvent (enterFrame) {
_root.turret2();
}
Frame 54
stop();
Instance of Symbol 366 MovieClip "bonusicon" in Frame 54
onClipEvent (enterFrame) {
if (this.hitTest(_root.proj)) {
_root.gotoAndStop("secret");
}
}
Instance of Symbol 312 MovieClip "cannon" in Frame 54
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Instance of Symbol 302 MovieClip "io" in Frame 54
onClipEvent (enterFrame) {
_root.turret();
}
Frame 56
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 56
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Instance of Symbol 302 MovieClip "io" in Frame 56
onClipEvent (enterFrame) {
_root.turret();
}
Frame 58
stop();
Instance of Symbol 312 MovieClip "cannon" in Frame 58
onClipEvent (load) {
_root.cannonload();
}
onClipEvent (enterFrame) {
_root.cannonframe();
}
Instance of Symbol 302 MovieClip "io" in Frame 58
onClipEvent (enterFrame) {
_root.turret();
}
Frame 60
_root.gotoAndStop("menu");
Frame 80
_root.gotoAndStop("stolen");
Frame 81
stop();
Frame 82
_root.gotoAndStop("stolen");
Symbol 30 MovieClip Frame 15
stop();
Symbol 32 MovieClip [proj2] Frame 1
stop();
Symbol 32 MovieClip [proj2] Frame 40
stop();
Instance of Symbol 31 MovieClip in Symbol 32 MovieClip [proj2] Frame 40
onClipEvent (load) {
_parent.unloadMovie();
}
Symbol 44 MovieClip [selectlist] Frame 1
i = 0;
while (i < 18) {
this["li" + i] = listitem;
listitem = new Object();
listitem.li = "locked";
i++;
}
Instance of Symbol 31 MovieClip in Symbol 47 MovieClip [ex] Frame 33
onClipEvent (load) {
_parent.unloadMovie();
}
Symbol 62 MovieClip [smoke] Frame 30
stop();
Symbol 79 MovieClip [exp2] Frame 30
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 2
stop();
Symbol 88 MovieClip Frame 3
stop();
Symbol 88 MovieClip Frame 4
stop();
Symbol 103 MovieClip Frame 20
stop();
Symbol 105 MovieClip [proj] Frame 1
stop();
Instance of Symbol 104 MovieClip in Symbol 105 MovieClip [proj] Frame 2
onClipEvent (load) {
this.gotoAndStop(1 + int(Math.random() * 3));
}
Symbol 105 MovieClip [proj] Frame 40
stop();
if (_root.targethit == true) {
_root.targethit = false;
_root.levelUp();
} else {
_root.resettime = 20;
}
Symbol 110 Button
on (release) {
play();
}
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
stop();
Symbol 114 Button
on (release) {
if (_root.soundN > 2) {
_root.soundN--;
} else {
_root.soundN = 4;
}
_root.soundplay();
}
Symbol 115 Button
on (release) {
if (_root.soundN <= 3) {
_root.soundN++;
} else {
_root.soundN = 1;
}
_root.soundplay();
}
Symbol 118 Button
on (release) {
_root.quit();
}
Symbol 122 MovieClip [audio] Frame 1
stop();
Instance of Symbol 112 MovieClip "mute" in Symbol 122 MovieClip [audio] Frame 1
on (release) {
if (this._currentframe == 1) {
_root.soundstopped = true;
_root.stopsounds();
this.gotoAndStop(2);
} else {
_root.soundstopped = false;
_root.soundplay();
this.gotoAndStop(1);
}
}
Symbol 131 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 132 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
_root.play();
}
Symbol 132 MovieClip Frame 2
gotoAndPlay (1);
Symbol 144 Button
on (release) {
_root.levSel();
}
Symbol 146 Button
on (release) {
_root.resume();
}
Symbol 148 Button
on (release) {
_root.gotoAndStop("settings");
_root.loadgame();
}
Symbol 151 Button
on (release) {
_root.gotoAndStop("tutorial");
}
Symbol 153 Button
on (release) {
_root.gotoAndStop("bonuslevel1");
_root.audio.gotoAndStop(2);
}
Symbol 155 Button
on (release) {
_root.newGame();
}
Symbol 162 Button
on (release) {
getURL ("http://www.abestudios.com", _blank);
}
Symbol 165 Button
on (release) {
_root.clearData();
}
Symbol 169 Button
on (release) {
if (_root.diff == "easy") {
_root.diff = "normal";
} else if (_root.diff == "normal") {
_root.diff = "hard";
} else {
_root.diff = "easy";
}
}
Symbol 171 Button
on (release) {
_root.gotoAndStop("menu");
_root.savegame();
}
Symbol 174 Button
on (release) {
_root.msel.play();
}
Symbol 196 Button
on (release) {
_root.Mtype = 1;
_root.msel.play();
}
Symbol 197 Button
on (release) {
_root.Mtype = 2;
_root.msel.play();
}
Symbol 198 Button
on (release) {
_root.Mtype = 3;
_root.msel.play();
}
Symbol 199 Button
on (release) {
_root.Mtype = 4;
_root.msel.play();
}
Symbol 201 MovieClip Frame 1
stop();
Symbol 201 MovieClip Frame 61
stop();
Symbol 204 Button
on (release) {
_root.cont.play();
}
Symbol 217 Button
on (release) {
_root.acontrol = false;
_root.cont.play();
}
Symbol 223 Button
on (release) {
_root.acontrol = true;
_root.cont.play();
}
Symbol 231 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 46
stop();
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 2
stop();
Symbol 235 MovieClip Frame 3
stop();
Symbol 236 Button
on (release) {
_root.gotoAndStop("menu");
}
Symbol 249 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 280 Button
on (release) {
_root.diff = "easy";
_root.savegame();
_root.gotoAndStop(_root.levels[currentL]);
}
Symbol 282 Button
on (release) {
_root.diff = "normal";
_root.savegame();
_root.gotoAndStop(_root.levels[currentL]);
}
Symbol 284 Button
on (release) {
_root.diff = "hard";
_root.savegame();
_root.gotoAndStop(_root.levels[currentL]);
}
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 2
stop();
Symbol 291 MovieClip Frame 3
stop();
Symbol 291 MovieClip Frame 4
stop();
Symbol 291 MovieClip Frame 5
stop();
Symbol 291 MovieClip Frame 6
_root.gotoAndStop("menu");
Symbol 293 Button
on (release) {
_root.help.play();
}
Symbol 300 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 2
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 312 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 2
stop();
Symbol 327 MovieClip Frame 580
stop();
Instance of Symbol 318 MovieClip "g" in Symbol 327 MovieClip Frame 580
onClipEvent (load) {
this.gotoAndStop("shoot");
}
Symbol 338 MovieClip Frame 120
stop();
Instance of Symbol 31 MovieClip in Symbol 338 MovieClip Frame 120
onClipEvent (load) {
go = false;
}
onClipEvent (enterFrame) {
speed = -2;
if (_root.acontrol == true) {
if (Key.isDown(37)) {
go = true;
_root.cannon._rotation = _root.cannon._rotation + speed;
}
if (Key.isDown(39)) {
go = true;
_root.cannon._rotation = _root.cannon._rotation - speed;
}
} else {
if (Key.isDown(65)) {
go = true;
_root.cannon._rotation = _root.cannon._rotation + speed;
}
if (Key.isDown(83)) {
go = true;
_root.cannon._rotation = _root.cannon._rotation - speed;
}
}
if (go == true) {
_parent.play();
}
}
Symbol 338 MovieClip Frame 181
stop();
Instance of Symbol 31 MovieClip in Symbol 338 MovieClip Frame 181
onClipEvent (enterFrame) {
_root.cannonframe();
_root.arrow._alpha = 0;
if (_root.proj._currentframe > 1) {
_parent.play();
}
}
onClipEvent (load) {
_root.cannonload();
}
Instance of Symbol 31 MovieClip in Symbol 338 MovieClip Frame 260
onClipEvent (load) {
_root.proj.unloadMovie();
_root.cannonload();
}
Symbol 338 MovieClip Frame 344
stop();
Instance of Symbol 31 MovieClip in Symbol 338 MovieClip Frame 344
onClipEvent (enterFrame) {
_root.cannonframe();
if (_root.target.hitTest(_root.proj._x, _root.proj._y, true) == true) {
_root.proj.play();
_root.smoke = false;
_root.mspeed = 0;
_root.control = false;
_root.g.gotoAndStop(2);
if (_root.proj._currentframe >= 38) {
_root.proj.gotoAndStop(38);
gotimer = true;
}
}
if (gotimer == true) {
_parent.play();
}
}
onClipEvent (load) {
_root.cannonload();
}
Symbol 338 MovieClip Frame 373
_root._x = 0;
_root._y = 0;
_root.gotoAndStop("tut2");
Symbol 341 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 2
stop();
Symbol 354 MovieClip Frame 1
stop();
Symbol 367 MovieClip Frame 1
stop();
Symbol 367 MovieClip Frame 10
stop();
Symbol 374 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 2
stop();
Symbol 377 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 1
stop();
Symbol 382 MovieClip Frame 70
stop();
Symbol 397 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 2
stop();
Symbol 404 MovieClip Frame 1
stop();
Symbol 407 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 950
stop();
Symbol 416 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 1
stop();
Symbol 432 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}