Frame 1
((undefined <= b) > "c") || (0(false));
_root.FlashTracking = function (Section) {
datenow = new Date();
};
_root.GameQuit = function () {
getURL ("javascript:window.opener=self; window.close()", _self);
_root.scoreIDtemp = "";
};
_root.GameHighscores = function () {
if (_root.localOJJpage == 1) {
getURL ("javascript:goHighScores()", _self);
} else {
getURL ("http://www.oddjobjack.com/forum/index.php?act=Arcade&do=stats&gameid=22", "_blank");
}
};
_root.SendScore = function () {
score = game.score;
if (score > 0) {
var _local2 = "game22";
var _local1 = score;
loadVariablesNum ((("http://www.oddjobjack.com/forum/index.php?act=Arcade&do=newscore&gname=" + _local2) + "&gscore=") + _local1, 1);
}
score = 0;
var _local1 = 0;
};
_root.xOrigin = _root.loadBar.LBar._x;
_root.total = _root.getBytesTotal();
_root.factor = _root.loadBar.barMeasure._width;
_root.partial = 0;
stop();
_root.FlashTracking("Game22_Preload_Start");
Instance of Symbol 336 MovieClip [loaderBar] "loadBar" in Frame 1
onClipEvent (enterFrame) {
_root.partial = _root.getBytesLoaded();
if (_root.partial < _root.total) {
_root.Move = (Number(_root.partial) / Number(_root.total)) * _root.factor;
_root.loadBar.LBar._x = _root.xOrigin + _root.Move;
} else if (_root.partial >= _root.total) {
trace("Loaded");
_root.play();
}
}
Frame 2
stop();
_root.FlashTracking("Game22_Preload_End");
Frame 3
function doHelp(fromWhere) {
var _local1 = _root;
button_snd.start();
if (fromWhere == "help") {
game.pause = false;
_local1.enableButtons(true);
_local1.transitionTriggerOne = function () {
_root.helpScreen_mc.removeMovieClip();
};
_local1.transitionTriggerTwo = function () {
};
_local1.doTransition();
} else {
game.pause = true;
_local1.enableButtons(false);
_local1.transitionTriggerOne = function () {
var _local1 = _root;
_local1.attachMovie("helpScreen", "helpScreen_mc", 9999);
_local1.helpScreen_mc._x = 48;
_local1.helpScreen_mc._y = 355;
};
_local1.transitionTriggerTwo = function () {
};
_local1.doTransition();
}
}
function doHiscore() {
button_snd.start();
_root.GameHighscores();
}
function doQuit() {
button_snd.start();
_root.GameQuit();
}
function doPlay() {
var _local1 = _root;
button_snd.start();
_local1.titleMusic_snd.stop();
_local1.transitionTriggerOne = function () {
_root.play();
_root.doRoundpop(true);
};
_local1.transitionTriggerTwo = function () {
};
_local1.doTransition();
}
function doTransition() {
var _local1 = _root;
_local1.attachMovie("transition", "transition_mc", 10000);
_local1.transition_mc._x = 192;
_local1.transition_mc._y = 205;
}
function doRoundpop(state) {
var _local1 = _root;
if (state) {
_local1.attachMovie("roundpop", "roundpop_mc", 9998);
_local1.roundpop_mc._x = 268;
_local1.roundpop_mc._y = 268;
} else {
_local1.roundpop_mc.removeMovieClip();
}
}
function enableButtons(state) {
var _local1 = state;
var _local2 = _root;
_local2.title_mc.quit_btn.enabled = _local1;
_local2.title_mc.hiscore_btn.enabled = _local1;
_local2.title_mc.play_btn.enabled = _local1;
_local2.title_mc.help_btn.enabled = _local1;
_local2.victory_mc.quit_btn.enabled = _local1;
_local2.victory_mc.hiscore_btn.enabled = _local1;
_local2.victory_mc.playAgain_btn.enabled = _local1;
_local2.defeat_mc.quit_btn.enabled = _local1;
_local2.defeat_mc.hiscore_btn.enabled = _local1;
_local2.defeat_mc.playAgain_btn.enabled = _local1;
_local2.quit_btn.enabled = _local1;
_local2.help_btn.enabled = _local1;
}
function defineSounds() {
var _local1 = _root;
hereYaGo_snd = SoundDeluxe.create("hereYaGo", "jackVoice", true, 200);
justDoinMyJob_snd = SoundDeluxe.create("justDoinMyJob", "jackVoice", true, 200);
gotToBeTheBest_snd = SoundDeluxe.create("gotToBeTheBest", "jackVoice", true, 200);
nowItsMunicipal_snd = SoundDeluxe.create("nowItsMunicipal", "jackVoice", true, 200);
iveGotAJobToDo_snd = SoundDeluxe.create("iveGotAJobToDo", "jackVoice", true, 200);
thisInfractionCallsForAction_snd = SoundDeluxe.create("thisInfractionCallsForAction", "jackVoice", true, 200);
gotTheTicketForJustice_snd = SoundDeluxe.create("gotTheTicketForJustice", "jackVoice", true, 200);
thatShouldDoYouNicely_snd = SoundDeluxe.create("thatShouldDoYouNicely", "jackVoice", true, 200);
justDoingMyJob_snd = SoundDeluxe.create("justDoingMyJob", "jackVoice", true, 200);
oneForYou_snd = SoundDeluxe.create("oneForYou", "jackVoice", true, 200);
itsNoTrouble_snd = SoundDeluxe.create("itsNoTrouble", "jackVoice", true, 200);
rightBackAtcha_snd = SoundDeluxe.create("rightBackAtcha", "jackVoice", true, 200);
checkThisOut_snd = SoundDeluxe.create("checkThisOut", "jackVoice", true, 200);
surprise_snd = SoundDeluxe.create("surprise", "jackVoice", true, 200);
specialDelivery_snd = SoundDeluxe.create("specialDelivery", "jackVoice", true, 200);
fromMeToYou_snd = SoundDeluxe.create("fromMeToYou", "jackVoice", true, 200);
aLittleReminderForYou_snd = SoundDeluxe.create("aLittleReminderForYou", "jackVoice", true, 200);
loveNoteFromTheCity_snd = SoundDeluxe.create("loveNoteFromTheCity", "jackVoice", true, 200);
jackCommentList = [hereYaGo_snd, justDoinMyJob_snd, gotToBeTheBest_snd, nowItsMunicipal_snd, iveGotAJobToDo_snd, thisInfractionCallsForAction_snd, gotTheTicketForJustice_snd, thatShouldDoYouNicely_snd, justDoingMyJob_snd, oneForYou_snd, itsNoTrouble_snd, rightBackAtcha_snd, checkThisOut_snd, surprise_snd, specialDelivery_snd, fromMeToYou_snd, aLittleReminderForYou_snd, loveNoteFromTheCity_snd];
_local1.roundMusic_snd = SoundDeluxe.create("roundMusic", "music", true, 100);
_local1.victoryMusic_snd = SoundDeluxe.create("victoryMusic", "music", true, 100);
_local1.gangsterMusic_snd = SoundDeluxe.create("gangsterMusic", "music", true, 100);
_local1.introMusic_snd = SoundDeluxe.create("introMusic", "music", true, 100);
_local1.defeatMusic_snd = SoundDeluxe.create("defeatMusic", "music", true, 100);
_local1.ominousMusic_snd = SoundDeluxe.create("ominousMusic", "music", true, 100);
_local1.titleMusic_snd = SoundDeluxe.create("titleMusic", "music", true, 100);
_local1.button_snd = SoundDeluxe.create("buttonSfx", null, true, 100);
_local1.bell_snd = SoundDeluxe.create("bellSfx", null, false, 100);
_local1.meterAlert_snd = SoundDeluxe.create("meterAlertSfx", null, false, 100);
_local1.writing_snd = SoundDeluxe.create("writingSfx", null, false, 10);
_local1.tearing_snd = SoundDeluxe.create("tearingSfx", null, false, 40);
_local1.street1_snd = SoundDeluxe.create("street01Sfx", null, false, 2);
_local1.zombieBite_snd = SoundDeluxe.create("zombieBiteSfx", null, false, 60);
_local1.zombieGrunt_snd = SoundDeluxe.create("zombieGruntSfx", null, false, 60);
_local1.zombieDead_snd = SoundDeluxe.create("zombieDeadSfx", null, false, 40);
_local1.mobster1Dead_snd = SoundDeluxe.create("mobster1DeadSfx", null, false, 40);
_local1.mobster2Dead_snd = SoundDeluxe.create("mobster2DeadSfx", null, false, 40);
_local1.jump_snd = SoundDeluxe.create("jumpSfx", null, false, 20);
_local1.knifeHit_snd = SoundDeluxe.create("knifeHitSfx", null, false, 60);
_local1.knifeThrow_snd = SoundDeluxe.create("knifeThrowSfx", null, true, 80);
_local1.batHit_snd = SoundDeluxe.create("batHitSfx", null, true, 60);
_local1.batSwing_snd = SoundDeluxe.create("batSwingSfx", null, true, 60);
_local1.lowHealth_snd = SoundDeluxe.create("lowHealthSfx", null, false, 60);
_local1.kickHit_snd = SoundDeluxe.create("kickHitSfx", null, false, 60);
_local1.punchHit_snd = SoundDeluxe.create("punchHitSfx", null, false, 60);
_local1.punchMiss_snd = SoundDeluxe.create("punchMissSfx", null, false, 60);
}
function shuffle(arr) {
trace("shuffle");
TraceMe.allMembers(arr);
var _local1 = arr.concat();
var _local3 = new Array();
var _local2;
do {
_local2 = Math.floor(Math.random() * _local1.length);
_local3.push(_local1[_local2]);
_local1.splice(_local2, 1);
} while (_local1.length > 0);
return(_local3);
}
function getItem(itemList) {
var _local1 = itemList;
trace("Checking itemList.duplicate: " + _local1.duplicate.toString());
if ((_local1.duplicate.length < 1) || (_local1.duplicate == undefined)) {
_local1.duplicate = _root.shuffle(_local1);
}
var _local2 = _local1.duplicate[0];
_local1.duplicate.splice(0, 1);
trace("playing sound " + _local2);
return(_local2);
}
_root.stop();
_root.defineSounds();
_root.titleMusic_snd.setVolume(80);
_root.titleMusic_snd.start(0, 999);
Frame 4
function initialLevel() {
level1 = {};
level1.meter_arr = new Array(450, 900, 1350, 1800, 2250, 2700);
level1.enemy_area1_arr = new Array(15, 0, 0, 0, 0);
level1.enemy_area2_arr = new Array(10, 10, 0, 0, 0);
level1.enemy_area3_arr = new Array(12, 12, 0, 0, 0);
level1.enemy1_speed = 2.5;
level1.enemy2_speed = 1.9;
level1.enemy3_speed = 2.8;
level1.enemy4_speed = 2.5;
level1.enemy5_speed = 1.8;
level1.knife_speed = 6;
level1.frames_allowed = 4800;
level2 = {};
level2.meter_arr = new Array(450, 900, 1350, 1800, 2250, 2700);
level2.enemy_area1_arr = new Array(9, 10, 0, 0, 0);
level2.enemy_area2_arr = new Array(9, 8, 0, 4, 0);
level2.enemy_area3_arr = new Array(9, 7, 0, 4, 3);
level2.enemy1_speed = 2.9;
level2.enemy2_speed = 2.2;
level2.enemy3_speed = 2.8;
level2.enemy4_speed = 2.5;
level2.enemy5_speed = 1.8;
level2.knife_speed = 6;
level2.frames_allowed = 5400;
level3 = {};
level3.meter_arr = new Array(450, 900, 1350, 1800, 2250, 2700);
level3.enemy_area1_arr = new Array(9, 6, 0, 6, 2);
level3.enemy_area2_arr = new Array(9, 9, 0, 7, 5);
level3.enemy_area3_arr = new Array(9, 7, 4, 5, 7);
level3.enemy1_speed = 3.2;
level3.enemy2_speed = 2.6;
level3.enemy3_speed = 2.8;
level3.enemy4_speed = 2.5;
level3.enemy5_speed = 2;
level3.knife_speed = 8;
level3.frames_allowed = 6000;
level4 = {};
level4.meter_arr = new Array(450, 900, 1350, 1800, 2250, 2700);
level4.enemy_area1_arr = new Array(7, 7, 7, 4, 2);
level4.enemy_area2_arr = new Array(8, 7, 7, 5, 4);
level4.enemy_area3_arr = new Array(10, 9, 9, 6, 6);
level4.enemy1_speed = 3.6;
level4.enemy2_speed = 2.9;
level4.enemy3_speed = 3.2;
level4.enemy4_speed = 2.5;
level4.enemy5_speed = 2.2;
level4.knife_speed = 10;
level4.frames_allowed = 7200;
}
function startLevel1() {
game.level = 1;
game.area = 1;
game.area_frame = 0;
player.shakes = 0;
player.clip._visible = true;
player.clip._xscale = 100;
player.clip.gotoAndStop("stand");
player.status = "normal";
player.action = "rest";
player.position = "stand";
player.stand_frames = 0;
player.dead = false;
player.life = 100;
player.x = 200;
player.real_x = player.x;
player.y = player.max_y;
bg.x = 0;
bg.clip = bg.clip1;
createMeters(level1.meter_arr);
setEnemyArray(level1.enemy_area1_arr);
enemy1.speed = level1.enemy1_speed;
enemy2.speed = level1.enemy2_speed;
enemy3.speed = level1.enemy3_speed;
enemy4.speed = level1.enemy4_speed;
enemy5.speed = level1.enemy5_speed;
knife.speed = level1.knife_speed;
game.frames_allowed = level1.frames_allowed;
game.level_start_frame = game.frames;
game.level_end_frame = game.level_start_frame + level1.frames_allowed;
}
function startLevel2() {
game.level = 2;
game.area = 1;
game.area_frame = 0;
player.shakes = 0;
player.clip._visible = true;
player.clip._xscale = 100;
player.clip.gotoAndStop("stand");
player.status = "normal";
player.action = "rest";
player.position = "stand";
player.dead = false;
player.stand_frames = 0;
player.life = 100;
player.x = 200;
player.real_x = player.x;
player.y = player.max_y;
bg.x = 0;
bg.clip = bg.clip1;
createMeters(level2.meter_arr);
setEnemyArray(level2.enemy_area1_arr);
enemy1.speed = level2.enemy1_speed;
enemy2.speed = level2.enemy2_speed;
enemy3.speed = level2.enemy3_speed;
enemy4.speed = level2.enemy4_speed;
enemy5.speed = level2.enemy5_speed;
knife.speed = level2.knife_speed;
game.frames_allowed = level2.frames_allowed;
game.level_start_frame = game.frames;
game.level_end_frame = game.level_start_frame + level2.frames_allowed;
}
function startLevel3() {
game.level = 3;
game.area = 1;
game.area_frame = 0;
player.shakes = 0;
player.clip._visible = true;
player.clip._xscale = 100;
player.clip.gotoAndStop("stand");
player.status = "normal";
player.action = "rest";
player.position = "stand";
player.dead = false;
player.stand_frames = 0;
player.x = 200;
player.real_x = player.x;
player.y = player.max_y;
player.life = 100;
bg.x = 0;
bg.clip = bg.clip1;
createMeters(level3.meter_arr);
setEnemyArray(level3.enemy_area1_arr);
enemy1.speed = level3.enemy1_speed;
enemy2.speed = level3.enemy2_speed;
enemy3.speed = level3.enemy3_speed;
enemy4.speed = level3.enemy4_speed;
enemy5.speed = level3.enemy5_speed;
knife.speed = level3.knife_speed;
game.frames_allowed = level3.frames_allowed;
game.level_start_frame = game.frames;
game.level_end_frame = game.level_start_frame + level3.frames_allowed;
}
function startLevel4() {
game.level = 4;
game.area = 1;
game.area_frame = 0;
player.shakes = 0;
player.clip._visible = true;
player.clip._xscale = 100;
player.clip.gotoAndStop("stand");
player.status = "normal";
player.action = "rest";
player.position = "stand";
player.dead = false;
player.stand_frames = 0;
player.x = 200;
player.real_x = player.x;
player.y = player.max_y;
player.life = 100;
bg.x = 0;
bg.clip = bg.clip1;
createMeters(level4.meter_arr);
setEnemyArray(level4.enemy_area1_arr);
enemy1.speed = level4.enemy1_speed;
enemy2.speed = level4.enemy2_speed;
enemy3.speed = level4.enemy3_speed;
enemy4.speed = level4.enemy4_speed;
enemy5.speed = level4.enemy5_speed;
knife.speed = level4.knife_speed;
game.frames_allowed = level4.frames_allowed;
game.level_start_frame = game.frames;
game.level_end_frame = game.level_start_frame + level4.frames_allowed;
}
function setEnemyArray(enemy_area_arr) {
var _local1 = enemy_area_arr;
var _local2 = 0;
while (_local2 < game.area_frames) {
game.enemy_arr[_local2] = 0;
_local2++;
}
_local2 = 0;
while (_local2 < _local1[0]) {
var _local3 = random(game.area_frames);
game.enemy_arr[_local3] = 1;
_local2++;
}
_local2 = 0;
while (_local2 < _local1[1]) {
var _local3 = random(game.area_frames);
game.enemy_arr[_local3] = 2;
_local2++;
}
_local2 = 0;
while (_local2 < _local1[2]) {
var _local3 = random(game.area_frames);
game.enemy_arr[_local3] = 3;
_local2++;
}
_local2 = 0;
while (_local2 < _local1[3]) {
var _local3 = random(game.area_frames);
game.enemy_arr[_local3] = 4;
_local2++;
}
_local2 = 0;
while (_local2 < _local1[4]) {
var _local3 = random(game.area_frames);
game.enemy_arr[_local3] = 5;
_local2++;
}
}
function updateKeys() {
key_control.last_right = key_control.right;
key_control.last_left = key_control.left;
key_control.last_up = key_control.up;
key_control.last_down = key_control.down;
key_control.last_a = key_control.a;
key_control.last_s = key_control.s;
key_control.right = Key.isDown(39);
key_control.left = Key.isDown(37);
key_control.up = Key.isDown(38);
key_control.down = Key.isDown(40);
key_control.a = Key.isDown(65);
key_control.s = Key.isDown(83);
key_control.this_right = false;
key_control.this_left = false;
key_control.this_up = false;
key_control.this_down = false;
key_control.this_a = false;
key_control.this_s = false;
if (key_control.right && (!key_control.last_right)) {
key_control.this_right = true;
}
if (key_control.left && (!key_control.last_left)) {
key_control.this_left = true;
}
if (key_control.up && (!key_control.last_up)) {
key_control.this_up = true;
}
if (key_control.down && (!key_control.last_down)) {
key_control.this_down = true;
}
if (key_control.a && (!key_control.last_a)) {
key_control.this_a = true;
}
if (key_control.s && (!key_control.last_s)) {
key_control.this_s = true;
}
}
function allowPlayerMoveRight() {
}
function normalStandKeyControl() {
if (key_control.this_up) {
playerJump();
} else if (key_control.down) {
playerCrouch();
} else if ((((!key_control.right) && (!key_control.left)) && (!key_control.a)) && (!key_control.s)) {
playerStand();
} else if (((key_control.right && (!key_control.left)) && (!key_control.a)) && (!key_control.s)) {
if (player.real_x >= (-game.area3_end)) {
playerStand();
} else if (enemy4.right_side && (player.x >= (enemy4.right_enemy_x - 30))) {
playerStand();
} else {
playerMoveRight();
}
} else if ((((!key_control.right) && (key_control.left)) && (!key_control.a)) && (!key_control.s)) {
if (player.real_x <= 120) {
playerStand();
} else if (enemy4.left_side && (player.x <= (enemy4.left_enemy_x + 30))) {
playerStand();
} else {
playerMoveLeft();
}
} else if ((((!key_control.right) && (!key_control.left)) && (key_control.this_a)) && (!key_control.s)) {
playerPunch();
} else if ((((!key_control.right) && (!key_control.left)) && (!key_control.a)) && (key_control.this_s)) {
playerKick();
} else if (((key_control.right && (key_control.left)) && (!key_control.a)) && (!key_control.s)) {
playerStand();
} else if (((key_control.right && (!key_control.left)) && key_control.this_a) && (!key_control.s)) {
playerTurnRight();
playerPunch();
} else if (((key_control.right && (!key_control.left)) && (!key_control.a)) && key_control.this_s) {
playerTurnRight();
playerKick();
} else if ((((!key_control.right) && key_control.left) && key_control.this_a) && (!key_control.s)) {
playerTurnLeft();
playerPunch();
} else if ((((!key_control.right) && key_control.left) && (!key_control.a)) && key_control.this_s) {
playerTurnLeft();
playerKick();
} else if ((((!key_control.right) && (!key_control.left)) && key_control.this_a) && key_control.this_s) {
playerPunch();
} else if (((key_control.right && key_control.left) && key_control.this_a) && key_control.this_s) {
playerPunch();
} else if (((key_control.right && key_control.left) && (!key_control.a)) && key_control.this_s) {
playerKick();
} else if (((key_control.right && (!key_control.left)) && key_control.this_a) && key_control.this_s) {
playerTurnRight();
playerPunch();
} else if ((((!key_control.right) && key_control.left) && key_control.this_a) && key_control.this_s) {
playerTurnLeft();
playerPunch();
} else if (((key_control.right && key_control.left) && key_control.this_a) && key_control.this_s) {
playerPunch();
}
}
function normalJumpKeyControl() {
if ((!key_control.a) && (!key_control.s)) {
} else if (key_control.this_a && (!key_control.s)) {
playerJumpPunch();
} else if ((!key_control.a) && (key_control.this_s)) {
playerJumpKick();
} else if (key_control.this_a && (key_control.this_s)) {
playerJumpPunch();
}
}
function normalCrouchKeyControl() {
if (!key_control.down) {
playerStand();
} else if ((((!key_control.right) && (!key_control.left)) && (!key_control.a)) && (!key_control.s)) {
playerCrouch();
} else if (((key_control.right && (!key_control.left)) && (!key_control.a)) && (!key_control.s)) {
playerTurnCrouchRight();
} else if ((((!key_control.right) && (key_control.left)) && (!key_control.a)) && (!key_control.s)) {
playerTurnCrouchLeft();
} else if ((((!key_control.right) && (!key_control.left)) && (key_control.this_a)) && (!key_control.s)) {
playerCrouchPunch();
} else if ((((!key_control.right) && (!key_control.left)) && (!key_control.a)) && (key_control.this_s)) {
playerCrouchKick();
} else if (((key_control.right && (key_control.left)) && (!key_control.a)) && (!key_control.s)) {
playerCrouch();
} else if (((key_control.right && (!key_control.left)) && (key_control.this_a)) && (!key_control.s)) {
playerTurnCrouchRight();
playerCrouchPunch();
} else if (((key_control.right && (!key_control.left)) && (!key_control.a)) && key_control.this_s) {
playerTurnCrouchRight();
playerCrouchKick();
} else if ((((!key_control.right) && key_control.left) && key_control.this_a) && (!key_control.s)) {
playerTurnCrouchLeft();
playerCrouchPunch();
} else if ((((!key_control.right) && key_control.left) && (!key_control.a)) && key_control.this_s) {
playerTurnCrouchLeft();
playerCrouchKick();
} else if ((((!key_control.right) && (!key_control.left)) && key_control.this_a) && key_control.this_s) {
playerCrouchPunch();
} else if (((key_control.right && key_control.left) && key_control.this_a) && (!key_control.s)) {
playerCrouchPunch();
} else if (((key_control.right && key_control.left) && (!key_control.a)) && key_control.this_s) {
playerCrouchKick();
} else if (((key_control.right && (!key_control.left)) && key_control.this_a) && key_control.this_s) {
playerTurnCrouchRight();
playerCrouchPunch();
} else if ((((!key_control.right) && key_control.left) && key_control.this_a) && key_control.this_s) {
playerTurnCrouchLeft();
playerCrouchPunch();
} else if (((key_control.right && key_control.left) && key_control.this_a) && key_control.this_s) {
playerCrouchPunch();
}
}
function frozenKeyControl() {
if ((key_control.right && (!key_control.left)) && (!key_control.last_right)) {
player.shakes++;
playerTurnRight();
} else if (((!key_control.right) && (key_control.left)) && (!key_control.last_left)) {
player.shakes++;
playerTurnLeft();
}
}
function updatePlayerAction() {
if ((player.status == "normal") && (!player.dead)) {
if ((player.position == "stand") && (player.action == "rest")) {
normalStandKeyControl();
} else if ((player.position == "jump") && (player.action == "rest")) {
normalJumpKeyControl();
} else if ((player.position == "crouch") && (player.action == "rest")) {
normalCrouchKeyControl();
}
} else if ((player.status == "frozen") && (!player.dead)) {
player.xmov = 0;
reduceLife(player.life_catch_decrease);
frozenKeyControl();
if (player.shakes >= player.shakes_to_escape) {
killAllCatchEnemies();
player.shakes = 0;
player.status = "normal";
player.action = "rest";
player.position = "stand";
player.clip.gotoAndStop("stand");
}
}
}
function reduceLife(life) {
player.life = player.life - life;
updateStats();
if (player.life < 0) {
player.life = 0;
}
}
function playerJump() {
player.ymov = -10;
player.action = "rest";
player.position = "jump";
player.clip.gotoAndPlay("jump");
}
function playerCrouch() {
player.xmov = 0;
player.action = "rest";
player.position = "crouch";
player.clip.gotoAndStop("crouch");
}
function playerStand() {
player.xmov = 0;
player.action = "rest";
player.position = "stand";
player.clip.gotoAndStop("stand");
}
function playerMoveRight() {
player.xmov = player.speed;
player.clip._xscale = 100;
player.action = "rest";
player.position = "stand";
player.clip.gotoAndPlay("walk");
}
function playerMoveLeft() {
player.xmov = -player.speed;
player.clip._xscale = -100;
player.action = "rest";
player.position = "stand";
player.clip.gotoAndPlay("walk");
}
function playerPunch() {
_root.punchMiss_snd.start();
player.xmov = 0;
player.action = "punch";
player.position = "stand";
if (player.item == "stone") {
player.clip.gotoAndPlay("throw");
} else {
player.clip.gotoAndPlay("punch");
}
}
function playerKick() {
_root.punchMiss_snd.start();
player.xmov = 0;
player.action = "kick";
player.position = "stand";
player.clip.gotoAndPlay("kick");
}
function playerTurnRight() {
player.xmov = 0;
player.clip._xscale = 100;
player.action = "rest";
player.position = "stand";
player.clip.gotoAndStop("stand");
}
function playerTurnLeft() {
player.xmov = 0;
player.clip._xscale = -100;
player.action = "rest";
player.position = "stand";
player.clip.gotoAndStop("stand");
}
function playerJumpPunch() {
player.action = "punch";
player.position = "jump";
if (player.item == "stone") {
player.clip.gotoAndPlay("jump throw");
} else {
player.clip.gotoAndPlay("jump punch");
}
}
function playerJumpKick() {
player.action = "kick";
player.position = "jump";
player.clip.gotoAndPlay("jump kick");
}
function playerCatchGround() {
_root.jump_snd.start();
player.xmov = 0;
player.action = "rest";
player.position = "stand";
player.clip.gotoAndStop("stand");
}
function updatePlayerPosition() {
if ((player.y >= player.max_y) && (!player.dead)) {
if ((player.position == "jump") && (player.ymov > 0)) {
playerCatchGround();
}
} else {
player.ymov = player.ymov + player.yacc;
}
player.y = player.y + player.ymov;
if (player.y > player.max_y) {
player.ymov = 0;
player.y = player.max_y;
}
player.x = player.x + player.xmov;
player.real_x = player.real_x + player.xmov;
if ((player.x + player.xmov) > player.max_x) {
player.x = player.x - player.xmov;
bg.xmov = -player.xmov;
updateAllItemsPositionWithBG();
} else if ((player.x + player.xmov) < player.min_x) {
player.x = player.x - player.xmov;
bg.xmov = -player.xmov;
updateAllItemsPositionWithBG();
} else {
bg.xmov = 0;
}
player.clip._x = player.x;
player.clip._y = player.y;
}
function updateAllItemsPosition() {
var _local1 = this;
var _local3 = 0;
while (_local3 <= enemy1.current_id) {
var _local2 = _local1["enemy1_" + _local3];
_local2.x = _local2.x + bg.xmov;
_local2.clip._x = _local2.x;
_local3++;
}
_local3 = 0;
while (_local3 <= enemy2.current_id) {
var _local2 = _local1["enemy2_" + _local3];
_local2.x = _local2.x + bg.xmov;
_local2.clip._x = _local2.x;
_local3++;
}
_local3 = 0;
while (_local3 <= enemy3.current_id) {
var _local2 = _local1["enemy3_" + _local3];
_local2.x = _local2.x + bg.xmov;
_local2.clip._x = _local2.x;
_local3++;
}
_local3 = 0;
while (_local3 <= enemy4.current_id) {
var _local2 = _local1["enemy4_" + _local3];
_local2.x = _local2.x + bg.xmov;
_local2.clip._x = _local2.x;
_local3++;
}
_local3 = 0;
while (_local3 <= enemy5.current_id) {
var _local2 = _local1["enemy5_" + _local3];
_local2.x = _local2.x + bg.xmov;
_local2.clip._x = _local2.x;
_local3++;
}
}
function playerTurnCrouchRight() {
player.xmov = 0;
player.clip._xscale = 100;
player.action = "rest";
player.position = "crouch";
player.clip.gotoAndStop("crouch");
}
function playerTurnCrouchLeft() {
player.xmov = 0;
player.clip._xscale = -100;
player.action = "rest";
player.position = "crouch";
player.clip.gotoAndStop("crouch");
}
function playerCrouchPunch() {
player.xmov = 0;
player.action = "punch";
player.position = "crouch";
if (player.item == "stone") {
player.clip.gotoAndPlay("crouch throw");
} else {
player.clip.gotoAndPlay("crouch punch");
}
}
function playerCrouchKick() {
player.xmov = 0;
player.action = "kick";
player.position = "crouch";
player.clip.gotoAndPlay("crouch kick");
}
function checkPlayerEscape() {
var _local3 = this;
var _local2 = false;
if (player.status == "frozen") {
break_free_mc._visible = true;
var _local1 = 0;
while (_local1 <= enemy1.current_id) {
enemy_obj = _local3["enemy1_" + _local1];
if (enemy_obj.status == "catch") {
_local2 = true;
}
_local1++;
}
_local1 = 0;
while (_local1 <= enemy2.current_id) {
enemy_obj = _local3["enemy2_" + _local1];
if (enemy_obj.status == "catch") {
_local2 = true;
}
_local1++;
}
_local1 = 0;
while (_local1 <= enemy3.current_id) {
enemy_obj = _local3["enemy3_" + _local1];
if (enemy_obj.status == "catch") {
_local2 = true;
}
_local1++;
}
if (!_local2) {
player.shakes = 0;
player.status = "normal";
}
} else {
break_free_mc._visible = false;
}
}
function checkPlayerDead() {
if ((player.life == 0) && (!player.dead)) {
player.dead = true;
player.clip.gotoAndPlay("die");
}
if (player.dead) {
trace("DEADDDDDDDDDDDDDDDD");
if (player.clip._currentframe == player.clip._totalframes) {
player.clip._visible = false;
game.lives--;
if (game.lives <= 0) {
gameOver();
} else {
restartCurrentLevel();
}
}
}
}
function createMeters(meter_arr) {
var _local2 = meter_arr;
var _local1 = 0;
while (_local1 < _local2.length) {
createMeter(_local2[_local1]);
_local1++;
}
}
function createMeter(x, y) {
var _local3 = this;
var _local2 = -1;
do {
_local2++;
var temp_meter_obj = _local3["meter" + _local2];
} while (temp_meter_obj.available);
var name = ("meter" + _local2);
var clip_name = (("meter" + _local2) + "_mc");
_local3[name] = {};
var _local1 = _local3[name];
_local1.available = true;
_local1.done = false;
_local1.clip = attachMovie("meter", clip_name, depth.meter + _local2);
_local1.clip.stop();
_local1.power = 0;
_local1.stand_frames = 0;
_local1.width = 25;
_local1.height = 90;
_local1.x = x;
_local1.y = meter.y;
_local1.clip._width = _local1.width;
_local1.clip._height = _local1.height;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
_local1.sign = false;
if (_local2 > meter.current_id) {
meter.current_id = _local2;
}
}
function removeAllMeters() {
var _local2 = this;
var _local1 = 0;
while (_local1 <= meter.current_id) {
meter_obj = _local2["meter" + _local1];
removeMeter(meter_obj);
_local1++;
}
}
function removeMeter(meter_obj) {
var _local1 = meter_obj;
_local1.clip.removeMovieClip();
_local1.available = false;
_local1.done = true;
_local1 = {};
}
function updateMeters() {
var _local2 = _root;
var _local3 = 0;
while (_local3 <= meter.current_id) {
var _local1 = this["meter" + _local3];
_local1.xmov = bg.xmov;
_local1.x = _local1.x + _local1.xmov;
_local1.clip._x = _local1.x;
if (!_local1.done) {
var dist = Math.abs(player.x - _local1.x);
if (((((dist < 50) && (player.status == "normal")) && (player.position == "stand")) && (player.action == "rest")) && (player.xmov == 0)) {
_local1.stand_frames++;
} else {
_local1.stand_frames = 0;
}
if (_local1.stand_frames >= 15) {
_local1.power++;
player.clip.gotoAndStop("write");
_local2.writing_snd.start();
}
if (_local1.power >= 100) {
_local1.done = true;
addScore(score.meter_base * game.level);
_local1.clip.gotoAndPlay("done");
_local2["symbol_" + _local1.clip._name].nextFrame();
if (checkAllMetersCompleted()) {
_local2.writing_snd.stop();
_local2.tearing_snd.start();
_local2.tearing_snd.setOnComplete(doneFlag_mc.play());
} else {
_local2.writing_snd.stop();
_local2.tearing_snd.start();
_local2.tearing_snd.setOnComplete(_local2.bell_snd.start());
_local2.getItem(jackCommentList).start();
}
} else {
_local1.clip.gotoAndStop(_local1.power + 20);
}
}
_local3++;
}
checkbackArrow();
}
function checkbackArrow() {
var _local3 = false;
var _local1 = 0;
while (_local1 <= meter.current_id) {
var _local2 = this["meter" + _local1];
if ((!_local2.done) && (_local2.x < 0)) {
_local3 = true;
}
_local1++;
}
if (_local3) {
back_arrow_mc._visible = true;
meterAlert_snd.start();
} else {
back_arrow_mc._visible = false;
}
}
function checkCreateEnemy() {
if (game.enemy_arr[game.area_frame] == 1) {
createEnemy1();
}
if (game.enemy_arr[game.area_frame] == 2) {
createEnemy2();
}
if (game.enemy_arr[game.area_frame] == 3) {
createEnemy3();
}
if (game.enemy_arr[game.area_frame] == 4) {
var _local1 = Math.random() < 0.5;
if (_local1 && (!enemy4.right_side)) {
createEnemy4("right");
} else if ((!_local1) && (!enemy4.left_side)) {
createEnemy4("left");
}
}
if (game.enemy_arr[game.area_frame] == 5) {
createEnemy5();
}
}
function createEnemy1() {
var _local3 = this;
var _local2 = -1;
do {
_local2++;
var temp_enemy_obj = _local3["enemy1_" + _local2];
} while (temp_enemy_obj.available);
var name = ("enemy1_" + _local2);
var clip_name = (("enemy1" + _local2) + "_mc");
_local3[name] = {};
var _local1 = _local3[name];
_local1.type = 1;
_local1.clip = attachMovie("enemy1", clip_name, depth.enemy1 + _local2);
_local1.clip.gotoAndPlay("move");
_local1.iv1_clip = _local1.clip.iv1_mc;
_local1.iv2_clip = _local1.clip.iv2_mc;
_local1.iv3_clip = _local1.clip.iv3_mc;
if (Math.random() < 0.5) {
_local1.x = enemy1.init_right_x;
_local1.xmov = -enemy1.speed;
_local1.face = "left";
_local1.clip._xscale = 100;
} else {
_local1.x = enemy1.init_left_x;
_local1.xmov = enemy1.speed;
_local1.face = "right";
_local1.clip._xscale = -100;
}
_local1.life = enemy1.life;
_local1.y = enemy1.y;
_local1.ymov = 0;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
_local1.iv_clip_radius = _local1.iv_clip._width / 2;
_local1.available = true;
_local1.close_to_player = false;
_local1.status = "normal";
if (_local2 > enemy1.current_id) {
enemy1.current_id = _local2;
}
}
function createEnemy2() {
var _local3 = this;
var _local2 = -1;
do {
_local2++;
var temp_enemy_obj = _local3["enemy2_" + _local2];
} while (temp_enemy_obj.available);
var name = ("enemy2_" + _local2);
var clip_name = (("enemy2" + _local2) + "_mc");
_local3[name] = {};
var _local1 = _local3[name];
_local1.type = 2;
_local1.clip = attachMovie("enemy2", clip_name, depth.enemy2 + _local2);
_local1.clip.gotoAndPlay("move");
_local1.iv1_clip = _local1.clip.iv1_mc;
_local1.iv2_clip = _local1.clip.iv2_mc;
if (Math.random() < 0.5) {
_local1.x = enemy2.init_right_x;
_local1.xmov = -enemy2.speed;
_local1.face = "left";
_local1.clip._xscale = 100;
} else {
_local1.x = enemy2.init_left_x;
_local1.xmov = enemy2.speed;
_local1.face = "right";
_local1.clip._xscale = -100;
}
_local1.life = enemy2.life;
_local1.y = enemy2.y;
_local1.ymov = 0;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
_local1.iv_clip_radius = _local1.iv_clip._width / 2;
_local1.available = true;
_local1.status = "normal";
if (_local2 > enemy2.current_id) {
enemy2.current_id = _local2;
}
}
function createEnemy3() {
var _local3 = this;
var _local2 = -1;
do {
_local2++;
var temp_enemy_obj = _local3["enemy3_" + _local2];
} while (temp_enemy_obj.available);
var name = ("enemy3_" + _local2);
var clip_name = (("enemy3" + _local2) + "_mc");
_local3[name] = {};
var _local1 = _local3[name];
_local1.type = 3;
_local1.clip = attachMovie("enemy3", clip_name, depth.enemy3 + _local2);
_local1.clip.gotoAndPlay("normal");
_local1.iv1_clip = _local1.clip.iv1_mc;
if (Math.random() < 0.5) {
_local1.x = enemy3.init_right_x;
_local1.xmov = -enemy3.speed;
_local1.face = "left";
_local1.clip._xscale = 100;
} else {
_local1.x = enemy3.init_left_x;
_local1.xmov = enemy3.speed;
_local1.face = "right";
_local1.clip._xscale = -100;
}
_local1.life = enemy3.life;
_local1.ymov = -enemy3.jump_speed;
_local1.y = enemy3.y;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
_local1.iv_clip_radius = _local1.iv_clip._width / 2;
_local1.available = true;
_local1.status = "normal";
if (_local2 > enemy3.current_id) {
enemy3.current_id = _local2;
}
}
function createEnemy4(side) {
var _local3 = this;
var _local2 = -1;
do {
_local2++;
var temp_enemy_obj = _local3["enemy4_" + _local2];
} while (temp_enemy_obj.available);
var name = ("enemy4_" + _local2);
var clip_name = (("enemy4" + _local2) + "_mc");
_local3[name] = {};
var _local1 = _local3[name];
_local1.type = 4;
_local1.clip = attachMovie("enemy4", clip_name, depth.enemy4 + _local2);
_local1.clip.gotoAndPlay("normal");
_local1.iv1_clip = _local1.clip.iv1_mc;
_local1.iv2_clip = _local1.clip.iv2_mc;
_local1.iv3_clip = _local1.clip.iv3_mc;
_local1.face = side;
var right_side = (Math.random() < 0.5);
if (_local1.face == "right") {
_local1.x = enemy4.init_right_x;
_local1.xmov = -enemy4.speed;
_local1.face = "left";
_local1.clip._xscale = 100;
enemy4.right_side = true;
} else {
_local1.x = enemy4.init_left_x;
_local1.xmov = enemy4.speed;
_local1.face = "right";
_local1.clip._xscale = -100;
enemy4.left_side = true;
}
_local1.life = enemy4.life;
_local1.y = enemy4.y;
_local1.ymov = 0;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
_local1.iv_clip_radius = _local1.iv_clip._width / 2;
_local1.last_throw_frame = game.frames;
_local1.available = true;
_local1.status = "normal";
if (_local2 > enemy4.current_id) {
enemy4.current_id = _local2;
}
}
function createEnemy5() {
var _local3 = this;
var _local2 = -1;
do {
_local2++;
var temp_enemy_obj = _local3["enemy5_" + _local2];
} while (temp_enemy_obj.available);
var name = ("enemy5_" + _local2);
var clip_name = (("enemy5" + _local2) + "_mc");
_local3[name] = {};
var _local1 = _local3[name];
_local1.type = 5;
_local1.clip = attachMovie("enemy5", clip_name, depth.enemy5 + _local2);
_local1.clip.stop();
_local1.iv1_clip = _local1.clip.iv1_mc;
_local1.iv2_clip = _local1.clip.iv2_mc;
_local1.iv3_clip = _local1.clip.iv3_mc;
if (Math.random() < 0.5) {
_local1.x = enemy5.init_right_x;
_local1.xmov = -enemy5.speed;
_local1.face = "left";
_local1.clip._xscale = 100;
} else {
_local1.x = enemy5.init_left_x;
_local1.xmov = enemy5.speed;
_local1.face = "right";
_local1.clip._xscale = -100;
}
_local1.life = enemy5.life;
_local1.y = enemy5.y;
_local1.ymov = 0;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
_local1.iv_clip_radius = _local1.iv_clip._width / 2;
_local1.last_swing_frame = game.frames;
_local1.available = true;
_local1.status = "normal";
if (_local2 > enemy5.current_id) {
enemy5.current_id = _local2;
}
}
function removeAllEnemies() {
var _local2 = this;
var _local3 = 0;
while (_local3 <= enemy1.current_id) {
var _local1 = _local2["enemy1_" + _local3];
_local1.status = "dead";
_local1.x = -200;
_local1.y = -200;
_local1.clip.removeMovieClip();
_local1.available = false;
_local1 = {};
_local3++;
}
_local3 = 0;
while (_local3 <= enemy2.current_id) {
var _local1 = _local2["enemy2_" + _local3];
_local1.status = "dead";
_local1.x = -200;
_local1.y = -200;
_local1.clip.removeMovieClip();
_local1.available = false;
_local1 = {};
_local3++;
}
_local3 = 0;
while (_local3 <= enemy3.current_id) {
var _local1 = _local2["enemy3_" + _local3];
_local1.status = "dead";
_local1.x = -200;
_local1.y = -200;
_local1.clip.removeMovieClip();
_local1.available = false;
_local1 = {};
_local3++;
}
_local3 = 0;
while (_local3 <= enemy4.current_id) {
var _local1 = _local2["enemy4_" + _local3];
_local1.status = "dead";
_local1.x = -200;
_local1.y = -200;
_local1.clip.removeMovieClip();
_local1.available = false;
_local1 = {};
_local3++;
}
_local3 = 0;
while (_local3 <= enemy5.current_id) {
var _local1 = _local2["enemy5_" + _local3];
_local1.status = "dead";
_local1.x = -200;
_local1.y = -200;
_local1.clip.removeMovieClip();
_local1.available = false;
_local1 = {};
_local3++;
}
enemy4.right_side = false;
enemy4.left_side = false;
enemy1.current_id = 0;
enemy2.current_id = 0;
enemy3.current_id = 0;
enemy4.current_id = 0;
enemy5.current_id = 0;
}
function removeEnemy(enemy_obj) {
var _local1 = enemy_obj;
_local1.clip.removeMovieClip();
_local1.available = false;
if (_local1.type == 4) {
if (_local1.face == "right") {
enemy4.right_side = false;
enemy4.left_enemy_x = -100;
} else if (_local1.face == "left") {
enemy4.left_side = false;
enemy4.right_enemy_x = 600;
}
}
_local1.status = "dead";
_local1.x = -200;
_local1.y = -200;
_local1 = {};
}
function killEnemy(enemy_obj) {
var _local1 = enemy_obj;
var _local2 = _root;
if (_local1.face == "left") {
_local1.xmov = 5;
} else {
_local1.xmov = -5;
}
_local1.ymov = 5;
_local1.status = "dead";
_local1.clip.gotoAndStop(1);
if (((_local1.type == 1) || (_local1.type == 2)) || (_local1.type == 3)) {
_local2.zombieDead_snd.start();
} else if (_local1.type == 4) {
_local2.mobster1Dead_snd.start();
} else if (_local1.type == 5) {
_local2.mobster2Dead_snd.start();
}
}
function killAllCatchEnemies() {
var _local3 = this;
var _local1 = 0;
while (_local1 <= enemy1.current_id) {
var _local2 = _local3["enemy1_" + _local1];
if (_local2.status == "catch") {
killEnemy(_local2);
}
_local1++;
}
_local1 = 0;
while (_local1 <= enemy2.current_id) {
var _local2 = _local3["enemy2_" + _local1];
if (_local2.status == "catch") {
killEnemy(_local2);
}
_local1++;
}
_local1 = 0;
while (_local1 <= enemy3.current_id) {
var _local2 = _local3["enemy3_" + _local1];
if (_local2.status == "catch") {
killEnemy(_local2);
}
_local1++;
}
}
function updateEnemiesPosition() {
updateEnemy1Position();
updateEnemy2Position();
updateEnemy3Position();
updateEnemy4Position();
updateEnemy5Position();
}
function updateEnemy1Position() {
var _local2 = 0;
while (_local2 <= enemy1.current_id) {
var _local1 = this["enemy1_" + _local2];
if (_local1.available) {
if (_local1.status == "normal") {
var _local3 = Math.abs(player.x - _local1.x);
if ((_local3 < 150) && (!_local1.close_to_player)) {
_local1.close_to_player = true;
_local1.clip.gotoAndPlay("move close");
_root.zombieGrunt_snd.start();
}
} else if (_local1.status == "catch") {
_local1.xmov = 0;
_local1.ymov = 0;
_local1.clip.gotoAndStop("move close");
} else if (_local1.status == "dead") {
_local1.clip.gotoAndStop("dead");
_root.zombieGrunt_snd.stop();
if (_local1.y > 400) {
removeEnemy(_local1);
}
}
_local1.x = _local1.x + _local1.xmov;
_local1.y = _local1.y + _local1.ymov;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
}
_local2++;
}
}
function updateEnemy2Position() {
var _local3 = _root;
var _local2 = 0;
while (_local2 <= enemy2.current_id) {
var _local1 = this["enemy2_" + _local2];
if (_local1.available) {
if (_local1.status == "catch") {
_local1.xmov = 0;
_local1.ymov = 0;
_local1.clip.gotoAndPlay("bite");
_local3.zombieBite_snd.start();
} else if (_local1.status == "dead") {
_local1.clip.gotoAndStop("dead");
_local3.zombieBite_snd.stop();
if (_local1.y > 400) {
removeEnemy(_local1);
}
}
_local1.x = _local1.x + _local1.xmov;
_local1.y = _local1.y + _local1.ymov;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
}
_local2++;
}
}
function updateEnemy3Position() {
var _local3 = _root;
var _local2 = 0;
while (_local2 <= enemy3.current_id) {
var _local1 = this["enemy3_" + _local2];
if (_local1.available) {
if (_local1.status == "catch") {
_local3.zombieBite_snd.start();
_local1.y = player.y - 30;
_local1.xmov = 0;
_local1.ymov = 0;
} else if (_local1.status == "dead") {
_local3.zombieBite_snd.stop();
_local1.x = _local1.x + _local1.xmov;
_local1.y = _local1.y + _local1.ymov;
if (_local1.y > 400) {
removeEnemy(_local1);
}
} else if (_local1.status == "normal") {
_local1.ymov = _local1.ymov + enemy3.yacc;
_local1.y = _local1.y + _local1.ymov;
if (_local1.y > enemy3.init_y) {
_local1.y = enemy3.init_y;
_local1.ymov = -enemy3.jump_speed;
}
_local1.x = _local1.x + _local1.xmov;
}
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
}
_local2++;
}
}
function updateEnemy4Position() {
var _local2 = 0;
while (_local2 <= enemy4.current_id) {
var _local1 = this["enemy4_" + _local2];
if (_local1.available) {
if (_local1.status == "normal") {
if (_local1.xmov == 0) {
if ((_local1.face == "right") && (_local1.x < enemy4.left_x_max)) {
_local1.xmov = enemy4.speed;
if (_local2 == 0) {
}
_local1.clip.gotoAndPlay("normal");
} else if ((_local1.face == "left") && (_local1.x > enemy4.right_x_min)) {
_local1.xmov = -enemy4.speed;
if (_local2 == 0) {
}
_local1.clip.gotoAndPlay("normal");
}
}
if ((_local1.x < enemy4.right_x_min) && (_local1.xmov < 0)) {
_local1.x = enemy4.right_x_min;
_local1.xmov = 0;
_local1.clip.gotoAndStop("normal");
} else if ((_local1.x > enemy4.left_x_max) && (_local1.xmov > 0)) {
_local1.x = enemy4.left_x_max;
_local1.xmov = 0;
_local1.clip.gotoAndStop("normal");
}
var _local3 = _local1.last_throw_frame + enemy4.frames_per_throw;
if ((game.frames > _local3) && (_local1.xmov == 0)) {
_local1.clip.gotoAndPlay();
if (Math.random() < 0.5) {
_local1.clip.gotoAndPlay("throw bottom");
} else {
_local1.clip.gotoAndPlay("throw top");
}
_local1.last_throw_frame = game.frames;
}
if (_local1.clip._currentframe == 41) {
createBottomKnife(_local1);
} else if (_local1.clip._currentframe == 61) {
createTopKnife(_local1);
}
} else if (_local1.status == "dead") {
_local1.clip.gotoAndPlay("dead");
}
_local1.x = _local1.x + _local1.xmov;
_local1.y = _local1.y + _local1.ymov;
if (_local1.face == "right") {
enemy4.left_enemy_x = _local1.x;
} else if (_local1.face == "left") {
enemy4.right_enemy_x = _local1.x;
}
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
}
_local2++;
}
}
function updateEnemy5Position() {
var _local2 = 0;
while (_local2 <= enemy5.current_id) {
var _local1 = this["enemy5_" + _local2];
if (_local1.available) {
var _local3 = _local1.x - player.x;
var ydist = (_local1.y - player.y);
if ((_local1.status != "normal") && (_local1.status != "dead")) {
if (_local1.clip._currentframe == 1) {
_local1.status = "normal";
}
}
if (_local1.status == "dead") {
if (_local1.y > 400) {
removeEnemy(_local1);
}
} else if (_local1.status == "normal") {
if (Math.abs(_local3) < 80) {
_local1.clip.gotoAndStop("normal");
if (_local1.xmov != 0) {
_local1.last_swing_frame = (game.frames - enemy5.frames_per_swing) + 15;
}
_local1.xmov = 0;
if (game.frames > (_local1.last_swing_frame + enemy5.frames_per_swing)) {
if (Math.random() < 0.8) {
swingBat(_local1);
_local1.last_swing_frame = game.frames;
} else {
_local1.last_swing_frame = game.frames;
}
}
} else if (_local3 < 0) {
_local1.xmov = enemy5.speed;
_local1.clip._xscale = -100;
if (_local1.clip._currentframe == 1) {
_local1.clip.gotoAndplay(2);
}
} else if (_local3 > 0) {
_local1.xmov = -enemy5.speed;
_local1.clip._xscale = 100;
if (_local1.clip._currentframe == 1) {
_local1.clip.gotoAndPlay(2);
}
}
}
_local1.x = _local1.x + _local1.xmov;
_local1.y = _local1.y + _local1.ymov;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
}
_local2++;
}
}
function swingBat(enemy_obj) {
if (Math.random() < 0.5) {
swingBatTop(enemy_obj);
} else {
swingBatBottom(enemy_obj);
}
}
function swingBatTop(enemy_obj) {
enemy_obj.clip.gotoAndPlay("hit top");
enemy_obj.status = "hit top";
_root.batSwing_snd.start();
}
function swingBatBottom(enemy_obj) {
enemy_obj.clip.gotoAndPlay("hit bottom");
enemy_obj.status = "hit bottom";
_root.batSwing_snd.start();
}
function createTopKnife(enemy_obj) {
var _local1 = "knife" + knife.current_id;
var _local2 = ("knife" + knife.current_id) + "_mc";
this[_local1] = {};
knife_obj = this[_local1];
knife_obj.clip = attachMovie("knife", _local2, depth.knife + knife.current_id);
knife_obj.available = true;
knife_obj.x = enemy_obj.x;
knife_obj.y = knife.high_y;
knife_obj.position = "high";
if (enemy_obj.face == "right") {
knife_obj.clip._xscale = 100;
knife_obj.xmov = knife.speed;
} else {
knife_obj.clip._xscale = -100;
knife_obj.xmov = -knife.speed;
}
knife_obj.x = knife_obj.x + knife_obj.xmov;
knife_obj.clip._x = knife_obj.x;
knife_obj.clip._y = knife_obj.y;
knife.current_id++;
_root.knifeThrow_snd.start();
}
function createBottomKnife(enemy_obj) {
var _local2 = this;
var _local1 = -1;
do {
_local1++;
var temp_knife_obj = _local2["knife_" + _local1];
} while (temp_knife_obj.available);
var _local3 = "knife" + _local1;
var clip_name = (("knife" + _local1) + "_mc");
_local2[_local3] = {};
knife_obj = _local2[_local3];
knife_obj.clip = attachMovie("knife", clip_name, depth.knife + _local1);
knife_obj.available = true;
knife_obj.x = enemy_obj.x;
knife_obj.y = knife.low_y;
knife_obj.position = "low";
if (enemy_obj.face == "right") {
knife_obj.clip._xscale = 100;
knife_obj.xmov = knife.speed;
} else {
knife_obj.clip._xscale = -100;
knife_obj.xmov = -knife.speed;
}
knife_obj.x = knife_obj.x + knife_obj.xmov;
knife_obj.clip._x = knife_obj.x;
knife_obj.clip._y = knife_obj.y;
knife.current_id++;
_root.knifeThrow_snd.start();
}
function removeAllKnives() {
var _local2 = this;
var _local1 = 0;
while (_local1 < knife.current_id) {
knife_obj = _local2["knife" + _local1];
removeKnife(knife_obj);
_local1++;
}
}
function removeKnife(knife_obj) {
var _local1 = knife_obj;
_local1.available = false;
_local1.x = -200;
_local1.y = -200;
_local1.clip.removeMovieClip();
_local1.xmov = 0;
_local1.ymov = 0;
_local1 = {};
}
function removeKnife(knife_obj) {
var _local1 = knife_obj;
_local1.available = false;
_local1.x = -200;
_local1.y = -200;
_local1.clip.removeMovieClip();
_local1.xmov = 0;
_local1.ymov = 0;
_local1 = {};
}
function updateKnife() {
var _local2 = this;
var _local1 = 0;
while (_local1 < knife.current_id) {
knife_obj = _local2["knife" + _local1];
if (knife_obj.available) {
knife_obj.x = knife_obj.x + knife_obj.xmov;
if (((knife_obj.xmov < 0) && (knife_obj.x < knife.min_x)) || ((knife_obj.xmov > 0) && (knife_obj.x > knife.max_x))) {
removeKnife(knife_obj);
}
knife_obj.clip._x = knife_obj.x;
}
_local1++;
}
}
function checkHandEnemiesCollision() {
if ((player.action == "punch") && (((player.clip._currentframe == 12) || (player.clip._currentframe == 59)) || (player.clip._currentframe == 98))) {
checkHandEnemy1Collision();
checkHandEnemy2Collision();
checkHandEnemy3Collision();
checkHandEnemy4Collision();
checkHandEnemy5Collision();
}
}
function checkKickEnemiesCollision() {
if ((player.action == "kick") && (((player.clip._currentframe == 18) || (player.clip._currentframe == 65)) || (player.clip._currentframe == 103))) {
checkFeetEnemy1Collision();
checkFeetEnemy2Collision();
checkFeetEnemy3Collision();
checkFeetEnemy4Collision();
checkFeetEnemy5Collision();
}
}
function checkBodyEnemiesCollision() {
if (!player.dead) {
checkBodyEnemy1Collision();
checkBodyEnemy2Collision();
checkBodyEnemy3Collision();
}
}
function checkBodyKnifeCollision() {
var _local3 = _root;
if (!player.dead) {
var _local1 = 0;
while (_local1 <= knife.current_id) {
knife_obj = this["knife" + _local1];
if (knife_obj.available) {
var _local2 = Math.abs(player.x - knife_obj.x);
if (_local2 < 10) {
if ((knife_obj.position == "high") && ((player.position == "stand") || (player.position == "jump"))) {
_local3.knifeHit_snd.start();
reduceLife(player.life_knife_decrease);
removeKnife(knife_obj);
} else if (knife_obj.position == "low") {
if (player.clip.hitTest(knife_obj.clip)) {
_local3.knifeHit_snd.start();
reduceLife(player.life_knife_decrease);
removeKnife(knife_obj);
}
}
}
}
_local1++;
}
}
}
function checkBodyBatCollision() {
var _local3 = _root;
if (!player.dead) {
var collision = false;
var _local2 = 0;
while (_local2 <= enemy5.current_id) {
var _local1 = this["enemy5_" + _local2];
if (_local1.available) {
if (_local1.status == "hit top") {
if (_local1.face == "left") {
var xdist = (player.x - _local1.x);
if ((xdist < 0) && (Math.abs(xdist) < 150)) {
if ((player.position != "crouch") && (_local1.clip._currentframe == 25)) {
reduceLife(player.life_bat_decrease);
_local3.batHit_snd.start();
trace("hit");
}
}
} else if (_local1.face == "right") {
var xdist = (player.x - _local1.x);
if ((xdist > 0) && (Math.abs(xdist) < 150)) {
if ((player.position != "crouch") && (_local1.clip._currentframe == 25)) {
reduceLife(player.life_bat_decrease);
_local3.batHit_snd.start();
trace("hit");
}
}
}
} else if (_local1.status == "hit bottom") {
if (_local1.face == "left") {
var xdist = (player.x - _local1.x);
if ((xdist < 0) && (Math.abs(xdist) < 120)) {
if ((player.position != "jump") && (_local1.clip._currentframe == 59)) {
reduceLife(player.life_bat_decrease);
_local3.batHit_snd.start();
trace("hit");
}
}
} else if (_local1.face == "right") {
var xdist = (player.x - _local1.x);
if ((xdist > 0) && (Math.abs(xdist) < 120)) {
if ((player.position != "jump") && (_local1.clip._currentframe == 59)) {
reduceLife(player.life_bat_decrease);
_local3.batHit_snd.start();
trace("hit");
}
}
}
}
}
_local2++;
}
}
}
function checkBodyEnemy1Collision() {
var _local3 = this;
var _local2 = 0;
while (_local2 <= enemy1.current_id) {
var _local1 = _local3["enemy1_" + _local2];
if (_local1.available && (isCloseToPlayer(_local1))) {
if (_local1.xmov > 0) {
if ((_local1.x > (player.x - 30)) && (_local1.x < player.x)) {
frozenPlayer(_local1);
}
} else if (_local1.xmov < 0) {
if ((_local1.x < (player.x + 30)) && (_local1.x > player.x)) {
frozenPlayer(_local1);
}
}
}
_local2++;
}
}
function checkBodyEnemy2Collision() {
var _local3 = this;
var _local2 = 0;
while (_local2 <= enemy2.current_id) {
var _local1 = _local3["enemy2_" + _local2];
if (_local1.available && (isCloseToPlayer(_local1))) {
if (_local1.xmov > 0) {
if ((_local1.x > (player.x - 30)) && (_local1.x < player.x)) {
frozenPlayer(_local1);
}
} else if (_local1.xmov < 0) {
if ((_local1.x < (player.x + 30)) && (_local1.x > player.x)) {
frozenPlayer(_local1);
}
}
}
_local2++;
}
}
function checkBodyEnemy3Collision() {
var _local3 = this;
var _local2 = 0;
while (_local2 <= enemy3.current_id) {
var _local1 = _local3["enemy3_" + _local2];
if (_local1.available && (isCloseToPlayer(_local1))) {
if (_local1.xmov > 0) {
if ((_local1.x > (player.x - 30)) && (_local1.x < player.x)) {
_local1.x = player.x - 10;
_local1.y = player.y - 30;
frozenPlayer(_local1);
}
} else if (_local1.xmov < 0) {
if ((_local1.x < (player.x + 30)) && (_local1.x > player.x)) {
_local1.x = player.x + 10;
_local1.y = player.y - 30;
frozenPlayer(_local1);
}
}
}
_local2++;
}
}
function frozenPlayer(enemy_obj) {
if (player.status != "frozen") {
player.shakes = 0;
}
enemy_obj.status = "catch";
player.status = "frozen";
player.clip.gotoAndStop("stand");
}
function checkHandEnemy1Collision() {
var i = 0;
while (i <= enemy1.current_id) {
var _local1 = this["enemy1_" + i];
if ((_local1.available && (_local1.status != "dead")) && (isCloseToPlayer(_local1))) {
var hand_pos = {};
hand_pos.x = player.hand_clip._x;
hand_pos.y = player.hand_clip._y;
var hand_radius = (player.hand_clip._width / 2);
player.clip.localToGlobal(hand_pos);
var collision = false;
var _local3 = 1;
while (_local3 <= 3) {
if (!collision) {
var _local2 = {};
_local2.x = _local1[("iv" + _local3) + "_clip"]._x;
_local2.y = _local1[("iv" + _local3) + "_clip"]._y;
_local1.clip.localToGlobal(_local2);
var iv_radius = (_local1[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(hand_pos.x, hand_pos.y, hand_radius, _local2.x, _local2.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
if (collision) {
_root.punchHit_snd.start();
if (player.position == "jump") {
_local1.life = _local1.life - player.jump_punch_power;
} else {
_local1.life = _local1.life - player.punch_power;
}
if (_local1.life <= 0) {
addScore(score.enemy1 * game.level);
killEnemy(_local1);
}
}
}
i++;
}
}
function checkHandEnemy2Collision() {
var i = 0;
while (i <= enemy2.current_id) {
var _local1 = this["enemy2_" + i];
if ((_local1.available && (_local1.status != "dead")) && (isCloseToPlayer(_local1))) {
var hand_pos = {};
hand_pos.x = player.hand_clip._x;
hand_pos.y = player.hand_clip._y;
var hand_radius = (player.hand_clip._width / 2);
player.clip.localToGlobal(hand_pos);
var collision = false;
var _local3 = 1;
while (_local3 <= 2) {
if (!collision) {
var _local2 = {};
_local2.x = _local1[("iv" + _local3) + "_clip"]._x;
_local2.y = _local1[("iv" + _local3) + "_clip"]._y;
_local1.clip.localToGlobal(_local2);
var iv_radius = (_local1[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(hand_pos.x, hand_pos.y, hand_radius, _local2.x, _local2.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
if (collision) {
_root.punchHit_snd.start();
if (player.position == "jump") {
_local1.life = _local1.life - player.jump_punch_power;
} else {
_local1.life = _local1.life - player.punch_power;
}
if (_local1.life <= 0) {
addScore(score.enemy2 * game.level);
killEnemy(_local1);
}
}
}
i++;
}
}
function checkHandEnemy3Collision() {
var i = 0;
while (i <= enemy3.current_id) {
var _local1 = this["enemy3_" + i];
if ((_local1.available && (_local1.status != "dead")) && (isCloseToPlayer(_local1))) {
var hand_pos = {};
hand_pos.x = player.hand_clip._x;
hand_pos.y = player.hand_clip._y;
var hand_radius = (player.hand_clip._width / 2);
player.clip.localToGlobal(hand_pos);
var collision = false;
var _local3 = 1;
while (_local3 <= 1) {
if (!collision) {
var _local2 = {};
_local2.x = _local1[("iv" + _local3) + "_clip"]._x;
_local2.y = _local1[("iv" + _local3) + "_clip"]._y;
_local1.clip.localToGlobal(_local2);
var iv_radius = (_local1[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(hand_pos.x, hand_pos.y, hand_radius, _local2.x, _local2.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
if (collision) {
_root.punchHit_snd.start();
if (player.position == "jump") {
_local1.life = _local1.life - player.jump_punch_power;
} else {
_local1.life = _local1.life - player.punch_power;
}
if (_local1.life <= 0) {
addScore(score.enemy3 * game.level);
killEnemy(_local1);
}
}
}
i++;
}
}
function checkHandEnemy4Collision() {
var i = 0;
while (i <= enemy4.current_id) {
var _local1 = this["enemy4_" + i];
if ((_local1.available && (_local1.status != "dead")) && (isCloseToPlayer(_local1))) {
var hand_pos = {};
hand_pos.x = player.hand_clip._x;
hand_pos.y = player.hand_clip._y;
var hand_radius = (player.hand_clip._width / 2);
player.clip.localToGlobal(hand_pos);
var collision = false;
var _local3 = 1;
while (_local3 <= 3) {
if (!collision) {
var _local2 = {};
_local2.x = _local1[("iv" + _local3) + "_clip"]._x;
_local2.y = _local1[("iv" + _local3) + "_clip"]._y;
_local1.clip.localToGlobal(_local2);
var iv_radius = (_local1[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(hand_pos.x, hand_pos.y, hand_radius, _local2.x, _local2.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
if (collision) {
_root.punchHit_snd.start();
if (player.position == "jump") {
_local1.life = _local1.life - player.jump_punch_power;
} else {
_local1.life = _local1.life - player.punch_power;
}
if (_local1.life <= 0) {
if (_local1.face == "left") {
enemy4.right_side = false;
} else {
enemy4.left_side = false;
}
addScore(score.enemy4 * game.level);
killEnemy(_local1);
}
}
}
i++;
}
}
function checkHandEnemy5Collision() {
var i = 0;
while (i <= enemy5.current_id) {
var _local1 = this["enemy5_" + i];
if ((_local1.available && (_local1.status != "dead")) && (isCloseToPlayer(_local1))) {
var hand_pos = {};
hand_pos.x = player.hand_clip._x;
hand_pos.y = player.hand_clip._y;
var hand_radius = (player.hand_clip._width / 2);
player.clip.localToGlobal(hand_pos);
var collision = false;
var _local3 = 1;
while (_local3 <= 3) {
if (!collision) {
var _local2 = {};
_local2.x = _local1[("iv" + _local3) + "_clip"]._x;
_local2.y = _local1[("iv" + _local3) + "_clip"]._y;
_local1.clip.localToGlobal(_local2);
var iv_radius = (_local1[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(hand_pos.x, hand_pos.y, hand_radius, _local2.x, _local2.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
if (collision) {
_root.punchHit_snd.start();
if (player.position == "jump") {
_local1.life = _local1.life - player.jump_punch_power;
} else {
_local1.life = _local1.life - player.punch_power;
}
if (_local1.life <= 0) {
addScore(score.enemy5 * game.level);
killEnemy(_local1);
}
}
}
i++;
}
}
function checkFeetEnemy1Collision() {
var i = 0;
while (i <= enemy1.current_id) {
var _local2 = this["enemy1_" + i];
if ((_local2.available && (_local2.status != "dead")) && (isCloseToPlayer(_local2))) {
var collision = false;
var feet_pos = {};
var k = 1;
while (k <= 2) {
feet_pos.x = player[("feet" + k) + "_clip"]._x;
feet_pos.y = player[("feet" + k) + "_clip"]._y;
var feet_radius = (player[("feet" + k) + "_clip"]._width / 2);
player.clip.localToGlobal(feet_pos);
var _local3 = 1;
while (_local3 <= 3) {
if (!collision) {
var _local1 = {};
_local1.x = _local2[("iv" + _local3) + "_clip"]._x;
_local1.y = _local2[("iv" + _local3) + "_clip"]._y;
_local2.clip.localToGlobal(_local1);
var iv_radius = (_local2[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(feet_pos.x, feet_pos.y, feet_radius, _local1.x, _local1.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
k++;
}
if (collision) {
_root.kickHit_snd.start();
if (player.position == "jump") {
_local2.life = _local2.life - player.jump_kick_power;
} else {
_local2.life = _local2.life - player.kick_power;
}
if (_local2.life <= 0) {
addScore(score.enemy1 * game.level);
killEnemy(_local2);
}
}
}
i++;
}
}
function checkFeetEnemy2Collision() {
var i = 0;
while (i <= enemy2.current_id) {
var _local2 = this["enemy2_" + i];
if ((_local2.available && (_local2.status != "dead")) && (isCloseToPlayer(_local2))) {
var collision = false;
var feet_pos = {};
var k = 1;
while (k <= 2) {
feet_pos.x = player[("feet" + k) + "_clip"]._x;
feet_pos.y = player[("feet" + k) + "_clip"]._y;
var feet_radius = (player[("feet" + k) + "_clip"]._width / 2);
player.clip.localToGlobal(feet_pos);
var _local3 = 1;
while (_local3 <= 2) {
if (!collision) {
var _local1 = {};
_local1.x = _local2[("iv" + _local3) + "_clip"]._x;
_local1.y = _local2[("iv" + _local3) + "_clip"]._y;
_local2.clip.localToGlobal(_local1);
var iv_radius = (_local2[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(feet_pos.x, feet_pos.y, feet_radius, _local1.x, _local1.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
k++;
}
if (collision) {
_root.kickHit_snd.start();
if (player.position == "jump") {
_local2.life = _local2.life - player.jump_kick_power;
} else {
_local2.life = _local2.life - player.kick_power;
}
if (_local2.life <= 0) {
addScore(score.enemy2 * game.level);
killEnemy(_local2);
}
}
}
i++;
}
}
function checkFeetEnemy3Collision() {
var i = 0;
while (i <= enemy3.current_id) {
var _local2 = this["enemy3_" + i];
if ((_local2.available && (_local2.status != "dead")) && (isCloseToPlayer(_local2))) {
var collision = false;
var feet_pos = {};
var k = 1;
while (k <= 2) {
feet_pos.x = player[("feet" + k) + "_clip"]._x;
feet_pos.y = player[("feet" + k) + "_clip"]._y;
var feet_radius = (player[("feet" + k) + "_clip"]._width / 2);
player.clip.localToGlobal(feet_pos);
var _local3 = 1;
while (_local3 <= 1) {
if (!collision) {
var _local1 = {};
_local1.x = _local2[("iv" + _local3) + "_clip"]._x;
_local1.y = _local2[("iv" + _local3) + "_clip"]._y;
_local2.clip.localToGlobal(_local1);
var iv_radius = (_local2[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(feet_pos.x, feet_pos.y, feet_radius, _local1.x, _local1.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
k++;
}
if (collision) {
_root.kickHit_snd.start();
if (player.position == "jump") {
_local2.life = _local2.life - player.jump_kick_power;
} else {
_local2.life = _local2.life - player.kick_power;
}
if (_local2.life <= 0) {
addScore(score.enemy3 * game.level);
killEnemy(_local2);
}
}
}
i++;
}
}
function checkFeetEnemy4Collision() {
var i = 0;
while (i <= enemy4.current_id) {
var _local1 = this["enemy4_" + i];
if ((_local1.available && (_local1.status != "dead")) && (isCloseToPlayer(_local1))) {
var collision = false;
var feet_pos = {};
var k = 1;
while (k <= 2) {
feet_pos.x = player[("feet" + k) + "_clip"]._x;
feet_pos.y = player[("feet" + k) + "_clip"]._y;
var feet_radius = (player[("feet" + k) + "_clip"]._width / 2);
player.clip.localToGlobal(feet_pos);
var _local3 = 1;
while (_local3 <= 3) {
if (!collision) {
var _local2 = {};
_local2.x = _local1[("iv" + _local3) + "_clip"]._x;
_local2.y = _local1[("iv" + _local3) + "_clip"]._y;
_local1.clip.localToGlobal(_local2);
var iv_radius = (_local1[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(feet_pos.x, feet_pos.y, feet_radius, _local2.x, _local2.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
k++;
}
if (collision) {
_root.kickHit_snd.start();
if (player.position == "jump") {
_local1.life = _local1.life - player.jump_kick_power;
} else {
_local1.life = _local1.life - player.kick_power;
}
if (_local1.life <= 0) {
if (_local1.face == "left") {
enemy4.right_side = false;
} else {
enemy4.left_side = false;
}
addScore(score.enemy4 * game.level);
killEnemy(_local1);
}
}
}
i++;
}
}
function checkFeetEnemy5Collision() {
var i = 0;
while (i <= enemy5.current_id) {
var _local2 = this["enemy5_" + i];
if ((_local2.available && (_local2.status != "dead")) && (isCloseToPlayer(_local2))) {
var collision = false;
var feet_pos = {};
var k = 1;
while (k <= 2) {
feet_pos.x = player[("feet" + k) + "_clip"]._x;
feet_pos.y = player[("feet" + k) + "_clip"]._y;
var feet_radius = (player[("feet" + k) + "_clip"]._width / 2);
player.clip.localToGlobal(feet_pos);
var _local3 = 1;
while (_local3 <= 3) {
if (!collision) {
var _local1 = {};
_local1.x = _local2[("iv" + _local3) + "_clip"]._x;
_local1.y = _local2[("iv" + _local3) + "_clip"]._y;
_local2.clip.localToGlobal(_local1);
var iv_radius = (_local2[("iv" + _local3) + "_clip"]._width / 2);
var hit = check2CirclesCollision(feet_pos.x, feet_pos.y, feet_radius, _local1.x, _local1.y, iv_radius);
if (hit) {
collision = true;
}
}
_local3++;
}
k++;
}
if (collision) {
_root.kickHit_snd.start();
if (player.position == "jump") {
_local2.life = _local2.life - player.jump_kick_power;
} else {
_local2.life = _local2.life - player.kick_power;
}
if (_local2.life <= 0) {
addScore(score.enemy5 * game.level);
killEnemy(_local2);
}
}
}
i++;
}
}
function check2CirclesCollision(c1_x, c1_y, c1_radius, c2_x, c2_y, c2_radius) {
var _local2 = c1_x - c2_x;
var _local1 = c1_y - c2_y;
var dist = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local3 = c1_radius + c2_radius;
if (dist < _local3) {
return(true);
}
return(false);
}
function isCloseToPlayer(enemy_obj) {
var _local1 = Math.abs(player.x - enemy_obj.x);
return(_local1 < 100);
}
function initialVariables() {
depth = {};
depth.action = 0;
depth.meter = 500;
depth.player = 1001;
depth.enemy1 = 3000;
depth.enemy2 = 5000;
depth.enemy3 = 7000;
depth.enemy4 = 9000;
depth.enemy5 = 11000;
depth.knife = 15000;
game = {};
game.level = 0;
game.area = 1;
game.score = 0;
game.area1_end = -1000;
game.area2_end = -2000;
game.area3_end = -2800;
game.area_frames = 1800;
game.frames_allowed = 0;
game.level_start_frame = 0;
game.level_end_frame = 0;
game.area_frame = 0;
game.time_left = 100;
game.lives = 3;
game.frames = 0;
game.over = false;
game.pause = false;
game.enemy_arr = new Array();
power = {};
power.punch = 20;
power.kick = 20;
power.crouch_punch = 20;
power.crouch_kick = 20;
power.jump_punch = 50;
power.jump_kick = 50;
player = {};
player.clip = attachMovie("player", "player_mc", depth.player);
player.arm_clip = player.clip.arm_mc;
player.hand_clip = player.clip.iv_hand_mc;
player.leg_clip = player.clip.leg_mc;
player.feet1_clip = player.clip.iv_feet1_mc;
player.feet2_clip = player.clip.iv_feet2_mc;
player.hand_radius = player.hand_clip._width / 2;
player.feet1_radius = player.feet1_clip._width / 2;
player.feet2_radius = player.feet2_clip._width / 2;
player.clip.gotoAndStop("stand");
player.action = "rest";
player.position = "stand";
player.status = "normal";
player.item = "none";
player.speed = 3;
player.max_y = 310;
player.x = 200;
player.y = player.max_y;
player.real_x = player.x;
player.min_x = 100;
player.max_x = 320;
player.xmov = 0;
player.ymov = 0;
player.yacc = 1;
player.life = 100;
player.life_catch_decrease = 0.4;
player.life_knife_decrease = 30;
player.life_bat_decrease = 35;
player.punch_power = 30;
player.kick_power = 30;
player.jump_kick_power = 60;
player.jump_punch_power = 60;
player.stand_frames = 0;
player.shakes = 0;
player.shakes_to_escape = 5;
player.dead = false;
player.clip._x = player.x;
player.clip._y = player.y;
score = {};
score.enemy1 = 10;
score.enemy2 = 15;
score.enemy3 = 40;
score.enemy4 = 50;
score.enemy5 = 30;
score.level1 = 1000;
score.level2 = 2000;
score.level3 = 4000;
score.level4 = 8000;
score.meter_base = 100;
score.time_base = 10;
meter = {};
meter.current_id = 0;
meter.y = 200;
enemy1 = {};
enemy1.init_left_x = -50;
enemy1.init_right_x = 500;
enemy1.life = 25;
enemy1.y = 310;
enemy1.speed = 2;
enemy1.enemies = 0;
enemy1.current_id = 0;
enemy2 = {};
enemy2.init_left_x = -50;
enemy2.init_right_x = 500;
enemy2.life = 25;
enemy2.y = 310;
enemy2.speed = 1.4;
enemy2.enemies = 0;
enemy2.current_id = 0;
enemy3 = {};
enemy3.init_left_x = -50;
enemy3.init_right_x = 500;
enemy3.life = 25;
enemy3.init_y = 310;
enemy3.y = enemy3.init_y;
enemy3.speed = 1.7;
enemy3.jump_speed = 6;
enemy3.yacc = 0.2;
enemy3.enemies = 0;
enemy3.current_id = 0;
enemy4 = {};
enemy4.init_left_x = -50;
enemy4.init_right_x = 500;
enemy4.life = 40;
enemy4.left_x_max = 60;
enemy4.right_x_min = 370;
enemy4.y = 310;
enemy4.speed = 2.5;
enemy4.frames_per_throw = 120;
enemy4.enemies = 0;
enemy4.current_id = 0;
enemy4.right_enemy_x = 600;
enemy4.left_enemy_x = -100;
enemy4.right_side = false;
enemy4.left_side = false;
enemy5 = {};
enemy5.frames_per_swing = 120;
enemy5.init_left_x = -50;
enemy5.init_right_x = 500;
enemy5.life = 40;
enemy5.y = 310;
enemy5.speed = 1.8;
enemy5.enemies = 0;
enemy5.current_id = 0;
knife = {};
knife.current_id = 0;
knife.high_y = 222;
knife.low_y = 285;
knife.speed = 6;
knife.min_x = -50;
knife.max_x = 500;
key_control = {};
key_control.last_right = false;
key_control.last_left = false;
key_control.last_up = false;
key_control.last_down = false;
key_control.last_a = false;
key_control.last_s = false;
key_control.right = false;
key_control.left = false;
key_control.up = false;
key_control.down = false;
key_control.a = false;
key_control.s = false;
key_control.this_right = false;
key_control.this_left = false;
key_control.this_up = false;
key_control.this_down = false;
key_control.this_a = false;
key_control.this_s = false;
bg = {};
bg.clip1 = bg1_mc;
bg.clip2 = bg2_mc;
bg.clip3 = bg3_mc;
bg.clip4 = bg4_mc;
bg.x = -1;
bg.y = 87;
bg.clip._x = bg.x;
bg.clip._y = bg.y;
bg.xmov = 0;
stats = {};
stats.life_clip = _root.life_bar_mc;
back_arrow_mc._visible = false;
}
function startGame() {
game.area = 0;
game.area_frame = 0;
endLevel();
}
function restartCurrentLevel() {
player.dead = false;
player.status = "normal";
player.action = "rest";
player.position = "stand";
removeAllEnemies();
removeAllMeters();
removeAllKnives();
symbol_meter0_mc.gotoAndStop(1);
symbol_meter1_mc.gotoAndStop(1);
symbol_meter2_mc.gotoAndStop(1);
symbol_meter3_mc.gotoAndStop(1);
symbol_meter4_mc.gotoAndStop(1);
symbol_meter5_mc.gotoAndStop(1);
doneFlag_mc.gotoAndStop(1);
if (game.level == 1) {
startLevel1();
} else if (game.level == 2) {
startLevel2();
} else if (game.level == 3) {
startLevel3();
} else if (game.level == 4) {
startLevel4();
}
}
function endLevel() {
_root.street1_snd.stop();
removeAllEnemies();
removeAllMeters();
removeAllKnives();
game.level++;
if (game.level == 5) {
startNewLevel();
} else {
doRoundpop(true);
}
}
function startNewLevel() {
_root.street1_snd.start(0, 99);
symbol_meter0_mc.gotoAndStop(1);
symbol_meter1_mc.gotoAndStop(1);
symbol_meter2_mc.gotoAndStop(1);
symbol_meter3_mc.gotoAndStop(1);
symbol_meter4_mc.gotoAndStop(1);
symbol_meter5_mc.gotoAndStop(1);
doneFlag_mc.gotoAndStop(1);
game.area = 0;
game.level_start_frame = game.frames;
if (game.level == 1) {
startLevel1();
} else if (game.level == 2) {
var _local1 = Math.floor((game.level_end_frame - game.frames) / 30);
addScore((_local1 * score.time_base) * 1);
startLevel2();
} else if (game.level == 3) {
var _local1 = Math.floor((game.level_end_frame - game.frames) / 30);
addScore((_local1 * score.time_base) * 2);
addScore(score.level2);
startLevel3();
} else if (game.level == 4) {
var _local1 = Math.floor((game.level_end_frame - game.frames) / 30);
addScore((_local1 * score.time_base) * 3);
addScore(score.level3);
startLevel4();
} else {
var _local1 = Math.floor((game.level_end_frame - game.frames) / 30);
addScore((_local1 * score.time_base) * 4);
addScore(score.level4);
gameWin();
}
_root.bg1_mc.gotoAndStop(game.level);
}
function updateFrame() {
game.area_frame++;
if (game.area_frame > game.area_frames) {
game.area_frame = game.area_frame - game.area_frames;
}
game.frames++;
}
function updateStats() {
var _local1 = Math.ceil(player.life);
if (_local1 <= 0) {
_local1 = 1;
}
stats.life_clip.gotoAndStop(_local1);
if (player.life < 20) {
lowHealth_snd.start();
}
level_txt.text = game.level;
lives_txt.text = game.lives;
score_txt.text = game.score;
}
function updateBG() {
bg.x = bg.x + bg.xmov;
bg.clip._x = bg.x;
bg.clip._y = bg.y;
if (bg.x < game.area2_end) {
game.area = 3;
setEnemyArray(this["level" + game.level].enemy_area3_arr);
} else if (bg.x < game.area1_end) {
game.area = 2;
setEnemyArray(this["level" + game.level].enemy_area2_arr);
}
}
function checkAllMetersCompleted() {
var _local3 = this;
var _local1 = 0;
while (_local1 <= meter.current_id) {
var _local2 = _local3["meter" + _local1];
if (!_local2.done) {
return(false);
}
_local1++;
}
return(true);
}
function gameOver() {
_root.SendScore();
removeAllEnemies();
removeAllMeters();
removeAllKnives();
player.clip.removeMovieClip();
game.over = true;
trace("game over");
_root.gotoAndStop("defeat_fr");
}
function gameWin() {
_root.SendScore();
removeAllEnemies();
removeAllMeters();
removeAllKnives();
player.clip.removeMovieClip();
game.over = true;
trace("game over");
_root.gotoAndStop("victory_fr");
}
function createControlClip() {
createEmptyMovieClip("action_mc", depth.action);
action_mc.onEnterFrame = function () {
if ((!game.over) && (!game.pause)) {
updateKeys();
checkHandEnemiesCollision();
checkKickEnemiesCollision();
checkBodyEnemiesCollision();
checkBodyKnifeCollision();
checkBodyBatCollision();
checkCreateEnemy();
updatePlayerAction();
updatePlayerPosition();
updateEnemiesPosition();
updateKnife();
updateAllItemsPosition();
checkPlayerEscape();
checkPlayerDead();
updateStats();
updateBG();
updateMeters();
updateTime();
updateFrame();
traceTest();
}
};
}
function updateTime() {
var _local1 = (game.level_end_frame - game.frames) / 30;
if (_local1 <= 0) {
player.life = 0;
_local1 = 0;
}
time_left_txt.text = Math.floor(_local1);
}
function addScore(score) {
game.score = game.score + score;
}
function traceTest() {
trace((((((("status: " + player.status) + " position: ") + player.position) + " action: ") + player.action) + " dead: ") + player.dead);
}
initialVariables();
initialLevel();
startGame();
createControlClip();
stop();
Frame 5
stop();
_root.victoryMusic_snd.start(0, 999);
score_txt.text = game.score;
Frame 6
stop();
_root.defeatMusic_snd.start(0, 999);
score_txt.text = game.score;
Symbol 36 MovieClip [player] Frame 1
_parent.player.action = "rest";
Symbol 36 MovieClip [player] Frame 4
play();
Symbol 36 MovieClip [player] Frame 10
gotoAndPlay ("walk");
Symbol 36 MovieClip [player] Frame 15
gotoAndStop ("stand");
Symbol 36 MovieClip [player] Frame 27
_parent.player.action = "rest";
gotoAndStop ("stand");
Symbol 36 MovieClip [player] Frame 28
play();
Symbol 36 MovieClip [player] Frame 35
gotoAndPlay ("write");
Symbol 36 MovieClip [player] Frame 45
gotoAndStop ("stand");
Symbol 36 MovieClip [player] Frame 46
_parent.player.action = "rest";
Symbol 36 MovieClip [player] Frame 62
gotoAndStop ("crouch");
Symbol 36 MovieClip [player] Frame 74
_parent.player.action = "rest";
gotoAndStop ("crouch");
Symbol 36 MovieClip [player] Frame 82
gotoAndStop ("crouch");
Symbol 36 MovieClip [player] Frame 96
stop();
gotoAndStop ("stand");
Symbol 36 MovieClip [player] Frame 101
gotoAndStop ("stand");
Symbol 36 MovieClip [player] Frame 113
_parent.player.action = "rest";
gotoAndStop ("stand");
Symbol 36 MovieClip [player] Frame 121
_parent.player.action = "rest";
gotoAndStop ("stand");
Symbol 36 MovieClip [player] Frame 145
stop();
Symbol 60 MovieClip [enemy5] Frame 18
gotoAndPlay ("normal");
Symbol 60 MovieClip [enemy5] Frame 52
gotoAndStop (1);
Symbol 60 MovieClip [enemy5] Frame 86
gotoAndStop (1);
Symbol 81 MovieClip [enemy4] Frame 30
gotoAndPlay ("normal");
Symbol 81 MovieClip [enemy4] Frame 50
gotoAndStop ("normal");
Symbol 81 MovieClip [enemy4] Frame 70
gotoAndStop ("normal");
Symbol 81 MovieClip [enemy4] Frame 71
stop();
Symbol 96 MovieClip [enemy2] Frame 40
gotoAndPlay ("move");
Symbol 96 MovieClip [enemy2] Frame 60
gotoAndPlay ("bite");
Symbol 96 MovieClip [enemy2] Frame 61
stop();
Symbol 119 MovieClip [enemy1] Frame 20
gotoAndPlay ("move");
Symbol 119 MovieClip [enemy1] Frame 40
gotoAndPlay ("move close");
Symbol 119 MovieClip [enemy1] Frame 41
stop();
Symbol 131 MovieClip Frame 1
stop();
gotoAndStop(_root.game.level);
Symbol 132 MovieClip [roundpop] Frame 1
_root.startNewLevel();
game.pause = true;
Symbol 132 MovieClip [roundpop] Frame 11
_root.roundMusic_snd.start();
Symbol 132 MovieClip [roundpop] Frame 37
game.pause = false;
Symbol 132 MovieClip [roundpop] Frame 41
_root.doRoundpop(false);
Symbol 142 MovieClip [meter] Frame 2
stop();
Symbol 142 MovieClip [meter] Frame 19
stop();
Symbol 142 MovieClip [meter] Frame 128
stop();
Symbol 256 Button
on (release) {
_root.doHelp("help");
}
Symbol 262 MovieClip [transition] Frame 4
_root.transitionTriggerOne();
Symbol 262 MovieClip [transition] Frame 13
_root.transitionTriggerTwo();
this.removeMovieClip();
Symbol 336 MovieClip [loaderBar] Frame 1
stop();
Symbol 600 MovieClip [__Packages.SoundDeluxe] Frame 0
class SoundDeluxe extends Sound
{
static var soundClipHolder, groupHolder, registry;
var uniqueName, co_int;
function SoundDeluxe (uniqueName, target, linkName, groupName, interrupt, vol) {
var _local1 = this;
var _local2 = groupName;
var _local3 = vol;
super(target);
_local1.uniqueName = uniqueName;
_local1.lag_int = null;
if ((interrupt == undefined) || (interrupt == null)) {
interrupt = false;
}
_local1.canInterrupt = interrupt;
if ((_local3 == null) || (_local3 == undefined)) {
_local3 = 100;
}
_local1.vol = _local3;
if ((_local2 == null) || (_local2 == undefined)) {
_local2 = uniqueName;
}
_local1.groupName = _local2;
_local1.isPlaying = false;
}
static function doCount() {
return(String(c++));
}
static function reset() {
firstRun = true;
}
static function create(linkName, groupName, interrupt, vol) {
if (firstRun) {
trace("firstRun");
var _local2 = DepthManager.newDepth();
trace("soundClipHolder level: " + _local2);
_root.createEmptyMovieClip("soundClipHolder", _local2);
soundClipHolder = _root.soundClipHolder;
groupHolder = new Object();
registry = new Array();
firstRun = false;
}
var _local3 = linkName + doCount();
var target = soundClipHolder.createEmptyMovieClip(_local3, DepthManager.newDepth());
var _local1 = new SoundDeluxe(_local3, target, linkName, groupName, interrupt, vol);
_local1.attachSound(linkName);
_local1.setVolume(_local1.vol);
_local1.onSoundComplete = function () {
trace("onSoundComplete");
this.doOnComplete();
this.isPlaying = false;
};
if (groupHolder[_local1.groupName] == undefined) {
groupHolder[_local1.groupName] = new Array();
}
groupHolder[_local1.groupName].push(_local1);
registry.push(_local1);
return(_local1);
}
static function stopAll() {
trace("stopAllSoundDeluxe");
var _local1 = 0;
while (_local1 < registry.length) {
registry[_local1].stop();
_local1++;
}
}
function stop() {
var _local1 = this;
super.stop();
_local1.isPlaying = false;
clearInterval(_local1.lag_int);
clearInterval(_local1.fade_int);
clearInterval(_local1.co_int);
_local1.lag_int = null;
_local1.doOnComplete();
}
function start(secondsOffset, loops, lag, forceInterrupt) {
var _local1 = this;
trace("SoundDeluxe.start()");
var _local2 = true;
clearInterval(_local1.lag_int);
if (((lag != null) && (lag != undefined)) && (lag > 0)) {
if (_local1.lag_int == null) {
trace("setting interval for new start");
_local1.lag_int = setInterval(_local1, "start", lag, secondsOffset, loops, null, forceInterrupt);
}
return(null);
}
if (_local1.canInterrupt || (forceInterrupt)) {
for (var _local3 in groupHolder[_local1.groupName]) {
groupHolder[_local1.groupName][_local3].stop();
}
} else {
for (var _local3 in groupHolder[_local1.groupName]) {
if (groupHolder[_local1.groupName][_local3].isPlaying) {
trace(_local3 + " isPlaying");
_local2 = false;
break;
}
}
}
if (_local2) {
_local1.isPlaying = true;
super.start(secondsOffset, loops);
} else {
trace("Can't play that sound right now");
}
return(_local2);
}
function fadeIn(t) {
var _local1 = this;
var _local2 = t;
clearInterval(_local1.fade_int);
if ((_local2 == null) || (_local2 == undefined)) {
_local2 = 3000;
}
_local1.fadeAmount = _local1.vol / (_local2 / _local1.span);
if (_local1.fadeAmount < 1) {
_local1.fadeAmount = 1;
}
_local1.fade_int = setInterval(_local1, "doFade", _local1.span, true);
if (_local1.getVolume() == _local1.vol) {
_local1.setVolume(0);
}
}
function fadeOut(t) {
var _local1 = this;
var _local2 = t;
clearInterval(_local1.fade_int);
clearInterval(_local1.co_int);
if ((_local2 == null) || (_local2 == undefined)) {
_local2 = 3000;
}
_local1.fadeAmount = _local1.vol / (_local2 / _local1.span);
if (_local1.fadeAmount < 1) {
_local1.fadeAmount = 1;
}
_local1.fade_int = setInterval(_local1, "doFade", _local1.span, false);
}
function doFade(up) {
var _local2 = this;
var _local1 = _local2.getVolume();
if (up) {
_local1 = _local1 + _local2.fadeAmount;
if (_local1 >= _local2.vol) {
_local1 = _local2.vol;
clearInterval(_local2.fade_int);
}
trace("fading up to: " + _local1);
} else {
_local1 = _local1 - _local2.fadeAmount;
if (_local1 <= 0) {
_local1 = 0;
_local2.stop();
clearInterval(_local2.fade_int);
}
trace("fading down to: " + _local1);
}
_local2.setVolume(_local1);
}
function setOnComplete(f) {
doOnComplete = f;
}
function doOnComplete() {
trace(uniqueName + " -SoundDeluxe.doOnComplete");
}
function cutOff(coPosition, foLenth) {
co_int = setInterval(this, "fadeOut", coPosition, foLenth);
}
static var c = 0;
static var firstRun = true;
var span = 100;
}
Symbol 601 MovieClip [__Packages.DepthManager] Frame 0
class DepthManager
{
function DepthManager () {
}
static function newDepth(p) {
var _local1 = p;
if ((_local1 == null) || (_local1 == undefined)) {
_local1 = false;
}
var _local2;
if (typeof(_local1) == "number") {
_local2 = Number(_local1);
specialList.push(_local2);
} else if (typeof(_local1) == "boolean") {
if (_local1) {
_local2 = bottomLevel--;
} else {
_local2 = topLevel++;
}
} else {
trace("Error: invalid parameter passed to DepthManager.newDepth method");
}
return(_local2);
}
static function resetDepths() {
topLevel = defaultLevel;
bottomLevel = defaultLevel;
}
static function clearDepths() {
var _local1 = bottomLevel;
while (_local1 <= topLevel) {
unloadMovieNum (_local1);
_local1++;
}
_local1 = 0;
while (_local1 < specialList.length) {
unloadMovieNum (specialList[_local1]);
_local1++;
}
}
static var defaultLevel = 1000;
static var topLevel = defaultLevel;
static var bottomLevel = defaultLevel;
static var specialList = new Array();
}
Symbol 602 MovieClip [__Packages.TraceMe] Frame 0
class TraceMe
{
function TraceMe () {
}
static function allMembers(p) {
var _local1 = p;
trace(((("Tracing all members of the " + typeof(_local1)) + " ") + _local1) + " {");
for (var _local2 in _local1) {
trace((_local2 + ": ") + _local1[_local2]);
}
trace("}");
}
}
Symbol 388 MovieClip Frame 1
stop();
Symbol 429 Button
on (release) {
this.stop();
_root.play();
}
Symbol 504 MovieClip Frame 696
_root.play();
Symbol 520 Button
on (release) {
_root.doHelp();
}
Symbol 525 Button
on (release) {
_root.doQuit();
}
Symbol 530 Button
on (release) {
_root.doHiscore();
}
Symbol 535 Button
on (release) {
_root.doPlay();
}
Symbol 536 MovieClip Frame 67
stop();
Symbol 545 MovieClip Frame 1
stop();
Symbol 550 MovieClip Frame 1
stop();
Symbol 552 MovieClip Frame 1
stop();
Symbol 552 MovieClip Frame 20
stop();
_root.endLevel();
_root.setEnemyArray(this["level" + game.level].enemy_area1_arr);
Symbol 553 Button
on (release) {
_root.doHelp("game");
}
Symbol 556 MovieClip Frame 1
stop();
Symbol 557 Button
on (release) {
_root.doQuit();
}
Symbol 574 MovieClip Frame 1
var arrowrand = (random(5) + 1);
gotoAndPlay(arrowrand);
Symbol 574 MovieClip Frame 10
var arrowrand = ((10 + random(5)) + 1);
gotoAndPlay(arrowrand);
Symbol 585 Button
on (release) {
_root.doHiscore();
}
Symbol 590 Button
on (release) {
_root.gotoAndPlay("game_fr");
}