Frame 1
function doSomething() {
}
function doSomething2() {
getURL ("http://flashground.net", _blank);
}
MENU.customItems.push(Functioned2);
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("Copyright by Jacob Dzwinel", doSomething);
Functioned2 = new ContextMenuItem("Visit Flashground.net", doSomething2);
MENU.customItems.push(Functioned);
MENU.customItems.push(Functioned2);
_root.menu = MENU;
Frame 187
stop();
Frame 700
stop();
_root.lives = 3;
_root.saves = 0;
Instance of Symbol 354 MovieClip "cursor" in Frame 700
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 701
stop();
Frame 702
stop();
Frame 703
stop();
Frame 704
stop();
Frame 705
stopAllSounds();
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 810
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda2");
}
}
Frame 834
_root.saves = 1;
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
Frame 835
_root.silences = 366;
_root.bullettime = 0;
_root.silence._width = _root.silences;
_root.AMMO1 = 30;
_root.AMMO2 = 15;
_root.AMMO3 = 20;
_root.AMMO4 = 30;
_root.AMMO5 = 4;
_root.AMMO6 = 35;
_root.AMMO7 = 25;
_root.herolifes = 10;
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.gun = 1;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100000000 /* 0x5F5E100 */;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 835
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 835
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 835
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 835
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda2");
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 835
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 836
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
Frame 837
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 837
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 837
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 837
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 837
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda4");
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 837
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 838
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
Frame 839
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 839
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 839
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 839
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 839
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 839
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda5");
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 839
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 840
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
Frame 841
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 841
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 841
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 841
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 841
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 841
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda6");
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 841
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 842
_root.saves = 2;
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
Frame 843
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 843
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 843
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 843
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 843
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 843
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda7");
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 843
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 844
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
Frame 845
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 845
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 845
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 845
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 845
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 845
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda8");
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 845
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 845
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 846
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
Frame 847
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 847
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda9");
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 847
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 180 MovieClip [BadGuy5] "bad5" in Frame 847
onClipEvent (enterFrame) {
if (_root.guyvisible5 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 847
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 847
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 847
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 847
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 848
_root.saves = 3;
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
Frame 849
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 849
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda10");
}
}
Instance of Symbol 180 MovieClip [BadGuy5] "bad5" in Frame 849
onClipEvent (enterFrame) {
if (_root.guyvisible5 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 849
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 849
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 849
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 849
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 849
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 850
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 851
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 851
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda11");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 851
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 851
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 180 MovieClip [BadGuy5] "bad5" in Frame 851
onClipEvent (enterFrame) {
if (_root.guyvisible5 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 851
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 852
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 853
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 853
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda12");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 853
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 853
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 180 MovieClip [BadGuy5] "bad5" in Frame 853
onClipEvent (enterFrame) {
if (_root.guyvisible5 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 853
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 853
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 854
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 855
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 855
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda13");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 855
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 855
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 855
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 855
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 855
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 855
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 856
_root.saves = 4;
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 857
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 857
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda14");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 857
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 857
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 857
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 857
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 857
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 857
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 858
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 859
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 859
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda15");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 859
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 859
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 859
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 859
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 859
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 859
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 860
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 861
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 861
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda16");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 861
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 861
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 861
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 861
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 861
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 861
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 861
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 862
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 863
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 863
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda17");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 863
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 863
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 863
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 863
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 863
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 863
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 863
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 864
_root.saves = 5;
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 865
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 865
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda18");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 865
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 865
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 865
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 865
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 865
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 865
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 865
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 866
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 867
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 867
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda19");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 867
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 867
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 867
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 180 MovieClip [BadGuy5] "bad5" in Frame 867
onClipEvent (enterFrame) {
if (_root.guyvisible5 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 867
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 868
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 869
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 869
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda20");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 869
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 869
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 869
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 869
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 869
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 869
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 869
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 870
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 871
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 871
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda21");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 871
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 871
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 871
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 871
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 871
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 180 MovieClip [BadGuy5] "bad5" in Frame 871
onClipEvent (enterFrame) {
if (_root.guyvisible5 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 871
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 872
_root.saves = 6;
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 873
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 229 MovieClip [NextLevel] "EXIT" in Frame 873
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("runda22");
}
}
Instance of Symbol 422 MovieClip "guy" in Frame 873
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 873
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 873
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 873
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 873
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 873
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 873
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 874
function BadGuy() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy2() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy3() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy4() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy5() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
function BadGuy6() {
this.goX = this._x;
this.goY = this._y;
this.seenPlayerX = null;
this.seenPlayerYX = null;
this.NUMBER = Number(this._name.substring(7));
this.I_saw_player = false;
}
_root.reload = 0;
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy.prototype = new MovieClip();
BadGuy.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead1 == 0) {
_root.guyvisible = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible = 0;
}
}
};
Object.registerClass("BadGuy", BadGuy);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy2.prototype = new MovieClip();
BadGuy2.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy2.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy2.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead2 == 0) {
_root.guyvisible2 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible2 = 0;
}
}
};
Object.registerClass("BadGuy2", BadGuy2);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy3.prototype = new MovieClip();
BadGuy3.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy3.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy3.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead3 == 0) {
_root.guyvisible3 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible3 = 0;
}
}
};
Object.registerClass("BadGuy3", BadGuy3);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy4.prototype = new MovieClip();
BadGuy4.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy4.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy4.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead4 == 0) {
_root.guyvisible4 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible4 = 0;
}
}
};
Object.registerClass("BadGuy4", BadGuy4);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy5.prototype = new MovieClip();
BadGuy5.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy5.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy5.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead5 == 0) {
_root.guyvisible5 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible5 = 0;
}
}
};
Object.registerClass("BadGuy5", BadGuy5);
theDistance = function (obj1, obj2) {
return(Math.sqrt(((obj1._x - obj2._x) * (obj1._x - obj2._x)) + ((obj1._y - obj2._y) * (obj1._y - obj2._y))));
};
BadGuy6.prototype = new MovieClip();
BadGuy6.prototype.onEnterFrame = function () {
this.lookForPlayer();
};
BadGuy6.prototype.I_see_player = function () {
var _local5 = _root.guy._x - this._x;
var _local6 = _root.guy._y - this._y;
var _local4 = Math.floor(theDistance(this, _root.guy) / 5);
var _local3 = 0;
while (_local3 < _local4) {
if (_root.walls.hitTest(this._x + ((_local3 * _local5) / _local4), this._y + ((_local3 * _local6) / _local4), true)) {
return(false);
}
_local3++;
}
return(true);
};
BadGuy6.prototype.lookForPlayer = function () {
if ((_root.theDistance(_root.guy, this) <= 700) && (this.I_see_player())) {
this.I_saw_player = true;
this.seenPlayerX = _root.guy._x;
this.seenPlayerY = _root.guy._y;
if (_root.dead6 == 0) {
_root.guyvisible6 = 1;
} else if (this.I_saw_player) {
this._x = this.seenPlayerX._x;
this._y = this.seenPlayerY._y;
_root.guyvisible6 = 0;
}
}
};
Object.registerClass("BadGuy6", BadGuy6);
Frame 875
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.bullettime = 0;
_root.silence._width = _root.silences;
stop();
function Bullet3() {
if (_root.bullettime == 0) {
this.speed = 15;
} else if (_root.bullettime == 1) {
this.speed = 5;
}
}
function Bullet4() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 2;
}
}
_global.bullet3_depth = 1000;
addBullet3 = function (x, y, rot) {
_root.attachMovie("bullet3", "bullet3_" + _global.bullet3_depth, _global.bullet3_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet3_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet3.prototype = new MovieClip();
Bullet3.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.removeMovieClip();
_root.herolifes = _root.herolifes - 1;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet3", Bullet3);
_global.bullet4_depth = 1;
addBullet4 = function (x, y, rot) {
_root.attachMovie("bullet4", "bullet4_" + _global.bullet4_depth, _global.bullet4_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet4_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet4.prototype = new MovieClip();
Bullet4.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.guy.point2.hitTest(this.pu)) {
this.speed = 0;
tellTarget (this) {
gotoAndPlay (2);
};
_root.herolifes = _root.herolifes - 5;
tellTarget (_root.bloof) {
gotoAndPlay (2);
};
}
};
Object.registerClass("bullet4", Bullet4);
function Bullet2() {
if (_root.bullettime == 0) {
this.speed = 6;
} else if (_root.bullettime == 1) {
this.speed = 3;
}
}
_global.bullet2_depth = 100;
addBullet2 = function (x, y, rot) {
_root.attachMovie("bullet2", "bullet2_" + _global.bullet2_depth, _global.bullet2_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet2_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet2.prototype = new MovieClip();
Bullet2.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this)) {
_root.badlife = _root.badlife - 10;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad2.hit.hitTest(this)) {
_root.badlife2 = _root.badlife2 - 10;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad3.hit.hitTest(this)) {
_root.badlife3 = _root.badlife3 - 10;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad4.hit.hitTest(this)) {
_root.badlife4 = _root.badlife4 - 10;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad5.hit.hitTest(this)) {
_root.badlife5 = _root.badlife5 - 10;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
if (_root.bad6.hit.hitTest(this)) {
_root.badlife6 = _root.badlife6 - 10;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
tellTarget (this) {
gotoAndStop (2);
};
this.speed = 0;
}
};
Object.registerClass("bullet2", Bullet2);
function Bullet() {
if (_root.bullettime == 0) {
this.speed = 18;
} else if (_root.bullettime == 1) {
this.speed = 6;
}
}
_global.bullet_depth = 100000 /* 0x0186A0 */;
addBullet = function (x, y, rot) {
_root.attachMovie("bullet", "bullet_" + _global.bullet_depth, _global.bullet_depth, {_x:x, _y:y, _rotation:rot});
_global.bullet_depth++;
};
degToRad = function (deg) {
rad = (Math.PI * deg) / 180;
return(rad);
};
radToDeg = function (rad) {
deg = (rad * 180) / Math.PI;
return(deg);
};
Bullet.prototype = new MovieClip();
Bullet.prototype.onEnterFrame = function () {
var _local3 = degToRad(this._rotation);
this._x = this._x + (this.speed * Math.cos(_local3));
this._y = this._y + (this.speed * Math.sin(_local3));
if (_root.walls.hitTest(this._x, this._y, true)) {
tellTarget (this) {
gotoAndPlay (2);
this.speed = 0;
};
}
if (_root.bad.hit.hitTest(this.po)) {
_root.badlife = _root.badlife - 1;
if (_root.badlife < 1) {
tellTarget (_root.bad) {
gotoAndStop (9);
};
}
if (_root.dead1 == 0) {
this.removeMovieClip();
}
}
if (_root.bad2.hit.hitTest(this.po)) {
_root.badlife2 = _root.badlife2 - 1;
if (_root.badlife2 < 1) {
tellTarget (_root.bad2) {
gotoAndStop (9);
};
}
if (_root.dead2 == 0) {
this.removeMovieClip();
}
}
if (_root.bad3.hit.hitTest(this.po)) {
_root.badlife3 = _root.badlife3 - 1;
if (_root.badlife3 < 1) {
tellTarget (_root.bad3) {
gotoAndStop (9);
};
}
if (_root.dead3 == 0) {
this.removeMovieClip();
}
}
if (_root.bad4.hit.hitTest(this.po)) {
_root.badlife4 = _root.badlife4 - 1;
if (_root.badlife4 < 1) {
tellTarget (_root.bad4) {
gotoAndStop (6);
};
}
if (_root.dead4 == 0) {
this.removeMovieClip();
}
}
if (_root.bad5.hit.hitTest(this.po)) {
_root.badlife5 = _root.badlife5 - 1;
if (_root.badlife5 < 1) {
tellTarget (_root.bad5) {
gotoAndStop (6);
};
}
if (_root.dead5 == 0) {
this.removeMovieClip();
}
}
if (_root.bad6.hit.hitTest(this.po)) {
_root.badlife6 = _root.badlife6 - 1;
if (_root.badlife6 < 1) {
tellTarget (_root.bad6) {
gotoAndStop (9);
};
}
if (_root.dead6 == 0) {
this.removeMovieClip();
}
}
};
Object.registerClass("bullet", Bullet);
Instance of Symbol 422 MovieClip "guy" in Frame 875
onClipEvent (mouseDown) {
if (((_root.gun == 1) & (_root.reload == 0)) & (_root.AMMO1 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(16) + 352)));
tellTarget (this.guy) {
gotoAndPlay (2);
_root.AMMO1 = _root.AMMO1 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 3) & (_root.reload == 0)) & (_root.AMMO3 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(6) + 357)));
tellTarget (this.guy) {
gotoAndPlay (57);
_root.AMMO3 = _root.AMMO3 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 6) & (_root.reload == 0)) & (_root.AMMO6 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (137);
_root.AMMO6 = _root.AMMO6 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 5) & (_root.reload == 0)) & (_root.AMMO5 > 0)) {
_root.addBullet2(this._x, this._y, this._rotation);
tellTarget (this.guy) {
gotoAndPlay (90);
_root.AMMO5 = _root.AMMO5 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 4) & (_root.reload == 0)) & (_root.AMMO4 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(4) + 358)));
tellTarget (this.guy) {
gotoAndPlay (79);
_root.AMMO4 = _root.AMMO4 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 7) & (_root.reload == 0)) & (_root.AMMO7 > 0)) {
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + (random(10) + 355)));
tellTarget (this.guy) {
gotoAndPlay (149);
_root.AMMO7 = _root.AMMO7 - 1;
};
}
}
onClipEvent (mouseDown) {
if (((_root.gun == 2) & (_root.reload == 0)) & (_root.AMMO2 > 0)) {
tellTarget (this.guy) {
gotoAndPlay (25);
_root.AMMO2 = _root.AMMO2 - 1;
if (_root.reload == 0) {
_root.addBullet(this._x, this._y, this._rotation);
}
_root.addBullet(this._x, this._y, (this._rotation = this._rotation - 5));
_root.addBullet(this._x, this._y, (this._rotation = this._rotation + 10));
};
}
}
onClipEvent (enterFrame) {
this._rotation = _root.radToDeg(Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x));
}
onClipEvent (enterFrame) {
if (_root.bullettime == 0) {
moveSpeed = 2;
} else if (_root.bullettime == 1) {
moveSpeed = 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
this._x = this._x + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x - 3;
}
} else if (Key.isDown(65)) {
this._x = this._x - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._x = this._x + 3;
}
}
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
this._y = this._y + moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y - 3;
}
} else if (Key.isDown(87)) {
this._y = this._y - moveSpeed;
if (_root.bullettime == 1) {
tellTarget (this) {
gotoAndPlay (15);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
} else if (_root.bullettime == 0) {
tellTarget (this) {
gotoAndPlay (2);
tellTarget (_root.cursor) {
gotoAndPlay (2);
};
};
}
if (_root.walls.hitTest(this._x, this._y, true)) {
this._y = this._y + 3;
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo1 < 7)) {
if (Key.isDown(82)) {
tellTarget (this) {
gotoAndPlay (27);
};
}
}
}
onClipEvent (enterFrame) {
if ((_root.reload == 0) & (_root.ammo3 < 1)) {
_root.gun = 1;
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(49)) {
tellTarget (this.guy) {
gotoAndStop (1);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
_root.gun = 1;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(50)) {
tellTarget (this.guy) {
gotoAndStop (25);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
_root.gun = 2;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(51)) {
tellTarget (this.guy) {
gotoAndStop (57);
tellTarget (_root.showgun.socom) {
gotoAndPlay (2);
_root.gun = 3;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(52)) {
tellTarget (this.guy) {
gotoAndStop (79);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
_root.gun = 4;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(53)) {
tellTarget (this.guy) {
gotoAndStop (90);
tellTarget (_root.showgun.bazooka) {
gotoAndPlay (2);
_root.gun = 5;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(54)) {
tellTarget (this.guy) {
gotoAndStop (137);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
_root.gun = 6;
};
};
}
}
}
onClipEvent (enterFrame) {
if (_root.reload == 0) {
if (Key.isDown(55)) {
tellTarget (this.guy) {
gotoAndStop (149);
tellTarget (_root.showgun.uzi) {
gotoAndPlay (2);
_root.gun = 7;
};
};
}
}
}
Instance of Symbol 226 MovieClip [BadGuy] "bad" in Frame 875
onClipEvent (enterFrame) {
if (_root.guyvisible == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 220 MovieClip [BadGuy2] "bad2" in Frame 875
onClipEvent (enterFrame) {
if (_root.guyvisible2 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 213 MovieClip [BadGuy3] "bad3" in Frame 875
onClipEvent (enterFrame) {
if (_root.guyvisible3 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 159 MovieClip [BadGuy6] "bad6" in Frame 875
onClipEvent (enterFrame) {
if (_root.guyvisible6 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 181 MovieClip [BadGuy4] "bad4" in Frame 875
onClipEvent (enterFrame) {
if (_root.guyvisible4 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 180 MovieClip [BadGuy5] "bad5" in Frame 875
onClipEvent (enterFrame) {
if (_root.guyvisible5 == 1) {
tellTarget (this) {
gotoAndPlay (2);
x_diff = this._x - _root.guy._x;
y_diff = this._y - _root.guy._y;
radian = Math.atan2(y_diff, x_diff);
degree = (radian * 180) / Math.PI;
degree = Math.round(degree);
setProperty(this, _rotation , degree);
a_x = Math.round(_root.guy._x);
a_y = Math.round(_root.guy._y);
c_x = Math.round(_root.collision_clip._x);
c_y = Math.round(_root.collision_clip._y);
if ((a_x < (c_x + boundary)) and (a_x > (c_x - boundary))) {
if ((a_y < (c_y + boundary)) and (a_y > (c_y - boundary))) {
gotoAndStop ("youLose");
}
}
};
}
}
Instance of Symbol 630 MovieClip "EXIT" in Frame 875
onClipEvent (enterFrame) {
if (_root.guy.point.hitTest(this)) {
_root.gotoAndPlay("FINISH");
}
}
Instance of Symbol 354 MovieClip "cursor" in Frame 875
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 977
stop();
Instance of Symbol 354 MovieClip "cursor" in Frame 977
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 989
_root.lives = _root.lives - 1;
_root.silences = 366;
_root.bullettime = 0;
_root.silence._width = _root.silences;
_root.herolifes = 10;
_root.badlife = _root.difficult;
_root.badlife2 = _root.difficult;
_root.badlife3 = _root.difficult;
_root.badlife4 = _root.difficult + 2;
_root.badlife5 = _root.difficult + 2;
_root.badlife6 = _root.difficult;
_root.gun = 1;
Frame 1045
if (_root.lives > 0) {
gotoAndStop ("check");
}
if (_root.lives == 0) {
gotoAndStop ("ends");
}
Frame 1046
if (_root.lives > 0) {
gotoAndStop ("check");
}
if (_root.lives == 0) {
gotoAndStop ("ends");
}
Frame 1047
stop();
Instance of Symbol 354 MovieClip "cursor" in Frame 1047
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateafterevent();
}
Frame 1048
stop();
Symbol 3 MovieClip Frame 45
stop();
Symbol 14 MovieClip [Rocket] Frame 1
stop();
Symbol 14 MovieClip [Rocket] Frame 2
var i = 0;
while (i < _global.hero) {
if (_root.theDistance(this, _root["hero" + i]) <= _global.OPTIONS.blow_radius) {
var t_armor_damage = Math.floor((0.7 * (_root["hero" + i].AC / 100)) * _global.OPTIONS.blow_damage);
_root["hero" + i].HP = _root["hero" + i].HP - (_global.OPTIONS.blow_damage - t_armor_damage);
_root["hero" + i].AC = _root["hero" + i].AC - Math.floor(t_armor_damage / 2);
_root["hero" + i].kick = 30;
_root.addBlood(_root["hero" + i]._x, _root["hero" + i]._y);
}
i++;
}
Symbol 14 MovieClip [Rocket] Frame 19
this.removeMovieClip();
Symbol 29 MovieClip Frame 4
gotoAndStop ("rifle");
Symbol 29 MovieClip Frame 7
gotoAndStop ("smg");
Symbol 29 MovieClip Frame 22
gotoAndStop ("shotgun");
Symbol 29 MovieClip Frame 24
gotoAndStop ("pistol");
Symbol 29 MovieClip Frame 38
gotoAndStop ("granade");
Symbol 29 MovieClip Frame 53
gotoAndStop ("knife");
Symbol 29 MovieClip Frame 72
weapon.attachMovie(this._parent.ch_weap.link, "wpn", 1);
Symbol 29 MovieClip Frame 92
gotoAndStop(this._parent.ch_weap._type);
Symbol 29 MovieClip Frame 182
if ((this._parent.weapon.ammo + this._parent.weapon.clip) >= this._parent.weapon.max_clip) {
this._parent.weapon.ammo = this._parent.weapon.ammo + (this._parent.weapon.clip - this._parent.weapon.max_clip);
this._parent.weapon.clip = this._parent.weapon.max_clip;
} else {
this._parent.weapon.clip = this._parent.weapon.clip + this._parent.weapon.ammo;
this._parent.weapon.ammo = 0;
}
this.gotoAndStop(this._parent.weapon._type);
Symbol 73 MovieClip [Helm_American_Corporal] Frame 1
if (_root.helm3 == 0) {
gotoAndStop (5);
}
if (_root.helm3 == 1) {
gotoAndStop (9);
}
if (_root.helm3 == 2) {
gotoAndStop (2);
}
if (_root.helm3 == 3) {
gotoAndStop (3);
}
if (_root.helm3 == 4) {
gotoAndStop (4);
}
if (_root.helm3 == 5) {
gotoAndStop (6);
}
if (_root.helm3 == 6) {
gotoAndStop (7);
}
if (_root.helm3 == 7) {
gotoAndStop (8);
}
if (_root.helm2 == 0) {
tellTarget (_root.bad2.helm) {
gotoAndStop (5);
};
}
if (_root.helm2 == 1) {
tellTarget (_root.bad2.helm) {
gotoAndStop (9);
};
}
if (_root.helm2 == 2) {
tellTarget (_root.bad2.helm) {
gotoAndStop (2);
};
}
if (_root.helm2 == 3) {
tellTarget (_root.bad2.helm) {
gotoAndStop (3);
};
}
if (_root.helm2 == 4) {
tellTarget (_root.bad2.helm) {
gotoAndStop (4);
};
}
if (_root.helm2 == 5) {
tellTarget (_root.bad2.helm) {
gotoAndStop (6);
};
}
if (_root.helm2 == 6) {
tellTarget (_root.bad2.helm) {
gotoAndStop (7);
};
}
if (_root.helm2 == 7) {
tellTarget (_root.bad2.helm) {
gotoAndStop (8);
};
}
if (_root.helm3 == 0) {
tellTarget (_root.bad.helm) {
gotoAndStop (5);
};
}
if (_root.helm3 == 1) {
tellTarget (_root.bad.helm) {
gotoAndStop (9);
};
}
if (_root.helm3 == 2) {
tellTarget (_root.bad.helm) {
gotoAndStop (2);
};
}
if (_root.helm3 == 3) {
tellTarget (_root.bad.helm) {
gotoAndStop (3);
};
}
if (_root.helm3 == 4) {
tellTarget (_root.bad.helm) {
gotoAndStop (4);
};
}
if (_root.helm3 == 5) {
tellTarget (_root.bad.helm) {
gotoAndStop (6);
};
}
if (_root.helm3 == 6) {
tellTarget (_root.bad3.helm) {
gotoAndStop (7);
};
}
if (_root.helm3 == 7) {
tellTarget (_root.bad.helm) {
gotoAndStop (8);
};
}
if (_root.helm4 == 0) {
tellTarget (_root.bad4.helm) {
gotoAndStop (5);
};
}
if (_root.helm4 == 1) {
tellTarget (_root.bad4.helm) {
gotoAndStop (9);
};
}
if (_root.helm4 == 2) {
tellTarget (_root.bad4.helm) {
gotoAndStop (2);
};
}
if (_root.helm4 == 3) {
tellTarget (_root.bad4.helm) {
gotoAndStop (3);
};
}
if (_root.helm4 == 4) {
tellTarget (_root.bad4.helm) {
gotoAndStop (4);
};
}
if (_root.helm4 == 5) {
tellTarget (_root.bad4.helm) {
gotoAndStop (6);
};
}
if (_root.helm4 == 6) {
tellTarget (_root.bad4.helm) {
gotoAndStop (7);
};
}
if (_root.helm4 == 7) {
tellTarget (_root.bad4.helm) {
gotoAndStop (8);
};
}
if (_root.helm5 == 0) {
tellTarget (_root.bad5.helm) {
gotoAndStop (5);
};
}
if (_root.helm5 == 1) {
tellTarget (_root.bad5.helm) {
gotoAndStop (9);
};
}
if (_root.helm5 == 2) {
tellTarget (_root.bad5.helm) {
gotoAndStop (2);
};
}
if (_root.helm5 == 3) {
tellTarget (_root.bad5.helm) {
gotoAndStop (3);
};
}
if (_root.helm5 == 4) {
tellTarget (_root.bad5.helm) {
gotoAndStop (4);
};
}
if (_root.helm5 == 5) {
tellTarget (_root.bad5.helm) {
gotoAndStop (6);
};
}
if (_root.helm5 == 6) {
tellTarget (_root.bad5.helm) {
gotoAndStop (7);
};
}
if (_root.helm5 == 7) {
tellTarget (_root.bad5.helm) {
gotoAndStop (8);
};
}
stop();
Symbol 73 MovieClip [Helm_American_Corporal] Frame 2
stop();
Symbol 73 MovieClip [Helm_American_Corporal] Frame 3
stop();
Symbol 73 MovieClip [Helm_American_Corporal] Frame 4
stop();
Symbol 73 MovieClip [Helm_American_Corporal] Frame 5
stop();
Symbol 73 MovieClip [Helm_American_Corporal] Frame 6
stop();
Symbol 73 MovieClip [Helm_American_Corporal] Frame 7
stop();
Symbol 73 MovieClip [Helm_American_Corporal] Frame 8
stop();
Symbol 73 MovieClip [Helm_American_Corporal] Frame 9
stop();
Symbol 88 MovieClip [Player] Frame 5
_root.deadsleft = _root.deadsleft + 1;
Instance of Symbol 80 MovieClip [MP5_gr] "mp5" in Symbol 88 MovieClip [Player] Frame 26
onClipEvent (enterFrame) {
if (this.hitTest(_root.guy.point2)) {
tellTarget (_root.bad.dead1.mp5) {
gotoAndStop (2);
_root.ammo3 = _root.ammo3 + 2;
};
}
}
Symbol 88 MovieClip [Player] Frame 69
stop();
Symbol 94 MovieClip Frame 16
stop();
Symbol 103 MovieClip Frame 24
stop();
Symbol 104 MovieClip [bullet3] Frame 1
stop();
Symbol 104 MovieClip [bullet3] Frame 2
stop();
Symbol 104 MovieClip [bullet3] Frame 3
stop();
Symbol 104 MovieClip [bullet3] Frame 4
gotoAndStop (3);
Symbol 106 MovieClip Frame 18
stop();
Symbol 117 MovieClip Frame 10
stop();
Symbol 118 MovieClip Frame 19
stop();
Symbol 119 MovieClip [bullet4] Frame 1
stop();
Symbol 119 MovieClip [bullet4] Frame 2
stop();
Symbol 119 MovieClip [bullet4] Frame 3
stop();
Symbol 119 MovieClip [bullet4] Frame 4
gotoAndStop (3);
Symbol 120 MovieClip [bullet2] Frame 1
stop();
Symbol 120 MovieClip [bullet2] Frame 2
stop();
Symbol 120 MovieClip [bullet2] Frame 3
stop();
Symbol 120 MovieClip [bullet2] Frame 4
gotoAndStop (3);
Symbol 121 MovieClip Frame 16
stop();
Symbol 122 MovieClip [bullet] Frame 1
stop();
Symbol 122 MovieClip [bullet] Frame 2
stop();
Symbol 122 MovieClip [bullet] Frame 3
stop();
Symbol 122 MovieClip [bullet] Frame 4
gotoAndStop (3);
Symbol 124 MovieClip [Beretta] Frame 1
stop();
Symbol 124 MovieClip [Beretta] Frame 2
this._parent._parent.play();
_root.addBullet(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation, this._parent._parent._parent.weapon.damage, this._parent._parent._parent.kick);
_root.addShell(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation);
if (this._parent._parent._parent.kick < this._parent._parent._parent.weapon.max_kick) {
this._parent._parent._parent.kick = this._parent._parent._parent.kick + this._parent._parent._parent.weapon.kickback;
} else {
this._parent._parent._parent.kick = this._parent._parent._parent.weapon.max_kick;
}
Symbol 156 MovieClip [Browning_1921_gr] Frame 1
stop();
Symbol 156 MovieClip [Browning_1921_gr] Frame 2
stop();
Instance of Symbol 156 MovieClip [Browning_1921_gr] "spas12" in Symbol 158 MovieClip Frame 26
onClipEvent (enterFrame) {
if (this.hitTest(_root.guy.point2)) {
_root.AMMO5 = _root.AMMO5 + 1;
tellTarget (_root.bad6.dead.spas12) {
gotoAndStop (2);
tellTarget (_root.showgun.shotgun) {
gotoAndPlay (2);
};
};
}
}
Symbol 158 MovieClip Frame 60
stop();
Symbol 159 MovieClip [BadGuy6] Frame 1
stop();
_root.dead6 = 0;
Symbol 159 MovieClip [BadGuy6] Frame 3
_root.addBullet4(this._x, this._y, this._rotation + 180);
Symbol 159 MovieClip [BadGuy6] Frame 8
gotoAndPlay (1);
Symbol 159 MovieClip [BadGuy6] Frame 9
stop();
_root.dead6 = 1;
_root.guyvisible6 = 0;
Symbol 159 MovieClip [BadGuy6] Frame 10
stop();
_root.dead6 = 1;
_root.guyvisible6 = 0;
Symbol 179 MovieClip Frame 11
stop();
Symbol 180 MovieClip [BadGuy5] Frame 1
stop();
_root.dead5 = 0;
Symbol 180 MovieClip [BadGuy5] Frame 2
_root.addBullet3(this._x, this._y, this._rotation + 180);
_root.addBullet3(this._x, this._y + 7, this._rotation + 180);
Symbol 180 MovieClip [BadGuy5] Frame 5
gotoAndPlay (1);
Symbol 180 MovieClip [BadGuy5] Frame 6
_root.dead5 = 1;
stop();
Symbol 180 MovieClip [BadGuy5] Frame 7
_root.dead5 = 1;
stop();
Symbol 181 MovieClip [BadGuy4] Frame 1
stop();
_root.dead4 = 0;
Symbol 181 MovieClip [BadGuy4] Frame 2
_root.addBullet3(this._x, this._y, this._rotation + 180);
_root.addBullet3(this._x, this._y + 7, this._rotation + 180);
Symbol 181 MovieClip [BadGuy4] Frame 5
gotoAndPlay (1);
Symbol 181 MovieClip [BadGuy4] Frame 6
_root.dead4 = 1;
stop();
Symbol 181 MovieClip [BadGuy4] Frame 7
_root.dead4 = 1;
stop();
Symbol 185 MovieClip [Browning_1921] Frame 1
stop();
Symbol 185 MovieClip [Browning_1921] Frame 2
this._parent._parent.play();
var i = (-_global.OPTIONS.shotgun);
while (i <= _global.OPTIONS.shotgun) {
_root.addBullet(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation + (i * _global.OPTIONS.drob), this._parent._parent._parent.weapon.damage, this._parent._parent._parent.kick);
i++;
}
_root.addShell(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation);
if (this._parent._parent._parent.kick < this._parent._parent._parent.weapon.max_kick) {
this._parent._parent._parent.kick = this._parent._parent._parent.kick + this._parent._parent._parent.weapon.kickback;
} else {
this._parent._parent._parent.kick = this._parent._parent._parent.weapon.max_kick;
}
Symbol 188 MovieClip [Colt_1917] Frame 1
stop();
Symbol 188 MovieClip [Colt_1917] Frame 2
this._parent._parent.play();
_root.addBullet(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation, this._parent._parent._parent.weapon.damage, this._parent._parent._parent.kick);
_root.addShell(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation);
if (this._parent._parent._parent.kick < this._parent._parent._parent.weapon.max_kick) {
this._parent._parent._parent.kick = this._parent._parent._parent.kick + this._parent._parent._parent.weapon.kickback;
} else {
this._parent._parent._parent.kick = this._parent._parent._parent.weapon.max_kick;
}
Symbol 190 MovieClip [M_16] Frame 1
stop();
Symbol 190 MovieClip [M_16] Frame 2
this._parent._parent.play();
_root.addBullet(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation, this._parent._parent._parent.weapon.damage, this._parent._parent._parent.kick);
_root.addShell(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation);
if (this._parent._parent._parent.kick < this._parent._parent._parent.weapon.max_kick) {
this._parent._parent._parent.kick = this._parent._parent._parent.kick + this._parent._parent._parent.weapon.kickback;
} else {
this._parent._parent._parent.kick = this._parent._parent._parent.weapon.max_kick;
}
Symbol 192 MovieClip [RocketLauncher] Frame 1
stop();
Symbol 192 MovieClip [RocketLauncher] Frame 2
this._parent._parent.play();
_root.addRocket(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation, this._parent._parent._parent.kick);
if (this._parent._parent._parent.kick < this._parent._parent._parent.weapon.max_kick) {
this._parent._parent._parent.kick = this._parent._parent._parent.kick + this._parent._parent._parent.weapon.kickback;
} else {
this._parent._parent._parent.kick = this._parent._parent._parent.weapon.max_kick;
}
Symbol 194 MovieClip [AK_47] Frame 1
stop();
Symbol 194 MovieClip [AK_47] Frame 2
this._parent._parent.play();
_root.addBullet(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation, this._parent._parent._parent.weapon.damage, this._parent._parent._parent.kick);
_root.addShell(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation);
if (this._parent._parent._parent.kick < this._parent._parent._parent.weapon.max_kick) {
this._parent._parent._parent.kick = this._parent._parent._parent.kick + this._parent._parent._parent.weapon.kickback;
} else {
this._parent._parent._parent.kick = this._parent._parent._parent.weapon.max_kick;
}
Symbol 197 MovieClip [UZI] Frame 1
stop();
Symbol 197 MovieClip [UZI] Frame 2
this._parent._parent.play();
_root.addBullet(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation, this._parent._parent._parent.weapon.damage, this._parent._parent._parent.kick);
_root.addShell(this._parent._parent._parent._x, this._parent._parent._parent._y, this._parent._parent._parent._rotation);
if (this._parent._parent._parent.kick < this._parent._parent._parent.weapon.max_kick) {
this._parent._parent._parent.kick = this._parent._parent._parent.kick + this._parent._parent._parent.weapon.kickback;
} else {
this._parent._parent._parent.kick = this._parent._parent._parent.weapon.max_kick;
}
Symbol 198 MovieClip [MP5] Frame 1
stop();
Symbol 198 MovieClip [MP5] Frame 2
stop();
Symbol 198 MovieClip [MP5] Frame 3
stop();
Symbol 198 MovieClip [MP5] Frame 4
stop();
Symbol 198 MovieClip [MP5] Frame 5
stop();
Symbol 198 MovieClip [MP5] Frame 6
stop();
Symbol 198 MovieClip [MP5] Frame 7
stop();
Symbol 211 MovieClip [M_16_gr] Frame 1
stop();
Symbol 211 MovieClip [M_16_gr] Frame 2
stop();
Instance of Symbol 211 MovieClip [M_16_gr] "m4" in Symbol 212 MovieClip Frame 24
onClipEvent (enterFrame) {
if (this.hitTest(_root.guy.point2)) {
_root.AMMO4 = _root.AMMO4 + 9;
tellTarget (_root.bad3.dead.m4) {
gotoAndStop (2);
tellTarget (_root.showgun.m4) {
gotoAndPlay (2);
};
};
}
}
Symbol 212 MovieClip Frame 60
stop();
Symbol 213 MovieClip [BadGuy3] Frame 1
stop();
_root.dead3 = 0;
Symbol 213 MovieClip [BadGuy3] Frame 3
_root.addBullet3(this._x, this._y, this._rotation + 180);
Symbol 213 MovieClip [BadGuy3] Frame 8
gotoAndPlay (1);
Symbol 213 MovieClip [BadGuy3] Frame 9
stop();
_root.dead3 = 1;
_root.guyvisible3 = 0;
Symbol 213 MovieClip [BadGuy3] Frame 10
stop();
Symbol 218 MovieClip [AK_47_gr] Frame 1
stop();
Symbol 218 MovieClip [AK_47_gr] Frame 2
stop();
Instance of Symbol 218 MovieClip [AK_47_gr] "ak47" in Symbol 219 MovieClip Frame 24
onClipEvent (enterFrame) {
if (this.hitTest(_root.guy.point2)) {
_root.AMMO6 = _root.AMMO6 + 7;
tellTarget (_root.bad2.dead.ak47) {
gotoAndStop (2);
tellTarget (_root.showgun.ak47) {
gotoAndPlay (2);
};
};
}
}
Symbol 219 MovieClip Frame 60
stop();
Symbol 220 MovieClip [BadGuy2] Frame 1
stop();
_root.dead2 = 0;
Symbol 220 MovieClip [BadGuy2] Frame 3
_root.addBullet3(this._x, this._y, this._rotation + 180);
Symbol 220 MovieClip [BadGuy2] Frame 8
gotoAndPlay (1);
Symbol 220 MovieClip [BadGuy2] Frame 9
stop();
_root.dead2 = 1;
_root.guyvisible2 = 0;
Symbol 220 MovieClip [BadGuy2] Frame 10
stop();
_root.dead2 = 1;
_root.guyvisible2 = 0;
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 2
stop();
Instance of Symbol 224 MovieClip "mp5" in Symbol 225 MovieClip Frame 21
onClipEvent (enterFrame) {
if (this.hitTest(_root.guy)) {
_root.AMMO1 = _root.AMMO1 + 5;
}
tellTarget (_root.bad.dead.mp5) {
gotoAndStop (2);
};
}
Instance of Symbol 224 MovieClip "mp5" in Symbol 225 MovieClip Frame 22
onClipEvent (enterFrame) {
if (this.hitTest(_root.guy.point2)) {
_root.AMMO1 = _root.AMMO1 + 5;
tellTarget (_root.bad.dead.mp5) {
gotoAndStop (2);
tellTarget (_root.showgun.mp5) {
gotoAndPlay (2);
};
};
}
}
Symbol 225 MovieClip Frame 60
stop();
Symbol 226 MovieClip [BadGuy] Frame 1
stop();
_root.dead1 = 0;
Symbol 226 MovieClip [BadGuy] Frame 3
_root.addBullet3(this._x, this._y, this._rotation + 180);
Symbol 226 MovieClip [BadGuy] Frame 8
gotoAndPlay (1);
Symbol 226 MovieClip [BadGuy] Frame 9
stop();
_root.dead1 = 1;
_root.guyvisible = 0;
Symbol 226 MovieClip [BadGuy] Frame 10
stop();
Symbol 245 Button
on (press) {
_root.play();
}
Symbol 246 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 246 MovieClip Frame 2
gotoAndPlay (1);
Symbol 246 MovieClip Frame 3
stop();
Symbol 252 Button
on (release) {
getURL ("http://www.gamesreloaded.com", "_blank");
}
Symbol 264 MovieClip Frame 85
_root.play();
Symbol 266 Button
on (release) {
getURL ("http://flashground.net", "_blank");
}
Symbol 273 Button
on (release) {
gotoAndPlay (695);
}
Symbol 276 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 1
_root.moves = false;
Symbol 313 MovieClip Frame 1
stop();
_root.reload = 0;
Symbol 313 MovieClip Frame 2
_root.reload = 1;
Symbol 313 MovieClip Frame 3
_root.reload = 1;
Symbol 313 MovieClip Frame 6
Symbol 313 MovieClip Frame 12
gotoAndStop (1);
_root.reload = 0;
Symbol 313 MovieClip Frame 25
stop();
_root.reload = 0;
Symbol 313 MovieClip Frame 26
_root.reload = 1;
Symbol 313 MovieClip Frame 27
_root.reload = 1;
Symbol 313 MovieClip Frame 30
Symbol 313 MovieClip Frame 55
gotoAndStop (25);
_root.reload = 0;
Symbol 313 MovieClip Frame 57
stop();
_root.reload = 0;
Symbol 313 MovieClip Frame 58
_root.reload = 1;
Symbol 313 MovieClip Frame 59
_root.reload = 1;
Symbol 313 MovieClip Frame 62
_root.bulletsleft = _root.bulletsleft + 1;
_root.ammo1 = _root.ammo1 - 1;
Symbol 313 MovieClip Frame 77
gotoAndStop (57);
_root.reload = 0;
Symbol 313 MovieClip Frame 79
stop();
_root.reload = 0;
Symbol 313 MovieClip Frame 80
_root.reload = 1;
Symbol 313 MovieClip Frame 81
_root.reload = 1;
Symbol 313 MovieClip Frame 82
_root.bulletsleft = _root.bulletsleft + 1;
_root.ammo1 = _root.ammo1 - 1;
Symbol 313 MovieClip Frame 88
gotoAndStop (79);
_root.reload = 0;
Symbol 313 MovieClip Frame 90
stop();
_root.reload = 0;
Symbol 313 MovieClip Frame 91
_root.reload = 1;
Symbol 313 MovieClip Frame 92
_root.reload = 1;
Symbol 313 MovieClip Frame 93
_root.bulletsleft = _root.bulletsleft + 1;
_root.ammo1 = _root.ammo1 - 1;
Symbol 313 MovieClip Frame 135
gotoAndStop (90);
_root.reload = 0;
Symbol 313 MovieClip Frame 137
stop();
_root.reload = 0;
Symbol 313 MovieClip Frame 138
_root.reload = 1;
Symbol 313 MovieClip Frame 139
_root.reload = 1;
Symbol 313 MovieClip Frame 140
_root.bulletsleft = _root.bulletsleft + 1;
_root.ammo1 = _root.ammo1 - 1;
Symbol 313 MovieClip Frame 146
gotoAndStop (137);
_root.reload = 0;
Symbol 313 MovieClip Frame 149
stop();
_root.reload = 0;
Symbol 313 MovieClip Frame 150
_root.reload = 1;
Symbol 313 MovieClip Frame 151
_root.reload = 1;
Symbol 313 MovieClip Frame 152
_root.bulletsleft = _root.bulletsleft + 1;
_root.ammo1 = _root.ammo1 - 1;
Symbol 313 MovieClip Frame 157
_root.reload = 0;
Symbol 313 MovieClip Frame 158
gotoAndPlay (149);
Symbol 317 MovieClip Frame 1
_root.moves2 = false;
Symbol 318 MovieClip Frame 2
Symbol 332 Button
on (press) {
gotoAndPlay (704);
}
Symbol 336 Button
on (press) {
gotoAndPlay (701);
}
Symbol 340 Button
on (press) {
gotoAndPlay (702);
}
Symbol 344 Button
on (press) {
gotoAndPlay (703);
}
Symbol 348 Button
on (release) {
getURL ("http://gamesreloaded.com", "_blank");
}
Symbol 350 MovieClip Frame 11
stop();
Symbol 352 MovieClip Frame 10
stop();
Symbol 353 MovieClip Frame 10
stop();
Symbol 354 MovieClip Frame 1
stop();
Symbol 360 Button
on (press) {
gotoAndPlay (700);
}
Symbol 364 Button
on (release) {
_quality = "LOW";
}
Symbol 368 Button
on (release) {
_quality = "MEDIUM";
}
Symbol 372 Button
on (release) {
_quality = "BEST";
}
Symbol 374 Button
on (press) {
gotoAndPlay (700);
}
Symbol 378 Button
on (press) {
_root.difficult = 2;
gotoAndPlay (705);
stopAllSounds();
}
Symbol 382 Button
on (press) {
_root.difficult = 4;
gotoAndPlay (705);
}
Symbol 386 Button
on (press) {
_root.difficult = 6;
gotoAndPlay (705);
}
Symbol 390 Button
on (press) {
_root.difficult = 8;
gotoAndPlay (705);
}
Symbol 395 MovieClip Frame 1
stop();
Symbol 398 MovieClip Frame 1
stop();
Symbol 401 MovieClip Frame 1
stop();
Symbol 404 MovieClip Frame 1
stop();
Symbol 407 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 16
stop();
Symbol 422 MovieClip Frame 1
if (_root.gun == 1) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (1);
};
}
if (_root.gun == 2) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (2);
};
}
if (_root.gun == 3) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (3);
};
}
if (_root.gun == 4) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (4);
};
}
if (_root.gun == 5) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (5);
};
}
if (_root.gun == 6) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (6);
};
}
if (_root.gun == 7) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (7);
};
}
stop();
_root.moves = true;
_root.moves2 = true;
Symbol 422 MovieClip Frame 2
if (_root.gun == 1) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (1);
};
}
if (_root.gun == 2) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (2);
};
}
if (_root.gun == 3) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (3);
};
}
if (_root.gun == 4) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (4);
};
}
if (_root.gun == 5) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (5);
};
}
if (_root.gun == 6) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (6);
};
}
if (_root.gun == 7) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (7);
};
}
Symbol 422 MovieClip Frame 6
gotoAndPlay (1);
Symbol 422 MovieClip Frame 15
if (_root.gun == 1) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (1);
};
}
if (_root.gun == 2) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (2);
};
}
if (_root.gun == 3) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (3);
};
}
if (_root.gun == 4) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (4);
};
}
if (_root.gun == 5) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (5);
};
}
if (_root.gun == 6) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (6);
};
}
if (_root.gun == 7) {
tellTarget (_root.guy.guy.guy.weapon) {
gotoAndStop (7);
};
}
Symbol 422 MovieClip Frame 18
gotoAndPlay (1);
Symbol 424 MovieClip Frame 1
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 2
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 3
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 4
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 5
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 6
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 7
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 8
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 9
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 10
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 11
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 12
_root.guyvisible = 0;
_root.guyvisible2 = 0;
_root.guyvisible3 = 0;
_root.guyvisible4 = 0;
_root.guyvisible5 = 0;
if (_root.herolifes < 1) {
_root.gotoAndPlay("dead");
}
Symbol 424 MovieClip Frame 13
if ((_root.bullettime == 0) & (_root.silence._width < 366)) {
_root.silence._width = _root.silence._width + 3;
_root.silences = _root.silences + 3;
}
if (_root.silence._width < 1) {
_root.bullettime = 0;
tellTarget (_root.slowmotion) {
gotoAndStop (1);
};
}
Symbol 434 Button
on (keyPress "<Space>") {
if (_root.silence._width > 1) {
tellTarget (_root.slowmotion) {
nextFrame();
};
}
}
Symbol 436 MovieClip Frame 1
_root.bullettime = 1;
Symbol 436 MovieClip Frame 2
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 3
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 4
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 5
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 6
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 7
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 8
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 9
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 10
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 11
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 12
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 13
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 436 MovieClip Frame 14
_root.silence._width = _root.silence._width - 1;
_root.silences = _root.silences - 1;
Symbol 437 Button
on (keyPress "<Space>") {
if (_root.moves == true) {
if (_root.silence._width > 1) {
tellTarget (_root.slowmotion) {
nextFrame();
};
}
}
}
Symbol 441 MovieClip Frame 1
stop();
_root.bullettime = 0;
Symbol 441 MovieClip Frame 2
stop();
Symbol 441 MovieClip Frame 3
play();
Symbol 441 MovieClip Frame 10
gotoAndStop (1);
_root.bullettime = 0;
Symbol 443 MovieClip Frame 1
stop();
Symbol 443 MovieClip Frame 2
play();
Symbol 483 MovieClip Frame 1
stop();
Instance of Symbol 482 MovieClip in Symbol 483 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.guy.hitTest(this)) {
tellTarget (_root.walls.door) {
gotoAndPlay (2);
};
}
}
Symbol 514 MovieClip Frame 1
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 2
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 3
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 4
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 5
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 6
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 7
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 8
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 9
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 10
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 11
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 12
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 13
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 14
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 15
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 16
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 17
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 18
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 19
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 20
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 21
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 22
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 23
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 24
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 25
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 26
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 27
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 28
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 29
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 30
_root.guyvisible6 = 0;
Symbol 514 MovieClip Frame 31
_root.guyvisible6 = 0;
Symbol 644 Button
on (press) {
gotoAndPlay (705);
}
Symbol 648 Button
on (release) {
getURL ("http://flashground.net", "_blank");
}
Symbol 652 Button
on (release) {
getURL ("http://gamesreloaded.com", "_blank");
}
Symbol 654 Button
on (release) {
getURL ("http://flashground.net", "_blank");
}
Symbol 655 Button
on (press) {
gotoAndPlay (700);
}
Symbol 662 MovieClip Frame 60
stop();
Symbol 667 Button
on (press) {
if (_root.saves == 1) {
_root.gotoAndPlay("runda1");
}
if (_root.saves == 2) {
_root.gotoAndPlay("runda6");
}
if (_root.saves == 3) {
_root.gotoAndPlay("runda8");
}
if (_root.saves == 4) {
_root.gotoAndPlay("runda12");
}
if (_root.saves == 5) {
_root.gotoAndPlay("runda15");
}
if (_root.saves == 6) {
_root.gotoAndPlay("runda19");
}
}
Symbol 672 Button
on (press) {
gotoAndPlay (700);
}
Symbol 673 Button
on (press) {
gotoAndPlay (700);
}