Frame 1
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
copyrightNotice.separatorBefore = true;
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
gamename = "just_a_bunny";
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
hostingdomain = real_domain[0];
if (hostingdomain == "") {
hostingdomain = "unknown";
}
savedomain1 = "gamedev.dev.spilgames.com";
savedomain2 = "www8.agame.com";
if ((hostingdomain == savedomain1) || (hostingdomain == savedomain2)) {
spilnetwerk = "internal";
} else {
spilnetwerk = "external";
}
_root.localization_url1 = (((("http://www.a10.com/?utm_medium=brandedgames_" + spilnetwerk) + "&utm_campaign=") + gamename) + "&utm_source=") + hostingdomain;
_root.localization_language_nr = 1;
_root.localization_branding_nr = 46;
_root.localization_portal = "teen";
if (_root.localization_portal == "game_com_cn") {
this.mainscreen_moregames.onRelease = function () {
getURL (_root.localization_url1, "_blank");
};
} else {
this.mainscreen_moregames.onRelease = function () {
getURL (_root.localization_url1 + "&utm_content=button_mainscreen_moregames", "_blank");
};
}
Frame 2
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
_root.loadBar._width = getPercent * 100;
_root.loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(4);
}
Frame 3
gotoAndPlay (2);
Frame 5
stopAllSounds();
atBoss = false;
playerType = "normal";
play();
Frame 6
logo.onPress = function () {
getURL ("http://www.xdgames.co.uk", "_blank");
};
sound_contr._alpha = 0;
qualityControl._alpha = 0;
Frame 7
ftb.removeMovieClip();
Instance of Symbol 707 MovieClip in Frame 7
on (release) {
_root.nextFrame();
}
Frame 8
gamename = "just_a_bunny";
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
hostingdomain = real_domain[0];
if (hostingdomain == "") {
hostingdomain = "unknown";
}
savedomain1 = "gamedev.dev.spilgames.com";
savedomain2 = "www8.agame.com";
if ((hostingdomain == savedomain1) || (hostingdomain == savedomain2)) {
spilnetwerk = "internal";
} else {
spilnetwerk = "external";
}
_root.localization_url1 = (((("http://www.a10.com/?utm_medium=brandedgames_" + spilnetwerk) + "&utm_campaign=") + gamename) + "&utm_source=") + hostingdomain;
_root.localization_language_nr = 1;
_root.localization_branding_nr = 46;
_root.localization_portal = "teen";
if (_root.localization_portal == "game_com_cn") {
this.mainscreen_moregames.onRelease = function () {
getURL (_root.localization_url1, "_blank");
};
} else {
this.mainscreen_moregames.onRelease = function () {
getURL (_root.localization_url1 + "&utm_content=button_mainscreen_moregames", "_blank");
};
}
stop();
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
pb.onEnterFrame = function () {
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
nextFrame();
}
}
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
pb.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
canSelect = false;
}
};
Frame 9
stop();
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
ints.onEnterFrame = function () {
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
nextFrame();
}
}
};
ints.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
canSelect = false;
}
};
Frame 10
stopAllSounds();
play();
Frame 11
stop();
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
normal.onEnterFrame = function () {
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
stopAllSounds();
nextFrame();
}
}
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
ninja.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
white.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
fuming.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
normal.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "normal";
canSelect = false;
}
};
ninja.onRelease = function () {
};
white.onRelease = function () {
};
fuming.onRelease = function () {
};
Frame 12
function removeall() {
ninjaBar.removeMovieClip();
enterBoss.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removeback_ground();
removeback_ground_position();
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removeback_ground() {
i = back_ground.length - 1;
while (i >= 0) {
back_ground[i].removeMovieClip();
back_ground.splice(i, 1);
i--;
}
}
function removeback_ground_position() {
i = back_ground_position.length - 1;
while (i >= 0) {
back_ground_position[i].removeMovieClip();
back_ground_position.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function pushDeadbody() {
i = dead_body.length - 1;
while (i >= 0) {
if (player._x > 410) {
dead_body[i]._x = dead_body[i]._x - 5;
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (player._x > 410) {
enemy[i]._x = enemy[i]._x - 5;
}
i--;
}
}
function addenemy() {
if (enemyNumber < 3) {
if ((releaseenemy + releNum) < getTimer()) {
releaseenemy = getTimer();
if (pplKilled < 31) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("scout", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("scout", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("scout", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("scout", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 31) && (pplKilled < 41)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(1);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(20);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 41) && (pplKilled < 51)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(40);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
}
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
hit_sound.start();
if (addBlood == 5) {
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
}
addBlood++;
pplKilled++;
hit_sound.start();
if (type[i] == 0) {
randomNumber++;
deadbod2 = _root.attachMovie("scoutDead", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 1) {
randomNumber++;
deadbod2 = _root.attachMovie("slashup", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 2) {
randomNumber++;
deadbod2 = _root.attachMovie("e2d", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 3) {
randomNumber++;
deadbod2 = _root.attachMovie("ni2", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 4) {
randomNumber++;
deadbod2 = _root.attachMovie("ed4", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == "boss") {
addblood = 0;
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
bossKilled = true;
randomNumber++;
deadbod2 = _root.attachMovie("sdeath", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
enemiesdead++;
showenemykills._x = 0;
removeect = 45;
removeec = true;
score = score + 30;
enemyNumber--;
randomNumber++;
up = _root.attachMovie("plus", "plus" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
randomNumber++;
death_mc = _root.attachMovie("dead4", "dead4" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
death_mc._xscale = 30;
death_mc._yscale = 30;
enemy[i].removeMovieClip();
enemy.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
hypArray.splice(i, 1);
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._xscale = 80;
enemy[i]._yscale = 80;
if (player._x < enemy[i]._x) {
enemy[i]._xscale = -80;
} else {
enemy[i]._xscale = 80;
}
if (enemy[i].hitTest(strong_smoke_mc)) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - 0.5;
}
if (type[i] == 0) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower / 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 1) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - enemyPower;
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 2) {
if (hypArray[i] < 250) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 3) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 4);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
if (type[i] == 4) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 5.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 10;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 111) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + ((((endX - enemy[i]._x) + 75) / enemySpeed) * 2);
}
}
}
if (type[i] == "boss") {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 6);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
bossBeingHit++;
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((enemy[i]._y == 450) && (player._y < 300)) {
findPlayer++;
}
if ((enemy[i]._y < 300) && (player._y == 450)) {
findPlayer++;
}
if (findPlayer > 80) {
if (player._y == 450) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
findPlayer = 0;
}
if (player._y < 300) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 278;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
findPlayer = 0;
}
}
if (swordThrow) {
if (enemy[i]._y == 278) {
if (bossBeingHit > 1) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = player._x + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
}
if (!swordThrow) {
if (bossBeingHit > 10) {
if (player._y == 450) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 278;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
if (player._y < 300) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
i--;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee1");
} else {
player.gotoAndStop("melee1");
}
if (is_attacking == 11) {
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee2");
} else {
player.gotoAndStop("melee2");
}
if (is_attacking == 17) {
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee3");
} else {
player.gotoAndStop("melee3");
}
if (is_attacking == 24) {
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local2 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local2 = player.transform.colorTransform;
_local2.rgb = 4294967295;
player.transform.colorTransform = _local2;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (player._x > 410) {
enemy_smoke_mc._x = enemy_smoke_mc._x - 5;
strong_smoke_mc._x = strong_smoke_mc._x - 5;
playerFade._x = playerFade._x - 5;
smoke_mc._x = smoke_mc._x - 5;
player._x = 410;
}
if (player._x < 40) {
player._x = 40;
}
if (!moveDown) {
if (!jump) {
if (!swordThrow) {
if (!bunnyPush) {
if (!attacking) {
if (!sliding) {
if (!running) {
player.gotoAndStop("idle");
}
if (running) {
player.gotoAndStop("run");
}
}
}
}
}
}
}
if (Key.isDown(68)) {
if (canAttack) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!attacking) {
bunnyPush = true;
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (!moveDown) {
if (!sliding) {
if (!swordThrow) {
if (!bunnyPush) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
if (bunnyPush) {
if (!jump) {
playerSpeed = 0;
player.gotoAndStop("forcepush");
} else {
player.gotoAndStop("forcepushair");
}
if (bunnyPushTimer == 0) {
shake++;
boom_sound.start();
}
bunnyPushTimer++;
if (bunnyPushTimer == 13) {
if (((playerType == "normal") or (playerType == "assassin")) or (playerType == "white")) {
energy = energy - 50;
}
if (playerType == "rage") {
energy = energy - 25;
}
playerSpeed = 10;
bunnyPush = false;
bunnyPushTimer = 0;
}
}
if (sliding) {
if (slidingTimer == 0) {
swing_sound.start();
randomNumber++;
if (playerType == "normal") {
playerFade = _root.attachMovie("playerFade", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "assassin") {
playerFade = _root.attachMovie("playerFade2", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "white") {
playerFade = _root.attachMovie("playerFade3", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "rage") {
playerFade = _root.attachMovie("playerFade4", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
playerFade._xscale = player._xscale;
playerFade._yscale = player._yscale;
randomNumber++;
smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
smoke_mc._xscale = player._xscale;
smoke_mc._yscale = player._yscale;
}
slidingTimer++;
player.gotoAndStop("slide");
if (slidingRight) {
player._x = player._x + (dashSpeed * 8);
}
if (slidingLeft) {
player._x = player._x - (dashSpeed * 8);
}
if (slidingTimer == 3) {
dashSpeed = 0;
}
if (slidingTimer == 10) {
energy = energy - 15;
dashSpeed = 10;
smack = 0;
sliding = false;
slidingTimer = 0;
}
}
if (swordThrow) {
player.gotoAndStop("throw");
swordThrowTimer++;
if (swordThrowTimer == 25) {
energy = energy - 25;
swordThrowTimer = 0;
swordThrow = false;
}
}
if (moveDown) {
player.gotoAndStop("downmove");
if (moveDownTimer == 0) {
acid_sound.start();
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
if (moveDownTimer == 17) {
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
moveDownTimer++;
if (moveDownTimer == 18) {
energy = energy - 30;
moveDownTimer = 0;
moveDown = false;
}
}
if (Key.isDown(83)) {
if (canAttack) {
if (!jump) {
if (!attacking) {
if (!bunnyPush) {
if (player._y == 450) {
if (!moveDown) {
swordThrow = true;
}
} else {
moveDown = true;
}
}
}
}
}
}
if (canAttack) {
if (!jump) {
if (!moveDown) {
if (!swordThrow) {
if (!attacking) {
if (!bunnyPush) {
if (Key.isDown(39) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = true;
slidingLeft = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(39)) {
hit2 = false;
}
if (Key.isDown(37) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = false;
slidingLeft = true;
}
lastPressB = getTimer();
} else if (!Key.isDown(37)) {
hit3 = false;
}
}
}
}
}
}
}
if (Key.isDown(38)) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!bunnyPush) {
if (onfloor) {
if (!attacking) {
player.gotoAndStop("jump");
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
}
}
}
}
}
}
if (Key.isDown(40)) {
if (!moveDown) {
dropping = true;
}
}
if (dropping) {
droppingTimer++;
if (droppingTimer > 15) {
dropping = false;
droppingTimer = 0;
}
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (!swordThrow) {
if (!moveDown) {
if (Key.isDown(39)) {
player._xscale = 65;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -65;
player._x = player._x - playerSpeed;
running = true;
}
}
}
player._y = player._y + yspeed;
if (player._y > 450) {
dropping = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 450;
} else {
yspeed = yspeed + (gravity * 2);
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
j--;
}
i--;
}
}
function backgroundMovement() {
i = back_ground.length - 1;
while (i >= 0) {
if (back_ground[i]._x == -800) {
back_ground[i]._x = 800;
}
if (player._x > 410) {
if (back_ground_position[i] == 0) {
back_ground[i]._x = back_ground[i]._x - 2;
}
if (back_ground_position[i] == 1) {
back_ground[i]._x = back_ground[i]._x - 5;
}
}
i--;
}
}
function blockActions() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i]._alpha = 0;
if ((!player.hitTest(blocks[i])) && ((!player._y) == 450)) {
onfloor = false;
}
if (player._x > 410) {
blocks[i]._x = blocks[i]._x - 5;
}
if (blocks[i]._x < -640) {
blocks[i]._x = 640;
}
if (!swordThrow) {
if (player.hitTest(blocks[i])) {
if (player._y > blocks[i]._y) {
if (!dropping) {
player._y = blocks[i]._y;
yspeed = 0;
jump = false;
onfloor = true;
}
}
}
}
i--;
}
}
function enemyOnStage() {
if (atBoss) {
anyOneAbout = false;
}
if (!atBoss) {
if (pplKilled < 50) {
anyOneAbout = true;
} else {
anyOneAbout = false;
}
}
if (!anyOneAbout) {
releaseBoss++;
if (releaseBoss == 100) {
atBoss = true;
_root.attachMovie("enterBoss", "enterBoss", _root.getNextHighestDepth());
enemy_ = _root.attachMovie("sguy", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:1700});
depths.push(enemy_);
enemy.push(enemy_);
type.push("boss");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(500);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
}
if (anyOneAbout) {
releaseBoss = 0;
}
if (releaseBoss > 100) {
releaseBoss = 101;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 9;
_root._x = _root._x - 9;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 6;
_root._y = _root._y + 6;
}
}
function playersEnergyBar() {
energy = energy + 0.5;
if (energy < 0) {
canAttack = false;
energy = 0;
}
if (energy > 100) {
canAttack = true;
energy = 100;
}
ninjaBar._xscale = energy;
if (!canAttack) {
ninjaBar.gotoAndStop("normal");
} else {
ninjaBar.gotoAndStop("max");
}
}
stop();
stage = 1;
_root.attachMovie("stage", "stage", _root.getNextHighestDepth(), {_x:-100, _y:-50});
if (playerType == "normal") {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "assassin") {
_root.attachMovie("player2", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "white") {
_root.attachMovie("player3", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "rage") {
_root.attachMovie("player4", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:39, _y:20});
_root.attachMovie("ninjaBar", "ninjaBar", _root.getNextHighestDepth(), {_x:39, _y:38});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:37, _y:20});
acid_sound = new Sound();
acid_sound.attachSound("acidddd");
boom_sound = new Sound();
boom_sound.attachSound("zuum");
swing_sound = new Sound();
swing_sound.attachSound("swing");
hit_sound = new Sound();
hit_sound.attachSound("enemy hit.mp3");
player._yscale = 65;
player._xscale = 65;
addFirstCombo = false;
addSecondCombo = false;
addThirdCombo = false;
findPlayer = 0;
Pause = 0;
canAttack = true;
energy = 100;
enemyPower = 0.5;
playerHealth = 100;
wait = 0;
placeTrans = true;
bossKilled = false;
goTimer = 0;
bossBeingHit = 0;
releaseBoss = 0;
bunnyPush = false;
bunnyPushTimer = 0;
moveDown = false;
moveDownTimer = 0;
swordThrow = false;
swordThrowTimer = 0;
addBlood = 0;
shake = 0;
dropping = false;
enemySpeed = 30;
dashSpeed = 10;
jump = false;
jumpamount = 35;
gravity = 2;
yspeed = 0;
playerPower = 5;
onfloor = true;
pressHack = 0;
sliding = false;
slidingTimer = 0;
addEffect = 0;
clicks = 0;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
hitPlayer = 0;
hitTimer = 0;
randomNumber = 0;
releaseenemy = 0;
enemyNumber = 0;
releNum = 500;
pplKilled = 0;
anyOneAbout = false;
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var back_ground = new Array();
var back_ground_position = new Array();
blocks.push(block1, block2);
back_ground.push(backdrop, backdrop_tile_2, foreGround, foreGround_tile_2, stick1, stick2);
back_ground_position.push(0, 0, 1, 1, 1, 1);
player.onEnterFrame = function () {
if (addBlood > 10) {
addBlood = 0;
}
if (bossKilled) {
wait++;
if (wait == 110) {
if (placeTrans) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
placeTrans = false;
}
}
}
if (!placeTrans) {
goTimer++;
if (goTimer == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
if (playerHealth < 1) {
removeall();
stopAllSounds();
gotoAndStop ("gameOver");
}
barBoarder.lol.text = pplKilled;
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
playersEnergyBar();
enemyOnStage();
enemyMovement();
enemyHealthReachesZero();
if (Pause > 90) {
if (!atBoss) {
addenemy();
}
}
Pause++;
if (Pause > 90) {
Pause == 91;
}
noOverLap();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
pushDeadbody();
pushenemy();
shaker();
blockActions();
backgroundMovement();
stick1.swapDepths(_root.getNextHighestDepth());
stick2.swapDepths(_root.getNextHighestDepth());
splatter.swapDepths(_root.getNextHighestDepth());
enterBoss.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
};
Frame 13
stop();
stopAllSounds();
atBoss = false;
player.removeMovieClip();
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
normal.onEnterFrame = function () {
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
stopAllSounds();
nextFrame();
}
}
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
ninja.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
white.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
fuming.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
normal.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "normal";
canSelect = false;
}
};
ninja.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "assassin";
canSelect = false;
}
};
white.onRelease = function () {
};
fuming.onRelease = function () {
};
Frame 14
function removeall() {
ninjaBar.removeMovieClip();
enterBoss.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removeback_ground();
removeback_ground_position();
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removeback_ground() {
i = back_ground.length - 1;
while (i >= 0) {
back_ground[i].removeMovieClip();
back_ground.splice(i, 1);
i--;
}
}
function removeback_ground_position() {
i = back_ground_position.length - 1;
while (i >= 0) {
back_ground_position[i].removeMovieClip();
back_ground_position.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function pushDeadbody() {
i = dead_body.length - 1;
while (i >= 0) {
if (player._x > 410) {
dead_body[i]._x = dead_body[i]._x - 5;
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (player._x > 410) {
enemy[i]._x = enemy[i]._x - 5;
}
i--;
}
}
function addenemy() {
if (enemyNumber < 3) {
if ((releaseenemy + releNum) < getTimer()) {
releaseenemy = getTimer();
if (pplKilled < 31) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(1);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(20);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 31) && (pplKilled < 41)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(40);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 41) && (pplKilled < 51)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(3);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(70);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
}
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
hit_sound.start();
if (addBlood == 5) {
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
}
addBlood++;
pplKilled++;
hit_sound.start();
if (type[i] == 0) {
randomNumber++;
deadbod2 = _root.attachMovie("scoutDead", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 1) {
randomNumber++;
deadbod2 = _root.attachMovie("slashup", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 2) {
randomNumber++;
deadbod2 = _root.attachMovie("e2d", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 3) {
randomNumber++;
deadbod2 = _root.attachMovie("ni2", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 4) {
randomNumber++;
deadbod2 = _root.attachMovie("ed4", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == "boss") {
addblood = 0;
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
bossKilled = true;
randomNumber++;
deadbod2 = _root.attachMovie("sdeath", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
enemiesdead++;
showenemykills._x = 0;
removeect = 45;
removeec = true;
score = score + 30;
enemyNumber--;
randomNumber++;
up = _root.attachMovie("plus", "plus" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
randomNumber++;
death_mc = _root.attachMovie("dead4", "dead4" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
death_mc._xscale = 30;
death_mc._yscale = 30;
enemy[i].removeMovieClip();
enemy.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
hypArray.splice(i, 1);
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._xscale = 80;
enemy[i]._yscale = 80;
if (player._x < enemy[i]._x) {
enemy[i]._xscale = -80;
} else {
enemy[i]._xscale = 80;
}
if (enemy[i].hitTest(strong_smoke_mc)) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - 0.5;
}
if (type[i] == 0) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower / 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 1) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower / 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 2) {
if (hypArray[i] < 250) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - enemyPower;
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 3) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
if (type[i] == 4) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 5.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 10;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 111) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + ((((endX - enemy[i]._x) + 75) / enemySpeed) * 2);
}
}
}
if (type[i] == "boss") {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 6);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
bossBeingHit++;
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (swordThrow) {
if (enemy[i]._y == 278) {
if (bossBeingHit > 1) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = player._x + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
}
if (!swordThrow) {
if (bossBeingHit > 10) {
if (player._y == 450) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 278;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
if (player._y < 300) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
i--;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee1");
} else {
player.gotoAndStop("melee1");
}
if (is_attacking == 11) {
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee2");
} else {
player.gotoAndStop("melee2");
}
if (is_attacking == 17) {
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee3");
} else {
player.gotoAndStop("melee3");
}
if (is_attacking == 24) {
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local2 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local2 = player.transform.colorTransform;
_local2.rgb = 4294967295;
player.transform.colorTransform = _local2;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (player._x > 410) {
enemy_smoke_mc._x = enemy_smoke_mc._x - 5;
strong_smoke_mc._x = strong_smoke_mc._x - 5;
playerFade._x = playerFade._x - 5;
smoke_mc._x = smoke_mc._x - 5;
player._x = 410;
}
if (player._x < 40) {
player._x = 40;
}
if (!moveDown) {
if (!jump) {
if (!swordThrow) {
if (!bunnyPush) {
if (!attacking) {
if (!sliding) {
if (!running) {
player.gotoAndStop("idle");
}
if (running) {
player.gotoAndStop("run");
}
}
}
}
}
}
}
if (Key.isDown(68)) {
if (canAttack) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!attacking) {
bunnyPush = true;
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (!moveDown) {
if (!sliding) {
if (!swordThrow) {
if (!bunnyPush) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
if (bunnyPush) {
if (!jump) {
playerSpeed = 0;
player.gotoAndStop("forcepush");
} else {
player.gotoAndStop("forcepushair");
}
if (bunnyPushTimer == 0) {
shake++;
boom_sound.start();
}
bunnyPushTimer++;
if (bunnyPushTimer == 13) {
if (((playerType == "normal") or (playerType == "assassin")) or (playerType == "white")) {
energy = energy - 50;
}
if (playerType == "rage") {
energy = energy - 25;
}
playerSpeed = 10;
bunnyPush = false;
bunnyPushTimer = 0;
}
}
if (sliding) {
if (slidingTimer == 0) {
swing_sound.start();
randomNumber++;
if (playerType == "normal") {
playerFade = _root.attachMovie("playerFade", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "assassin") {
playerFade = _root.attachMovie("playerFade2", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "white") {
playerFade = _root.attachMovie("playerFade3", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "rage") {
playerFade = _root.attachMovie("playerFade4", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
playerFade._xscale = player._xscale;
playerFade._yscale = player._yscale;
randomNumber++;
smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
smoke_mc._xscale = player._xscale;
smoke_mc._yscale = player._yscale;
}
slidingTimer++;
player.gotoAndStop("slide");
if (slidingRight) {
player._x = player._x + (dashSpeed * 8);
}
if (slidingLeft) {
player._x = player._x - (dashSpeed * 8);
}
if (slidingTimer == 3) {
dashSpeed = 0;
}
if (slidingTimer == 10) {
energy = energy - 15;
dashSpeed = 10;
smack = 0;
sliding = false;
slidingTimer = 0;
}
}
if (swordThrow) {
player.gotoAndStop("throw");
swordThrowTimer++;
if (swordThrowTimer == 25) {
energy = energy - 25;
swordThrowTimer = 0;
swordThrow = false;
}
}
if (moveDown) {
player.gotoAndStop("downmove");
if (moveDownTimer == 0) {
acid_sound.start();
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
if (moveDownTimer == 17) {
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
moveDownTimer++;
if (moveDownTimer == 18) {
energy = energy - 30;
moveDownTimer = 0;
moveDown = false;
}
}
if (Key.isDown(83)) {
if (canAttack) {
if (!jump) {
if (!attacking) {
if (!bunnyPush) {
if (player._y == 450) {
if (!moveDown) {
swordThrow = true;
}
} else {
moveDown = true;
}
}
}
}
}
}
if (canAttack) {
if (!jump) {
if (!moveDown) {
if (!swordThrow) {
if (!attacking) {
if (!bunnyPush) {
if (Key.isDown(39) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = true;
slidingLeft = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(39)) {
hit2 = false;
}
if (Key.isDown(37) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = false;
slidingLeft = true;
}
lastPressB = getTimer();
} else if (!Key.isDown(37)) {
hit3 = false;
}
}
}
}
}
}
}
if (Key.isDown(38)) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!bunnyPush) {
if (onfloor) {
if (!attacking) {
player.gotoAndStop("jump");
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
}
}
}
}
}
}
if (Key.isDown(40)) {
if (!moveDown) {
dropping = true;
}
}
if (dropping) {
droppingTimer++;
if (droppingTimer > 15) {
dropping = false;
droppingTimer = 0;
}
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (!swordThrow) {
if (!moveDown) {
if (Key.isDown(39)) {
player._xscale = 65;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -65;
player._x = player._x - playerSpeed;
running = true;
}
}
}
player._y = player._y + yspeed;
if (player._y > 450) {
dropping = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 450;
} else {
yspeed = yspeed + (gravity * 2);
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
j--;
}
i--;
}
}
function backgroundMovement() {
i = back_ground.length - 1;
while (i >= 0) {
if (back_ground[i]._x == -800) {
back_ground[i]._x = 800;
}
if (player._x > 410) {
if (back_ground_position[i] == 0) {
back_ground[i]._x = back_ground[i]._x - 2;
}
if (back_ground_position[i] == 1) {
back_ground[i]._x = back_ground[i]._x - 5;
}
}
i--;
}
}
function blockActions() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i]._alpha = 0;
if ((!player.hitTest(blocks[i])) && ((!player._y) == 450)) {
onfloor = false;
}
if (player._x > 410) {
blocks[i]._x = blocks[i]._x - 5;
}
if (blocks[i]._x < -640) {
blocks[i]._x = 640;
}
if (!swordThrow) {
if (player.hitTest(blocks[i])) {
if (player._y > blocks[i]._y) {
if (!dropping) {
player._y = blocks[i]._y;
yspeed = 0;
jump = false;
onfloor = true;
}
}
}
}
i--;
}
}
function enemyOnStage() {
if (pplKilled < 50) {
anyOneAbout = true;
} else {
anyOneAbout = false;
}
if (!anyOneAbout) {
releaseBoss++;
if (releaseBoss == 200) {
bossKilled = true;
}
}
if (anyOneAbout) {
releaseBoss = 0;
}
if (releaseBoss > 200) {
releaseBoss = 201;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 9;
_root._x = _root._x - 9;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 6;
_root._y = _root._y + 6;
}
}
function playersEnergyBar() {
energy = energy + 0.5;
if (energy < 0) {
canAttack = false;
energy = 0;
}
if (energy > 100) {
canAttack = true;
energy = 100;
}
ninjaBar._xscale = energy;
if (!canAttack) {
ninjaBar.gotoAndStop("normal");
} else {
ninjaBar.gotoAndStop("max");
}
}
stop();
stage = 2;
if (playerType == "normal") {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "assassin") {
_root.attachMovie("player2", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "white") {
_root.attachMovie("player3", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "rage") {
_root.attachMovie("player4", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:39, _y:20});
_root.attachMovie("ninjaBar", "ninjaBar", _root.getNextHighestDepth(), {_x:39, _y:38});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:37, _y:20});
acid_sound = new Sound();
acid_sound.attachSound("acidddd");
boom_sound = new Sound();
boom_sound.attachSound("zuum");
swing_sound = new Sound();
swing_sound.attachSound("swing");
hit_sound = new Sound();
hit_sound.attachSound("enemy hit.mp3");
player._yscale = 65;
player._xscale = 65;
addFirstCombo = false;
addSecondCombo = false;
addThirdCombo = false;
canAttack = true;
Pause = 0;
energy = 100;
enemyPower = 0.5;
playerHealth = 100;
wait = 0;
placeTrans = true;
bossKilled = false;
goTimer = 0;
bossBeingHit = 0;
releaseBoss = 0;
bunnyPush = false;
bunnyPushTimer = 0;
moveDown = false;
moveDownTimer = 0;
swordThrow = false;
swordThrowTimer = 0;
addBlood = 0;
shake = 0;
dropping = false;
enemySpeed = 30;
dashSpeed = 10;
jump = false;
jumpamount = 35;
gravity = 2;
yspeed = 0;
playerPower = 5;
onfloor = true;
pressHack = 0;
sliding = false;
slidingTimer = 0;
clicks = 0;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
hitPlayer = 0;
hitTimer = 0;
randomNumber = 0;
releaseenemy = 0;
enemyNumber = 0;
releNum = 500;
pplKilled = 0;
anyOneAbout = false;
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var back_ground = new Array();
var back_ground_position = new Array();
blocks.push(block1, block2);
back_ground.push(backdrop, backdrop_tile_2, foreGround, foreGround_tile_2);
back_ground_position.push(0, 0, 1, 1);
player.onEnterFrame = function () {
if (addBlood > 10) {
addBlood = 0;
}
if (bossKilled) {
wait++;
if (wait == 110) {
if (placeTrans) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
placeTrans = false;
}
}
}
if (!placeTrans) {
goTimer++;
if (goTimer == 27) {
stopAllSounds();
removeall();
nextFrame();
}
}
if (playerHealth < 1) {
removeall();
stopAllSounds();
gotoAndStop ("gameOver");
}
barBoarder.lol.text = pplKilled;
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
playersEnergyBar();
enemyOnStage();
enemyMovement();
enemyHealthReachesZero();
if (Pause > 90) {
addenemy();
}
Pause++;
if (Pause > 90) {
Pause == 91;
}
if (Pause == 45) {
_root.attachMovie("stage", "stage", _root.getNextHighestDepth(), {_x:-100, _y:-50});
}
noOverLap();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
pushDeadbody();
pushenemy();
shaker();
blockActions();
backgroundMovement();
splatter.swapDepths(_root.getNextHighestDepth());
enterBoss.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
};
Frame 15
player.removeMovieClip();
Instance of Symbol 707 MovieClip in Frame 15
on (release) {
_root.nextFrame();
}
Frame 16
stop();
stopAllSounds();
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
normal.onEnterFrame = function () {
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
stopAllSounds();
nextFrame();
}
}
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
ninja.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
white.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
fuming.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
normal.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "normal";
canSelect = false;
}
};
ninja.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "assassin";
canSelect = false;
}
};
white.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "white";
canSelect = false;
}
};
fuming.onRelease = function () {
};
Frame 17
function removeall() {
ninjaBar.removeMovieClip();
enterBoss.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removeback_ground();
removeback_ground_position();
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removeback_ground() {
i = back_ground.length - 1;
while (i >= 0) {
back_ground[i].removeMovieClip();
back_ground.splice(i, 1);
i--;
}
}
function removeback_ground_position() {
i = back_ground_position.length - 1;
while (i >= 0) {
back_ground_position[i].removeMovieClip();
back_ground_position.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function pushDeadbody() {
i = dead_body.length - 1;
while (i >= 0) {
if (player._x > 410) {
dead_body[i]._x = dead_body[i]._x - 5;
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (player._x > 410) {
enemy[i]._x = enemy[i]._x - 5;
}
i--;
}
}
function addenemy() {
if (enemyNumber < 3) {
if ((releaseenemy + releNum) < getTimer()) {
releaseenemy = getTimer();
if (pplKilled < 11) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("scout", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("scout", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("scout", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("scout", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 11) && (pplKilled < 21)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy1", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(1);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(20);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 21) && (pplKilled < 31)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(40);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 31) && (pplKilled < 41)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(3);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(70);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 41) && (pplKilled < 51)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(4);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(60);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
}
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
hit_sound.start();
if (addBlood == 5) {
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
}
addBlood++;
pplKilled++;
hit_sound.start();
if (type[i] == 0) {
randomNumber++;
deadbod2 = _root.attachMovie("scoutDead", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 1) {
randomNumber++;
deadbod2 = _root.attachMovie("slashup", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 2) {
randomNumber++;
deadbod2 = _root.attachMovie("e2d", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 3) {
randomNumber++;
deadbod2 = _root.attachMovie("ni2", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 4) {
randomNumber++;
deadbod2 = _root.attachMovie("ed4", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == "boss") {
addblood = 0;
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
bossKilled = true;
randomNumber++;
deadbod2 = _root.attachMovie("sdeath2", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
enemiesdead++;
showenemykills._x = 0;
removeect = 45;
removeec = true;
score = score + 30;
enemyNumber--;
randomNumber++;
up = _root.attachMovie("plus", "plus" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
randomNumber++;
death_mc = _root.attachMovie("dead4", "dead4" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
death_mc._xscale = 30;
death_mc._yscale = 30;
enemy[i].removeMovieClip();
enemy.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
hypArray.splice(i, 1);
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._xscale = 80;
enemy[i]._yscale = 80;
if (player._x < enemy[i]._x) {
enemy[i]._xscale = -80;
} else {
enemy[i]._xscale = 80;
}
if (enemy[i].hitTest(strong_smoke_mc)) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - 0.5;
}
if (type[i] == 0) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower / 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 1) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - enemyPower;
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 2) {
if (hypArray[i] < 250) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 3) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 4);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
if (type[i] == 4) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - enemyPower;
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 10;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 111) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + ((((endX - enemy[i]._x) + 75) / enemySpeed) * 1.5);
}
}
}
if (type[i] == "boss") {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 3.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 113) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
bossBeingHit++;
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((enemy[i]._y == 450) && (player._y < 300)) {
findPlayer++;
}
if ((enemy[i]._y < 300) && (player._y == 450)) {
findPlayer++;
}
if (findPlayer > 80) {
if (player._y == 450) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
findPlayer = 0;
}
if (player._y < 300) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 278;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
findPlayer = 0;
}
}
if (swordThrow) {
if (enemy[i]._y == 278) {
if (bossBeingHit > 1) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = player._x + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
}
if (!swordThrow) {
if (bossBeingHit > 10) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
i--;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee1");
} else {
player.gotoAndStop("melee1");
}
if (is_attacking == 11) {
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee2");
} else {
player.gotoAndStop("melee2");
}
if (is_attacking == 17) {
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee3");
} else {
player.gotoAndStop("melee3");
}
if (is_attacking == 24) {
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local2 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local2 = player.transform.colorTransform;
_local2.rgb = 4294967295;
player.transform.colorTransform = _local2;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (player._x > 410) {
enemy_smoke_mc._x = enemy_smoke_mc._x - 5;
strong_smoke_mc._x = strong_smoke_mc._x - 5;
playerFade._x = playerFade._x - 5;
smoke_mc._x = smoke_mc._x - 5;
player._x = 410;
}
if (player._x < 40) {
player._x = 40;
}
if (!moveDown) {
if (!jump) {
if (!swordThrow) {
if (!bunnyPush) {
if (!attacking) {
if (!sliding) {
if (!running) {
player.gotoAndStop("idle");
}
if (running) {
player.gotoAndStop("run");
}
}
}
}
}
}
}
if (Key.isDown(68)) {
if (canAttack) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!attacking) {
bunnyPush = true;
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (!moveDown) {
if (!sliding) {
if (!swordThrow) {
if (!bunnyPush) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
if (bunnyPush) {
if (!jump) {
playerSpeed = 0;
player.gotoAndStop("forcepush");
} else {
player.gotoAndStop("forcepushair");
}
if (bunnyPushTimer == 0) {
shake++;
boom_sound.start();
}
bunnyPushTimer++;
if (bunnyPushTimer == 13) {
if (((playerType == "normal") or (playerType == "assassin")) or (playerType == "white")) {
energy = energy - 50;
}
if (playerType == "rage") {
energy = energy - 25;
}
playerSpeed = 10;
bunnyPush = false;
bunnyPushTimer = 0;
}
}
if (sliding) {
if (slidingTimer == 0) {
swing_sound.start();
randomNumber++;
if (playerType == "normal") {
playerFade = _root.attachMovie("playerFade", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "assassin") {
playerFade = _root.attachMovie("playerFade2", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "white") {
playerFade = _root.attachMovie("playerFade3", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "rage") {
playerFade = _root.attachMovie("playerFade4", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
playerFade._xscale = player._xscale;
playerFade._yscale = player._yscale;
randomNumber++;
smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
smoke_mc._xscale = player._xscale;
smoke_mc._yscale = player._yscale;
}
slidingTimer++;
player.gotoAndStop("slide");
if (slidingRight) {
player._x = player._x + (dashSpeed * 8);
}
if (slidingLeft) {
player._x = player._x - (dashSpeed * 8);
}
if (slidingTimer == 3) {
dashSpeed = 0;
}
if (slidingTimer == 10) {
energy = energy - 15;
dashSpeed = 10;
smack = 0;
sliding = false;
slidingTimer = 0;
}
}
if (swordThrow) {
player.gotoAndStop("throw");
swordThrowTimer++;
if (swordThrowTimer == 25) {
energy = energy - 25;
swordThrowTimer = 0;
swordThrow = false;
}
}
if (moveDown) {
player.gotoAndStop("downmove");
if (moveDownTimer == 0) {
acid_sound.start();
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
if (moveDownTimer == 17) {
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
moveDownTimer++;
if (moveDownTimer == 18) {
energy = energy - 30;
moveDownTimer = 0;
moveDown = false;
}
}
if (Key.isDown(83)) {
if (canAttack) {
if (!jump) {
if (!attacking) {
if (!bunnyPush) {
if (player._y == 450) {
if (!moveDown) {
swordThrow = true;
}
} else {
moveDown = true;
}
}
}
}
}
}
if (canAttack) {
if (!jump) {
if (!moveDown) {
if (!swordThrow) {
if (!attacking) {
if (!bunnyPush) {
if (Key.isDown(39) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = true;
slidingLeft = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(39)) {
hit2 = false;
}
if (Key.isDown(37) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = false;
slidingLeft = true;
}
lastPressB = getTimer();
} else if (!Key.isDown(37)) {
hit3 = false;
}
}
}
}
}
}
}
if (Key.isDown(38)) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!bunnyPush) {
if (onfloor) {
if (!attacking) {
player.gotoAndStop("jump");
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
}
}
}
}
}
}
if (Key.isDown(40)) {
if (!moveDown) {
dropping = true;
}
}
if (dropping) {
droppingTimer++;
if (droppingTimer > 15) {
dropping = false;
droppingTimer = 0;
}
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (!swordThrow) {
if (!moveDown) {
if (Key.isDown(39)) {
player._xscale = 65;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -65;
player._x = player._x - playerSpeed;
running = true;
}
}
}
player._y = player._y + yspeed;
if (player._y > 450) {
dropping = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 450;
} else {
yspeed = yspeed + (gravity * 2);
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
j--;
}
i--;
}
}
function backgroundMovement() {
i = back_ground.length - 1;
while (i >= 0) {
if (back_ground[i]._x == -800) {
back_ground[i]._x = 800;
}
if (player._x > 410) {
if (back_ground_position[i] == 0) {
back_ground[i]._x = back_ground[i]._x - 2;
}
if (back_ground_position[i] == 1) {
back_ground[i]._x = back_ground[i]._x - 5;
}
}
i--;
}
}
function blockActions() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i]._alpha = 0;
if ((!player.hitTest(blocks[i])) && ((!player._y) == 450)) {
onfloor = false;
}
if (player._x > 410) {
blocks[i]._x = blocks[i]._x - 5;
}
if (blocks[i]._x < -640) {
blocks[i]._x = 640;
}
if (!swordThrow) {
if (player.hitTest(blocks[i])) {
if (player._y > blocks[i]._y) {
if (!dropping) {
player._y = blocks[i]._y;
yspeed = 0;
jump = false;
onfloor = true;
}
}
}
}
i--;
}
}
function enemyOnStage() {
if (atBoss) {
anyOneAbout = false;
}
if (!atBoss) {
if (pplKilled < 50) {
anyOneAbout = true;
} else {
anyOneAbout = false;
}
}
if (!anyOneAbout) {
releaseBoss++;
if (releaseBoss == 100) {
atBoss = true;
_root.attachMovie("enterBoss2", "enterBoss", _root.getNextHighestDepth());
enemy_ = _root.attachMovie("sguy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:1700});
depths.push(enemy_);
enemy.push(enemy_);
type.push("boss");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(1000);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
}
if (anyOneAbout) {
releaseBoss = 0;
}
if (releaseBoss > 100) {
releaseBoss = 101;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 9;
_root._x = _root._x - 9;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 6;
_root._y = _root._y + 6;
}
}
function playersEnergyBar() {
energy = energy + 0.5;
if (energy < 0) {
canAttack = false;
energy = 0;
}
if (energy > 100) {
canAttack = true;
energy = 100;
}
ninjaBar._xscale = energy;
if (!canAttack) {
ninjaBar.gotoAndStop("normal");
} else {
ninjaBar.gotoAndStop("max");
}
}
stop();
stage = 3;
_root.attachMovie("stage", "stage", _root.getNextHighestDepth(), {_x:-100, _y:-50});
if (playerType == "normal") {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "assassin") {
_root.attachMovie("player2", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "white") {
_root.attachMovie("player3", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "rage") {
_root.attachMovie("player4", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:39, _y:20});
_root.attachMovie("ninjaBar", "ninjaBar", _root.getNextHighestDepth(), {_x:39, _y:38});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:37, _y:20});
acid_sound = new Sound();
acid_sound.attachSound("acidddd");
boom_sound = new Sound();
boom_sound.attachSound("zuum");
swing_sound = new Sound();
swing_sound.attachSound("swing");
hit_sound = new Sound();
hit_sound.attachSound("enemy hit.mp3");
player._yscale = 65;
player._xscale = 65;
addFirstCombo = false;
addSecondCombo = false;
addThirdCombo = false;
findPlayer = 0;
Pause = 0;
canAttack = true;
energy = 100;
enemyPower = 0.5;
playerHealth = 100;
wait = 0;
placeTrans = true;
bossKilled = false;
goTimer = 0;
bossBeingHit = 0;
releaseBoss = 0;
bunnyPush = false;
bunnyPushTimer = 0;
moveDown = false;
moveDownTimer = 0;
swordThrow = false;
swordThrowTimer = 0;
addBlood = 0;
shake = 0;
dropping = false;
enemySpeed = 30;
dashSpeed = 10;
jump = false;
jumpamount = 35;
gravity = 2;
yspeed = 0;
playerPower = 5;
onfloor = true;
pressHack = 0;
sliding = false;
slidingTimer = 0;
addEffect = 0;
clicks = 0;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
hitPlayer = 0;
hitTimer = 0;
randomNumber = 0;
releaseenemy = 0;
enemyNumber = 0;
releNum = 500;
pplKilled = 0;
anyOneAbout = false;
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var back_ground = new Array();
var back_ground_position = new Array();
blocks.push(block1, block2);
back_ground.push(backdrop, backdrop_tile_2, foreGround, foreGround_tile_2);
back_ground_position.push(0, 0, 1, 1);
player.onEnterFrame = function () {
if (addBlood > 10) {
addBlood = 0;
}
if (bossKilled) {
wait++;
if (wait == 110) {
if (placeTrans) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
placeTrans = false;
}
}
}
if (!placeTrans) {
goTimer++;
if (goTimer == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
if (playerHealth < 1) {
removeall();
stopAllSounds();
gotoAndStop ("gameOver");
}
barBoarder.lol.text = pplKilled;
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
playersEnergyBar();
enemyOnStage();
enemyMovement();
enemyHealthReachesZero();
if (Pause > 90) {
if (!atBoss) {
addenemy();
}
}
Pause++;
if (Pause > 90) {
Pause == 91;
}
noOverLap();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
pushDeadbody();
pushenemy();
shaker();
blockActions();
backgroundMovement();
stick1.swapDepths(_root.getNextHighestDepth());
stick2.swapDepths(_root.getNextHighestDepth());
splatter.swapDepths(_root.getNextHighestDepth());
enterBoss.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
};
Frame 18
stop();
stopAllSounds();
atBoss = false;
player.removeMovieClip();
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
normal.onEnterFrame = function () {
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
stopAllSounds();
nextFrame();
}
}
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
ninja.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
white.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
fuming.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
normal.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "normal";
canSelect = false;
}
};
ninja.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "assassin";
canSelect = false;
}
};
white.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "white";
canSelect = false;
}
};
fuming.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "rage";
canSelect = false;
}
};
Frame 19
function removeall() {
ninjaBar.removeMovieClip();
enterBoss.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removeback_ground();
removeback_ground_position();
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removeback_ground() {
i = back_ground.length - 1;
while (i >= 0) {
back_ground[i].removeMovieClip();
back_ground.splice(i, 1);
i--;
}
}
function removeback_ground_position() {
i = back_ground_position.length - 1;
while (i >= 0) {
back_ground_position[i].removeMovieClip();
back_ground_position.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function pushDeadbody() {
i = dead_body.length - 1;
while (i >= 0) {
if (player._x > 410) {
dead_body[i]._x = dead_body[i]._x - 5;
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (player._x > 410) {
enemy[i]._x = enemy[i]._x - 5;
}
i--;
}
}
function addenemy() {
if (enemyNumber < 3) {
if ((releaseenemy + releNum) < getTimer()) {
releaseenemy = getTimer();
if (pplKilled < 11) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(40);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 11) && (pplKilled < 31)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(3);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(70);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 31) && (pplKilled < 51)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(4);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(60);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
}
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
hit_sound.start();
if (addBlood == 5) {
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
}
addBlood++;
pplKilled++;
hit_sound.start();
if (type[i] == 0) {
randomNumber++;
deadbod2 = _root.attachMovie("scoutDead", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 1) {
randomNumber++;
deadbod2 = _root.attachMovie("slashup", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 2) {
randomNumber++;
deadbod2 = _root.attachMovie("e2d", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 3) {
randomNumber++;
deadbod2 = _root.attachMovie("ni2", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 4) {
randomNumber++;
deadbod2 = _root.attachMovie("ed4", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == "boss") {
addblood = 0;
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
bossKilled = true;
randomNumber++;
deadbod2 = _root.attachMovie("sdeath2", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
enemiesdead++;
showenemykills._x = 0;
removeect = 45;
removeec = true;
score = score + 30;
enemyNumber--;
randomNumber++;
up = _root.attachMovie("plus", "plus" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
randomNumber++;
death_mc = _root.attachMovie("dead4", "dead4" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
death_mc._xscale = 30;
death_mc._yscale = 30;
enemy[i].removeMovieClip();
enemy.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
hypArray.splice(i, 1);
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._xscale = 80;
enemy[i]._yscale = 80;
if (player._x < enemy[i]._x) {
enemy[i]._xscale = -80;
} else {
enemy[i]._xscale = 80;
}
if (enemy[i].hitTest(strong_smoke_mc)) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - 0.5;
}
if (type[i] == 0) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower / 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 1) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - enemyPower;
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 2) {
if (hypArray[i] < 250) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 3) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 4);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
if (type[i] == 4) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 10;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 111) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + ((((endX - enemy[i]._x) + 75) / enemySpeed) * 1.5);
}
}
}
if (type[i] == "boss") {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 6);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 113) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
bossBeingHit++;
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((enemy[i]._y == 450) && (player._y < 300)) {
findPlayer++;
}
if ((enemy[i]._y < 300) && (player._y == 450)) {
findPlayer++;
}
if (findPlayer > 80) {
if (player._y == 450) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
findPlayer = 0;
}
if (player._y < 300) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 278;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
findPlayer = 0;
}
}
if (swordThrow) {
if (enemy[i]._y == 278) {
if (bossBeingHit > 1) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = player._x + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
}
if (!swordThrow) {
if (bossBeingHit > 10) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
i--;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee1");
} else {
player.gotoAndStop("melee1");
}
if (is_attacking == 11) {
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee2");
} else {
player.gotoAndStop("melee2");
}
if (is_attacking == 17) {
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee3");
} else {
player.gotoAndStop("melee3");
}
if (is_attacking == 24) {
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local2 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local2 = player.transform.colorTransform;
_local2.rgb = 4294967295;
player.transform.colorTransform = _local2;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (player._x > 410) {
enemy_smoke_mc._x = enemy_smoke_mc._x - 5;
strong_smoke_mc._x = strong_smoke_mc._x - 5;
playerFade._x = playerFade._x - 5;
smoke_mc._x = smoke_mc._x - 5;
player._x = 410;
}
if (player._x < 40) {
player._x = 40;
}
if (!moveDown) {
if (!jump) {
if (!swordThrow) {
if (!bunnyPush) {
if (!attacking) {
if (!sliding) {
if (!running) {
player.gotoAndStop("idle");
}
if (running) {
player.gotoAndStop("run");
}
}
}
}
}
}
}
if (Key.isDown(68)) {
if (canAttack) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!attacking) {
bunnyPush = true;
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (!moveDown) {
if (!sliding) {
if (!swordThrow) {
if (!bunnyPush) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
if (bunnyPush) {
if (!jump) {
playerSpeed = 0;
player.gotoAndStop("forcepush");
} else {
player.gotoAndStop("forcepushair");
}
if (bunnyPushTimer == 0) {
shake++;
boom_sound.start();
}
bunnyPushTimer++;
if (bunnyPushTimer == 13) {
if (((playerType == "normal") or (playerType == "assassin")) or (playerType == "white")) {
energy = energy - 50;
}
if (playerType == "rage") {
energy = energy - 25;
}
playerSpeed = 10;
bunnyPush = false;
bunnyPushTimer = 0;
}
}
if (sliding) {
if (slidingTimer == 0) {
swing_sound.start();
randomNumber++;
if (playerType == "normal") {
playerFade = _root.attachMovie("playerFade", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "assassin") {
playerFade = _root.attachMovie("playerFade2", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "white") {
playerFade = _root.attachMovie("playerFade3", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "rage") {
playerFade = _root.attachMovie("playerFade4", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
playerFade._xscale = player._xscale;
playerFade._yscale = player._yscale;
randomNumber++;
smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
smoke_mc._xscale = player._xscale;
smoke_mc._yscale = player._yscale;
}
slidingTimer++;
player.gotoAndStop("slide");
if (slidingRight) {
player._x = player._x + (dashSpeed * 8);
}
if (slidingLeft) {
player._x = player._x - (dashSpeed * 8);
}
if (slidingTimer == 3) {
dashSpeed = 0;
}
if (slidingTimer == 10) {
energy = energy - 15;
dashSpeed = 10;
smack = 0;
sliding = false;
slidingTimer = 0;
}
}
if (swordThrow) {
player.gotoAndStop("throw");
swordThrowTimer++;
if (swordThrowTimer == 25) {
energy = energy - 25;
swordThrowTimer = 0;
swordThrow = false;
}
}
if (moveDown) {
player.gotoAndStop("downmove");
if (moveDownTimer == 0) {
acid_sound.start();
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
if (moveDownTimer == 17) {
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
moveDownTimer++;
if (moveDownTimer == 18) {
energy = energy - 30;
moveDownTimer = 0;
moveDown = false;
}
}
if (Key.isDown(83)) {
if (canAttack) {
if (!jump) {
if (!attacking) {
if (!bunnyPush) {
if (player._y == 450) {
if (!moveDown) {
swordThrow = true;
}
} else {
moveDown = true;
}
}
}
}
}
}
if (canAttack) {
if (!jump) {
if (!moveDown) {
if (!swordThrow) {
if (!attacking) {
if (!bunnyPush) {
if (Key.isDown(39) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = true;
slidingLeft = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(39)) {
hit2 = false;
}
if (Key.isDown(37) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = false;
slidingLeft = true;
}
lastPressB = getTimer();
} else if (!Key.isDown(37)) {
hit3 = false;
}
}
}
}
}
}
}
if (Key.isDown(38)) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!bunnyPush) {
if (onfloor) {
if (!attacking) {
player.gotoAndStop("jump");
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
}
}
}
}
}
}
if (Key.isDown(40)) {
if (!moveDown) {
dropping = true;
}
}
if (dropping) {
droppingTimer++;
if (droppingTimer > 15) {
dropping = false;
droppingTimer = 0;
}
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (!swordThrow) {
if (!moveDown) {
if (Key.isDown(39)) {
player._xscale = 65;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -65;
player._x = player._x - playerSpeed;
running = true;
}
}
}
player._y = player._y + yspeed;
if (player._y > 450) {
dropping = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 450;
} else {
yspeed = yspeed + (gravity * 2);
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
j--;
}
i--;
}
}
function backgroundMovement() {
i = back_ground.length - 1;
while (i >= 0) {
if (back_ground[i]._x == -800) {
back_ground[i]._x = 800;
}
if (player._x > 410) {
if (back_ground_position[i] == 0) {
back_ground[i]._x = back_ground[i]._x - 2;
}
if (back_ground_position[i] == 1) {
back_ground[i]._x = back_ground[i]._x - 5;
}
}
i--;
}
}
function blockActions() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i]._alpha = 0;
if ((!player.hitTest(blocks[i])) && ((!player._y) == 450)) {
onfloor = false;
}
if (player._x > 410) {
blocks[i]._x = blocks[i]._x - 5;
}
if (blocks[i]._x < -640) {
blocks[i]._x = 640;
}
if (!swordThrow) {
if (player.hitTest(blocks[i])) {
if (player._y > blocks[i]._y) {
if (!dropping) {
player._y = blocks[i]._y;
yspeed = 0;
jump = false;
onfloor = true;
}
}
}
}
i--;
}
}
function enemyOnStage() {
if (pplKilled < 50) {
anyOneAbout = true;
} else {
anyOneAbout = false;
}
if (!anyOneAbout) {
releaseBoss++;
if (releaseBoss == 100) {
bossKilled = true;
}
}
if (anyOneAbout) {
releaseBoss = 0;
}
if (releaseBoss > 100) {
releaseBoss = 101;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 9;
_root._x = _root._x - 9;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 6;
_root._y = _root._y + 6;
}
}
function playersEnergyBar() {
energy = energy + 0.5;
if (energy < 0) {
canAttack = false;
energy = 0;
}
if (energy > 100) {
canAttack = true;
energy = 100;
}
ninjaBar._xscale = energy;
if (!canAttack) {
ninjaBar.gotoAndStop("normal");
} else {
ninjaBar.gotoAndStop("max");
}
}
stop();
stage = 4;
_root.attachMovie("stage", "stage", _root.getNextHighestDepth(), {_x:-100, _y:-50});
if (playerType == "normal") {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "assassin") {
_root.attachMovie("player2", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "white") {
_root.attachMovie("player3", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "rage") {
_root.attachMovie("player4", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:39, _y:20});
_root.attachMovie("ninjaBar", "ninjaBar", _root.getNextHighestDepth(), {_x:39, _y:38});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:37, _y:20});
acid_sound = new Sound();
acid_sound.attachSound("acidddd");
boom_sound = new Sound();
boom_sound.attachSound("zuum");
swing_sound = new Sound();
swing_sound.attachSound("swing");
hit_sound = new Sound();
hit_sound.attachSound("enemy hit.mp3");
player._yscale = 65;
player._xscale = 65;
addFirstCombo = false;
addSecondCombo = false;
addThirdCombo = false;
findPlayer = 0;
Pause = 0;
canAttack = true;
energy = 100;
enemyPower = 0.5;
playerHealth = 100;
wait = 0;
placeTrans = true;
bossKilled = false;
goTimer = 0;
bossBeingHit = 0;
releaseBoss = 0;
bunnyPush = false;
bunnyPushTimer = 0;
moveDown = false;
moveDownTimer = 0;
swordThrow = false;
swordThrowTimer = 0;
addBlood = 0;
shake = 0;
dropping = false;
enemySpeed = 30;
dashSpeed = 10;
jump = false;
jumpamount = 35;
gravity = 2;
yspeed = 0;
playerPower = 5;
onfloor = true;
pressHack = 0;
sliding = false;
slidingTimer = 0;
addEffect = 0;
clicks = 0;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
hitPlayer = 0;
hitTimer = 0;
randomNumber = 0;
releaseenemy = 0;
enemyNumber = 0;
releNum = 500;
pplKilled = 0;
anyOneAbout = false;
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var back_ground = new Array();
var back_ground_position = new Array();
blocks.push(block1, block2);
back_ground.push(backdrop, backdrop_tile_2, foreGround, foreGround_tile_2, stick1, stick2);
back_ground_position.push(0, 0, 1, 1, 1, 1);
player.onEnterFrame = function () {
if (addBlood > 10) {
addBlood = 0;
}
if (bossKilled) {
wait++;
if (wait == 110) {
if (placeTrans) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
placeTrans = false;
}
}
}
if (!placeTrans) {
goTimer++;
if (goTimer == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
if (playerHealth < 1) {
removeall();
stopAllSounds();
gotoAndStop ("gameOver");
}
barBoarder.lol.text = pplKilled;
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
playersEnergyBar();
enemyOnStage();
enemyMovement();
enemyHealthReachesZero();
if (Pause > 90) {
addenemy();
}
Pause++;
if (Pause > 90) {
Pause == 91;
}
noOverLap();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
pushDeadbody();
pushenemy();
shaker();
blockActions();
backgroundMovement();
stick1.swapDepths(_root.getNextHighestDepth());
stick2.swapDepths(_root.getNextHighestDepth());
splatter.swapDepths(_root.getNextHighestDepth());
enterBoss.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
};
Frame 20
stop();
stopAllSounds();
player.removeMovieClip();
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
normal.onEnterFrame = function () {
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
stopAllSounds();
nextFrame();
}
}
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
ninja.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
white.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
fuming.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
} else {
this.gotoAndStop("down");
}
};
normal.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "normal";
canSelect = false;
}
};
ninja.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "assassin";
canSelect = false;
}
};
white.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "white";
canSelect = false;
}
};
fuming.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerType = "rage";
canSelect = false;
}
};
Frame 21
function removeall() {
ninjaBar.removeMovieClip();
enterBoss.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
removeblocks();
removeDead_body();
removeType();
removeHypArray();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeEnemyAttackingTimer();
removeEnemyAttacking();
removeEnemy();
removeback_ground();
removeback_ground_position();
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removeback_ground() {
i = back_ground.length - 1;
while (i >= 0) {
back_ground[i].removeMovieClip();
back_ground.splice(i, 1);
i--;
}
}
function removeback_ground_position() {
i = back_ground_position.length - 1;
while (i >= 0) {
back_ground_position[i].removeMovieClip();
back_ground_position.splice(i, 1);
i--;
}
}
function removeDead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeHypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function pushDeadbody() {
i = dead_body.length - 1;
while (i >= 0) {
if (player._x > 410) {
dead_body[i]._x = dead_body[i]._x - 5;
}
i--;
}
}
function pushenemy() {
i = enemy.length - 1;
while (i >= 0) {
if (player._x > 410) {
enemy[i]._x = enemy[i]._x - 5;
}
i--;
}
}
function addenemy() {
if (enemyNumber < 3) {
if ((releaseenemy + releNum) < getTimer()) {
releaseenemy = getTimer();
if (pplKilled < 25) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("nii2", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(3);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(70);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
if ((pplKilled > 25) && (pplKilled < 51)) {
enemyNumber++;
randomNumber++;
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:700});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:700});
}
} else {
heightChoice = (choice = Math.round(Math.random() * 1) + 0);
if (heightChoice == 0) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:-100});
}
if (heightChoice == 1) {
enemy_ = _root.attachMovie("enemy4", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:278, _x:-100});
}
}
depths.push(enemy_);
enemy.push(enemy_);
type.push(4);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(60);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
}
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
hit_sound.start();
if (addBlood == 5) {
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
}
addBlood++;
pplKilled++;
hit_sound.start();
if (type[i] == 0) {
randomNumber++;
deadbod2 = _root.attachMovie("scoutDead", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 1) {
randomNumber++;
deadbod2 = _root.attachMovie("slashup", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 2) {
randomNumber++;
deadbod2 = _root.attachMovie("e2d", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 3) {
randomNumber++;
deadbod2 = _root.attachMovie("ni2", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == 4) {
randomNumber++;
deadbod2 = _root.attachMovie("ed4", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
if (type[i] == "boss") {
addblood = 0;
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
bossKilled = true;
randomNumber++;
deadbod2 = _root.attachMovie("sdeath3", "saberside2" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
deadbod2._yscale = 80;
deadbod2._xscale = enemy[i]._xscale;
depths.push(deadbod2);
dead_body.push(deadbod2);
}
enemiesdead++;
showenemykills._x = 0;
removeect = 45;
removeec = true;
score = score + 30;
enemyNumber--;
randomNumber++;
up = _root.attachMovie("plus", "plus" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
randomNumber++;
death_mc = _root.attachMovie("dead4", "dead4" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 40});
death_mc._xscale = 30;
death_mc._yscale = 30;
enemy[i].removeMovieClip();
enemy.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
hypArray.splice(i, 1);
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._xscale = 80;
enemy[i]._yscale = 80;
if (player._x < enemy[i]._x) {
enemy[i]._xscale = -80;
} else {
enemy[i]._xscale = 80;
}
if (enemy[i].hitTest(strong_smoke_mc)) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - 0.5;
}
if (type[i] == 0) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower / 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 1) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - enemyPower;
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 110) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 2) {
if (hypArray[i] < 250) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 2);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
if (!invisible) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
} else {
enemy[i].gotoAndStop("idle");
}
}
}
}
if (type[i] == 3) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 4);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 107) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
if (type[i] == 4) {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 1.5);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 10;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 111) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + ((((endX - enemy[i]._x) + 75) / enemySpeed) * 1.5);
}
}
}
if (type[i] == "boss") {
if (hypArray[i] < 200) {
if (enemyAttacking[i] == 1) {
if (enemy[i].hitTest(player)) {
if (!bunnyPush) {
invisible = false;
player._alpha = 100;
hitPlayer = 1;
playerHealth = playerHealth - (enemyPower * 4);
}
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 60) {
enemy[i]._alpha = enemy[i]._alpha - 5;
}
if (enemyAttackingTimer[i] > 100) {
enemy[i]._alpha = 100;
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 120) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
}
if (enemyAttacking[i] == 0) {
if (enemy[i].hitTest(player)) {
if ((((attacking or sliding) or bunnyPush) or swordThrow) or moveDown) {
if (hypArray[i] < 150) {
bossBeingHit++;
enemy[i]._alpha = 100;
hit[i] = 1;
enemyHealth[i] = enemyHealth[i] - playerPower;
}
}
}
if (hit[i] == 1) {
if (enemy[i]._xscale == -80) {
enemy[i]._x = enemy[i]._x + 2;
} else {
enemy[i]._x = enemy[i]._x - 2;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
if (smack == 0) {
smack = 1;
}
damagedTimer[i]++;
if (damagedTimer[i] == 15) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if ((enemy[i]._y == 450) && (player._y < 300)) {
findPlayer++;
}
if ((enemy[i]._y < 300) && (player._y == 450)) {
findPlayer++;
}
if (findPlayer > 80) {
if (player._y == 450) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
findPlayer = 0;
}
if (player._y < 300) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 278;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
findPlayer = 0;
}
}
if (swordThrow) {
if (enemy[i]._y == 278) {
if (bossBeingHit > 1) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._y = 450;
enemy[i]._x = player._x + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
}
if (!swordThrow) {
if (bossBeingHit > 10) {
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
enemy[i]._x = Math.round(Math.random() * 450) + 100;
acid_sound.start();
randomNumber++;
enemy_smoke_mc = _root.attachMovie("acidsmoke2", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
enemy_smoke_mc._xscale = player._xscale;
enemy_smoke_mc._yscale = player._yscale;
bossBeingHit = 0;
}
}
if (hit[i] == 0) {
enemy[i].gotoAndStop("run");
endX = _root.player._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
}
}
}
i--;
}
}
function canAddPoint() {
if (clicks == 0) {
canAddComboPoint = true;
} else {
canAddComboPoint = false;
}
}
function runAttackTimer() {
if (attacking) {
if (!jump) {
playerSpeed = 1;
}
is_attacking++;
} else {
playerSpeed = 10;
}
}
function confirmAttacking() {
if (clicks > 0) {
attacking = true;
}
}
function comboOne() {
if (!addSecondCombo) {
if (!addThirdCombo) {
if (addFirstCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee1");
} else {
player.gotoAndStop("melee1");
}
if (is_attacking == 11) {
addFirstCombo = false;
if (clicks == 1) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 1) {
smack = 0;
addSecondCombo = true;
}
}
}
}
}
}
}
function comboTwo() {
if (!addFirstCombo) {
if (!addThirdCombo) {
if (addSecondCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee2");
} else {
player.gotoAndStop("melee2");
}
if (is_attacking == 17) {
addSecondCombo = false;
if (clicks == 2) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 2) {
smack = 0;
addThirdCombo = true;
}
}
}
}
}
}
}
function comboThree() {
if (!addFirstCombo) {
if (!addSecondCombo) {
if (addThirdCombo) {
if (attacking) {
if (jump) {
player.gotoAndStop("amelee3");
} else {
player.gotoAndStop("melee3");
}
if (is_attacking == 24) {
addThirdCombo = false;
if (clicks == 3) {
smack = 0;
clicks = 0;
is_attacking = 0;
attacking = false;
}
if (clicks > 3) {
smack = 0;
clicks = 1;
is_attacking = 0;
addFirstCombo = true;
}
}
}
}
}
}
}
function playerMovement() {
if (hitPlayer == 0) {
var _local2 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local2 = player.transform.colorTransform;
_local2.rgb = 4294967295;
player.transform.colorTransform = _local2;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (player._x > 410) {
enemy_smoke_mc._x = enemy_smoke_mc._x - 5;
strong_smoke_mc._x = strong_smoke_mc._x - 5;
playerFade._x = playerFade._x - 5;
smoke_mc._x = smoke_mc._x - 5;
player._x = 410;
}
if (player._x < 40) {
player._x = 40;
}
if (!moveDown) {
if (!jump) {
if (!swordThrow) {
if (!bunnyPush) {
if (!attacking) {
if (!sliding) {
if (!running) {
player.gotoAndStop("idle");
}
if (running) {
player.gotoAndStop("run");
}
}
}
}
}
}
}
if (Key.isDown(68)) {
if (canAttack) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!attacking) {
bunnyPush = true;
}
}
}
}
}
}
if (!Key.isDown(65)) {
pressHack = 0;
}
if (Key.isDown(65)) {
if (!moveDown) {
if (!sliding) {
if (!swordThrow) {
if (!bunnyPush) {
if (pressHack == 0) {
swing_sound.start();
pressHack = 1;
if (canAddComboPoint) {
addFirstCombo = true;
}
clicks++;
}
}
}
}
}
}
if (bunnyPush) {
if (!jump) {
playerSpeed = 0;
player.gotoAndStop("forcepush");
} else {
player.gotoAndStop("forcepushair");
}
if (bunnyPushTimer == 0) {
shake++;
boom_sound.start();
}
bunnyPushTimer++;
if (bunnyPushTimer == 13) {
if (((playerType == "normal") or (playerType == "assassin")) or (playerType == "white")) {
energy = energy - 50;
}
if (playerType == "rage") {
energy = energy - 25;
}
playerSpeed = 10;
bunnyPush = false;
bunnyPushTimer = 0;
}
}
if (sliding) {
if (slidingTimer == 0) {
swing_sound.start();
randomNumber++;
if (playerType == "normal") {
playerFade = _root.attachMovie("playerFade", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "assassin") {
playerFade = _root.attachMovie("playerFade2", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "white") {
playerFade = _root.attachMovie("playerFade3", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
if (playerType == "rage") {
playerFade = _root.attachMovie("playerFade4", "playerFade" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
}
playerFade._xscale = player._xscale;
playerFade._yscale = player._yscale;
randomNumber++;
smoke_mc = _root.attachMovie("smoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
smoke_mc._xscale = player._xscale;
smoke_mc._yscale = player._yscale;
}
slidingTimer++;
player.gotoAndStop("slide");
if (slidingRight) {
player._x = player._x + (dashSpeed * 8);
}
if (slidingLeft) {
player._x = player._x - (dashSpeed * 8);
}
if (slidingTimer == 3) {
dashSpeed = 0;
}
if (slidingTimer == 10) {
energy = energy - 15;
dashSpeed = 10;
smack = 0;
sliding = false;
slidingTimer = 0;
}
}
if (swordThrow) {
player.gotoAndStop("throw");
swordThrowTimer++;
if (swordThrowTimer == 25) {
energy = energy - 25;
swordThrowTimer = 0;
swordThrow = false;
}
}
if (moveDown) {
player.gotoAndStop("downmove");
if (moveDownTimer == 0) {
acid_sound.start();
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
if (moveDownTimer == 17) {
randomNumber++;
strong_smoke_mc = _root.attachMovie("acidsmoke", "smoke" + randomNumber, _root.getNextHighestDepth(), {_x:player._x, _y:player._y});
strong_smoke_mc._xscale = player._xscale;
strong_smoke_mc._yscale = player._yscale;
}
moveDownTimer++;
if (moveDownTimer == 18) {
energy = energy - 30;
moveDownTimer = 0;
moveDown = false;
}
}
if (Key.isDown(83)) {
if (canAttack) {
if (!jump) {
if (!attacking) {
if (!bunnyPush) {
if (player._y == 450) {
if (!moveDown) {
swordThrow = true;
}
} else {
moveDown = true;
}
}
}
}
}
}
if (canAttack) {
if (!jump) {
if (!moveDown) {
if (!swordThrow) {
if (!attacking) {
if (!bunnyPush) {
if (Key.isDown(39) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = true;
slidingLeft = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(39)) {
hit2 = false;
}
if (Key.isDown(37) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
swing_sound.start();
sliding = true;
slidingRight = false;
slidingLeft = true;
}
lastPressB = getTimer();
} else if (!Key.isDown(37)) {
hit3 = false;
}
}
}
}
}
}
}
if (Key.isDown(38)) {
if (!moveDown) {
if (!swordThrow) {
if (!sliding) {
if (!bunnyPush) {
if (onfloor) {
if (!attacking) {
player.gotoAndStop("jump");
}
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
}
}
}
}
}
}
if (Key.isDown(40)) {
if (!moveDown) {
dropping = true;
}
}
if (dropping) {
droppingTimer++;
if (droppingTimer > 15) {
dropping = false;
droppingTimer = 0;
}
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (!swordThrow) {
if (!moveDown) {
if (Key.isDown(39)) {
player._xscale = 65;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -65;
player._x = player._x - playerSpeed;
running = true;
}
}
}
player._y = player._y + yspeed;
if (player._y > 450) {
dropping = false;
onfloor = true;
jump = false;
yspeed = 0;
player._y = 450;
} else {
yspeed = yspeed + (gravity * 2);
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
j--;
}
i--;
}
}
function backgroundMovement() {
i = back_ground.length - 1;
while (i >= 0) {
if (back_ground[i]._x == -800) {
back_ground[i]._x = 800;
}
if (player._x > 410) {
if (back_ground_position[i] == 0) {
back_ground[i]._x = back_ground[i]._x - 2;
}
if (back_ground_position[i] == 1) {
back_ground[i]._x = back_ground[i]._x - 5;
}
}
i--;
}
}
function blockActions() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i]._alpha = 0;
if ((!player.hitTest(blocks[i])) && ((!player._y) == 450)) {
onfloor = false;
}
if (player._x > 410) {
blocks[i]._x = blocks[i]._x - 5;
}
if (blocks[i]._x < -640) {
blocks[i]._x = 640;
}
if (!swordThrow) {
if (player.hitTest(blocks[i])) {
if (player._y > blocks[i]._y) {
if (!dropping) {
player._y = blocks[i]._y;
yspeed = 0;
jump = false;
onfloor = true;
}
}
}
}
i--;
}
}
function enemyOnStage() {
if (atBoss) {
anyOneAbout = false;
}
if (!atBoss) {
if (pplKilled < 50) {
anyOneAbout = true;
} else {
anyOneAbout = false;
}
}
if (!anyOneAbout) {
releaseBoss++;
if (releaseBoss == 100) {
atBoss = true;
_root.attachMovie("enterBoss3", "enterBoss", _root.getNextHighestDepth());
enemy_ = _root.attachMovie("sguy3", "enemy1" + randomNumber, _root.getNextHighestDepth(), {_y:450, _x:1700});
depths.push(enemy_);
enemy.push(enemy_);
type.push("boss");
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(1500);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
}
}
if (anyOneAbout) {
releaseBoss = 0;
}
if (releaseBoss > 100) {
releaseBoss = 101;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 9;
_root._x = _root._x - 9;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 6;
_root._y = _root._y + 6;
}
}
function playersEnergyBar() {
energy = energy + 0.5;
if (energy < 0) {
canAttack = false;
energy = 0;
}
if (energy > 100) {
canAttack = true;
energy = 100;
}
ninjaBar._xscale = energy;
if (!canAttack) {
ninjaBar.gotoAndStop("normal");
} else {
ninjaBar.gotoAndStop("max");
}
}
stop();
stage = 5;
_root.attachMovie("stage", "stage", _root.getNextHighestDepth(), {_x:-100, _y:-50});
if (playerType == "normal") {
playerPower = 5;
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "assassin") {
playerPower = 5;
_root.attachMovie("player2", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "white") {
playerPower = 5;
_root.attachMovie("player3", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerType == "rage") {
playerPower = 8;
_root.attachMovie("player4", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:39, _y:20});
_root.attachMovie("ninjaBar", "ninjaBar", _root.getNextHighestDepth(), {_x:39, _y:38});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:37, _y:20});
acid_sound = new Sound();
acid_sound.attachSound("acidddd");
boom_sound = new Sound();
boom_sound.attachSound("zuum");
swing_sound = new Sound();
swing_sound.attachSound("swing");
hit_sound = new Sound();
hit_sound.attachSound("enemy hit.mp3");
player._yscale = 65;
player._xscale = 65;
addFirstCombo = false;
addSecondCombo = false;
addThirdCombo = false;
findPlayer = 0;
Pause = 0;
canAttack = true;
energy = 100;
enemyPower = 0.5;
playerHealth = 100;
wait = 0;
placeTrans = true;
bossKilled = false;
goTimer = 0;
bossBeingHit = 0;
releaseBoss = 0;
bunnyPush = false;
bunnyPushTimer = 0;
moveDown = false;
moveDownTimer = 0;
swordThrow = false;
swordThrowTimer = 0;
addBlood = 0;
shake = 0;
dropping = false;
enemySpeed = 30;
dashSpeed = 10;
jump = false;
jumpamount = 35;
gravity = 2;
yspeed = 0;
onfloor = true;
pressHack = 0;
sliding = false;
slidingTimer = 0;
addEffect = 0;
clicks = 0;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
playerSpeed = 10;
is_attacking = 0;
smack = 0;
hitPlayer = 0;
hitTimer = 0;
randomNumber = 0;
releaseenemy = 0;
enemyNumber = 0;
releNum = 500;
pplKilled = 0;
anyOneAbout = false;
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var back_ground = new Array();
var back_ground_position = new Array();
blocks.push(block1, block2);
back_ground.push(backdrop, backdrop_tile_2, foreGround, foreGround_tile_2);
back_ground_position.push(0, 0, 1, 1);
player.onEnterFrame = function () {
if (addBlood > 10) {
addBlood = 0;
}
if (bossKilled) {
wait++;
if (wait == 110) {
if (placeTrans) {
_root.attachMovie("trans", "trans", _root.getNextHighestDepth());
placeTrans = false;
}
}
}
if (!placeTrans) {
goTimer++;
if (goTimer == 27) {
removeall();
stopAllSounds();
nextFrame();
}
}
if (playerHealth < 1) {
removeall();
stopAllSounds();
gotoAndStop ("gameOver");
}
barBoarder.lol.text = pplKilled;
healthBar._xscale = playerHealth;
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
playersEnergyBar();
enemyOnStage();
enemyMovement();
enemyHealthReachesZero();
if (Pause > 90) {
if (!atBoss) {
addenemy();
}
}
Pause++;
if (Pause > 90) {
Pause == 91;
}
noOverLap();
playerMovement();
comboOne();
comboTwo();
comboThree();
runAttackTimer();
canAddPoint();
confirmAttacking();
pushDeadbody();
pushenemy();
shaker();
blockActions();
backgroundMovement();
stick1.swapDepths(_root.getNextHighestDepth());
stick2.swapDepths(_root.getNextHighestDepth());
splatter.swapDepths(_root.getNextHighestDepth());
enterBoss.swapDepths(_root.getNextHighestDepth());
trans.swapDepths(_root.getNextHighestDepth());
};
Frame 22
player.removeMovieClip();
atBoss = false;
Frame 23
stopAllSounds();
stop();
gotoAndStop ("title");
Frame 24
gamename = "just_a_bunny";
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
hostingdomain = real_domain[0];
if (hostingdomain == "") {
hostingdomain = "unknown";
}
savedomain1 = "gamedev.dev.spilgames.com";
savedomain2 = "www8.agame.com";
if ((hostingdomain == savedomain1) || (hostingdomain == savedomain2)) {
spilnetwerk = "internal";
} else {
spilnetwerk = "external";
}
_root.localization_url1 = (((("http://www.a10.com/?utm_medium=brandedgames_" + spilnetwerk) + "&utm_campaign=") + gamename) + "&utm_source=") + hostingdomain;
_root.localization_language_nr = 1;
_root.localization_branding_nr = 46;
_root.localization_portal = "teen";
if (_root.localization_portal == "game_com_cn") {
this.mainscreen_moregames.onRelease = function () {
getURL (_root.localization_url1, "_blank");
};
} else {
this.mainscreen_moregames.onRelease = function () {
getURL (_root.localization_url1 + "&utm_content=button_mainscreen_moregames", "_blank");
};
}
stop();
quit = false;
toTitleTimer = 0;
player.removeMovieClip();
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
rty.onRelease = function () {
if (!quit) {
if (stage == 1) {
gotoAndStop ("stageOne");
}
if (stage == 2) {
gotoAndStop ("stageTwo");
}
if (stage == 3) {
gotoAndStop ("stageThree");
}
if (stage == 4) {
gotoAndStop ("stageFour");
}
if (stage == 5) {
gotoAndStop ("stageFive");
}
}
};
qt.onRelease = function () {
quit = true;
};
ftb.onEnterFrame = function () {
ftb.swapDepths(_root.getNextHighestDepth());
if (qt.hitTest(_xmouse, _ymouse, true)) {
qt.gotoAndStop("over");
} else {
qt.gotoAndStop("down");
}
if (rty.hitTest(_xmouse, _ymouse, true)) {
rty.gotoAndStop("over");
} else {
rty.gotoAndStop("down");
}
if (quit) {
ftb.gotoAndStop("fadeOut");
toTitleTimer++;
if (toTitleTimer > 90) {
gotoAndStop ("title");
}
}
};
Symbol 106 MovieClip Frame 1
gotoAndStop(_root.localization_branding_nr);
Symbol 111 MovieClip Frame 90
Symbol 111 MovieClip Frame 91
stop();
Symbol 114 MovieClip Frame 1
if (_root.localization_portal == "game_com_cn") {
this.logo_intro.onRelease = function () {
getURL (_root.localization_url1, "_blank");
};
} else {
this.logo_intro.onRelease = function () {
getURL (_root.localization_url1 + "&utm_content=logo_intro", "_blank");
};
}
Symbol 114 MovieClip Frame 90
stop();
Symbol 120 MovieClip Frame 89
stop();
Symbol 128 MovieClip Frame 89
stop();
Symbol 131 MovieClip Frame 89
stop();
Symbol 138 MovieClip Frame 39
stop();
Symbol 140 MovieClip Frame 1
_root.stop();
Symbol 140 MovieClip Frame 91
_root.play();
Symbol 141 MovieClip Frame 1
if (_root.localization_portal == "family") {
gotoAndStop (1);
}
if (_root.localization_portal == "tweens") {
gotoAndStop (2);
}
if (_root.localization_portal == "girl") {
gotoAndStop (3);
}
if (_root.localization_portal == "game_com_cn") {
gotoAndStop (4);
}
if (_root.localization_portal == "teen") {
gotoAndStop (5);
}
Symbol 255 MovieClip Frame 15
stop();
Instance of Symbol 259 MovieClip in Symbol 264 MovieClip Frame 1
onClipEvent (load) {
var myBlur = (new flash.filters.BlurFilter());
a = _parent._currentframe;
}
onClipEvent (enterFrame) {
this.gotoAndStop((_parent._currentframe - a) + 1);
myBlur.blurX = Math.floor(_root.main._xscale / 20);
myBlur.blurY = Math.floor(_root.main._xscale / 20);
this.filters = [myBlur];
}
Symbol 269 MovieClip Frame 1
claymore.onEnterFrame = function () {
this._rotation = this._rotation + 55;
};
Symbol 271 MovieClip [player] Frame 1
stop();
Symbol 271 MovieClip [player] Frame 2
stop();
Symbol 271 MovieClip [player] Frame 3
stop();
Symbol 271 MovieClip [player] Frame 4
stop();
Symbol 271 MovieClip [player] Frame 5
stop();
Symbol 271 MovieClip [player] Frame 6
stop();
Symbol 271 MovieClip [player] Frame 7
stop();
Symbol 271 MovieClip [player] Frame 8
stop();
Symbol 271 MovieClip [player] Frame 9
stop();
Symbol 271 MovieClip [player] Frame 10
stop();
Symbol 271 MovieClip [player] Frame 11
stop();
Symbol 271 MovieClip [player] Frame 12
stop();
Symbol 271 MovieClip [player] Frame 13
stop();
Symbol 271 MovieClip [player] Frame 14
stop();
Symbol 271 MovieClip [player] Frame 15
stop();
Symbol 273 MovieClip [playerFade] Frame 11
this.removeMovieClip();
Symbol 275 MovieClip [plus] Frame 30
this.removeMovieClip();
Symbol 299 MovieClip Frame 62
stop();
Symbol 300 MovieClip [smoke] Frame 62
this.removeMovieClip();
Symbol 317 MovieClip [scoutDead] Frame 41
this.removeMovieClip();
Symbol 325 MovieClip Frame 5
stop();
Symbol 327 MovieClip Frame 40
stop();
Symbol 328 MovieClip [scout] Frame 1
stop();
Symbol 328 MovieClip [scout] Frame 2
stop();
Symbol 328 MovieClip [scout] Frame 3
stop();
Symbol 328 MovieClip [scout] Frame 4
stop();
Symbol 329 MovieClip [dead4] Frame 15
this.removeMovieClip();
Symbol 332 MovieClip [slashup] Frame 41
this.removeMovieClip();
Symbol 338 MovieClip Frame 5
stop();
Symbol 339 MovieClip [enemy1] Frame 1
stop();
Symbol 339 MovieClip [enemy1] Frame 2
stop();
Symbol 339 MovieClip [enemy1] Frame 3
stop();
Symbol 339 MovieClip [enemy1] Frame 4
stop();
Symbol 341 MovieClip [e2d] Frame 41
this.removeMovieClip();
Symbol 344 MovieClip Frame 5
stop();
Symbol 345 MovieClip [enemy2] Frame 1
stop();
Symbol 345 MovieClip [enemy2] Frame 2
stop();
Symbol 345 MovieClip [enemy2] Frame 3
stop();
Symbol 345 MovieClip [enemy2] Frame 4
stop();
Symbol 347 MovieClip [ni2] Frame 41
this.removeMovieClip();
Symbol 350 MovieClip Frame 5
stop();
Symbol 351 MovieClip [nii2] Frame 1
stop();
Symbol 351 MovieClip [nii2] Frame 2
stop();
Symbol 351 MovieClip [nii2] Frame 3
stop();
Symbol 353 MovieClip [ed4] Frame 41
this.removeMovieClip();
Symbol 356 MovieClip Frame 5
stop();
Symbol 357 MovieClip [enemy4] Frame 1
stop();
Symbol 357 MovieClip [enemy4] Frame 2
stop();
Symbol 357 MovieClip [enemy4] Frame 3
stop();
Symbol 378 MovieClip Frame 63
stop();
Symbol 387 MovieClip Frame 7
stop();
Symbol 393 MovieClip Frame 5
stop();
Symbol 409 MovieClip Frame 15
stop();
Symbol 412 MovieClip [splatter] Frame 81
this.removeMovieClip();
Symbol 413 MovieClip [acidsmoke] Frame 62
this.removeMovieClip();
Symbol 414 MovieClip [acidsmoke2] Frame 62
this.removeMovieClip();
Symbol 415 MovieClip [sdeath] Frame 41
this.removeMovieClip();
Symbol 417 MovieClip Frame 5
stop();
Symbol 418 MovieClip [sguy] Frame 1
stop();
Symbol 418 MovieClip [sguy] Frame 2
stop();
Symbol 418 MovieClip [sguy] Frame 3
stop();
Symbol 433 MovieClip [trans] Frame 54
this.removeMovieClip();
Symbol 436 MovieClip [healthBar] Frame 1
stop();
Symbol 436 MovieClip [healthBar] Frame 2
stop();
Symbol 450 MovieClip [enterBoss] Frame 90
this.removeMovieClip();
Symbol 455 MovieClip [stage] Frame 90
this.removeMovieClip();
Symbol 457 MovieClip [ninjaBar] Frame 1
stop();
Symbol 457 MovieClip [ninjaBar] Frame 2
stop();
Instance of Symbol 468 MovieClip in Symbol 472 MovieClip Frame 1
onClipEvent (load) {
var myBlur = (new flash.filters.BlurFilter());
a = _parent._currentframe;
}
onClipEvent (enterFrame) {
this.gotoAndStop((_parent._currentframe - a) + 1);
myBlur.blurX = Math.floor(_root.main._xscale / 20);
myBlur.blurY = Math.floor(_root.main._xscale / 20);
this.filters = [myBlur];
}
Instance of Symbol 468 MovieClip in Symbol 473 MovieClip Frame 1
onClipEvent (load) {
var myBlur = (new flash.filters.BlurFilter());
a = _parent._currentframe;
}
onClipEvent (enterFrame) {
this.gotoAndStop((_parent._currentframe - a) + 1);
myBlur.blurX = Math.floor(_root.main._xscale / 20);
myBlur.blurY = Math.floor(_root.main._xscale / 20);
this.filters = [myBlur];
}
Symbol 509 MovieClip Frame 15
stop();
Symbol 512 MovieClip Frame 1
claymore.onEnterFrame = function () {
this._rotation = this._rotation + 55;
};
Symbol 514 MovieClip [player2] Frame 1
stop();
Symbol 514 MovieClip [player2] Frame 2
stop();
Symbol 514 MovieClip [player2] Frame 3
stop();
Symbol 514 MovieClip [player2] Frame 4
stop();
Symbol 514 MovieClip [player2] Frame 5
stop();
Symbol 514 MovieClip [player2] Frame 6
stop();
Symbol 514 MovieClip [player2] Frame 7
stop();
Symbol 514 MovieClip [player2] Frame 8
stop();
Symbol 514 MovieClip [player2] Frame 9
stop();
Symbol 514 MovieClip [player2] Frame 10
stop();
Symbol 514 MovieClip [player2] Frame 11
stop();
Symbol 514 MovieClip [player2] Frame 12
stop();
Symbol 514 MovieClip [player2] Frame 13
stop();
Symbol 514 MovieClip [player2] Frame 14
stop();
Symbol 514 MovieClip [player2] Frame 15
stop();
Symbol 516 MovieClip [playerFade2] Frame 11
this.removeMovieClip();
Instance of Symbol 525 MovieClip in Symbol 527 MovieClip Frame 1
onClipEvent (load) {
var myBlur = (new flash.filters.BlurFilter());
a = _parent._currentframe;
}
onClipEvent (enterFrame) {
this.gotoAndStop((_parent._currentframe - a) + 1);
myBlur.blurX = Math.floor(_root.main._xscale / 20);
myBlur.blurY = Math.floor(_root.main._xscale / 20);
this.filters = [myBlur];
}
Symbol 558 MovieClip Frame 15
stop();
Symbol 561 MovieClip Frame 1
claymore.onEnterFrame = function () {
this._rotation = this._rotation + 55;
};
Symbol 563 MovieClip [player3] Frame 1
stop();
Symbol 563 MovieClip [player3] Frame 2
stop();
Symbol 563 MovieClip [player3] Frame 3
stop();
Symbol 563 MovieClip [player3] Frame 4
stop();
Symbol 563 MovieClip [player3] Frame 5
stop();
Symbol 563 MovieClip [player3] Frame 6
stop();
Symbol 563 MovieClip [player3] Frame 7
stop();
Symbol 563 MovieClip [player3] Frame 8
stop();
Symbol 563 MovieClip [player3] Frame 9
stop();
Symbol 563 MovieClip [player3] Frame 10
stop();
Symbol 563 MovieClip [player3] Frame 11
stop();
Symbol 563 MovieClip [player3] Frame 12
stop();
Symbol 563 MovieClip [player3] Frame 13
stop();
Symbol 563 MovieClip [player3] Frame 14
stop();
Symbol 563 MovieClip [player3] Frame 15
stop();
Symbol 565 MovieClip [playerFade3] Frame 11
this.removeMovieClip();
Symbol 592 MovieClip Frame 15
stop();
Symbol 595 MovieClip Frame 1
claymore.onEnterFrame = function () {
this._rotation = this._rotation + 55;
};
Symbol 597 MovieClip [player4] Frame 1
stop();
Symbol 597 MovieClip [player4] Frame 2
stop();
Symbol 597 MovieClip [player4] Frame 3
stop();
Symbol 597 MovieClip [player4] Frame 4
stop();
Symbol 597 MovieClip [player4] Frame 5
stop();
Symbol 597 MovieClip [player4] Frame 6
stop();
Symbol 597 MovieClip [player4] Frame 7
stop();
Symbol 597 MovieClip [player4] Frame 8
stop();
Symbol 597 MovieClip [player4] Frame 9
stop();
Symbol 597 MovieClip [player4] Frame 10
stop();
Symbol 597 MovieClip [player4] Frame 11
stop();
Symbol 597 MovieClip [player4] Frame 12
stop();
Symbol 597 MovieClip [player4] Frame 13
stop();
Symbol 597 MovieClip [player4] Frame 14
stop();
Symbol 597 MovieClip [player4] Frame 15
stop();
Symbol 599 MovieClip [playerFade4] Frame 11
this.removeMovieClip();
Symbol 600 MovieClip [flash] Frame 8
this.removeMovieClip();
Symbol 603 MovieClip [enterBoss2] Frame 90
this.removeMovieClip();
Symbol 605 MovieClip [sdeath2] Frame 41
this.removeMovieClip();
Symbol 607 MovieClip Frame 15
stop();
Symbol 609 MovieClip Frame 5
stop();
Symbol 610 MovieClip [sguy2] Frame 1
stop();
Symbol 610 MovieClip [sguy2] Frame 2
stop();
Symbol 610 MovieClip [sguy2] Frame 3
stop();
Symbol 613 MovieClip [enterBoss3] Frame 90
this.removeMovieClip();
Symbol 615 MovieClip [sdeath3] Frame 41
this.removeMovieClip();
Symbol 624 MovieClip Frame 5
stop();
Symbol 625 MovieClip [sguy3] Frame 1
stop();
Symbol 625 MovieClip [sguy3] Frame 2
stop();
Symbol 625 MovieClip [sguy3] Frame 3
stop();
Symbol 633 MovieClip Frame 5
stop();
Symbol 638 MovieClip Frame 10
stop();
Symbol 641 MovieClip Frame 5
stop();
Symbol 650 MovieClip Frame 30
stop();
Symbol 651 MovieClip Frame 1
_root.stop();
Symbol 651 MovieClip Frame 175
_root.play();
stopAllSounds();
Symbol 660 MovieClip Frame 50
stop();
Symbol 664 MovieClip Frame 50
stop();
Symbol 667 MovieClip Frame 50
stop();
Symbol 671 MovieClip Frame 190
stop();
Symbol 682 MovieClip Frame 90
stop();
Symbol 705 MovieClip Frame 1
_root.stop();
Symbol 705 MovieClip Frame 299
_root.play();
Symbol 714 MovieClip Frame 1
stop();
Symbol 714 MovieClip Frame 2
stop();
Symbol 733 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 749 MovieClip Frame 1
stop();
Symbol 749 MovieClip Frame 2
stop();
Symbol 754 MovieClip Frame 1
stop();
Symbol 754 MovieClip Frame 2
stop();
Symbol 758 MovieClip Frame 1
stop();
Symbol 758 MovieClip Frame 2
stop();
Symbol 762 MovieClip Frame 1
stop();
Symbol 762 MovieClip Frame 2
stop();
Symbol 807 MovieClip Frame 15
stop();
Symbol 810 MovieClip Frame 300
stop();
Symbol 817 MovieClip Frame 90
stop();
Symbol 818 MovieClip Frame 150
stop();
Symbol 829 MovieClip Frame 60
stop();
Symbol 830 MovieClip Frame 60
stop();
Symbol 854 MovieClip Frame 145
stop();
Symbol 860 MovieClip Frame 11
stop();
stop();
Symbol 862 MovieClip Frame 290
stop();
Symbol 863 MovieClip Frame 1
_root.stop();
Symbol 863 MovieClip Frame 1000
_root.play();
Symbol 898 MovieClip Frame 30
stop();
Symbol 911 MovieClip Frame 90
stop();
Symbol 927 MovieClip Frame 15
stop();
Symbol 958 MovieClip Frame 1
_root.stop();
Symbol 958 MovieClip Frame 375
_root.play();
Symbol 969 MovieClip Frame 1
stop();
Symbol 969 MovieClip Frame 2
stop();
Symbol 972 MovieClip Frame 1
stop();
Symbol 972 MovieClip Frame 2
stop();
Symbol 973 MovieClip Frame 90
stop();
Symbol 974 MovieClip Frame 1
stop();
Symbol 974 MovieClip Frame 2
stop();