Frame 1
loadpercent = "0%";
loadBytes = ("0 of " + (Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000)) + " Kb";
Frame 2
loadPercent = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
loadBytes = (((Math.round((_root.getBytesLoaded() / 1024) * 1000) / 1000) + " Kb of ") + (Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000)) + " Kb total Loaded.";
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
loadPercent = "100%";
loadBytes = (((Math.round((_root.getBytesLoaded() / 1024) * 1000) / 1000) + " Kb of ") + (Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000)) + " Kb total Loaded.";
gotoAndPlay (4);
}
Frame 3
gotoAndPlay (2);
Frame 4
stop();
Frame 5
stop();
Life = 100;
MAXLife = 100;
Money = 100;
xd = 0;
yd = 0;
npx = 0;
npy = 0;
ran = 0;
edeath1 = 0;
edeath2 = 0;
edeath3 = 0;
edeath4 = 0;
Frame 6
stop();
Frame 7
stop();
stop();
Frame 8
nextFrame();
Instance of Symbol 47 MovieClip in Frame 8
onClipEvent (enterFrame) {
if (_root.life < 1) {
stopAllSounds();
_root.gotoAndPlay("GameOver");
}
}
Instance of Symbol 49 MovieClip in Frame 8
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = 250;
_root.player._y = 105;
_root.health.nextFrame();
}
}
Frame 9
stop();
Instance of Symbol 49 MovieClip in Frame 9
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
tellTarget ("/player") {
_x = 38;
};
_root.gotoAndPlay(11);
}
}
Instance of Symbol 117 MovieClip "player" in Frame 9
onClipEvent (load) {
var grav = 0;
var run = 5;
var wlk = 2.5;
var speed = run;
var jumpHeight = 12;
var dbl = 10;
var tri = 10;
var djump = false;
var tjump = false;
var thro = false;
var slow = 0.7;
var slowspd = (speed / 2);
var setspeed = speed;
var scale = _xscale;
var ex = 5;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
if (Key.isDown(65)) {
setspeed = wlk;
} else {
setspeed = run;
}
while (_root.ground.hitTest(_x, _y, true)) {
djump = false;
tjump = false;
_y = (_y-1);
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
grav = grav * (slow * 1.25);
speed = slowspd;
} else {
speed = setspeed;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if ((_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(68))) && (!Key.isDown(83))) {
this.gotoAndStop(3);
}
if (((((Key.isDown(68) && (!Key.isDown(38))) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(83))) && (_root.ground.hitTest(_x, _y + 3, true))) {
this.gotoAndStop(8);
}
if ((Key.isDown(83) && (_root.ground.hitTest(_x, _y + 3, true))) && (_currentframe != 6)) {
this.gotoAndStop(7);
} else if (Key.isDown(83) && (grav > 1)) {
this.gotoAndStop(6);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(2);
} else if (((Key.isDown(38) && (djump == false)) && (grav > 0)) && (tjump == false)) {
grav = -dbl;
djump = true;
this.gotoAndStop(4);
} else if ((Key.isDown(38) && (tjump == false)) && (grav > 1)) {
grav = -tri;
tjump = true;
this.gotoAndStop(5);
}
if ((_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - _height, true))) {
_x = (_x - speed);
}
if ((_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - _height, true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, (_y - _height) - 15, true)) {
grav = 1;
}
}
Frame 10
prevFrame();
Frame 11
stop();
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 49 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
tellTarget ("/player") {
_x = 38;
};
_root.gotoAndPlay(13);
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 117 MovieClip "player" in Frame 11
onClipEvent (load) {
var grav = 0;
var run = 5;
var wlk = 2.5;
var speed = run;
var jumpHeight = 12;
var dbl = 10;
var tri = 10;
var djump = false;
var tjump = false;
var thro = false;
var slow = 0.7;
var slowspd = (speed / 2);
var setspeed = speed;
var scale = _xscale;
var ex = 5;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
if (Key.isDown(65)) {
setspeed = wlk;
} else {
setspeed = run;
}
while (_root.ground.hitTest(_x, _y, true)) {
djump = false;
tjump = false;
_y = (_y-1);
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
grav = grav * (slow * 1.25);
speed = slowspd;
} else {
speed = setspeed;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if ((_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(68))) && (!Key.isDown(83))) {
this.gotoAndStop(3);
}
if (((((Key.isDown(68) && (!Key.isDown(38))) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(83))) && (_root.ground.hitTest(_x, _y + 3, true))) {
this.gotoAndStop(8);
}
if ((((((Key.isDown(83) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(38))) && (!Key.isDown(68))) && (_root.ground.hitTest(_x, _y + 3, true))) && (_currentframe != 6)) {
this.gotoAndStop(7);
} else if (Key.isDown(83) && (grav > 1)) {
this.gotoAndStop(6);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(2);
} else if (((Key.isDown(38) && (djump == false)) && (grav > 0)) && (tjump == false)) {
grav = -dbl;
djump = true;
this.gotoAndStop(4);
} else if ((Key.isDown(38) && (tjump == false)) && (grav > 1)) {
grav = -tri;
tjump = true;
this.gotoAndStop(5);
}
if ((_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - _height, true))) {
_x = (_x - speed);
}
if ((_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - _height, true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, (_y - _height) - 15, true)) {
grav = 1;
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Frame 11
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Frame 12
prevFrame();
Frame 13
stop();
Instance of Symbol 49 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.edeath1 == 1)) {
tellTarget ("/player") {
_x = 38;
};
_root.gotoAndPlay(15);
}
}
Instance of Symbol 140 MovieClip "enemy1" in Frame 13
onClipEvent (load) {
escale = _xscale;
}
onClipEvent (enterFrame) {
if (_root.edeath1 == 0) {
_root.xd = this._x - _root.player._x;
_root.yd = this._y - _root.player._y;
_root.npx = (_root.xd + _root.yd) / 1.41421356237309;
_root.npy = (_root.yd - _root.xd) / 1.41421356237309;
if ((_root.npx >= 0) && (_root.npy <= 0)) {
_xscale = (-escale);
this._x = this._x - 6;
return(2);
}
if ((_root.npx <= 0) && (_root.npy >= 0)) {
_xscale = escale;
this._x = this._x + 6;
return(4);
}
if (((this._x < (_root.player._x + 160)) && (this._x > (_root.player._x - 160))) && ((this._y < (_root.player._y + 100)) && (this._y > (_root.player._y - 100)))) {
_root.enemy1.gotoAndPlay("attack");
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Instance of Symbol 117 MovieClip "player" in Frame 13
onClipEvent (load) {
var grav = 0;
var run = 5;
var wlk = 2.5;
var speed = run;
var jumpHeight = 12;
var dbl = 10;
var tri = 10;
var djump = false;
var tjump = false;
var thro = false;
var slow = 0.7;
var slowspd = (speed / 2);
var setspeed = speed;
var scale = _xscale;
var ex = 5;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
if (Key.isDown(65)) {
setspeed = wlk;
} else {
setspeed = run;
}
while (_root.ground.hitTest(_x, _y, true)) {
djump = false;
tjump = false;
_y = (_y-1);
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
grav = grav * (slow * 1.25);
speed = slowspd;
} else {
speed = setspeed;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if ((_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(68))) && (!Key.isDown(83))) {
this.gotoAndStop(3);
}
if (((((Key.isDown(68) && (!Key.isDown(38))) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(83))) && (_root.ground.hitTest(_x, _y + 3, true))) {
this.gotoAndStop(8);
}
if ((((((Key.isDown(83) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(38))) && (!Key.isDown(68))) && (_root.ground.hitTest(_x, _y + 3, true))) && (_currentframe != 6)) {
this.gotoAndStop(7);
} else if (Key.isDown(83) && (grav > 1)) {
this.gotoAndStop(6);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(2);
} else if (((Key.isDown(38) && (djump == false)) && (grav > 0)) && (tjump == false)) {
grav = -dbl;
djump = true;
this.gotoAndStop(4);
} else if ((Key.isDown(38) && (tjump == false)) && (grav > 1)) {
grav = -tri;
tjump = true;
this.gotoAndStop(5);
}
if ((_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - _height, true))) {
_x = (_x - speed);
}
if ((_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - _height, true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, (_y - _height) - 15, true)) {
grav = 1;
}
}
Frame 14
prevFrame();
Frame 15
stop();
Instance of Symbol 49 MovieClip in Frame 15
/* no clip actions */
Instance of Symbol 142 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy2)) {
_root.enemy2._x = _root.enemy2._x - 6;
}
}
Instance of Symbol 117 MovieClip "player" in Frame 15
onClipEvent (load) {
var grav = 0;
var run = 5;
var wlk = 2.5;
var speed = run;
var jumpHeight = 12;
var dbl = 10;
var tri = 10;
var djump = false;
var tjump = false;
var thro = false;
var slow = 0.7;
var slowspd = (speed / 2);
var setspeed = speed;
var scale = _xscale;
var ex = 5;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
if (Key.isDown(65)) {
setspeed = wlk;
} else {
setspeed = run;
}
while (_root.ground.hitTest(_x, _y, true)) {
djump = false;
tjump = false;
_y = (_y-1);
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
grav = grav * (slow * 1.25);
speed = slowspd;
} else {
speed = setspeed;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if ((_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(68))) && (!Key.isDown(83))) {
this.gotoAndStop(3);
}
if (((((Key.isDown(68) && (!Key.isDown(38))) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(83))) && (_root.ground.hitTest(_x, _y + 3, true))) {
this.gotoAndStop(8);
}
if ((((((Key.isDown(83) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(38))) && (!Key.isDown(68))) && (_root.ground.hitTest(_x, _y + 3, true))) && (_currentframe != 6)) {
this.gotoAndStop(7);
} else if (Key.isDown(83) && (grav > 1)) {
this.gotoAndStop(6);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(2);
} else if (((Key.isDown(38) && (djump == false)) && (grav > 0)) && (tjump == false)) {
grav = -dbl;
djump = true;
this.gotoAndStop(4);
} else if ((Key.isDown(38) && (tjump == false)) && (grav > 1)) {
grav = -tri;
tjump = true;
this.gotoAndStop(5);
}
if ((_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - _height, true))) {
_x = (_x - speed);
}
if ((_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - _height, true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, (_y - _height) - 15, true)) {
grav = 1;
}
}
Instance of Symbol 49 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.edeath1 == 1)) {
tellTarget ("/player") {
_x = 38;
};
_root.gotoAndPlay(17);
}
}
Frame 16
prevFrame();
Frame 17
stop();
Instance of Symbol 49 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.edeath3 == 1)) {
tellTarget ("/player") {
_x = 38;
};
_root.gotoAndPlay(20);
}
}
Instance of Symbol 165 MovieClip "enemy3" in Frame 17
onClipEvent (load) {
escale = _xscale;
}
onClipEvent (enterFrame) {
if (_root.edeath3 == 0) {
_root.xd = this._x - _root.player._x;
_root.yd = this._y - _root.player._y;
_root.npx = (_root.xd + _root.yd) / 1.41421356237309;
_root.npy = (_root.yd - _root.xd) / 1.41421356237309;
if ((_root.npx >= 0) && (_root.npy <= 0)) {
_xscale = (-escale);
this._x = this._x - 7;
return(2);
}
if ((_root.npx <= 0) && (_root.npy >= 0)) {
_xscale = escale;
this._x = this._x + 7;
return(4);
}
if (((this._x < (_root.player._x + 50)) && (this._x > (_root.player._x - 50))) && ((this._y < (_root.player._y + 100)) && (this._y > (_root.player._y - 100)))) {
_root.enemy3.gotoAndPlay("attack");
}
}
}
Instance of Symbol 117 MovieClip "player" in Frame 17
onClipEvent (load) {
var grav = 0;
var run = 5;
var wlk = 2.5;
var speed = run;
var jumpHeight = 12;
var dbl = 10;
var tri = 10;
var djump = false;
var tjump = false;
var thro = false;
var slow = 0.7;
var slowspd = (speed / 2);
var setspeed = speed;
var scale = _xscale;
var ex = 5;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
if (Key.isDown(65)) {
setspeed = wlk;
} else {
setspeed = run;
}
while (_root.ground.hitTest(_x, _y, true)) {
djump = false;
tjump = false;
_y = (_y-1);
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
grav = grav * (slow * 1.25);
speed = slowspd;
} else {
speed = setspeed;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if ((_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(68))) && (!Key.isDown(83))) {
this.gotoAndStop(3);
}
if (((((Key.isDown(68) && (!Key.isDown(38))) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(83))) && (_root.ground.hitTest(_x, _y + 3, true))) {
this.gotoAndStop(8);
}
if ((((((Key.isDown(83) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(38))) && (!Key.isDown(68))) && (_root.ground.hitTest(_x, _y + 3, true))) && (_currentframe != 6)) {
this.gotoAndStop(7);
} else if (Key.isDown(83) && (grav > 1)) {
this.gotoAndStop(6);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(2);
} else if (((Key.isDown(38) && (djump == false)) && (grav > 0)) && (tjump == false)) {
grav = -dbl;
djump = true;
this.gotoAndStop(4);
} else if ((Key.isDown(38) && (tjump == false)) && (grav > 1)) {
grav = -tri;
tjump = true;
this.gotoAndStop(5);
}
if ((_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - _height, true))) {
_x = (_x - speed);
}
if ((_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - _height, true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, (_y - _height) - 15, true)) {
grav = 1;
}
}
Frame 18
nextFrame();
Frame 19
nextFrame();
Frame 20
stop();
Instance of Symbol 142 MovieClip in Frame 20
onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy2)) {
_root.enemy2._x = _root.enemy2._x + 6;
}
}
Instance of Symbol 142 MovieClip in Frame 20
onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy2)) {
_root.enemy2._x = _root.enemy2._x - 6;
}
}
Instance of Symbol 117 MovieClip "player" in Frame 20
onClipEvent (load) {
var grav = 0;
var run = 5;
var wlk = 2.5;
var speed = run;
var jumpHeight = 12;
var dbl = 10;
var tri = 10;
var djump = false;
var tjump = false;
var thro = false;
var slow = 0.7;
var slowspd = (speed / 2);
var setspeed = speed;
var scale = _xscale;
var ex = 5;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
if (Key.isDown(65)) {
setspeed = wlk;
} else {
setspeed = run;
}
while (_root.ground.hitTest(_x, _y, true)) {
djump = false;
tjump = false;
_y = (_y-1);
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
grav = grav * (slow * 1.25);
speed = slowspd;
} else {
speed = setspeed;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if ((_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(68))) && (!Key.isDown(83))) {
this.gotoAndStop(3);
}
if (((((Key.isDown(68) && (!Key.isDown(38))) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(83))) && (_root.ground.hitTest(_x, _y + 3, true))) {
this.gotoAndStop(8);
}
if ((((((Key.isDown(83) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(38))) && (!Key.isDown(68))) && (_root.ground.hitTest(_x, _y + 3, true))) && (_currentframe != 6)) {
this.gotoAndStop(7);
} else if (Key.isDown(83) && (grav > 1)) {
this.gotoAndStop(6);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(2);
} else if (((Key.isDown(38) && (djump == false)) && (grav > 0)) && (tjump == false)) {
grav = -dbl;
djump = true;
this.gotoAndStop(4);
} else if ((Key.isDown(38) && (tjump == false)) && (grav > 1)) {
grav = -tri;
tjump = true;
this.gotoAndStop(5);
}
if ((_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - _height, true))) {
_x = (_x - speed);
}
if ((_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - _height, true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, (_y - _height) - 15, true)) {
grav = 1;
}
}
Instance of Symbol 49 MovieClip in Frame 20
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.edeath2 == 1)) {
tellTarget ("/player") {
_x = 38;
};
_root.gotoAndPlay(22);
}
}
Instance of Symbol 184 MovieClip "enemy2" in Frame 20
onClipEvent (load) {
escale = _xscale;
}
onClipEvent (enterFrame) {
if (_root.edeath2 == 0) {
_root.xd = this._x - _root.player._x;
_root.yd = this._y - _root.player._y;
_root.npx = (_root.xd + _root.yd) / 1.41421356237309;
_root.npy = (_root.yd - _root.xd) / 1.41421356237309;
if ((_root.npx >= 0) && (_root.npy <= 0)) {
_xscale = (-escale);
this._x = this._x - 6;
return(2);
}
if ((_root.npx <= 0) && (_root.npy >= 0)) {
_xscale = escale;
this._x = this._x + 6;
return(4);
}
if ((this._x < (_root.player._x + 100)) && (this._x > (_root.player._x - 100))) {
_root.enemy2.gotoAndPlay("attack2");
}
}
}
Frame 21
prevFrame();
Frame 22
stop();
Instance of Symbol 49 MovieClip in Frame 22
onClipEvent (enterFrame) {
if (this.hitTest(_root.player) && (_root.edeath4 == 1)) {
tellTarget ("player") {
_x = 38;
};
stopAllSounds();
_root.gotoAndPlay(25);
}
}
Instance of Symbol 214 MovieClip "boss" in Frame 22
onClipEvent (load) {
escale = _xscale;
}
onClipEvent (enterFrame) {
if (_root.blife < 1) {
_root.edeath4 = 1;
_root.boss.gotoAndPlay("death");
}
if (_root.edeath4 == 0) {
_root.random1 = random(6);
_root.xd = this._x - _root.player._x;
_root.yd = this._y - _root.player._y;
_root.npx = (_root.xd + _root.yd) / 1.41421356237309;
_root.npy = (_root.yd - _root.xd) / 1.41421356237309;
if ((_root.npx >= 0) && (_root.npy <= 0)) {
_xscale = (-escale);
this._x = this._x - 8;
return(2);
}
if ((_root.npx <= 0) && (_root.npy >= 0)) {
_xscale = escale;
this._x = this._x + 8;
return(4);
}
if ((_root.random1 == 0) or (_root.random1 == 3)) {
if (((this._x < (_root.player._x + 100)) && (this._x > (_root.player._x - 100))) && ((this._y < (_root.player._y + 100)) && (this._y > (_root.player._y - 100)))) {
_root.boss.gotoAndPlay("attacka");
}
}
if ((_root.random1 == 1) or (_root.random1 == 4)) {
if (((this._x < (_root.player._x + 100)) && (this._x > (_root.player._x - 100))) && ((this._y < (_root.player._y + 100)) && (this._y > (_root.player._y - 100)))) {
_root.boss.gotoAndPlay("attack1");
}
}
if ((_root.random1 == 2) or (_root.random1 == 5)) {
if (((this._x < (_root.player._x + 100)) && (this._x > (_root.player._x - 100))) && ((this._y < (_root.player._y + 100)) && (this._y > (_root.player._y - 100)))) {
_root.boss.gotoAndPlay("attackb");
}
}
}
}
Instance of Symbol 117 MovieClip "player" in Frame 22
onClipEvent (load) {
var grav = 0;
var run = 5;
var wlk = 2.5;
var speed = run;
var jumpHeight = 12;
var dbl = 10;
var tri = 10;
var djump = false;
var tjump = false;
var thro = false;
var slow = 0.7;
var slowspd = (speed / 2);
var setspeed = speed;
var scale = _xscale;
var ex = 5;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
grav++;
_y = (_y + grav);
if (Key.isDown(65)) {
setspeed = wlk;
} else {
setspeed = run;
}
while (_root.ground.hitTest(_x, _y, true)) {
djump = false;
tjump = false;
_y = (_y-1);
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
grav = grav * (slow * 1.25);
speed = slowspd;
} else {
speed = setspeed;
}
if (Key.isDown(39)) {
_x = (_x + speed);
_xscale = scale;
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if (Key.isDown(37)) {
_x = (_x - speed);
_xscale = (-scale);
if (_root.ground.hitTest(_x, _y + 3, true)) {
this.gotoAndStop(1);
} else if (djump == false) {
this.gotoAndStop(2);
} else if (tjump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else if ((_root.ground.hitTest(_x, _y + 3, true) && (!Key.isDown(68))) && (!Key.isDown(83))) {
this.gotoAndStop(3);
}
if (((((Key.isDown(68) && (!Key.isDown(38))) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(83))) && (_root.ground.hitTest(_x, _y + 3, true))) {
this.gotoAndStop(8);
}
if ((((((Key.isDown(83) && (!Key.isDown(39))) && (!Key.isDown(37))) && (!Key.isDown(38))) && (!Key.isDown(68))) && (_root.ground.hitTest(_x, _y + 3, true))) && (_currentframe != 6)) {
this.gotoAndStop(7);
} else if (Key.isDown(83) && (grav > 1)) {
this.gotoAndStop(6);
}
if (Key.isDown(38) && (_root.ground.hitTest(_x, _y + 3, true))) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(2);
} else if (((Key.isDown(38) && (djump == false)) && (grav > 0)) && (tjump == false)) {
grav = -dbl;
djump = true;
this.gotoAndStop(4);
} else if ((Key.isDown(38) && (tjump == false)) && (grav > 1)) {
grav = -tri;
tjump = true;
this.gotoAndStop(5);
}
if ((_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x + (_width / 2)) + ex, _y - _height, true))) {
_x = (_x - speed);
}
if ((_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 2), true) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - (_height / 6), true))) || (_root.ground.hitTest((_x - (_width / 2)) - ex, _y - _height, true))) {
_x = (_x + speed);
}
if (_root.ground.hitTest(_x, (_y - _height) - 15, true)) {
grav = 1;
}
}
Frame 23
prevFrame();
Frame 24
prevFrame();
Frame 25
stop();
Frame 47
stop();
Symbol 7 MovieClip Frame 9
gotoAndPlay (1);
Symbol 8 MovieClip Frame 2
prevFrame();
Instance of Symbol 8 MovieClip in Symbol 9 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
}
Symbol 16 Button
on (release) {
nextFrame();
}
Symbol 25 Button
on (release) {
nextFrame();
}
Symbol 30 Button
on (release) {
stopAllSounds();
gotoAndPlay (8);
}
Symbol 35 Button
on (release) {
nextFrame();
}
Symbol 37 Button
on (release) {
stopAllSounds();
play();
}
Symbol 47 MovieClip Frame 1
nextFrame();
Symbol 52 MovieClip Frame 1
stop();
Instance of Symbol 51 MovieClip in Symbol 52 MovieClip Frame 50
onClipEvent (enterFrame) {
stopAllSounds();
_root.gotoAndPlay("GameOver");
}
Symbol 58 MovieClip Frame 14
gotoAndPlay (1);
Symbol 80 MovieClip Frame 17
gotoAndPlay (1);
Instance of Symbol 108 MovieClip in Symbol 109 MovieClip Frame 4
onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy1)) {
_root.edeath1 = 1;
_root.enemy1.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy2)) {
_root.edeath2 = 1;
_root.enemy2.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy3)) {
_root.edeath3 = 1;
_root.enemy3.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy4)) {
_root.edeath4 = 1;
_root.enemy4.gotoAndPlay("death");
}
if (this.hitTest(_root.boss)) {
_root.blife.nextFrame();
}
}
Instance of Symbol 101 MovieClip in Symbol 115 MovieClip Frame 1
/* no clip actions */
Symbol 115 MovieClip Frame 10
gotoAndPlay (1);
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 2
stop();
Symbol 117 MovieClip Frame 3
stop();
Symbol 117 MovieClip Frame 4
stop();
Symbol 117 MovieClip Frame 5
stop();
Symbol 117 MovieClip Frame 6
stop();
Instance of Symbol 101 MovieClip in Symbol 117 MovieClip Frame 6
onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy1)) {
_root.edeath1 = 1;
_root.enemy1.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy2)) {
_root.edeath2 = 1;
_root.enemy2.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy3)) {
_root.edeath3 = 1;
_root.enemy3.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy4)) {
_root.edeath4 = 1;
_root.enemy4.gotoAndPlay("death");
}
if (this.hitTest(_root.boss)) {
_root.blife.nextFrame();
}
}
Symbol 117 MovieClip Frame 7
stop();
Instance of Symbol 109 MovieClip "pattack" in Symbol 117 MovieClip Frame 7
/* no clip actions */
Instance of Symbol 115 MovieClip "pattack" in Symbol 117 MovieClip Frame 8
onClipEvent (enterFrame) {
if (this.hitTest(_root.enemy1)) {
_root.edeath1 = 1;
_root.enemy1.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy2)) {
_root.edeath2 = 1;
_root.enemy2.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy3)) {
_root.edeath3 = 1;
_root.enemy3.gotoAndPlay("death");
}
if (this.hitTest(_root.enemy4)) {
_root.edeath4 = 1;
_root.enemy4.gotoAndPlay("death");
}
if (this.hitTest(_root.boss)) {
_root.blife.nextFrame();
}
}
Symbol 140 MovieClip Frame 13
gotoAndPlay (1);
Symbol 140 MovieClip Frame 21
gotoAndPlay (15);
Symbol 140 MovieClip Frame 28
stop();
Instance of Symbol 121 MovieClip in Symbol 146 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Symbol 146 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Symbol 146 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Symbol 146 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Instance of Symbol 121 MovieClip in Symbol 146 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.player._x = _root.player._x - 30;
_root.player._y = _root.player._y - 60;
_root.health.nextFrame();
}
}
Symbol 165 MovieClip Frame 17
gotoAndPlay (1);
Instance of Symbol 142 MovieClip in Symbol 165 MovieClip Frame 18
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Instance of Symbol 142 MovieClip in Symbol 165 MovieClip Frame 18
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Symbol 165 MovieClip Frame 27
gotoAndPlay (18);
Symbol 165 MovieClip Frame 34
stop();
Symbol 184 MovieClip Frame 17
gotoAndPlay (1);
Instance of Symbol 142 MovieClip in Symbol 184 MovieClip Frame 18
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Instance of Symbol 142 MovieClip in Symbol 184 MovieClip Frame 30
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Symbol 184 MovieClip Frame 35
gotoAndPlay (18);
gotoAndPlay (18);
gotoAndPlay (18);
Symbol 184 MovieClip Frame 42
stop();
Symbol 214 MovieClip Frame 17
gotoAndPlay (1);
Instance of Symbol 142 MovieClip in Symbol 214 MovieClip Frame 20
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Symbol 214 MovieClip Frame 26
gotoAndPlay (1);
Instance of Symbol 142 MovieClip in Symbol 214 MovieClip Frame 28
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Instance of Symbol 142 MovieClip in Symbol 214 MovieClip Frame 30
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Instance of Symbol 142 MovieClip in Symbol 214 MovieClip Frame 36
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Symbol 214 MovieClip Frame 37
gotoAndPlay (1);
Instance of Symbol 108 MovieClip in Symbol 214 MovieClip Frame 40
/* no clip actions */
Instance of Symbol 142 MovieClip in Symbol 214 MovieClip Frame 40
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.health.nextFrame();
}
}
Symbol 214 MovieClip Frame 48
gotoAndPlay (1);
Symbol 214 MovieClip Frame 49
stop();
gotoAndStop(good);
Symbol 214 MovieClip Frame 50
stop();
Symbol 216 MovieClip Frame 1
stop();
Instance of Symbol 51 MovieClip in Symbol 216 MovieClip Frame 50
onClipEvent (enterFrame) {
stopAllSounds();
_root.gotoAndPlay("good");
}
Symbol 219 Button
on (release) {
stopAllSounds();
gotoAndPlay (5);
}
Symbol 222 Button
on (release) {
stopAllSounds();
gotoAndPlay (5);
}