Frame 1
stop();
initX = _root.preloader.mask._x;
onEnterFrame = function () {
var _local2 = (this.getBytesLoaded() * 100) / this.getBytesTotal();
this.preloader.mask._x = initX + ((_local2 * this.preloader.mask._width) / 100);
this.percentageLoaded.text = Math.floor(_local2);
loads.loader.loaders.loadbar._width = _local2 * 2.15;
if (_local2 == 100) {
delete onEnterFrame;
loads.play();
}
};
Frame 2
gotoAndStop ("menu");
Frame 3
stop();
stopAllSounds();
Instance of Symbol 49 MovieClip in Frame 4
on (release) {
gotoAndStop (4);
}
Instance of Symbol 51 MovieClip in Frame 5
on (release) {
gotoAndStop (4);
}
Frame 6
stop();
lol = 0;
lives = 5;
_root.bc = 0;
time = 0;
timeneeded = 100;
count = 0;
score = 0;
died = false;
onEnterFrame = function () {
score = score + 5;
_root.yPo = _root._ymouse;
_root.xPo = _root._xmouse;
timeneeded = Math.round(timeneeded);
time++;
if (time == (timeneeded * 0.5)) {
count++;
_root.bc++;
if (_root.bc > 1100) {
_root.bc = 1000;
}
_root.can = 1;
duplicateMovieClip ("bullet1", "b1" + _root.bc, count);
}
if (time == (timeneeded * 1)) {
count++;
_root.bc++;
if (_root.bc > 1100) {
_root.bc = 1000;
}
_root.can = 1;
duplicateMovieClip ("bullet2", "b2" + _root.bc, count);
}
if (time == (timeneeded * 2)) {
count++;
_root.bc++;
if (_root.bc > 1100) {
_root.bc = 1000;
}
_root.can = 3;
duplicateMovieClip ("bullet3", "b3" + _root.bc, count);
}
if (time == (timeneeded * 3)) {
count++;
_root.bc++;
if (_root.bc > 1100) {
_root.bc = 1000;
}
_root.can = 4;
duplicateMovieClip ("bullet4", "b4" + _root.bc, count);
time = 0;
timeneeded = timeneeded - 10;
if (timeneeded < 10) {
timeneeded = timeneeded + 30;
}
}
if (lives == 0) {
lol = 0;
while (lol <= 1000) {
_root["b" + lol].removeMovieClip();
lol++;
}
if (died == false) {
_root.scre = score;
died = true;
}
gotoAndStop (7);
}
};
Instance of Symbol 53 MovieClip "bullet1" in Frame 6
onClipEvent (load) {
if (_name == "bullet1") {
_x = -1000;
}
bn = 0;
spd = Math.random(20) + 10;
b = _root.bc;
thisbc = b;
_x = _root.cannon1._x;
_y = _root.cannon1._y;
if (_x >= _root._xmouse) {
xdif = -(_x - _root._xmouse);
} else {
xdif = -(_root._xmouse - _x);
}
if (_y <= _root._ymouse) {
ydif = -(_y - _root._ymouse);
} else {
ydif = -(_root._ymouse - _y);
}
diff = xdif - ydif;
xspeed = -(spd * (xdif / diff));
yspeed = -(spd * (ydif / diff));
r = _width / 2;
array = new Array(360);
}
onClipEvent (enterFrame) {
if (bn == 1) {
gotoAndStop (7);
}
if (bn == 0) {
gotoAndStop (6);
}
if (_name == "bullet1") {
_x = -1000;
xspeed = 0;
yspeed = 0;
}
onEnterFrame = function () {
if (_y <= 16) {
bn = 0;
yspeed = Math.abs(yspeed);
} else if (_y >= 685) {
bn = 0;
yspeed = -Math.abs(yspeed);
}
if (_x <= 16) {
bn = 0;
xspeed = Math.abs(xspeed);
} else if (_x >= 685) {
bn = 0;
xspeed = -Math.abs(xspeed);
}
strt = 0;
end = 0;
a = 0;
while (a < (thisbc - 1)) {
if (hitTest(_root["b1" + a]) && (bn == 1)) {
removeMovieClip(this);
}
a++;
}
b = thisbc + 1;
while (b < _root.bc) {
if (hitTest(_root["b1" + b]) && (bn == 1)) {
removeMovieClip(this);
}
b++;
}
i = 0;
while (i < 360) {
x = (_x + xspeed) + (r * Math.cos((i / 180) * Math.PI));
y = (_y + yspeed) - (r * Math.sin((i / 180) * Math.PI));
if (_root.player.hitTest(x, y, true)) {
if (_root.player._currentframe == 4) {
_root.player.gotoAndStop(1);
this.swapDepths(9999);
this.removeMovieClip();
_root.score++;
} else if ((_root.player._currentframe >= 1) && (_root.player._currentframe <= 3)) {
_root.player.gotoAndStop(5);
bn = 1;
array[i] = 1;
if (xspeed < 10) {
xspeed = xspeed + (_root.player.ax / 10);
}
if (xspeed > 10) {
xspeed = xspeed - (_root.player.ax / 10);
}
if (yspeed > 10) {
yspeed = yspeed - _root.player.ay;
}
_root.lives--;
}
} else {
array[i] = 0;
}
(((!last) and array[i]) ? ((strt = i)) : 0);
((last and (!array[i])) ? ((end = i)) : 0);
last = array[i];
i = i + 20;
}
((strt > end) ? ((angle = ((strt + end) / 2) + 180)) : ((angle = (strt + end) / 2)));
speed = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
if (strt != end) {
xspeed = (-speed) * Math.sin(((angle + 90) / 180) * Math.PI);
yspeed = (-speed) * Math.cos(((angle + 90) / 180) * Math.PI);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
};
}
Instance of Symbol 54 MovieClip "player" in Frame 6
onClipEvent (load) {
vx = 0;
vy = 0;
k = 0.75;
inertia = 0.3;
}
onClipEvent (enterFrame) {
ax = (_root._xmouse - _x) * k;
ay = (_root._ymouse - _y) * k;
_x = (_x + (vx * 2));
_y = (_y + (vy * 2));
vx = vx + ax;
vy = vy + ay;
vx = vx * inertia;
vy = vy * inertia;
}
Instance of Symbol 56 MovieClip "cannon4" in Frame 6
onClipEvent (enterFrame) {
yPo2 = this._y;
xPo2 = this._x;
myRadians = Math.atan2(_root.yPo - yPo2, _root.xPo - xPo2);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_rotation = (myDegrees + 90);
}
Instance of Symbol 57 MovieClip "cannon3" in Frame 6
onClipEvent (enterFrame) {
yPo2 = this._y;
xPo2 = this._x;
myRadians = Math.atan2(_root.yPo - yPo2, _root.xPo - xPo2);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_rotation = (myDegrees + 90);
}
Instance of Symbol 59 MovieClip "cannon1" in Frame 6
onClipEvent (enterFrame) {
yPo2 = this._y;
xPo2 = this._x;
myRadians = Math.atan2(_root.yPo - yPo2, _root.xPo - xPo2);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_rotation = (myDegrees + 90);
}
Instance of Symbol 60 MovieClip "cannon2" in Frame 6
onClipEvent (enterFrame) {
yPo2 = this._y;
xPo2 = this._x;
myRadians = Math.atan2(_root.yPo - yPo2, _root.xPo - xPo2);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_rotation = (myDegrees + 90);
}
Instance of Symbol 65 MovieClip "bullet4" in Frame 6
onClipEvent (load) {
bn = 0;
spd = Math.random(20) + 10;
b = _root.bc;
thisbc = b;
_x = _root.cannon4._x;
_y = _root.cannon4._y;
if (_x >= _root._xmouse) {
xdif = -(_x - _root._xmouse);
} else {
xdif = -(_root._xmouse - _x);
}
if (_y <= _root._ymouse) {
ydif = -(_y - _root._ymouse);
} else {
ydif = -(_root._ymouse - _y);
}
diff = xdif - ydif;
xspeed = -(spd * (xdif / diff));
yspeed = -(spd * (ydif / diff));
r = _width / 2;
array = new Array(360);
}
onClipEvent (enterFrame) {
if (bn == 1) {
gotoAndStop (7);
}
if (bn == 0) {
gotoAndStop (6);
}
if (_name == "bullet4") {
_x = -1000;
xspeed = 0;
yspeed = 0;
}
onEnterFrame = function () {
if (_y <= 16) {
bn = 0;
yspeed = Math.abs(yspeed);
} else if (_y >= 685) {
bn = 0;
yspeed = -Math.abs(yspeed);
}
if (_x <= 16) {
bn = 0;
xspeed = Math.abs(xspeed);
} else if (_x >= 685) {
bn = 0;
xspeed = -Math.abs(xspeed);
}
strt = 0;
end = 0;
a = 0;
while (a < (thisbc - 1)) {
if (hitTest(_root["b4" + a]) && (bn == 1)) {
removeMovieClip(this);
}
a++;
}
b = thisbc + 1;
while (b < _root.bc) {
if (hitTest(_root["b4" + b]) && (bn == 1)) {
removeMovieClip(this);
}
b++;
}
i = 0;
while (i < 360) {
x = (_x + xspeed) + (r * Math.cos((i / 180) * Math.PI));
y = (_y + yspeed) - (r * Math.sin((i / 180) * Math.PI));
if (_root.player.hitTest(x, y, true)) {
if (_root.player._currentframe == 1) {
_root.player.gotoAndStop(3);
this.swapDepths(9999);
this.removeMovieClip();
_root.score++;
} else if ((2 <= _root.player._currentframe) && (4 >= _root.player._currentframe)) {
_root.player.gotoAndStop(5);
array[i] = 1;
if (xspeed < 10) {
xspeed = xspeed + (_root.player.ax / 10);
}
if (xspeed > 10) {
xspeed = xspeed - (_root.player.ax / 10);
}
if (yspeed > 10) {
yspeed = yspeed - _root.player.ay;
}
_root.player.gotoAndStop(5);
_root.lives--;
}
} else {
array[i] = 0;
}
(((!last) and array[i]) ? ((strt = i)) : 0);
((last and (!array[i])) ? ((end = i)) : 0);
last = array[i];
i = i + 20;
}
((strt > end) ? ((angle = ((strt + end) / 2) + 180)) : ((angle = (strt + end) / 2)));
speed = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
if (strt != end) {
xspeed = (-speed) * Math.sin(((angle + 90) / 180) * Math.PI);
yspeed = (-speed) * Math.cos(((angle + 90) / 180) * Math.PI);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
};
}
Instance of Symbol 66 MovieClip "bullet3" in Frame 6
onClipEvent (load) {
bn = 0;
spd = Math.random(20) + 10;
b = _root.bc;
thisbc = b;
_x = _root.cannon3._x;
_y = _root.cannon3._y;
if (_x >= _root._xmouse) {
xdif = -(_x - _root._xmouse);
} else {
xdif = -(_root._xmouse - _x);
}
if (_y <= _root._ymouse) {
ydif = -(_y - _root._ymouse);
} else {
ydif = -(_root._ymouse - _y);
}
diff = xdif - ydif;
xspeed = -(spd * (xdif / diff));
yspeed = -(spd * (ydif / diff));
r = _width / 2;
array = new Array(360);
}
onClipEvent (enterFrame) {
if (bn == 1) {
gotoAndStop (7);
}
if (bn == 0) {
gotoAndStop (6);
}
if (_name == "bullet3") {
_x = -1000;
xspeed = 0;
yspeed = 0;
}
onEnterFrame = function () {
if (_y <= 16) {
bn = 0;
yspeed = Math.abs(yspeed);
} else if (_y >= 685) {
bn = 0;
yspeed = -Math.abs(yspeed);
}
if (_x <= 16) {
bn = 0;
xspeed = Math.abs(xspeed);
} else if (_x >= 685) {
bn = 0;
xspeed = -Math.abs(xspeed);
}
strt = 0;
end = 0;
a = 0;
while (a < (thisbc - 1)) {
if (hitTest(_root["b3" + a]) && (bn == 1)) {
removeMovieClip(this);
}
a++;
}
b = thisbc + 1;
while (b < _root.bc) {
if (hitTest(_root["b3" + b]) && (bn == 1)) {
removeMovieClip(this);
}
b++;
}
i = 0;
while (i < 360) {
x = (_x + xspeed) + (r * Math.cos((i / 180) * Math.PI));
y = (_y + yspeed) - (r * Math.sin((i / 180) * Math.PI));
if (_root.player.hitTest(x, y, true) && (bn == 0)) {
if (_root.player._currentframe == 2) {
_root.player.gotoAndStop(4);
this.swapDepths(9999);
this.removeMovieClip();
} else if (((_root.player._currentframe == 1) or (_root.player._currentframe == 3)) or (_root.player._currentframe == 4)) {
_root.player.gotoAndStop(5);
bn = 1;
array[i] = 1;
if (xspeed < 10) {
xspeed = xspeed + (_root.player.ax / 10);
}
if (xspeed > 10) {
xspeed = xspeed - (_root.player.ax / 10);
}
if (yspeed > 10) {
yspeed = yspeed - _root.player.ay;
}
_root.lives--;
}
} else {
array[i] = 0;
}
(((!last) and array[i]) ? ((strt = i)) : 0);
((last and (!array[i])) ? ((end = i)) : 0);
last = array[i];
i = i + 20;
}
((strt > end) ? ((angle = ((strt + end) / 2) + 180)) : ((angle = (strt + end) / 2)));
speed = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
if (strt != end) {
xspeed = (-speed) * Math.sin(((angle + 90) / 180) * Math.PI);
yspeed = (-speed) * Math.cos(((angle + 90) / 180) * Math.PI);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
};
}
Instance of Symbol 67 MovieClip "bullet2" in Frame 6
onClipEvent (load) {
bn = 0;
spd = Math.random(20) + 10;
thisbc = _root.bc;
_x = _root.cannon2._x;
_y = _root.cannon2._y;
if (_x >= _root._xmouse) {
xdif = -(_x - _root._xmouse);
} else {
xdif = -(_root._xmouse - _x);
}
if (_y <= _root._ymouse) {
ydif = -(_y - _root._ymouse);
} else {
ydif = -(_root._ymouse - _y);
}
diff = xdif - ydif;
xspeed = -(spd * (xdif / diff));
yspeed = -(spd * (ydif / diff));
r = _width / 2;
array = new Array(360);
}
onClipEvent (enterFrame) {
if (bn == 1) {
gotoAndStop (7);
}
if (bn == 0) {
gotoAndStop (6);
}
if (_name == "bullet2") {
_x = -1000;
xspeed = 0;
yspeed = 0;
}
onEnterFrame = function () {
if (_y <= 16) {
bn = 0;
yspeed = Math.abs(yspeed);
} else if (_y >= 685) {
bn = 0;
yspeed = -Math.abs(yspeed);
}
if (_x <= 16) {
bn = 0;
xspeed = Math.abs(xspeed);
} else if (_x >= 685) {
bn = 0;
xspeed = -Math.abs(xspeed);
}
strt = 0;
end = 0;
a = 0;
while (a < (thisbc - 1)) {
if (hitTest(_root["b2" + a]) && (bn == 1)) {
removeMovieClip(this);
_root.score = _root.score + 2000;
}
a++;
}
b = thisbc + 1;
while (b < _root.bc) {
if (hitTest(_root["b2" + b]) && (bn == 1)) {
removeMovieClip(this);
_root.score = _root.score + 2000;
}
b++;
}
i = 0;
while (i < 360) {
x = (_x + xspeed) + (r * Math.cos((i / 180) * Math.PI));
y = (_y + yspeed) - (r * Math.sin((i / 180) * Math.PI));
if (_root.player.hitTest(x, y, true)) {
if (_root.player._currentframe == 3) {
_root.player.gotoAndStop(2);
this.swapDepths(9999);
this.removeMovieClip();
} else if ((((_root.player._currentframe == 1) or (_root.player._currentframe == 2)) or (_root.player._currentframe == 5)) or (_root.player._currentframe == 4)) {
_root.player.gotoAndStop(5);
bn = 1;
array[i] = 1;
if (xspeed < 10) {
xspeed = xspeed + (_root.player.ax / 10);
}
if (xspeed > 10) {
xspeed = xspeed - (_root.player.ax / 10);
}
if (yspeed > 10) {
yspeed = yspeed - _root.player.ay;
}
_root.lives--;
}
} else {
array[i] = 0;
}
(((!last) and array[i]) ? ((strt = i)) : 0);
((last and (!array[i])) ? ((end = i)) : 0);
last = array[i];
i = i + 20;
}
((strt > end) ? ((angle = ((strt + end) / 2) + 180)) : ((angle = (strt + end) / 2)));
speed = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
if (strt != end) {
xspeed = (-speed) * Math.sin(((angle + 90) / 180) * Math.PI);
yspeed = (-speed) * Math.cos(((angle + 90) / 180) * Math.PI);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
};
}
Frame 7
submitted = false;
Frame 8
stop();
lol = 0;
lives = 5;
_root.bc = 0;
time = 0;
timeneeded = 100;
count = 0;
score = 0;
died = false;
onEnterFrame = function () {
score = score + 5;
_root.yPo = _root.player._y;
_root.xPo = _root.player._y;
timeneeded = Math.round(timeneeded);
time++;
if (time == (timeneeded * 0.5)) {
count++;
_root.bc++;
if (_root.bc > 1100) {
_root.bc = 1000;
}
_root.can = 1;
duplicateMovieClip ("bullet1", "b1" + _root.bc, count);
}
if (time == (timeneeded * 1)) {
count++;
_root.bc++;
if (_root.bc > 1100) {
_root.bc = 1000;
}
_root.can = 1;
duplicateMovieClip ("bullet2", "b2" + _root.bc, count);
}
if (time == (timeneeded * 2)) {
count++;
_root.bc++;
if (_root.bc > 1100) {
_root.bc = 1000;
}
_root.can = 3;
duplicateMovieClip ("bullet3", "b3" + _root.bc, count);
}
if (time == (timeneeded * 3)) {
count++;
_root.bc++;
if (_root.bc > 1100) {
_root.bc = 1000;
}
_root.can = 4;
duplicateMovieClip ("bullet4", "b4" + _root.bc, count);
time = 0;
timeneeded = timeneeded - 10;
if (timeneeded < 10) {
timeneeded = timeneeded + 30;
}
}
if (lives == 0) {
lol = 0;
while (lol <= 1000) {
_root["b" + lol].removeMovieClip();
lol++;
}
if (died == false) {
_root.scre = score;
died = true;
}
gotoAndStop (9);
}
};
Instance of Symbol 53 MovieClip "bullet1" in Frame 8
onClipEvent (load) {
if (_name == "bullet1") {
_x = -1000;
}
bn = 0;
spd = Math.random(20) + 10;
b = _root.bc;
thisbc = b;
_x = _root.cannon1._x;
_y = _root.cannon1._y;
if (_x >= _root._xmouse) {
xdif = -(_x - _root._xmouse);
} else {
xdif = -(_root._xmouse - _x);
}
if (_y <= _root._ymouse) {
ydif = -(_y - _root._ymouse);
} else {
ydif = -(_root._ymouse - _y);
}
diff = xdif - ydif;
xspeed = -(spd * (xdif / diff));
yspeed = -(spd * (ydif / diff));
r = _width / 2;
array = new Array(360);
}
onClipEvent (enterFrame) {
if (bn == 1) {
gotoAndStop (9);
}
if (bn == 0) {
gotoAndStop (8);
}
if (_name == "bullet1") {
_x = -1000;
xspeed = 0;
yspeed = 0;
}
onEnterFrame = function () {
if (_y <= 16) {
bn = 0;
yspeed = Math.abs(yspeed);
} else if (_y >= 685) {
bn = 0;
yspeed = -Math.abs(yspeed);
}
if (_x <= 16) {
bn = 0;
xspeed = Math.abs(xspeed);
} else if (_x >= 685) {
bn = 0;
xspeed = -Math.abs(xspeed);
}
strt = 0;
end = 0;
a = 0;
while (a < (thisbc - 1)) {
if (hitTest(_root["b1" + a]) && (bn == 1)) {
removeMovieClip(this);
_root.bg.gotoAndPlay(2);
}
a++;
}
b = thisbc + 1;
while (b < _root.bc) {
if (hitTest(_root["b1" + b]) && (bn == 1)) {
removeMovieClip(this);
_root.bg.gotoAndPlay(2);
}
b++;
}
i = 0;
while (i < 360) {
x = (_x + xspeed) + (r * Math.cos((i / 180) * Math.PI));
y = (_y + yspeed) - (r * Math.sin((i / 180) * Math.PI));
if (_root.player.hitTest(x, y, true)) {
if (_root.player._currentframe == 4) {
_root.player.gotoAndStop(1);
this.swapDepths(9999);
this.removeMovieClip();
_root.score++;
} else if ((_root.player._currentframe >= 1) && (_root.player._currentframe <= 3)) {
_root.player.gotoAndStop(5);
bn = 1;
array[i] = 1;
if (xspeed < 10) {
xspeed = xspeed + (_root.player.ax / 10);
}
if (xspeed > 10) {
xspeed = xspeed - (_root.player.ax / 10);
}
if (yspeed > 10) {
yspeed = yspeed - _root.player.ay;
}
_root.lives--;
}
} else {
array[i] = 0;
}
(((!last) and array[i]) ? ((strt = i)) : 0);
((last and (!array[i])) ? ((end = i)) : 0);
last = array[i];
i = i + 20;
}
((strt > end) ? ((angle = ((strt + end) / 2) + 180)) : ((angle = (strt + end) / 2)));
speed = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
if (strt != end) {
xspeed = (-speed) * Math.sin(((angle + 90) / 180) * Math.PI);
yspeed = (-speed) * Math.cos(((angle + 90) / 180) * Math.PI);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
};
}
Instance of Symbol 54 MovieClip "player" in Frame 8
onClipEvent (enterFrame) {
if (Key.isDown(38)) {
ay = -8;
ax = 0;
} else if (Key.isDown(40)) {
ay = 8;
ax = 0;
} else if (Key.isDown(37)) {
ax = -8;
ay = 0;
} else if (Key.isDown(39)) {
ax = 8;
ay = 0;
}
if (_x <= 10) {
ax = Math.abs(ax);
}
if (_x >= 685) {
ax = -Math.abs(ax);
}
if (_y <= 15) {
ay = Math.abs(ay);
}
if (_y >= 685) {
ay = -Math.abs(ay);
}
this._x = this._x + ax;
this._y = this._y + ay;
}
Instance of Symbol 56 MovieClip "cannon4" in Frame 8
onClipEvent (enterFrame) {
yPo2 = this._y;
xPo2 = this._x;
myRadians = Math.atan2(_root.yPo - yPo2, _root.xPo - xPo2);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_rotation = (myDegrees + 90);
}
Instance of Symbol 57 MovieClip "cannon3" in Frame 8
onClipEvent (enterFrame) {
yPo2 = this._y;
xPo2 = this._x;
myRadians = Math.atan2(_root.yPo - yPo2, _root.xPo - xPo2);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_rotation = (myDegrees + 90);
}
Instance of Symbol 59 MovieClip "cannon1" in Frame 8
onClipEvent (enterFrame) {
yPo2 = this._y;
xPo2 = this._x;
myRadians = Math.atan2(_root.yPo - yPo2, _root.xPo - xPo2);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_rotation = (myDegrees + 90);
}
Instance of Symbol 60 MovieClip "cannon2" in Frame 8
onClipEvent (enterFrame) {
yPo2 = this._y;
xPo2 = this._x;
myRadians = Math.atan2(_root.yPo - yPo2, _root.xPo - xPo2);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_rotation = (myDegrees + 90);
}
Instance of Symbol 65 MovieClip "bullet4" in Frame 8
onClipEvent (load) {
bn = 0;
spd = Math.random(20) + 10;
b = _root.bc;
thisbc = b;
_x = _root.cannon4._x;
_y = _root.cannon4._y;
if (_x >= _root._xmouse) {
xdif = -(_x - _root._xmouse);
} else {
xdif = -(_root._xmouse - _x);
}
if (_y <= _root._ymouse) {
ydif = -(_y - _root._ymouse);
} else {
ydif = -(_root._ymouse - _y);
}
diff = xdif - ydif;
xspeed = -(spd * (xdif / diff));
yspeed = -(spd * (ydif / diff));
r = _width / 2;
array = new Array(360);
}
onClipEvent (enterFrame) {
if (bn == 1) {
gotoAndStop (9);
}
if (bn == 0) {
gotoAndStop (8);
}
if (_name == "bullet4") {
_x = -1000;
xspeed = 0;
yspeed = 0;
}
onEnterFrame = function () {
if (_y <= 16) {
bn = 0;
yspeed = Math.abs(yspeed);
} else if (_y >= 685) {
bn = 0;
yspeed = -Math.abs(yspeed);
}
if (_x <= 16) {
bn = 0;
xspeed = Math.abs(xspeed);
} else if (_x >= 685) {
bn = 0;
xspeed = -Math.abs(xspeed);
}
strt = 0;
end = 0;
a = 0;
while (a < (thisbc - 1)) {
if (hitTest(_root["b4" + a]) && (bn == 1)) {
removeMovieClip(this);
_root.bg.gotoAndPlay(2);
}
a++;
}
b = thisbc + 1;
while (b < _root.bc) {
if (hitTest(_root["b4" + b]) && (bn == 1)) {
removeMovieClip(this);
_root.bg.gotoAndPlay(2);
}
b++;
}
i = 0;
while (i < 360) {
x = (_x + xspeed) + (r * Math.cos((i / 180) * Math.PI));
y = (_y + yspeed) - (r * Math.sin((i / 180) * Math.PI));
if (_root.player.hitTest(x, y, true)) {
if (_root.player._currentframe == 1) {
_root.player.gotoAndStop(3);
this.swapDepths(9999);
this.removeMovieClip();
_root.score++;
} else if ((2 <= _root.player._currentframe) && (4 >= _root.player._currentframe)) {
_root.player.gotoAndStop(5);
array[i] = 1;
if (xspeed < 10) {
xspeed = xspeed + (_root.player.ax / 10);
}
if (xspeed > 10) {
xspeed = xspeed - (_root.player.ax / 10);
}
if (yspeed > 10) {
yspeed = yspeed - _root.player.ay;
}
_root.player.gotoAndStop(5);
_root.lives--;
}
} else {
array[i] = 0;
}
(((!last) and array[i]) ? ((strt = i)) : 0);
((last and (!array[i])) ? ((end = i)) : 0);
last = array[i];
i = i + 20;
}
((strt > end) ? ((angle = ((strt + end) / 2) + 180)) : ((angle = (strt + end) / 2)));
speed = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
if (strt != end) {
xspeed = (-speed) * Math.sin(((angle + 90) / 180) * Math.PI);
yspeed = (-speed) * Math.cos(((angle + 90) / 180) * Math.PI);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
};
}
Instance of Symbol 66 MovieClip "bullet3" in Frame 8
onClipEvent (load) {
bn = 0;
spd = Math.random(20) + 10;
b = _root.bc;
thisbc = b;
_x = _root.cannon3._x;
_y = _root.cannon3._y;
if (_x >= _root._xmouse) {
xdif = -(_x - _root._xmouse);
} else {
xdif = -(_root._xmouse - _x);
}
if (_y <= _root._ymouse) {
ydif = -(_y - _root._ymouse);
} else {
ydif = -(_root._ymouse - _y);
}
diff = xdif - ydif;
xspeed = -(spd * (xdif / diff));
yspeed = -(spd * (ydif / diff));
r = _width / 2;
array = new Array(360);
}
onClipEvent (enterFrame) {
if (bn == 1) {
gotoAndStop (9);
}
if (bn == 0) {
gotoAndStop (8);
}
if (_name == "bullet3") {
_x = -1000;
xspeed = 0;
yspeed = 0;
}
onEnterFrame = function () {
if (_y <= 16) {
bn = 0;
yspeed = Math.abs(yspeed);
} else if (_y >= 685) {
bn = 0;
yspeed = -Math.abs(yspeed);
}
if (_x <= 16) {
bn = 0;
xspeed = Math.abs(xspeed);
} else if (_x >= 685) {
bn = 0;
xspeed = -Math.abs(xspeed);
}
strt = 0;
end = 0;
a = 0;
while (a < (thisbc - 1)) {
if (hitTest(_root["b3" + a]) && (bn == 1)) {
removeMovieClip(this);
_root.bg.gotoAndPlay(2);
}
a++;
}
b = thisbc + 1;
while (b < _root.bc) {
if (hitTest(_root["b3" + b]) && (bn == 1)) {
removeMovieClip(this);
_root.bg.gotoAndPlay(2);
}
b++;
}
i = 0;
while (i < 360) {
x = (_x + xspeed) + (r * Math.cos((i / 180) * Math.PI));
y = (_y + yspeed) - (r * Math.sin((i / 180) * Math.PI));
if (_root.player.hitTest(x, y, true) && (bn == 0)) {
if (_root.player._currentframe == 2) {
_root.player.gotoAndStop(5);
this.swapDepths(9999);
this.removeMovieClip();
_root.score++;
} else if (((_root.player._currentframe == 1) or (_root.player._currentframe == 3)) or (_root.player._currentframe == 4)) {
_root.player.gotoAndStop(5);
bn = 1;
array[i] = 1;
if (xspeed < 10) {
xspeed = xspeed + (_root.player.ax / 10);
}
if (xspeed > 10) {
xspeed = xspeed - (_root.player.ax / 10);
}
if (yspeed > 10) {
yspeed = yspeed - _root.player.ay;
}
_root.lives--;
}
} else {
array[i] = 0;
}
(((!last) and array[i]) ? ((strt = i)) : 0);
((last and (!array[i])) ? ((end = i)) : 0);
last = array[i];
i = i + 20;
}
((strt > end) ? ((angle = ((strt + end) / 2) + 180)) : ((angle = (strt + end) / 2)));
speed = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
if (strt != end) {
xspeed = (-speed) * Math.sin(((angle + 90) / 180) * Math.PI);
yspeed = (-speed) * Math.cos(((angle + 90) / 180) * Math.PI);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
};
}
Instance of Symbol 67 MovieClip "bullet2" in Frame 8
onClipEvent (load) {
bn = 0;
spd = Math.random(20) + 10;
thisbc = _root.bc;
_x = _root.cannon2._x;
_y = _root.cannon2._y;
if (_x >= _root._xmouse) {
xdif = -(_x - _root._xmouse);
} else {
xdif = -(_root._xmouse - _x);
}
if (_y <= _root._ymouse) {
ydif = -(_y - _root._ymouse);
} else {
ydif = -(_root._ymouse - _y);
}
diff = xdif - ydif;
xspeed = -(spd * (xdif / diff));
yspeed = -(spd * (ydif / diff));
r = _width / 2;
array = new Array(360);
}
onClipEvent (enterFrame) {
if (bn == 1) {
gotoAndStop (9);
}
if (bn == 0) {
gotoAndStop (8);
}
if (_name == "bullet2") {
_x = -1000;
xspeed = 0;
yspeed = 0;
}
onEnterFrame = function () {
if (_y <= 16) {
bn = 0;
yspeed = Math.abs(yspeed);
} else if (_y >= 685) {
bn = 0;
yspeed = -Math.abs(yspeed);
}
if (_x <= 16) {
bn = 0;
xspeed = Math.abs(xspeed);
} else if (_x >= 685) {
bn = 0;
xspeed = -Math.abs(xspeed);
}
strt = 0;
end = 0;
a = 0;
while (a < (thisbc - 1)) {
if (hitTest(_root["b2" + a]) && (bn == 1)) {
removeMovieClip(this);
_root.bg.gotoAndPlay(2);
}
a++;
}
b = thisbc + 1;
while (b < _root.bc) {
if (hitTest(_root["b2" + b]) && (bn == 1)) {
removeMovieClip(this);
_root.bg.gotoAndPlay(2);
}
b++;
}
i = 0;
while (i < 360) {
x = (_x + xspeed) + (r * Math.cos((i / 180) * Math.PI));
y = (_y + yspeed) - (r * Math.sin((i / 180) * Math.PI));
if (_root.player.hitTest(x, y, true)) {
if (_root.player._currentframe == 3) {
_root.player.gotoAndStop(2);
this.swapDepths(9999);
this.removeMovieClip();
_root.score++;
} else if ((((_root.player._currentframe == 1) or (_root.player._currentframe == 2)) or (_root.player._currentframe == 5)) or (_root.player._currentframe == 4)) {
_root.player.gotoAndStop(5);
bn = 1;
array[i] = 1;
if (xspeed < 10) {
xspeed = xspeed + (_root.player.ax / 10);
}
if (xspeed > 10) {
xspeed = xspeed - (_root.player.ax / 10);
}
if (yspeed > 10) {
yspeed = yspeed - _root.player.ay;
}
_root.lives--;
}
} else {
array[i] = 0;
}
(((!last) and array[i]) ? ((strt = i)) : 0);
((last and (!array[i])) ? ((end = i)) : 0);
last = array[i];
i = i + 20;
}
((strt > end) ? ((angle = ((strt + end) / 2) + 180)) : ((angle = (strt + end) / 2)));
speed = Math.sqrt((xspeed * xspeed) + (yspeed * yspeed));
if (strt != end) {
xspeed = (-speed) * Math.sin(((angle + 90) / 180) * Math.PI);
yspeed = (-speed) * Math.cos(((angle + 90) / 180) * Math.PI);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
};
}
Frame 9
submitted = false;
Symbol 17 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 42
stop();
_root.play();
Symbol 25 Button
on (release) {
gotoAndStop (5);
}
Symbol 30 Button
on (release) {
gotoAndStop (4);
}
Symbol 36 Button
on (release) {
_root.gotoAndStop("lvl1");
}
Symbol 49 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 1
stop();
Symbol 52 Button
on (release) {
_root.gotoAndStop("lvl2");
}
Symbol 53 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 5
gotoAndStop(random(4) + 1);
Symbol 65 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 80 Button
on (press) {
if (submitted == false) {
ab20_09 = new LoadVars();
ab20_09.z = names;
ab20_09.x = scre;
ab20_09.c = 1198;
ab20_09.v = "MPXYOC";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=1198", "_blank");
submitted = true;
}
}
Symbol 85 Button
on (press) {
_root.scre = 0;
lives = 5;
died = false;
submitted = false;
gotoAndStop (3);
}
Symbol 90 Button
on (press) {
if (submitted == false) {
ab20_09 = new LoadVars();
ab20_09.z = names;
ab20_09.x = scre;
ab20_09.c = 1215;
ab20_09.v = "PAPKVM";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
getURL ("http://www.armorbot.com/mytable/?id=1215", "_blank");
submitted = true;
}
}