Frame 1
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
copyrightNotice.separatorBefore = true;
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
mochi.as2.MochiServices.connect("ecbb1af13af0c40e");
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
_root.loadBar._width = getPercent * 100;
_root.loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(4);
}
Frame 2
gotoAndPlay (1);
Frame 4
_root.attachMovie("sound_contr", "sound_contr", 3, {_x:510, _y:460});
logo.onRelease = function () {
getURL ("http://xdgames.co.uk/", "_blank");
};
Frame 5
stop();
enemiesdead = 0;
score = 0;
smacked_sound = new Sound();
smacked_sound.attachSound("smack");
playButton.onRelease = function () {
smacked_sound.start();
gotoAndStop ("ints");
};
hsButton.onRelease = function () {
smacked_sound.start();
var _local2 = {n:[8, 5, 14, 5, 11, 8, 7, 14, 2, 5, 8, 14, 14, 7, 8, 1], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var _local3 = _local2.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:_local3});
};
xd.onRelease = function () {
getURL ("http://xdgames.co.uk/", "_blank");
};
Frame 6
stop();
gotoAndStop ("title");
Frame 7
stop();
fadeout.removeMovieClip();
stopAllSounds();
score = 0;
sam.removeMovieClip();
if (level == 1) {
if (addbossonce == 1) {
enemiesdead = 51;
} else {
enemiesdead = 0;
}
gotoAndStop ("blu");
}
if (level == 2) {
enemiesdead = 0;
gotoAndStop ("stage2");
}
if (level == 3) {
gotoAndStop ("atboss");
}
Frame 8
stop();
smacked_sound = new Sound();
smacked_sound.attachSound("smack");
conts.onRelease = function () {
smacked_sound.start();
gotoAndStop ("blee");
};
Frame 9
stop();
smacked_sound = new Sound();
smacked_sound.attachSound("smack");
bloc._alpha = 0;
spd.onRelease = function () {
smacked_sound.start();
play();
};
ade.onRelease = function () {
smacked_sound.start();
getURL ("http://xdgames.co.uk/", "_blank");
};
bloc.onEnterFrame = function () {
if (bloc._alpha > 15) {
bloc._alpha = 15;
}
if (bloc._alpha < 0) {
bloc._alpha = 0;
}
if (bloc.hitTest(_xmouse, _ymouse, true)) {
bloc._alpha = bloc._alpha + 3;
} else {
bloc._alpha = bloc._alpha - 3;
}
};
Frame 10
function removeHealthPickUp() {
i = healthPickUp.length - 1;
while (i >= 0) {
healthPickUp[i].removeMovieClip();
healthPickUp.splice(i, 1);
i--;
}
}
function removeBlocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeBack_ground() {
i = back_ground.length - 1;
while (i >= 0) {
back_ground[i].removeMovieClip();
back_ground.splice(i, 1);
i--;
}
}
function removeShot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function addfakeness() {
if (addbossonce == 0) {
if ((fakeness + 50000) < getTimer()) {
fakeness = getTimer();
_root.attachMovie("gogo", "gogo", _root.getNextHighestDepth(), {_y:0, _x:0});
}
}
}
function pickUpActions() {
if (sam._x > 480) {
hbg._x = hbg._x - foreGroundSpeed;
}
if ((releaseHealth + 30000) < getTimer()) {
releaseHealth = getTimer();
randomnumber++;
hp = _root.attachMovie("hpp", "hpp" + randomnumber, _root.getNextHighestDepth(), {_x:800, _y:450});
healthPickUp.push(hp);
}
i = healthPickUp.length - 1;
while (i >= 0) {
if (sam._x > 480) {
healthPickUp[i]._x = healthPickUp[i]._x - foreGroundSpeed;
}
if (healthPickUp[i].hitTest(sam)) {
chanceOfNasty = Math.round(Math.random() * 3) + 0;
if (chanceOfNasty == 0) {
addNasty = true;
if (nastyTimer == 0) {
randomnumber++;
hbg = _root.attachMovie("gh", "gh" + randomnumber, _root.getNextHighestDepth(), {_x:healthPickUp[i]._x, _y:healthPickUp[i]._y});
healthPickUp[i].removeMovieClip();
healthPickUp.splice(i, 1);
}
} else {
playerHealth = playerHealth + 15;
randomnumber++;
puff_ = _root.attachMovie("puff", "puff" + randomnumber, _root.getNextHighestDepth(), {_x:healthPickUp[i]._x, _y:healthPickUp[i]._y});
healthPickUp[i].removeMovieClip();
healthPickUp.splice(i, 1);
}
}
i--;
}
}
function cantplaychess() {
if (addNasty) {
nastyTimer++;
if (nastyTimer == 24) {
randomnumber++;
enemy_enemy2 = _root.attachMovie("enemy2", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:hbg._y, _x:hbg._x});
enemy.push(enemy_enemy2);
enemyHealth.push(10);
type.push(1);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
hbg.removeMovieClip();
addNasty = false;
nastyTimer = 0;
}
}
}
function addEnemies() {
if (startGame) {
if (enemiesdead > 49) {
if (addbossonce == 0) {
boss = _root.attachMovie("boss_mc", "boss_mc", _root.getNextHighestDepth(), {_y:415, _x:700});
enemy.push(boss);
enemyHealth.push(1750);
type.push(4);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
addbossonce = 1;
}
}
if (numberOfpeeps < 4) {
if (enemiesdead < 50) {
if ((releaseenemy + releaseEnemyGap) < getTimer()) {
releaseenemy = getTimer();
superChoice = Math.round(Math.random() * 3) + 0;
numberOfpeeps++;
randomnumber++;
if (superChoice == 0) {
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
enemy_enemy1 = _root.attachMovie("enemy", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:415, _x:700});
} else {
enemy_enemy1 = _root.attachMovie("enemy", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:415, _x:-100});
}
enemy.push(enemy_enemy1);
enemyHealth.push(20);
type.push(0);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
}
if (superChoice == 1) {
randomnumber++;
choice2 = Math.round(Math.random() * 1) + 0;
if (choice2 == 0) {
enemy_enemy2 = _root.attachMovie("enemy2", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:260, _x:700});
} else {
enemy_enemy2 = _root.attachMovie("enemy2", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:260, _x:-100});
}
enemy.push(enemy_enemy2);
enemyHealth.push(10);
type.push(1);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
}
if (superChoice == 2) {
randomnumber++;
choice3 = Math.round(Math.random() * 1) + 0;
if (choice3 == 0) {
enemy_enemy3 = _root.attachMovie("enemy3", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:430, _x:700});
} else {
enemy_enemy3 = _root.attachMovie("enemy3", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:430, _x:-100});
}
enemy.push(enemy_enemy3);
enemyHealth.push(30);
type.push(2);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
}
if (superChoice == 3) {
randomnumber++;
choice4 = Math.round(Math.random() * 1) + 0;
if (choice4 == 0) {
enemy_enemy4 = _root.attachMovie("enemy4", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:110, _x:700});
} else {
enemy_enemy4 = _root.attachMovie("enemy4", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:110, _x:-100});
}
enemy.push(enemy_enemy4);
enemyHealth.push(10);
type.push(3);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
}
}
}
}
}
}
function enemyDamaged() {
if (sliding) {
playerPower = 3;
} else {
playerPower = 2;
}
if (smackYou == 1) {
smackTimer++;
if (smackTimer == 20) {
smackYou = 0;
smackTimer = 0;
}
}
i = enemy.length - 1;
while (i >= 0) {
if (enemy[i].hitTest(sam)) {
if (attacking or sliding) {
if (sliding) {
if (Key.isDown(32)) {
enemyHealth[i] = enemyHealth[i] - (playerPower + 25);
if (smack == 0) {
randomnumber++;
boom_sound.start();
lolsemma = _root.attachMovie("bigger", "bigger" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
lolsemma._xscale = sam._xscale;
smack = 1;
}
}
}
enemyHealth[i] = enemyHealth[i] - playerPower;
hit[i] = 1;
if (smackYou == 0) {
smacked_sound.start();
smackYou = 1;
}
if (smack == 0) {
randomnumber++;
_root.attachMovie("hitSpark", "hitSpark" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
smack = 1;
}
}
}
i--;
}
}
function hideec() {
if (removeec) {
removeect--;
if (removeect == 0) {
showenemykills._x = -3000;
removeec = false;
}
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
score = score + 100;
showenemykills._x = 0;
removeect = 45;
removeec = true;
enemiesdead++;
randomnumber++;
numberOfpeeps--;
if (type[i] == 0) {
death_mc = _root.attachMovie("dead1", "dead1" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
if (type[i] == 1) {
death_mc = _root.attachMovie("dead2", "dead2" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
if (type[i] == 2) {
death_mc = _root.attachMovie("dead3", "dead3" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
if (type[i] == 3) {
death_mc = _root.attachMovie("dead4", "dead4" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
if (type[i] == 4) {
bossdead = true;
score = score + 1400;
death_mc = _root.attachMovie("bossdead_mc", "bossdead_mc" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
enemy[i].removeMovieClip();
enemy.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
}
i--;
}
}
function enemyAnimations() {
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == 4) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
if (type[i] == 0) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
if (type[i] == 1) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
if (type[i] == 2) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("idle");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
i--;
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (sam._x > 480) {
shot[i]._x = shot[i]._x - foreGroundSpeed;
}
if (shot[i].hitTest(sam)) {
playerHealth = playerHealth - 5;
hitPlayer = 1;
randomnumber++;
explo = _root.attachMovie("exp", "exp" + randomnumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._x < 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._x > 640) {
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._y > 450) {
randomnumber++;
explo = _root.attachMovie("exp", "exp" + randomnumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
shot[i].removeMovieClip();
shot.splice(i, 1);
}
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function enemyAttackState() {
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == 4) {
if (hit[i] == 0) {
if (enemy[i].hitTest(sam)) {
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 0.3;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] > 20) {
if (onfloor) {
playerHealth = playerHealth - 0.2;
hitPlayer = 1;
}
if (enemyAttackingTimer[i] == 20) {
shake++;
}
if (enemyAttackingTimer[i] == 25) {
shake++;
}
if (enemyAttackingTimer[i] == 32) {
shake++;
}
if (enemyAttackingTimer[i] == 38) {
shake++;
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
}
}
}
if (type[i] == 3) {
enemyAttackingTimer[i]++;
if (enemyAttackingTimer[i] == 31) {
enemyAttackingTimer[i] = 0;
randomnumber++;
bomb = _root.attachMovie("bomb_mc", "bomb_mc" + randomnumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
shot.push(bomb);
bomb.onEnterFrame = function () {
this._y = this._y + 8;
};
}
}
if (type[i] == 0) {
if (hit[i] == 0) {
if (enemy[i].hitTest(sam)) {
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 0.3;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] > 9) {
if (enemyAttackingTimer[i] == 31) {
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
}
}
}
if (type[i] == 1) {
if (hit[i] == 0) {
if (enemy[i].hitTest(sam)) {
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 0.3;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] > 9) {
if (enemyAttackingTimer[i] == 39) {
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
}
}
}
if (type[i] == 2) {
if (hit[i] == 0) {
if (enemy[i].hitTest(sam)) {
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 0.2;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] > 9) {
if (enemyAttackingTimer[i] == 19) {
randomnumber++;
fabians = _root.attachMovie("delph", "delph" + randomnumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
shot.push(fabians);
fabians.onEnterFrame = function () {
i = enemy.length - 1;
while (i >= 0) {
if (enemy[i]._xscale == 100) {
this._x = this._x - 8;
} else {
this._x = this._x + 8;
}
i--;
}
};
}
if (enemyAttackingTimer[i] == 33) {
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
}
}
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (hit[i] == 0) {
var _local2 = enemy[i].transform.colorTransform;
enemy[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hit[i] == 1) {
var _local2 = enemy[i].transform.colorTransform;
_local2.rgb = 4294967295;
enemy[i].transform.colorTransform = _local2;
damagedTimer[i]++;
if (damagedTimer[i] == 1) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (type[i] == 4) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 3);
}
if (type[i] == 3) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 5);
}
if (type[i] == 2) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + ((endX - enemy[i]._x) / enemySpeed);
}
if (type[i] == 1) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 2);
}
if (type[i] == 0) {
if (enemyAttacking[i] == 0) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 4);
}
}
i--;
}
}
function backgroundMovement() {
i = back_ground.length - 1;
while (i >= 0) {
if (back_ground[i]._x == -640) {
back_ground[i]._x = 640;
}
if (sam._x > 480) {
if (back_ground_position[i] == 0) {
back_ground[i]._x = back_ground[i]._x - backDropSpeed;
}
if (back_ground_position[i] == 1) {
back_ground[i]._x = back_ground[i]._x - foreGroundSpeed;
}
}
i--;
}
}
function pushEnemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (sam._x > 480) {
enemy[i]._x = enemy[i]._x - foreGroundSpeed;
}
i--;
}
}
function blockActions() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i]._alpha = 0;
if ((!sam.hitTest(blocks[i])) && ((!sam._y) == 450)) {
onfloor = false;
}
if (sam._x > 480) {
blocks[i]._x = blocks[i]._x - (foreGroundSpeed / 2);
}
if (blocks[i]._x < -640) {
blocks[i]._x = 640;
}
if (sam.hitTest(blocks[i])) {
if (sam._y > blocks[i]._y) {
if (!dropping) {
sam._y = blocks[i]._y;
yspeed = 0;
jump = false;
onfloor = true;
}
}
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
j--;
}
i--;
}
}
function noOverLap2() {
i = healthPickUp.length - 1;
while (i >= 0) {
j = healthPickUp.length - 1;
while (j >= 0) {
if (!(healthPickUp[i] === healthPickUp[j])) {
if (healthPickUp[i].hitTest(healthPickUp[j])) {
endX = _root.healthPickUp[j]._x;
healthPickUp[i]._x = healthPickUp[i]._x - (endX - healthPickUp[i]._x);
}
}
j--;
}
i--;
}
}
stop();
level = 1;
boom_sound = new Sound();
boom_sound.attachSound("boom");
huh_sound = new Sound();
huh_sound.attachSound("huh");
smacked_sound = new Sound();
smacked_sound.attachSound("smack");
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:5, _y:30});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:3, _y:30});
_root.attachMovie("showenemykills", "showenemykills", _root.getNextHighestDepth(), {_x:-3000, _y:0});
_root.attachMovie("score_mc", "score_mc", _root.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("sam", "sam", _root.getNextHighestDepth(), {_x:250, _y:0});
_root.attachMovie("fight", "fight", _root.getNextHighestDepth(), {_x:0, _y:0});
sam._xscale = -100;
shake = 0;
backDropSpeed = 5;
foreGroundSpeed = 10;
smack = 0;
sliding = false;
slidingTimer = 0;
samSpeed = 15;
enemySpeed = 25;
samLeft = false;
slidingRight = false;
slidingLeft = false;
attacking = false;
attackingTimer = 8;
onfloor = true;
hit2 = false;
hit3 = false;
startTimer = 100;
startGame = false;
randomnumber = 0;
releaseenemy = 0;
releaseHealth = 0;
fakeness = 0;
releaseEnemyGap = 1000;
yspeed = 0;
removeec = false;
removeect = 45;
jumpamount = 20;
playerHealth = 100;
gravity = 2;
hitPlayer = false;
hitTimer = 0;
jump = false;
smackTimer = 0;
choice = 0;
choice2 = 0;
choice3 = 0;
choice4 = 0;
gameOverTimer = 0;
sperChoice = 0;
chanceOfNasty = 0;
nastyTimer = 0;
addbossonce = 0;
addNasty = false;
smackYou = 0;
dropping = false;
droppingTimer = 0;
playerPower = 0.5;
numberOfpeeps = 0;
bossdead = false;
var healthPickUp = new Array();
var blocks = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var type = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var back_ground = new Array();
var shot = new Array();
blocks.push(block1, block2);
back_ground.push(backdrop, backdrop_tile_2, foreGround, foreGround_tile_2);
var back_ground_position = new Array();
back_ground_position.push(0, 0, 1, 1);
sam.onEnterFrame = function () {
enemy_enemy1.swapDepths(_root.getNextHighestDepth());
sam.swapDepths(_root.getNextHighestDepth());
enemy_enemy2.swapDepths(_root.getNextHighestDepth());
enemy_enemy3.swapDepths(_root.getNextHighestDepth());
hitSpark.swapDepths(_root.getNextHighestDepth());
lolsemma.swapDepths(_root.getNextHighestDepth());
fadeout.swapDepths(_root.getNextHighestDepth());
showenemykills.ems.text = enemiesdead;
if (hitPlayer == 0) {
var _local2 = sam.transform.colorTransform;
sam.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local2 = sam.transform.colorTransform;
_local2.rgb = 4294967295;
sam.transform.colorTransform = _local2;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (sam._x > 480) {
death_mc._x = death_mc._x - foreGroundSpeed;
}
if (startTimer > 0) {
startTimer--;
if (startTimer == 0) {
startGame = true;
}
}
healthBar._xscale = playerHealth;
score_mc.pts.text = score;
if (bossdead) {
if (gameOverTimer == 0) {
_root.attachMovie("fadeout", "fadeout", _root.getNextHighestDepth(), {_y:0, _x:0});
}
gameOverTimer++;
if (gameOverTimer == 159) {
removeShot();
removeEnemy();
removeType();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeBack_ground();
removeEnemyAttacking();
removeEnemyAttackingTimer();
removeBlocks();
removeHealthPickUp();
score_mc.removeMovieClip();
showenemykills.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
gotoAndStop ("stage2");
}
}
if (playerHealth < 1) {
playerHealth = 0;
removeShot();
removeEnemy();
removeType();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeBack_ground();
removeEnemyAttacking();
removeEnemyAttackingTimer();
removeBlocks();
removeHealthPickUp();
score_mc.removeMovieClip();
showenemykills.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
gotoAndStop ("reset");
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
shaker();
cantplaychess();
hideec();
addfakeness();
shotActions();
enemyAnimations();
pushEnemyMovement();
blockActions();
blockActions();
addEnemies();
enemyDamaged();
enemyMovement();
enemyAttackState();
backgroundMovement();
enemyHealthReachesZero();
noOverLap();
noOverLap2();
pickUpActions();
if (!superAttack) {
yspeed = yspeed + gravity;
if (sam._x < 50) {
sam._x = 50;
}
if (sam._x > 480) {
sam._x = 480;
}
if (sliding) {
if (slidingTimer == 0) {
if (onfloor) {
_root.attachMovie("dust_mc", "dust_mc", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
dust_mc._xscale = sam._xscale;
} else {
_root.attachMovie("pushg", "pushg", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
pushg._xscale = sam._xscale;
}
}
slidingTimer++;
sam.gotoAndStop("slide");
if (slidingTimer == 10) {
smack = 0;
sliding = false;
slidingTimer = 0;
}
if (slidingRight) {
sam._x = sam._x + (samSpeed * 4);
}
if (slidingLeft) {
sam._x = sam._x - (samSpeed * 4);
}
}
if (attacking) {
attackingTimer--;
if (attackingTimer > 4) {
if (samLeft) {
sam._x = sam._x - samSpeed;
} else {
sam._x = sam._x + samSpeed;
}
}
sam.gotoAndStop("attack");
if (attackingTimer == 0) {
attacking = false;
attackingTimer = 8;
smack = 0;
}
}
if (sam._y == 450) {
onfloor = true;
yspeed = 0;
jump = false;
sam._y = 450;
}
if (sam._y > 449) {
sam._y = 450;
yspeed = 0;
}
if (!sliding) {
if (!attacking) {
if (Key.isDown(68) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
huh_sound.start();
sliding = true;
slidingRight = true;
slidingLeft = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(68)) {
hit2 = false;
}
if (Key.isDown(65) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
huh_sound.start();
sliding = true;
slidingRight = false;
slidingLeft = true;
}
lastPressB = getTimer();
} else if (!Key.isDown(65)) {
hit3 = false;
}
if (Key.isDown(83)) {
dropping = true;
}
if (dropping) {
droppingTimer++;
if (droppingTimer > 15) {
dropping = false;
droppingTimer = 0;
}
}
if (Key.isDown(32)) {
attacking = true;
}
if (Key.isDown(87)) {
if (onfloor or onRoof) {
_root.attachMovie("forslide", "forslide", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
}
}
if (Key.isDown(65)) {
samLeft = true;
sam.gotoAndStop("run");
sam._xscale = 100;
sam._x = sam._x - samSpeed;
} else if (Key.isDown(68)) {
samLeft = false;
sam.gotoAndStop("run");
sam._xscale = -100;
sam._x = sam._x + samSpeed;
} else {
sam.gotoAndStop("idle");
}
}
sam._y = sam._y + (yspeed * 2);
}
}
};
Frame 11
sam.removeMovieClip();
fadeout.removeMovieClip();
enemiesdead = 0;
stopAllSounds();
play();
Frame 12
function removeHealthPickUp() {
i = healthPickUp.length - 1;
while (i >= 0) {
healthPickUp[i].removeMovieClip();
healthPickUp.splice(i, 1);
i--;
}
}
function removeBlocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeBack_ground() {
i = back_ground.length - 1;
while (i >= 0) {
back_ground[i].removeMovieClip();
back_ground.splice(i, 1);
i--;
}
}
function removeShot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function pickUpActions() {
hbg._x = hbg._x - foreGroundSpeed;
if ((releaseHealth + 30000) < getTimer()) {
releaseHealth = getTimer();
randomnumber++;
hp = _root.attachMovie("hpp", "hpp" + randomnumber, _root.getNextHighestDepth(), {_x:700, _y:305});
healthPickUp.push(hp);
}
i = healthPickUp.length - 1;
while (i >= 0) {
healthPickUp[i]._x = healthPickUp[i]._x - foreGroundSpeed;
if (healthPickUp[i].hitTest(sam)) {
chanceOfNasty = Math.round(Math.random() * 3) + 0;
if (chanceOfNasty == 0) {
addNasty = true;
if (nastyTimer == 0) {
randomnumber++;
hbg = _root.attachMovie("gh", "gh" + randomnumber, _root.getNextHighestDepth(), {_x:healthPickUp[i]._x, _y:healthPickUp[i]._y});
healthPickUp[i].removeMovieClip();
healthPickUp.splice(i, 1);
}
} else {
playerHealth = playerHealth + 15;
randomnumber++;
puff_ = _root.attachMovie("puff", "puff" + randomnumber, _root.getNextHighestDepth(), {_x:healthPickUp[i]._x, _y:healthPickUp[i]._y});
healthPickUp[i].removeMovieClip();
healthPickUp.splice(i, 1);
}
}
i--;
}
}
function cantplaychess() {
if (addNasty) {
nastyTimer++;
if (nastyTimer == 24) {
bullshit++;
randomnumber++;
enemy_enemy2 = _root.attachMovie("enemy2", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:hbg._y, _x:hbg._x});
enemy.push(enemy_enemy2);
enemyHealth.push(10);
type.push(1);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
hbg.removeMovieClip();
addNasty = false;
nastyTimer = 0;
}
}
}
function addEnemies() {
if (startGame) {
if (numberOfpeeps < 4) {
if (bullshit < 50) {
if ((releaseenemy + releaseEnemyGap) < getTimer()) {
releaseenemy = getTimer();
superChoice = Math.round(Math.random() * 3) + 0;
bullshit++;
numberOfpeeps++;
randomnumber++;
if (superChoice == 0) {
choice = Math.round(Math.random() * 1) + 0;
if (choice == 0) {
enemy_enemy1 = _root.attachMovie("xenemy", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:260, _x:700});
} else {
enemy_enemy1 = _root.attachMovie("xenemy", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:260, _x:-100});
}
enemy.push(enemy_enemy1);
enemyHealth.push(20);
type.push(0);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
}
if (superChoice == 1) {
randomnumber++;
choice2 = Math.round(Math.random() * 1) + 0;
if (choice2 == 0) {
enemy_enemy2 = _root.attachMovie("enemy2", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:300, _x:700});
} else {
enemy_enemy2 = _root.attachMovie("enemy2", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:300, _x:-100});
}
enemy.push(enemy_enemy2);
enemyHealth.push(10);
type.push(1);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
}
if (superChoice == 2) {
randomnumber++;
choice3 = Math.round(Math.random() * 1) + 0;
if (choice3 == 0) {
enemy_enemy3 = _root.attachMovie("xenemy3", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:260, _x:700});
} else {
enemy_enemy3 = _root.attachMovie("xenemy3", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:260, _x:-100});
}
enemy.push(enemy_enemy3);
enemyHealth.push(30);
type.push(2);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
}
if (superChoice == 3) {
randomnumber++;
choice4 = Math.round(Math.random() * 1) + 0;
if (choice4 == 0) {
enemy_enemy4 = _root.attachMovie("enemy4", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:110, _x:700});
} else {
enemy_enemy4 = _root.attachMovie("enemy4", "enemy" + randomnumber, _root.getNextHighestDepth(), {_y:110, _x:-100});
}
enemy.push(enemy_enemy4);
enemyHealth.push(10);
type.push(3);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
}
}
}
}
}
}
function enemyDamaged() {
if (sliding) {
playerPower = 3;
} else {
playerPower = 2;
}
if (smackYou == 1) {
smackTimer++;
if (smackTimer == 20) {
smackYou = 0;
smackTimer = 0;
}
}
i = enemy.length - 1;
while (i >= 0) {
if (enemy[i].hitTest(sam)) {
if (attacking or sliding) {
if (sliding) {
if (Key.isDown(32)) {
enemyHealth[i] = enemyHealth[i] - (playerPower + 25);
if (smack == 0) {
randomnumber++;
boom_sound.start();
lolsemma = _root.attachMovie("bigger", "bigger" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
lolsemma._xscale = sam._xscale;
smack = 1;
}
}
}
enemyHealth[i] = enemyHealth[i] - playerPower;
hit[i] = 1;
if (smackYou == 0) {
smacked_sound.start();
smackYou = 1;
}
if (smack == 0) {
randomnumber++;
_root.attachMovie("hitSpark", "hitSpark" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
smack = 1;
}
}
}
i--;
}
}
function hideec() {
if (removeec) {
removeect--;
if (removeect == 0) {
showenemykills._x = -3000;
removeec = false;
}
}
}
function enemyHealthReachesZero() {
if (bullshit > 49) {
if (numberOfpeeps == 0) {
bossdead = true;
}
}
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
score = score + 100;
showenemykills._x = 0;
removeect = 45;
removeec = true;
enemiesdead++;
randomnumber++;
numberOfpeeps--;
if (type[i] == 0) {
death_mc = _root.attachMovie("xdead1", "dead1" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
if (type[i] == 1) {
death_mc = _root.attachMovie("dead2", "dead2" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
if (type[i] == 2) {
death_mc = _root.attachMovie("xdead3", "dead3" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
if (type[i] == 3) {
death_mc = _root.attachMovie("dead4", "dead4" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
enemy[i].removeMovieClip();
enemy.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
}
i--;
}
}
function enemyAnimations() {
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == 0) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
if (type[i] == 1) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
if (type[i] == 2) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("idle");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
i--;
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (sam._x > 480) {
shot[i]._x = shot[i]._x - foreGroundSpeed;
}
if (shot[i].hitTest(sam)) {
playerHealth = playerHealth - 5;
hitPlayer = 1;
randomnumber++;
explo = _root.attachMovie("exp", "exp" + randomnumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._x < 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._x > 640) {
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._y > 450) {
randomnumber++;
explo = _root.attachMovie("exp", "exp" + randomnumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
shot[i].removeMovieClip();
shot.splice(i, 1);
}
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function enemyAttackState() {
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == 3) {
enemyAttackingTimer[i]++;
if (enemyAttackingTimer[i] == 31) {
enemyAttackingTimer[i] = 0;
randomnumber++;
bomb = _root.attachMovie("bomb_mc", "bomb_mc" + randomnumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
shot.push(bomb);
bomb.onEnterFrame = function () {
this._y = this._y + 8;
};
}
}
if (type[i] == 0) {
if (hit[i] == 0) {
if (enemy[i].hitTest(sam)) {
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 0.3;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] > 9) {
if (enemyAttackingTimer[i] == 31) {
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
}
}
}
if (type[i] == 1) {
if (hit[i] == 0) {
if (enemy[i].hitTest(sam)) {
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 0.3;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] > 9) {
if (enemyAttackingTimer[i] == 39) {
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
}
}
}
if (type[i] == 2) {
if (hit[i] == 0) {
if (enemy[i].hitTest(sam)) {
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 0.2;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] > 9) {
if (enemyAttackingTimer[i] == 19) {
randomnumber++;
fabians = _root.attachMovie("delph", "delph" + randomnumber, _root.getNextHighestDepth(), {_y:enemy[i]._y, _x:enemy[i]._x});
shot.push(fabians);
fabians.onEnterFrame = function () {
i = enemy.length - 1;
while (i >= 0) {
if (enemy[i]._xscale == 100) {
this._x = this._x - 8;
} else {
this._x = this._x + 8;
}
i--;
}
};
}
if (enemyAttackingTimer[i] == 33) {
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
}
}
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (hit[i] == 0) {
var _local2 = enemy[i].transform.colorTransform;
enemy[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hit[i] == 1) {
var _local2 = enemy[i].transform.colorTransform;
_local2.rgb = 4294967295;
enemy[i].transform.colorTransform = _local2;
damagedTimer[i]++;
if (damagedTimer[i] == 1) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (type[i] == 3) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 5);
}
if (type[i] == 2) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + ((endX - enemy[i]._x) / enemySpeed);
}
if (type[i] == 1) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 2);
}
if (type[i] == 0) {
if (enemyAttacking[i] == 0) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 4);
}
}
i--;
}
}
function backgroundMovement() {
i = back_ground.length - 1;
while (i >= 0) {
if (back_ground[i]._x == -640) {
back_ground[i]._x = 640;
}
if (sam._x > 480) {
if (back_ground_position[i] == 0) {
back_ground[i]._x = back_ground[i]._x - backDropSpeed;
}
if (back_ground_position[i] == 1) {
back_ground[i]._x = back_ground[i]._x - foreGroundSpeed;
}
}
i--;
}
}
function pushEnemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (sam._x > 480) {
enemy[i]._x = enemy[i]._x - foreGroundSpeed;
}
i--;
}
}
function blockActions() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i]._alpha = 0;
if ((!sam.hitTest(blocks[i])) && ((!sam._y) == 450)) {
onfloor = false;
}
if (sam._x > 480) {
blocks[i]._x = blocks[i]._x - (foreGroundSpeed / 2);
}
if (blocks[i]._x < -640) {
blocks[i]._x = 640;
}
if (sam.hitTest(blocks[i])) {
if (sam._y > blocks[i]._y) {
if (!dropping) {
sam._y = blocks[i]._y;
yspeed = 0;
jump = false;
onfloor = true;
}
}
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
j--;
}
i--;
}
}
function noOverLap2() {
i = healthPickUp.length - 1;
while (i >= 0) {
j = healthPickUp.length - 1;
while (j >= 0) {
if (!(healthPickUp[i] === healthPickUp[j])) {
if (healthPickUp[i].hitTest(healthPickUp[j])) {
endX = _root.healthPickUp[j]._x;
healthPickUp[i]._x = healthPickUp[i]._x - (endX - healthPickUp[i]._x);
}
}
j--;
}
i--;
}
}
stop();
level = 2;
boom_sound = new Sound();
boom_sound.attachSound("boom");
huh_sound = new Sound();
huh_sound.attachSound("huh");
smacked_sound = new Sound();
smacked_sound.attachSound("smack");
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:5, _y:30});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:3, _y:30});
_root.attachMovie("showenemykills", "showenemykills", _root.getNextHighestDepth(), {_x:-3000, _y:0});
_root.attachMovie("score_mc", "score_mc", _root.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("sam", "sam", _root.getNextHighestDepth(), {_x:250, _y:0});
_root.attachMovie("fight", "fight", _root.getNextHighestDepth(), {_x:0, _y:0});
sam._xscale = -100;
shake = 0;
backDropSpeed = 5;
foreGroundSpeed = 10;
smack = 0;
sliding = false;
slidingTimer = 0;
samSpeed = 15;
enemySpeed = 25;
samLeft = false;
slidingRight = false;
slidingLeft = false;
attacking = false;
attackingTimer = 8;
onfloor = true;
hit2 = false;
hit3 = false;
startTimer = 100;
startGame = false;
randomnumber = 0;
releaseenemy = 0;
releaseHealth = 0;
fakeness = 0;
releaseEnemyGap = 1000;
yspeed = 0;
removeec = false;
removeect = 45;
jumpamount = 20;
playerHealth = 100;
gravity = 2;
hitPlayer = false;
hitTimer = 0;
jump = false;
smackTimer = 0;
choice = 0;
choice2 = 0;
choice3 = 0;
choice4 = 0;
bullshit = 0;
gameOverTimer = 0;
sperChoice = 0;
chanceOfNasty = 0;
nastyTimer = 0;
addbossonce = 0;
addNasty = false;
smackYou = 0;
dropping = false;
droppingTimer = 0;
playerPower = 0.5;
numberOfpeeps = 0;
bossdead = false;
var healthPickUp = new Array();
var blocks = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var type = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var back_ground = new Array();
var shot = new Array();
blocks.push(block1, block2);
back_ground.push(backdrop, backdrop_tile_2, foreGround, foreGround_tile_2);
var back_ground_position = new Array();
back_ground_position.push(0, 0, 1, 1);
sam.onEnterFrame = function () {
if (onfloor) {
sam._x = sam._x - 10;
}
enemy_enemy1.swapDepths(_root.getNextHighestDepth());
sam.swapDepths(_root.getNextHighestDepth());
enemy_enemy2.swapDepths(_root.getNextHighestDepth());
enemy_enemy3.swapDepths(_root.getNextHighestDepth());
hitSpark.swapDepths(_root.getNextHighestDepth());
lolsemma.swapDepths(_root.getNextHighestDepth());
fadeout.swapDepths(_root.getNextHighestDepth());
showenemykills.ems.text = enemiesdead;
if (hitPlayer == 0) {
var _local2 = sam.transform.colorTransform;
sam.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local2 = sam.transform.colorTransform;
_local2.rgb = 4294967295;
sam.transform.colorTransform = _local2;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (sam._x > 480) {
death_mc._x = death_mc._x - foreGroundSpeed;
}
if (startTimer > 0) {
startTimer--;
if (startTimer == 0) {
startGame = true;
}
}
healthBar._xscale = playerHealth;
score_mc.pts.text = score;
if (bossdead) {
if (gameOverTimer == 0) {
_root.attachMovie("fadeout", "fadeout", _root.getNextHighestDepth(), {_y:0, _x:0});
}
gameOverTimer++;
if (gameOverTimer == 159) {
removeShot();
removeEnemy();
removeType();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeBack_ground();
removeEnemyAttacking();
removeEnemyAttackingTimer();
removeBlocks();
removeHealthPickUp();
score_mc.removeMovieClip();
showenemykills.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
gotoAndStop ("atboss");
}
}
if (playerHealth < 1) {
playerHealth = 0;
removeShot();
removeEnemy();
removeType();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeBack_ground();
removeEnemyAttacking();
removeEnemyAttackingTimer();
removeBlocks();
removeHealthPickUp();
score_mc.removeMovieClip();
showenemykills.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
gotoAndStop ("reset");
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
shaker();
cantplaychess();
hideec();
shotActions();
enemyAnimations();
pushEnemyMovement();
blockActions();
blockActions();
addEnemies();
enemyDamaged();
enemyMovement();
enemyAttackState();
backgroundMovement();
enemyHealthReachesZero();
noOverLap();
noOverLap2();
pickUpActions();
if (!superAttack) {
yspeed = yspeed + gravity;
if (sam._x < 50) {
sam._x = 50;
}
if (sam._x > 480) {
sam._x = 480;
}
if (sliding) {
if (slidingTimer == 0) {
if (onfloor) {
_root.attachMovie("dust_mc", "dust_mc", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
dust_mc._xscale = sam._xscale;
} else {
_root.attachMovie("pushg", "pushg", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
pushg._xscale = sam._xscale;
}
}
slidingTimer++;
sam.gotoAndStop("slide");
if (slidingTimer == 10) {
smack = 0;
sliding = false;
slidingTimer = 0;
}
if (slidingRight) {
sam._x = sam._x + (samSpeed * 4);
}
if (slidingLeft) {
sam._x = sam._x - (samSpeed * 4);
}
}
if (attacking) {
attackingTimer--;
if (attackingTimer > 4) {
if (samLeft) {
sam._x = sam._x - samSpeed;
} else {
sam._x = sam._x + samSpeed;
}
}
sam.gotoAndStop("attack");
if (attackingTimer == 0) {
attacking = false;
attackingTimer = 8;
smack = 0;
}
}
if (sam._y == 305) {
onfloor = true;
yspeed = 0;
jump = false;
sam._y = 305;
}
if (sam._y > 306) {
sam._y = 305;
yspeed = 0;
}
if (!sliding) {
if (!attacking) {
if (Key.isDown(68) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
huh_sound.start();
sliding = true;
slidingRight = true;
slidingLeft = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(68)) {
hit2 = false;
}
if (Key.isDown(65) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
huh_sound.start();
sliding = true;
slidingRight = false;
slidingLeft = true;
}
lastPressB = getTimer();
} else if (!Key.isDown(65)) {
hit3 = false;
}
if (Key.isDown(83)) {
dropping = true;
}
if (dropping) {
droppingTimer++;
if (droppingTimer > 15) {
dropping = false;
droppingTimer = 0;
}
}
if (Key.isDown(32)) {
attacking = true;
}
if (Key.isDown(87)) {
if (onfloor or onRoof) {
_root.attachMovie("forslide", "forslide", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
}
}
if (Key.isDown(65)) {
samLeft = true;
sam.gotoAndStop("run");
sam._xscale = 100;
sam._x = sam._x - samSpeed;
} else if (Key.isDown(68)) {
samLeft = false;
sam.gotoAndStop("run");
sam._xscale = -100;
sam._x = sam._x + samSpeed;
} else {
sam.gotoAndStop("idle");
}
}
sam._y = sam._y + (yspeed * 2);
}
}
};
Frame 13
sam.removeMovieClip();
death_mc2.removeMovieClip();
death_mc.removeMovieClip();
stopAllSounds();
play();
Frame 14
function removeHealthPickUp() {
i = healthPickUp.length - 1;
while (i >= 0) {
healthPickUp[i].removeMovieClip();
healthPickUp.splice(i, 1);
i--;
}
}
function removeBlocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removeEnemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeEnemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeBack_ground() {
i = back_ground.length - 1;
while (i >= 0) {
back_ground[i].removeMovieClip();
back_ground.splice(i, 1);
i--;
}
}
function removeShot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeEnemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeType() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removeEnemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removeDamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removeHit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function addEnemies() {
if (startGame) {
if (addbossonce == 0) {
boss = _root.attachMovie("xboss_mc", "xboss_mc", _root.getNextHighestDepth(), {_y:430, _x:700});
enemy.push(boss);
enemyHealth.push(1500);
type.push(4);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
boss2 = _root.attachMovie("yboss_mc", "yboss_mc", _root.getNextHighestDepth(), {_y:430, _x:-100});
enemy.push(boss2);
enemyHealth.push(1500);
type.push(5);
hit.push(0);
damagedTimer.push(0);
enemyAttacking.push(0);
enemyAttackingTimer.push(0);
addbossonce = 1;
}
}
}
function enemyDamaged() {
if (sliding) {
playerPower = 3;
} else {
playerPower = 2;
}
if (smackYou == 1) {
smackTimer++;
if (smackTimer == 20) {
smackYou = 0;
smackTimer = 0;
}
}
i = enemy.length - 1;
while (i >= 0) {
if (enemy[i].hitTest(sam)) {
if (attacking or sliding) {
if (sliding) {
if (Key.isDown(32)) {
enemyHealth[i] = enemyHealth[i] - (playerPower + 25);
if (smack == 0) {
randomnumber++;
boom_sound.start();
lolsemma = _root.attachMovie("bigger", "bigger" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
lolsemma._xscale = sam._xscale;
smack = 1;
}
}
}
enemyHealth[i] = enemyHealth[i] - playerPower;
hit[i] = 1;
if (smackYou == 0) {
smacked_sound.start();
smackYou = 1;
}
if (smack == 0) {
randomnumber++;
_root.attachMovie("hitSpark", "hitSpark" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
smack = 1;
}
}
}
i--;
}
}
function enemyHealthReachesZero() {
i = enemy.length - 1;
while (i >= 0) {
if (enemyHealth[i] < 1) {
bothbosses--;
score = score + 100;
showenemykills._x = 0;
removeect = 45;
removeec = true;
enemiesdead++;
randomnumber++;
numberOfpeeps--;
if (type[i] == 4) {
bossdead = true;
score = score + 1400;
death_mc = _root.attachMovie("xbossdead_mc", "bossdead_mc" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc._xscale = enemy[i]._xscale;
}
if (type[i] == 5) {
bossdead = true;
score = score + 1400;
death_mc2 = _root.attachMovie("ybossdead_mc", "bossdead_mc" + randomnumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y});
death_mc2._xscale = enemy[i]._xscale;
}
enemy[i].removeMovieClip();
enemy.splice(i, 1);
hit.splice(i, 1);
type.splice(i, 1);
damagedTimer.splice(i, 1);
enemyHealth.splice(i, 1);
enemyAttacking.splice(i, 1);
enemyAttackingTimer.splice(i, 1);
}
i--;
}
}
function enemyAnimations() {
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == 4) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
if (type[i] == 5) {
if ((enemyAttacking[i] == 0) && (enemyAttackingTimer[i] == 0)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] < 9)) {
enemy[i].gotoAndStop("walk");
}
if ((enemyAttacking[i] == 1) && (enemyAttackingTimer[i] > 8)) {
enemy[i].gotoAndStop("attack");
}
}
i--;
}
}
function shotActions() {
i = shot.length - 1;
while (i >= 0) {
if (shot[i].hitTest(sam)) {
playerHealth = playerHealth - 2;
hitPlayer = 1;
randomnumber++;
explo = _root.attachMovie("exp", "exp" + randomnumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._x < 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._x > 640) {
shot[i].removeMovieClip();
shot.splice(i, 1);
}
if (shot[i]._y > 430) {
randomnumber++;
explo = _root.attachMovie("exp", "exp" + randomnumber, _root.getNextHighestDepth(), {_y:shot[i]._y, _x:shot[i]._x});
shot[i].removeMovieClip();
shot.splice(i, 1);
}
i--;
}
}
function shaker() {
if (shake == 0) {
_root._x = 0;
_root._y = 0;
} else if (shake == 1) {
shake = shake + 1;
_root._x = _root._x + 3;
_root._y = _root._y + 3;
} else if (shake == 2) {
shake = shake + 1;
_root._y = _root._y - 5;
_root._x = _root._x - 5;
} else if (shake > 2) {
shake = 0;
_root._x = _root._x + 2;
_root._y = _root._y + 2;
}
}
function enemyAttackState() {
i = enemy.length - 1;
while (i >= 0) {
if (type[i] == 4) {
if (hit[i] == 0) {
if (enemy[i].hitTest(sam)) {
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 1;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] == 15) {
randomnumber++;
bomb = _root.attachMovie("bomb_mc", "bomb_mc" + randomnumber, _root.getNextHighestDepth(), {_y:-50, _x:180});
shot.push(bomb);
bomb.onEnterFrame = function () {
this._y = this._y + 10;
};
randomnumber++;
bomb2 = _root.attachMovie("bomb_mc", "bomb_mc" + randomnumber, _root.getNextHighestDepth(), {_y:-50, _x:280});
shot.push(bomb2);
bomb2.onEnterFrame = function () {
this._y = this._y + 8;
};
randomnumber++;
bomb3 = _root.attachMovie("bomb_mc", "bomb_mc" + randomnumber, _root.getNextHighestDepth(), {_y:-50, _x:425});
shot.push(bomb3);
bomb3.onEnterFrame = function () {
this._y = this._y + 6;
};
randomnumber++;
bomb4 = _root.attachMovie("bomb_mc", "bomb_mc" + randomnumber, _root.getNextHighestDepth(), {_y:-50, _x:590});
shot.push(bomb4);
bomb4.onEnterFrame = function () {
this._y = this._y + 4;
};
shake++;
}
if (enemyAttackingTimer[i] > 21) {
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
}
}
if (type[i] == 5) {
if (hit[i] == 0) {
willAttack++;
if (willAttack == 45) {
enemyAttacking[i] = 1;
}
if (enemy[i].hitTest(sam)) {
if (enemyAttackingTimer[i] > 9) {
playerHealth = playerHealth - 1.5;
hitPlayer = 1;
}
}
}
if (enemyAttacking[i] == 1) {
enemyAttackingTimer[i]++;
}
if (enemyAttackingTimer[i] == 15) {
dropping = true;
shake++;
}
if (enemyAttackingTimer[i] > 21) {
enemyAttackingTimer[i] = 0;
enemyAttacking[i] = 0;
willAttack = 0;
}
}
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (hit[i] == 0) {
var _local2 = enemy[i].transform.colorTransform;
enemy[i].transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hit[i] == 1) {
var _local2 = enemy[i].transform.colorTransform;
_local2.rgb = 4294967295;
enemy[i].transform.colorTransform = _local2;
damagedTimer[i]++;
if (damagedTimer[i] == 1) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (type[i] == 4) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 3);
}
if (type[i] == 5) {
if (sam._x < enemy[i]._x) {
enemy[i]._xscale = 100;
} else {
enemy[i]._xscale = -100;
}
endX = _root.sam._x;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) / enemySpeed) / 3);
}
i--;
}
}
function blockActions() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i]._alpha = 0;
if ((!sam.hitTest(blocks[i])) && ((!sam._y) == 450)) {
onfloor = false;
}
if (sam.hitTest(blocks[i])) {
if (sam._y > blocks[i]._y) {
if (!dropping) {
sam._y = blocks[i]._y;
yspeed = 0;
jump = false;
onfloor = true;
}
}
}
i--;
}
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
j--;
}
i--;
}
}
stop();
level = 3;
boom_sound = new Sound();
boom_sound.attachSound("boom");
huh_sound = new Sound();
huh_sound.attachSound("huh");
smacked_sound = new Sound();
smacked_sound.attachSound("smack");
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:5, _y:30});
_root.attachMovie("barBoarder", "barBoarder", _root.getNextHighestDepth(), {_x:3, _y:30});
_root.attachMovie("showenemykills", "showenemykills", _root.getNextHighestDepth(), {_x:-3000, _y:0});
_root.attachMovie("score_mc", "score_mc", _root.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("sam", "sam", _root.getNextHighestDepth(), {_x:250, _y:0});
_root.attachMovie("fight", "fight", _root.getNextHighestDepth(), {_x:0, _y:0});
sam._xscale = -100;
shake = 0;
backDropSpeed = 5;
foreGroundSpeed = 10;
smack = 0;
sliding = false;
slidingTimer = 0;
samSpeed = 15;
enemySpeed = 25;
samLeft = false;
slidingRight = false;
slidingLeft = false;
attacking = false;
attackingTimer = 8;
onfloor = true;
hit2 = false;
hit3 = false;
startTimer = 30;
startGame = false;
randomnumber = 0;
releaseenemy = 0;
releaseHealth = 0;
fakeness = 0;
willAttack = 0;
releaseEnemyGap = 1000;
yspeed = 0;
removeec = false;
removeect = 45;
jumpamount = 20;
playerHealth = 100;
gravity = 2;
hitPlayer = false;
hitTimer = 0;
jump = false;
smackTimer = 0;
choice = 0;
choice2 = 0;
choice3 = 0;
choice4 = 0;
gameOverTimer = 0;
sperChoice = 0;
chanceOfNasty = 0;
nastyTimer = 0;
addbossonce = 0;
addNasty = false;
smackYou = 0;
dropping = false;
droppingTimer = 0;
playerPower = 0.5;
numberOfpeeps = 0;
bossdead = false;
bothbosses = 2;
var healthPickUp = new Array();
var blocks = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var type = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var back_ground = new Array();
var shot = new Array();
blocks.push(block1, block2);
back_ground.push(backdrop, backdrop_tile_2, foreGround, foreGround_tile_2);
var back_ground_position = new Array();
back_ground_position.push(0, 0, 1, 1);
sam.onEnterFrame = function () {
enemy_enemy1.swapDepths(_root.getNextHighestDepth());
sam.swapDepths(_root.getNextHighestDepth());
enemy_enemy2.swapDepths(_root.getNextHighestDepth());
enemy_enemy3.swapDepths(_root.getNextHighestDepth());
hitSpark.swapDepths(_root.getNextHighestDepth());
lolsemma.swapDepths(_root.getNextHighestDepth());
fadeout.swapDepths(_root.getNextHighestDepth());
showenemykills.ems.text = enemiesdead;
if (hitPlayer == 0) {
var _local2 = sam.transform.colorTransform;
sam.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local2 = sam.transform.colorTransform;
_local2.rgb = 4294967295;
sam.transform.colorTransform = _local2;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (startTimer > 0) {
startTimer--;
if (startTimer == 0) {
startGame = true;
}
}
healthBar._xscale = playerHealth;
score_mc.pts.text = score;
if (bothbosses == 0) {
if (gameOverTimer == 0) {
_root.attachMovie("fadeout", "fadeout", _root.getNextHighestDepth(), {_y:0, _x:0});
}
gameOverTimer++;
if (gameOverTimer == 159) {
removeShot();
removeEnemy();
removeType();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeBack_ground();
removeEnemyAttacking();
removeEnemyAttackingTimer();
removeBlocks();
removeHealthPickUp();
score_mc.removeMovieClip();
showenemykills.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
gotoAndStop ("finished");
}
}
if (playerHealth < 1) {
playerHealth = 0;
removeShot();
removeEnemy();
removeType();
removeEnemyHealth();
removeDamagedTimer();
removeHit();
removeBack_ground();
removeEnemyAttacking();
removeEnemyAttackingTimer();
removeBlocks();
removeHealthPickUp();
score_mc.removeMovieClip();
showenemykills.removeMovieClip();
barBoarder.removeMovieClip();
healthBar.removeMovieClip();
gotoAndStop ("reset");
}
if (playerHealth > 100) {
playerHealth = 100;
}
if (playerHealth < 50) {
healthBar.gotoAndStop("normal");
} else {
healthBar.gotoAndStop("max");
}
shaker();
cantplaychess();
hideec();
addfakeness();
shotActions();
enemyAnimations();
blockActions();
addEnemies();
enemyDamaged();
enemyMovement();
enemyAttackState();
enemyHealthReachesZero();
noOverLap();
if (!superAttack) {
yspeed = yspeed + gravity;
if (sam._x < 50) {
sam._x = 50;
}
if (sam._x > 590) {
sam._x = 590;
}
if (sliding) {
if (slidingTimer == 0) {
if (onfloor) {
_root.attachMovie("dust_mc", "dust_mc", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
dust_mc._xscale = sam._xscale;
} else {
_root.attachMovie("pushg", "pushg", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
pushg._xscale = sam._xscale;
}
}
slidingTimer++;
sam.gotoAndStop("slide");
if (slidingTimer == 10) {
smack = 0;
sliding = false;
slidingTimer = 0;
}
if (slidingRight) {
sam._x = sam._x + (samSpeed * 4);
}
if (slidingLeft) {
sam._x = sam._x - (samSpeed * 4);
}
}
if (attacking) {
attackingTimer--;
if (attackingTimer > 4) {
if (samLeft) {
sam._x = sam._x - samSpeed;
} else {
sam._x = sam._x + samSpeed;
}
}
sam.gotoAndStop("attack");
if (attackingTimer == 0) {
attacking = false;
attackingTimer = 8;
smack = 0;
}
}
if (sam._y == 450) {
onfloor = true;
yspeed = 0;
jump = false;
sam._y = 450;
}
if (sam._y > 449) {
sam._y = 450;
yspeed = 0;
}
if (!sliding) {
if (!attacking) {
if (Key.isDown(68) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
huh_sound.start();
sliding = true;
slidingRight = true;
slidingLeft = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(68)) {
hit2 = false;
}
if (Key.isDown(65) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
huh_sound.start();
sliding = true;
slidingRight = false;
slidingLeft = true;
}
lastPressB = getTimer();
} else if (!Key.isDown(65)) {
hit3 = false;
}
if (Key.isDown(83)) {
dropping = true;
}
if (dropping) {
droppingTimer++;
if (droppingTimer > 15) {
dropping = false;
droppingTimer = 0;
}
}
if (Key.isDown(32)) {
attacking = true;
}
if (Key.isDown(87)) {
if (onfloor or onRoof) {
_root.attachMovie("forslide", "forslide", _root.getNextHighestDepth(), {_x:sam._x, _y:sam._y});
jump = true;
onfloor = false;
yspeed = yspeed - jumpamount;
}
}
if (Key.isDown(65)) {
samLeft = true;
sam.gotoAndStop("run");
sam._xscale = 100;
sam._x = sam._x - samSpeed;
} else if (Key.isDown(68)) {
samLeft = false;
sam.gotoAndStop("run");
sam._xscale = -100;
sam._x = sam._x + samSpeed;
} else {
sam.gotoAndStop("idle");
}
}
sam._y = sam._y + (yspeed * 2);
}
}
};
Frame 15
getURL ("http://xdgames.co.uk/", "_blank");
sam.removeMovieClip();
death_mc2.removeMovieClip();
death_mc.removeMovieClip();
stopAllSounds();
play();
Frame 16
var o = {n:[8, 5, 14, 5, 11, 8, 7, 14, 2, 5, 8, 14, 14, 7, 8, 1], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:score, name:playername});
Symbol 801 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.0");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
if (_root.mochiad_options) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 802 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if ((options.clip == null) || (options.clip == undefined)) {
options.clip = mochi.as2.MochiServices.clip;
}
if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.as2.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.as2.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.as2.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 803 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 42 MovieClip Frame 8
stop();
Symbol 44 MovieClip Frame 11
stop();
Symbol 45 MovieClip [sam] Frame 1
stop();
Symbol 45 MovieClip [sam] Frame 2
stop();
Symbol 45 MovieClip [sam] Frame 3
stop();
Symbol 45 MovieClip [sam] Frame 4
stop();
Symbol 78 MovieClip [enemy] Frame 1
stop();
Symbol 78 MovieClip [enemy] Frame 2
stop();
Symbol 78 MovieClip [enemy] Frame 3
stop();
Symbol 92 MovieClip [dust_mc] Frame 9
this.removeMovieClip();
Symbol 136 MovieClip [dead1] Frame 45
this.removeMovieClip();
Symbol 191 MovieClip [enemy2] Frame 1
stop();
Symbol 191 MovieClip [enemy2] Frame 2
stop();
Symbol 225 MovieClip [dead2] Frame 33
this.removeMovieClip();
Symbol 233 MovieClip [hitSpark] Frame 7
this.removeMovieClip();
Symbol 243 MovieClip [forslide] Frame 9
this.removeMovieClip();
Symbol 249 MovieClip [pushg] Frame 3
this.removeMovieClip();
Symbol 293 MovieClip [enemy3] Frame 1
stop();
Symbol 293 MovieClip [enemy3] Frame 2
stop();
Symbol 293 MovieClip [enemy3] Frame 3
stop();
Symbol 317 MovieClip [dead3] Frame 23
this.removeMovieClip();
Symbol 365 MovieClip [exp] Frame 8
this.removeMovieClip();
Symbol 375 MovieClip [dead4] Frame 9
this.removeMovieClip();
Symbol 383 MovieClip [bigger] Frame 7
this.removeMovieClip();
Symbol 387 MovieClip [gogo] Frame 95
this.removeMovieClip();
Symbol 395 MovieClip [healthBar] Frame 1
stop();
Symbol 395 MovieClip [healthBar] Frame 2
stop();
Symbol 441 MovieClip Frame 12
stop();
Symbol 445 Button
on (release) {
gotoAndPlay (2);
_root.soundstatus = "off";
}
Symbol 446 MovieClip Frame 11
stop();
Symbol 448 Button
on (release) {
gotoAndPlay (1);
_root.soundstatus = "on";
}
Symbol 449 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 2
stop();
Instance of Symbol 453 MovieClip in Symbol 454 MovieClip [sound_contr] Frame 1
onClipEvent (load) {
_root.soundstatus = "on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume = 100;
minvolume = 0;
}
onClipEvent (enterFrame) {
if (_root.soundstatus == "on") {
step = 5;
}
if (_root.soundstatus == "off") {
step = -5;
}
maxvolume = maxvolume + step;
if (maxvolume > 100) {
maxvolume = 100;
}
if (maxvolume < 0) {
maxvolume = 0;
}
_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}
Symbol 461 MovieClip [fight] Frame 71
this.removeMovieClip();
Symbol 471 MovieClip [puff] Frame 13
this.removeMovieClip();
Symbol 512 MovieClip [boss_mc] Frame 1
stop();
Symbol 512 MovieClip [boss_mc] Frame 2
stop();
Symbol 530 MovieClip [bossdead_mc] Frame 25
this.removeMovieClip();
Symbol 532 MovieClip [fadeout] Frame 160
this.removeMovieClip();
Symbol 546 MovieClip [xenemy] Frame 1
stop();
Symbol 546 MovieClip [xenemy] Frame 2
stop();
Symbol 546 MovieClip [xenemy] Frame 3
stop();
Symbol 564 MovieClip [xdead1] Frame 17
this.removeMovieClip();
Symbol 599 MovieClip [xenemy3] Frame 1
stop();
Symbol 599 MovieClip [xenemy3] Frame 2
stop();
Symbol 599 MovieClip [xenemy3] Frame 3
stop();
Symbol 623 MovieClip [xdead3] Frame 23
this.removeMovieClip();
Symbol 662 MovieClip [xboss_mc] Frame 1
stop();
Symbol 662 MovieClip [xboss_mc] Frame 2
stop();
Symbol 675 MovieClip Frame 12
stop();
Symbol 713 MovieClip [yboss_mc] Frame 1
stop();
Symbol 713 MovieClip [yboss_mc] Frame 2
stop();
Symbol 726 MovieClip Frame 12
stop();
Symbol 736 MovieClip Frame 32
stop();
Symbol 742 MovieClip Frame 1
_root.stop();
Symbol 742 MovieClip Frame 185
_root.play();