Frame 1
_root.API_Settings = {movie_id:6118, enc_key:"7z6fvDU4Zx8CggMbzTQbk9AKv93U38X9", debug_mode:false, movie_version:"2.8"};
rMenu = new ContextMenu();
rMenu.hideBuiltInItems();
credits1 = new ContextMenuItem("BARBARIAN BOB \u00A9 BORDERLINE", noClick);
credits2 = new ContextMenuItem("Brendan Bennett - PROGRAMMER. ASSIS/ANIMATOR. SOUND FX", noClick);
credits3 = new ContextMenuItem("Brandon Muncy - LEAD ARTIST/ANIMATOR", noClick);
credits4 = new ContextMenuItem("Michael Cairns - COMPOSER", noClick);
rMenu.customItems.push(credits1);
rMenu.customItems.push(credits2);
rMenu.customItems.push(credits3);
rMenu.customItems.push(credits4);
_root.menu = rMenu;
Frame 2
function noClick() {
}
NewgroundsAPI.connectMovie(6118);
user_so = SharedObject.getLocal("user");
if ((user_so.data.soGameComplete == undefined) || (user_so.data.soGameComplete == null)) {
user_so.data.soGameComplete = false;
}
_root.grab = false;
rMenu = new ContextMenu();
rMenu.hideBuiltInItems();
credits1 = new ContextMenuItem("BARBARIAN BOB \u00A9 BORDERLINE", noClick);
credits2 = new ContextMenuItem("Brendan Bennett - PROGRAMMER. ASSIS/ANIMATOR. SOUND FX", noClick);
credits3 = new ContextMenuItem("Brandon Muncy - LEAD ARTIST/ANIMATOR", noClick);
credits4 = new ContextMenuItem("Michael Cairns - COMPOSER", noClick);
rMenu.customItems.push(credits1);
rMenu.customItems.push(credits2);
rMenu.customItems.push(credits3);
rMenu.customItems.push(credits4);
_root.menu = rMenu;
Diff = "easy";
depth = 110;
overDepth = 1000;
levelLoaded = false;
levelNum = 0;
levelRightCap = 50;
levelLeftCap = 30;
setKeyText = "";
globalsound = new Sound();
gVol = 100;
cheatsHaveBeenActivated = false;
levelSelectUsed = false;
enableCheats = false;
godMode = false;
infiniteHealth = false;
infiniteLives = false;
infiniteDefence = false;
infiniteAttack = false;
heroLife = 100;
hasBow = false;
heroArrow = false;
lives = 3;
loot = 0;
lootLifeCount = 0;
heroDef = 61;
defTimer = 0;
defDelay = 0;
heroStatus = "standing";
hero2Status = "nothing";
isNinja = false;
selectedCharacter = "hero";
switchCharacters = false;
xSpeed = 0;
ySpeed = 0;
dir = "right";
AttackTimer = 0;
Left = 65;
Right = 68;
Down = 83;
Jump = 75;
Attack = 74;
Shield = 76;
Pause = 81;
showLeft = "A";
showRight = "D";
showDown = "S";
showJump = "K";
showAttack = "J";
showShield = "L";
showPause = "Q";
tempCode = "";
gPixel = 0;
gPixelX = 0;
gPixelY = 0;
Col = 0;
ach01 = false;
ach01void = false;
ach02 = false;
ach02void = false;
ach03 = false;
ach03count = 0;
ach03void = false;
ach04 = false;
ach04void = false;
ach05 = false;
ach05void = false;
ach06 = false;
ach06void = false;
ach07 = false;
ach07void = false;
ach08 = false;
ach08void = false;
achAmount = 0;
secret01 = false;
secret02 = false;
secret03 = false;
secret04 = false;
secret05 = false;
secretsFound = 0;
killB = 0;
parryB = 0;
blockB = 0;
hitB = 0;
hurtB = 0;
diedB = 0;
finishedTheGame = false;
gameComplete = false;
camStop = false;
hudPos = "botLeft";
diedTimer = 0;
arrowX = 0;
arrowY = 0;
msTimer = 0;
secondTimer = 0;
minuteTimer = 0;
levelChangeFadeVar = false;
totalKills = 0;
bossMode = false;
levelChangeCheck = true;
igMenu = false;
enemyUnpause = false;
Paused = false;
pauseTimer = 0;
dragNow = false;
pWait = 10;
Reset = false;
totalAch = 0;
volSub = 100;
globalVolMemory = 100;
initMusicFadeOut = false;
initMusicFadeIn = false;
cheatLevelSelected = 0;
camBindY = false;
noGoBack = false;
vCamHW = _root.vCam._x - (_root.vCam._width / 2);
loadNG = true;
backToTitleScreen = false;
narrative = false;
narrativePointX = 0;
narrativePointY = 0;
cutscene01Played = false;
cutscene02Played = false;
cutscene03Played = false;
cutscene04Played = false;
cutscene05Played = false;
cutscene06Played = false;
firstEncounter = true;
secondEncounter = false;
showTut = true;
if (_root.finishedTheGame == true) {
showTut = false;
}
terrenceTut = false;
bowTut = false;
parryTut = false;
parryVar = ("Press '" + showAttack) + "' to Parry your enemy";
parryMaceTut = false;
parryMaceTutVar = ("Press '" + showShield) + "' to block your enemy";
terrenceTutVar = ("Press '" + showShield) + "' to fire a shuriken";
bowTutVar = ((("Press '" + showShield) + "' and then '") + showAttack) + "'";
shieldTut = false;
waitForBoss = false;
bossFallsToDoom = false;
walkedToBoss = false;
bmPause = false;
weatherDepth = 10000;
rainAmount = 0;
rDropRot = 0;
windXSpeed = -5;
windYSpeed = 30;
rainIncreaseTimer = 0;
RainNow = false;
lightningTimer = 0;
lightningCap = 40;
dramaticTimer = 0;
playedCredits = false;
qualityMem = "BEST";
endGameFreeze = false;
cameraShake = false;
shakeTimer = 0;
shakeCap = 20;
bossGuards = false;
bossGuardTimer = 0;
bossGuardCap = 80;
switchX = 0;
switchY = 0;
hordeMode = false;
initHordeModeVar = false;
hordeLevelLoaded = false;
soundBarMemory = 100;
hmDiscRead = false;
checkForMedals = true;
rainVol = 0;
rainSound = 0;
firstShowControls = true;
onEnterFrame = function () {
function playTestSound() {
randomSound = random(4);
testSound = new Sound(_root);
testSound.attachSound(["sound" + randomSound]);
testSound.start(0, 1);
}
function initEnemies() {
i = 0;
while (i < 10) {
newEnemy = _root.bg.attachMovie("enemy1", "enemy1" + _root.depth, _root.depth++);
newEnemy.onEnterFrame = function () {
if (_root.levelNum == 1) {
narrativePointX = this._x;
narrativePointY = this._y;
if (_root.forceParry == true) {
this.gotoAndStop("parry");
_root.forceParry = false;
}
}
if (_root.Reset == true) {
this.removeMovieClip();
}
if ((_root.enemyUnpause == true) && (this.eStatus != "dead")) {
this.stand.play();
this.walk.play();
this.attack.play();
this.parry.play();
this.shieldHit.play();
this.hurt.play();
this.die.play();
}
if (((_root.narrative == true) && (this._currentframe != "stand")) && (this.eStatus != "dead")) {
this.gotoAndStop("stand");
}
if (this.newEnemy == undefined) {
this.eLife = 4;
this.dir = "right";
this.eStatus = "standing";
this.ySpeed = 0;
this.aTimer = 0;
this.blockCount = 0;
this.newEnemy = false;
}
if ((((((Math.abs(this._x - _root.hero._x) < 50) && (Math.abs(this._y - _root.hero._y) < 40)) && (_root.heroStatus == "powerAttack")) && (this.eStatus != "hurt")) && (this.eLife > 0)) && (this.eLife > 0)) {
this.gotoAndStop("hurt");
}
if ((Math.abs(this._x - _root.hero._x) < 600) && (Math.abs(this._y - _root.hero._y) < 400)) {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
this._y = this._y + this.ySpeed;
this.ySpeed = this.ySpeed + 1;
} else {
this.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
};
newEnemy._x = _root.bg["e1Point" + i]._x;
newEnemy._y = _root.bg["e1Point" + i]._y;
if (_root.bg["e1Point" + i] == undefined) {
newEnemy.removeMovieClip();
}
_root.bg["e1Point" + i]._visible = false;
newEnemy2 = _root.bg.attachMovie("enemy2", "enemy2" + _root.depth, _root.depth++);
newEnemy2.onEnterFrame = function () {
if (_root.Reset == true) {
this.removeMovieClip();
}
if ((_root.enemyUnpause == true) && (this.eStatus != "dead")) {
this.stand.play();
this.walk.play();
this.attack.play();
this.shieldHit.play();
this.hurt.play();
this.die.play();
}
if (((_root.narrative == true) && (this._currentframe != "stand")) && (this.eStatus != "dead")) {
this.gotoAndStop("stand");
}
if (this.newEnemy2 == undefined) {
this.eLife = 5;
this.dir = "right";
this.eStatus = "standing";
this.ySpeed = 0;
this.aTimer = 0;
this.newEnemy2 = false;
}
if ((((((Math.abs(this._x - _root.hero._x) < 100) && (Math.abs(this._y - _root.hero._y) < 50)) && (_root.heroStatus == "powerAttack")) && (this.eStatus != "hurt")) && (this.eLife > 0)) && (this.eLife > 0)) {
this.gotoAndStop("hurt");
}
if ((Math.abs(this._x - _root.hero._x) < 600) && (Math.abs(this._y - _root.hero._y) < 400)) {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
this._y = this._y + this.ySpeed;
this.ySpeed = this.ySpeed + 1;
} else {
this.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
};
newEnemy2._x = _root.bg["e2Point" + i]._x;
newEnemy2._y = _root.bg["e2Point" + i]._y;
if (_root.bg["e2Point" + i] == undefined) {
newEnemy2.removeMovieClip();
}
if (_root.Reset == true) {
this.removeMovieClip();
}
_root.bg["e2Point" + i]._visible = false;
newEnemy3 = _root.bg.attachMovie("enemy3", "enemy3" + _root.depth, _root.depth++);
newEnemy3.onEnterFrame = function () {
if (_root.Reset == true) {
this.removeMovieClip();
}
if (((_root.narrative == true) && (this._currentframe != "stand")) && (this.eStatus != "dead")) {
this.gotoAndStop("stand");
}
if ((_root.enemyUnpause == true) && (this.eStatus != "dead")) {
this.stand.play();
this.walk.play();
this.shoot.play();
this.shieldHit.play();
this.hurt.play();
this.die.play();
}
if (this.newEnemy3 == undefined) {
this.eLife = 2;
this.dir = "right";
this.eStatus = "standing";
this.ySpeed = 0;
this.aTimer = 0;
this.newEnemy3 = false;
}
if ((((((Math.abs(this._x - _root.hero._x) < 50) && (Math.abs(this._y - _root.hero._y) < 40)) && (_root.heroStatus == "powerAttack")) && (this.eStatus != "hurt")) && (this.eLife > 0)) && (this.eLife > 0)) {
this.gotoAndStop("hurt");
}
if ((Math.abs(this._x - _root.hero._x) < 600) && (Math.abs(this._y - _root.hero._y) < 400)) {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
this._y = this._y + this.ySpeed;
this.ySpeed = this.ySpeed + 1;
} else {
this.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
};
newEnemy3._x = _root.bg["e3Point" + i]._x;
newEnemy3._y = _root.bg["e3Point" + i]._y;
if (_root.bg["e3Point" + i] == undefined) {
newEnemy3.removeMovieClip();
}
if (_root.Reset == true) {
this.removeMovieClip();
}
_root.bg["e3Point" + i]._visible = false;
i++;
}
}
if (((((infiniteHealth == false) && (infiniteLives == false)) && (infiniteDefence == false)) && (infiniteAttack == false)) && (levelSelectUsed == false)) {
cheatsHaveBeenActivated = false;
}
if ((_root.enableCheats == true) && (user_so.data.soGameComplete == false)) {
user_so.data.soGameComplete = true;
}
if (Key.isDown(Attack)) {
enableCheats = true;
}
if (user_so.data.soGameComplete == true) {
_root.enableCheats = true;
}
if (checkForMedals == true) {
var _local4 = com.Newgrounds.NewgroundsAPI.getMedals();
if (_local4) {
i = 0;
while (i < _local4.length) {
var _local3 = _local4[i];
if ((_local3.medal_name == "Barbaric") && (_local3.medal_unlocked == true)) {
ach07 = true;
}
if ((_local3.medal_name == "Savage Speed") && (_local3.medal_unlocked == true)) {
_root.enableCheats = true;
ach01 = true;
}
if ((_local3.medal_name == "Carbon Copy") && (_local3.medal_unlocked == true)) {
ach03 = true;
}
if ((_local3.medal_name == "Rags to Riches") && (_local3.medal_unlocked == true)) {
ach05 = true;
}
if ((_local3.medal_name == "Warlock Holmes") && (_local3.medal_unlocked == true)) {
ach06 = true;
}
if ((_local3.medal_name == "Barbarian King") && (_local3.medal_unlocked == true)) {
_root.enableCheats = true;
ach08 = true;
}
if ((_local3.medal_name == "Invincibob") && (_local3.medal_unlocked == true)) {
_root.enableCheats = true;
ach02 = true;
}
if ((_local3.medal_name == "Shieldless Wonder") && (_local3.medal_unlocked == true)) {
_root.enableCheats = true;
ach04 = true;
}
checkForMedals = false;
i++;
}
} else {
checkForMedals = false;
}
}
if (_root.switchCharacters == true) {
switchX = _root.hero._x;
switchY = _root.hero._y;
_root.hero.removeMovieClip();
hero = _root.attachMovie(_root.selectedCharacter, "hero", 102);
hero._x = switchX;
hero._y = switchY;
hero.onEnterFrame = function () {
if (_root.bossMode == false) {
bmTimer = 0;
}
if ((_root.bossMode == true) || (_root.endGameFreeze == true)) {
bmTimer = bmTimer + 1;
}
if (((bmTimer < 300) && (_root.waitForBoss == true)) || ((bmTimer < 300) && (_root.endGameFreeze == true))) {
_root.bmPause = true;
this.gotoAndStop("stand");
}
if (bmTimer > 300) {
_root.waitForBoss = false;
_root.bmPause = false;
_root.endGameFreeze = false;
bmTimer = 0;
}
if (camStop == false) {
if (this._x < _root.levelLeftCap) {
this._x = _root.levelLeftCap;
}
if (this._x > (_root.ground._width - _root.levelRightCap)) {
this._x = _root.ground._width - _root.levelRightCap;
}
}
if (camStop == true) {
if (this._x < ((_root.vCam._x - (_root.vCam._width / 2)) + 30)) {
this._x = (_root.vCam._x - (_root.vCam._width / 2)) + 30;
}
if (this._x > ((_root.vCam._x + (_root.vCam._width / 2)) - 30)) {
this._x = (_root.vCam._x + (_root.vCam._width / 2)) - 30;
}
}
if (((camBindY == true) && (Math.abs(_root.bg.treeTriggerEnd._x - _root.hero._x) > 5)) && (Math.abs(_root.bg.treeTriggerEnd._y - _root.hero._y) > 15)) {
if (this._x > ((_root.vCam._x + (_root.vCam._width / 2)) - 30)) {
this._x = (_root.vCam._x + (_root.vCam._width / 2)) - 30;
}
if (this._x < (_root.vCam._x - (_root.vCam._width / 2))) {
this._x = _root.vCam._x - (_root.vCam._width / 2);
}
}
if ((_root.Paused == true) && (_root.narrative == false)) {
} else if ((_root.Paused == true) && (_root.narrative == true)) {
if (_root.heroStatus != "jumping") {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
_root.hero._y = _root.hero._y + _root.ySpeed;
_root.ySpeed = _root.ySpeed + 1;
} else {
_root.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
} else if (_root.heroStatus != "jumping") {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
_root.hero._y = _root.hero._y + _root.ySpeed;
_root.ySpeed = _root.ySpeed + 1;
} else {
_root.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
if (((_root.vCam._y > 300) && (_root.bg.onGap.hitTest(this._x, this._y, true))) && (_root.heroStatus != "falling")) {
_root.camStop = true;
_root.hero.gotoAndStop("fallSpawn");
}
if (_root.narrative == true) {
this.gotoAndStop("stand");
}
};
_root.switchCharacters = false;
}
if (((_root.bossGuards == true) && (_root.bossMode == true)) && (_root.Boss.eStatus != "dead")) {
_root.bossGuardTimer = _root.bossGuardTimer + 1;
if (_root.bossGuardTimer > _root.bossGuardCap) {
bossEnemy = _root.attachMovie("enemy1", "enemy1" + _root.depth, _root.depth++);
if (_root.hero._x < 1160) {
bossEnemy._x = 1620;
bossEnemy._y = _root.hero._y - 10;
}
if (_root.hero._x > 1160) {
bossEnemy._x = 650;
bossEnemy._y = _root.hero._y - 10;
}
bossEnemy.onEnterFrame = function () {
if (_root.Boss.eStatus == "dead") {
this.gotoAndStop("die");
}
if (_root.Reset == true) {
this.removeMovieClip();
}
if ((_root.enemyUnpause == true) && (this.eStatus != "dead")) {
this.stand.play();
this.walk.play();
this.attack.play();
this.parry.play();
this.shieldHit.play();
this.hurt.play();
this.die.play();
}
if (((_root.narrative == true) && (this._currentframe != "stand")) && (this.eStatus != "dead")) {
this.gotoAndStop("stand");
}
if (this.newEnemy == undefined) {
this.eLife = 4;
this.dir = "right";
this.eStatus = "standing";
this.ySpeed = 0;
this.aTimer = 0;
this.blockCount = 0;
this.newEnemy = false;
}
if ((((((Math.abs(this._x - _root.hero._x) < 50) && (Math.abs(this._y - _root.hero._y) < 40)) && (_root.heroStatus == "powerAttack")) && (this.eStatus != "hurt")) && (this.eLife > 0)) && (this.eLife > 0)) {
this.gotoAndStop("hurt");
}
if ((Math.abs(this._x - _root.hero._x) < 600) && (Math.abs(this._y - _root.hero._y) < 400)) {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
this._y = this._y + this.ySpeed;
this.ySpeed = this.ySpeed + 1;
} else {
this.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
};
if (_root.Diff == "easy") {
_root.bossGuardCap = 460;
}
if (_root.Diff == "hard") {
_root.bossGuardCap = 300;
}
_root.bossGuardTimer = 0;
}
}
if (lootLifeCount >= 5000) {
lives = lives + 1;
oneup = _root.attachMovie("oneup", "oneup", _root.overDepth++);
lootLifeCount = 0;
}
oneup.onEnterFrame = function () {
this._x = _root.hero._x;
this._y = _root.hero._y;
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
if (_root.bg.secret.hitTest(_root.hero) && (_root.bg.secret._currentframe == 1)) {
_root.bg.secret.play();
if ((_root.levelNum == 2) && (_root.secret01 == false)) {
_root.secretsFound = _root.secretsFound + 1;
_root.secret01 = true;
}
if ((_root.levelNum == 3) && (_root.secret02 == false)) {
_root.secretsFound = _root.secretsFound + 1;
_root.secret02 = true;
}
if ((_root.levelNum == 4) && (_root.secret03 == false)) {
_root.secretsFound = _root.secretsFound + 1;
_root.secret03 = true;
}
if ((_root.levelNum == 5) && (_root.secret04 == false)) {
_root.secretsFound = _root.secretsFound + 1;
_root.secret04 = true;
}
if ((_root.levelNum == 6) && (_root.secret05 == false)) {
_root.secretsFound = _root.secretsFound + 1;
_root.secret05 = true;
}
}
if (_root.bg.secret._currentframe == _root.bg.secret._totalframes) {
_root.bg.secret.stop();
}
if (cameraShake == true) {
this._x = this._x + (random(25) - 15);
this._y = this._y + (random(25) - 15);
shakeTimer = shakeTimer + 1;
if (shakeTimer > shakeCap) {
shakeTimer = 0;
shakeCap = 20;
cameraShake = false;
}
}
if (((_root.walkedToBoss == true) && (_root.rainAmount <= 0)) && (_root.playedCredits == false)) {
dramaticTimer = dramaticTimer + 1;
if (dramaticTimer > 90) {
eC = _root.attachMovie("endCredits", "endCredits", _root.overDepth++);
eC.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (this._currentframe == (this._totalframes - 1)) {
_root.Reset = true;
_root.spawnEnemyCheat();
_root.enableCheats = true;
_root.levelSelectUsed = false;
_root.cheatsHaveBeenActivated = false;
_root.levelNum = -1;
_root.levelChangeFadeVar = true;
_root.hud.removeMovieClip();
_root.igOptions.removeMovieClip();
_root.hero.removeMovieClip();
}
if (this._currentframe == this._totalframes) {
this.stop();
}
};
_root.playedCredits = true;
dramaticTimer = 0;
}
_root.gameComplete = true;
}
if (weatherDepth == 11000) {
weatherDepth = 10000;
}
if (_root.rainAmount < 0) {
_root.RainNow = false;
}
if (_root.gameComplete == true) {
RainNow = false;
lightningTimer = 0;
}
if (RainNow == true) {
if (rainSound == false) {
rsMC = _root.attachMovie("rainSoundMC", "rainSoundMC", _root.depth++);
rsMC._visible = false;
rainSound = true;
}
if (_root.Paused == false) {
lightningTimer = lightningTimer + 1;
}
if ((lightningTimer > lightningCap) && (_root.Boss.eStatus != "dead")) {
lightning = _root.pg.attachMovie("lightning", "lightning", _root.depth++);
lightning._x = random(500) + 50;
lightning._y = random(-30);
lightningCap = random(250) + 50;
lightning.onEnterFrame = function () {
if (_root.Paused == true) {
this.stop();
}
if (_root.enemyUnpause == true) {
this.play();
}
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
lightningFlash = _root.attachMovie("lightningFlash", "lightningFlash", _root.overDepth++);
lightningFlash.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (_root.Paused == true) {
this.stop();
}
if (_root.enemyUnpause == true) {
this.play();
}
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
lightningTimer = 0;
lightningCap = random(400) + 1;
}
Rain();
rainIncreaseTimer = rainIncreaseTimer + 1;
if (((rainIncreaseTimer > 100) && (rainAmount < 18)) && (_root.hero._currentframe != 95)) {
rainAmount = rainAmount + 1;
rainIncreaseTimer = 0;
}
}
globalVol = _root.globalsound.getVolume();
vCamHW = _root.vCam._x - (_root.vCam._width / 2);
if (loadNG == true) {
nAPI = _root.attachMovie("NewgroundsAPI_Connector", "NewgroundsAPI_Connector", 1001);
nAPI.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
var _local3 = _root.attachMovie("medal_popup", "medal_popup", 55000);
_local3.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
loadNG = false;
}
if (Reset == true) {
depth = 110;
overDepth = 1000;
levelRightCap = 50;
levelLeftCap = 30;
setKeyText = "";
godMode = false;
infiniteHealth = false;
infiniteLives = false;
infiniteDefence = false;
infiniteAttack = false;
heroLife = 100;
hasBow = false;
heroArrow = false;
lives = 3;
heroDef = 61;
defTimer = 0;
defDelay = 0;
heroStatus = "standing";
xSpeed = 0;
ySpeed = 0;
dir = "right";
AttackTimer = 0;
ach01void = false;
ach02void = false;
ach03void = false;
ach04void = false;
ach05void = false;
ach06void = false;
ach07void = false;
ach08void = false;
gameComplete = false;
camStop = false;
diedTimer = 0;
arrowX = 0;
arrowY = 0;
msTimer = 0;
secondTimer = 0;
minuteTimer = 0;
bossMode = false;
igMenu = false;
enemyUnpause = false;
Paused = false;
pauseTimer = 0;
dragNow = false;
pWait = 10;
Reset = false;
camBindY = false;
noGoBack = false;
cheatsHaveBeenActivated = false;
narrative = false;
cutscene01Played = false;
cutscene02Played = false;
cutscene03Played = false;
cutscene04Played = false;
cutscene05Played = false;
cutscene06Played = false;
firstEncounter = true;
secondEncounter = false;
parryTut = false;
parryVar = ("Press '" + showAttack) + "' to Parry your enemy";
parryMaceTut = false;
parryMaceTutVar = ("Press '" + showShield) + "' to block your enemy";
terrenceTutVar = ("Press '" + showShield) + "' to fire a shuriken";
bowTutVar = ((("Press '" + showShield) + "' and then '") + showAttack) + "'";
shieldTut = false;
waitForBoss = false;
bossFallsToDoom = false;
walkedToBoss = false;
bmPause = false;
weatherDepth = 10000;
rainAmount = 0;
rDropRot = 0;
windXSpeed = -5;
windYSpeed = 30;
rainIncreaseTimer = 0;
RainNow = false;
rainSound = false;
playedCredits = false;
lightningTimer = 0;
lightningCap = 40;
terrenceTut = false;
selectedHero = "hero";
isNinja = false;
}
if (pWait < 10) {
pWait++;
}
if (enemyUnpause == true) {
pauseTimer++;
if (pauseTimer > 10) {
_root.enemyUnpause = false;
pauseTimer = 0;
}
}
if (Paused == true) {
pauseTimer++;
if (pauseTimer > 20) {
if (Key.isDown(_root.Pause) && (_root.igOptions != undefined)) {
_root.igMenu = false;
_root.Paused = false;
_root.hero.stand.play();
_root.hero.walk.play();
_root.hero.parry.play();
_root.hero.jump.play();
_root.hero.drop.play();
_root.hero.slash.play();
_root.hero.stab.play();
_root.hero.shield.play();
_root.hero.shieldHit.play();
_root.hero.hurt.play();
_root.hero.die.play();
_root.hero.spawn.play();
_root.hero.throw.play;
_root.hero.jumpThrow.play;
_root.hero.jumpAttack.play;
_root.enemyUnpause = true;
_root.igOptions.removeMovieClip();
pWait = 0;
pauseTimer = 0;
}
}
}
if ((igMenu == false) && (_root.igOptions == undefined)) {
if (((((Key.isDown(_root.Pause) && (_root.Paused == false)) && (_root.levelNum > 0)) && (pWait > 5)) && (narrative == false)) && (_root.walkedToBoss == false)) {
_root.Paused = true;
igOp = _root.attachMovie("igOptions", "igOptions", _root.overDepth++);
igOp._x = _root.vCam._x - (_root.vCam._width / 2);
igOp._y = _root.vCam._y - (_root.vCam._height / 2);
igOp.onEnterFrame = function () {
if (_root.levelNum == 6) {
this.swapDepths(100000);
}
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
_root.igOptions.igSoundMC.bar._x = _root.globalVol;
igMenu = true;
}
}
if (!Key.isDown(_root.Pause)) {
igMenu = false;
}
if ((_root.bg.narrativeBox.hitTest(_root.hero._x, _root.hero._y, true) && (_root.levelNum == 1)) && (_root.cutscene01Played == false)) {
cutscene = _root.attachMovie("cutscene01", "cutscene", _root.depth++);
cutscene.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (Key.isDown(_root.Attack) && (this._currentframe > 50)) {
_root.AttackTimer = 10;
this.gotoAndStop(this._totalframes);
}
if (this._currentframe == this._totalframes) {
_root.narrative = false;
this.removeMovieClip();
}
};
_root.narrative = true;
_root.cutscene01Played = true;
}
if ((_root.bg.narrativeBox.hitTest(_root.hero._x, _root.hero._y, true) && (_root.levelNum == 2)) && (_root.cutscene02Played == false)) {
cutscene = _root.attachMovie("cutscene02", "cutscene", _root.overDepth++);
cutscene.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (Key.isDown(_root.Attack)) {
_root.AttackTimer = 10;
this.gotoAndStop(this._totalframes);
}
if (this._currentframe == this._totalframes) {
_root.narrative = false;
this.removeMovieClip();
}
};
_root.narrative = true;
_root.cutscene02Played = true;
}
if ((_root.noGoBack == false) && (vCamHW > _root.bg.treeTriggerStart._x)) {
_root.camBindY = true;
}
if (_root.hero._x > _root.bg.treeTriggerEnd._x) {
_root.noGoBack = true;
_root.camBindY = false;
}
if (_root.noGoBack == true) {
if (_root.hero._x <= _root.bg.treeTriggerEnd._x) {
_root.hero._x = _root.bg.treeTriggerEnd._x;
}
}
if (_root.fg.treeCover._alpha < 0) {
_root.fg.treeCover._alpha = 0;
}
if (_root.fg.treeCover._alpha > 100) {
_root.fg.treeCover._alpha = 100;
}
if (_root.fg.treeCover.hitTest(_root.hero._x, _root.hero._y, true) && (_root.fg.treeCover._alpha != 0)) {
_root.fg.treeCover._alpha = _root.fg.treeCover._alpha - 2;
}
if (_root.bg.pillarHit.hitTest(_root.hero) && (_root.heroStatus == "parrying")) {
if (_root.bg.pillar._currentframe == 1) {
_root.bg.pillar.play();
}
if (_root.bg.pillar._currentframe == 7) {
_root.bg.pillar.play();
}
}
if (_root.bg.pillar._currentframe == 140) {
_root.g.pillarGround.gotoAndStop("pillarDown");
}
if (_root.bg.spikes.hitTest(_root.hero._x, _root.hero._y, true)) {
if (_root.godMode == false) {
_root.attackAmount = 30;
_root.hero.gotoAndStop("hurt");
}
}
if (_root.hero.hitTest(_root.bg.bossPoint1) && (cutscene04Played == false)) {
_root.bossMode = true;
}
if (_root.hero.hitTest(_root.bg.bossPoint2) && (cutscene05Played == false)) {
_root.bossMode = true;
_root.secondEncounter = true;
}
if (_root.bossMode == true) {
_root.g.trapDoor.gotoAndStop(2);
if (_root.firstEncounter == true) {
_root.waitForBoss = true;
}
if (_root.secondEncounter == true) {
_root.waitForBoss = true;
}
if (_root.hero._x < (_root.bg.BossXmin._x - _root.bg._x)) {
_root.hero._x = _root.bg.BossXmin._x - _root.bg._x;
}
if (_root.hero._x > (_root.bg.BossXmax._x - _root.bg._x)) {
_root.hero._x = _root.bg.BossXmax._x - _root.bg._x;
}
if (_root.Boss == undefined) {
BossMC = _root.attachMovie("Boss", "Boss", 101);
BossMC._x = 0;
BossMC.gotoAndStop("takeOff");
BossMC.takeOff.gotoAndPlay(15);
BossMC._x = _root.hero._x;
if (_root.levelNum == 5) {
BossMC._y = _root.bg.bossPoint1._y;
}
if (_root.levelNum == 6) {
BossMC._y = _root.bg.bossPoint2._y;
}
BossMC.onEnterFrame = function () {
if (_root.Reset == true) {
this.removeMovieClip();
}
if ((_root.enemyUnpause == true) && (this.eLife != 0)) {
this.stand.play();
this.takeOff.play();
this.getUp.play();
if (this.drop._currentframe != this.drop._totalframes) {
this.drop.play();
}
this.eat.play();
this.hurt.play();
}
if ((_root.narrative == true) && (this._currentframe != "stand")) {
this.gotoAndStop("stand");
}
if (this.newEnemy == undefined) {
this.waitToDie = false;
if (_root.Diff == "easy") {
this.eLife = 5;
}
if (_root.Diff == "hard") {
this.eLife = 7;
}
this.dir = "left";
this.eStatus = "standing";
this.newEnemy = false;
}
if (((this.waitToDie == true) && (this._currentframe != 1)) && (_root.bossFallsToDoom == false)) {
this.gotoAndStop(1);
}
if (this._currentframe == 11) {
if (this._x < _root.hero._x) {
this._xscale = -100;
}
if (this._x > _root.hero._x) {
this._xscale = 100;
}
}
};
}
}
if (((_root.levelNum == 6) && (_root.hero._x < 668)) && (_root.hero._y < -70)) {
_root.hero._x = 668;
}
_root.bg.endBox._visible = false;
if ((_root.bg.endBox.hitTest(_root.hero._x, _root.hero._y, true) && (levelChangeFadeVar == false)) && (_root.lcf == undefined)) {
levelChangeFadeVar = true;
}
if ((cheatsHaveBeenActivated == false) && (levelSelectUsed == false)) {
if (_root.hordeMode == false) {
msTimer = msTimer + 1;
if (msTimer == 30) {
secondTimer = secondTimer + 1;
msTimer = 0;
}
if (secondTimer == 60) {
minuteTimer = minuteTimer + 1;
secondTimer = 0;
}
if (minuteTimer > 10) {
ach01void = true;
}
if (gameComplete == true) {
if ((ach01void == false) && (ach01 == false)) {
_root.medal_popup.unlockMedal("Savage Speed");
ach01 = true;
_root.totalAch = _root.totalAch + 1;
ach01void = true;
}
ach01GFX.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = (_root.vCam._y - (_root.vCam._height / 2)) - this.achAmount;
if (this.timer == undefined) {
this.timer = 0;
}
if (this._currentframe == this._totalframes) {
this.stop();
this.timer = this.timer + 1;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
}
if (this._alpha <= 0) {
_root.achAmount = _root.achAmount - 68;
this.removeMovieClip();
}
}
};
}
}
if (gameComplete == true) {
if ((ach02void == false) && (ach02 == false)) {
_root.medal_popup.unlockMedal("InvinciBob");
ach02 = true;
_root.totalAch = _root.totalAch + 1;
ach02void = true;
}
ach02GFX.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = (_root.vCam._y - (_root.vCam._height / 2)) - this.achAmount;
if (this.timer == undefined) {
this.timer = 0;
}
if (this._currentframe == this._totalframes) {
this.stop();
this.timer = this.timer + 1;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
}
if (this._alpha <= 0) {
_root.achAmount = _root.achAmount - 68;
this.removeMovieClip();
}
}
};
}
if (ach03count >= 5) {
if ((ach03void == false) && (ach03 == false)) {
_root.medal_popup.unlockMedal("Carbon Copy");
ach03 = true;
_root.totalAch = _root.totalAch + 1;
ach03void = true;
}
ach03GFX.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = (_root.vCam._y - (_root.vCam._height / 2)) - this.achAmount;
if (this.timer == undefined) {
this.timer = 0;
}
if (this._currentframe == this._totalframes) {
this.stop();
this.timer = this.timer + 1;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
}
if (this._alpha <= 0) {
_root.achAmount = _root.achAmount - 68;
this.removeMovieClip();
}
}
};
}
if (gameComplete == true) {
if ((ach04void == false) && (ach04 == false)) {
_root.medal_popup.unlockMedal("Shieldless Wonder");
ach04 = true;
_root.totalAch = _root.totalAch + 1;
ach04void = true;
}
ach04GFX.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = (_root.vCam._y - (_root.vCam._height / 2)) - this.achAmount;
if (this.timer == undefined) {
this.timer = 0;
}
if (this._currentframe == this._totalframes) {
this.stop();
this.timer = this.timer + 1;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
}
if (this._alpha <= 0) {
_root.achAmount = _root.achAmount - 68;
this.removeMovieClip();
}
}
};
}
if (loot >= 20000) {
if ((ach05void == false) && (ach05 == false)) {
_root.medal_popup.unlockMedal("Rags to Riches");
ach05 = true;
_root.totalAch = _root.totalAch + 1;
ach05void = true;
}
ach05GFX.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = (_root.vCam._y - (_root.vCam._height / 2)) - this.achAmount;
if (this.timer == undefined) {
this.timer = 0;
}
if (this._currentframe == this._totalframes) {
this.stop();
this.timer = this.timer + 1;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
}
if (this._alpha <= 0) {
_root.achAmount = _root.achAmount - 68;
this.removeMovieClip();
}
}
};
}
if ((secretsFound == 5) && (ach06 == false)) {
if ((ach06void == false) && (ach06 == false)) {
_root.medal_popup.unlockMedal("Warlock Holmes");
ach06 = true;
_root.totalAch = _root.totalAch + 1;
ach06void = true;
}
ach06GFX.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = (_root.vCam._y - (_root.vCam._height / 2)) - this.achAmount;
if (this.timer == undefined) {
this.timer = 0;
}
if (this._currentframe == this._totalframes) {
this.stop();
this.timer = this.timer + 1;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
}
if (this._alpha <= 0) {
_root.achAmount = _root.achAmount - 68;
this.removeMovieClip();
}
}
};
}
if (totalKills == 50) {
if ((ach07void == false) && (ach07 == false)) {
_root.medal_popup.unlockMedal("Barbaric");
ach07 = true;
_root.totalAch = _root.totalAch + 1;
ach07void = true;
}
ach07GFX.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = (_root.vCam._y - (_root.vCam._height / 2)) - this.achAmount;
if (this.timer == undefined) {
this.timer = 0;
}
if (this._currentframe == this._totalframes) {
this.stop();
this.timer = this.timer + 1;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
}
if (this._alpha <= 0) {
_root.achAmount = _root.achAmount - 68;
this.removeMovieClip();
}
}
};
}
if (((((((_root.ach01 == true) && (_root.ach02 == true)) && (_root.ach03 == true)) && (_root.ach04 == true)) && (_root.ach05 == true)) && (_root.ach06 == true)) && (_root.ach07 == true)) {
if (ach08 == false) {
_root.medal_popup.unlockMedal("Barbarian King");
ach08 = true;
}
ach08GFX.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = (_root.vCam._y - (_root.vCam._height / 2)) - this.achAmount;
if (this.timer == undefined) {
this.timer = 0;
}
if (this._currentframe == this._totalframes) {
this.stop();
this.timer = this.timer + 1;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
}
if (this._alpha <= 0) {
_root.achAmount = _root.achAmount - 68;
this.removeMovieClip();
}
}
};
}
}
if (_root.heroStatus == "died") {
_root.hero._alpha = 50;
}
if (_root.hero._alpha == 50) {
diedTimer = diedTimer + 1;
_root.godMode = true;
if (diedTimer > 120) {
_root.hero._alpha = 100;
_root.godMode = false;
diedTimer = 100;
}
}
if (_root.levelNum == 0) {
if (dragNow == true) {
_root.soundBarMemory = _root.bg.igSoundMC._xmouse;
if ((_root.bg.igSoundMC.bar._x > 0) || (_root.bg.igSoundMC.bar._x < 100)) {
_root.bg.igSoundMC.bar._x = _root.bg.igSoundMC._xmouse;
}
if (_root.bg.igSoundMC.bar._x < 0) {
_root.bg.igSoundMC.bar._x = 0;
}
if (_root.bg.igSoundMC.bar._x > 100) {
_root.bg.igSoundMC.bar._x = 100;
}
_root.gVol = _root.bg.igSoundMC.bar._x;
_root.globalsound.setVolume(_root.bg.igSoundMC.bar._x);
}
_root.bg.igSoundMC.volNum.text = globalsound.getVolume();
_root.bg.soundMC.testBtn.onRelease = function () {
playTestSound();
};
_root.bg.igSoundMC.testBtn.onRelease = function () {
playTestSound();
};
}
_root.gVol = _root.igOptions.igSoundMC.bar._x;
onMouseDown = function () {
if (_root.bg.igSoundMC.bar.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.globalVolMemory = _root.globalVol;
dragNow = true;
}
if (_root.igOptions.igSoundMC.bar.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.globalVolMemory = _root.globalVol;
dragNow = true;
}
};
onMouseUp = function () {
dragNow = false;
};
if (dragNow == true) {
if ((_root.igOptions.igSoundMC.bar._x > 0) || (_root.igOptions.igSoundMC.bar._x < 100)) {
_root.igOptions.igSoundMC.bar._x = _root.igOptions.igSoundMC._xmouse;
}
if (_root.igOptions.igSoundMC.bar._x < 0) {
_root.igOptions.igSoundMC.bar._x = 0;
}
if (_root.igOptions.igSoundMC.bar._x > 100) {
_root.igOptions.igSoundMC.bar._x = 100;
}
_root.globalsound.setVolume(_root.bg.igSoundMC.bar._x);
if (_root.levelNum != 0) {
_root.soundBarMemory = _root.igOptions.igSoundMC._xmouse;
if ((_root.igOptions.igSoundMC.bar._x > 0) || (_root.igOptions.igSoundMC.bar._x < 100)) {
_root.igOptions.igSoundMC.bar._x = _root.igOptions.igSoundMC._xmouse;
}
if (_root.igOptions.igSoundMC.bar._x < 0) {
_root.igOptions.igSoundMC.bar._x = 0;
}
if (_root.igOptions.igSoundMC.bar._x > 100) {
_root.igOptions.igSoundMC.bar._x = 100;
}
_root.globalsound.setVolume(_root.igOptions.igSoundMC.bar._x);
}
}
_root.bg.soundMC.volNum.text = globalsound.getVolume();
_root.igOptions.igSoundMC.volNum.text = globalsound.getVolume();
_root.bg.soundMC.testBtn.onRelease = function () {
playTestSound();
};
_root.igOptions.igSoundMC.testBtn.onRelease = function () {
playTestSound();
};
if (_root.heroStatus != "shielding") {
if (_root.xSpeed >= 8) {
_root.xSpeed = 8;
} else if (_root.xSpeed <= -8) {
_root.xSpeed = -8;
}
} else if (_root.xSpeed >= 4) {
_root.xSpeed = 4;
} else if (_root.xSpeed <= -4) {
_root.xSpeed = -4;
}
if (_root.AttackTimer <= 0) {
_root.AttackTimer = 0;
}
if (_root.AttackTimer > 0) {
_root.AttackTimer = _root.AttackTimer - 1;
}
_root.hud.lifeBar.life._width = _root.heroLife;
_root.hud.defBar.def._width = _root.heroDef;
_root.hud.lives.text = _root.lives;
if (_root.heroLife > 100) {
_root.heroLife = 100;
}
if (_root.heroLife < 0) {
_root.heroLife = 0;
}
if (_root.defTimer > 0) {
_root.defTimer = _root.defTimer - 1;
}
if (_root.defTimer < 0) {
_root.defTimer = 0;
}
if (_root.defDelay < 0) {
_root.defDelay = 0;
}
if (((!Key.isDown(_root.Shield)) && (_root.defDelay == 0)) && (_root.defTimer == 0)) {
if (_root.heroDef < 60) {
_root.heroDef = _root.heroDef + 1;
}
if (_root.heroDef > 61) {
_root.heroDef == 61;
}
if (_root.heroDef < 0) {
_root.heroDef == 0;
}
}
_root.hud.loot.text = _root.loot;
if (levelLoaded == false) {
_root.hud.removeMovieClip();
_root.bg.removeMovieClip();
_root.pg.removeMovieClip();
_root.g.removeMovieClip();
_root.fg.removeMovieClip();
_root.hero.removeMovieClip();
pg = _root.attachMovie(("level" + levelNum) + "pg", "pg", 99);
pg.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
level = _root.attachMovie(("level" + levelNum) + "bg", "bg", 100);
level._x = 0;
level._y = 0;
ground = _root.attachMovie(("level" + levelNum) + "g", "g", 98);
ground._x = 0;
ground._y = 0;
newMusic.music.stop();
newMusic = ["music" + levelNum];
newMusic.music = new Sound();
newMusic.music.attachSound(("level" + levelNum) + "music");
newMusic.music.start(0, 99);
if (_root.levelNum != 0) {
_root.ySpeed = 0;
_root.xSpeed = 0;
if (_root.vCam._x == undefined) {
vCam = _root.attachMovie("vCam", "vCam", _root.overDepth++);
}
vCam._x = 275;
vCam._y = 150;
hero = _root.attachMovie(_root.selectedCharacter, "hero", 102);
if (_root.levelNum == 1) {
hero._x = _root.vCam._x - 120;
hero._y = _root.vCam._y + 130;
}
if (_root.levelNum == 2) {
_root.qualityMem = _root._quality;
if ((_root._quality == "BEST") || (_root._quality == "HIGH")) {
_root._quality = "MEDIUM";
}
hero._x = _root.vCam._x - 350;
hero._y = _root.vCam._y + 130;
}
if (_root.levelNum == 3) {
_root._quality = _root.qualityMem;
hero._x = _root.vCam._x - 120;
hero._y = _root.vCam._y + 120;
}
if (_root.levelNum == 4) {
vCam._x = 275;
vCam._y = 50;
hero._x = 150;
hero._y = 130;
}
if (_root.levelNum == 5) {
hero._x = _root.vCam._x - 120;
hero._y = _root.vCam._y + 30;
}
if (_root.levelNum == 6) {
hero._x = _root.vCam._x - 120;
hero._y = _root.vCam._y + 110;
}
hero.onEnterFrame = function () {
if (_root.bossMode == false) {
bmTimer = 0;
}
if ((_root.bossMode == true) || (_root.endGameFreeze == true)) {
bmTimer = bmTimer + 1;
}
if (((bmTimer < 300) && (_root.waitForBoss == true)) || ((bmTimer < 300) && (_root.endGameFreeze == true))) {
_root.bmPause = true;
this.gotoAndStop("stand");
}
if (bmTimer > 300) {
_root.waitForBoss = false;
_root.bmPause = false;
_root.endGameFreeze = false;
bmTimer = 0;
}
if (camStop == false) {
if (this._x < _root.levelLeftCap) {
this._x = _root.levelLeftCap;
}
if (this._x > (_root.ground._width - _root.levelRightCap)) {
this._x = _root.ground._width - _root.levelRightCap;
}
}
if (camStop == true) {
if (this._x < ((_root.vCam._x - (_root.vCam._width / 2)) + 30)) {
this._x = (_root.vCam._x - (_root.vCam._width / 2)) + 30;
}
if (this._x > ((_root.vCam._x + (_root.vCam._width / 2)) - 30)) {
this._x = (_root.vCam._x + (_root.vCam._width / 2)) - 30;
}
}
if (((camBindY == true) && (Math.abs(_root.bg.treeTriggerEnd._x - _root.hero._x) > 5)) && (Math.abs(_root.bg.treeTriggerEnd._y - _root.hero._y) > 15)) {
if (this._x > ((_root.vCam._x + (_root.vCam._width / 2)) - 30)) {
this._x = (_root.vCam._x + (_root.vCam._width / 2)) - 30;
}
if (this._x < (_root.vCam._x - (_root.vCam._width / 2))) {
this._x = _root.vCam._x - (_root.vCam._width / 2);
}
}
if (_root.Paused == true) {
} else if (_root.heroStatus != "jumping") {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
_root.hero._y = _root.hero._y + _root.ySpeed;
_root.ySpeed = _root.ySpeed + 1;
} else {
_root.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
if ((((_root.levelNum == 4) && (_root.vCam._y > 300)) && (_root.hero._currentframe != 94)) && (_root.hero2Status != "dead")) {
_root.camStop = true;
_root.hero.gotoAndStop("fallSpawn");
}
if (_root.narrative == true) {
this.gotoAndStop("stand");
}
};
_root.vCam._x = _root.hero._x;
_root.vCam._y = _root.hero._y;
fg = _root.attachMovie(("level" + levelNum) + "fg", "fg", _root.overDepth++);
fg._x = 0;
fg._y = 0;
hud = _root.attachMovie("hud", "hud", _root.overDepth++);
hud.onEnterFrame = function () {
if (_root.hudPos == "topLeft") {
_root.hud._x = _root.vCam._x - (_root.vCam._width / 2);
_root.hud._y = _root.vCam._y - (_root.vCam._height / 2);
}
if (_root.hudPos == "botLeft") {
_root.hud._x = _root.vCam._x - (_root.vCam._width / 2);
_root.hud._y = (_root.vCam._y + (_root.vCam._height / 2)) - _root.hud._height;
}
if (_root.hudPos == "topRight") {
_root.hud._x = ((_root.vCam._x + (_root.vCam._width / 2)) - _root.hud._width) - 4;
_root.hud._y = _root.vCam._y - (_root.vCam._height / 2);
}
if (_root.hudPos == "botRight") {
_root.hud._x = ((_root.vCam._x + (_root.vCam._width / 2)) - _root.hud._width) - 4;
_root.hud._y = (_root.vCam._y + (_root.vCam._height / 2)) - _root.hud._height;
}
};
_root.camStop = false;
initEnemies();
}
levelLoaded = true;
}
if (levelChangeFadeVar == true) {
lcf = _root.attachMovie("levelChangeFade", "lcf", 50000);
lcf.onEnterFrame = function () {
if (_root.vCam == undefined) {
this._x = 0;
this._x = 0;
}
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (this._currentframe == (this._totalframes / 2)) {
if (((_root.levelNum == 4) || (_root.levelNum == 5)) || (_root.levelNum == 6)) {
_root.cutscene03Played = false;
_root.cutscene05Played = false;
}
_root.RainNow = false;
_root.rainAmount = 0;
_root.rainSound = false;
_root.rainSoundMC.removeMovieClip();
_root.bossGuards = false;
_root.bossMode = false;
_root.secondEncounter = false;
_root.Boss.removeMovieClip();
_root.hero.removeMovieClip();
_root.endCredits.removeMovieClip();
_root.levelNum = _root.levelNum + 1;
_root.levelLoaded = false;
if (_root.heroStatus == "dead") {
_root.lives = 4;
}
}
if (this._currentframe == this._totalframes) {
if (firstShowControls == true) {
sC = _root.attachMovie("showControls", "showControls", _root.overDepth++);
sC.onEnterFrame = function () {
_root.showControls.showControlsText.controlsToMove.text = ((((("Use " + _root.showLeft) + ", ") + _root.showDown) + " and ") + _root.showRight) + " to move.";
_root.showControls.showControlsText.opText.text = "You can change these at any time in the Options menu using " + _root.showPause;
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
firstShowControls = false;
}
this.removeMovieClip();
_root.lcf = undefined;
}
};
levelChangeFadeVar = false;
}
if (((_root.camStop == false) && (_root.camBindY == false)) && (_root.narrative == false)) {
if (_root.vCam._x >= (_root.g._width - 250)) {
_root.vCam._x = _root.vCam._x + (((_root.g._width - 250) - _root.vCam._x) / 3);
}
if (_root.vCam._x <= (_root.g._x + 250)) {
_root.vCam._x = _root.vCam._x + (((_root.g._x + 250) - _root.vCam._x) / 3);
}
if ((_root.vCam._y >= (_root.g._height - 120)) && (_root.hordeMode == false)) {
_root.vCam._y = _root.vCam._y + (((_root.g._height - 120) - _root.vCam._y) / 3);
}
if ((_root.dir == "right") && (_root.vCam._x != (_root.hero._x + 100))) {
_root.vCam._x = _root.vCam._x + (((_root.hero._x + 85) - _root.vCam._x) / 8);
}
if ((_root.dir == "left") && (_root.vCam._x != (_root.hero._x - 100))) {
_root.vCam._x = _root.vCam._x + (((_root.hero._x - 85) - _root.vCam._x) / 8);
}
if (_root.vCam._y != (_root.hero._y - 60)) {
_root.vCam._y = _root.vCam._y + (((_root.hero._y - 60) - _root.vCam._y) / 8);
} else if (_root.vCam._y != (_root.hero._y - 60)) {
_root.vCam._y = _root.vCam._y + (((_root.hero._y - 60) - _root.vCam._y) / 8);
}
}
if ((_root.camStop == false) && (_root.camBindY == true)) {
if (_root.vCam._y >= (_root.g._height - 120)) {
_root.vCam._y = _root.vCam._y + (((_root.g._height - 120) - _root.vCam._y) / 3);
}
if (_root.vCam._y != (_root.hero._y - 60)) {
_root.vCam._y = _root.vCam._y + (((_root.hero._y - 60) - _root.vCam._y) / 8);
} else if (_root.vCam._y != (_root.hero._y - 60)) {
_root.vCam._y = _root.vCam._y + (((_root.hero._y - 60) - _root.vCam._y) / 8);
}
}
Rain = function () {
if (_root.Paused == false) {
i = 0;
while (i < rainAmount) {
rDrop = _root.attachMovie("rainDrop", "rainDrop", _root.weatherDepth++);
rDrop._x = random(_root.vCam._x + _root.vCam._width);
rDrop._y = _root.vCam._y - (_root.vCam._width / 2);
rDrop._yscale = random(102) + 100;
rDrop.onEnterFrame = function () {
if (_root.Paused == false) {
this._y = this._y + ((_root.windYSpeed + random(4)) - 4);
this._x = this._x + _root.windXSpeed;
this._rotation = _root.rDropRot;
if ((this._y > (_root.vCam._y + _root.vCam._height)) || (_root.Reset == true)) {
this.removeMovieClip();
}
}
};
i++;
}
}
};
RainRotation = function () {
if ((_root.windXSpeed < 3) && (_root.windXSpeed > -3)) {
_root.rDropRot = 0;
} else if (_root.windXSpeed > 3) {
_root.rDropRot = -20;
} else if (_root.windXSpeed < -3) {
_root.rDropRot = 20;
}
};
if (_root.initHordeModeVar == true) {
hasBow = true;
hordeChangeFade();
msTimer = 0;
secondTimer = 0;
minuteTimer = 1;
hordeTimer.timeText.text = "00.00";
_root.initHordeModeVar = false;
}
if (ehStarted == true) {
if (_root.Paused == false) {
msTimer = msTimer + 1;
if (msTimer == 30) {
secondTracker = secondTracker + 1;
secondTimer = secondTimer - 1;
msTimer = 0;
}
if ((minuteTimer <= 0) && (secondTimer <= 0)) {
ehStarted = false;
} else if (secondTimer == 0) {
minuteTimer = minuteTimer - 1;
secondTimer = 60;
}
if (minuteTimer <= 0) {
minuteTimer = 0;
}
}
}
if (secondTracker == 60) {
minuteTracker = minuteTracker + 1;
secondTracker = 0;
}
if ((((ehTotal > 0) && (ehStarted == false)) && (ehLevelEnd == false)) || ((hordeModeHeroDead == true) && (ehLevelEnd == false))) {
initEndGame();
ehLevelEnd = true;
}
if (_root.ehStarted == true) {
if (_root.Paused == false) {
ehTimer = ehTimer - 1;
if (ehTimer <= 0) {
hordeSpawnEnemy();
RandehTimer();
}
}
}
if (ehTotal > ehKillsNeeded) {
hordeLevelUp();
}
if ((minuteTimer < 10) && (secondTimer >= 10)) {
hordeTimer.timeText.text = (("0" + minuteTimer) + ".") + secondTimer;
} else if ((minuteTimer >= 10) & (secondTimer < 10)) {
hordeTimer.timeText.text = ((minuteTimer + ".") + "0") + secondTimer;
} else if ((minuteTimer >= 10) & (secondTimer >= 10)) {
hordeTimer.timeText.text = (minuteTimer + ".") + secondTimer;
} else if ((minuteTimer < 10) && (secondTimer < 10)) {
hordeTimer.timeText.text = ((("0" + minuteTimer) + ".") + "0") + secondTimer;
}
endHordeGame.ehTotalText.text = _root.ehTotal;
if (setBestScores == true) {
if ((minuteTracker < 10) && (secondTracker < 10)) {
endHordeGame.timeText.text = ((("0" + minuteTracker) + ".") + "0") + secondTracker;
}
if ((minuteTracker < 10) && (secondTracker >= 10)) {
endHordeGame.timeText.text = (("0" + minuteTracker) + ".") + secondTracker;
}
if ((minuteTracker >= 10) && (secondTracker < 10)) {
endHordeGame.timeText.text = ((minuteTracker + ".") + "0") + secondTracker;
}
if ((minuteTracker >= 10) && (secondTracker >= 10)) {
endHordeGame.timeText.text = (minuteTracker + ".") + secondTracker;
}
if ((minuteTracker < 10) && (secondTimer < 10)) {
hordeTimer.timeText.text = ((("0" + minuteTimer) + ".") + "0") + secondTimer;
}
if ((minuteTracker < 10) && (secondTimer > 10)) {
hordeTimer.timeText.text = (("0" + minuteTimer) + ".") + secondTimer;
}
if ((minuteTracker >= 10) && (secondTimer < 10)) {
hordeTimer.timeText.text = ((minuteTimer + ".") + "0") + secondTimer;
}
if ((minuteTracker >= 10) && (secondTimer > 10)) {
hordeTimer.timeText.text = (minuteTimer + ".") + secondTimer;
}
endHordeGame.eMultiAmountText.text = ehKillsMultiplier;
endHordeGame.tMultiAmountText.text = ehTimeMultiplier;
endHordeGame.totalPointsText.text = totalPoints;
}
if (_root.cheatLevelSelected == 1) {
_root.bg.ehBestTimeText.text = forestBestTime;
_root.bg.ehMostKillsText.text = forestMostKills;
_root.bg.ehMostPointsText.text = forestMostPoints;
}
if (_root.cheatLevelSelected == 2) {
_root.bg.ehBestTimeText.text = courtYardBestTime;
_root.bg.ehMostKillsText.text = courtYardMostKills;
_root.bg.ehMostPointsText.text = courtYardMostPoints;
}
if (_root.cheatLevelSelected == 3) {
_root.bg.ehBestTimeText.text = castleBestTime;
_root.bg.ehMostKillsText.text = castleMostKills;
_root.bg.ehMostPointsText.text = castleMostPoints;
}
totalPoints = (((ehTotal * 50) + (minuteTracker * 1000)) + (ehKillsMultiplier * 1000)) + (ehTimeMultiplier * 1000);
if (_root.Paused == false) {
if (ehTMtime > 0) {
ehTMtime = ehTMtime - 1;
}
if (ehTMtime <= 0) {
timeMultiplier();
}
}
hordeGetReady.onEnterFrame = function () {
if (_root.Paused == true) {
this.stop();
} else {
this.play();
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (this._currentframe == this._totalframes) {
_root.ehStarted = true;
this.removeMovieClip();
}
}
};
endHordeGame.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
if (plusTimeVar == true) {
addTime();
plusTimeVar = false;
}
forestBestTime = (forestMostMinutes + ".") + forestMostSeconds;
courtYardBestTime = (courtYardMostMinutes + ".") + courtYardMostSeconds;
castleBestTime = (castleMostMinutes + ".") + castleMostSeconds;
if (hordeReset == true) {
ehTotal = 0;
ehCurrent = 0;
ehCurrentCap = 2;
ehRanAmount = 0;
ehKillsNeeded = 10;
ehKillsMultiplier = 1;
ehTimeMultiplier = 0;
ehTMtime = random(2000) + 400;
ehTMrand = random(5);
ehLevelEnd = false;
ehStarted = false;
ehTimerMin = 15;
ehTimerMax = 200;
ehTimer = random(ehTimerMax) + ehTimerMin;
hordeModeHeroDead = false;
totalPoints = (((ehTotal * 50) + (minuteTracker * 1000)) + (ehKillsMultiplier * 1000)) + (ehTimeMultiplier * 1000);
minuteTracker = 0;
secondTracker = 0;
hordeReset = false;
plusTimeVar = false;
setBestScores = true;
nrTime = false;
nrKills = false;
nrPoints = 0;
addTimeRan = random(15);
heroLife = 100;
lives = 3;
}
};
ehTotal = 0;
ehCurrent = 0;
ehCurrentCap = 2;
ehRanAmount = 0;
ehKillsNeeded = 10;
ehKillsMultiplier = 1;
ehTimeMultiplier = 0;
ehTMtime = random(2000) + 400;
ehTMrand = random(5);
ehLevelEnd = false;
ehStarted = false;
ehTimerMin = 15;
ehTimerMax = 200;
ehTimer = random(ehTimerMax) + ehTimerMin;
hordeModeHeroDead = false;
totalPoints = (((ehTotal * 50) + (minuteTracker * 1000)) + (ehKillsMultiplier * 1000)) + (ehTimeMultiplier * 1000);
minuteTracker = 0;
secondTracker = 0;
hordeReset = false;
plusTimeVar = false;
setBestScores = true;
nrTime = false;
nrKills = false;
nrPoints = 0;
addTimeRan = random(15);
timePlusAmount = 0;
forestMostMinutes = "00";
forestMostSeconds = "00";
forestBestTime = 0;
forestMostKills = 0;
forestMostPoints = 0;
courtYardMostMinutes = "00";
courtYardMostSeconds = "00";
courtYardBestTime = 0;
courtYardMostKills = 0;
courtYardMostPoints = 0;
castleMostMinutes = "00";
castleMostSeconds = "00";
castleBestTime = 0;
castleMostKills = 0;
castleMostPoints = 0;
addTime = function () {
addTimeRan = random(15);
if (addTimeRan < 4) {
minuteTimer = minuteTimer + 1;
timePlusAmount = "+ 1 min";
}
if (((addTimeRan >= 4) && (addTimeRan < 10)) && (secondTimer < 10)) {
secondTimer = secondTimer + 45;
timePlusAmount = "+ 45 sec";
}
if ((((addTimeRan >= 4) && (addTimeRan < 10)) && (secondTimer < 30)) && (secondTimer >= 10)) {
secondTimer = secondTimer + 30;
timePlusAmount = "+ 30 sec";
}
if (((addTimeRan >= 4) && (addTimeRan < 10)) && (secondTimer >= 30)) {
minuteTimer = minuteTimer + 1;
timePlusAmount = "+ 1 min";
}
if (addTimeRan >= 10) {
secondTimer = secondTimer + 10;
timePlusAmount = "+ 10 sec";
}
};
timeMultiplier = function () {
_root.bg.tm1._visible = false;
_root.bg.tm2._visible = false;
_root.bg.tm3._visible = false;
_root.bg["tm" + ehTMrand]._visible = true;
ehTMrand = random(5);
ehTMtime = random(2000) + 400;
};
RandehTimer = function () {
ehTimer = random(ehTimerMax) + ehTimerMin;
};
initEndGame = function () {
_root.Paused = true;
endHordeGame = _root.attachMovie("endHordeGame", "endHordeGame", 15000);
endHordeGame._x = _root.vCam._x - (_root.vCam._width / 2);
endHordeGame._y = _root.vCam._y - (_root.vCam._height / 2);
};
hordeSpawnEnemy = function () {
newZombo = _root.attachMovie("zombie", "zombie" + _root.depth, _root.depth++);
newZombo._x = random(450) + 50;
newZombo._y = _root.hero._y;
newZombo.onEnterFrame = function () {
if (_root.hordeReset == true) {
this.removeMovieClip();
}
if (this.eStatus == "dead") {
_root.ehRanAmount = random(10);
if (_root.ehRanAmount < _root.ehCurrentCap) {
hordeSpawnEnemy();
}
}
if ((_root.enemyUnpause == true) && (this.eStatus != "dead")) {
this.rise.play();
this.stand.play();
this.walk.play();
this.attack.play();
this.vomit.play();
this.hurt.play();
this.die.play();
}
if (this.newEnemy == undefined) {
this.dir = "right";
this.eLife = 3;
this.Speed = random(3) + 1;
this.eStatus = "standing";
this.ySpeed = 0;
this.aTimer = 0;
this.newEnemy = false;
}
if ((((((Math.abs(this._x - _root.hero._x) < 50) && (Math.abs(this._y - _root.hero._y) < 40)) && (_root.heroStatus == "powerAttack")) && (this.eStatus != "hurt")) && (this.eLife > 0)) && (this.eLife > 0)) {
this.gotoAndStop("hurt");
}
if ((Math.abs(this._x - _root.hero._x) < 600) && (Math.abs(this._y - _root.hero._y) < 400)) {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
this._y = this._y + this.ySpeed;
this.ySpeed = this.ySpeed + 1;
} else {
this.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
};
ehCurrent = ehCurrent + 1;
ehRanAmount = random(10);
if ((ehRanAmount < ehCurrentCap) && (ehTotal < ehCurrent)) {
hordeSpawnEnemy();
}
};
hordeLevelUp = function () {
ehCurrentCap = ehCurrentCap + ehCurrentCap;
ehTimerMax = ehTimerMax - (ehTimerMax / 10);
ehKillsMultiplier = ehKillsMultiplier + 1;
ehKillsNeeded = (ehKillsNeeded + 10) + ehKillsMultiplier;
if (ehTimerMax < 10) {
ehTimerMax = 10;
}
};
hordeLevelChange = function () {
_root.endHordeGame.removeMovieClip();
_root.hordeTimerMC.removeMovieClip();
_root.hud.removeMovieClip();
_root.bg.removeMovieClip();
_root.pg.removeMovieClip();
_root.g.removeMovieClip();
_root.fg.removeMovieClip();
_root.hero.removeMovieClip();
pg = _root.attachMovie(("hordeLevel" + levelNum) + "pg", "pg", 99);
pg.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
level = _root.attachMovie(("hordeLevel" + levelNum) + "bg", "bg", 100);
level._x = 0;
level._y = 0;
ground = _root.attachMovie(("hordeLevel" + levelNum) + "g", "g", 98);
ground._x = 0;
ground._y = 0;
newMusic.music.stop();
newMusic = ["music" + levelNum];
newMusic.music = new Sound();
newMusic.music.attachSound(("hordeLevel" + levelNum) + "music");
newMusic.music.start(0, 99);
if (_root.levelNum == 0) {
_root.ehStarted = false;
}
if (_root.levelNum != 0) {
if (_root.vCam == undefined) {
vCam = _root.attachMovie("vCam", "vCam", _root.overDepth++);
}
vCam._x = 275;
vCam._y = 150;
hero = _root.attachMovie(_root.selectedCharacter, "hero", 102);
hero.onEnterFrame = function () {
if (camStop == false) {
if (this._x < _root.levelLeftCap) {
this._x = _root.levelLeftCap;
}
if (this._x > (_root.ground._width - _root.levelRightCap)) {
this._x = _root.ground._width - _root.levelRightCap;
}
}
if (camStop == true) {
if (this._x < ((_root.vCam._x - (_root.vCam._width / 2)) + 30)) {
this._x = (_root.vCam._x - (_root.vCam._width / 2)) + 30;
}
if (this._x > ((_root.vCam._x + (_root.vCam._width / 2)) - 30)) {
this._x = (_root.vCam._x + (_root.vCam._width / 2)) - 30;
}
}
if (((camBindY == true) && (Math.abs(_root.bg.treeTriggerEnd._x - _root.hero._x) > 5)) && (Math.abs(_root.bg.treeTriggerEnd._y - _root.hero._y) > 15)) {
if (this._x > ((_root.vCam._x + (_root.vCam._width / 2)) - 30)) {
this._x = (_root.vCam._x + (_root.vCam._width / 2)) - 30;
}
if (this._x < (_root.vCam._x - (_root.vCam._width / 2))) {
this._x = _root.vCam._x - (_root.vCam._width / 2);
}
}
if (_root.Paused == true) {
} else if (_root.heroStatus != "jumping") {
if (!_root.g.hitTest(this._x, this._y + 1, true)) {
_root.hero._y = _root.hero._y + _root.ySpeed;
_root.ySpeed = _root.ySpeed + 1;
} else {
_root.ySpeed = 0;
}
while (_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
}
};
_root.vCam._x = _root.hero._x;
_root.vCam._y = _root.hero._y;
fg = _root.attachMovie(("hordeLevel" + levelNum) + "fg", "fg", _root.overDepth++);
fg._x = 0;
fg._y = 0;
hud = _root.attachMovie("hud", "hud", _root.overDepth++);
hud.onEnterFrame = function () {
if (_root.hudPos == "topLeft") {
_root.hud._x = _root.vCam._x - (_root.vCam._width / 2);
_root.hud._y = _root.vCam._y - (_root.vCam._height / 2);
}
if (_root.hudPos == "botLeft") {
_root.hud._x = _root.vCam._x - (_root.vCam._width / 2);
_root.hud._y = (_root.vCam._y + (_root.vCam._height / 2)) - _root.hud._height;
}
if (_root.hudPos == "topRight") {
_root.hud._x = ((_root.vCam._x + (_root.vCam._width / 2)) - _root.hud._width) - 4;
_root.hud._y = _root.vCam._y - (_root.vCam._height / 2);
}
if (_root.hudPos == "botRight") {
_root.hud._x = ((_root.vCam._x + (_root.vCam._width / 2)) - _root.hud._width) - 4;
_root.hud._y = (_root.vCam._y + (_root.vCam._height / 2)) - _root.hud._height;
}
};
hordeTimerMC = _root.attachMovie("hordeTimer", "hordeTimer", _root.overDepth++);
hordeTimerMC.onEnterFrame = function () {
if (_root.ehStarted == true) {
this._visible = true;
} else {
this._visible = false;
}
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
_root.camStop = false;
_root.bg.tm1._visible = false;
_root.bg.tm2._visible = false;
_root.bg.tm3._visible = false;
}
};
hordeChangeFade = function () {
if (_root.levelNum == 0) {
lcf = _root.attachMovie("levelChangeFade", "lcf", 50000);
lcf.onEnterFrame = function () {
if (_root.vCam == undefined) {
this._x = 0;
this._x = 0;
}
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (this._currentframe == (this._totalframes / 2)) {
_root.Paused = false;
_root.igOptions.removeMovieClip();
_root.endHordeGame.removeMovieClip();
hordeReset = true;
_root.vCam._x = 0;
_root.vCam._y = 0;
this._x = 0;
this._y = 0;
hordeLevelChange();
_root.hordeMode = true;
}
if (this._currentframe == this._totalframes) {
hordeReset = false;
this.removeMovieClip();
_root.lcf = undefined;
}
};
} else {
lcf = _root.attachMovie("levelChangeFade", "lcf", 50000);
lcf.onEnterFrame = function () {
if (_root.vCam == undefined) {
this._x = 0;
this._x = 0;
}
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (this._currentframe == (this._totalframes / 2)) {
_root.Paused = false;
hordeReset = true;
hordeLevelChange();
_root.endHordeGame.removeMovieClip();
}
if (this._currentframe == this._totalframes) {
getReady = _root.attachMovie("hordeGetReady", "hordeGetReady", _root.overDepth++);
hordeReset = false;
_root.Paused = false;
_root.lcf = undefined;
this.removeMovieClip();
}
};
}
};
Symbol 74 MovieClip [terrence] Frame 1
stop();
Instance of Symbol 29 MovieClip "standmc" in Symbol 74 MovieClip [terrence] Frame 1
onClipEvent (load) {
_root.heroStatus = "standing";
_root.hero2Status = "nothing";
_root.xSpeed = 0;
if (_root.heroLife == 0) {
if (_root.infiniteLives == false) {
_root.lives = _root.lives - 1;
}
_root.heroLife = 100;
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if ((_root.narrative == false) && (_root.bmPause == false)) {
if (Key.isDown(_root.Down)) {
if (_root.g.hitTest(_parent._x, _parent._y + 3, true) && (!_root.g.hitTest(_parent._x, _parent._y + 10, true))) {
_parent.gotoAndStop("drop");
}
}
_root.defDelay = _root.defDelay - 1;
_root.heroStatus = "standing";
if (Key.isDown(_root.Right) && (Key.isDown(_root.Left))) {
_parent.gotoAndStop("stand");
} else if (Key.isDown(_root.Right)) {
_root.dir = "right";
_parent._xscale = 100;
if (_root.g.hitTest(_root.hero._x, _root.hero._y - 5, true)) {
_parent.gotoAndStop("walk");
}
if (_root.xSpeed >= 0) {
if (!_root.g.hitTest(_root.hero._x + 2, _root.hero._y - 10, true)) {
_parent.gotoAndStop("walk");
}
}
} else if (Key.isDown(_root.Left)) {
_root.dir = "left";
_parent._xscale = -100;
if (_root.g.hitTest(_root.hero._x, _root.hero._y - 5, true)) {
_parent.gotoAndStop("walk");
}
if (_root.xSpeed >= 0) {
if (!_root.g.hitTest(_root.hero._x + 2, _root.hero._y - 10, true)) {
_parent.gotoAndStop("walk");
}
}
}
if (Key.isDown(_root.Jump)) {
_parent.gotoAndStop("jump");
}
if (Key.isDown(_root.Attack) && (_root.AttackTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if (Key.isDown(_root.Shield) && (_root.heroArrow == false)) {
_parent.gotoAndStop("throw");
}
}
}
Instance of Symbol 35 MovieClip "walkmc" in Symbol 74 MovieClip [terrence] Frame 7
onClipEvent (enterFrame) {
_root.hero2Status = "nothing";
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
_root.defDelay = _root.defDelay - 1;
if (Key.isDown(_root.Attack) && (_root.AttackTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if (Key.isDown(_root.Shield) && (_root.heroArrow == false)) {
_parent.gotoAndStop("throw");
}
if (Key.isDown(_root.Jump)) {
_parent.gotoAndStop("jump");
}
if (Key.isDown(_root.Right) && (!Key.isDown(_root.Left))) {
_root.dir = "right";
_parent._xscale = 100;
_root.xSpeed = _root.xSpeed + 1;
_root.hero._x = _root.hero._x + _root.xSpeed;
}
if (Key.isDown(_root.Left) && (!Key.isDown(_root.Right))) {
_root.dir = "left";
_parent._xscale = -100;
_root.xSpeed = _root.xSpeed - 1;
_root.hero._x = _root.hero._x + _root.xSpeed;
}
if ((!Key.isDown(_root.Right)) && (!Key.isDown(_root.Left))) {
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
if (Key.isDown(_root.Right) && (Key.isDown(_root.Left))) {
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 40 MovieClip "jumpmc" in Symbol 74 MovieClip [terrence] Frame 12
onClipEvent (load) {
_root.hero2Status = "nothing";
_root.hero._y = _root.hero._y - 1;
if (_root.heroStatus != "jumping") {
_root.ySpeed = 10;
_root.heroStatus = "jumping";
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
_root.hero._y = _root.hero._y - _root.ySpeed;
_root.hero._x = _root.hero._x + _root.xSpeed;
_root.ySpeed = _root.ySpeed - 1;
if (Key.isDown(_root.Attack) && (_root.AttackTimer <= 0)) {
_parent.gotoAndStop("jumpAttack");
}
if (Key.isDown(_root.Shield) && (_root.heroArrow == false)) {
_parent.gotoAndStop("jumpThrow");
}
i = 0;
while (i < 10) {
if (_root.g.hitTest(_root.hero._x, _root.hero._y + i, true) && (_root.ySpeed <= 0)) {
_root.ySpeed = 1;
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
i++;
}
if (Key.isDown(_root.Right)) {
_root.dir = "right";
_parent._xscale = 100;
_root.xSpeed = _root.xSpeed + 1;
}
if (Key.isDown(_root.Left)) {
_root.dir = "left";
_parent._xscale = -100;
_root.xSpeed = _root.xSpeed - 1;
}
}
}
Instance of Symbol 46 MovieClip "jumpthrowmc" in Symbol 74 MovieClip [terrence] Frame 17
onClipEvent (load) {
_root.hero._y = _root.hero._y - 1;
_root.heroStatus = "jumping";
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
_root.hero._y = _root.hero._y - _root.ySpeed;
_root.hero._x = _root.hero._x + _root.xSpeed;
_root.ySpeed = _root.ySpeed - 1;
i = 0;
while (i < 10) {
if (_root.g.hitTest(_root.hero._x, _root.hero._y + i, true) && (_root.ySpeed <= 0)) {
_root.ySpeed = 1;
_root.xSpeed = 0;
_root.hero2Status = "nothing";
_parent.gotoAndStop("jump");
}
i++;
}
if ((!Key.isDown(_root.Right)) && (!Key.isDown(_root.Left))) {
_root.xSpeed = 0;
}
}
if (this._currentframe == 9) {
_root.heroArrow = true;
arrowMC = _root.bg.attachMovie("shuriken", "hArrow", _root.overDepth++);
arrowMC._x = _parent._x - _root.bg._x;
arrowMC._y = (_parent._y - _root.bg._y) - 28;
arrowMC.onEnterFrame = function () {
if (_root.Paused == true) {
this.stop();
} else {
this.deathTimer = this.deathTimer + 1;
if (this.deathTimer > this.deathCap) {
_root.heroArrow = false;
this.removeMovieClip();
}
if (this.dDir == "right") {
this._x = this._x + 18;
}
if (this.dDir == "left") {
this._x = this._x - 18;
}
if (this.arrowMC == undefined) {
if (_root.dir == "left") {
this._xscale = -100;
this.dDir = "left";
}
if (_root.dir == "right") {
this._xscale = 100;
this.dDir = "right";
}
this.deathCap = 100;
this.deflect = false;
this.rDeflect = random(10);
this.deathTimer = 0;
this.arrowMC = true;
}
if (this.hitTest(_root.vCam)) {
this.deathCap = 30;
}
if (this.deflect == true) {
this.deathCap = 40;
if (this.dDir == "left") {
this._rotation = this._rotation + (random(33) + 13);
this._x = this._x + (random(33) + 25);
if (this.rDeflect >= 4) {
this._y = this._y - random(20);
}
if (this.rDeflect < 4) {
this._y = this._y + random(20);
}
} else if (this.dDir == "right") {
this._rotation = this._rotation - (random(33) + 13);
this._x = this._x - (random(33) + 25);
if (this.rDeflect >= 4) {
this._y = this._y - random(20);
}
if (this.rDeflect < 4) {
this._y = this._y + random(20);
}
}
}
}
};
}
if (this._currentframe == this._totalframes) {
_root.hero2Status = "nothing";
_parent.gotoAndStop("stand");
}
}
Instance of Symbol 56 MovieClip "jumpattackmc" in Symbol 74 MovieClip [terrence] Frame 26
onClipEvent (load) {
_root.xSpeed = 0;
keyIsDown = true;
_root.hero._y = _root.hero._y - 1;
_root.heroStatus = "jumping";
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
_root.hero._y = _root.hero._y - _root.ySpeed;
_root.hero._x = _root.hero._x + _root.xSpeed;
_root.ySpeed = _root.ySpeed - 1;
if (Key.isDown(_root.Shield)) {
if (_root.infiniteDefence == false) {
if (_root.Diff == "easy") {
_root.heroDef = _root.heroDef - 0.2;
}
if (_root.Diff == "hard") {
_root.heroDef = _root.heroDef - 0.5;
}
}
}
if ((!Key.isDown(_root.Attack)) && (keyIsDown == true)) {
keyIsDown = false;
}
if (keyIsDown == true) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 15;
}
}
if (keyIsDown == false) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 5;
}
}
if (this._currentframe == this._totalframes) {
_root.ach03count = 0;
_root.hero2Status = "nothing";
_parent.gotoAndStop("jump");
}
if (this._currentframe > 9) {
_root.hero2Status = "parrying";
}
i = 0;
while (i < 10) {
if (_root.g.hitTest(_root.hero._x, _root.hero._y + i, true) && (_root.ySpeed <= 0)) {
_root.ySpeed = 1;
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
i++;
}
if ((!Key.isDown(_root.Right)) && (!Key.isDown(_root.Left))) {
_root.xSpeed = 0;
}
}
}
Instance of Symbol 62 MovieClip "attackmc" in Symbol 74 MovieClip [terrence] Frame 35
onClipEvent (load) {
_root.xSpeed = 0;
_root.heroStatus = "parrying";
keyIsDown = true;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if ((!Key.isDown(_root.Attack)) && (keyIsDown == true)) {
keyIsDown = false;
}
if (keyIsDown == true) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 15;
}
}
if (keyIsDown == false) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 5;
}
}
if (this._currentframe == this._totalframes) {
_root.ach03count = 0;
_parent.gotoAndStop("stand");
}
if (this._currentframe > 8) {
_root.hero2Status = "parrying";
}
}
}
Instance of Symbol 68 MovieClip "throwmc" in Symbol 74 MovieClip [terrence] Frame 40
onClipEvent (enterFrame) {
if (this._currentframe == 9) {
if (_root.heroArrow == false) {
_root.heroArrow = true;
arrowMC = _root.bg.attachMovie("shuriken", "hArrow", _root.overDepth++);
arrowMC._x = _parent._x - _root.bg._x;
arrowMC._y = (_parent._y - _root.bg._y) - 28;
arrowMC.onEnterFrame = function () {
if (_root.Paused == true) {
this.stop();
} else {
this.deathTimer = this.deathTimer + 1;
if (this.deathTimer > this.deathCap) {
_root.heroArrow = false;
this.removeMovieClip();
}
if (this.dDir == "right") {
this._x = this._x + 18;
}
if (this.dDir == "left") {
this._x = this._x - 18;
}
if (this.arrowMC == undefined) {
if (_root.dir == "left") {
this._xscale = -100;
this.dDir = "left";
}
if (_root.dir == "right") {
this._xscale = 100;
this.dDir = "right";
}
this.deathCap = 100;
this.deflect = false;
this.rDeflect = random(10);
this.deathTimer = 0;
this.arrowMC = true;
}
if (this.hitTest(_root.vCam)) {
this.deathCap = 30;
}
if (this.deflect == true) {
this.deathCap = 40;
if (this.dDir == "left") {
this._rotation = this._rotation + (random(33) + 13);
this._x = this._x + (random(33) + 25);
if (this.rDeflect >= 4) {
this._y = this._y - random(20);
}
if (this.rDeflect < 4) {
this._y = this._y + random(20);
}
} else if (this.dDir == "right") {
this._rotation = this._rotation - (random(33) + 13);
this._x = this._x - (random(33) + 25);
if (this.rDeflect >= 4) {
this._y = this._y - random(20);
}
if (this.rDeflect < 4) {
this._y = this._y + random(20);
}
}
}
}
};
}
}
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
}
Instance of Symbol 73 MovieClip "hurt" in Symbol 74 MovieClip [terrence] Frame 46
onClipEvent (load) {
_root.hero2Status = "nothing";
_root.hurtB = _root.hurtB + 1;
_root.ach03count = 0;
_root.ach07void = true;
_root.heroStatus = "hurt";
if (_root.infiniteHealth == false) {
_root.heroLife = _root.heroLife - _root.attackAmount;
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (this._currentframe == this._totalframes) {
if (_root.heroLife == 0) {
_parent.gotoAndStop("die");
} else {
_parent.gotoAndStop("stand");
}
}
}
Symbol 89 MovieClip [medal_popup] Frame 1
function unlockMedal(m_name) {
clearInterval(pop_delay);
var _local1 = com.Newgrounds.NewgroundsAPI.getMedals();
var _local2 = null;
for (i in _local1) {
if (_local1[i].medal_name == m_name) {
_local2 = _local1[i];
medal_name = _local2.medal_name;
medal_value = _local2.medal_value + "pts";
com.Newgrounds.NewgroundsAPI.unlockMedal(medal_name);
pop_delay = setInterval(endDelay, 3000);
_visible = true;
gotoAndPlay (2);
break;
}
}
}
function endDelay(params) {
gotoAndPlay (10);
clearInterval(pop_delay);
}
var pop_delay;
var medal_name = "?????";
var medal_value = "???";
_visible = false;
Symbol 89 MovieClip [medal_popup] Frame 10
var myBitmapData = flash.display.BitmapData.loadBitmap(medal_name + ".jpg");
medal_icon.attachBitmap(myBitmapData, 111);
stop();
Symbol 164 MovieClip [boss] Frame 1
stop();
Instance of Symbol 91 MovieClip "stand" in Symbol 164 MovieClip [boss] Frame 1
onClipEvent (load) {
attackTimer = 0;
if (_root.Diff == "easy") {
attackCap = 50;
}
if (_root.Diff == "hard") {
attackCap = 40;
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if ((_root.narrative == false) && (_root.heroStatus != "dead")) {
if (((Math.abs(_root.hero._x - _parent._x) < 110) && (_root.heroStatus == "parrying")) && (_root.hero._currentframe != 32)) {
_root.ach03count = 0;
_root.hero.gotoAndStop("parry");
}
if (((Math.abs(_root.hero._x - _root.Boss._x) < 110) && (_root.heroStatus == "attacking")) && (_parent.eLife <= 0)) {
_root.bossFallsToDoom = true;
_parent.gotoAndStop("die");
}
if (((Math.abs(_root.hero._x - _root.Boss._x) < 110) && (_root.heroStatus == "powerAttack")) && (_parent.eLife <= 0)) {
_root.bossFallsToDoom = true;
_parent.gotoAndStop("die");
}
if (_parent.eStatus == "escaping") {
_parent.gotoAndStop("escape");
}
attackTimer = attackTimer + 1;
if (attackTimer > attackCap) {
_parent.gotoAndStop("takeOff");
}
}
}
Instance of Symbol 131 MovieClip "takeOff" in Symbol 164 MovieClip [boss] Frame 11
onClipEvent (load) {
_root.hero.swapDepths(_root.Boss);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if ((((this._currentframe < 13) && (Math.abs(_root.hero._x - _parent._x) < 110)) && (_root.heroStatus == "parrying")) && (_root.hero._currentframe != "parry")) {
_root.ach03count = 0;
_root.hero.gotoAndStop("parry");
}
if ((this._currentframe > 30) && (this._currentframe < 80)) {
if ((_parent.eStatus == "dead") && (_root.walkedToBoss == true)) {
_parent._x = _root.bg.BossXmin._x - _root.bg._x;
} else if (_root.firstEncounter == true) {
_parent._x = _root.hero._x + 280;
} else if ((_parent.eStatus == "dead") && (_root.walkedToBoss == false)) {
_root.hero.gotoAndStop("walkToBoss");
_parent._x = _root.bg.BossXmin._x - _root.bg._x;
} else if (_root.secondEncounter == true) {
_parent._x = _root.hero._x - 280;
} else {
_parent._x = _root.hero._x;
}
}
if (((_root.Diff == "easy") && (this._currentframe == this._totalframes)) && (_parent.eLife >= 7)) {
_parent.gotoAndStop("drop");
}
if ((((_root.Diff == "easy") && (this._currentframe == 120)) && (_parent.eLife < 7)) && (_parent.eLife >= 4)) {
_parent.gotoAndStop("drop");
}
if (((_root.Diff == "easy") && (this._currentframe == 110)) && (_parent.eLife < 4)) {
_parent.gotoAndStop("drop");
}
if (((_root.Diff == "hard") && (this._currentframe == 120)) && (_parent.eLife > 7)) {
_parent.gotoAndStop("drop");
}
if ((((_root.Diff == "hard") && (this._currentframe == 115)) && (_parent.eLife <= 7)) && (_parent.eLife >= 5)) {
_parent.gotoAndStop("drop");
}
if ((((_root.Diff == "hard") && (this._currentframe == 110)) && (_parent.eLife <= 4)) && (_parent.eLife >= 2)) {
_parent.gotoAndStop("drop");
}
if (((_root.Diff == "hard") && (this._currentframe == 100)) && (_parent.eLife < 2)) {
_parent.gotoAndStop("drop");
}
}
}
Instance of Symbol 140 MovieClip "getUp" in Symbol 164 MovieClip [boss] Frame 18
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if ((this._currentframe == this._totalframes) && (_root.firstEncounter == true)) {
_root.newMusic.music.stop();
bossMusic = new Sound(_root);
bossMusic.attachSound("BossTheme");
bossMusic.start(0, 99);
cutscene = _root.attachMovie("cutscene03", "cutscene", _root.overDepth++);
cutscene.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (Key.isDown(_root.Attack) && (this._currentframe > 50)) {
_root.AttackTimer = 10;
_root.hero.bmTimer = 300;
this.gotoAndStop(this._totalframes);
}
if (this._currentframe == this._totalframes) {
_root.narrative = false;
this.removeMovieClip();
}
};
_root.narrative = true;
_root.cutscene03Played = true;
_root.firstEncounter = false;
}
if ((this._currentframe == this._totalframes) && (_root.secondEncounter == true)) {
_root.newMusic.music.stop();
bossMusic = new Sound(_root);
bossMusic.attachSound("BossTheme");
bossMusic.start(0, 99);
cutscene = _root.attachMovie("cutscene05", "cutscene", _root.overDepth++);
cutscene.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (Key.isDown(_root.Attack) && (this._currentframe > 50)) {
_root.AttackTimer = 10;
_root.hero.bmTimer = 300;
this.gotoAndStop(this._totalframes);
}
if (this._currentframe == this._totalframes) {
_root.bossGuards = true;
_root.narrative = false;
_root.RainNow = true;
this.removeMovieClip();
}
};
_root.narrative = true;
_root.cutscene05Played = true;
_root.secondEncounter = false;
}
if ((_parent.eStatus == "dead") && (_root.cutscene06Played == false)) {
cutscene = _root.attachMovie("cutscene06", "cutscene", _root.overDepth++);
cutscene.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (Key.isDown(_root.Attack) && (this._currentframe > 50)) {
_root.AttackTimer = 10;
_root.hero.bmTimer = 300;
this.gotoAndStop(this._totalframes);
}
if (this._currentframe == this._totalframes) {
_root.narrative = false;
_root.Boss.waitToDie = true;
this.removeMovieClip();
}
};
_root.narrative = true;
_root.cutscene06Played = true;
}
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 154 MovieClip "hurt" in Symbol 164 MovieClip [boss] Frame 24
onClipEvent (load) {
_root.hitB = _root.hitB + 1;
_parent.eLife = _parent.eLife - 1;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (((this._currentframe == this._totalframes) && (_parent.eLife <= 2)) && (_root.levelNum == 5)) {
_parent.gotoAndStop("escape");
} else if (((this._currentframe == this._totalframes) && (_parent.eLife <= 0)) && (_root.levelNum == 6)) {
_parent.eStatus = "dead";
_parent.gotoAndStop("takeOff");
} else if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
}
Instance of Symbol 159 MovieClip "drop" in Symbol 164 MovieClip [boss] Frame 29
onClipEvent (load) {
dropTimer = 0;
dealDamage = true;
_root.hero.swapDepths(_root.Boss);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 3) {
_root.cameraShake = true;
}
if ((Math.abs(_root.hero._x - _parent._x) < 110) && (_root.heroStatus == "parrying")) {
_parent.gotoAndStop("hurt");
}
if (((Math.abs(_root.hero._x - _parent._x) < 110) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) {
_parent.gotoAndStop("hurt");
}
if (this._currentframe == this._totalframes) {
this.stop();
this.dropTimer = this.dropTimer + 1;
}
if ((dropTimer > 50) && (_root.firstEncounter == true)) {
_parent.gotoAndStop("getUp");
} else if ((dropTimer > 50) && (_root.secondEncounter == true)) {
_parent.gotoAndStop("getUp");
} else if (dropTimer > 60) {
_parent.gotoAndStop("getUp");
}
if ((((((_root.godMode == false) && (_root.heroLife != 0)) && (this._currentframe > 3)) && (this._currentframe < 5)) && (dealDamage == true)) && (Math.abs(_root.hero._x - _parent._x) < 180)) {
if (_root.Diff == "easy") {
_root.attackAmount = 20;
}
if (_root.Diff == "hard") {
_root.attackAmount = 30;
}
_root.hero.gotoAndStop("hurt");
dealDamage = false;
}
}
}
Instance of Symbol 160 MovieClip "takeOff" in Symbol 164 MovieClip [boss] Frame 37
onClipEvent (load) {
_parent.eStatus = "escaping";
this.stop();
rjNum = 0;
if (_root.cutscene04Played == false) {
_root.bossMusic.stop();
cutscene = _root.attachMovie("cutscene04", "cutscene", _root.overDepth++);
cutscene.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
if (Key.isDown(_root.Attack) && (this._currentframe > 50)) {
_root.AttackTimer = 10;
_root.cutscene04Played = true;
_root.narrative = false;
this.removeMovieClip();
}
if (this._currentframe == this._totalframes) {
_root.cutscene04Played = true;
_root.narrative = false;
_root.bossMusic.stop();
this.removeMovieClip();
}
};
_root.narrative = true;
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (((Math.abs(_root.hero._x - _parent._x) < 110) && (_root.heroStatus == "parrying")) && (_root.hero._currentframe != "parry")) {
_root.ach03count = 0;
_root.hero.gotoAndStop("parry");
}
if (_root.cutscene04Played == true) {
_root.bossMode = false;
this.play();
if (this._currentframe == 30) {
_parent.eLife = 7;
_root.firstEncounter = false;
_parent.removeMovieClip();
}
}
}
}
Instance of Symbol 163 MovieClip "die" in Symbol 164 MovieClip [boss] Frame 44
onClipEvent (load) {
_root.newMusic.music.stop();
_root.rainSoundMC.gotoAndPlay(1095);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 45) {
_root.shakeCap = 60;
_root.cameraShake = true;
}
if (this._currentframe == this._totalframes) {
_root.killB = _root.killB + 1;
_root.hero.gotoAndStop("winTheGame");
_root.bossMode = false;
_parent.removeMovieClip();
}
}
}
Symbol 230 MovieClip [enemy3] Frame 1
stop();
Instance of Symbol 175 MovieClip "stand" in Symbol 230 MovieClip [enemy3] Frame 1
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (_parent.hitTest(_root.hArrow._x, _root.hArrow._y, true)) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if ((Math.abs(_root.hero._x - _parent._x) < 350) && (Math.abs(_root.hero._y - _parent._y) < 50)) {
_parent.gotoAndStop("shoot");
}
}
}
Instance of Symbol 191 MovieClip "shoot" in Symbol 230 MovieClip [enemy3] Frame 7
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (_parent.hitTest(_root.hArrow._x, _root.hArrow._y, true)) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if ((Math.abs(_root.hero._x - _parent._x) > 450) || (Math.abs(_root.hero._y - _parent._y) > 100)) {
_parent.gotoAndStop("stand");
}
if (((((Math.abs(_root.hero._x - _parent._x) < 100) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
_parent.gotoAndStop("hurt");
}
if (((((Math.abs(_root.hero._x - _parent._x) < 100) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
_parent.gotoAndStop("hurt");
}
if (((((Math.abs(_root.hero._x - _parent._x) < 100) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
_parent.gotoAndStop("hurt");
}
if (((((Math.abs(_root.hero._x - _parent._x) < 100) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
_parent.gotoAndStop("hurt");
}
if (_parent._x > _root.hero._x) {
_parent._xscale = -100;
}
if (_parent._x < _root.hero._x) {
_parent._xscale = 100;
}
if (this._currentframe == 16) {
arrowMC = _root.attachMovie("arrowMC", "arrow" + _root.depth, _root.depth++);
arrowMC._x = _parent._x + _root.bg._x;
arrowMC._y = (_parent._y + _root.bg._y) - 28;
if (_root.hero._x > arrowMC._x) {
arrowMC._xscale = 100;
}
if (_root.hero._x < arrowMC._x) {
arrowMC._xscale = -100;
}
arrowMC.onEnterFrame = function () {
if (_root.Paused == true) {
this.stop();
} else {
this.deathTimer = this.deathTimer + 1;
if (this.deathTimer > 300) {
this.removeMovieClip();
}
if (this.arrowMC == undefined) {
if (_root.hero._x > this._x) {
this.dir = "right";
this._xscale = 100;
}
if (_root.hero._x < this._x) {
this.dir = "left";
this._xscale = -100;
}
this.rDeflect = random(10);
this.deflect = false;
this.dDir = "";
this.deathTimer = 0;
this.arrowMC = true;
}
if (this.deflect == false) {
if (this.dir == "right") {
this._x = this._x + 11;
}
if (this.dir == "left") {
this._x = this._x - 11;
}
}
if (this.deflect == true) {
if (this.dir == "left") {
this._rotation = this._rotation + (random(33) + 13);
this._x = this._x + (random(16) + 12);
if (this.rDeflect >= 4) {
this._y = this._y - random(20);
}
if (this.rDeflect < 4) {
this._y = this._y + random(10);
}
} else if (this.dir == "right") {
this._rotation = this._rotation - (random(33) + 13);
this._x = this._x - (random(16) + 12);
if (this.rDeflect >= 4) {
this._y = this._y - random(20);
}
if (this.rDeflect < 4) {
this._y = this._y + random(10);
}
}
}
if (this.deflect == false) {
if ((_root.hero.hitTest(this._x, this._y, true) && (_root.heroStatus == "shielding")) && (this._xscale != _root.hero._xscale)) {
_root.hero.gotoAndStop("shieldHit");
this.deflect = true;
} else if (((_root.hero.hitTest(this._x, this._y, true) && (_root.godMode == false)) && (_root.heroStatus == "shielding")) && (this._xscale == _root.hero._xscale)) {
if (_root.Diff == "easy") {
_root.attackAmount = 10;
}
if (_root.Diff == "hard") {
_root.attackAmount = 20;
}
_root.hero.gotoAndStop("hurt");
this.removeMovieClip();
}
if (((_root.hero.hitTest(this._x, this._y, true) && (_root.heroStatus == "parrying")) && (this._xscale != _root.hero._xscale)) || ((_root.hero.hitTest(this._x, this._y, true) && (_root.heroStatus == "attacking")) && (this._xscale != _root.hero._xscale))) {
_root.hero.gotoAndStop("parry");
this.deflect = true;
} else if (((_root.hero.hitTest(this._x, this._y, true) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (this._xscale != _root.hero._xscale)) {
_root.hero.gotoAndStop("parry");
this.deflect = true;
} else if ((((_root.hero.hitTest(this._x, this._y, true) && (_root.godMode == false)) && (_root.heroStatus != "shielding")) && (_root.heroStatus != "parryinging")) && (_root.heroLife != 0)) {
if (_root.Diff == "easy") {
_root.attackAmount = 10;
}
if (_root.Diff == "hard") {
_root.attackAmount = 20;
}
_root.hero.gotoAndStop("hurt");
this.removeMovieClip();
}
}
}
};
}
if (_root.Diff == "hard") {
if (this._currentframe == 55) {
this._currentframe = 1;
}
}
}
}
Instance of Symbol 205 MovieClip "hurt" in Symbol 230 MovieClip [enemy3] Frame 13
onClipEvent (load) {
_root.hitB = _root.hitB + 1;
_parent.eStatus = "hurt";
if (_parent.eLife != 0) {
_parent.eLife = _parent.eLife - 1;
}
srNum = random(10) + 1;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 2) {
if (srNum <= 5) {
}
if ((srNum > 5) && (srNum <= 10)) {
stabSFX = new Sound();
stabSFX.attachSound("stabSFX1");
stabSFX.start(0, 0);
}
}
if (this._currentframe == this._totalframes) {
if (_parent.eLife == 0) {
_parent.gotoAndStop("die");
} else {
_parent.gotoAndStop("shoot");
}
}
}
}
Instance of Symbol 229 MovieClip "die" in Symbol 230 MovieClip [enemy3] Frame 18
onClipEvent (load) {
_root.killB = _root.killB + 1;
_root.action = false;
_root.capKills = _root.capKills + 1;
_root.totalKills = _root.totalKills + 1;
rewardRNum = random(20);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 3) {
if (rewardRNum <= 7) {
coinReward = _root.attachMovie("reward_goldCoin", "coin" + _root.depth, _root.depth++);
coinReward._x = _parent._x;
coinReward._y = _parent._y;
coinReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 100;
_root.lootLifeCount = _root.lootLifeCount + 100;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if ((rewardRNum > 7) && (rewardRNum <= 12)) {
RubyReward = _root.attachMovie("reward_Ruby", "ruby" + _root.depth, _root.depth++);
RubyReward._x = _parent._x;
RubyReward._y = _parent._y;
RubyReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 500;
_root.lootLifeCount = _root.lootLifeCount + 500;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if ((rewardRNum > 12) && (rewardRNum <= 16)) {
EmeraldReward = _root.attachMovie("reward_Emerald", "Emerald" + _root.depth, _root.depth++);
EmeraldReward._x = _parent._x;
EmeraldReward._y = _parent._y;
EmeraldReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 750;
_root.lootLifeCount = _root.lootLifeCount + 750;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if (rewardRNum > 16) {
chestReward = _root.attachMovie("reward_Chest", "chest" + _root.depth, _root.depth++);
chestReward._x = _parent._x;
chestReward._y = _parent._y - 15;
chestReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - _root.hero._height;
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 1000;
_root.lootLifeCount = _root.lootLifeCount + 1000;
this.removeMovieClip();
}
if (!_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y + 2;
}
}
};
}
}
if (this._currentframe == this._totalframes) {
_parent.eStatus = "dead";
this.stop();
}
}
}
Symbol 269 MovieClip Frame 10
if (_root.EAtimer == 0) {
_parent.gotoAndStop("attack");
} else {
_parent.gotoAndStop("stand");
}
Symbol 276 MovieClip Frame 10
if (_parent.eLife == 0) {
_parent.gotoAndStop("die");
} else if (_parent.hitTest(_root.hero) && (_parent.EAtimer == 0)) {
_parent.gotoAndStop("attack");
} else {
_parent.gotoAndStop("stand");
}
Symbol 319 MovieClip Frame 82
stop();
_root.hero.gotoAndStop("idle");
Symbol 320 MovieClip [enemy2] Frame 1
stop();
Instance of Symbol 236 MovieClip "stand" in Symbol 320 MovieClip [enemy2] Frame 1
onClipEvent (load) {
rNum = random(10);
if ((_parent.eStatus == "shielding") && (rNum < 3)) {
_parent.gotoAndStop("attack");
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
if (_parent.eStatus == "parrying") {
_parent.aTimer = 19;
_parent.eStatus = "standing";
}
if (_parent.aTimer > 0) {
_parent.aTimer = _parent.aTimer - 1;
}
if ((((Math.abs(_root.hero._x - _parent._x) < 210) && (Math.abs(_root.hero._y - _parent._y) > 70)) && (_parent.aTimer <= 0)) && (_root.heroLife != 0)) {
_parent.gotoAndStop("stand");
} else if ((((Math.abs(_root.hero._x - _parent._x) < 210) && (Math.abs(_root.hero._y - _parent._y) < 70)) && (_parent.aTimer <= 0)) && (_root.heroLife != 0)) {
_parent.gotoAndStop("walk");
}
if (_parent.hitTest(_root.bg.hArrow._x, _root.bg.hArrow._y, true)) {
if (_parent.dir != _root.bg.hArrow.dDir) {
if (rNum <= 4) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
if (rNum > 4) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
}
if (_parent.dir == _root.bg.hArrow.dDir) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (_root.Diff == "easy") {
if (rNum <= 4) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (rNum > 4) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 3) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
if (rNum > 3) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
if ((((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
if ((((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
}
}
Instance of Symbol 247 MovieClip "walk" in Symbol 320 MovieClip [enemy2] Frame 7
onClipEvent (load) {
_parent.eStatus = "walk";
if ((_root.diff = "easy")) {
rNum = random(18) + 12;
}
if ((_root.diff = "easy")) {
rNum = random(10);
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
if ((Math.abs(_root.hero._x - _parent._x) > 500) || (Math.abs(_root.hero._y - _parent._y) > 100)) {
_parent.gotoAndStop("stand");
}
if (_parent.hitTest(_root.bg.hArrow._x, _root.bg.hArrow._y, true)) {
if (_parent.dir != _root.bg.hArrow.dDir) {
if (rNum <= 4) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
if (rNum > 4) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
}
if (_parent.dir == _root.bg.hArrow.dDir) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (_root.Diff == "easy") {
if (rNum <= 3) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
if (rNum > 2) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
}
}
if (Math.abs(_root.hero._x - _parent._x) < 450) {
if (_root.hero._x > _parent._x) {
_parent.dir = "right";
_parent._xscale = 100;
_parent._x = _parent._x + 3;
} else if (_root.hero._x < _parent._x) {
_parent.dir = "left";
_parent._xscale = -100;
_parent._x = _parent._x - 3;
}
}
if ((Math.abs(_root.hero._x - _parent._x) < 20) && (Math.abs(_root.hero._y - _parent._y) > 50)) {
_parent.gotoAndStop("stand");
} else if (((Math.abs(_root.hero._x - _parent._x) < 50) && (Math.abs(_root.hero._y - _parent._y) < 50)) && (_parent.aTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if ((Math.abs(_root.hero._x - _parent._x) < 70) && (Math.abs(_root.hero._y - _parent._y) < 50)) {
_parent.gotoAndStop("attack");
}
if (((((Math.abs(_root.hero._x - _parent._x) < 100) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
if ((((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
if ((((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
}
}
Instance of Symbol 261 MovieClip "attack" in Symbol 320 MovieClip [enemy2] Frame 12
onClipEvent (load) {
_parent.eStatus = "attack";
rNum = random(10);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
if (((this._currentframe == 2) && (_root.showTut == true)) && (_root.parryMaceTut == false)) {
_root.Paused = true;
parryMaceTutMC = _root.attachMovie("parryMaceTut", "parryMaceTut", _root.getNextHighestDepth());
parryMaceTutMC._x = _parent._x;
parryMaceTutMC._y = _parent._y;
parryMaceTutMC.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.stop();
if (Key.isDown(_root.Shield) && (this._currentframe > 10)) {
_root.Paused = false;
_root.hero.gotoAndStop("shield");
_root.enemyUnpause = true;
this.removeMovieClip();
}
}
};
_root.parryMaceTut = true;
}
if (this._currentframe == this._totalframes) {
if (_parent.eLife == 1) {
if (_root.Diff == "hard") {
_parent.aTimer = 10;
}
} else {
_parent.aTimer = 17;
}
_parent.gotoAndStop("stand");
}
if (((((Math.abs(_root.hero._x - _parent._x) < 100) && (Math.abs(_root.hero._y - _parent._y) < 50)) && (this._currentframe >= 9)) && (this._currentframe <= 13)) && (_root.heroLife != 0)) {
if (_root.heroStatus == "shielding") {
if ((_parent.dir == "right") && (_root.dir == "left")) {
_root.hero.gotoAndStop("shieldHit");
_root.hero._x = _root.hero._x + 2;
}
if ((_parent.dir == "right") && (_root.dir == "right")) {
_root.hero.gotoAndStop("hurt");
}
if ((_parent.dir == "left") && (_root.dir == "right")) {
_root.hero.gotoAndStop("shieldHit");
_root.hero._x = _root.hero._x - 2;
}
if ((_parent.dir == "left") && (_root.dir == "left")) {
_root.hero.gotoAndStop("hurt");
}
} else if (((((_root.godMode == false) && (Math.abs(_root.hero._x - _parent._x) < 100)) && (Math.abs(_root.hero._y - _parent._y) < 50)) && (_root.heroLife != 0)) && (_root.heroStatus != "powerAttack")) {
_parent.aTimer = 17;
if (_root.Diff == "easy") {
_root.attackAmount = 10;
}
if (_root.Diff == "hard") {
_root.attackAmount = 20;
}
_root.hero.gotoAndStop("hurt");
}
} else if ((this._currentframe < 4) || ((this._currentframe > 16) && (this._currentframe < 24))) {
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 6) {
_parent.gotoAndStop("hurt");
}
if (rNum > 6) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 5) {
_parent.gotoAndStop("hurt");
}
if (rNum > 5) {
_parent.gotoAndStop("shieldHit");
}
}
}
}
}
}
Instance of Symbol 269 MovieClip "shieldHit" in Symbol 320 MovieClip [enemy2] Frame 18
onClipEvent (load) {
_parent.blockCount = _parent.blockCount + 1;
}
onClipEvent (enterFrame) {
if (_parent.blockCount == 4) {
_parent.gotoAndStop("hurt");
}
if (_root.Paused == true) {
this.stop();
} else {
_parent.eStatus = "shielding";
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 276 MovieClip "hurt" in Symbol 320 MovieClip [enemy2] Frame 25
onClipEvent (load) {
_parent.blockCount = 0;
_root.hitB = _root.hitB + 1;
_parent.eStatus = "hurt";
if (_root.heroStatus == "powerAttack") {
_parent.aTimer = 30;
}
if (_parent.eLife != 0) {
_parent.eLife = _parent.eLife - 1;
}
srNum = random(10) + 1;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 2) {
if (srNum <= 5) {
}
if ((srNum > 5) && (srNum <= 10)) {
stabSFX = new Sound();
stabSFX.attachSound("stabSFX1");
stabSFX.start(0, 0);
}
}
if (this._currentframe == this._totalframes) {
if (_parent.eLife != 0) {
_parent.gotoAndStop("stand");
} else {
_parent.gotoAndStop("die");
}
}
}
}
Instance of Symbol 319 MovieClip "die" in Symbol 320 MovieClip [enemy2] Frame 30
onClipEvent (load) {
_root.killB = _root.killB + 1;
_root.hitB = _root.hitB + 1;
_root.action = false;
_root.capKills = _root.capKills + 1;
_root.totalKills = _root.totalKills + 1;
rewardRNum = random(20);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 3) {
if (rewardRNum <= 4) {
coinReward = _root.attachMovie("reward_goldCoin", "coin" + _root.depth, _root.depth++);
coinReward._x = _parent._x;
coinReward._y = _parent._y;
coinReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 100;
_root.lootLifeCount = _root.lootLifeCount + 100;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if ((rewardRNum > 4) && (rewardRNum <= 8)) {
RubyReward = _root.attachMovie("reward_Ruby", "ruby" + _root.depth, _root.depth++);
RubyReward._x = _parent._x;
RubyReward._y = _parent._y;
RubyReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 500;
_root.lootLifeCount = _root.lootLifeCount + 500;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if ((rewardRNum > 8) && (rewardRNum <= 13)) {
EmeraldReward = _root.attachMovie("reward_Emerald", "Emerald" + _root.depth, _root.depth++);
EmeraldReward._x = _parent._x;
EmeraldReward._y = _parent._y;
EmeraldReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 750;
_root.lootLifeCount = _root.lootLifeCount + 750;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if (rewardRNum > 13) {
chestReward = _root.attachMovie("reward_Chest", "chest" + _root.depth, _root.depth++);
chestReward._x = _parent._x;
chestReward._y = _parent._y - 15;
chestReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - _root.hero._height;
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 1000;
_root.lootLifeCount = _root.lootLifeCount + 1000;
this.removeMovieClip();
}
if (!_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y + 2;
}
}
};
}
}
if (this._currentframe == this._totalframes) {
_parent.eStatus = "dead";
this.stop();
}
}
}
Symbol 410 MovieClip Frame 50
_root.dTotal = _root.dTotal + 1;
Symbol 410 MovieClip Frame 51
stop();
Symbol 411 MovieClip [enemy1] Frame 1
stop();
Instance of Symbol 327 MovieClip "stand" in Symbol 411 MovieClip [enemy1] Frame 1
onClipEvent (load) {
rNum = random(10);
if ((_parent.eStatus == "shielding") && (rNum < 3)) {
_parent.gotoAndStop("attack");
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
if (_parent.eStatus == "parrying") {
if (_root.diff == "easy") {
_parent.aTimer = 35;
}
if (_root.diff == "hard") {
_parent.aTimer = 19;
}
_parent.eStatus = "standing";
}
if (_parent.aTimer > 0) {
_parent.aTimer = _parent.aTimer - 1;
}
if ((((Math.abs(_root.hero._x - _parent._x) < 190) && (Math.abs(_root.hero._y - _parent._y) > 70)) && (_parent.aTimer <= 0)) && (_root.heroLife != 0)) {
_parent.gotoAndStop("stand");
} else if ((((Math.abs(_root.hero._x - _parent._x) < 290) && (Math.abs(_root.hero._y - _parent._y) < 70)) && (_parent.aTimer <= 0)) && (_root.heroLife != 0)) {
_parent.gotoAndStop("walk");
}
if (_parent.hitTest(_root.bg.hArrow._x, _root.bg.hArrow._y, true)) {
if (_parent.dir != _root.bg.hArrow.dDir) {
if (rNum <= 4) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
if (rNum > 4) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
}
if (_parent.dir == _root.bg.hArrow.dDir) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (_root.Diff == "easy") {
if (rNum <= 3) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
if (rNum > 2) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if ((((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if ((((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
}
}
Instance of Symbol 335 MovieClip "walk" in Symbol 411 MovieClip [enemy1] Frame 7
onClipEvent (load) {
if ((_root.diff = "easy")) {
rNum = random(25) + 18;
}
if ((_root.diff = "easy")) {
rNum = random(12);
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
if (_root.showTut == true) {
if (((Math.abs(_root.hero._x - _parent._x) < 70) && (Math.abs(_root.hero._y - _parent._y) < 50)) && (_parent.aTimer <= 0)) {
_parent.gotoAndStop("attack");
}
}
if (Math.abs(_root.hero._x - _parent._x) < 500) {
if (_root.hero._x > _parent._x) {
_parent.dir = "right";
_parent._xscale = 100;
_parent._x = _parent._x + 3;
} else if (_root.hero._x < _parent._x) {
_parent.dir = "left";
_parent._xscale = -100;
_parent._x = _parent._x - 3;
}
}
if ((Math.abs(_root.hero._x - _parent._x) > 500) || (Math.abs(_root.hero._y - _parent._y) > 100)) {
_parent.gotoAndStop("stand");
}
if ((Math.abs(_root.hero._x - _parent._x) < 20) && (Math.abs(_root.hero._y - _parent._y) > 70)) {
_parent.gotoAndStop("stand");
} else if (((Math.abs(_root.hero._x - _parent._x) < 50) && (Math.abs(_root.hero._y - _parent._y) < 50)) && (_parent.aTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if (_parent.hitTest(_root.bg.hArrow._x, _root.bg.hArrow._y, true)) {
if (_parent.dir != _root.bg.hArrow.dDir) {
if (rNum <= 4) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
if (rNum > 4) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
}
if (_parent.dir == _root.bg.hArrow.dDir) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (_root.Diff == "easy") {
if (rNum <= 3) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_root.bg.hArrow.deflect = true;
_parent.gotoAndStop("shieldHit");
}
if (rNum > 2) {
_root.heroArrow = false;
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if ((((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if ((((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.heroStatus == "jumping")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
}
}
Instance of Symbol 347 MovieClip "attack" in Symbol 411 MovieClip [enemy1] Frame 12
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if ((this._currentframe < 5) && (_root.hero._x > _parent._x)) {
_parent._xscale = 100;
}
if ((this._currentframe < 5) && (_root.hero._x < _parent._x)) {
_parent._xscale = -100;
}
if (((((this._currentframe == 3) && (_root.showTut == true)) && (_root.parryTut == false)) && (_root.shieldTut == true)) && (_root.heroStatus != "shielding")) {
_root.Paused = true;
parryTutMC = _root.attachMovie("parryTut", "parryTut", _root.overDepth++);
parryTutMC._x = _parent._x;
parryTutMC._y = _parent._y;
parryTutMC.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.stop();
if (Key.isDown(_root.Attack) && (this._currentframe > 10)) {
_root.Paused = false;
_root.hero.gotoAndStop("parry");
_root.forceParry = true;
this.removeMovieClip();
}
}
};
_root.parryTut = true;
}
if (((this._currentframe == 3) && (_root.showTut == true)) && (_root.shieldTut == false)) {
_root.Paused = true;
shieldTutMC = _root.attachMovie("shieldTut", "shieldTut", _root.overDepth++);
shieldTutMC._x = _parent._x;
shieldTutMC._y = _parent._y;
shieldTutMC.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.stop();
if (Key.isDown(_root.Shield) && (this._currentframe > 10)) {
_root.Paused = false;
_root.hero.gotoAndStop("shield");
_root.forceParry = true;
this.removeMovieClip();
}
}
};
_root.shieldTut = true;
}
if (this._currentframe == this._totalframes) {
if (_parent.eLife == 1) {
if (_root.Diff == "hard") {
_parent.aTimer = 12;
}
} else {
_parent.aTimer = 17;
}
_parent.gotoAndStop("stand");
}
if ((((((this._currentframe > 6) && (this._currentframe < 8)) && (_root.heroStatus == "parrying")) && (Math.abs(_root.hero._x - _parent._x) < 100)) && (Math.abs(_root.hero._y - _parent._y) < 50)) && (_root.dir != _parent.dir)) {
_parent.gotoAndStop("parry");
}
if ((((((this._currentframe > 6) && (this._currentframe < 8)) && (_root.heroStatus == "shielding")) && (Math.abs(_root.hero._x - _parent._x) < 100)) && (Math.abs(_root.hero._y - _parent._y) < 50)) && (_root.dir != _parent.dir)) {
_parent.aTimer = 14;
_parent.gotoAndStop("parry");
} else if (((((((_root.godMode == false) && (this._currentframe > 6)) && (this._currentframe < 8)) && (_root.heroStatus != "powerAttack")) && (Math.abs(_root.hero._x - _parent._x) < 100)) && (Math.abs(_root.hero._y - _parent._y) < 40)) && (_root.heroLife != 0)) {
_parent.aTimer = 17;
if (_root.Diff == "easy") {
_root.attackAmount = 5;
}
if (_root.Diff == "hard") {
_root.attackAmount = 10;
}
_root.hero.gotoAndStop("hurt");
} else if ((this._currentframe <= 2) || (this._currentframe > 8)) {
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 3) {
_parent.gotoAndStop("hurt");
}
if (rNum > 3) {
_parent.gotoAndStop("shieldHit");
}
}
if (_root.Diff == "hard") {
if (rNum <= 2) {
_parent.gotoAndStop("hurt");
}
if (rNum > 2) {
_parent.gotoAndStop("shieldHit");
}
}
}
}
}
}
Instance of Symbol 358 MovieClip "parry" in Symbol 411 MovieClip [enemy1] Frame 17
onClipEvent (load) {
if (_root.heroStatus == "shielding") {
_root.hero.gotoAndStop("shieldHit");
} else {
_root.hero.gotoAndStop("parry");
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (_root.hero._x > _parent._x) {
_parent._x = _parent._x - 4;
}
if (_root.hero._x < _parent._x) {
_parent._x = _parent._x + 4;
}
if (this._currentframe == this._totalframes) {
_parent.eStatus = "parrying";
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 366 MovieClip "shieldHit" in Symbol 411 MovieClip [enemy1] Frame 22
onClipEvent (load) {
_parent.blockCount = _parent.blockCount + 1;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (_parent.blockCount == 4) {
_parent.gotoAndStop("hurt");
}
_parent.eStatus = "shielding";
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 372 MovieClip "hurt" in Symbol 411 MovieClip [enemy1] Frame 29
onClipEvent (load) {
_root.ach03count = 0;
_root.hitB = _root.hitB + 1;
_parent.eStatus = "hurt";
if (_root.heroStatus == "powerAttack") {
_parent.aTimer = 30;
}
if (_parent.eLife != 0) {
_parent.eLife = _parent.eLife - 1;
}
srNum = random(10) + 1;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
_parent.blockCount = 0;
if (this._currentframe == 2) {
if (srNum <= 5) {
}
if ((srNum > 5) && (srNum <= 10)) {
stabSFX = new Sound();
stabSFX.attachSound("stabSFX1");
stabSFX.start(0, 0);
}
}
if (this._currentframe == this._totalframes) {
if (_parent.eLife != 0) {
_parent.gotoAndStop("stand");
} else {
_parent.gotoAndStop("die");
}
}
}
}
Instance of Symbol 410 MovieClip "die" in Symbol 411 MovieClip [enemy1] Frame 34
onClipEvent (load) {
_root.killB = _root.killB + 1;
_root.action = false;
_root.capKills = _root.capKills + 1;
_root.totalKills = _root.totalKills + 1;
rewardRNum = random(20);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == this._totalframes) {
_parent.eStatus = "dead";
this.stop();
}
if (this._currentframe == 3) {
if (rewardRNum <= 7) {
coinReward = _root.attachMovie("reward_goldCoin", "coin" + _root.depth, _root.depth++);
coinReward._x = _parent._x;
coinReward._y = _parent._y;
coinReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 100;
_root.lootLifeCount = _root.lootLifeCount + 100;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if ((rewardRNum > 7) && (rewardRNum <= 12)) {
RubyReward = _root.attachMovie("reward_Ruby", "ruby" + _root.depth, _root.depth++);
RubyReward._x = _parent._x;
RubyReward._y = _parent._y;
RubyReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 500;
_root.lootLifeCount = _root.lootLifeCount + 500;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if ((rewardRNum > 12) && (rewardRNum <= 16)) {
EmeraldReward = _root.attachMovie("reward_Emerald", "Emerald" + _root.depth, _root.depth++);
EmeraldReward._x = _parent._x;
EmeraldReward._y = _parent._y;
EmeraldReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - (_root.hero._height / 2);
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 750;
_root.lootLifeCount = _root.lootLifeCount + 750;
this.removeMovieClip();
}
if (rGrav == undefined) {
rGrav = 20;
rGravCount = 0;
}
if (rGravCount < 20) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
} else if ((!_root.g.hitTest(this._x, this._y, true)) && (rGrav < 0)) {
rGrav = rGrav - 1;
this._y = this._y - rGrav;
}
if (_root.g.hitTest(this._x, this._y, true) && (rGrav < 0)) {
rGravCount = rGravCount + 1;
rGrav = -rGrav;
ting = new Sound();
ting.attachSound("ting");
ting.start(0, 0);
}
}
};
}
if (rewardRNum > 16) {
chestReward = _root.attachMovie("reward_Chest", "chest" + _root.depth, _root.depth++);
chestReward._x = _parent._x;
chestReward._y = _parent._y - 15;
chestReward.onEnterFrame = function () {
if (_root.Paused == true) {
} else {
if ((Math.abs(this._x - _root.hero._x) > 700) || (Math.abs(this._y - _root.hero._y) > 400)) {
this.removeMovieClip();
}
if (_root.hero.hitTest(this._x, this._y - 20, true)) {
kerChing = new Sound();
kerChing.attachSound("kerChing");
kerChing.start(0, 0);
pCash = _root.attachMovie("PlusCash", "PlusCash" + _root.depth, _root.depth++);
pCash.onEnterFrame = function () {
pCash._x = _root.hero._x;
pCash._y = _root.hero._y - _root.hero._height;
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
_root.loot = _root.loot + 1000;
_root.lootLifeCount = _root.lootLifeCount + 1000;
this.removeMovieClip();
}
if (!_root.g.hitTest(this._x, this._y, true)) {
this._y = this._y + 2;
}
}
};
}
}
}
}
Symbol 418 Button
on (release) {
gotoAndStop ("chooseLev");
}
Symbol 426 Button
on (release) {
lcf = _root.attachMovie("levelChangeFade", "lcf", 50000);
lcf.onEnterFrame = function () {
if (_root.vCam == undefined) {
lcf._x = 0;
lcf._x = 0;
}
lcf._x = _root.vCam._x - (_root.vCam._width / 2);
lcf._y = _root.vCam._y - (_root.vCam._height / 2);
if (this._currentframe == (this._totalframes / 2)) {
_root.hordeMode = false;
_root.levelNum = 0;
_root.levelLoaded = false;
}
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
_root.lcf = undefined;
}
};
}
Symbol 434 Button
on (release) {
_root.bg.hmDisc._visible = false;
_root.hmDiscRead = true;
}
Symbol 445 Button
on (release) {
gotoAndStop (3);
}
Symbol 449 MovieClip Frame 1
stop();
Symbol 459 Button
on (release) {
gotoAndStop (1);
}
Symbol 473 Button
on (release) {
gotoAndStop (2);
}
Symbol 479 Button
on (release) {
_root.selectedCharacter = "hero";
prevFrame();
}
Symbol 484 Button
on (release) {
_root.selectedCharacter = "terrence";
prevFrame();
}
Symbol 485 MovieClip [hordeLevel0bg] Frame 1
stop();
_root.vCam.removeMovieClip();
_root.vCam = undefined;
_root.endCredits.removeMovieClip();
Instance of Symbol 436 MovieClip "hmDisc" in Symbol 485 MovieClip [hordeLevel0bg] Frame 1
onClipEvent (enterFrame) {
if (_root.hmDiscRead == true) {
this._visible = false;
} else {
this._visible = true;
}
}
Symbol 485 MovieClip [hordeLevel0bg] Frame 2
insertCoin.enabled = false;
exit.enabled = false;
_root.cheatLevelSelected = 1;
Instance of Symbol 449 MovieClip "playLevel" in Symbol 485 MovieClip [hordeLevel0bg] Frame 2
on (press) {
this.gotoAndStop(1);
}
on (release) {
_root.levelNum = _root.cheatLevelSelected;
_root.msTimer = 0;
_root.initHordeModeVar = true;
this.gotoAndStop(2);
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 462 MovieClip in Symbol 485 MovieClip [hordeLevel0bg] Frame 2
on (release) {
_root.cheatLevelSelected = 1;
}
Instance of Symbol 465 MovieClip in Symbol 485 MovieClip [hordeLevel0bg] Frame 2
on (release) {
_root.cheatLevelSelected = 2;
}
Instance of Symbol 468 MovieClip in Symbol 485 MovieClip [hordeLevel0bg] Frame 2
on (release) {
_root.cheatLevelSelected = 3;
}
Instance of Symbol 471 MovieClip in Symbol 485 MovieClip [hordeLevel0bg] Frame 2
onClipEvent (enterFrame) {
if (_parent._currentframe == 2) {
if (_root.cheatLevelSelected == "1") {
this._visible = true;
}
if (_root.cheatLevelSelected != "1") {
this._visible = false;
}
}
}
Instance of Symbol 471 MovieClip in Symbol 485 MovieClip [hordeLevel0bg] Frame 2
onClipEvent (enterFrame) {
if (_parent._currentframe == 2) {
if (_root.cheatLevelSelected == "2") {
this._visible = true;
}
if (_root.cheatLevelSelected != "2") {
this._visible = false;
}
}
}
Instance of Symbol 471 MovieClip in Symbol 485 MovieClip [hordeLevel0bg] Frame 2
onClipEvent (enterFrame) {
if (_parent._currentframe == 2) {
if (_root.cheatLevelSelected == "3") {
this._visible = true;
}
if (_root.cheatLevelSelected != "3") {
this._visible = false;
}
}
}
Symbol 595 MovieClip [hero] Frame 1
stop();
Instance of Symbol 490 MovieClip "stand" in Symbol 595 MovieClip [hero] Frame 1
onClipEvent (load) {
_root.xSpeed = 0;
if (_root.heroLife == 0) {
if (_root.infiniteLives == false) {
_root.lives = _root.lives - 1;
}
_root.heroLife = 100;
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if ((_root.narrative == false) && (_root.bmPause == false)) {
_root.heroStatus = "standing";
_root.hero2Status = "nothing";
if (Key.isDown(_root.Down)) {
if (_root.g.hitTest(_parent._x, _parent._y + 3, true) && (!_root.g.hitTest(_parent._x, _parent._y + 10, true))) {
_parent.gotoAndStop("drop");
}
}
_root.defDelay = _root.defDelay - 1;
_root.heroStatus = "standing";
if (Key.isDown(_root.Right) && (Key.isDown(_root.Left))) {
_parent.gotoAndStop("stand");
} else if (Key.isDown(_root.Right)) {
_root.dir = "right";
_parent._xscale = 100;
if (_root.g.hitTest(_root.hero._x, _root.hero._y - 5, true)) {
_parent.gotoAndStop("walk");
}
if (_root.xSpeed >= 0) {
if (!_root.g.hitTest(_root.hero._x + 2, _root.hero._y - 10, true)) {
_parent.gotoAndStop("walk");
}
}
} else if (Key.isDown(_root.Left)) {
_root.dir = "left";
_parent._xscale = -100;
if (_root.g.hitTest(_root.hero._x, _root.hero._y - 5, true)) {
_parent.gotoAndStop("walk");
}
if (_root.xSpeed >= 0) {
if (!_root.g.hitTest(_root.hero._x + 2, _root.hero._y - 10, true)) {
_parent.gotoAndStop("walk");
}
}
}
if (Key.isDown(_root.Jump)) {
_parent.gotoAndStop("jump");
}
if (Key.isDown(_root.Attack) && (_root.AttackTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if ((Key.isDown(_root.Shield) && (Key.isDown(_root.Attack))) && (_root.hasBow == true)) {
_parent.gotoAndStop("arrow");
} else if (Key.isDown(_root.Shield) && (_root.heroDef > 10)) {
_parent.gotoAndStop("shield");
}
}
}
Instance of Symbol 495 MovieClip "walk" in Symbol 595 MovieClip [hero] Frame 7
onClipEvent (enterFrame) {
_root.heroStatus = "walking";
_root.hero2Status = "nothing";
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
_root.defDelay = _root.defDelay - 1;
if (Key.isDown(_root.Attack) && (_root.AttackTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if (Key.isDown(_root.Shield) && (_root.heroDef > 10)) {
_parent.gotoAndStop("shieldWalk");
}
if (Key.isDown(_root.Jump)) {
_parent.gotoAndStop("jump");
}
if (Key.isDown(_root.Right) && (!Key.isDown(_root.Left))) {
_root.dir = "right";
_parent._xscale = 100;
_root.xSpeed = _root.xSpeed + 1;
_root.hero._x = _root.hero._x + _root.xSpeed;
}
if (Key.isDown(_root.Left) && (!Key.isDown(_root.Right))) {
_root.dir = "left";
_parent._xscale = -100;
_root.xSpeed = _root.xSpeed - 1;
_root.hero._x = _root.hero._x + _root.xSpeed;
}
if ((!Key.isDown(_root.Right)) && (!Key.isDown(_root.Left))) {
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
if (Key.isDown(_root.Right) && (Key.isDown(_root.Left))) {
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 505 MovieClip "slash" in Symbol 595 MovieClip [hero] Frame 12
onClipEvent (load) {
_root.xSpeed = 0;
keyIsDown = true;
nextAttackVoid = false;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if ((Key.isDown(_root.Attack) && (this._currentframe < 7)) && (keyIsDown == false)) {
nextAttackVoid = true;
}
if (((Key.isDown(_root.Attack) && (this._currentframe >= 7)) && (keyIsDown == false)) && (nextAttackVoid == false)) {
_parent.gotoAndStop("attack2");
}
if (Key.isDown(_root.Shield)) {
if (_root.infiniteDefence == false) {
if (_root.Diff == "easy") {
_parent.gotoAndStop("shield");
}
if (_root.Diff == "hard") {
_root.heroDef = _root.heroDef - 0.5;
}
}
}
if ((!Key.isDown(_root.Attack)) && (keyIsDown == true)) {
keyIsDown = false;
}
if (keyIsDown == true) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 15;
}
}
if (keyIsDown == false) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 5;
}
}
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
if (_root.Diff == "easy") {
if ((this._currentframe >= 4) && (this._currentframe < 9)) {
_root.heroStatus = "parrying";
} else {
_root.heroStatus = "attacking";
}
}
if (_root.Diff == "hard") {
if ((this._currentframe > 4) && (this._currentframe < 8)) {
_root.heroStatus = "parrying";
} else {
_root.heroStatus = "attacking";
}
}
}
}
Instance of Symbol 511 MovieClip "slash" in Symbol 595 MovieClip [hero] Frame 18
onClipEvent (load) {
_root.xSpeed = 0;
keyIsDown = true;
nextAttackVoid = false;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if ((Key.isDown(_root.Attack) && (this._currentframe < 8)) && (keyIsDown == false)) {
nextAttackVoid = true;
}
if (((Key.isDown(_root.Attack) && (this._currentframe >= 8)) && (keyIsDown == false)) && (nextAttackVoid == false)) {
_parent.gotoAndStop("attack3");
}
if (Key.isDown(_root.Shield)) {
if (_root.infiniteDefence == false) {
if (_root.Diff == "easy") {
_parent.gotoAndStop("shield");
}
if (_root.Diff == "hard") {
_root.heroDef = _root.heroDef - 0.5;
}
}
}
if ((!Key.isDown(_root.Attack)) && (keyIsDown == true)) {
keyIsDown = false;
}
if (keyIsDown == true) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 15;
}
}
if (keyIsDown == false) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 5;
}
}
if (this._currentframe == this._totalframes) {
_root.ach03count = 0;
_parent.gotoAndStop("stand");
}
if (_root.Diff == "easy") {
if ((this._currentframe >= 3) && (this._currentframe < 9)) {
_root.heroStatus = "parrying";
} else {
_root.heroStatus = "attacking";
}
}
if (_root.Diff == "hard") {
if ((this._currentframe > 5) && (this._currentframe < 8)) {
_root.heroStatus = "parrying";
} else {
_root.heroStatus = "attacking";
}
}
}
}
Instance of Symbol 522 MovieClip "stab" in Symbol 595 MovieClip [hero] Frame 25
onClipEvent (load) {
_root.ach03count = 0;
_root.xSpeed = 0;
this.stop();
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (_root.xSpeed == 0) {
_root.xSpeed = 16;
}
this.play();
if (this._currentframe < 6) {
if (_root.dir == "right") {
_root.hero._x = _root.hero._x + _root.xSpeed;
}
if (_root.dir == "left") {
_root.hero._x = _root.hero._x - _root.xSpeed;
}
}
if ((this._currentframe > 3) && (this._currentframe < 11)) {
_root.heroStatus = "powerAttack";
}
if (this._currentframe == this._totalframes) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 20;
}
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 527 MovieClip "slash" in Symbol 595 MovieClip [hero] Frame 32
onClipEvent (load) {
_root.parryB = _root.parryB + 1;
_root.action = true;
_root.aRand = random(10);
_root.ach03count = _root.ach03count + 1;
_root.xSpeed = 0;
_root.ySpeed = 0;
srNum = random(10) + 1;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 2) {
if (srNum <= 5) {
parrySFX = new Sound();
parrySFX.attachSound("parrySFX0");
parrySFX.start(0, 0);
}
if ((srNum > 5) && (srNum <= 10)) {
parrySFX = new Sound();
parrySFX.attachSound("parrySFX1");
parrySFX.start(0, 0);
}
}
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 530 MovieClip "jump" in Symbol 595 MovieClip [hero] Frame 38
onClipEvent (load) {
_root.hero2Status = "nothing";
_root.hero._y = _root.hero._y - 1;
if (_root.heroStatus != "jumping") {
_root.ySpeed = 10;
_root.heroStatus = "jumping";
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (Key.isDown(_root.Attack) && (_root.AttackTimer <= 0)) {
_parent.gotoAndStop("jumpAttack");
}
_root.hero._y = _root.hero._y - _root.ySpeed;
_root.hero._x = _root.hero._x + _root.xSpeed;
_root.ySpeed = _root.ySpeed - 1;
i = 0;
while (i < 10) {
if (_root.g.hitTest(_root.hero._x, _root.hero._y + i, true) && (_root.ySpeed <= 0)) {
_root.ySpeed = 1;
_root.xSpeed = 0;
_root.hero2Status = "nothing";
_parent.gotoAndStop("stand");
}
i++;
}
if (Key.isDown(_root.Right)) {
_root.dir = "right";
_parent._xscale = 100;
_root.xSpeed = _root.xSpeed + 1;
}
if (Key.isDown(_root.Left)) {
_root.dir = "left";
_parent._xscale = -100;
_root.xSpeed = _root.xSpeed - 1;
}
}
}
Instance of Symbol 531 MovieClip "drop" in Symbol 595 MovieClip [hero] Frame 43
onClipEvent (load) {
_root.hero._y = _root.hero._y - 1;
_root.heroStatus = "jumping";
dropTimer = 0;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
_root.hero._y = _root.hero._y + _root.ySpeed;
_root.hero._x = _root.hero._x + _root.xSpeed;
_root.ySpeed = _root.ySpeed + 1;
dropTimer = dropTimer + 1;
if (dropTimer > 4) {
i = 0;
while (i < 10) {
if (_root.g.hitTest(_root.hero._x, _root.hero._y + i, true)) {
_root.ySpeed = 1;
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
i++;
}
}
if (Key.isDown(_root.Right)) {
_parent._xscale = 100;
_root.xSpeed = _root.xSpeed + 1;
}
if (Key.isDown(_root.Left)) {
_parent._xscale = -100;
_root.xSpeed = _root.xSpeed - 1;
}
if ((!Key.isDown(_root.Right)) && (!Key.isDown(_root.Left))) {
_root.xSpeed = 0;
}
}
}
Instance of Symbol 537 MovieClip "attackJump" in Symbol 595 MovieClip [hero] Frame 48
onClipEvent (load) {
keyIsDown = true;
_root.hero._y = _root.hero._y - 1;
_root.heroStatus = "jumping";
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
_root.hero._y = _root.hero._y - _root.ySpeed;
_root.hero._x = _root.hero._x + _root.xSpeed;
_root.ySpeed = _root.ySpeed - 1;
i = 0;
while (i < 10) {
if (_root.g.hitTest(_root.hero._x, _root.hero._y + i, true) && (_root.ySpeed <= 0)) {
_root.ySpeed = 1;
_root.xSpeed = 0;
_parent.gotoAndStop("stand");
}
i++;
}
if ((!Key.isDown(_root.Attack)) && (keyIsDown == true)) {
keyIsDown = false;
}
if (keyIsDown == true) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 15;
}
}
if (keyIsDown == false) {
if (_root.infiniteAttack == false) {
_root.AttackTimer = 5;
}
}
if (this._currentframe == this._totalframes) {
_root.ach03count = 0;
_parent.gotoAndStop("jump");
}
if (_root.Diff == "easy") {
if ((this._currentframe > 5) && (this._currentframe < 10)) {
_root.hero2Status = "parrying";
}
}
if (_root.Diff == "hard") {
if ((this._currentframe > 5) && (this._currentframe < 9)) {
_root.hero2Status = "parrying";
}
}
}
}
Instance of Symbol 543 MovieClip "shield" in Symbol 595 MovieClip [hero] Frame 57
onClipEvent (load) {
this.bigOrLittle = 0;
_root.heroStatus = "shielding";
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (_root.infiniteDefence == false) {
if (_root.Diff == "easy") {
_root.heroDef = _root.heroDef - 0.3;
}
if (_root.Diff == "hard") {
_root.heroDef = _root.heroDef - 0.5;
}
}
if ((!Key.isDown(_root.Shield)) || (_root.heroDef <= 0)) {
_root.defDelay = 40;
_parent.gotoAndStop("stand");
}
if (Key.isDown(_root.Right)) {
_root.dir = "right";
_parent._xscale = 100;
if (_root.xSpeed >= 0) {
_parent.gotoAndStop("shieldWalk");
}
}
if (Key.isDown(_root.Left)) {
_root.dir = "left";
_parent._xscale = -100;
if (_root.xSpeed >= 0) {
_parent.gotoAndStop("shieldWalk");
}
}
}
}
Instance of Symbol 548 MovieClip "shieldWalk" in Symbol 595 MovieClip [hero] Frame 63
onClipEvent (load) {
_root.heroStatus = "shielding";
emergencyTimer = 0;
emergencyX = _root.hero._x;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (_root.infiniteDefence == false) {
if (_root.Diff == "easy") {
_root.heroDef = _root.heroDef - 0.2;
}
if (_root.Diff == "hard") {
_root.heroDef = _root.heroDef - 0.5;
}
}
_root.defDelay = _root.defDelay - 1;
if (Key.isDown(_root.Attack) && (_root.AttackTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if (!Key.isDown(_root.Shield)) {
_root.heroStatus = "walking";
_parent.gotoAndStop("walk");
}
if (Key.isDown(_root.Jump)) {
_parent.gotoAndStop("jump");
}
if (Key.isDown(_root.Right) && (!Key.isDown(_root.Left))) {
_root.dir = "right";
_parent._xscale = 100;
_root.xSpeed = _root.xSpeed + 1;
_root.hero._x = _root.hero._x + _root.xSpeed;
}
if (Key.isDown(_root.Left) && (!Key.isDown(_root.Right))) {
_root.dir = "left";
_parent._xscale = -100;
_root.xSpeed = _root.xSpeed - 1;
_root.hero._x = _root.hero._x + _root.xSpeed;
}
if ((!Key.isDown(_root.Right)) && (!Key.isDown(_root.Left))) {
_root.xSpeed = 0;
_parent.gotoAndStop("shield");
}
if (Key.isDown(_root.Right) && (Key.isDown(_root.Left))) {
_root.xSpeed = 0;
_parent.gotoAndStop("shield");
}
}
}
Instance of Symbol 553 MovieClip "shieldHit" in Symbol 595 MovieClip [hero] Frame 72
onClipEvent (load) {
_root.blockB = _root.blockB + 1;
_root.ach03count = 0;
_root.ach04void = true;
srNum = random(10) + 1;
if (_root.infiniteDefence == false) {
if (_root.Diff == "easy") {
_root.heroDef = _root.heroDef - 5;
}
if (_root.Diff == "hard") {
_root.heroDef = _root.heroDef - 7;
}
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 2) {
if (srNum <= 5) {
parrySFX = new Sound();
parrySFX.attachSound("parrySFX0");
parrySFX.start(0, 0);
}
if ((srNum > 5) && (srNum <= 10)) {
parrySFX = new Sound();
parrySFX.attachSound("parrySFX1");
parrySFX.start(0, 0);
}
}
if (_root.dir == "right") {
_parent._x = _parent._x - 3;
}
if (_root.dir == "left") {
_parent._x = _parent._x + 3;
}
if (this._currentframe == this._totalframes) {
_root.defTimer = 50;
_parent.gotoAndStop("shield");
}
}
}
Instance of Symbol 562 MovieClip "hurt" in Symbol 595 MovieClip [hero] Frame 79
onClipEvent (load) {
_root.ySpeed = 0;
_root.hurtB = _root.hurtB + 1;
_root.ach03count = 0;
_root.heroStatus = "hurt";
if (_root.infiniteHealth == false) {
_root.heroLife = _root.heroLife - _root.attackAmount;
}
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (this._currentframe == this._totalframes) {
if (_root.heroLife == 0) {
_parent.gotoAndStop("die");
} else {
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 575 MovieClip "die" in Symbol 595 MovieClip [hero] Frame 84
onClipEvent (load) {
_root.dieB = _root.dieB + 1;
_root.ach03count = 0;
_root.ach02void = true;
gameOverTimer = 0;
_root.heroStatus = "dead";
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (gameOverTimer != 0) {
gameOverTimer = gameOverTimer - 1;
}
if ((_root.igOptions._alpha != 100) && (gameOverTimer == 0)) {
_root.igOptions._alpha = _root.igOptions._alpha + 2;
}
if ((this._currentframe == 2) && (_root.hordeMode == false)) {
if (_root.lives == 0) {
if (_root.levelNum == 5) {
_root.firstEncounter = false;
}
_root.newMusic.music.stop();
scratch = new Sound(_root);
scratch.attachSound("scratch");
scratch.start(0, 1);
igOptions = _root.attachMovie("igOptions", "igOptions", _root.getNextHighestDepth());
igOptions.gotoAndStop(5);
gameOverTimer = 200;
igOptions._alpha = 0;
igOptions.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
}
}
if (this._currentframe == 100) {
if (_root.lives <= 0) {
deadMusic = new Sound(_root);
deadMusic.attachSound("Death");
deadMusic.start(0, 99);
}
}
if (this._currentframe == this._totalframes) {
if (_root.lives != 0) {
_parent.gotoAndStop("spawn");
} else if (_root.lives <= 0) {
this.stop();
if (_root.hordeMode == true) {
_root.hordeModeHeroDead = true;
}
}
}
}
}
Instance of Symbol 578 MovieClip "spawn" in Symbol 595 MovieClip [hero] Frame 88
onClipEvent (load) {
this.dieTimer = 0;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
this.dieTimer = this.dieTimer + 1;
if (this.dieTimer > 60) {
_root.heroStatus = "died";
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 580 MovieClip "fallspawn" in Symbol 595 MovieClip [hero] Frame 94
onClipEvent (load) {
_root.ySpeed = 0;
if (_root.lives != 0) {
_root.lives = _root.lives - 1;
fallDie = false;
}
if (_root.lives == 0) {
fallDie = true;
}
gameOverTimer = 0;
dmTimer = 0;
}
onClipEvent (enterFrame) {
dmTimer = dmTimer + 1;
if (dmTimer == 100) {
deadMusic = new Sound(_root);
deadMusic.attachSound("Death");
deadMusic.start(0, 99);
}
_root.heroStatus = "falling";
if (gameOverTimer != 0) {
gameOverTimer = gameOverTimer - 1;
}
if ((_root.igOptions._alpha != 100) && (gameOverTimer == 0)) {
_root.igOptions._alpha = _root.igOptions._alpha + 2;
}
if (fallTimer == undefined) {
_root.newMusic.music.stop();
scratch = new Sound(_root);
scratch.attachSound("scratch");
scratch.start(0, 1);
fallTimer = 0;
}
if (fallDie == true) {
igOptions = _root.attachMovie("igOptions", "igOptions", _root.getNextHighestDepth());
igOptions.gotoAndStop(5);
igOptions._alpha = 0;
igOptions.onEnterFrame = function () {
this._x = _root.vCam._x - (_root.vCam._width / 2);
this._y = _root.vCam._y - (_root.vCam._height / 2);
};
gameOverTimer = 200;
fallDie = "done";
} else if (fallDie == false) {
if (fallTimer < 120) {
fallTimer = fallTimer + 1;
}
if (fallTimer >= 120) {
_root.levelLoaded = false;
}
}
}
Instance of Symbol 582 MovieClip "stand" in Symbol 595 MovieClip [hero] Frame 101
onClipEvent (enterFrame) {
_root.finishedTheGame = true;
if ((_root.rainIncreaseTimer > 20) && (_root.rainAmount > 0)) {
_root.rainAmount = _root.rainAmount - 1;
_root.rainIncreaseTimer = 0;
}
}
Instance of Symbol 495 MovieClip "walk" in Symbol 595 MovieClip [hero] Frame 111
onClipEvent (enterFrame) {
_root.heroStatus = "walkToBoss";
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
_root.lightningTimer = 10000;
if ((_root.hero._x < (_root.Boss._x + 300)) && (_root.hero._x > (_root.Boss._x + 200))) {
_root.walkedToBoss = true;
if (_parent._xscale == 100) {
_root.dir = "left";
_parent._xscale = -100;
}
_root.endGameFreeze = true;
_parent.gotoAndStop("stand");
} else if (_root.hero._x > (_root.Boss._x + 300)) {
_root.dir = "left";
_parent._xscale = -100;
_root.xSpeed = _root.xSpeed - 1;
_root.hero._x = _root.hero._x + _root.xSpeed;
} else if (_root.hero._x < (_root.Boss._x + 200)) {
_root.dir = "right";
_parent._xscale = 100;
_root.xSpeed = _root.xSpeed + 1;
_root.hero._x = _root.hero._x + _root.xSpeed;
}
}
}
Instance of Symbol 594 MovieClip "stand" in Symbol 595 MovieClip [hero] Frame 120
onClipEvent (enterFrame) {
_root.heroStatus = "shooting";
if (this._currentframe == 16) {
_root.heroArrow = true;
arrowMC = _root.bg.attachMovie("arrowMC", "hArrow", _root.overDepth++);
arrowMC._x = _parent._x - _root.bg._x;
arrowMC._y = (_parent._y - _root.bg._y) - 28;
arrowMC.onEnterFrame = function () {
if (_root.Paused == true) {
this.stop();
} else {
this.deathTimer = this.deathTimer + 1;
if (this.deathTimer > this.deathCap) {
_root.heroArrow = false;
this.removeMovieClip();
}
if (this.dDir == "right") {
this._x = this._x + 13;
}
if (this.dDir == "left") {
this._x = this._x - 13;
}
if (this.arrowMC == undefined) {
if (_root.dir == "left") {
this._xscale = -100;
this.dDir = "left";
}
if (_root.dir == "right") {
this._xscale = 100;
this.dDir = "right";
}
this.deathCap = 80;
this.deflect = false;
this.rDeflect = random(10);
this.deathTimer = 0;
this.arrowMC = true;
}
if (this.hitTest(_root.vCam)) {
this.deathCap = 40;
}
if (this.deflect == true) {
this.deathCap = 40;
if (this.dDir == "left") {
this._rotation = this._rotation + (random(33) + 13);
this._x = this._x + (random(16) + 12);
if (this.rDeflect >= 4) {
this._y = this._y - random(20);
}
if (this.rDeflect < 4) {
this._y = this._y + random(20);
}
} else if (this.dDir == "right") {
this._rotation = this._rotation - (random(33) + 13);
this._x = this._x - (random(16) + 12);
if (this.rDeflect >= 4) {
this._y = this._y - random(20);
}
if (this.rDeflect < 4) {
this._y = this._y + random(20);
}
}
}
}
};
}
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
}
Symbol 597 MovieClip [vCam] 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;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
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;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
this.onUnload = resetStage;
Instance of Symbol 626 MovieClip in Symbol 627 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ach01 == false) {
this._visible = false;
}
if (_root.ach01 == true) {
this._visible = true;
}
}
Instance of Symbol 626 MovieClip in Symbol 635 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ach02 == false) {
this._visible = false;
}
if (_root.ach02 == true) {
this._visible = true;
}
}
Instance of Symbol 626 MovieClip in Symbol 650 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ach08 == false) {
this._visible = false;
}
if (_root.ach08 == true) {
this._visible = true;
}
}
Instance of Symbol 626 MovieClip in Symbol 658 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ach07 == false) {
this._visible = false;
}
if (_root.ach07 == true) {
this._visible = true;
}
}
Instance of Symbol 626 MovieClip in Symbol 664 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ach06 == false) {
this._visible = false;
}
if (_root.ach06 == true) {
this._visible = true;
}
}
Instance of Symbol 626 MovieClip in Symbol 672 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ach05 == false) {
this._visible = false;
}
if (_root.ach05 == true) {
this._visible = true;
}
}
Instance of Symbol 626 MovieClip in Symbol 679 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ach04 == false) {
this._visible = false;
}
if (_root.ach04 == true) {
this._visible = true;
}
}
Instance of Symbol 626 MovieClip in Symbol 689 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ach03 == false) {
this._visible = false;
}
if (_root.ach03 == true) {
this._visible = true;
}
}
Symbol 702 Button
on (release) {
gotoAndStop (2);
}
Symbol 705 Button
on (release) {
_root.checkForMedals = true;
gotoAndStop (4);
}
Symbol 708 Button
on (release) {
_root.igMenu = false;
_root.Paused = false;
_root.hero.stand.play();
_root.hero.walk.play();
_root.hero.parry.play();
_root.hero.jump.play();
_root.hero.drop.play();
_root.hero.slash.play();
_root.hero.stab.play();
_root.hero.shield.play();
_root.hero.shieldHit.play();
_root.hero.hurt.play();
_root.hero.die.play();
_root.hero.spawn.play();
_root.hero.throw.play;
_root.hero.jumpThrow.play;
_root.hero.jumpAttack.play;
_root.enemyUnpause = true;
_root.igOptions.removeMovieClip();
}
Symbol 713 Button
on (release) {
_parent.gotoAndStop("cheats");
}
Symbol 714 MovieClip Frame 1
stop();
Symbol 717 Button
on (release) {
gotoAndStop (6);
}
Symbol 720 Button
on (release) {
_root.cheatsHaveBeenActivated = false;
_root.levelSelectUsed = false;
_root.levelNum = -1;
_root.Reset = true;
_root.levelChangeFadeVar = true;
_root.hud.removeMovieClip();
_root.igOptions.removeMovieClip();
}
Symbol 723 Button
on (release) {
gotoAndStop (1);
}
Symbol 728 Button
on (release) {
_root._quality = "LOW";
}
Symbol 730 Button
on (release) {
_root._quality = "MEDIUM";
}
Symbol 732 Button
on (release) {
_root._quality = "BEST";
}
Symbol 738 Button
on (release) {
gotoAndStop ("topLeft");
_root.hudPos = "topLeft";
}
Symbol 739 Button
on (release) {
gotoAndStop ("topRight");
_root.hudPos = "topRight";
}
Symbol 742 Button
on (release) {
gotoAndStop ("botLeft");
_root.hudPos = "botLeft";
}
Symbol 743 Button
on (release) {
gotoAndStop ("botRight");
_root.hudPos = "botRight";
}
Symbol 745 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(_root.hudPos);
};
Symbol 773 MovieClip Frame 1
stop();
onEnterFrame = function () {
sLeft.sLeft.text = _root.showLeft;
sRight.sRight.text = _root.showRight;
sDown.sDown.text = _root.showDown;
sJump.sJump.text = _root.showJump;
sAttack.sAttack.text = _root.showAttack;
sShield.sShield.text = _root.showShield;
sPause.sPause.text = _root.showPause;
};
Instance of Symbol 754 MovieClip "sAttack" in Symbol 773 MovieClip Frame 1
on (release) {
_parent.gotoAndStop("setAttack");
}
Instance of Symbol 756 MovieClip "sShield" in Symbol 773 MovieClip Frame 1
on (release) {
_parent.gotoAndStop("setShield");
}
Instance of Symbol 758 MovieClip "sLeft" in Symbol 773 MovieClip Frame 1
on (release) {
_parent.gotoAndStop("setLeft");
}
Instance of Symbol 760 MovieClip "sRight" in Symbol 773 MovieClip Frame 1
on (release) {
_parent.gotoAndStop("setRight");
}
Instance of Symbol 762 MovieClip "sJump" in Symbol 773 MovieClip Frame 1
on (release) {
_parent.gotoAndStop("setJump");
}
Instance of Symbol 764 MovieClip "sDown" in Symbol 773 MovieClip Frame 1
on (release) {
_parent.gotoAndStop("setDown");
}
Instance of Symbol 766 MovieClip "sPause" in Symbol 773 MovieClip Frame 1
on (release) {
_parent.gotoAndStop("setPause");
}
Symbol 773 MovieClip Frame 2
_root.setKeyText = "Left";
var keyListener = new Object();
keyListener.onKeyDown = function () {
_root.Left = Key.getCode();
if (_root.Left == 37) {
_root.showLeft = "Left Arrow";
} else if (_root.Left == 39) {
_root.showLeft = "Right Arrow";
} else if (_root.Left == 38) {
_root.showLeft = "Up Arrow";
} else if (_root.Left == 40) {
_root.showLeft = "Down Arrow";
} else if (_root.Left == 36) {
_root.showLeft = "Home";
} else if (_root.Left == 35) {
_root.showLeft = "End";
} else if (_root.Left == 46) {
_root.showLeft = "Delete";
} else if (_root.Left == 33) {
_root.showLeft = "Page Up";
} else if (_root.Left == 34) {
_root.showLeft = "Page Down";
} else if (_root.Left == 9) {
_root.showLeft = "Tab";
} else if (_root.Left == 20) {
_root.showLeft = "Caps Lock";
} else if (_root.Left == 16) {
_root.showLeft = "Shift";
} else if (_root.Left == 17) {
_root.showLeft = "Control";
} else if (_root.Left == 32) {
_root.showLeft = "Space Bar";
} else if (_root.Left == 192) {
_root.showLeft = "Tilde";
} else if (_root.Left == 13) {
_root.showLeft = "Enter";
} else if (_root.Left == 8) {
_root.showLeft = "Backspace";
} else if (_root.Left == 220) {
_root.showLeft = "Backslash";
} else if (_root.Left == 188) {
_root.showLeft = "<";
} else if (_root.Left == 190) {
_root.showLeft = ">";
} else if (_root.Left == 191) {
_root.showLeft = "Forwardslash";
} else if (_root.Left == 186) {
_root.showLeft = ";";
} else if (_root.Left == 222) {
_root.showLeft = "'";
} else if (_root.Left == 219) {
_root.showLeft = "[";
} else if (_root.Left == 221) {
_root.showLeft = "]";
} else if (_root.Left == 189) {
_root.showLeft = "-";
} else if (_root.Left == 187) {
_root.showLeft = "+";
} else if (_root.Left == 144) {
_root.showLeft = "Num Lock";
} else if (_root.Left == 111) {
_root.showLeft = "/ (Numpad)";
} else if (_root.Left == 106) {
_root.showLeft = "* (Numpad)";
} else if (_root.Left == 109) {
_root.showLeft = "- (Numpad)";
} else if (_root.Left == 107) {
_root.showLeft = "+ (Numpad)";
} else if (_root.Left == 110) {
_root.showLeft = "Delete (Numpad)";
} else if (_root.Left == 96) {
_root.showLeft = "0 (Numpad)";
} else {
_root.tempCode = String.fromCharCode(_root.Left);
_root.showLeft = _root.tempCode;
}
Key.removeListener(keyListener);
if (_root.Left == _root.Right) {
_root.Right = "";
_root.showRight = "";
}
if (_root.Left == _root.Jump) {
_root.Jump = "";
_root.showJump = "";
}
if (_root.Left == _root.Attack) {
_root.Attack = "";
_root.showAttack = "";
}
if (_root.Left == _root.Shield) {
_root.Shield = "";
_root.showShield = "";
}
if (_root.Left == _root.Down) {
_root.Down = "";
_root.showDown = "";
}
if (_root.Left == _root.Pause) {
_root.Pause = "";
_root.showPause = "";
}
gotoAndStop (1);
};
Key.addListener(keyListener);
Instance of Symbol 766 MovieClip "sPause" in Symbol 773 MovieClip Frame 2
on (release) {
_parent.gotoAndStop("setShield");
}
Symbol 773 MovieClip Frame 3
_root.setKeyText = "Right";
var keyListener = new Object();
keyListener.onKeyDown = function () {
_root.Right = Key.getCode();
if (_root.Right == 37) {
_root.showRight = "Left Arrow";
} else if (_root.Right == 39) {
_root.showRight = "Right Arrow";
} else if (_root.Right == 38) {
_root.showRight = "Up Arrow";
} else if (_root.Right == 40) {
_root.showRight = "Down Arrow";
} else if (_root.Right == 36) {
_root.showRight = "Home";
} else if (_root.Right == 35) {
_root.showRight = "End";
} else if (_root.Right == 46) {
_root.showRight = "Delete";
} else if (_root.Right == 33) {
_root.showRight = "Page Up";
} else if (_root.Right == 34) {
_root.showRight = "Page Down";
} else if (_root.Right == 9) {
_root.showRight = "Tab";
} else if (_root.Right == 20) {
_root.showRight = "Caps Lock";
} else if (_root.Right == 16) {
_root.showRight = "Shift";
} else if (_root.Right == 17) {
_root.showRight = "Control";
} else if (_root.Right == 32) {
_root.showRight = "Space Bar";
} else if (_root.Right == 192) {
_root.showRight = "Tilde";
} else if (_root.Right == 13) {
_root.showRight = "Enter";
} else if (_root.Right == 8) {
_root.showRight = "Backspace";
} else if (_root.Right == 220) {
_root.showRight = "Backslash";
} else if (_root.Right == 188) {
_root.showRight = "<";
} else if (_root.Right == 190) {
_root.showRight = ">";
} else if (_root.Right == 191) {
_root.showRight = "Forwardslash";
} else if (_root.Right == 186) {
_root.showRight = ";";
} else if (_root.Right == 222) {
_root.showRight = "'";
} else if (_root.Right == 219) {
_root.showRight = "[";
} else if (_root.Right == 221) {
_root.showRight = "]";
} else if (_root.Right == 189) {
_root.showRight = "-";
} else if (_root.Right == 187) {
_root.showRight = "+";
} else if (_root.Right == 144) {
_root.showRight = "Num Lock";
} else if (_root.Right == 111) {
_root.showRight = "/ (Numpad)";
} else if (_root.Right == 106) {
_root.showRight = "* (Numpad)";
} else if (_root.Right == 109) {
_root.showRight = "- (Numpad)";
} else if (_root.Right == 107) {
_root.showRight = "+ (Numpad)";
} else if (_root.Right == 110) {
_root.showRight = "Delete (Numpad)";
} else if (_root.Right == 96) {
_root.showRight = "0 (Numpad)";
} else {
_root.tempCode = String.fromCharCode(_root.Right);
_root.showRight = _root.tempCode;
}
Key.removeListener(keyListener);
if (_root.Right == _root.Left) {
_root.Left = "";
_root.showLeft = "";
}
if (_root.Right == _root.Jump) {
_root.Jump = "";
_root.showJump = "";
}
if (_root.Right == _root.Attack) {
_root.Attack = "";
_root.showAttack = "";
}
if (_root.Right == _root.Shield) {
_root.Shield = "";
_root.showShield = "";
}
if (_root.Right == _root.Down) {
_root.Down = "";
_root.showDown = "";
}
if (_root.Right == _root.Pause) {
_root.Pause = "";
_root.showPause = "";
}
gotoAndStop (1);
};
Key.addListener(keyListener);
Symbol 773 MovieClip Frame 4
_root.setKeyText = "Down";
var keyListener = new Object();
keyListener.onKeyDown = function () {
_root.Down = Key.getCode();
if (_root.Down == 37) {
_root.showDown = "Left Arrow";
} else if (_root.Down == 39) {
_root.showDown = "Right Arrow";
} else if (_root.Down == 38) {
_root.showDown = "Up Arrow";
} else if (_root.Down == 40) {
_root.showDown = "Down Arrow";
} else if (_root.Down == 36) {
_root.showDown = "Home";
} else if (_root.Down == 35) {
_root.showDown = "End";
} else if (_root.Down == 46) {
_root.showDown = "Delete";
} else if (_root.Down == 33) {
_root.showDown = "Page Up";
} else if (_root.Down == 34) {
_root.showDown = "Page Down";
} else if (_root.Down == 9) {
_root.showDown = "Tab";
} else if (_root.Down == 20) {
_root.showDown = "Caps Lock";
} else if (_root.Down == 16) {
_root.showDown = "Shift";
} else if (_root.Down == 17) {
_root.showDown = "Control";
} else if (_root.Down == 32) {
_root.showDown = "Space Bar";
} else if (_root.Down == 192) {
_root.showDown = "Tilde";
} else if (_root.Down == 13) {
_root.showDown = "Enter";
} else if (_root.Down == 8) {
_root.showDown = "Backspace";
} else if (_root.Down == 220) {
_root.showDown = "Backslash";
} else if (_root.Down == 188) {
_root.showDown = "<";
} else if (_root.Down == 190) {
_root.showDown = ">";
} else if (_root.Down == 191) {
_root.showDown = "Forwardslash";
} else if (_root.Down == 186) {
_root.showDown = ";";
} else if (_root.Down == 222) {
_root.showDown = "'";
} else if (_root.Down == 219) {
_root.showDown = "[";
} else if (_root.Down == 221) {
_root.showDown = "]";
} else if (_root.Down == 189) {
_root.showDown = "-";
} else if (_root.Down == 187) {
_root.showDown = "+";
} else if (_root.Down == 144) {
_root.showDown = "Num Lock";
} else if (_root.Down == 111) {
_root.showDown = "/ (Numpad)";
} else if (_root.Down == 106) {
_root.showDown = "* (Numpad)";
} else if (_root.Down == 109) {
_root.showDown = "- (Numpad)";
} else if (_root.Down == 107) {
_root.showDown = "+ (Numpad)";
} else if (_root.Down == 110) {
_root.showDown = "Delete (Numpad)";
} else if (_root.Down == 96) {
_root.showDown = "0 (Numpad)";
} else {
_root.tempCode = String.fromCharCode(_root.Down);
_root.showDown = _root.tempCode;
}
Key.removeListener(keyListener);
if (_root.Down == _root.Left) {
_root.Left = "";
_root.showLeft = "";
}
if (_root.Down == _root.Right) {
_root.Right = "";
_root.showRight = "";
}
if (_root.Down == _root.Jump) {
_root.Jump = "";
_root.showJump = "";
}
if (_root.Down == _root.Attack) {
_root.Attack = "";
_root.showAttack = "";
}
if (_root.Down == _root.Shield) {
_root.Shield = "";
_root.showShield = "";
}
if (_root.Down == _root.Pause) {
_root.Pause = "";
_root.showPause = "";
}
gotoAndStop (1);
};
Key.addListener(keyListener);
Symbol 773 MovieClip Frame 5
_root.setKeyText = "Jump";
var keyListener = new Object();
keyListener.onKeyDown = function () {
_root.Jump = Key.getCode();
if (_root.Jump == 37) {
_root.showJump = "Left Arrow";
} else if (_root.Jump == 39) {
_root.showJump = "Right Arrow";
} else if (_root.Jump == 38) {
_root.showJump = "Up Arrow";
} else if (_root.Jump == 40) {
_root.showJump = "Down Arrow";
} else if (_root.Jump == 36) {
_root.showJump = "Home";
} else if (_root.Jump == 35) {
_root.showJump = "End";
} else if (_root.Jump == 46) {
_root.showJump = "Delete";
} else if (_root.Jump == 33) {
_root.showJump = "Page Up";
} else if (_root.Jump == 34) {
_root.showJump = "Page Jump";
} else if (_root.Jump == 9) {
_root.showJump = "Tab";
} else if (_root.Jump == 20) {
_root.showJump = "Caps Lock";
} else if (_root.Jump == 16) {
_root.showJump = "Shift";
} else if (_root.Jump == 17) {
_root.showJump = "Control";
} else if (_root.Jump == 32) {
_root.showJump = "Space Bar";
} else if (_root.Jump == 192) {
_root.showJump = "Tilde";
} else if (_root.Jump == 13) {
_root.showJump = "Enter";
} else if (_root.Jump == 8) {
_root.showJump = "Backspace";
} else if (_root.Jump == 220) {
_root.showJump = "Backslash";
} else if (_root.Jump == 188) {
_root.showJump = "<";
} else if (_root.Jump == 190) {
_root.showJump = ">";
} else if (_root.Jump == 191) {
_root.showJump = "Forwardslash";
} else if (_root.Jump == 186) {
_root.showJump = ";";
} else if (_root.Jump == 222) {
_root.showJump = "'";
} else if (_root.Jump == 219) {
_root.showJump = "[";
} else if (_root.Jump == 221) {
_root.showJump = "]";
} else if (_root.Jump == 189) {
_root.showJump = "-";
} else if (_root.Jump == 187) {
_root.showJump = "+";
} else if (_root.Jump == 144) {
_root.showJump = "Num Lock";
} else if (_root.Jump == 111) {
_root.showJump = "/ (Numpad)";
} else if (_root.Jump == 106) {
_root.showJump = "* (Numpad)";
} else if (_root.Jump == 109) {
_root.showJump = "- (Numpad)";
} else if (_root.Jump == 107) {
_root.showJump = "+ (Numpad)";
} else if (_root.Jump == 110) {
_root.showJump = "Delete (Numpad)";
} else if (_root.Jump == 96) {
_root.showJump = "0 (Numpad)";
} else {
_root.tempCode = String.fromCharCode(_root.Jump);
_root.showJump = _root.tempCode;
}
Key.removeListener(keyListener);
if (_root.Jump == _root.Left) {
_root.Left = "";
_root.showLeft = "";
}
if (_root.Jump == _root.Right) {
_root.Right = "";
_root.showRight = "";
}
if (_root.Jump == _root.Down) {
_root.Down = "";
_root.showDown = "";
}
if (_root.Jump == _root.Attack) {
_root.Attack = "";
_root.showAttack = "";
}
if (_root.Jump == _root.Shield) {
_root.Shield = "";
_root.showShield = "";
}
if (_root.Jump == _root.Pause) {
_root.Pause = "";
_root.showPause = "";
}
gotoAndStop (1);
};
Key.addListener(keyListener);
Symbol 773 MovieClip Frame 6
_root.setKeyText = "Attack";
var keyListener = new Object();
keyListener.onKeyDown = function () {
_root.Attack = Key.getCode();
if (_root.Attack == 37) {
_root.showAttack = "Left Arrow";
} else if (_root.Attack == 39) {
_root.showAttack = "Right Arrow";
} else if (_root.Attack == 38) {
_root.showAttack = "Up Arrow";
} else if (_root.Attack == 40) {
_root.showAttack = "Down Arrow";
} else if (_root.Attack == 36) {
_root.showAttack = "Home";
} else if (_root.Attack == 35) {
_root.showAttack = "End";
} else if (_root.Attack == 46) {
_root.showAttack = "Delete";
} else if (_root.Attack == 33) {
_root.showAttack = "Page Up";
} else if (_root.Attack == 34) {
_root.showAttack = "Page Down";
} else if (_root.Attack == 9) {
_root.showAttack = "Tab";
} else if (_root.Attack == 20) {
_root.showAttack = "Caps Lock";
} else if (_root.Attack == 16) {
_root.showAttack = "Shift";
} else if (_root.Attack == 17) {
_root.showAttack = "Control";
} else if (_root.Attack == 32) {
_root.showAttack = "Space Bar";
} else if (_root.Attack == 192) {
_root.showAttack = "Tilde";
} else if (_root.Attack == 13) {
_root.showAttack = "Enter";
} else if (_root.Attack == 8) {
_root.showAttack = "Backspace";
} else if (_root.Attack == 220) {
_root.showAttack = "Backslash";
} else if (_root.Attack == 188) {
_root.showAttack = "<";
} else if (_root.Attack == 190) {
_root.showAttack = ">";
} else if (_root.Attack == 191) {
_root.showAttack = "Forwardslash";
} else if (_root.Attack == 186) {
_root.showAttack = ";";
} else if (_root.Attack == 222) {
_root.showAttack = "'";
} else if (_root.Attack == 219) {
_root.showAttack = "[";
} else if (_root.Attack == 221) {
_root.showAttack = "]";
} else if (_root.Attack == 189) {
_root.showAttack = "-";
} else if (_root.Attack == 187) {
_root.showAttack = "+";
} else if (_root.Attack == 144) {
_root.showAttack = "Num Lock";
} else if (_root.Attack == 111) {
_root.showAttack = "/ (Numpad)";
} else if (_root.Attack == 106) {
_root.showAttack = "* (Numpad)";
} else if (_root.Attack == 109) {
_root.showAttack = "- (Numpad)";
} else if (_root.Attack == 107) {
_root.showAttack = "+ (Numpad)";
} else if (_root.Attack == 110) {
_root.showAttack = "Delete (Numpad)";
} else if (_root.Attack == 96) {
_root.showAttack = "0 (Numpad)";
} else {
_root.tempCode = String.fromCharCode(_root.Attack);
_root.showAttack = _root.tempCode;
}
Key.removeListener(keyListener);
if (_root.Attack == _root.Left) {
_root.Left = "";
_root.showLeft = "";
}
if (_root.Attack == _root.Right) {
_root.Right = "";
_root.showRight = "";
}
if (_root.Attack == _root.Jump) {
_root.Jump = "";
_root.showJump = "";
}
if (_root.Attack == _root.Shield) {
_root.Shield = "";
_root.showShield = "";
}
if (_root.Attack == _root.Down) {
_root.Down = "";
_root.showDown = "";
}
if (_root.Attack == _root.Pause) {
_root.Pause = "";
_root.showPause = "";
}
gotoAndStop (1);
};
Key.addListener(keyListener);
Symbol 773 MovieClip Frame 7
_root.setKeyText = "Shield";
var keyListener = new Object();
keyListener.onKeyDown = function () {
_root.Shield = Key.getCode();
if (_root.Shield == 37) {
_root.showShield = "Left Arrow";
} else if (_root.Shield == 39) {
_root.showShield = "Right Arrow";
} else if (_root.Shield == 38) {
_root.showShield = "Up Arrow";
} else if (_root.Shield == 40) {
_root.showShield = "Down Arrow";
} else if (_root.Shield == 36) {
_root.showShield = "Home";
} else if (_root.Shield == 35) {
_root.showShield = "End";
} else if (_root.Shield == 46) {
_root.showShield = "Delete";
} else if (_root.Shield == 33) {
_root.showShield = "Page Up";
} else if (_root.Shield == 34) {
_root.showShield = "Page Down";
} else if (_root.Shield == 9) {
_root.showShield = "Tab";
} else if (_root.Shield == 20) {
_root.showShield = "Caps Lock";
} else if (_root.Shield == 16) {
_root.showShield = "Shift";
} else if (_root.Shield == 17) {
_root.showShield = "Control";
} else if (_root.Shield == 32) {
_root.showShield = "Space Bar";
} else if (_root.Shield == 192) {
_root.showShield = "Tilde";
} else if (_root.Shield == 13) {
_root.showShield = "Enter";
} else if (_root.Shield == 8) {
_root.showShield = "Backspace";
} else if (_root.Shield == 220) {
_root.showShield = "Backslash";
} else if (_root.Shield == 188) {
_root.showShield = "<";
} else if (_root.Shield == 190) {
_root.showShield = ">";
} else if (_root.Shield == 191) {
_root.showShield = "Forwardslash";
} else if (_root.Shield == 186) {
_root.showShield = ";";
} else if (_root.Shield == 222) {
_root.showShield = "'";
} else if (_root.Shield == 219) {
_root.showShield = "[";
} else if (_root.Shield == 221) {
_root.showShield = "]";
} else if (_root.Shield == 189) {
_root.showShield = "-";
} else if (_root.Shield == 187) {
_root.showShield = "+";
} else if (_root.Shield == 144) {
_root.showShield = "Num Lock";
} else if (_root.Shield == 111) {
_root.showShield = "/ (Numpad)";
} else if (_root.Shield == 106) {
_root.showShield = "* (Numpad)";
} else if (_root.Shield == 109) {
_root.showShield = "- (Numpad)";
} else if (_root.Shield == 107) {
_root.showShield = "+ (Numpad)";
} else if (_root.Shield == 46) {
_root.showShield = "Delete (Numpad)";
} else {
_root.tempCode = String.fromCharCode(_root.Shield);
_root.showShield = _root.tempCode;
}
Key.removeListener(keyListener);
if (_root.Shield == _root.Left) {
_root.Left = "";
_root.showLeft = "";
}
if (_root.Shield == _root.Right) {
_root.Right = "";
_root.showRight = "";
}
if (_root.Shield == _root.Jump) {
_root.Jump = "";
_root.showJump = "";
}
if (_root.Shield == _root.Attack) {
_root.Attack = "";
_root.showAttack = "";
}
if (_root.Shield == _root.Down) {
_root.Down = "";
_root.showDown = "";
}
if (_root.Shield == _root.Pause) {
_root.Pause = "";
_root.showPause = "";
}
gotoAndStop (1);
};
Key.addListener(keyListener);
Symbol 773 MovieClip Frame 8
_root.setKeyText = "Pause";
var keyListener = new Object();
keyListener.onKeyDown = function () {
_root.Pause = Key.getCode();
if (_root.Pause == 37) {
_root.showPause = "Left Arrow";
} else if (_root.Pause == 39) {
_root.showPause = "Right Arrow";
} else if (_root.Pause == 38) {
_root.showPause = "Up Arrow";
} else if (_root.Pause == 40) {
_root.showPause = "Down Arrow";
} else if (_root.Pause == 36) {
_root.showPause = "Home";
} else if (_root.Pause == 35) {
_root.showPause = "End";
} else if (_root.Pause == 46) {
_root.showPause = "Delete";
} else if (_root.Pause == 33) {
_root.showPause = "Page Up";
} else if (_root.Pause == 34) {
_root.showPause = "Page Down";
} else if (_root.Pause == 9) {
_root.showPause = "Tab";
} else if (_root.Pause == 20) {
_root.showPause = "Caps Lock";
} else if (_root.Pause == 16) {
_root.showPause = "Shift";
} else if (_root.Pause == 17) {
_root.showPause = "Control";
} else if (_root.Pause == 32) {
_root.showPause = "Space Bar";
} else if (_root.Pause == 192) {
_root.showPause = "Tilde";
} else if (_root.Pause == 13) {
_root.showPause = "Enter";
} else if (_root.Pause == 8) {
_root.showPause = "Backspace";
} else if (_root.Pause == 220) {
_root.showPause = "Backslash";
} else if (_root.Pause == 188) {
_root.showPause = "<";
} else if (_root.Pause == 190) {
_root.showPause = ">";
} else if (_root.Pause == 191) {
_root.showPause = "Forwardslash";
} else if (_root.Pause == 186) {
_root.showPause = ";";
} else if (_root.Pause == 222) {
_root.showPause = "'";
} else if (_root.Pause == 219) {
_root.showPause = "[";
} else if (_root.Pause == 221) {
_root.showPause = "]";
} else if (_root.Pause == 189) {
_root.showPause = "-";
} else if (_root.Pause == 187) {
_root.showPause = "+";
} else if (_root.Pause == 144) {
_root.showPause = "Num Lock";
} else if (_root.Pause == 111) {
_root.showPause = "/ (Numpad)";
} else if (_root.Pause == 106) {
_root.showPause = "* (Numpad)";
} else if (_root.Pause == 109) {
_root.showPause = "- (Numpad)";
} else if (_root.Pause == 107) {
_root.showPause = "+ (Numpad)";
} else if (_root.Pause == 46) {
_root.showPause = "Delete (Numpad)";
} else {
_root.tempCode = String.fromCharCode(_root.Pause);
_root.showPause = _root.tempCode;
}
Key.removeListener(keyListener);
if (_root.Pause == _root.Left) {
_root.Left = "";
_root.showLeft = "";
}
if (_root.Pause == _root.Right) {
_root.Right = "";
_root.showRight = "";
}
if (_root.Pause == _root.Jump) {
_root.Jump = "";
_root.showJump = "";
}
if (_root.Pause == _root.Attack) {
_root.Attack = "";
_root.showAttack = "";
}
if (_root.Pause == _root.Down) {
_root.Down = "";
_root.showDown = "";
}
if (_root.Pause == _root.Shield) {
_root.Shield = "";
_root.showShield = "";
}
gotoAndStop (1);
};
Key.addListener(keyListener);
Symbol 778 Button
on (release) {
gotoAndStop ("yes");
_root.showTut = true;
}
Symbol 779 Button
on (release) {
gotoAndStop ("no");
_root.showTut = false;
}
Symbol 781 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.showTut == true) {
gotoAndStop (1);
}
if (_root.showTut == false) {
gotoAndStop (2);
}
};
Symbol 789 Button
on (release) {
_root.soundBarMemory = 0;
_root.globalsound.setVolume(0);
}
Symbol 825 Button
on (release) {
gotoAndStop (1);
}
Symbol 829 Button
on (release) {
_root.lives = 3;
_root.levelNum = _root.levelNum - 1;
_root.levelChangeFadeVar = true;
_root.hud.removeMovieClip();
_root.igOptions.removeMovieClip();
_root.levelChangeFadeVar = true;
}
Symbol 831 Button
on (release) {
_root.cheatsHaveBeenActivated = false;
_root.levelSelectUsed = false;
_root.levelNum = -1;
_root.Reset = true;
_root.levelChangeFadeVar = true;
_root.hud.removeMovieClip();
_root.igOptions.removeMovieClip();
}
Symbol 833 Button
on (release) {
_root.Diff = "easy";
_root.igMenu = false;
_root.Paused = false;
_root.hero.stand.play();
_root.hero.walk.play();
_root.hero.parry.play();
_root.hero.jump.play();
_root.hero.drop.play();
_root.hero.slash.play();
_root.hero.stab.play();
_root.hero.shield.play();
_root.hero.shieldHit.play();
_root.hero.hurt.play();
_root.hero.die.play();
_root.hero.spawn.play();
_root.enemyUnpause = true;
_root.igOptions.removeMovieClip();
}
Symbol 835 Button
on (release) {
_root.Diff = "hard";
_root.igMenu = false;
_root.Paused = false;
_root.hero.stand.play();
_root.hero.walk.play();
_root.hero.parry.play();
_root.hero.jump.play();
_root.hero.drop.play();
_root.hero.slash.play();
_root.hero.stab.play();
_root.hero.shield.play();
_root.hero.shieldHit.play();
_root.hero.hurt.play();
_root.hero.die.play();
_root.hero.spawn.play();
_root.enemyUnpause = true;
_root.igOptions.removeMovieClip();
}
Symbol 838 MovieClip [igOptions] Frame 1
stop();
Instance of Symbol 714 MovieClip in Symbol 838 MovieClip [igOptions] Frame 1
onClipEvent (enterFrame) {
if (_root.enableCheats == true) {
this.gotoAndStop("active");
} else {
this.gotoAndStop("inactive");
}
}
Instance of Symbol 795 MovieClip [igSoundMC] "igSoundMC" in Symbol 838 MovieClip [igOptions] Frame 2
onClipEvent (enterFrame) {
this.bar._x = _root.soundBarMemory;
}
Instance of Symbol 803 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.infiniteHealth == true) {
this.gotoAndStop("true");
} else {
this.gotoAndStop("false");
}
}
on (release) {
if (_root.infiniteHealth == false) {
_root.cheatsHaveBeenActivated = true;
_root.infiniteHealth = true;
} else if (_root.infiniteHealth == true) {
_root.infiniteHealth = false;
}
}
Instance of Symbol 805 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.infiniteDefence == true) {
this.gotoAndStop("true");
} else {
this.gotoAndStop("false");
}
}
on (release) {
if (_root.infiniteDefence == false) {
_root.cheatsHaveBeenActivated = true;
_root.infiniteDefence = true;
} else if (_root.infiniteDefence == true) {
_root.infiniteDefence = false;
}
}
Instance of Symbol 807 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.infiniteAttack == true) {
this.gotoAndStop("true");
} else {
this.gotoAndStop("false");
}
}
on (release) {
if (_root.infiniteAttack == false) {
_root.cheatsHaveBeenActivated = true;
_root.infiniteAttack = true;
} else if (_root.infiniteAttack == true) {
_root.infiniteAttack = false;
}
}
Instance of Symbol 809 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.infiniteLives == true) {
this.gotoAndStop("true");
} else {
this.gotoAndStop("false");
}
}
on (release) {
if (_root.infiniteLives == false) {
_root.cheatsHaveBeenActivated = true;
_root.infiniteLives = true;
} else if (_root.infiniteLives == true) {
_root.infiniteLives = false;
}
}
Instance of Symbol 462 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
on (release) {
_root.cheatLevelSelected = 1;
}
Instance of Symbol 465 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
on (release) {
_root.cheatLevelSelected = 2;
}
Instance of Symbol 468 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
on (release) {
_root.cheatLevelSelected = 3;
}
Instance of Symbol 815 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
on (release) {
_root.cheatLevelSelected = 4;
}
Instance of Symbol 818 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
on (release) {
_root.firstEncounter = false;
_root.cheatLevelSelected = 5;
}
Instance of Symbol 821 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
on (release) {
_root.cheatLevelSelected = 0;
}
Instance of Symbol 449 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
on (press) {
gotoAndStop (1);
}
on (release) {
_root.cheatsHaveBeenActivated = true;
_root.levelSelectUsed = true;
_root.showTut = false;
_root.levelNum = _root.cheatLevelSelected;
_root.igMenu = false;
_root.Paused = false;
_root.hero.stand.play();
_root.hero.walk.play();
_root.hero.parry.play();
_root.hero.jump.play();
_root.hero.drop.play();
_root.hero.slash.play();
_root.hero.stab.play();
_root.hero.shield.play();
_root.hero.shieldHit.play();
_root.hero.hurt.play();
_root.hero.die.play();
_root.hero.spawn.play();
_root.enemyUnpause = true;
_root.levelChangeFadeVar = true;
_root.hud.removeMovieClip();
_root.igOptions.removeMovieClip();
gotoAndStop (2);
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (releaseOutside) {
gotoAndStop (1);
}
Instance of Symbol 822 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "1") {
this._visible = true;
}
if (_root.cheatLevelSelected != "1") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "2") {
this._visible = true;
}
if (_root.cheatLevelSelected != "2") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "3") {
this._visible = true;
}
if (_root.cheatLevelSelected != "3") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "4") {
this._visible = true;
}
if (_root.cheatLevelSelected != "4") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "5") {
this._visible = true;
}
if (_root.cheatLevelSelected != "5") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 838 MovieClip [igOptions] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "0") {
this._visible = true;
}
if (_root.cheatLevelSelected != "0") {
this._visible = false;
}
}
Instance of Symbol 876 MovieClip in Symbol 880 MovieClip [shieldTut] Frame 1
onClipEvent (enterFrame) {
this.parryMaceTutText.text = _root.parryMaceTutVar;
}
Instance of Symbol 876 MovieClip in Symbol 880 MovieClip [shieldTut] Frame 15
onClipEvent (enterFrame) {
this.parryMaceTutText.text = _root.parryMaceTutVar;
}
Instance of Symbol 876 MovieClip in Symbol 880 MovieClip [shieldTut] Frame 35
onClipEvent (enterFrame) {
this.parryMaceTutText.text = _root.parryMaceTutVar;
}
Instance of Symbol 876 MovieClip in Symbol 886 MovieClip [parryMaceTut] Frame 1
onClipEvent (enterFrame) {
this.parryMaceTutText.text = _root.parryMaceTutVar;
}
Instance of Symbol 876 MovieClip in Symbol 886 MovieClip [parryMaceTut] Frame 15
onClipEvent (enterFrame) {
this.parryMaceTutText.text = _root.parryMaceTutVar;
}
Instance of Symbol 876 MovieClip in Symbol 886 MovieClip [parryMaceTut] Frame 35
onClipEvent (enterFrame) {
this.parryMaceTutText.text = _root.parryMaceTutVar;
}
Instance of Symbol 891 MovieClip "showTerrenceTutMC" in Symbol 894 MovieClip [terrenceTut] Frame 1
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.terrenceTutVar;
}
Instance of Symbol 891 MovieClip "showTerrenceTutMC" in Symbol 894 MovieClip [terrenceTut] Frame 15
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.terrenceTutVar;
}
Instance of Symbol 891 MovieClip "showTerrenceTutMC" in Symbol 894 MovieClip [terrenceTut] Frame 35
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.terrenceTutVar;
}
Instance of Symbol 891 MovieClip in Symbol 900 MovieClip [bowTut] Frame 1
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.bowTutVar;
}
Instance of Symbol 891 MovieClip in Symbol 900 MovieClip [bowTut] Frame 15
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.bowTutVar;
}
Instance of Symbol 891 MovieClip in Symbol 900 MovieClip [bowTut] Frame 35
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.bowTutVar;
}
Instance of Symbol 891 MovieClip in Symbol 906 MovieClip [parryTut] Frame 1
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.parryVar;
}
Instance of Symbol 891 MovieClip in Symbol 906 MovieClip [parryTut] Frame 15
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.parryVar;
}
Instance of Symbol 891 MovieClip in Symbol 906 MovieClip [parryTut] Frame 35
onClipEvent (enterFrame) {
this.ParryTutText.text = _root.parryVar;
}
Symbol 979 Button
on (release) {
_root.levelNum = 0;
_root.initHordeModeVar = true;
}
Symbol 980 MovieClip [secret03] Frame 1
stop();
Symbol 983 Button
on (release) {
_root.hasBow = true;
if (_root.bowTut == false) {
_root.Paused = true;
bowTutMC = _root.attachMovie("bowTut", "bowTut", _root.overDepth++);
bowTutMC._x = _root.hero._x;
bowTutMC._y = _root.hero._y;
bowTutMC.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.stop();
if (Key.isDown(_root.Shield)) {
_root.Paused = false;
_root.hero.gotoAndStop("shield");
this.removeMovieClip();
}
}
};
_root.bowTut = true;
}
gotoAndStop ("bowGone");
}
Symbol 986 Button
on (release) {
_root.enemyUnpause = true;
_root.hasBow = false;
gotoAndStop (1);
}
Symbol 987 MovieClip [secret05] Frame 1
stop();
Symbol 990 Button
on (release) {
if (_root.terrenceTut == false) {
_root.Paused = true;
terrenceTutMC = _root.attachMovie("terrenceTut", "terrenceTut", _root.overDepth++);
terrenceTutMC._x = _root.hero._x;
terrenceTutMC._y = _root.hero._y;
terrenceTutMC.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.stop();
if (Key.isDown(_root.Shield)) {
_root.Paused = false;
_root.hero.gotoAndStop("throw");
this.removeMovieClip();
}
}
};
_root.terrenceTut = true;
}
_root.isNinja = true;
_root.selectedCharacter = "terrence";
_root.switchCharacters = true;
gotoAndStop ("bob");
}
Symbol 993 Button
on (release) {
_root.selectedCharacter = "hero";
_root.switchCharacters = true;
_root.isNinja = false;
gotoAndStop ("terrence");
}
Symbol 994 MovieClip Frame 1
stop();
Symbol 995 MovieClip Frame 1
stop();
Instance of Symbol 964 MovieClip [secret01] in Symbol 995 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.secret01 == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 967 MovieClip [secret02] in Symbol 995 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.secret02 == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 980 MovieClip [secret03] in Symbol 995 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.secret03 == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 987 MovieClip [secret05] "secret05" in Symbol 995 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.secret05 == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 994 MovieClip "secret05" in Symbol 995 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.secret04 == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 995 MovieClip in Symbol 1005 MovieClip [endCredits] Frame 1577
onClipEvent (enterFrame) {
if (_root.secretsFound == 0) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 1022 MovieClip "timePlusMC" in Symbol 1023 MovieClip Frame 1
onClipEvent (enterFrame) {
this.timePlusText.text = _root.timePlusAmount;
}
Symbol 1024 MovieClip Frame 1
stop();
onEnterFrame = function () {
if ((this._visible == true) && (this._currentframe == 1)) {
if (((((Math.abs(_root.hero._x - this._x) < 100) && (Math.abs(_root.hero._y - this._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "right")) && (this._x > _root.hero._x)) {
_root.plusTimeVar = true;
this.gotoAndStop("hit");
}
if (((((Math.abs(_root.hero._x - this._x) < 100) && (Math.abs(_root.hero._y - this._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (this._x < _root.hero._x)) {
_root.plusTimeVar = true;
this.gotoAndStop("hit");
}
if (((((Math.abs(_root.hero._x - this._x) < 100) && (Math.abs(_root.hero._y - this._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "right")) && (this._x > _root.hero._x)) {
_root.plusTimeVar = true;
this.gotoAndStop("hit");
}
if (((((Math.abs(_root.hero._x - this._x) < 100) && (Math.abs(_root.hero._y - this._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "left")) && (this._x < _root.hero._x)) {
_root.plusTimeVar = true;
this.gotoAndStop("hit");
}
}
};
Instance of Symbol 1023 MovieClip in Symbol 1024 MovieClip Frame 2
onClipEvent (enterFrame) {
if (this._currentframe == this._totalframes) {
trace("MAKE IT GO BACK");
_parent._visible = false;
_parent.gotoAndStop(1);
}
}
Symbol 1110 MovieClip [zombie] Frame 1
stop();
Instance of Symbol 1048 MovieClip "rise" in Symbol 1110 MovieClip [zombie] Frame 1
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (!_root.g.hitTest(_parent._x, _parent._y + 5, true)) {
this.stop();
} else {
play();
}
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop("stand");
}
}
}
Instance of Symbol 1032 MovieClip [zombieStand] "stand" in Symbol 1110 MovieClip [zombie] Frame 6
onClipEvent (load) {
rNum = random(10);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
if (_parent.aTimer > 0) {
_parent.aTimer = _parent.aTimer - 1;
}
if ((Math.abs(_root.hero._x - _parent._x) > 30) && (Math.abs(_root.hero._y - _parent._y) < 50)) {
_parent.gotoAndStop("walk");
}
if (((Math.abs(_root.hero._x - _parent._x) < 30) && (Math.abs(_root.hero._y - _parent._y) < 50)) && (_parent.aTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if (_parent.hitTest(_root.bg.hArrow._x, _root.bg.hArrow._y, true)) {
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 2) {
_parent.gotoAndStop("die");
}
if (rNum > 2) {
_parent.gotoAndStop("hurt");
}
}
if (_root.Diff == "hard") {
if (rNum <= 1) {
_parent.gotoAndStop("die");
}
if (rNum > 1) {
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 2) {
_parent.gotoAndStop("die");
}
if (rNum > 2) {
_parent.gotoAndStop("hurt");
}
}
if (_root.Diff == "hard") {
if (rNum <= 1) {
_parent.gotoAndStop("die");
}
if (rNum > 1) {
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 2) {
_parent.gotoAndStop("die");
}
if (rNum > 2) {
_parent.gotoAndStop("hurt");
}
}
if (_root.Diff == "hard") {
if (rNum <= 1) {
_parent.gotoAndStop("die");
}
if (rNum > 1) {
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 2) {
_parent.gotoAndStop("die");
}
if (rNum > 2) {
_parent.gotoAndStop("hurt");
}
}
if (_root.Diff == "hard") {
if (rNum <= 1) {
_parent.gotoAndStop("die");
}
if (rNum > 1) {
_parent.gotoAndStop("hurt");
}
}
}
}
}
Instance of Symbol 1053 MovieClip "walk" in Symbol 1110 MovieClip [zombie] Frame 12
onClipEvent (load) {
rNum = random(10);
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (_root.narrative == false) {
if (_parent.aTimer > 0) {
_parent.aTimer = _parent.aTimer - 1;
}
if (Math.abs(_root.hero._x - _parent._x) < 500) {
if (_root.hero._x > _parent._x) {
_parent.dir = "right";
_parent._xscale = 100;
_parent._x = _parent._x + _parent.Speed;
} else if (_root.hero._x < _parent._x) {
_parent.dir = "left";
_parent._xscale = -100;
_parent._x = _parent._x - _parent.Speed;
}
}
if (((Math.abs(_root.hero._x - _parent._x) < 80) && (Math.abs(_root.hero._y - _parent._y) < 80)) && (_parent.aTimer <= 0)) {
_parent.gotoAndStop("attack");
}
if (_parent.hitTest(_root.bg.hArrow._x, _root.bg.hArrow._y, true)) {
_root.bg.hArrow.removeMovieClip();
_parent.gotoAndStop("hurt");
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 2) {
_parent.gotoAndStop("die");
}
if (rNum > 2) {
_parent.gotoAndStop("hurt");
}
}
if (_root.Diff == "hard") {
if (rNum <= 1) {
_parent.gotoAndStop("die");
}
if (rNum > 1) {
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.heroStatus == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 2) {
_parent.gotoAndStop("die");
}
if (rNum > 2) {
_parent.gotoAndStop("hurt");
}
}
if (_root.Diff == "hard") {
if (rNum <= 1) {
_parent.gotoAndStop("die");
}
if (rNum > 1) {
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "right")) && (_parent._x > _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 2) {
_parent.gotoAndStop("die");
}
if (rNum > 2) {
_parent.gotoAndStop("hurt");
}
}
if (_root.Diff == "hard") {
if (rNum <= 1) {
_parent.gotoAndStop("die");
}
if (rNum > 1) {
_parent.gotoAndStop("hurt");
}
}
}
if (((((Math.abs(_root.hero._x - _parent._x) < 120) && (Math.abs(_root.hero._y - _parent._y) < 60)) && (_root.hero2Status == "parrying")) && (_root.dir == "left")) && (_parent._x < _root.hero._x)) {
if (_root.Diff == "easy") {
if (rNum <= 2) {
_parent.gotoAndStop("die");
}
if (rNum > 2) {
_parent.gotoAndStop("hurt");
}
}
if (_root.Diff == "hard") {
if (rNum <= 1) {
_parent.gotoAndStop("die");
}
if (rNum > 1) {
_parent.gotoAndStop("hurt");
}
}
}
}
}
Instance of Symbol 1030 MovieClip [zombieAttack] "attack" in Symbol 1110 MovieClip [zombie] Frame 17
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == this._totalframes) {
if (_parent.eLife == 1) {
if (_root.Diff == "hard") {
_parent.aTimer = 32;
}
} else {
_parent.aTimer = 37;
}
_parent.gotoAndStop("stand");
}
if (((((_root.godMode == false) && (this._currentframe <= 5)) && (Math.abs(_root.hero._x - _parent._x) < 90)) && (Math.abs(_root.hero._y - _parent._y) < 40)) && (_root.heroLife != 0)) {
_parent.aTimer = 27;
if (_root.Diff == "easy") {
_root.attackAmount = 5;
}
if (_root.Diff == "hard") {
_root.attackAmount = 10;
}
_root.hero.gotoAndStop("hurt");
}
}
}
Instance of Symbol 1066 MovieClip "hurt" in Symbol 1110 MovieClip [zombie] Frame 28
onClipEvent (load) {
_parent.eLife = _parent.eLife - 1;
}
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else if (this._currentframe == this._totalframes) {
if (_parent.eLife > 0) {
_parent.gotoAndStop("stand");
} else {
_parent.gotoAndStop("die");
}
}
}
Instance of Symbol 1109 MovieClip "die" in Symbol 1110 MovieClip [zombie] Frame 32
onClipEvent (enterFrame) {
if (_root.Paused == true) {
this.stop();
} else {
if (this._currentframe == 5) {
_root.ehCurrent = _root.ehCurrent - 1;
_root.ehTotal = _root.ehTotal + 1;
}
if (this._currentframe == this._totalframes) {
_parent.removeMovieClip();
}
}
}
Instance of Symbol 1127 MovieClip "nrTime" in Symbol 1128 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.nrTime == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 1127 MovieClip "nrKills" in Symbol 1128 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.nrKills == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 1127 MovieClip "nrTM" in Symbol 1128 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.nrTM == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 1127 MovieClip "nrEM" in Symbol 1128 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.nrEM == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 1127 MovieClip "nrPoints" in Symbol 1128 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.nrEM == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 1128 MovieClip Frame 2
stop();
Instance of Symbol 1127 MovieClip "nrTime" in Symbol 1128 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.nrTime == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 1127 MovieClip "nrKills" in Symbol 1128 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.nrKills == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 1127 MovieClip "nrTM" in Symbol 1128 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.nrTM == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 1127 MovieClip "nrEM" in Symbol 1128 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.nrEM == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 1127 MovieClip "nrPoints" in Symbol 1128 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_root.nrEM == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 1142 Button
on (release) {
_root.setBestScores = false;
_root.levelNum = 0;
_root.initHordeModeVar = true;
_root.nrTime = false;
_root.nrKills = false;
_root.nrPoints = false;
}
Symbol 1150 Button
on (release) {
_root.levelNum = 0;
_root.initHordeModeVar = true;
_root.nrTime = false;
_root.nrKills = false;
_root.nrPoints = false;
}
Symbol 1156 MovieClip [endHordeGame] Frame 1
stop();
onEnterFrame = function () {
if (this._currentframe == 1) {
_root.setBestScores = true;
}
if (_root.heroStatus == "dead") {
gotoAndStop (3);
}
if (_root.enableCheats == false) {
if (_root.levelNum == 1) {
if (_root.minuteTracker > _root.forestMostMinutes) {
if ((_root.minuteTimer < 10) && (_root.secondTracker < 10)) {
_root.forestMostMinutes = "0" + _root.minuteTracker;
_root.forestMostSeconds = "0" + _root.secondTracker;
}
if ((_root.minuteTracker >= 10) && (_root.secondTracker < 10)) {
_root.forestMostMinutes = _root.minuteTracker;
_root.forestMostSeconds = "0" + _root.secondTracker;
}
if ((_root.minuteTracker >= 10) && (_root.secondTracker >= 10)) {
_root.forestMostMinutes = _root.minuteTracker;
_root.forestMostSeconds = _root.secondTracker;
}
if ((_root.minuteTracker < 10) && (_root.secondTracker < 10)) {
_root.forestMostMinutes = "0" + _root.minuteTracker;
_root.forestMostSeconds = _root.secondTracker;
}
_root.nrTime = true;
}
if ((_root.minuteTracker == _root.forestMostMinutes) && (_root.secondTracker > _root.forestMostSeconds)) {
if (_root.secondTracker >= 10) {
_root.forestMostSeconds = _root.secondTracker;
}
if (_root.secondTracker < 10) {
_root.forestMostSeconds = "0" + _root.secondTracker;
}
_root.nrTime = true;
}
if (_root.forestMostKills < _root.ehTotal) {
_root.forestMostKills = _root.ehTotal;
_root.nrKills = true;
}
if (_root.forestMostPoints < _root.totalPoints) {
_root.forestMostPoints = _root.totalPoints;
_root.nrPoints = true;
}
} else if (_root.levelNum == 2) {
if (_root.minuteTracker > _root.courtYardMostMinutes) {
if ((_root.minuteTracker < 10) && (_root.secondTracker < 10)) {
_root.courtYardMostMinutes = "0" + _root.minuteTracker;
_root.courtYardMostSeconds = "0" + _root.secondTracker;
}
if ((_root.minuteTracker >= 10) && (_root.secondTracker < 10)) {
_root.courtYardMostMinutes = _root.minuteTracker;
_root.courtYardMostSeconds = "0" + _root.secondTracker;
}
if ((_root.minuteTracker >= 10) && (_root.secondTracker >= 10)) {
_root.courtYardMostMinutes = _root.minuteTracker;
_root.courtYardMostSeconds = _root.secondTracker;
}
if ((_root.minuteTracker < 10) && (_root.secondTracker < 10)) {
_root.courtYardMostMinutes = "0" + _root.minuteTracker;
_root.courtYardMostSeconds = _root.secondTracker;
}
_root.nrTime = true;
}
if ((_root.minuteTracker == _root.courtYardMostMinutes) && (_root.secondTracker > _root.courtYardMostSeconds)) {
if (_root.secondTracker >= 10) {
_root.courtYardMostSeconds = _root.secondTracker;
}
if (_root.secondTracker < 10) {
_root.courtYardMostSeconds = "0" + _root.secondTracker;
}
_root.nrTime = true;
}
if (_root.courtYardMostKills < _root.ehTotal) {
_root.courtYardMostKills = _root.ehTotal;
_root.nrKills = true;
}
if (_root.courtYardMostPoints < _root.totalPoints) {
_root.courtYardMostPoints = _root.totalPoints;
_root.nrPoints = true;
}
} else if (_root.levelNum == 3) {
if (_root.minuteTracker > _root.castleMostMinutes) {
if ((_root.minuteTracker < 10) && (_root.secondTracker < 10)) {
_root.castleMostMinutes = "0" + _root.minuteTracker;
_root.castleMostSeconds = "0" + _root.secondTracker;
}
if ((_root.minuteTracker >= 10) && (_root.secondTracker < 10)) {
_root.castleMostMinutes = _root.minuteTracker;
_root.castleMostSeconds = "0" + _root.secondTracker;
}
if ((_root.minuteTracker >= 10) && (_root.secondTracker >= 10)) {
_root.castleMostMinutes = _root.minuteTracker;
_root.castleMostSeconds = _root.secondTracker;
}
if ((_root.minuteTracker < 10) && (_root.secondTracker < 10)) {
_root.castleMostMinutes = "0" + _root.minuteTracker;
_root.castleMostSeconds = _root.secondTracker;
}
_root.nrTime = true;
}
if ((_root.minuteTracker == _root.castleMostMinutes) && (_root.secondTracker > _root.castleMostSeconds)) {
if (_root.secondTimer >= 10) {
_root.castleMostSeconds = _root.secondTimer;
}
if (_root.secondTimer < 10) {
_root.castleMostSeconds = "0" + _root.secondTimer;
}
_root.nrTime = true;
}
if (_root.castleMostKills < _root.ehTotal) {
_root.castleMostKills = _root.ehTotal;
_root.nrKills = true;
}
if (_root.castleMostPoints < _root.totalPoints) {
_root.castleMostPoints = _root.totalPoints;
_root.nrPoints = true;
}
}
}
};
Instance of Symbol 1123 MovieClip "stopNow" in Symbol 1156 MovieClip [endHordeGame] Frame 1
onClipEvent (enterFrame) {
if (this._currentframe == this._totalframes) {
_parent.gotoAndStop(2);
}
}
Symbol 1167 MovieClip [rainSoundMC] Frame 1
onEnterFrame = function () {
if (this._currentframe == 1094) {
this.gotoAndPlay(518);
}
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
Symbol 1174 Button
on (release) {
this._visible = false;
}
Symbol 1182 MovieClip [NewgroundsAPI_Connector] Frame 1
_visible = false;
var checkConnection = function (event) {
if (!event.success) {
_visible = true;
gotoAndStop (3);
}
};
if (com.Newgrounds.NewgroundsAPI.isNewgrounds() || (_root.API_Settings.debug_mode)) {
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, checkConnection);
if ((!com.Newgrounds.NewgroundsAPI.hasUserSession()) && (!_root.API_Settings.debug_mode)) {
_visible = true;
gotoAndStop (2);
}
}
com.Newgrounds.NewgroundsAPI.setMovieVersion(_root.API_Settings.movie_version);
com.Newgrounds.NewgroundsAPI.connectMovie(_root.API_Settings.movie_id, _root.API_Settings.enc_key, _root.API_Settings.debug_mode);
com.Newgrounds.NewgroundsAPI.loadMedals();
stop();
Symbol 1204 Button
on (release) {
startMovie();
}
Symbol 1206 MovieClip Frame 1
function timerHandler() {
if (!loadingComplete) {
var _local4 = _root.getBytesLoaded() / _root.getBytesTotal();
bar._xscale = 100 * _local4;
if (_local4 == 1) {
loadingComplete = true;
if (AUTO_PLAY) {
startMovie();
} else {
gotoAndStop ("loaded");
}
return(undefined);
}
}
dt = getTimer() - time;
time = time + dt;
frameAccum = frameAccum + dt;
var _local3 = 0;
while ((frameAccum >= FRAME_TIME) && (_local3 < MAX_FRAME_SKIP)) {
advanceFrame(tankLogo, true, true);
advanceFrame(loadingText, false, true);
advanceFrame(barGfx, false, true);
if (loadingComplete) {
advanceFrame(this, false, false);
}
(frameAccum = frameAccum - FRAME_TIME);
_local3++;
}
updateAfterEvent();
}
function advanceFrame(clip, recurse, loop) {
if (!clip) {
return(undefined);
}
clip.stop();
if (clip._currentframe == clip._totalframes) {
if (loop) {
clip.gotoAndStop(1);
}
} else {
clip.nextFrame();
}
if (recurse) {
for (childName in clip) {
if (typeof(clip[childName]) == "movieclip") {
advanceFrame(clip[childName], recurse, loop);
}
}
}
}
function startMovie() {
clearInterval(intervalId);
_root.nextFrame();
}
_root.stop();
stop();
var FRAME_TIME = 33.3333333333333;
var AUTO_PLAY = false;
var MAX_FRAME_SKIP = 5;
var loadingComplete;
var intervalId;
var time;
var frameAccum;
loadingComplete = false;
intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2);
frameAccum = 0;
time = getTimer();
timerHandler();
Symbol 1206 MovieClip Frame 2
stop();
Symbol 1239 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 1252 MovieClip Frame 1
com.Newgrounds.NewgroundsAPI.attachFlashAd(_parent[_name]);
var attachAd = function () {
com.Newgrounds.NewgroundsAPI.attachFlashAd(_parent[_name]);
};
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, attachAd);
background._visible = false;
Symbol 1391 MovieClip [__Packages.com.Newgrounds.BaseN] Frame 0
class com.Newgrounds.BaseN
{
var ceiling, hashIndex, bitSize, hashVal, i;
function BaseN (hash) {
ceiling = 100000000000000;
if (hash) {
hashIndex = hash;
} else {
hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
}
bitSize = hashIndex.length;
hashVal = new Object();
i = 0;
while (i < bitSize) {
hashVal[hashIndex.charAt(i)] = i;
i++;
}
}
function verify(s) {
if (hashVal[s] != undefined) {
return(true);
}
return(false);
}
function encode(n, minchars) {
debug.lastencode = "";
if (typeof(i) != "string") {
n = n.toString();
}
if (n.charAt(0) == "-") {
var _local3 = "-";
n = n.substring(1);
} else {
var _local3 = "";
}
if (String(n).indexOf(".") > -1) {
var _local4 = String(n).split(".", 2);
return(((_local3 + baseNEncoder(_local4[0], minchars)) + ".") + baseNEncoder(_local4[1]));
}
debug.lastencode = debug.lastencode + "\tNo decimal\r";
return(_local3 + baseNEncoder(n, minchars));
}
function decode(s) {
var _local4 = 1;
if (s.charAt(0) == "-") {
_local4 = -1;
s = s.substring(1, s.length);
}
var _local3 = s.indexOf(".");
if (_local3 > -1) {
var _local5 = Math.pow(10, baseNDecoder(s.substring(_local3 + 1, s.length)));
return((baseNDecoder(s.substring(0, _local3)) / _local5) * _local4);
}
return(baseNDecoder(s) * _local4);
}
function baseNEncoder(n, minchars) {
if (!minchars) {
minchars = 1;
}
var _local4 = "";
while (n != 0) {
n = Math.round(n);
var _local3 = n % bitSize;
if (Math.round(_local3) != _local3) {
trace((((((((("BaseN failed on " + n) + "%") + bitSize) + " = ") + _local3) + " ") + int(n)) + " ") + int(bitSize));
}
_local4 = hashIndex.charAt(_local3) + _local4;
debug.lastencode = debug.lastencode + (((((((("\t-> n:" + n) + " % bitSize:") + bitSize) + " = ") + _local3) + ", final char=") + _local4) + newline);
n = n - _local3;
n = n / bitSize;
}
if (minchars) {
while (_local4.length < minchars) {
_local4 = hashIndex.charAt(0) + _local4;
}
}
return(_local4);
}
function baseNDecoder(s) {
var _local2 = 0;
var _local6 = 0;
i = 0;
while (i < s.length) {
var _local3 = s.charAt((s.length - i) - 1);
if (_local3 == hashIndex.charAt(0)) {
var _local5 = 0;
} else {
var _local5 = hashVal[_local3] * Math.pow(bitSize, i);
}
_local2 = _local2 + _local5;
if (_local2 >= ceiling) {
_local6 = _local6 + ((_local2 - (_local2 % ceiling)) / ceiling);
_local2 = _local2 % ceiling;
}
i++;
}
if (_local6 > 0) {
_local2 = "" + _local2;
while (_local2.length < (ceiling.toString().length - 1)) {
_local2 = "0" + _local2;
}
_local2 = ("" + _local6) + _local2;
}
return(_local2);
}
var debug = new Object();
}
Symbol 1392 MovieClip [__Packages.com.Newgrounds.NewgroundsAPIError] Frame 0
class com.Newgrounds.NewgroundsAPIError
{
var message, name, alias;
function NewgroundsAPIError (error, msg) {
if (Number(error).toString() == String(error)) {
error = Number(error);
} else if (error_codes[String(error)]) {
error = error_codes[String(error)];
} else {
error = 0;
}
code = error;
message = msg;
name = error_names[error];
alias = aliases[error];
}
static function init_codes() {
var _local2 = new Object();
var _local1 = 0;
while (_local1 < aliases.length) {
_local2[aliases[_local1]] = _local1;
_local1++;
}
return(_local2);
}
static function init_names() {
var _local5 = new Array();
var _local3 = 0;
while (_local3 < aliases.length) {
var _local2 = aliases[_local3].toLowerCase().split("_");
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = _local2[_local1].substr(0, 1).toUpperCase() + _local2[_local1].substr(1, _local2[_local1].length);
for (var _local4 in always_caps) {
if (_local2[_local1].toUpperCase() == always_caps[_local4]) {
_local2[_local1] = _local2[_local1].toUpperCase();
}
}
_local1++;
}
_local5[_local3] = _local2.join(" ");
_local3++;
}
return(_local5);
}
function isError() {
return(true);
}
static var aliases = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_FOLDER", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "CONNECTION_FAILED");
static var always_caps = new Array("API", "URL", "ID");
static var error_codes = init_codes();
static var error_names = init_names();
var code = 0;
}
Symbol 1393 MovieClip [__Packages.com.Newgrounds.NewgroundsAPI] Frame 0
class com.Newgrounds.NewgroundsAPI
{
static var version, user_email, movie_id, debug, session_id, publisher_id, timeout, connected, tracker_id, encryption_key, user_id, user_name, host, error_format, normal_format, link_format, header_format, ad_url, ad_swf_url;
function NewgroundsAPI () {
}
static function setMovieVersion(v) {
if (v) {
version = String(v);
}
}
static function setUserEmail(e) {
user_email = e;
}
static function getOfficialVersionURL() {
var _local1 = (((((GATEWAY_URL + "?tracker_id=") + movie_id) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random();
if (debug) {
_local1 = _local1 + "&debug=1";
}
return(_local1);
}
static function hasUserSession() {
if (session_id && (publisher_id)) {
return(true);
}
if (_root.NewgroundsAPI_PublisherID && (_root.NewgroundsAPI_SessionID)) {
return(true);
}
return(false);
}
static function isNewgrounds() {
return(((publisher_id == 1) || (_root.NewgroundsAPI_PublisherID == 1)) || (getHost().toLowerCase().indexOf("ungrounded.net") > -1));
}
static function hasPublisher() {
return(publisher_id || (_root.NewgroundsAPI_PublisherID));
}
static function hasUserEmail() {
if (user_email) {
return(true);
}
return(false);
}
static function connectionTimeOut() {
clearInterval(timeout);
callListener(events.MOVIE_CONNECTED, false, new com.Newgrounds.NewgroundsAPIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out."));
}
static function connectMovie(m_id, encrypt_key, debug_mode) {
if (connected) {
return(undefined);
}
var _local2 = function () {
com.Newgrounds.NewgroundsAPI.connectionTimeOut();
};
timeout = setInterval(_local2, 8000, null);
if (!m_id) {
fatalError("NewgroundsAPI.connectMovie() - missing required movie_id parameter", "connectMovie");
}
movie_id = String(m_id);
tracker_id = Number(movie_id.substring(0, movie_id.indexOf(":")));
encryption_key = encrypt_key;
debug = debug_mode;
if (_root.NewgroundsAPI_PublisherID) {
publisher_id = _root.NewgroundsAPI_PublisherID;
if (_root.NewgroundsAPI_SessionID) {
session_id = _root.NewgroundsAPI_SessionID;
}
} else {
publisher_id = 1;
session_id = null;
user_id = 0;
user_name = "Guest";
}
if (_root.NewgroundsAPI_UserName) {
user_name = _root.NewgroundsAPI_UserName;
}
if (_root.NewgroundsAPI_UserID) {
user_id = _root.NewgroundsAPI_UserID;
}
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
static function getHost() {
if (!host) {
var _local1 = _url;
if ((_local1.indexOf("http://") > -1) or (_local1.indexOf("https://") > -1)) {
host = _local1.split("/")[2].toLowerCase();
} else {
host = "localhost";
}
}
return(host);
}
static function loadNewgrounds() {
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
static function loadMySite() {
sendCommand("loadMySite", {host:getHost()});
}
static function loadCustomLink(link) {
sendCommand("loadCustomLink", {host:getHost(), link:link}, true);
}
static function logCustomEvent(event) {
sendCommand("logCustomEvent", {host:getHost(), event:event});
}
static function postScore(score, value, get_best) {
if ((!score) or (value == undefined)) {
sendError({command_id:getCommandID("postScore")}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required parameter(s)"));
return(undefined);
}
sendSecureCommand("postScore", {score:score, value:value, get_best:get_best});
}
static function getTodaysScores(score, params) {
getScores(score, "t", params, "getTodaysScores");
}
static function getYesterdaysScores(score, params) {
getScores(score, "y", params, "getYesterdaysScores");
}
static function getThisWeeksScores(score, params) {
getScores(score, "w", params, "getThisWeeksScores");
}
static function getThisMonthsScores(score, params) {
getScores(score, "m", params, "getThisMonthsScores");
}
static function getThisYearsScores(score, params) {
getScores(score, "y", params, "getThisYearsScores");
}
static function getAlltimeScores(score, params) {
getScores(score, "a", params, "getAlltimeScores");
}
static function getScores(score, period, params, command_name) {
if (!score) {
sendError({command_id:getCommandID(command_name)}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required score name"));
return(undefined);
}
if (!params) {
params = new Object();
}
if (!hasUserSession()) {
callListener(events.SCORES_LOADED, false, new com.Newgrounds.NewgroundsAPIError("SITE_ID_REQUIRED", ("Host '" + getHost()) + "' does not have high scores enabled"));
return(undefined);
}
params.publisher_id = publisher_id;
params.period = period;
params.score = score;
if (params.user_id) {
var _local3 = period;
} else {
var _local3 = period + "-u";
}
if (score_page_counts[_local3] == undefined) {
params.request_page_count = true;
}
sendCommand("getScores", params);
}
static function unlockMedal(medal, get_score) {
if (!medal) {
sendError({command_id:getCommandID("unlockMedal")}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required medal name"));
return(undefined);
}
var _local1 = new Object();
_local1.medal = medal;
if (get_score) {
_local1.get_score = get_score;
}
sendSecureCommand("unlockMedal", _local1);
}
static function loadMedals() {
if (medals) {
callListener(events.MEDALS_LOADED, true, {medals:medals});
return(undefined);
}
var _local1 = new Object();
if (hasUserSession()) {
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
}
sendCommand("getMedals", _local1);
}
static function getMedals() {
return(medals);
}
static function saveFile(folder, filename, contents, thumbnail_source) {
if (!save_file) {
save_file = new com.Newgrounds.NewgroundsAPISaveFile(movie_id, folder, filename);
save_file.setContents(contents);
if (thumbnail_source) {
save_file.setThumbnail(thumbnail_source);
}
save_file.onError = function (msg) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("PERMISSION_DENIED", msg);
com.Newgrounds.NewgroundsAPI.sendError({command_id:com.Newgrounds.NewgroundsAPI.getCommandID("saveFile")}, _local1);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, _local1);
};
save_file.onCancel = function (msg) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("USER_CANCELLED", msg);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, _local1);
};
save_file.submit();
} else {
var _local1 = new com.Newgrounds.NewgroundsAPIError("UPLOAD_IN_PROGRESS", "Please wait for the previous file to finish uploading");
sendError({command_id:getCommandID("saveFile")}, _local1);
callListener(events.FILE_SAVED, false, _local1);
}
}
static function checkFilePrivs(folder, filename) {
if (user_id) {
var _local1 = user_id;
} else {
var _local1 = 0;
}
var _local2 = {folder:folder, filename:filename, user_id:_local1, publisher_id:publisher_id};
sendCommand("checkFilePrivs", _local2);
}
static function finishFileSave(folder, filename, description, share, file, thumbnail) {
var _local2;
_local2 = {folder:folder, filename:filename, description:description, share:share};
var _local1;
_local1 = {file:file, thumbnail:thumbnail};
sendSecureCommand("saveFile", _local2, null, _local1);
}
static function getFiles(folder, options) {
var _local7 = {name:1, date:2, score:3};
var _local2 = {user_only:false, sort_on:"date", page:1, results_per_page:20, sort_descending:true};
var _local6 = new Array();
for (var _local10 in _local7) {
_local6.push(("'" + _local10) + "'");
}
var _local4 = new Array();
for (var _local9 in _local2) {
_local4.push(("'" + _local9) + "'");
}
if (options.sort_descending && (!_local7[options.sort_descending])) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("'" + options.sort_descending) + "' is not a valid sort_on value. Valid values are: ") + _local6.join(", "));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options.sort_descending;
}
var _local8;
if (options) {
for (var _local10 in options) {
if (_local2[_local10] == undefined) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("'" + _local10) + "' is not a valid option. Valid options are: ") + _local4.join(", "));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options[_local10];
} else if (typeof(options[_local10]) != typeof(_local2[_local10])) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("option '" + _local10) + "' should be the following type: ") + typeof(_local2[_local10]));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options[_local10];
}
}
_local8 = options;
} else {
_local8 = new Object();
}
if (hasUserSession()) {
_local8.publisher_id = publisher_id;
_local8.user_id = user_id;
}
_local8.folder = folder;
sendCommand("getFiles", _local8);
}
static function getConfirmation(command_name, event, msg, target, confirm, cancel) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("CONFIRM_REQUEST", msg);
_local1.confirm = function () {
target[confirm]();
};
_local1.cancel = function () {
target[cancel]();
};
_local1.command = getCommandID(command_name);
callListener(event, false, _local1);
}
static function doBlockHost(event) {
_root.stop();
initTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + getHost()) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + event.data.movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = event.data.redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function onNewVersionAvailable(event) {
_root.stop();
initTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + event.data.movie_version) + " is now available at:") + newline;
var _local6 = _local3.length;
_local3 = _local3 + event.data.movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = event.data.redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local6, _local4, link_format);
}
static function initTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function doEvent(e) {
switch (getCommandName(e.command_id)) {
case "connectMovie" :
clearInterval(timeout);
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage(("Movie identified as \"" + e.movie_name) + "\"");
callListener(events.MOVIE_CONNECTED, e.success, {movie_name:e.movie_name});
var _local4 = false;
if (e.ad_status === -1) {
var _local6 = "This movie was not approved to run Flash Ads.";
sendWarning(_local6);
sendWarning(("visit " + AD_TERMS_URL) + " to view our approval guidelines");
if (!e.ad_url) {
callListener(events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", _local6));
} else {
_local4 = true;
}
} else if (e.ad_status === 0) {
var _local6 = "Flash Ads are currently awaiting approval.";
sendNotice(_local6);
if (!e.ad_url) {
callListener(events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", _local6));
} else {
_local4 = true;
}
}
if (e.ad_url) {
ad_url = unescape(e.ad_url);
if (!_local4) {
sendMessage("This movie has been approved to run Flash Ads!");
}
callListener(events.ADS_APPROVED, true);
}
if (e.deny_host) {
var _local6 = getHost() + " does not have permission to run this movie!";
sendWarning(_local6);
sendWarning("\tUpdate your API configuration to unblock " + getHost());
callListener(events.HOST_BLOCKED, true, {movie_url:unescape(e.movie_url), redirect_url:getOfficialVersionURL()});
}
if (e.movie_version) {
sendWarning("According to your API Configuration, this version is out of date.");
if (version) {
sendWarning("\tThe this movie is version " + version);
}
sendWarning("\tThe most current version is " + e.movie_version);
callListener(events.NEW_VERSION_AVAILABLE, true, {movie_version:e.movie_version, movie_url:unescape(e.movie_url), redirect_url:getOfficialVersionURL()});
}
if (e.request_portal_url) {
sendCommand("setPortalID", {portal_url:_url});
}
break;
case "logCustomEvent" :
if (e.success) {
sendMessage(("Event '" + e.event) + "' was logged.");
}
callListener(events.EVENT_LOGGED, e.success, {event:e.event});
break;
case "postScore" :
var _local7;
if (e.success) {
var _local3 = "User";
if (user_email) {
_local3 = user_email;
} else if (user_name) {
_local3 = user_name;
}
sendMessage(((((_local3 + " posted ") + e.value) + " to '") + e.score) + "'");
_local7 = {score:e.score, value:e.value, username:_local3};
}
callListener(events.SCORE_POSTED, e.success, _local7);
break;
case "getScores" :
_local7 = new Object();
if (e.user_id) {
var _local5 = e.period;
} else {
var _local5 = e.period + "-u";
}
if (e.total_pages) {
score_page_counts[_local5] = e.total_pages;
}
_local7.user_id = e.user_id;
_local7.current_page = e.current_page;
_local7.total_pages = score_page_counts[_local5];
_local7.scores = e.scores;
_local7.period = getPeriodName(e.period);
callListener(events.SCORES_LOADED, e.success, _local7);
break;
case "unlockMedal" :
if (medals) {
var _local2 = 0;
while (_local2 < medals.length) {
if (medals[_local2].medal_name === e.medal_name) {
medals[_local2].medal_unlocked = true;
break;
}
_local2++;
}
}
_local7 = {medal_name:e.medal_name, medal_value:e.medal_value, medal_difficulty:e.medal_difficulty};
callListener(events.MEDAL_UNLOCKED, e.success, _local7);
break;
case "getMedals" :
medals = e.medals;
_local7 = {medals:e.medals};
callListener(events.MEDALS_LOADED, e.success, _local7);
break;
case "getFiles" :
break;
case "getSystemFiles" :
break;
case "saveFile" :
save_file = null;
_local7 = {file_id:e.file_id, filename:e.filename, file_url:e.file_url, thumbnail:e.thumbnail, icon:e.icon};
callListener(events.FILE_SAVED, e.success, _local7);
break;
case "checkFilePrivs" :
if (save_file) {
save_file.checkPrivs(e);
} else {
_local7 = {filename:e.filename, folder:e.folder, can_read:e.can_read, can_write:e.can_write};
callListener(events.FILE_PRIVS_LOADED, e.success, _local7);
}
}
}
static function setDefaultListeners() {
var _local1 = new Array();
_local1[events.HOST_BLOCKED] = {listener:doBlockHost};
_local1[events.NEW_VERSION_AVAILABLE] = {listener:onNewVersionAvailable};
return(_local1);
}
static function addEventListener(event, listener, params) {
listeners[event] = {listener:listener, params:params};
}
static function removeEventListener(event) {
delete listeners[event];
}
static function getEventName(event) {
for (var _local2 in events) {
if (events[_local2] == event) {
return(_local2);
}
}
return(undefined);
}
static function callListener(event, success, data, target) {
echo("Fired Event: " + getEventName(event));
if (listeners[event]) {
if (data.isError()) {
listeners[event].listener({event:event, success:success, error:data, target:target}, listeners[event].params);
} else {
listeners[event].listener({event:event, success:success, data:data, target:target}, listeners[event].params);
}
}
}
static function getCommandName(id) {
return(id);
}
static function getCommandID(name) {
return(name);
}
static function getPeriodAliases() {
var _local1 = new Object();
for (var _local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
}
return(_local1);
}
static function getPeriodName(p) {
for (var _local2 in period_aliases) {
if (_local2 == p) {
return(period_aliases[_local2].name);
}
}
return(null);
}
static function getPeriodAlias(p) {
for (var _local2 in period_aliases) {
if (_local2 == p) {
return(period_aliases[_local2].alias);
}
}
return(null);
}
static function sendError(c, e) {
trace((((((("[NewgroundsAPI ERROR] :: " + getCommandName(c.command_id)) + "() - ") + e.name) + ":") + newline) + "\t\t\t\t") + e.message);
}
static function sendWarning(m, c) {
if (c) {
m = m + ((("\r[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
trace("[NewgroundsAPI WARNING] :: " + m);
}
static function sendNotice(m, c) {
if (c) {
m = m + ((("\r[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
trace("[NewgroundsAPI NOTICE] :: " + m);
}
static function fatalError(m, c) {
if (c) {
m = m + ((("\r\tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
throw (((("***ERROR*** frame=" + _root._currentframe) + ", class=NewgroundsAPI") + newline) + newline) + m;
}
static function sendSecureCommand(command, secure_params, unsecure_params, files) {
if (((!debug) && (!hasUserSession())) && (!hasUserEmail())) {
sendError({command_id:getCommandID(command)}, new com.Newgrounds.NewgroundsAPIError("IDENTIFICATION_REQUIRED", ("You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail(\"name@domain.com\"); ) to use " + command) + "()."));
return(undefined);
}
if (!command) {
fatalError("Missing command", "sendSecureCommand");
}
if (!secure_params) {
fatalError("Missing secure_params", "sendSecureCommand");
}
if (!unsecure_params) {
unsecure_params = new Object();
}
var _local4 = "";
var _local1 = 0;
while (_local1 < 16) {
_local4 = _local4 + compression_radix.charAt(Math.floor(Math.random() * compression_radix.length));
_local1++;
}
if (debug) {
secure_params.session_id = "";
} else {
secure_params.session_id = session_id;
}
secure_params.as_version = 2;
secure_params.user_email = user_email;
secure_params.publisher_id = publisher_id;
secure_params.seed = _local4;
secure_params.command_id = getCommandID(command);
var _local10 = com.Newgrounds.MD5.calculate(_local4);
var _local3 = _local10 + com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(secure_params), encryption_key);
var _local9 = _local3.length % 6;
var _local5 = "";
_local1 = 0;
while (_local1 < _local3.length) {
var _local2 = Number("0x" + _local3.substr(_local1, 6));
_local5 = _local5 + compressor.encode(_local2, 4);
_local1 = _local1 + 6;
}
unsecure_params.secure = _local9 + _local5;
sendCommand("securePacket", unsecure_params, false, files);
}
static function sendCommand(command, params, open_browser, files) {
if ((!connected) and (command != "connectMovie")) {
var _local11 = (("NewgroundsAPI." + command) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called") + newline;
fatalError(_local11, "connectMovie");
}
if (open_browser) {
var _local1 = new Object();
} else {
var _local1 = new LoadVars();
}
_local1.command_id = getCommandID(command);
_local1.tracker_id = movie_id;
if (debug) {
_local1.debug = debug;
}
if (params) {
for (var _local8 in params) {
_local1[_local8] = params[_local8];
}
}
if (files) {
for (var _local8 in files) {
_local1[_local8] = files[_local8];
}
}
echo(("OUTPUT: \r" + com.Newgrounds.JSON.encode(_local1)) + newline);
if (open_browser) {
var _local5 = (GATEWAY_URL + "?seed=") + Math.random();
for (var _local8 in _local1) {
_local5 = _local5 + ((("&" + escape(_local8)) + "=") + escape(_local1[_local8]));
}
getURL (_local5, "_blank");
_local1.removeMovieClip();
} else {
var _local9 = new LoadVars();
_local9.onData = function (data) {
com.Newgrounds.NewgroundsAPI.echo(("INPUT: \r" + data) + newline);
if (data) {
var _local1 = com.Newgrounds.JSON.decode(data);
} else {
var _local1 = {success:false};
}
if (!_local1.success) {
var _local3 = new com.Newgrounds.NewgroundsAPIError(_local1.error_code, _local1.error_msg);
com.Newgrounds.NewgroundsAPI.sendError(_local1, _local3);
} else {
com.Newgrounds.NewgroundsAPI.doEvent(_local1);
}
};
var _local4 = new Array();
for (var _local7 in _local1) {
_local4.push((_local7 + "=") + escape(_local1[_local7]));
}
echo((("POST " + GATEWAY_URL) + "?") + _local4.join("&"));
_local1.sendAndLoad((GATEWAY_URL + "?seed=") + Math.random(), _local9, "POST");
}
}
static function renderAd(target) {
if (ad_swf_url) {
target.background = target.createEmptyMovieClip("background", 100);
target.background.beginFill(0);
target.background.moveTo(0, 0);
target.background.lineTo(300, 0);
target.background.lineTo(300, 250);
target.background.lineTo(0, 250);
target.background.lineTo(0, 0);
target.background.endFill();
target.mask = target.createEmptyMovieClip("mask", 101);
target.mask.beginFill(0);
target.mask.moveTo(0, 0);
target.mask.lineTo(300, 0);
target.mask.lineTo(300, 250);
target.mask.lineTo(0, 250);
target.mask.lineTo(0, 0);
target.mask.endFill();
target.clip = target.createEmptyMovieClip("clip", 102);
target.clip.ad = target.clip.createEmptyMovieClip("ad", 100);
target.clip.setMask(target.mask);
loadMovie (ad_swf_url, target.clip.ad);
callListener(events.AD_ATTACHED, true, null, target);
} else {
callListener(events.AD_ATTACHED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad"));
}
}
static function attachFlashAd(target) {
System.security.allowDomain("http://server.cpmstar.com");
System.security.allowDomain("http://www.cpmstar.com");
System.security.allowDomain("https://server.cpmstar.com");
System.security.allowDomain("https://www.cpmstar.com");
System.security.allowInsecureDomain("http://server.cpmstar.com");
System.security.allowInsecureDomain("http://www.cpmstar.com");
System.security.allowInsecureDomain("https://server.cpmstar.com");
System.security.allowInsecureDomain("https://www.cpmstar.com");
sendMessage("You may get a security sandbox violation from this ad. This is nothing to worry about!");
if (resetAdTimer()) {
if (ad_url) {
var _local1 = new LoadVars();
_local1.onData = function (data) {
if (data) {
com.Newgrounds.NewgroundsAPI.ad_swf_url = data;
} else {
com.Newgrounds.NewgroundsAPI.ad_swf_url = null;
}
com.Newgrounds.NewgroundsAPI.renderAd(target);
};
if (ad_url.indexOf("?") > -1) {
_local1.load((ad_url + "&random=") + Math.random());
} else {
_local1.load((ad_url + "?random=") + Math.random());
}
}
} else {
renderAd(target);
}
}
static function resetAdTimer() {
if (!ad_url) {
return(false);
}
var _local1 = new Date();
if (_local1.getTime() >= ad_reset) {
ad_reset = _local1.getTime() + 300000;
return(true);
}
return(false);
}
static function sendMessage(m, r) {
var _local1 = "[NewgroundsAPI] :: " + m;
if (r) {
return(_local1);
}
trace(_local1);
}
static function echo(m) {
if (do_echo) {
trace(m);
}
}
static var do_echo = false;
static var GATEWAY_URL = "http://www.ngads.com/gateway_v2.php";
static var AD_TERMS_URL = "http://www.newgrounds.com/wiki/flashads/terms/";
static var COMMANDS_WIKI_URL = "http://www.newgrounds.com/wiki/flashapi/commands/";
static var ad_reset = 0;
static var save_file = null;
static var medals = null;
static var score_page_counts = new Object();
static var compression_radix = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
static var compressor = new com.Newgrounds.BaseN(compression_radix);
static var errors = com.Newgrounds.NewgroundsAPIError.init_codes();
static var events = {MOVIE_CONNECTED:1, ADS_APPROVED:2, AD_ATTACHED:3, HOST_BLOCKED:4, NEW_VERSION_AVAILABLE:5, EVENT_LOGGED:6, SCORE_POSTED:7, SCORES_LOADED:8, MEDAL_UNLOCKED:9, MEDALS_LOADED:10, FILE_PRIVS_LOADED:11, FILE_SAVED:12};
static var listeners = setDefaultListeners();
static var periods = getPeriodAliases();
static var period_aliases = {t:{name:"Today", alias:"TODAY"}, p:{name:"Yesterday", alias:"YESTERDAY"}, w:{name:"This Week", alias:"THIS_WEEK"}, m:{name:"This Month", alias:"THIS_MONTH"}, y:{name:"This Year", alias:"THIS_YEAR"}, a:{name:"All-Time", alias:"ALL_TIME"}};
}
Symbol 1394 MovieClip [__Packages.com.Newgrounds.NewgroundsAPISaveFile] Frame 0
class com.Newgrounds.NewgroundsAPISaveFile
{
var tracker_id, folder, filename, contents, thumbnail, icon_url, thumbnail_url, description, scan, scanner;
function NewgroundsAPISaveFile (tracker_id, folder, filename) {
this.tracker_id = tracker_id;
this.folder = folder;
this.filename = filename;
contents = null;
thumbnail = null;
icon_url = null;
thumbnail_url = null;
}
function setDescription(description) {
this.description = description;
}
function setShared(share) {
this.share = share;
}
function setContents(contents) {
this.contents = contents;
}
function setThumbnail(thumb) {
if (thumb) {
thumbnail = thumb;
} else {
thumbnail = null;
}
}
function onError(msg) {
trace("[NewgroundsAPISaveFile ERROR] :: " + msg);
}
function onCancel(msg) {
trace("[NewgroundsAPISaveFile] :: " + msg);
}
function submit() {
scan = null;
com.Newgrounds.NewgroundsAPI.checkFilePrivs(folder, filename);
}
function checkPrivs(p) {
if (p.success) {
if (p.can_write) {
can_write = p.can_write;
if (p.exists) {
com.Newgrounds.NewgroundsAPI.getConfirmation("saveFile", com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, ("File '" + filename) + "' exists, overwrite?", this, "startFile", "cancelFile");
} else {
startFile();
}
} else {
onError("This filename is owned by another user.");
}
} else {
onError("There was a problem looking up your file's details");
}
}
function cancelFile() {
onCancel("Overwrite was cancelled");
}
function startFile() {
if (can_write) {
if (thumbnail) {
scanner = new com.Newgrounds.ImageScanner(thumbnail);
scanner.setCallback(this, "writeFile");
scanner.startScan(100, 100, true);
} else {
writeFile();
}
} else {
onError(("You cannot write to filename \"" + filename) + "\"");
}
}
function writeFile(img) {
trace("FINISHED");
com.Newgrounds.NewgroundsAPI.finishFileSave(folder, filename, description, share, com.Newgrounds.JSON.encode(contents), img);
}
var can_write = false;
var share = true;
}
Symbol 1395 MovieClip [__Packages.com.Newgrounds.ImageScanner] Frame 0
class com.Newgrounds.ImageScanner
{
var image_source, source_width, source_height, sourceBitmap, callback_target, callback_function, hash, cube, basen, xpos, ypos, pixels, busy, canvas_width, canvas_height, resizedBitmap, copyBitmap, output, draw_interval, callback_interval;
function ImageScanner (the_source) {
if (the_source) {
image_source = the_source;
} else {
image_source = _root;
}
reset();
if (typeof(image_source) == "movieclip") {
if (image_source == _root) {
source_width = Stage.width;
source_height = Stage.height;
} else {
source_width = Math.floor(image_source._width);
source_height = Math.floor(image_source._height);
}
sourceBitmap = new flash.display.BitmapData(source_width, source_height, false, 4294967295);
sourceBitmap.draw(_root);
} else if (image_source.width) {
source_width = image_source.width;
source_height = image_source.height;
sourceBitmap = image_source;
} else {
error("You can only use BitMaptData and MovieClip objects to create images");
}
}
function setCallback(target, funct) {
if (target && (funct)) {
callback_target = target;
callback_function = funct;
}
}
function reset() {
callback_target = null;
callback_function = null;
debug.bad_pixels = 0;
hash = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&";
var _local3 = Math.pow(hash.length, 2);
trace("MAX COLORS: " + _local3);
var _local2 = Math.floor(Math.pow(_local3, 0.333333333333333)) - 1;
var _local4 = Math.pow(_local2, 3);
cube = _local2;
basen = new com.Newgrounds.BaseN(hash);
xpos = 0;
ypos = 0;
pixels = 0;
busy = false;
}
function startScan(w, h, s) {
if (w) {
image_width = w;
}
if (h) {
image_height = h;
}
if (s != undefined) {
crop = s;
}
var _local7 = _root.getNextHighestDepth();
var _local6 = _root.createEmptyMovieClip("API_image_container_" + _local7, _local7);
var _local5 = _local6.createEmptyMovieClip("canvas", 100);
_local5.attachBitmap(sourceBitmap, 100);
if (crop) {
if ((image_width / source_width) > (image_height / source_height)) {
canvas_width = image_width;
canvas_height = Math.ceil(source_height * (image_width / source_width));
} else {
canvas_height = image_height;
canvas_width = Math.ceil(source_width * (image_height / source_height));
}
} else {
canvas_width = image_width;
canvas_height = image_height;
}
_local5._x = Math.round((image_width - canvas_width) / 2);
_local5._width = canvas_width;
_local5._height = canvas_height;
resizedBitmap = new flash.display.BitmapData(image_width, image_height, false, 4294967295);
resizedBitmap.draw(_local6);
_local6.removeMovieClip();
copyBitmap = new flash.display.BitmapData(image_width, image_height, false, 4294967295);
var _local3 = "" + image_width;
while (_local3.length < 3) {
_local3 = "0" + _local3;
}
var _local4 = "" + image_height;
while (_local4.length < 3) {
_local4 = "0" + _local4;
}
output = _local3 + _local4;
draw_interval = setInterval(this, "drawChunk", 10);
busy = false;
return(resizedBitmap);
}
function getBitmapData() {
return(copyBitmap);
}
function getBytesTotal() {
return((image_width * image_height) * 2);
}
function getBytesScanned() {
return(pixels * 2);
}
function drawChunk() {
if (!busy) {
busy = true;
var _local2 = 0;
while (_local2 < 250) {
if (!nextPixel()) {
clearInterval(draw_interval);
callback_interval = setInterval(this, "doCallback", 25);
busy = true;
break;
}
_local2++;
}
busy = false;
}
}
function doCallback() {
busy = false;
clearInterval(callback_interval);
if (callback_target and callback_function) {
callback_target[callback_function](output);
} else {
onScanComplete(output);
}
}
function onScanComplete(packet) {
sendMessage(("packet size: " + output.length) + " bytes", "onScanComplete");
}
function nextPixel() {
var _local15 = xpos;
var _local14 = ypos;
var _local7 = resizedBitmap.getPixel(_local15, _local14);
var _local17 = (_local7 >> 16) & 255;
var _local20 = (_local7 >> 8) & 255;
var _local16 = (_local7 >> 0) & 255;
var _local11 = Math.round(((_local17 + 1) / 256) * cube);
var _local10 = Math.round(((_local20 + 1) / 256) * cube);
var _local13 = Math.round(((_local16 + 1) / 256) * cube);
var _local12 = (((_local11 * (cube + 1)) * (cube + 1)) + (_local10 * (cube + 1))) + _local13;
var _local6 = basen.encode(_local12, 2);
output = output + _local6;
if (_local6.length != 2) {
trace("bad pixel " + _local6);
}
var _local5 = basen.decode(_local6);
var _local18 = _local5;
var _local8 = _local5 % (cube + 1);
_local5 = (_local5 - _local8) / (cube + 1);
var _local9 = _local5 % (cube + 1);
var _local19 = (_local5 - _local9) / (cube + 1);
if (((_local13 != _local8) and (_local10 != _local9)) and (_local11 != _local10)) {
debug.bad_pixels++;
trace((((((("BAD PIXEL " + debug.bad_pixels) + ") ") + _local12) + " != ") + _local18) + " ") + _local6);
trace(basen.debug.lastencode);
}
var _local2 = Math.round((_local19 / cube) * 255).toString(16);
var _local4 = Math.round((_local9 / cube) * 255).toString(16);
var _local3 = Math.round((_local8 / cube) * 255).toString(16);
while (_local2.length < 2) {
_local2 = "0" + _local2;
}
while (_local4.length < 2) {
_local4 = "0" + _local4;
}
while (_local3.length < 2) {
_local3 = "0" + _local3;
}
copyBitmap.setPixel(_local15, _local14, Number((("0x" + _local2) + _local4) + _local3));
pixels++;
if (pixels >= (image_width * image_height)) {
return(false);
}
xpos++;
if (xpos >= image_width) {
xpos = 0;
ypos++;
}
return(true);
}
function error(e, f) {
sendMessage(e, f, "ERROR");
}
function sendMessage(msg, func, type) {
var _local1 = "ImageScanner";
if (func) {
_local1 = _local1 + (("." + func) + "()");
}
if (type) {
_local1 = (type + " in ") + _local1;
}
_local1 = _local1 + (" :: " + msg);
trace(_local1);
}
var image_width = 100;
var image_height = 100;
var crop = true;
var debug = new Object();
}
Symbol 1396 MovieClip [__Packages.com.Newgrounds.JSON] Frame 0
class com.Newgrounds.JSON
{
function JSON () {
}
static function encode(arg, noquotes) {
var _local3;
var _local2;
var _local6;
var _local1 = "";
var _local4;
if (arg.isSServerVar()) {
var _local8 = "sservervariable";
} else {
var _local8 = typeof(arg);
}
switch (_local8) {
case "sservervariable" :
return("?" + arg.getEncodedValue());
case "object" :
if (arg) {
if (arg instanceof Array) {
_local2 = 0;
while (_local2 < arg.length) {
_local4 = encode(arg[_local2]);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + _local4;
_local2++;
}
return(("[" + _local1) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local2 in arg) {
_local4 = arg[_local2];
if ((typeof(_local4) != "undefined") && (typeof(_local4) != "function")) {
_local4 = encode(_local4);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + ((encode(_local2) + ":") + _local4);
}
}
return(("{" + _local1) + "}");
}
}
return("null");
case "number" :
return((isFinite(arg) ? (String(arg)) : "null"));
case "string" :
_local6 = arg.length;
if (noquotes) {
var _local7 = "";
} else {
var _local7 = "\"";
}
_local1 = _local7;
_local2 = 0;
while (_local2 < _local6) {
_local3 = arg.charAt(_local2);
if (_local3 >= " ") {
if ((_local3 == "\\") || (_local3 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local3;
} else {
switch (_local3) {
case "\b" :
_local1 = _local1 + "\\b";
break;
case "\f" :
_local1 = _local1 + "\\f";
break;
case newline :
_local1 = _local1 + "\\n";
break;
case "\r" :
_local1 = _local1 + "\\r";
break;
case "\t" :
_local1 = _local1 + "\\t";
break;
default :
_local3 = _local3.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16));
}
}
_local2 = _local2 + 1;
}
return(_local1 + _local7);
case "boolean" :
return(String(arg));
}
return("null");
}
static function decode(text) {
var at = 0;
var ch = " ";
var _value;
var _error = function (m) {
throw {name:"JSONError", message:m, at:at - 1, text:text};
};
var _next = function () {
ch = text.charAt(at);
at = at + 1;
return(ch);
};
var _white = function () {
while (ch) {
if (ch <= " ") {
_next();
} else if (ch == "/") {
switch (_next()) {
case "/" :
while ((_next() && (ch != newline)) && (ch != "\r")) {
}
break;
case "*" :
_next();
for(;;){
if (ch) {
if (ch == "*") {
if (_next() == "/") {
_next();
// unexpected jump
}
} else {
_next();
}
} else {
_error("Unterminated comment");
}
};
break;
default :
_error("Syntax error");
}
} else {
return;
}
}
};
var _string = function () {
var _local4;
var _local1 = "";
var _local3;
var _local2;
var _local5 = false;
if (ch == "\"") {
while (_next()) {
if (ch == "\"") {
_next();
return(_local1);
}
if (ch == "\\") {
switch (_next()) {
case "b" :
_local1 = _local1 + "\b";
break;
case "f" :
_local1 = _local1 + "\f";
break;
case "n" :
_local1 = _local1 + newline;
break;
case "r" :
_local1 = _local1 + "\r";
break;
case "t" :
_local1 = _local1 + "\t";
break;
case "u" :
_local2 = 0;
_local4 = 0;
while (_local4 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)) {
_local5 = true;
break;
}
_local2 = (_local2 * 16) + _local3;
_local4 = _local4 + 1;
}
if (_local5) {
_local5 = false;
break;
}
_local1 = _local1 + String.fromCharCode(_local2);
break;
default :
_local1 = _local1 + ch;
}
} else {
_local1 = _local1 + ch;
}
}
}
_error("Bad string");
};
var _array = function () {
var _local1 = [];
if (ch == "[") {
_next();
_white();
if (ch == "]") {
_next();
return(_local1);
}
while (ch) {
_local1.push(_value());
_white();
if (ch == "]") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad array");
};
var _object = function () {
var _local2;
var _local1 = {};
if (ch == "{") {
_next();
_white();
if (ch == "}") {
_next();
return(_local1);
}
while (ch) {
_local2 = _string();
_white();
if (ch != ":") {
break;
}
_next();
_local1[_local2] = _value();
_white();
if (ch == "}") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad object");
};
var _number = function () {
var _local1 = "";
var _local2;
if (ch == "-") {
_local1 = "-";
_next();
}
while ((ch >= "0") && (ch <= "9")) {
_local1 = _local1 + ch;
_next();
}
if (ch == ".") {
_local1 = _local1 + ".";
while ((_next() && (ch >= "0")) && (ch <= "9")) {
_local1 = _local1 + ch;
}
}
_local2 = 1 * _local1;
if (!isFinite(_local2)) {
_error("Bad number");
} else {
return(_local2);
}
};
var _word = function () {
switch (ch) {
case "t" :
if (((_next() == "r") && (_next() == "u")) && (_next() == "e")) {
_next();
return(true);
}
break;
case "f" :
if ((((_next() == "a") && (_next() == "l")) && (_next() == "s")) && (_next() == "e")) {
_next();
return(false);
}
break;
case "n" :
if (!(((_next() == "u") && (_next() == "l")) && (_next() == "l"))) {
break;
}
_next();
return(null);
}
_error("Syntax error");
};
_value = function () {
_white();
switch (ch) {
case "{" :
return(_object());
case "[" :
return(_array());
case "\"" :
return(_string());
case "-" :
return(_number());
}
return((((ch >= "0") && (ch <= "9")) ? (_number()) : (_word())));
};
return(_value());
}
}
Symbol 1397 MovieClip [__Packages.com.Newgrounds.MD5] Frame 0
class com.Newgrounds.MD5
{
function MD5 () {
}
static function calculate(src) {
return(hex_md5(src));
}
static function hex_md5(src) {
return(binl2hex(core_md5(str2binl(src), src.length * 8)));
}
static function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(new Array(_local4, _local3, _local2, _local1));
}
static function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
static function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
static function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
static function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
static function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
static function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
static function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
static function str2binl(str) {
var _local3 = new Array();
var _local4 = 255;
var _local1 = 0;
while (_local1 < (str.length * 8)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32));
_local1 = _local1 + 8;
}
return(_local3);
}
static function binl2hex(binarray) {
var _local4 = new String("");
var _local3 = new String("0123456789abcdef");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
}
Symbol 1398 MovieClip [__Packages.com.Newgrounds.RC4] Frame 0
class com.Newgrounds.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToHex(_local2));
}
static function encryptbin(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(_local2);
}
static function decrypt(src, key) {
var _local3 = hexToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToStr(_local2));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
while (_local1 <= 255) {
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local7;
var _local5;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local5 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local5;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local7 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local7;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Instance of Symbol 964 MovieClip [secret01] in Symbol 1278 MovieClip [level1bg] Frame 1
onClipEvent (enterFrame) {
if (_root.secret01 == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 967 MovieClip [secret02] in Symbol 1278 MovieClip [level1bg] Frame 1
onClipEvent (enterFrame) {
if (_root.secret02 == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 980 MovieClip [secret03] in Symbol 1278 MovieClip [level1bg] Frame 1
onClipEvent (enterFrame) {
if (_root.secret03 == true) {
this._visible = true;
} else {
this._visible = false;
}
if (this._visible == true) {
if (Math.abs(_root.hero._x - (this._x - _root.bg._x)) > 30) {
this.gotoAndStop("blank");
}
if (Math.abs(_root.hero._x - (this._x - _root.bg._x)) < 30) {
this.gotoAndStop("play");
}
}
}
Instance of Symbol 987 MovieClip [secret05] "secret05" in Symbol 1278 MovieClip [level1bg] Frame 1
onClipEvent (enterFrame) {
if (_root.secret05 == true) {
this._visible = true;
} else {
this._visible = false;
}
if (this._visible == true) {
if ((Math.abs(_root.hero._x - (this._x - _root.bg._x)) < 30) && (_root.hasBow == true)) {
this.gotoAndStop("wantBowGone");
}
if ((Math.abs(_root.hero._x - (this._x - _root.bg._x)) > 30) && (_root.hasBow == true)) {
this.gotoAndStop("bowGone");
}
if ((Math.abs(_root.hero._x - (this._x - _root.bg._x)) < 30) && (_root.hasBow == false)) {
this.gotoAndStop("wantBow");
}
if ((Math.abs(_root.hero._x - (this._x - _root.bg._x)) > 30) && (_root.hasBow == false)) {
this.gotoAndStop("bow");
}
}
}
Instance of Symbol 994 MovieClip "secret05" in Symbol 1278 MovieClip [level1bg] Frame 1
onClipEvent (enterFrame) {
if (_root.secret04 == true) {
this._visible = true;
} else {
this._visible = false;
}
if (this._visible == true) {
if ((Math.abs(_root.hero._x - (this._x - _root.bg._x)) < 30) && (_root.isNinja == true)) {
this.gotoAndStop("playAsBob");
}
if ((Math.abs(_root.hero._x - (this._x - _root.bg._x)) > 30) && (_root.isNinja == true)) {
this.gotoAndStop("bob");
}
if ((Math.abs(_root.hero._x - (this._x - _root.bg._x)) < 30) && (_root.isNinja == false)) {
this.gotoAndStop("playAsTerrence");
}
if ((Math.abs(_root.hero._x - (this._x - _root.bg._x)) > 30) && (_root.isNinja == false)) {
this.gotoAndStop("terrence");
}
}
}
Symbol 1292 MovieClip Frame 1
stop();
Symbol 1305 Button
on (release) {
gotoAndStop ("chooseDif");
}
Symbol 1306 Button
on (release) {
gotoAndStop ("options");
}
Symbol 1308 Button
on (release) {
getURL ("http://www.armorgames.com", _blank);
}
Symbol 1311 Button
on (release) {
_root.checkForMedals = true;
gotoAndStop ("achievements");
}
Symbol 1313 Button
on (release) {
getURL ("http://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=brendan%2ej%2ebennett%40gmail%2ecom&lc=AU&item_name=Borderline¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted", _blank);
}
Symbol 1314 Button
on (release) {
if (_root.lcf == undefined) {
_root.cheatsHaveBeenActivated = false;
_root.levelChangeFadeVar = true;
_root.Diff = "easy";
}
}
Symbol 1315 Button
on (release) {
if (_root.lcf == undefined) {
_root.cheatsHaveBeenActivated = false;
_root.levelChangeFadeVar = true;
_root.Diff = "hard";
}
}
Symbol 1317 Button
on (release) {
gotoAndStop ("mMenu");
}
Symbol 1318 Button
on (release) {
gotoAndStop (1);
}
Symbol 1321 MovieClip [level0bg] Frame 1
stop();
_root.vCam.removeMovieClip();
_root.vCam = undefined;
_root.endCredits.removeMovieClip();
Instance of Symbol 714 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 2
onClipEvent (enterFrame) {
if (_root.enableCheats == true) {
this.gotoAndStop("active");
} else {
this.gotoAndStop("inactive");
}
}
Instance of Symbol 803 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.infiniteHealth == true) {
this.gotoAndStop("true");
} else {
this.gotoAndStop("false");
}
}
on (release) {
if (_root.infiniteHealth == false) {
_root.cheatsHaveBeenActivated = true;
_root.infiniteHealth = true;
} else if (_root.infiniteHealth == true) {
_root.infiniteHealth = false;
}
}
Instance of Symbol 805 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.infiniteDefence == true) {
this.gotoAndStop("true");
} else {
this.gotoAndStop("false");
}
}
on (release) {
if (_root.infiniteDefence == false) {
_root.cheatsHaveBeenActivated = true;
_root.infiniteDefence = true;
} else if (_root.infiniteDefence == true) {
_root.infiniteDefence = false;
}
}
Instance of Symbol 807 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.infiniteAttack == true) {
this.gotoAndStop("true");
} else {
this.gotoAndStop("false");
}
}
on (release) {
if (_root.infiniteAttack == false) {
_root.cheatsHaveBeenActivated = true;
_root.infiniteAttack = true;
} else if (_root.infiniteAttack == true) {
_root.infiniteAttack = false;
}
}
Instance of Symbol 809 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.infiniteLives == true) {
this.gotoAndStop("true");
} else {
this.gotoAndStop("false");
}
}
on (release) {
if (_root.infiniteLives == false) {
_root.cheatsHaveBeenActivated = true;
_root.infiniteLives = true;
} else if (_root.infiniteLives == true) {
_root.infiniteLives = false;
}
}
Instance of Symbol 462 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
on (release) {
_root.cheatLevelSelected = 1;
}
Instance of Symbol 465 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
on (release) {
_root.cheatLevelSelected = 2;
}
Instance of Symbol 468 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
on (release) {
_root.cheatLevelSelected = 3;
}
Instance of Symbol 815 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
on (release) {
_root.firstEncounter = true;
_root.cheatLevelSelected = 4;
}
Instance of Symbol 818 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
on (release) {
_root.firstEncounter = false;
_root.cheatLevelSelected = 5;
}
Instance of Symbol 821 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
on (release) {
_root.cheatLevelSelected = 0;
}
Instance of Symbol 449 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
on (press) {
gotoAndStop (1);
}
on (release) {
_root.levelSelectUsed = true;
_root.cheatsHaveBeenActivated = true;
_root.showTut = false;
_root.levelNum = _root.cheatLevelSelected;
_root.igMenu = false;
_root.Paused = false;
_root.hero.stand.play();
_root.hero.walk.play();
_root.hero.parry.play();
_root.hero.jump.play();
_root.hero.drop.play();
_root.hero.slash.play();
_root.hero.stab.play();
_root.hero.shield.play();
_root.hero.shieldHit.play();
_root.hero.hurt.play();
_root.hero.die.play();
_root.hero.spawn.play();
_root.enemyUnpause = true;
_root.levelChangeFadeVar = true;
_root.hud.removeMovieClip();
_root.igOptions.removeMovieClip();
gotoAndStop (2);
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (releaseOutside) {
gotoAndStop (1);
}
Instance of Symbol 822 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "1") {
this._visible = true;
}
if (_root.cheatLevelSelected != "1") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "2") {
this._visible = true;
}
if (_root.cheatLevelSelected != "2") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "3") {
this._visible = true;
}
if (_root.cheatLevelSelected != "3") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "4") {
this._visible = true;
}
if (_root.cheatLevelSelected != "4") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "5") {
this._visible = true;
}
if (_root.cheatLevelSelected != "5") {
this._visible = false;
}
}
Instance of Symbol 822 MovieClip in Symbol 1321 MovieClip [level0bg] Frame 3
onClipEvent (enterFrame) {
if (_root.cheatLevelSelected == "0") {
this._visible = true;
}
if (_root.cheatLevelSelected != "0") {
this._visible = false;
}
}
Instance of Symbol 795 MovieClip [igSoundMC] "igSoundMC" in Symbol 1321 MovieClip [level0bg] Frame 4
onClipEvent (enterFrame) {
this.bar._x = _root.soundBarMemory;
}
Symbol 1345 MovieClip Frame 1
stop();
Symbol 1345 MovieClip Frame 7
stop();
Symbol 1345 MovieClip Frame 141
_root.cameraShake = true;
Symbol 1345 MovieClip Frame 190
stop();
Symbol 1356 MovieClip Frame 1
stop();
Symbol 1375 MovieClip Frame 1
stop();
Symbol 1390 MovieClip Frame 1
stop();