Frame 2
ifFrameLoaded (6) {
gotoAndPlay (5);
}
Frame 3
gotoAndPlay (2);
Frame 6
stop();
Frame 7
stop();
Frame 8
function hunter_object() {
this.rotation = 180;
this.origin_x = -20;
this.origin_y = -20;
this.direction = "stop";
}
function nude_object(my_x, my_y, my_id) {
this.rotation = _root.pi;
this.state = "dead";
this.instance_name = "_root.nude_instance" + String(my_id);
this.origin_x = my_x;
this.origin_y = my_y;
this.launch_x = "";
this.launch_y = "";
}
function unlock_trigger() {
_root.trigger_lock = false;
}
function Trigger_Fire() {
if (_root.trigger_lock == false) {
if (_root.shots <= 0) {
with (_root.hunter_instance) {
gotoAndPlay("empty_gun");
}
} else {
_root.firing = true;
_root.trigger_lock = true;
with (_root.hunter_instance) {
stop();
gotoAndPlay("fire");
}
_root.abs_rotation = (_root.pi / 180) * (_root.hunter.rotation - 180);
with (_root.bullet_cone_inst) {
_x = _root.hunter.origin_x + (_root.bullet_offset * Math.cos(_root.abs_rotation + _root.offset_angle));
_y = _root.hunter.origin_y + (_root.bullet_offset * Math.sin(_root.abs_rotation + _root.offset_angle));
_rotation = _root.hunter.rotation;
gotoAndPlay(1);
}
_root.loop = 0;
while (_root.max_nude >= _root.loop) {
if (_root.nudes[_root.loop].state != "dead") {
if (_root.bullet_cone_inst.hitTest(_root.nudes[_root.loop].instance_name)) {
_root.nudes[_root.loop].mDie();
}
}
_root.loop++;
}
_root.shots = _root.shots + -1;
_root.text_bullets = _root.shots;
}
}
}
function redraw_me(my_mode) {
_root.hunter.mDisplay(my_mode);
if ((_root.hunter.direction != "dead") && (my_mode)) {
_root.redraw_nudes();
}
}
function redraw_nudes() {
loop = 0;
while (_root.max_nude >= loop) {
nude = _root.nudes[loop];
if (nude.state != "dead") {
nude.mDisplay();
}
loop++;
}
}
function placeNudes() {
nudeNo = 0;
while (nudeNo < _root.nudes_this_level) {
coords = _root.launch_sites.shift().split(",");
_root.nudes[nudeNo].mSetLaunch(coords[0], coords[1]);
_root.nudes[nudeNo].mPlace();
nudeNo++;
}
}
function rePlaceNudes() {
nudeNo = 0;
while (nudeNo < _root.nudes_this_level) {
if (_root.nudes[nudeNo].state != "dead") {
_root.nudes[nudeNo].mPlace();
}
nudeNo++;
}
}
function StartApp() {
_root.nude_speed = 10;
_root.nudes_x = -300;
_root.nudes_y = -100;
_root.num_lives = 0;
_root.max_lives = 5;
_root.level = 0;
_root.max_nude = 8;
_root.max_nudes_allowed = 9;
_root.cartridges = 0;
_root.shots_per_cart = 5;
_root.shots = _root.shots_per_cart;
_root.text_bullets = _root.shots;
_root.max_carts = 5;
_root.score = 0;
_root.bonus_multiplier = 100;
_root.placing_prob = 0.125;
_root.prob_increment = 0.03125;
_root.num_trees = 4;
_root.num_sml_obst = 2;
_root.placing_variation = 2;
_root.pi = 3.14159297943115;
_root.trigger_lock = false;
_root.firing = false;
_root.x_bound = 640;
_root.y_bound = 430;
_root.hunter = new hunter_object();
_root.entry_point = "left";
_root.next_nude = 0;
_root.nudes = new Array();
loop = 0;
while (_root.max_nude >= loop) {
_root.nudes.push(new nude_object(-250, -250, loop));
loop++;
}
_root.bullet_xoffset = 40;
_root.bullet_yoffset = 12;
_root.bullet_offset = Math.sqrt((_root.bullet_xoffset * _root.bullet_xoffset) + (_root.bullet_yoffset * _root.bullet_yoffset));
_root.offset_angle = Math.asin(_root.bullet_yoffset / _root.bullet_offset);
}
function createScene(my_entry_point) {
clearScene();
removeNudes();
createFramework(my_entry_point);
positionFurniture();
drawSet();
drawBackdrop(my_entry_point);
}
function calculateRandom(min, max) {
return(Math.floor(Math.random() * ((max + 1) - min)) + min);
}
function createFramework(my_entry_point) {
exit_up = _root.exit_up;
exit_right = _root.exit_right;
exit_down = _root.exit_down;
exit_left = _root.exit_left;
unit_size = 40;
_root.unit_size_x = _root.x_bound / Math.round(_root.x_bound / unit_size);
_root.unit_size_y = _root.y_bound / Math.round(_root.y_bound / unit_size);
_root.array_size_x = Math.round(_root.x_bound / _root.unit_size_x);
_root.array_size_y = Math.round(_root.y_bound / _root.unit_size_y);
_root.elem_array = new Array(_root.array_size_y);
loop = 0;
while (loop < _root.array_size_y) {
_root.elem_array[loop] = new Array(_root.array_size_x);
loop++;
}
_root.obst_array = new Array(_root.array_size_y);
loop = 0;
while (loop < _root.array_size_y) {
_root.obst_array[loop] = new Array(_root.array_size_x);
loop++;
}
if (my_entry_point != "up") {
_root.exit_up = Math.random() < 0.5;
} else {
_root.exit_up = false;
_root.entry_x = Math.floor((_root.array_size_x - 1) / 2);
_root.entry_y = 0;
}
if (my_entry_point != "right") {
_root.exit_right = true;
if (exit_up) {
exit_right = Math.random() < 0.5;
}
} else {
_root.exit_right = false;
_root.entry_x = _root.array_size_x - 1;
_root.entry_y = Math.floor((_root.array_size_y - 1) / 2);
}
if (my_entry_point != "down") {
_root.exit_down = true;
if (exit_up || (exit_right)) {
_root.exit_down = Math.random() < 0.5;
}
} else {
_root.exit_down = false;
_root.entry_x = Math.floor((_root.array_size_x - 1) / 2);
_root.entry_y = _root.array_size_y - 1;
}
if (my_entry_point != "left") {
_root.exit_left = true;
if ((exit_up || (exit_right)) || (exit_down)) {
_root.exit_left = Math.random() < 0.5;
}
} else {
_root.exit_left = false;
_root.entry_x = 0;
_root.entry_y = Math.floor((_root.array_size_y - 1) / 2);
}
loop_x = 0;
while (loop_x < _root.array_size_x) {
loop_y = 0;
while (loop_y < _root.array_size_y) {
setArray(_root.elem_array, loop_x, loop_y, "blank");
setArray(_root.obst_array, loop_x, loop_y, "blank");
loop_y++;
}
loop_x++;
}
exit_up_x = Math.floor((_root.array_size_x - 1) / 2);
exit_up_y = 0;
exit_right_x = _root.array_size_x - 1;
exit_right_y = Math.floor((_root.array_size_y - 1) / 2);
exit_down_x = exit_up_x;
exit_down_y = _root.array_size_y - 1;
exit_left_x = 0;
exit_left_y = exit_right_y;
setArrayBlock(_root.elem_array, _root.entry_x, _root.entry_y, "entry", 1);
if (exit_up) {
setArrayBlock(_root.elem_array, exit_up_x, exit_up_y, "exit", 1);
}
if (exit_right) {
setArrayBlock(_root.elem_array, exit_right_x, exit_right_y, "exit", 1);
}
if (exit_down) {
setArrayBlock(_root.elem_array, exit_down_x, exit_down_y, "exit", 1);
}
if (exit_left) {
setArrayBlock(_root.elem_array, exit_left_x, exit_left_y, "exit", 1);
}
loop_x = 0;
wall_loop = 0;
while (loop_x < _root.array_size_x) {
loop_y = 0;
while (loop_y < _root.array_size_y) {
if ((((loop_x == 0) || (loop_x == (_root.array_size_x - 1))) || (loop_y == 0)) || (loop_y == (_root.array_size_y - 1))) {
if (getArray(_root.elem_array, loop_x, loop_y) == "blank") {
setArray(_root.elem_array, loop_x, loop_y, "wall");
setArray(_root.obst_array, loop_x, loop_y, "elem_wall_inst" + wall_loop);
wall_loop++;
}
}
loop_y++;
}
loop_x++;
}
if (!(exit_right || (my_entry_point == "right"))) {
max_loop = exit_up_x;
} else {
max_loop = _root.array_size_x;
}
if (exit_left || (my_entry_point == "left")) {
loop = 0;
}
loop = Math.floor((_root.array_size_x - 1) / 2);
while (loop < max_loop) {
if (getArray(_root.elem_array, loop, _root.entry_y) == "blank") {
setArrayBlock(_root.elem_array, loop, _root.entry_y, "path", 1);
}
loop++;
}
if (!(exit_up || (my_entry_point == "up"))) {
loop = _root.entry_y;
} else {
loop = 0;
}
if (!(exit_down || (my_entry_point == "down"))) {
max_loop = _root.entry_y;
} else {
max_loop = _root.array_size_y;
}
if (exit_up || (exit_down)) {
while (max_loop >= loop) {
if (getArray(_root.elem_array, exit_up_x, loop) == "blank") {
setArrayBlock(_root.elem_array, exit_up_x, loop, "path", 1);
}
loop++;
}
}
}
function positionFurniture() {
next_tree01 = 0;
next_tree02 = 0;
next_plant = 0;
next_rock = 0;
next_ammo = 0;
max_trees = 10;
max_sml_obst = 8;
trees_left = _root.num_trees;
sml_obst_left = _root.num_sml_obst;
ammo_left = _root.cartridges_atlevel;
obst_loop = 0;
_root.launch_sites = new Array();
_root.num_lau_sites = 0;
num_blanks = 0;
loop_n = 0;
while (loop_n < _root.array_size_y) {
loop_m = 0;
while (loop_m < _root.array_size_x) {
if (getArray(_root.elem_array, loop_m, loop_n) == "blank") {
num_blanks++;
}
loop_m++;
}
loop_n++;
}
loop_m = 0;
while (loop_m < _root.array_size_x) {
loop_n = 0;
while (loop_n < _root.array_size_y) {
if (getArray(_root.elem_array, loop_m, loop_n) == "blank") {
obj_type = "";
if (trees_left <= 0) {
place_tree = false;
} else {
place_tree_prob = trees_left / (num_blanks - (sml_obst_left + ammo_left));
place_tree = Math.random() < place_tree_prob;
}
if (!place_tree) {
if (sml_obst_left <= 0) {
place_sml_obst = false;
} else {
place_sml_prob = sml_obst_left / (num_blanks - (trees_left + ammo_left));
place_sml_obst = Math.random() < place_sml_prob;
}
if (!place_sml_obst) {
if (ammo_left > 0) {
place_ammo_prob = ammo_left / (num_blanks - (trees_left + sml_obst_left));
if (Math.random() < place_ammo_prob) {
obj_type = "ammo_instance" + next_ammo;
ammo_left = ammo_left + -1;
next_ammo++;
}
}
} else {
if (Math.random() >= 0.5) {
obj_type = "plant_instance" + next_plant;
next_plant++;
} else {
obj_type = "rock_instance" + next_rock;
next_rock++;
}
sml_obst_left = sml_obst_left + -1;
setArray(_root.obst_array, loop_m, loop_n, "elem_obstacle_inst" + obst_loop);
obst_loop++;
}
} else {
if (Math.random() >= 0.5) {
obj_type = "tree02_instance" + next_tree02;
next_tree02++;
} else {
obj_type = "tree01_instance" + next_tree01;
next_tree01++;
}
trees_left = trees_left + -1;
_root.launch_sites.push((loop_m + ",") + loop_n);
_root.num_lau_sites++;
setArray(_root.obst_array, loop_m, loop_n, "elem_obstacle_inst" + obst_loop);
obst_loop++;
}
num_blanks = num_blanks + -1;
if (obj_type != "") {
setArray(_root.elem_array, loop_m, loop_n, obj_type);
}
}
loop_n++;
}
loop_m++;
}
if (_root.num_trees < max_trees) {
_root.num_trees++;
}
if (_root.num_sml_obst < max_sml_obst) {
_root.num_sml_obst++;
}
}
function drawSet() {
_root.loop_x = 0;
while (_root.loop_x < _root.array_size_x) {
_root.loop_y = 0;
while (_root.loop_y < _root.array_size_y) {
target = getArray(_root.elem_array, _root.loop_x, _root.loop_y);
if (((((target != "blank") && (target != "path")) && (target != "entry")) && (target != "exit")) && (target != "wall")) {
tellTarget (target) {
_x = Math.round((_root.loop_x * _root.unit_size_x) + (_root.unit_size_x / 2));
setProperty("", _x, Math.round((_root.loop_x * _root.unit_size_x) + (_root.unit_size_x / 2)));
_y = Math.round((_root.loop_y * _root.unit_size_y) + (_root.unit_size_y / 2));
setProperty("", _y, Math.round((_root.loop_y * _root.unit_size_y) + (_root.unit_size_y / 2)));
};
}
target = getArray(_root.obst_array, _root.loop_x, _root.loop_y);
if (target != "blank") {
tellTarget (target) {
_x = Math.round((_root.loop_x * _root.unit_size_x) + (_root.unit_size_x / 2));
setProperty("", _x, Math.round((_root.loop_x * _root.unit_size_x) + (_root.unit_size_x / 2)));
_y = Math.round((_root.loop_y * _root.unit_size_y) + (_root.unit_size_y / 2));
setProperty("", _y, Math.round((_root.loop_y * _root.unit_size_y) + (_root.unit_size_y / 2)));
_alpha = 0;
setProperty("", _alpha, 0);
};
}
_root.loop_y++;
}
_root.loop_x++;
}
}
function setArray(my_array, my_x, my_y, my_value) {
sub_array = my_array[my_y];
sub_array[my_x] = my_value;
}
function setArrayBlock(my_array, my_x, my_y, my_value, my_width) {
sab_loop_x = my_x - my_width;
while ((my_x + my_width) >= sab_loop_x) {
sab_loop_y = my_y - my_width;
while ((my_y + my_width) >= sab_loop_y) {
if ((sab_loop_x >= 0) && (sab_loop_y >= 0)) {
if (getArray(my_array, sab_loop_x, sab_loop_y) == "blank") {
setArray(my_array, sab_loop_x, sab_loop_y, my_value);
}
}
sab_loop_y++;
}
sab_loop_x++;
}
}
function getArray(my_array, my_x, my_y) {
sub_array = my_array[my_y];
return(sub_array[my_x]);
}
function getArrayBlock(my_array, my_x, my_y, my_width) {
return_array = new Array();
gab_loop_x = my_x - my_width;
while ((my_x + my_width) >= gab_loop_x) {
gab_loop_y = my_y - my_width;
while ((my_y + my_width) >= gab_loop_y) {
if ((gab_loop_x >= 0) && (gab_loop_y >= 0)) {
return_array.push(getArray(my_array, gab_loop_x, gab_loop_y));
}
gab_loop_y++;
}
gab_loop_x++;
}
return(return_array);
}
function drawBackdrop(my_entry_point) {
up = _root.exit_up || (my_entry_point == "up");
right = _root.exit_right || (my_entry_point == "right");
down = _root.exit_down || (my_entry_point == "down");
left = _root.exit_left || (my_entry_point == "left");
if (up) {
if (!left) {
with (backdrop_open2_inst2) {
_x = 0;
_y = 0;
}
} else {
with (backdrop_open1_inst0) {
_x = 0;
_y = 0;
}
}
if (!right) {
with (backdrop_open2_inst0) {
_x = _root.x_bound - 1;
_y = 0;
}
} else {
with (backdrop_open1_inst1) {
_x = _root.x_bound - 1;
_y = 0;
}
}
}
if (!up) {
if (!left) {
with (backdrop_closed_inst2) {
_x = 0;
_y = 0;
}
} else {
with (backdrop_open3_inst0) {
_x = 0;
_y = 0;
}
}
if (right) {
with (backdrop_open3_inst1) {
_x = _root.x_bound - 1;
_y = 0;
}
}
if (!right) {
with (backdrop_closed_inst0) {
_x = _root.x_bound - 1;
_y = 0;
}
}
}
if (down) {
if (!left) {
with (backdrop_open2_inst3) {
_x = 0;
_y = _root.y_bound;
}
} else {
with (backdrop_open1_inst2) {
_x = 0;
_y = _root.y_bound;
}
}
if (right) {
with (backdrop_open1_inst3) {
_x = _root.x_bound - 1;
_y = _root.y_bound;
}
}
if (!right) {
with (backdrop_open2_inst1) {
_x = _root.x_bound - 1;
_y = _root.y_bound;
}
}
}
if (!down) {
if (!left) {
with (backdrop_closed_inst3) {
_x = 0;
_y = _root.y_bound;
}
} else {
with (backdrop_open3_inst2) {
_x = 0;
_y = _root.y_bound;
}
}
if (right) {
with (backdrop_open3_inst3) {
_x = _root.x_bound - 1;
_y = _root.y_bound;
}
}
if (!right) {
with (backdrop_closed_inst1) {
_x = _root.x_bound - 1;
_y = _root.y_bound;
}
}
}
}
function arrayLocation(my_x, my_y) {
return_array = new Array();
x = my_x;
y = my_y;
location = "inside";
if (x < 0) {
x = 0;
location = "right";
}
if (x >= _root.x_bound) {
x = _root.x_bound - 1;
location = "left";
}
if (y < 0) {
y = 0;
location = "down";
}
if (y >= _root.y_bound) {
y = _root.y_bound - 1;
location = "up";
}
return_array.push(Math.floor(x / _root.unit_size_x));
return_array.push(Math.floor(y / _root.unit_size_y));
return_array.push(location);
return(return_array);
}
function nextLife(my_x, my_y) {
if (_root.num_lives <= 1) {
_root.gotoAndPlay("game_over_" + _root.lang);
} else {
decreaseLives();
removeNudes();
_root.hunter.mPlace(my_x, my_y);
rePlaceNudes();
}
}
function increaseLives() {
extra = false;
if (((_root.nudes_killed == _root.nudes_this_level) && (_root.num_lives < _root.max_lives)) && (_root.level < 15)) {
_root.num_lives = _root.num_lives + 1;
extra = true;
}
return(extra);
}
function displayLives() {
_root.loop = 1;
while (_root.max_lives >= _root.loop) {
tellTarget ("elem_life_inst" + _root.loop) {
if (_root.num_lives >= _root.loop) {
_alpha = 100;
setProperty("", _alpha, 100);
} else {
_alpha = 0;
setProperty("", _alpha, 0);
}
};
_root.loop++;
}
}
function decreaseLives() {
if (_root.num_lives > 1) {
_root.num_lives = _root.num_lives + -1;
}
tellTarget ("elem_life_inst" + (_root.num_lives + 1)) {
_alpha = 0;
setProperty("", _alpha, 0);
};
}
function startNextLevel() {
if (_root.lang != "english") {
_root.text_remaining = "Reste";
} else {
_root.text_remaining = "Remaining";
}
createScene(_root.entry_point);
displayLives();
if (_root.entry_point == "left") {
_root.hunter.mPlace(10, Math.floor(_root.y_bound / 2));
}
if (_root.entry_point == "right") {
_root.hunter.mPlace(_root.x_bound - 10, Math.floor(_root.y_bound / 2));
}
if (_root.entry_point == "up") {
_root.hunter.mPlace(Math.floor(_root.x_bound / 2), 10);
}
if (_root.entry_point == "down") {
_root.hunter.mPlace(Math.floor(_root.x_bound / 2), _root.y_bound - 10);
}
with (_root.hunter_instance) {
_rotation = _root.hunter.rotation;
}
placeNudes();
}
function removeNudes() {
snLoop = 0;
while (snLoop < _root.nudes.length) {
_root.nudes[snLoop].mRemove();
snLoop++;
}
}
function stopNudes() {
snLoop = 0;
while (snLoop < _root.nudes.length) {
if (_root.nudes[snLoop].state != "dead") {
_root.nudes[snLoop].mStop();
_root.nudes_sent = _root.nudes_sent + -1;
}
snLoop++;
}
}
function clearScene() {
csLoopX = 0;
while (csLoopX < _root.array_size_x) {
csLoopY = 0;
while (csLoopY < _root.array_size_y) {
obj_name = getArray(_root.elem_array, csLoopX, csLoopY);
if (((((obj_name != "blank") && (obj_name != "path")) && (obj_name != "entry")) && (obj_name != "exit")) && (obj_name != "wall")) {
tellTarget (obj_name) {
_x = -500;
setProperty("", _x, -500);
_y = -500;
setProperty("", _y, -500);
};
}
obj_name = getArray(_root.obst_array, csLoopX, csLoopY);
if (obj_name != "blank") {
tellTarget (obj_name) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
};
}
csLoopY++;
}
csLoopX++;
}
}
function reload() {
if (_root.cartridges > 0) {
_root.shots = _root.shots_per_cart;
_root.text_bullets = _root.shots;
_root.cartridges = _root.cartridges + -1;
with (_root.hunter_instance) {
gotoAndPlay("reload");
}
}
}
function bonus(my_level) {
if (_root.nudes_killed != _root.nudes_this_level) {
_root.bonus_score = 0;
} else {
_root.bonus_score = _root.bonus_multiplier * my_level;
}
}
function canExit() {
return(true);
}
function initNextLevel() {
if (_root.level > 0) {
_root.placing_prob = _root.placing_prob + _root.prob_increment;
_root.bonus(_root.level + 1);
_root.score = _root.score + _root.bonus_score;
if ((_root.nude_speed + 1) < 20) {
_root.nude_speed = _root.nude_speed + 1;
}
}
_root.level = _root.level + 1;
_root.extra_life = increaseLives();
if (_root.max_nudes_allowed >= _root.level) {
_root.nudes_this_level = _root.level;
} else {
_root.nudes_this_level = _root.max_nudes_allowed;
}
_root.nudes_killed = 0;
text_nudemen = _root.nudes_this_level;
if (_root.level >= 3) {
if (_root.level >= 5) {
if (_root.level >= 10) {
_root.cartridges_atlevel = 1;
} else {
_root.cartridges_atlevel = 2;
}
} else {
_root.cartridges_atlevel = 1;
}
} else {
_root.cartridges_atlevel = 0;
}
}
function displayInterscreen() {
interscreen_loop = 0;
inter_level = _root.level;
inter_bonus = _root.bonus_score;
if (_root.lang != "english") {
if (_root.lang == "francais") {
text_congrats = "Bravo !";
text_desc_level = "Vous allez acc?der au niveau";
if (_root.level != 15) {
text_desc_nolives = "";
} else {
text_desc_nolives = "Il n'y a pas de vies suppl?mentaires apr?s ce niveau !";
}
if (_root.cartridges_atlevel != 1) {
text_cartridges_avail = ("Il y a " + _root.cartridges_atlevel) + " chargeurs dans ce niveau !";
} else {
text_cartridges_avail = "Il y a 1 chargeur dans ce niveau !";
}
if (!_root.extra_life) {
text_extra_life = "";
} else {
text_extra_life = "Vous avez gagn? une vie suppl?mentaire";
}
}
} else {
text_congrats = "Congratulations!!";
text_desc_level = "You've made it to level";
if (_root.level != 15) {
text_desc_nolives = "";
} else {
text_desc_nolives = "There are no more extra lives after this level!!";
}
if (_root.cartridges_atlevel != 1) {
text_cartridges_avail = ("There are " + _root.cartridges_atlevel) + " cartridges in this level!";
} else {
text_cartridges_avail = "There is 1 cartridge in this level!";
}
if (!_root.extra_life) {
text_extra_life = "";
} else {
text_extra_life = "You've gained an extra life";
}
}
}
hunter_object.prototype.mSetDirection = function (my_direction) {
this.changed = false;
if (this.direction != my_direction) {
this.changed = true;
}
this.direction = my_direction;
};
hunter_object.prototype.mPlace = function (my_x, my_y) {
this.origin_x = my_x;
this.origin_y = my_y;
this.direction = "stop";
with (_root.hunter_instance) {
_x = this.origin_x;
_y = this.origin_y;
gotoAndPlay("stopped");
}
this.mDisplay();
};
hunter_object.prototype.mDisplay = function (my_mode) {
if ((this.direction != "dead") && (!_root.firing)) {
p_keymemory = l_test;
if ((this.direction == "rotate_right") || (this.direction == "rotate_left")) {
this.rotation_direction = -1;
if (this.direction == "rotate_right") {
this.rotation_direction = 1;
}
this.rotation = this.rotation + (this.rotation_direction * 15);
with (_root.hunter_instance) {
_rotation = this.rotation;
if (this.changed) {
gotoAndPlay("turning");
this.changed = false;
}
}
}
if ((this.direction == "forwards") || (this.direction == "backwards")) {
if (this.direction != "backwards") {
this.delta_move = 10;
} else {
this.delta_move = -10;
}
next_position_x = this.origin_x + (this.delta_move * Math.sin((_root.pi / 180) * (this.rotation - 90)));
next_position_y = this.origin_y + (this.delta_move * (-Math.cos((_root.pi / 180) * (this.rotation - 90))));
if (this.mMoveTest(next_position_x, next_position_y)) {
this.origin_x = next_position_x;
this.origin_y = next_position_y;
with (_root.hunter_instance) {
_x = _root.hunter.origin_x;
_y = _root.hunter.origin_y;
if (this.changed) {
gotoAndPlay("walking");
this.changed = false;
}
}
}
}
if (this.direction == "stop") {
with (_root.hunter_instance) {
if (this.changed) {
gotoAndPlay("stopped");
this.changed = false;
}
}
}
}
};
hunter_object.prototype.mMoveTest = function (my_x, my_y) {
_root.hit_test = true;
array_coords = arrayLocation(my_x, my_y);
_root.obj_name = getArray(_root.elem_array, array_coords[0], array_coords[1]);
if (array_coords[2] != "inside") {
if (!((_root.obj_name != "entry") && (canExit()))) {
return(false);
}
_root.entry_point = array_coords[2];
_root.gotoAndPlay("new_level");
exit();
}
if ((_root.obj_name.substring(0, 4) == "ammo") && (_root.cartridges < _root.max_carts)) {
tellTarget (_root.obj_name) {
if (hitTest(_root.hunter_instance)) {
_x = -100;
setProperty("", _x, -100);
_y = -100;
setProperty("", _y, -100);
_root.cartridges = _root.cartridges + 1;
with (_root.hunter_instance) {
gotoAndPlay("reload");
}
}
};
}
_root.next_x = my_x;
_root.next_y = my_y;
_root.obj_name = getArray(_root.obst_array, array_coords[0], array_coords[1]);
if (_root.obj_name != "blank") {
tellTarget (_root.obj_name) {
if (hitTest(_root.next_x, _root.next_y, true)) {
_root.hit_test = false;
}
};
}
return(_root.hit_test);
};
hunter_object.prototype.mDie = function (my_x, my_y) {
this.direction = "dead";
with (_root.hunter_instance) {
if (_root.num_lives <= 1) {
gotoAndPlay("scufflex");
} else {
gotoAndPlay("scuffle" + random(3));
}
}
_root.stopNudes();
};
nude_object.prototype.mDisplay = function () {
x_to_hunter = _root.hunter.origin_x - this.origin_x;
y_to_hunter = this.origin_y - _root.hunter.origin_y;
hypot = Math.sqrt((x_to_hunter * x_to_hunter) + (y_to_hunter * y_to_hunter));
if ((hypot < 200) || (this.state == "go")) {
if ((x_to_hunter * y_to_hunter) >= 0) {
angle = Math.asin(Math.abs(x_to_hunter) / hypot);
} else {
angle = Math.acos(Math.abs(x_to_hunter) / hypot);
}
if (!((x_to_hunter > 0) && (y_to_hunter < 0))) {
if (!((x_to_hunter < 0) && (y_to_hunter < 0))) {
if ((x_to_hunter < 0) && (y_to_hunter > 0)) {
angle = angle + ((_root.pi / 2) * 3);
}
} else {
angle = angle + _root.pi;
}
} else {
angle = angle + (_root.pi / 2);
}
this.rotation = angle;
if (this.state == "stop") {
this.state = "go";
tellTarget (this.instance_name) {
gotoAndPlay ("walking");
};
}
}
if (this.state == "go") {
_root.nude_hit_test = true;
_root.nude_next_x = this.origin_x + (_root.nude_speed * Math.sin(this.rotation));
_root.nude_next_y = this.origin_y - (_root.nude_speed * Math.cos(this.rotation));
array_coords = arrayLocation(_root.nude_next_x, _root.nude_next_y);
_root.nude_obj_name = getArray(_root.obst_array, array_coords[0], array_coords[1]);
if (_root.nude_obj_name != "blank") {
tellTarget (_root.nude_obj_name) {
if (hitTest(_root.nude_next_x, _root.nude_next_y, true)) {
_root.nude_hit_test = false;
}
};
}
if ((this.state == "go") && (_root.nude_hit_test)) {
this.origin_x = _root.nude_next_x;
this.origin_y = _root.nude_next_y;
}
tellTarget (this.instance_name) {
_x = this.origin_x;
setProperty("", _x, this.origin_x);
_y = this.origin_y;
setProperty("", _y, this.origin_y);
_rotation = ((this.rotation * 180) / _root.pi);
setProperty("", _rotation, (this.rotation * 180) / _root.pi);
};
this.mHitTest();
}
};
nude_object.prototype.mHitTest = function () {
if (_root.hunter_instance.hitTest(this.origin_x, this.origin_y, true)) {
tellTarget (this.instance_name) {
_x = -200;
setProperty("", _x, -200);
_y = -100;
setProperty("", _y, -100);
_root.hunter.mDie(this.origin_x, this.origin_y);
this.mRemove();
};
}
};
nude_object.prototype.mSetLaunch = function (my_x, my_y) {
this.launch_x = my_x;
this.launch_y = my_y;
};
nude_object.prototype.mPlace = function () {
delta_x = 50;
if (Math.round(_root.array_size_x / 2) < this.launch_x) {
delta_x = -25;
}
delta_y = 50;
if (Math.round(_root.array_size_y / 2) < this.launch_y) {
delta_y = -25;
}
this.origin_x = Math.round(this.launch_x * _root.unit_size_x) + delta_x;
this.origin_y = Math.round(this.launch_y * _root.unit_size_y) + delta_y;
this.state = "stop";
tellTarget (this.instance_name) {
gotoAndPlay ("waiting");
};
};
nude_object.prototype.mDie = function () {
if (this.state != "dead") {
this.state = "dead";
tellTarget (this.instance_name) {
gotoAndPlay ("hit");
};
_root.score = _root.score + 10;
_root.nudes_killed++;
_root.text_nudemen = _root.text_nudemen + -1;
}
};
nude_object.prototype.mRemove = function () {
this.origin_x = _root.nudes_x;
this.origin_y = _root.nudes_y;
tellTarget (this.instance_name) {
_x = _root.nudes_x;
setProperty("", _x, _root.nudes_x);
_y = _root.nudes_y;
setProperty("", _y, _root.nudes_y);
};
};
nude_object.prototype.mStop = function () {
this.state = "stop";
tellTarget (this.instance_name) {
gotoAndPlay ("waiting");
};
};
Frame 9
StartApp();
initNextLevel();
gotoAndPlay (13);
Frame 10
initNextLevel();
displayInterscreen();
Frame 12
stop();
Instance of Symbol 75 MovieClip "backdrop_open1_inst0" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 76 MovieClip "backdrop_open3_inst0" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 77 MovieClip "backdrop_open1_inst2" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 76 MovieClip "backdrop_open3_inst2" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 78 MovieClip "backdrop_closed_inst2" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 79 MovieClip "backdrop_open2_inst2" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 78 MovieClip "backdrop_closed_inst3" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 79 MovieClip "backdrop_open2_inst3" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 78 MovieClip "backdrop_closed_inst0" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 79 MovieClip "backdrop_open2_inst0" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 77 MovieClip "backdrop_open1_inst1" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 76 MovieClip "backdrop_open3_inst1" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 77 MovieClip "backdrop_open1_inst3" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 79 MovieClip "backdrop_open2_inst1" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 76 MovieClip "backdrop_open3_inst3" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Instance of Symbol 78 MovieClip "backdrop_closed_inst1" in Frame 13
onClipEvent (load) {
_x = -1000;
setProperty("", _x, -1000);
_y = -1000;
setProperty("", _y, -1000);
}
Frame 14
startNextLevel();
with (_root.bullet_cone_inst) {
_alpha = 0;
}
Instance of Symbol 81 MovieClip "keydown_handler" in Frame 14
onClipEvent (keyDown) {
if ((_root.hunter.direction != "dead") && (!_root.firing)) {
l_test = Key.getcode();
if (l_test == 38) {
_root.hunter.mSetDirection("forwards");
}
if (l_test == 39) {
_root.hunter.mSetDirection("rotate_right");
}
if (l_test == 40) {
_root.hunter.mSetDirection("backwards");
}
if (l_test == 37) {
_root.hunter.mSetDirection("rotate_left");
}
if (l_test == 32) {
_root.Trigger_Fire();
}
if ((l_test == 17) || (l_test == 13)) {
_root.reload();
}
p_keymemory = l_test;
}
}
onClipEvent (keyUp) {
if (_root.hunter.direction != "dead") {
_root.hunter.mSetDirection("stop");
}
}
Frame 22
_root.redraw_me(true);
Frame 23
_root.redraw_me(false);
Frame 24
_root.redraw_me(false);
Frame 25
_root.redraw_me(true);
Frame 26
_root.redraw_me(false);
Frame 27
_root.redraw_me(false);
Frame 28
_root.redraw_me(true);
Frame 29
_root.redraw_me(false);
Frame 30
_root.redraw_me(false);
Frame 31
_root.redraw_me(true);
Frame 32
_root.redraw_me(false);
Frame 33
_root.redraw_me(false);
Frame 34
_root.redraw_me(true);
Frame 35
_root.redraw_me(false);
Frame 36
_root.redraw_me(false);
Frame 37
_root.redraw_me(true);
Frame 38
_root.redraw_me(false);
Frame 39
_root.redraw_me(false);
Frame 40
_root.redraw_me(true);
Frame 41
_root.redraw_me(false);
Frame 42
_root.redraw_me(false);
Frame 43
_root.redraw_me(true);
Frame 44
_root.redraw_me(false);
Frame 45
_root.redraw_me(false);
Frame 46
_root.redraw_me(true);
Frame 47
_root.redraw_me(false);
Frame 48
_root.redraw_me(false);
Frame 49
_root.redraw_me(true);
Frame 50
_root.redraw_me(false);
Frame 51
_root.redraw_me(false);
Frame 52
_root.redraw_me(true);
Frame 53
_root.redraw_me(false);
Frame 54
_root.redraw_me(false);
Frame 55
_root.redraw_me(true);
Frame 56
_root.redraw_me(false);
Frame 57
_root.redraw_me(false);
Frame 58
_root.redraw_me(true);
Frame 59
_root.redraw_me(false);
Frame 60
_root.redraw_me(false);
Frame 61
_root.redraw_me(true);
Frame 62
_root.redraw_me(false);
Frame 63
_root.redraw_me(false);
Frame 64
_root.redraw_me(true);
Frame 65
_root.redraw_me(false);
Frame 66
_root.redraw_me(false);
Frame 67
_root.redraw_me(true);
Frame 68
_root.redraw_me(false);
Frame 69
_root.redraw_me(false);
Frame 70
_root.redraw_me(true);
Frame 71
_root.redraw_me(false);
Frame 72
_root.redraw_me(false);
Frame 73
_root.redraw_me(true);
Frame 74
_root.redraw_me(false);
Frame 75
_root.redraw_me(false);
Frame 76
_root.redraw_me(true);
Frame 77
_root.redraw_me(false);
Frame 78
send_next_nude();
gotoAndPlay (21);
Frame 79
stop();
_root.text_final_score = _root.score;
Frame 80
stop();
_root.text_final_score = _root.score;
Symbol 22 Button
on (release) {
stopAllSounds();
_root.lang = "francais";
gotoAndPlay (8);
}
Symbol 24 Button
on (release) {
gotoAndStop (7);
}
Symbol 37 Button
on (release) {
stopAllSounds();
_root.lang = "english";
gotoAndPlay (8);
}
Symbol 49 Button
on (release) {
gotoAndStop (6);
}
Symbol 62 Button
on (release) {
gotoAndPlay (13);
}
Symbol 87 MovieClip Frame 11
gotoAndPlay (1);
Symbol 87 MovieClip Frame 30
stop();
_x = _root.nudes_x;
setProperty("", _x, _root.nudes_x);
_y = _root.nudes_y;
setProperty("", _y, _root.nudes_y);
Symbol 87 MovieClip Frame 43
gotoAndPlay (33);
Symbol 107 MovieClip Frame 1
gotoAndPlay (3);
Symbol 107 MovieClip Frame 14
gotoAndPlay (4);
Symbol 107 MovieClip Frame 15
gotoAndPlay (3);
Symbol 107 MovieClip Frame 23
this.loop = 0;
Symbol 107 MovieClip Frame 27
this.loop++;
if (this.loop >= 5) {
gotoAndPlay (28);
[undefined];
} else {
gotoAndPlay (24);
}
Symbol 107 MovieClip Frame 28
this.loop = 0;
Symbol 107 MovieClip Frame 33
if (this.loop >= 10) {
_root.nextLife(_x, _y);
} else {
this.loop++;
gotoAndPlay (29);
}
Symbol 107 MovieClip Frame 44
gotoAndPlay (40);
Symbol 107 MovieClip Frame 53
gotoAndPlay (49);
Symbol 107 MovieClip Frame 62
gotoAndPlay (3);
Symbol 107 MovieClip Frame 63
this.loop = 0;
Symbol 107 MovieClip Frame 534
_root.nextLife(_x, _y);
Symbol 107 MovieClip Frame 535
gotoAndPlay (1);
Symbol 107 MovieClip Frame 826
_root.nextLife(_x, _y);
Symbol 107 MovieClip Frame 827
gotoAndPlay (1);
Symbol 107 MovieClip Frame 1134
_root.nextLife(_x, _y);
Symbol 107 MovieClip Frame 1135
gotoAndPlay (1);
Symbol 107 MovieClip Frame 1420
_root.nextLife(_x, _y);
Symbol 107 MovieClip Frame 1421
gotoAndPlay (1);
Symbol 244 MovieClip Frame 6
_root.firing = false;
_root.unlock_trigger();
Symbol 264 Button
on (release) {
stopAllSounds();
gotoAndPlay (8);
}
Symbol 288 Button
on (release) {
stopAllSounds();
gotoAndPlay (8);
}