Frame 3
var l = _root.getBytesLoaded();
var t = _root.getBytesTotal();
var LT = (l / t);
preloader.line._width = 400 * LT;
var info = (Math.round(LT * 100) + "%");
preloader.infoMC.text = info;
if (LT < 1) {
gotoAndPlay (2);
}
Frame 121
play();
Frame 191
stop();
_root.help._visible = false;
Frame 206
function shoot(bullet) {
ob = enemyArray.length;
while ((--ob) > -1) {
if (bullet.hitTest(enemyArray[ob])) {
enemyArray[ob].life = enemyArray[ob].life - bullet.damage;
if (bullet.weapon == 3) {
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = bullet._x;
eval ("missileblast" + dep)._y = bullet._y;
dep++;
removeMovieClip(bullet);
} else if (bullet.weapon == 4) {
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = bullet._x;
eval ("missileblast" + dep)._y = bullet._y;
dep++;
removeMovieClip(bullet);
} else if (bullet.weapon == 5) {
attachMovie("bombblast", "bombblast" + dep, dep);
mineSound.start(0, 1);
eval ("bombblast" + dep)._xscale = (eval ("bombblast" + dep)._yscale = 20);
eval ("bombblast" + dep)._x = bullet._x;
eval ("bombblast" + dep)._y = bullet._y;
dep++;
removeMovieClip(bullet);
} else {
removeMovieClip(bullet);
}
if (enemyArray[ob].life <= 0) {
score = score + enemyArray[ob].score;
if (enemyArray[ob].k == 2) {
_root["dieSound" + random(2)].start(0, 1);
enemyArray[ob].gotoAndStop(1);
enemyArray[ob]._rotation = enemyArray[ob]._rotation + 90;
enemyArray[ob].onEnterFrame = function () {
this._y = this._y + 10;
if (this._y >= 364) {
this._rotation = this._rotation - 90;
this._y = 374;
this.gotoAndStop(5);
delete this.onEnterFrame;
}
};
} else if (enemyArray[ob].k == 3) {
attachMovie("pblast", "pblast" + dep, dep);
blastSound.start(0, 1);
eval ("pblast" + dep)._xscale = (eval ("pblast" + dep)._yscale = 50);
eval ("pblast" + dep)._x = enemyArray[ob]._x;
eval ("pblast" + dep)._y = enemyArray[ob]._y;
dep++;
enemyArray[ob].gotoAndPlay(2);
} else {
_root["dieSound" + random(2)].start(0, 1);
delete enemyArray[ob].onEnterFrame;
enemyArray[ob].gotoAndStop(random(2) + 3);
}
setLevel();
temp = enemyArray[ob].va;
enemyArray.splice(enemyArray[ob].va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
}
}
}
}
function setLevel() {
if ((level == 1) && (score >= 100)) {
level = 2;
ShowLevel();
}
if ((level == 2) && (score >= 200)) {
level = 3;
ShowLevel();
}
if ((level == 3) && (score >= 300)) {
level = 4;
ShowLevel();
clearInterval(carptimer);
delete carp.man;
carp.gotoAndStop(1);
carpout();
callfbi();
enemykind = 2;
}
if ((level == 4) && (score >= 500)) {
level = 5;
ShowLevel();
}
if ((level == 5) && (score >= 800)) {
level = 6;
ShowLevel();
}
if ((level == 6) && (score >= 1200)) {
level = 7;
ShowLevel();
clearInterval(carftimer);
delete carf.man;
carf.gotoAndStop(1);
carfout();
callfh();
enemykind = 3;
}
if ((level == 7) && (score >= 1800)) {
level = 8;
ShowLevel();
}
if ((level == 8) && (score >= 2500)) {
level = 9;
ShowLevel();
}
}
function tossBomb() {
arg = ((90 - r) * Math.PI) / 180;
if (bombw && (bomb > 0)) {
bombw = false;
bombtimer = setInterval(bombfire, 500);
bomb--;
attachMovie("grenade", "grenade" + dep, dep);
eval ("grenade" + dep).damage = 20;
eval ("grenade" + dep).weapon = 5;
eval ("grenade" + dep)._x = man._x;
eval ("grenade" + dep)._y = man._y;
eval ("grenade" + dep)._rotation = r;
eval ("grenade" + dep).xinc = Math.sin(arg) * 8;
eval ("grenade" + dep).yinc = Math.cos(arg) * 8;
eval ("grenade" + dep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
this.yinc = this.yinc + 0.3;
shoot(this);
if (this._y > 380) {
attachMovie("bombblast", "bombblast" + dep, dep);
mineSound.start(0, 1);
eval ("bombblast" + dep)._xscale = (eval ("bombblast" + dep)._yscale = 20);
eval ("bombblast" + dep)._x = this._x;
eval ("bombblast" + dep)._y = this._y - 10;
removeMovieClip(this);
}
if (((this._x > 700) || (this._x < 0)) || (this._y < 0)) {
removeMovieClip(this);
}
};
dep++;
}
}
function w1fire() {
clearInterval(weapon1timer);
weapon1 = true;
}
function w3fire() {
clearInterval(weapon3timer);
weapon3 = true;
}
function w4fire() {
clearInterval(weapon4timer);
weapon4 = true;
}
function bombfire() {
clearInterval(bombtimer);
bombw = true;
}
function setEnemy() {
clearInterval(enemytimer);
enemytimer = setInterval(setEnemy, 2000);
j = random(5);
if (j == 4) {
k = enemykind - 1;
if (k == 0) {
attachMovie("enemy" + k, "enemy" + edep, edep);
enemyArray.push(eval ("enemy" + edep));
eval ("enemy" + edep)._xscale = (eval ("enemy" + edep)._yscale = 50);
eval ("enemy" + edep).k = 0;
eval ("enemy" + edep).va = enemyArray.length - 1;
eval ("enemy" + edep).life = 4;
eval ("enemy" + edep).score = 10;
eval ("enemy" + edep)._x = (random(2) ? 720 : -20);
eval ("enemy" + edep)._y = 364;
eval ("enemy" + edep).Move = true;
if (eval ("enemy" + edep)._x == 720) {
eval ("enemy" + edep)._xscale = -50;
eval ("enemy" + edep).dir = "left";
eval ("enemy" + edep).x = -2;
} else {
eval ("enemy" + edep).dir = "right";
eval ("enemy" + edep).x = 2;
}
eval ("enemy" + edep).onEnterFrame = function () {
if (man._x > this._x) {
this._xscale = 50;
this.dir = "right";
this.x = 2;
} else {
this._xscale = -50;
this.dir = "left";
this.x = -2;
}
if (this.ft == undefined) {
this.f = random(60) + 60;
this.ft = 0;
}
this.ft++;
if ((this.ft == this.f) && (((man._x > this._x) && (this.dir == "right")) || ((man._x < this._x) && (this.dir == "left")))) {
this.Move = false;
this.gotoAndStop(2);
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
this.arg = ((90 - this.er) * Math.PI) / 180;
attachMovie("bullet0", "bullet" + ebdep, ebdep);
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = this.er;
eval ("bullet" + ebdep).xinc = Math.sin(this.arg) * 4;
eval ("bullet" + ebdep).yinc = Math.cos(this.arg) * 4;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
ebdep++;
}
if (this.Move) {
this._x = this._x + this.x;
}
if ((this._x > 750) || (this._x < -50)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
};
}
if (k == 1) {
attachMovie("enemy" + k, "enemy" + edep, edep);
enemyArray.push(eval ("enemy" + edep));
eval ("enemy" + edep)._xscale = (eval ("enemy" + edep)._yscale = 50);
eval ("enemy" + edep).k = 1;
eval ("enemy" + edep).va = enemyArray.length - 1;
eval ("enemy" + edep).life = 6;
eval ("enemy" + edep).score = 15;
eval ("enemy" + edep)._x = (random(2) ? 720 : -20);
eval ("enemy" + edep)._y = 364;
eval ("enemy" + edep).Move = true;
if (eval ("enemy" + edep)._x == 720) {
eval ("enemy" + edep)._xscale = -50;
eval ("enemy" + edep).dir = "left";
eval ("enemy" + edep).x = -2;
} else {
eval ("enemy" + edep).dir = "right";
eval ("enemy" + edep).x = 2;
}
eval ("enemy" + edep).onEnterFrame = function () {
if (man._x > this._x) {
this._xscale = 50;
this.dir = "right";
this.x = 2;
} else {
this._xscale = -50;
this.dir = "left";
this.x = -2;
}
if (this.ft == undefined) {
this.f = random(60) + 60;
this.ft = 0;
}
this.ft++;
if ((this.ft == this.f) && (((man._x > this._x) && (this.dir == "right")) || ((man._x < this._x) && (this.dir == "left")))) {
this.Move = false;
this.gotoAndStop(2);
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
s = this.er - 10;
while (s <= (this.er + 10)) {
attachMovie("bullet0", "bullet" + ebdep, ebdep);
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = s;
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep).arg = ((90 - s) / 180) * Math.PI;
eval ("bullet" + ebdep).xinc = Math.sin(eval ("bullet" + ebdep).arg) * 4;
eval ("bullet" + ebdep).yinc = Math.cos(eval ("bullet" + ebdep).arg) * 4;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
ebdep++;
s = s + 10;
}
}
if (this.Move) {
this._x = this._x + this.x;
}
if ((this._x > 750) || (this._x < -50)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
};
}
if (k == 2) {
attachMovie("enemy" + k, "enemy" + edep, edep);
enemyArray.push(eval ("enemy" + edep));
eval ("enemy" + edep)._xscale = (eval ("enemy" + edep)._yscale = 50);
eval ("enemy" + edep).k = 2;
eval ("enemy" + edep).va = enemyArray.length - 1;
eval ("enemy" + edep).life = 6;
eval ("enemy" + edep).score = 20;
eval ("enemy" + edep).gotoAndStop(6);
eval ("enemy" + edep)._x = random(550) + 75;
eval ("enemy" + edep)._y = -30;
eval ("enemy" + edep).drop = true;
eval ("enemy" + edep).y = 2;
eval ("enemy" + edep).onEnterFrame = function () {
if (this.ft == undefined) {
this.f = random(50) + 40;
this.ft = 0;
}
this.ft++;
if (this.drop) {
this._y = this._y + this.y;
if (man._x > this._x) {
this._xscale = 50;
this.dir = "right";
this.x = 2;
} else {
this._xscale = -50;
this.dir = "left";
this.x = -2;
}
if (this.ft == this.f) {
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
this.arg = ((90 - this.er) * Math.PI) / 180;
attachMovie("bullet0", "bullet" + ebdep, ebdep);
this.ft = undefined;
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = this.er;
eval ("bullet" + ebdep).xinc = Math.sin(this.arg) * 5;
eval ("bullet" + ebdep).yinc = Math.cos(this.arg) * 5;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
ebdep++;
}
if (this._y >= 364) {
this._y = 364;
this.Move = true;
this.gotoAndStop(1);
this.drop = false;
}
} else {
if (man._x > this._x) {
this._xscale = 50;
this.dir = "right";
this.x = 2;
} else {
this._xscale = -50;
this.dir = "left";
this.x = -2;
}
if (this.Move) {
this._x = this._x + this.x;
}
if ((this.ft == this.f) && (((man._x > this._x) && (this.dir == "right")) || ((man._x < this._x) && (this.dir == "left")))) {
this.Move = false;
this.gotoAndStop(2);
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
this.arg = ((90 - this.er) * Math.PI) / 180;
attachMovie("bullet0", "bullet" + ebdep, ebdep);
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = this.er;
eval ("bullet" + ebdep).xinc = Math.sin(this.arg) * 4;
eval ("bullet" + ebdep).yinc = Math.cos(this.arg) * 4;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
ebdep++;
}
if ((this._x > 750) || (this._x < -50)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
}
};
}
edep++;
}
}
function setCopter() {
clearInterval(coptertimer);
coptertimer = setInterval(setCopter, 8000);
j = random(2);
if (j == 1) {
k = enemykind - 1;
attachMovie("copter" + k, "copter" + edep, edep);
enemyArray.push(eval ("copter" + edep));
eval ("copter" + edep).k = 3;
eval ("copter" + edep).va = enemyArray.length - 1;
eval ("copter" + edep).life = 30;
eval ("copter" + edep).score = 50;
eval ("copter" + edep)._x = (random(2) ? 800 : -100);
eval ("copter" + edep)._y = random(40) + 40;
if (eval ("copter" + edep)._x == 800) {
eval ("copter" + edep).dir = "left";
eval ("copter" + edep).x = -2.5;
} else {
eval ("copter" + edep)._xscale = -100;
eval ("copter" + edep).dir = "right";
eval ("copter" + edep).x = 2;
}
if (k == 0) {
eval ("copter" + edep).onEnterFrame = function () {
this._x = this._x + this.x;
if (this.ft == undefined) {
this.f = random(70) + 70;
this.ft = 0;
}
this.ft++;
if (this.ft == this.f) {
this.ft = undefined;
attachMovie("bomberb", "bomberb" + ebdep, ebdep);
if (this.dir == "left") {
eval ("bomberb" + ebdep)._xscale = -100;
eval ("bomberb" + ebdep).x = -8;
} else {
eval ("bomberb" + ebdep).x = 8;
}
eval ("bomberb" + ebdep)._x = this._x;
eval ("bomberb" + ebdep)._y = this._y;
eval ("bomberb" + ebdep).px = man._x - eval ("bomberb" + ebdep)._x;
eval ("bomberb" + ebdep).py = man._y - eval ("bomberb" + ebdep)._y;
eval ("bomberb" + ebdep).p = man._y;
if (this.dir == "left") {
eval ("bomberb" + ebdep)._rotation = 180 + ((Math.atan2(eval ("bomberb" + ebdep).py, eval ("bomberb" + ebdep).px) * 180) / Math.PI);
eval ("bomberb" + ebdep).arg = ((270 + eval ("bomberb" + ebdep)._rotation) * Math.PI) / 180;
} else {
eval ("bomberb" + ebdep)._rotation = (Math.atan2(eval ("bomberb" + ebdep).py, eval ("bomberb" + ebdep).px) * 180) / Math.PI;
eval ("bomberb" + ebdep).arg = ((90 + eval ("bomberb" + ebdep)._rotation) * Math.PI) / 180;
}
eval ("bomberb" + ebdep).damage = 10;
eval ("bomberb" + ebdep).xinc = Math.sin(eval ("bomberb" + ebdep).arg) * 8;
eval ("bomberb" + ebdep).yinc = (-Math.cos(eval ("bomberb" + ebdep).arg)) * 8;
eval ("bomberb" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = this._x;
eval ("missileblast" + dep)._y = this._y + 10;
dep++;
removeMovieClip(this);
}
hitEnemy(this);
if (this._y > 364) {
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = this._x;
eval ("missileblast" + dep)._y = this._y + 10;
dep++;
removeMovieClip(this);
}
};
ebdep++;
}
if ((this._x > 850) || (this._x < -150)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
};
}
if (k == 1) {
eval ("copter" + edep).onEnterFrame = function () {
this._x = this._x + this.x;
if (this.ft == undefined) {
this.f = random(70) + 70;
this.ft = 0;
}
if (this.ft1 == undefined) {
this.f1 = 60;
this.ft1 = 0;
}
this.ft++;
this.ft1++;
if (this.ft1 == this.f1) {
this.ft1 = undefined;
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
this.arg = ((90 + this.er) * Math.PI) / 180;
attachMovie("bullet0", "bullet" + ebdep, ebdep);
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = this.er;
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep).xinc = Math.sin(this.arg) * 6;
eval ("bullet" + ebdep).yinc = (-Math.cos(this.arg)) * 6;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if (this._y > 364) {
removeMovieClip(this);
}
};
ebdep++;
}
if (this.ft == this.f) {
this.ft = undefined;
attachMovie("bomberb", "bomberb" + ebdep, ebdep);
if (this.dir == "left") {
eval ("bomberb" + ebdep)._xscale = -100;
eval ("bomberb" + ebdep).x = -8;
} else {
eval ("bomberb" + ebdep).x = 8;
}
eval ("bomberb" + ebdep)._x = this._x;
eval ("bomberb" + ebdep)._y = this._y;
eval ("bomberb" + ebdep).px = man._x - eval ("bomberb" + ebdep)._x;
eval ("bomberb" + ebdep).py = man._y - eval ("bomberb" + ebdep)._y;
eval ("bomberb" + ebdep).p = man._y;
if (this.dir == "left") {
eval ("bomberb" + ebdep)._rotation = 180 + ((Math.atan2(eval ("bomberb" + ebdep).py, eval ("bomberb" + ebdep).px) * 180) / Math.PI);
eval ("bomberb" + ebdep).arg = ((270 + eval ("bomberb" + ebdep)._rotation) * Math.PI) / 180;
} else {
eval ("bomberb" + ebdep)._rotation = (Math.atan2(eval ("bomberb" + ebdep).py, eval ("bomberb" + ebdep).px) * 180) / Math.PI;
eval ("bomberb" + ebdep).arg = ((90 + eval ("bomberb" + ebdep)._rotation) * Math.PI) / 180;
}
eval ("bomberb" + ebdep).damage = 10;
eval ("bomberb" + ebdep).xinc = Math.sin(eval ("bomberb" + ebdep).arg) * 8;
eval ("bomberb" + ebdep).yinc = (-Math.cos(eval ("bomberb" + ebdep).arg)) * 8;
eval ("bomberb" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = this._x;
eval ("missileblast" + dep)._y = this._y + 10;
dep++;
removeMovieClip(this);
}
hitEnemy(this);
if (this._y > 364) {
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = this._x;
eval ("missileblast" + dep)._y = this._y + 10;
dep++;
removeMovieClip(this);
}
};
ebdep++;
}
if ((this._x > 850) || (this._x < -150)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
};
}
if (k == 2) {
eval ("copter" + edep).onEnterFrame = function () {
this._x = this._x + this.x;
if (this.ft == undefined) {
this.f = random(70) + 70;
this.ft = 0;
}
if (this.ft1 == undefined) {
this.f1 = 50;
this.ft1 = 0;
}
this.ft++;
this.ft1++;
if (this.ft1 == this.f1) {
this.ft1 = undefined;
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
this.arg = ((90 + this.er) * Math.PI) / 180;
s = this.er - 10;
while (s <= (this.er + 10)) {
attachMovie("bullet0", "bullet" + ebdep, ebdep);
eval ("bullet" + ebdep).arg = ((90 + s) / 180) * Math.PI;
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = s;
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep).xinc = Math.sin(eval ("bullet" + ebdep).arg) * 6;
eval ("bullet" + ebdep).yinc = (-Math.cos(eval ("bullet" + ebdep).arg)) * 6;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if (this._y > 364) {
removeMovieClip(this);
}
};
ebdep++;
s = s + 10;
}
}
if (this.ft == this.f) {
this.ft = undefined;
attachMovie("bomberb", "bomberb" + ebdep, ebdep);
if (this.dir == "left") {
eval ("bomberb" + ebdep)._xscale = -100;
eval ("bomberb" + ebdep).x = -8;
} else {
eval ("bomberb" + ebdep).x = 8;
}
eval ("bomberb" + ebdep)._x = this._x;
eval ("bomberb" + ebdep)._y = this._y;
eval ("bomberb" + ebdep).px = man._x - eval ("bomberb" + ebdep)._x;
eval ("bomberb" + ebdep).py = man._y - eval ("bomberb" + ebdep)._y;
eval ("bomberb" + ebdep).p = man._y;
if (this.dir == "left") {
eval ("bomberb" + ebdep)._rotation = 180 + ((Math.atan2(eval ("bomberb" + ebdep).py, eval ("bomberb" + ebdep).px) * 180) / Math.PI);
eval ("bomberb" + ebdep).arg = ((270 + eval ("bomberb" + ebdep)._rotation) * Math.PI) / 180;
} else {
eval ("bomberb" + ebdep)._rotation = (Math.atan2(eval ("bomberb" + ebdep).py, eval ("bomberb" + ebdep).px) * 180) / Math.PI;
eval ("bomberb" + ebdep).arg = ((90 + eval ("bomberb" + ebdep)._rotation) * Math.PI) / 180;
}
eval ("bomberb" + ebdep).damage = 10;
eval ("bomberb" + ebdep).xinc = Math.sin(eval ("bomberb" + ebdep).arg) * 8;
eval ("bomberb" + ebdep).yinc = (-Math.cos(eval ("bomberb" + ebdep).arg)) * 8;
eval ("bomberb" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
mineSound.start(0, 1);
attachMovie("missileblast", "missileblast" + dep, dep);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = this._x;
eval ("missileblast" + dep)._y = this._y + 10;
dep++;
removeMovieClip(this);
}
hitEnemy(this);
if (this._y > 364) {
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = this._x;
eval ("missileblast" + dep)._y = this._y + 10;
removeMovieClip(this);
}
};
ebdep++;
}
if ((this._x > 850) || (this._x < -150)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
};
}
edep++;
}
}
function setItem() {
clearInterval(itemtimer);
itemtimer = setInterval(setItem, 15000);
j = random(3);
if (j == 2) {
k = random(6);
attachMovie("item" + k, "item" + edep, edep);
itemArray.push(eval ("item" + edep));
eval ("item" + edep)._x = random(600) + 50;
eval ("item" + edep)._y = -20;
eval ("item" + edep).y = 2;
eval ("item" + edep).va = k;
eval ("item" + edep).onEnterFrame = function () {
this._y = this._y + this.y;
if (this._y > 364) {
this.y = 0;
this.gotoAndStop(2);
this._y = 354;
}
if (this.hitTest(topb0)) {
this.y = 0;
this.gotoAndStop(2);
}
if (this.hitTest(topb1)) {
this.y = 0;
this.gotoAndStop(2);
}
if (this.hitTest(topb2)) {
this.y = 0;
this.gotoAndStop(2);
}
if (this.hitTest(man)) {
itemSound.start(0, 1);
if (this.va == 0) {
gun1 = gun1 + 50;
} else if (this.va == 1) {
gun2 = gun2 + 50;
} else if (this.va == 2) {
gun3 = gun3 + 10;
} else if (this.va == 3) {
gun4 = gun4 + 10;
} else if (this.va == 4) {
bomb = bomb + 10;
} else if (this.va == 5) {
life = life + 20;
if (life >= 100) {
life = 100;
}
}
removeMovieClip(this);
}
};
edep++;
}
}
function isLost() {
if (life <= 0) {
life = 0;
man.gotoAndStop(4);
backSound.stop();
loseSound.start(0, 1);
delete man.onEnterFrame;
Key.removeListener(_root);
Mouse.show();
removeMovieClip(aim);
al = enemyArray.length;
i = 0;
while (i < al) {
removeMovieClip(enemyArray[i]);
i++;
}
il = itemArray.length;
j = 0;
while (j < il) {
removeMovieClip(itemArray[j]);
j++;
}
k = 0;
while (k < 30) {
removeMovieClip(_root["bullet" + (ebdep - k)]);
removeMovieClip(_root["bullet" + (dep - k)]);
k++;
}
delete onMouseDown;
delete onMouseUp;
clearInterval(enemytimer);
clearInterval(coptertimer);
clearInterval(itemtimer);
gotoAndStop (207);
}
}
function callpolice() {
carp.onEnterFrame = function () {
this._x = this._x + 8;
if (this._x >= 80) {
this._x = 80;
callcarp();
}
};
}
function callcarp() {
clearInterval(carptimer);
carp.gotoAndPlay(2);
carp.onEnterFrame = function () {
if (this.man) {
carptimer = setInterval(callcarp, 8000);
i = 0;
while (i < 2) {
attachMovie("enemy0", "enemy" + edep, edep);
enemyArray.push(eval ("enemy" + edep));
eval ("enemy" + edep)._xscale = (eval ("enemy" + edep)._yscale = 50);
eval ("enemy" + edep).k = 0;
eval ("enemy" + edep).va = enemyArray.length - 1;
eval ("enemy" + edep).life = 4;
eval ("enemy" + edep).score = 10;
eval ("enemy" + edep)._x = 60 + (i * 30);
eval ("enemy" + edep)._y = 364;
eval ("enemy" + edep).Move = true;
eval ("enemy" + edep).dir = "right";
eval ("enemy" + edep).x = 2;
eval ("enemy" + edep).onEnterFrame = function () {
if (man._x > this._x) {
this._xscale = 50;
this.dir = "right";
this.x = 2;
} else {
this._xscale = -50;
this.dir = "left";
this.x = -2;
}
if (this.ft == undefined) {
this.f = random(60) + 60;
this.ft = 0;
}
this.ft++;
if ((this.ft == this.f) && (((man._x > this._x) && (this.dir == "right")) || ((man._x < this._x) && (this.dir == "left")))) {
this.Move = false;
this.gotoAndStop(2);
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
this.arg = ((90 - this.er) * Math.PI) / 180;
attachMovie("bullet0", "bullet" + ebdep, ebdep);
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = this.er;
eval ("bullet" + ebdep).xinc = Math.sin(this.arg) * 4;
eval ("bullet" + ebdep).yinc = Math.cos(this.arg) * 4;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
ebdep++;
}
if (this.Move) {
this._x = this._x + this.x;
}
if ((this._x > 750) || (this._x < -50)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
};
edep++;
i++;
}
delete this.onEnterFrame;
}
};
}
function carpout() {
carp.onEnterFrame = function () {
this._x = this._x - 8;
if (this._x <= -80) {
this._x = -80;
this.swapDepths(33000);
removeMovieClip(this);
}
};
}
function callfbi() {
carf.onEnterFrame = function () {
this._x = this._x + 8;
if (this._x >= 80) {
this._x = 80;
callcarf();
}
};
}
function callcarf() {
clearInterval(carftimer);
carf.gotoAndPlay(2);
carf.onEnterFrame = function () {
if (this.man) {
carftimer = setInterval(callcarf, 8000);
attachMovie("enemy1", "enemy" + edep, edep);
enemyArray.push(eval ("enemy" + edep));
eval ("enemy" + edep)._xscale = (eval ("enemy" + edep)._yscale = 50);
eval ("enemy" + edep).k = 1;
eval ("enemy" + edep).va = enemyArray.length - 1;
eval ("enemy" + edep).life = 6;
eval ("enemy" + edep).score = 15;
eval ("enemy" + edep)._x = 65;
eval ("enemy" + edep)._y = 364;
eval ("enemy" + edep).Move = true;
eval ("enemy" + edep).dir = "right";
eval ("enemy" + edep).x = 2;
eval ("enemy" + edep).onEnterFrame = function () {
if (man._x > this._x) {
this._xscale = 50;
this.dir = "right";
this.x = 2;
} else {
this._xscale = -50;
this.dir = "left";
this.x = -2;
}
if (this.ft == undefined) {
this.f = random(60) + 60;
this.ft = 0;
}
this.ft++;
if ((this.ft == this.f) && (((man._x > this._x) && (this.dir == "right")) || ((man._x < this._x) && (this.dir == "left")))) {
this.Move = false;
this.gotoAndStop(2);
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
s = this.er - 10;
while (s <= (this.er + 10)) {
attachMovie("bullet0", "bullet" + ebdep, ebdep);
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = s;
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep).arg = ((90 - s) / 180) * Math.PI;
eval ("bullet" + ebdep).xinc = Math.sin(eval ("bullet" + ebdep).arg) * 4;
eval ("bullet" + ebdep).yinc = Math.cos(eval ("bullet" + ebdep).arg) * 4;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
ebdep++;
s = s + 10;
}
}
if (this.Move) {
this._x = this._x + this.x;
}
if ((this._x > 750) || (this._x < -50)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
};
edep++;
delete this.onEnterFrame;
}
};
}
function carfout() {
carf.onEnterFrame = function () {
this._x = this._x - 8;
if (this._x <= -80) {
this._x = -80;
this.swapDepths(33000);
removeMovieClip(this);
}
};
}
function callfh() {
carfh.onEnterFrame = function () {
this._x = this._x + 8;
if (this._x >= 150) {
this._x = 150;
callcarfh();
}
};
}
function callcarfh() {
clearInterval(carfhtimer);
carfh.gotoAndPlay(2);
carfh.onEnterFrame = function () {
if (this.man) {
carfhtimer = setInterval(callcarfh, 8000);
attachMovie("enemy2", "enemy" + edep, edep);
enemyArray.push(eval ("enemy" + edep));
eval ("enemy" + edep)._xscale = (eval ("enemy" + edep)._yscale = 50);
eval ("enemy" + edep).k = 2;
eval ("enemy" + edep).va = enemyArray.length - 1;
eval ("enemy" + edep).life = 6;
eval ("enemy" + edep).score = 20;
eval ("enemy" + edep)._x = 40;
eval ("enemy" + edep)._y = 364;
eval ("enemy" + edep).x = 2;
eval ("enemy" + edep).dir = "right";
eval ("enemy" + edep).Move = true;
eval ("enemy" + edep).onEnterFrame = function () {
if (man._x > this._x) {
this._xscale = 50;
this.dir = "right";
this.x = 2;
} else {
this._xscale = -50;
this.dir = "left";
this.x = -2;
}
if (this.ft == undefined) {
this.f = random(50) + 50;
this.ft = 0;
}
this.ft++;
if (this.Move) {
this._x = this._x + this.x;
}
if ((this.ft == this.f) && (((man._x > this._x) && (this.dir == "right")) || ((man._x < this._x) && (this.dir == "left")))) {
this.Move = false;
this.gotoAndStop(2);
this.ex = man._x - this._x;
this.ey = man._y - this._y;
this.er = (Math.atan2(this.ey, this.ex) * 180) / Math.PI;
this.arg = ((90 - this.er) * Math.PI) / 180;
attachMovie("bullet0", "bullet" + ebdep, ebdep);
eval ("bullet" + ebdep).damage = 5;
eval ("bullet" + ebdep)._x = this._x;
eval ("bullet" + ebdep)._y = this._y;
eval ("bullet" + ebdep)._rotation = this.er;
eval ("bullet" + ebdep).xinc = Math.sin(this.arg) * 4;
eval ("bullet" + ebdep).yinc = Math.cos(this.arg) * 4;
eval ("bullet" + ebdep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
if (this.hitTest(man)) {
life = life - this.damage;
isLost();
removeMovieClip(this);
}
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
ebdep++;
}
if ((this._x > 750) || (this._x < -50)) {
temp = this.va;
enemyArray.splice(this.va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(this);
}
};
edep++;
delete this.onEnterFrame;
}
};
}
function carfhout() {
carfh.onEnterFrame = function () {
this._x = this._x - 8;
if (this._x <= -180) {
this._x = -180;
this.swapDepths(33000);
removeMovieClip(this);
}
};
}
function ShowLevel() {
attachMovie("showlevel", "showl", 40000);
showl._x = 350;
showl._y = 200;
showl.level = level;
removetimer = setInterval(removeSl, 2500);
}
function removeSl() {
clearInterval(removetimer);
removeMovieClip(showl);
}
function hitEnemy(bullet) {
eb = enemyArray.length;
while ((--eb) > -1) {
if (bullet.hitTest(enemyArray[eb]) && (enemyArray[eb].k != 3)) {
mineSound.start(0, 1);
attachMovie("missileblast", "missileblast" + dep, dep);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = bullet._x;
eval ("missileblast" + dep)._y = bullet._y + 10;
dep++;
if (enemyArray[eb].k == 2) {
_root["dieSound" + random(2)].start(0, 1);
enemyArray[eb].gotoAndStop(1);
enemyArray[eb]._rotation = enemyArray[eb]._rotation + 90;
enemyArray[eb].onEnterFrame = function () {
this._y = this._y + 10;
if (this._y >= 364) {
this._rotation = this._rotation - 90;
this._y = 374;
this.gotoAndStop(5);
delete this.onEnterFrame;
}
};
} else {
_root["dieSound" + random(2)].start(0, 1);
delete enemyArray[eb].onEnterFrame;
enemyArray[eb].gotoAndStop(random(2) + 3);
}
temp = enemyArray[eb].va;
enemyArray.splice(enemyArray[eb].va, 1);
el = enemyArray.length;
i = 0;
while (i < el) {
if (i >= temp) {
enemyArray[i].va = enemyArray[i].va - 1;
}
i++;
}
removeMovieClip(bullet);
}
}
}
stop();
dep = 0;
level = 1;
score = 0;
jumptimes = 0;
manControl = true;
weapon = 1;
weapon1 = true;
bombw = true;
life = 100;
gun1 = 100;
gun2 = 200;
gun3 = 30;
gun4 = 20;
bomb = 20;
Mouse.hide();
attachMovie("aim", "aim", 10000);
aim._xscale = (aim._yscale = 50);
blastSound = new Sound();
blastSound.attachSound("blastSound");
mineSound = new Sound();
mineSound.attachSound("mineSound");
bulletSound = new Sound();
bulletSound.attachSound("bulletSound");
itemSound = new Sound();
itemSound.attachSound("itemSound");
loseSound = new Sound();
loseSound.attachSound("sound10.mp3");
dieSound0 = new Sound();
dieSound0.attachSound("sound14.mp3");
dieSound1 = new Sound();
dieSound1.attachSound("sound49.mp3");
mgunSound = new Sound();
mgunSound.attachSound("sound29.mp3");
w3Sound = new Sound();
w3Sound.attachSound("w3Sound");
w4Sound = new Sound();
w4Sound.attachSound("w4Sound");
backSound = new Sound();
backSound.attachSound("backSound");
backSound.start(0, 999);
man.onEnterFrame = function () {
aim._x = _xmouse;
aim._y = _ymouse;
if (manControl) {
this.xmin = this.getBounds(_root).xMin;
this.xmax = this.getBounds(_root).xMax;
this.ymin = this.getBounds(_root).yMin;
this.ymax = this.getBounds(_root).yMax;
x = _xmouse - this._x;
y = _ymouse - this._y;
r = (Math.atan2(y, x) * 180) / Math.PI;
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
if (_xmouse > this._x) {
this._xscale = 50;
this.gun._rotation = r;
} else {
this._xscale = -50;
this.gun._rotation = 180 - r;
}
if (Key.isDown(65) && (!KeyCtrl)) {
if (!jump) {
if (((this.xmax < (topb0Bounds.xMin + (this._width / 2))) && (this.ymax < (topb0Bounds.yMin + 5))) && (this.hitTest(topb0))) {
jump = true;
jumptimes = 2;
drop = true;
yspeed = -10;
}
if (((this.xmax < (topb1Bounds.xMin + (this._width / 2))) && (this.ymax < (topb1Bounds.yMin + 5))) && (this.hitTest(topb1))) {
jump = true;
jumptimes = 2;
drop = true;
yspeed = -10;
}
if (this.hitTest(topb2)) {
if ((this.xmax < (topb2Bounds.xMin + (this._width / 2))) && (this.ymax < (topb2Bounds.yMin + 5))) {
jump = true;
jumptimes = 2;
drop = true;
yspeed = -10;
}
}
this.gotoAndStop(3);
}
this._x = this._x - 4;
KeyA = true;
} else {
KeyA = false;
}
if (Key.isDown(68) && (!KeyCtrl)) {
if (!jump) {
if (((this.xmin > (topb0Bounds.xMax - (this._width / 2))) && (this.ymax < (topb0Bounds.yMin + 5))) && (this.hitTest(topb0))) {
jump = true;
jumptimes = 2;
drop = true;
yspeed = -10;
}
if (((this.xmin > (topb1Bounds.xMax - (this._width / 2))) && (this.ymax < (topb1Bounds.yMin + 5))) && (this.hitTest(topb1))) {
jump = true;
jumptimes = 2;
drop = true;
yspeed = -10;
}
if (((this.xmin > (topb2Bounds.xMax - (this._width / 2))) && (this.ymax < (topb2Bounds.yMin + 5))) && (this.hitTest(topb2))) {
jump = true;
jumptimes = 2;
drop = true;
yspeed = -10;
}
this.gotoAndStop(3);
}
this._x = this._x + 4;
KeyD = true;
} else {
KeyD = false;
}
if (Key.isDown(17) && (!jump)) {
this.gotoAndStop(2);
KeyCtrl = true;
} else {
KeyCtrl = false;
}
if (Key.isDown(87)) {
if ((jumptimes < 2) && (jt == undefined)) {
this.gotoAndStop(5);
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
jt = 1;
jumptimes++;
jump = true;
yspeed = 10;
maxfall = -10;
}
}
if (Key.isDown(69) || (Key.isDown(83))) {
if ((((this._x > (stair0._x - 5)) && (this._x < (stair0._x + 5))) && (this.ymax > stair0Bounds.yMin)) && (this.ymin < stair0Bounds.yMax)) {
jump = false;
this.gotoAndStop(1);
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
climb = true;
}
if ((((this._x > (stair1._x - 5)) && (this._x < (stair1._x + 5))) && (this.ymax > stair1Bounds.yMin)) && (this.ymin < stair1Bounds.yMax)) {
jump = false;
this.gotoAndStop(1);
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
climb = true;
}
if ((((this._x > (stair2._x - 5)) && (this._x < (stair2._x + 5))) && (this.ymax > stair2Bounds.yMin)) && (this.ymin < stair2Bounds.yMax)) {
jump = false;
this.gotoAndStop(1);
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
climb = true;
}
}
if (climb) {
if (this.hitTest(stair0)) {
if ((((this._x > (stair0._x - 5)) && (this._x < (stair0._x + 5))) && (this.ymax > (stair0Bounds.yMin + 2))) && (this.ymin < stair0Bounds.yMax)) {
if (Key.isDown(69)) {
this._y = this._y - 2;
} else if (Key.isDown(83)) {
this._y = this._y + 2;
} else {
yspeed = -10;
jump = true;
jumptimes = 2;
drop = true;
climb = false;
}
} else {
yspeed = -10;
jump = true;
jumptimes = 2;
drop = true;
climb = false;
}
}
if (this.hitTest(stair1)) {
if ((((this._x > (stair1._x - 5)) && (this._x < (stair1._x + 5))) && (this.ymax > (stair1Bounds.yMin + 2))) && (this.ymin < stair1Bounds.yMax)) {
if (Key.isDown(69)) {
this._y = this._y - 2;
} else if (Key.isDown(83)) {
this._y = this._y + 2;
} else {
yspeed = -10;
jump = true;
jumptimes = 2;
drop = true;
climb = false;
}
} else {
yspeed = -10;
jump = true;
jumptimes = 2;
drop = true;
climb = false;
}
}
if (this.hitTest(stair2)) {
if ((((this._x > (stair2._x - 5)) && (this._x < (stair2._x + 5))) && (this.ymax > (stair2Bounds.yMin + 2))) && (this.ymin < stair2Bounds.yMax)) {
if (Key.isDown(69)) {
this._y = this._y - 2;
} else if (Key.isDown(83)) {
this._y = this._y + 2;
} else {
yspeed = -10;
jump = true;
jumptimes = 2;
drop = true;
climb = false;
}
} else {
yspeed = -10;
jump = true;
jumptimes = 2;
drop = true;
climb = false;
}
}
}
if ((((!KeyA) && (!KeyD)) && (!KeyCtrl)) && (!jump)) {
this.gotoAndStop(1);
}
if (jump) {
if (maxfall < yspeed) {
yspeed--;
}
this._y = this._y - yspeed;
if (((((this.ymax > topb0Bounds.yMin) && (this._y < topb0._y)) && (this.xmax > (topb0Bounds.xMin + (this._width / 2)))) && (this.xmin < (topb0Bounds.xMax - (this._width / 2)))) && (yspeed < -5)) {
this.gotoAndStop(1);
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
jumptimes = 0;
jump = false;
yspeed = 10;
this._y = (topb0Bounds.yMin - (this._height / 2)) + 3;
}
if (((((this.ymax > topb1Bounds.yMin) && (this._y < topb1._y)) && (this.xmax > (topb1Bounds.xMin + (this._width / 2)))) && (this.xmin < (topb1Bounds.xMax - (this._width / 2)))) && (yspeed < -5)) {
this.gotoAndStop(1);
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
jumptimes = 0;
jump = false;
yspeed = 10;
this._y = (topb1Bounds.yMin - (this._height / 2)) + 3;
}
if (((((this.ymax > topb2Bounds.yMin) && (this._y < topb2._y)) && (this.xmax > (topb2Bounds.xMin + (this._width / 2)))) && (this.xmin < (topb2Bounds.xMax - (this._width / 2)))) && (yspeed < -5)) {
this.gotoAndStop(1);
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
jumptimes = 0;
jump = false;
yspeed = 10;
this._y = (topb2Bounds.yMin - (this._height / 2)) + 3;
}
if (!drop) {
manBounds = this.manjump.getBounds(this);
this.gun._y = manBounds.yMin + 35;
}
if (this._y > 365) {
this._y = 365;
jumptimes = 0;
drop = false;
jump = false;
this.gotoAndStop(1);
if (weapon == 1) {
this.gun.gotoAndStop(1);
} else if (weapon == 2) {
this.gun.gotoAndStop(2);
} else if (weapon == 3) {
this.gun.gotoAndStop(3);
} else if (weapon == 4) {
this.gun.gotoAndStop(4);
}
}
}
if ((fire && (weapon == 2)) && (gun2 > 0)) {
if ((dep % 3) == 0) {
mgunSound.start(0, 1);
}
if ((dep % 6) == 0) {
gun2--;
arg = ((90 - r) * Math.PI) / 180;
attachMovie("bullet0", "bullet" + dep, dep);
eval ("bullet" + dep).damage = 2;
eval ("bullet" + dep)._x = man._x;
eval ("bullet" + dep)._y = man._y;
eval ("bullet" + dep)._rotation = r;
eval ("bullet" + dep).xinc = Math.sin(arg) * 10;
eval ("bullet" + dep).yinc = Math.cos(arg) * 10;
eval ("bullet" + dep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
shoot(this);
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
}
dep++;
}
if (dep >= 100) {
dep = 0;
}
}
};
stair0Bounds = stair0.getBounds(_root);
stair1Bounds = stair1.getBounds(_root);
stair2Bounds = stair2.getBounds(_root);
topb0Bounds = topb0.getBounds(_root);
topb1Bounds = topb1.getBounds(_root);
topb2Bounds = topb2.getBounds(_root);
Key.addListener(this);
onKeyUp = function () {
if (Key.getCode() == 87) {
jt = undefined;
}
};
onKeyDown = function () {
trace(Key.getCode());
switch (Key.getCode()) {
case 49 :
weapon = 1;
if (weapon1 == undefined) {
weapon1 = true;
}
man.gun.gotoAndStop(1);
return;
case 50 :
weapon = 2;
if (weapon2 == undefined) {
weapon2 = true;
}
man.gun.gotoAndStop(2);
return;
case 51 :
weapon = 3;
if (weapon3 == undefined) {
weapon3 = true;
}
man.gun.gotoAndStop(3);
return;
case 52 :
weapon = 4;
if (weapon4 == undefined) {
weapon4 = true;
}
man.gun.gotoAndStop(4);
return;
case 81 :
tossBomb();
}
};
onMouseDown = function () {
arg = ((90 - r) * Math.PI) / 180;
if (((weapon == 1) && (weapon1)) && (gun1 > 0)) {
mgunSound.start(0, 1);
gun1--;
weapon1 = false;
weapon1timer = setInterval(w1fire, 200);
attachMovie("bullet0", "bullet" + dep, dep);
eval ("bullet" + dep).damage = 2;
eval ("bullet" + dep)._x = man._x;
eval ("bullet" + dep)._y = man._y;
eval ("bullet" + dep)._rotation = r;
eval ("bullet" + dep).xinc = Math.sin(arg) * 10;
eval ("bullet" + dep).yinc = Math.cos(arg) * 10;
eval ("bullet" + dep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
shoot(this);
if ((((this._x > 700) || (this._x < 0)) || (this._y < 0)) || (this._y > 380)) {
removeMovieClip(this);
}
};
dep++;
}
if (weapon == 2) {
man.gun.machinegun.gotoAndPlay(2);
fire = true;
}
if (((weapon == 3) && (weapon3)) && (gun3 > 0)) {
w3Sound.start(0, 1);
gun3--;
weapon3 = false;
weapon3timer = setInterval(w3fire, 1000);
attachMovie("bullet1", "bullet" + dep, dep);
eval ("bullet" + dep).damage = 20;
eval ("bullet" + dep).weapon = 3;
eval ("bullet" + dep)._x = man._x;
eval ("bullet" + dep)._y = man._y;
eval ("bullet" + dep)._rotation = r;
eval ("bullet" + dep).xinc = Math.sin(arg) * 10;
eval ("bullet" + dep).yinc = Math.cos(arg) * 10;
eval ("bullet" + dep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
shoot(this);
if (this._y > 380) {
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = this._x;
eval ("missileblast" + dep)._y = this._y - 10;
removeMovieClip(this);
}
if (((this._x > 700) || (this._x < 0)) || (this._y < 0)) {
removeMovieClip(this);
}
};
dep++;
}
if (((weapon == 4) && (weapon4)) && (gun4 > 0)) {
w4Sound.start(0, 1);
gun4--;
weapon4 = false;
weapon4timer = setInterval(w4fire, 1500);
attachMovie("bullet2", "bullet" + dep, dep);
eval ("bullet" + dep).damage = 30;
eval ("bullet" + dep).weapon = 4;
eval ("bullet" + dep)._x = man._x;
eval ("bullet" + dep)._y = man._y;
eval ("bullet" + dep)._rotation = r;
eval ("bullet" + dep).xinc = Math.sin(arg) * 10;
eval ("bullet" + dep).yinc = Math.cos(arg) * 10;
eval ("bullet" + dep).onEnterFrame = function () {
this._x = this._x + this.xinc;
this._y = this._y + this.yinc;
shoot(this);
if (this._y > 380) {
attachMovie("missileblast", "missileblast" + dep, dep);
mineSound.start(0, 1);
eval ("missileblast" + dep)._xscale = (eval ("missileblast" + dep)._yscale = 20);
eval ("missileblast" + dep)._x = this._x;
eval ("missileblast" + dep)._y = this._y - 10;
removeMovieClip(this);
}
if (((this._x > 700) || (this._x < 0)) || (this._y < 0)) {
removeMovieClip(this);
}
};
dep++;
}
};
onMouseUp = function () {
if (weapon == 2) {
man.gun.machinegun.gotoAndStop(1);
fire = false;
}
};
enemykind = 1;
edep = 200;
ebdep = 1000;
enemyArray = new Array();
enemytimer = setInterval(setEnemy, 2000);
coptertimer = setInterval(setCopter, 8000);
itemtimer = setInterval(setItem, 15000);
itemArray = new Array();
callpolice();
ShowLevel();
Frame 207
stop();
lastscore = score;
lastlevel = level;
Symbol 22 MovieClip [pblast] Frame 8
removeMovieClip(this);
Symbol 35 MovieClip [missileblast] Frame 10
removeMovieClip(this);
Symbol 41 MovieClip [bombblast] Frame 7
removeMovieClip(this);
Symbol 50 MovieClip Frame 11
_parent.Move = true;
_parent.ft = undefined;
_parent.gotoAndStop(1);
Symbol 65 MovieClip Frame 9
stop();
Symbol 68 MovieClip Frame 27
removeMovieClip(_parent);
Symbol 75 MovieClip Frame 21
removeMovieClip(_parent);
Symbol 76 MovieClip Frame 13
removeMovieClip(_parent);
Symbol 82 MovieClip [enemy2] Frame 1
stop();
Symbol 82 MovieClip [enemy2] Frame 2
stop();
Symbol 82 MovieClip [enemy2] Frame 3
stop();
Symbol 82 MovieClip [enemy2] Frame 4
stop();
Symbol 82 MovieClip [enemy2] Frame 5
stop();
Symbol 82 MovieClip [enemy2] Frame 6
stop();
Symbol 87 MovieClip Frame 15
_parent.Move = true;
_parent.ft = undefined;
_parent.gotoAndStop(1);
Symbol 92 MovieClip Frame 21
removeMovieClip(_parent);
Symbol 96 MovieClip Frame 27
removeMovieClip(_parent);
Symbol 97 MovieClip [enemy1] Frame 1
stop();
Symbol 97 MovieClip [enemy1] Frame 2
stop();
Symbol 97 MovieClip [enemy1] Frame 3
stop();
Symbol 97 MovieClip [enemy1] Frame 4
stop();
Symbol 102 MovieClip Frame 14
_parent.Move = true;
_parent.ft = undefined;
_parent.gotoAndStop(1);
Symbol 105 MovieClip Frame 31
removeMovieClip(_parent);
Symbol 110 MovieClip Frame 23
removeMovieClip(_parent);
Symbol 111 MovieClip [enemy0] Frame 1
stop();
Symbol 111 MovieClip [enemy0] Frame 2
stop();
Symbol 111 MovieClip [enemy0] Frame 3
stop();
Symbol 111 MovieClip [enemy0] Frame 4
stop();
Symbol 117 MovieClip [copter1] Frame 1
stop();
Symbol 117 MovieClip [copter1] Frame 6
removeMovieClip(this);
Symbol 119 MovieClip [copter2] Frame 1
stop();
Symbol 119 MovieClip [copter2] Frame 6
removeMovieClip(this);
Symbol 121 MovieClip [copter0] Frame 1
stop();
Symbol 121 MovieClip [copter0] Frame 6
removeMovieClip(this);
Symbol 148 MovieClip [bomber] Frame 1
stop();
Symbol 148 MovieClip [bomber] Frame 2
stop();
Symbol 148 MovieClip [bomber] Frame 44
removeMovieClip(this);
Symbol 155 MovieClip [item3] Frame 1
stop();
Symbol 155 MovieClip [item3] Frame 2
stop();
Symbol 158 MovieClip [item2] Frame 1
stop();
Symbol 158 MovieClip [item2] Frame 2
stop();
Symbol 161 MovieClip [item1] Frame 1
stop();
Symbol 161 MovieClip [item1] Frame 2
stop();
Symbol 164 MovieClip [item4] Frame 1
stop();
Symbol 164 MovieClip [item4] Frame 2
stop();
Symbol 167 MovieClip [item0] Frame 1
stop();
Symbol 167 MovieClip [item0] Frame 2
stop();
Symbol 170 MovieClip [item5] Frame 1
stop();
Symbol 170 MovieClip [item5] Frame 2
stop();
Symbol 226 MovieClip Frame 1
bull.onRelease = function () {
getURL ("http://sillybull.com");
};
Symbol 236 Button
on (release) {
getURL ("http://sillybull.com", "_blank");
}
Symbol 265 Button
on (release) {
gotoAndStop (206);
}
Symbol 271 Button
on (release) {
if (_root.help._visible == false) {
_root.help._visible = true;
} else if (_root.help._visible == true) {
_root.help._visible = false;
}
}
Symbol 303 MovieClip Frame 1
stop();
man = false;
Symbol 303 MovieClip Frame 14
man = true;
Symbol 309 MovieClip Frame 1
stop();
man = false;
Symbol 309 MovieClip Frame 13
man = true;
Symbol 314 MovieClip Frame 1
stop();
man = false;
Symbol 314 MovieClip Frame 18
man = true;
Symbol 325 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 2
play();
Symbol 325 MovieClip Frame 4
gotoAndPlay (2);
Symbol 331 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 2
stop();
Symbol 331 MovieClip Frame 3
stop();
Symbol 331 MovieClip Frame 4
stop();
Symbol 341 MovieClip Frame 21
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 2
stop();
Symbol 346 MovieClip Frame 3
stop();
Symbol 346 MovieClip Frame 4
stop();
Symbol 346 MovieClip Frame 5
stop();
Symbol 346 MovieClip Frame 6
stop();
Symbol 360 Button
on (release) {
gotoAndStop (121);
}