Frame 173
level = 1;
limit = 90;
score = 0;
lives = 3;
_level0.gameover = false;
stop();
Frame 174
gameover = false;
keys_req = new array(-99, 3, 3, 3, 5, 5, 5, 5, 5, 6, 6);
screens = new array(-99, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3);
screens_needed = screens[level];
next_level = 1;
if (level == 1) {
levels_needed = new array(-99, 1);
}
if (level == 2) {
levels_needed = new array(-99, 2);
}
if (level == 3) {
levels_needed = new array(-99, 3);
}
if (level == 4) {
levels_needed = new array(-99, 1);
}
if (level == 5) {
levels_needed = new array(-99, 2);
}
if (level == 6) {
levels_needed = new array(-99, 3);
}
if (level == 7) {
levels_needed = new array(-99, 1, 2);
}
if (level == 8) {
levels_needed = new array(-99, 2, 3);
}
if (level == 9) {
levels_needed = new array(-99, 1, 3);
}
if (level == 10) {
levels_needed = new array(-99, 1, 2, 3);
}
key_needed = keys_req[level];
max_keys = 6;
level1_posx = new array(274, 470, 27, 180, 523, 220);
level1_posy = new array(13, 214, 208, 126, 90, 52);
level2_posx = new array(262, 30, 221, 200, 333, 503);
level2_posy = new array(17, 142, 152, 210, 313, 94);
level3_posx = new array(266, 500, 230, 330, 106, 22);
level3_posy = new array(12, 262, 198, 133, 198, 134);
Frame 175
keys_collected = 0;
Instance of Symbol 80 MovieClip "timer_movie" in Frame 175
onClipEvent (load) {
timer = _level0.limit;
last = limit;
running = false;
expired = false;
activate_pulse = false;
start = 0;
trace("init timer");
}
onClipEvent (enterFrame) {
if (activate_pulse) {
_level0.hand.state = "get_dart";
activate_pulse = false;
start = getTimer();
running = true;
expired = false;
timer = _level0.limit;
trace("start timer" + start);
}
if (running) {
raw = int(((-start) / 1000) + (getTimer() / 1000));
rtimer = _level0.limit - raw;
if (rtimer != last) {
timer = rtimer;
}
last = rtimer;
}
if (timer < 1) {
expired = true;
running = false;
timer = 0;
}
}
Frame 176
_level0.timer_movie.activate_pulse = true;
bonus = 0;
required_level = levels_needed[next_level];
if (required_level == 1) {
gotoAndPlay (179);
} else if (required_level == 2) {
gotoAndPlay (200);
} else if (required_level == 3) {
gotoAndPlay (218);
}
Frame 179
keys_collected = 0;
kid = 0;
while (kid <= (max_keys - 1)) {
key_m = eval ("_level0.bluesq" + kid);
if (kid < key_needed) {
key_m._x = level1_posx[kid];
key_m._y = level1_posy[kid];
} else {
key_m._x = -678;
key_m._y = -678;
}
kid++;
}
stop();
m1 = (cross12._y - cross11._y) / (cross12._x - cross11._x);
m2 = (cross22._y - cross21._y) / (cross22._x - cross21._x);
m3 = (cross32._y - cross31._y) / (cross32._x - cross31._x);
m4 = (cross42._y - cross41._y) / (cross42._x - cross41._x);
speed = new array(10);
speed[1] = -1;
speed[4] = -1;
speed[5] = -1;
speed[7] = -1;
speed[8] = -1;
speed[2] = 1;
speed[3] = 1;
speed[6] = 1;
Instance of Symbol 102 MovieClip "block1" in Frame 179
onClipEvent (load) {
m = (cross1._x - cross2._x) / (cross1._y - cross2._y);
trace("grad=" + m);
c = (m * cross1._x) - cross1._y;
trace("offset ====>" + c);
}
onClipEvent (enterFrame) {
x = 0;
}
Instance of Symbol 130 MovieClip "bluesq2" in Frame 179
/* no clip actions */
Instance of Symbol 139 MovieClip "man" in Frame 179
onClipEvent (load) {
function bomb_reset(boid_in) {
bomb_status[boid_in] = "first_time";
bomb_vx[boid_in] = bomb_step_magnitude;
bomb_vy[boid_in] = 0;
bomb_scale = -_level0.bomb1._xscale;
bomb_bmax = 7;
eval ("_level0.bomb" + boid_in)._x = bomb_startx;
eval ("_level0.bomb" + boid_in)._y = bomb_starty;
bomb_jump[boid_in] = false;
bomb_alive[boid_in] = true;
eval ("_level0.bomb" + boid_in)._visible = true;
bomb_first_time[boid_in] = true;
}
function bomb_check_ladders(boid_in) {
bomb_ladder_id[boid_in] = -99;
bomb_ladder_status[boid_in] = "";
if (_level0.ladder6.zone.hitTest(bomb_mov._x, bomb_mov._y - 20, false)) {
bomb_ladder_id[boid_in] = 6;
bomb_ladder_status[boid_in] = "UP";
}
if (_level0.ladder6.zone.hitTest(bomb_mov._x, bomb_mov._y + 20, false)) {
bomb_ladder_id[boid_in] = 6;
bomb_ladder_status[boid_in] = "DOWN";
}
if (_level0.ladder1.zone.hitTest(bomb_mov._x, bomb_mov._y - 20, false)) {
bomb_ladder_id[boid_in] = 1;
bomb_ladder_status[boid_in] = "UP";
}
if (_level0.ladder1.zone1.hitTest(bomb_mov._x, bomb_mov._y + 20, false)) {
bomb_ladder_id[boid_in] = 1;
bomb_ladder_status[boid_in] = "DOWN";
}
if (_level0.ladder3.zone.hitTest(bomb_mov._x, bomb_mov._y - 20, false)) {
bomb_ladder_id[boid_in] = 3;
bomb_ladder_status[boid_in] = "UP";
}
if (_level0.ladder3.zone1.hitTest(bomb_mov._x, bomb_mov._y + 20, false)) {
bomb_ladder_id[boid_in] = 3;
bomb_ladder_status[boid_in] = "DOWN";
}
if (_level0.ladder4.zone.hitTest(bomb_mov._x, bomb_mov._y - 20, false)) {
bomb_ladder_id[boid_in] = 4;
bomb_ladder_status[boid_in] = "UP";
}
if (_level0.ladder4.zone.hitTest(bomb_mov._x, bomb_mov._y + 20, false)) {
bomb_ladder_id[boid_in] = 4;
bomb_ladder_status[boid_in] = "DOWN";
}
if (_level0.ladder2.zone.hitTest(bomb_mov._x, bomb_mov._y - 20, false)) {
bomb_ladder_id[boid_in] = 2;
bomb_ladder_status[boid_in] = "UP";
}
if (_level0.ladder2.zone.hitTest(bomb_mov._x, bomb_mov._y + 20, false)) {
bomb_ladder_id[boid_in] = 2;
bomb_ladder_status[boid_in] = "DOWN";
}
if (_level0.ladder5.zone.hitTest(bomb_mov._x, bomb_mov._y - 20, false)) {
bomb_ladder_id[boid_in] = 5;
bomb_ladder_status[boid_in] = "UP";
}
if (_level0.ladder5.zone.hitTest(bomb_mov._x, bomb_mov._y + 20, false)) {
bomb_ladder_id[boid_in] = 5;
bomb_ladder_status[boid_in] = "DOWN";
}
if (_level0.ladder7.zone.hitTest(bomb_mov._x, bomb_mov._y - 20, false)) {
bomb_ladder_id[boid_in] = 7;
bomb_ladder_status[boid_in] = "UP";
}
if (_level0.ladder7.zone.hitTest(bomb_mov._x, bomb_mov._y + 20, false)) {
bomb_ladder_id[boid_in] = 7;
bomb_ladder_status[boid_in] = "DOWN";
}
if (_level0.ladder8.zone.hitTest(bomb_mov._x, bomb_mov._y - 20, false)) {
bomb_ladder_id[boid_in] = 8;
bomb_ladder_status[boid_in] = "UP";
}
if (_level0.ladder8.zone.hitTest(bomb_mov._x, bomb_mov._y + 20, false)) {
bomb_ladder_id[boid_in] = 8;
bomb_ladder_status[boid_in] = "DOWN";
}
return(bomb_ladder_id[boid_in] != -99);
}
function bomb_check_block() {
bomb_on_block = false;
b = 1;
while (b <= bomb_bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(bomb_mov._x, bomb_mov._y, true)) {
bomb_edge = bid.error_end.hitTest(bomb_mov._x, bomb_mov._y, true);
if (!bomb_edge) {
bomb_on_block = true;
bomb_yplatform[boid] = bid._y - 5;
bomb_my_platform[boid] = b;
bomb_status[boid] = "platform";
} else {
_level0.diag = true;
}
}
b++;
}
if (!bomb_on_block) {
bomb_vy[boid] = -5;
} else {
bomb_vy[boid] = 0;
}
return(bomb_on_block);
}
bomb_startx = 155;
bomb_starty = 85;
bomb_step_magnitude = 2;
bomb_jump_magnitude = 23;
bomb_status = new array();
bomb_vx = new array();
bomb_vy = new array();
bomb_first_time = new array();
bomb_jump = new array();
bomb_alive = new array();
bomb_ladder_id = new array();
bomb_my_ladder = new array();
bomb_ladder_status = new array();
bomb_yplatform = new array();
bomb_my_platform = new array();
bomb_ready_to_check_ladders = new array();
bomb_ladder_count = new array();
max_bomb_count = 12;
i = 1;
while (i <= max_bomb_count) {
bomb_alive[i] = false;
i++;
}
}
onClipEvent (enterFrame) {
boid = 1;
while (boid <= max_bomb_count) {
bomb_mov = eval ("_level0.bomb" + boid);
if (bomb_alive[boid]) {
if (bomb_mov.hitzone.hitTest(_level0.man)) {
trace("BANG man!");
_level0.whallop._x = _level0.man._x;
_level0.whallop._y = _level0.man._y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
bomb_mov._x = -1234;
bomb_alive[boid] = false;
_level0.man.alive = false;
}
if (bomb_mov.hitzone.hitTest(_level0.oil)) {
trace("BANG oil!");
_level0.whallop._x = bomb_mov._x;
_level0.whallop._y = bomb_mov._y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
bomb_mov._x = -1234;
bomb_alive[boid] = false;
}
if (bomb_first_time[boid]) {
_level0.donkey.gotoandplay("nod");
bomb_first_time[boid] = false;
} else {
if (bomb_ready_to_check_ladders[boid]) {
bomb_ladder_here = bomb_check_ladders(boid);
bomb_ladder_count[boid] = 0;
bomb_ladder_down = bomb_ladder_status[boid] == "DOWN";
if (bomb_ladder_down) {
bomb_ready_to_check_ladders[boid] = false;
}
} else {
bomb_ladder_here = false;
bomb_ladder_down = false;
bomb_ladder_count[boid]++;
if (bomb_ladder_count[boid] > 5) {
bomb_ready_to_check_ladders[boid] = true;
}
}
if (bomb_status[boid] == "ladder_down") {
ladder_mov = eval ("_level0.ladder" + bomb_my_ladder[boid]);
bomb_at_bottom = ladder_mov.bottom.hitTest(bomb_mov._x, bomb_mov._y, false);
if (!bomb_at_bottom) {
bomb_mov._y = bomb_mov._y + 2;
}
if (bomb_at_bottom) {
bomb_status[boid] = "free";
bomb_vx[boid] = -bomb_vx[boid];
}
} else {
bomb_mov._x = bomb_mov._x + bomb_vx[boid];
bomb_mov._y = bomb_mov._y - bomb_vy[boid];
if (bomb_status[boid] == "platform") {
bomb_vx[boid] = _level0.speed[bomb_my_platform[boid]] * bomb_step_magnitude;
if (bomb_my_platform[boid] == 1) {
bomb_mov._y = (3 - (_level0.m1 * (_level0.cross11._x - bomb_mov._x))) + _level0.cross11._y;
} else if (bomb_my_platform[boid] == 2) {
bomb_mov._y = (3 - (_level0.m2 * (_level0.cross21._x - bomb_mov._x))) + _level0.cross21._y;
} else if (bomb_my_platform[boid] == 3) {
bomb_mov._y = (3 - (_level0.m3 * (_level0.cross31._x - bomb_mov._x))) + _level0.cross31._y;
} else if (bomb_my_platform[boid] == 4) {
bomb_mov._y = (3 - (_level0.m4 * (_level0.cross41._x - bomb_mov._x))) + _level0.cross41._y;
} else {
bomb_mov._y = bomb_yplatform[boid];
}
if (!bomb_check_block()) {
bomb_status[boid] = "free";
}
}
if (bomb_jump[boid]) {
} else {
bomb_temp = bomb_check_block();
}
if (bomb_mov._y > 600) {
bomb_alive[boid] = false;
}
if (bomb_ladder_down and (bomb_status[boid] == "platform")) {
if (random(10) > 5) {
bomb_status[boid] = "ladder_down";
bomb_my_ladder[boid] = bomb_ladder_id[boid];
bomb_mov._y = bomb_mov._y + 20;
}
}
}
}
}
boid++;
}
}
onClipEvent (load) {
function check_oil() {
if (_level0.oil.hitTest(_level0.man)) {
trace("BANG! oil2");
_level0.whallop._x = _level0.man._x;
_level0.whallop._y = _level0.man._y - 20;
_level0.whallop._visible = true;
_level0.man.alive = false;
_level0.whallop.gotoandplay(2);
}
}
function reset() {
status = "free";
vx = 0;
vy = 0;
scale = start_scale;
bmax = 7;
this._x = startx;
this._y = starty;
jump = false;
alive = true;
this._visible = true;
first_time = true;
ladder_id = 0;
ladder_status = "none";
delay = 0;
}
function check_keys() {
kid = 0;
while (kid <= (_level0.key_needed - 1)) {
key_m = eval ("_level0.bluesq" + kid);
if (hitTest(key_m)) {
if (kid == 0) {
if ((_level0.keys_collected >= (_level0.key_needed - 1)) and (status == "platform")) {
if (_level0.next_level < _level0.screens_needed) {
_level0.next_level++;
_level0.keys_collected++;
_level0.score = _level0.score + (((_level0.timer_movie.timer * _level0.level) * 10) * _level0.keys_collected);
_root.gotoandplay("next_inter_level");
} else {
_level0.score = _level0.score + ((_level0.timer_movie.timer * _level0.level) * 10);
_level0.gameover = true;
_level0.bonus = (_level0.timer_movie.timer * _level0.level) * 20;
_root.gotoandplay("done");
}
}
} else {
key_m._x = -999;
_level0.score = _level0.score + ((_level0.timer_movie.timer * _level0.level) * 10);
_level0.keys_collected++;
}
}
kid++;
}
}
function check_block() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
edge = bid.error_end.hitTest(this._x, this._y, true);
if (!edge) {
on_block = true;
yplatform = bid._y - 5;
my_platform = b;
status = "platform";
} else {
_level0.diag = true;
}
}
b++;
}
if (!on_block) {
vy = -5;
} else {
vy = 0;
}
return(on_block);
}
function check_elevator_block() {
return(_level0.eblock1.hitTest(this._x, this._y, true));
}
function landed() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
on_block = true;
}
b++;
}
return(on_block);
}
donkey_started = false;
donkey_start_time = 0;
donkey_next_id = 0;
startx = this._x;
starty = this._y;
step_magnitude = 1.5;
jump_magnitude = 12;
gravity = 3;
start_scale = -this._xscale;
reset();
}
onClipEvent (enterFrame) {
if (!donkey_started) {
donkey_start_time++;
if (donkey_start_time > 30) {
donkey_started = true;
next_bomb = 10;
}
} else {
next_bomb--;
if (next_bomb == 1) {
donkey_next_id++;
if (donkey_next_id > max_bomb_count) {
donkey_next_id = 1;
}
bomb_reset(donkey_next_id);
}
if (next_bomb == 0) {
next_bomb = 210 - (_level0.level * 10);
trace("nb " + next_bomb);
eval ("_level0.bomb" + donkey_next_id).alive = true;
}
}
_level0.donkey_next_id = donkey_next_id;
if (!_level0.gameover) {
if (_level0.timer_movie.expired and (!_level0.gameover)) {
_level0.gameover = true;
_level0.gotoandplay("gameover");
}
}
if (this._y > 600) {
alive = false;
}
if (alive and (!_level0.gameover)) {
check_oil();
check_keys();
_x = (_x + vx);
_y = (_y - vy);
ladder_status = "none";
if (status == "ladder") {
this.gotoandstop("ladder");
ladder_mov = eval ("_level0.ladder" + ladder_id);
at_bottom = ladder_mov.bottom.hitTest(this._x, this._y, false);
at_top = ladder_mov.top.hitTest(this._x, this._y, false);
rungs_below = ladder_mov.zone.hitTest(this._x, this._y + 2, false) or ladder_mov.zone1.hitTest(this._x, this._y + 2, false);
rungs_above = ladder_mov.zone.hitTest(this._x, this._y - 2, false) or ladder_mov.zone1.hitTest(this._x, this._y - 2, false);
if ((Key.isDown(40) and (!at_bottom)) and rungs_below) {
this._y = this._y + step_magnitude;
}
if ((Key.isDown(38) and (!at_top)) and rungs_above) {
this._y = this._y - step_magnitude;
}
if (Key.isDown(37) and (at_bottom or at_top)) {
this._x = this._x - 3;
status = "free";
}
if (Key.isDown(39) and (at_bottom or at_top)) {
this._x = this._x + 3;
status = "free";
}
}
if (status == "free") {
if (check_elevator_block()) {
jump = false;
first_time = true;
status = "elevator";
}
}
if (status == "elevator") {
if ((!check_elevator_block()) and (!_level0.eblock1.change_this_cycle)) {
status = "free";
} else {
this._y = _level0.eblock1._y + 1;
}
}
if (status == "platform") {
if (my_platform == 1) {
this._y = (3 - (_level0.m1 * (_level0.cross11._x - this._x))) + _level0.cross11._y;
} else if (my_platform == 2) {
this._y = (3 - (_level0.m2 * (_level0.cross21._x - this._x))) + _level0.cross21._y;
} else if (my_platform == 3) {
this._y = (3 - (_level0.m3 * (_level0.cross31._x - this._x))) + _level0.cross31._y;
} else if (my_platform == 4) {
this._y = (3 - (_level0.m4 * (_level0.cross41._x - this._x))) + _level0.cross41._y;
} else {
this._y = yplatform;
}
if (!check_block()) {
status = "free";
} else {
if (_level0.ladder6.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 6;
ladder_status = "UP";
}
if (_level0.ladder6.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 6;
ladder_status = "DOWN";
}
if (_level0.ladder1.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 1;
ladder_status = "UP";
}
if (_level0.ladder1.zone1.hitTest(this._x, this._y + 20, false)) {
ladder_id = 1;
ladder_status = "DOWN";
}
if (_level0.ladder3.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 3;
ladder_status = "UP";
}
if (_level0.ladder3.zone1.hitTest(this._x, this._y + 20, false)) {
ladder_id = 3;
ladder_status = "DOWN";
}
if (_level0.ladder4.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 4;
ladder_status = "UP";
}
if (_level0.ladder4.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 4;
ladder_status = "DOWN";
}
if (_level0.ladder2.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 2;
ladder_status = "UP";
}
if (_level0.ladder2.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 2;
ladder_status = "DOWN";
}
if (_level0.ladder5.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 5;
ladder_status = "UP";
}
if (_level0.ladder5.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 5;
ladder_status = "DOWN";
}
if (_level0.ladder7.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 7;
ladder_status = "UP";
}
if (_level0.ladder7.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 7;
ladder_status = "DOWN";
}
if (_level0.ladder8.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 8;
ladder_status = "UP";
}
if (_level0.ladder8.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 8;
ladder_status = "DOWN";
}
}
}
if (jump) {
status = "free";
jump_cnt++;
t = t + 0.3;
vx = (3 * ux) * 0.707;
vy = (uy * 0.707) - (gravity * t);
if (vy < -6) {
vy = -6;
}
i_have_landed = landed();
if (i_have_landed and (jump_cnt > 2)) {
vy = 0;
jump = false;
first_time = true;
}
} else {
if (status != "ladder") {
temp = check_block();
}
if (Key.isDown(38) and ((status == "platform") and (ladder_status == "UP"))) {
status = "ladder";
this._y = this._y - 10;
}
if (Key.isDown(40) and ((status == "platform") and (ladder_status == "DOWN"))) {
status = "ladder";
this._y = this._y + 20;
}
if (Key.isDown(37) and ((status == "platform") or (status == "elevator"))) {
vx = -step_magnitude;
this._xscale = scale;
if (last_still) {
this.gotoandplay("walk");
last_still = false;
}
} else if (Key.isDown(Key.right) and ((status == "platform") or (status == "elevator"))) {
this._xscale = -scale;
if (last_still) {
this.gotoandplay("walk");
last_still = false;
}
vx = step_magnitude;
} else {
vx = 0;
this.gotoandstop(1);
last_still = true;
}
if (Key.isDown(32)) {
if (((!jump) and (!last_space)) and ((status == "platform") or (status == "elevator"))) {
jump = true;
if (first_time) {
this.gotoandplay("jump");
last_still = true;
ux = vx;
uy = jump_magnitude;
t = 0;
first_time = false;
jump_cnt = 0;
}
}
last_space = true;
} else {
last_space = false;
}
}
if (_level0.donkey.hitTest(_x, _y - 10, true)) {
trace("hit ass!");
_level0.whallop._x = _x;
_level0.whallop._y = _y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
this._x = -1234;
alive = false;
}
} else {
if (last_alive) {
_level0.lives--;
if ((!_level0.gameover) and (_level0.lives <= 0)) {
_level0.gameover = true;
_level0.gotoandplay("gameover");
}
}
if (delay < 40) {
this._visible = false;
this._y = 999;
delay++;
} else {
reset();
}
}
last_alive = alive;
}
Frame 200
function remove_bombs() {
rb = 0;
while (rb <= next_id) {
eval ("bomb" + rb).removeMovieClip();
rb++;
}
}
remove_bombs();
keys_collected = 0;
kid = 0;
while (kid <= (max_keys - 1)) {
key_m = eval ("_level0.bluesq" + kid);
if (kid < key_needed) {
key_m._x = level2_posx[kid];
key_m._y = level2_posy[kid];
} else {
key_m._x = -678;
key_m._y = -678;
}
kid++;
}
stop();
Instance of Symbol 146 MovieClip "eblock1" in Frame 200
/* no clip actions */
Instance of Symbol 130 MovieClip "bluesq4" in Frame 200
/* no clip actions */
Instance of Symbol 139 MovieClip "man" in Frame 200
onClipEvent (load) {
function reset() {
status = "free";
vx = 0;
vy = 0;
scale = start_scale;
bmax = 18;
this._x = startx;
this._y = starty;
jump = false;
alive = true;
this._visible = true;
first_time = true;
ladder_id = 0;
ladder_status = "none";
delay = 0;
}
function check_keys() {
kid = 0;
while (kid <= (_level0.key_needed - 1)) {
key_m = eval ("_level0.bluesq" + kid);
if (hitTest(key_m)) {
if (kid == 0) {
if ((_level0.keys_collected >= (_level0.key_needed - 1)) and (status == "platform")) {
if (_level0.next_level < _level0.screens_needed) {
_level0.next_level++;
_level0.keys_collected++;
_level0.score = _level0.score + (((_level0.timer_movie.timer * _level0.level) * 10) * _level0.keys_collected);
_root.gotoandplay("next_inter_level");
} else {
_level0.score = _level0.score + ((_level0.timer_movie.timer * _level0.level) * 10);
_level0.gameover = true;
_level0.bonus = (_level0.timer_movie.timer * _level0.level) * 20;
_root.gotoandplay("done");
}
}
} else {
key_m._x = -999;
_level0.score = _level0.score + ((_level0.timer_movie.timer * _level0.level) * 10);
_level0.keys_collected++;
}
}
kid++;
}
}
function check_block() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
edge = bid.error_end.hitTest(this._x, this._y, true);
if (!edge) {
if (((my_platform == "e1") and (b > 10)) or ((my_platform == "e2") and (b > 10))) {
trace("BLOCK THIS MOVE");
} else {
on_block = true;
yplatform = bid._y - 10;
my_platform = b;
status = "platform";
}
} else {
_level0.diag = true;
}
}
b++;
}
if (!on_block) {
vy = -4;
} else {
vy = 0;
}
return(on_block);
}
function check_elevator_block1() {
return(_level0.eblock1.hitTest(this._x, this._y, true));
}
function check_elevator_block2() {
return(_level0.eblock2.hitTest(this._x, this._y, true));
}
function landed() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
if (((my_platform == "e1") and (b > 10)) or ((my_platform == "e2") and (b > 10))) {
trace("BLOCK THIS MOVE");
} else {
on_block = true;
}
}
b++;
}
return(on_block);
}
eblock1_speed = -2;
eblock2_speed = -2;
startx = this._x;
starty = this._y;
step_magnitude = 1.3;
jump_magnitude = 12;
gravity = 3;
start_scale = -this._xscale;
reset();
}
onClipEvent (enterFrame) {
_level0.eblock1._y = _level0.eblock1._y + eblock1_speed;
if (_level0.eblock1._y < 120) {
_level0.eblock1._y = 360;
eblock1_change_this_cycle = true;
} else {
eblock1_change_this_cycle = false;
}
_level0.eblock2._y = _level0.eblock2._y + eblock2_speed;
if (_level0.eblock2._y < 120) {
_level0.eblock2._y = 360;
eblock2_change_this_cycle = true;
} else {
eblock2_change_this_cycle = false;
}
if (!_level0.gameover) {
if (_level0.timer_movie.expired and (!_level0.gameover)) {
_level0.gameover = true;
_level0.gotoandplay("gameover");
}
}
if (this._y > 600) {
alive = false;
}
if (alive and (!_level0.gameover)) {
check_keys();
_x = (_x + vx);
_y = (_y - vy);
ladder_status = "none";
if (status == "ladder") {
this.gotoandstop("ladder");
ladder_mov = eval ("_level0.ladder" + ladder_id);
at_bottom = ladder_mov.bottom.hitTest(this._x, this._y, false);
at_top = ladder_mov.top.hitTest(this._x, this._y, false);
rungs_below = ladder_mov.zone.hitTest(this._x, this._y + 2, false) or ladder_mov.zone1.hitTest(this._x, this._y + 2, false);
rungs_above = ladder_mov.zone.hitTest(this._x, this._y - 2, false) or ladder_mov.zone1.hitTest(this._x, this._y - 2, false);
if ((Key.isDown(40) and (!at_bottom)) and rungs_below) {
this._y = this._y + step_magnitude;
}
if ((Key.isDown(38) and (!at_top)) and rungs_above) {
this._y = this._y - step_magnitude;
}
if (Key.isDown(37) and (at_bottom or at_top)) {
this._x = this._x - 3;
status = "free";
}
if (Key.isDown(39) and (at_bottom or at_top)) {
this._x = this._x + 3;
status = "free";
}
}
if (status == "free") {
if (check_elevator_block1()) {
jump = false;
el_id = 1;
my_platform = "e1";
first_time = true;
status = "elevator";
}
if (check_elevator_block2()) {
jump = false;
my_platform = "e2";
el_id = 2;
first_time = true;
status = "elevator";
}
}
if (status == "elevator") {
if (el_id == 1) {
if ((!check_elevator_block1()) and (!eblock1_change_this_cycle)) {
status = "free";
} else {
this._y = _level0.eblock1._y + 1;
}
}
if (el_id == 2) {
if ((!check_elevator_block2()) and (!eblock2_change_this_cycle)) {
status = "free";
} else {
this._y = _level0.eblock2._y + 1;
}
}
}
if (status == "platform") {
this._y = yplatform;
if (!check_block()) {
status = "free";
} else {
if (_level0.ladder6.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 6;
ladder_status = "UP";
}
if (_level0.ladder6.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 6;
ladder_status = "DOWN";
}
if (_level0.ladder1.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 1;
ladder_status = "UP";
}
if (_level0.ladder1.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 1;
ladder_status = "DOWN";
}
if (_level0.ladder3.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 3;
ladder_status = "UP";
}
if (_level0.ladder3.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 3;
ladder_status = "DOWN";
}
if (_level0.ladder4.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 4;
ladder_status = "UP";
}
if (_level0.ladder4.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 4;
ladder_status = "DOWN";
}
if (_level0.ladder2.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 2;
ladder_status = "UP";
}
if (_level0.ladder2.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 2;
ladder_status = "DOWN";
}
if (_level0.ladder5.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 5;
ladder_status = "UP";
}
if (_level0.ladder5.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 5;
ladder_status = "DOWN";
}
if (_level0.ladder7.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 7;
ladder_status = "UP";
}
if (_level0.ladder7.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 7;
ladder_status = "DOWN";
}
if (_level0.ladder8.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 8;
ladder_status = "UP";
}
if (_level0.ladder8.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 8;
ladder_status = "DOWN";
}
if (_level0.ladder9.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 9;
ladder_status = "UP";
}
if (_level0.ladder9.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 9;
ladder_status = "DOWN";
}
if (_level0.ladder10.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 10;
ladder_status = "UP";
}
if (_level0.ladder10.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 10;
ladder_status = "DOWN";
}
}
}
if (jump) {
status = "free";
jump_cnt++;
t = t + 0.3;
vx = (3 * ux) * 0.707;
vy = (uy * 0.707) - (gravity * t);
if (vy < -6) {
vy = -6;
}
i_have_landed = landed();
if (i_have_landed and (jump_cnt > 2)) {
vy = 0;
jump = false;
first_time = true;
}
} else {
if (status != "ladder") {
temp = check_block();
}
if (Key.isDown(38) and ((status == "platform") and (ladder_status == "UP"))) {
status = "ladder";
this._y = this._y - 10;
}
if (Key.isDown(40) and ((status == "platform") and (ladder_status == "DOWN"))) {
status = "ladder";
this._y = this._y + 20;
}
if (Key.isDown(37) and ((status == "platform") or (status == "elevator"))) {
vx = -step_magnitude;
this._xscale = scale;
if (last_still) {
this.gotoandplay("walk");
last_still = false;
}
} else if (Key.isDown(Key.right) and ((status == "platform") or (status == "elevator"))) {
this._xscale = -scale;
if (last_still) {
this.gotoandplay("walk");
last_still = false;
}
vx = step_magnitude;
} else {
vx = 0;
this.gotoandstop(1);
last_still = true;
}
if (Key.isDown(32)) {
if (((!jump) and (!last_space)) and ((status == "platform") or (status == "elevator"))) {
jump = true;
if (first_time) {
this.gotoandplay("jump");
last_still = true;
ux = vx;
uy = jump_magnitude;
t = 0;
first_time = false;
jump_cnt = 0;
}
}
last_space = true;
} else {
last_space = false;
}
}
if (_level0.donkey.hitTest(_x, _y - 10, true)) {
trace("hit ass!");
_level0.whallop._x = _x;
_level0.whallop._y = _y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
this._x = -1234;
alive = false;
}
} else {
if (last_alive) {
_level0.lives--;
if ((!_level0.gameover) and (_level0.lives <= 0)) {
_level0.gameover = true;
_level0.gotoandplay("gameover");
}
}
if (delay < 40) {
this._visible = false;
this._y = 999;
delay++;
} else {
reset();
}
}
last_alive = alive;
}
Instance of Symbol 55 MovieClip "bomba" in Frame 200
onClipEvent (load) {
function reset() {
xmax = 230;
xmin = 165;
dirn = 1;
status = "first_time";
vx = step_magnitude;
vy = 0;
scale = -this._xscale;
bmax = 7;
this._x = startx;
this._y = starty;
jump = false;
alive = true;
this._visible = true;
first_time = true;
}
function flip_direction() {
dirn = dirn * -1;
}
function new_direction() {
dirn = -1;
if (my_ladder == 3) {
dirn = 1;
}
}
function check_ladders() {
ladder_id = -99;
ladder_status = "";
if (_level0.ladder3.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 3;
ladder_status = "UP";
}
if (_level0.ladder3.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 3;
ladder_status = "DOWN";
}
if (_level0.ladder4.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 4;
ladder_status = "UP";
}
if (_level0.ladder4.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 4;
ladder_status = "DOWN";
}
return(ladder_id != -99);
}
function check_block() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
edge = bid.error_end.hitTest(this._x, this._y, true);
if (!edge) {
on_block = true;
yplatform = bid._y - 5;
my_platform = b;
status = "platform";
} else {
_level0.diag = true;
}
}
b++;
}
if (!on_block) {
vy = -5;
} else {
vy = 0;
}
return(on_block);
}
function landed() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
on_block = true;
}
b++;
}
return(on_block);
}
step_magnitude = 1;
jump_magnitude = 23;
reset();
}
onClipEvent (enterFrame) {
if (alive) {
if (this.hitzone.hitTest(_level0.man)) {
_level0.whallop._x = this._x;
_level0.whallop._y = this._y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
_level0.man.alive = false;
}
if (first_time) {
first_time = false;
} else {
if (ready_to_check_ladders and (status == "platform")) {
ladder_here = check_ladders();
ladder_count = 0;
ladder_down = ladder_status == "DOWN";
ladder_up = ladder_status == "UP";
if (ladder_down or ladder_up) {
ready_to_check_ladders = false;
}
} else {
ladder_here = false;
ladder_down = false;
ladder_up = false;
ladder_count++;
if (ladder_count > 20) {
ready_to_check_ladders = true;
}
}
if (status == "ladder_down") {
ladder_mov = eval ("_level0.ladder" + my_ladder);
at_bottom = ladder_mov.bottom.hitTest(this._x, this._y, false);
if (!at_bottom) {
this._y = this._y + 1;
}
if (at_bottom) {
status = "free";
new_direction();
ready_to_check_ladders = false;
ladder_count = 0;
}
} else if (status == "ladder_up") {
ladder_mov = eval ("_level0.ladder" + my_ladder);
at_top = ladder_mov.top.hitTest(this._x, this._y, false);
if (!at_top) {
this._y = this._y - 1;
}
if (at_top) {
status = "free";
new_direction();
ready_to_check_ladders = false;
ladder_count = 0;
}
} else {
_x = (_x + (vx * dirn));
_y = (_y - (vy / 2));
if (_x > xmax) {
_x = xmax;
flip_direction();
}
if (_x < xmin) {
_x = xmin;
flip_direction();
}
if (status == "platform") {
this._y = yplatform - 2;
if (!check_block()) {
status = "free";
}
}
if (jump) {
} else {
temp = check_block();
}
if (this._y > 600) {
alive = false;
}
if (ladder_down and (status == "platform")) {
if (random(10) > 5) {
status = "ladder_down";
my_ladder = ladder_id;
this._y = this._y + 20;
}
}
if (ladder_up and (status == "platform")) {
if (random(10) > 5) {
status = "ladder_up";
my_ladder = ladder_id;
this._y = this._y - 20;
}
}
}
}
}
}
Instance of Symbol 55 MovieClip "bombb" in Frame 200
onClipEvent (load) {
function reset() {
xmax = 540;
xmin = 450;
dirn = 1;
status = "first_time";
vx = step_magnitude;
vy = 0;
scale = -this._xscale;
bmax = 14;
bmin = 14;
this._x = startx;
this._y = starty;
jump = false;
alive = true;
this._visible = true;
first_time = true;
}
function flip_direction() {
dirn = dirn * -1;
}
function new_direction() {
dirn = -1;
if (my_ladder == 3) {
dirn = 1;
}
}
function check_block() {
on_block = false;
b = bmin;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
edge = bid.error_end.hitTest(this._x, this._y, true);
if (!edge) {
on_block = true;
yplatform = bid._y - 5;
my_platform = b;
status = "platform";
} else {
_level0.diag = true;
}
}
b++;
}
if (!on_block) {
vy = -5;
} else {
vy = 0;
}
return(on_block);
}
step_magnitude = 1;
jump_magnitude = 23;
reset();
}
onClipEvent (enterFrame) {
if (alive) {
if (this.hitzone.hitTest(_level0.man)) {
_level0.whallop._x = this._x;
_level0.whallop._y = this._y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
_level0.man.alive = false;
}
if (first_time) {
_level0.donkey.gotoandplay("nod");
first_time = false;
} else {
_x = (_x + (vx * dirn));
_y = (_y - (vy / 2));
if (_x > xmax) {
_x = xmax;
flip_direction();
}
if (_x < xmin) {
_x = xmin;
flip_direction();
}
if (status == "platform") {
this._y = yplatform - 2;
if (!check_block()) {
status = "free";
}
}
if (jump) {
} else {
temp = check_block();
}
if (this._y > 600) {
alive = false;
}
}
}
}
Frame 218
keys_collected = 0;
kid = 0;
while (kid <= (max_keys - 1)) {
key_m = eval ("_level0.bluesq" + kid);
if (kid < key_needed) {
key_m._x = level3_posx[kid];
key_m._y = level3_posy[kid];
} else {
key_m._x = -678;
key_m._y = -678;
}
kid++;
}
stop();
Instance of Symbol 95 MovieClip "oil" in Frame 218
/* no clip actions */
Instance of Symbol 130 MovieClip "bluesq1" in Frame 218
/* no clip actions */
Instance of Symbol 139 MovieClip "man" in Frame 218
onClipEvent (load) {
function fireball() {
if (_level0.fireball.hitTest(_level0.man)) {
_level0.whallop._x = _level0.man._x;
_level0.whallop._y = _level0.man._y - 20;
_level0.whallop._visible = true;
_level0.man.alive = false;
_level0.whallop.gotoandplay(2);
}
}
function check_oil() {
if (_level0.oil.hitTest(_level0.man)) {
_level0.whallop._x = _level0.man._x;
_level0.whallop._y = _level0.man._y - 20;
_level0.whallop._visible = true;
_level0.man.alive = false;
_level0.whallop.gotoandplay(2);
}
}
function reset() {
status = "free";
vx = 0;
vy = 0;
scale = start_scale;
bmax = 9;
this._x = startx;
this._y = starty;
jump = false;
alive = true;
this._visible = true;
first_time = true;
ladder_id = 0;
delay = 0;
ladder_status = "none";
}
function check_keys() {
kid = 0;
while (kid <= (_level0.key_needed - 1)) {
key_m = eval ("_level0.bluesq" + kid);
if (hitTest(key_m)) {
if (kid == 0) {
if ((_level0.keys_collected >= (_level0.key_needed - 1)) and (status == "platform")) {
if (_level0.next_level < _level0.screens_needed) {
_level0.next_level++;
_level0.keys_collected++;
_level0.score = _level0.score + (((_level0.timer_movie.timer * _level0.level) * 10) * _level0.keys_collected);
_root.gotoandplay("next_inter_level");
} else {
_level0.score = _level0.score + ((_level0.timer_movie.timer * _level0.level) * 10);
_level0.gameover = true;
_level0.bonus = (_level0.timer_movie.timer * _level0.level) * 20;
_root.gotoandplay("done");
}
}
} else {
key_m._x = -999;
_level0.score = _level0.score + ((_level0.timer_movie.timer * _level0.level) * 10);
_level0.keys_collected++;
}
}
kid++;
}
}
function check_block() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
edge = bid.error_end.hitTest(this._x, this._y, true);
if (!edge) {
if (((my_platform == "e1") and (b > 10)) or ((my_platform == "e2") and (b > 10))) {
trace("BLOCK THIS MOVE");
} else {
on_block = true;
yplatform = bid._y - 6;
my_platform = b;
status = "platform";
}
} else {
_level0.diag = true;
}
}
b++;
}
if (!on_block) {
vy = -4;
} else {
vy = 0;
}
return(on_block);
}
function landed() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
if (((my_platform == "e1") and (b > 10)) or ((my_platform == "e2") and (b > 10))) {
trace("BLOCK THIS MOVE");
} else {
on_block = true;
}
}
b++;
}
return(on_block);
}
startx = this._x;
starty = this._y;
step_magnitude = 1.6;
jump_magnitude = 12;
gravity = 3;
start_scale = -this._xscale;
reset();
}
onClipEvent (enterFrame) {
if (!_level0.gameover) {
if (_level0.timer_movie.expired and (!_level0.gameover)) {
_level0.gameover = true;
_level0.gotoandplay("gameover");
}
}
if (this._y > 600) {
alive = false;
}
if (alive and (!_level0.gameover)) {
check_oil();
fireball();
check_keys();
_x = (_x + vx);
_y = (_y - vy);
ladder_status = "none";
if (status == "ladder") {
this.gotoandstop("ladder");
ladder_mov = eval ("_level0.ladder" + ladder_id);
at_bottom = ladder_mov.bottom.hitTest(this._x, this._y, false);
at_top = ladder_mov.top.hitTest(this._x, this._y, false);
rungs_below = ladder_mov.zone.hitTest(this._x, this._y + 2, false) or ladder_mov.zone1.hitTest(this._x, this._y + 2, false);
rungs_above = ladder_mov.zone.hitTest(this._x, this._y - 2, false) or ladder_mov.zone1.hitTest(this._x, this._y - 2, false);
if ((Key.isDown(40) and (!at_bottom)) and rungs_below) {
this._y = this._y + step_magnitude;
}
if ((Key.isDown(38) and (!at_top)) and rungs_above) {
this._y = this._y - step_magnitude;
}
if (at_bottom) {
status = "free";
}
if (at_top) {
status = "free";
}
}
if (status == "platform") {
this._y = yplatform;
if (!check_block()) {
status = "free";
} else {
if (my_platform == 1) {
this._x = this._x + 2;
}
if (my_platform == 2) {
this._x = this._x + 2;
}
if (my_platform == 3) {
this._x = this._x - 2;
}
if (my_platform == 4) {
this._x = this._x + 2;
}
if (_level0.ladder6.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 6;
ladder_status = "UP";
}
if (_level0.ladder6.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 6;
ladder_status = "DOWN";
}
if (_level0.ladder1.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 1;
ladder_status = "UP";
}
if (_level0.ladder1.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 1;
ladder_status = "DOWN";
}
if (_level0.ladder3.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 3;
ladder_status = "UP";
}
if (_level0.ladder3.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 3;
ladder_status = "DOWN";
}
if (_level0.ladder4.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 4;
ladder_status = "UP";
}
if (_level0.ladder4.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 4;
ladder_status = "DOWN";
}
if (_level0.ladder2.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 2;
ladder_status = "UP";
}
if (_level0.ladder2.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 2;
ladder_status = "DOWN";
}
if (_level0.ladder5.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 5;
ladder_status = "UP";
}
if (_level0.ladder5.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 5;
ladder_status = "DOWN";
}
if (_level0.ladder7.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 7;
ladder_status = "UP";
}
if (_level0.ladder7.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 7;
ladder_status = "DOWN";
}
if (_level0.ladder8.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 8;
ladder_status = "UP";
}
if (_level0.ladder8.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 8;
ladder_status = "DOWN";
}
if (_level0.ladder9.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 9;
ladder_status = "UP";
}
if (_level0.ladder9.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 9;
ladder_status = "DOWN";
}
if (_level0.ladder10.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 10;
ladder_status = "UP";
}
if (_level0.ladder10.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 10;
ladder_status = "DOWN";
}
if (_level0.ladder11.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 11;
ladder_status = "UP";
}
if (_level0.ladder11.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 11;
ladder_status = "DOWN";
}
if (_level0.ladder12.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 12;
ladder_status = "UP";
}
if (_level0.ladder12.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 12;
ladder_status = "DOWN";
}
if (_level0.ladder13.zone.hitTest(this._x, this._y - 20, false)) {
ladder_id = 13;
ladder_status = "UP";
}
if (_level0.ladder13.zone.hitTest(this._x, this._y + 20, false)) {
ladder_id = 13;
ladder_status = "DOWN";
}
}
}
if (jump) {
status = "free";
jump_cnt++;
t = t + 0.3;
vx = (3 * ux) * 0.707;
vy = (uy * 0.707) - (gravity * t);
if (vy < -6) {
vy = -6;
}
i_have_landed = landed();
if (i_have_landed and (jump_cnt > 2)) {
vy = 0;
jump = false;
first_time = true;
}
} else {
if (status != "ladder") {
temp = check_block();
}
if (Key.isDown(38) and ((status == "platform") and (ladder_status == "UP"))) {
status = "ladder";
this._y = this._y - 10;
}
if (Key.isDown(40) and ((status == "platform") and (ladder_status == "DOWN"))) {
status = "ladder";
this._y = this._y + 20;
}
if (Key.isDown(37) and ((status == "platform") or (status == "elevator"))) {
vx = -step_magnitude;
this._xscale = scale;
if (last_still) {
this.gotoandplay("walk");
last_still = false;
}
} else if (Key.isDown(Key.right) and ((status == "platform") or (status == "elevator"))) {
this._xscale = -scale;
if (last_still) {
this.gotoandplay("walk");
last_still = false;
}
vx = step_magnitude;
} else {
vx = 0;
this.gotoandstop(1);
last_still = true;
}
if (Key.isDown(32)) {
if (((!jump) and (!last_space)) and ((status == "platform") or (status == "elevator"))) {
jump = true;
if (first_time) {
this.gotoandplay("jump");
last_still = true;
ux = vx;
uy = jump_magnitude;
t = 0;
first_time = false;
jump_cnt = 0;
}
}
last_space = true;
} else {
last_space = false;
}
}
if (_level0.donkey.hitTest(_x, _y - 10, true)) {
trace("hit ass!");
_level0.whallop._x = _x;
_level0.whallop._y = _y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
this._x = -1234;
alive = false;
}
} else {
if (last_alive) {
_level0.lives--;
if ((!_level0.gameover) and (_level0.lives <= 0)) {
_level0.gameover = true;
_level0.gotoandplay("gameover");
}
}
if (delay < 40) {
this._visible = false;
this._y = 999;
delay++;
} else {
reset();
}
}
last_alive = alive;
}
Instance of Symbol 55 MovieClip "bombb" in Frame 218
onClipEvent (load) {
function reset() {
xmax = 540;
xmin = 10;
dirn = 1;
if (random(10) > 5) {
dirn = -1;
}
status = "first_time";
vx = step_magnitude;
vy = 0;
scale = -this._xscale;
bmax = 9;
bmin = 9;
this._x = startx;
this._y = starty;
jump = false;
alive = true;
this._visible = true;
first_time = true;
}
function flip_direction() {
dirn = dirn * -1;
}
function new_direction() {
dirn = -1;
if (my_ladder == 3) {
dirn = 1;
}
}
function check_block() {
on_block = false;
b = bmin;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
edge = bid.error_end.hitTest(this._x, this._y, true);
if (!edge) {
on_block = true;
yplatform = bid._y - 5;
my_platform = b;
status = "platform";
} else {
_level0.diag = true;
}
}
b++;
}
if (!on_block) {
vy = -5;
} else {
vy = 0;
}
return(on_block);
}
function landed() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
on_block = true;
}
b++;
}
return(on_block);
}
step_magnitude = 2;
jump_magnitude = 23;
reset();
}
onClipEvent (enterFrame) {
if (alive) {
if (this.hitzone.hitTest(_level0.man)) {
_level0.whallop._x = this._x;
_level0.whallop._y = this._y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
_level0.man.alive = false;
}
if (first_time) {
_level0.donkey.gotoandplay("nod");
first_time = false;
} else {
_x = (_x + (vx * dirn));
_y = (_y - (vy / 2));
if (_x > xmax) {
_x = xmax;
flip_direction();
}
if (_x < xmin) {
_x = xmin;
flip_direction();
}
if (status == "platform") {
this._y = yplatform - 2;
if (!check_block()) {
status = "free";
}
}
if (jump) {
} else {
temp = check_block();
}
if (this._y > 600) {
alive = false;
}
}
}
}
Instance of Symbol 55 MovieClip "bomba" in Frame 218
onClipEvent (load) {
function reset() {
xmax = 390;
xmin = 160;
dirn = 1;
if (random(10) > 5) {
dirn = -1;
}
status = "first_time";
vx = step_magnitude;
vy = 0;
scale = -this._xscale;
bmax = 6;
bmin = 6;
this._x = startx;
this._y = starty;
jump = false;
alive = true;
this._visible = true;
first_time = true;
}
function flip_direction() {
dirn = dirn * -1;
}
function check_block() {
on_block = false;
b = bmin;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
edge = bid.error_end.hitTest(this._x, this._y, true);
if (!edge) {
on_block = true;
yplatform = bid._y - 5;
my_platform = b;
status = "platform";
} else {
_level0.diag = true;
}
}
b++;
}
if (!on_block) {
vy = -5;
} else {
vy = 0;
}
return(on_block);
}
function landed() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
on_block = true;
}
b++;
}
return(on_block);
}
step_magnitude = 2;
jump_magnitude = 23;
reset();
}
onClipEvent (enterFrame) {
if (alive) {
if (this.hitzone.hitTest(_level0.man)) {
_level0.whallop._x = this._x;
_level0.whallop._y = this._y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
_level0.man.alive = false;
}
if (first_time) {
_level0.donkey.gotoandplay("nod");
first_time = false;
} else {
_x = (_x + (vx * dirn));
_y = (_y - (vy / 2));
if (_x > xmax) {
_x = xmax;
flip_direction();
}
if (_x < xmin) {
_x = xmin;
flip_direction();
}
if (status == "platform") {
this._y = yplatform - 2;
if (!check_block()) {
status = "free";
}
}
if (jump) {
} else {
temp = check_block();
}
if (this._y > 600) {
alive = false;
}
}
}
}
Instance of Symbol 55 MovieClip "bombc" in Frame 218
onClipEvent (load) {
function reset() {
xmax = 115;
xmin = 40;
dirn = 1;
status = "first_time";
vx = step_magnitude;
vy = 0;
scale = -this._xscale;
bmax = 5;
bmin = 5;
this._x = startx;
this._y = starty;
jump = false;
alive = true;
this._visible = true;
first_time = true;
}
function flip_direction() {
dirn = dirn * -1;
}
function new_direction() {
dirn = -1;
if (my_ladder == 3) {
dirn = 1;
}
}
function check_block() {
on_block = false;
b = bmin;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
edge = bid.error_end.hitTest(this._x, this._y, true);
if (!edge) {
on_block = true;
yplatform = bid._y - 5;
my_platform = b;
status = "platform";
} else {
_level0.diag = true;
}
}
b++;
}
if (!on_block) {
vy = -5;
} else {
vy = 0;
}
return(on_block);
}
function landed() {
on_block = false;
b = 1;
while (b <= bmax) {
bid = eval ("_level0.block" + b);
if (bid.hitTest(this._x, this._y, true)) {
on_block = true;
}
b++;
}
return(on_block);
}
step_magnitude = 1;
jump_magnitude = 23;
reset();
}
onClipEvent (enterFrame) {
if (alive) {
if (this.hitzone.hitTest(_level0.man)) {
_level0.whallop._x = this._x;
_level0.whallop._y = this._y - 10;
_level0.whallop._visible = true;
_level0.whallop.gotoandplay(2);
_level0.man.alive = false;
}
if (first_time) {
_level0.donkey.gotoandplay("nod");
first_time = false;
} else {
_x = (_x + (vx * dirn));
_y = (_y - (vy / 2));
if (_x > xmax) {
_x = xmax;
flip_direction();
}
if (_x < xmin) {
_x = xmin;
flip_direction();
}
if (status == "platform") {
this._y = yplatform - 2;
if (!check_block()) {
status = "free";
}
}
if (jump) {
} else {
temp = check_block();
}
if (this._y > 600) {
alive = false;
}
}
}
}
Frame 234
stop();
Frame 235
rb = 0;
while (rb <= next_id) {
eval ("bomb" + rb).removeMovieClip();
rb++;
}
explode._x = 225;
explode._y = 200;
explode.gotoandplay(2);
Frame 259
if (score > 500) {
gotoAndPlay (297);
} else {
gotoAndStop (173);
}
Frame 265
level++;
limit = limit - 5;
Frame 279
gotoAndPlay (296);
Frame 296
score = score + bonus;
if (level < 11) {
level_txt = level + " of 10";
} else {
level_txt = "All levels done";
}
level_done = level - 1;
if (level_done <= 6) {
speech_text = ("Well done! You have just completed level " + level_done) + ". This is your score so far...";
}
if (level_done == 7) {
speech_text = "You have now completed level 7 - are you trying to impress me ? This is your score so far...";
}
if (level_done == 8) {
speech_text = "That's Level 8 done ! - you must be very good with your hands! This is your score so far...";
}
if (level_done == 9) {
speech_text = "Nearly there, that was Level 9 - dont let me down now ! This is your score so far...";
}
if (level_done == 10) {
speech_text = "WOW ! You HAVE impressed me - bet you cant do that again. This is your final score ...";
}
stop();
Frame 297
stop();
Symbol 7 MovieClip Frame 1
doneLoading = 0;
stop();
Instance of Symbol 3 MovieClip "bkgd" in Symbol 7 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.doneLoading == 0) {
total = _parent._parent.getBytesTotal();
isloaded = _parent._parent.getBytesLoaded();
p = 100 * (isLoaded / total);
_parent.bytes = ((int(isloaded / 1000) add " KB of ") add int(total / 1000)) add " KB";
_parent.percent = int(p) add "% LOADED";
_parent.bar._xscale = p;
trace("....." + Number(p));
if (Number(p) >= Number(100)) {
_parent._parent.gotoAndPlay(Number(2));
_parent.gotoAndStop("off");
_parent.doneLoading = 1;
} else {
_parent._parent.gotoAndPlay(Number(1));
}
}
}
Symbol 13 MovieClip Frame 7
gotoAndPlay (1);
Symbol 16 MovieClip Frame 32
gotoAndPlay (1);
Symbol 18 MovieClip Frame 7
gotoAndPlay (1);
Symbol 20 Button
on (release) {
getURL ("http://www.mousebreaker.co.uk/index.php?cdgtid=donkeybomb");
}
Symbol 26 MovieClip Frame 1
Symbol 26 MovieClip Frame 19
stop();
Symbol 40 MovieClip Frame 36
gotoAndPlay (1);
Symbol 61 Button
on (release) {
play();
}
Symbol 64 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?cdgtid=donkeybomb", "_self");
}
Symbol 71 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?page=downloadagreement", "_blank");
}
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 20
stop();
Symbol 92 MovieClip Frame 10
gotoAndPlay (1);
Symbol 113 MovieClip Frame 1
trace("start");
Symbol 113 MovieClip Frame 8
trace("remove - explosion1");
this._x = -9999;
trace("remove - explosion2");
stop();
Symbol 125 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 16
gotoAndPlay (1);
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 9
this.gotoAndPlay(2);
Symbol 139 MovieClip Frame 10
gotoAndPlay (10);
Symbol 143 MovieClip Frame 20
gotoAndPlay (1);
Symbol 160 MovieClip Frame 20
gotoAndPlay (1);
Symbol 169 Button
on (release, keyPress "<Space>") {
stopAllSounds();
if (level < 11) {
gotoAndPlay (174);
} else {
gotoAndPlay (297);
}
}
Symbol 180 Button
on (release) {
gotoAndStop (173);
}
Symbol 183 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?page=freestuff", "_self");
}