Frame 1
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
copyrightNotice.separatorBefore = true;
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
}
if (lock) {
_global.showTheAd = true;
}
}
_global.showTheAd = false;
urls_allowed = ["uploads.ungrounded.net", "chat.kongregate.com"];
sitelock(urls_allowed);
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) {
if (_global.showTheAd) {
_root.gotoAndPlay(3);
}
if (!_global.showTheAd) {
_root.gotoAndPlay(4);
}
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
var CPMStarContentSpotID = "4519Q17336003";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
adtimer = 0;
playButtonClip.onEnterFrame = function () {
adtimer++;
if (adtimer > 300) {
playButtonClip._y = 410;
}
};
Instance of Symbol 31 MovieClip "playButtonClip" in Frame 3
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (release) {
_root.nextFrame();
}
Frame 4
_global.player = new Array();
_global.playerID = new Array();
_global.playerStrength = new Array();
_global.plExp = new Array();
_global.plLvl = new Array();
_global.enemies = new Array();
_global.enemyStrength = new Array();
_global.enemyHealth = new Array();
stopAllSounds();
play();
Frame 5
stop();
Instance of Symbol 537 MovieClip in Frame 5
on (release) {
_root.nextFrame();
}
Frame 6
_root.attachMovie("bunny", "bunny", _root.getNextHighestDepth());
_root.attachMovie("controls", "controls", _root.getNextHighestDepth());
_root.attachMovie("hud", "hud", _root.getNextHighestDepth());
hud._xscale = cam._xscale;
hud._yscale = cam._yscale;
bunny._x = startPoint._x;
bunny._y = startPoint._y;
_global.onWave = 1;
_global.weapon = "one";
_global.player.push(bunny);
_global.playerID.push(1);
_global.playerStrength.push(0);
_global.plExp.push(0);
_global.plLvl.push(0);
_global.enemiesKilled = 0;
cam._xscale = 100;
cam._yscale = 100;
round = 0;
randomNumber = 0;
attachEnemy = 0;
enemyNumber = 0;
clearStage = 0;
leftOrRight = Math.round(Math.random() * 1) + 0;
onEnterFrame = function () {
if (round == 0) {
if (_global.enemiesKilled == 5) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
clearStage = 0;
_global.onWave = 2;
_root.attachMovie("beatWave", "beatWave", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 150) && (enemyNumber < 5)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(2);
_global.enemyHealth.push(10);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(2);
_global.enemyHealth.push(10);
}
attachEnemy = 0;
}
}
if (round == 1) {
if (_global.enemiesKilled == 10) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
clearStage = 0;
_root.attachMovie("beatWave", "beatWave", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 150) && (enemyNumber < 10)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(4);
_global.enemyHealth.push(15);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(4);
_global.enemyHealth.push(15);
}
attachEnemy = 0;
}
}
if (round == 2) {
if (_global.enemiesKilled == 2) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
_global.onWave = 3;
clearStage = 0;
_root.attachMovie("beatWave", "beatWave", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 150) && (enemyNumber < 2)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("ninjaEnemy", "ninjaEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(4);
_global.enemyHealth.push(30);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("ninjaEnemy", "ninjaEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(4);
_global.enemyHealth.push(30);
}
attachEnemy = 0;
}
}
if (round == 3) {
if (_global.enemiesKilled == 10) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
clearStage = 0;
_root.attachMovie("beatWave", "beatWave", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 80) && (enemyNumber < 10)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(4);
_global.enemyHealth.push(20);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(4);
_global.enemyHealth.push(20);
}
attachEnemy = 0;
}
}
if (round == 4) {
if (_global.enemiesKilled == 1) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
clearStage = 0;
_root.attachMovie("beatWave", "beatWave", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 150) && (enemyNumber < 1)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("strongEnemy", "strongEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(5);
_global.enemyHealth.push(60);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("strongEnemy", "strongEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(5);
_global.enemyHealth.push(60);
}
attachEnemy = 0;
}
}
if (round == 5) {
if (_global.enemiesKilled == 4) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
clearStage = 0;
_global.onWave = 4;
_root.attachMovie("beatWave", "beatWave", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 50) && (enemyNumber < 4)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("ninjaEnemy", "ninjaEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(7);
_global.enemyHealth.push(40);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("ninjaEnemy", "ninjaEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(7);
_global.enemyHealth.push(40);
}
attachEnemy = 0;
}
}
if (round == 6) {
if (_global.enemiesKilled == 5) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
clearStage = 0;
_root.attachMovie("beatWave", "beatWave", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 40) && (enemyNumber < 5)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(5);
_global.enemyHealth.push(70);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(5);
_global.enemyHealth.push(70);
}
attachEnemy = 0;
}
}
if (round == 7) {
if (_global.enemiesKilled == 8) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
clearStage = 0;
_global.onWave = 2;
_root.attachMovie("beatWave", "beatWave", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 150) && (enemyNumber < 8)) {
enemyNumber = enemyNumber + 2;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(5);
_global.enemyHealth.push(70);
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("ninjaEnemy", "ninjaEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(7);
_global.enemyHealth.push(40);
attachEnemy = 0;
}
}
if (round == 8) {
if (_global.enemiesKilled == 2) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_global.enemiesKilled = 0;
clearStage = 0;
_root.attachMovie("finalEnemy", "finalEnemy", _root.getNextHighestDepth());
round++;
enemyNumber = 0;
attachEnemy = 0;
}
}
attachEnemy++;
if ((attachEnemy == 40) && (enemyNumber < 2)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("strongEnemy", "strongEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(5);
_global.enemyHealth.push(60);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("strongEnemy", "strongEnemy" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(5);
_global.enemyHealth.push(60);
}
attachEnemy = 0;
}
}
if (round == 9) {
if (_global.enemiesKilled == 1) {
clearStage++;
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i]._alpha--;
if (_global.enemies[i]._alpha < 1) {
_global.enemies[i].removeMovieClip();
}
i--;
}
if (clearStage > 150) {
_root.attachMovie("youWon", "youWon", _root.getNextHighestDepth());
round++;
}
}
attachEnemy++;
if ((attachEnemy == 40) && (enemyNumber < 1)) {
enemyNumber++;
randomNumber++;
leftOrRight = Math.round(Math.random() * 1) + 0;
if (leftOrRight == 0) {
leftD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("finalBoss", "finalBoss" + randomNumber, _root.getNextHighestDepth(), {_x:leftDoor._x, _y:leftDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(10);
_global.enemyHealth.push(200);
} else {
rightD.gotoAndPlay(2);
enemy_mc = _root.attachMovie("finalBoss", "finalBoss" + randomNumber, _root.getNextHighestDepth(), {_x:rightDoor._x, _y:rightDoor._y});
_global.enemies.push(enemy_mc);
_global.enemyStrength.push(10);
_global.enemyHealth.push(200);
}
attachEnemy = 0;
}
}
cam._x = bunny._x;
cam._y = bunny._y;
if (cam._x < 250) {
cam._x = 250;
}
if (cam._x > 1335) {
cam._x = 1335;
}
if (cam._y < 250) {
cam._y = 250;
}
if (cam._y > 324) {
cam._y = 324;
}
bg_image._x = cam._x;
bg_image._y = cam._y;
controls._x = cam._x;
controls._y = cam._y + 100;
hud._x = cam._x;
hud._y = cam._y;
beatWave._x = cam._x;
beatWave._y = 500;
finalEnemy._x = cam._x;
finalEnemy._y = 500;
youWon._x = cam._x;
youWon._y = 500;
cam.camControl();
hud.swapDepths(_root.getNextHighestDepth());
controls.swapDepths(_root.getNextHighestDepth());
bunny.swapDepths(_root.getNextHighestDepth());
beatWave.swapDepths(_root.getNextHighestDepth());
if (!_global.playerAlive) {
hud.removeMovieClip();
controls.removeMovieClip();
beatWave.removeMovieClip();
i = _global.player.length - 1;
while (i >= 0) {
_global.player[i].removeMovieClip();
_global.player.splice(i, 1);
i--;
}
i = _global.playerID.length - 1;
while (i >= 0) {
_global.playerID.splice(i, 1);
i--;
}
i = _global.playerStrength.length - 1;
while (i >= 0) {
_global.playerStrength.splice(i, 1);
i--;
}
i = _global.plExp.length - 1;
while (i >= 0) {
_global.plExp.splice(i, 1);
i--;
}
i = _global.plLvl.length - 1;
while (i >= 0) {
_global.plLvl.splice(i, 1);
i--;
}
i = _global.enemies.length - 1;
while (i >= 0) {
_global.enemies[i].removeMovieClip();
_global.enemies.splice(i, 1);
i--;
}
i = _global.enemyStrength.length - 1;
while (i >= 0) {
_global.enemyStrength.splice(i, 1);
i--;
}
i = _global.enemyHealth.length - 1;
while (i >= 0) {
_global.enemyHealth.splice(i, 1);
i--;
}
nextFrame();
}
};
stop();
Frame 7
stop();
cam._x = cgh._x;
cam._y = cgh._y;
Instance of Symbol 585 MovieClip in Frame 7
on (release) {
_root.prevFrame();
}
Symbol 2 MovieClip Frame 1
stop();
Symbol 9 MovieClip [smokeCloud] Frame 1
Symbol 9 MovieClip [smokeCloud] Frame 26
this.removeMovieClip();
Symbol 31 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 1
if (_global.weapon == "one") {
this.gotoAndStop(1);
}
if (_global.weapon == "two") {
this.gotoAndStop(2);
}
if (_global.weapon == "three") {
this.gotoAndStop(3);
}
if (_global.weapon == "four") {
this.gotoAndStop(4);
}
if (_global.weapon == "five") {
this.gotoAndStop(5);
}
if (_global.weapon == "six") {
this.gotoAndStop(6);
}
if (_global.weapon == "seven") {
this.gotoAndStop(7);
}
if (_global.weapon == "eight") {
this.gotoAndStop(8);
}
if (_global.weapon == "nine") {
this.gotoAndStop(9);
}
if (_global.weapon == "ten") {
this.gotoAndStop(10);
}
if (_global.weapon == "eleven") {
this.gotoAndStop(11);
}
if (_global.weapon == "twelve") {
this.gotoAndStop(12);
}
if (_global.weapon == "thirteen") {
this.gotoAndStop(13);
}
if (_global.weapon == "fourteen") {
this.gotoAndStop(14);
}
if (_global.weapon == "fifteen") {
this.gotoAndStop(15);
}
if (_global.weapon == "sixteen") {
this.gotoAndStop(16);
}
if (_global.weapon == "seventeen") {
this.gotoAndStop(17);
}
if (_global.weapon == "eighteen") {
this.gotoAndStop(18);
}
if (_global.weapon == "nineteen") {
this.gotoAndStop(19);
}
if (_global.weapon == "twenty") {
this.gotoAndStop(20);
}
stop();
Symbol 66 MovieClip Frame 2
stop();
Symbol 66 MovieClip Frame 3
stop();
Symbol 66 MovieClip Frame 4
stop();
Symbol 66 MovieClip Frame 5
stop();
Symbol 66 MovieClip Frame 6
stop();
Symbol 66 MovieClip Frame 7
stop();
Symbol 136 MovieClip [bunny] Frame 1
if (setVars == undefined) {
playerExp = 0;
playerLevel = 0;
strength = 1;
randomNumber = 0;
running = false;
gravity = 0;
gravityaccel = 0.4;
xaccel = 0;
runaccelamt = 0.3;
friction = 0.5;
airrisist = 0.05;
maxaccel = 5;
maxjump = 7;
doubleJump = false;
doubleJumping = false;
jump = true;
pressOnce = 0;
firstAttack = true;
attacking = false;
canAirCombo = true;
comboPoint = 0;
pressed = 0;
pressedOnce = 0;
falling = false;
grounded = true;
health = 100;
_global.playerAlive = true;
damaged = false;
damagedTimer = 0;
blocking = false;
kicking = false;
blockTimer = 0;
blockBar = 100;
reachedLvl6 = 0;
reachedLvl5 = 0;
reachedLvl4 = 0;
reachedLvl3 = 0;
reachedLvl2 = 0;
reachedLvl1 = 0;
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (this == _global.player[i]) {
_global.playerStrength[i] = strength;
_global.plExp[i] = playerExp;
_global.plLvl[i] = playerLevel;
}
_global.i--;
}
setVars = true;
}
onEnterFrame = function () {
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (this == _global.player[i]) {
strength = _global.playerStrength[i];
playerExp = _global.plExp[i];
playerLevel = _global.plLvl[i];
if (_global.plExp[i] > 9) {
if (reachedLvl1 == 0) {
health = health + 5;
blockBar = blockBar + 5;
reachedLvl1 = 1;
_root.attachMovie("lvlAni", "lvlAni", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
_global.plLvl[i] = 1;
}
if (_global.plExp[i] > 49) {
if (reachedLvl2 == 0) {
health = health + 10;
blockBar = blockBar + 10;
reachedLvl2 = 1;
_root.attachMovie("lvlAni", "lvlAni", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
_global.plLvl[i] = 2;
}
if (_global.plExp[i] > 99) {
if (reachedLvl3 == 0) {
health = health + 15;
blockBar = blockBar + 15;
reachedLvl3 = 1;
_root.attachMovie("lvlAni", "lvlAni", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
_global.plLvl[i] = 3;
}
if (_global.plExp[i] > 149) {
if (reachedLvl4 == 0) {
health = health + 20;
blockBar = blockBar + 20;
reachedLvl4 = 1;
_root.attachMovie("lvlAni", "lvlAni", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
_global.plLvl[i] = 4;
}
if (_global.plExp[i] > 199) {
if (reachedLvl5 == 0) {
health = health + 25;
blockBar = blockBar + 25;
reachedLvl5 = 1;
_root.attachMovie("lvlAni", "lvlAni", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
_global.plLvl[i] = 5;
}
if (_global.plExp[i] > 249) {
if (reachedLvl6 == 0) {
health = health + 30;
blockBar = blockBar + 30;
reachedLvl6 = 1;
_root.attachMovie("lvlAni", "lvlAni", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
_global.plLvl[i] = "MAX";
}
if (_global.plLvl[i] == 1) {
_global.playerStrength[i] = 2;
_global.weapon = "two";
}
if (_global.plLvl[i] == 2) {
_global.playerStrength[i] = 4;
_global.weapon = "three";
}
if (_global.plLvl[i] == 3) {
_global.playerStrength[i] = 6;
_global.weapon = "four";
}
if (_global.plLvl[i] == 4) {
_global.playerStrength[i] = 8;
_global.weapon = "five";
}
if (_global.plLvl[i] == 5) {
_global.playerStrength[i] = 10;
_global.weapon = "six";
}
if ((_global.plLvl[i] == 6) or (_global.plLvl[i] == "MAX")) {
_global.playerStrength[i] = 12;
_global.weapon = "seven";
}
}
_global.i--;
}
if ((attacking or running) or (!jump)) {
blocking = false;
blockTimer = 0;
}
if (!Key.isDown(83)) {
pressedOnce = 0;
}
if (((!attacking) && (!blocking)) && (Key.isDown(83))) {
if (pressedOnce == 0) {
pressedOnce = 1;
kicking = true;
}
}
if (!Key.isDown(65)) {
pressed = 0;
}
if (((!kicking) && (!blocking)) && (Key.isDown(65))) {
if (pressed == 0) {
attacking = true;
comboPoint++;
pressed = 1;
}
}
if (kicking) {
this.gotoAndStop("kick");
if (this.kickMove._currentframe > 9) {
kicking = false;
}
}
if (attacking && (jump)) {
if (firstAttack) {
this.gotoAndStop("attack1");
firstAttack = false;
}
if ((this.comboOne._currentframe > 11) && (comboPoint > 1)) {
this.gotoAndStop("attack2");
}
if ((this.comboTwo._currentframe > 7) && (comboPoint > 2)) {
this.gotoAndStop("attack3");
}
}
if ((attacking && (!jump)) && (canAirCombo)) {
if (firstAttack) {
this.gotoAndStop("air1");
gravity = 0;
gravity = -2;
firstAttack = false;
}
if ((this.airOne._currentframe > 7) && (comboPoint > 1)) {
this.gotoAndStop("air2");
gravity = 0;
gravity = -3;
}
if ((this.airTwo._currentframe > 7) && (comboPoint > 2)) {
this.gotoAndStop("air3");
gravity = 0;
gravity = -4;
}
}
if (((this.airOne._currentframe > 8) or (this.airTwo._currentframe > 8)) or (this.airThree._currentframe > 8)) {
canAirCombo = false;
}
if ((((((this.comboOne._currentframe > 12) or (this.comboTwo._currentframe > 7)) or (this.comboThree._currentframe > 18)) or (this.airOne._currentframe > 8)) or (this.airTwo._currentframe > 8)) or (this.airThree._currentframe > 8)) {
attacking = false;
firstAttack = true;
comboPoint = 0;
}
if (blocking) {
this.gotoAndStop("block");
blockTimer++;
if (blockTimer > 7) {
blocking = false;
blockTimer = 0;
}
}
if (((!kicking) && (!attacking)) && (!blocking)) {
if (doubleJumping) {
this.gotoAndStop("double");
}
if (jump && (!doubleJumping)) {
if (running) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("idle");
}
} else if (!doubleJumping) {
this.gotoAndStop("jump");
}
}
if (Key.isDown(39) or Key.isDown(37)) {
running = true;
} else {
running = false;
}
if (!_root.ground.hitTest(this._x, this._y + 10, true)) {
falling = true;
grounded = false;
}
if (_root.ground.hitTest(this._x, this._y + 11, true)) {
canAirCombo = true;
doubleJumping = false;
doubleJump = false;
jump = true;
grounded = true;
falling = false;
while (_root.ground.hitTest(this._x, this._y + 9, true)) {
this._y--;
}
}
if (falling == true) {
gravity = gravity + gravityaccel;
} else {
gravity = 0;
}
if ((Key.isDown(39) && (xaccel < maxaccel)) && (falling == true)) {
xaccel = xaccel + (runaccelamt - airrisist);
} else if ((Key.isDown(37) && (xaccel > (-maxaccel))) && (falling == true)) {
xaccel = xaccel - (runaccelamt - airrisist);
} else if ((Key.isDown(37) && (xaccel > (-maxaccel))) && (falling == false)) {
xaccel = xaccel - runaccelamt;
} else if ((Key.isDown(39) && (xaccel < maxaccel)) && (falling == false)) {
xaccel = xaccel + runaccelamt;
} else if (grounded == true) {
if (xaccel > 0) {
xaccel = xaccel - friction;
}
if (xaccel < 0) {
xaccel = xaccel + friction;
}
if ((xaccel < 0) && (xaccel > friction)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < friction)) {
xaccel = 0;
}
} else {
if (xaccel > 0) {
xaccel = xaccel - airrisist;
}
if (xaccel < 0) {
xaccel = xaccel + airrisist;
}
if ((xaccel < 0) && (xaccel > airrisist)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < airrisist)) {
xaccel = 0;
}
}
if (xaccel > 0) {
this._xscale = 100;
}
if (xaccel < 0) {
this._xscale = -100;
}
if (!Key.isDown(38)) {
pressOnce = 0;
}
if (Key.isDown(38) && (jump == true)) {
gravity = gravity - (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * maxjump);
jump = false;
doubleJump = true;
pressOnce = 1;
}
if ((Key.isDown(38) && (doubleJump == true)) && (pressOnce == 0)) {
gravity = 0;
gravity = gravity - (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * maxjump);
doubleJump = false;
doubleJumping = true;
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 7);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 7);
if (jump && (_root.ground.hitTest(leftx, lefty, true))) {
xaccel = 0;
this._x++;
}
if (jump && (_root.ground.hitTest(rightx, righty, true))) {
xaccel = 0;
this._x--;
}
_global.i = _global.enemies.length - 1;
while (_global.i >= 0) {
if (this.hitTest(_global.enemies[i].hitArea)) {
if ((((!running) && (!kicking)) && (!attacking)) && (blockBar > 0)) {
blocking = true;
blockBar = blockBar - 2;
} else {
health = health - _global.enemyStrength[i];
damaged = true;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
_global.i--;
}
if (damaged) {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:200, gb:200, bb:200};
myColor.setTransform(myColorTransform);
damagedTimer++;
if (damagedTimer > 4) {
damaged = false;
damagedTimer = 0;
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
myColor.setTransform(myColorTransform);
}
}
if (health < 0) {
_global.playerAlive = false;
health = 0;
}
if (health > 100) {
health = 100;
}
if (blockBar > 100) {
blockBar = 100;
}
this._y = this._y + gravity;
this._x = this._x + xaccel;
if (this._x < -25) {
this._x = -25;
}
if (this._x > 1605) {
this._x = 1605;
}
_root.hud.showExp.text = (((((((("Experience " + playerExp) + " Level ") + playerLevel) + " Health ") + health) + "%") + " Block Power ") + blockBar) + "%";
};
stop();
Symbol 136 MovieClip [bunny] Frame 2
stop();
Symbol 136 MovieClip [bunny] Frame 3
stop();
Symbol 136 MovieClip [bunny] Frame 4
stop();
Symbol 136 MovieClip [bunny] Frame 5
stop();
Symbol 136 MovieClip [bunny] Frame 6
stop();
Symbol 136 MovieClip [bunny] Frame 7
stop();
Symbol 136 MovieClip [bunny] Frame 8
stop();
Symbol 136 MovieClip [bunny] Frame 9
stop();
Symbol 136 MovieClip [bunny] Frame 10
stop();
Symbol 136 MovieClip [bunny] Frame 11
stop();
Symbol 136 MovieClip [bunny] Frame 12
stop();
Symbol 138 MovieClip Frame 1
if (_global.onWave == 1) {
this.gotoAndStop(1);
}
if (_global.onWave == 2) {
this.gotoAndStop(2);
}
if (_global.onWave == 3) {
this.gotoAndStop(3);
}
if (_global.onWave == 4) {
this.gotoAndStop(4);
}
stop();
Symbol 138 MovieClip Frame 2
stop();
Symbol 138 MovieClip Frame 3
stop();
Symbol 138 MovieClip Frame 4
stop();
Symbol 218 MovieClip Frame 22
stop();
Symbol 241 MovieClip [enemy] Frame 1
function selectingTarget() {
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (_global.player.length > 0) {
multipleTargets = true;
} else {
multipleTargets = false;
}
if (multipleTargets) {
numberOfPotentialTargets = _global.player.length;
pickATarget = Math.round(Math.random() * (numberOfPotentialTargets - 1)) + 1;
if (pickATarget == _global.playerID[i]) {
targeting = _global.playerID[i];
}
}
_global.i--;
}
}
if (setVars == undefined) {
randomNumber = 0;
grounded = true;
running = false;
gravity = 0;
gravityaccel = 0.4;
xaccel = 0;
runaccelamt = 0.3;
friction = 0.5;
airrisist = 0.05;
maxaccel = 5;
maxjump = 7;
hyp = 0;
attackChoice = 0;
chasePlayer = 0;
jump = true;
damage = false;
damagedTimer = 0;
health = 0;
alive = true;
down = false;
downTimer = 0;
huntPlayer = Math.round(Math.random() * 1) + 0;
falling = true;
airHit = false;
blocking = false;
attacking = false;
chanceToAttack = Math.round(Math.random() * 1) + 0;
blockingTimer = 0;
chanceToBlock = Math.round(Math.random() * 10) + 0;
switchTargetTimer = 0;
targeting = 1;
_global.i = _global.enemies.length - 1;
while (_global.i >= 0) {
if (this == _global.enemies[i]) {
health = _global.enemyHealth[i];
}
_global.i--;
}
setVars = true;
}
onEnterFrame = function () {
if (alive && (switchTargetTimer == 0)) {
selectingTarget();
}
switchTargetTimer++;
if (switchTargetTimer > 500) {
switchTargetTimer = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 10, true)) {
falling = true;
grounded = false;
}
if (_root.ground.hitTest(this._x, this._y + 11, true)) {
jump = true;
grounded = true;
falling = false;
if (airHit && (alive)) {
down = true;
airHit = false;
}
while (_root.ground.hitTest(this._x, this._y + 9, true)) {
this._y--;
}
}
if (falling == true) {
gravity = gravity + gravityaccel;
} else {
gravity = 0;
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 7);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 7);
if ((!falling) && (_root.ground.hitTest(leftx, lefty, true))) {
xaccel = 0;
this._x++;
}
if ((!falling) && (_root.ground.hitTest(rightx, righty, true))) {
xaccel = 0;
this._x--;
}
if (attacking && (alive)) {
this.gotoAndStop("attack");
}
if (this.swingAttack._currentframe > 18) {
attacking = false;
chanceToAttack = 1;
}
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (alive) {
if (targeting == _global.playerID[i]) {
if (((!damaged) && (!airHit)) && (!down)) {
if (_global.player[i]._x > this._x) {
this._xscale = 100;
}
if (_global.player[i]._x < this._x) {
this._xscale = -100;
}
}
dist_x = _global.player[i]._x - this._x;
dist_y = _global.player[i]._y - this._y;
hyp = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
if (hyp < 70) {
huntPlayer = 0;
running = false;
if (!attacking) {
attackChoice++;
if (attackChoice > 49) {
attackChoice = 0;
chanceToAttack = Math.round(Math.random() * 1) + 0;
if (chanceToAttack == 0) {
attacking = true;
}
}
}
}
if ((((hyp > 70) && (!attacking)) && (!down)) && (!damaged)) {
chasePlayer++;
if (chasePlayer > 29) {
chasePlayer = 0;
huntPlayer = Math.round(Math.random() * 1) + 0;
}
if (huntPlayer == 1) {
running = true;
endX = _global.player[i]._x;
this._x = this._x + (((endX - this._x) + 45) / 50);
}
if (huntPlayer == 0) {
xaccel = 0;
running = false;
}
}
}
if (_global.player[i].hitTest(this.hitBox)) {
if (_global.player[i].kickMove._currentframe == 5) {
damaged = true;
airHit = true;
gravity = 0;
gravity = -4;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
if ((((_global.player[i].comboOne._currentframe == 7) or (_global.player[i].comboTwo._currentframe == 3)) or (_global.player[i].comboThree._currentframe == 3)) or (_global.player[i].comboThree._currentframe == 15)) {
targeting = _global.playerID[i];
switchTargetTimer = 1;
chanceToBlock = Math.round(Math.random() * 10) + 0;
if (chanceToBlock > 7) {
blocking = true;
} else {
health = health - _global.playerStrength[i];
if (health < 1) {
plExp[i] = plExp[i] + 5;
}
randomNumber++;
showDamage_mc = _root.attachMovie("showDamage", "showDamage" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
showDamage_mc.dmg.text = playerStrength[i];
damaged = true;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
if (((_global.player[i].airOne._currentframe == 5) or (_global.player[i].airTwo._currentframe == 5)) or (_global.player[i].airThree._currentframe == 5)) {
targeting = _global.playerID[i];
switchTargetTimer = 1;
health = health - _global.playerStrength[i];
if (health < 1) {
plExp[i] = plExp[i] + 5;
}
randomNumber++;
showDamage_mc = _root.attachMovie("showDamage", "showDamage" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
showDamage_mc.dmg.text = playerStrength[i];
airHit = true;
damaged = true;
gravity = 0;
gravity = -4;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
}
if (damaged && (alive)) {
if (this._xscale == 100) {
xaccel = -1;
} else {
xaccel = 1;
}
this.gotoAndStop("hit");
damagedTimer++;
if (damagedTimer > 6) {
damaged = false;
damagedTimer = 0;
}
}
_global.i--;
}
if (((alive && (airHit)) && (!damaged)) && (!down)) {
this.gotoAndStop("fall");
if (this._xscale == 100) {
xaccel = -1;
} else {
xaccel = 1;
}
}
if (down && (alive)) {
xaccel = 0;
if (downTimer == 0) {
randomNumber++;
smokeCloud_mc = _root.attachMovie("smokeCloud", "smokeCloud" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
this.gotoAndStop("down");
downTimer++;
if (downTimer > 39) {
down = false;
downTimer = 0;
}
}
if (blocking && (alive)) {
this.gotoAndStop("block");
blockingTimer++;
if (blockingTimer > 8) {
blocking = false;
blockingTimer = 0;
}
}
if (health < 1) {
if (alive) {
_global.enemiesKilled++;
}
alive = false;
this.gotoAndStop("dead");
}
if ((((((!attacking) && (!blocking)) && (!damaged)) && (!airHit)) && (!down)) && (alive)) {
if (jump && (!doubleJumping)) {
if (running) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("idle");
}
} else if (!jump) {
this.gotoAndStop("jump");
}
}
if (grounded) {
if (xaccel > 0) {
xaccel = xaccel - friction;
}
if (xaccel < 0) {
xaccel = xaccel + friction;
}
if ((xaccel < 0) && (xaccel > friction)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < friction)) {
xaccel = 0;
}
} else {
if (xaccel > 0) {
xaccel = xaccel - airrisist;
}
if (xaccel < 0) {
xaccel = xaccel + airrisist;
}
if ((xaccel < 0) && (xaccel > airrisist)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < airrisist)) {
xaccel = 0;
}
}
if (this._x < -25) {
this._x = -25;
}
if (this._x > 1605) {
this._x = 1605;
}
this._y = this._y + gravity;
this._x = this._x + xaccel;
};
stop();
Symbol 241 MovieClip [enemy] Frame 2
stop();
Symbol 241 MovieClip [enemy] Frame 3
stop();
Symbol 241 MovieClip [enemy] Frame 4
stop();
Symbol 241 MovieClip [enemy] Frame 5
stop();
Symbol 241 MovieClip [enemy] Frame 6
stop();
Symbol 241 MovieClip [enemy] Frame 7
stop();
Symbol 241 MovieClip [enemy] Frame 8
stop();
Symbol 241 MovieClip [enemy] Frame 9
stop();
Symbol 257 MovieClip [hitSpark] Frame 19
this.removeMovieClip();
Symbol 277 MovieClip [lvlAni] Frame 10
this.removeMovieClip();
Symbol 336 MovieClip Frame 22
stop();
Symbol 359 MovieClip [strongEnemy] Frame 1
function selectingTarget() {
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (_global.player.length > 0) {
multipleTargets = true;
} else {
multipleTargets = false;
}
if (multipleTargets) {
numberOfPotentialTargets = _global.player.length;
pickATarget = Math.round(Math.random() * (numberOfPotentialTargets - 1)) + 1;
if (pickATarget == _global.playerID[i]) {
targeting = _global.playerID[i];
}
}
_global.i--;
}
}
if (setVars == undefined) {
facePlayer = true;
grounded = true;
randomNumber = 0;
running = false;
gravity = 0;
gravityaccel = 0.4;
xaccel = 0;
runaccelamt = 0.3;
friction = 0.5;
airrisist = 0.05;
maxaccel = 5;
maxjump = 12;
hyp = 0;
attackChoice = 0;
chasePlayer = 0;
jump = true;
damage = false;
damagedTimer = 0;
health = 0;
alive = true;
down = false;
downTimer = 0;
huntPlayer = Math.round(Math.random() * 1) + 0;
falling = true;
airHit = false;
blocking = false;
attacking = false;
chanceToAttack = Math.round(Math.random() * 1) + 0;
blockingTimer = 0;
switchTargetTimer = 0;
chanceToBlock = Math.round(Math.random() * 10) + 0;
targeting = 1;
_global.i = _global.enemies.length - 1;
while (_global.i >= 0) {
if (this == _global.enemies[i]) {
health = _global.enemyHealth[i];
}
_global.i--;
}
setVars = true;
}
onEnterFrame = function () {
if (alive && (switchTargetTimer == 0)) {
selectingTarget();
}
switchTargetTimer++;
if (switchTargetTimer > 500) {
switchTargetTimer = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 10, true)) {
falling = true;
grounded = false;
}
if (_root.ground.hitTest(this._x, this._y + 11, true)) {
jump = true;
grounded = true;
falling = false;
if (airHit && (alive)) {
down = true;
airHit = false;
}
while (_root.ground.hitTest(this._x, this._y + 9, true)) {
this._y--;
}
}
if (falling == true) {
gravity = gravity + gravityaccel;
} else {
gravity = 0;
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 7);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 7);
if ((!falling) && (_root.ground.hitTest(leftx, lefty, true))) {
xaccel = 0;
this._x++;
}
if ((!falling) && (_root.ground.hitTest(rightx, righty, true))) {
xaccel = 0;
this._x--;
}
if (attacking && (alive)) {
this.gotoAndStop("attack");
}
if (this.swingAttack._currentframe > 18) {
attacking = false;
chanceToAttack = 1;
}
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (alive) {
if (targeting == _global.playerID[i]) {
if ((((!damaged) && (!airHit)) && (!down)) && (facePlayer)) {
if (_global.player[i]._x > this._x) {
this._xscale = 100;
}
if (_global.player[i]._x < this._x) {
this._xscale = -100;
}
}
dist_x = _global.player[i]._x - this._x;
dist_y = _global.player[i]._y - this._y;
hyp = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
if (hyp < 70) {
huntPlayer = 0;
running = false;
if (!attacking) {
attackChoice++;
if (attackChoice > 15) {
attackChoice = 0;
chanceToAttack = Math.round(Math.random() * 1) + 0;
if (chanceToAttack == 0) {
attacking = true;
}
}
}
}
if ((((hyp > 70) && (!attacking)) && (!down)) && (!damaged)) {
chasePlayer++;
if (chasePlayer > 40) {
chasePlayer = 0;
huntPlayer = Math.round(Math.random() * 4) + 0;
}
if ((((huntPlayer == 1) or (huntPlayer == 2)) or (huntPlayer == 3)) or (huntPlayer == 4)) {
running = true;
if ((_global.player[i]._y < (this._y - 10)) && (jump)) {
gravity = gravity - (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * maxjump);
jump = false;
}
if (_global.player[i]._y > (this._y + 20)) {
facePlayer = false;
if (this._xscale == 100) {
xaccel = 3;
} else {
xaccel = -3;
}
} else {
facePlayer = true;
endX = _global.player[i]._x;
this._x = this._x + (((endX - this._x) + 45) / 50);
}
}
if (huntPlayer == 0) {
xaccel = 0;
running = false;
}
}
}
if (_global.player[i].hitTest(this.hitBox)) {
if (_global.player[i].kickMove._currentframe == 5) {
damaged = true;
airHit = true;
gravity = 0;
gravity = -4;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
if ((((_global.player[i].comboOne._currentframe == 7) or (_global.player[i].comboTwo._currentframe == 3)) or (_global.player[i].comboThree._currentframe == 3)) or (_global.player[i].comboThree._currentframe == 15)) {
targeting = _global.playerID[i];
switchTargetTimer = 1;
chanceToBlock = Math.round(Math.random() * 10) + 0;
if (chanceToBlock > 3) {
blocking = true;
} else {
health = health - _global.playerStrength[i];
if (health < 1) {
plExp[i] = plExp[i] + 15;
}
randomNumber++;
showDamage_mc = _root.attachMovie("showDamage", "showDamage" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y - 75});
showDamage_mc.dmg.text = playerStrength[i];
damaged = true;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
if (((_global.player[i].airOne._currentframe == 5) or (_global.player[i].airTwo._currentframe == 5)) or (_global.player[i].airThree._currentframe == 5)) {
targeting = _global.playerID[i];
switchTargetTimer = 1;
if (grounded) {
chanceToBlock = Math.round(Math.random() * 10) + 0;
} else {
chanceToBlock = 0;
}
if (chanceToBlock > 3) {
blocking = true;
} else {
health = health - _global.playerStrength[i];
if (health < 1) {
plExp[i] = plExp[i] + 15;
}
randomNumber++;
showDamage_mc = _root.attachMovie("showDamage", "showDamage" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y - 75});
showDamage_mc.dmg.text = playerStrength[i];
damaged = true;
airHit = true;
gravity = 0;
gravity = -4;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
}
}
if (damaged && (alive)) {
if (this._xscale == 100) {
xaccel = -1;
} else {
xaccel = 1;
}
this.gotoAndStop("hit");
damagedTimer++;
if (damagedTimer > 6) {
damaged = false;
damagedTimer = 0;
}
}
_global.i--;
}
if (((alive && (airHit)) && (!damaged)) && (!down)) {
this.gotoAndStop("fall");
if (this._xscale == 100) {
xaccel = -1;
} else {
xaccel = 1;
}
}
if (down && (alive)) {
xaccel = 0;
if (downTimer == 0) {
randomNumber++;
smokeCloud_mc = _root.attachMovie("smokeCloud", "smokeCloud" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
this.gotoAndStop("down");
downTimer++;
if (downTimer > 39) {
down = false;
downTimer = 0;
}
}
if (blocking && (alive)) {
this.gotoAndStop("block");
blockingTimer++;
if (blockingTimer > 8) {
blocking = false;
blockingTimer = 0;
}
}
if (health < 1) {
if (alive) {
_global.enemiesKilled++;
}
alive = false;
this.gotoAndStop("dead");
}
if ((((((!attacking) && (!blocking)) && (!damaged)) && (!airHit)) && (!down)) && (alive)) {
if (jump && (!doubleJumping)) {
if (running) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("idle");
}
} else if (!jump) {
this.gotoAndStop("jump");
}
}
if (grounded) {
if (xaccel > 0) {
xaccel = xaccel - friction;
}
if (xaccel < 0) {
xaccel = xaccel + friction;
}
if ((xaccel < 0) && (xaccel > friction)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < friction)) {
xaccel = 0;
}
} else {
if (xaccel > 0) {
xaccel = xaccel - airrisist;
}
if (xaccel < 0) {
xaccel = xaccel + airrisist;
}
if ((xaccel < 0) && (xaccel > airrisist)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < airrisist)) {
xaccel = 0;
}
}
if (this._x < -25) {
this._x = -25;
}
if (this._x > 1605) {
this._x = 1605;
}
this._y = this._y + gravity;
this._x = this._x + xaccel;
};
stop();
Symbol 359 MovieClip [strongEnemy] Frame 2
stop();
Symbol 359 MovieClip [strongEnemy] Frame 3
stop();
Symbol 359 MovieClip [strongEnemy] Frame 4
stop();
Symbol 359 MovieClip [strongEnemy] Frame 5
stop();
Symbol 359 MovieClip [strongEnemy] Frame 6
stop();
Symbol 359 MovieClip [strongEnemy] Frame 7
stop();
Symbol 359 MovieClip [strongEnemy] Frame 8
stop();
Symbol 359 MovieClip [strongEnemy] Frame 9
stop();
Symbol 364 MovieClip [showDamage] Frame 37
this.removeMovieClip();
Symbol 417 MovieClip Frame 22
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 1
function selectingTarget() {
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (_global.player.length > 0) {
multipleTargets = true;
} else {
multipleTargets = false;
}
if (multipleTargets) {
numberOfPotentialTargets = _global.player.length;
pickATarget = Math.round(Math.random() * (numberOfPotentialTargets - 1)) + 1;
if (pickATarget == _global.playerID[i]) {
targeting = _global.playerID[i];
}
}
_global.i--;
}
}
if (setVars == undefined) {
facePlayer = true;
grounded = true;
randomNumber = 0;
running = false;
gravity = 0;
gravityaccel = 0.4;
xaccel = 0;
runaccelamt = 0.3;
friction = 0.5;
airrisist = 0.05;
maxaccel = 5;
maxjump = 12;
hyp = 0;
attackChoice = 0;
chasePlayer = 0;
jump = true;
damage = false;
damagedTimer = 0;
health = 0;
alive = true;
down = false;
downTimer = 0;
huntPlayer = Math.round(Math.random() * 1) + 0;
falling = true;
airHit = false;
blocking = false;
attacking = false;
chanceToAttack = Math.round(Math.random() * 1) + 0;
blockingTimer = 0;
switchTargetTimer = 0;
chanceToBlock = Math.round(Math.random() * 10) + 0;
targeting = 1;
_global.i = _global.enemies.length - 1;
while (_global.i >= 0) {
if (this == _global.enemies[i]) {
health = _global.enemyHealth[i];
}
_global.i--;
}
setVars = true;
}
onEnterFrame = function () {
if (alive && (switchTargetTimer == 0)) {
selectingTarget();
}
switchTargetTimer++;
if (switchTargetTimer > 500) {
switchTargetTimer = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 10, true)) {
falling = true;
grounded = false;
}
if (_root.ground.hitTest(this._x, this._y + 11, true)) {
jump = true;
grounded = true;
falling = false;
if (airHit && (alive)) {
down = true;
airHit = false;
}
while (_root.ground.hitTest(this._x, this._y + 9, true)) {
this._y--;
}
}
if (falling == true) {
gravity = gravity + gravityaccel;
} else {
gravity = 0;
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 7);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 7);
if ((!falling) && (_root.ground.hitTest(leftx, lefty, true))) {
xaccel = 0;
this._x++;
}
if ((!falling) && (_root.ground.hitTest(rightx, righty, true))) {
xaccel = 0;
this._x--;
}
if (attacking && (alive)) {
this.gotoAndStop("attack");
}
if (this.swingAttack._currentframe > 18) {
attacking = false;
chanceToAttack = 1;
}
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (alive) {
if (targeting == _global.playerID[i]) {
if ((((!damaged) && (!airHit)) && (!down)) && (facePlayer)) {
if (_global.player[i]._x > this._x) {
this._xscale = 100;
}
if (_global.player[i]._x < this._x) {
this._xscale = -100;
}
}
dist_x = _global.player[i]._x - this._x;
dist_y = _global.player[i]._y - this._y;
hyp = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
if (hyp < 70) {
huntPlayer = 0;
running = false;
if (!attacking) {
attackChoice++;
if (attackChoice > 15) {
attackChoice = 0;
chanceToAttack = Math.round(Math.random() * 1) + 0;
if (chanceToAttack == 0) {
attacking = true;
}
}
}
}
if ((((hyp > 70) && (!attacking)) && (!down)) && (!damaged)) {
chasePlayer++;
if (chasePlayer > 40) {
chasePlayer = 0;
huntPlayer = Math.round(Math.random() * 4) + 0;
}
if ((((huntPlayer == 1) or (huntPlayer == 2)) or (huntPlayer == 3)) or (huntPlayer == 4)) {
running = true;
if ((_global.player[i]._y < (this._y - 10)) && (jump)) {
gravity = gravity - (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * maxjump);
jump = false;
}
if (_global.player[i]._y > (this._y + 20)) {
facePlayer = false;
if (this._xscale == 100) {
xaccel = 3;
} else {
xaccel = -3;
}
} else {
facePlayer = true;
endX = _global.player[i]._x;
this._x = this._x + (((endX - this._x) + 45) / 50);
}
}
if (huntPlayer == 0) {
xaccel = 0;
running = false;
}
}
}
if (_global.player[i].hitTest(this.hitBox)) {
if (_global.player[i].kickMove._currentframe == 5) {
damaged = true;
airHit = true;
gravity = 0;
gravity = -4;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
if ((((_global.player[i].comboOne._currentframe == 7) or (_global.player[i].comboTwo._currentframe == 3)) or (_global.player[i].comboThree._currentframe == 3)) or (_global.player[i].comboThree._currentframe == 15)) {
targeting = _global.playerID[i];
switchTargetTimer = 1;
chanceToBlock = Math.round(Math.random() * 10) + 0;
if (chanceToBlock > 3) {
blocking = true;
} else {
health = health - _global.playerStrength[i];
if (health < 1) {
plExp[i] = plExp[i] + 15;
}
randomNumber++;
showDamage_mc = _root.attachMovie("showDamage", "showDamage" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y - 75});
showDamage_mc.dmg.text = playerStrength[i];
damaged = true;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
if (((_global.player[i].airOne._currentframe == 5) or (_global.player[i].airTwo._currentframe == 5)) or (_global.player[i].airThree._currentframe == 5)) {
targeting = _global.playerID[i];
switchTargetTimer = 1;
if (grounded) {
chanceToBlock = Math.round(Math.random() * 10) + 0;
} else {
chanceToBlock = 0;
}
if (chanceToBlock > 3) {
blocking = true;
} else {
health = health - _global.playerStrength[i];
if (health < 1) {
plExp[i] = plExp[i] + 15;
}
randomNumber++;
showDamage_mc = _root.attachMovie("showDamage", "showDamage" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y - 75});
showDamage_mc.dmg.text = playerStrength[i];
damaged = true;
airHit = true;
gravity = 0;
gravity = -4;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
}
}
if (damaged && (alive)) {
if (this._xscale == 100) {
xaccel = -1;
} else {
xaccel = 1;
}
this.gotoAndStop("hit");
damagedTimer++;
if (damagedTimer > 6) {
damaged = false;
damagedTimer = 0;
}
}
_global.i--;
}
if (((alive && (airHit)) && (!damaged)) && (!down)) {
this.gotoAndStop("fall");
if (this._xscale == 100) {
xaccel = -1;
} else {
xaccel = 1;
}
}
if (down && (alive)) {
xaccel = 0;
if (downTimer == 0) {
randomNumber++;
smokeCloud_mc = _root.attachMovie("smokeCloud", "smokeCloud" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
this.gotoAndStop("down");
downTimer++;
if (downTimer > 39) {
down = false;
downTimer = 0;
}
}
if (blocking && (alive)) {
this.gotoAndStop("block");
blockingTimer++;
if (blockingTimer > 8) {
blocking = false;
blockingTimer = 0;
}
}
if (health < 1) {
if (alive) {
_global.enemiesKilled++;
}
alive = false;
this.gotoAndStop("dead");
}
if ((((((!attacking) && (!blocking)) && (!damaged)) && (!airHit)) && (!down)) && (alive)) {
if (jump && (!doubleJumping)) {
if (running) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("idle");
}
} else if (!jump) {
this.gotoAndStop("jump");
}
}
if (grounded) {
if (xaccel > 0) {
xaccel = xaccel - friction;
}
if (xaccel < 0) {
xaccel = xaccel + friction;
}
if ((xaccel < 0) && (xaccel > friction)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < friction)) {
xaccel = 0;
}
} else {
if (xaccel > 0) {
xaccel = xaccel - airrisist;
}
if (xaccel < 0) {
xaccel = xaccel + airrisist;
}
if ((xaccel < 0) && (xaccel > airrisist)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < airrisist)) {
xaccel = 0;
}
}
if (this._x < -25) {
this._x = -25;
}
if (this._x > 1605) {
this._x = 1605;
}
this._y = this._y + gravity;
this._x = this._x + xaccel;
};
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 2
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 3
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 4
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 5
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 6
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 7
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 8
stop();
Symbol 443 MovieClip [ninjaEnemy] Frame 9
stop();
Symbol 450 MovieClip [controls] Frame 200
this.removeMovieClip();
Symbol 455 MovieClip [beatWave] Frame 150
this.removeMovieClip();
Symbol 505 MovieClip Frame 22
stop();
Symbol 528 MovieClip [finalBoss] Frame 1
function selectingTarget() {
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (_global.player.length > 0) {
multipleTargets = true;
} else {
multipleTargets = false;
}
if (multipleTargets) {
numberOfPotentialTargets = _global.player.length;
pickATarget = Math.round(Math.random() * (numberOfPotentialTargets - 1)) + 1;
if (pickATarget == _global.playerID[i]) {
targeting = _global.playerID[i];
}
}
_global.i--;
}
}
if (setVars == undefined) {
facePlayer = true;
grounded = true;
randomNumber = 0;
running = false;
gravity = 0;
gravityaccel = 0.4;
xaccel = 0;
runaccelamt = 0.3;
friction = 0.5;
airrisist = 0.05;
maxaccel = 5;
maxjump = 12;
hyp = 0;
attackChoice = 0;
chasePlayer = 0;
jump = true;
damage = false;
damagedTimer = 0;
health = 0;
alive = true;
down = false;
downTimer = 0;
huntPlayer = Math.round(Math.random() * 1) + 0;
falling = true;
airHit = false;
blocking = false;
attacking = false;
chanceToAttack = Math.round(Math.random() * 1) + 0;
blockingTimer = 0;
switchTargetTimer = 0;
chanceToBlock = Math.round(Math.random() * 10) + 0;
targeting = 1;
_global.i = _global.enemies.length - 1;
while (_global.i >= 0) {
if (this == _global.enemies[i]) {
health = _global.enemyHealth[i];
}
_global.i--;
}
setVars = true;
}
onEnterFrame = function () {
if (alive && (switchTargetTimer == 0)) {
selectingTarget();
}
switchTargetTimer++;
if (switchTargetTimer > 500) {
switchTargetTimer = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 10, true)) {
falling = true;
grounded = false;
}
if (_root.ground.hitTest(this._x, this._y + 11, true)) {
jump = true;
grounded = true;
falling = false;
if (airHit && (alive)) {
down = true;
airHit = false;
}
while (_root.ground.hitTest(this._x, this._y + 9, true)) {
this._y--;
}
}
if (falling == true) {
gravity = gravity + gravityaccel;
} else {
gravity = 0;
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 7);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 7);
if ((!falling) && (_root.ground.hitTest(leftx, lefty, true))) {
xaccel = 0;
this._x++;
}
if ((!falling) && (_root.ground.hitTest(rightx, righty, true))) {
xaccel = 0;
this._x--;
}
if (attacking && (alive)) {
this.gotoAndStop("attack");
}
if (this.swingAttack._currentframe > 18) {
attacking = false;
chanceToAttack = 1;
}
_global.i = _global.player.length - 1;
while (_global.i >= 0) {
if (alive) {
if (targeting == _global.playerID[i]) {
if ((((!damaged) && (!airHit)) && (!down)) && (facePlayer)) {
if (_global.player[i]._x > this._x) {
this._xscale = 100;
}
if (_global.player[i]._x < this._x) {
this._xscale = -100;
}
}
dist_x = _global.player[i]._x - this._x;
dist_y = _global.player[i]._y - this._y;
hyp = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
if (hyp < 70) {
huntPlayer = 0;
running = false;
if (!attacking) {
attackChoice++;
if (attackChoice > 15) {
attackChoice = 0;
chanceToAttack = Math.round(Math.random() * 1) + 0;
if (chanceToAttack == 0) {
attacking = true;
}
}
}
}
if ((((hyp > 70) && (!attacking)) && (!down)) && (!damaged)) {
chasePlayer++;
if (chasePlayer > 40) {
chasePlayer = 0;
huntPlayer = Math.round(Math.random() * 4) + 0;
}
if ((((huntPlayer == 1) or (huntPlayer == 2)) or (huntPlayer == 3)) or (huntPlayer == 4)) {
running = true;
if ((_global.player[i]._y < (this._y - 10)) && (jump)) {
gravity = gravity - (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * maxjump);
jump = false;
}
if (_global.player[i]._y > (this._y + 20)) {
facePlayer = false;
if (this._xscale == 100) {
xaccel = 3;
} else {
xaccel = -3;
}
} else {
facePlayer = true;
endX = _global.player[i]._x;
this._x = this._x + (((endX - this._x) + 45) / 50);
}
}
if (huntPlayer == 0) {
xaccel = 0;
running = false;
}
}
}
if (_global.player[i].hitTest(this.hitBox)) {
if (_global.player[i].kickMove._currentframe == 5) {
damaged = true;
airHit = true;
gravity = 0;
gravity = -4;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
if ((((_global.player[i].comboOne._currentframe == 7) or (_global.player[i].comboTwo._currentframe == 3)) or (_global.player[i].comboThree._currentframe == 3)) or (_global.player[i].comboThree._currentframe == 15)) {
targeting = _global.playerID[i];
switchTargetTimer = 1;
chanceToBlock = Math.round(Math.random() * 10) + 0;
if (chanceToBlock > 3) {
blocking = true;
} else {
health = health - _global.playerStrength[i];
if (health < 1) {
plExp[i] = plExp[i] + 15;
}
randomNumber++;
showDamage_mc = _root.attachMovie("showDamage", "showDamage" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y - 75});
showDamage_mc.dmg.text = playerStrength[i];
damaged = true;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
if (((_global.player[i].airOne._currentframe == 5) or (_global.player[i].airTwo._currentframe == 5)) or (_global.player[i].airThree._currentframe == 5)) {
targeting = _global.playerID[i];
switchTargetTimer = 1;
if (grounded) {
chanceToBlock = Math.round(Math.random() * 10) + 0;
} else {
chanceToBlock = 0;
}
if (chanceToBlock > 3) {
blocking = true;
} else {
health = health - _global.playerStrength[i];
if (health < 1) {
plExp[i] = plExp[i] + 15;
}
randomNumber++;
showDamage_mc = _root.attachMovie("showDamage", "showDamage" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y - 75});
showDamage_mc.dmg.text = playerStrength[i];
damaged = true;
airHit = true;
gravity = 0;
gravity = -4;
randomNumber++;
hitSpark_mc = _root.attachMovie("hitSpark", "hitSpark" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
}
}
}
if (damaged && (alive)) {
if (this._xscale == 100) {
xaccel = -1;
} else {
xaccel = 1;
}
this.gotoAndStop("hit");
damagedTimer++;
if (damagedTimer > 6) {
damaged = false;
damagedTimer = 0;
}
}
_global.i--;
}
if (((alive && (airHit)) && (!damaged)) && (!down)) {
this.gotoAndStop("fall");
if (this._xscale == 100) {
xaccel = -1;
} else {
xaccel = 1;
}
}
if (down && (alive)) {
xaccel = 0;
if (downTimer == 0) {
randomNumber++;
smokeCloud_mc = _root.attachMovie("smokeCloud", "smokeCloud" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
this.gotoAndStop("down");
downTimer++;
if (downTimer > 39) {
down = false;
downTimer = 0;
}
}
if (blocking && (alive)) {
this.gotoAndStop("block");
blockingTimer++;
if (blockingTimer > 8) {
blocking = false;
blockingTimer = 0;
}
}
if (health < 1) {
if (alive) {
_global.enemiesKilled++;
}
alive = false;
this.gotoAndStop("dead");
}
if ((((((!attacking) && (!blocking)) && (!damaged)) && (!airHit)) && (!down)) && (alive)) {
if (jump && (!doubleJumping)) {
if (running) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("idle");
}
} else if (!jump) {
this.gotoAndStop("jump");
}
}
if (grounded) {
if (xaccel > 0) {
xaccel = xaccel - friction;
}
if (xaccel < 0) {
xaccel = xaccel + friction;
}
if ((xaccel < 0) && (xaccel > friction)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < friction)) {
xaccel = 0;
}
} else {
if (xaccel > 0) {
xaccel = xaccel - airrisist;
}
if (xaccel < 0) {
xaccel = xaccel + airrisist;
}
if ((xaccel < 0) && (xaccel > airrisist)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < airrisist)) {
xaccel = 0;
}
}
if (this._x < -25) {
this._x = -25;
}
if (this._x > 1605) {
this._x = 1605;
}
this._y = this._y + gravity;
this._x = this._x + xaccel;
};
stop();
Symbol 528 MovieClip [finalBoss] Frame 2
stop();
Symbol 528 MovieClip [finalBoss] Frame 3
stop();
Symbol 528 MovieClip [finalBoss] Frame 4
stop();
Symbol 528 MovieClip [finalBoss] Frame 5
stop();
Symbol 528 MovieClip [finalBoss] Frame 6
stop();
Symbol 528 MovieClip [finalBoss] Frame 7
stop();
Symbol 528 MovieClip [finalBoss] Frame 8
stop();
Symbol 528 MovieClip [finalBoss] Frame 9
stop();
Symbol 531 MovieClip [finalEnemy] Frame 136
this.removeMovieClip();
Symbol 534 MovieClip [youWon] Frame 94
this.removeMovieClip();
Symbol 537 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
if (rewind) {
prevFrame();
}
};
this.onRollOver = function () {
rewind = false;
play();
};
this.onRollOut = function () {
rewind = true;
};
Symbol 537 MovieClip Frame 15
stop();
Symbol 571 MovieClip Frame 1
stop();
Symbol 574 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local3 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local3);
_parent._y = cY - (this._y * _local4);
_parent._xscale = 100 * _local3;
_parent._yscale = 100 * _local4;
}
stop();
this._visible = true;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
camControl();
Symbol 587 MovieClip Frame 51
stop();
Symbol 589 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local3 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local3);
_parent._y = cY - (this._y * _local4);
_parent._xscale = 100 * _local3;
_parent._yscale = 100 * _local4;
}
stop();
this._visible = true;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
camControl();