Frame 1
if (getBytesLoaded() == getBytesTotal()) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
remove = true;
_root._x = 0;
_root._y = 0;
Frame 22
remove = true;
_root._x = 0;
_root._y = 0;
stop();
remove = true;
Frame 42
remove = true;
_root._x = 0;
_root._y = 0;
Frame 43
grav = 0.3;
expTargetX = 0;
expTargetY = 0;
expSize = 0;
id = 0;
timeScale = 1;
grenadeAmmo = 6;
score = 0;
slowMo = 100;
goal = 30;
remove = false;
_root._x = 0;
_root._y = 0;
stop();
Instance of Symbol 44 MovieClip in Frame 43
onClipEvent (enterFrame) {
if (_x < (_root.hud._x - 159)) {
_x = _root.hud._x;
} else if (_x > (_root.hud._x + 159)) {
_x = _root.hud._x;
}
if (_y < (_root.hud._y - 320)) {
_y = _root.hud._y;
} else if (_y > (_root.hud._y + 320)) {
_y = _root.hud._y;
}
if (_root.remove == true) {
removeMovieClip(this);
}
}
Instance of Symbol 54 MovieClip "space" in Frame 43
onClipEvent (load) {
targetX = 0;
targetY = 0;
}
onClipEvent (enterFrame) {
targetX = 275 - (_root.player._x - (((_root.player._x - _root.aim._x) * 0.8) / 2));
targetY = 200 - (_root.player._y - (((_root.player._y - _root.aim._y) * 0.8) / 2));
_root._x = _root._x - ((_root._x - targetX) / 6);
_root._y = _root._y - ((_root._y - targetY) / 6);
_root.hud._x = 275 - _root._x;
_root.hud._y = 200 - _root._y;
if (_root.remove == true) {
removeMovieClip(this);
}
}
Instance of Symbol 55 MovieClip "bars" in Frame 43
on (keyPress "e") {
if (_root.slowMo > 99) {
_root.timeScale = 0.3;
}
}
on (keyPress "q") {
toggleHighQuality();
}
on (keyPress "g") {
if (_root.player.life > 0) {
if (_root.player.id3 < 130) {
if (_root.grenadeAmmo > 0) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.grenade, "grenade" + _root.player.id3, _root.player.id3 + 1);
_root["grenade" + _root.player.id3].targetC = _root.player;
_root.grenadeAmmo = _root.grenadeAmmo - 1;
}
} else {
_root.player.id3 = 100;
}
}
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
if (_root.timeScale < 1) {
_root.slowMo = _root.slowMo - 1;
} else if (_root.slowMo < 100) {
_root.slowMo = _root.slowMo + 0.2;
}
if (_root.slowMo < 1) {
_root.timeScale = 1;
}
_x = _root.player._x;
_y = _root.player._y;
show = _root.player.life;
show2 = _root.player.yspeed;
if (_root.player.life < 0) {
_root.player.life = 0;
}
}
Instance of Symbol 85 MovieClip in Frame 43
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.4;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 0;
id3 = 0;
this.swapDepths(250);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
moveRight = false;
moveLeft = true;
jetPack = false;
jump = true;
spotted = false;
interestX = 0;
interestY = 0;
interestLevel = 0;
moveRLast = true;
v1x = 0;
v1y = 0;
v2x = 0;
v2y = 0;
v3x = 0;
v3y = 0;
v4x = 0;
v4y = 0;
v5x = 0;
v5y = 0;
life = 30;
timeScale = 0;
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
if (_root.remove == true) {
removeMovieClip(this);
}
var pan = 0;
var vol = 0;
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
shotSound.setPan(pan);
shotSound.setVolume(vol);
if (_root.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (dist < (_root.sound.size * 2)) {
life = life - (((_root.sound.size * 2) - dist) / 4);
}
}
if (yspeed > 14) {
yspeed = 14;
}
_x = (_x + xspeed);
_y = (_y + yspeed);
var angle = 0;
var x1 = _x;
var y1 = _y;
var x2 = interestX;
var y2 = interestY;
if (interestLevel < 1) {
interestX = _x + xspeed;
interestY = _y;
}
x2 = interestX;
y2 = interestY;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
v1x = _x - (Math.cos(angle) * 100);
v1y = _y - (Math.sin(angle) * 100);
v2x = _x - (Math.cos(angle) * 150);
v2y = _y - (Math.sin(angle) * 150);
v4x = _x - (Math.cos(angle) * 200);
v4y = _y - (Math.sin(angle) * 200);
v5x = _x - (Math.cos(angle) * 240);
v5y = _y - (Math.sin(angle) * 240);
v3x = _x - (Math.cos(angle) * 30);
v3y = _y - (Math.sin(angle) * 30);
if (_root.space.hitTest(v1x, v1y, true) and _root.space.hitTest(v3x, v3y, true)) {
if (_root.space.hitTest(v2x, v2y, true)) {
if (_root.space.hitTest(v4x, v4y, true)) {
if (_root.space.hitTest(v5x, v5y, true)) {
vision.gotoAndStop(5);
} else {
vision.gotoAndStop(4);
}
} else {
vision.gotoAndStop(3);
}
} else {
vision.gotoAndStop(2);
}
} else {
vision.gotoAndStop(1);
}
if (life > 0) {
if (interestLevel > 100) {
if (_root.space.hitTest(v3x, v3y, true)) {
if ((random(Math.round(10 / _root.timeScale)) == 1) and (vision.reaction > 8)) {
if (_root.player.id3 < 130) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.bullet, "bullet" + _root.player.id3, _root.player.id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
weapon.flare.gotoAndPlay(2);
_root.sound.owner = this;
shotSound = new Sound(this);
shotSound.attachSound("shot1");
shotSound.start(0, 1);
} else {
_root.player.id3 = 100;
}
}
if (vision._currentframe < 2) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
yspeed = -6 * _root.timeScale;
}
}
} else {
if (interestY > _y) {
interestY = interestY - 5;
}
if (interestX > _x) {
interestX = interestX + 5;
} else {
interestX = interestX - 5;
}
}
}
if (_root.space.hitTest(_x - 20, _y, true)) {
} else if ((_root.space.hitTest(_x - 20, _y - 120, true) and (xspeed < 0)) || (_root.space.hitTest(_x - 20, _y - 80, true) and (xspeed < 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = false;
moveRight = true;
moveRLast = true;
}
if (_root.space.hitTest(_x + 20, _y, true)) {
} else if ((_root.space.hitTest(_x + 20, _y - 120, true) and (xspeed > 0)) || (_root.space.hitTest(_x + 20, _y - 80, true) and (xspeed > 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = true;
moveRight = false;
moveRLast = false;
}
if (_root.space.hitTest(_x - 30, _y + 80, true) and _root.space.hitTest(_x - 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveLeft == true)) {
interestLevel = 50;
interestX = _x - 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX < _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = true;
moveLeft = false;
moveRLast = true;
}
}
}
if (_root.space.hitTest(_x + 30, _y + 80, true) and _root.space.hitTest(_x + 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveRight == true)) {
interestLevel = 50;
interestX = _x + 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX > _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = false;
moveLeft = true;
moveRLast = false;
}
}
}
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (interestLevel == 0) {
if ((moveLeft == false) and (moveRight == false)) {
if (moveRLast == true) {
moveLeft = true;
moveRight = false;
} else {
moveLeft = false;
moveRight = true;
}
}
}
if (spotted == false) {
if (xspeed < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else if (_x > interestX) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 5);
yspeed = 0;
}
if (timeScale != _root.timeScale) {
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
timeScale = _root.timeScale;
}
if ((moveRight == true) and (xspeed < (2 * _root.timeScale))) {
xspeed = xspeed + (speed * _root.timeScale);
}
if ((moveLeft == true) and (xspeed > (-2 * _root.timeScale))) {
xspeed = xspeed - (speed * _root.timeScale);
}
if ((jetPack == true) and (yspeed > -4)) {
yspeed = yspeed - (jetPack * _root.timeScale);
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
}
if ((moveRight == true) || (moveLeft == true)) {
ani.play();
} else {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.97;
xspeed = xspeed * 0.97;
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + _root.player.id2, _root.player.id2 + 1);
_root["bubbles" + _root.player.id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.splash, "splash" + _root.player.id2, _root.player.id2 + 1);
_root["splash" + id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (moveLeft == true) {
_rotation = -60;
} else {
_rotation = 60;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + (grav * _root.timeScale);
}
} else {
if (yspeed > (10 * _root.timeScale)) {
life = life - Math.round(yspeed / _root.timeScale);
}
if (jump == true) {
yspeed = jump * _root.timeScale;
jump = false;
}
if ((moveRight == true) || (moveLeft == true)) {
} else {
xspeed = xspeed * 0.7;
}
i = 0;
while (i < 15) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 85 MovieClip "eneTest" in Frame 43
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.4;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 0;
id3 = 0;
this.swapDepths(250);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
moveRight = false;
moveLeft = true;
jetPack = false;
jump = true;
spotted = false;
interestX = 0;
interestY = 0;
interestLevel = 0;
moveRLast = true;
v1x = 0;
v1y = 0;
v2x = 0;
v2y = 0;
v3x = 0;
v3y = 0;
v4x = 0;
v4y = 0;
v5x = 0;
v5y = 0;
life = 30;
timeScale = 0;
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
if (_root.remove == true) {
removeMovieClip(this);
}
var pan = 0;
var vol = 0;
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
shotSound.setPan(pan);
shotSound.setVolume(vol);
if (_root.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (dist < (_root.sound.size * 2)) {
life = life - (((_root.sound.size * 2) - dist) / 4);
}
}
if (yspeed > 14) {
yspeed = 14;
}
_x = (_x + xspeed);
_y = (_y + yspeed);
var angle = 0;
var x1 = _x;
var y1 = _y;
var x2 = interestX;
var y2 = interestY;
if (interestLevel < 1) {
interestX = _x + xspeed;
interestY = _y;
}
x2 = interestX;
y2 = interestY;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
v1x = _x - (Math.cos(angle) * 100);
v1y = _y - (Math.sin(angle) * 100);
v2x = _x - (Math.cos(angle) * 150);
v2y = _y - (Math.sin(angle) * 150);
v4x = _x - (Math.cos(angle) * 200);
v4y = _y - (Math.sin(angle) * 200);
v5x = _x - (Math.cos(angle) * 240);
v5y = _y - (Math.sin(angle) * 240);
v3x = _x - (Math.cos(angle) * 30);
v3y = _y - (Math.sin(angle) * 30);
if (_root.space.hitTest(v1x, v1y, true) and _root.space.hitTest(v3x, v3y, true)) {
if (_root.space.hitTest(v2x, v2y, true)) {
if (_root.space.hitTest(v4x, v4y, true)) {
if (_root.space.hitTest(v5x, v5y, true)) {
vision.gotoAndStop(5);
} else {
vision.gotoAndStop(4);
}
} else {
vision.gotoAndStop(3);
}
} else {
vision.gotoAndStop(2);
}
} else {
vision.gotoAndStop(1);
}
if (life > 0) {
if (interestLevel > 100) {
if (_root.space.hitTest(v3x, v3y, true)) {
if ((random(Math.round(10 / _root.timeScale)) == 1) and (vision.reaction > 8)) {
if (_root.player.id3 < 130) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.bullet, "bullet" + _root.player.id3, _root.player.id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
weapon.flare.gotoAndPlay(2);
_root.sound.owner = this;
shotSound = new Sound(this);
shotSound.attachSound("shot1");
shotSound.start(0, 1);
} else {
_root.player.id3 = 100;
}
}
if (vision._currentframe < 2) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
yspeed = -6 * _root.timeScale;
}
}
} else {
if (interestY > _y) {
interestY = interestY - 5;
}
if (interestX > _x) {
interestX = interestX + 5;
} else {
interestX = interestX - 5;
}
}
}
if (_root.space.hitTest(_x - 20, _y, true)) {
} else if ((_root.space.hitTest(_x - 20, _y - 120, true) and (xspeed < 0)) || (_root.space.hitTest(_x - 20, _y - 80, true) and (xspeed < 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = false;
moveRight = true;
moveRLast = true;
}
if (_root.space.hitTest(_x + 20, _y, true)) {
} else if ((_root.space.hitTest(_x + 20, _y - 120, true) and (xspeed > 0)) || (_root.space.hitTest(_x + 20, _y - 80, true) and (xspeed > 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = true;
moveRight = false;
moveRLast = false;
}
if (_root.space.hitTest(_x - 30, _y + 80, true) and _root.space.hitTest(_x - 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveLeft == true)) {
interestLevel = 50;
interestX = _x - 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX < _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = true;
moveLeft = false;
moveRLast = true;
}
}
}
if (_root.space.hitTest(_x + 30, _y + 80, true) and _root.space.hitTest(_x + 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveRight == true)) {
interestLevel = 50;
interestX = _x + 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX > _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = false;
moveLeft = true;
moveRLast = false;
}
}
}
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (interestLevel == 0) {
if ((moveLeft == false) and (moveRight == false)) {
if (moveRLast == true) {
moveLeft = true;
moveRight = false;
} else {
moveLeft = false;
moveRight = true;
}
}
}
if (spotted == false) {
if (xspeed < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else if (_x > interestX) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 5);
yspeed = 0;
}
if (timeScale != _root.timeScale) {
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
timeScale = _root.timeScale;
}
if ((moveRight == true) and (xspeed < (2 * _root.timeScale))) {
xspeed = xspeed + (speed * _root.timeScale);
}
if ((moveLeft == true) and (xspeed > (-2 * _root.timeScale))) {
xspeed = xspeed - (speed * _root.timeScale);
}
if ((jetPack == true) and (yspeed > -4)) {
yspeed = yspeed - (jetPack * _root.timeScale);
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
}
if ((moveRight == true) || (moveLeft == true)) {
ani.play();
} else {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.97;
xspeed = xspeed * 0.97;
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + _root.player.id2, _root.player.id2 + 1);
_root["bubbles" + _root.player.id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.splash, "splash" + _root.player.id2, _root.player.id2 + 1);
_root["splash" + id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (moveLeft == true) {
_rotation = -60;
} else {
_rotation = 60;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + (grav * _root.timeScale);
}
} else {
if (yspeed > (10 * _root.timeScale)) {
life = life - Math.round(yspeed / _root.timeScale);
}
if (jump == true) {
yspeed = jump * _root.timeScale;
jump = false;
}
if ((moveRight == true) || (moveLeft == true)) {
} else {
xspeed = xspeed * 0.7;
}
i = 0;
while (i < 15) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 85 MovieClip in Frame 43
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.4;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 0;
id3 = 0;
this.swapDepths(250);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
moveRight = false;
moveLeft = true;
jetPack = false;
jump = true;
spotted = false;
interestX = 0;
interestY = 0;
interestLevel = 0;
moveRLast = true;
v1x = 0;
v1y = 0;
v2x = 0;
v2y = 0;
v3x = 0;
v3y = 0;
v4x = 0;
v4y = 0;
v5x = 0;
v5y = 0;
life = 30;
timeScale = 0;
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
if (_root.remove == true) {
removeMovieClip(this);
}
var pan = 0;
var vol = 0;
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
shotSound.setPan(pan);
shotSound.setVolume(vol);
if (_root.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (dist < (_root.sound.size * 2)) {
life = life - (((_root.sound.size * 2) - dist) / 4);
}
}
if (yspeed > 14) {
yspeed = 14;
}
_x = (_x + xspeed);
_y = (_y + yspeed);
var angle = 0;
var x1 = _x;
var y1 = _y;
var x2 = interestX;
var y2 = interestY;
if (interestLevel < 1) {
interestX = _x + xspeed;
interestY = _y;
}
x2 = interestX;
y2 = interestY;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
v1x = _x - (Math.cos(angle) * 100);
v1y = _y - (Math.sin(angle) * 100);
v2x = _x - (Math.cos(angle) * 150);
v2y = _y - (Math.sin(angle) * 150);
v4x = _x - (Math.cos(angle) * 200);
v4y = _y - (Math.sin(angle) * 200);
v5x = _x - (Math.cos(angle) * 240);
v5y = _y - (Math.sin(angle) * 240);
v3x = _x - (Math.cos(angle) * 30);
v3y = _y - (Math.sin(angle) * 30);
if (_root.space.hitTest(v1x, v1y, true) and _root.space.hitTest(v3x, v3y, true)) {
if (_root.space.hitTest(v2x, v2y, true)) {
if (_root.space.hitTest(v4x, v4y, true)) {
if (_root.space.hitTest(v5x, v5y, true)) {
vision.gotoAndStop(5);
} else {
vision.gotoAndStop(4);
}
} else {
vision.gotoAndStop(3);
}
} else {
vision.gotoAndStop(2);
}
} else {
vision.gotoAndStop(1);
}
if (life > 0) {
if (interestLevel > 100) {
if (_root.space.hitTest(v3x, v3y, true)) {
if ((random(Math.round(10 / _root.timeScale)) == 1) and (vision.reaction > 8)) {
if (_root.player.id3 < 130) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.bullet, "bullet" + _root.player.id3, _root.player.id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
weapon.flare.gotoAndPlay(2);
_root.sound.owner = this;
shotSound = new Sound(this);
shotSound.attachSound("shot1");
shotSound.start(0, 1);
} else {
_root.player.id3 = 100;
}
}
if (vision._currentframe < 2) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
yspeed = -6 * _root.timeScale;
}
}
} else {
if (interestY > _y) {
interestY = interestY - 5;
}
if (interestX > _x) {
interestX = interestX + 5;
} else {
interestX = interestX - 5;
}
}
}
if (_root.space.hitTest(_x - 20, _y, true)) {
} else if ((_root.space.hitTest(_x - 20, _y - 120, true) and (xspeed < 0)) || (_root.space.hitTest(_x - 20, _y - 80, true) and (xspeed < 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = false;
moveRight = true;
moveRLast = true;
}
if (_root.space.hitTest(_x + 20, _y, true)) {
} else if ((_root.space.hitTest(_x + 20, _y - 120, true) and (xspeed > 0)) || (_root.space.hitTest(_x + 20, _y - 80, true) and (xspeed > 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = true;
moveRight = false;
moveRLast = false;
}
if (_root.space.hitTest(_x - 30, _y + 80, true) and _root.space.hitTest(_x - 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveLeft == true)) {
interestLevel = 50;
interestX = _x - 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX < _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = true;
moveLeft = false;
moveRLast = true;
}
}
}
if (_root.space.hitTest(_x + 30, _y + 80, true) and _root.space.hitTest(_x + 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveRight == true)) {
interestLevel = 50;
interestX = _x + 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX > _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = false;
moveLeft = true;
moveRLast = false;
}
}
}
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (interestLevel == 0) {
if ((moveLeft == false) and (moveRight == false)) {
if (moveRLast == true) {
moveLeft = true;
moveRight = false;
} else {
moveLeft = false;
moveRight = true;
}
}
}
if (spotted == false) {
if (xspeed < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else if (_x > interestX) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 5);
yspeed = 0;
}
if (timeScale != _root.timeScale) {
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
timeScale = _root.timeScale;
}
if ((moveRight == true) and (xspeed < (2 * _root.timeScale))) {
xspeed = xspeed + (speed * _root.timeScale);
}
if ((moveLeft == true) and (xspeed > (-2 * _root.timeScale))) {
xspeed = xspeed - (speed * _root.timeScale);
}
if ((jetPack == true) and (yspeed > -4)) {
yspeed = yspeed - (jetPack * _root.timeScale);
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
}
if ((moveRight == true) || (moveLeft == true)) {
ani.play();
} else {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.97;
xspeed = xspeed * 0.97;
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + _root.player.id2, _root.player.id2 + 1);
_root["bubbles" + _root.player.id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.splash, "splash" + _root.player.id2, _root.player.id2 + 1);
_root["splash" + id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (moveLeft == true) {
_rotation = -60;
} else {
_rotation = 60;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + (grav * _root.timeScale);
}
} else {
if (yspeed > (10 * _root.timeScale)) {
life = life - Math.round(yspeed / _root.timeScale);
}
if (jump == true) {
yspeed = jump * _root.timeScale;
jump = false;
}
if ((moveRight == true) || (moveLeft == true)) {
} else {
xspeed = xspeed * 0.7;
}
i = 0;
while (i < 15) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 85 MovieClip in Frame 43
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.4;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 0;
id3 = 0;
this.swapDepths(250);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
moveRight = false;
moveLeft = true;
jetPack = false;
jump = true;
spotted = false;
interestX = 0;
interestY = 0;
interestLevel = 0;
moveRLast = true;
v1x = 0;
v1y = 0;
v2x = 0;
v2y = 0;
v3x = 0;
v3y = 0;
v4x = 0;
v4y = 0;
v5x = 0;
v5y = 0;
life = 30;
timeScale = 0;
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
if (_root.remove == true) {
removeMovieClip(this);
}
var pan = 0;
var vol = 0;
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
shotSound.setPan(pan);
shotSound.setVolume(vol);
if (_root.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (dist < (_root.sound.size * 2)) {
life = life - (((_root.sound.size * 2) - dist) / 4);
}
}
if (yspeed > 14) {
yspeed = 14;
}
_x = (_x + xspeed);
_y = (_y + yspeed);
var angle = 0;
var x1 = _x;
var y1 = _y;
var x2 = interestX;
var y2 = interestY;
if (interestLevel < 1) {
interestX = _x + xspeed;
interestY = _y;
}
x2 = interestX;
y2 = interestY;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
v1x = _x - (Math.cos(angle) * 100);
v1y = _y - (Math.sin(angle) * 100);
v2x = _x - (Math.cos(angle) * 150);
v2y = _y - (Math.sin(angle) * 150);
v4x = _x - (Math.cos(angle) * 200);
v4y = _y - (Math.sin(angle) * 200);
v5x = _x - (Math.cos(angle) * 240);
v5y = _y - (Math.sin(angle) * 240);
v3x = _x - (Math.cos(angle) * 30);
v3y = _y - (Math.sin(angle) * 30);
if (_root.space.hitTest(v1x, v1y, true) and _root.space.hitTest(v3x, v3y, true)) {
if (_root.space.hitTest(v2x, v2y, true)) {
if (_root.space.hitTest(v4x, v4y, true)) {
if (_root.space.hitTest(v5x, v5y, true)) {
vision.gotoAndStop(5);
} else {
vision.gotoAndStop(4);
}
} else {
vision.gotoAndStop(3);
}
} else {
vision.gotoAndStop(2);
}
} else {
vision.gotoAndStop(1);
}
if (life > 0) {
if (interestLevel > 100) {
if (_root.space.hitTest(v3x, v3y, true)) {
if ((random(Math.round(10 / _root.timeScale)) == 1) and (vision.reaction > 8)) {
if (_root.player.id3 < 130) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.bullet, "bullet" + _root.player.id3, _root.player.id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
weapon.flare.gotoAndPlay(2);
_root.sound.owner = this;
shotSound = new Sound(this);
shotSound.attachSound("shot1");
shotSound.start(0, 1);
} else {
_root.player.id3 = 100;
}
}
if (vision._currentframe < 2) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
yspeed = -6 * _root.timeScale;
}
}
} else {
if (interestY > _y) {
interestY = interestY - 5;
}
if (interestX > _x) {
interestX = interestX + 5;
} else {
interestX = interestX - 5;
}
}
}
if (_root.space.hitTest(_x - 20, _y, true)) {
} else if ((_root.space.hitTest(_x - 20, _y - 120, true) and (xspeed < 0)) || (_root.space.hitTest(_x - 20, _y - 80, true) and (xspeed < 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = false;
moveRight = true;
moveRLast = true;
}
if (_root.space.hitTest(_x + 20, _y, true)) {
} else if ((_root.space.hitTest(_x + 20, _y - 120, true) and (xspeed > 0)) || (_root.space.hitTest(_x + 20, _y - 80, true) and (xspeed > 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = true;
moveRight = false;
moveRLast = false;
}
if (_root.space.hitTest(_x - 30, _y + 80, true) and _root.space.hitTest(_x - 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveLeft == true)) {
interestLevel = 50;
interestX = _x - 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX < _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = true;
moveLeft = false;
moveRLast = true;
}
}
}
if (_root.space.hitTest(_x + 30, _y + 80, true) and _root.space.hitTest(_x + 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveRight == true)) {
interestLevel = 50;
interestX = _x + 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX > _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = false;
moveLeft = true;
moveRLast = false;
}
}
}
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (interestLevel == 0) {
if ((moveLeft == false) and (moveRight == false)) {
if (moveRLast == true) {
moveLeft = true;
moveRight = false;
} else {
moveLeft = false;
moveRight = true;
}
}
}
if (spotted == false) {
if (xspeed < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else if (_x > interestX) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 5);
yspeed = 0;
}
if (timeScale != _root.timeScale) {
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
timeScale = _root.timeScale;
}
if ((moveRight == true) and (xspeed < (2 * _root.timeScale))) {
xspeed = xspeed + (speed * _root.timeScale);
}
if ((moveLeft == true) and (xspeed > (-2 * _root.timeScale))) {
xspeed = xspeed - (speed * _root.timeScale);
}
if ((jetPack == true) and (yspeed > -4)) {
yspeed = yspeed - (jetPack * _root.timeScale);
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
}
if ((moveRight == true) || (moveLeft == true)) {
ani.play();
} else {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.97;
xspeed = xspeed * 0.97;
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + _root.player.id2, _root.player.id2 + 1);
_root["bubbles" + _root.player.id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.splash, "splash" + _root.player.id2, _root.player.id2 + 1);
_root["splash" + id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (moveLeft == true) {
_rotation = -60;
} else {
_rotation = 60;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + (grav * _root.timeScale);
}
} else {
if (yspeed > (10 * _root.timeScale)) {
life = life - Math.round(yspeed / _root.timeScale);
}
if (jump == true) {
yspeed = jump * _root.timeScale;
jump = false;
}
if ((moveRight == true) || (moveLeft == true)) {
} else {
xspeed = xspeed * 0.7;
}
i = 0;
while (i < 15) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 121 MovieClip "player" in Frame 43
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.2;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 20;
id3 = 100;
this.swapDepths(300);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
life = 100;
soundDone = false;
jetFuel = 500;
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 10);
yspeed = 0;
}
if (_root.sound.type == 2) {
var distance = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (distance < _root.sound.size) {
life = life - Math.round((_root.sound.size - distance) / 2);
}
}
ani.body.gotoAndStop(1);
ani.legF.gotoAndStop(1);
ani.legB.gotoAndStop(1);
weapon.armF.gotoAndStop(1);
tell = _x;
_x = (_x + xspeed);
_y = (_y + yspeed);
if (life > 0) {
if (Key.isDown(87)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (yspeed < 5) {
ani.gotoAndStop(5);
yspeed = jump;
}
}
if (Key.isDown(68) || (Key.isDown(65))) {
} else if (Key.isDown(83) and (ani._currentframe < 40)) {
ani.gotoAndPlay(41);
}
}
if (life > 0) {
this.onMouseDown = function () {
if (id3 < 130) {
id3 = id3 + 1;
if (weapon._currentframe == 6) {
duplicateMovieClip (_root.bullet, "bullet" + id3, id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
_root["bullet" + _root.player.id3]._alpha = 100;
_root.sound.owned = 0;
_root.sound.type = 1;
_root.sound.owner = this;
weapon.play();
weapon.flare.gotoAndPlay(6);
}
} else {
id3 = 100;
}
};
if (_root._xmouse < _x) {
_xscale = -100;
} else {
_xscale = 100;
}
if (Key.isDown(65) and (xspeed > -4)) {
xspeed = xspeed - speed;
}
if (Key.isDown(68) and (xspeed < 4)) {
xspeed = xspeed + speed;
}
if ((Key.isDown(32) and (yspeed > -4)) and (jetFuel > 0)) {
jetFuel = jetFuel - (5 * _root.timeScale);
if (soundDone == false) {
jetSound = new Sound(this);
jetSound.attachSound("flame");
jetSound.start(0, 99);
jetSound.setVolume(50);
soundDone = true;
}
yspeed = yspeed - jetPack;
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
} else {
soundDone = false;
jetSound.stop();
if (jetFuel < 500) {
jetFuel = jetFuel + (3 * _root.timeScale);
}
}
if (Key.isDown(68) || (Key.isDown(65))) {
ani.play();
} else if (ani._currentframe < 40) {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.95;
xspeed = xspeed * 0.97;
if (life > 0) {
if (Key.isDown(83) and (yspeed < 4)) {
yspeed = yspeed + speed;
}
if (Key.isDown(87) and (yspeed > -4)) {
yspeed = yspeed - speed;
ani.gotoAndStop(5);
}
}
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (id2 < 50) {
id2 = id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + id2, id2 + 1);
_root["bubbles" + id2].targetC = this;
} else {
id2 = 20;
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (id2 < 50) {
id2 = id2 + 1;
duplicateMovieClip (_root.splash, "splash" + id2, id2 + 1);
_root["splash" + id2].targetC = this;
} else {
id2 = 20;
}
}
}
if (life > 0) {
if (_root._xmouse < _x) {
_rotation = -60;
weapon._rotation = weapon._rotation - 60;
} else {
_rotation = 60;
weapon._rotation = weapon._rotation - 60;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (_root._xmouse < _x) {
_rotation = -30;
weapon._rotation = weapon._rotation - 30;
} else {
_rotation = 30;
weapon._rotation = weapon._rotation - 30;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + grav;
}
} else {
if (yspeed > 10) {
life = life - Math.round(yspeed);
}
if (Key.isDown(68) || (Key.isDown(65))) {
} else {
xspeed = xspeed * 0.9;
}
i = 0;
while (i < (yspeed + 15)) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 124 MovieClip "grenade" in Frame 43
onClipEvent (load) {
var targetC;
xspeed = -((_root.player._x - _root.aim._x) / 20);
yspeed = -((_root.player._y - _root.aim._y) / 20);
timer = 0;
show = 0;
_x = targetC._x;
_y = targetC._y;
if (_name == "grenade") {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
show = 100 - timer;
timer = timer + (1 * _root.timeScale);
_x = (_x + xspeed);
_y = (_y + yspeed);
xspeed = xspeed * 0.99;
yspeed = yspeed * 0.99;
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
if (yspeed > 0) {
if (_root.space.hitTest(_x, (_y + 5) + yspeed, true)) {
yspeed = yspeed + (_root.grav * _root.timeScale);
} else {
if (_root.space.hitTest(_x - (_width / 2), _y + 6, true)) {
xspeed = xspeed - 0.2;
}
if (_root.space.hitTest(_x + (_width / 2), _y + 6, true)) {
xspeed = xspeed + 0.2;
}
yspeed = -(yspeed * 0.4);
xspeed = xspeed * 0.9;
if (_root.space.hitTest(_x, _y + 2, true)) {
} else {
_y = (_y - 1);
}
}
} else if (_root.space.hitTest(_x, (_y - 5) + yspeed, true)) {
yspeed = yspeed + (_root.grav * _root.timeScale);
} else {
yspeed = -(yspeed * 0.5);
xspeed = xspeed * 0.9;
}
if (_root.space.hitTest(_x + xspeed, _y + 4, true) and _root.space.hitTest(_x + xspeed, _y - 4)) {
} else if (_root.space.hitTest(_x + xspeed, _y + 4, true)) {
xspeed = xspeed * 0.5;
if (xspeed > 0) {
yspeed = yspeed + xspeed;
} else {
yspeed = yspeed - xspeed;
}
} else if (_root.space.hitTest(_x + xspeed, _y - 4, true)) {
xspeed = xspeed * 0.5;
if (xspeed > 0) {
yspeed = yspeed - xspeed;
} else {
yspeed = yspeed + xspeed;
}
} else {
xspeed = -(xspeed * 0.5);
}
if (timer > 100) {
if (_name == "grenade") {
} else {
_root.id = _root.id + 1;
_root.player.id3 = _root.player.id3 + 1;
_root.expTargetX = _x;
_root.expTargetY = _y;
_root.expSize = 40;
duplicateMovieClip (_root.space.hole, "hole" + _root.id, _root.id + 1);
_root.expSize = 40;
duplicateMovieClip (_root.explosion, "explosion" + _root.player.id3, _root.player.id3 + 1);
_root["explosion" + _root.player.id3]._x = _x;
_root["explosion" + _root.player.id3]._y = _y;
_root["explosion" + _root.player.id3]._height = _root.expSize;
_root["explosion" + _root.player.id3]._width = _root.expSize;
_root["explosion" + _root.player.id3].sizeE = _root.expSize * 2;
this.removeMovieClip();
}
}
}
Instance of Symbol 126 MovieClip "rocket" in Frame 43
onClipEvent (load) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
_alpha = 100;
addX = _root.player.xspeed;
addY = _root.player.yspeed;
if (_name == "rocket") {
} else {
if (_root.player._xscale == 100) {
_x = (_root.player._x + _root.player.weapon._x);
} else {
_x = (_root.player._x - _root.player.weapon._x);
}
_y = _root.player._y;
}
speed = 20;
var angle = 0;
var x1 = _root._xmouse;
var y1 = _root._ymouse;
var x2 = _root.player._x;
var y2 = _root.player._y;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
_rotation = radiansToDegrees(angle);
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
speed = 20 * _root.timeScale;
_x = (_x + ((Math.cos(angle) * speed) + addX));
_y = (_y + ((Math.sin(angle) * speed) + addY));
if (_root.space.hitTest(_x, _y, true) and (_alpha == 100)) {
} else {
speed = 0;
_alpha = 0;
if (_name == "rocket") {
} else {
_root.id = _root.id + 1;
_root.expTargetX = _x;
_root.expTargetY = _y;
_root.expSize = 35;
duplicateMovieClip (_root.space.hole, "hole" + _root.id, _root.id + 1);
_root.expSize = 35;
this.removeMovieClip();
}
}
}
Instance of Symbol 129 MovieClip "water" in Frame 43
onClipEvent (enterFrame) {
this.swapDepths(400);
if (_root.remove == true) {
removeMovieClip(this);
}
}
Instance of Symbol 133 MovieClip "flame" in Frame 43
onClipEvent (load) {
var targetC;
if (_root.player._xscale == 100) {
_x = (targetC._x - 7);
} else {
_x = (targetC._x + 7);
}
_y = (targetC._y + 5);
gotoAndPlay (43);
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
_y = (_y + 2);
}
Instance of Symbol 135 MovieClip "bubbles" in Frame 43
onClipEvent (load) {
var targetC;
_rotation = random(360);
_x = ((targetC._x - 10) + random(20));
_y = ((targetC._y - 10) + random(20));
gotoAndPlay (43);
amount = 0;
if (targetC.xspeed > 0) {
amount = targetC.xspeed + targetC.yspeed;
} else {
amount = (-targetC.xspeed) + targetC.yspeed;
}
_width = (5 + amount);
_height = _width;
_alpha = (10 * amount);
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
_alpha = (_alpha - (1 * _root.timeScale));
_y = (_y - (2 * _root.timeScale));
if (_root.water.hitTest(_x, _y - (_height / 2), true)) {
} else {
_alpha = 0;
}
if ((_alpha < 1) and (_name != "bubbles")) {
removeMovieClip(this);
}
}
Instance of Symbol 137 MovieClip "bullet" in Frame 43
onClipEvent (load) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
var targetC;
var targetDX;
var targetDY;
if (targetC == _root.player) {
targetDX = _root.aim._x;
targetDY = _root.aim._y;
} else {
targetDX = targetC.interestX;
targetDY = targetC.interestY;
}
_alpha = 100;
addX = targetC.xspeed;
addY = targetC.yspeed;
if (targetC == _root.player) {
if (targetC._xscale == 100) {
_x = (targetC._x + targetC.weapon._x);
} else {
_x = (targetC._x - targetC.weapon._x);
}
_y = (targetC._y - targetC.weapon._y);
} else {
if (targetC._xscale == 100) {
_x = targetC._x;
} else {
_x = targetC._x;
}
_y = (targetC._y - 5);
}
speed = 20;
var angle = 0;
var x1 = targetDX;
var y1 = targetDY;
var x2 = targetC._x;
var y2 = targetC._y;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
_rotation = radiansToDegrees(angle);
_alpha = 100;
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
speed = 20 * _root.timeScale;
_x = (_x + (Math.cos(angle) * speed));
_y = (_y + (Math.sin(angle) * speed));
if (_root.space.hitTest(_x, _y, true) and (_alpha == 100)) {
} else {
speed = 0;
_alpha = 0;
}
if (_root.player.hitTest(_x, _y, true) and (targetC != _root.player)) {
if (_alpha > 0) {
_alpha = 0;
_root.player.life = _root.player.life - 5;
}
}
if ((_alpha < 1) and (_name != "bullet")) {
removeMovieClip(this);
}
}
Instance of Symbol 139 MovieClip "sound" in Frame 43
onClipEvent (load) {
owner = false;
owned = 0;
type = 1;
size = 1;
}
onClipEvent (enterFrame) {
if (owner != false) {
if (owned < 1) {
_x = owner._x;
_y = owner._y;
}
owned = owned + 1;
}
if (owned > 5) {
owner = false;
owned = 0;
type = 1;
_x = -999999;
}
}
Instance of Symbol 145 MovieClip "explosion" in Frame 43
onClipEvent (load) {
var sizeE;
var pan = 0;
var vol = 0;
if (_name == "explosion") {
_visible = false;
} else {
explosionSound = new Sound(this);
explosionSound.attachSound("explosion");
explosionSound.start(0, 0);
explosion2Sound = new Sound(this);
explosion2Sound.attachSound("explosionold");
explosion2Sound.start(0, 0);
}
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
explosion2Sound.setPan(pan);
explosion2Sound.setVolume(vol);
}
Instance of Symbol 151 MovieClip "splash" in Frame 43
onClipEvent (load) {
var targetC;
_x = targetC._x;
_y = _root.water._y;
gotoAndPlay (43);
}
Instance of Symbol 154 MovieClip "aim" in Frame 43
onClipEvent (enterFrame) {
startDrag (this, true);
Mouse.hide();
this.swapDepths(600);
if (_root.remove == true) {
removeMovieClip(this);
}
}
Instance of Symbol 163 MovieClip in Frame 43
onClipEvent (load) {
given = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true) and (given == false)) {
_root.score = _root.score + 10;
given = true;
_visible = false;
}
}
Instance of Symbol 163 MovieClip in Frame 43
onClipEvent (load) {
given = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true) and (given == false)) {
_root.score = _root.score + 10;
given = true;
_visible = false;
}
}
Instance of Symbol 163 MovieClip in Frame 43
onClipEvent (load) {
given = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true) and (given == false)) {
_root.score = _root.score + 10;
given = true;
_visible = false;
}
}
Instance of Symbol 174 MovieClip "hud" in Frame 43
onClipEvent (load) {
time = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(500);
if (_root.remove == true) {
removeMovieClip(this);
}
var time;
if (_root.score >= _root.goal) {
time = time + 1;
}
if (_root.player.life < 1) {
time = time + 1;
}
if ((time > 50) and (_root.player.life > 0)) {
_root.nextFrame();
} else if (time > 50) {
_root.nextFrame();
_root.nextFrame();
}
}
Frame 44
remove = true;
_root._x = 0;
_root._y = 0;
Mouse.show();
Instance of Symbol 175 MovieClip in Frame 44
onClipEvent (enterFrame) {
Mouse.show();
}
Frame 45
remove = true;
_root._x = 0;
_root._y = 0;
Mouse.show();
Frame 46
grav = 0.3;
expTargetX = 0;
expTargetY = 0;
expSize = 0;
id = 0;
timeScale = 1;
grenadeAmmo = 8;
score = 0;
slowMo = 100;
goal = 50;
remove = false;
_root._x = 0;
_root._y = 0;
stop();
Instance of Symbol 44 MovieClip in Frame 46
onClipEvent (enterFrame) {
if (_x < (_root.hud._x - 159)) {
_x = _root.hud._x;
} else if (_x > (_root.hud._x + 159)) {
_x = _root.hud._x;
}
if (_y < (_root.hud._y - 320)) {
_y = _root.hud._y;
} else if (_y > (_root.hud._y + 320)) {
_y = _root.hud._y;
}
if (_root.remove == true) {
removeMovieClip(this);
}
}
Instance of Symbol 53 MovieClip "hole" in Frame 46
onClipEvent (load) {
_rotation = 0;
_height = _root.expSize;
_width = _height;
_x = (_root.expTargetX - _root.space._x);
_y = (_root.expTargetY - _root.space._y);
}
Instance of Symbol 55 MovieClip "bars" in Frame 46
on (keyPress "e") {
if (_root.slowMo > 99) {
if (_root.timeScale == 1) {
_root.timeScale = 0.3;
} else {
_root.timeScale = 1;
}
}
}
on (keyPress "q") {
toggleHighQuality();
}
on (keyPress "g") {
if (_root.player.life > 0) {
if (_root.player.id3 < 130) {
if (_root.grenadeAmmo > 0) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.grenade, "grenade" + _root.player.id3, _root.player.id3 + 1);
_root["grenade" + _root.player.id3].targetC = _root.player;
_root.grenadeAmmo = _root.grenadeAmmo - 1;
}
} else {
_root.player.id3 = 100;
}
}
}
onClipEvent (enterFrame) {
if (_root.timeScale < 1) {
_root.slowMo = _root.slowMo - 1;
} else if (_root.slowMo < 100) {
_root.slowMo = _root.slowMo + 0.2;
}
if (_root.slowMo < 1) {
_root.timeScale = 1;
}
_x = _root.player._x;
_y = _root.player._y;
show = _root.player.life;
show2 = _root.player.yspeed;
if (_root.player.life < 0) {
_root.player.life = 0;
}
}
Instance of Symbol 189 MovieClip "space" in Frame 46
onClipEvent (load) {
targetX = 0;
targetY = 0;
}
onClipEvent (enterFrame) {
targetX = 275 - (_root.player._x - (((_root.player._x - _root.aim._x) * 0.8) / 2));
targetY = 200 - (_root.player._y - (((_root.player._y - _root.aim._y) * 0.8) / 2));
_root._x = _root._x - ((_root._x - targetX) / 6);
_root._y = _root._y - ((_root._y - targetY) / 6);
_root.hud._x = 275 - _root._x;
_root.hud._y = 200 - _root._y;
}
Instance of Symbol 85 MovieClip in Frame 46
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.4;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 0;
id3 = 0;
this.swapDepths(250);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
moveRight = false;
moveLeft = true;
jetPack = false;
jump = true;
spotted = false;
interestX = 0;
interestY = 0;
interestLevel = 0;
moveRLast = true;
v1x = 0;
v1y = 0;
v2x = 0;
v2y = 0;
v3x = 0;
v3y = 0;
v4x = 0;
v4y = 0;
v5x = 0;
v5y = 0;
life = 30;
timeScale = 0;
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
if (_root.remove == true) {
removeMovieClip(this);
}
var pan = 0;
var vol = 0;
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
shotSound.setPan(pan);
shotSound.setVolume(vol);
if (_root.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (dist < (_root.sound.size * 2)) {
life = life - (((_root.sound.size * 2) - dist) / 4);
}
}
if (yspeed > 14) {
yspeed = 14;
}
_x = (_x + xspeed);
_y = (_y + yspeed);
var angle = 0;
var x1 = _x;
var y1 = _y;
var x2 = interestX;
var y2 = interestY;
if (interestLevel < 1) {
interestX = _x + xspeed;
interestY = _y;
}
x2 = interestX;
y2 = interestY;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
v1x = _x - (Math.cos(angle) * 100);
v1y = _y - (Math.sin(angle) * 100);
v2x = _x - (Math.cos(angle) * 150);
v2y = _y - (Math.sin(angle) * 150);
v4x = _x - (Math.cos(angle) * 200);
v4y = _y - (Math.sin(angle) * 200);
v5x = _x - (Math.cos(angle) * 240);
v5y = _y - (Math.sin(angle) * 240);
v3x = _x - (Math.cos(angle) * 30);
v3y = _y - (Math.sin(angle) * 30);
if (_root.space.hitTest(v1x, v1y, true) and _root.space.hitTest(v3x, v3y, true)) {
if (_root.space.hitTest(v2x, v2y, true)) {
if (_root.space.hitTest(v4x, v4y, true)) {
if (_root.space.hitTest(v5x, v5y, true)) {
vision.gotoAndStop(5);
} else {
vision.gotoAndStop(4);
}
} else {
vision.gotoAndStop(3);
}
} else {
vision.gotoAndStop(2);
}
} else {
vision.gotoAndStop(1);
}
if (life > 0) {
if (interestLevel > 100) {
if (_root.space.hitTest(v3x, v3y, true)) {
if ((random(Math.round(10 / _root.timeScale)) == 1) and (vision.reaction > 8)) {
if (_root.player.id3 < 130) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.bullet, "bullet" + _root.player.id3, _root.player.id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
weapon.flare.gotoAndPlay(2);
_root.sound.owner = this;
shotSound = new Sound(this);
shotSound.attachSound("shot1");
shotSound.start(0, 1);
} else {
_root.player.id3 = 100;
}
}
if (vision._currentframe < 2) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
yspeed = -6 * _root.timeScale;
}
}
} else {
if (interestY > _y) {
interestY = interestY - 5;
}
if (interestX > _x) {
interestX = interestX + 5;
} else {
interestX = interestX - 5;
}
}
}
if (_root.space.hitTest(_x - 20, _y, true)) {
} else if ((_root.space.hitTest(_x - 20, _y - 120, true) and (xspeed < 0)) || (_root.space.hitTest(_x - 20, _y - 80, true) and (xspeed < 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = false;
moveRight = true;
moveRLast = true;
}
if (_root.space.hitTest(_x + 20, _y, true)) {
} else if ((_root.space.hitTest(_x + 20, _y - 120, true) and (xspeed > 0)) || (_root.space.hitTest(_x + 20, _y - 80, true) and (xspeed > 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = true;
moveRight = false;
moveRLast = false;
}
if (_root.space.hitTest(_x - 30, _y + 80, true) and _root.space.hitTest(_x - 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveLeft == true)) {
interestLevel = 50;
interestX = _x - 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX < _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = true;
moveLeft = false;
moveRLast = true;
}
}
}
if (_root.space.hitTest(_x + 30, _y + 80, true) and _root.space.hitTest(_x + 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveRight == true)) {
interestLevel = 50;
interestX = _x + 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX > _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = false;
moveLeft = true;
moveRLast = false;
}
}
}
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (interestLevel == 0) {
if ((moveLeft == false) and (moveRight == false)) {
if (moveRLast == true) {
moveLeft = true;
moveRight = false;
} else {
moveLeft = false;
moveRight = true;
}
}
}
if (spotted == false) {
if (xspeed < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else if (_x > interestX) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 5);
yspeed = 0;
}
if (timeScale != _root.timeScale) {
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
timeScale = _root.timeScale;
}
if ((moveRight == true) and (xspeed < (2 * _root.timeScale))) {
xspeed = xspeed + (speed * _root.timeScale);
}
if ((moveLeft == true) and (xspeed > (-2 * _root.timeScale))) {
xspeed = xspeed - (speed * _root.timeScale);
}
if ((jetPack == true) and (yspeed > -4)) {
yspeed = yspeed - (jetPack * _root.timeScale);
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
}
if ((moveRight == true) || (moveLeft == true)) {
ani.play();
} else {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.97;
xspeed = xspeed * 0.97;
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + _root.player.id2, _root.player.id2 + 1);
_root["bubbles" + _root.player.id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.splash, "splash" + _root.player.id2, _root.player.id2 + 1);
_root["splash" + id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (moveLeft == true) {
_rotation = -60;
} else {
_rotation = 60;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + (grav * _root.timeScale);
}
} else {
if (yspeed > (10 * _root.timeScale)) {
life = life - Math.round(yspeed / _root.timeScale);
}
if (jump == true) {
yspeed = jump * _root.timeScale;
jump = false;
}
if ((moveRight == true) || (moveLeft == true)) {
} else {
xspeed = xspeed * 0.7;
}
i = 0;
while (i < 15) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 85 MovieClip "eneTest" in Frame 46
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.4;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 0;
id3 = 0;
this.swapDepths(250);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
moveRight = false;
moveLeft = true;
jetPack = false;
jump = true;
spotted = false;
interestX = 0;
interestY = 0;
interestLevel = 0;
moveRLast = true;
v1x = 0;
v1y = 0;
v2x = 0;
v2y = 0;
v3x = 0;
v3y = 0;
v4x = 0;
v4y = 0;
v5x = 0;
v5y = 0;
life = 30;
timeScale = 0;
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
if (_root.remove == true) {
removeMovieClip(this);
}
var pan = 0;
var vol = 0;
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
shotSound.setPan(pan);
shotSound.setVolume(vol);
if (_root.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (dist < (_root.sound.size * 2)) {
life = life - (((_root.sound.size * 2) - dist) / 4);
}
}
if (yspeed > 14) {
yspeed = 14;
}
_x = (_x + xspeed);
_y = (_y + yspeed);
var angle = 0;
var x1 = _x;
var y1 = _y;
var x2 = interestX;
var y2 = interestY;
if (interestLevel < 1) {
interestX = _x + xspeed;
interestY = _y;
}
x2 = interestX;
y2 = interestY;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
v1x = _x - (Math.cos(angle) * 100);
v1y = _y - (Math.sin(angle) * 100);
v2x = _x - (Math.cos(angle) * 150);
v2y = _y - (Math.sin(angle) * 150);
v4x = _x - (Math.cos(angle) * 200);
v4y = _y - (Math.sin(angle) * 200);
v5x = _x - (Math.cos(angle) * 240);
v5y = _y - (Math.sin(angle) * 240);
v3x = _x - (Math.cos(angle) * 30);
v3y = _y - (Math.sin(angle) * 30);
if (_root.space.hitTest(v1x, v1y, true) and _root.space.hitTest(v3x, v3y, true)) {
if (_root.space.hitTest(v2x, v2y, true)) {
if (_root.space.hitTest(v4x, v4y, true)) {
if (_root.space.hitTest(v5x, v5y, true)) {
vision.gotoAndStop(5);
} else {
vision.gotoAndStop(4);
}
} else {
vision.gotoAndStop(3);
}
} else {
vision.gotoAndStop(2);
}
} else {
vision.gotoAndStop(1);
}
if (life > 0) {
if (interestLevel > 100) {
if (_root.space.hitTest(v3x, v3y, true)) {
if ((random(Math.round(10 / _root.timeScale)) == 1) and (vision.reaction > 8)) {
if (_root.player.id3 < 130) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.bullet, "bullet" + _root.player.id3, _root.player.id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
weapon.flare.gotoAndPlay(2);
_root.sound.owner = this;
shotSound = new Sound(this);
shotSound.attachSound("shot1");
shotSound.start(0, 1);
} else {
_root.player.id3 = 100;
}
}
if (vision._currentframe < 2) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
yspeed = -6 * _root.timeScale;
}
}
} else {
if (interestY > _y) {
interestY = interestY - 5;
}
if (interestX > _x) {
interestX = interestX + 5;
} else {
interestX = interestX - 5;
}
}
}
if (_root.space.hitTest(_x - 20, _y, true)) {
} else if ((_root.space.hitTest(_x - 20, _y - 120, true) and (xspeed < 0)) || (_root.space.hitTest(_x - 20, _y - 80, true) and (xspeed < 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = false;
moveRight = true;
moveRLast = true;
}
if (_root.space.hitTest(_x + 20, _y, true)) {
} else if ((_root.space.hitTest(_x + 20, _y - 120, true) and (xspeed > 0)) || (_root.space.hitTest(_x + 20, _y - 80, true) and (xspeed > 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = true;
moveRight = false;
moveRLast = false;
}
if (_root.space.hitTest(_x - 30, _y + 80, true) and _root.space.hitTest(_x - 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveLeft == true)) {
interestLevel = 50;
interestX = _x - 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX < _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = true;
moveLeft = false;
moveRLast = true;
}
}
}
if (_root.space.hitTest(_x + 30, _y + 80, true) and _root.space.hitTest(_x + 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveRight == true)) {
interestLevel = 50;
interestX = _x + 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX > _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = false;
moveLeft = true;
moveRLast = false;
}
}
}
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (interestLevel == 0) {
if ((moveLeft == false) and (moveRight == false)) {
if (moveRLast == true) {
moveLeft = true;
moveRight = false;
} else {
moveLeft = false;
moveRight = true;
}
}
}
if (spotted == false) {
if (xspeed < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else if (_x > interestX) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 5);
yspeed = 0;
}
if (timeScale != _root.timeScale) {
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
timeScale = _root.timeScale;
}
if ((moveRight == true) and (xspeed < (2 * _root.timeScale))) {
xspeed = xspeed + (speed * _root.timeScale);
}
if ((moveLeft == true) and (xspeed > (-2 * _root.timeScale))) {
xspeed = xspeed - (speed * _root.timeScale);
}
if ((jetPack == true) and (yspeed > -4)) {
yspeed = yspeed - (jetPack * _root.timeScale);
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
}
if ((moveRight == true) || (moveLeft == true)) {
ani.play();
} else {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.97;
xspeed = xspeed * 0.97;
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + _root.player.id2, _root.player.id2 + 1);
_root["bubbles" + _root.player.id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.splash, "splash" + _root.player.id2, _root.player.id2 + 1);
_root["splash" + id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (moveLeft == true) {
_rotation = -60;
} else {
_rotation = 60;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + (grav * _root.timeScale);
}
} else {
if (yspeed > (10 * _root.timeScale)) {
life = life - Math.round(yspeed / _root.timeScale);
}
if (jump == true) {
yspeed = jump * _root.timeScale;
jump = false;
}
if ((moveRight == true) || (moveLeft == true)) {
} else {
xspeed = xspeed * 0.7;
}
i = 0;
while (i < 15) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 85 MovieClip in Frame 46
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.4;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 0;
id3 = 0;
this.swapDepths(250);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
moveRight = false;
moveLeft = true;
jetPack = false;
jump = true;
spotted = false;
interestX = 0;
interestY = 0;
interestLevel = 0;
moveRLast = true;
v1x = 0;
v1y = 0;
v2x = 0;
v2y = 0;
v3x = 0;
v3y = 0;
v4x = 0;
v4y = 0;
v5x = 0;
v5y = 0;
life = 30;
timeScale = 0;
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
if (_root.remove == true) {
removeMovieClip(this);
}
var pan = 0;
var vol = 0;
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
shotSound.setPan(pan);
shotSound.setVolume(vol);
if (_root.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (dist < (_root.sound.size * 2)) {
life = life - (((_root.sound.size * 2) - dist) / 4);
}
}
if (yspeed > 14) {
yspeed = 14;
}
_x = (_x + xspeed);
_y = (_y + yspeed);
var angle = 0;
var x1 = _x;
var y1 = _y;
var x2 = interestX;
var y2 = interestY;
if (interestLevel < 1) {
interestX = _x + xspeed;
interestY = _y;
}
x2 = interestX;
y2 = interestY;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
v1x = _x - (Math.cos(angle) * 100);
v1y = _y - (Math.sin(angle) * 100);
v2x = _x - (Math.cos(angle) * 150);
v2y = _y - (Math.sin(angle) * 150);
v4x = _x - (Math.cos(angle) * 200);
v4y = _y - (Math.sin(angle) * 200);
v5x = _x - (Math.cos(angle) * 240);
v5y = _y - (Math.sin(angle) * 240);
v3x = _x - (Math.cos(angle) * 30);
v3y = _y - (Math.sin(angle) * 30);
if (_root.space.hitTest(v1x, v1y, true) and _root.space.hitTest(v3x, v3y, true)) {
if (_root.space.hitTest(v2x, v2y, true)) {
if (_root.space.hitTest(v4x, v4y, true)) {
if (_root.space.hitTest(v5x, v5y, true)) {
vision.gotoAndStop(5);
} else {
vision.gotoAndStop(4);
}
} else {
vision.gotoAndStop(3);
}
} else {
vision.gotoAndStop(2);
}
} else {
vision.gotoAndStop(1);
}
if (life > 0) {
if (interestLevel > 100) {
if (_root.space.hitTest(v3x, v3y, true)) {
if ((random(Math.round(10 / _root.timeScale)) == 1) and (vision.reaction > 8)) {
if (_root.player.id3 < 130) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.bullet, "bullet" + _root.player.id3, _root.player.id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
weapon.flare.gotoAndPlay(2);
_root.sound.owner = this;
shotSound = new Sound(this);
shotSound.attachSound("shot1");
shotSound.start(0, 1);
} else {
_root.player.id3 = 100;
}
}
if (vision._currentframe < 2) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
yspeed = -6 * _root.timeScale;
}
}
} else {
if (interestY > _y) {
interestY = interestY - 5;
}
if (interestX > _x) {
interestX = interestX + 5;
} else {
interestX = interestX - 5;
}
}
}
if (_root.space.hitTest(_x - 20, _y, true)) {
} else if ((_root.space.hitTest(_x - 20, _y - 120, true) and (xspeed < 0)) || (_root.space.hitTest(_x - 20, _y - 80, true) and (xspeed < 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = false;
moveRight = true;
moveRLast = true;
}
if (_root.space.hitTest(_x + 20, _y, true)) {
} else if ((_root.space.hitTest(_x + 20, _y - 120, true) and (xspeed > 0)) || (_root.space.hitTest(_x + 20, _y - 80, true) and (xspeed > 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = true;
moveRight = false;
moveRLast = false;
}
if (_root.space.hitTest(_x - 30, _y + 80, true) and _root.space.hitTest(_x - 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveLeft == true)) {
interestLevel = 50;
interestX = _x - 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX < _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = true;
moveLeft = false;
moveRLast = true;
}
}
}
if (_root.space.hitTest(_x + 30, _y + 80, true) and _root.space.hitTest(_x + 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveRight == true)) {
interestLevel = 50;
interestX = _x + 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX > _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = false;
moveLeft = true;
moveRLast = false;
}
}
}
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (interestLevel == 0) {
if ((moveLeft == false) and (moveRight == false)) {
if (moveRLast == true) {
moveLeft = true;
moveRight = false;
} else {
moveLeft = false;
moveRight = true;
}
}
}
if (spotted == false) {
if (xspeed < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else if (_x > interestX) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 5);
yspeed = 0;
}
if (timeScale != _root.timeScale) {
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
timeScale = _root.timeScale;
}
if ((moveRight == true) and (xspeed < (2 * _root.timeScale))) {
xspeed = xspeed + (speed * _root.timeScale);
}
if ((moveLeft == true) and (xspeed > (-2 * _root.timeScale))) {
xspeed = xspeed - (speed * _root.timeScale);
}
if ((jetPack == true) and (yspeed > -4)) {
yspeed = yspeed - (jetPack * _root.timeScale);
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
}
if ((moveRight == true) || (moveLeft == true)) {
ani.play();
} else {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.97;
xspeed = xspeed * 0.97;
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + _root.player.id2, _root.player.id2 + 1);
_root["bubbles" + _root.player.id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.splash, "splash" + _root.player.id2, _root.player.id2 + 1);
_root["splash" + id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (moveLeft == true) {
_rotation = -60;
} else {
_rotation = 60;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + (grav * _root.timeScale);
}
} else {
if (yspeed > (10 * _root.timeScale)) {
life = life - Math.round(yspeed / _root.timeScale);
}
if (jump == true) {
yspeed = jump * _root.timeScale;
jump = false;
}
if ((moveRight == true) || (moveLeft == true)) {
} else {
xspeed = xspeed * 0.7;
}
i = 0;
while (i < 15) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 85 MovieClip in Frame 46
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.4;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 0;
id3 = 0;
this.swapDepths(250);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
moveRight = false;
moveLeft = true;
jetPack = false;
jump = true;
spotted = false;
interestX = 0;
interestY = 0;
interestLevel = 0;
moveRLast = true;
v1x = 0;
v1y = 0;
v2x = 0;
v2y = 0;
v3x = 0;
v3y = 0;
v4x = 0;
v4y = 0;
v5x = 0;
v5y = 0;
life = 30;
timeScale = 0;
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
if (_root.remove == true) {
removeMovieClip(this);
}
var pan = 0;
var vol = 0;
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
shotSound.setPan(pan);
shotSound.setVolume(vol);
if (_root.sound.type == 2) {
var dist = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (dist < (_root.sound.size * 2)) {
life = life - (((_root.sound.size * 2) - dist) / 4);
}
}
if (yspeed > 14) {
yspeed = 14;
}
_x = (_x + xspeed);
_y = (_y + yspeed);
var angle = 0;
var x1 = _x;
var y1 = _y;
var x2 = interestX;
var y2 = interestY;
if (interestLevel < 1) {
interestX = _x + xspeed;
interestY = _y;
}
x2 = interestX;
y2 = interestY;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
v1x = _x - (Math.cos(angle) * 100);
v1y = _y - (Math.sin(angle) * 100);
v2x = _x - (Math.cos(angle) * 150);
v2y = _y - (Math.sin(angle) * 150);
v4x = _x - (Math.cos(angle) * 200);
v4y = _y - (Math.sin(angle) * 200);
v5x = _x - (Math.cos(angle) * 240);
v5y = _y - (Math.sin(angle) * 240);
v3x = _x - (Math.cos(angle) * 30);
v3y = _y - (Math.sin(angle) * 30);
if (_root.space.hitTest(v1x, v1y, true) and _root.space.hitTest(v3x, v3y, true)) {
if (_root.space.hitTest(v2x, v2y, true)) {
if (_root.space.hitTest(v4x, v4y, true)) {
if (_root.space.hitTest(v5x, v5y, true)) {
vision.gotoAndStop(5);
} else {
vision.gotoAndStop(4);
}
} else {
vision.gotoAndStop(3);
}
} else {
vision.gotoAndStop(2);
}
} else {
vision.gotoAndStop(1);
}
if (life > 0) {
if (interestLevel > 100) {
if (_root.space.hitTest(v3x, v3y, true)) {
if ((random(Math.round(10 / _root.timeScale)) == 1) and (vision.reaction > 8)) {
if (_root.player.id3 < 130) {
_root.player.id3 = _root.player.id3 + 1;
duplicateMovieClip (_root.bullet, "bullet" + _root.player.id3, _root.player.id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
weapon.flare.gotoAndPlay(2);
_root.sound.owner = this;
shotSound = new Sound(this);
shotSound.attachSound("shot1");
shotSound.start(0, 1);
} else {
_root.player.id3 = 100;
}
}
if (vision._currentframe < 2) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
yspeed = -6 * _root.timeScale;
}
}
} else {
if (interestY > _y) {
interestY = interestY - 5;
}
if (interestX > _x) {
interestX = interestX + 5;
} else {
interestX = interestX - 5;
}
}
}
if (_root.space.hitTest(_x - 20, _y, true)) {
} else if ((_root.space.hitTest(_x - 20, _y - 120, true) and (xspeed < 0)) || (_root.space.hitTest(_x - 20, _y - 80, true) and (xspeed < 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = false;
moveRight = true;
moveRLast = true;
}
if (_root.space.hitTest(_x + 20, _y, true)) {
} else if ((_root.space.hitTest(_x + 20, _y - 120, true) and (xspeed > 0)) || (_root.space.hitTest(_x + 20, _y - 80, true) and (xspeed > 0))) {
yspeed = -6 * _root.timeScale;
} else {
moveLeft = true;
moveRight = false;
moveRLast = false;
}
if (_root.space.hitTest(_x - 30, _y + 80, true) and _root.space.hitTest(_x - 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveLeft == true)) {
interestLevel = 50;
interestX = _x - 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX < _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = true;
moveLeft = false;
moveRLast = true;
}
}
}
if (_root.space.hitTest(_x + 30, _y + 80, true) and _root.space.hitTest(_x + 30, (_y + (ani._height / 2)) + 20, true)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else {
if ((interestLevel == 0) and (moveRight == true)) {
interestLevel = 50;
interestX = _x + 80;
interestY = _y + 60;
}
if ((interestLevel > 20) and (interestX > _x)) {
moveRight = false;
moveLeft = false;
} else {
moveRight = false;
moveLeft = true;
moveRLast = false;
}
}
}
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (interestLevel == 0) {
if ((moveLeft == false) and (moveRight == false)) {
if (moveRLast == true) {
moveLeft = true;
moveRight = false;
} else {
moveLeft = false;
moveRight = true;
}
}
}
if (spotted == false) {
if (xspeed < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
} else if (_x > interestX) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 5);
yspeed = 0;
}
if (timeScale != _root.timeScale) {
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
timeScale = _root.timeScale;
}
if ((moveRight == true) and (xspeed < (2 * _root.timeScale))) {
xspeed = xspeed + (speed * _root.timeScale);
}
if ((moveLeft == true) and (xspeed > (-2 * _root.timeScale))) {
xspeed = xspeed - (speed * _root.timeScale);
}
if ((jetPack == true) and (yspeed > -4)) {
yspeed = yspeed - (jetPack * _root.timeScale);
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
}
if ((moveRight == true) || (moveLeft == true)) {
ani.play();
} else {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.97;
xspeed = xspeed * 0.97;
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + _root.player.id2, _root.player.id2 + 1);
_root["bubbles" + _root.player.id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (_root.player.id2 < 50) {
_root.player.id2 = _root.player.id2 + 1;
duplicateMovieClip (_root.splash, "splash" + _root.player.id2, _root.player.id2 + 1);
_root["splash" + id2].targetC = this;
} else {
_root.player.id2 = 20;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (moveLeft == true) {
_rotation = -60;
} else {
_rotation = 60;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + (grav * _root.timeScale);
}
} else {
if (yspeed > (10 * _root.timeScale)) {
life = life - Math.round(yspeed / _root.timeScale);
}
if (jump == true) {
yspeed = jump * _root.timeScale;
jump = false;
}
if ((moveRight == true) || (moveLeft == true)) {
} else {
xspeed = xspeed * 0.7;
}
i = 0;
while (i < 15) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 121 MovieClip "player" in Frame 46
onClipEvent (load) {
xspeed = 0;
yspeed = 0;
speed = 0.2;
grav = _root.grav;
jump = -6;
jetPack = 0.4;
id = 0;
id2 = 20;
id3 = 100;
this.swapDepths(300);
pWidth = _width;
targetX = _x;
targetY = _y;
moved = false;
watertime = 0;
life = 100;
soundDone = false;
jetFuel = 500;
}
onClipEvent (enterFrame) {
if (_root.remove == true) {
removeMovieClip(this);
}
if (_root.space.hitTest(_x, _y, true)) {
} else {
_y = (_y - 10);
yspeed = 0;
}
if (_root.sound.type == 2) {
var distance = Math.sqrt(((_x - _root.sound._x) * (_x - _root.sound._x)) + ((_y - _root.sound._y) * (_y - _root.sound._y)));
if (distance < _root.sound.size) {
life = life - Math.round((_root.sound.size - distance) / 2);
}
}
ani.body.gotoAndStop(1);
ani.legF.gotoAndStop(1);
ani.legB.gotoAndStop(1);
weapon.armF.gotoAndStop(1);
tell = _x;
_x = (_x + xspeed);
_y = (_y + yspeed);
if (life > 0) {
if (Key.isDown(87)) {
if (_root.space.hitTest(_x, (_y + (ani._height / 2)) + 10, true)) {
} else if (yspeed < 5) {
ani.gotoAndStop(5);
yspeed = jump;
}
}
if (Key.isDown(68) || (Key.isDown(65))) {
} else if (Key.isDown(83) and (ani._currentframe < 40)) {
ani.gotoAndPlay(41);
}
}
if (life > 0) {
this.onMouseDown = function () {
if (id3 < 130) {
id3 = id3 + 1;
if (weapon._currentframe == 6) {
duplicateMovieClip (_root.bullet, "bullet" + id3, id3 + 1);
_root["bullet" + _root.player.id3].targetC = this;
_root["bullet" + _root.player.id3]._alpha = 100;
_root.sound.owned = 0;
_root.sound.type = 1;
_root.sound.owner = this;
weapon.play();
weapon.flare.gotoAndPlay(6);
}
} else {
id3 = 100;
}
};
if (_root._xmouse < _x) {
_xscale = -100;
} else {
_xscale = 100;
}
if (Key.isDown(65) and (xspeed > -4)) {
xspeed = xspeed - speed;
}
if (Key.isDown(68) and (xspeed < 4)) {
xspeed = xspeed + speed;
}
if ((Key.isDown(32) and (yspeed > -4)) and (jetFuel > 0)) {
jetFuel = jetFuel - (5 * _root.timeScale);
if (soundDone == false) {
jetSound = new Sound(this);
jetSound.attachSound("flame");
jetSound.start(0, 99);
jetSound.setVolume(50);
soundDone = true;
}
yspeed = yspeed - jetPack;
if (id < 20) {
id = id + 1;
duplicateMovieClip (_root.flame, "flame" + id, id + 1);
_root["flame" + id].targetC = this;
} else {
id = 0;
}
} else {
soundDone = false;
jetSound.stop();
if (jetFuel < 500) {
jetFuel = jetFuel + (3 * _root.timeScale);
}
}
if (Key.isDown(68) || (Key.isDown(65))) {
ani.play();
} else if (ani._currentframe < 40) {
ani.stop();
}
} else {
gotoAndStop (44);
ani.stop();
xspeed = xspeed * 0.97;
weapon._rotation = 0;
_rotation = 0;
}
if (_root.space.hitTest(_x, _y + (ani._height / 2), true)) {
if (_root.water.hitTest(_x, _y, true)) {
watertime = watertime + 1;
yspeed = yspeed - 0.1;
yspeed = yspeed * 0.95;
xspeed = xspeed * 0.97;
if (life > 0) {
if (Key.isDown(83) and (yspeed < 4)) {
yspeed = yspeed + speed;
}
if (Key.isDown(87) and (yspeed > -4)) {
yspeed = yspeed - speed;
ani.gotoAndStop(5);
}
}
if ((((yspeed > 2) || (xspeed > 3)) || (xspeed < -3)) || (yspeed < -2)) {
if (id2 < 50) {
id2 = id2 + 1;
duplicateMovieClip (_root.bubbles, "bubbles" + id2, id2 + 1);
_root["bubbles" + id2].targetC = this;
} else {
id2 = 20;
}
if ((_y < (_root.water._y + 20)) and (yspeed > 2)) {
if (id2 < 50) {
id2 = id2 + 1;
duplicateMovieClip (_root.splash, "splash" + id2, id2 + 1);
_root["splash" + id2].targetC = this;
} else {
id2 = 20;
}
}
}
if (life > 0) {
if (_root._xmouse < _x) {
_rotation = -60;
weapon._rotation = weapon._rotation - 60;
} else {
_rotation = 60;
weapon._rotation = weapon._rotation - 60;
}
}
} else {
watertime = 0;
if (_root.water.hitTest(_x, _y + 10, true)) {
if (life > 0) {
if (_root._xmouse < _x) {
_rotation = -30;
weapon._rotation = weapon._rotation - 30;
} else {
_rotation = 30;
weapon._rotation = weapon._rotation - 30;
}
}
} else if (life > 0) {
_rotation = 0;
}
yspeed = yspeed + grav;
}
} else {
if (yspeed > 10) {
life = life - Math.round(yspeed);
}
if (Key.isDown(68) || (Key.isDown(65))) {
} else {
xspeed = xspeed * 0.9;
}
i = 0;
while (i < (yspeed + 15)) {
if (_root.space.hitTest(_x, ((_y - i) + 1) + (ani._height / 2), true)) {
} else if (_root.space.hitTest(_x, (_y - i) + (ani._height / 2), true)) {
yspeed = yspeed - (i / 5);
_y = (_y - i);
moved = true;
_root.showme = i;
}
i = i + 1;
}
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else if (yspeed < 0) {
yspeed = yspeed - (yspeed * 1.3);
}
if (_root.space.hitTest(_x, _y - (ani._height / 2), true)) {
} else {
_y = (_y + 1);
}
if (_root.space.hitTest(_x + ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed > 0) {
xspeed = xspeed - (xspeed * 1.3);
}
if (_root.space.hitTest(_x - ((ani._width / 2) + xspeed), _y, true)) {
} else if (xspeed < 0) {
xspeed = xspeed - (xspeed * 1.3);
}
}
Instance of Symbol 124 MovieClip "grenade" in Frame 46
onClipEvent (load) {
var targetC;
xspeed = -((_root.player._x - _root.aim._x) / 20);
yspeed = -((_root.player._y - _root.aim._y) / 20);
timer = 0;
show = 0;
_x = targetC._x;
_y = targetC._y;
if (_name == "grenade") {
_visible = false;
}
}
onClipEvent (enterFrame) {
show = 100 - timer;
timer = timer + (1 * _root.timeScale);
_x = (_x + xspeed);
_y = (_y + yspeed);
xspeed = xspeed * 0.99;
yspeed = yspeed * 0.99;
xspeed = xspeed * _root.timeScale;
yspeed = yspeed * _root.timeScale;
if (yspeed > 0) {
if (_root.space.hitTest(_x, (_y + 5) + yspeed, true)) {
yspeed = yspeed + (_root.grav * _root.timeScale);
} else {
if (_root.space.hitTest(_x - (_width / 2), _y + 6, true)) {
xspeed = xspeed - 0.2;
}
if (_root.space.hitTest(_x + (_width / 2), _y + 6, true)) {
xspeed = xspeed + 0.2;
}
yspeed = -(yspeed * 0.4);
xspeed = xspeed * 0.9;
if (_root.space.hitTest(_x, _y + 2, true)) {
} else {
_y = (_y - 1);
}
}
} else if (_root.space.hitTest(_x, (_y - 5) + yspeed, true)) {
yspeed = yspeed + (_root.grav * _root.timeScale);
} else {
yspeed = -(yspeed * 0.5);
xspeed = xspeed * 0.9;
}
if (_root.space.hitTest(_x + xspeed, _y + 4, true) and _root.space.hitTest(_x + xspeed, _y - 4)) {
} else if (_root.space.hitTest(_x + xspeed, _y + 4, true)) {
xspeed = xspeed * 0.5;
if (xspeed > 0) {
yspeed = yspeed + xspeed;
} else {
yspeed = yspeed - xspeed;
}
} else if (_root.space.hitTest(_x + xspeed, _y - 4, true)) {
xspeed = xspeed * 0.5;
if (xspeed > 0) {
yspeed = yspeed - xspeed;
} else {
yspeed = yspeed + xspeed;
}
} else {
xspeed = -(xspeed * 0.5);
}
if (timer > 100) {
if (_name == "grenade") {
} else {
_root.id = _root.id + 1;
_root.player.id3 = _root.player.id3 + 1;
_root.expTargetX = _x;
_root.expTargetY = _y;
_root.expSize = 40;
duplicateMovieClip (_root.space.hole, "hole" + _root.id, _root.id + 1);
_root.expSize = 40;
duplicateMovieClip (_root.explosion, "explosion" + _root.player.id3, _root.player.id3 + 1);
_root["explosion" + _root.player.id3]._x = _x;
_root["explosion" + _root.player.id3]._y = _y;
_root["explosion" + _root.player.id3]._height = _root.expSize;
_root["explosion" + _root.player.id3]._width = _root.expSize;
_root["explosion" + _root.player.id3].sizeE = _root.expSize * 2;
this.removeMovieClip();
}
}
}
Instance of Symbol 126 MovieClip "rocket" in Frame 46
onClipEvent (load) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
_alpha = 100;
addX = _root.player.xspeed;
addY = _root.player.yspeed;
if (_name == "rocket") {
} else {
if (_root.player._xscale == 100) {
_x = (_root.player._x + _root.player.weapon._x);
} else {
_x = (_root.player._x - _root.player.weapon._x);
}
_y = _root.player._y;
}
speed = 20;
var angle = 0;
var x1 = _root._xmouse;
var y1 = _root._ymouse;
var x2 = _root.player._x;
var y2 = _root.player._y;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
_rotation = radiansToDegrees(angle);
}
onClipEvent (enterFrame) {
speed = 20 * _root.timeScale;
_x = (_x + ((Math.cos(angle) * speed) + addX));
_y = (_y + ((Math.sin(angle) * speed) + addY));
if (_root.space.hitTest(_x, _y, true) and (_alpha == 100)) {
} else {
speed = 0;
_alpha = 0;
if (_name == "rocket") {
} else {
_root.id = _root.id + 1;
_root.expTargetX = _x;
_root.expTargetY = _y;
_root.expSize = 35;
duplicateMovieClip (_root.space.hole, "hole" + _root.id, _root.id + 1);
_root.expSize = 35;
this.removeMovieClip();
}
}
}
Instance of Symbol 133 MovieClip "flame" in Frame 46
onClipEvent (load) {
var targetC;
if (_root.player._xscale == 100) {
_x = (targetC._x - 7);
} else {
_x = (targetC._x + 7);
}
_y = (targetC._y + 5);
gotoAndPlay (43);
}
onClipEvent (enterFrame) {
_y = (_y + 2);
}
Instance of Symbol 135 MovieClip "bubbles" in Frame 46
onClipEvent (load) {
var targetC;
_rotation = random(360);
_x = ((targetC._x - 10) + random(20));
_y = ((targetC._y - 10) + random(20));
gotoAndPlay (43);
amount = 0;
if (targetC.xspeed > 0) {
amount = targetC.xspeed + targetC.yspeed;
} else {
amount = (-targetC.xspeed) + targetC.yspeed;
}
_width = (5 + amount);
_height = _width;
_alpha = (10 * amount);
}
onClipEvent (enterFrame) {
_alpha = (_alpha - (1 * _root.timeScale));
_y = (_y - (2 * _root.timeScale));
if (_root.water.hitTest(_x, _y - (_height / 2), true)) {
} else {
_alpha = 0;
}
if ((_alpha < 1) and (_name != "bubbles")) {
removeMovieClip(this);
}
}
Instance of Symbol 137 MovieClip "bullet" in Frame 46
onClipEvent (load) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
var targetC;
var targetDX;
var targetDY;
if (targetC == _root.player) {
targetDX = _root.aim._x;
targetDY = _root.aim._y;
} else {
targetDX = targetC.interestX;
targetDY = targetC.interestY;
}
_alpha = 100;
addX = targetC.xspeed;
addY = targetC.yspeed;
if (targetC == _root.player) {
if (targetC._xscale == 100) {
_x = (targetC._x + targetC.weapon._x);
} else {
_x = (targetC._x - targetC.weapon._x);
}
_y = (targetC._y - targetC.weapon._y);
} else {
if (targetC._xscale == 100) {
_x = targetC._x;
} else {
_x = targetC._x;
}
_y = (targetC._y - 5);
}
speed = 20;
var angle = 0;
var x1 = targetDX;
var y1 = targetDY;
var x2 = targetC._x;
var y2 = targetC._y;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
_rotation = radiansToDegrees(angle);
_alpha = 100;
}
onClipEvent (enterFrame) {
speed = 20 * _root.timeScale;
_x = (_x + (Math.cos(angle) * speed));
_y = (_y + (Math.sin(angle) * speed));
if (_root.space.hitTest(_x, _y, true) and (_alpha == 100)) {
} else {
speed = 0;
_alpha = 0;
}
if (_root.player.hitTest(_x, _y, true) and (targetC != _root.player)) {
if (_alpha > 0) {
_alpha = 0;
_root.player.life = _root.player.life - 5;
}
}
if ((_alpha < 1) and (_name != "bullet")) {
removeMovieClip(this);
}
}
Instance of Symbol 191 MovieClip "ki" in Frame 46
onClipEvent (load) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
_alpha = 100;
addX = _root.player.xspeed;
addY = _root.player.yspeed;
if (_name == "ki") {
} else {
if (_root.player._xscale == 100) {
_x = (_root.player._x + _root.player.weapon._x);
} else {
_x = (_root.player._x - _root.player.weapon._x);
}
_y = _root.player._y;
}
speed = 20;
var angle = 0;
var x1 = _root._xmouse;
var y1 = _root._ymouse;
var x2 = _root.player._x;
var y2 = _root.player._y;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
_rotation = radiansToDegrees(angle);
}
onClipEvent (enterFrame) {
_x = (_x + ((Math.cos(angle) * speed) + addX));
_y = (_y + ((Math.sin(angle) * speed) + addY));
if (_root.space.hitTest(_x, _y, true) and (_alpha == 100)) {
} else {
speed = 0;
_alpha = 0;
if (_name == "ki") {
} else {
_root.id = _root.id + 1;
_root.expTargetX = _x;
_root.expTargetY = _y;
_root.expSize = 20;
duplicateMovieClip (_root.space.hole, "hole" + _root.id, _root.id + 1);
_root.expSize = 20;
this.removeMovieClip();
}
}
}
Instance of Symbol 193 MovieClip "kibig" in Frame 46
onClipEvent (load) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
_alpha = 100;
addX = _root.player.xspeed;
addY = _root.player.yspeed;
if (_name == "kibig") {
} else {
if (_root.player._xscale == 100) {
_x = (_root.player._x + _root.player.weapon._x);
} else {
_x = (_root.player._x - _root.player.weapon._x);
}
_y = _root.player._y;
}
speed = 20;
var angle = 0;
var x1 = _root._xmouse;
var y1 = _root._ymouse;
var x2 = _root.player._x;
var y2 = _root.player._y;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
_rotation = radiansToDegrees(angle);
}
onClipEvent (enterFrame) {
_x = (_x + ((Math.cos(angle) * speed) + addX));
_y = (_y + ((Math.sin(angle) * speed) + addY));
if (_root.space.hitTest(_x, _y, true) and (_alpha == 100)) {
} else {
speed = 0;
_alpha = 0;
if (_name == "kibig") {
} else {
_root.id = _root.id + 1;
_root.expTargetX = _x;
_root.expTargetY = _y;
_root.expSize = 40;
duplicateMovieClip (_root.space.hole, "hole" + _root.id, _root.id + 1);
_root.expSize = 40;
this.removeMovieClip();
}
}
}
Instance of Symbol 197 MovieClip "kidisk" in Frame 46
onClipEvent (load) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
_alpha = 100;
addX = _root.player.xspeed;
addY = _root.player.yspeed;
if (_name == "kidisk") {
} else {
if (_root.player._xscale == 100) {
_x = (_root.player._x + _root.player.weapon._x);
} else {
_x = (_root.player._x - _root.player.weapon._x);
}
_y = _root.player._y;
}
speed = 20;
var angle = 0;
var x1 = _root._xmouse;
var y1 = _root._ymouse;
var x2 = _root.player._x;
var y2 = _root.player._y;
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
_rotation = radiansToDegrees(angle);
}
onClipEvent (enterFrame) {
_x = (_x + ((Math.cos(angle) * speed) + addX));
_y = (_y + ((Math.sin(angle) * speed) + addY));
if (_root.space.hitTest(_x, _y, true) and (_alpha == 100)) {
} else {
speed = 0;
_alpha = 0;
if (_name == "kidisk") {
} else {
_root.id = _root.id + 1;
_root.expTargetX = _x;
_root.expTargetY = _y;
_root.expSize = 55;
duplicateMovieClip (_root.space.hole, "hole" + _root.id, _root.id + 1);
_root.expSize = 55;
this.removeMovieClip();
}
}
}
Instance of Symbol 139 MovieClip "sound" in Frame 46
onClipEvent (load) {
owner = false;
owned = 0;
type = 1;
size = 1;
}
onClipEvent (enterFrame) {
if (owner != false) {
if (owned < 1) {
_x = owner._x;
_y = owner._y;
}
owned = owned + 1;
}
if (owned > 5) {
owner = false;
owned = 0;
type = 1;
_x = -999999;
}
}
Instance of Symbol 145 MovieClip "explosion" in Frame 46
onClipEvent (load) {
var sizeE;
var pan = 0;
var vol = 0;
if (_name == "explosion") {
_visible = false;
} else {
explosionSound = new Sound(this);
explosionSound.attachSound("explosion");
explosionSound.start(0, 0);
explosion2Sound = new Sound(this);
explosion2Sound.attachSound("explosionold");
explosion2Sound.start(0, 0);
}
}
onClipEvent (enterFrame) {
if ((_x - _root.player._x) > 100) {
pan = 100;
} else if ((_x - _root.player._x) < -100) {
pan = -100;
} else {
pan = _x - _root.player._x;
}
vol = 100 - (Math.sqrt(((_x - _root.player._x) * (_x - _root.player._x)) + ((_y - _root.player._y) * (_y - _root.player._y))) / 10);
if (vol > 100) {
vol = 100;
}
explosionSound.setPan(pan);
explosionSound.setVolume(vol);
explosion2Sound.setPan(pan);
explosion2Sound.setVolume(vol);
}
Instance of Symbol 151 MovieClip "splash" in Frame 46
onClipEvent (load) {
var targetC;
_x = targetC._x;
_y = _root.water._y;
gotoAndPlay (43);
}
Instance of Symbol 154 MovieClip "aim" in Frame 46
onClipEvent (enterFrame) {
startDrag (this, true);
Mouse.hide();
this.swapDepths(600);
if (_root.remove == true) {
removeMovieClip(this);
}
}
Instance of Symbol 163 MovieClip in Frame 46
onClipEvent (load) {
given = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true) and (given == false)) {
_root.score = _root.score + 10;
given = true;
_visible = false;
}
}
Instance of Symbol 163 MovieClip in Frame 46
onClipEvent (load) {
given = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true) and (given == false)) {
_root.score = _root.score + 10;
given = true;
_visible = false;
}
}
Instance of Symbol 163 MovieClip in Frame 46
onClipEvent (load) {
given = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true) and (given == false)) {
_root.score = _root.score + 10;
given = true;
_visible = false;
}
}
Instance of Symbol 163 MovieClip in Frame 46
onClipEvent (load) {
given = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true) and (given == false)) {
_root.score = _root.score + 10;
given = true;
_visible = false;
}
}
Instance of Symbol 163 MovieClip in Frame 46
onClipEvent (load) {
given = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true) and (given == false)) {
_root.score = _root.score + 10;
given = true;
_visible = false;
}
}
Instance of Symbol 174 MovieClip "hud" in Frame 46
onClipEvent (load) {
time = 0;
}
onClipEvent (enterFrame) {
this.swapDepths(500);
if (_root.remove == true) {
removeMovieClip(this);
}
var time;
if (_root.score >= _root.goal) {
time = time + 1;
}
if (_root.player.life < 1) {
time = time + 1;
}
if ((time > 50) and (_root.player.life > 0)) {
_root.nextFrame();
} else if (time > 50) {
_root.nextFrame();
_root.nextFrame();
}
}
Frame 47
remove = true;
_root._x = 0;
_root._y = 0;
Mouse.show();
Instance of Symbol 175 MovieClip in Frame 47
onClipEvent (enterFrame) {
Mouse.show();
}
Frame 48
remove = true;
_root._x = 0;
_root._y = 0;
Mouse.show();
Symbol 15 Button
on (release) {
_root.play();
}
Symbol 19 Button
on (release) {
gotoAndStop (2);
}
Symbol 40 Button
on (release) {
gotoAndStop (1);
}
Symbol 41 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 9
stop();
Instance of Symbol 52 MovieClip in Symbol 53 MovieClip Frame 1
onClipEvent (load) {
_rotation = random(360);
}
Instance of Symbol 53 MovieClip "hole" in Symbol 54 MovieClip Frame 1
onClipEvent (load) {
_rotation = 0;
_height = _root.expSize;
_width = _height;
_x = (_root.expTargetX - _root.space._x);
_y = (_root.expTargetY - _root.space._y);
}
Instance of Symbol 64 MovieClip "head" in Symbol 65 MovieClip Frame 1
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
var angle = 0;
if (_parent._parent._parent._xscale == 100) {
var x1 = _parent._parent._parent.interestX;
var y1 = _parent._parent._parent.interestY;
} else {
var x1 = ((_parent._parent._parent._x * 2) - _parent._parent._parent.interestX);
var y1 = _parent._parent._parent.interestY;
}
var x2 = (this._x + _parent._parent._parent._x);
var y2 = (this._y + _parent._parent._parent._y);
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
if (_parent._parent._parent.spotted == true) {
if (_parent.moveLeft == true) {
_rotation = (radiansToDegrees(angle) + _parent._parent._parent._rotation);
} else {
_rotation = (radiansToDegrees(angle) - _parent._parent._parent._rotation);
}
} else {
_rotation = 0;
}
}
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
play();
Symbol 70 MovieClip Frame 3
play();
Symbol 70 MovieClip Frame 4
play();
Symbol 70 MovieClip Frame 5
gotoAndStop (1);
Symbol 70 MovieClip Frame 9
gotoAndStop (1);
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 3
stop();
Symbol 80 MovieClip Frame 4
stop();
Symbol 80 MovieClip Frame 5
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 85 MovieClip Frame 1
stop();
Instance of Symbol 66 MovieClip "ani" in Symbol 85 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 72 MovieClip "weapon" in Symbol 85 MovieClip Frame 1
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
var angle = 0;
if (_parent._xscale == 100) {
var x1 = _parent.interestX;
var y1 = _parent.interestY;
} else {
var x1 = ((_parent._x * 2) - _parent.interestX);
var y1 = _parent.interestY;
}
var x2 = (this._x + _parent._x);
var y2 = (this._y + _parent._y);
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
if (_parent.spotted == true) {
if (_parent.moveLeft == true) {
_rotation = (radiansToDegrees(angle) + _parent._rotation);
} else {
_rotation = (radiansToDegrees(angle) - _parent._rotation);
}
} else {
_rotation = 0;
}
}
Instance of Symbol 74 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.life > 0) {
i = 100;
while (i < 130) {
if (this.hitTest(_root["bullet" + i]._x, _root["bullet" + i]._y, true and (_root["bullet" + i]._currentframe == 3))) {
if ((_root["bullet" + i].targetC == _root.player) and (_root["bullet" + i]._alpha > 0)) {
_parent.life = _parent.life - 5;
_parent.interestLevel = _parent.interestLevel + 100;
_parent.interestX = _root.player._x;
_parent.interestY = _root.player._y;
_root["bullet" + i]._alpha = 0;
}
}
i = i + 1;
}
}
}
Instance of Symbol 80 MovieClip "vision" in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
reaction = 0;
}
onClipEvent (enterFrame) {
_rotation = _parent.ani.body.head._rotation;
if (this.hitTest(_root.player._x, _root.player._y, true) and (_root.player.life > 0)) {
reaction = reaction + 1;
if (reaction > (10 / _root.timeScale)) {
_parent.interestX = _root.player._x;
_parent.interestY = _root.player._y;
_parent.interestLevel = 200;
}
} else if (_parent.interestLevel > 0) {
_parent.spotted = true;
_parent.interestLevel = _parent.interestLevel - (1 * _root.timeScale);
} else {
reaction = 0;
_parent.spotted = false;
}
}
Instance of Symbol 82 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sound._x, _root.sound._y, true) and (_root.sound.owner != _parent)) {
if (_root.sound.owner != _root.player) {
_parent.interestX = _root.sound.owner.interestX;
_parent.interestY = _root.sound.owner.interestY;
} else {
_parent.interestX = _root.sound._x;
_parent.interestY = _root.sound._y;
}
var time = 0;
_parent.interestLevel = 100;
}
}
Instance of Symbol 84 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.life > -1) {
_width = _parent.life;
}
}
Instance of Symbol 97 MovieClip in Symbol 99 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player.ani._currentframe < 41) {
_rotation = _root.player.weapon._rotation;
gotoAndStop (1);
} else {
_rotation = (_root.player.weapon._rotation - 90);
gotoAndStop (2);
}
}
Symbol 100 MovieClip Frame 40
gotoAndPlay (1);
Symbol 100 MovieClip Frame 45
stop();
Symbol 119 MovieClip Frame 5
gotoAndPlay (1);
Symbol 119 MovieClip Frame 10
gotoAndStop (6);
Symbol 119 MovieClip Frame 12
gotoAndStop (11);
Symbol 119 MovieClip Frame 14
gotoAndStop (13);
Symbol 119 MovieClip Frame 18
gotoAndStop (15);
Symbol 119 MovieClip Frame 20
gotoAndStop (19);
Symbol 119 MovieClip Frame 22
gotoAndStop (19);
Symbol 119 MovieClip Frame 24
gotoAndStop (19);
Symbol 121 MovieClip Frame 1
stop();
Instance of Symbol 119 MovieClip "weapon" in Symbol 121 MovieClip Frame 1
on (keyPress "1") {
gotoAndPlay (1);
}
on (keyPress "2") {
gotoAndStop (6);
}
on (keyPress "3") {
gotoAndStop (15);
}
on (keyPress "4") {
gotoAndStop (13);
}
on (keyPress "5") {
gotoAndStop (11);
}
on (keyPress "0") {
if (_currentframe == 19) {
gotoAndStop (21);
} else if (_currentframe == 21) {
gotoAndStop (23);
} else if (_currentframe == 23) {
gotoAndStop (19);
} else {
gotoAndStop (19);
}
}
onClipEvent (load) {
gotoAndStop (6);
}
onClipEvent (enterFrame) {
function determineAngleBetweenPoints(x1, x2, y1, y2) {
var _local2 = x1 - x2;
var _local3 = y1 - y2;
var _local1 = Math.atan2(_local3, _local2);
return(_local1);
}
function radiansToDegrees(radians) {
var _local1 = radians * 57.2957795130823;
return(_local1);
}
var angle = 0;
if (_parent._xscale == 100) {
var x1 = _root._xmouse;
var y1 = _root._ymouse;
} else {
var x1 = ((_root.player._x * 2) - _root._xmouse);
var y1 = _root._ymouse;
}
var x2 = (this._x + _parent._x);
var y2 = (this._y + _parent._y);
var angle = determineAngleBetweenPoints(x1, x2, y1, y2);
_rotation = radiansToDegrees(angle);
}
Instance of Symbol 100 MovieClip "ani" in Symbol 121 MovieClip Frame 2
onClipEvent (enterFrame) {
ani.gotoAndStop(1);
}
Instance of Symbol 119 MovieClip "weapon" in Symbol 121 MovieClip Frame 2
onClipEvent (enterFrame) {
gotoAndStop (21);
}
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 2
stop();
Symbol 133 MovieClip Frame 20
stop();
if (_name != "flame") {
removeMovieClip(this);
}
Symbol 135 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 3
stop();
Symbol 145 MovieClip Frame 1
_root.sound.owned = 0;
_root.sound.owner = this;
_root.sound.type = 2;
_root.sound.size = sizeE;
if (_name == "explosion") {
stop();
}
Symbol 145 MovieClip Frame 110
if (_name != "explosion") {
removeMovieClip(this);
}
Symbol 151 MovieClip Frame 20
stop();
Symbol 163 MovieClip Frame 10
gotoAndPlay (1);
Symbol 163 MovieClip Frame 18
stop();
removeMovieClip(this);
Symbol 174 MovieClip Frame 1
stop();
Instance of Symbol 173 MovieClip in Symbol 174 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.player.life > 0) {
var goto = Math.round(_root.player.life / 5);
gotoAndStop(goto);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 173 MovieClip in Symbol 174 MovieClip Frame 1
onClipEvent (enterFrame) {
var goto = Math.round(_root.slowMo / 5);
gotoAndStop(goto);
}
Instance of Symbol 173 MovieClip in Symbol 174 MovieClip Frame 1
onClipEvent (enterFrame) {
var goto = Math.round(_root.player.jetFuel / 25);
gotoAndStop(goto);
}
Symbol 180 Button
on (release) {
gotoAndStop (46);
}
Symbol 185 Button
on (release) {
gotoAndStop (43);
}
Instance of Symbol 53 MovieClip "hole" in Symbol 189 MovieClip Frame 1
onClipEvent (load) {
_rotation = 0;
_height = _root.expSize;
_width = _height;
_x = (_root.expTargetX - _root.space._x);
_y = (_root.expTargetY - _root.space._y);
}
Symbol 200 Button
on (release) {
gotoAndStop (46);
}