Frame 1
function rotPoint(xPoint1, yPoint1, xPoint2, yPoint2) {
degrees = Math.atan(Math.abs(yPoint1 - yPoint2) / Math.abs(xPoint1 - xPoint2)) * 57.2957795130823;
if (xPoint1 < xPoint2) {
if (yPoint1 < yPoint2) {
return(0 + degrees);
}
if (yPoint1 > yPoint2) {
return(-degrees);
}
} else if (xPoint1 > xPoint2) {
if (yPoint1 < yPoint2) {
return(180 - degrees);
}
if (yPoint1 > yPoint2) {
return(180 + degrees);
}
}
}
function rotMC(mc1, mc2) {
rotPoint(mc1._x, mc1._y, mc2._x, mc2._y);
}
function distPoint(x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)));
}
function distMC(mc1, mc2) {
distPoint(mc1._x, mc1._y, mc2._x, mc2._y);
}
function ease(str, mov, num, drift) {
switch (str) {
case "x" :
mov._x = mov._x - (drift * ((mov._x - num) / 2));
break;
case "y" :
mov._y = mov._y - (drift * ((mov._y - num) / 2));
break;
case "xscale" :
mov._xscale = mov._xscale - (drift * ((mov._xscale - num) / 2));
break;
case "yscale" :
mov._yscale = mov._yscale - (drift * ((mov._yscale - num) / 2));
break;
case "width" :
mov._width = mov._width - (drift * ((mov._width - num) / 2));
break;
case "height" :
mov._height = mov._height - (drift * ((mov._height - num) / 2));
break;
case "alpha" :
mov._alpha = mov._alpha - (drift * ((mov._alpha - num) / 2));
break;
case "rotation" :
mov._rotation = mov._rotation - (drift * ((mov._rotation - num) / 2));
}
}
function elasticRotation(mc, targt, accel, friction) {
if (mc.qrScale == undefined) {
mc.qrScale = 0;
}
mc.qrScale = mc.qrScale + ((targt - mc._rotation) * accel);
mc.qrScale = mc.qrScale * friction;
mc._rotation = mc._rotation + mc.qrScale;
}
function elasticScale(mc, targt, accel, friction) {
if (mc.qxScale == undefined) {
mc.qxScale = 0;
}
mc.qxScale = mc.qxScale + ((targt - mc._xscale) * accel);
mc.qxScale = mc.qxScale * friction;
mc._xscale = (mc._yscale = mc._yscale + mc.qxScale);
}
function elasticX(mc, targt, accel, friction) {
if (mc.qxSpeed == undefined) {
mc.qxSpeed = 0;
}
mc.qxSpeed = mc.qxSpeed + ((targt - mc._x) * accel);
mc.qxSpeed = mc.qxSpeed * friction;
mc._x = mc._x + mc.qxSpeed;
}
function elasticY(mc, targt, accel, friction) {
if (mc.qySpeed == undefined) {
mc.qySpeed = 0;
}
mc.qySpeed = mc.qySpeed + ((targt - mc._y) * accel);
mc.qySpeed = mc.qySpeed * friction;
mc._y = mc._y + mc.qySpeed;
}
function elasticH(mc, targt, accel, friction) {
if (mc.qhSpeed == undefined) {
mc.qhSpeed = 0;
}
mc.qhSpeed = mc.qhSpeed + ((targt - mc._height) * accel);
mc.qhSpeed = mc.qhSpeed * friction;
mc._height = mc._height + mc.qhSpeed;
}
function elasticW(mc, targt, accel, friction) {
if (mc.qwSpeed == undefined) {
mc.qwSpeed = 0;
}
mc.qwSpeed = mc.qwSpeed + ((targt - mc._width) * accel);
mc.qwSpeed = mc.qwSpeed * friction;
mc._width = mc._width + mc.qwSpeed;
}
function moveAchs() {
i = 0;
while (i < visibleAchs.length) {
curAch = _root["ach" + visibleAchs[i]];
lesserAch = _root["ach" + visibleAchs[i - 1]];
if (i == 0) {
tempNum = 380;
} else {
tempNum = (380 - (i * 21)) - (21 - lesserAch._height);
}
ease("y", curAch, tempNum, 0.7);
ease("x", curAch, 0, 1);
i++;
}
}
function addAch(num) {
if (gotAch[num] == false) {
achievementsDone++;
selfScroll = false;
gotAch[num] = true;
visibleAchs.push(num);
shel = attachMovie("achievement", "ach" + num, k++);
shel._x = 600;
shel._y = 300 - (i * visibleAchs.length);
shel.num = num;
shel.ach.achName.text = achievements[num][0];
shel.ach.achDesc.text = achievements[num][1];
easePoint = num;
}
}
function achStuff() {
if (achScrolling) {
achList._y = 10 - ((slider.sliderButton._y / slideHeight) * (achList._height - 200));
} else if (!selfScroll) {
ease("y", achList, 10 - (easePoint * 23), 0.7);
slider.sliderButton._y = ((-(achList._y - 10)) * slideHeight) / (achList._height - 200);
}
i = 0;
while (i < 100) {
shel = achList["achBox" + i];
if (gotAch[i]) {
shel.checkBox.gotoAndStop(2);
shel.achDesc.text = achievements[i][1];
} else {
shel.achDesc.text = " ";
}
i++;
}
}
function removeAch(mov) {
r = 0;
while (r < visibleAchs.length) {
if (visibleAchs[r] == mov.num) {
visibleAchs.splice(r, 1);
mov.removeMovieClip();
break;
}
r++;
}
}
var k = 0;
var gotAch = new Array();
i = 0;
while (i < 100) {
gotAch.push(false);
i++;
}
var achievements = new Array();
var deadElephantCounter = 0;
var achievementsDone = 0;
var pitCounter = 0;
var miniSeconds = 0;
var seconds = 0;
var globalSound = new Sound(this);
var muted = false;
achievements.push(["Don't Move a Muscle", "Keep the elephant from moving"]);
achievements.push(["It's a Jump to the Left", "Find a way to move westward"]);
achievements.push(["And it's a step to the Ri-i-ight!", "Strain yourself to move right"]);
achievements.push(["Fight Gravity", "Figure out how to jump upwards"]);
achievements.push(["Elephant Skewers", "Hit a spike strip"]);
achievements.push(["Ascension", "Be lifted into the sky"]);
achievements.push(["Lefty", "Show love to the left wall."]);
achievements.push(["Righty", "Show love to the right wall."]);
achievements.push(["Purple Ceiling", "Hit the top of the hardest level"]);
achievements.push(["Rock Bottom", "Find the bottom of the easiest level"]);
achievements.push(["Speedy Downfall", "Fall from the top to bottom without stopping"]);
achievements.push(["Escape Velocity", "Go from bottom to top without stopping"]);
achievements.push(["Stalactite", "Skewer yourself at high speed on downward facing spikes"]);
achievements.push(["Stalagmite", "Skewer yourself at high speed on upward facing spikes"]);
achievements.push(["Found Point 0", "Uncovered secret point 0"]);
achievements.push(["Found Point 1", "Claimed secret point 1"]);
achievements.push(["Found Point 2", "Excavated secret point 2"]);
achievements.push(["Found Point 3", "Popped open secret point 3"]);
achievements.push(["Found Point 4", "Tripped over secret point 4"]);
achievements.push(["Found Point 5", "Visited secret point 5"]);
achievements.push(["Bloodhound", "Uncovered all points on level"]);
achievements.push(["Floating Corpse", "Get a skeleton stuck in a launcher"]);
achievements.push(["I Can Count to 5!", "Visit each point in order"]);
achievements.push(["We Have Liftoff", "Visit each point in reverse order"]);
achievements.push(["Airwalking", "Stay off the ground for 10 seconds"]);
achievements.push(["Hellbound", "Launch corpse to bottom"]);
achievements.push(["Heavenbound", "Launch corpse to ceiling"]);
achievements.push(["Secret Alcove", "Get surrounded by three sides (1)"]);
achievements.push(["Secret Cave", "Get surrounded by three sides (2)"]);
achievements.push(["Secret Hideout", "Get surrounded by three sides (3)"]);
achievements.push(["Death at 0", "Fire a corpse at Point 0"]);
achievements.push(["1 o'clock murder", "Fire a corpse at Point 1"]);
achievements.push(["Get Off Your Seats", "Jump for 10 seconds nonstop"]);
achievements.push(["Cemetary", "Have 5 live corpses on the screen"]);
achievements.push(["Graveyard", "Have 7 live corpses on the screen"]);
achievements.push(["Half-Century", "Reach 50 elephant deaths"]);
achievements.push(["Century", "Reach 100 elephant deaths"]);
achievements.push(["And One More...", "Hit 101 elephant deaths"]);
achievements.push(["Stayin' Alive", "Stay alive for 15 seconds"]);
achievements.push(["Longevity", "Stay alive for 30 seconds"]);
achievements.push(["Gone in a Flash", "Die in less 0.23 seconds"]);
achievements.push(["Wrecking Ball", "Hit the center spiked platform"]);
achievements.push(["In the Pit", "Land a corpse in the pit"]);
achievements.push(["Pit Hat Trick", "Land 3 corpses in the pit"]);
achievements.push(["10 Pin Pit", "Land 10 corpses in the pit"]);
achievements.push(["Double Play Pit", "Have two corpses in the pit at once"]);
achievements.push(["Triple Play Pit", "Have three corpses in the pit at once"]);
achievements.push(["Horizontal Confusion", "Hold both the left and right keys"]);
achievements.push(["Vertical Confusion", "Hold both the up and down keys"]);
achievements.push(["Total Confusion", "Space bar has no purpose, dummy"]);
achievements.push(["My Favourite Spot", "Find the developer's favourite spot"]);
achievements.push(["10 Seconds", "Play for 10 seconds"]);
achievements.push(["30 Seconds", "Play for 30 seconds"]);
achievements.push(["60 Seconds", "Play for 1 minute"]);
achievements.push(["Pi", "Hit points 3-1-4 in that order"]);
achievements.push(["THIS IS SPARTA", "Hit 3-0-0 in that order"]);
achievements.push(["Meaning of Life", "Hit 4-2 in that order"]);
achievements.push(["(2*125)+3", "Hit 2-5-3 in that order"]);
achievements.push(["3*(30/(15-13))", "Hit 4-5 in that order"]);
achievements.push(["Paint 10", "Touch 10 blocks"]);
achievements.push(["Paint 25", "Touch 25 blocks"]);
achievements.push(["Paint 50", "Touch 50 blocks"]);
achievements.push(["Paint 75", "Touch 75 blocks"]);
achievements.push(["Paint 100", "Touch 100 blocks"]);
achievements.push(["Masterpiece", "Touch every touchable block"]);
achievements.push(["Jet 5", "Hit 5 launchers"]);
achievements.push(["Jet 10", "Hit 10 launchers"]);
achievements.push(["Master Jetter", "Hit every launcher"]);
achievements.push(["3 Spikes", "Hit 3 stationary spikes"]);
achievements.push(["7 Spikes", "Hit 7 stationary spikes"]);
achievements.push(["Spikeful", "Hit all stationary spikes"]);
achievements.push(["Extreme Makeover", "Recolour all areas"]);
achievements.push(["True Blue", "Turn your elephant blue"]);
achievements.push(["Shocking Pink", "Turn your elephant Pink"]);
achievements.push(["Sweet Orange", "Turn your elephant orange"]);
achievements.push(["Stealth Black", "Turn your elephant black"]);
achievements.push(["Cheater", "Ask for a Hint"]);
achievements.push(["Programmers Credit", "Enter jmtb02 into level"]);
achievements.push(["Too Much Contra", "Enter Contra level select code"]);
achievements.push(["No Cheese for You", "Click the level area"]);
achievements.push(["Bandwidth Exploiter", "Preload the game"]);
achievements.push(["You Are El", "Click the Armor Games link"]);
achievements.push(["Menu Explorer", "Find the main menu"]);
achievements.push(["Quality Snob", "Adjust the quality"]);
achievements.push(["Scrolliastic", "Scroll the achievements section"]);
achievements.push(["Play the Game", "Start the game"]);
achievements.push(["Get to Level 1", "Play Level 1"]);
achievements.push(["Not Listening", "Mute the sound"]);
achievements.push(["Clink Clash Clink", "Found the sponsor screen"]);
achievements.push(["Best Player Ever", "Earned an achievement"]);
achievements.push(["10 Percent Done", "Earn 10 achievements"]);
achievements.push(["20 Percent Done", "Earn 20 achievements"]);
achievements.push(["30 Percent Done", "Earn 30 achievements"]);
achievements.push(["40 Percent Done", "Earn 40 achievements"]);
achievements.push(["50 Percent Done", "Earn 50 achievements"]);
achievements.push(["60 Percent Done", "Earn 60 achievements"]);
achievements.push(["70 Percent Done", "Earn 70 achievements"]);
achievements.push(["80 Percent Done", "Earn 80 achievements"]);
achievements.push(["90 Percent Done", "Earn 90 achievements"]);
achievements.push(["Too Much Free Time", "Earn 99 achievements"]);
var visibleAchs = new Array();
var achScrolling = false;
onEnterFrame = function () {
achStuff();
moveAchs();
};
stop();
stop();
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
Instance of Symbol 73 MovieClip in Frame 1
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded / total) * 100);
gotoAndStop(framesLoaded);
status.text = framesLoaded + " % completed";
}
Frame 2
stop();
Frame 3
_root.addAch(82);
stop();
Frame 4
function sniffEnding() {
if (achievementsDone >= 100) {
loadEnding();
}
}
function loadEnding() {
clearScreen.removeMovieClip();
shel = attachMovie("clearScreen", "clearScreen", k++);
shel._x = 20;
shel._y = 20;
cStatus = 0;
}
function colorKeys() {
if (Key.isDown(49)) {
myColor = 1;
addAch(72);
}
if (Key.isDown(50)) {
myColor = 2;
addAch(73);
}
if (Key.isDown(51)) {
myColor = 3;
addAch(74);
}
if (Key.isDown(52)) {
myColor = 4;
addAch(75);
}
}
function myTime() {
miniSeconds++;
if (miniSeconds == 30) {
seconds++;
totalTime = seconds + " Seconds";
miniSeconds = 0;
}
mySeconds = (seconds + ":") + Math.floor((miniSeconds / 30) * 100);
if (seconds >= 10) {
addAch(51);
}
if (seconds >= 30) {
addAch(52);
}
if (seconds >= 60) {
addAch(53);
}
}
function contra() {
if ((contraStage == 0) || (contraStage == 1)) {
if (Key.isDown(38)) {
contraStage++;
}
}
if ((contraStage == 2) || (contraStage == 3)) {
if (Key.isDown(40)) {
contraStage++;
}
}
if ((contraStage == 4) || (contraStage == 6)) {
if (Key.isDown(37)) {
contraStage++;
}
}
if ((contraStage == 5) || (contraStage == 7)) {
if (Key.isDown(39)) {
contraStage++;
}
}
if (contraStage == 8) {
if (Key.isDown(66)) {
contraStage++;
}
}
if (contraStage == 9) {
if (Key.isDown(65)) {
addAch(78);
contraStage++;
}
}
if (jmStage == 0) {
if (Key.isDown(74)) {
jmStage++;
}
}
if (jmStage == 1) {
if (Key.isDown(77)) {
jmStage++;
}
}
if (jmStage == 2) {
if (Key.isDown(84)) {
jmStage++;
}
}
if (jmStage == 3) {
if (Key.isDown(66)) {
jmStage++;
}
}
if (jmStage == 4) {
if (Key.isDown(48)) {
jmStage++;
}
}
if (jmStage == 5) {
if (Key.isDown(50)) {
addAch(77);
jmStage++;
}
}
}
function findPoints() {
i = 0;
while (i < 6) {
if (player.hitTest(_root["point" + i])) {
if (_root["fP" + i] == false) {
_root["fP" + i] = true;
addAch(14 + i);
_root["point" + i].gotoAndStop(2);
} else if (_root["fP" + i] == true) {
_root["point" + i].gotoAndStop(3);
}
if (lastPoints[5] != i) {
lastPoints.push(i);
if (lastPoints.length > 6) {
lastPoints.splice(0, 1);
}
}
} else if (_root["fP" + i] == false) {
_root["point" + i].gotoAndStop(1);
} else if (_root["fP" + i] == true) {
_root["point" + i].gotoAndStop(2);
}
i++;
}
if (((((fP0 && (fP1)) && (fP2)) && (fP3)) && (fP4)) && (fP5)) {
addAch(20);
}
if (player.hitTest(alcove.hitA)) {
addAch(27);
}
if (player.hitTest(alcove2.hitA)) {
addAch(28);
}
if (player.hitTest(alcove3.hitA)) {
addAch(29);
}
if ((((((lastPoints[0] == 0) && (lastPoints[1] == 1)) && (lastPoints[2] == 2)) && (lastPoints[3] == 3)) && (lastPoints[4] == 4)) && (lastPoints[5] == 5)) {
addAch(22);
}
if ((((((lastPoints[5] == 0) && (lastPoints[4] == 1)) && (lastPoints[3] == 2)) && (lastPoints[2] == 3)) && (lastPoints[1] == 4)) && (lastPoints[0] == 5)) {
addAch(23);
}
if (((lastPoints[5] == 4) && (lastPoints[4] == 1)) && (lastPoints[3] == 3)) {
addAch(54);
}
if ((lastPoints[5] == 0) && (lastPoints[4] == 3)) {
addAch(55);
}
if ((lastPoints[5] == 2) && (lastPoints[4] == 4)) {
addAch(56);
}
if (((lastPoints[5] == 3) && (lastPoints[4] == 5)) && (lastPoints[3] == 2)) {
addAch(57);
}
if ((lastPoints[5] == 5) && (lastPoints[4] == 4)) {
addAch(58);
}
}
function launchaphant() {
i = 0;
while (i < launchers.length) {
curLauncher = _root["launcher" + launchers[i]];
if (curLauncher.hitTest(player)) {
player.yVel--;
addAch(5);
pass2(curLauncher);
}
j = 0;
while (j < deadElephants.length) {
curDead = _root["ele" + deadElephants[j]];
if (curLauncher.hitTest(curDead)) {
curDead.yVel--;
addAch(21);
}
if (deadElephants.length == 5) {
addAch(33);
}
if (deadElephants.length == 7) {
addAch(34);
}
j++;
}
i++;
}
}
function checkValues() {
if ((gotAch[64] && (gotAch[67])) && (gotAch[70])) {
addAch(71);
}
if (player.yVel > 19) {
addAch(10);
}
if (player.yVel < -19) {
addAch(11);
}
if (deadElephantCounter >= 50) {
addAch(35);
}
if (deadElephantCounter >= 100) {
addAch(36);
}
if (deadElephantCounter >= 101) {
addAch(37);
}
if (achievementsDone >= 1) {
addAch(89);
}
if (achievementsDone >= 10) {
addAch(90);
}
if (achievementsDone >= 20) {
addAch(91);
}
if (achievementsDone >= 30) {
addAch(92);
}
if (achievementsDone >= 40) {
addAch(93);
}
if (achievementsDone >= 50) {
addAch(94);
}
if (achievementsDone >= 60) {
addAch(95);
}
if (achievementsDone >= 70) {
addAch(96);
}
if (achievementsDone >= 80) {
addAch(97);
}
if (achievementsDone >= 90) {
addAch(98);
}
if (achievementsDone >= 99) {
addAch(99);
}
if (lifeCounter > 900) {
addAch(39);
}
if (lifeCounter > 450) {
addAch(38);
}
}
function addSpikes(mov) {
spikeCounter++;
spikes.push(spikeCounter);
mov._name = "spike" + spikeCounter;
mov.touched = false;
}
function watchSpikes() {
i = 0;
while (i < spikes.length) {
curSpike = _root["spike" + spikes[i]];
if (curSpike.hitTest(player)) {
addAch(4);
pass3(curSpike);
if (player.yVel < -16) {
addAch(12);
}
if (player.yVel > 18) {
addAch(13);
}
if (curSpike.type == 2) {
addAch(41);
}
addDeadElephant();
break;
}
i++;
}
}
function addDeadElephant() {
deadElephantCounter++;
deadElephants.push(deadElephantCounter);
shel = attachMovie("deadElephant", "ele" + deadElephantCounter, k++);
if (lifeCounter < 7) {
addAch(40);
}
lifeCounter = 0;
shel.pitBound = false;
shel._x = elephant._x;
shel._y = elephant._y;
shel.xVel = player.xVel;
shel.yVel = player.yVel;
shel.xMax = 100;
shel.yMax = 100;
shel.counter = 100;
player.xVel = 0;
player.yVel = 0;
player._x = home._x;
player._y = home._y;
home.gotoAndPlay(2);
}
function deadElephantDealings() {
inPit = 0;
i = 0;
while (i < deadElephants.length) {
curDead = _root["ele" + deadElephants[i]];
normalVertical(curDead);
bounding(curDead);
curDead.counter--;
if (curDead.counter < 10) {
curDead._alpha = curDead.counter * 10;
}
if (curDead.hitTest(point0)) {
addAch(30);
}
if (curDead.hitTest(point1)) {
addAch(31);
}
if (curDead.hitTest(pit)) {
inPit++;
if (!curDead.pitBound) {
pitCounter++;
curDead.pitBound = true;
}
if (pitCounter == 1) {
addAch(42);
}
if (pitCounter == 3) {
addAch(43);
}
if (pitCounter == 10) {
addAch(44);
}
}
if (curDead.counter == 0) {
deadElephants.splice(i, 1);
curDead.removeMovieClip();
}
i++;
}
if (inPit == 2) {
addAch(45);
}
if (inPit == 3) {
addAch(46);
}
}
function normalVertical(mc) {
mc.yVel = mc.yVel + yGrav;
if (mc.yLove == 1) {
if (!holdUp) {
mc.yVel++;
}
if (mc.yVel >= 0) {
mc.yLove = 2;
mc.yVel = 0;
}
}
if ((mc.yLove == 2) || (mc.yLove == 3)) {
if (mc.yVel > 0) {
mc.yLove = 3;
}
}
if (((mc.yLove == 3) && (mc.yVel == 0)) && (!holdUp)) {
mc.yLove = 0;
holdCounter = 0;
}
if ((mc.yLove == 0) && (mc.yVel > 1.5)) {
mc.yLove = 3;
}
if (mc.yLove == 0) {
playerJump = false;
}
}
function skinning() {
elephant._x = Math.floor(player._x);
elephant._y = Math.floor(player._y);
if (Key.isDown(37)) {
elephant.gotoAndStop(2);
elephant._xscale = 100;
addAch(1);
} else if (Key.isDown(39)) {
elephant.gotoAndStop(2);
elephant._xscale = -100;
addAch(2);
} else {
elephant.gotoAndStop(1);
if (!Key.isDown(38)) {
addAch(0);
}
}
if (Key.isDown(37) && (Key.isDown(39))) {
addAch(47);
}
if (Key.isDown(38) && (Key.isDown(40))) {
addAch(48);
}
if (Key.isDown(32)) {
addAch(49);
}
if (player.hitTest(spot)) {
addAch(50);
}
}
function movePlayer() {
if (Key.isDown(37)) {
player.xVel = -7;
} else if (Key.isDown(39)) {
player.xVel = 7;
} else {
player.xVel = 0;
}
if (Key.isDown(38)) {
addAch(3);
jumpCounter++;
if (jumpCounter > 300) {
addAch(32);
}
holdUp = true;
if ((player.yLove == 0) && (jumpLevel)) {
playerJump = true;
jumpLevel = false;
player.yVel = hops;
player.yLove = 1;
bounceSound.start(0, 1);
}
} else {
holdUp = false;
jumpCounter = 0;
}
}
function addLauncher(mov) {
launcherCounter++;
mov._name = "launcher" + launcherCounter;
mov.touched = false;
launchers.push(launcherCounter);
}
function naming(mov) {
mov._x = Math.round(mov._x);
mov._y = Math.round(mov._y);
mov.posX = Math.floor(mov._x / _root.tileSize);
mov.posY = Math.floor(mov._y / _root.tileSize);
mov.touched = false;
if (!(mov.type === 1)) {
} else {
mov._name = (("tile" + mov.posX) + "x") + mov.posY;
}
}
function bounding(mc) {
tt = 0;
while (tt < spikes.length) {
curSpike = _root["spike" + spikes[tt]];
if (curSpike.hitTest(mc)) {
pass3(curSpike);
}
tt++;
}
if ((mc.xVel * 0) != 0) {
mc.xVel = 0;
}
if ((mc.yVel * 0) != 0) {
mc.yVel = 0;
}
curLevelNum = Math.floor(mc._y / 900) + 1;
tempCurLevel = _root;
if (mc.yVel < 0) {
if (checkCoords(mc, mc._x, mc._y + mc.yVel, 0, tempCurLevel)) {
mc._y = mc._y + mc.yVel;
} else {
mc.xVel = mc.xVel * xF;
mc.yVel = mc.yVel * bounce;
mc.rotSpeed = mc.rotSpeed * -1;
mc._y = ((mc.tr._y + tileSize) + mc._height) + ((curLevelNum - 1) * 900);
if (((mc.yVel < thudTresh) && (mc.yVel > (-thudTresh))) && ((xGrav != 0) || (yGrav != 0))) {
mc.yVel = 0;
}
}
} else if (mc.yVel > 0) {
if (checkCoords(mc, mc._x, mc._y + mc.yVel, 1, tempCurLevel)) {
mc._y = mc._y + mc.yVel;
} else {
if ((mc._name == "player") && (mc.yVel > bounceTolerance)) {
bounceSound.start(0, 1);
} else if (mc.yVel > bounceTolerance) {
bulletDropSound.start(0, 1);
}
mc.xVel = mc.xVel * xF;
mc.yVel = mc.yVel * bounce;
jumping = false;
mc._y = mc.br._y + ((curLevelNum - 1) * 900);
if (((mc.yVel < thudTresh) && (mc.yVel > (-thudTresh))) && ((xGrav != 0) || (yGrav != 0))) {
mc.yVel = 0;
}
if (Math.abs(mc.yVel) > 6) {
mc.rotSpeed = mc.rotSpeed * (random(8) - 4);
} else {
mc.rotSpeed = mc.rotSpeed * 0.5;
}
}
}
if (mc.xVel < 0) {
if (checkCoords(mc, mc._x + mc.xVel, mc._y, 3, tempCurLevel)) {
mc._x = mc._x + mc.xVel;
} else {
mc.yVel = mc.yVel * yF;
mc.xVel = mc.xVel * bounce;
if ((mc._name == "player") && (mc.xVel < bounceTolerance)) {
bounceSound.start(0, 1);
}
mc._x = (mc.bl._x + (mc._width / 2)) + tileSize;
if (((mc.xVel < thudTresh) && (mc.xVel > (-thudTresh))) && ((xGrav != 0) || (yGrav != 0))) {
mc.xVel = 0;
}
}
} else if (mc.xVel > 0) {
if (checkCoords(mc, mc._x + mc.xVel, mc._y, 2, tempCurLevel)) {
mc._x = mc._x + mc.xVel;
} else {
mc.yVel = mc.yVel * yF;
mc.xVel = mc.xVel * bounce;
if ((mc._name == "player") && (mc.xVel > bounceTolerance)) {
bounceSound.start(0, 1);
}
mc._x = mc.br._x - (mc._width / 2);
if (((mc.xVel < thudTresh) && (mc.xVel > (-thudTresh))) && ((xGrav != 0) || (yGrav != 0))) {
mc.xVel = 0;
}
}
}
if (mc.xVel > mc.xMax) {
mc.xVel = mc.xMax;
}
if (mc.xVel < (-mc.xMax)) {
mc.xVel = -mc.xMax;
}
if (mc.yVel > mc.yMax) {
mc.yVel = mc.yMax;
}
if (mc.yVel < (-mc.yMax)) {
mc.yVel = -mc.yMax;
}
}
function checkCoords(mc, x, y, direction, holder) {
mc.ctlx = (x - (mc._width / 2)) + 1;
mc.ctly = (y - mc._height) + 1;
mc.ctrx = (x + (mc._width / 2)) - 1;
mc.ctry = (y - mc._height) + 1;
mc.cbrx = (x + (mc._width / 2)) - 1;
mc.cbry = (y + (mc._height * 0)) - 1;
mc.cblx = (x - (mc._width / 2)) + 1;
mc.cbly = (y + (mc._height * 0)) - 1;
mc.clmx = (x - (mc._width / 2)) + 1;
mc.clmy = (y - (mc._height / 2)) + 1;
mc.ctmx = x + 1;
mc.ctmy = (y - mc._height) + 1;
mc.crmx = (x + (mc._width / 2)) - 1;
mc.crmy = (y - (mc._height / 2)) + 1;
mc.cbmx = x + 1;
mc.cbmy = (y + (mc._height * 0)) - 1;
mc.cbmx = x + 1;
mc.cmx = x + 1;
mc.cmy = (y - (mc._height / 2)) + 1;
mc.tl = holder[(("tile" + Math.floor(mc.ctlx / tileSize)) + "x") + Math.floor(mc.ctly / tileSize)];
mc.tr = holder[(("tile" + Math.floor(mc.ctrx / tileSize)) + "x") + Math.floor(mc.ctry / tileSize)];
mc.br = holder[(("tile" + Math.floor(mc.cbrx / tileSize)) + "x") + Math.floor(mc.cbry / tileSize)];
mc.bl = holder[(("tile" + Math.floor(mc.cblx / tileSize)) + "x") + Math.floor(mc.cbly / tileSize)];
mc.tm = holder[(("tile" + Math.floor(mc.ctmx / tileSize)) + "x") + Math.floor(mc.ctmy / tileSize)];
mc.lm = holder[(("tile" + Math.floor(mc.clmx / tileSize)) + "x") + Math.floor(mc.clmy / tileSize)];
mc.bm = holder[(("tile" + Math.floor(mc.cbmx / tileSize)) + "x") + Math.floor(mc.cbmy / tileSize)];
mc.rm = holder[(("tile" + Math.floor(mc.crmx / tileSize)) + "x") + Math.floor(mc.crmy / tileSize)];
mc.mb = holder[(("tile" + Math.floor(mc.cbmx / tileSize)) + "x") + Math.floor(mc.cbly / tileSize)];
if ((mc.ctlx == 21) && (mc == player)) {
addAch(6);
}
if ((mc.ctrx == 519) && (mc == player)) {
addAch(7);
}
if ((mc.ctly < 22) && (mc == player)) {
addAch(8);
} else if ((mc.ctly < 22) && (mc != player)) {
addAch(26);
}
if ((mc.ctly > 366) && (mc == player)) {
addAch(9);
} else if ((mc.ctly > 366) && (mc != player)) {
addAch(25);
}
if (mc.tl.type == 1) {
guyTL = true;
foundWhat = mc.tl;
pass(mc.tl);
} else {
guyTL = false;
}
if (mc.tr.type == 1) {
guyTR = true;
foundWhat = mc.tr;
pass(mc.tr);
} else {
guyTR = false;
}
if (mc.br.type == 1) {
guyBR = true;
foundWhat = mc.br;
pass(mc.br);
} else if ((mc.br.type == 2) && (mc.yVel > 0)) {
guyBR = true;
foundWhat = mc.br;
} else {
guyBR = false;
}
if (mc.bl.type == 1) {
guyBL = true;
foundWhat = mc.bl;
pass(mc.bl);
} else if ((mc.bl.type == 2) && (mc.yVel > 0)) {
guyBL = true;
foundWhat = mc.bl;
} else {
guyBL = false;
}
if (mc.tm.type == 1) {
guyTM = true;
foundWhat = mc.tm;
pass(mc.tm);
} else {
guyTM = false;
}
if (mc.bm.type == 1) {
guyBM = true;
foundWhat = mc.bm;
pass(mc.bm);
} else {
guyBM = false;
}
if (mc.lm.type == 1) {
guyLM = true;
foundWhat = mc.lm;
pass(mc.lm);
} else {
guyLM = false;
}
if (mc.rm.type == 1) {
guyRM = true;
foundWhat = mc.rm;
pass(mc.rm);
} else {
guyRM = false;
}
if ((((player == mc) && (guyBM)) || (guyBL)) || (guyBR)) {
mc.yLove = 0;
holdCounter = 0;
}
if ((player == mc) && ((guyBM && (guyBL)) || (guyBM && (guyBR)))) {
jumpLevel = true;
}
if ((guyBL || (guyBR)) || (guyBM && (mc == player))) {
} else {
airCounter++;
if (airCounter >= 300) {
addAch(24);
}
}
switch (direction) {
case 0 :
if (guyTL || (guyTR)) {
return(false);
}
case 1 :
if (guyBR || (guyBL)) {
return(false);
}
case 2 :
if (guyTR || (guyBR)) {
return(false);
}
case 3 :
if (!(guyTL || (guyBL))) {
break;
}
return(false);
}
return(true);
}
function pass(re) {
if (re.touched == false) {
re.touched = true;
touchedCounter++;
if (touchedCounter >= 10) {
addAch(59);
}
if (touchedCounter >= 25) {
addAch(60);
}
if (touchedCounter >= 50) {
addAch(61);
}
if (touchedCounter >= 75) {
addAch(62);
}
if (touchedCounter >= 100) {
addAch(63);
}
if (touchedCounter >= 132) {
addAch(64);
}
re.gotoAndStop(2);
}
}
function pass2(re) {
if (re.touched == false) {
re.touched = true;
touched2Counter++;
if (touched2Counter >= 5) {
addAch(65);
}
if (touched2Counter >= 10) {
addAch(66);
}
if (touched2Counter >= 15) {
addAch(67);
}
re.gotoAndStop(2);
}
}
function pass3(re) {
if ((re.touched == false) && (re.type != 2)) {
re.touched = true;
touched3Counter++;
if (touched3Counter >= 3) {
addAch(68);
}
if (touched3Counter >= 7) {
addAch(69);
}
if (touched3Counter >= 11) {
addAch(70);
}
re.gotoAndStop(2);
}
}
stop();
var yGrav = 0.6;
var xGrav = 0;
player.xVel = 0;
var tileSize = 20;
var bounceSound = new Sound(this);
bounceSound.attachSound("jumpSound");
var bounce = -0.3;
var thudTresh = 2;
var xF = 0.5;
var yF = 1;
var hops = -10;
var cStatus = 1;
var launchers = new Array();
var launcherCounter = 0;
var spikeCounter = 0;
var spikes = new Array();
var deadElephants = new Array();
var easePoint = 0;
var airCounter = 0;
var jumpCounter = 0;
var touchedCounter = 0;
var touched2Counter = 0;
var touched3Counter = 0;
var myColor = 1;
i = 0;
while (i < 6) {
_root["fP" + i] = false;
i++;
}
var lifeCounter = 0;
onEnterFrame = function () {
if (cStatus == 1) {
movePlayer();
normalVertical(player);
bounding(player);
skinning();
launchaphant();
watchSpikes();
deadElephantDealings();
checkValues();
findPoints();
contra();
myTime();
colorKeys();
sniffEnding();
lifeCounter++;
completed = Math.floor((achievementsDone / 100) * 100) + "% Completed";
}
moveAchs();
achStuff();
};
onMouseDown = function () {
if (_xmouse < 500) {
addAch(79);
}
if (slider.sliderButton.hitTest(_xmouse, _ymouse)) {
addAch(84);
slider.sliderButton.startDrag(true, slider.sliderButton._x, 0, slider.sliderButton._x, slideHeight);
achScrolling = true;
selfScroll = true;
} else {
achScrolling = false;
}
};
var selfScroll = false;
var slideHeight = (slider._height - slider.sliderButton._height);
onMouseUp = function () {
slider.sliderButton.stopDrag();
achScrolling = false;
};
var lastPoints = new Array(8, 8, 8, 8, 8, 8);
var contraStage = 0;
var jmStage = 0;
var totalTime;
var mySeconds;
player.yVel = 0;
player.xVel = 0;
player.xMax = 30;
player.yMax = 20;
player._visible = false;
player.yLove = 0;
holdUp = false;
playerJump = false;
jumpLevel = false;
i = 0;
while (i < 100) {
shel = achList.attachMovie("achievementBox", "achBox" + i, _root.k++);
shel._x = 0;
shel._y = 24 * i;
if (i < 10) {
shel.num.text = "00" + i;
} else if (i < 100) {
shel.num.text = "0" + i;
} else if (i >= 100) {
shel.num.text = i;
}
shel.achName.text = achievements[i][0];
if (gotAch[i]) {
shel.checkBox.gotoAndStop(2);
shel.achDesc.text = achievements[i][1];
} else {
shel.achDesc.text = " ";
}
i++;
}
addAch(85);
addAch(86);
Symbol 5 MovieClip Frame 20
stop();
Symbol 6 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 1
function changeColor() {
if (_root.myColor == 1) {
gotoAndStop (1);
}
if (_root.myColor == 2) {
gotoAndStop (2);
}
if (_root.myColor == 3) {
gotoAndStop (3);
}
if (_root.myColor == 4) {
gotoAndStop (4);
}
}
changeColor();
onEnterFrame = function () {
changeColor();
};
Symbol 31 MovieClip [achievement] Frame 100
_root.removeAch(this);
Symbol 42 Button
on (release) {
getURL ("http://armorgames.com/", "_blank");
}
Symbol 45 Button
on (release) {
stopAllSounds();
_root.onEnterFrame = null;
_root.gotoAndStop(1);
_parent._parent.removeMovieClip();
}
Symbol 55 Button
on (release) {
getURL ("http://armorgames.com/", "_blank");
}
Symbol 58 MovieClip [clearScreen] Frame 75
stop();
Symbol 72 Button
on (release) {
_root.play();
}
Symbol 73 MovieClip Frame 100
stop();
_root.addAch(80);
Symbol 82 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 84 MovieClip Frame 91
_root.addAch(88);
Symbol 84 MovieClip Frame 217
_root.play();
Symbol 88 Button
on (release) {
stopAllSounds();
gotoAndStop ("game");
}
Symbol 91 Button
on (release) {
addAch(81);
getURL ("http://armorgames.com/", "_blank");
}
Symbol 103 MovieClip Frame 1
type = 1;
_root.naming(this);
stop();
Symbol 106 MovieClip Frame 1
_root.addSpikes(this);
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 1
_root.addLauncher(this);
stop();
Symbol 118 MovieClip Frame 2
stop();
Symbol 124 MovieClip Frame 1
_root.addSpikes(this);
type = 2;
Symbol 129 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 1
this._visible = false;
Symbol 152 Button
on (release) {
addAch(81);
getURL ("http://armorgames.com/", "_blank");
}
Symbol 156 Button
on (release) {
addAch(83);
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else if (_quality == "LOW") {
_quality = "HIGH";
}
}
Symbol 164 Button
on (release) {
addAch(87);
if (!muted) {
globalSound.setVolume(0);
muted = true;
} else {
globalSound.setVolume(100);
muted = false;
}
}
Symbol 167 Button
on (release) {
addAch(81);
addAch(76);
getURL ("http://armorgames.com/page/Achievement-Guide", "_blank");
}