Frame 1
stop();
Instance of Symbol 2730 MovieClip in Frame 1
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent = percent - ((percent - ((loading / total) * 100)) * 0.25);
per = int(percent);
percentage = per + "%";
if (99 < percent) {
_parent.gotoAndStop(2);
}
}
Frame 2
gotoAndStop (3);
Frame 3
attachMovie("story", "story", 39);
Frame 4
story.removeMovieClip();
gotoAndStop (5);
Frame 5
function start_screen() {
attachMovie("start_screen", "start", 40);
}
function begin_game() {
_root.start.removeMovieClip();
attachMovie("stage", "stage", 10);
attachMovie("score_board", "sb", 11);
_root.sb.game_score = "000000";
}
function beat_game() {
attachMovie("end_screen", "end", 40);
_root.stage.remove_level_objects();
_root.stage.removeMovieClip();
_root.lb.removeMovieClip();
_root.sb.removeMovieClip();
}
function pause_game() {
if (Key.isDown(66)) {
if (!this.game_paused) {
this.game_paused = true;
} else {
this.game_paused = false;
}
}
}
function attach_enemy(i, e_type, x, y) {
if (e_type == 1) {
attachMovie("enemy_mky", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 1;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
}
if (e_type == 2) {
attachMovie("enemy_htr", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 2;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
} else if (e_type == 3) {
attachMovie("enemy_grla", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 3;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
} else if (e_type == 4) {
attachMovie("shy_monkey_enemy", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 4;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
} else if (e_type == 5) {
attachMovie("random_monkey_enemy", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 5;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
} else if (e_type == 6) {
attachMovie("leopard_enemy", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 6;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
} else if (e_type == 7) {
attachMovie("gunner_enemy", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 7;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
} else if (e_type == 8) {
attachMovie("tribe_guy_1_enemy", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 8;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
} else if (e_type == 9) {
attachMovie("tribe_guy_2_enemy", "enemy" + i, i + 50);
_root["enemy" + i].enemyType = 9;
_root["enemy" + i]._x = x;
_root["enemy" + i]._y = y;
_root["enemy" + i].idNum = i;
}
}
function attach_extra(extra_num, extra_type, extra_x, extra_y, dir) {
if (extra_type == 1) {
attachMovie("bird_extra", "extra" + extra_num, extra_num + 45);
_root["extra" + extra_num].extra_type = 1;
_root["extra" + extra_num]._x = extra_x;
_root["extra" + extra_num]._y = extra_y;
_root["extra" + extra_num].idNum = i;
_root["extra" + extra_num]._xscale = dir;
}
if (extra_type == 2) {
attachMovie("croc_extra", "extra" + extra_num, extra_num + 45);
_root["extra" + extra_num].extra_type = 2;
_root["extra" + extra_num]._x = extra_x;
_root["extra" + extra_num]._y = extra_y;
_root["extra" + extra_num].idNum = i;
_root["extra" + extra_num]._xscale = dir;
}
if (extra_type == 3) {
attachMovie("fish", "extra" + extra_num, extra_num + 45);
_root["extra" + extra_num]._x = extra_x;
_root["extra" + extra_num]._y = extra_y;
_root["extra" + extra_num].idNum = i;
_root["extra" + extra_num]._xscale = dir;
}
}
function attach_food(x, y, z) {
id = z - 200;
i = random(10);
if (i == 0) {
attachMovie("green_food", "food" + id, z);
} else {
attachMovie("food", "food" + id, z);
}
_root["food" + id]._x = x;
_root["food" + id]._y = y;
_root["food" + id].idNum = id;
}
function attach_weapon(idNum, poopNum, dir, ducking, type, x, y, weap_type) {
layerNum = idNum * 100;
layerNum = layerNum + poopNum;
attachMovie("weapon", (("weapon" + idNum) + " ") + poopNum, layerNum);
if (type == 0) {
if (!ducking) {
_root[(("weapon" + idNum) + " ") + poopNum]._y = y - 4;
} else {
_root[(("weapon" + idNum) + " ") + poopNum]._y = y + 4;
}
if (dir == 100) {
_root[(("weapon" + idNum) + " ") + poopNum]._x = x + 16;
} else {
_root[(("weapon" + idNum) + " ") + poopNum]._x = x - 16;
}
} else if (type == 1) {
_root[(("weapon" + idNum) + " ") + poopNum]._y = y + 6;
if (dir == 100) {
_root[(("weapon" + idNum) + " ") + poopNum]._x = x - 10;
} else {
_root[(("weapon" + idNum) + " ") + poopNum]._x = x + 4;
}
} else {
_root[(("weapon" + idNum) + " ") + poopNum]._y = y - 8;
if (dir == 100) {
_root[(("weapon" + idNum) + " ") + poopNum]._x = x - 6;
} else {
_root[(("weapon" + idNum) + " ") + poopNum]._x = x;
}
}
_root[(("weapon" + idNum) + " ") + poopNum].direction = dir;
_root[(("weapon" + idNum) + " ") + poopNum].parentID = idNum;
_root[(("weapon" + idNum) + " ") + poopNum].typeThrow = type;
_root[(("weapon" + idNum) + " ") + poopNum].enter_x = x;
_root[(("weapon" + idNum) + " ") + poopNum].weapon_selected = weap_type;
}
function attach_points(idNum, pts, x, y) {
_root.attachMovie("points", "points" + idNum, (idNum + 4) * 100);
_root["points" + idNum].gotoAndStop("points" + pts);
_root["points" + idNum]._x = x;
_root["points" + idNum]._y = y - 5;
}
function attach_watermark(x, y, xscale, idNum) {
_root.attachMovie("watermark", "watermark" + idNum, 16);
_root["watermark" + idNum]._y = 183;
if (xscale == -100) {
_root["watermark" + idNum]._xscale = -100;
_root["watermark" + idNum]._x = x + 16;
} else {
_root["watermark" + idNum]._xscale = 100;
_root["watermark" + idNum]._x = x - 16;
}
}
stop();
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
_quality = "low";
score = 0;
player_lives = 3;
player_ammo = 5;
default_lives = player_lives;
default_ammo = player_ammo;
game_paused = false;
this.start_screen();
Symbol 68 MovieClip Frame 1
amt_of_enemies_in_level = 0;
amt_of_enemies_entered = 0;
amt_of_enemies_at_start = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 0;
amt_of_enemies_defeated = 0;
extras_on_screen = 0;
extras_allowed_on_screen = 0;
extra_enter_delay = 6;
start_with_food = false;
allow_hunters = false;
food_exists = false;
birds_allowed = false;
bird_y = 0;
num_of_elevators = 0;
list_of_enemies = new Array();
list_of_enemies_x = new Array();
list_of_enemies_y = new Array();
list_of_food_x = new Array();
list_of_food_y = new Array();
list_of_extras = new Array();
list_of_extras_x = new Array();
list_of_extras_y = new Array();
list_of_extras_dir = new Array();
player_x_start = 0;
player_y_start = 0;
food_on_screen = 0;
food_amt_in_stage = 0;
amt_of_pots = 0;
list_of_pots_x = new Array();
list_of_pots_y = new Array();
Symbol 68 MovieClip Frame 2
amt_of_enemies_in_level = 4;
amt_of_enemies_at_start = 1;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = false;
start_with_food = true;
amt_of_enemies_at_start = 1;
list_of_enemies = [5, 5, 1, 5, 1];
list_of_enemies_x = [240, -20, -20, -20, -20];
list_of_enemies_y = [90, 180, 180, 180, 180];
list_of_food_x = [210, 210, 130, 75, 130, 130];
list_of_food_y = [140, 80, 80, 100, 15, 180];
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 0;
list_of_pots_x = [];
list_of_pots_y = [];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 3
amt_of_enemies_in_level = 4;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies_x = [300, -20, 300, -20, -20];
list_of_enemies_y = [180, -20, 120, -20, -20];
list_of_enemies = [2, 5, 1, 5, 1, 2, 5];
list_of_food_x = [160, 265, 40, 160, 75, 265];
list_of_food_y = [115, 85, 85, 180, 10, 10];
amt_of_enemies_at_start = 1;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [272, 20];
list_of_pots_y = [196, 26];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 4
amt_of_enemies_in_level = 4;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = false;
start_with_food = true;
list_of_enemies = [3, 1, 5, 1, 5, 3, 1];
list_of_enemies_x = [300, 20, 290, -20, -20, -20, 290];
list_of_enemies_y = [180, 75, 120, 40, 180, 180, 120];
list_of_food_x = [90, 218, 170, 45, 45, 136];
list_of_food_y = [110, 110, 180, 35, 180, 80];
amt_of_enemies_at_start = 1;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 1;
list_of_pots_x = [245];
list_of_pots_y = [86];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 5
amt_of_enemies_in_level = 5;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
amt_of_enemies_at_start = 2;
allow_hunters = true;
list_of_enemies = [7, 1, 5, 2, 1, 5, 3];
list_of_enemies_x = [290, -20, 300, -20, 300, -20, 300];
list_of_enemies_y = [180, 20, 160, 20, 160, 20, 160];
list_of_food_x = [40, 120, 200, 10, 120, 200];
list_of_food_y = [20, 80, 80, 80, 180, 180];
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 3;
list_of_pots_x = [264, 96, 236];
list_of_pots_y = [196, 142, 98];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [15, 85, 15, 85];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 6
amt_of_enemies_in_level = 4;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
amt_of_enemies_at_start = 2;
allow_hunters = false;
list_of_enemies = [5, 1, 1, 1, 5, 5, 1, 5, 1];
list_of_enemies_x = [300, -20, 250, -20, 300, -20, 300, -20, 300];
list_of_enemies_y = [160, 20, -10, 20, 100, 20, 160, 20, 120];
list_of_food_x = [237, 70, 140, 265, 45, 70];
list_of_food_y = [150, 10, 70, 70, 70, 150];
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 170;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 0;
list_of_pots_x = [];
list_of_pots_y = [];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 7
amt_of_enemies_in_level = 5;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
amt_of_enemies_at_start = 2;
list_of_enemies = [2, 6, 1, 2, 1, 5, 7, 5];
list_of_enemies_x = [270, 144, -20, 290, -20, 290, -20, 290];
list_of_enemies_y = [160, 140, 20, 160, 160, 120, 160, 20];
list_of_food_x = [115, 232, 195, 195, 15, 15];
list_of_food_y = [55, 55, 180, 100, 180, 100];
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [270, 220];
list_of_pots_y = [22, 133];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 8
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 1;
enemies_allowed_on_screen = 3;
allow_hunters = true;
amt_of_enemies_at_start = 1;
list_of_enemies = [8, 5, 5, 1, 1, 5, 1, 5, 5, 1];
list_of_enemies_x = [290, -20, 290, -20, 290, -20, 290, -20, 290, -20];
list_of_enemies_y = [160, 60, -10, 180, -10, 60, -10, 180, -10, 60];
list_of_food_x = [25, 250, 185, 25, 250, 152];
list_of_food_y = [50, 50, 140, 180, 180, 50];
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 3;
list_of_pots_x = [190, 222, 254];
list_of_pots_y = [3, 3, 3];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [40, 120, 40, 120];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 9
amt_of_enemies_in_level = 5;
amt_of_enemies_entered = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
amt_of_enemies_at_start = 1;
list_of_enemies = [8, 8, 5, 1, 5, 7, 5, 1];
list_of_enemies_x = [300, -20, 300, -20, 300, -20, 300, -20];
list_of_enemies_y = [180, 60, 10, 60, 60, 180, 10, 60];
list_of_food_x = [30, 250, 85, 232, 135, 65];
list_of_food_y = [40, 40, 115, 115, 167, 5];
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [264, 206];
list_of_pots_y = [196, 16];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [50, 115, 50, 115];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 10
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
birds_allowed = true;
bird_y = 70;
start_with_food = true;
list_of_enemies = [5, 1, 5, 1, 5, 5, 5, 1];
list_of_enemies_x = [220, -10, 240, -10, 300, -10, 300, -10];
list_of_enemies_y = [140, 80, -20, 150, 60, 80, 180, 150];
list_of_food_x = [65, 265, 219, 265, 10, 186];
list_of_food_y = [110, 180, 140, 60, 60, 10];
amt_of_enemies_at_start = 2;
player_x_start = 20;
player_y_start = 160;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 1;
list_of_pots_x = [275];
list_of_pots_y = [196];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [60, 130, 60, 130];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Instance of Symbol 24 MovieClip in Symbol 68 MovieClip Frame 10
onClipEvent (load) {
_root.attachMovie("waterfall9", "waterfall", 4);
_root.attachMovie("watersplash9", "watersplash", 7);
_root.attachMovie("waterpool9", "waterpool", 15);
}
Symbol 68 MovieClip Frame 11
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [6, 5, 1, 2, 5, 1, 5, 1];
list_of_enemies_x = [30, -10, 300, -10, 300, -10, 300, -10];
list_of_enemies_y = [151, 60, 180, 180, -10, 60, -10, 60];
list_of_food_x = [124, 267, 30, 30, 235, 140];
list_of_food_y = [180, 180, 100, 30, 30, 10];
amt_of_enemies_at_start = 1;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [182, 270];
list_of_pots_y = [196, 75];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 12
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [8, 8, 9, 3, 8, 9, 9];
list_of_enemies_x = [300, 80, 300, -10, 300, -10, 300];
list_of_enemies_y = [180, 60, 10, 180, 10, 120, 120];
list_of_food_x = [52, 236, 52, 236, 52, 236];
list_of_food_y = [100, 100, 180, 180, 40, 40];
amt_of_enemies_at_start = 2;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [272, 45];
list_of_pots_y = [135, 77];
amt_of_extras_at_start = 0;
Instance of Symbol 29 MovieClip in Symbol 68 MovieClip Frame 12
onClipEvent (load) {
_root.attachMovie("backdrop", "backdrop", 1);
_root.backdrop.gotoAndStop("level11");
_parent.num_of_elevators = 1;
_root.attachMovie("elevator", "elevator1", 13);
_root.elevator1.idNum = 4;
_root.elevator1.elev_num = 1;
_root.elevator1.top_x = 192;
_root.elevator1.top_y = 35;
_root.elevator1.dist_from_y = 37;
_root.elevator1.cargo_y = 190;
_root.elevator1.bottom_y = 179;
}
Symbol 68 MovieClip Frame 13
amt_of_enemies_in_level = 5;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
birds_allowed = true;
bird_y = 35;
start_with_food = true;
list_of_enemies = [5, 1, 7, 5, 5, 8, 1, 5];
list_of_enemies_x = [215, -10, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [70, 120, 160, 120, 180, 120, 110, 120];
list_of_food_x = [75, 75, 260, 160, 235, 75];
list_of_food_y = [155, 30, 30, 120, 155, 90];
amt_of_enemies_at_start = 1;
amt_of_extras_in_level = 6;
extras_allowed_on_screen = 2;
extras_on_screen = 0;
amt_of_extras_entered = 0;
amt_of_extras_at_start = 2;
list_of_extras = [3, 2, 1, 1, 1, 1];
list_of_extras_x = [103, -100, -10, 290, -10, 290];
list_of_extras_y = [194, 192, 20, 120, 20, 120];
list_of_extras_dir = [100, 100, 100, -100, 100, -100];
player_x_start = 60;
player_y_start = 170;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 3;
list_of_pots_x = [50, 210, 114];
list_of_pots_y = [190, 87, 62];
Instance of Symbol 32 MovieClip in Symbol 68 MovieClip Frame 13
onClipEvent (load) {
_root.attachMovie("waterpool12", "waterpool", 14);
}
Symbol 68 MovieClip Frame 14
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [5, 5, 1, 5, 1, 5];
list_of_enemies_x = [209, 58, 290, -10, 290, -10];
list_of_enemies_y = [80, 20, 20, 160, 140, 160];
list_of_food_x = [105, 9, 50, 267, 267, 50];
list_of_food_y = [75, 75, 160, 160, 20, 20];
amt_of_enemies_at_start = 2;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 170;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 0;
list_of_pots_x = [];
list_of_pots_y = [];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 15
amt_of_enemies_in_level = 5;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [5, 1, 2, 5, 1, 8, 8, 9];
list_of_enemies_x = [260, -10, 300, -10, 300, -10, 290, -10];
list_of_enemies_y = [40, 60, 160, 180, 60, 180, 30, 60];
list_of_food_x = [57, 235, 200, 136, 235, 57];
list_of_food_y = [110, 110, 170, 110, 43, 170];
player_x_start = 20;
player_y_start = 180;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [65, 275];
list_of_pots_y = [56, 183];
amt_of_extras_in_level = 2;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [3];
list_of_extras_x = [62];
list_of_extras_y = [187];
list_of_extras_dir = [100];
amt_of_extras_at_start = 1;
Instance of Symbol 37 MovieClip in Symbol 68 MovieClip Frame 15
onClipEvent (load) {
_root.attachMovie("waterfall14", "waterfall14", 2);
_root.attachMovie("watersplash14", "watersplash14", 15);
_root.attachMovie("waterpool12", "waterpool", 14);
_root.attachMovie("bridge1", "bridge", 29999);
_root.bridge._x = 96.5;
_root.bridge._y = 182;
}
Symbol 68 MovieClip Frame 16
amt_of_enemies_in_level = 5;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [1, 5, 1, 1, 5, 1, 5, 1, 1, 5];
list_of_enemies_x = [300, -10, 300, -10, 300, -10, 300, -10, 300, -10];
list_of_enemies_y = [10, 160, 130, 160, 10, 160, 130, 160, 10, 160];
list_of_food_x = [130, 217, 139, 72, 265, 10];
list_of_food_y = [65, 65, 168, 120, 120, 168];
amt_of_enemies_at_start = 1;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 170;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 0;
list_of_pots_x = [];
list_of_pots_y = [];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [15, 105, 15, 105];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Symbol 68 MovieClip Frame 17
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [7, 5, 1, 3, 1, 5, 1, 5];
list_of_enemies_x = [290, -10, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [70, 10, 10, 160, 10, 10, 70, 160];
list_of_food_x = [200, 200, 35, 35, 260, 35];
list_of_food_y = [120, 50, 50, 165, 10, 10];
amt_of_enemies_at_start = 2;
extras_allowed_on_screen = 1;
player_x_start = 20;
player_y_start = 170;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 1;
list_of_pots_x = [275];
list_of_pots_y = [87];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [60, 125, 60, 125];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Instance of Symbol 42 MovieClip in Symbol 68 MovieClip Frame 17
onClipEvent (load) {
_root.attachMovie("log", "log", 29999);
_root.log._x = 96;
_root.log._y = 156;
}
Symbol 68 MovieClip Frame 18
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [9, 8, 3, 8, 8, 9, 1, 8, 8, 9];
list_of_enemies_x = [290, -10, 290, -10, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [70, 130, 180, 180, 70, -20, 180, -20, 70, 130];
list_of_food_x = [105, 105, 200, 200, 40, 10];
list_of_food_y = [180, 85, 130, 45, 20, 85];
amt_of_enemies_at_start = 1;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 3;
list_of_pots_x = [170, 2, 243];
list_of_pots_y = [32, 135, 196];
amt_of_extras_at_start = 0;
Instance of Symbol 45 MovieClip in Symbol 68 MovieClip Frame 18
onClipEvent (load) {
_root.attachMovie("backdrop", "backdrop", 1);
_root.backdrop.gotoAndStop("level17");
_parent.num_of_elevators = 2;
_root.attachMovie("elevator", "elevator1", 7);
_root.elevator1.idNum = 4;
_root.elevator1.elev_num = 1;
_root.elevator1.top_x = 0;
_root.elevator1.top_y = 4;
_root.elevator1.dist_from_y = 23;
_root.elevator1.cargo_y = 130;
_root.elevator1.bottom_y = 120;
_root.attachMovie("elevator", "elevator2", 8);
_root.elevator2.idNum = 5;
_root.elevator2.elev_num = 2;
_root.elevator2.top_x = 64;
_root.elevator2.top_y = 52;
_root.elevator2.dist_from_y = 78;
_root.elevator2.cargo_y = 190;
_root.elevator2.bottom_y = 180;
}
Symbol 68 MovieClip Frame 19
amt_of_enemies_in_level = 5;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [3, 5, 1, 5, 1, 1, 5, 5];
list_of_enemies_x = [290, -10, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [140, 10, 70, 180, 70, 10, 70, 180];
list_of_food_x = [197, 57, 8, 130, 267, 8];
list_of_food_y = [55, 55, 120, 180, 120, 5];
amt_of_enemies_at_start = 1;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 160;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 0;
list_of_pots_x = [];
list_of_pots_y = [];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [45, 115, 45, 115];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Instance of Symbol 48 MovieClip in Symbol 68 MovieClip Frame 19
onClipEvent (load) {
_root.attachMovie("teleports", "teleports", 29999);
_root.teleports.gotoAndStop("level18");
_root.attachMovie("warp", "warp", 16);
_root.warp._x = -10;
_root.warp._y = 190;
_root.warp.tele_to_x = 280;
_root.warp.tele_to_y = 77;
_root.warp.dir = -100;
_root.warp.switch_dir = false;
_root.warp._visible = false;
_root.attachMovie("warp", "warp2", 17);
_root.warp2._x = 290;
_root.warp2._y = 75;
_root.warp2.tele_to_x = 15;
_root.warp2.tele_to_y = 196;
_root.warp2.dir = 100;
_root.warp2.switch_dir = false;
_root.warp2._visible = false;
}
Symbol 68 MovieClip Frame 20
amt_of_enemies_in_level = 5;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [9, 5, 8, 7, 8, 1, 8, 9];
list_of_enemies_x = [290, -10, 200, -10, 290, -10, 290, -10];
list_of_enemies_y = [180, 25, 110, 25, 180, 180, 180, 25];
list_of_food_x = [267, 267, 40, 200, 40, 8];
list_of_food_y = [155, 35, 110, 140, 10, 180];
amt_of_enemies_at_start = 3;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 3;
list_of_pots_x = [206, 109, 270];
list_of_pots_y = [32, 168, 196];
amt_of_extras_at_start = 0;
Instance of Symbol 51 MovieClip in Symbol 68 MovieClip Frame 20
onClipEvent (load) {
}
Symbol 68 MovieClip Frame 21
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [1, 2, 5, 3, 1, 5, 1, 5];
list_of_enemies_x = [290, -20, 290, -20, 290, 80, 290, -20];
list_of_enemies_y = [-10, 180, -10, 180, -10, 40, -10, -10];
list_of_food_x = [140, 40, 105, 217, 55, 217];
list_of_food_y = [180, 50, 20, 20, 180, 115];
amt_of_enemies_at_start = 2;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [200, 93];
list_of_pots_y = [196, 48];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [30, 160, 30, 160];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Instance of Symbol 54 MovieClip in Symbol 68 MovieClip Frame 21
onClipEvent (load) {
_root.attachMovie("teleports", "teleports", 29999);
_root.teleports.gotoAndStop("level20");
_root.attachMovie("warp", "warp", 16);
_root.warp._x = 290;
_root.warp._y = 190;
_root.warp.tele_to_x = 15;
_root.warp.tele_to_y = 122;
_root.warp.dir = 100;
_root.warp.switch_dir = false;
_root.warp._visible = false;
_root.attachMovie("warp", "warp2", 17);
_root.warp2._x = -10;
_root.warp2._y = 120;
_root.warp2.tele_to_x = 280;
_root.warp2.tele_to_y = 196;
_root.warp2.dir = -100;
_root.warp2.switch_dir = false;
_root.warp2._visible = false;
}
Symbol 68 MovieClip Frame 22
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [1, 5, 8, 1, 9, 7, 1, 5];
list_of_enemies_x = [290, -10, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [130, 25, 25, 180, 25, 180, 130, 180];
list_of_food_x = [95, 269, 120, 41, 269, 41];
list_of_food_y = [80, 80, 140, 80, 20, 180];
amt_of_enemies_at_start = 2;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [150, 275];
list_of_pots_y = [112, 144];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [3, 1, 1, 1, 1];
list_of_extras_x = [240, -10, 290, -10, 290];
list_of_extras_y = [200, 20, 80, 20, 80];
list_of_extras_dir = [100, 100, -100, 100, -100];
amt_of_extras_at_start = 1;
Instance of Symbol 57 MovieClip in Symbol 68 MovieClip Frame 22
onClipEvent (load) {
_root.attachMovie("waterpool21", "waterpool", 14);
}
Symbol 68 MovieClip Frame 23
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [8, 8, 9, 7, 9, 8, 8, 9];
list_of_enemies_x = [290, -10, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [100, 60, 180, 180, 100, 60, 180, 180];
list_of_food_x = [30, 200, 235, 70, 8, 100];
list_of_food_y = [180, 180, 100, 33, 100, 180];
amt_of_enemies_at_start = 2;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 2;
list_of_pots_x = [275, 36];
list_of_pots_y = [115, 147];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [20, 50, 20, 50];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Instance of Symbol 60 MovieClip in Symbol 68 MovieClip Frame 23
onClipEvent (load) {
_root.attachMovie("bridge1", "bridge", 29999);
_root.bridge._x = 32;
_root.bridge._y = 64;
}
Symbol 68 MovieClip Frame 24
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [6, 5, 5, 2, 5, 7, 5, 5];
list_of_enemies_x = [215, 70, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [93, 40, 75, 170, 180, 70, 180, 180];
list_of_food_x = [67, 270, 215, 15, 150, 50];
list_of_food_y = [170, 170, 40, 40, 120, 125];
amt_of_enemies_at_start = 2;
amt_of_extras_in_level = 5;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
player_x_start = 20;
player_y_start = 170;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 3;
list_of_pots_x = [88, 275, 22];
list_of_pots_y = [135, 55, 87];
list_of_extras = [2, 1, 1, 1, 1];
list_of_extras_x = [-100, -10, 290, -10, 290];
list_of_extras_y = [192, 35, 120, 35, 120];
list_of_extras_dir = [100, 100, -100, 100, -100];
Instance of Symbol 63 MovieClip in Symbol 68 MovieClip Frame 24
onClipEvent (load) {
_root.attachMovie("waterfall23", "waterfall23", 2);
_root.attachMovie("watersplash21", "watersplash21", 3);
_root.watersplash21._y = _root.watersplash21._y + 5;
_root.attachMovie("waterpool12", "waterpool", 14);
}
Symbol 68 MovieClip Frame 25
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 2;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [1, 5, 8, 1, 5, 8, 1, 5];
list_of_enemies_x = [290, 140, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [70, -10, 140, 70, 140, 70, 70, 70];
list_of_food_x = [35, 35, 238, 201, 267, 35];
list_of_food_y = [55, 110, 110, 40, 40, 190];
amt_of_enemies_at_start = 1;
player_x_start = 20;
player_y_start = 70;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 1;
list_of_pots_x = [45];
list_of_pots_y = [86];
amt_of_extras_in_level = 2;
extras_allowed_on_screen = 2;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [2, 1];
list_of_extras_x = [-100, -10];
list_of_extras_y = [192, 70];
list_of_extras_dir = [100, 100];
Instance of Symbol 32 MovieClip in Symbol 68 MovieClip Frame 25
onClipEvent (load) {
_root.attachMovie("waterpool12", "waterpool", 14);
}
Symbol 68 MovieClip Frame 26
amt_of_enemies_in_level = 6;
amt_of_enemies_entered = 0;
enemies_on_screen = 0;
enemies_allowed_on_screen = 3;
allow_hunters = true;
start_with_food = true;
list_of_enemies = [3, 1, 5, 1, 8, 2, 9, 1];
list_of_enemies_x = [290, -10, 290, -10, 290, -10, 290, -10];
list_of_enemies_y = [180, 30, 120, 130, 180, 180, 100, 30];
list_of_food_x = [58, 58, 265, 220, 8, 8];
list_of_food_y = [100, 180, 180, 100, 100, 20];
amt_of_enemies_at_start = 1;
extras_allowed_on_screen = 0;
player_x_start = 20;
player_y_start = 190;
food_on_screen = 0;
food_amt_in_stage = 2;
amt_of_pots = 0;
list_of_pots_x = [];
list_of_pots_y = [];
amt_of_extras_in_level = 4;
extras_allowed_on_screen = 1;
extras_on_screen = 0;
amt_of_extras_entered = 0;
list_of_extras = [1, 1, 1, 1];
list_of_extras_x = [-10, 290, -10, 290];
list_of_extras_y = [25, 100, 25, 100];
list_of_extras_dir = [100, -100, 100, -100];
amt_of_extras_at_start = 0;
Symbol 200 MovieClip [stage] Frame 1
function start_game() {
_root.sb._visible = false;
this.next_level = true;
this.stage_cleared = false;
_root.attachMovie("load_board", "lb", 30000);
this.background.amt_of_enemies_defeated = 0;
this.background.gotoAndStop("level" + this.level);
this.branches.gotoAndStop("level" + this.level);
this.ground.gotoAndStop("level" + this.level);
this.spikes.gotoAndStop("level" + this.level);
this.jump_l.gotoAndStop("level" + this.level);
this.jump_r.gotoAndStop("level" + this.level);
this.right_hang.gotoAndStop("level" + this.level);
this.left_hang.gotoAndStop("level" + this.level);
this.vines.gotoAndStop("level" + this.level);
this.ladders.gotoAndStop("level" + this.level);
this.pool.gotoAndStop("level" + this.level);
this.dirt_piles.gotoAndStop("level" + this.level);
this.logs.gotoAndStop("level" + this.level);
this.food_loaded = false;
this.last_stage_loaded = getTimer() / 1000;
}
function add_objects() {
this.add_enemies();
this.add_food();
this.add_extras();
}
function remove_traps() {
i = 0;
while (i < this.background.amt_of_enemies_in_level) {
if (this.background.list_of_enemies[i] == 2) {
j = 0;
while (j < 2) {
x = i * 1000;
x = x + j;
_root["trap" + x].removeMovieClip();
j++;
}
}
i++;
}
}
function remove_food() {
_root.food1.removeMovieClip();
_root.food2.removeMovieClip();
_root.food3.removeMovieClip();
this.food_1_exists = false;
this.food_2_exists = false;
this.food_3_exists = false;
this.background.food_on_screen = 0;
}
function remove_extras() {
i = 0;
while (i < this.background.amt_of_extras_in_level) {
_root["extra" + i].removeMovieClip();
i++;
}
this.background.extras_on_screen = 0;
this.background.amt_of_extras_entered = 0;
}
function remove_enemies() {
i = 0;
while (i < this.background.amt_of_enemies_in_level) {
_root["enemy" + i].removeMovieClip();
i++;
}
this.background.amt_of_enemies_entered = 0;
this.background.enemies_on_screen = 0;
this.background.amt_of_enemies_defeated = 0;
}
function remove_level_objects() {
if (this.level == 9) {
_root.waterfall.removeMovieClip();
_root.watersplash.removeMovieClip();
_root.waterpool.removeMovieClip();
} else if (this.level == 11) {
_root.backdrop.removeMovieClip();
_root.elevator1.removeMovieClip();
_root.weight4.removeMovieClip();
} else if (this.level == 12) {
_root.waterpool.removeMovieClip();
} else if (this.level == 14) {
_root.waterfall14.removeMovieClip();
_root.watersplash14.removeMovieClip();
_root.waterpool.removeMovieClip();
_root.bridge.removeMovieClip();
} else if (this.level == 16) {
_root.log.removeMovieClip();
} else if (this.level == 17) {
_root.backdrop.removeMovieClip();
_root.elevator1.removeMovieClip();
_root.weight4.removeMovieClip();
_root.elevator2.removeMovieClip();
_root.weight5.removeMovieClip();
} else if (this.level == 18) {
_root.teleports.removeMovieClip();
_root.warp.removeMovieClip();
_root.warp2.removeMovieClip();
} else if (this.level == 20) {
_root.teleports.removeMovieClip();
_root.warp.removeMovieClip();
_root.warp2.removeMovieClip();
} else if (this.level == 21) {
_root.waterpool.removeMovieClip();
} else if (this.level == 22) {
_root.bridge.removeMovieClip();
} else if (this.level == 23) {
_root.waterfall23.removeMovieClip();
_root.watersplash21.removeMovieClip();
_root.waterpool.removeMovieClip();
} else if (this.level == 24) {
_root.waterpool.removeMovieClip();
}
}
function add_enemies() {
x = this.background.amt_of_enemies_entered;
if ((this.background.amt_of_enemies_entered == 0) or (this.background.amt_of_enemies_entered < this.background.amt_of_enemies_at_start)) {
_root.attach_enemy(this.background.amt_of_enemies_entered, this.background.list_of_enemies[x], this.background.list_of_enemies_x[x], this.background.list_of_enemies_y[x]);
this.last_enemy_entered = getTimer() / 1000;
this.background.amt_of_enemies_entered = this.background.amt_of_enemies_entered + 1;
this.background.enemies_on_screen = this.background.enemies_on_screen + 1;
} else if (((getTimer() / 1000) - this.last_enemy_entered) >= this.entrance_time) {
if ((this.background.enemies_on_screen < this.background.enemies_allowed_on_screen) and (this.background.amt_of_enemies_entered < this.background.amt_of_enemies_in_level)) {
_root.attach_enemy(this.background.amt_of_enemies_entered, this.background.list_of_enemies[x], this.background.list_of_enemies_x[x], this.background.list_of_enemies_y[x]);
this.last_enemy_entered = getTimer() / 1000;
this.background.amt_of_enemies_entered = this.background.amt_of_enemies_entered + 1;
this.background.enemies_on_screen = this.background.enemies_on_screen + 1;
}
}
}
function add_extras() {
x = this.background.amt_of_extras_entered;
if ((this.background.amt_of_extras_entered == 0) and (this.background.amt_of_extras_entered < this.background.amt_of_extras_at_start)) {
_root.attach_extra(this.background.amt_of_extras_entered, this.background.list_of_extras[x], this.background.list_of_extras_x[x], this.background.list_of_extras_y[x], this.background.list_of_extras_dir[x]);
this.last_extra_entered = getTimer() / 1000;
this.background.extras_on_screen = this.background.extras_on_screen + 1;
this.background.amt_of_extras_entered = this.background.amt_of_extras_entered + 1;
}
if (((this.background.extras_allowed_on_screen != 0) and (this.background.amt_of_extras_entered < this.background.amt_of_extras_in_level)) and (this.background.extras_on_screen < this.background.extras_allowed_on_screen)) {
if (this.background.extra_enter_delay < ((getTimer() / 1000) - this.last_extra_entered)) {
_root.attach_extra(this.background.amt_of_extras_entered, this.background.list_of_extras[x], this.background.list_of_extras_x[x], this.background.list_of_extras_y[x], this.background.list_of_extras_dir[x]);
this.last_extra_entered = getTimer() / 1000;
this.background.extras_on_screen = this.background.extras_on_screen + 1;
this.background.amt_of_extras_entered = this.background.amt_of_extras_entered + 1;
}
}
}
function clean_up(id, x, y, h, w, dir) {
_root["enemy" + id].removeMovieClip();
rand = random(10);
if (rand == 0) {
_root.attachMovie("1up", "1up" + id, id + 50);
if (dir == 100) {
_root["1up" + id]._x = (x - w) + 8;
} else {
_root["1up" + id]._x = (x + w) - 8;
}
_root["1up" + id]._y = y - 5;
_root["1up" + id].idNum = id;
}
}
function add_pots() {
i = 0;
while (i < this.background.amt_of_pots) {
_root.attachMovie("pots", "pot" + i, 30 + (i * 2));
_root["pot" + i]._x = this.background.list_of_pots_x[i];
_root["pot" + i]._y = this.background.list_of_pots_y[i];
_root["pot" + i].idNum = i * 2;
i++;
}
}
function remove_pots() {
i = 0;
while (i < (this.background.amt_of_pots * 2)) {
_root["pot" + i].removeMovieClip();
_root["fish" + i].removeMovieClip();
_root["1up" + i].removeMovieClip();
i++;
}
}
function place_food(x, y) {
_root.attach_food(this.background.list_of_food_x[x], this.background.list_of_food_y[x], y);
this.background.food_on_screen = this.background.food_on_screen + 1;
this.last_food_eaten = getTimer() / 1000;
}
function add_food() {
if (this.background.food_on_screen != this.background.food_amt_in_stage) {
if (((getTimer() / 1000) - this.last_food_eaten) >= this.reappear_time) {
x = random(6);
if (this.last_food_location == x) {
} else {
this.last_food_location = x;
if (!this.food_1_exists) {
this.place_food(x, 201);
this.food_1_exists = true;
} else if (!this.food_2_exists) {
this.place_food(x, 202);
this.food_2_exists = true;
} else if (!this.food_3_exists) {
this.place_food(x, 203);
this.food_3_exists = true;
}
}
}
}
}
function enemy_defeated() {
this.background.enemies_on_screen = this.background.enemies_on_screen - 1;
this.background.amt_of_enemies_defeated = this.background.amt_of_enemies_defeated + 1;
if (this.background.amt_of_enemies_in_level == this.background.amt_of_enemies_defeated) {
this.stage_cleared = true;
this.elapsed_time = (getTimer() / 1000) - this.start_time;
this.hrs = Math.floor(this.elapsed_time / 3600);
this.remaining = elapsed_time - (this.hrs * 3600);
this.mins = Math.floor(this.remaining / 60);
this.remaining = elapsed_time - (this.mins * 60);
this.secs = Math.floor(this.remaining);
this.load_objects = false;
this.last_stage_cleared = getTimer() / 1000;
_root.sb._visible = false;
_root.stage.background.food_exists = false;
_root.attachMovie("cleared_board", "cb", 30000);
_root.player_lives = _root.player.lives;
_root.player_ammo = _root.player.amt_poop;
_root.player.removeMovieClip();
this.remove_food();
this.remove_traps();
this.remove_extras();
this.remove_pots();
this.last_display = getTimer() / 1000;
_root.cb.acc_total.stage_acc = 0;
this.s_acc = int((_root.amt_ammo_hit / _root.amt_ammo_thrown) * 100);
_root.total_amts_hit = _root.total_amts_hit + _root.amt_ammo_hit;
_root.total_amts_thrown = _root.total_amts_thrown + _root.amt_ammo_thrown;
_root.cb.o_acc_total.overall_acc = 0;
this.o_acc = int((_root.total_amts_hit / _root.total_amts_thrown) * 100);
_root.amt_ammo_hit = 0;
_root.amt_ammo_thrown = 0;
}
}
function game_over() {
if (_root.player.lives == 0) {
_root.sb._visible = false;
_root.attachMovie("game_over_board", "gob", 30001);
this.stop_enemies = true;
}
}
function adjust_enter_time() {
if ((5 < this.level) and (entrance_time != 3)) {
this.entrance_time = 3;
}
if ((10 < this.level) and (entrance_time != 2)) {
this.entrance_time = 2;
}
}
function cleared_level() {
if (((getTimer() / 1000) - this.last_display) >= this.display_delay) {
if (!_root.cb.acc_total._visible) {
_root.cb.cb_message._y = 94;
this.focus_on1 = true;
_root.cb.acc_total._visible = true;
this.acc_calc_complete = false;
} else if (!this.acc_calc_complete) {
if (_root.cb.acc_total.stage_acc < this.s_acc) {
_root.cb.acc_total.stage_acc = _root.cb.acc_total.stage_acc + 1;
_root.cb.acc_total.display();
} else {
this.acc_calc_complete = true;
this.focus_on1 = false;
this.last_stage_cleared = getTimer() / 1000;
}
}
if ((!_root.cb.o_acc_total._visible) and this.acc_calc_complete) {
_root.cb.o_acc_total._visible = true;
} else if ((!this.o_acc_calc_complete) and _root.cb.o_acc_total._visible) {
if (_root.cb.o_acc_total.overall_acc < this.o_acc) {
_root.cb.o_acc_total.overall_acc = _root.cb.o_acc_total.overall_acc + 1;
_root.cb.o_acc_total.display();
} else {
this.o_acc_calc_complete = true;
this.last_stage_cleared = getTimer() / 1000;
}
}
if ((!_root.cb.time._visible) and this.o_acc_calc_complete) {
_root.cb.time._visible = true;
_root.cb.time.minutes = mins;
_root.cb.time.seconds = secs;
_root.cb.time.display();
this.last_display = getTimer() / 1000;
this.last_stage_cleared = getTimer() / 1000;
this.display_complete = true;
}
}
if ((((getTimer() / 1000) - this.last_stage_cleared) >= this.stage_clear_delay) and this.display_complete) {
this.display_complete = false;
this.acc_calc_complete = false;
this.o_acc_calc_complete = false;
this.next_level = true;
this.stage_cleared = false;
_root.cb.removeMovieClip();
this.remove_level_objects();
this.level = this.level + 1;
if (this.level == 26) {
_root.beat_game();
} else {
_root.attachMovie("load_board", "lb", 30000);
this.background.amt_of_enemies_defeated = 0;
this.background.gotoAndStop("level" + this.level);
this.branches.gotoAndStop("level" + this.level);
this.ground.gotoAndStop("level" + this.level);
this.spikes.gotoAndStop("level" + this.level);
this.jump_l.gotoAndStop("level" + this.level);
this.jump_r.gotoAndStop("level" + this.level);
this.right_hang.gotoAndStop("level" + this.level);
this.left_hang.gotoAndStop("level" + this.level);
this.vines.gotoAndStop("level" + this.level);
this.ladders.gotoAndStop("level" + this.level);
this.pool.gotoAndStop("level" + this.level);
this.dirt_piles.gotoAndStop("level" + this.level);
this.logs.gotoAndStop("level" + this.level);
this.food_loaded = false;
this.last_stage_loaded = getTimer() / 1000;
}
}
}
function player_continue() {
_root.player_lives = _root.default_lives;
_root.player_ammo = _root.default_ammo;
this.display_complete = false;
this.next_level = true;
this.stage_cleared = false;
this.remove_food();
_root.attachMovie("load_board", "lb", 30000);
this.background.amt_of_enemies_defeated = 0;
this.background.amt_of_extras_entered = 0;
_root.amt_ammo_hit = 0;
_root.amt_ammo_thrown = 0;
this.background.gotoAndStop("level" + this.level);
this.branches.gotoAndStop("level" + this.level);
this.ground.gotoAndStop("level" + this.level);
this.spikes.gotoAndStop("level" + this.level);
this.jump_l.gotoAndStop("level" + this.level);
this.jump_r.gotoAndStop("level" + this.level);
this.right_hang.gotoAndStop("level" + this.level);
this.left_hang.gotoAndStop("level" + this.level);
this.vines.gotoAndStop("level" + this.level);
this.ladders.gotoAndStop("level" + this.level);
this.pool.gotoAndStop("level" + this.level);
this.dirt_piles.gotoAndStop("level" + this.level);
this.logs.gotoAndStop("level" + this.level);
this.food_loaded = false;
this.last_stage_loaded = getTimer() / 1000;
this.stop_enemies = false;
}
function fill_level() {
if (((getTimer() / 1000) - this.last_stage_loaded) >= this.stage_load_delay) {
if ((7 < this.level) and (this.level < 13)) {
this.entrance_time = 3;
} else if (14 < this.level) {
this.entrance_time = 2.5;
}
_root.lb.removeMovieClip();
_root.attachMovie("monkey", "player", 40);
_root.player._x = this.background.player_x_start;
_root.player._y = this.background.player_y_start;
_root.sb._visible = true;
this.add_pots();
this.load_objects = true;
this.next_level = false;
this.adjust_enter_time();
this.start_time = getTimer() / 1000;
}
}
function set_level(isHero, yPos, i) {
if ((-10 < yPos) and (50 >= yPos)) {
if (isHero) {
_root.player.level = 1;
} else {
_root["enemy" + i].level = 1;
}
} else if ((-51 < yPos) and (125 >= yPos)) {
if (isHero) {
_root.player.level = 2;
} else {
_root["enemy" + i].level = 2;
}
} else if ((-127 < yPos) and (190 >= yPos)) {
if (isHero) {
_root.player.level = 3;
} else {
_root["enemy" + i].level = 3;
}
} else if ((-192 < yPos) and (234 >= yPos)) {
if (isHero) {
_root.player.level = 4;
} else {
_root["enemy" + i].level = 4;
}
} else if (-235 < yPos) {
if (isHero) {
_root.player.level = 5;
} else {
_root["enemy" + i].level = 5;
}
}
}
level = 1;
last_enemy_entered = 0;
last_extra_entered = 0;
last_food_eaten = 0;
last_food_location = 10;
food_1_exists = false;
food_2_exists = false;
food_3_exists = false;
entrance_time = 4;
reappear_time = 3;
food_loaded = false;
stage_clear_delay = 2;
stage_cleared = false;
next_level = false;
load_delay = 2;
load_begin = 0;
stage_load_delay = 2;
load_objects = false;
bird_entered = false;
calc_complete = false;
s_acc = 0;
o_acc = 0;
focus_on1 = false;
focus_on2 = false;
display_complete = false;
stop_enemies = false;
display_delay = 1.5;
last_display = 0;
acc_calc_complete = false;
o_acc_calc_complete = false;
start_time = 0;
elapsed_time = 0;
hrs = 0;
mins = 0;
secs = 0;
remaining = 0;
this.start_game();
this.gotoAndStop("jungle");
Symbol 200 MovieClip [stage] Frame 2
this.ground._visible = false;
this.branches._visible = false;
this.vines._visible = false;
this.jump_l._visible = false;
this.jump_r._visible = false;
this.right_hang._visible = false;
this.left_hang._visible = false;
this.ladders._visible = false;
this.spikes._visible = false;
this.pool._visible = false;
this.dirt_piles._visible = false;
this.logs._visible = false;
this.background.gotoAndStop("level" + this.level);
this.branches.gotoAndStop("level" + this.level);
this.ground.gotoAndStop("level" + this.level);
this.spikes.gotoAndStop("level" + this.level);
this.jump_l.gotoAndStop("level" + this.level);
this.jump_r.gotoAndStop("level" + this.level);
this.right_hang.gotoAndStop("level" + this.level);
this.left_hang.gotoAndStop("level" + this.level);
this.vines.gotoAndStop("level" + this.level);
this.ladders.gotoAndStop("level" + this.level);
this.pool.gotoAndStop("level" + this.level);
this.dirt_piles.gotoAndStop("level" + this.level);
this.logs.gotoAndStop("level" + this.level);
Instance of Symbol 195 MovieClip in Symbol 200 MovieClip [stage] Frame 2
onClipEvent (enterFrame) {
if (_parent.stage_cleared) {
_parent.cleared_level();
} else if (_parent.next_level) {
_parent.fill_level();
} else if ((_parent.load_objects or (_parent.level == 1)) and (!_parent.stop_enemies)) {
_parent.add_objects();
}
}
Symbol 254 MovieClip Frame 1
_parent.not_vunerable = true;
Symbol 254 MovieClip Frame 277
_parent.not_vunerable = false;
_parent.gotoAndStop("run");
Symbol 280 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
Symbol 280 MovieClip Frame 60
_parent.hit_complete = true;
Symbol 296 MovieClip Frame 15
_parent.gotoAndStop("sleep");
Symbol 308 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 150, _parent._x, _parent._y);
Symbol 308 MovieClip Frame 85
_root.stage.enemy_defeated();
_parent.death_complete = true;
Symbol 310 MovieClip [leopard_enemy] Frame 1
function waiting_to_wake_up() {
if ((((this._y + 10) >= _root.player._y) and (_root.player._y >= (this._y - 10))) and (!_root.player.death_animation)) {
if ((((this._x - 100) < _root.player._x) and (_root.player._x < (this._x + 100))) or _root.player.running_mode) {
this.gotoAndStop("run");
this.monkey_on_level = true;
}
}
}
function run() {
if ((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 40, this._y - 10, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
this._x = 288;
}
} else if ((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 40, this._y - 10, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
this._x = 2;
}
} else {
this.turn();
}
}
function walk() {
if ((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 40, this._y - 10, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
this._x = 288;
}
} else if ((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 40, this._y - 10, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
this._x = 2;
}
} else {
this.turn();
}
if (((getTimer() / 1000) - this.started_walking) >= this.fall_asleep_in) {
this.gotoAndStop("go_to_sleep");
this.sleep_timer_set = false;
}
}
function look_for_monkey() {
if ((_root.player._y < (this._y - 11)) or ((this._y + 11) < _root.player._y)) {
this.monkey_on_level = false;
if (!this.timer_set) {
this.monkey_last_seen = getTimer() / 1000;
this.timer_set = true;
} else if (((getTimer() / 1000) - this.monkey_last_seen) >= this.search_time) {
this.gotoAndStop("walk");
this.timer_set = false;
if (!this.sleep_timer_set) {
this.started_walking = getTimer() / 1000;
this.sleep_timer_set = true;
}
}
} else {
this.monkey_on_level = true;
this.timer_set = false;
}
}
function stay_alert() {
if ((((this._y + 10) >= _root.player._y) and (_root.player._y >= (this._y - 10))) and _root.player.on_ground) {
if (((_root._x < this._x) and (this._xscale == 100)) or ((this._x < _root._x) and (this._xscale == -100))) {
this.gotoAndStop("run");
this.sleep_timer_set = false;
}
}
}
function waiting_to_attack() {
if ((((((this._y + 10) >= _root.player._y) and (_root.player._y >= (this._y - 10))) and (!_root.player.death_animation)) and _root.player.on_ground) and (!_root.player.not_vunerable)) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
if (this._xscale != _root.player._xscale) {
this.gotoAndStop("maul");
_root.player.gotoAndStop("mauled_up");
if (_root.player._xscale == 100) {
_root.player._xscale = -100;
_root.player._x = this._x - 16;
_root.player._y = this._y - 7;
} else {
_root.player._xscale = 100;
_root.player._x = this._x + 16;
_root.player._y = this._y - 7;
}
} else {
this.gotoAndStop("maul");
_root.player.gotoAndStop("mauled_down");
if (_root.player._xscale == 100) {
_root.player._x = this._x + 16;
_root.player._y = this._y - 7;
} else {
_root.player._x = this._x - 16;
_root.player._y = this._y - 7;
}
}
}
}
}
function waiting_to_turn() {
if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 25, this._y + 10, true)) and (!_root.stage.ground.hitTest(this._x + 25, this._y + 10, true))) {
this._xscale = -100;
this._x = this._x + 20;
}
} else if ((!_root.stage.branches.hitTest(this._x - 25, this._y + 10, true)) and (!_root.stage.ground.hitTest(this._x - 25, this._y + 10, true))) {
this._xscale = 100;
this._x = this._x - 20;
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x + 20;
} else {
this._xscale = 100;
this._x = this._x - 20;
}
}
function been_hit(dir) {
if (this.hits_taken < this.amt_of_hits) {
this.gotoAndStop("hit");
this.hits_taken = this.hits_taken + 1;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
} else {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("death");
}
}
function is_hit_complete() {
if (this.hit_complete) {
this.hit_complete = false;
this.gotoAndStop("run");
}
}
function waiting_to_die() {
if (this.death_complete) {
_root.score = _root.score + 150;
_root.sb.game_score = _root.score;
_root.sb.update_score();
_root.stage.clean_up(this.idNum, this._x, this._y, this._height / 2, this._width / 2, this._xscale);
}
}
function flash() {
if (this.not_vunerable) {
if (this.non_vulnerable_time >= ((getTimer() / 1000) - this.hit_time)) {
if (((getTimer() / 1000) - this.last_flash) >= this.flash_duration) {
if (this._visible) {
this._visible = false;
} else {
this._visible = true;
}
this.last_flash = getTimer() / 1000;
}
} else {
this.not_vunerable = false;
this._visible = true;
}
}
}
start_x = this._x;
start_xscale = this._xscale;
enemyType = 0;
runSpeed = 3;
walkSpeed = 0.5;
hit_complete = false;
monkey_last_seen = 0;
search_time = 1;
monkey_on_level = false;
timer_set = false;
amt_of_hits = 1;
hits_taken = 0;
death_complete = false;
not_vunerable = false;
dying = false;
non_vulnerable_time = 3;
hit_time = 0;
flash_duration = 0.075;
last_flash = 0;
fall_asleep_in = 2;
sleep_timer_set = false;
on_ground = true;
this.gotoAndStop("sleep");
Instance of Symbol 205 MovieClip in Symbol 310 MovieClip [leopard_enemy] Frame 2
onClipEvent (enterFrame) {
_parent.waiting_to_wake_up();
_parent.flash();
}
Instance of Symbol 217 MovieClip in Symbol 310 MovieClip [leopard_enemy] Frame 3
onClipEvent (enterFrame) {
_parent.run();
_parent.look_for_monkey();
_parent.waiting_to_attack();
_parent.waiting_to_turn();
_parent.flash();
}
Instance of Symbol 255 MovieClip in Symbol 310 MovieClip [leopard_enemy] Frame 4
onClipEvent (load) {
_parent._visible = true;
}
onClipEvent (enterFrame) {
}
Instance of Symbol 281 MovieClip in Symbol 310 MovieClip [leopard_enemy] Frame 5
onClipEvent (enterFrame) {
_parent.is_hit_complete();
}
Instance of Symbol 289 MovieClip in Symbol 310 MovieClip [leopard_enemy] Frame 6
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_turn();
_parent.stay_alert();
_parent.flash();
}
Instance of Symbol 297 MovieClip in Symbol 310 MovieClip [leopard_enemy] Frame 7
onClipEvent (enterFrame) {
_parent.flash();
}
Instance of Symbol 309 MovieClip in Symbol 310 MovieClip [leopard_enemy] Frame 8
onClipEvent (load) {
_parent.not_vunerable = false;
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Symbol 359 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
Symbol 359 MovieClip Frame 100
_parent.hit_complete = true;
Symbol 371 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
Symbol 371 MovieClip Frame 104
_parent.hit_complete = true;
_parent.turn();
Symbol 404 MovieClip Frame 1
_parent.not_vunerable = true;
Symbol 404 MovieClip Frame 126
_parent.not_vunerable = false;
_parent.animation_complete = true;
Symbol 456 MovieClip Frame 1
_parent.not_vunerable = true;
Symbol 456 MovieClip Frame 198
_parent.not_vunerable = false;
_parent.animation_complete = true;
Symbol 465 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 300, _parent._x, _parent._y);
Symbol 465 MovieClip Frame 78
_parent.death_complete = true;
_root.stage.enemy_defeated();
Symbol 475 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 300, _parent._x, _parent._y);
Symbol 475 MovieClip Frame 78
_parent.death_complete = true;
_root.stage.enemy_defeated();
Symbol 476 MovieClip Frame 49
_parent.turn();
_parent.gotoAndStop("walk");
Symbol 478 MovieClip [enemy_grla] Frame 1
function pick_a_direction(x) {
if ((x % 2) == 0) {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
}
function wait_for_action() {
if ((((getTimer() / 1000) - this.begin_idle) >= this.idle_time) or (this.begin_idle == 0)) {
this.begin_idle = getTimer() / 1000;
this.choose_action();
}
}
function choose_action() {
if (this._y < _root.player._y) {
this.gotoAndStop("run");
this.was_running = true;
} else {
this.gotoAndStop("walk");
this.was_running = false;
}
}
function find_ground(dist) {
this.no_ground = true;
this.no_spikes = true;
j = 0;
if (this._xscale == 100) {
j = j + dist;
} else {
j = j - dist;
}
i = this._y;
while (i < 230) {
if (_root.stage.ground.hitTest(this.j, i, true)) {
this.no_ground = false;
if (_root.stage.spikes.hitTest(this.j, i - 10, true)) {
this.no_spikes = false;
}
return;
}
i++;
}
}
function waiting_to_fall() {
if (!_root.stage.ground.hitTest(this._x, this._y + this.y_adjuster, true)) {
this.find_ground(this.runSpeed);
if (((this._xscale == 100) and _root.stage.ground.hitTest(this._x - this.runSpeed, this._y + this.y_adjuster, true)) and (this.no_ground or (!this.no_spikes))) {
this.turn();
} else if (((this._xscale == -100) and _root.stage.ground.hitTest(this._x + this.runSpeed, this._y + this.y_adjuster, true)) and (this.no_ground or (!this.no_spikes))) {
this.turn();
} else {
this.find_ground(0);
if (this.no_ground or (!this.no_spikes)) {
this.turn();
} else {
this.gotoAndStop("fall_down");
}
}
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.fall(this.curr_jump_height);
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + this.y_adjuster, true)) and (!_root.stage.branches.hitTest(this._x, this._y + this.y_adjuster, true))) {
this._y = this._y + valueY;
if (500 < this._y) {
this.fall_die = true;
this.death_complete = true;
this.waiting_to_die();
}
this.move_in_air();
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + this.y_adjuster, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + this.y_adjuster, true)) {
this._y = this._y - i;
break;
}
i--;
}
if (!this.dying) {
this.on_ground = true;
if (this.was_running) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("walk");
}
}
this.fall_loaded = false;
}
}
function move_in_air() {
if (this._xscale == 100) {
this._x = this._x + this.walkSpeed;
} else {
this._x = this._x - this.walkSpeed;
}
}
function walk() {
if (((this._xscale == -100) and (!_root.stage.logs.hitTest(this._x - this.walkSpeed, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x - this.walkSpeed, this._y, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
if (_root.stage.ground.hitTest(288, this._y + this.y_adjuster, true)) {
this._x = 288;
} else {
this.turn();
}
}
} else if (((this._xscale == 100) and (!_root.stage.logs.hitTest(this._x + this.walkSpeed, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x + this.walkSpeed, this._y, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
if (_root.stage.ground.hitTest(2, this._y + this.y_adjuster, true)) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
}
function run() {
if (((this._xscale == -100) and (!_root.stage.logs.hitTest(this._x - this.runSpeed, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x - this.runSpeed, this._y, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
if (_root.stage.ground.hitTest(288, this._y + this.y_adjuster, true)) {
this._x = 288;
} else {
this.turn();
}
}
} else if (((this._xscale == 100) and (!_root.stage.logs.hitTest(this._x + this.runSpeed, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x + this.runSpeed, this._y, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
if (_root.stage.ground.hitTest(2, this._y + this.y_adjuster, true)) {
this._x = 2;
} else {
this.turn();
}
}
} else if (((getTimer() / 1000) - this.last_roar) >= this.roar_duration) {
this.gotoAndStop("beat_chest");
this.last_roar = getTimer() / 1000;
} else {
this.turn();
}
}
function been_hit(dir) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
if (this.hit_amt < this.max_hit_amt) {
this.gotoAndStop("hit_front");
this.hit_amt = this.hit_amt + 1;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
} else {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_back");
}
} else if (this.hit_amt < this.max_hit_amt) {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("hit_back");
this.hit_amt = this.hit_amt + 1;
} else {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_forward");
}
}
function is_hit_complete() {
if (this.hit_complete) {
this.hit_complete = false;
this.gotoAndStop("run");
}
}
function is_animation_complete() {
if (this.animation_complete) {
this.animation_complete = false;
this.gotoAndStop("run");
}
}
function wait_to_attack() {
if (_root.player._y >= this._y) {
if ((_root.player.hitTest(this._x, this._y, true) and (!_root.player.death_animation)) and (!_root.player.not_vunerable)) {
if (_root.player._xscale == this._xscale) {
this.gotoAndStop("rip_head_off");
if (this._xscale == 100) {
_root.player._x = this._x + 14;
_root.player._y = this._y + 4;
} else {
_root.player._x = this._x - 14;
_root.player._y = this._y + 4;
_root.player._xscale == -100;
}
_root.player.rip_off_head();
} else {
this.gotoAndStop("rip_arms_off");
if (this._xscale == 100) {
_root.player._x = this._x + 14;
_root.player._y = this._y + 4;
_root.player._xscale = 100;
} else {
_root.player._x = this._x - 14;
_root.player._y = this._y + 4;
_root.player._xscale = -100;
}
_root.player.rip_off_arms();
}
}
}
}
function flash() {
if (this.not_vunerable) {
if (this.non_vulnerable_time >= ((getTimer() / 1000) - this.hit_time)) {
if (((getTimer() / 1000) - this.last_flash) >= this.flash_duration) {
if (this._visible) {
this._visible = false;
} else {
this._visible = true;
}
this.last_flash = getTimer() / 1000;
}
} else {
this.not_vunerable = false;
this._visible = true;
}
}
}
function waiting_to_die() {
if (this.death_complete) {
if (!this.fall_die) {
_root.score = _root.score + 300;
_root.sb.update_score();
}
_root.stage.clean_up(this.idNum, this._x, this._y, this._height / 2, this._width / 2, this._xscale);
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
runSpeed = 2.25;
fallSpeed = 6;
jumpSpeed = 2;
enemyType = 0;
curr_jump_height = 0;
fall_loaded = false;
dying = false;
y_adjuster = 20;
walkSpeed = 0.25;
idle_time = 2;
begin_idle = 0;
hit_complete = false;
animation_complete = false;
hit_amt = 0;
max_hit_amt = 2;
death_complete = false;
not_vunerable = false;
non_vulnerable_time = 4;
hit_time = 0;
flash_duration = 0.075;
last_flash = 0;
roar_duration = 5;
last_roar = 0;
no_ground = false;
no_spikes = false;
was_running = false;
on_ground = false;
fall_die = false;
this.pick_a_direction(this.idNum);
this.gotoAndStop("fall_down");
Instance of Symbol 313 MovieClip in Symbol 478 MovieClip [enemy_grla] Frame 2
onClipEvent (enterFrame) {
_parent.wait_for_action();
_parent.wait_to_attack();
_parent.flash();
}
Instance of Symbol 319 MovieClip in Symbol 478 MovieClip [enemy_grla] Frame 3
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_fall();
_parent.wait_for_action();
_parent.wait_to_attack();
_parent.flash();
}
Instance of Symbol 322 MovieClip in Symbol 478 MovieClip [enemy_grla] Frame 4
onClipEvent (enterFrame) {
_parent.fall_down();
_parent.flash();
}
Instance of Symbol 334 MovieClip in Symbol 478 MovieClip [enemy_grla] Frame 5
onClipEvent (enterFrame) {
_parent.run();
_parent.waiting_to_fall();
_parent.wait_for_action();
_parent.wait_to_attack();
_parent.flash();
}
Instance of Symbol 360 MovieClip in Symbol 478 MovieClip [enemy_grla] Frame 6
onClipEvent (enterFrame) {
_parent.is_hit_complete();
}
Instance of Symbol 405 MovieClip in Symbol 478 MovieClip [enemy_grla] Frame 8
onClipEvent (load) {
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.is_animation_complete();
}
Instance of Symbol 466 MovieClip in Symbol 478 MovieClip [enemy_grla] Frame 10
onClipEvent (load) {
_parent.not_vunerable = false;
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Instance of Symbol 477 MovieClip in Symbol 478 MovieClip [enemy_grla] Frame 12
onClipEvent (enterFrame) {
_parent.flash();
}
Symbol 508 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 508 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y);
Symbol 508 MovieClip Frame 27
_parent.throwComplete = true;
Symbol 518 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 518 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 518 MovieClip Frame 17
if (_root.game_paused) {
stop();
}
Symbol 518 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, true, 0, _parent._x, _parent._y, 1);
Symbol 518 MovieClip Frame 22
if (_root.game_paused) {
stop();
}
Symbol 518 MovieClip Frame 27
if (_root.game_paused) {
stop();
}
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 528 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 528 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 528 MovieClip Frame 17
if (_root.game_paused) {
stop();
}
Symbol 528 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, false, 2, _parent._x, _parent._y, 1);
Symbol 528 MovieClip Frame 22
if (_root.game_paused) {
stop();
}
Symbol 528 MovieClip Frame 27
if (_root.game_paused) {
stop();
}
_parent.ThrowComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 544 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 250, _parent._x, _parent._y);
Symbol 544 MovieClip Frame 94
_parent.dying = false;
_root.stage.enemy_defeated();
Symbol 560 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 250, _parent._x, _parent._y);
Symbol 560 MovieClip Frame 88
_parent.dying = false;
_root.stage.enemy_defeated();
Symbol 579 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
Symbol 579 MovieClip Frame 70
_parent.hit_over = true;
Symbol 587 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
Symbol 587 MovieClip Frame 70
_parent.hit_over = true;
_parent.turn();
Symbol 604 MovieClip Frame 6
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 2);
Symbol 604 MovieClip Frame 10
_parent.shotComplete = true;
Symbol 615 MovieClip [gunner_enemy] Frame 1
function pick_a_direction(x) {
if ((x % 2) == 0) {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
}
function wait_for_action() {
if ((((getTimer() / 1000) - this.begin_idle) >= this.idle_time) or (this.begin_idle == 0)) {
this.choose_action();
} else if (!this.was_idling) {
this.was_idling = true;
}
}
function choose_action() {
if ((this._y < (_root.player._y + 20)) and (_root.player._y < this._y)) {
this.gotoAndStop("walk_w_gun");
} else {
this.gotoAndStop("walk");
}
}
function move_in_air() {
if (this.is_left_jump) {
this._x = this._x - this.jumpMoveSpeed;
} else {
this._x = this._x + this.jumpMoveSpeed;
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.fall(this.curr_jump_height);
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + 15, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 15, true))) {
this._y = this._y + valueY;
if (500 < this._y) {
this.fall_die = true;
this.dying = false;
this.waiting_to_die();
}
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 15, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 15, true)) {
this._y = this._y - i;
break;
}
i--;
}
_root.stage.set_level(false, this._y, this.idNum);
this.running_mode = false;
this.idle_mode = false;
if (!this.dying) {
this.on_ground = true;
this.gotoAndStop("stand");
}
if (this.on_ladder_hit) {
if (this.ladder_fall_back) {
this.gotoAndStop("hit_forward");
} else {
this.gotoAndStop("hit_back");
}
this.on_ladder_hit = false;
}
this.jump_loaded = false;
this.fall_loaded = false;
if (!this.throwComplete) {
this.throwComplete = true;
}
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 10;
} else {
this._xscale = 100;
this._x = this._x + 10;
}
}
function walk() {
if (((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.logs.hitTest(288, this._y - 10, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else if (((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.logs.hitTest(2, this._y - 10, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
this.look_for_monkey();
}
function gun_walk() {
if (((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.gun_walkSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.logs.hitTest(288, this._y - 10, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else if (((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.gun_walkSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.logs.hitTest(2, this._y - 10, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
}
function run() {
if (((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.logs.hitTest(288, this._y - 10, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else if (((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.logs.hitTest(2, this._y - 10, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
}
function collide() {
i = 0;
while (i < _root.stage.amt_of_enemies_in_level) {
if (_root["enemy" + i].hitTest(this._x, this._y, true) and (i != this.idNum)) {
if (((this._xscale == 100) and (_root["enemy" + i]._xscale == -100)) or ((this._xscale == -100) and (_root["enemy" + i]._xscale == 100))) {
if (!_root["enemy" + i].jump_loaded) {
this.turn();
_root["enemy" + i].turn();
}
}
}
i++;
}
}
function waiting_to_fall() {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this.gotoAndStop("fall_down");
}
}
function waiting_to_turn() {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this.turn();
}
}
function waiting_to_die() {
if (!this.dying) {
if (!this.fall_die) {
_root.score = _root.score + 250;
_root.sb.update_score();
}
_root.stage.clean_up(this.idNum, this._x, this._y, this._height / 2, this._width / 2, this._xscale);
}
}
function take_fall() {
if (this.ready_to_fall) {
this.attempt_hang = false;
this.ready_to_fall = false;
this.on_ground = false;
this.gotoAndStop("fall_down");
}
}
function waiting_to_normal_throw() {
if (this.normal_throw) {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("normal_throw");
}
}
this.last_throw = getTimer() / 1000;
}
}
}
function if_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function adjust_climb_pos() {
if (this._xscale == -100) {
this.climb_pos = 7;
} else {
this.climb_pos = -4;
}
}
function waiting_to_climb() {
this.adjust_climb_pos();
if (_root.stage.ladders.hitTest(this._x + this.climb_pos, this._y, true)) {
if ((((getTimer() / 1000) - this.last_climb_time) >= this.climb_delay) or (this.last_climb_time == 0)) {
if ((_root.player._y + 10) < this._y) {
this.climb_up = true;
this.attempt_climb = true;
this.on_ladder = true;
this.gotoAndStop("climb");
}
}
}
}
function waiting_to_climb_down() {
this.adjust_climb_pos();
if (_root.stage.ladders.hitTest(this._x + this.climb_pos, this._y + 20, true)) {
if ((((getTimer() / 1000) - this.last_climb_time) >= this.climb_delay) or (this.last_climb_time == 0)) {
if ((this._y < (_root.player._y - 10)) or ((_root.player._y + 10) < this._y)) {
this.climb_up = false;
this.no_other_ladders_exist = false;
this.on_ladder = true;
this._y = this._y + 2;
this.gotoAndStop("climb");
}
}
}
}
function climb() {
if (this.climb_up) {
if (_root.stage.ladders.hitTest(this._x, this._y + 10, true)) {
this._y = this._y - this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.attempt_climb = false;
this.last_climb_time = getTimer() / 1000;
this.gotoAndStop("fall_down");
}
} else if (_root.stage.ladders.hitTest(this._x, this._y + 20, true)) {
this._y = this._y + this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.attempt_climb = false;
this.last_climb_time = getTimer() / 1000;
this.on_ladder = false;
this.gotoAndStop("fall_down");
}
}
function been_hit(dir) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
if (this.hit_cnt < this.max_hits) {
this.hit_cnt = this.hit_cnt + 1;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
if (!this.on_ladder) {
this.gotoAndStop("hit_forward");
} else {
this.gotoAndStop("ladder_hit_back");
this.ladder_fall_back = true;
this.on_ladder_hit = true;
}
} else {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_back");
}
} else if (this.hit_cnt < this.max_hits) {
this.hit_cnt = this.hit_cnt + 1;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
if (!this.on_ladder) {
this.gotoAndStop("hit_back");
} else {
this.gotoAndStop("ladder_hit_forward");
this.on_ladder_hit = true;
this.ladder_fall_back = false;
}
} else {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_forward");
}
}
function finish_hit() {
if (this.hit_over) {
this.hit_over = false;
this.gotoAndStop("stand");
}
}
function waiting_to_shoot() {
if ((((this._y < (_root.player._y + 20)) and (_root.player._y < this._y)) and (!_root.player.death_animation)) and (!_root.player.not_vunerable)) {
if (((this._x < _root.player._x) and (this._xscale == 100)) or ((_root.player._x < this._x) and (this._xscale == -100))) {
if ((((getTimer() / 1000) - this.last_shot) >= this.delay_shot) or (this.last_shot == 0)) {
x = random(2);
if (x == 0) {
this.gotoAndStop("shoot");
}
this.last_shot = getTimer() / 1000;
}
}
}
}
function waiting_to_chase() {
if ((_root.player._y < (this._y - 11)) or ((this._y + 11) < _root.player._y)) {
if (!this.delay_set) {
this.last_seen_monkey = getTimer() / 1000;
this.delay_set = true;
} else if (((getTimer() / 1000) - this.last_seen_monkey) >= this.delay_chase) {
this.gotoAndStop("run");
this.delay_set = false;
}
}
}
function if_shot_ended() {
if (this.shotComplete) {
this.gotoAndStop("walk_w_gun");
this.last_shot = getTimer() / 1000;
this.shotComplete = false;
}
}
function flash() {
if (this.not_vunerable) {
if (this.non_vulnerable_time >= ((getTimer() / 1000) - this.hit_time)) {
if (((getTimer() / 1000) - this.last_flash) >= this.flash_duration) {
if (this._visible) {
this._visible = false;
} else {
this._visible = true;
}
this.last_flash = getTimer() / 1000;
}
} else {
this.not_vunerable = false;
this._visible = true;
}
}
}
throwComplete = true;
shotComplete = false;
deathComplete = false;
catch_complete = false;
jump_loaded = true;
fall_loaded = false;
running_mode = false;
idle_mode = false;
dir_is_left = false;
is_left_jump = false;
normal_throw = false;
ready_to_fall = false;
dying = false;
climb_up = false;
idle_time = 5;
begin_idle = 0;
was_idling = false;
stopped_idling = 0;
walkTime = random(100);
walkSpeed = 0.75;
gun_walkSpeed = 0.6;
runSpeed = 1.5;
jumpMoveSpeed = 1;
fallSpeed = 3;
jumpSpeed = 0.75;
jumpHeight = -10;
curr_jump_height = 0;
climbSpeed = 0.5;
max_jump_height = 0;
attempt_hang = false;
attempt_climb = false;
mky_hanging_on_level = false;
climb_delay = 1;
last_climb_time = 0;
checked_for_ladders = false;
climb_pos = 0;
not_vunerable = false;
non_vulnerable_time = 4;
hit_time = 0;
flash_duration = 0.075;
last_flash = 0;
fall_die = false;
on_ground = false;
amtThrown = 0;
level = 0;
grabY = 0;
hit_cnt = 0;
max_hits = 2;
hit_over = false;
ladder_fall_back = false;
on_ladder_hit = false;
on_ladder = false;
startThinking = getTimer() / 1000;
lastThought = 0;
thinkTime = 3;
delay_attempt = 1;
last_attempt = 0;
delay_throw = 1;
last_throw = 0;
delay_shot = 0.5;
last_shot = 0;
delay_chase = 1;
last_seen_monkey = 0;
delay_set = false;
this.pick_a_direction(idNum);
this.gotoAndStop("fall_down");
Instance of Symbol 481 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 2
onClipEvent (enterFrame) {
_parent.wait_for_action();
_parent.flash();
}
Instance of Symbol 487 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 3
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_turn();
_parent.waiting_to_shoot();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.flash();
}
Instance of Symbol 490 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 4
onClipEvent (enterFrame) {
_parent.fall_down();
_parent.flash();
}
Instance of Symbol 496 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 5
onClipEvent (enterFrame) {
_parent.climb();
_parent.flash();
}
Instance of Symbol 499 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 6
onClipEvent (enterFrame) {
_parent.get_up();
_parent.waiting_to_duck_throw();
}
Instance of Symbol 509 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 7
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 519 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 8
onClipEvent (enterFrame) {
_parent.if_duck_throw_ended();
}
Instance of Symbol 529 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 9
onClipEvent (enterFrame) {
_parent.if_up_throw_ended();
}
Instance of Symbol 545 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 10
onClipEvent (load) {
_parent.not_vunerable = false;
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 580 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 12
onClipEvent (enterFrame) {
_parent.finish_hit();
}
Instance of Symbol 599 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 14
onClipEvent (enterFrame) {
_parent.run();
_parent.waiting_to_turn();
_parent.waiting_to_shoot();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.flash();
}
Instance of Symbol 605 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 15
onClipEvent (enterFrame) {
_parent.if_shot_ended();
_parent.flash();
}
Instance of Symbol 613 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 16
onClipEvent (enterFrame) {
_parent.gun_walk();
_parent.waiting_to_turn();
_parent.waiting_to_chase();
_parent.waiting_to_shoot();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.flash();
}
Instance of Symbol 614 MovieClip in Symbol 615 MovieClip [gunner_enemy] Frame 17
onClipEvent (enterFrame) {
_parent.fall_down();
}
Symbol 646 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 200, _parent._x, _parent._y);
if (_parent.froze_monkey) {
_root.player.gotoAndStop("walk");
_parent.froze_monkey = false;
}
Symbol 646 MovieClip Frame 94
_parent.dying = false;
_root.stage.enemy_defeated();
Symbol 664 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 200, _parent._x, _parent._y);
if (_parent.froze_monkey) {
_root.player.gotoAndStop("walk");
_parent.froze_monkey = false;
}
Symbol 664 MovieClip Frame 94
_parent.dying = false;
_root.stage.enemy_defeated();
Symbol 683 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
if (_parent.froze_monkey) {
_root.player.gotoAndStop("walk");
_parent.froze_monkey = false;
}
Symbol 683 MovieClip Frame 70
_parent.hit_over = true;
Symbol 690 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
if (_parent.froze_monkey) {
_root.player.gotoAndStop("walk");
_parent.froze_monkey = false;
}
Symbol 690 MovieClip Frame 70
_parent.hit_over = true;
_parent.turn();
Symbol 715 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.catch_complete = false;
_parent.froze_monkey = true;
_root.player.gotoAndStop("freeze");
Symbol 715 MovieClip Frame 22
_root.player.gotoAndStop("caught");
Symbol 715 MovieClip Frame 86
_parent.not_vunerable = false;
_parent.catch_complete = true;
_parent.froze_monkey = false;
Symbol 723 MovieClip Frame 6
_parent.attach_trap();
Symbol 723 MovieClip Frame 15
_parent.gotoAndStop("stand");
Symbol 725 MovieClip [enemy_htr] Frame 1
function pick_a_direction(x) {
if ((x % 2) == 0) {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
}
function set_trap() {
if (this.trap_num < this.num_of_traps) {
x = random(5);
if (x == 0) {
if ((this.hit_cnt >= 2) and (((getTimer() / 1000) - this.last_trap_set) >= this.trap_duration)) {
if (((this._y + 20) >= _root.stage.background.player_y_start) and (_root.stage.background.player_y_start >= (this._y - 20))) {
if (((this._x + 30) >= _root.stage.background.player_x_start) and (_root.stage.background.player_x_start >= (this._x - 30))) {
this.last_trap_set = getTimer() / 1000;
} else {
this.gotoAndStop("set_trap");
this.last_trap_set = getTimer() / 1000;
}
} else {
this.gotoAndStop("set_trap");
this.last_trap_set = getTimer() / 1000;
}
}
}
}
}
function attach_trap() {
x = this.idNum * 1000;
x = x + this.trap_num;
_root.attachMovie("trap", "trap" + this.x, 2000 + this.x);
_root["trap" + this.x]._x = this._x;
_root["trap" + this.x]._y = this._y;
this.trap_num = this.trap_num + 1;
}
function wait_for_action() {
if ((((getTimer() / 1000) - this.begin_idle) >= this.idle_time) or (this.begin_idle == 0)) {
this.choose_action();
} else if (!this.was_idling) {
this.was_idling = true;
}
}
function choose_action() {
if (_root.player.level == this.level) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("walk");
}
}
function move_in_air() {
if (this.is_left_jump) {
this._x = this._x - this.jumpMoveSpeed;
} else {
this._x = this._x + this.jumpMoveSpeed;
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.fall(this.curr_jump_height);
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + 15, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 15, true))) {
this._y = this._y + valueY;
if (500 < this._y) {
this.fall_die = false;
this.dying = false;
this.waiting_to_die();
}
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 15, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 15, true)) {
this._y = this._y - i;
break;
}
i--;
}
_root.stage.set_level(false, this._y, this.idNum);
this.running_mode = false;
this.idle_mode = false;
if (!this.dying) {
this.on_ground = true;
this.gotoAndStop("walk");
}
if (this.on_ladder_hit) {
if (this.ladder_fall_back) {
this.gotoAndStop("hit_forward");
} else {
this.gotoAndStop("hit_back");
}
this.on_ladder_hit = false;
}
this.jump_loaded = false;
this.fall_loaded = false;
if (!this.throwComplete) {
this.throwComplete = true;
}
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 10;
} else {
this._xscale = 100;
this._x = this._x + 10;
}
}
function walk() {
if (((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.logs.hitTest(288, this._y - 10, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else if (((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.logs.hitTest(2, this._y - 10, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
this.look_for_monkey();
}
function look_for_monkey() {
if (((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) {
if (!this.run_delay_set) {
this.run_delay_set = true;
this.saw_monkey = getTimer() / 1000;
} else if (this.run_delay < ((getTimer() / 1000) - this.saw_monkey)) {
this.run_delay_set = false;
this.gotoAndStop("run");
}
}
}
function run() {
if (((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.logs.hitTest(288, this._y - 10, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else if (((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) and (!_root.stage.logs.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.logs.hitTest(2, this._y - 10, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
}
function collide() {
i = 0;
while (i < _root.stage.amt_of_enemies_in_level) {
if (_root["enemy" + i].hitTest(this._x, this._y, true) and (i != this.idNum)) {
if (((this._xscale == 100) and (_root["enemy" + i]._xscale == -100)) or ((this._xscale == -100) and (_root["enemy" + i]._xscale == 100))) {
if (!_root["enemy" + i].jump_loaded) {
this.turn();
_root["enemy" + i].turn();
}
}
}
i++;
}
}
function waiting_to_fall() {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this.on_ground = false;
this.gotoAndStop("fall_down");
}
}
function waiting_to_turn() {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this.turn();
}
}
function waiting_to_die() {
if (!this.dying) {
if (!this.fall_die) {
_root.score = _root.score + 200;
_root.sb.update_score();
}
_root.stage.clean_up(this.idNum, this._x, this._y, this._height / 2, this._width / 2, this._xscale);
}
}
function take_fall() {
if (this.ready_to_fall) {
this.attempt_hang = false;
this.ready_to_fall = false;
this.gotoAndStop("fall_down");
}
}
function waiting_to_normal_throw() {
if (this.normal_throw) {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("normal_throw");
}
}
this.last_throw = getTimer() / 1000;
}
}
}
function if_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function adjust_climb_pos() {
if (this._xscale == -100) {
this.climb_pos = 7;
} else {
this.climb_pos = -4;
}
}
function waiting_to_climb() {
this.adjust_climb_pos();
if (_root.stage.ladders.hitTest(this._x + this.climb_pos, this._y, true)) {
if ((((getTimer() / 1000) - this.last_climb_time) >= this.climb_delay) or (this.last_climb_time == 0)) {
if ((_root.player._y + 10) < this._y) {
this.climb_up = true;
this.attempt_climb = true;
this.on_ladder = true;
this.gotoAndStop("climb");
}
}
}
}
function waiting_to_climb_down() {
this.adjust_climb_pos();
if (_root.stage.ladders.hitTest(this._x + this.climb_pos, this._y + 20, true)) {
if ((((getTimer() / 1000) - this.last_climb_time) >= this.climb_delay) or (this.last_climb_time == 0)) {
if ((this._y < (_root.player._y - 10)) or ((_root.player._y + 10) < this._y)) {
this.climb_up = false;
this.no_other_ladders_exist = false;
this.on_ladder = true;
this._y = this._y + 2;
this.gotoAndStop("climb");
}
}
}
}
function climb() {
if (this.climb_up) {
if (_root.stage.ladders.hitTest(this._x, this._y + 10, true)) {
this._y = this._y - this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.attempt_climb = false;
this.last_climb_time = getTimer() / 1000;
this.gotoAndStop("fall_down");
}
} else if (_root.stage.ladders.hitTest(this._x, this._y + 20, true)) {
this._y = this._y + this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.attempt_climb = false;
this.last_climb_time = getTimer() / 1000;
this.on_ladder = false;
this.gotoAndStop("fall_down");
}
}
function been_hit(dir) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
if (this.hit_cnt < this.max_hits) {
this.hit_cnt = this.hit_cnt + 1;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
if (!this.on_ladder) {
this.gotoAndStop("hit_forward");
} else {
this.gotoAndStop("ladder_hit_back");
this.ladder_fall_back = true;
this.on_ladder_hit = true;
}
} else {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_back");
}
} else if (this.hit_cnt < this.max_hits) {
this.hit_cnt = this.hit_cnt + 1;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
if (!this.on_ladder) {
this.gotoAndStop("hit_back");
} else {
this.gotoAndStop("ladder_hit_forward");
this.on_ladder_hit = true;
this.ladder_fall_back = false;
}
} else {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_forward");
}
}
function finish_hit() {
if (this.hit_over) {
this.hit_over = false;
this.gotoAndStop("stand");
}
}
function finish_catch() {
if (this.catch_complete) {
this.catch_complete = false;
this.gotoAndStop("stand");
}
}
function waiting_to_catch() {
if ((_root.player.hitTest(this._x - 10, this._y, true) and (this._xscale == -100)) or (_root.player.hitTest(this._x + 10, this._y, true) and (this._xscale == 100))) {
if ((!_root.player.death_animation) and (!_root.player.not_vunerable)) {
if (_root.player.on_ground) {
this.gotoAndStop("catch");
}
}
}
}
function flash() {
if (this.not_vunerable) {
if (this.non_vulnerable_time >= ((getTimer() / 1000) - this.hit_time)) {
if (((getTimer() / 1000) - this.last_flash) >= this.flash_duration) {
if (this._visible) {
this._visible = false;
} else {
this._visible = true;
}
this.last_flash = getTimer() / 1000;
}
} else {
this.not_vunerable = false;
this._visible = true;
}
}
}
throwComplete = true;
deathComplete = false;
catch_complete = false;
jump_loaded = true;
fall_loaded = false;
running_mode = false;
idle_mode = false;
dir_is_left = false;
is_left_jump = false;
normal_throw = false;
ready_to_fall = false;
dying = false;
climb_up = false;
idle_time = 5;
begin_idle = 0;
was_idling = false;
stopped_idling = 0;
walkTime = random(100);
walkSpeed = 0.75;
runSpeed = 1.75;
jumpMoveSpeed = 1;
fallSpeed = 3;
jumpSpeed = 0.75;
jumpHeight = -10;
curr_jump_height = 0;
climbSpeed = 0.5;
max_jump_height = 0;
attempt_hang = false;
attempt_climb = false;
mky_hanging_on_level = false;
climb_delay = 1;
last_climb_time = 0;
checked_for_ladders = false;
climb_pos = 0;
not_vunerable = false;
on_ladder = false;
on_ladder_hit = false;
ladder_fall_back = false;
non_vulnerable_time = 4;
hit_time = 0;
flash_duration = 0.075;
last_flash = 0;
on_ground = false;
fall_die = false;
froze_monkey = false;
amtThrown = 0;
level = 0;
grabY = 0;
hit_cnt = 0;
max_hits = 2;
hit_over = false;
startThinking = getTimer() / 1000;
lastThought = 0;
thinkTime = 3;
delay_attempt = 1;
last_attempt = 0;
delay_throw = 1;
last_throw = 0;
trap_duration = 5;
last_trap_set = 0;
trap_num = 0;
num_of_traps = 2;
run_delay_set = false;
run_delay = 1;
saw_monkey = 0;
this.pick_a_direction(idNum);
this.gotoAndStop("fall_down");
Instance of Symbol 481 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 2
onClipEvent (enterFrame) {
_parent.wait_for_action();
_parent.flash();
}
Instance of Symbol 623 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 3
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_turn();
_parent.waiting_to_catch();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.set_trap();
_parent.flash();
}
Instance of Symbol 490 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 4
onClipEvent (enterFrame) {
_parent.fall_down();
_parent.flash();
}
Instance of Symbol 631 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 5
onClipEvent (enterFrame) {
_parent.climb();
_parent.flash();
}
Instance of Symbol 499 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 6
onClipEvent (enterFrame) {
_parent.get_up();
_parent.waiting_to_duck_throw();
}
Instance of Symbol 509 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 7
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 519 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 8
onClipEvent (enterFrame) {
_parent.if_duck_throw_ended();
}
Instance of Symbol 529 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 9
onClipEvent (enterFrame) {
_parent.if_up_throw_ended();
}
Instance of Symbol 647 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 10
onClipEvent (load) {
_parent.not_vunerable = false;
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 580 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 12
onClipEvent (enterFrame) {
_parent.finish_hit();
}
Instance of Symbol 702 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 14
onClipEvent (enterFrame) {
_parent.run();
_parent.waiting_to_turn();
_parent.waiting_to_catch();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.set_trap();
_parent.flash();
}
Instance of Symbol 716 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 15
onClipEvent (load) {
_parent.not_vunerable = false;
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.finish_catch();
}
Instance of Symbol 477 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 16
onClipEvent (enterFrame) {
_parent.flash();
}
Instance of Symbol 724 MovieClip in Symbol 725 MovieClip [enemy_htr] Frame 17
onClipEvent (enterFrame) {
_parent.fall_down();
}
Symbol 769 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 769 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 769 MovieClip Frame 27
_parent.throwComplete = true;
Symbol 778 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 778 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 778 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 778 MovieClip Frame 27
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 788 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 788 MovieClip Frame 5
if (_root.game_paused) {
stop();
}
Symbol 788 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 788 MovieClip Frame 11
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 788 MovieClip Frame 15
if (_root.game_paused) {
stop();
}
Symbol 788 MovieClip Frame 20
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 810 MovieClip Frame 1
_parent.dying = true;
Symbol 810 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 820 MovieClip Frame 1
_parent.dying = true;
Symbol 820 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 825 MovieClip Frame 15
_parent.ready_to_fall = true;
Symbol 831 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 831 MovieClip Frame 6
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 1, _parent._x, _parent._y, 1);
Symbol 831 MovieClip Frame 30
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
Symbol 839 MovieClip Frame 1
_parent.switch_climb_move(2);
Symbol 839 MovieClip Frame 8
_parent.switch_climb_move(3);
Symbol 839 MovieClip Frame 15
_parent.switch_climb_move(3);
Symbol 839 MovieClip Frame 21
_parent.gotoAndStop("middle_of_vine");
Symbol 846 MovieClip Frame 1
_parent.switch_climb_move(1);
Symbol 846 MovieClip Frame 8
_parent.switch_climb_move(1);
Symbol 846 MovieClip Frame 14
_parent.grabbed_vine = true;
Symbol 848 MovieClip Frame 1
_parent.switch_climb_move(4);
Symbol 848 MovieClip Frame 8
_parent.switch_climb_move(2);
Symbol 848 MovieClip Frame 14
_parent.grabbed_vine = true;
Symbol 854 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 854 MovieClip Frame 6
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 1, _parent._x, _parent._y);
Symbol 854 MovieClip Frame 30
_parent.throwComplete = true;
Symbol 870 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 870 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, true, 0, _parent._x, _parent._y, 1);
Symbol 870 MovieClip Frame 27
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
Symbol 871 MovieClip [shy_monkey_enemy] Frame 1
function boost() {
if (((getTimer() / 1000) - this.wait_for_boost) >= this.delay_boost) {
}
}
function evade() {
if (((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) {
if ((((getTimer() / 1000) - this.last_evasion) >= this.delay_evasion) or (this.last_evasion == 0)) {
if ((((this._xscale == 100) and (_root.player._xscale == -100)) and (this._x < _root.player._x)) or (((this._xscale == -100) and (_root.player._xscale == 100)) and (_root.player._x < this._x))) {
this.turn();
this.gotoAndStop("run");
}
this.last_evasion = getTimer() / 1000;
}
}
}
function wait_for_action() {
if ((((getTimer() / 1000) - this.begin_idle) >= this.idle_time) or (this.begin_idle == 0)) {
this.choose_action();
} else if (!this.was_idling) {
this.was_idling = true;
}
}
function choose_action() {
if (((_root.player._y - 50) >= this._y) or (this._y >= (_root.player._y + 50))) {
this.gotoAndStop("run");
this.running_mode = true;
this.normal_throw = true;
} else {
this.gotoAndStop("walk");
this.normal_throw = true;
}
}
function waiting_to_jump() {
if (((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) {
if (_root.stage.jump_l.hitTest(this._x, this._y, true) and (this._xscale == -100)) {
this.is_left_jump = true;
this.on_ground = false;
this.gotoAndStop("jump_up");
} else if (_root.stage.jump_r.hitTest(this._x, this._y, true) and (this._xscale == 100)) {
this.is_left_jump = false;
this.on_ground = false;
this.gotoAndStop("jump_up");
}
}
}
function jump_up() {
if (!this.jump_loaded) {
this.curr_jump_height = this.jumpHeight;
this.jump_loaded = true;
}
if (!_root.stage.branches.hitTest(this._x, this._y, true)) {
this._y = this._y + this.curr_jump_height;
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
if (this.attempt_climb and _root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this.climb_up = true;
this.gotoAndStop("climb");
this.adjust_xpos();
}
if (this.attempt_hang and _root.stage.branches.hitTest(this._x, this._y - 4, true)) {
this._y = this._y - 4;
this.gotoAndStop("hang");
this.grabY = this._y;
this.adjust_height();
this.only_way = false;
}
} else if (this.attempt_hang) {
this.gotoAndStop("hang");
this.grabY = this._y;
this.adjust_height();
this.only_way = false;
} else {
this.curr_jump_height = 0;
}
this.jumpUp = true;
if (this.curr_jump_height >= 0) {
this.gotoAndStop("fall_down");
}
if ((!this.attempt_hang) and (!this.attempt_climb)) {
this.move_in_air();
}
}
function waiting_to_hang() {
if (_root.stage.left_hang.hitTest(this._x, this._y, true) and (this._xscale == 100)) {
this.is_only_way();
if ((((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) or this.only_way) {
if (((getTimer() / 1000) - this.last_attempt) >= this.delay_attempt) {
this.attempt_hang = true;
this.gotoAndStop("jump_up");
}
this.last_attempt = getTimer() / 1000;
}
} else if (_root.stage.right_hang.hitTest(this._x, this._y, true) and (this._xscale == -100)) {
this.is_only_way();
if (((this._y - 5) >= _root.player._y) or this.only_way) {
if (((getTimer() / 1000) - this.last_attempt) >= this.delay_attempt) {
this.attempt_hang = true;
this.gotoAndStop("jump_up");
}
this.last_attempt = getTimer() / 1000;
}
}
}
function is_only_way() {
if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 32, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.only_way = true;
}
} else if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 32, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.only_way = true;
}
}
}
function adjust_height() {
i = 1;
while (i < 10) {
i++;
}
if (!_root.stage.branches.hitTest(this._x, this._y + i, true)) {
this._y = this._y + (i - 1);
}
}
function move_in_air() {
if (this._xscale == -100) {
this._x = this._x - this.jumpMoveSpeed;
} else {
this._x = this._x + this.jumpMoveSpeed;
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.jumpUp = false;
this.fall(this.curr_jump_height);
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this._y = this._y + valueY;
if (this.jump_loaded and this.stepped_move) {
this.move_in_air();
}
if (_root.stage.vines.hitTest(this._x, this._y + 16, true) and (!this.falling_from_vines)) {
this.climb_up = true;
this.gotoAndStop("climb");
this.adjust_xpos();
}
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 16, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 16, true)) {
this._y = this._y - i;
break;
}
i--;
}
this.running_mode = false;
this.idle_mode = false;
if (!this.dying) {
this.on_ground = true;
this.gotoAndStop("stand");
this.last_throw = 0;
}
this.stepped_on = false;
this.jump_loaded = false;
this.fall_loaded = false;
this.falling_from_vines = false;
if (!this.throwComplete) {
this.throwComplete = true;
}
}
}
function pick_a_direction(x) {
if ((x % 2) == 0) {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 10;
} else {
this._xscale = 100;
this._x = this._x + 10;
}
}
function walk() {
if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 8, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
this._x = 288;
}
} else {
this.turn();
}
} else if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 8, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
this._x = 2;
}
} else {
this.turn();
}
}
if (idle_mode) {
if (this.was_idling) {
this.stopped_idling = getTimer() / 1000;
this.was_idling = false;
this.walkTime = random(100);
} else if (this.walkTime < ((getTimer() / 1000) - this.stopped_idling)) {
this.begin_idle = getTimer() / 1000;
this.gotoAndStop("stand");
}
}
}
function run() {
if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 8, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
this._x = 288;
}
} else {
this.turn();
}
} else if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 8, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
this._x = 2;
}
} else {
this.turn();
}
}
}
function collide() {
i = 0;
while (i < _root.stage.background.amt_of_enemies_in_level) {
if ((_root["enemy" + i].hitTest(this._x, this._y, true) and (i != this.idNum)) and _root["enemy" + i].can_collide) {
if (((this._xscale == 100) and (_root["enemy" + i]._xscale == -100)) or ((this._xscale == -100) and (_root["enemy" + i]._xscale == 100))) {
if (!_root["enemy" + i].jump_loaded) {
this.turn();
_root["enemy" + i].turn();
}
}
}
i++;
}
}
function waiting_to_fall() {
if ((!_root.stage.branches.hitTest(this._x, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.find_ground(this.runSpeed);
if (((this._xscale == 100) and _root.stage.ground.hitTest(this._x - this.runSpeed, this._y + 16, true)) and this.no_ground) {
this.turn();
} else if (((this._xscale == -100) and _root.stage.ground.hitTest(this._x + this.runSpeed, this._y + 16, true)) and this.no_ground) {
this.turn();
} else {
this.find_ground(0);
if (this.no_ground or (!this.no_spikes)) {
this.turn();
} else {
this.gotoAndStop("fall_down");
}
}
}
}
function waiting_to_die() {
if (this.deathComplete) {
_root.score = _root.score + 100;
_root.sb.update_score();
this.removeMovieClip();
}
}
function begin_swing() {
this.gotoAndStop("swing");
}
function swing() {
if (_root.stage.branches.hitTest(this._x, this.grabY, true)) {
if (this._xscale == -100) {
if (!_root.stage.branches.hitTest(this._x - 16, this._y + 15, true)) {
if (this._x < 2) {
this._x = 288;
}
this._x = this._x - this.walkSpeed;
} else {
this.turn();
}
} else if (!_root.stage.branches.hitTest(this._x + 16, this._y + 15, true)) {
if (288 < this._x) {
this._x = 2;
}
this._x = this._x + this.walkSpeed;
} else {
this.turn();
}
} else {
this.attempt_hang = false;
this.gotoAndStop("fall_down");
}
this.hand_stepped_on();
}
function hand_stepped_on() {
if (_root.player.hitTest(this._x, this._y - 16, true) and _root.player.on_ground) {
_root.score = _root.score + 50;
_root.sb.update_score();
this.gotoAndStop("stepped_on");
} else {
x = 0;
while (x < _root.stage.amt_of_enemies_entered) {
if (_root["enemy" + x].hitTest(this._x, this._y - 16, true) and (this.idNum != x)) {
this.gotoAndStop("stepped_on");
}
x++;
}
}
}
function take_fall() {
if (this.ready_to_fall) {
this.attempt_hang = false;
this.ready_to_fall = false;
this.gotoAndStop("fall_down");
}
}
function waiting_to_normal_throw() {
if (this.normal_throw) {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) and (!_root.player.death_animation)) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
x = random(2);
if (x == 0) {
if (_root.player.is_ducking) {
this.gotoAndStop("duck_throw");
} else {
this.gotoAndStop("normal_throw");
}
}
}
this.last_throw = getTimer() / 1000;
}
}
}
}
function if_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function waiting_to_hang_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if (((_root.player._x >= (this._x - 15)) and ((this._x + 15) >= _root.player._x)) and (!_root.player.death_animation)) {
this.gotoAndStop("hang_throw");
}
this.last_throw = getTimer() / 1000;
}
}
function if_hang_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("hang");
}
}
function waiting_to_climb() {
if ((_root.player._y + 10) < this._y) {
if (_root.stage.vines.hitTest(this._x, this._y - 40, true)) {
this.climb_up = true;
this.climbing = true;
this.switching_vine = false;
this.last_climb_decision = getTimer() / 1000;
this.attempt_climb = true;
this.gotoAndStop("jump_up");
}
}
}
function waiting_to_climb_down() {
if (this._y < (_root.player._y - 10)) {
if (_root.stage.vines.hitTest(this._x, this._y + 20, true)) {
this.climb_up = false;
this.climbing = true;
this.switching_vine = false;
this.last_climb_decision = getTimer() / 1000;
this._y = this._y + 2;
this.gotoAndStop("climb");
this.adjust_xpos();
}
}
}
function decide_move() {
if (((getTimer() / 1000) - this.last_vert_decision) >= this.delay_vert_decision) {
if ((this._y < (_root.player._y - 20)) and (!this.no_ground)) {
this.climb_up = false;
} else if ((_root.player._y + 20) < this._y) {
this.climb_up = true;
}
this.last_vert_decision = getTimer() / 1000;
}
}
function vine_turn() {
if (((getTimer() / 1000) - this.last_turn) >= this.delay_turn) {
if ((_root.player._x < this._x) and (this._xscale == 100)) {
this._xscale = -100;
} else if ((this._x < _root.player._x) and (this._xscale == -100)) {
this._xscale = 100;
}
this.last_turn = getTimer() / 1000;
}
}
function find_ground(dist) {
this.no_ground = true;
this.no_spikes = true;
j = this._x;
if (this._xscale == 100) {
this.j = this.j + dist;
} else {
this.j = this.j - dist;
}
i = this._y;
while (i < 230) {
if (_root.stage.ground.hitTest(this.j, i, true) or _root.stage.branches.hitTest(this.j, i, true)) {
this.no_ground = false;
this.course_detected = true;
if (_root.stage.spikes.hitTest(this.j, i - 5, true)) {
this.no_spikes = false;
}
break;
}
i++;
}
this.course_detected = true;
}
function switch_vine() {
if ((this._x < _root.player._x) and _root.stage.vines.hitTest(this._x + 32, this._y + 16, true)) {
this._xscale = -100;
this.switching_vine = true;
this.gotoAndStop("switch_vine");
} else if ((_root.player._x < this._x) and _root.stage.vines.hitTest(this._x - 32, this._y + 16, true)) {
this._xscale = 100;
this.switching_vine = true;
this.gotoAndStop("switch_vine");
}
}
function climb() {
this.vine_turn();
this.decide_move();
if (this.climb_up) {
if (_root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this._y = this._y - this.climbSpeed;
this.gotoAndStop("climb");
if (_root.stage.branches.hitTest(this._x, this._y - 10, true)) {
this.switch_vine();
}
} else {
this.attempt_climb = false;
this.falling_from_vines = true;
this.climbing = false;
this.gotoAndStop("fall_down");
this.switch_vine();
}
} else if (_root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this._y = this._y + this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.find_ground(20);
if (!this.no_ground) {
this.attempt_climb = false;
this.falling_from_vines = true;
this.climbing = false;
this.jump_loaded = true;
this.gotoAndStop("fall_down");
} else {
this.climb_up = true;
this._y = this._y - this.climbSpeed;
}
}
}
function been_hit(dir) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
this.jump_loaded = false;
this.gotoAndStop("fall_back");
} else if (((dir == -100) and (this._xscale == -100)) or ((dir == 100) and (this._xscale == 100))) {
this.jump_loaded = false;
this.gotoAndStop("fall_forward");
}
this.falling_from_vines = true;
}
function been_warned(dir) {
if (((getTimer() / 1000) - this.last_warning) >= this.delay_warning) {
this.last_warning = getTimer() / 1000;
x = random(3);
if (x == 0) {
if ((((!this.climbing) and (!this.jump_loaded)) and (!this.fall_loaded)) and (!this.attempt_hang)) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
this.last_duck = getTimer() / 1000;
this.gotoAndStop("duck");
}
}
}
}
}
function wait_to_get_up() {
if (((getTimer() / 1000) - this.last_duck) >= this.delay_duck) {
this.gotoAndStop("stand");
}
}
function choose_vine() {
if (((_root.player._x < (this._x - 16)) and (this._xscale == -100)) or (((this._x + 16) < _root.player._x) and (this._xscale == 100))) {
this.no_other_monkey_x(0);
if (this.no_other_monkey) {
this.go_back = true;
this.gotoAndStop("switch_vine_b");
this.no_other_monkey = false;
}
} else if (((_root.player._x < (this._x - 16)) and (this._xscale == 100)) or (((this._x + 16) < _root.player._x) and (this._xscale == -100))) {
this.no_other_monkey_x(1);
if (this.no_other_monkey) {
this.gotoAndStop("switch_vine_a");
this.no_other_monkey = false;
}
}
}
function no_other_monkey_x(dir) {
if (dir == 0) {
if ((((this._x - 64) < _root.player._x) and (this._xscale == -100)) or ((_root.player._x < (this._x + 64)) and (this._xscale == 100))) {
if ((_root.player._y >= (this._y - 10)) and ((this._y + 10) >= _root.player._y)) {
this.no_other_monkey = false;
} else {
this.no_other_monkey = true;
}
} else {
this.no_other_monkey = true;
}
} else if ((((this._x - 64) < _root.player._x) and (this._xscale == 100)) or ((_root.player._x < (this._x + 64)) and (this._xscale == -100))) {
if ((_root.player._y >= (this._y - 10)) and ((this._y + 10) >= _root.player._y)) {
this.no_other_monkey = false;
} else {
this.no_other_monkey = true;
}
} else {
this.no_other_monkey = true;
}
}
function player_at_same_y() {
if (((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
}
}
}
function switch_climb_move(num) {
if (this._xscale == 100) {
if (!this.go_back) {
this._x = this._x - num;
} else {
this._x = this._x + num;
}
} else if (!this.go_back) {
this._x = this._x + num;
} else {
this._x = this._x - num;
}
}
function grab_vine() {
if (this.grabbed_vine) {
if (this._xscale == 100) {
if (!this.go_back) {
this._xscale = -100;
this._x = this._x - 22;
} else {
this._x = this._x + 2;
this.go_back = false;
}
} else if (!this.go_back) {
this._xscale = 100;
this._x = this._x + 22;
} else {
this._x = this._x - 2;
this.go_back = false;
}
if ((this._y < (_root.player._y - 20)) and (!this.no_ground)) {
if ((this._xscale == 100) and (!_root.stage.vines.hitTest(this._x + 32, this._y + 16, true))) {
this.climb_up = false;
} else if ((this._xscale == -100) and (!_root.stage.vines.hitTest(this._x - 32, this._y + 16, true))) {
this.climb_up = false;
}
}
this.gotoAndStop("climb");
this.adjust_xpos();
this.grabbed_vine = false;
}
}
function s_climb() {
if ((_root.player._y < (this._y - 16)) or ((this._y + 16) < _root.player._y)) {
if ((_root.player._x < (this._x - 8)) or ((this._x + 8) < _root.player._x)) {
this.gotoAndStop("switch_vine_climb");
} else {
this.gotoAndStop("sv_throw");
}
}
}
function sv_move() {
i = this._x;
j = this._x;
if (this._xscale == 100) {
i = i + 8;
j = j - 24;
} else {
i = i - 8;
j = j + 24;
}
if (_root.player._y < (this._y - 16)) {
if ((!_root.stage.vines.hitTest(i, this._y, true)) or (!_root.stage.vines.hitTest(j, this._y, true))) {
this.falling_from_vine = true;
this.gotoAndStop("fall_down");
} else {
this._y = this._y - this.climbSpeed;
}
} else if ((this._y + 16) < _root.player._y) {
if ((!_root.stage.vines.hitTest(i, this._y, true)) or (!_root.stage.vines.hitTest(j, this._y, true))) {
this.falling_from_vine = true;
this.gotoAndStop("fall_down");
} else {
this._y = this._y + this.climbSpeed;
}
} else {
this.gotoAndStop("middle_of_vine");
}
}
function if_sv_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("middle_of_vine");
}
}
function if_duck_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function adjust_xpos() {
i = 4;
while (i >= 1) {
if (_root.stage.vines.hitTest(this._x - i, this._y + 16, true)) {
this._x = this._x - i;
return;
}
i--;
}
}
throwComplete = true;
deathComplete = false;
jumpingUp = true;
jump_loaded = false;
fall_loaded = false;
falling_from_vines = false;
running_mode = false;
idle_mode = false;
dir_is_left = false;
is_left_jump = false;
normal_throw = false;
ready_to_fall = false;
dying = false;
climb_up = false;
climbing = false;
idle_time = 5;
begin_idle = 0;
was_idling = false;
stopped_idling = 0;
walkTime = random(100);
walkSpeed = 0.6;
runSpeed = 1.25;
jumpMoveSpeed = 1;
fallSpeed = 2.5;
jumpSpeed = 0.75;
jumpHeight = -10;
curr_jump_height = 0;
climbSpeed = 0.5;
max_jump_height = 0;
attempt_hang = false;
attempt_climb = false;
mky_hanging_on_level = false;
go_back = false;
grabbed_vine = false;
only_way = false;
no_other_monkey = false;
stepped_on = false;
not_vunerable = false;
amtThrown = 0;
level = 0;
grabY = 0;
can_collide = true;
startThinking = getTimer() / 1000;
lastThought = 0;
thinkTime = 3;
delay_attempt = 1;
last_attempt = 0;
delay_throw = 1;
last_throw = 0;
delay_duck = 0.75;
last_duck = 0;
delay_warning = 1;
last_warning = 0;
delay_boost = 10;
wait_for_boost = getTimer() / 1000;
delay_evasion = 2;
last_evasion = 0;
delay_vert_decision = 3;
last_vert_decision = 0;
delay_horz_decision = 1;
last_horz_decision = 0;
switching_vine = false;
no_ground = false;
no_spikes = true;
this.on_ground = false;
this.pick_a_direction(this.idNum);
this.gotoAndStop("fall_down");
Instance of Symbol 733 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 2
onClipEvent (enterFrame) {
_parent.wait_for_action();
}
Instance of Symbol 734 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 3
onClipEvent (enterFrame) {
_parent.evade();
_parent.walk();
_parent.waiting_to_fall();
_parent.waiting_to_jump();
_parent.collide();
_parent.waiting_to_hang();
_parent.waiting_to_normal_throw();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.boost();
}
Instance of Symbol 724 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 4
onClipEvent (enterFrame) {
_parent.fall_down();
}
Instance of Symbol 737 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 5
onClipEvent (enterFrame) {
_parent.jump_up();
}
Instance of Symbol 743 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 6
onClipEvent (enterFrame) {
_parent.boost();
_parent.climb();
_parent.waiting_to_throw_on_vine();
}
Instance of Symbol 744 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 7
onClipEvent (enterFrame) {
_parent.climb();
_parent.waiting_to_throw_on_vine();
}
Instance of Symbol 747 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 8
onClipEvent (enterFrame) {
_parent.wait_to_get_up();
}
Instance of Symbol 759 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 9
onClipEvent (enterFrame) {
_parent.swing();
_parent.waiting_to_hang_throw();
}
Instance of Symbol 760 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 10
onClipEvent (enterFrame) {
_parent.begin_swing();
_parent.waiting_to_hang_throw();
}
Instance of Symbol 509 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 11
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 779 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 12
onClipEvent (enterFrame) {
_parent.if_vine_throw_ended();
}
Instance of Symbol 789 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 14
onClipEvent (enterFrame) {
_parent.fall_down();
_parent.if_jump_throw_ended();
}
Instance of Symbol 801 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 15
onClipEvent (enterFrame) {
_parent.evade();
_parent.run();
_parent.waiting_to_fall();
_parent.waiting_to_jump();
_parent.collide();
_parent.waiting_to_hang();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.waiting_to_normal_throw();
_parent.boost();
}
Instance of Symbol 529 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 16
onClipEvent (enterFrame) {
_parent.if_up_throw_ended();
}
Instance of Symbol 811 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 17
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 826 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 19
onClipEvent (enterFrame) {
_parent.stepped_on = true;
_parent.fall_down();
}
Instance of Symbol 832 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 20
onClipEvent (enterFrame) {
_parent.if_hang_throw_ended();
}
Instance of Symbol 840 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 21
onClipEvent (enterFrame) {
}
Instance of Symbol 841 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 22
onClipEvent (enterFrame) {
_parent.choose_vine();
_parent.s_climb();
}
Instance of Symbol 847 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 23
onClipEvent (enterFrame) {
_parent.grab_vine();
}
Instance of Symbol 849 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 24
onClipEvent (enterFrame) {
_parent.grab_vine();
}
Instance of Symbol 855 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 25
onClipEvent (enterFrame) {
_parent.if_sv_throw_ended();
}
Instance of Symbol 861 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 26
onClipEvent (enterFrame) {
_parent.sv_move();
_parent.waiting_to_sv_throw();
}
Instance of Symbol 519 MovieClip in Symbol 871 MovieClip [shy_monkey_enemy] Frame 27
onClipEvent (enterFrame) {
_parent.if_duck_throw_ended();
}
Symbol 908 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 908 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 908 MovieClip Frame 27
_parent.throwComplete = true;
Symbol 917 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 917 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 917 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 917 MovieClip Frame 27
_parent.throwComplete = true;
Symbol 938 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 938 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 2, _parent._x, _parent._y, 1);
Symbol 938 MovieClip Frame 27
_parent.ThrowComplete = true;
Symbol 947 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
Symbol 947 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 956 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
Symbol 956 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 961 MovieClip Frame 15
_parent.ready_to_fall = true;
Symbol 966 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 966 MovieClip Frame 6
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 1, _parent._x, _parent._y, 1);
Symbol 966 MovieClip Frame 30
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
Symbol 973 MovieClip Frame 1
_parent.switch_climb_move(2);
Symbol 973 MovieClip Frame 8
_parent.switch_climb_move(3);
Symbol 973 MovieClip Frame 15
_parent.switch_climb_move(3);
Symbol 973 MovieClip Frame 21
_parent.gotoAndStop("middle_of_vine");
Symbol 978 MovieClip Frame 1
_parent.switch_climb_move(1);
Symbol 978 MovieClip Frame 8
_parent.switch_climb_move(1);
Symbol 978 MovieClip Frame 14
_parent.grabbed_vine = true;
Symbol 979 MovieClip Frame 1
_parent.switch_climb_move(4);
Symbol 979 MovieClip Frame 8
_parent.switch_climb_move(2);
Symbol 979 MovieClip Frame 14
_parent.grabbed_vine = true;
Symbol 984 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 984 MovieClip Frame 6
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 1, _parent._x, _parent._y, 1);
Symbol 984 MovieClip Frame 30
_parent.throwComplete = true;
_parent.last_throw = getTimer() / 1000;
Symbol 998 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 998 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, true, 0, _parent._x, _parent._y, 1);
Symbol 998 MovieClip Frame 27
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
Symbol 1005 MovieClip Frame 1
_parent.death_animation = true;
_root.attach_points(_parent.idNum, 100, _parent._xscale);
Symbol 1025 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1025 MovieClip Frame 90
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 1027 MovieClip [random_monkey_enemy] Frame 1
function boost() {
if (((getTimer() / 1000) - this.wait_for_boost) >= this.delay_boost) {
this.delay_throw = 0.75;
}
}
function wait_for_action() {
if ((((getTimer() / 1000) - this.begin_idle) >= this.idle_time) or (this.begin_idle == 0)) {
this.choose_action();
} else if (!this.was_idling) {
this.was_idling = true;
}
}
function choose_action() {
x = random(2);
if (x == 0) {
this.gotoAndStop("run");
this.running_mode = true;
this.normal_throw = true;
} else {
this.gotoAndStop("walk");
this.normal_throw = true;
}
}
function waiting_to_jump() {
x = random(2);
if (_root.stage.jump_l.hitTest(this._x, this._y, true) and (this._xscale == -100)) {
if ((((getTimer() / 1000) - this.last_jump) >= this.delay_jump) or (this.last_jump == 0)) {
if (x == 0) {
this.is_left_jump = true;
this.on_ground = false;
this.gotoAndStop("jump_up");
}
this.last_jump = getTimer() / 1000;
}
} else if (_root.stage.jump_r.hitTest(this._x, this._y, true) and (this._xscale == 100)) {
if ((((getTimer() / 1000) - this.last_jump) >= this.delay_jump) or (this.last_jump == 0)) {
if (x == 0) {
this.is_left_jump = false;
this.on_ground = false;
this.gotoAndStop("jump_up");
}
this.last_jump = getTimer() / 1000;
}
}
}
function jump_up() {
if (!this.jump_loaded) {
this.curr_jump_height = this.jumpHeight;
this.jump_loaded = true;
}
if (!_root.stage.branches.hitTest(this._x, this._y, true)) {
this._y = this._y + this.curr_jump_height;
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
if (this.attempt_climb and _root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this.climb_up = true;
this.gotoAndStop("climb");
this.adjust_xpos();
}
if (this.attempt_hang and _root.stage.branches.hitTest(this._x, this._y - 4, true)) {
this._y = this._y - 4;
this.gotoAndStop("hang");
this.grabY = this._y;
this.adjust_height();
this.only_way = false;
}
} else if (this.attempt_hang) {
this.gotoAndStop("hang");
this.grabY = this._y;
this.adjust_height();
this.only_way = false;
} else {
this.curr_jump_height = 0;
}
this.jumpUp = true;
if (this.curr_jump_height >= 0) {
this.gotoAndStop("fall_down");
}
if ((!this.attempt_hang) and (!this.attempt_climb)) {
this.move_in_air();
}
}
function waiting_to_hang() {
if (_root.stage.left_hang.hitTest(this._x, this._y, true) and (this._xscale == 100)) {
x = random(2);
this.is_only_way();
if ((x == 0) or this.only_way) {
if (((getTimer() / 1000) - this.last_attempt) >= this.delay_attempt) {
this.attempt_hang = true;
this.gotoAndStop("jump_up");
}
this.last_attempt = getTimer() / 1000;
}
} else if (_root.stage.right_hang.hitTest(this._x, this._y, true) and (this._xscale == -100)) {
x = random(2);
this.is_only_way();
if ((x == 0) or this.only_way) {
if (((getTimer() / 1000) - this.last_attempt) >= this.delay_attempt) {
this.attempt_hang = true;
this.gotoAndStop("jump_up");
}
this.last_attempt = getTimer() / 1000;
}
}
}
function is_only_way() {
if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 32, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.only_way = true;
}
} else if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 32, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.only_way = true;
}
}
}
function adjust_height() {
i = 1;
while (i < 10) {
i++;
}
if (!_root.stage.branches.hitTest(this._x, this._y + i, true)) {
this._y = this._y + (i - 1);
}
}
function move_in_air() {
if (((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 16, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y + 16, true))) {
if (this._x < 2) {
this._x = 288;
} else {
this._x = this._x - this.jumpMoveSpeed;
}
} else if (((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 16, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y + 16, true))) {
if (288 < this._x) {
this._x = 2;
} else {
this._x = this._x + this.jumpMoveSpeed;
}
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.jumpUp = false;
this.fall(this.curr_jump_height);
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this._y = this._y + valueY;
if (500 < this._y) {
this.fall_die = true;
this.deathComplete = true;
this.waiting_to_die();
}
if (_root.stage.spikes.hitTest(this._x, this._y + 16, true)) {
this.gotoAndStop("hit_spikes");
}
if (_root.stage.pool.hitTest(this._x, this._y + 17, true)) {
this.gotoAndStop("drown");
}
if (this.jump_loaded and (!this.stepped_on)) {
this.move_in_air();
}
if (_root.stage.vines.hitTest(this._x, this._y + 16, true) and (!this.falling_from_vines)) {
this.climb_up = true;
this.gotoAndStop("climb");
this.adjust_xpos();
}
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 16, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 16, true)) {
this._y = this._y - i;
break;
}
i--;
}
this.running_mode = false;
this.idle_mode = false;
if (!this.dying) {
this.on_ground = true;
this.gotoAndStop("stand");
this.last_throw = 0;
}
this.jump_loaded = false;
this.fall_loaded = false;
this.stepped_on = false;
this.falling_from_vines = false;
if (!this.throwComplete) {
this.throwComplete = true;
}
}
}
function pick_a_direction(x) {
if ((x % 2) == 0) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 10;
} else {
this._xscale = 100;
this._x = this._x + 10;
}
}
function walk() {
if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 8, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(288, this._y, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else {
this.turn();
}
} else if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 8, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(2, this._y, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
}
if (idle_mode) {
if (this.was_idling) {
this.stopped_idling = getTimer() / 1000;
this.was_idling = false;
this.walkTime = random(100);
} else if (this.walkTime < ((getTimer() / 1000) - this.stopped_idling)) {
this.begin_idle = getTimer() / 1000;
this.gotoAndStop("stand");
}
}
}
function run() {
if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 8, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(288, this._y, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else {
this.turn();
}
} else if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 8, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(2, this._y, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
}
}
function collide() {
}
function waiting_to_fall() {
if ((!_root.stage.branches.hitTest(this._x, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.find_ground(this.runSpeed);
if (((this._xscale == 100) and _root.stage.ground.hitTest(this._x - this.runSpeed, this._y + 16, true)) and this.no_ground) {
this.turn();
} else if (((this._xscale == -100) and _root.stage.ground.hitTest(this._x + this.runSpeed, this._y + 16, true)) and this.no_ground) {
this.turn();
} else {
this.find_ground(0);
if (this.no_ground or (!this.no_spikes)) {
this.turn();
} else {
this.gotoAndStop("fall_down");
}
}
}
}
function waiting_to_die() {
if (this.deathComplete) {
if (!this.fall_die) {
_root.score = _root.score + 100;
_root.sb.update_score();
}
_root.stage.clean_up(this.idNum, this._x, this._y, this._height / 2, this._width / 2, this._xscale);
}
}
function begin_swing() {
this.gotoAndStop("swing");
}
function swing() {
if (_root.stage.branches.hitTest(this._x, this.grabY, true)) {
if (this._xscale == -100) {
if (!_root.stage.branches.hitTest(this._x - 16, this._y + 15, true)) {
if (this._x < 2) {
this._x = 288;
}
this._x = this._x - this.walkSpeed;
} else {
this.turn();
}
} else if (!_root.stage.branches.hitTest(this._x + 16, this._y + 15, true)) {
if (288 < this._x) {
this._x = 2;
}
this._x = this._x + this.walkSpeed;
} else {
this.turn();
}
} else {
this.attempt_hang = false;
this.gotoAndStop("fall_down");
}
this.hand_stepped_on();
}
function hand_stepped_on() {
if (_root.player.hitTest(this._x, this._y - 16, true) and _root.player.on_ground) {
_root.attach_points(this.idNum, 50, this._x, this._y);
this.gotoAndStop("stepped_on");
_root.score = _root.score + 50;
_root.sb.update_score();
} else {
x = 0;
while (x < _root.stage.amt_of_enemies_entered) {
if (_root["enemy" + x].hitTest(this._x, this._y - 16, true) and (this.idNum != x)) {
this.gotoAndStop("stepped_on");
}
x++;
}
}
}
function take_fall() {
if (this.ready_to_fall) {
this.attempt_hang = false;
this.ready_to_fall = false;
this.gotoAndStop("fall_down");
}
}
function waiting_to_normal_throw() {
if (this.normal_throw) {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) and (!_root.player.death_animation)) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
x = random(2);
if (x == 0) {
if (_root.player.is_ducking) {
this.gotoAndStop("duck_throw");
} else {
this.gotoAndStop("normal_throw");
}
}
}
this.last_throw = getTimer() / 1000;
}
}
}
}
function waiting_to_up_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((_root.player._y < (this._y - 20)) and (((_root.player._x >= (this._x - 10)) and ((this._x + 10) >= _root.player._x)) and (!_root.player.death_animation))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("up_throw");
}
this.last_throw = getTimer() / 1000;
}
}
}
function waiting_to_throw_on_vine() {
if (this.normal_throw) {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((((this._y + 20) >= _root.player._y) and (_root.player._y >= (this._y - 20))) and (!_root.player.death_animation)) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("vine_throw");
}
}
this.last_throw = getTimer() / 1000;
}
}
}
}
function if_vine_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("climb");
}
}
function if_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function if_sv_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("middle_of_vine");
}
}
function waiting_to_hang_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if (((_root.player._x >= (this._x - 15)) and ((this._x + 15) >= _root.player._x)) and (!_root.player.death_animation)) {
this.gotoAndStop("hang_throw");
}
this.last_throw = getTimer() / 1000;
}
}
function if_hang_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("hang");
}
}
function waiting_to_climb() {
if ((_root.player._y + 10) < this._y) {
if (_root.stage.vines.hitTest(this._x, this._y - 40, true)) {
this.climb_up = true;
this.climbing = true;
this.switching_vine = false;
this.last_climb_decision = getTimer() / 1000;
this.attempt_climb = true;
this.gotoAndStop("jump_up");
}
}
}
function waiting_to_climb_down() {
if (this._y < (_root.player._y - 10)) {
if (_root.stage.vines.hitTest(this._x, this._y + 20, true)) {
this.climb_up = false;
this.climbing = true;
this.switching_vine = false;
this.last_climb_decision = getTimer() / 1000;
this._y = this._y + 2;
this.gotoAndStop("climb");
this.adjust_xpos();
}
}
}
function decide_move() {
if (((getTimer() / 1000) - this.last_vert_decision) >= this.delay_vert_decision) {
if ((this._y < (_root.player._y - 20)) and (!this.no_ground)) {
this.climb_up = false;
} else if ((_root.player._y + 20) < this._y) {
this.climb_up = true;
}
this.last_vert_decision = getTimer() / 1000;
}
}
function vine_turn() {
if (((getTimer() / 1000) - this.last_turn) >= this.delay_turn) {
if ((_root.player._x < this._x) and (this._xscale == 100)) {
this._xscale = -100;
} else if ((this._x < _root.player._x) and (this._xscale == -100)) {
this._xscale = 100;
}
this.last_turn = getTimer() / 1000;
}
}
function find_ground(dist) {
this.no_ground = true;
this.no_spikes = true;
j = this._x;
if (this._xscale == 100) {
this.j = this.j + dist;
} else {
this.j = this.j - dist;
}
i = this._y;
while (i < 230) {
if (_root.stage.ground.hitTest(this.j, i, true) or _root.stage.branches.hitTest(this.j, i, true)) {
this.no_ground = false;
this.course_detected = true;
if (_root.stage.spikes.hitTest(this.j, i - 5, true)) {
this.no_spikes = false;
}
break;
}
i++;
}
this.course_detected = true;
}
function switch_vine() {
if ((this._x < _root.player._x) and _root.stage.vines.hitTest(this._x + 32, this._y + 16, true)) {
this._xscale = -100;
this.switching_vine = true;
this.gotoAndStop("switch_vine");
} else if ((_root.player._x < this._x) and _root.stage.vines.hitTest(this._x - 32, this._y + 16, true)) {
this._xscale = 100;
this.switching_vine = true;
this.gotoAndStop("switch_vine");
}
}
function climb() {
this.vine_turn();
this.decide_move();
if (this.climb_up) {
if (_root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this._y = this._y - this.climbSpeed;
this.gotoAndStop("climb");
if (_root.stage.branches.hitTest(this._x, this._y - 10, true)) {
this.switch_vine();
}
} else {
this.attempt_climb = false;
this.falling_from_vines = true;
this.climbing = false;
this.gotoAndStop("fall_down");
this.switch_vine();
}
} else if (_root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this._y = this._y + this.climbSpeed;
this.gotoAndStop("climb");
if (_root.stage.branches.hitTest(this._x, this._y - 10, true)) {
this.switch_vine();
}
} else {
this.find_ground(20);
if ((!this.no_ground) and this.no_spikes) {
this.attempt_climb = false;
this.falling_from_vines = true;
this.climbing = false;
this.jump_loaded = true;
this.last_climb = getTimer() / 1000;
this.gotoAndStop("fall_down");
} else {
this.climb_up = true;
this._y = this._y - this.climbSpeed;
}
}
}
function been_hit(dir) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
this.jump_loaded = false;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_back");
} else if (((dir == -100) and (this._xscale == -100)) or ((dir == 100) and (this._xscale == 100))) {
this.jump_loaded = false;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_forward");
}
this.falling_from_vines = true;
}
function been_warned(dir) {
if ((((getTimer() / 1000) - this.last_warning) >= this.delay_warning) and (!this.dying)) {
this.last_warning = getTimer() / 1000;
x = random(3);
if (x == 0) {
if ((((!this.climbing) and (!this.jump_loaded)) and (!this.fall_loaded)) and (!this.attempt_hang)) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
this.last_duck = getTimer() / 1000;
this.gotoAndStop("duck");
}
}
}
}
}
function wait_to_get_up() {
if (((getTimer() / 1000) - this.last_duck) >= this.delay_duck) {
this.gotoAndStop("stand");
}
}
function choose_vine() {
if (((_root.player._x < (this._x - 16)) and (this._xscale == -100)) or (((this._x + 16) < _root.player._x) and (this._xscale == 100))) {
this.no_other_monkey_x(0);
if (this.no_other_monkey) {
this.go_back = true;
this.gotoAndStop("switch_vine_b");
this.no_other_monkey = false;
}
} else if (((_root.player._x < (this._x - 16)) and (this._xscale == 100)) or (((this._x + 16) < _root.player._x) and (this._xscale == -100))) {
this.no_other_monkey_x(1);
if (this.no_other_monkey) {
this.gotoAndStop("switch_vine_a");
this.no_other_monkey = false;
}
}
}
function no_other_monkey_x(dir) {
if (dir == 0) {
if ((((this._x - 64) < _root.player._x) and (this._xscale == -100)) or ((_root.player._x < (this._x + 64)) and (this._xscale == 100))) {
if ((_root.player._y >= (this._y - 10)) and ((this._y + 10) >= _root.player._y)) {
this.no_other_monkey = false;
} else {
this.no_other_monkey = true;
}
} else {
this.no_other_monkey = true;
}
} else if ((((this._x - 64) < _root.player._x) and (this._xscale == 100)) or ((_root.player._x < (this._x + 64)) and (this._xscale == -100))) {
if ((_root.player._y >= (this._y - 10)) and ((this._y + 10) >= _root.player._y)) {
this.no_other_monkey = false;
} else {
this.no_other_monkey = true;
}
} else {
this.no_other_monkey = true;
}
}
function player_at_same_y() {
if (((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
}
}
}
function switch_climb_move(num) {
if (this._xscale == 100) {
if (!this.go_back) {
this._x = this._x - num;
} else {
this._x = this._x + num;
}
} else if (!this.go_back) {
this._x = this._x + num;
} else {
this._x = this._x - num;
}
}
function grab_vine() {
if (this.grabbed_vine) {
if (this._xscale == 100) {
if (!this.go_back) {
this._xscale = -100;
this._x = this._x - 22;
} else {
this._x = this._x + 2;
this.go_back = false;
}
} else if (!this.go_back) {
this._xscale = 100;
this._x = this._x + 22;
} else {
this._x = this._x - 2;
this.go_back = false;
}
if ((this._y < (_root.player._y - 20)) and (!this.no_ground)) {
if ((this._xscale == 100) and (!_root.stage.vines.hitTest(this._x + 32, this._y + 16, true))) {
this.climb_up = false;
} else if ((this._xscale == -100) and (!_root.stage.vines.hitTest(this._x - 32, this._y + 16, true))) {
this.climb_up = false;
}
}
this.gotoAndStop("climb");
this.adjust_xpos();
this.grabbed_vine = false;
}
}
function s_climb() {
if ((_root.player._y < (this._y - 16)) or ((this._y + 16) < _root.player._y)) {
if ((_root.player._x < (this._x - 8)) or ((this._x + 8) < _root.player._x)) {
this.gotoAndStop("switch_vine_climb");
} else if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
this.gotoAndStop("sv_throw");
}
}
}
function sv_move() {
i = this._x;
j = this._x;
if (this._xscale == 100) {
i = i + 8;
j = j - 24;
} else {
i = i - 8;
j = j + 24;
}
if (_root.player._y < (this._y - 16)) {
if ((!_root.stage.vines.hitTest(i, this._y, true)) or (!_root.stage.vines.hitTest(j, this._y, true))) {
this.falling_from_vine = true;
this.gotoAndStop("fall_down");
} else {
this._y = this._y - this.climbSpeed;
}
} else if ((this._y + 16) < _root.player._y) {
if ((!_root.stage.vines.hitTest(i, this._y, true)) or (!_root.stage.vines.hitTest(j, this._y, true))) {
this.falling_from_vine = true;
this.gotoAndStop("fall_down");
} else {
this._y = this._y + this.climbSpeed;
}
} else {
this.gotoAndStop("middle_of_vine");
}
}
function if_duck_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function adjust_xpos() {
i = 4;
while (i >= 1) {
if (_root.stage.vines.hitTest(this._x - i, this._y + 16, true)) {
this._x = this._x - i;
return;
}
i--;
}
}
function land_on_spikes() {
if (!this.spike_hit_loaded) {
this.curr_jump_height = -6;
this.spike_hit_loaded = true;
}
this._y = this._y + this.curr_jump_height;
this.curr_jump_height = this.curr_jump_height + 0.3;
if (232 < this._y) {
_root.stage.enemy_defeated();
_root.score = _root.score + 100;
_root.sb.update_score();
this.removeMovieClip();
}
}
throwComplete = true;
deathComplete = false;
jumpingUp = true;
jump_loaded = false;
fall_loaded = false;
falling_from_vines = false;
running_mode = false;
idle_mode = false;
dir_is_left = false;
is_left_jump = false;
normal_throw = false;
ready_to_fall = false;
dying = false;
climb_up = false;
climbing = false;
idle_time = 5;
begin_idle = 0;
was_idling = false;
stopped_idling = 0;
walkTime = random(100);
walkSpeed = 0.6;
runSpeed = 1.25;
jumpMoveSpeed = 1;
fallSpeed = 2.5;
jumpSpeed = 0.75;
jumpHeight = -10;
curr_jump_height = 0;
climbSpeed = 0.5;
max_jump_height = 0;
attempt_hang = false;
attempt_climb = false;
mky_hanging_on_level = false;
go_back = false;
grabbed_vine = false;
only_way = false;
no_other_monkey = false;
stepped_on = false;
not_vunerable = false;
spike_hit_loaded = false;
on_ground = false;
amtThrown = 0;
level = 0;
grabY = 0;
can_collide = true;
fall_die = false;
startThinking = getTimer() / 1000;
lastThought = 0;
thinkTime = 3;
delay_attempt = 1;
last_attempt = 0;
delay_throw = 1;
last_throw = 0;
delay_duck = 0.75;
last_duck = 0;
delay_warning = 1;
last_warning = 0;
delay_boost = 10;
wait_for_boost = getTimer() / 1000;
delay_jump = 2;
last_jump = 0;
delay_vert_decision = 3;
last_vert_decision = 0;
delay_horz_decision = 1;
last_horz_decision = 0;
switching_vine = false;
no_ground = false;
no_spikes = true;
spike_hit_loaded = false;
this.pick_a_direction(this.idNum);
this.gotoAndStop("fall_down");
Instance of Symbol 733 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 2
onClipEvent (enterFrame) {
_parent.wait_for_action();
}
Instance of Symbol 879 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 3
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_fall();
_parent.waiting_to_jump();
_parent.collide();
_parent.waiting_to_hang();
_parent.waiting_to_normal_throw();
_parent.waiting_to_up_throw();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.boost();
}
Instance of Symbol 724 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 4
onClipEvent (enterFrame) {
_parent.fall_down();
}
Instance of Symbol 737 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 5
onClipEvent (enterFrame) {
_parent.jump_up();
}
Instance of Symbol 743 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 6
onClipEvent (enterFrame) {
_parent.boost();
_parent.climb();
_parent.waiting_to_throw_on_vine();
}
Instance of Symbol 744 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 7
onClipEvent (enterFrame) {
_parent.climb();
_parent.waiting_to_throw_on_vine();
}
Instance of Symbol 747 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 8
onClipEvent (enterFrame) {
_parent.wait_to_get_up();
}
Instance of Symbol 759 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 9
onClipEvent (enterFrame) {
_parent.swing();
_parent.waiting_to_hang_throw();
}
Instance of Symbol 760 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 10
onClipEvent (enterFrame) {
_parent.begin_swing();
_parent.waiting_to_hang_throw();
}
Instance of Symbol 509 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 11
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 779 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 12
onClipEvent (enterFrame) {
_parent.if_vine_throw_ended();
}
Instance of Symbol 789 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 14
onClipEvent (enterFrame) {
_parent.fall_down();
_parent.if_jump_throw_ended();
}
Instance of Symbol 929 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 15
onClipEvent (enterFrame) {
_parent.run();
_parent.waiting_to_fall();
_parent.waiting_to_jump();
_parent.collide();
_parent.waiting_to_hang();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.waiting_to_normal_throw();
_parent.waiting_to_up_throw();
_parent.boost();
}
Instance of Symbol 509 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 16
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 811 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 17
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 826 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 19
onClipEvent (enterFrame) {
_parent.stepped_on = true;
_parent.fall_down();
}
Instance of Symbol 832 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 20
onClipEvent (enterFrame) {
_parent.if_hang_throw_ended();
}
Instance of Symbol 840 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 21
onClipEvent (enterFrame) {
}
Instance of Symbol 841 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 22
onClipEvent (enterFrame) {
_parent.choose_vine();
_parent.s_climb();
}
Instance of Symbol 847 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 23
onClipEvent (enterFrame) {
_parent.grab_vine();
}
Instance of Symbol 849 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 24
onClipEvent (enterFrame) {
_parent.grab_vine();
}
Instance of Symbol 855 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 25
onClipEvent (enterFrame) {
_parent.if_sv_throw_ended();
}
Instance of Symbol 861 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 26
onClipEvent (enterFrame) {
_parent.sv_move();
_parent.waiting_to_sv_throw();
}
Instance of Symbol 519 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 27
onClipEvent (enterFrame) {
_parent.if_duck_throw_ended();
}
Instance of Symbol 1006 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 28
onClipEvent (enterFrame) {
_parent.land_on_spikes();
}
Instance of Symbol 1026 MovieClip in Symbol 1027 MovieClip [random_monkey_enemy] Frame 29
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Symbol 1066 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1066 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 1066 MovieClip Frame 27
_parent.throwComplete = true;
Symbol 1075 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1075 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 1075 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 1075 MovieClip Frame 27
_parent.throwComplete = true;
_parent.gotoAndStop("climb");
Symbol 1097 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1097 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 2, _parent._x, _parent._y, 1);
Symbol 1097 MovieClip Frame 27
_parent.ThrowComplete = true;
Symbol 1106 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
Symbol 1106 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 1115 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
Symbol 1115 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 1120 MovieClip Frame 15
_parent.ready_to_fall = true;
Symbol 1126 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1126 MovieClip Frame 6
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 1, _parent._x, _parent._y, 1);
Symbol 1126 MovieClip Frame 30
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
Symbol 1133 MovieClip Frame 1
_parent.switch_climb_move(2);
Symbol 1133 MovieClip Frame 8
_parent.switch_climb_move(3);
Symbol 1133 MovieClip Frame 15
_parent.switch_climb_move(3);
Symbol 1133 MovieClip Frame 21
_parent.gotoAndStop("middle_of_vine");
Symbol 1138 MovieClip Frame 1
_parent.switch_climb_move(1);
Symbol 1138 MovieClip Frame 8
_parent.switch_climb_move(1);
Symbol 1138 MovieClip Frame 14
_parent.grabbed_vine = true;
Symbol 1139 MovieClip Frame 1
_parent.switch_climb_move(4);
Symbol 1139 MovieClip Frame 8
_parent.switch_climb_move(2);
Symbol 1139 MovieClip Frame 14
_parent.grabbed_vine = true;
Symbol 1144 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1144 MovieClip Frame 6
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 1, _parent._x, _parent._y, 1);
Symbol 1144 MovieClip Frame 30
_parent.throwComplete = true;
Symbol 1158 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1158 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, true, 0, _parent._x, _parent._y, 1);
Symbol 1158 MovieClip Frame 27
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
Symbol 1165 MovieClip Frame 1
_parent.death_animation = true;
_root.attach_points(_parent.idNum, 100, _parent._xscale);
Symbol 1184 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1184 MovieClip Frame 90
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 1185 MovieClip [enemy_mky] Frame 1
function boost() {
if (((getTimer() / 1000) - this.wait_for_boost) >= this.delay_boost) {
}
}
function waiting_to_turn() {
if ((((getTimer() / 1000) - this.last_turn) >= this.delay_turn) or (this.last_turn == 0)) {
if (((this._xscale == 100) and (_root.player._x < (this._x - 50))) or ((this._xscale == -100) and ((this._x + 50) < _root.player._x))) {
x = random(2);
if (x == 0) {
this.turn();
}
this.last_turn = getTimer() / 1000;
}
}
}
function wait_for_action() {
if ((((getTimer() / 1000) - this.begin_idle) >= this.idle_time) or (this.begin_idle == 0)) {
this.choose_action();
} else if (!this.was_idling) {
this.was_idling = true;
}
}
function choose_action() {
if (((_root.player._y - 50) >= this._y) or (this._y >= (_root.player._y + 50))) {
this.gotoAndStop("run");
this.running_mode = true;
this.normal_throw = true;
} else {
this.gotoAndStop("walk");
this.normal_throw = true;
}
}
function waiting_to_jump() {
if ((this._y - 5) >= _root.player._y) {
if (_root.stage.jump_l.hitTest(this._x, this._y, true) and (this._xscale == -100)) {
this.is_left_jump = true;
this.on_ground = false;
this.gotoAndStop("jump_up");
} else if (_root.stage.jump_r.hitTest(this._x, this._y, true) and (this._xscale == 100)) {
this.is_left_jump = false;
this.on_ground = false;
this.gotoAndStop("jump_up");
}
}
}
function jump_up() {
if (!this.jump_loaded) {
this.curr_jump_height = this.jumpHeight;
this.jump_loaded = true;
}
if (!_root.stage.branches.hitTest(this._x, this._y, true)) {
this._y = this._y + this.curr_jump_height;
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
if (this.attempt_climb and _root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this.climb_up = true;
this.gotoAndStop("climb");
this.adjust_xpos();
}
if (this.attempt_hang and _root.stage.branches.hitTest(this._x, this._y - 4, true)) {
this._y = this._y - 4;
this.gotoAndStop("hang");
this.grabY = this._y;
this.adjust_height();
this.only_way = false;
}
} else if (this.attempt_hang) {
this.gotoAndStop("hang");
this.grabY = this._y;
this.adjust_height();
this.only_way = false;
} else {
this.curr_jump_height = 0;
}
this.jumpUp = true;
if (this.curr_jump_height >= 0) {
this.gotoAndStop("fall_down");
}
if ((!this.attempt_hang) and (!this.attempt_climb)) {
this.move_in_air();
}
}
function waiting_to_hang() {
if (_root.stage.left_hang.hitTest(this._x, this._y, true) and (this._xscale == 100)) {
this.is_only_way();
if (((this._y - 5) >= _root.player._y) or this.only_way) {
if (((getTimer() / 1000) - this.last_attempt) >= this.delay_attempt) {
this.attempt_hang = true;
this.gotoAndStop("jump_up");
}
this.last_attempt = getTimer() / 1000;
}
} else if (_root.stage.right_hang.hitTest(this._x, this._y, true) and (this._xscale == -100)) {
this.is_only_way();
if (((this._y - 5) >= _root.player._y) or this.only_way) {
if (((getTimer() / 1000) - this.last_attempt) >= this.delay_attempt) {
this.attempt_hang = true;
this.gotoAndStop("jump_up");
}
this.last_attempt = getTimer() / 1000;
}
}
}
function is_only_way() {
if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 32, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.only_way = true;
}
} else if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 32, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.only_way = true;
}
}
}
function adjust_height() {
i = 1;
while (i < 10) {
i++;
}
if (!_root.stage.branches.hitTest(this._x, this._y + i, true)) {
this._y = this._y + (i - 1);
}
}
function move_in_air() {
if (((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 16, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y + 16, true))) {
if (this._x < 2) {
this._x = 288;
} else {
this._x = this._x - this.jumpMoveSpeed;
}
} else if (((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 16, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y + 16, true))) {
if (288 < this._x) {
this._x = 2;
} else {
this._x = this._x + this.jumpMoveSpeed;
}
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.jumpUp = false;
this.fall(this.curr_jump_height);
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this._y = this._y + valueY;
if (500 < this._y) {
this.fall_die = true;
this.deathComplete = true;
this.waiting_to_die();
}
if (_root.stage.spikes.hitTest(this._x, this._y + 16, true)) {
this.gotoAndStop("hit_spikes");
}
if (_root.stage.pool.hitTest(this._x, this._y + 17, true)) {
this.gotoAndStop("drown");
}
if (this.jump_loaded and (!this.stepped_on)) {
this.move_in_air();
}
if (_root.stage.vines.hitTest(this._x, this._y + 16, true) and (!this.falling_from_vines)) {
this.climb_up = true;
this.gotoAndStop("climb");
this.adjust_xpos();
}
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 16, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 16, true)) {
this._y = this._y - i;
break;
}
i--;
}
this.running_mode = false;
this.idle_mode = false;
if (!this.dying) {
this.on_ground = true;
this.gotoAndStop("stand");
this.last_throw = 0;
}
this.jump_loaded = false;
this.stepped_on = false;
this.fall_loaded = false;
this.falling_from_vines = false;
if (!this.throwComplete) {
this.throwComplete = true;
}
}
}
function pick_a_direction(x) {
if ((x % 2) == 0) {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 10;
} else {
this._xscale = 100;
this._x = this._x + 10;
}
}
function walk() {
if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x - 4, this._y, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(288, this._y, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else {
this.turn();
}
} else if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x + 4, this._y, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(2, this._y, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
}
if (idle_mode) {
if (this.was_idling) {
this.stopped_idling = getTimer() / 1000;
this.was_idling = false;
this.walkTime = random(100);
} else if (this.walkTime < ((getTimer() / 1000) - this.stopped_idling)) {
this.begin_idle = getTimer() / 1000;
this.gotoAndStop("stand");
}
}
}
function run() {
if (this._xscale == -100) {
if ((!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x - 4, this._y, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(288, this._y, true))) {
this._x = 288;
} else {
this.turn();
}
}
} else {
this.turn();
}
} else if (this._xscale == 100) {
if ((!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(this._x + 4, this._y, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y - 10, true)) and (!_root.stage.dirt_piles.hitTest(2, this._y, true))) {
this._x = 2;
} else {
this.turn();
}
}
} else {
this.turn();
}
}
}
function collide() {
}
function waiting_to_fall() {
if ((!_root.stage.branches.hitTest(this._x, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) {
this.find_ground(this.runSpeed);
if (((this._xscale == 100) and _root.stage.ground.hitTest(this._x - this.runSpeed, this._y + 16, true)) and this.no_ground) {
this.turn();
} else if (((this._xscale == -100) and _root.stage.ground.hitTest(this._x + this.runSpeed, this._y + 16, true)) and this.no_ground) {
this.turn();
} else {
this.find_ground(0);
if (this.no_ground or (!this.no_spikes)) {
this.turn();
} else {
this.gotoAndStop("fall_down");
}
}
}
}
function waiting_to_die() {
if (this.deathComplete) {
if (!_this.fall_die) {
_root.score = _root.score + 100;
_root.sb.update_score();
}
_root.stage.clean_up(this.idNum, this._x, this._y, this._height / 2, this._width / 2, this._xscale);
}
}
function begin_swing() {
this.gotoAndStop("swing");
}
function swing() {
if (_root.stage.branches.hitTest(this._x, this.grabY, true)) {
if (this._xscale == -100) {
if (!_root.stage.branches.hitTest(this._x - 16, this._y + 15, true)) {
if (this._x < 2) {
this._x = 288;
}
this._x = this._x - this.walkSpeed;
} else {
this.turn();
}
} else if (!_root.stage.branches.hitTest(this._x + 16, this._y + 15, true)) {
if (288 < this._x) {
this._x = 2;
}
this._x = this._x + this.walkSpeed;
} else {
this.turn();
}
} else {
this.attempt_hang = false;
this.gotoAndStop("fall_down");
}
this.hand_stepped_on();
}
function hand_stepped_on() {
if (_root.player.hitTest(this._x, this._y - 16, true) and _root.player.on_ground) {
_root.attach_points(this.idNum, 50, this._x, this._y);
this.gotoAndStop("stepped_on");
_root.score = _root.score + 50;
_root.sb.update_score();
} else {
x = 0;
while (x < _root.stage.amt_of_enemies_entered) {
if (_root["enemy" + x].hitTest(this._x, this._y - 16, true) and (this.idNum != x)) {
this.gotoAndStop("stepped_on");
}
x++;
}
}
}
function take_fall() {
if (this.ready_to_fall) {
this.attempt_hang = false;
this.ready_to_fall = false;
this.gotoAndStop("fall_down");
}
}
function waiting_to_normal_throw() {
if (this.normal_throw) {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) and (!_root.player.death_animation)) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
x = random(2);
if (x == 0) {
if (_root.player.is_ducking) {
this.gotoAndStop("duck_throw");
} else {
this.gotoAndStop("normal_throw");
}
}
}
this.last_throw = getTimer() / 1000;
}
}
}
}
function waiting_to_up_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((_root.player._y < (this._y - 20)) and (((_root.player._x >= (this._x - 10)) and ((this._x + 10) >= _root.player._x)) and (!_root.player.death_animation))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("up_throw");
}
this.last_throw = getTimer() / 1000;
}
}
}
function if_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function waiting_to_hang_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if (((_root.player._x >= (this._x - 15)) and ((this._x + 15) >= _root.player._x)) and (!_root.player.death_animation)) {
this.gotoAndStop("hang_throw");
}
this.last_throw = getTimer() / 1000;
}
}
function if_hang_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("hang");
}
}
function waiting_to_climb() {
if ((_root.player._y + 10) < this._y) {
if (_root.stage.vines.hitTest(this._x, this._y - 40, true)) {
this.climb_up = true;
this.climbing = true;
this.switching_vine = false;
this.last_climb_decision = getTimer() / 1000;
this.attempt_climb = true;
this.gotoAndStop("jump_up");
}
}
}
function waiting_to_climb_down() {
if (((this.getTimer() / 1000) - this.last_climb) >= this.delay_climb) {
if (this._y < (_root.player._y - 10)) {
if (_root.stage.vines.hitTest(this._x, this._y + 20, true)) {
this.climb_up = false;
this.climbing = true;
this.switching_vine = false;
this.last_climb_decision = getTimer() / 1000;
this._y = this._y + 2;
this.gotoAndStop("climb");
this.adjust_xpos();
}
}
}
}
function decide_move() {
if (((getTimer() / 1000) - this.last_vert_decision) >= this.delay_vert_decision) {
if ((this._y < (_root.player._y - 20)) and (!this.no_ground)) {
this.climb_up = false;
} else if ((_root.player._y + 20) < this._y) {
this.climb_up = true;
}
this.last_vert_decision = getTimer() / 1000;
}
}
function vine_turn() {
if (((getTimer() / 1000) - this.last_turn) >= this.delay_turn) {
if ((_root.player._x < this._x) and (this._xscale == 100)) {
this._xscale = -100;
} else if ((this._x < _root.player._x) and (this._xscale == -100)) {
this._xscale = 100;
}
this.last_turn = getTimer() / 1000;
}
}
function find_ground(dist) {
this.no_ground = true;
this.no_spikes = true;
j = this._x;
if (this._xscale == 100) {
this.j = this.j + dist;
} else {
this.j = this.j - dist;
}
i = this._y;
while (i < 230) {
if (_root.stage.ground.hitTest(this.j, i, true) or _root.stage.branches.hitTest(this.j, i, true)) {
this.no_ground = false;
this.course_detected = true;
if (_root.stage.spikes.hitTest(this.j, i - 5, true)) {
this.no_spikes = false;
}
break;
}
i++;
}
this.course_detected = true;
}
function climb() {
this.vine_turn();
this.decide_move();
if (this.climb_up) {
if (_root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this._y = this._y - this.climbSpeed;
this.gotoAndStop("climb");
if (_root.stage.branches.hitTest(this._x, this._y - 10, true)) {
this.switch_vine();
}
} else {
this.attempt_climb = false;
this.falling_from_vines = true;
this.climbing = false;
this.gotoAndStop("fall_down");
this.last_climb = getTimer() / 1000;
this.switch_vine();
}
} else if (_root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this._y = this._y + this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.find_ground(20);
if ((!this.no_ground) and this.no_spikes) {
this.attempt_climb = false;
this.falling_from_vines = true;
this.climbing = false;
this.jump_loaded = true;
this.last_climb = getTimer() / 1000;
this.gotoAndStop("fall_down");
} else {
this.climb_up = true;
this._y = this._y - this.climbSpeed;
}
}
}
function switch_vine() {
if ((this._x < _root.player._x) and _root.stage.vines.hitTest(this._x + 32, this._y + 16, true)) {
this._xscale = -100;
this.switching_vine = true;
this.gotoAndStop("switch_vine");
} else if ((_root.player._x < this._x) and _root.stage.vines.hitTest(this._x - 32, this._y + 16, true)) {
this._xscale = 100;
this.switching_vine = true;
this.gotoAndStop("switch_vine");
}
}
function been_hit(dir) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
this.jump_loaded = false;
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_back");
} else if (((dir == -100) and (this._xscale == -100)) or ((dir == 100) and (this._xscale == 100))) {
this.jump_loaded = false;
this.gotoAndStop("fall_forward");
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
}
this.falling_from_vines = true;
}
function been_warned(dir) {
if ((((getTimer() / 1000) - this.last_warning) >= this.delay_warning) and (!this.dying)) {
this.last_warning = getTimer() / 1000;
x = random(3);
if (x == 0) {
if ((((!this.climbing) and (!this.jump_loaded)) and (!this.fall_loaded)) and (!this.attempt_hang)) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
this.last_duck = getTimer() / 1000;
this.gotoAndStop("duck");
}
}
}
}
}
function wait_to_get_up() {
if (((getTimer() / 1000) - this.last_duck) >= this.delay_duck) {
this.gotoAndStop("stand");
}
}
function choose_vine() {
if (((_root.player._x < (this._x - 20)) and (this._xscale == -100)) or (((this._x + 20) < _root.player._x) and (this._xscale == 100))) {
this.no_other_monkey_x(0);
if (this.no_other_monkey) {
this.go_back = true;
this.gotoAndStop("switch_vine_b");
this.no_other_monkey = false;
}
} else if (((_root.player._x < (this._x - 20)) and (this._xscale == 100)) or (((this._x + 20) < _root.player._x) and (this._xscale == -100))) {
this.no_other_monkey_x(1);
if (this.no_other_monkey) {
this.gotoAndStop("switch_vine_a");
this.no_other_monkey = false;
}
}
}
function no_other_monkey_x(dir) {
if (dir == 0) {
if ((((this._x - 64) < _root.player._x) and (this._xscale == -100)) or ((_root.player._x < (this._x + 64)) and (this._xscale == 100))) {
if ((_root.player._y >= (this._y - 10)) and ((this._y + 10) >= _root.player._y)) {
this.no_other_monkey = false;
} else {
this.no_other_monkey = true;
}
} else {
this.no_other_monkey = true;
}
} else if ((((this._x - 64) < _root.player._x) and (this._xscale == 100)) or ((_root.player._x < (this._x + 64)) and (this._xscale == -100))) {
if ((_root.player._y >= (this._y - 10)) and ((this._y + 10) >= _root.player._y)) {
this.no_other_monkey = false;
} else {
this.no_other_monkey = true;
}
} else {
this.no_other_monkey = true;
}
}
function player_at_same_y() {
if (((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
}
}
}
function switch_climb_move(num) {
if (this._xscale == 100) {
if (!this.go_back) {
this._x = this._x - num;
} else {
this._x = this._x + num;
}
} else if (!this.go_back) {
this._x = this._x + num;
} else {
this._x = this._x - num;
}
}
function grab_vine() {
if (this.grabbed_vine) {
if (this._xscale == 100) {
if (!this.go_back) {
this._xscale = -100;
this._x = this._x - 22;
} else {
this._x = this._x + 2;
this.go_back = false;
}
} else if (!this.go_back) {
this._xscale = 100;
this._x = this._x + 22;
} else {
this._x = this._x - 2;
this.go_back = false;
}
this.find_ground(20);
if (!this.no_ground) {
if (this._y < (_root.player._y - 50)) {
if ((this._xscale == -100) and (!_root.stage.vines.hitTest(this._x - 32, this._y + 16, true))) {
this.climb_up = false;
} else if ((this._xscale == 100) and (!_root.stage.vines.hitTest(this._x + 32, this._y + 16, true))) {
this.climb_up = false;
}
}
}
this.gotoAndStop("climb");
this.adjust_xpos();
this.grabbed_vine = false;
}
}
function s_climb() {
if ((_root.player._y < (this._y - 16)) or ((this._y + 16) < _root.player._y)) {
if ((_root.player._x < (this._x - 8)) or ((this._x + 8) < _root.player._x)) {
this.gotoAndStop("switch_vine_climb");
} else {
this.gotoAndStop("sv_throw");
}
}
}
function sv_move() {
i = this._x;
j = this._x;
if (this._xscale == 100) {
i = i + 8;
j = j - 24;
} else {
i = i - 8;
j = j + 24;
}
if (_root.player._y < (this._y - 16)) {
if ((!_root.stage.vines.hitTest(i, this._y, true)) or (!_root.stage.vines.hitTest(j, this._y, true))) {
this.falling_from_vine = true;
this.gotoAndStop("fall_down");
} else {
this._y = this._y - this.climbSpeed;
}
} else if ((this._y + 16) < _root.player._y) {
if ((!_root.stage.vines.hitTest(i, this._y, true)) or (!_root.stage.vines.hitTest(j, this._y, true))) {
this.falling_from_vine = true;
this.gotoAndStop("fall_down");
} else {
this._y = this._y + this.climbSpeed;
}
} else {
this.gotoAndStop("middle_of_vine");
}
}
function if_sv_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("middle_of_vine");
}
}
function if_jump_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function adjust_xpos() {
i = 4;
while (i >= 1) {
if (_root.stage.vines.hitTest(this._x - i, this._y + 16, true)) {
this._x = this._x - i;
return;
}
i--;
}
}
function land_on_spikes() {
if (!this.spike_hit_loaded) {
this.curr_jump_height = -6;
this.spike_hit_loaded = true;
}
this._y = this._y + this.curr_jump_height;
this.curr_jump_height = this.curr_jump_height + 0.3;
if (232 < this._y) {
_root.stage.enemy_defeated();
_root.score = _root.score + 100;
_root.sb.update_score();
this.removeMovieClip();
}
}
throwComplete = true;
deathComplete = false;
jumpingUp = true;
jump_loaded = false;
fall_loaded = false;
falling_from_vines = false;
running_mode = false;
idle_mode = false;
dir_is_left = false;
is_left_jump = false;
normal_throw = false;
ready_to_fall = false;
dying = false;
climb_up = false;
climbing = false;
idle_time = 5;
begin_idle = 0;
was_idling = false;
stopped_idling = 0;
walkTime = random(100);
walkSpeed = 0.6;
runSpeed = 1.25;
jumpMoveSpeed = 1;
fallSpeed = 2.5;
jumpSpeed = 0.75;
jumpHeight = -10;
curr_jump_height = 0;
climbSpeed = 0.5;
max_jump_height = 0;
attempt_hang = false;
attempt_climb = false;
mky_hanging_on_level = false;
go_back = false;
grabbed_vine = false;
only_way = false;
no_other_monkey = false;
stepped_on = false;
not_vunerable = false;
amtThrown = 0;
level = 0;
grabY = 0;
can_collide = true;
spike_hit_loaded = false;
startThinking = getTimer() / 1000;
lastThought = 0;
thinkTime = 3;
delay_attempt = 1;
last_attempt = 0;
delay_throw = 1;
last_throw = 0;
delay_duck = 0.75;
last_duck = 0;
delay_warning = 1;
last_warning = 0;
delay_boost = 10;
last_turn = 0;
delay_turn = 2;
delay_vert_decision = 3;
last_vert_decision = 0;
delay_horz_decision = 1;
last_horz_decision = 0;
switching_vine = false;
no_ground = false;
no_spikes = true;
delay_climb = 2;
last_climb = 0;
on_ground = false;
fall_die = false;
wait_for_boost = getTimer() / 1000;
this.pick_a_direction(this.idNum);
this.gotoAndStop("fall_down");
Instance of Symbol 733 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 2
onClipEvent (enterFrame) {
_parent.wait_for_action();
}
Instance of Symbol 1035 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 3
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_turn();
_parent.waiting_to_fall();
_parent.waiting_to_jump();
_parent.collide();
_parent.waiting_to_hang();
_parent.waiting_to_normal_throw();
_parent.waiting_to_up_throw();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.boost();
}
Instance of Symbol 724 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 4
onClipEvent (enterFrame) {
_parent.fall_down();
}
Instance of Symbol 737 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 5
onClipEvent (enterFrame) {
_parent.jump_up();
}
Instance of Symbol 1043 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 6
onClipEvent (enterFrame) {
_parent.climb();
}
Instance of Symbol 1044 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 7
onClipEvent (enterFrame) {
}
Instance of Symbol 747 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 8
onClipEvent (enterFrame) {
_parent.wait_to_get_up();
}
Instance of Symbol 759 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 9
onClipEvent (enterFrame) {
_parent.swing();
_parent.waiting_to_hang_throw();
}
Instance of Symbol 760 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 10
onClipEvent (enterFrame) {
_parent.begin_swing();
_parent.waiting_to_hang_throw();
}
Instance of Symbol 509 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 11
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 1076 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 12
onClipEvent (enterFrame) {
}
Instance of Symbol 789 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 14
onClipEvent (enterFrame) {
_parent.fall_down();
_parent.if_jump_throw_ended();
}
Instance of Symbol 1088 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 15
onClipEvent (enterFrame) {
_parent.run();
_parent.waiting_to_turn();
_parent.waiting_to_fall();
_parent.waiting_to_jump();
_parent.collide();
_parent.waiting_to_hang();
_parent.waiting_to_climb_down();
_parent.waiting_to_climb();
_parent.waiting_to_normal_throw();
_parent.waiting_to_up_throw();
_parent.boost();
}
Instance of Symbol 509 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 16
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 811 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 17
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 1121 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 19
onClipEvent (enterFrame) {
_parent.stepped_on = true;
_parent.fall_down();
}
Instance of Symbol 832 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 20
onClipEvent (enterFrame) {
_parent.if_hang_throw_ended();
}
Instance of Symbol 840 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 21
onClipEvent (enterFrame) {
}
Instance of Symbol 841 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 22
onClipEvent (enterFrame) {
_parent.choose_vine();
_parent.s_climb();
}
Instance of Symbol 847 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 23
onClipEvent (enterFrame) {
_parent.grab_vine();
}
Instance of Symbol 849 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 24
onClipEvent (enterFrame) {
_parent.grab_vine();
}
Instance of Symbol 855 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 25
onClipEvent (enterFrame) {
_parent.if_sv_throw_ended();
}
Instance of Symbol 861 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 26
onClipEvent (enterFrame) {
_parent.sv_move();
_parent.waiting_to_sv_throw();
}
Instance of Symbol 509 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 27
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 1006 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 28
onClipEvent (enterFrame) {
_parent.land_on_spikes();
}
Instance of Symbol 1026 MovieClip in Symbol 1185 MovieClip [enemy_mky] Frame 29
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Symbol 1204 MovieClip Frame 1
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 80
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 90
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 100
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 110
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 120
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 130
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 140
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 150
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 160
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 170
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 180
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 190
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 200
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 210
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 219
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 299
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 309
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 389
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 399
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 409
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 419
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 429
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 439
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 449
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 459
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1204 MovieClip Frame 470
if (_root.game_paused) {
this.prevFrame();
}
Symbol 1210 MovieClip Frame 5
if (_root.game_paused) {
stop();
}
Symbol 1210 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 1210 MovieClip Frame 15
if (_root.game_paused) {
stop();
}
Symbol 1221 MovieClip Frame 5
if (_root.game_paused) {
stop();
}
Symbol 1221 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 1261 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1261 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 1261 MovieClip Frame 17
if (_root.game_paused) {
stop();
}
Symbol 1261 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 1261 MovieClip Frame 22
if (_root.game_paused) {
stop();
}
Symbol 1261 MovieClip Frame 27
if (_root.game_paused) {
stop();
}
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 1263 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1263 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 1263 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 1263 MovieClip Frame 27
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 1265 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1265 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 1265 MovieClip Frame 17
if (_root.game_paused) {
stop();
}
Symbol 1265 MovieClip Frame 18
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, true, 0, _parent._x, _parent._y, 1);
Symbol 1265 MovieClip Frame 22
if (_root.game_paused) {
stop();
}
Symbol 1265 MovieClip Frame 27
if (_root.game_paused) {
stop();
}
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 1267 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1267 MovieClip Frame 5
if (_root.game_paused) {
stop();
}
Symbol 1267 MovieClip Frame 10
if (_root.game_paused) {
stop();
}
Symbol 1267 MovieClip Frame 11
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 1);
Symbol 1267 MovieClip Frame 15
if (_root.game_paused) {
stop();
}
Symbol 1267 MovieClip Frame 20
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 1286 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1286 MovieClip Frame 5
if (_root.game_paused) {
stop();
}
Symbol 1286 MovieClip Frame 6
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, false, 1, _parent._x, _parent._y, 1);
Symbol 1286 MovieClip Frame 25
if (_root.game_paused) {
stop();
}
Symbol 1286 MovieClip Frame 30
if (_root.game_paused) {
stop();
}
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop;
Symbol 1293 MovieClip Frame 15
_parent.ready_to_fall = true;
Symbol 1303 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1303 MovieClip Frame 85
_parent.deathComplete = true;
Symbol 1312 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1312 MovieClip Frame 85
_parent.deathComplete = true;
Symbol 1319 MovieClip Frame 1
_parent.death_animation = true;
Symbol 1327 MovieClip Frame 1
_parent.switch_climb_move(2);
Symbol 1327 MovieClip Frame 7
if (_root.game_paused) {
stop();
}
Symbol 1327 MovieClip Frame 8
_parent.switch_climb_move(3);
Symbol 1327 MovieClip Frame 15
if (_root.game_paused) {
stop();
}
_parent.switch_climb_move(3);
_parent.gotoAndStop("middle_of_vine");
Symbol 1339 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 1339 MovieClip Frame 5
if (_root.game_paused) {
stop();
}
Symbol 1339 MovieClip Frame 6
_parent.amtThrown = _parent.amtThrown + 1;
_root.amt_ammo_thrown = _root.amt_ammo_thrown + 1;
_root.attach_weapon(_parent.idNum, _parent.amtThrown, _parent._xscale, false, 1, _parent._x, _parent._y, 1);
Symbol 1339 MovieClip Frame 25
if (_root.game_paused) {
stop();
}
Symbol 1339 MovieClip Frame 30
if (_root.game_paused) {
stop();
}
_parent.throwComplete = true;
_parent.amt_poop = _parent.amt_poop - 1;
_root.sb.poop_meter._width = _parent.amt_poop * 1.5;
Symbol 1346 MovieClip Frame 1
_parent.switch_climb_move(1);
Symbol 1346 MovieClip Frame 8
_parent.switch_climb_move(1);
Symbol 1346 MovieClip Frame 14
_parent.leaving_vine = false;
Symbol 1347 MovieClip Frame 1
_parent.switch_climb_move(4);
Symbol 1347 MovieClip Frame 8
_parent.switch_climb_move(2);
Symbol 1347 MovieClip Frame 14
_parent.leaving_vine = false;
Symbol 1392 MovieClip Frame 1
_parent.death_animation = true;
Symbol 1392 MovieClip Frame 156
_parent.deathComplete = true;
Symbol 1443 MovieClip Frame 1
_parent.death_animation = true;
Symbol 1443 MovieClip Frame 186
_parent.deathComplete = true;
Symbol 1462 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1462 MovieClip Frame 90
_parent.deathComplete = true;
_parent.is_drowning = false;
_root["watermark" + _parent.idNum].removeMovieClip();
Symbol 1546 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1546 MovieClip Frame 323
_parent.deathComplete = true;
Symbol 1630 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1630 MovieClip Frame 324
_parent.deathComplete = true;
Symbol 1669 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1669 MovieClip Frame 95
_parent.deathComplete = true;
Symbol 1708 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1708 MovieClip Frame 95
_parent.deathComplete = true;
Symbol 1737 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1737 MovieClip Frame 70
_parent.deathComplete = true;
Symbol 1772 MovieClip Frame 103
_parent.gotoAndStop("stand");
Symbol 1773 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1773 MovieClip Frame 60
_parent.deathComplete = true;
Symbol 1816 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1816 MovieClip Frame 141
_parent.deathComplete = true;
Symbol 1859 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1859 MovieClip Frame 141
_parent.deathComplete = true;
Symbol 1894 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1894 MovieClip Frame 121
_parent.is_drowning = false;
_parent.deathComplete = true;
Symbol 1895 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1895 MovieClip Frame 121
_parent.is_drowning = false;
_parent.deathComplete = true;
Symbol 1941 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1941 MovieClip Frame 146
_parent.deathComplete = true;
Symbol 1968 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
Symbol 1968 MovieClip Frame 20
_parent.is_falling = true;
Symbol 1968 MovieClip Frame 30
if ((!_root.stage.ground.hitTest(_parent._x, _parent._y + 16, true)) and (!_root.stage.branches.hitTest(_parent._x, _parent._y + 16, true))) {
this.gotoAndPlay(29);
} else {
_parent._y = _parent._y + 6;
}
Symbol 1968 MovieClip Frame 31
_parent.is_falling = false;
Symbol 1968 MovieClip Frame 101
_parent.deathComplete = true;
Symbol 1970 MovieClip Frame 1
_parent.dying = true;
_parent.death_animation = true;
_parent.is_falling = true;
Symbol 1970 MovieClip Frame 10
if ((!_root.stage.ground.hitTest(_parent._x, _parent._y + 16, true)) and (!_root.stage.branches.hitTest(_parent._x, _parent._y + 16, true))) {
this.gotoAndPlay(9);
} else {
_parent._y = _parent._y + 6;
}
Symbol 1970 MovieClip Frame 11
_parent.is_falling = false;
Symbol 1970 MovieClip Frame 81
_parent.deathComplete = true;
Symbol 1971 MovieClip Frame 27
this.gotoAndStop("walk");
Symbol 1972 MovieClip [monkey] Frame 1
function waiting_to_move() {
if (Key.isDown(65)) {
if (Key.isDown(left)) {
this._xscale = -100;
this.run();
} else if (Key.isDown(right)) {
this._xscale = 100;
this.run();
}
} else if (Key.isDown(left)) {
this._xscale = -100;
this.gotoAndStop("walk");
} else if (Key.isDown(right)) {
this._xscale = 100;
this.gotoAndStop("walk");
}
}
function flash() {
if (this.not_vunerable) {
if (this.non_vulnerable_time >= ((getTimer() / 1000) - this.hit_time)) {
if (((getTimer() / 1000) - this.last_flash) >= this.flash_duration) {
if (this._visible) {
this._visible = false;
} else {
this._visible = true;
}
this.last_flash = getTimer() / 1000;
}
} else {
this.not_vunerable = false;
this._visible = true;
}
}
}
function walk() {
if (!Key.isDown(65)) {
if (((Key.isDown(left) and (this._xscale == -100)) and (!_root.stage.branches.hitTest(this._x - 16, this._y - 10, true))) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y, true))) {
if (this._x < 2) {
if ((!_root.stage.dirt_piles.hitTest(288, this._y, true)) and (!_root.stage.branches.hitTest(288, this._y, true))) {
this._x = 288;
}
} else {
this._x = this._x - this.walkSpeed;
}
} else if (((Key.isDown(right) and (this._xscale == 100)) and (!_root.stage.branches.hitTest(this._x + 16, this._y - 10, true))) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y, true))) {
if (288 < this._x) {
if ((!_root.stage.dirt_piles.hitTest(2, this._y, true)) and (!_root.stage.branches.hitTest(2, this._y, true))) {
this._x = 2;
}
} else {
this._x = this._x + this.walkSpeed;
}
} else {
this.gotoAndStop("stand");
}
} else {
this.gotoAndStop("run");
}
}
function run() {
if (Key.isDown(65)) {
this.running_mode = true;
if (((Key.isDown(left) and (this._xscale == -100)) and (!_root.stage.branches.hitTest(this._x - 16, this._y - 10, true))) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y, true))) {
if (this._x < 2) {
if ((!_root.stage.dirt_piles.hitTest(288, this._y, true)) and (!_root.stage.branches.hitTest(288, this._y, true))) {
this._x = 288;
}
} else {
this._x = this._x - this.runSpeed;
this.gotoAndStop("run");
}
} else if (((Key.isDown(right) and (this._xscale == 100)) and (!_root.stage.branches.hitTest(this._x + 16, this._y - 10, true))) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y, true))) {
if (288 < this._x) {
if ((!_root.stage.dirt_piles.hitTest(2, this._y, true)) and (!_root.stage.branches.hitTest(2, this._y, true))) {
this._x = 2;
}
} else {
this._x = this._x + this.runSpeed;
this.gotoAndStop("run");
}
} else {
this.gotoAndStop("stand");
}
} else {
this.running_mode = false;
this.gotoAndStop("walk");
}
}
function move_in_air() {
if ((Key.isDown(left) and (!_root.stage.branches.hitTest(this._x - 16, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x - 10, this._y + 16, true))) {
if (!this.hit_wall) {
this._xscale = -100;
this._x = this._x - this.jumpMoveSpeed;
}
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y, true)) and (!_root.stage.dirt_piles.hitTest(288, this._y + 16, true))) {
this._x = 288;
} else {
this.hit_wall = true;
}
}
} else if ((Key.isDown(right) and (!_root.stage.branches.hitTest(this._x + 16, this._y, true))) and (!_root.stage.dirt_piles.hitTest(this._x + 10, this._y + 16, true))) {
if (!this.hit_wall) {
this._xscale = 100;
this._x = this._x + this.jumpMoveSpeed;
}
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y, true)) and (!_root.stage.dirt_piles.hitTest(2, this._y + 16, true))) {
this._x = 2;
} else {
this.hit_wall = true;
}
}
}
}
function waiting_to_fall() {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this.gotoAndStop("fall_down");
this.on_ground = false;
}
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this._y = this._y + valueY;
if (_root.stage.spikes.hitTest(this._x, this._y + 16, true)) {
this.gotoAndStop("hit_spikes");
}
if (_root.stage.pool.hitTest(this._x, this._y + 17, true)) {
this.gotoAndStop("drown");
this.is_drowning = true;
}
if ((((!this.falling_from_vine) and Key.isDown(up)) and _root.stage.vines.hitTest(this._x, this._y, true)) and (!this.dying)) {
this.gotoAndStop("climb");
}
if (350 < this._y) {
this.deathComplete = true;
this.waiting_to_die();
}
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 16, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 16, true)) {
this._y = this._y - i;
break;
}
i--;
}
_root.stage.set_level(true, this._y, this.idNum);
if (!this.dying) {
this.gotoAndStop("stand");
this.on_ground = true;
}
this.hit_wall = false;
this.jump_loaded = false;
this.fall_loaded = false;
this.falling_from_vine = false;
this.leaving_vine = false;
this.is_hanging = false;
if (!this.throwComplete) {
this.throwComplete = true;
}
}
}
function waiting_to_jump() {
if (Key.isDown(83) and (!_root.stage.logs.hitTest(this._x, this._y, true))) {
this.gotoAndStop("jump_up");
this.on_ground = false;
}
}
function waiting_to_climb() {
if (Key.isDown(up) and _root.stage.vines.hitTest(this._x, this._y + 16, true)) {
this.adjust_xpos();
this.gotoAndStop("climb");
}
}
function adjust_xpos() {
i = 4;
while (i >= 1) {
if (_root.stage.vines.hitTest(this._x - i, this._y + 16, true)) {
this._x = this._x - i;
return;
}
i--;
}
}
function waiting_to_climb_down() {
if (Key.isDown(down) and _root.stage.vines.hitTest(this._x, this._y + 20, true)) {
this._y = this._y + 2;
this.adjust_xpos();
this.gotoAndStop("climb");
}
}
function climb() {
if (_root.stage.vines.hitTest(this._x, this._y + 16, true)) {
if (Key.isDown(up)) {
this._y = this._y - this.climbSpeed;
this.gotoAndStop("climb");
} else if (Key.isDown(down)) {
this._y = this._y + this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.gotoAndStop("stop_climbing");
}
} else {
this.falling_from_vine = true;
this.gotoAndStop("fall_down");
}
}
function climb_switch_side() {
if (Key.isDown(left)) {
this._xscale = 100;
this.leaving_vine = true;
} else if (Key.isDown(right)) {
this._xscale = -100;
this.leaving_vine = true;
}
}
function switch_vine() {
if (_root.stage.vines.hitTest(this._x, this._y - 10, true)) {
if (((Key.isDown(left) and (this._xscale == 100)) and _root.stage.vines.hitTest(this._x - 32, this._y + 16, true)) and this.leaving_vine) {
this.gotoAndStop("switch_vine");
} else if (((Key.isDown(right) and (this._xscale == -100)) and _root.stage.vines.hitTest(this._x + 32, this._y + 16, true)) and this.leaving_vine) {
this.gotoAndStop("switch_vine");
}
}
}
function grab_new_vine() {
if (!this.leaving_vine) {
if (this._xscale == 100) {
if (!this.go_back) {
this._xscale = -100;
this._x = this._x - 22;
} else {
this._x = this._x + 2;
this.go_back = false;
}
} else if (!this.go_back) {
this._xscale = 100;
this._x = this._x + 22;
} else {
this._x = this._x - 2;
this.go_back = false;
}
this.gotoAndStop("climb");
}
}
function switch_vine_climb() {
if (Key.isDown(up) or Key.isDown(down)) {
this.gotoAndStop("switch_vine_climb");
}
}
function switch_climb_move(num) {
if (this._xscale == 100) {
if (!this.go_back) {
this._x = this._x - num;
} else {
this._x = this._x + num;
}
} else if (!this.go_back) {
this._x = this._x + num;
} else {
this._x = this._x - num;
}
}
function s_climb() {
i = this._x;
j = this._x;
if (this._xscale == 100) {
i = i + 8;
j = j - 24;
} else {
i = i - 8;
j = j + 24;
}
if (Key.isDown(up)) {
if (_root.stage.vines.hitTest(i, this._y - 16, true) and _root.stage.vines.hitTest(j, this._y - 16, true)) {
this._y = this._y - this.climbSpeed;
}
} else if (Key.isDown(down)) {
if ((!_root.stage.vines.hitTest(i, this._y, true)) or (!_root.stage.vines.hitTest(j, this._y, true))) {
this.falling_from_vine = true;
this.gotoAndStop("fall_down");
} else {
this._y = this._y + this.climbSpeed;
}
} else {
this.gotoAndStop("middle_of_vine");
}
}
function choose_vine() {
if ((Key.isDown(this.right) and (this._xscale == -100)) or (Key.isDown(this.left) and (this._xscale == 100))) {
this.gotoAndStop("switch_vine_a");
} else if ((Key.isDown(this.right) and (this._xscale == 100)) or (Key.isDown(this.left) and (this._xscale == -100))) {
this.go_back = true;
this.gotoAndStop("switch_vine_b");
}
}
function waiting_to_duck() {
if (Key.isDown(down)) {
this.gotoAndStop("duck");
this.is_ducking = true;
}
}
function get_up() {
if (!Key.isDown(down)) {
this.gotoAndStop("stand");
this.is_ducking = false;
}
}
function waiting_to_hang() {
if (Key.isDown(up) and _root.stage.branches.hitTest(this._x, this._y, true)) {
this.gotoAndStop("swing");
this.is_hanging = true;
this.grab_y = this._y;
this.adjust_height();
}
}
function adjust_height() {
i = 1;
while (i < 10) {
i++;
}
if (!_root.stage.branches.hitTest(this._x, this._y + i, true)) {
this._y = this._y + i;
}
}
function swing_switch_side() {
if (Key.isDown(left)) {
this._xscale = -100;
} else if (Key.isDown(right)) {
this._xscale = 100;
}
}
function swing() {
if (_root.stage.branches.hitTest(this._x, this.grab_y, true)) {
if (Key.isDown(left)) {
if (!_root.stage.branches.hitTest(this._x - 16, this._y + 15, true)) {
this._xscale = -100;
this._x = this._x - this.walkSpeed;
this.gotoAndStop("swing");
}
if (this._x < 2) {
this._x = 288;
}
} else if (Key.isDown(right)) {
if (!_root.stage.branches.hitTest(this._x + 16, this._y + 15, true)) {
this._xscale = 100;
this._x = this._x + this.walkSpeed;
this.gotoAndStop("swing");
}
if (288 < this._x) {
this._x = 2;
}
} else {
this.gotoAndStop("hang");
}
} else {
this.gotoAndStop("fall_down");
this.is_hanging = false;
}
if (Key.isDown(down)) {
this.gotoAndStop("fall_down");
this.is_hanging = false;
}
this.hand_stepped_on();
}
function hand_stepped_on() {
i = 0;
while (i < _root.stage.background.amt_of_enemies_entered) {
if ((_root["enemy" + i].hitTest(this._x, this._y - 17, true) and (_root["enemy" + i].on_ground == true)) and (_root["enemy" + i]._y < this._y)) {
this.gotoAndStop("stepped_on");
}
i++;
}
}
function take_fall() {
if (this.ready_to_fall) {
this.ready_to_fall = false;
this.gotoAndStop("fall_down");
}
}
function waiting_to_throw_normal() {
if (((Key.isDown(65) and (!Key.isDown(left))) and (!Key.isDown(right))) and this.throwComplete) {
if (0 < this.amt_poop) {
this.gotoAndStop("normal_throw");
}
}
}
function if_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function waiting_to_throw_on_vine() {
if (Key.isDown(65) and this.throwComplete) {
if (0 < this.amt_poop) {
this.gotoAndStop("vine_throw");
}
}
}
function if_vine_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("climb");
}
}
function waiting_to_duck_throw() {
if (Key.isDown(65) and this.throwComplete) {
if (0 < this.amt_poop) {
this.gotoAndStop("duck_throw");
}
}
}
function waiting_to_hang_throw() {
if (Key.isDown(65) and this.throwComplete) {
if (0 < this.amt_poop) {
this.gotoAndStop("hang_throw");
}
}
}
function if_hang_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("swing");
}
}
function waiting_to_sv_throw() {
if (Key.isDown(65) and this.throwComplete) {
if (0 < this.amt_poop) {
this.gotoAndStop("sv_throw");
this.was_s_climbing = true;
}
}
}
function if_sv_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("middle_of_vine");
}
}
function if_duck_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("duck");
}
}
function waiting_to_up_throw() {
if (Key.isDown(65) and this.throwComplete) {
if (0 < this.amt_poop) {
this.gotoAndStop("up_throw");
}
}
}
function if_up_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function waiting_to_jump_throw() {
if (Key.isDown(65) and this.throwComplete) {
if (0 < this.amt_poop) {
if (this.jumpUp) {
this.gotoAndStop("jump_up_throw");
} else {
this.gotoAndStop("fall_down_throw");
}
}
}
}
function if_jump_throw_ended() {
if (this.throwComplete) {
if (this.jumpUp) {
this.gotoAndStop("jump_up");
} else {
this.gotoAndStop("fall_down");
}
}
}
function jump_up() {
if (!this.jump_loaded) {
this.curr_jump_height = this.jumpHeight;
this.jump_loaded = true;
}
if ((!_root.stage.branches.hitTest(this._x, this._y, true)) and (!_root.stage.dirt_piles.hitTest(this._x, this._y - 16, true))) {
this._y = this._y + this.curr_jump_height;
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
} else {
this.curr_jump_height = 0;
}
this.jumpUp = true;
this.move_in_air();
this.waiting_to_climb();
this.waiting_to_hang();
if (!this.running_mode) {
this.waiting_to_jump_throw();
} else if (!Key.isDown(65)) {
this.running_mode = false;
}
if (this.curr_jump_height >= 0) {
if (this.throwComplete) {
this.gotoAndStop("fall_down");
} else {
this.gotoAndStop("fall_down_throw");
}
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.jumpUp = false;
if ((!this.falling_from_vine) and (!this.dying)) {
this.waiting_to_climb();
}
if (!this.dying) {
this.move_in_air();
}
if ((!this.running_mode) and (!this.death_animation)) {
this.waiting_to_jump_throw();
} else if (!Key.isDown(65)) {
this.running_mode = false;
}
this.fall(this.curr_jump_height);
}
function waiting_to_die() {
if (this.deathComplete) {
if (0 < this.lives) {
this.lives = this.lives - 1;
_root.sb.update_lives();
this.deathComplete = false;
this.is_hanging = false;
this._xscale = 100;
this._x = _root.stage.background.player_x_start;
this._y = _root.stage.background.player_y_start;
this.dying = false;
this.death_animation = false;
this.not_vunerable = true;
this.hit_time = getTimer() / 1000;
if (this.amt_poop < 5) {
this.amt_poop = 5;
this.amt_poop = _root.player_ammo;
_root.sb.poop_meter._width = this.amt_poop * 1.5;
}
this.gotoAndStop("fall_down");
} else {
_root.stage.game_over();
this.removeMovieClip();
}
}
}
function land_on_spikes() {
if (!this.spike_hit_loaded) {
this.curr_jump_height = -6;
this.spike_hit_loaded = true;
}
this._y = this._y + this.curr_jump_height;
this.curr_jump_height = this.curr_jump_height + 0.3;
if (232 < this._y) {
this.spike_hit_loaded = false;
this.deathComplete = true;
this.waiting_to_die();
}
}
function rip_off_head() {
this.gotoAndStop("head_rip_off");
}
function rip_off_arms() {
this.gotoAndStop("rip_arms_off");
}
function turn() {
if (this._xscale == 100) {
this.xscale = -100;
} else {
this._xscale = 100;
}
}
left = Key.LEFT;
right = Key.RIGHT;
space = Key.SPACE;
up = Key.UP;
down = Key.DOWN;
throwComplete = true;
deathComplete = false;
dying = false;
jumpingUp = true;
jump_loaded = true;
fall_loaded = false;
spike_hit_loaded = false;
running_mode = false;
ready_to_fall = false;
falling_from_vine = false;
is_ducking = false;
death_animation = false;
on_ground = false;
is_hanging = false;
is_drowning = false;
walkSpeed = 1;
runSpeed = 2;
jumpMoveSpeed = 2;
fallSpeed = 2.5;
jumpSpeed = 0.75;
jumpHeight = -9.5;
curr_jump_height = 0;
climbSpeed = 1;
grab_y = 0;
hit_wall = false;
idNum = 1;
amtThrown = 0;
amt_poop = _root.player_ammo;
color = 1;
level = 0;
leaving_vine = false;
was_s_climbing = false;
go_back = false;
is_falling = false;
lives = _root.player_lives;
_root.sb.lives = this.lives;
_root.sb.update_lives();
_root.sb.poop_meter._width = this.amt_poop * 1.5;
not_vunerable = false;
non_vulnerable_time = 2.5;
hit_time = 0;
flash_duration = 0.075;
last_flash = 0;
this.gotoAndStop("fall_down");
Instance of Symbol 1205 MovieClip in Symbol 1972 MovieClip [monkey] Frame 2
onClipEvent (enterFrame) {
if (!_root.game_paused) {
_parent.waiting_to_move();
_parent.waiting_to_jump();
_parent.waiting_to_climb_down();
_parent.waiting_to_duck();
_parent.flash();
if (!Key.isDown(_parent.up)) {
_parent.waiting_to_throw_normal();
} else {
_parent.waiting_to_up_throw();
}
}
}
Instance of Symbol 1211 MovieClip in Symbol 1972 MovieClip [monkey] Frame 3
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_fall();
_parent.waiting_to_jump();
_parent.waiting_to_climb_down();
_parent.waiting_to_duck();
_parent.flash();
}
Instance of Symbol 1215 MovieClip in Symbol 1972 MovieClip [monkey] Frame 4
onClipEvent (enterFrame) {
_parent.fall_down();
_parent.flash();
}
Instance of Symbol 1216 MovieClip in Symbol 1972 MovieClip [monkey] Frame 5
onClipEvent (enterFrame) {
_parent.jump_up();
_parent.flash();
}
Instance of Symbol 1222 MovieClip in Symbol 1972 MovieClip [monkey] Frame 6
onClipEvent (enterFrame) {
_parent.climb();
_parent.waiting_to_throw_on_vine();
_parent.flash();
}
Instance of Symbol 1238 MovieClip in Symbol 1972 MovieClip [monkey] Frame 7
onClipEvent (enterFrame) {
_parent.climb();
_parent.climb_switch_side();
_parent.switch_vine();
_parent.waiting_to_throw_on_vine();
_parent.flash();
}
Instance of Symbol 1239 MovieClip in Symbol 1972 MovieClip [monkey] Frame 8
onClipEvent (enterFrame) {
_parent.get_up();
_parent.waiting_to_duck_throw();
_parent.flash();
}
Instance of Symbol 1251 MovieClip in Symbol 1972 MovieClip [monkey] Frame 9
onClipEvent (enterFrame) {
_parent.swing();
_parent.waiting_to_hang_throw();
_parent.flash();
}
Instance of Symbol 1252 MovieClip in Symbol 1972 MovieClip [monkey] Frame 10
onClipEvent (enterFrame) {
_parent.swing_switch_side();
_parent.waiting_to_hang_throw();
_parent.swing();
_parent.flash();
}
Instance of Symbol 1262 MovieClip in Symbol 1972 MovieClip [monkey] Frame 11
onClipEvent (enterFrame) {
_parent.if_throw_ended();
_parent.flash();
}
Instance of Symbol 1264 MovieClip in Symbol 1972 MovieClip [monkey] Frame 12
onClipEvent (enterFrame) {
_parent.if_vine_throw_ended();
_parent.flash();
}
Instance of Symbol 1266 MovieClip in Symbol 1972 MovieClip [monkey] Frame 13
onClipEvent (enterFrame) {
_parent.if_duck_throw_ended();
_parent.flash();
}
Instance of Symbol 1268 MovieClip in Symbol 1972 MovieClip [monkey] Frame 14
onClipEvent (enterFrame) {
_parent.jump_up();
_parent.if_jump_throw_ended();
_parent.flash();
}
Instance of Symbol 1269 MovieClip in Symbol 1972 MovieClip [monkey] Frame 15
onClipEvent (enterFrame) {
_parent.fall_down();
_parent.if_jump_throw_ended();
_parent.flash();
}
Instance of Symbol 1281 MovieClip in Symbol 1972 MovieClip [monkey] Frame 16
onClipEvent (enterFrame) {
_parent.run();
_parent.waiting_to_fall();
_parent.waiting_to_jump();
_parent.waiting_to_climb_down();
_parent.waiting_to_duck();
_parent.flash();
}
Instance of Symbol 1287 MovieClip in Symbol 1972 MovieClip [monkey] Frame 17
onClipEvent (enterFrame) {
_parent.if_hang_throw_ended();
_parent.flash();
}
Instance of Symbol 1288 MovieClip in Symbol 1972 MovieClip [monkey] Frame 18
onClipEvent (enterFrame) {
_parent.if_up_throw_ended();
_parent.flash();
}
Instance of Symbol 1294 MovieClip in Symbol 1972 MovieClip [monkey] Frame 19
onClipEvent (enterFrame) {
_parent.take_fall();
_parent.flash();
}
Instance of Symbol 811 MovieClip in Symbol 1972 MovieClip [monkey] Frame 20
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 1320 MovieClip in Symbol 1972 MovieClip [monkey] Frame 22
onClipEvent (load) {
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.land_on_spikes();
}
Instance of Symbol 1328 MovieClip in Symbol 1972 MovieClip [monkey] Frame 23
onClipEvent (enterFrame) {
_parent.grab_new_vine();
_parent.flash();
}
Instance of Symbol 1334 MovieClip in Symbol 1972 MovieClip [monkey] Frame 24
onClipEvent (enterFrame) {
_parent.s_climb();
_parent.waiting_to_sv_throw();
_parent.flash();
}
Instance of Symbol 1340 MovieClip in Symbol 1972 MovieClip [monkey] Frame 25
onClipEvent (enterFrame) {
_parent.if_sv_throw_ended();
_parent.flash();
}
Instance of Symbol 1341 MovieClip in Symbol 1972 MovieClip [monkey] Frame 26
onClipEvent (enterFrame) {
_parent.choose_vine();
_parent.waiting_to_sv_throw();
_parent.switch_vine_climb();
_parent.flash();
}
Instance of Symbol 1328 MovieClip in Symbol 1972 MovieClip [monkey] Frame 27
onClipEvent (enterFrame) {
_parent.grab_new_vine();
_parent.flash();
}
Instance of Symbol 1026 MovieClip in Symbol 1972 MovieClip [monkey] Frame 29
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Instance of Symbol 1463 MovieClip in Symbol 1972 MovieClip [monkey] Frame 31
onClipEvent (load) {
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Instance of Symbol 1547 MovieClip in Symbol 1972 MovieClip [monkey] Frame 32
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Instance of Symbol 811 MovieClip in Symbol 1972 MovieClip [monkey] Frame 34
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 1463 MovieClip in Symbol 1972 MovieClip [monkey] Frame 36
onClipEvent (load) {
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Instance of Symbol 840 MovieClip in Symbol 1972 MovieClip [monkey] Frame 37
onClipEvent (enterFrame) {
}
Instance of Symbol 1026 MovieClip in Symbol 1972 MovieClip [monkey] Frame 38
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Instance of Symbol 811 MovieClip in Symbol 1972 MovieClip [monkey] Frame 39
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 1463 MovieClip in Symbol 1972 MovieClip [monkey] Frame 41
onClipEvent (load) {
_parent._visible = true;
}
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Instance of Symbol 1026 MovieClip in Symbol 1972 MovieClip [monkey] Frame 43
onClipEvent (enterFrame) {
_parent.waiting_to_die();
}
Instance of Symbol 1969 MovieClip in Symbol 1972 MovieClip [monkey] Frame 44
onClipEvent (enterFrame) {
if (_parent.is_falling) {
_parent.fall_down();
}
_parent.waiting_to_die();
}
Instance of Symbol 840 MovieClip in Symbol 1972 MovieClip [monkey] Frame 46
onClipEvent (enterFrame) {
}
Symbol 2009 MovieClip Frame 15
if ((!_root.stage.ground.hitTest(_parent._x, _parent._y + 16, true)) and (!_root.stage.branches.hitTest(_parent._x, _parent._y + 16, true))) {
_parent._y = _parent._y + _parent.fallSpeed;
this.gotoAndPlay(13);
}
Symbol 2009 MovieClip Frame 39
_parent.removeClip();
Symbol 2036 MovieClip Frame 30
_parent.removeClip();
Symbol 2042 MovieClip [weapon] Frame 1
function select_weapon() {
if (this.weapon_selected == 1) {
this.gotoAndStop("nrm_in_air");
this.moveSpeed = 2;
} else if (this.weapon_selected == 2) {
this.gotoAndStop("bullet");
this._xscale = direction;
this.moveSpeed = 2.5;
} else if (this.weapon_selected == 3) {
this.gotoAndStop("brd_poop");
this.moveSpeed = 2;
} else {
this._xscale = direction;
this.moveSpeed = 2;
if (this.typeThrow == 2) {
this.gotoAndStop("spear_2");
} else {
this.gotoAndStop("spear");
}
}
}
function move_in_air() {
if (this.typeThrow == 0) {
if (direction == -100) {
this._x = this._x - this.moveSpeed;
if (this._x < 2) {
this.removeClip();
}
this.hit_anything();
} else {
this._x = this._x + this.moveSpeed;
if (288 < this._x) {
this.removeClip();
}
this.hit_anything();
}
} else if (this.typeThrow == 1) {
this._y = this._y + this.moveSpeed;
if (((288 < this._y) or _root.stage.branches.hitTest(this._x, this._y, true)) or _root.stage.ground.hitTest(this._x, this._y, true)) {
this.removeClip();
}
this.hit_anything();
} else {
this._y = this._y - this.moveSpeed;
if ((this._y < 2) or _root.stage.branches.hitTest(this._x, this._y, true)) {
this.removeClip();
}
this.hit_anything();
}
}
function hit_anything() {
if (this.parentID == 1) {
i = 0;
while (i < _root.stage.background.amt_of_enemies_entered) {
if ((_root["enemy" + i].hitTest(this._x, this._y + 1, true) and (!_root["enemy" + i].not_vunerable)) and (!_root["enemy" + i].dying)) {
_root["enemy" + i].been_hit(this.direction);
this.gotoAndStop("nrm_splat");
} else if (((direction == 100) and _root["enemy" + i].hitTest(this._x + 20, this._y, true)) or (((direction == -100) and _root["enemy" + i].hitTest(this._x - 20, this._y, true)) and (_root["enemy" + i].enemyType == 1))) {
_root["enemy" + i].been_warned(this.direction);
}
i++;
}
j = 0;
while (j < _root.stage.background.amt_of_extras_entered) {
if (_root["extra" + j].hitTest(this._x, this._y, true)) {
if (!_root["extra" + j].dying) {
_root["extra" + j].been_hit();
this.gotoAndStop("nrm_splat");
}
}
j++;
}
k = 0;
while (k < _root.stage.background.amt_of_pots) {
if (_root["pot" + k].hitTest(this._x, this._y, true)) {
_root["pot" + k].gotoAndStop("broken");
this.gotoAndStop("nrm_splat");
}
k++;
}
} else if ((_root.player.hitTest(this._x, this._y, true) and (!_root.player.death_animation)) and (!_root.player.not_vunerable)) {
if (((direction == -100) and (_root.player._xscale == 100)) or ((direction == 100) and (_root.player._xscale == -100))) {
if (this.weapon_selected == 1) {
_root.player.gotoAndStop("fall_back");
} else if (this.weapon_selected == 2) {
_root.player.gotoAndStop("shot_back");
} else if (this.weapon_selected == 3) {
if (_root.player.on_ground) {
_root.player.gotoAndStop("bird_hit");
}
} else if (this.typeThrow == 2) {
if (_root.player.is_hanging) {
_root.player.gotoAndStop("spear_up");
} else {
_root.player.gotoAndStop("spear_up2");
}
} else {
_root.player.gotoAndStop("spear_front");
}
} else if (this.weapon_selected == 1) {
_root.player.gotoAndStop("fall_forward");
} else if (this.weapon_selected == 2) {
_root.player.gotoAndStop("shot_forward");
} else if (this.weapon_selected == 3) {
if (_root.player.on_ground) {
_root.player.gotoAndStop("bird_hit");
}
} else if (this.typeThrow == 2) {
if (_root.player.is_hanging) {
_root.player.gotoAndStop("spear_up");
} else {
_root.player.gotoAndStop("spear_up2");
}
} else {
_root.player.gotoAndStop("spear_back");
}
if (this.weapon_selected == 1) {
this.gotoAndStop("nrm_splat");
} else if ((this.weapon_selected == 2) or (this.weapon_selected == 4)) {
this.removeMovieClip();
} else if (((this.typeThrow == 1) and (!_root.player.is_hanging)) and _root.player.on_ground) {
this.gotoAndStop("brd_splat");
this._xscale = _root.player._xscale;
this._x = _root.player._x;
this._y = _root.player._y;
}
}
}
function fall() {
if ((!_root.stage.ground.hitTest(this._x, this._y + 16, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 16, true))) {
this._y = this._y + this.fallSpeed;
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 16, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 16, true)) {
this._y = this._y - i;
return;
}
i--;
}
}
}
function removeClip() {
this.removeMovieClip();
}
fall_loaded = false;
fallSpeed = 2;
hit_ground = false;
descend_distance = 50;
descending_distance = 20;
this.select_weapon();
Instance of Symbol 1982 MovieClip in Symbol 2042 MovieClip [weapon] Frame 2
onClipEvent (enterFrame) {
_parent.move_in_air();
}
Instance of Symbol 2010 MovieClip in Symbol 2042 MovieClip [weapon] Frame 3
onClipEvent (enterFrame) {
_parent.fall();
}
Instance of Symbol 1982 MovieClip in Symbol 2042 MovieClip [weapon] Frame 4
onClipEvent (enterFrame) {
_parent.move_in_air();
}
Instance of Symbol 2037 MovieClip in Symbol 2042 MovieClip [weapon] Frame 6
onClipEvent (enterFrame) {
}
Instance of Symbol 1982 MovieClip in Symbol 2042 MovieClip [weapon] Frame 7
onClipEvent (enterFrame) {
_parent.move_in_air();
}
Symbol 2051 MovieClip [green_food] Frame 1
function be_eaten() {
if (_root.player.hitTest(this._x, this._y, true)) {
_root.attach_points(this.idNum, 50, this._x, this._y);
if (20 >= (_root.player.amt_poop + 5)) {
_root.player.amt_poop = _root.player.amt_poop + 5;
} else if (15 < _root.player.amt_poop) {
x = 20 - _root.player.amt_poop;
_root.player.amt_poop = _root.player.amt_poop + x;
}
_root.sb.poop_meter._width = _root.player.amt_poop * 1.5;
if (this.background.food_on_screen == this.background.food_amt_in_stage) {
_root.stage.last_food_eaten = getTimer() / 1000;
}
this.free_space();
_root.stage.background.food_exists = false;
_root.stage.background.food_on_screen = _root.stage.background.food_on_screen - 1;
_root.score = _root.score + 50;
_root.sb.update_score();
this.removeMovieClip();
}
}
function remove_food() {
if (this.background.food_on_screen == this.background.food_amt_in_stage) {
_root.stage.last_food_eaten = getTimer() / 1000;
}
this.free_space();
_root.stage.background.food_exists = false;
_root.stage.background.food_on_screen = _root.stage.background.food_on_screen - 1;
this.removeMovieClip();
}
function free_space() {
if (idNum == 1) {
_root.stage.food_1_exists = false;
} else if (idNum == 2) {
_root.stage.food_2_exists = false;
} else if (idNum == 3) {
_root.stage.food_3_exists = false;
}
}
is_yellow = false;
this.gotoAndPlay("banana_sway");
Instance of Symbol 2050 MovieClip in Symbol 2051 MovieClip [green_food] Frame 2
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Instance of Symbol 2050 MovieClip in Symbol 2051 MovieClip [green_food] Frame 258
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Instance of Symbol 2050 MovieClip in Symbol 2051 MovieClip [green_food] Frame 268
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Instance of Symbol 2050 MovieClip in Symbol 2051 MovieClip [green_food] Frame 278
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Instance of Symbol 2050 MovieClip in Symbol 2051 MovieClip [green_food] Frame 288
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Symbol 2051 MovieClip [green_food] Frame 292
this.remove_food();
Symbol 2059 MovieClip [food] Frame 1
function be_eaten() {
if (_root.player.hitTest(this._x, this._y, true)) {
_root.attach_points(this.idNum, 10, this._x, this._y);
if (20 >= (_root.player.amt_poop + 3)) {
_root.player.amt_poop = _root.player.amt_poop + 3;
} else if (17 < _root.player.amt_poop) {
x = 20 - _root.player.amt_poop;
_root.player.amt_poop = _root.player.amt_poop + x;
}
_root.sb.poop_meter._width = _root.player.amt_poop * 1.5;
if (this.background.food_on_screen == this.background.food_amt_in_stage) {
_root.stage.last_food_eaten = getTimer() / 1000;
}
this.free_space();
_root.stage.background.food_exists = false;
_root.stage.background.food_on_screen = _root.stage.background.food_on_screen - 1;
_root.score = _root.score + 10;
_root.sb.update_score();
this.removeMovieClip();
}
}
function remove_food() {
if (this.background.food_on_screen == this.background.food_amt_in_stage) {
_root.stage.last_food_eaten = getTimer() / 1000;
}
this.free_space();
_root.stage.background.food_exists = false;
_root.stage.background.food_on_screen = _root.stage.background.food_on_screen - 1;
this.removeMovieClip();
}
function free_space() {
if (idNum == 1) {
_root.stage.food_1_exists = false;
} else if (idNum == 2) {
_root.stage.food_2_exists = false;
} else if (idNum == 3) {
_root.stage.food_3_exists = false;
}
}
is_yellow = true;
this.gotoAndPlay("banana_sway");
Instance of Symbol 2050 MovieClip in Symbol 2059 MovieClip [food] Frame 2
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Instance of Symbol 2050 MovieClip in Symbol 2059 MovieClip [food] Frame 256
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Instance of Symbol 2050 MovieClip in Symbol 2059 MovieClip [food] Frame 266
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Instance of Symbol 2050 MovieClip in Symbol 2059 MovieClip [food] Frame 276
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Instance of Symbol 2050 MovieClip in Symbol 2059 MovieClip [food] Frame 286
onClipEvent (enterFrame) {
_parent.be_eaten();
}
Symbol 2059 MovieClip [food] Frame 290
this.remove_food();
Symbol 2164 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 2164 MovieClip Frame 11
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 4);
Symbol 2164 MovieClip Frame 15
_parent.throwComplete = true;
Symbol 2174 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
Symbol 2174 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 2186 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
Symbol 2186 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 2201 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 2201 MovieClip Frame 11
_parent.amtThrown = _parent.amtThrown + 1;
if (_parent._xscale == 100) {
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 2, _parent._x - 5, _parent._y, 4);
} else {
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 2, _parent._x + 5, _parent._y, 4);
}
Symbol 2201 MovieClip Frame 20
_parent.throwComplete = true;
Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 1
function pick_a_direction(x) {
if ((x % 2) == 0) {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
}
function stay_alert() {
if ((((this._y + 10) >= _root.player._y) and (_root.player._y >= (this._y - 10))) and _root.player.on_ground) {
if (((_root._x < this._x) and (this._xscale == 100)) or ((this._x < _root._x) and (this._xscale == -100))) {
this.gotoAndStop("run");
}
}
}
function waiting_for_action() {
if (((_root.player._y - 50) >= this._y) or (this._y >= (_root.player._y + 50))) {
this.gotoAndStop("walk");
} else {
this.gotoAndStop("run");
}
}
function walk() {
if ((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y + 16, true)) and (!_root.stage.ground.hitTest(288, this._y + 16, true))) {
this.turn();
} else if (_root.stage.branches.hitTest(288, this._y - 10, true)) {
this.turn();
} else {
this._x = 288;
}
}
} else if ((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y + 16, true)) and (!_root.stage.ground.hitTest(2, this._y + 16, true))) {
this.turn();
} else if (_root.stage.branches.hitTest(2, this._y - 10, true)) {
this.turn();
} else {
this._x = 2;
}
}
} else {
this.turn();
}
}
function run() {
if ((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y + 16, true)) and (!_root.stage.ground.hitTest(288, this._y + 16, true))) {
this.turn();
} else if (_root.stage.branches.hitTest(288, this._y - 10, true)) {
this.turn();
} else {
this._x = 288;
}
}
} else if ((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y + 16, true)) and (!_root.stage.ground.hitTest(288, this._y + 16, true))) {
this.turn();
} else if (_root.stage.branches.hitTest(2, this._y - 10, true)) {
this.turn();
} else {
this._x = 2;
}
}
} else {
this.turn();
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.fall(this.curr_jump_height);
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + 15, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 15, true))) {
this._y = this._y + valueY;
if (500 < this._y) {
this.fall_die = true;
this.deathComplete = true;
this.waiting_to_die();
}
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 15, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 15, true)) {
this._y = this._y - i;
break;
}
i--;
}
if (!this.dying) {
this.gotoAndStop("walk");
this.on_ground = true;
}
this.fall_loaded = false;
}
}
function waiting_to_fall() {
this.is_on_elevator();
if (((!_root.stage.branches.hitTest(this._x, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) and (!this.on_elevator)) {
if ((this._xscale == 100) and _root.stage.ground.hitTest(this._x - this.runSpeed, this._y + 16, true)) {
this.turn();
} else if ((this._xscale == -100) and _root.stage.ground.hitTest(this._x + this.runSpeed, this._y + 16, true)) {
this.turn();
} else {
this.find_ground();
if (this.no_ground) {
this.turn(this.runSpeed);
} else {
this.gotoAndStop("fall");
this.on_ground = false;
}
}
}
}
function find_ground(dist) {
this.no_ground = true;
j = this._x;
if (this._xscale == 100) {
this.j = this.j + dist;
} else {
this.j = this.j - dist;
}
i = this._y;
while (i < 230) {
if (_root.stage.ground.hitTest(this.j, i, true) or _root.stage.branches.hitTest(this.j, i, true)) {
this.no_ground = false;
return;
}
i++;
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 10;
} else {
this._xscale = 100;
this._x = this._x + 10;
}
}
function adjust_climb_pos() {
if (this._xscale == -100) {
this.climb_pos = 8;
} else {
this.climb_pos = -5;
}
}
function waiting_to_climb() {
this.adjust_climb_pos();
if (_root.stage.ladders.hitTest(this._x + this.climb_pos, this._y, true)) {
if ((((getTimer() / 1000) - this.last_climb_time) >= this.climb_delay) or (this.last_climb_time == 0)) {
if ((_root.player._y + 10) < this._y) {
this.climb_up = true;
this.attempt_climb = true;
this.gotoAndStop("climb");
}
}
}
}
function waiting_to_climb_down() {
this.adjust_climb_pos();
if (_root.stage.ladders.hitTest(this._x + this.climb_pos, this._y + 16, true)) {
if ((((getTimer() / 1000) - this.last_climb_time) >= this.climb_delay) or (this.last_climb_time == 0)) {
if (this._y < (_root.player._y - 16)) {
this.climb_up = false;
this.no_other_ladders_exist = false;
this._y = this._y + 2;
this.gotoAndStop("climb");
}
}
}
}
function climb() {
if (this.climb_up) {
if (_root.stage.ladders.hitTest(this._x, this._y + 10, true)) {
this._y = this._y - this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.attempt_climb = false;
this.last_climb_time = getTimer() / 1000;
this.gotoAndStop("fall");
}
} else if (_root.stage.ladders.hitTest(this._x, this._y + 16, true)) {
this._y = this._y + this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.attempt_climb = false;
this.last_climb_time = getTimer() / 1000;
this.gotoAndStop("fall");
}
}
function waiting_to_normal_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) and (!_root.player.death_animation)) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("normal_throw");
}
}
this.last_throw = getTimer() / 1000;
}
}
}
function waiting_to_up_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((_root.player._y < (this._y - 20)) and (((_root.player._x >= (this._x - 10)) and ((this._x + 10) >= _root.player._x)) and (!_root.player.death_animation))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("up_throw");
}
this.last_throw = getTimer() / 1000;
}
}
}
function if_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function been_hit(dir) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_back");
} else if (((dir == -100) and (this._xscale == -100)) or ((dir == 100) and (this._xscale == 100))) {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_forward");
}
}
function waiting_to_die() {
if (this.deathComplete) {
if (!this.fall_die) {
_root.score = _root.score + 100;
_root.sb.update_score();
}
if (this.on_elevator) {
_root["elevator" + this.elevator_num].user_died = true;
_root["elevator" + this.elevator_num].elev_full = false;
_root["elevator" + this.elevator_num].reset();
}
_root.stage.clean_up(this.idNum, this._x, this._y, this._height / 2, this._width / 2, this._xscale);
}
}
function look_for_elevator() {
if ((((getTimer() / 1000) - this.last_exit_elevator) >= this.delay_enter_elevator) or (this.last_exit_elevator == 0)) {
if (((_root.player._y + 30) < this._y) or (this._y < (_root.player._y - 30))) {
i = 0;
while (i < _root.stage.background.num_of_elevators) {
if (this._xscale == 100) {
if ((_root["elevator" + (i + 1)].cargo.hitTest(this._x - 20, this._y + 16, true) and (!_root["elevator" + (i + 1)].elev_full)) and _root["elevator" + (i + 1)].ready_for_use) {
this.elevator_num = i + 1;
_root["elevator" + this.elevator_num].elev_full = true;
this._x = _root["elevator" + (i + 1)].cargo._x + 20;
this.move_elevator();
}
} else if ((_root["elevator" + (i + 1)].cargo.hitTest(this._x + 10, this._y + 16, true) and (!_root["elevator" + (i + 1)].elev_full)) and _root["elevator" + (i + 1)].ready_for_use) {
this.elevator_num = i + 1;
this._xscale = 100;
_root["elevator" + this.elevator_num].elev_full = true;
this._x = _root["elevator" + (i + 1)].cargo._x + 10;
this.move_elevator();
}
i++;
}
}
}
}
function is_on_elevator() {
i = 0;
while (i < _root.stage.background.num_of_elevators) {
if (_root["elevator" + (i + 1)].cargo.hitTest(this._x + 4, this._y + 16, true) or _root["elevator" + (i + 1)].cargo.hitTest(this._x - 4, this._y + 16, true)) {
this.on_elevator = true;
return;
}
this.on_elevator = false;
i++;
}
}
function move_elevator() {
if ((_root.player._y + 30) < this._y) {
this.moving_up = false;
} else {
(this._y < (_root.player._y - 30));// not popped
}
this.moving_up = true;
this.gotoAndStop("elevate");
}
function move_up() {
if (!_root["elevator" + this.elevator_num].at_top) {
_root["elevator" + this.elevator_num].move_up(idNum);
} else {
if ((this._xscale == -100) and (_root.player._x < this._x)) {
this.turn();
} else {
((this._xscale == 100) and (this._x < _root.player._x));// not popped
}
this.turn();
this.last_exit_elevator = getTimer() / 1000;
_root["elevator" + this.elevator_num].elev_full = false;
this.gotoAndStop("walk");
}
}
function move_down() {
if (!_root["elevator" + this.elevator_num].at_bottom) {
_root["elevator" + this.elevator_num].move_down(idNum);
} else {
if ((this._xscale == -100) and (_root.player._x < this._x)) {
this.turn();
} else {
((this._xscale == 100) and (this._x < _root.player._x));// not popped
}
this.turn();
this.last_exit_elevator = getTimer() / 1000;
_root["elevator" + this.elevator_num].elev_full = false;
this.gotoAndStop("walk");
}
}
walkSpeed = 0.75;
runSpeed = 1;
fallSpeed = 3;
jumpSpeed = 0.75;
climbSpeed = 0.5;
fall_loaded = false;
dying = false;
climb_delay = 2;
last_climb_time = 0;
climb_up = false;
attempt_climb = false;
delay_throw = 1;
last_throw = 0;
throwComplete = false;
not_vunerable = false;
deathComplete = false;
on_elevator = false;
moving_up = false;
last_exit_elevator = 0;
delay_enter_elevator = 5;
amtThrown = 0;
no_ground = false;
on_ground = false;
fall_die = false;
this.pick_a_direction(this.idNum);
this.gotoAndStop("fall");
Instance of Symbol 2133 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 2
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_fall();
_parent.waiting_to_climb();
_parent.waiting_to_climb_down();
_parent.waiting_to_normal_throw();
_parent.waiting_to_up_throw();
_parent.stay_alert();
if (_root.stage.background.num_of_elevators != 0) {
_parent.look_for_elevator();
}
}
Instance of Symbol 2136 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 3
onClipEvent (enterFrame) {
_parent.fall_down();
}
Instance of Symbol 2148 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 4
onClipEvent (enterFrame) {
_parent.run();
_parent.waiting_to_fall();
_parent.waiting_to_climb();
_parent.waiting_to_climb_down();
_parent.waiting_to_normal_throw();
_parent.waiting_to_up_throw();
if (_root.stage.background.num_of_elevators != 0) {
_parent.look_for_elevator();
}
}
Instance of Symbol 2151 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 5
onClipEvent (enterFrame) {
_parent.waiting_for_action();
}
Instance of Symbol 2157 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 6
onClipEvent (enterFrame) {
_parent.climb();
}
Instance of Symbol 2165 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 7
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 2175 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 8
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 2192 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 10
onClipEvent (enterFrame) {
if (_parent.moving_up) {
_parent.move_up();
} else {
_parent.move_down();
}
}
Instance of Symbol 2165 MovieClip in Symbol 2202 MovieClip [tribe_guy_2_enemy] Frame 11
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Symbol 2234 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 2234 MovieClip Frame 11
_parent.amtThrown = _parent.amtThrown + 1;
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 0, _parent._x, _parent._y, 4);
Symbol 2234 MovieClip Frame 15
_parent.throwComplete = true;
Symbol 2243 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
Symbol 2243 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 2254 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
Symbol 2254 MovieClip Frame 85
_parent.deathComplete = true;
_root.stage.enemy_defeated();
Symbol 2268 MovieClip Frame 1
_parent.throwComplete = false;
Symbol 2268 MovieClip Frame 11
_parent.amtThrown = _parent.amtThrown + 1;
if (_parent._xscale == 100) {
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 2, _parent._x - 5, _parent._y, 4);
} else {
_root.attach_weapon(_parent.idNum + 4, _parent.amtThrown, _parent._xscale, false, 2, _parent._x + 5, _parent._y, 4);
}
Symbol 2268 MovieClip Frame 20
_parent.throwComplete = true;
Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 1
function pick_a_direction(x) {
if ((x % 2) == 0) {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 16;
} else {
this._xscale = 100;
this._x = this._x + 16;
}
}
}
function stay_alert() {
if ((((this._y + 10) >= _root.player._y) and (_root.player._y >= (this._y - 10))) and _root.player.on_ground) {
if (((_root._x < this._x) and (this._xscale == 100)) or ((this._x < _root._x) and (this._xscale == -100))) {
this.gotoAndStop("run");
}
}
}
function waiting_for_action() {
if (((_root.player._y - 50) >= this._y) or (this._y >= (_root.player._y + 50))) {
this.gotoAndStop("walk");
} else {
this.gotoAndStop("run");
}
}
function walk() {
if ((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.walkSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y + 16, true)) and (!_root.stage.ground.hitTest(288, this._y + 16, true))) {
this.turn();
} else if (_root.stage.branches.hitTest(288, this._y - 10, true)) {
this.turn();
} else {
this._x = 288;
}
}
} else if ((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.walkSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y + 16, true)) and (!_root.stage.ground.hitTest(2, this._y + 16, true))) {
this.turn();
} else if (_root.stage.branches.hitTest(2, this._y - 10, true)) {
this.turn();
} else {
this._x = 2;
}
}
} else {
this.turn();
}
}
function run() {
if ((this._xscale == -100) and (!_root.stage.branches.hitTest(this._x - 4, this._y - 10, true))) {
this._x = this._x - this.runSpeed;
if (this._x < 2) {
if ((!_root.stage.branches.hitTest(288, this._y + 16, true)) and (!_root.stage.ground.hitTest(288, this._y + 16, true))) {
this.turn();
} else if (_root.stage.branches.hitTest(288, this._y - 10, true)) {
this.turn();
} else {
this._x = 288;
}
}
} else if ((this._xscale == 100) and (!_root.stage.branches.hitTest(this._x + 4, this._y - 10, true))) {
this._x = this._x + this.runSpeed;
if (288 < this._x) {
if ((!_root.stage.branches.hitTest(2, this._y + 16, true)) and (!_root.stage.ground.hitTest(288, this._y + 16, true))) {
this.turn();
} else if (_root.stage.branches.hitTest(2, this._y - 10, true)) {
this.turn();
} else {
this._x = 2;
}
}
} else {
this.turn();
}
}
function fall_down() {
if (!fall_loaded) {
this.curr_jump_height = 0;
this.fall_loaded = true;
}
if (this.curr_jump_height < this.fallSpeed) {
this.curr_jump_height = this.curr_jump_height + this.jumpSpeed;
}
this.fall(this.curr_jump_height);
}
function fall(valueY) {
if ((!_root.stage.ground.hitTest(this._x, this._y + 15, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 15, true))) {
this._y = this._y + valueY;
if (500 < this._y) {
this.fall_die = true;
this.deathComplete = true;
this.waiting_to_die();
}
} else {
i = this.fallSpeed;
while (i >= 1) {
if (_root.stage.ground.hitTest(this._x, (this._y - i) + 15, true) or _root.stage.branches.hitTest(this._x, (this._y - i) + 15, true)) {
this._y = this._y - i;
break;
}
i--;
}
if (!this.dying) {
this.gotoAndStop("walk");
this.on_ground = true;
}
this.fall_loaded = false;
}
}
function waiting_to_fall() {
this.is_on_elevator();
if (((!_root.stage.branches.hitTest(this._x, this._y + 16, true)) and (!_root.stage.ground.hitTest(this._x, this._y + 16, true))) and (!this.on_elevator)) {
if ((this._xscale == 100) and _root.stage.ground.hitTest(this._x - this.runSpeed, this._y + 16, true)) {
this.turn();
} else if ((this._xscale == -100) and _root.stage.ground.hitTest(this._x + this.runSpeed, this._y + 16, true)) {
this.turn();
} else {
this.find_ground();
if (this.no_ground) {
this.turn(this.runSpeed);
} else {
this.gotoAndStop("fall");
this.on_ground = false;
}
}
}
}
function find_ground(dist) {
this.no_ground = true;
j = this._x;
if (this._xscale == 100) {
this.j = this.j + dist;
} else {
this.j = this.j - dist;
}
i = this._y;
while (i < 230) {
if (_root.stage.ground.hitTest(this.j, i, true) or _root.stage.branches.hitTest(this.j, i, true)) {
this.no_ground = false;
return;
}
i++;
}
}
function turn() {
if (this._xscale == 100) {
this._xscale = -100;
this._x = this._x - 10;
} else {
this._xscale = 100;
this._x = this._x + 10;
}
}
function adjust_climb_pos() {
if (this._xscale == -100) {
this.climb_pos = 8;
} else {
this.climb_pos = -5;
}
}
function waiting_to_climb() {
this.adjust_climb_pos();
if (_root.stage.ladders.hitTest(this._x + this.climb_pos, this._y, true)) {
if ((((getTimer() / 1000) - this.last_climb_time) >= this.climb_delay) or (this.last_climb_time == 0)) {
if ((_root.player._y + 10) < this._y) {
this.climb_up = true;
this.attempt_climb = true;
this.gotoAndStop("climb");
}
}
}
}
function waiting_to_climb_down() {
this.adjust_climb_pos();
if (_root.stage.ladders.hitTest(this._x + this.climb_pos, this._y + 16, true)) {
if ((((getTimer() / 1000) - this.last_climb_time) >= this.climb_delay) or (this.last_climb_time == 0)) {
if (this._y < (_root.player._y - 16)) {
this.climb_up = false;
this.no_other_ladders_exist = false;
this._y = this._y + 2;
this.gotoAndStop("climb");
}
}
}
}
function climb() {
if (this.climb_up) {
if (_root.stage.ladders.hitTest(this._x, this._y + 10, true)) {
this._y = this._y - this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.attempt_climb = false;
this.last_climb_time = getTimer() / 1000;
this.gotoAndStop("fall");
}
} else if (_root.stage.ladders.hitTest(this._x, this._y + 16, true)) {
this._y = this._y + this.climbSpeed;
this.gotoAndStop("climb");
} else {
this.attempt_climb = false;
this.last_climb_time = getTimer() / 1000;
this.gotoAndStop("fall");
}
}
function waiting_to_normal_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((((this._y + 5) >= _root.player._y) and (_root.player._y >= (this._y - 5))) and (!_root.player.death_animation)) {
if (((this._xscale == 100) and (this._x < _root.player._x)) or ((this._xscale == -100) and (_root.player._x < this._x))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("normal_throw");
}
}
this.last_throw = getTimer() / 1000;
}
}
}
function waiting_to_up_throw() {
if (((getTimer() / 1000) - this.last_throw) >= this.delay_throw) {
if ((_root.player._y < (this._y - 20)) and (((_root.player._x >= (this._x - 10)) and ((this._x + 10) >= _root.player._x)) and (!_root.player.death_animation))) {
x = random(2);
if (x == 0) {
this.gotoAndStop("up_throw");
}
this.last_throw = getTimer() / 1000;
}
}
}
function if_throw_ended() {
if (this.throwComplete) {
this.gotoAndStop("stand");
}
}
function been_hit(dir) {
if (((dir == -100) and (this._xscale == 100)) or ((dir == 100) and (this._xscale == -100))) {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_back");
} else if (((dir == -100) and (this._xscale == -100)) or ((dir == 100) and (this._xscale == 100))) {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("fall_forward");
}
}
function waiting_to_die() {
if (this.deathComplete) {
if (!this.fall_die) {
_root.score = _root.score + 100;
_root.sb.update_score();
}
if (this.on_elevator) {
_root["elevator" + this.elevator_num].user_died = true;
_root["elevator" + this.elevator_num].elev_full = false;
_root["elevator" + this.elevator_num].reset();
}
_root.stage.clean_up(this.idNum, this._x, this._y, this._height / 2, this._width / 2, this._xscale);
}
}
function look_for_elevator() {
if ((((getTimer() / 1000) - this.last_exit_elevator) >= this.delay_enter_elevator) or (this.last_exit_elevator == 0)) {
if (((_root.player._y + 30) < this._y) or (this._y < (_root.player._y - 30))) {
i = 0;
while (i < _root.stage.background.num_of_elevators) {
if (this._xscale == 100) {
if ((_root["elevator" + (i + 1)].cargo.hitTest(this._x - 20, this._y + 16, true) and (!_root["elevator" + (i + 1)].elev_full)) and _root["elevator" + (i + 1)].ready_for_use) {
this.elevator_num = i + 1;
_root["elevator" + this.elevator_num].elev_full = true;
this._x = _root["elevator" + (i + 1)].cargo._x + 20;
this.move_elevator();
}
} else if ((_root["elevator" + (i + 1)].cargo.hitTest(this._x + 10, this._y + 16, true) and (!_root["elevator" + (i + 1)].elev_full)) and _root["elevator" + (i + 1)].ready_for_use) {
this.elevator_num = i + 1;
this._xscale = 100;
_root["elevator" + this.elevator_num].elev_full = true;
this._x = _root["elevator" + (i + 1)].cargo._x + 10;
this.move_elevator();
}
i++;
}
}
}
}
function is_on_elevator() {
i = 0;
while (i < _root.stage.background.num_of_elevators) {
if (_root["elevator" + (i + 1)].cargo.hitTest(this._x + 4, this._y + 16, true) or _root["elevator" + (i + 1)].cargo.hitTest(this._x - 4, this._y + 16, true)) {
this.on_elevator = true;
return;
}
this.on_elevator = false;
i++;
}
}
function move_elevator() {
if ((_root.player._y + 30) < this._y) {
this.moving_up = false;
} else {
(this._y < (_root.player._y - 30));// not popped
}
this.moving_up = true;
this.gotoAndStop("elevate");
}
function move_up() {
if (!_root["elevator" + this.elevator_num].at_top) {
_root["elevator" + this.elevator_num].move_up(idNum);
} else {
if ((this._xscale == -100) and (_root.player._x < this._x)) {
this.turn();
} else {
((this._xscale == 100) and (this._x < _root.player._x));// not popped
}
this.turn();
this.last_exit_elevator = getTimer() / 1000;
_root["elevator" + this.elevator_num].elev_full = false;
this.gotoAndStop("walk");
}
}
function move_down() {
if (!_root["elevator" + this.elevator_num].at_bottom) {
_root["elevator" + this.elevator_num].move_down(idNum);
} else {
if ((this._xscale == -100) and (_root.player._x < this._x)) {
this.turn();
} else {
((this._xscale == 100) and (this._x < _root.player._x));// not popped
}
this.turn();
this.last_exit_elevator = getTimer() / 1000;
_root["elevator" + this.elevator_num].elev_full = false;
this.gotoAndStop("walk");
}
}
walkSpeed = 0.75;
runSpeed = 1;
fallSpeed = 3;
jumpSpeed = 0.75;
climbSpeed = 0.5;
fall_loaded = false;
dying = false;
climb_delay = 2;
last_climb_time = 0;
climb_up = false;
attempt_climb = false;
delay_throw = 1;
last_throw = 0;
throwComplete = false;
not_vunerable = false;
deathComplete = false;
on_elevator = false;
moving_up = false;
last_exit_elevator = 0;
delay_enter_elevator = 5;
amtThrown = 0;
no_ground = false;
on_ground = false;
fall_die = false;
this.pick_a_direction(this.idNum);
this.gotoAndStop("fall");
Instance of Symbol 2133 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 2
onClipEvent (enterFrame) {
_parent.walk();
_parent.waiting_to_fall();
_parent.waiting_to_climb();
_parent.waiting_to_climb_down();
_parent.waiting_to_normal_throw();
_parent.waiting_to_up_throw();
_parent.stay_alert();
if (_root.stage.background.num_of_elevators != 0) {
_parent.look_for_elevator();
}
}
Instance of Symbol 2136 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 3
onClipEvent (enterFrame) {
_parent.fall_down();
}
Instance of Symbol 2148 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 4
onClipEvent (enterFrame) {
_parent.run();
_parent.waiting_to_fall();
_parent.waiting_to_climb();
_parent.waiting_to_climb_down();
_parent.waiting_to_normal_throw();
_parent.waiting_to_up_throw();
if (_root.stage.background.num_of_elevators != 0) {
_parent.look_for_elevator();
}
}
Instance of Symbol 2151 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 5
onClipEvent (enterFrame) {
_parent.waiting_for_action();
}
Instance of Symbol 2157 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 6
onClipEvent (enterFrame) {
_parent.climb();
}
Instance of Symbol 2165 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 7
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Instance of Symbol 2175 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 8
onClipEvent (enterFrame) {
_parent.waiting_to_die();
_parent.fall_down();
}
Instance of Symbol 2192 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 10
onClipEvent (enterFrame) {
if (_parent.moving_up) {
_parent.move_up();
} else {
_parent.move_down();
}
}
Instance of Symbol 2165 MovieClip in Symbol 2269 MovieClip [tribe_guy_1_enemy] Frame 11
onClipEvent (enterFrame) {
_parent.if_throw_ended();
}
Symbol 2301 MovieClip [elevator] Frame 1
function default() {
this.top.gotoAndStop("stop");
this.bottom.gotoAndStop("stop");
this.right_rope._x = top_x;
this.right_rope._y = top_y + 14;
this.right_rope._height = this.bottom_y - this.top_y;
this.middle_rope._x = top_x;
this.middle_rope._y = top_y + 14;
this.middle_rope._height = this.right_rope._height;
this.left_rope._x = top_x;
this.left_rope._y = top_y + 14;
this.left_rope._height = 2;
this.top._x = top_x;
this.top._y = top_y;
this.bottom._x = top_x;
this.bottom._y = bottom_y;
this.cargo._x = top_x;
this.cargo._y = cargo_y;
this.weight._x = top_x - 10;
this.weight._y = top_y + 10;
_root["weight" + idNum]._x = top_x - 10;
_root["weight" + idNum]._y = top_y + 10;
this.at_top = false;
this.at_bottom = true;
this.self_reset = false;
this.user_died = false;
this.elev_full = false;
this.ready_for_use = true;
}
function move_down(i) {
if (this.cargo._y < this.cargo_start_y) {
this.self_reset = false;
this.ready_for_use = false;
this.top.gotoAndStop("down");
this.bottom.gotoAndStop("down");
this.cargo._y = this.cargo._y + this.moveSpeed;
this.middle_rope._height = this.middle_rope._height + this.moveSpeed;
_root["weight" + idNum]._y = _root["weight" + idNum]._y - this.moveSpeed;
this.left_rope._height = this.left_rope._height - this.moveSpeed;
_root["enemy" + i]._y = _root["enemy" + i]._y + this.moveSpeed;
} else {
this.at_top = false;
this.at_bottom = true;
this.ready_for_use = true;
this.stop_move();
}
}
function move_up(i) {
if (this.top._y < (this.cargo._y - this.dist_from_y)) {
this.ready_for_use = false;
this.top.gotoAndStop("up");
this.bottom.gotoAndStop("up");
this.cargo._y = this.cargo._y - this.moveSpeed;
this.middle_rope._height = this.middle_rope._height - this.moveSpeed;
_root["weight" + idNum]._y = _root["weight" + idNum]._y + this.moveSpeed;
this.left_rope._height = this.left_rope._height + this.moveSpeed;
_root["enemy" + i]._y = _root["enemy" + i]._y - this.moveSpeed;
} else {
this.last_use = getTimer() / 1000;
this.at_bottom = false;
this.at_top = true;
self_reset = true;
this.ready_for_use = true;
this.stop_move();
}
}
function reset() {
if (((this.reset_delay < ((getTimer() / 1000) - this.last_use)) and (this.at_top and this.self_reset)) or this.user_died) {
if ((this.at_top and this.self_reset) or this.user_died) {
this.ready_for_use = false;
this.top.gotoAndStop("down");
this.bottom.gotoAndStop("down");
this.cargo._y = this.cargo._y + this.moveSpeed;
this.middle_rope._height = this.middle_rope._height + this.moveSpeed;
_root["weight" + idNum]._y = _root["weight" + idNum]._y - this.moveSpeed;
this.left_rope._height = this.left_rope._height - this.moveSpeed;
if (this.cargo._y == this.cargo_start_y) {
this.at_top = false;
this.at_bottom = true;
this.self_reset = false;
this.user_died = false;
this.elev_full = false;
this.ready_for_use = true;
this.stop_move();
}
}
}
}
function stop_move() {
this.top.gotoAndStop("stop");
this.bottom.gotoAndStop("stop");
}
cargo_start_y = cargo_y;
at_top = false;
at_bottom = true;
ready_for_use = true;
self_reset = false;
last_use = 0;
reset_delay = 6;
user_died = false;
elev_full = false;
this.gotoAndStop("elevator");
this.top.gotoAndStop("stop");
this.bottom.gotoAndStop("stop");
this.cargo.gotoAndStop("elevator");
this.right_rope.gotoAndStop("r_rope");
this.middle_rope.gotoAndStop("m_rope");
this.left_rope.gotoAndStop("l_rope");
this.right_rope._x = top_x;
this.right_rope._y = top_y + 14;
this.right_rope._height = this.bottom_y - this.top_y;
this.middle_rope._x = top_x;
this.middle_rope._y = top_y + 14;
this.middle_rope._height = this.right_rope._height;
this.left_rope._x = top_x;
this.left_rope._y = top_y + 14;
this.left_rope._height = 2;
this.top._x = top_x;
this.top._y = top_y;
this.bottom._x = top_x;
this.bottom._y = bottom_y;
this.cargo._x = top_x;
this.cargo._y = cargo_y;
this.weight._x = top_x - 10;
this.weight._y = top_y + 10;
this.max_height = this.top._y - this.dist_from_y;
moveSpeed = 0.25;
_root.attachMovie("weight", "weight" + idNum, idNum);
_root["weight" + idNum]._x = top_x - 10;
_root["weight" + idNum]._y = top_y + 10;
_root["weight" + idNum].gotoAndStop("boar");
Instance of Symbol 2300 MovieClip in Symbol 2301 MovieClip [elevator] Frame 2
onClipEvent (enterFrame) {
_parent.reset();
}
Symbol 2340 MovieClip [score_board] Frame 1
function update_score() {
this.display_score(_root.score);
}
function display_score(x) {
this.s100000s = Math.floor(x / 100000);
if ((x / 100000) < 1) {
this.s100000s = 0;
} else {
x = x - (s100000s * 100000);
}
this.s10000s = Math.floor(x / 10000);
if ((x / 10000) < 1) {
this.s10000s = 0;
} else {
x = x - (s10000s * 10000);
}
this.s1000s = Math.floor(x / 1000);
if ((x / 1000) < 1) {
this.s1000s = 0;
} else {
x = x - (s1000s * 1000);
}
this.s100s = Math.floor(x / 100);
if ((x / 100) < 1) {
this.s100s = 0;
} else {
x = x - (s100s * 100);
}
this.s10s = Math.floor(x / 10);
if ((x / 10) < 1) {
this.s10s = 0;
} else {
x = x - (s10s * 10);
}
this.s1s = x;
this.score100000s.gotoAndStop("num" + s100000s);
this.score10000s.gotoAndStop("num" + s10000s);
this.score1000s.gotoAndStop("num" + s1000s);
this.score100s.gotoAndStop("num" + s100s);
this.score10s.gotoAndStop("num" + s10s);
this.score1s.gotoAndStop("num" + s1s);
}
function update_lives() {
this.display_lives(_root.player.lives);
}
function display_lives(x) {
this.lives10s = Math.floor(x / 10);
if ((x / 10) < 1) {
this.lives10s = 0;
} else {
x = x - (this.lives10s * 10);
}
this.lives1s = x;
this.life10s.gotoAndStop("num" + lives10s);
this.life1s.gotoAndStop("num" + lives1s);
}
lives10s = 0;
lives1s = 0;
s100000s = 0;
s10000s = 0;
s1000s = 0;
s100s = 0;
s10s = 0;
s1s = 0;
this.update_score();
Symbol 2345 MovieClip [load_board] Frame 1
l10s = 0;
l1s = 0;
x = _root.stage.level;
this.gotoAndStop("appear");
l10s = Math.floor(x / 10);
if ((x / 10) < 1) {
l10s = 0;
} else {
x = x - (l10s * 10);
}
l1s = Math.floor(x);
if (l10s == 0) {
this.a._visible = false;
} else {
this.a._visible = true;
}
this.a.gotoAndStop("num" + l10s);
this.b.gotoAndStop("num" + l1s);
Symbol 2351 MovieClip Frame 1
function display() {
x = overall_acc;
this.s100s = Math.floor(x / 100);
if ((x / 100) < 1) {
this.s100s = 0;
} else {
x = x - (s100s * 100);
}
this.s10s = Math.floor(x / 10);
if ((x / 10) < 1) {
this.s10s = 0;
} else {
x = x - (s10s * 10);
}
this.s1s = x;
if (s100s == 0) {
this.a._visible = false;
} else {
this.a._visible = true;
}
if ((s100s == 0) and (s10s == 0)) {
this.b._visible = false;
} else {
this.b._visible = true;
}
this.a.gotoAndStop("num" + s100s);
this.b.gotoAndStop("num" + s10s);
this.c.gotoAndStop("num" + s1s);
}
s100s = 0;
s10s = 0;
s1s = 0;
Symbol 2353 MovieClip Frame 1
function display() {
x = stage_acc;
this.s100s = Math.floor(x / 100);
if ((x / 100) < 1) {
this.s100s = 0;
} else {
x = x - (s100s * 100);
}
this.s10s = Math.floor(x / 10);
if ((x / 10) < 1) {
this.s10s = 0;
} else {
x = x - (s10s * 10);
}
this.s1s = x;
if (s100s == 0) {
this.a._visible = false;
} else {
this.a._visible = true;
}
if ((s100s == 0) and (s10s == 0)) {
this.b._visible = false;
} else {
this.b._visible = true;
}
this.a.gotoAndStop("num" + s100s);
this.b.gotoAndStop("num" + s10s);
this.c.gotoAndStop("num" + s1s);
}
s100s = 0;
s10s = 0;
s1s = 0;
Symbol 2358 MovieClip Frame 1
function display() {
m = minutes;
s = seconds;
this.m10s = Math.floor(m / 10);
if ((m / 10) < 1) {
this.m10s = 0;
} else {
m = m - (m10s * 10);
}
this.m1s = m;
this.s10s = Math.floor(s / 10);
if ((s / 10) < 1) {
this.s10s = 0;
} else {
s = s - (s10s * 10);
}
this.s1s = s;
this.a.gotoAndStop("num" + m10s);
this.b.gotoAndStop("num" + m1s);
this.c.gotoAndStop("num" + s10s);
this.d.gotoAndStop("num" + s1s);
}
minutes = 0;
seconds = 0;
m10s = 0;
m1s = 0;
s10s = 0;
s1s = 0;
Symbol 2359 MovieClip [cleared_board] Frame 1
this.acc_total._visible = false;
this.o_acc_total._visible = false;
this.time._visible = false;
Symbol 2384 MovieClip Frame 76
_parent.gotoAndStop("trap_open");
Symbol 2386 MovieClip [trap] Frame 1
function snare_trap() {
if (((this._y + 2) >= _root.player._y) and (_root.player._y >= (this._y - 2))) {
if ((_root.player._xscale == 100) and ((_root.player._x - 3) < this._x)) {
if (this.hitTest(_root.player._x - 15, _root.player._y, true)) {
this.gotoAndStop("trap_shut");
this._xscale = 100;
_root.player.gotoAndStop("trapped");
_root.player._x = this._x;
_root.player._y = this._y;
}
} else if ((_root.player._xscale == -100) and (this._x < (_root.player._x + 3))) {
if (this.hitTest(_root.player._x + 17, _root.player._y, true)) {
this.gotoAndStop("trap_shut");
this._xscale = -100;
_root.player.gotoAndStop("trapped");
_root.player._x = this._x;
_root.player._y = this._y;
}
}
}
}
this.gotoAndStop("trap_open");
Instance of Symbol 2363 MovieClip in Symbol 2386 MovieClip [trap] Frame 2
onClipEvent (enterFrame) {
_parent.snare_trap();
}
Symbol 2403 MovieClip Frame 1
_root.attach_points(_parent.idNum, 100, _parent._x, _parent._y);
_parent.dying = true;
Symbol 2403 MovieClip Frame 24
_parent.attach_feathers();
_parent.gotoAndStop("fall");
Symbol 2418 MovieClip Frame 51
_root.stage.background.extras_on_screen = _root.stage.background.extras_on_screen - 1;
_root.stage.last_extra_entered = getTimer() / 1000;
_parent.removeMovieClip();
Symbol 2419 MovieClip [bird_extra] Frame 1
function fly() {
if (this._xscale == -100) {
this._x = this._x - this.flySpeed;
if (this._x < 2) {
this._x = 288;
}
} else if (this._xscale == 100) {
this._x = this._x + this.flySpeed;
if (288 < this._x) {
this._x = 2;
}
}
}
function wait_to_poop() {
if (((getTimer() / 1000) - this.last_drop) >= this.delay_drop) {
_root.attach_weapon(this.idNum + 4, this.amtThrown, this._xscale, false, 1, this._x, this._y, 3);
this.last_drop = getTimer() / 1000;
}
}
function been_hit() {
_root.amt_ammo_hit = _root.amt_ammo_hit + 1;
this.gotoAndStop("been_hit");
}
function fall() {
if ((!_root.stage.ground.hitTest(this._x, this._y + 12, true)) and (!_root.stage.branches.hitTest(this._x, this._y + 12, true))) {
this._y = this._y + fallSpeed;
} else {
this.gotoAndStop("hit_ground");
}
if (_root.stage.pool.hitTest(this._x, this._y - 20, true)) {
this.gotoAndStop("hit_ground");
}
}
function attach_feathers() {
layerNum = idNum * 100;
layerNum = layerNum + amtThrown;
this.attachMovie("brd_feathers", "feathers", layerNum);
}
flySpeed = 0.75;
fallSpeed = 1.5;
delay_drop = 2;
last_drop = 0;
dying = false;
this.gotoAndStop("fly");
Instance of Symbol 2394 MovieClip in Symbol 2419 MovieClip [bird_extra] Frame 2
onClipEvent (enterFrame) {
_parent.fly();
_parent.wait_to_poop();
}
Instance of Symbol 2404 MovieClip in Symbol 2419 MovieClip [bird_extra] Frame 3
onClipEvent (enterFrame) {
}
Instance of Symbol 2010 MovieClip in Symbol 2419 MovieClip [bird_extra] Frame 4
onClipEvent (enterFrame) {
_parent.fall();
}
Instance of Symbol 2037 MovieClip in Symbol 2419 MovieClip [bird_extra] Frame 5
onClipEvent (enterFrame) {
}
Symbol 2422 MovieClip [warp] Frame 1
function entered_warp() {
if (_root.player.hitTest(this._x, this._y, true) and (this.dir == _root.player._xscale)) {
_root.player._x = this.tele_to_x;
_root.player._y = this.tele_to_y;
if (this.switch_dir) {
if (_root.player._xscale == 100) {
_root.player._xscale = -100;
} else {
_root.player._xscale = 100;
}
}
}
i = 0;
while (i < _root.stage.background.amt_of_enemies_entered) {
if (_root["enemy" + i].hitTest(this._x, this._y, true) and (this.dir == _root["enemy" + i]._xscale)) {
if ((_root["enemy" + i].enemyType == 1) or (_root["enemy" + i].enemyType == 5)) {
_root["enemy" + i]._x = this.tele_to_x;
_root["enemy" + i]._y = this.tele_to_y;
if (this.switch_dir) {
if (_root["enemy" + i]._xscale == 100) {
_root["enemy" + i]._xscale = -100;
} else {
_root["enemy" + i]._xscale = 100;
}
}
}
}
i++;
}
}
this.gotoAndStop("warp");
Instance of Symbol 2421 MovieClip in Symbol 2422 MovieClip [warp] Frame 2
onClipEvent (enterFrame) {
_parent.entered_warp();
}
Symbol 2443 MovieClip Frame 1
_root.attach_points(_parent.idNum, 10, _parent._x, _parent._y);
Symbol 2443 MovieClip Frame 16
_parent.add_object();
Symbol 2443 MovieClip Frame 45
_root.score = _root.score + 10;
_root.sb.update_score();
_parent.removeMovieClip();
Symbol 2444 MovieClip [pots] Frame 1
function add_object() {
x = random(4);
if (x == 0) {
_root.attachMovie("1up", "1up" + this.idNum, 30 + (this.idNum + 1));
_root["1up" + this.idNum]._x = this._x - 2;
_root["1up" + this.idNum]._y = this._y;
_root["1up" + this.idNum].idNum = idNum;
} else if ((x == 1) and (5 < _root.stage.level)) {
_root.attachMovie("fish", "fish" + this.idNum, 30 + (this.idNum + 1));
_root["fish" + this.idNum]._x = this._x - 2;
_root["fish" + this.idNum]._y = this._y + 3;
_root["fish" + this.idNum].idNum = idNum;
}
}
this.gotoAndStop("not_broken");
Symbol 2465 MovieClip [bridge1] Frame 1
function hit_anything() {
if (!char_on_bridge) {
i = 0;
while (i < _root.stage.background.amt_of_enemies_entered) {
if (_root["enemy" + i].hitTest(this._x, this._y, true)) {
this.gotoAndStop("phase2");
char_on_bridge = true;
break;
}
this.char_on_bridge = false;
i++;
}
if (_root.player.hitTest(this._x, this._y, true)) {
this.gotoAndStop("phase2");
char_on_bridge = true;
}
}
if (!char_on_bridge) {
this.gotoAndStop("phase1");
}
}
char_on_bridge = false;
this.gotoAndStop("phase1");
Instance of Symbol 2460 MovieClip in Symbol 2465 MovieClip [bridge1] Frame 2
onClipEvent (enterFrame) {
}
Symbol 2470 MovieClip [brd_feathers] Frame 16
this.removeMovieClip();
Symbol 2517 MovieClip Frame 121
_parent.gotoAndStop("swim");
Symbol 2518 MovieClip [croc_extra] Frame 1
function swim() {
if (this._xscale == -100) {
this._x = this._x - this.swimSpeed;
if (this._x < 2) {
this._x = 288;
}
} else if (this._xscale == 100) {
this._x = this._x + this.swimSpeed;
if (288 < this._x) {
this._x = -100;
}
}
}
function look_for_monkey() {
if (_root.player.is_drowning) {
this.swimSpeed = 0.5;
} else {
this.swimSpeed = 0.2;
}
}
function waiting_to_attack() {
if (this._xscale == 100) {
if ((_root.player.hitTest(this._x + 75, this._y, true) and _root.player.is_drowning) and (!_root.player.not_vunerable)) {
this.gotoAndStop("attack");
if (_root.player._xscale == 100) {
_root.player.gotoAndStop("croc_attack_a");
_root.player._x = this._x + 68;
_root.player._y = this._y - 9;
} else {
_root.player.gotoAndStop("croc_attack_b");
_root.player._xscale = 100;
_root.player._x = this._x + 68;
_root.player._y = this._y - 9;
}
}
}
}
swimSpeed = 0.15;
this.gotoAndStop("swim");
Instance of Symbol 2476 MovieClip in Symbol 2518 MovieClip [croc_extra] Frame 2
onClipEvent (enterFrame) {
_parent.swim();
_parent.look_for_monkey();
_parent.waiting_to_attack();
}
Instance of Symbol 2037 MovieClip in Symbol 2518 MovieClip [croc_extra] Frame 3
onClipEvent (enterFrame) {
}
Symbol 2524 MovieClip Frame 1
function move_cursor() {
if (Key.isDown(Key.DOWN) and (this._y == this.y_1)) {
this._y = y_2;
this.continue_selected = false;
} else if (Key.isDown(Key.UP) and (this._y == this.y_2)) {
this._y = y_1;
this.continue_selected = true;
}
}
y_1 = 106;
y_2 = 130;
this.continue_selected = true;
this._x = 95;
this._y = y_1;
this.gotoAndStop(2);
Instance of Symbol 2523 MovieClip in Symbol 2524 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.move_cursor();
}
Symbol 2527 MovieClip [game_over_board] Frame 1
function select_option() {
if (this.cursor.continue_selected) {
if (Key.isDown(Key.ENTER)) {
_root.stage.player_continue();
this.removeMovieClip();
}
} else if (Key.isDown(Key.ENTER)) {
_root.stage.remove_level_objects();
_root.start_screen();
_root.sb.removeMovieClip();
this.removeMovieClip();
}
}
function reset_elevators() {
if (_root.stage.level == 11) {
_root.elevator1.default();
} else if (_root.stage.level == 17) {
_root.elevator1.default();
_root.elevator2.default();
}
}
this.gotoAndPlay(2);
Symbol 2527 MovieClip [game_over_board] Frame 49
_root.stage.remove_enemies();
_root.stage.remove_food();
_root.stage.remove_traps();
_root.stage.remove_extras();
_root.stage.remove_pots();
this.reset_elevators();
this.gotoAndStop(50);
Instance of Symbol 2520 MovieClip in Symbol 2527 MovieClip [game_over_board] Frame 50
onClipEvent (enterFrame) {
_parent.select_option();
}
Symbol 2535 MovieClip [1up] Frame 1
function grabbed() {
if (_root.player.hitTest(this._x, this._y, true)) {
_root.player.lives = _root.player.lives + 1;
_root.sb.update_lives();
_root.attach_points(this.idNum, 0, this._x, this._y);
this.removeMovieClip();
}
}
idNum = 0;
this.gotoAndPlay("exist");
Instance of Symbol 2530 MovieClip in Symbol 2535 MovieClip [1up] Frame 2
onClipEvent (enterFrame) {
_parent.grabbed();
}
Symbol 2535 MovieClip [1up] Frame 290
this.removeMovieClip();
Symbol 2545 MovieClip [points] Frame 1
function remove() {
if (this.exist_time < ((getTimer() / 1000) - this.entrance_time)) {
this.removeMovieClip();
}
}
function move_up() {
this._y = this._y - 0.5;
}
entrance_time = getTimer() / 1000;
exist_time = 0.75;
Instance of Symbol 2537 MovieClip in Symbol 2545 MovieClip [points] Frame 2
onClipEvent (enterFrame) {
_parent.remove();
_parent.move_up();
}
Symbol 2556 MovieClip Frame 120
this.gotoAndPlay(1);
Symbol 2556 MovieClip Frame 156
_parent.removeMovieClip();
Symbol 2598 MovieClip Frame 100
_parent.flop();
Symbol 2599 MovieClip Frame 32
_parent.removeMovieClip();
Symbol 2600 MovieClip [fish] Frame 1
function bite() {
if (_root.player.hitTest(this._x, this._y, true) and (((getTimer() / 1000) - this.last_bite) >= this.bite_wait)) {
if (_root.player.on_ground) {
this.gotoAndStop("bite");
this._xscale = _root.player._xscale;
if (this._xscale == 100) {
this._x = _root.player._x - 16;
} else {
this._x = _root.player._x + 16;
}
this._y = _root.player._y - 16;
_root.player.gotoAndStop("fsh_bite");
}
}
}
function flop() {
this.gotoAndStop("flop");
this.last_bite = getTimer() / 1000;
this._x = this.flop_x;
this._y = this.flop_y;
}
function waiting_to_die() {
if (((getTimer() / 1000) - this.alive_time) >= this.live_out_of_water) {
this.gotoAndStop("dying");
}
}
flop_x = this._x;
flop_y = this._y;
last_bite = 0;
bite_wait = 2;
live_out_of_water = 6;
alive_time = getTimer() / 1000;
this.gotoAndStop("flop");
Instance of Symbol 2557 MovieClip in Symbol 2600 MovieClip [fish] Frame 2
onClipEvent (enterFrame) {
_parent.bite();
_parent.waiting_to_die();
}
Instance of Symbol 2037 MovieClip in Symbol 2600 MovieClip [fish] Frame 3
onClipEvent (enterFrame) {
}
Symbol 2608 MovieClip [end_screen] Frame 1
function wait() {
if (show_time < ((getTimer() / 1000) - enter_time)) {
_root.start_screen();
this.removeMovieClip();
}
}
show_time = 10;
enter_time = getTimer() / 1000;
this.gotoAndStop("title");
Instance of Symbol 2605 MovieClip in Symbol 2608 MovieClip [end_screen] Frame 2
onClipEvent (enterFrame) {
_parent.wait();
}
Symbol 2612 MovieClip Frame 1
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 80
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 90
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 100
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 110
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 120
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 130
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 140
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 150
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 160
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 170
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 180
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 190
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 200
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 210
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 219
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 299
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 309
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 389
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 399
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 409
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 419
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 429
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 439
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 449
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 459
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2612 MovieClip Frame 470
if (_root.game_paused) {
this.prevFrame();
}
Symbol 2613 MovieClip Frame 1
function wait() {
if (this.wait_time < ((getTimer() / 1000) - this.waiting_time)) {
this.gotoAndStop("walk");
}
}
function walk() {
if (this.walk_to < this._x) {
this._x = this._x - this.walkSpeed;
} else {
this.gotoAndStop("stand");
}
}
this._xscale = -100;
walk_to = 250;
walkSpeed = 0.5;
wait_time = 2;
waiting_time = getTimer() / 1000;
this.gotoAndStop("not_here");
Instance of Symbol 2605 MovieClip in Symbol 2613 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent.wait();
}
Instance of Symbol 2611 MovieClip in Symbol 2613 MovieClip Frame 3
onClipEvent (enterFrame) {
_parent.walk();
}
Symbol 2616 MovieClip Frame 1
function flicker() {
if (((getTimer() / 1000) - this.last_flicker) >= this.flicker_time) {
if (this._visible) {
this._visible = false;
} else {
this._visible = true;
}
this.last_flicker = getTimer() / 1000;
}
}
flicker_time = 0.5;
last_flicker = getTimer() / 1000;
this.gotoAndStop("display");
Instance of Symbol 2615 MovieClip in Symbol 2616 MovieClip Frame 2
onClipEvent (mouseDown) {
_root.begin_game();
}
onClipEvent (enterFrame) {
_parent.flicker();
}
Symbol 2619 MovieClip [start_screen] Frame 1
this.gotoAndStop("title");
Instance of Symbol 2037 MovieClip in Symbol 2619 MovieClip [start_screen] Frame 2
onClipEvent (enterFrame) {
}
Symbol 2622 MovieClip [story_message] Frame 1
this.gotoAndStop("display");
Instance of Symbol 2621 MovieClip in Symbol 2622 MovieClip [story_message] Frame 2
onClipEvent (mouseDown) {
_root.story.wait_to_start();
}
onClipEvent (enterFrame) {
}
Symbol 2624 MovieClip [story] Frame 1
function fade_in() {
if (1 < this.fade._alpha) {
this.fade._alpha = this.fade._alpha - fade_speed;
} else {
this.fade_complete = true;
}
}
function fade_out() {
if (this.fade._alpha < 100) {
this.fade._alpha = this.fade._alpha + fade_speed;
} else {
this.fade_complete = true;
}
}
function action_director() {
if (scene == 1) {
if (s_mky1_action == 1) {
if (300 < this.s_mky1._x) {
this.s_mky1._x = -20;
}
if (s_jeep_action == 2) {
this.s_mky1.gotoAndStop("run");
this.s_mky1._x = 350;
this.s_mky1._xscale = -100;
this.s_mky1_action = this.s_mky1_action + 1;
}
} else if (s_mky1_action == 2) {
if ((this.s_hunter._x < 127) and (s_jeep_action == 3)) {
this.s_mky1.gotoAndStop("throw");
this.s_mky1_action = this.s_mky1_action + 1;
}
} else if (s_mky1_action == 3) {
} else if (s_mky1_action == 4) {
this.s_mky1.gotoAndStop("run");
this.s_mky1._xscale = 100;
this.s_mky1._x = this.s_mky1._x - 20;
this.s_mky1_action = this.s_mky1_action + 1;
this.attachMovie("story_hunter", "s_hunter2", 12);
this.s_hunter2._xscale = -100;
this.s_hunter2._x = 290;
this.s_hunter2._y = 124;
this.s_hunter2.gotoAndStop("run");
} else if (s_mky1_action == 5) {
if (this.s_hunter2._x < 277) {
this.s_mky1.gotoAndStop("throw");
this.s_mky1_action = this.s_mky1_action + 1;
}
}
if (s_mky2_action == 1) {
if (300 < this.s_mky2._x) {
this.s_mky2._x = -20;
if ((!this.s_mky2_laps) == 2) {
this.s_mky2_laps = this.s_mky2_laps + 1;
} else {
this.s_mky2.gotoAndStop("walk");
this.s_mky2_action = this.s_mky2_action + 1;
}
}
} else if (s_mky2_action == 2) {
if (s_jeep_action == 2) {
this.s_mky2.gotoAndStop("shock");
this.s_mky2_action = this.s_mky2_action + 1;
}
} else if (s_mky2_action == 3) {
if (s_hunter._x < (s_mky2._x + 120)) {
this.s_mky2._xscale = -100;
this.s_mky2.gotoAndStop("run");
this.s_mky2_action = this.s_mky2_action + 1;
s_mky2_set_time = getTimer() / 1000;
s_mky2_delay = 5;
}
} else if (s_mky2_action == 4) {
if (s_mky2_delay < ((getTimer() / 1000) - s_mky2_set_time)) {
this.s_mky2.removeMovieClip();
}
}
if (s_mky3_action == 0) {
this.attachMovie("story_mky", "s_mky3", 5);
this.s_mky3._x = 45;
this.s_mky3._y = 85;
this.s_mky3.gotoAndStop("sit");
s_mky3_set_time = getTimer() / 1000;
s_mky3_delay = 12;
s_mky3_action = s_mky3_action + 1;
} else if (s_mky3_action == 1) {
if (s_mky3_delay < ((getTimer() / 1000) - s_mky3_set_time)) {
this.s_mky3._xscale = -100;
this.s_mky3._x = this.s_mky3._x + 40;
this.s_mky3.gotoAndStop("run");
s_mky3_set_time = getTimer() / 1000;
s_mky3_delay = 5;
s_mky3_action = s_mky3_action + 1;
}
} else if (s_mky3_action == 2) {
if (s_mky3_delay < ((getTimer() / 1000) - s_mky3_set_time)) {
this.s_mky3.removeMovieClip();
}
}
if (s_mky4_action == 0) {
this.attachMovie("story_mky", "s_mky4", 6);
this.s_mky4._x = 28;
this.s_mky4._y = 85;
this.s_mky4.gotoAndStop("pick");
s_mky4_set_time = getTimer() / 1000;
s_mky4_delay = 12;
s_mky4_action = s_mky4_action + 1;
} else if (s_mky4_action == 1) {
if (s_jeep_action == 1) {
this.s_mky4.gotoAndStop("beat_chest");
s_mky4_set_time = getTimer() / 1000;
s_mky4_delay = 2;
s_mky4_action = s_mky4_action + 1;
}
} else if (s_mky4_action == 2) {
if (s_mky4_delay < ((getTimer() / 1000) - s_mky4_set_time)) {
this.s_mky4._xscale = -100;
this.s_mky4._x = this.s_mky4._x + 40;
this.s_mky4.gotoAndStop("run");
s_mky4_set_time = getTimer() / 1000;
s_mky4_delay = 5;
s_mky4_action = s_mky4_action + 1;
}
} else if (s_mky3_action == 3) {
if (s_mky4_delay < ((getTimer() / 1000) - s_mky4_set_time)) {
this.s_mky4.removeMovieClip();
}
}
if (s_mky5_action == 0) {
this.attachMovie("story_mky", "s_mky5", 7);
this.s_mky5._xscale = -100;
this.s_mky5._x = 225;
this.s_mky5._y = 40;
this.s_mky5.gotoAndStop("climb");
s_mky5_action = s_mky5_action + 1;
} else if (s_mky5_action == 1) {
if (110 < this.s_mky5._y) {
this.s_mky5.gotoAndStop("climb_still");
this.s_mky5_set_time = getTimer() / 1000;
this.s_mky5_delay = 7;
this.s_mky5_action = this.s_mky5_action + 1;
this.attachMovie("story_mky", "s_mky1", 3);
this.s_mky1._x = -20;
this.s_mky1._y = 152;
this.s_mky1.gotoAndStop("run");
s_mky1_action = s_mky1_action + 1;
this.attachMovie("story_mky", "s_mky2", 4);
this.s_mky2._x = -90;
this.s_mky2._y = 152;
this.s_mky2.gotoAndStop("run");
s_mky2_action = s_mky2_action + 1;
}
} else if (s_mky5_action == 2) {
if (s_mky5_delay < ((getTimer() / 1000) - s_mky5_set_time)) {
this.s_mky5.climb_up = true;
this.s_mky5.gotoAndStop("climb");
s_mky5_action = s_mky5_action + 1;
}
} else if (s_mky5_action == 3) {
if (this.s_mky5._y < 30) {
this.s_mky5.gotoAndStop("run");
this.s_mky5._xscale = 100;
this.s_mky5._x = this.s_mky5._x - 32;
s_mky5_action = s_mky5_action + 1;
}
} else if (s_mky5_action == 4) {
if (220 < this.s_mky5._x) {
this.s_mky5.gotoAndStop("fall");
s_mky5_action = s_mky5_action + 1;
}
} else if (s_mky5_action == 5) {
if (85 < this.s_mky5._y) {
this.s_mky5.gotoAndStop("run");
s_mky5_action = s_mky5_action + 1;
}
} else if (s_mky5_action == 6) {
if (300 < this.s_mky5._x) {
this.s_mky5.removeMovieClip();
}
}
if (s_jeep_action == 0) {
if (s_jeep_delay < ((getTimer() / 1000) - s_jeep_set_time)) {
this.attachMovie("story_jeep", "s_jeep", 2);
this.s_jeep._x = 250;
this.s_jeep._y = 131;
this.s_jeep.gotoAndStop("move");
s_jeep_action = s_jeep_action + 1;
}
} else if (s_jeep_action == 1) {
if (s_jeep._x < 170) {
this.s_jeep.gotoAndStop("still");
s_jeep_action = s_jeep_action + 1;
s_jeep_delay = 2;
s_jeep_set_time = getTimer() / 1000;
}
} else if (s_jeep_action == 2) {
this.s_jeep.gotoAndStop("open_door");
this.attachMovie("story_hunter", "s_hunter", 8);
this.s_hunter._xscale = -100;
this.s_hunter._x = 225;
this.s_hunter._y = 124;
this.s_hunter.gotoAndStop("run");
s_jeep_action = s_jeep_action + 1;
s_hunter_delay = 0.75;
s_hunter_set_time = getTimer() / 1000;
}
if (s_hunter_action == 1) {
if (s_hunter_delay < ((getTimer() / 1000) - s_hunter_set_time)) {
this.s_hunter.gotoAndStop("run");
this.s_hunter._xscale = 100;
this.s_hunter._x = this.s_hunter._x - 35;
this.s_hunter_action = this.s_hunter_action + 1;
this.s_mky1_action = this.s_mky1_action + 1;
}
} else if (s_hunter_action == 2) {
if (this.s_mky1._x < (this.s_hunter._x + 24)) {
this.s_hunter.gotoAndStop("catch");
s_hunter_delay = 2.5;
s_hunter_set_time = getTimer() / 1000;
this.s_hunter_action = this.s_hunter_action + 1;
}
} else if (s_hunter_action == 3) {
if (s_hunter_delay < ((getTimer() / 1000) - s_hunter_set_time)) {
this.s_hunter.removeMovieClip();
this.s_hunter2.removeMovieClip();
this.s_jeep.removeMovieClip();
s_jeep_action = 0;
this.bg.gotoAndStop("second");
scene = scene + 1;
scene_set = getTimer() / 1000;
}
}
if (s_hunter2_action == 1) {
this.s_hunter2.gotoAndStop("stand");
this.s_hunter2_action = this.s_hunter2_action + 1;
}
} else if (scene == 2) {
if (scene_delay < ((getTimer() / 1000) - scene_set)) {
this.bg.gotoAndStop("third");
scene = scene + 1;
}
} else if (scene == 3) {
if (s_jeep_action == 0) {
this.attachMovie("story_jeep", "s_jeep", 300);
this.s_jeep._x = 110;
this.s_jeep._y = 131;
this.s_jeep.gotoAndStop("move_bg");
s_jeep_delay = 3.5;
s_jeep_set_time = getTimer() / 1000;
s_jeep_action = s_jeep_action + 1;
}
if (s_jeep_action == 1) {
if (s_jeep_delay < ((getTimer() / 1000) - s_jeep_set_time)) {
this.bg.gotoAndStop("second");
this.s_jeep_action = 0;
this.s_jeep.removeMovieClip();
scene = scene + 1;
}
}
} else if (scene == 4) {
if (s_mky_in_crate_action == 0) {
this.attachMovie("mky_in_crate", "mic", 300);
this.mic.gotoAndStop("one");
this.mic._x = 128;
this.mic._y = 92;
s_mky_in_crate_action = s_mky_in_crate_action + 1;
in_crate_set = getTimer() / 1000;
in_crate_delay = 3;
} else if (s_mky_in_crate_action == 1) {
if (in_crate_delay < ((getTimer() / 1000) - in_crate_set)) {
this.mic.gotoAndStop("two");
s_mky_in_crate_action = s_mky_in_crate_action + 1;
in_crate_set = getTimer() / 1000;
in_crate_delay = 1.5;
}
} else if (s_mky_in_crate_action == 2) {
if (in_crate_delay < ((getTimer() / 1000) - in_crate_set)) {
this.mic.gotoAndStop("three");
s_mky_in_crate_action = s_mky_in_crate_action + 1;
in_crate_set = getTimer() / 1000;
in_crate_delay = 0.25;
}
} else if (s_mky_in_crate_action == 3) {
if (in_crate_delay < ((getTimer() / 1000) - in_crate_set)) {
this.mic.removeMovieClip();
s_mky_in_crate_action = s_mky_in_crate_action + 1;
scene = scene + 1;
this.bg.gotoAndStop("second");
scene_set = getTimer() / 1000;
this.bg._x = 0;
this.bg._y = 0;
}
}
} else if (scene == 5) {
if (scene_delay < ((getTimer() / 1000) - scene_set)) {
this.bg.gotoAndStop("fourth");
scene = scene + 1;
}
} else if (scene == 6) {
if (s_jeep_action == 0) {
this.attachMovie("story_jeep", "s_jeep", 300);
this.s_jeep._x = 110;
this.s_jeep._y = 131;
this.s_jeep.gotoAndStop("crash");
s_jeep_action = s_jeep_action + 1;
this.attachMovie("crate_open", "crate", 299);
this.crate._x = 180;
this.crate._y = 131;
this.attachMovie("story_hunter", "s_hunter", 301);
this.s_hunter.gotoAndStop("laying");
this.s_hunter._x = 80;
this.s_hunter._y = 125;
s_hunter_action = 0;
this.attachMovie("story_mky", "s_mky1", 302);
this.s_mky1.gotoAndStop("stand");
this.s_mky1._xscale = 100;
this.s_mky1._x = 210;
this.s_mky1._y = 152;
s_mky1_action = 0;
s_mky1_action = s_mky1_action + 1;
s_mky1_delay = 1;
s_mky1_set_time = getTimer() / 1000;
}
if (s_mky1_action == 1) {
if (s_mky1_delay < ((getTimer() / 1000) - s_mky1_set_time)) {
s_mky1_action = s_mky1_action + 1;
s_hunter_delay = 0.75;
s_hunter_set_time = getTimer() / 1000;
s_hunter_action = s_hunter_action + 1;
}
} else if (s_mky1_action == 2) {
if (110 < this.s_hunter._x) {
this.s_mky1._xscale = -100;
this.s_mky1._x = this.s_mky1._x + 32;
this.s_mky1.amt_throws = this.s_mky1.amt_throws + 20;
this.s_mky1.gotoAndStop("throw");
s_mky1_delay = 4;
s_mky1_set_time = getTimer() / 1000;
s_mky1_action = s_mky1_action + 1;
}
} else if (s_mky1_action == 3) {
if (s_mky1_delay < ((getTimer() / 1000) - s_mky1_set_time)) {
this.s_mky1._xscale = 100;
this.s_mky1._x = this.s_mky1._x - 32;
this.s_mky1.gotoAndStop("run");
s_mky1_action = s_mky1_action + 1;
s_mky1_delay = 2;
s_mky1_set_time = getTimer() / 1000;
}
} else if (s_mky1_action == 4) {
if (s_mky1_delay < ((getTimer() / 1000) - s_mky1_set_time)) {
this.s_mky1.removeMovieClip();
this.wait_to_start();
}
}
if (s_hunter_action == 1) {
if (s_hunter_delay < ((getTimer() / 1000) - s_hunter_set_time)) {
this.s_hunter.gotoAndStop("run");
s_hunter_action = s_hunter_action + 1;
}
}
}
}
function wait_to_start() {
_root.gotoAndStop("story_complete");
}
time_delay = 50;
start_time = 0;
fade_speed = 4;
step = 0;
scene = 1;
caption_delay = 2;
cap_set_time = 0;
cap_action = 0;
s_mky1_action = 0;
s_mky1_delay = 0;
s_mky1_set_time = 0;
s_mky2_action = 0;
s_mky2_laps = 0;
s_mky2_delay = 0;
s_mky2_set_time = 0;
s_mky3_action = 0;
s_mky3_delay = 0;
s_mky3_set_time = 0;
s_mky4_action = 0;
s_mky4_delay = 0;
s_mky4_set_time = 0;
s_mky5_action = 0;
s_mky5_delay = 0;
s_mky5_set_time = 0;
s_jeep_action = 0;
s_jeep_delay = 10;
s_jeep_set_time = getTimer() / 1000;
s_hunter_action = 0;
s_hunter_delay = 0;
s_hunter_set_time = 0;
s_hunter2_action = 0;
s_mky_in_crate_action = 0;
in_crate_set = 0;
in_crate_delay = 0;
scene_set = 0;
scene_delay = 0.5;
fade_complete = false;
this.attachMovie("background", "bg", 1);
this.bg.gotoAndStop("first");
this.attachMovie("outside_box", "ob", 1000);
this.attachMovie("story_message", "sm", 1001);
this.gotoAndStop("monkey_country");
Symbol 2624 MovieClip [story] Frame 2
stop();
Instance of Symbol 2623 MovieClip in Symbol 2624 MovieClip [story] Frame 2
onClipEvent (enterFrame) {
_parent.action_director();
}
Symbol 2653 MovieClip Frame 1
_parent.amt_throws = _parent.amt_throws + 1;
Symbol 2653 MovieClip Frame 18
_parent.add_poop();
Symbol 2653 MovieClip Frame 27
_parent.gotoAndStop("stand");
Symbol 2654 MovieClip [story_mky] Frame 1
function walk() {
if (this._xscale == -100) {
this._x = this._x - this.walkSpeed;
} else if (this._xscale == 100) {
this._x = this._x + this.walkSpeed;
}
}
function run() {
if (this._xscale == -100) {
this._x = this._x - this.runSpeed;
} else if (this._xscale == 100) {
this._x = this._x + this.runSpeed;
}
}
function climb() {
if (climb_up) {
this._y = this._y - this.climbSpeed;
} else {
this._y = this._y + this.climbSpeed;
}
}
function add_poop() {
if ((amt_throws == 1) or (amt_throws == 21)) {
_root.attachMovie("story_poop", "s_poop", 200);
_root.s_poop.gotoAndStop("in_air");
_root.s_poop._x = this._x - 32;
_root.s_poop._y = this._y + 10;
_root.s_poop.num = this.amt_throws;
_root.s_poop.dir = this._xscale;
} else {
_root.attachMovie("story_poop", "s_poop", 200);
_root.s_poop.gotoAndStop("in_air");
_root.s_poop._x = this._x + 32;
_root.s_poop._y = this._y + 10;
_root.s_poop.dir = this._xscale;
}
}
function fall() {
this._y = this._y + fallSpeed;
}
walkSpeed = 0.75;
runSpeed = 1.5;
climbSpeed = 0.5;
climb_up = false;
story_poop = false;
amt_throws = 0;
jumpMoveSpeed = 1.5;
fallSpeed = 1.75;
Instance of Symbol 2037 MovieClip in Symbol 2654 MovieClip [story_mky] Frame 2
onClipEvent (enterFrame) {
}
Instance of Symbol 2611 MovieClip in Symbol 2654 MovieClip [story_mky] Frame 3
onClipEvent (enterFrame) {
_parent.walk();
}
Instance of Symbol 2628 MovieClip in Symbol 2654 MovieClip [story_mky] Frame 4
onClipEvent (enterFrame) {
_parent.run();
}
Instance of Symbol 2404 MovieClip in Symbol 2654 MovieClip [story_mky] Frame 5
onClipEvent (enterFrame) {
}
Instance of Symbol 2157 MovieClip in Symbol 2654 MovieClip [story_mky] Frame 8
onClipEvent (enterFrame) {
_parent.climb();
}
Instance of Symbol 2404 MovieClip in Symbol 2654 MovieClip [story_mky] Frame 9
onClipEvent (enterFrame) {
}
Instance of Symbol 2010 MovieClip in Symbol 2654 MovieClip [story_mky] Frame 12
onClipEvent (enterFrame) {
_parent.fall();
}
Symbol 2665 MovieClip [captions] Frame 1
stop();
Symbol 2665 MovieClip [captions] Frame 2
stop();
Symbol 2665 MovieClip [captions] Frame 3
stop();
Symbol 2665 MovieClip [captions] Frame 4
stop();
Symbol 2665 MovieClip [captions] Frame 5
stop();
Symbol 2665 MovieClip [captions] Frame 6
stop();
Symbol 2665 MovieClip [captions] Frame 7
stop();
Symbol 2681 MovieClip Frame 5
stop();
Symbol 2690 MovieClip [story_jeep] Frame 1
function move() {
if (this._xscale == -100) {
this._x = this._x + this.jeepSpeed;
} else if (this._xscale == 100) {
this._x = this._x - this.jeepSpeed;
}
}
function move_bg() {
if (this._xscale == -100) {
_root.story.bg._x = _root.story.bg._x - (this.jeepSpeed + 2.5);
} else if (this._xscale == 100) {
_root.story.bg._x = _root.story.bg._x + (this.jeepSpeed + 2.5);
}
}
jeepSpeed = 1;
Instance of Symbol 2676 MovieClip in Symbol 2690 MovieClip [story_jeep] Frame 3
onClipEvent (enterFrame) {
_parent.move();
}
Instance of Symbol 2687 MovieClip in Symbol 2690 MovieClip [story_jeep] Frame 5
onClipEvent (enterFrame) {
_parent.move_bg();
}
Symbol 2692 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.catch_complete = false;
_parent.froze_monkey = true;
_root.player.gotoAndStop("freeze");
Symbol 2692 MovieClip Frame 22
_root.story.s_mky1.removeMovieClip();
Symbol 2692 MovieClip Frame 71
_parent.gotoAndStop("caught");
Symbol 2693 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
if (_parent.froze_monkey) {
_root.player.gotoAndStop("walk");
_parent.froze_monkey = false;
}
Symbol 2693 MovieClip Frame 70
_root.story.s_hunter_action = _root.story.s_hunter_action + 1;
Symbol 2694 MovieClip Frame 1
_parent.not_vunerable = true;
_parent.hit_time = getTimer() / 1000;
if (_parent.froze_monkey) {
_root.player.gotoAndStop("walk");
_parent.froze_monkey = false;
}
Symbol 2694 MovieClip Frame 70
_root.story.s_hunter2_action = _root.story.s_hunter2_action + 1;
Symbol 2699 MovieClip Frame 1
_parent.dying = true;
_root.attach_points(_parent.idNum, 200, _parent._x, _parent._y);
if (_parent.froze_monkey) {
_root.player.gotoAndStop("walk");
_parent.froze_monkey = false;
}
Symbol 2699 MovieClip Frame 94
_parent.removeMovieClip();
Symbol 2700 MovieClip [story_hunter] Frame 1
function run() {
if (this._xscale == -100) {
this._x = this._x - this.runSpeed;
} else {
this._x = this._x + this.runSpeed;
}
}
runSpeed = 0.8;
Instance of Symbol 2628 MovieClip in Symbol 2700 MovieClip [story_hunter] Frame 2
onClipEvent (enterFrame) {
_parent.run();
}
Symbol 2702 MovieClip Frame 44
_parent.removeMovieClip();
Symbol 2703 MovieClip [story_poop] Frame 1
function move() {
if (dir == -100) {
this._x = this._x - this.moveSpeed;
} else {
this._x = this._x + this.moveSpeed;
}
}
function hit() {
if (num == 1) {
if (_root.story.s_hunter.hitTest(this._x, this._y, true)) {
this.gotoAndStop("splat");
_root.story.s_hunter.gotoAndStop("hit");
}
} else if (num == 21) {
if (_root.story.s_hunter.hitTest(this._x, this._y, true)) {
this.gotoAndStop("splat");
_root.story.s_hunter.gotoAndStop("die");
}
} else if (_root.story.s_hunter2.hitTest(this._x, this._y, true)) {
this.gotoAndStop("splat");
_root.story.s_hunter2.gotoAndStop("hit2");
}
}
moveSpeed = 2.25;
Instance of Symbol 2701 MovieClip in Symbol 2703 MovieClip [story_poop] Frame 2
onClipEvent (enterFrame) {
_parent.move();
_parent.hit();
}
Symbol 2730 MovieClip Frame 1
stop();