Frame 1
tb = getBytesTotal();
lb = getBytesLoaded();
perc = int((10 / tb) * lb);
loading.gotoAndStop(perc);
Frame 2
if (lb != tb) {
gotoAndPlay (1);
}
Frame 5
function getbomb() {
bomb = 0;
while (bomb <= 28) {
if (_root.jack.hitTest(_root.levels.bombs["bomb" + bomb])) {
_root.levels.bombs["bomb" + bomb].gotoAndStop(5);
_root.pickedup++;
_root.score = _root.score + 100;
if (_root.jack.bomb == bomb) {
_root.levels.bombs.bonus._x = _root.levels.bombs["bomb" + bomb]._x;
_root.levels.bombs.bonus._y = _root.levels.bombs["bomb" + bomb]._y;
_root.levels.bombs.bonus.gotoAndPlay(2);
_root.jack.bomb++;
_root.score = _root.score + 100;
_root.levels.bombs["bomb" + _root.jack.bomb].gotoAndStop(2);
}
}
bomb++;
}
}
function turngold() {
_root.e.master1.gotoAndStop(8);
_root.e.master2.gotoAndStop(8);
_root.e.mastera.gotoAndStop(8);
_root.e.masterb.gotoAndStop(8);
i = 0;
while (i <= 20) {
_root.e["enemy" + i].gotoAndStop(8);
i++;
}
_root.e.enemy99.gotoAndStop(8);
_root.e.enemy100.gotoAndStop(8);
}
function flash() {
_root.e.master1.gotoAndStop(9);
_root.e.master2.gotoAndStop(9);
_root.e.mastera.gotoAndStop(9);
_root.e.masterb.gotoAndStop(9);
i = 0;
while (i <= 20) {
_root.e["enemy" + i].gotoAndStop(9);
i++;
}
_root.e.enemy99.gotoAndStop(9);
_root.e.enemy100.gotoAndStop(9);
}
_quality = "LOW";
jump = new Sound();
jump.attachSound("jump");
gotbonus = false;
level = 1;
id = 0;
walkerspeed = 1.5;
birdspeed = 1.5;
pickedup = 0;
lives = 16;
score = 0;
pause = false;
stop();
Instance of Symbol 33 MovieClip "life" in Frame 5
onClipEvent (load) {
gotoAndStop (4);
}
Instance of Symbol 48 MovieClip "bonusitem" in Frame 5
onClipEvent (load) {
bonuson = false;
xs = 4;
ys = 4;
}
onClipEvent (enterFrame) {
if ((bonuson == true) && (_root.pause == false)) {
if (_root.levels.platforms.hitTest(_x, _y + ys, true)) {
ys = -ys;
}
_x = (_x + xs);
_y = (_y + ys);
if ((_x < 20) || (_x > 420)) {
xs = -xs;
}
if ((_y < 20) || (_y > 420)) {
ys = -ys;
}
}
}
Frame 10
pause = true;
_root.bonusitem._x = -1000;
_root.gotbonus = false;
_root.lives--;
_root.bonusitem.bonuson = false;
_root.firsthit = false;
_root.falldowndead = false;
_root.life.gotoAndStop(_root.lives - 1);
Instance of Symbol 83 MovieClip "levels" in Frame 10
onClipEvent (load) {
gotoAndStop(_root.level + 1);
_root.e.gotoAndStop(_root.level);
}
Frame 95
pause = false;
stop();
Instance of Symbol 176 MovieClip "jack" in Frame 95
onClipEvent (load) {
levelup = false;
bonusused = false;
bomb = 0;
safe = 50;
_root.levels.bombs["bomb" + bomb].gotoAndStop(2);
secondjump = 0;
flying = false;
jumppressed = false;
yspeed = 0;
xspeed = 0;
}
onClipEvent (enterFrame) {
if ((_root.pickedup == 18) && (bonusused == false)) {
bonusused = true;
_root.bonusitem._x = 100;
_root.bonusitem.bonuson = true;
}
if ((_root.pickedup > 23) && (levelup == false)) {
levelup = true;
_root.jack.gotoAndStop("dance");
stopAllSounds();
_root.pickedup = 0;
_root.pause = true;
_root.gotoAndPlay(96);
}
safe--;
if (this.hitTest(_root.bonusitem)) {
trace("got bonus");
_root.bonusitem.bonuson = false;
_root.bonusitem._x = -1000;
_root.gotbonus = true;
_root.turngold();
safe = 0;
}
if ((_root.gotbonus == true) && (safe == -150)) {
_root.gotbonus = false;
}
if ((_root.gotbonus == true) && (safe == -130)) {
_root.flash();
}
if (_root.pause == false) {
if (_root.levels.bombs.hitTest(_x, _y - 16, true)) {
_root.getbomb();
}
if (_y > 440) {
_y = 440;
}
if ((yspeed < 0) && (flying == true)) {
gotoAndStop ("flyup");
}
if (yspeed > 0) {
gotoAndStop ("flydown");
flying == true;
}
if (_y < 50) {
_y = 50;
yspeed = 0;
}
yspeed = yspeed + 0.2;
if (_root.levels.platforms.hitTest(_x, _y, true) && (yspeed > 0)) {
yspeed = 0;
flying = false;
}
if (_root.levels.platforms.hitTest(_x, _y - 35, true) && (yspeed < 0)) {
yspeed = 0;
}
_y = (_y + yspeed);
secondjump--;
if (((Key.isDown(32) && (flying == true)) && (jumppressed == false)) && (secondjump < 0)) {
jumppressed = true;
secondjump = 10;
flying = true;
yspeed = -0.5;
} else if (((Key.isDown(32) && (flying == false)) && (jumppressed == false)) && (Key.isDown(38))) {
_root.jump.start();
jumppressed = true;
flying = true;
yspeed = -14;
_root.score = _root.score + 10;
} else if ((Key.isDown(32) && (flying == false)) && (jumppressed == false)) {
_root.jump.start();
jumppressed = true;
flying = true;
yspeed = -10;
_root.score = _root.score + 10;
}
if (!Key.isDown(32)) {
jumppressed = false;
}
if (Key.isDown(37) && (_x > 33)) {
if (flying == false) {
gotoAndStop ("left");
}
if (flying == true) {
gotoAndStop ("flyleft");
}
_x = (_x - 4);
}
if (Key.isDown(39) && (_x < 420)) {
if (flying == false) {
gotoAndStop ("right");
}
if (flying == true) {
gotoAndStop ("flyright");
}
_x = (_x + 4);
}
if (((yspeed == 0) && (!Key.isDown(37))) && (!Key.isDown(39))) {
gotoAndStop ("stand");
}
}
}
Frame 223
i = 0;
while (i <= 30) {
_root.e["enemy" + i].removeMovieClip();
i++;
}
_root.id = 0;
_root.lives++;
_root.level++;
_root.levels.gotoAndStop(_root.level + 1);
_root.e.gotoAndStop(_root.level);
_root.pickedup = 0;
_root.jack.levelup = false;
_root.gotoAndPlay(10);
Frame 224
stopAllSounds();
Instance of Symbol 176 MovieClip "jack" in Frame 224
onClipEvent (load) {
yspeed = 0;
_x = _root.dx;
_y = _root.dy;
gotoAndStop ("die");
}
onClipEvent (enterFrame) {
if (_root.falldowndead == true) {
yspeed = yspeed + 0.25;
if (_root.levels.platforms.hitTest(_x, _y, true)) {
yspeed = 0;
if (_root.firsthit == false) {
gotoAndPlay ("hitground");
_root.firsthit = true;
}
}
_y = (_y + yspeed);
}
}
Frame 315
trace("LIVES :" + _root.lives);
if (_root.lives > 2) {
_root.gotoAndPlay(10);
} else if (_root.lives == 2) {
_root.jack.gotoAndStop("gameover");
stop();
}
Instance of Symbol 181 MovieClip in Frame 315
onClipEvent (load) {
_x = int(_root.jack._x);
_y = int(_root.jack._y);
}
onClipEvent (enterFrame) {
if (((_x - 260) < 3) && ((_x - 260) > -3)) {
_x = 260;
}
if (((_y - 242) < 3) && ((_y - 242) > -3)) {
_y = 242;
}
if (_x < 260) {
_x = (_x + 3);
} else if (_x > 260) {
_x = (_x - 3);
} else if (_y < 242) {
_y = (_y + 3);
} else if (_y > 242) {
_y = (_y - 3);
}
}
Symbol 8 MovieClip Frame 1
stop();
Symbol 22 Button
on (release, keyPress "<Space>") {
stopAllSounds();
gotoAndPlay (10);
}
Symbol 33 MovieClip Frame 4
stop();
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 5
this._x = -3000;
stop();
Symbol 61 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 2
stop();
Instance of Symbol 54 MovieClip "platforms" in Symbol 83 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 83 MovieClip Frame 3
stop();
Instance of Symbol 66 MovieClip "platforms" in Symbol 83 MovieClip Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 71 MovieClip "platforms" in Symbol 83 MovieClip Frame 4
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 76 MovieClip "platforms" in Symbol 83 MovieClip Frame 5
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 81 MovieClip "platforms" in Symbol 83 MovieClip Frame 6
onClipEvent (load) {
_visible = false;
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 1
stop();
Instance of Symbol 143 MovieClip "master1" in Symbol 144 MovieClip Frame 1
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.master1.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "enemy100" in Symbol 144 MovieClip Frame 1
onClipEvent (load) {
gotox = 0;
gotoy = 0;
lastmove = "";
type = 3;
gotoAndPlay (5);
xspeed = 1;
turns = 0;
yspeed = 0;
turnspeed = 0.01;
fell = false;
moving = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if (_x < 30) {
xspeed = -xspeed;
}
if (type == 3) {
if ((_root.jack._x > (this._x - 5)) && (_root.jack._x < (this._x + 5))) {
if (_root.jack._y < _y) {
moving == true;
gotoy = 40;
gotox = 0;
}
if (_root.jack._y > _y) {
moving == true;
gotoy = -40;
gotox = 0;
}
}
if (_root.levels.platforms.hitTest(_x, _y + 8, true) && (gotoy < 0)) {
moving = false;
gotoy = 0;
gotox = 0;
}
if (_root.levels.platforms.hitTest(_x, _y - 10, true) && (gotoy > 0)) {
moving = true;
gotoy = 0;
gotox = 40;
}
trace(gotox);
trace(gotoy);
trace(" ");
if (moving == true) {
if (gotox < 0) {
_x = (_x - _root.birdspeed);
gotoAndStop (7);
gotox = gotox + 1;
}
if (gotox > 0) {
_x = (_x + _root.birdspeed);
gotoAndStop (6);
gotox = gotox - 1;
}
if (gotoy > 0) {
_y = (_y - _root.birdspeed);
gotoAndStop (5);
gotoy = gotoy - 1;
}
if (gotoy < 0) {
_y = (_y + _root.birdspeed);
gotoAndStop (5);
gotoy = gotoy + 1;
}
if ((gotox == 0) && (gotoy == 0)) {
moving = false;
}
}
if (moving == false) {
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if ((hy < ty) && (lastmove != "up")) {
gotoy = 40;
moving = true;
lastmove = "up";
} else if ((hy > ty) && (lastmove != "down")) {
gotoy = -40;
moving = true;
lastmove = "down";
} else if ((hx < tx) && (lastmove != "left")) {
gotox = -40;
moving = true;
lastmove = "left";
} else if ((hx > tx) && (lastmove != "right")) {
gotox = 40;
moving = true;
lastmove = "right";
}
}
}
}
}
Instance of Symbol 143 MovieClip "master2" in Symbol 144 MovieClip Frame 1
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.master2.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "mastera" in Symbol 144 MovieClip Frame 2
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 4)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.mastera.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "masterb" in Symbol 144 MovieClip Frame 2
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.masterb.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "enemy99" in Symbol 144 MovieClip Frame 2
onClipEvent (load) {
gotox = 0;
gotoy = 0;
lastmove = "";
type = 3;
gotoAndPlay (5);
xspeed = 1;
turns = 0;
yspeed = 0;
turnspeed = 0.01;
fell = false;
moving = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if (_x < 30) {
xspeed = -xspeed;
}
if (type == 3) {
if ((_root.jack._x > (this._x - 5)) && (_root.jack._x < (this._x + 5))) {
if (_root.jack._y < _y) {
moving == true;
gotoy = 40;
gotox = 0;
}
if (_root.jack._y > _y) {
moving == true;
gotoy = -40;
gotox = 0;
}
}
if (_root.levels.platforms.hitTest(_x, _y + 8, true) && (gotoy < 0)) {
moving = false;
gotoy = 0;
gotox = 0;
}
if (_root.levels.platforms.hitTest(_x, _y - 10, true) && (gotoy > 0)) {
moving = true;
gotoy = 0;
gotox = 40;
}
trace(gotox);
trace(gotoy);
trace(" ");
if (moving == true) {
if (gotox < 0) {
_x = (_x - _root.birdspeed);
gotoAndStop (7);
gotox = gotox + 1;
}
if (gotox > 0) {
_x = (_x + _root.birdspeed);
gotoAndStop (6);
gotox = gotox - 1;
}
if (gotoy > 0) {
_y = (_y - _root.birdspeed);
gotoAndStop (5);
gotoy = gotoy - 1;
}
if (gotoy < 0) {
_y = (_y + _root.birdspeed);
gotoAndStop (5);
gotoy = gotoy + 1;
}
if ((gotox == 0) && (gotoy == 0)) {
moving = false;
}
}
if (moving == false) {
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if ((hy < ty) && (lastmove != "up")) {
gotoy = 40;
moving = true;
lastmove = "up";
} else if ((hy > ty) && (lastmove != "down")) {
gotoy = -40;
moving = true;
lastmove = "down";
} else if ((hx < tx) && (lastmove != "left")) {
gotox = -40;
moving = true;
lastmove = "left";
} else if ((hx > tx) && (lastmove != "right")) {
gotox = 40;
moving = true;
lastmove = "right";
}
}
}
}
}
Instance of Symbol 143 MovieClip "enemy100" in Symbol 144 MovieClip Frame 3
onClipEvent (load) {
gotox = 0;
gotoy = 0;
lastmove = "";
type = 3;
gotoAndPlay (5);
xspeed = 1;
turns = 0;
yspeed = 0;
turnspeed = 0.01;
fell = false;
moving = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if (_x < 30) {
xspeed = -xspeed;
}
if (type == 3) {
if ((_root.jack._x > (this._x - 5)) && (_root.jack._x < (this._x + 5))) {
if (_root.jack._y < _y) {
moving == true;
gotoy = 40;
gotox = 0;
}
if (_root.jack._y > _y) {
moving == true;
gotoy = -40;
gotox = 0;
}
}
if (_root.levels.platforms.hitTest(_x, _y + 8, true) && (gotoy < 0)) {
moving = false;
gotoy = 0;
gotox = 0;
}
if (_root.levels.platforms.hitTest(_x, _y - 10, true) && (gotoy > 0)) {
moving = true;
gotoy = 0;
gotox = 40;
}
trace(gotox);
trace(gotoy);
trace(" ");
if (moving == true) {
if (gotox < 0) {
_x = (_x - 1);
gotoAndStop (7);
gotox = gotox + 1;
}
if (gotox > 0) {
_x = (_x + 1);
gotoAndStop (6);
gotox = gotox - 1;
}
if (gotoy > 0) {
_y = (_y - 1);
gotoAndStop (5);
gotoy = gotoy - 1;
}
if (gotoy < 0) {
_y = (_y + 1);
gotoAndStop (5);
gotoy = gotoy + 1;
}
if ((gotox == 0) && (gotoy == 0)) {
moving = false;
}
}
if (moving == false) {
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if ((hy < ty) && (lastmove != "up")) {
gotoy = 40;
moving = true;
lastmove = "up";
} else if ((hy > ty) && (lastmove != "down")) {
gotoy = -40;
moving = true;
lastmove = "down";
} else if ((hx < tx) && (lastmove != "left")) {
gotox = -40;
moving = true;
lastmove = "left";
} else if ((hx > tx) && (lastmove != "right")) {
gotox = 40;
moving = true;
lastmove = "right";
}
}
}
}
}
Instance of Symbol 143 MovieClip "master1" in Symbol 144 MovieClip Frame 3
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.master1.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "master2" in Symbol 144 MovieClip Frame 3
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.master2.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "enemy99" in Symbol 144 MovieClip Frame 4
onClipEvent (load) {
gotox = 0;
gotoy = 0;
lastmove = "";
type = 3;
gotoAndPlay (5);
xspeed = 1;
turns = 0;
yspeed = 0;
turnspeed = 0.01;
fell = false;
moving = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if (_x < 30) {
xspeed = -xspeed;
}
if (type == 3) {
if ((_root.jack._x > (this._x - 5)) && (_root.jack._x < (this._x + 5))) {
if (_root.jack._y < _y) {
moving == true;
gotoy = 40;
gotox = 0;
}
if (_root.jack._y > _y) {
moving == true;
gotoy = -40;
gotox = 0;
}
}
if (_root.levels.platforms.hitTest(_x, _y + 8, true) && (gotoy < 0)) {
moving = false;
gotoy = 0;
gotox = 0;
}
if (_root.levels.platforms.hitTest(_x, _y - 10, true) && (gotoy > 0)) {
moving = true;
gotoy = 0;
gotox = 40;
}
trace(gotox);
trace(gotoy);
trace(" ");
if (moving == true) {
if (gotox < 0) {
_x = (_x - 1);
gotoAndStop (7);
gotox = gotox + 1;
}
if (gotox > 0) {
_x = (_x + 1);
gotoAndStop (6);
gotox = gotox - 1;
}
if (gotoy > 0) {
_y = (_y - 1);
gotoAndStop (5);
gotoy = gotoy - 1;
}
if (gotoy < 0) {
_y = (_y + 1);
gotoAndStop (5);
gotoy = gotoy + 1;
}
if ((gotox == 0) && (gotoy == 0)) {
moving = false;
}
}
if (moving == false) {
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if ((hy < ty) && (lastmove != "up")) {
gotoy = 40;
moving = true;
lastmove = "up";
} else if ((hy > ty) && (lastmove != "down")) {
gotoy = -40;
moving = true;
lastmove = "down";
} else if ((hx < tx) && (lastmove != "left")) {
gotox = -40;
moving = true;
lastmove = "left";
} else if ((hx > tx) && (lastmove != "right")) {
gotox = 40;
moving = true;
lastmove = "right";
}
}
}
}
}
Instance of Symbol 143 MovieClip "mastera" in Symbol 144 MovieClip Frame 4
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.mastera.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "masterb" in Symbol 144 MovieClip Frame 4
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.masterb.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "enemy100" in Symbol 144 MovieClip Frame 5
onClipEvent (load) {
gotox = 0;
gotoy = 0;
lastmove = "";
type = 3;
gotoAndPlay (5);
xspeed = 1;
turns = 0;
yspeed = 0;
turnspeed = 0.01;
fell = false;
moving = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if (_x < 30) {
xspeed = -xspeed;
}
if (type == 3) {
if ((_root.jack._x > (this._x - 5)) && (_root.jack._x < (this._x + 5))) {
if (_root.jack._y < _y) {
moving == true;
gotoy = 40;
gotox = 0;
}
if (_root.jack._y > _y) {
moving == true;
gotoy = -40;
gotox = 0;
}
}
if (_root.levels.platforms.hitTest(_x, _y + 8, true) && (gotoy < 0)) {
moving = false;
gotoy = 0;
gotox = 0;
}
if (_root.levels.platforms.hitTest(_x, _y - 10, true) && (gotoy > 0)) {
moving = true;
gotoy = 0;
gotox = 40;
}
trace(gotox);
trace(gotoy);
trace(" ");
if (moving == true) {
if (gotox < 0) {
_x = (_x - 1);
gotoAndStop (7);
gotox = gotox + 1;
}
if (gotox > 0) {
_x = (_x + 1);
gotoAndStop (6);
gotox = gotox - 1;
}
if (gotoy > 0) {
_y = (_y - 1);
gotoAndStop (5);
gotoy = gotoy - 1;
}
if (gotoy < 0) {
_y = (_y + 1);
gotoAndStop (5);
gotoy = gotoy + 1;
}
if ((gotox == 0) && (gotoy == 0)) {
moving = false;
}
}
if (moving == false) {
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if ((hy < ty) && (lastmove != "up")) {
gotoy = 40;
moving = true;
lastmove = "up";
} else if ((hy > ty) && (lastmove != "down")) {
gotoy = -40;
moving = true;
lastmove = "down";
} else if ((hx < tx) && (lastmove != "left")) {
gotox = -40;
moving = true;
lastmove = "left";
} else if ((hx > tx) && (lastmove != "right")) {
gotox = 40;
moving = true;
lastmove = "right";
}
}
}
}
}
Instance of Symbol 143 MovieClip "master1" in Symbol 144 MovieClip Frame 5
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.master1.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Instance of Symbol 143 MovieClip "master2" in Symbol 144 MovieClip Frame 5
onClipEvent (load) {
regenx = this._x;
regeny = this._y;
type = 1;
xspeed = _root.walkerspeed;
turns = 0;
yspeed = 0;
turnspeed = 0.02;
fell = false;
}
onClipEvent (enterFrame) {
if (_root.gotbonus == true) {
if (this.hitTest(_root.jack)) {
_y = -2000;
type = 0;
}
}
if ((_root.pause == false) && (_root.gotbonus == false)) {
if (this.hitTest(_root.jack) && (_root.jack.safe < 0)) {
trace("HIT JACK");
_root.pause = true;
_root.dx = _root.jack._x;
_root.dy = _root.jack._y;
_root.gotoAndPlay("die");
}
if ((_x + xspeed) < 30) {
xspeed = -xspeed;
}
if (type == 1) {
if (xspeed > 0) {
gotoAndStop (1);
}
if (xspeed < 0) {
gotoAndStop (4);
}
if (_y > 410) {
_y = 410;
yspeed = 0;
xspeed = 0;
gotoAndStop (2);
type = 2;
}
if (yspeed > 0.5) {
xspeed = 0;
fell = true;
}
_x = (_x + xspeed);
yspeed = yspeed + 0.2;
if ((!_root.levels.platforms.hitTest(_x + (xspeed * 5), _y + 14, true)) && (turns < 3)) {
turns++;
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true)) {
if (fell == true) {
fell = false;
turns = 0;
xspeed = _root.walkerspeed;
if (_root.id < 3) {
_root.e.master2.duplicateMovieClip(["enemy" + _root.id], _root.id, {_x:regenx, _y:regeny});
_root.e["enemy" + _root.id].master = false;
_root.id++;
}
}
yspeed = 0;
}
_y = (_y + yspeed);
}
if (type == 2) {
if (xspeed > 0) {
gotoAndStop (2);
}
if (xspeed < 0) {
gotoAndStop (3);
}
_x = (_x + xspeed);
_y = (_y + yspeed);
hx = _root.jack._x;
hy = _root.jack._y;
tx = this._x;
ty = this._y;
if (hx < tx) {
xspeed = xspeed - turnspeed;
}
if (hx > tx) {
xspeed = xspeed + turnspeed;
}
if (hy < ty) {
yspeed = yspeed - turnspeed;
}
if (hy > ty) {
yspeed = yspeed + turnspeed;
}
if (xspeed > 1) {
xspeed = 1;
}
if (xspeed < -1) {
xspeed = -1;
}
if (yspeed > 1) {
yspeed = 1;
}
if (yspeed < -1) {
yspeed = -1;
}
if (_root.levels.platforms.hitTest(_x, _y + 14, true) && (yspeed > 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x, _y - 13, true) && (yspeed < 0)) {
yspeed = -yspeed;
}
if (_root.levels.platforms.hitTest(_x + 10, _y + 10, true) && (xspeed > 0)) {
xspeed = -xspeed;
}
if (_root.levels.platforms.hitTest(_x - 10, _y + 10, true) && (xspeed < 0)) {
xspeed = -xspeed;
}
}
}
}
Symbol 166 MovieClip Frame 31
_root.falldowndead = true;
_root.jack.gotoAndStop("falling");
Symbol 176 MovieClip Frame 1
stop();
Symbol 176 MovieClip Frame 90
stop();
Symbol 176 MovieClip Frame 98
stop();
Symbol 176 MovieClip Frame 111
stop();