Frame 1
Stage.showMenu = false;
_root._quality = "LOW";
function eraselevel() {
i = 0;
while (i < (mapwidth * mapheight)) {
_root["tiles" + i].removeMovieClip();
_root["bullet" + i].removeMovieClip();
_root["enemy" + i].removeMovieClip();
i++;
}
_root.failedgui.removeMovieClip();
_root.gui.removeMovieClip();
_root.player.removeMovieClip();
_root.bullet.removeMovieClip();
_root.tiles.removeMovieClip();
_root.enemy.removeMovieClip();
}
stop();
stopAllSounds();
onEnterFrame = function () {
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (preloader._alpha > (100 - PercentLoaded)) {
preloader._alpha = preloader._alpha - 5;
}
if ((PercentLoaded == 100) && (preloader._alpha <= 0)) {
gotoAndStop (2);
}
};
eraselevel();
Frame 2
function eraselevel() {
i = 0;
while (i < (mapwidth * mapheight)) {
_root["tiles" + i].removeMovieClip();
_root["bullet" + i].removeMovieClip();
_root["enemy" + i].removeMovieClip();
i++;
}
_root.failedgui.removeMovieClip();
_root.gui.removeMovieClip();
_root.player.removeMovieClip();
_root.bullet.removeMovieClip();
_root.tiles.removeMovieClip();
_root.enemy.removeMovieClip();
}
stop();
starting = false;
stopAllSounds();
newsound = new Sound();
newsound.attachSound("newclear-ghostbike");
newsound.start(0, 100);
onEnterFrame = function () {
if ((Key.isDown(13) || (Key.isDown(32))) && (starting == false)) {
starting = true;
_root.startgame.gotoAndPlay(3);
}
};
eraselevel();
Frame 3
function eraselevel() {
i = 0;
while (i < (mapwidth * mapheight)) {
_root["tiles" + i].removeMovieClip();
_root["bullet" + i].removeMovieClip();
_root["enemy" + i].removeMovieClip();
i++;
}
_root.failedgui.removeMovieClip();
_root.gui.removeMovieClip();
_root.player.removeMovieClip();
_root.bullet.removeMovieClip();
_root.tiles.removeMovieClip();
_root.enemy.removeMovieClip();
}
stop();
eraselevel();
Instance of Symbol 123 MovieClip in Frame 3
onClipEvent (load) {
currentoption = 0;
heightarray = [75, 99, 124, 150];
select = false;
timer = 0;
}
onClipEvent (enterFrame) {
ydist = heightarray[currentoption] - _y;
_y = (_y + (ydist / 3));
if ((Key.isDown(32) || (Key.isDown(13))) && (select == false)) {
if ((_y > (heightarray[currentoption] - 1)) && (_y < (heightarray[currentoption] + 1))) {
newsound = new Sound();
newsound.attachSound("squee");
newsound.start(0, 1);
select = true;
}
}
if (select == true) {
timer = timer + 1;
if (timer > 10) {
if (currentoption == 0) {
_root.gotoAndStop("gamescreen");
}
}
}
}
on (keyPress "<Down>") {
if ((currentoption != 3) && (select == false)) {
currentoption = currentoption + 1;
}
}
on (keyPress "<Up>") {
if ((currentoption != 0) && (select == false)) {
currentoption = currentoption - 1;
}
}
Frame 4
function eraselevel() {
i = 0;
while (i < (mapwidth * mapheight)) {
_root["tiles" + i].removeMovieClip();
_root["bullet" + i].removeMovieClip();
_root["enemy" + i].removeMovieClip();
i++;
}
}
function refreshlevel() {
i = 0;
while (i < (mapwidth * mapheight)) {
_root["tiles" + i].removeMovieClip();
i++;
}
buildlevel();
}
function buildlevel() {
ix = 0;
iy = 0;
mapwidth = 21;
mapheight = 13;
tilecount = 0;
build = true;
i = 0;
while (i < (mapwidth * mapheight)) {
if (build == true) {
if ((levelarray[iy][ix] > 0) && (levelarray[iy][ix] != 0.1)) {
_root.tiles.duplicateMovieClip("tiles" + tilecount, _root.getNextHighestDepth());
_root["tiles" + tilecount].gotoAndStop(levelarray[iy][ix]);
if (levelarray[iy][ix] == 1) {
_root["tiles" + tilecount].gotoAndStop(2 + Math.round(random(3)));
}
_root["tiles" + tilecount]._x = ix * 16;
_root["tiles" + tilecount]._y = iy * 16;
tilecount = tilecount + 1;
}
if (levelarray[iy][ix] < 0) {
_root.enemy.duplicateMovieClip("enemy" + tilecount, _root.getNextHighestDepth());
_root["enemy" + tilecount].gotoAndStop(levelarray[iy][ix] * -1);
_root["enemy" + tilecount].tilex = ix;
_root["enemy" + tilecount].tiley = iy;
_root["enemy" + tilecount]._x = ix * 16;
_root["enemy" + tilecount]._y = iy * 16;
_root["enemy" + tilecount].active = true;
_root["enemy" + tilecount].dead = false;
if (levelarray[iy][ix] == -1) {
if (levelarray[iy + 1][ix] > 0) {
_root["enemy" + tilecount].enemy.dir = 0;
}
if ((levelarray[iy + 1][ix] <= 0) && (levelarray[iy - 1][ix] > 0)) {
_root["enemy" + tilecount].enemy.dir = 180;
_root["enemy" + tilecount].enemy.gotoAndStop(3);
}
}
tilecount = tilecount + 1;
}
ix = ix + 1;
if (ix == mapwidth) {
iy = iy + 1;
ix = 0;
}
if ((ix == mapwidth) && (iy == mapheight)) {
build = false;
}
}
i++;
}
_root.gui.swapDepths(this.getNextHighestDepth());
_root.failedgui.swapDepths(this.getNextHighestDepth());
}
function addsound(soundname) {
newsound = new Sound();
newsound.attachSound(soundname);
newsound.start(0, 1);
}
function startmusic(soundname) {
newmusic = new Sound();
newmusic.attachSound(soundname);
newmusic.start(0, 1000);
}
function hurtplayer(damage) {
if ((player_hurt == false) && (player_froze == false)) {
player_hurt = true;
player_health = player_health - (damage + random(2));
addsound("sou_hurt");
}
}
stop();
stopAllSounds();
transition = false;
gamepause = false;
player_froze = true;
if (player_froze == true) {
player.gotoAndStop(19);
}
player_y = 9;
player_x = 9;
player_onground = false;
player_spin = false;
player_walk = false;
player_health = 99;
player_bulletcount = 0;
player_shootcounter = 0;
player_shottime = 0;
player_shot = false;
player_ball = false;
player_dir = 0;
player_inwater = false;
player_hurt = false;
player_dead = false;
player_hurttime = 0;
player_vspeed = 0;
player_gravity = 0;
player_hasmorph = false;
player_eggcount = 0;
akeydown = false;
worldx = 0;
worldy = 0;
worldarray = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]];
worldarray[0][0] = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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1, 1, 1, 1, 1, 1, 1, 8, 1, 8, 1, 8, 1, 1, 1, 1, 1, 1, 1]];
levelarray = worldarray[worldy][worldx];
onEnterFrame = function () {
tens = Math.floor(player_health / 10);
ones = player_health - (tens * 10);
_root.gui.tens.gotoAndStop(tens + 1);
_root.gui.ones.gotoAndStop(ones + 1);
etens = Math.floor(player_eggcount / 10);
eones = player_eggcount - (etens * 10);
_root.gui.etens.gotoAndStop(etens + 1);
_root.gui.eones.gotoAndStop(eones + 1);
if (player_health > 99) {
player_health = 99;
}
if (player_health < 0) {
player_health = 0;
}
if (((transition == false) && (player_dead == false)) && (gamepause == false)) {
_root.player._y = (player_y * 16) + 16;
_root.player._x = (player_x * 16) + 16;
if (player_hurt == true) {
player_hurttime = player_hurttime + 1;
_root.player._alpha = 50;
if (player_hurttime > 20) {
player_hurttime = 0;
player_hurt = false;
_root.player._alpha = 100;
}
}
if (player_health <= 0) {
player_health = 0;
player_dead = true;
}
player_inwater = false;
if (player_froze == false) {
if (((Key.isDown(65) && (player_onground == true)) && (akeydown == false)) && (player_ball == false)) {
akeydown = true;
player_y = player_y - 0.3;
player_vspeed = 0.48;
addsound("sou_jump");
if (player_walk == true) {
player_spin = true;
player_vspeed = 0.48;
}
}
if (Key.isDown(65)) {
akeydown = true;
}
if ((!Key.isDown(65)) && (akeydown == true)) {
if (player_vspeed > 0) {
player_vspeed = -(player_vspeed / 4);
}
akeydown = false;
}
if (((levelarray[(Math.floor(player_y) + 1) + 1][Math.ceil(player_x - 0.8) + 1] > 0) || (levelarray[(Math.floor(player_y) + 1) + 1][Math.ceil(player_x - 0.5) + 1] > 0)) || (levelarray[(Math.floor(player_y) + 1) + 1][Math.ceil(player_x - 0.2) + 1] > 0)) {
player_spin = false;
player_oldvspeed = player_vspeed;
player_vspeed = 0;
player_gravity = 0;
if (player_onground == false) {
addsound("sou_step");
}
player_onground = true;
player_y = Math.floor(player_y);
}
if (((levelarray[(Math.floor(player_y) + 1) + 1][Math.ceil(player_x - 0.8) + 1] <= 0) && (levelarray[(Math.floor(player_y) + 1) + 1][Math.ceil(player_x - 0.5) + 1] <= 0)) && (levelarray[(Math.floor(player_y) + 1) + 1][Math.ceil(player_x - 0.2) + 1] <= 0)) {
player_gravity = 0.025;
player_onground = false;
}
if ((player_vspeed > 0) && (((levelarray[Math.floor(player_y + 0.2)][Math.ceil(player_x - 0.8) + 1] > 0) || (levelarray[Math.floor(player_y + 0.2)][Math.ceil(player_x - 0.5) + 1] > 0)) || (levelarray[Math.floor(player_y + 0.2)][Math.ceil(player_x - 0.2) + 1] > 0))) {
player_vspeed = 0;
player_y = player_y + 0.1;
}
player_y = player_y - (player_vspeed / (1 + (player_inwater * 1.4)));
player_vspeed = player_vspeed - player_gravity;
if (player_vspeed > 1) {
player_vspeed = 1;
}
if (player_vspeed < -1) {
player_vspeed = -1;
}
if (((((Key.isDown(40) && (downkeydown == false)) && (player_onground == true)) && (player_hasmorph == true)) && (player_ball == false)) && (!Key.isDown(38))) {
downkeydown = true;
if (player_dir == 0) {
_root.player.gotoAndStop(21);
}
if (player_dir == 180) {
_root.player.gotoAndStop(22);
}
player_y = player_y - 0.2;
player_ball = true;
}
if (!Key.isDown(40)) {
downkeydown = false;
}
if (Key.isDown(38)) {
if (player_ball == true) {
if (((levelarray[Math.floor(player_y + 0.2)][Math.ceil(player_x - 0.8) + 1] <= 0) && (levelarray[Math.floor(player_y + 0.2)][Math.ceil(player_x - 0.5) + 1] <= 0)) && (levelarray[Math.floor(player_y + 0.2)][Math.ceil(player_x - 0.2) + 1] <= 0)) {
player_ball = false;
}
}
player_aimup = true;
}
if ((!Key.isDown(38)) && (player_onground == true)) {
player_aimup = false;
}
if (player_ball == false) {
if ((Key.isDown(37) && (levelarray[Math.ceil(player_y) + 1][(Math.ceil(player_x - 0) + 1) - 1] <= 0)) && (levelarray[Math.ceil(player_y)][(Math.ceil(player_x - 0) + 1) - 1] <= 0)) {
if ((player_spin == true) || (player_onground == true)) {
player_x = player_x - (0.2 / (1 + (player_inwater * 1.4)));
}
if ((player_spin == false) && (player_onground == false)) {
player_x = player_x - (0.1 / (1 + (player_inwater * 1.4)));
}
}
if ((Key.isDown(39) && (levelarray[Math.ceil(player_y) + 1][(Math.floor(player_x + 0) + 1) + 1] <= 0)) && (levelarray[Math.ceil(player_y)][(Math.floor(player_x + 0) + 1) + 1] <= 0)) {
if ((player_spin == true) || (player_onground == true)) {
player_x = player_x + (0.2 / (1 + (player_inwater * 1.4)));
}
if ((player_spin == false) && (player_onground == false)) {
player_x = player_x + (0.1 / (1 + (player_inwater * 1.4)));
}
}
}
if (player_ball == true) {
if (Key.isDown(37) && (levelarray[Math.ceil(player_y) + 1][(Math.ceil(player_x - 0) + 1) - 1] <= 0)) {
player_x = player_x - (0.2 / (1 + (player_inwater * 1.4)));
}
if (Key.isDown(39) && (levelarray[Math.ceil(player_y) + 1][(Math.floor(player_x + 0) + 1) + 1] <= 0)) {
player_x = player_x + (0.2 / (1 + (player_inwater * 1.4)));
}
}
if (Key.isDown(37)) {
if (player_spin == false) {
player_dir = 180;
}
player_walk = true;
if ((player_onground == true) && (player_ball == false)) {
if (player_aimup == false) {
_root.player.gotoAndStop(12 + player_shot);
}
if (player_aimup == true) {
_root.player.gotoAndStop(14);
}
}
if (player_ball == true) {
_root.player.gotoAndStop(22);
}
}
if (Key.isDown(39)) {
if (player_spin == false) {
player_dir = 0;
}
player_walk = true;
if ((player_onground == true) && (player_ball == false)) {
if (player_aimup == false) {
_root.player.gotoAndStop(3 + player_shot);
}
if (player_aimup == true) {
_root.player.gotoAndStop(5);
}
}
if (player_ball == true) {
_root.player.gotoAndStop(21);
}
}
if (Key.isDown(39) && (Key.isDown(37))) {
player_walk = false;
if ((player_onground == true) && (player_ball == false)) {
if (player_aimup == false) {
if (player_dir == 0) {
_root.player.gotoAndStop(1);
}
if (player_dir == 180) {
_root.player.gotoAndStop(10);
}
}
if (player_aimup == true) {
if (player_dir == 0) {
_root.player.gotoAndStop(2);
}
if (player_dir == 180) {
_root.player.gotoAndStop(11);
}
}
}
}
if ((!Key.isDown(39)) && (!Key.isDown(37))) {
player_walk = false;
if ((player_onground == true) && (player_ball == false)) {
if (player_aimup == false) {
if (player_dir == 0) {
_root.player.gotoAndStop(1);
}
if (player_dir == 180) {
_root.player.gotoAndStop(10);
}
}
if (player_aimup == true) {
if (player_dir == 0) {
_root.player.gotoAndStop(2);
}
if (player_dir == 180) {
_root.player.gotoAndStop(11);
}
}
}
if (player_ball == true) {
if (player_dir == 0) {
_root.player.gotoAndStop(21);
}
if (player_dir == 180) {
_root.player.gotoAndStop(22);
}
}
}
if ((player_onground == false) && (player_ball == false)) {
if (player_spin == false) {
if (player_aimup == false) {
if (player_dir == 0) {
_root.player.gotoAndStop(6 + player_shot);
}
if (player_dir == 180) {
_root.player.gotoAndStop(15 + player_shot);
}
}
if (player_aimup == true) {
if (player_dir == 0) {
_root.player.gotoAndStop(8);
}
if (player_dir == 180) {
_root.player.gotoAndStop(17);
}
}
}
if (player_spin == true) {
if (player_dir == 0) {
_root.player.gotoAndStop(9);
}
if (player_dir == 180) {
_root.player.gotoAndStop(18);
}
}
}
}
player_shootcounter = player_shootcounter + 1;
if ((_root.player_froze == false) && (gamepause == false)) {
i = 0;
while (i < 11) {
if (levelarray[Math.floor(_root["bullet" + i]._y / 16)][Math.floor(_root["bullet" + i]._x / 16)] > 0) {
_root["bullet" + i].removeMovieClip(_root["bullet" + i]);
}
if (_root["bullet" + i]._currentframe == 1) {
_root["bullet" + i]._x = _root["bullet" + i]._x + 6;
}
if (_root["bullet" + i]._currentframe == 2) {
_root["bullet" + i]._x = _root["bullet" + i]._x - 6;
}
if (_root["bullet" + i]._currentframe == 3) {
_root["bullet" + i]._y = _root["bullet" + i]._y - 6;
}
i++;
}
player_shottime = player_shottime + 1;
if (player_shottime > 10) {
player_shot = false;
}
}
if (((Key.isDown(83) && (player_froze == false)) && (player_ball == false)) && (gamepause == false)) {
if (player_shootcounter > 5) {
player_shot = true;
player_shottime = 0;
player_shootcounter = 0;
player_spin = false;
player_bulletcount = player_bulletcount + 1;
if (player_bulletcount > 10) {
player_bulletcount = 0;
}
gunsound = new Sound();
gunsound.attachSound("sou_shoot");
gunsound.start(0, 1);
_root.bullet.duplicateMovieClip("bullet" + player_bulletcount, this.getNextHighestDepth() + player_bulletcount);
_root.gui.swapDepths(this.getNextHighestDepth());
_root.failedgui.swapDepths(this.getNextHighestDepth());
if (player_aimup == false) {
_root["bullet" + player_bulletcount]._y = ((player_y * 16) + 11) + (player_ball * 7);
if (player_dir == 0) {
_root["bullet" + player_bulletcount]._x = (player_x * 16) + 32;
_root["bullet" + player_bulletcount].gotoAndStop(1);
}
if (player_dir == 180) {
_root["bullet" + player_bulletcount]._x = (player_x * 16) + 16;
_root["bullet" + player_bulletcount].gotoAndStop(2);
}
}
if (player_aimup == true) {
_root["bullet" + player_bulletcount]._y = (player_y * 16) - 3;
if (player_dir == 0) {
_root["bullet" + player_bulletcount]._x = (player_x * 16) + 25;
_root["bullet" + player_bulletcount].gotoAndStop(3);
}
if (player_dir == 180) {
_root["bullet" + player_bulletcount]._x = (player_x * 16) + 23;
_root["bullet" + player_bulletcount].gotoAndStop(3);
}
}
}
}
if (Key.isDown(37) && (player_x < -1)) {
worldx = worldx - 1;
player_x = 0;
newx = 19;
newy = player_y;
transition = true;
}
if (Key.isDown(39) && (player_x > 19)) {
worldx = worldx + 1;
player_x = 18;
newx = -1;
newy = player_y;
transition = true;
}
if ((player_vspeed > 0) && (player_y < -0.5)) {
worldy = worldy - 1;
player_y = 0;
newy = 12;
newx = player_x;
transition = true;
}
if ((player_vspeed < 0) && (player_y > 11.5)) {
worldy = worldy + 1;
player_y = 13;
newy = 0;
newx = player_x;
transition = true;
}
}
if (transition == true) {
_root.player._y = (player_y * 16) + 16;
_root.player._x = (player_x * 16) + 16;
_root.ship._visible = false;
eraselevel();
xdist = newx - player_x;
ydist = newy - player_y;
if (player_x > newx) {
player_x = player_x - (Math.abs(xdist) / 8);
}
if (player_x < newx) {
player_x = player_x + (Math.abs(xdist) / 8);
}
if (player_y > newy) {
player_y = player_y - (Math.abs(ydist) / 8);
}
if (player_y < newy) {
player_y = player_y + (Math.abs(ydist) / 8);
}
if ((((player_x > 18) && (player_x < 19)) || ((player_x < 0) && (player_x > -1))) || ((player_y > 11.4) || (player_y < 0.4))) {
transition = false;
player_x = newx;
player_y = newy;
levelarray = worldarray[worldy][worldx];
refreshlevel();
}
}
if (player_dead == true) {
transition = false;
_root.player._alpha = 100;
if (_root.player._currentframe != 20) {
_root.player.gotoAndStop(20);
}
newx = 9.1875;
newy = 5.25;
_root.player._y = (player_y * 16) + 16;
_root.player._x = (player_x * 16) + 16;
eraselevel();
xdist = newx - player_x;
ydist = newy - player_y;
if (player_x > newx) {
player_x = player_x - (Math.abs(xdist) / 8);
}
if (player_x < newx) {
player_x = player_x + (Math.abs(xdist) / 8);
}
if (player_y > newy) {
player_y = player_y - (Math.abs(ydist) / 8);
}
if (player_y < newy) {
player_y = player_y + (Math.abs(ydist) / 8);
}
if ((((player_x > 9.125) && (player_x < 9.25)) && ((player_y > 5.1875) && (player_y < 5.3125))) && (_root.player.dead._currentframe == 2)) {
_root.player.dead.gotoAndPlay(4);
if ((_root.failedgui._y != 122) || (_root.failedgui._visible == false)) {
_root.failedgui._y = 122;
_root.failedgui._visible = true;
}
player_x = newx;
player_y = newy;
}
}
if (((Key.isDown(80) && (pkeydown == false)) && (_root.player_froze == false)) && (transition == false)) {
pkeydown = true;
gamepause = 1 - gamepause;
if (gamepause == 1) {
_root.player.anim.stop();
}
if (gamepause == 0) {
_root.player.anim.play();
}
addsound("sou_pause");
}
if (!Key.isDown(80)) {
pkeydown = false;
}
};
buildlevel();
Symbol 23 MovieClip [fps_meter] Frame 1
#initclip 1
FPS = function () {
this.onEnterFrame = function () {
this.fc++;
};
setInterval(this, "calc", 1000);
};
var p = ((FPS.prototype = new MovieClip()));
p.calc = function () {
this.dp.text = this.fc;
this.fc = 0;
};
Object.registerClass("fps_meter", FPS);
#endinitclip
Symbol 69 MovieClip Frame 204
stop();
_root.player_froze = false;
_root.startmusic("bunnymajs-outside");
Symbol 98 MovieClip Frame 1
stopAllSounds();
Symbol 98 MovieClip Frame 2
stop();
Symbol 98 MovieClip Frame 22
sound1 = new Sound(this);
sound1.attachSound("samus_die");
sound1.start(0, 1);
Symbol 98 MovieClip Frame 55
stop();
Symbol 105 MovieClip [player] Frame 1
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 17
_root.gotoAndStop("titlescreen");
Symbol 128 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 1
stop();
hurtwait = 6;
onEnterFrame = function () {
if ((((_parent.active == true) && (_parent.dead == false)) && (_root.player_froze == false)) && (_root.gamepause == false)) {
myx = Math.floor(_parent._x / 16);
myy = Math.floor(_parent._y / 16);
mytile = _root.levelarray[_parent._y / 16][_parent._x / 16];
if ((_root.levelarray[_parent._y / 16][_parent._x / 16] <= 0) && (_root.levelarray[_parent._y / 16][_parent._x / 16] != undefined)) {
canturn = true;
} else {
canturn = false;
}
if (((dir == 0) && (canturn == true)) && ((_root.levelarray[myy][myx + 1] > 0) && (_root.levelarray[myy + 1][myx] > 0))) {
dir = 90;
canturn = false;
}
if (((dir == 0) && (canturn == true)) && ((_root.levelarray[myy + 1][myx] <= 0) && (_root.levelarray[myy + 1][myx - 1] > 0))) {
dir = 270;
canturn = false;
}
if (((dir == 90) && (canturn == true)) && ((_root.levelarray[myy + 1][myx + 1] > 0) && (_root.levelarray[myy][myx + 1] <= 0))) {
dir = 0;
canturn = false;
}
if (((dir == 90) && (canturn == true)) && ((_root.levelarray[myy - 1][myx] > 0) && (_root.levelarray[myy][myx + 1] > 0))) {
dir = 180;
canturn = false;
}
if (((dir == 270) && (canturn == true)) && ((_root.levelarray[myy + 1][myx] > 0) && (_root.levelarray[myy][myx - 1] > 0))) {
dir = 0;
canturn = false;
}
if (((dir == 270) && (canturn == true)) && ((_root.levelarray[myy][myx - 1] <= 0) && (_root.levelarray[myy - 1][myx - 1] > 0))) {
dir = 180;
canturn = false;
}
if (((dir == 180) && (canturn == true)) && ((_root.levelarray[myy][myx - 1] > 0) && (_root.levelarray[myy + 1][myx] <= 0))) {
dir = 270;
canturn = false;
}
if (((dir == 180) && (canturn == true)) && ((_root.levelarray[myy - 1][myx] <= 0) && (_root.levelarray[myy - 1][myx + 1] > 0))) {
dir = 90;
canturn = false;
}
if ((dir == 0) && (_root.levelarray[myy][myx] > 0)) {
_parent._y = _parent._y - 16;
}
if ((dir == 180) && (_root.levelarray[myy][myx] > 0)) {
_parent._y = _parent._y + 16;
}
if ((dir == 270) && (_root.levelarray[myy][myx] > 0)) {
_parent._x = _parent._x + 16;
}
if ((dir == 90) && (_root.levelarray[myy][myx] > 0)) {
_parent._x = _parent._x - 16;
}
if (hurtwait > 2) {
if (dir == 0) {
_parent._x = _parent._x + 1;
gotoAndStop (1);
}
if (dir == 180) {
_parent._x = _parent._x - 1;
gotoAndStop (3);
}
if (dir == 270) {
_parent._y = _parent._y + 1;
gotoAndStop (4);
}
if (dir == 90) {
_parent._y = _parent._y - 1;
gotoAndStop (2);
}
}
hurtwait = hurtwait + 1;
if (((_parent._x + 8) > (_root.player._x - 8)) && ((_parent._x + 8) < ((_root.player._x + 16) + 8))) {
if (((_parent._y + 8) > (_root.player._y - (16 * (1 - _root.player_ball)))) && ((_parent._y + 8) < (_root.player._y + 16))) {
_root.hurtplayer(8);
}
}
if (_parent.health <= 0) {
_parent.dead = true;
gotoAndStop (5);
}
i = 0;
while (i < 11) {
if ((_root["bullet" + i]._x > _parent._x) && (_root["bullet" + i]._x < (_parent._x + 16))) {
if ((_root["bullet" + i]._y > _parent._y) && (_root["bullet" + i]._y < (_parent._y + 16))) {
_root["bullet" + i].removeMovieClip();
_parent.health = _parent.health - 1;
hurtwait = 0;
_root.addsound("sou_enemyhurt");
}
}
i++;
}
}
};
Symbol 166 MovieClip Frame 7
_parent._parent.dead = true;
_parent.gotoAndStop(4);
Symbol 167 MovieClip Frame 1
stop();
hurtwait = 0;
onEnterFrame = function () {
if ((((_parent.active == true) && (_parent.dead == false)) && (_root.player_froze == false)) && (_root.gamepause == false)) {
if (_root.levelarray[Math.floor((_parent._y + 18) / 16)][Math.floor((_parent._x + 8) / 16)] > 0) {
fall = false;
gotoAndStop (3);
}
if ((fall == true) && (hurtwait > 2)) {
_parent._y = _parent._y + 6;
}
hurtwait = hurtwait + 1;
if (((_parent._x + 8) > (_root.player._x - 8)) && ((_parent._x + 8) < ((_root.player._x + 16) + 8))) {
if ((_root.player._y > _parent._y) && (_currentframe == 1)) {
fall = true;
gotoAndStop (2);
}
if (((_parent._y + 12) > _root.player._y) && ((_parent._y + 12) < (_root.player._y + 16))) {
_root.hurtplayer(10);
}
}
if (((_parent._x + 8) > (_root.player._x - 24)) && ((_parent._x + 8) < ((_root.player._x + 16) + 24))) {
if ((((_parent._y + 12) > _root.player._y) && ((_parent._y + 12) < (_root.player._y + 16))) && (_currentframe == 3)) {
_root.hurtplayer(10);
}
}
if (_parent.health <= 0) {
_parent.dead = true;
gotoAndStop (4);
}
i = 0;
while (i < 11) {
if ((_root["bullet" + i]._x > (_parent._x - 4)) && (_root["bullet" + i]._x < ((_parent._x + 16) + 4))) {
if ((_root["bullet" + i]._y > _parent._y) && (_root["bullet" + i]._y < (_parent._y + 24))) {
_root["bullet" + i].removeMovieClip();
_parent.health = _parent.health - 1;
hurtwait = 0;
_root.addsound("sou_enemyhurt");
}
}
i++;
}
}
};
Symbol 171 MovieClip Frame 1
stop();
dir = 0;
notnumber = _root.levelarray[-1][-1];
onEnterFrame = function () {
if (((_parent.active == true) && (_root.player_froze == false)) && (_root.gamepause == false)) {
myx = Math.floor(_parent._x / 16);
myy = Math.floor(_parent._y / 16);
mytile = _root.levelarray[myy][myx];
if ((dir == 0) && ((_root.levelarray[myy][myx + 1] > 0) || (_root.levelarray[myy][myx + 1] == notnumber))) {
dir = 180;
}
if ((dir == 180) && ((_root.levelarray[myy][myx] > 0) || (_root.levelarray[myy][myx] == notnumber))) {
dir = 0;
}
if (dir == 0) {
_parent._x = _parent._x + 1;
gotoAndStop (1);
}
if (dir == 180) {
_parent._x = _parent._x - 1;
gotoAndStop (2);
}
if (((_parent._x + 8) > (_root.player._x - 6)) && ((_parent._x + 8) < ((_root.player._x + 16) + 6))) {
if (((_parent._y + 8) > (_root.player._y - (16 * (1 - _root.player_ball)))) && ((_parent._y + 8) < (_root.player._y + 16))) {
_root.hurtplayer(8);
}
}
i = 0;
while (i < 11) {
if ((_root["bullet" + i]._x > _parent._x) && (_root["bullet" + i]._x < (_parent._x + 16))) {
if ((_root["bullet" + i]._y > _parent._y) && (_root["bullet" + i]._y < (_parent._y + 16))) {
_root["bullet" + i].removeMovieClip();
_root.addsound("sou_ting");
}
}
i++;
}
}
};
Symbol 189 MovieClip Frame 1
stop();
onEnterFrame = function () {
if ((((_parent.active == true) && (_parent.dead == false)) && (_root.player_froze == false)) && (_root.gamepause == false)) {
if (((_parent._x + 8) > (_root.player._x - 6)) && ((_parent._x + 8) < ((_root.player._x + 16) + 6))) {
if (((_parent._y + 8) > _root.player._y) && ((_parent._y + 8) < (_root.player._y + 16))) {
_parent.health = _parent.health - 1;
}
}
if ((_parent.health <= 0) && (_parent.dead == false)) {
_parent.dead = true;
gotoAndStop (2);
_root.worldarray[_root.worldy][_root.worldx][_parent.tiley][_parent.tilex] = 0;
_root.player_eggcount = _root.player_eggcount + 1;
}
i = 0;
while (i < 11) {
if ((_root["bullet" + i]._x > _parent._x) && (_root["bullet" + i]._x < (_parent._x + 16))) {
if ((_root["bullet" + i]._y > _parent._y) && (_root["bullet" + i]._y < (_parent._y + 16))) {
_root["bullet" + i].removeMovieClip();
_parent.health = _parent.health - 1;
}
}
i++;
}
}
};
Symbol 189 MovieClip Frame 2
_root.addsound("sou_crush");
Symbol 199 MovieClip Frame 1
stop();
onEnterFrame = function () {
if ((((_parent.active == true) && (_parent.dead == false)) && (_root.player_froze == false)) && (_root.gamepause == false)) {
if (((_parent._x + 8) > (_root.player._x - 6)) && ((_parent._x + 8) < ((_root.player._x + 16) + 6))) {
if (((_parent._y + 8) > _root.player._y) && ((_parent._y + 8) < (_root.player._y + 16))) {
_parent.dead = true;
_root.player_hasmorph = true;
gotoAndStop (2);
stopAllSounds();
_root.addsound("sou_itemfanfair");
_root.worldarray[_root.worldy][_root.worldx][_parent.tiley][_parent.tilex] = 0;
}
}
}
};
Symbol 199 MovieClip Frame 2
_root.player_froze = true;
_root.player.anim.stop();
play();
Symbol 199 MovieClip Frame 118
_root.player_froze = false;
_root.startmusic("bunnymajs-outside");
_root.player.anim.play();
stop();
Symbol 200 MovieClip Frame 1
stop();
health = 2;
Symbol 200 MovieClip Frame 2
health = 2;
Symbol 200 MovieClip Frame 4
health = 1;
Symbol 228 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 2
stop();
Instance of Symbol 228 MovieClip "volumeico" in Symbol 233 MovieClip Frame 1
on (press) {
changed = false;
if ((changed == false) && (_currentframe == 1)) {
_root.newmusic.setVolume(0);
gotoAndStop (2);
changed = true;
}
if ((changed == false) && (_currentframe == 2)) {
_root.newmusic.setVolume(100);
gotoAndStop (1);
changed = true;
}
}
Instance of Symbol 23 MovieClip [fps_meter] in Symbol 233 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
component = true;
}
Symbol 239 Button
on (release) {
if (_parent._visible == true) {
_root.eraselevel();
_root.gotoAndStop("preloader");
}
}