Frame 1
function saveGame() {
savefile.data.tl1 = tl1;
savefile.data.tl2 = tl2;
savefile.data.tl3 = tl3;
savefile.data.tl4 = tl4;
savefile.data.tl5 = tl5;
savefile.data.tl6 = tl6;
savefile.data.tl7 = tl7;
savefile.data.tl8 = tl8;
savefile.data.tl9 = tl9;
savefile.data.tl0 = tl0;
savefile.data.tl1 = tl1;
savefile.data.myHat = myHat;
savefile.data.myShoes = myShoes;
savefile.data.myGlasses = myGlasses;
savefile.data.myPants = myPants;
savefile.data.myCoat = myCoat;
savefile.data.achC1 = achC1;
savefile.data.achC2 = achC2;
savefile.data.achC3 = achC3;
savefile.data.achC4 = achC4;
savefile.data.achC5 = achC5;
savefile.data.achC6 = achC6;
savefile.data.level = level;
savefile.data.levelCap = levelCap;
savefile.data.completedLevels = completedLevels;
savefile.data.masteredLevels = masteredLevels;
savefile.flush();
trace("GAME IS SAVED");
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
onEnterFrame = function () {
Mouse.hide();
};
cursor.startDrag(true);
var globalVolume = new Sound();
stop();
_root.anyAchievements = false;
var savefile = SharedObject.getLocal("mrw");
if (savefile.data.tl1 == undefined) {
trace("NEW GAME");
var tl1 = 99999999;
var tl2 = 99999999;
var tl3 = 99999999;
var tl4 = 99999999;
var tl5 = 99999999;
var tl6 = 99999999;
var tl7 = 99999999;
var tl8 = 99999999;
var tl9 = 99999999;
var tl10 = 99999999;
var tl11 = 99999999;
var myHat = 1;
var myShoes = 1;
var myGlasses = 1;
var myPants = 1;
var myCoat = 1;
var level = 1;
var levelCap = 1;
var achC1 = false;
var achC2 = false;
var achC3 = false;
var achC4 = false;
var achC5 = false;
var achC6 = false;
var completedLevels = new Array();
var masteredLevels = new Array();
} else {
trace("LOAD GAME");
var tl1 = savefile.data.tl1;
var tl2 = savefile.data.tl2;
var tl3 = savefile.data.tl3;
var tl4 = savefile.data.tl4;
var tl5 = savefile.data.tl5;
var tl6 = savefile.data.tl6;
var tl7 = savefile.data.tl7;
var tl8 = savefile.data.tl8;
var tl9 = savefile.data.tl9;
var tl10 = savefile.data.tl0;
var tl11 = savefile.data.tl1;
var myHat = savefile.data.myHat;
var myShoes = savefile.data.myShoes;
var myGlasses = savefile.data.myGlasses;
var myPants = savefile.data.myPants;
var myCoat = savefile.data.myCoat;
var achC1 = savefile.data.achC1;
var achC2 = savefile.data.achC2;
var achC3 = savefile.data.achC3;
var achC4 = savefile.data.achC4;
var achC5 = savefile.data.achC5;
var achC6 = savefile.data.achC6;
var level = savefile.data.level;
var levelCap = savefile.data.levelCap;
var completedLevels = savefile.data.completedLevels;
var masteredLevels = savefile.data.masteredLevels;
}
trace(savefile.data.completedLevels);
Instance of Symbol 82 MovieClip in Frame 1
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded / total) * 100);
gotoAndStop(framesLoaded);
}
Frame 2
stop();
onEnterFrame = function () {
Mouse.hide();
};
Frame 3
stop();
Frame 4
function achievements(ww) {
if (!ww) {
if (((!swinging) && (Math.abs(speedDisp) >= 88)) && (achC1 == false)) {
achC1 = true;
callAch();
}
if (((!swinging) && (Key.isDown(53))) && (achC6 == false)) {
achC6 = true;
callAch();
}
} else {
if ((masteredLevels.length == 10) && (achC2 == false)) {
achC2 = true;
callAch();
}
if ((carrots == 0) && (achC3 == false)) {
achC3 = true;
callAch();
}
if ((level == 10) && (achC4 == false)) {
achC4 = true;
callAch();
}
if ((level == 11) && (achC5 == false)) {
achC5 = true;
callAch();
}
}
}
function callAch() {
anyAchievements = true;
_root.attachMovie("achievementUnl", "UA" + k, k++);
trace("ACHIEVEMEND");
saveGame();
}
function myTimer() {
tCounter++;
if (tCounter == 36) {
tCounter = 0;
tSeconds++;
}
}
function checkPause() {
if ((Key.isDown(80) && (!gameIsPaused)) && (!pDown)) {
gameIsPaused = true;
pDown = true;
trace("Pause");
}
if (Key.isDown(80)) {
pDown = true;
} else {
pDown = false;
}
}
function onFire() {
if (Math.abs(speedDisp) > 50) {
myDif = Math.abs(oFPrevX - player._x);
trace(myDif);
i = 0;
while (i < (myDif / 10)) {
shel = createEmptyMovieClip("f" + k, k++);
if (xTravel > 0) {
shel._x = player._x + ((myDif / 10) * i);
} else {
shel._x = player._x - ((myDif / 10) * i);
}
shel._y = player._y - 20;
shel.ca = 0;
shel.counter = 0;
shel.onEnterFrame = function () {
if (!terrain.hitTest(shel._x, shel._y, true)) {
this._y = this._y + 4;
}
this.counter++;
this.fae = this.attachMovie("fireUp", "f" + k, k++);
this.fae._x = random(20) - 10;
this.fae._y = random(5);
if (this.counter > 25) {
this._alpha = 100 - (this.counter * 4);
}
if (this.counter == 50) {
}
};
i++;
}
}
oFPrevX = player._x;
}
function functionPause() {
bar.pauser.gotoAndStop(2);
bar._x = cam._x;
bar._y = cam._y;
if (Key.isDown(69)) {
execNewLevel(true);
}
if (Key.isDown(80) && (!pDown)) {
gameIsPaused = false;
pDown = true;
bar._visible = true;
bar.pauser.gotoAndStop(1);
trace("unPause");
}
if (Key.isDown(80)) {
pDown = true;
} else {
pDown = false;
}
}
function eyes() {
if (player._xscale > 0) {
player.player.spinEyes._rotation = 90 + rot(player._x, player._y, cursor._x, cursor._y);
if (player.player.spinEyes._rotation > 50) {
player.player.spinEyes._rotation = 50;
}
if (player.player.spinEyes._rotation < -25) {
player.player.spinEyes._rotation = -25;
}
}
if (player._xscale < 0) {
player.player.spinEyes._rotation = 90 - rot(player._x, player._y, cursor._x, cursor._y);
if (player.player.spinEyes._rotation > 50) {
player.player.spinEyes._rotation = 50;
}
if (player.player.spinEyes._rotation < -35) {
player.player.spinEyes._rotation = -35;
}
}
}
function killSwitch() {
for (i in _root) {
if (typeof(_root[i]) == "movieclip") {
_root[i].removeMovieClip();
}
}
trace("KILL SWITCH");
}
function execNewLevel(taf) {
if (taf) {
_root._x = 0;
_root._y = 0;
_root._xscale = 0;
_root._yscale = 0;
killSwitch();
stopAllSounds();
if (level != 10) {
_root.gotoAndStop("menu");
}
if (gameIsPaused) {
_root.gotoAndStop("menu");
onEnterFrame = null;
} else {
foundLevel = false;
i = 0;
while (i < completedLevels.length) {
if (completedLevels[i] == level) {
foundLevel = true;
}
i++;
}
if (!foundLevel) {
if (level != 11) {
levelCap++;
}
completedLevels.push(level);
trace(("Level " + level) + " added to completed levels");
trace(completedLevels);
}
masted = false;
if (carrots == carrotsGoal) {
i = 0;
while (i < masteredLevels.length) {
if (masteredLevels[i] == level) {
masted = true;
}
i++;
}
if (!masted) {
masteredLevels.push(level);
trace(("Level " + level) + " added to mastered levels");
trace(masteredLevels);
}
}
if (tSeconds < _root["tl" + level]) {
_root["tl" + level] = tSeconds;
}
if (level == 10) {
gotoAndStop ("win");
}
achievements(true);
saveGame();
onEnterFrame = null;
}
} else {
i = 0;
while (i < (carrotCount + 1)) {
_root["carrot" + i].removeMovieClip();
i++;
}
carrotCount = 0;
carrots = 0;
keys = 0;
ene1List = 0;
if (level == 10) {
stopAllSounds();
}
gotoAndStop("l" + level);
levelDisp = "level " + level;
trace("LOADING LEVEL " + level);
trace(_currentframe);
friends = 0;
hitA._x = elevatorStart._x;
hitA._y = elevatorStart._y;
player._x = elevatorStart._x;
player._y = elevatorStart._y;
cam._x = hitA._x;
cam._y = hitA._y;
blackFade._x = player._x;
blackFade._y = player._y;
mocking = true;
elevator.gotoAndStop(1);
elevatorStart.gotoAndPlay(1);
elevatorStart.cc.gotoAndPlay(1);
loadGoals(level);
xTravel = 0;
yMov = 0;
toolBar();
}
}
function loadPlayer() {
hitA._x = elevatorStart._x;
hitA._y = elevatorStart._y;
player._x = elevatorStart._x;
player._y = elevatorStart._y - 50;
player._visible = true;
cStatus = true;
running = true;
mocking = false;
}
function eneStuff(mov) {
if (hole.hitA.hitTest(mov.cor) && (mov.detached == false)) {
var _local3 = new Sound(this);
_local3.attachSound("goalIn");
_local3.start(0, 1);
mov.detached = true;
friends++;
bar.friendsThing.friendsShine.gotoAndPlay(2);
mov.clear();
mov.tiger.removeMovieClip();
trace("char");
}
if (!mov.detached) {
if (mov._x < leftLimit) {
mov._x = leftLimit;
mov.xTravel = mov.xTravel * -1;
mov.xTravel = Math.floor(mov.xTravel * 0.5);
} else if (mov._x > rightLimit) {
mov._x = rightLimit;
mov.xTravel = mov.xTravel * -1;
mov.xTravel = Math.floor(mov.xTravel * 0.5);
} else {
mov._x = mov._x + mov.xTravel;
}
if (mov.hitTest(player) && (!mov.attachTo)) {
mov.attachTo = true;
mov.attachX = mov._x - player._x;
mov.attachY = mov._y - player._y;
mov.gotoAndStop("smbounce");
}
if (!swinging) {
if (terrain.hitTest(mov._x, mov._y, true)) {
while (terrain.hitTest(mov._x, mov._y, true)) {
mov._y = mov._y - 0.5;
}
mov.yMov = 0;
mov._y = mov._y - 0.5;
} else {
mov.yMov = mov.yMov + mov.yTravel;
}
mov._y = mov._y + Math.floor(mov.yMov);
}
mov.chap = dist(player._x, player._y, mov._x, mov._y);
if (mov.timeOut) {
mov.timeOutCounter++;
trace(mov.timeOutCounter);
if (mov.timeOutCounter == 30) {
mov.timeOut = false;
mov.timeOutCounter = 0;
}
} else if (mov.attachTo) {
mov._x = this.attachX + player._x;
mov._y = this.attachY + player._y;
mov.clear();
mov.emotion = "happy";
mov.coreX = mov.cor._x + mov.cor.cor2._x;
mov.coreY = mov.cor._y + mov.cor.cor2._y;
mov.tiger.removeMovieClip();
mov.createEmptyMovieClip("tiger", k++);
mov.tiger.lineStyle(Math.abs(5 - (mov.chap / 50)), 0, 30);
if (mov.chap > 350) {
mov.tiger.lineStyle(Math.abs(5 - (mov.chap / 50)), 16711680, 100);
}
mov.tiger.moveTo(player._x - mov._x, (-20 + player._y) - mov._y);
mov.tiger.lineTo(mov.coreX, mov.coreY);
if (swinging) {
mov.xTravel = 0;
mov.yMov = 0;
mov.clear();
easing("x", mov, player._x + mov.ttX, 0.9);
easing("y", mov, player._y + mov.ttY, 0.9);
mov.tiger.removeMovieClip();
mov.createEmptyMovieClip("tiger", k++);
mov.tiger.lineStyle(Math.abs(5 - (mov.chap / 50)), 0, 30);
mov.tiger.moveTo(player._x - mov._x, (-20 + player._y) - mov._y);
mov.tiger.lineTo(mov.coreX, mov.coreY);
}
if (mov._x < player._x) {
mov.xTravel = mov.xTravel + mov.prime;
} else {
mov.xTravel = mov.xTravel - mov.prime;
}
if (mov.xTravel > 0) {
mov.xTravel = mov.xTravel - (mov.prime / 2);
} else {
mov.xTravel = mov.xTravel + (mov.prime / 2);
}
if (mov._x > player._x) {
xTravel = xTravel + 2;
} else {
xTravel = xTravel - 2;
}
if ((mov._y > player._y) && (swinging)) {
shak.ender._y = shak.ender._y + 0.2;
} else if ((mov._y < player._y) && (swinging)) {
shak.ender._y = shak.ender._y - 0.2;
}
}
if (dist(player._x, player._y, mov._x, mov._y) > 500) {
mov.attachTo = false;
mov.clear();
mov.emotion = "sad";
mov.tiger.removeMovieClip();
}
} else {
mov.yMov = mov.yMov + mov.yTravel;
mov._y = mov._y + Math.floor(mov.yMov);
mov._x = mov._x + mov.xTravel;
if (hole.bWalls.hitTest(mov._x, mov._y, true) && (mov.xTravel != 0)) {
mov.wCounter = 0;
if (mov.xTravel > 0) {
while (hole.bWalls.hitTest(mov._x, mov._y, true)) {
mov._x = mov._x - 1;
mov.wCounter++;
if (mov.wCounter > 200) {
mov.wCounter = 0;
while (hole.bWalls.hitTest(mov._x, mov._y, true)) {
mov._x = mov._x + 1;
}
break;
}
}
mov.xTravel = mov.xTravel * -1;
mov.xTravel = Math.floor(mov.xTravel * 0.5);
} else if (mov.xTravel < 0) {
while (hole.bWalls.hitTest(mov._x, mov._y, true)) {
mov._x = mov._x + 1;
mov.wCounter++;
if (mov.wCounter > 200) {
mov.wCounter = 0;
while (hole.bWalls.hitTest(mov._x, mov._y, true)) {
mov._x = mov._x - 1;
}
break;
}
}
mov.xTravel = mov.xTravel * -1;
mov.xTravel = Math.floor(mov.xTravel * 0.5);
}
}
if (hole.hitA2.hitTest(mov)) {
trace(mov._name);
trace(mov.getDepth());
trace(mov._name);
trace(mov);
mov._visible = false;
}
}
}
function keyHits() {
if (((Key.isDown(53) && (!spaceDown)) && (!holdMouse)) && (!swinging)) {
spaceDown = true;
changeKeys.removeMovieClip();
fatt = bar.attachMovie("changeKeys", "changeKeys", k++);
trace("load");
fatt._x = 0;
fatt._y = 0;
if (mouseFocus == "swinging") {
mouseFocus = "laser";
fatt.myFocus.gotoAndStop(2);
} else {
mouseFocus = "swinging";
fatt.myFocus.gotoAndStop(1);
}
} else if ((!Key.isDown(53)) && (spaceDown)) {
spaceDown = false;
}
}
function goal() {
switch (level) {
case 1 :
break;
case 2 :
break;
case 3 :
if ((carrots >= 20) && (!objD0)) {
objD0 = true;
bar.goals.c0.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
break;
case 4 :
if ((carrots >= 25) && (!objD0)) {
objD0 = true;
bar.goals.c0.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
break;
case 5 :
if ((friends >= 5) && (!objD0)) {
objD0 = true;
bar.goals.c0.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
break;
case 6 :
if ((friends >= 10) && (!objD0)) {
objD0 = true;
bar.goals.c0.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
break;
case 7 :
break;
case 8 :
if ((friends >= 6) && (!objD0)) {
objD0 = true;
bar.goals.c0.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
break;
case 9 :
if ((keys >= 5) && (!objD0)) {
objD0 = true;
bar.goals.c0.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
if ((carrots >= 40) && (!objD1)) {
objD1 = true;
bar.goals.c1.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
if ((friends >= 8) && (!objD2)) {
objD2 = true;
bar.goals.c2.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
break;
case 10 :
if ((friends >= 10) && (!objD0)) {
execNewLevel(true);
}
break;
case 11 :
if (!((carrots >= 500) && (!objD0))) {
break;
}
objD0 = true;
bar.goals.c0.play();
tasksCompleted++;
trace(tasksNeeded);
trace(tasksCompleted);
}
if (tasksCompleted >= tasksNeeded) {
if (player.hitTest(elevator.hitA)) {
elevator.play();
player._visible = false;
running = false;
cStatus = false;
}
}
}
function loadGoals(num) {
if (num == 1) {
obj0 = "Get to the elevator";
obj1 = "";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 10;
friendsGoal = 0;
bar.goals.c0._visible = true;
bar.goals.c1._visible = false;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 0;
bar.friendsThing._visible = false;
bar.keysThing._visible = false;
} else if (num == 2) {
obj0 = "Get to the elevator";
obj1 = "";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 20;
friendsGoal = 0;
bar.goals.c0._visible = true;
bar.goals.c1._visible = false;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 0;
bar.friendsThing._visible = false;
bar.keysThing._visible = false;
} else if (num == 3) {
obj0 = "Collect 20 Carrots";
obj1 = "Get to the elevator";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 50;
friendsGoal = 0;
bar.goals.c0._visible = true;
bar.goals.c1._visible = true;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 1;
bar.friendsThing._visible = false;
bar.keysThing._visible = false;
} else if (num == 4) {
obj0 = "Collect 25 Carrots";
obj1 = "Get to the elevator";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 50;
friendsGoal = 0;
bar.goals.c0._visible = true;
bar.goals.c1._visible = true;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 1;
bar.friendsThing._visible = false;
bar.keysThing._visible = false;
} else if (num == 5) {
obj0 = "Save 5 friends";
obj1 = "Get to the elevator";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 20;
friendsGoal = 5;
bar.goals.c0._visible = true;
bar.goals.c1._visible = true;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 1;
bar.friendsThing._visible = true;
bar.keysThing._visible = false;
} else if (num == 6) {
obj0 = "Save 10 friends";
obj1 = "Get to the elevator";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 50;
friendsGoal = 10;
bar.goals.c0._visible = true;
bar.goals.c1._visible = true;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 1;
bar.friendsThing._visible = true;
bar.keysThing._visible = false;
} else if (num == 7) {
obj0 = "Get to the elevator";
obj1 = "";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 70;
friendsGoal = 0;
bar.goals.c0._visible = true;
bar.goals.c1._visible = false;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 0;
bar.friendsThing._visible = false;
bar.keysThing._visible = false;
} else if (num == 8) {
obj0 = "Save 6 friends";
obj1 = "Get to the elevator";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 40;
friendsGoal = 10;
bar.goals.c0._visible = true;
bar.goals.c1._visible = true;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 1;
bar.friendsThing._visible = true;
bar.keysThing._visible = false;
} else if (num == 9) {
obj0 = "Collect 5 Keys";
obj1 = "Collect 40 Carrots";
obj2 = "Save 8 Friends";
obj3 = "Get to the elevator";
keysGoal = 5;
carrotsGoal = 50;
friendsGoal = 8;
bar.goals.c0._visible = true;
bar.goals.c1._visible = true;
bar.goals.c2._visible = true;
bar.goals.c3._visible = true;
tasksNeeded = 3;
bar.friendsThing._visible = true;
bar.keysThing._visible = true;
} else if (num == 10) {
obj0 = "Feed the King";
obj1 = "";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 1;
friendsGoal = 10;
bar.goals.c0._visible = true;
bar.goals.c1._visible = false;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 1;
bar.friendsThing._visible = true;
bar.keysThing._visible = false;
} else if (num == 11) {
obj0 = "Collect all 500 Carrots";
obj1 = "Get to the elevator";
obj2 = "";
obj3 = "";
keysGoal = 0;
carrotsGoal = 500;
friendsGoal = 0;
bar.goals.c0._visible = true;
bar.goals.c1._visible = true;
bar.goals.c2._visible = false;
bar.goals.c3._visible = false;
tasksNeeded = 1;
bar.friendsThing._visible = false;
bar.keysThing._visible = false;
}
i = 0;
while (i < 4) {
_root["objD" + i] = false;
_root.bar.goals["c" + i].gotoAndStop(1);
i++;
}
tasksCompleted = 0;
}
function toolBar() {
carrotsDisp = (carrots + " / ") + carrotsGoal;
keysDisp = (keys + " / ") + keysGoal;
speedDisp = Math.abs(xTravel / 10);
friendsDisp = (friends + " / ") + friendsGoal;
if (swinging) {
speedDisp = Math.abs(Math.floor(xV)) + (random(10) / 10);
}
if (speedDisp > 30) {
player.filters = new Array(new flash.filters.BlurFilter(speedDisp / 10, 0, 5));
} else {
player.filters = new Array(new flash.filters.BlurFilter(0, 0, 0));
}
}
function item() {
i = 0;
while (i < carrotsGoal) {
taf = _root["carrot" + i];
if (taf.hitTest(player) && (taf.activ == false)) {
_root.carrots++;
attachMovie("coin", "c" + k, k++);
taf.activ = true;
taf.onEnterFrame = function () {
easing("x", this, bar._x + bar.carrot._x, 1);
easing("y", this, bar._y + bar.carrot._y, 1);
if (this.hitTest(bar.carrot)) {
bar.carrot.gotoAndPlay(2);
this.removeMovieClip();
}
};
}
i++;
}
i = 0;
while (i < keysGoal) {
taf = _root["key" + i];
if (taf.hitTest(player) && (taf.activ == false)) {
_root.keys++;
attachMovie("coin", "c" + k, k++);
taf.activ = true;
taf.onEnterFrame = function () {
easing("x", this, (bar._x + bar.keysThing._x) + bar.keysThing.key._x, 1);
easing("y", this, (bar._y + bar.keysThing._y) + bar.keysThing.key._y, 1);
if (this.hitTest(bar.keysThing.key)) {
bar.keysThing.key.gotoAndPlay(2);
this.removeMovieClip();
}
};
}
i++;
}
}
function laseMe() {
if (holdMouse && (player.player._currentframe == 10)) {
champ.removeMovieClip();
createEmptyMovieClip("champ", k++);
if (player._xscale == -100) {
player.player.head._rotation = 90 + (-1 * rot((player._x + player.player._x) + player.player.head._x, (player._y + player.player._y) + player.player.head._y, _xmouse, _ymouse));
rA = ((12 + player._x) + player.player._x) + player.player.head._x;
rB = ((-14 + player._y) + player.player._y) + player.player.head._y;
rC = ((17 + player._x) + player.player._x) + player.player.head._x;
gA = (_xmouse + random(10)) - 5;
gB = (_ymouse + random(10)) - 5;
sC = (_xmouse + random(10)) - 5;
sD = (_ymouse + random(10)) - 5;
champ.lineStyle(10, 16711680, random(50) + 50);
champ.moveTo(rA, rB);
champ.lineTo(sC, sD);
champ.moveTo(rC, rB);
champ.lineTo(gA, gB);
champ.lineStyle(3, 16768477, 60);
champ.moveTo(rA, rB);
champ.lineTo(sC, sD);
champ.moveTo(rC, rB);
champ.lineTo(gA, gB);
champ.lineStyle(1, 16777215, 90);
champ.moveTo(rA, rB);
champ.lineTo(sC, sD);
champ.moveTo(rC, rB);
champ.lineTo(gA, gB);
} else if (player._xscale == 100) {
player.player.head._rotation = 90 + (1 * rot((player._x + player.player._x) + player.player.head._x, (player._y + player.player._y) + player.player.head._y, _xmouse, _ymouse));
rA = ((-5 + player._x) + player.player._x) + player.player.head._x;
rB = ((-14 + player._y) + player.player._y) + player.player.head._y;
rC = ((-3 + player._x) + player.player._x) + player.player.head._x;
gA = (_xmouse + random(10)) - 5;
gB = (_ymouse + random(10)) - 5;
sC = (_xmouse + random(10)) - 5;
sD = (_ymouse + random(10)) - 5;
champ.lineStyle(10, 16711680, random(50) + 50);
champ.moveTo(rA, rB);
champ.lineTo(sC, sD);
champ.moveTo(rC, rB);
champ.lineTo(gA, gB);
champ.lineStyle(3, 16768477, 60);
champ.moveTo(rA, rB);
champ.lineTo(sC, sD);
champ.moveTo(rC, rB);
champ.lineTo(gA, gB);
champ.lineStyle(1, 16777215, 90);
champ.moveTo(rA, rB);
champ.lineTo(sC, sD);
champ.moveTo(rC, rB);
champ.lineTo(gA, gB);
}
cam._x = cam._x + (random(10) - 5);
cam._y = cam._y + (random(10) - 5);
if (terrain.hitTest(_xmouse, _ymouse, true)) {
gDebris(_xmouse, _ymouse);
shel = attachMovie("blast", "blast" + k, k++);
shel._x = _xmouse;
shel._y = _ymouse;
if (hitLastFrame) {
shel.lineStyle(5, 0, 80);
shel.moveTo(hlfX - shel._x, hlfY - shel._y);
shel.lineTo(0, 0);
shel.lineStyle(5, 0, 20);
shel.moveTo(((hlfX - shel._x) + random(10)) - 5, ((hlfY - shel._y) + random(10)) - 5);
shel.lineTo(0, 0);
} else {
shel.moveTo(((hlfX - shel._x) + random(10)) - 5, ((hlfY - shel._y) + random(10)) - 5);
hitLastFrame = true;
}
hlfX = _xmouse;
hlfY = _ymouse;
shel._xscale = random(100) + 100;
shel._yscale = shel._xscale;
} else {
hlfX = _xmouse;
hlfCount = 0;
hlfY = _ymouse;
hitLastFrame = false;
}
} else {
champ.removeMovieClip();
}
trace(hitLastFrame);
}
function hitStuff() {
shept = terrain.hitTest(hitA._x, hitA._y, true);
}
function cursorStuff() {
cursor._x = _xmouse;
cursor._y = _ymouse;
if ((dTest(cursor, terrain) && (player.arm._rotation > 0)) && (player.arm._rotation < 180)) {
cursor.gotoAndStop(2);
} else {
cursor.gotoAndStop(1);
}
}
function hitAAttach() {
hitA._x = player._x;
hitA._y = player._y - 25;
}
function dTest(mover, station) {
with (mover) {
if (((station.hitTest(getBounds(_root).xMax, mover._y, true) || (station.hitTest(getBounds(_root).xMin, mover._y, true))) || (station.hitTest(mover._x, getBounds(_root).yMax, true))) || (station.hitTest(mover._x, getBounds(_root).yMin, true))) {
return(true);
}
return(false);
}
}
function fireRope() {
shak.starter._y = shak.starter._y - 50;
shak.lineStyle(2, 0, 100);
shak.lineTo(shak.starter._x, shak.starter._y);
shak._x = player._x + keepX;
shak._y = player._y + keepY;
shak.car._x = shak.starter._x;
shak.car._y = shak.starter._y;
shak.endMe._visible = false;
var _local2 = {};
_local2.x = shak.starter._x;
_local2.y = shak.starter._y;
shak.localToGlobal(_local2);
_local2.x = _local2.x - _root._x;
_local2.y = _local2.y - _root._y;
trace(_local2.x);
trace(_local2.y);
trace(cursor._x);
trace(cursor._y);
trace("END");
if (terrain.hitTest(_local2.x, _local2.y, true)) {
shak._y = shak._y + shak.starter._y;
shak.ender._y = shak.ender._y - shak.starter._y;
shak.starter._x = 0;
shak.starter._y = 0;
shooting = false;
shak.endMe._visible = true;
shak.car._visible = false;
triggerRope();
} else if (shak.starter._y < -200) {
shak.starter.removeMovieClip();
shooting = false;
running = true;
shak.clear();
shak.removeMovieClip();
}
}
function triggerRope() {
swinging = true;
running = false;
clear();
player.gotoAndStop("hanging");
maxang = degToRad(Math.atan((shak._y - player._y) / (shak._x - player._x))) * -1;
trace(maxang);
a = 2.5;
shak.ender._y = shak.ender._y - 40;
player._y = player._y - 40;
hitA._y = hitA._y - 40;
}
function ropeStuff() {
ropeMove();
ropeMe();
if (terrain.hitTest(hitA._x, hitA._y, true)) {
swinging = false;
shooting = false;
running = true;
hitA._x = player._x;
hitA._y = player._y;
shak.removeMovieClip();
trace("MY X = " + xTravel);
trace("MY Y = " + yMov);
trace("MY Xv = " + xV);
trace("MY Yv = " + yV);
if (xTravel > 800) {
xTravel = 800;
}
if (xTravel < -800) {
xTravel = -800;
}
if (yMov > 80) {
yMov = 80;
}
if (yMov < -80) {
yMov = -80;
}
if (xV > 80) {
xV = 80;
}
if (xV < -80) {
xV = -80;
}
if (yV > 80) {
yV = 80;
}
if (yV < -80) {
yV = -80;
}
hitA._x = hitA._x - Math.floor(xV * 10);
trace(xV);
xTravel = Math.floor(0.1 * (-(xV * 10)));
yMov = -Math.floor(yV);
trace("SDIOFES");
i = 0;
while (i < ene1List) {
if (_root["e" + i].attachTo) {
_root["e" + i]._x = player._x;
_root["e" + i]._y = player._y - 20;
while (terrain.hitTest(_root["e" + i]._x, _root["e" + i]._y, true)) {
_root["e" + i]._y = _root["e" + i]._y - 5;
_root["e" + i].yMov = 0;
}
}
i++;
}
}
}
function ropeMove() {
xV = oldX - player._x;
yV = oldY - player._y;
oldX = player._x;
oldY = player._y;
if (Key.isDown(40) || (Key.isDown(83))) {
shak.ender._y = shak.ender._y + 5;
} else if (Key.isDown(38) || (Key.isDown(87))) {
shak.ender._y = shak.ender._y - 5;
}
if (shak.ender._y < 0) {
shak.ender._y = 0;
}
shak.clear();
shak.lineStyle(2);
shak.moveTo(0, 0);
shak.lineTo(0, shak.ender._y);
activate = false;
tas = Math.sin(nosc * a) * Math.pow(timesmorz, a);
if (a == 50) {
activate = true;
}
if ((myDirect == 1) && (tas > oldTas)) {
activate = true;
myDirect = 2;
}
if ((myDirect == 2) && (tas < oldTas)) {
activate = true;
myDirect = 1;
}
oldTas = tas;
shak._rotation = (Math.sin(nosc * a) * Math.pow(timesmorz, a)) * (maxang * cat);
}
function ropeMe() {
waiting = false;
if (((((!interference) && ((!walls.hitTest(hitA._x, hitA._y, true)) && ((hitA._x < rightLimit) && (hitA._x > leftLimit)))) && (activate)) && (catFight == 1)) && (((Key.isDown(37) || (Key.isDown(39))) || (Key.isDown(65))) || (Key.isDown(68)))) {
catFight = 0;
waiting = false;
}
if (((!interference) && ((!walls.hitTest(hitA._x, hitA._y, true)) && ((hitA._x < rightLimit) && (hitA._x > leftLimit)))) && ((((!Key.isDown(37)) && (!Key.isDown(39))) && (!Key.isDown(65))) && (!Key.isDown(68)))) {
waiting = true;
}
if (a < -12) {
waiting = true;
interference = true;
}
if (!interference) {
if (catFight == 0) {
if (walls.hitTest(hitA._x, hitA._y, true) || ((hitA._x > rightLimit) || (hitA._x < leftLimit))) {
interference = true;
catFight = 1;
a = a + 0.15;
} else {
a = a - 0.15;
}
} else if (catFight == 1) {
if (walls.hitTest(hitA._x, hitA._y, true) || ((hitA._x > rightLimit) || (hitA._x < leftLimit))) {
interference = true;
catFight = 0;
a = a - 0.15;
} else {
a = a + 0.15;
}
}
} else if (interference) {
if (catFight == 0) {
a = a - 0.15;
} else if (catFight == 1) {
a = a + 0.15;
}
if (activate && ((!walls.hitTest(hitA._x, hitA._y, true)) && ((hitA._x < rightLimit) && (hitA._x > leftLimit)))) {
interference = false;
trace("OFF");
}
}
if (activate && (waiting)) {
catFight = 1;
waiting = false;
}
if (a > 50) {
a = 50;
shak._rotation = 0;
}
if ((!ropeLaunched) && (((Key.isDown(37) || (Key.isDown(39))) || (Key.isDown(65))) || (Key.isDown(68)))) {
ropeLaunched = true;
}
}
function playerAttach() {
fks = {};
fks.x = shak.ender._x;
fks.y = shak.ender._y;
shak.localToGlobal(fks);
player._x = (fks.x - _root._x) - player.arm._x;
player._y = (fks.y - _root._y) - player.arm._y;
player.arm._rotation = 90 - rot(player._x + player.arm._x, player._x + player.arm._y, shak._x, shak._y);
}
function spawnRope() {
shel = createEmptyMovieClip("swinger", k++);
shel.attachMovie("rabbit", "player", k++);
shel._x = hook._x;
shel._y = hook._y;
shel.xVel = -3;
shel.lineStyle(1, 0, 100);
shel.ropeLength = 200;
shel.onEnterFrame = function () {
this.c = this.ropeLength;
this.b = this.xVel + this.player._x;
if (this.c > this.b) {
this.a = Math.sqrt((this.c * this.c) - (this.b * this.b));
this.player._x = this.b;
this.player._y = this.a;
this.lineTo(this.player._x, this.player._y);
}
};
}
function gun() {
if (!holdMouse) {
player.arm._rotation = 90 + rot(player._x + player.arm._x, player._y + player.arm._y, _xmouse, _ymouse);
if (player._xscale == -100) {
player.arm._rotation = player.arm._rotation * -1;
player.arm._rotation = player.arm._rotation + 180;
}
}
}
function vision() {
if (cStatus) {
if (player._x < 175) {
easing("x", cam, 175, 0.9);
} else if (player._x > 3100) {
easing("x", cam, 3100, 0.9);
} else {
easing("x", cam, player._x, 0.9);
}
if (player.hitTest(fwej)) {
easing("y", cam, player._y + 100, 0.9);
} else {
easing("y", cam, player._y - 100, 0.9);
}
}
if (mocking) {
easing("x", cam, elevatorStart._x, 0.9);
easing("y", cam, elevatorStart._y - 100, 0.9);
}
easing("xscale", cam, zoom, 0.9);
easing("yscale", cam, zoom, 0.9);
}
function myTerrain(mover, station) {
cause = false;
hitA._x = Math.floor(hitA._x);
hitA._y = Math.floor(hitA._y);
xTravel = Math.floor(xTravel);
yMov = Math.floor(yMov);
yTravel = Math.floor(yTravel);
if (terrain.hitTest(hitA._x, hitA._y, true)) {
while (terrain.hitTest(hitA._x, hitA._y, true)) {
hitA._y = hitA._y - 0.5;
}
cause = true;
yMov = 0;
} else {
yMov = yMov + yTravel;
}
hitA._y = hitA._y + Math.floor(yMov);
}
function gDebris(myX, myY) {
if (!gameIsPaused) {
if (cStatus) {
switch (random(3)) {
case 0 :
fw = attachMovie("grass", "g" + k, k++);
fw._x = myX;
fw._y = myY;
fw._xscale = random(200) - 100;
fw._yscale = random(200) + 50;
break;
case 1 :
fw = attachMovie("grass2", "g" + k, k++);
fw._x = myX;
fw._y = myY;
fw._xscale = random(200) - 100;
fw._yscale = random(100) + 50;
break;
case 2 :
fw = attachMovie("grass", "g" + k, k++);
fw._x = myX;
fw._y = myY;
fw._xscale = random(200) - 100;
fw._yscale = random(100) + 50;
fw = attachMovie("grass2", "g" + k, k++);
fw._x = myX;
fw._y = myY;
fw._xscale = random(200) - 100;
fw._yscale = random(100) + 50;
}
}
}
}
function movement(moveMe) {
if (hitA._x < leftLimit) {
hitA._x = leftLimit;
xTravel = xTravel * -1;
xTravel = Math.floor(xTravel * 0.5);
} else if (hitA._x > rightLimit) {
hitA._x = rightLimit;
xTravel = xTravel * -1;
xTravel = Math.floor(xTravel * 0.5);
} else {
hitA._x = hitA._x + (xTravel / 10);
if (moveMe) {
if (Key.isDown(37) || (Key.isDown(65))) {
xTravel = xTravel - xAcc;
keyAttack = true;
} else if (Key.isDown(39) || (Key.isDown(68))) {
xTravel = xTravel + xAcc;
keyAttack = true;
} else {
keyAttack = false;
}
}
if (xTravel > 0) {
xTravel = xTravel - 1;
if ((!keyAttack) && (xTravel > 0)) {
xTravel = xTravel - 3;
}
if ((!keyAttack) && (xTravel > 0)) {
xTravel = xTravel - 3;
}
} else if (xTravel < 0) {
xTravel = xTravel + 1;
if ((!keyAttack) && (xTravel < 0)) {
xTravel = xTravel + 3;
}
if ((!keyAttack) && (xTravel < 0)) {
xTravel = xTravel + 3;
}
}
if (walls.hitTest(hitA._x, hitA._y, true) && (xTravel != 0)) {
wCounter = 0;
if (xTravel > 0) {
while (walls.hitTest(hitA._x, hitA._y, true)) {
hitA._x = hitA._x - 1;
wCounter++;
if (wCounter > 200) {
while (walls.hitTest(hitA._x, hitA._y, true)) {
hitA._x = hitA._x + 1;
}
break;
}
}
xTravel = xTravel * -1;
xTravel = Math.floor(xTravel * 0.5);
} else if (xTravel < 0) {
while (walls.hitTest(hitA._x, hitA._y, true)) {
hitA._x = hitA._x + 1;
wCounter++;
if (wCounter > 200) {
while (walls.hitTest(hitA._x, hitA._y, true)) {
hitA._x = hitA._x - 1;
}
break;
}
}
xTravel = xTravel * -1;
xTravel = Math.floor(xTravel * 0.5);
}
}
}
}
function facing() {
oldDirect = direct;
if (holdMouse && (mouseFocus == "laser")) {
player.gotoAndStop("laser");
if (cursor._x > player._x) {
player._xscale = -100;
} else {
player._xscale = 100;
}
} else if (Key.isDown(37) || (Key.isDown(65))) {
player._xscale = 100;
if (Math.abs(xTravel) > 300) {
player.gotoAndStop("dash");
} else {
player.gotoAndStop("run");
}
} else if (Key.isDown(39) || (Key.isDown(68))) {
player._xscale = -100;
if (Math.abs(xTravel) > 300) {
player.gotoAndStop("dash");
} else {
player.gotoAndStop("run");
}
}
if (oldDirect != direct) {
if (!currentTurn) {
currentTurn = true;
}
}
if (((((!holdMouse) && (!Key.isDown(37))) && (!Key.isDown(39))) && (!Key.isDown(65))) && (!Key.isDown(68))) {
player.gotoAndStop("stop");
}
}
function follow() {
if (Math.abs(xTravel + yMov) > 3) {
eCounter = 0;
} else {
eCounter++;
}
if (eCounter < 5) {
player._x = hitA._x;
player._y = hitA._y;
}
olderX = hitA._x;
olderY = hitA._y;
}
function rot(circx, circy, prevx, prevy) {
if ((circx < prevx) && (circy < prevy)) {
angle = Math.atan(Math.abs(circy - prevy) / Math.abs(circx - prevx));
degrees = (angle * 180) / Math.PI;
return(degrees + 90);
}
if ((circx < prevx) && (circy > prevy)) {
angle = Math.atan(Math.abs(circy - prevy) / Math.abs(circx - prevx));
degrees = (angle * 180) / Math.PI;
return(90 - degrees);
}
if ((circx > prevx) && (circy < prevy)) {
angle = Math.atan(Math.abs(circx - prevx) / Math.abs(circy - prevy));
degrees = (angle * 180) / Math.PI;
return(-(180 - degrees));
}
if ((circx > prevx) && (circy > prevy)) {
angle = Math.atan(Math.abs(circy - prevy) / Math.abs(circx - prevx));
degrees = (angle * 180) / Math.PI;
return(-(90 - degrees));
}
}
function pythag(side1, side2) {
return(Math.sqrt((side1 * side1) + (side2 * side2)));
}
function degToRad(dr) {
return(180 / (dr * Math.PI));
}
function degToRad2(dr) {
return((dr * Math.PI) / 180);
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function easing(pro, mov1, mov2, drift) {
switch (pro) {
case "x" :
mov1._x = mov1._x - (drift * ((mov1._x - mov2) / 2));
break;
case "y" :
mov1._y = mov1._y - (drift * ((mov1._y - mov2) / 2));
break;
case "xscale" :
mov1._xscale = mov1._xscale - (drift * ((mov1._xscale - mov2) / 2));
break;
case "yscale" :
mov1._yscale = mov1._yscale - (drift * ((mov1._yscale - mov2) / 2));
break;
case "width" :
mov1._width = mov1._width - (drift * ((mov1._width - mov2) / 2));
break;
case "height" :
mov1._height = mov1._height - (drift * ((mov1._height - mov2) / 2));
break;
case "alpha" :
mov1._alpha = mov1._alpha - (drift * ((mov1._alpha - mov2) / 2));
break;
case "rotation" :
mov1._rotation = mov1._rotation - (drift * ((mov1._rotation - mov2) / 2));
}
}
function dynamicHitTest(mover, station) {
with (mover) {
if (((station.hitTest(getBounds(_root).xMax, mover._y, true) || (station.hitTest(getBounds(_root).xMin, mover._y, true))) || (station.hitTest(mover._x, getBounds(_root).yMax, true))) || (station.hitTest(mover._x, getBounds(_root).yMin, true))) {
return(true);
}
return(false);
}
}
stop();
_quality = "MEDIUM";
speed = 8;
fallSpeed = 4;
myFallSpeed = fallSpeed;
var k = 0;
var gravity = 0.3;
var origGrav = gravity;
var xTravel = 0;
var xSpeed = 80;
var xAcc = 10;
var xMin = (-xSpeed);
var yTravel = 1;
var xMov = 0;
var yMov = 0;
var airborne = true;
var keyAttack = false;
var direct = "right";
var oldDirect = "right";
var currentTurn = false;
ropeLaunched = false;
var running = false;
player._visible = false;
var swinging = false;
var shooting = false;
var lasering = false;
var ropeE;
var interference = false;
a = 1;
var oldX = 0;
var oldY = 0;
var xV = 0;
var yV = 0;
var collected = 0;
var particles = true;
timesmorz = 0.92;
var mouseFocus = "swinging";
var eneCounter = 0;
hitA._visible = false;
walls._visible = false;
var leftLimit = -4;
var rightLimit = 3325;
terrain._visible = false;
walls._visible = false;
nosc = 1;
cat = 1;
myDirect = 1;
catFight = 1;
var mocking = true;
var ene1List = 0;
tapi = false;
waiting = false;
var cStatus = false;
var carrots = 0;
var carrotsGoal = 50;
var carrotsDisp;
var keys = 0;
var keysGoal = 3;
var keysDisp;
var carrotCount = 0;
var keyCount = 0;
var obj0;
var obj1;
var obj2;
var obj3;
var objD0 = false;
var objD1 = false;
var objD2 = false;
var objD3 = false;
var tasksNeeded = 0;
var tasksCompleted = 0;
var keepX = 0;
var keepY = 0;
execNewLevel(false);
Mouse.hide();
var spaceDown = false;
var gameIsPaused = false;
onMouseDown = function () {
if (Math.abs(xTravel / 10) < 50) {
if (!gameIsPaused) {
if (cStatus) {
if (swinging) {
swinging = false;
shooting = false;
running = true;
hitA._x = player._x;
hitA._y = player._y;
shak.removeMovieClip();
xTravel = -(xV * 10);
yMov = -yV;
trace("MY X = " + xTravel);
trace("MY Y = " + yMov);
if (xTravel > 800) {
xTravel = 800;
}
if (xTravel < -800) {
xTravel = -800;
}
if (yMov > 80) {
yMov = 80;
}
if (yMov < -80) {
yMov = -80;
}
i = 0;
while (i < ene1List) {
if (_root["e" + i].attachTo) {
_root["e" + i].xTravel = xTravel / 10;
_root["e" + i].yMov = yMov;
}
i++;
}
} else if (!shooting) {
if (mouseFocus == "swinging") {
if ((player.arm._rotation > 10) && (player.arm._rotation < 170)) {
shooting = true;
shak.removeMovieClip();
sge = attachMovie("shak", "shak", k++);
sge._x = cursor._x;
sge._y = cursor._y;
keepX = cursor._x - player._x;
keepY = cursor._y - player._y;
ropeE = dist(_xmouse, _ymouse, player._x + player.arm._x, player._y + player.arm._y);
far = sge.attachMovie("ender", "ender", k++);
far._y = ropeE;
near = sge.attachMovie("ender", "starter", k++);
near._x = far._x;
near._y = far._y;
trace(far._y);
shak.moveTo(near._x, near._y);
sge._rotation = 180 + rot(cursor._x, cursor._y, player._x + player.arm._x, player._y + player.arm._y);
}
} else if (mouseFocus == "laser") {
holdMouse = true;
lasering = true;
}
}
}
}
}
};
onMouseUp = function () {
holdMouse = false;
lasering = false;
hitLastFrame = false;
champ.removeMovieClip();
};
lastX = player._x;
lastY = player._y;
var currentX = 0;
var currentY = 0;
var myO = 0;
var myA = 0;
var myTan = 0;
var lastX = 0;
var lastY = 0;
var friends = 0;
var tCounter = 0;
var tSeconds = 0;
onEnterFrame = function () {
Mouse.hide();
if (!gameIsPaused) {
achievements(false);
trackMe._x = player._x;
trackMe._y = player._y;
currentX = hitA._x;
currentY = hitA._y;
myO = lastY - currentY;
myA = lastX - currentX;
myTan = Math.atan(myO / myA);
myTan = degToRad(myTan);
lastX = hitA._x;
lastY = hitA._y;
cursorStuff();
follow();
bar._x = cam._x;
bar._y = cam._y;
vision();
terrain._visible = false;
if (cStatus) {
if (shooting) {
follow();
fireRope();
myTerrain(hitA, terrain);
movement(true);
}
if (swinging) {
ropeStuff();
playerAttach();
hitAAttach();
}
if ((((!swinging) && (!shooting)) && (running)) && (!lasering)) {
follow();
facing();
gun();
myTerrain(hitA, terrain);
movement(true);
}
if (lasering) {
facing();
follow();
laseMe();
myTerrain();
movement(false);
}
hitStuff();
toolBar();
item();
goal();
keyHits();
checkPause();
myTimer();
i = 0;
while (i < ene1List) {
eneStuff(_root["e" + i]);
i++;
}
}
} else {
functionPause();
}
};
var pDown = false;
anyAchievements = false;
var oFPrevX = 0;
var myDif = 0;
var foundLevel = false;
var masted = false;
var taf = new MovieClip();
var hlfCount = 0;
var zoom = 100;
var cause = false;
var wCounter = 0;
var eCounter = 0;
var point = {};
point.x = mc.cursor._x;
point.y = mc.cursor._y;
mc.localToGlobal(point);
ers = 0;
while (ers < 3) {
spawnLine(point.x, point.y, 0);
ers++;
}
stop();
Frame 16
stop();
Symbol 3 MovieClip [coin] Frame 3
this.removeMovieClip();
Symbol 8 MovieClip [launchPoint2] Frame 30
this.removeMovieClip();
Symbol 10 MovieClip [launchPoint] Frame 30
this.removeMovieClip();
Symbol 12 MovieClip [ender] Frame 1
this._visible = false;
Symbol 15 MovieClip [shootRope] Frame 1
this._alpha = 0;
onEnterFrame = function () {
padk._x = padk._x + 5;
};
Symbol 16 MovieClip [blast] Frame 1
counter = 200;
goal = 0;
onEnterFrame = function () {
counter--;
if (counter == goal) {
this.removeMovieClip();
}
if (counter < 10) {
this._alpha = counter * 10;
}
};
Symbol 19 MovieClip [flaze] Frame 7
this.removeMovieClip();
Symbol 26 MovieClip Frame 1
stop();
Symbol 27 MovieClip [changeKeys] Frame 50
this.removeMovieClip();
Symbol 30 MovieClip Frame 1
if (_root.level == 11) {
gotoAndStop (2);
} else {
stop();
}
Instance of Symbol 30 MovieClip in Symbol 31 MovieClip Frame 1
onClipEvent (load) {
_rotation = random(360);
bladeRot = random(10) - 5;
}
onClipEvent (enterFrame) {
_rotation = (_rotation + bladeRot);
}
Symbol 32 MovieClip [grass2] Frame 1
onEnterFrame = function () {
if (_root.gameIsPaused) {
stop();
} else {
play();
}
};
Symbol 32 MovieClip [grass2] Frame 15
this.removeMovieClip();
Symbol 33 MovieClip [grass] Frame 1
onEnterFrame = function () {
if (_root.gameIsPaused) {
stop();
} else {
play();
}
};
Symbol 33 MovieClip [grass] Frame 20
this.removeMovieClip();
Symbol 36 MovieClip [blackFade] Frame 1
catcat = 100;
onEnterFrame = function () {
if (catcat > 0) {
catcat = catcat - 5;
_root.globalVolume.setVolume(catcat);
} else {
onEnterFrame = null;
}
};
Symbol 36 MovieClip [blackFade] Frame 45
_root.globalVolume.setVolume(100);
stopAllSounds();
_root.execNewLevel(true);
Symbol 36 MovieClip [blackFade] Frame 90
this.removeMovieClip();
Symbol 39 MovieClip [fireUp] Frame 16
this.removeMovieClip();
Symbol 45 MovieClip [achievementUnl] Frame 1
onEnterFrame = function () {
if (_root.cStatus) {
this._x = _root.cam._x;
this._y = _root.cam._y;
} else {
this._x = Stage.width / 2;
this._y = Stage.height / 2;
}
};
Symbol 45 MovieClip [achievementUnl] Frame 25
this.removeMovieClip();
Symbol 50 MovieClip Frame 1
if (_root.achC6 == true) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
onEnterFrame = function () {
if (_root.achC6 == true) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
stop();
Symbol 54 MovieClip Frame 1
onEnterFrame = function () {
if (_parent._parent.emotion == "sad") {
gotoAndStop (3);
} else if (_parent._parent.emotion == "happy") {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
Symbol 58 MovieClip [ene1] Frame 1
stop();
wf = 2 + random(10);
counter = 0;
onEnterFrame = function () {
counter++;
if (wf == counter) {
play();
onEnterFrame = null;
}
};
this._name = "e" + (_root.ene1List++);
trace("My name is " + this._name);
xTravel = 0;
yMov = 0;
yTravel = 1;
attachTo = false;
prime = (random(4) * 0.1) + 0.8;
var timeOutCounter = 0;
ttX = random(30) - 15;
ttY = random(30) - 15;
emotion = "eyhe5";
chap = 0;
detached = false;
wCounter = 0;
Symbol 58 MovieClip [ene1] Frame 2
stop();
Symbol 67 MovieClip [splint] Frame 1
stop();
Symbol 80 Button
on (release) {
_root.play();
}
Symbol 82 MovieClip Frame 100
stop();
Symbol 89 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 104 MovieClip Frame 126
_parent.nextFrame();
Symbol 110 MovieClip Frame 1
switch (_root.myShoes) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
onEnterFrame = function () {
switch (_root.myShoes) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
};
Symbol 117 MovieClip Frame 1
switch (_root.myPants) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
onEnterFrame = function () {
switch (_root.myPants) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
};
Symbol 124 MovieClip Frame 1
switch (_root.myPants) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
onEnterFrame = function () {
switch (_root.myPants) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
};
Symbol 132 MovieClip Frame 1
switch (_root.myCoat) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
onEnterFrame = function () {
switch (_root.myCoat) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
};
Symbol 140 MovieClip Frame 1
switch (_root.myHat) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
onEnterFrame = function () {
switch (_root.myHat) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
};
Symbol 149 MovieClip Frame 1
switch (_root.myCoat) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
onEnterFrame = function () {
switch (_root.myCoat) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
};
Symbol 157 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 1
onEnterFrame = function () {
if (_root.myGlasses) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
Symbol 167 MovieClip Frame 1
switch (_root.myCoat) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
onEnterFrame = function () {
switch (_root.myCoat) {
case 1 :
this.gotoAndStop(1);
break;
case 2 :
this.gotoAndStop(2);
break;
case 3 :
this.gotoAndStop(3);
break;
case 4 :
this.gotoAndStop(4);
break;
case 5 :
this.gotoAndStop(5);
}
};
Symbol 176 Button
on (release) {
cory.play();
}
Symbol 186 MovieClip Frame 1
stop();
Symbol 186 MovieClip Frame 30
stopAllSounds();
_root.nextFrame();
stop();
Symbol 187 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 188 MovieClip Frame 89
stop();
Symbol 189 MovieClip Frame 1
stop();
Instance of Symbol 104 MovieClip in Symbol 189 MovieClip Frame 1
onClipEvent (enterFrame) {
this.onPress = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Symbol 189 MovieClip Frame 2
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 1
if (_root.levelCap > 1) {
this._visible = true;
} else {
this._visible = false;
}
Symbol 214 MovieClip Frame 1
if (_root.levelCap > 2) {
this._visible = true;
} else {
this._visible = false;
}
Symbol 219 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_parent.moving) {
this.gotoAndStop(1);
} else if (_root.levelCap == 1) {
this.gotoAndStop(1);
} else if ((_root.levelCap == _root.level) && (_root.level != 1)) {
this.gotoAndStop(2);
} else if (_root.level == 11) {
this.gotoAndStop(2);
} else if ((_root.levelCap != 1) && (_root.level == 1)) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(4);
}
};
Symbol 222 MovieClip Frame 19
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 29
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 40
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 51
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 62
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 73
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 84
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 95
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 106
stop();
_parent.moving = false;
Symbol 222 MovieClip Frame 117
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 1
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 11
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 22
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 33
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 44
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 55
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 66
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 77
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 88
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 99
stop();
_parent.moving = false;
Symbol 223 MovieClip Frame 120
stop();
_parent.moving = false;
Symbol 227 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 20
gotoAndPlay (11);
Symbol 270 Button
on (release) {
_root.myHat = 1;
_root.myShoes = 1;
_root.myPants = 1;
_root.myCoat = 1;
}
Symbol 271 MovieClip Frame 1
stop();
Symbol 277 Button
on (release) {
_root.myHat = 2;
_root.myShoes = 2;
_root.myPants = 2;
_root.myCoat = 2;
}
Symbol 278 MovieClip Frame 1
stop();
Symbol 280 Button
on (release) {
_root.myHat = 3;
_root.myShoes = 3;
_root.myPants = 3;
_root.myCoat = 3;
}
Symbol 281 MovieClip Frame 1
stop();
Symbol 285 Button
on (release) {
_root.myHat = 4;
_root.myShoes = 4;
_root.myPants = 4;
_root.myCoat = 4;
}
Symbol 286 MovieClip Frame 1
stop();
Symbol 288 Button
on (release) {
_root.myHat = 5;
_root.myShoes = 5;
_root.myPants = 5;
_root.myCoat = 5;
}
Symbol 289 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 7
i = 1;
while (i < 7) {
if (_root["achC" + i]) {
this["ach" + i].gotoAndStop(2);
this[("ach" + i) + "See"]._visible = true;
} else {
this[("ach" + i) + "See"]._visible = false;
}
i++;
}
Symbol 296 MovieClip Frame 11
stop();
Symbol 301 MovieClip Frame 1
wef.text = "level " + _root.level;
Symbol 305 MovieClip Frame 1
stop();
Symbol 305 MovieClip Frame 2
catcat = 100;
onEnterFrame = function () {
if (catcat > 0) {
catcat--;
catcat--;
_root.globalVolume.setVolume(catcat);
} else {
onEnterFrame = null;
}
};
Symbol 305 MovieClip Frame 99
stopAllSounds();
Symbol 305 MovieClip Frame 100
_root.globalVolume.setVolume(100);
_root.gotoAndStop("asLoad");
Symbol 307 MovieClip Frame 21
stop();
Symbol 309 MovieClip Frame 1
moveRight._visible = true;
moveLeft._visible = false;
moveRight.gotoAndStop("s" + _root.level);
trails.gotoAndStop(_root.levelCap);
cLeft = false;
cRight = false;
_root.cursor.gotoAndStop(1);
i = 0;
while (i < 12) {
trails["f" + _root.completedLevels[i]].gotoAndPlay(2);
trails["f" + _root.masteredLevels[i]].gotoAndPlay(3);
i++;
}
moving = false;
if (_root.anyAchievements) {
newAch._visible = true;
} else {
newAch._visible = false;
}
_root.anyAchievements = false;
onMouseDown = function () {
if (ach.wwww.hitTest(_root.cursor._x, _root.cursor._y)) {
ach.play();
newAch._visible = false;
}
};
onEnterFrame = function () {
Mouse.hide();
if (ach._currentframe == 11) {
if (!ach.plop.hitTest(_root.cursor._x, _root.cursor._y)) {
ach.play();
}
} else {
if (moving) {
subMenu.gotoAndStop(1);
}
if (!moving) {
subMenu.texty.levelStuff.text = "Level " + _root.level;
subMenu.texty.bestTime.text = _root["tl" + _root.level] + " sec";
if (_root["tl" + _root.level] == 99999999) {
subMenu.texty.bestTime.text = " ";
subMenu.texty.bt._visible = false;
}
subMenu.texty.levCom._visible = false;
subMenu.texty.masCom._visible = false;
i = 0;
while (i < 11) {
if (_root.completedLevels[i] == _root.level) {
subMenu.texty.levCom._visible = true;
}
if (_root.masteredLevels[i] == _root.level) {
subMenu.texty.masCom._visible = true;
}
i++;
}
if (subMenu.texty.levCom._visible && (subMenu.texty.masCom._visible)) {
subMenu.bgS.gotoAndStop(2);
} else {
subMenu.bgS.gotoAndStop(1);
}
subMenu.play();
if (moveRight._visible) {
subMenu._x = moveRight._x + moveRight.cap._x;
subMenu._y = moveRight._y + moveRight.cap._y;
} else {
subMenu._x = moveLeft._x + moveLeft.cap._x;
subMenu._y = moveLeft._y + moveLeft.cap._y;
}
if ((Key.isDown(39) || (Key.isDown(68))) && (cRight == false)) {
cRight = true;
if (_root.level < _root.levelCap) {
_root.level++;
trace(_root.level);
moveRight._visible = true;
moveLeft._visible = false;
moveRight.gotoAndPlay("to" + _root.level);
moving = true;
}
}
if ((!Key.isDown(39)) && (!Key.isDown(68))) {
cRight = false;
}
if ((Key.isDown(37) || (Key.isDown(65))) && (cLeft == false)) {
cLeft = true;
if (_root.level > 1) {
_root.level--;
trace(_root.level);
moveLeft._visible = true;
moveRight._visible = false;
moveLeft.gotoAndPlay("to" + _root.level);
moving = true;
}
}
if ((!Key.isDown(37)) && (!Key.isDown(65))) {
cLeft = false;
}
if (Key.isDown(32)) {
fb.play();
this.onEnterFrame = null;
}
}
}
};
Symbol 317 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 323 MovieClip Frame 7
stop();
onEnterFrame = function () {
if (Math.abs(_root.xTravel) > 80) {
stop();
if (_root.terrain.hitTest(_root.player._x, _root.player._y, true)) {
_root.gDebris(_parent._x, _parent._y);
}
} else {
play();
onEnterFrame = null;
}
};
Symbol 323 MovieClip Frame 31
stop();
Symbol 331 MovieClip Frame 10
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(_root.tasksNeeded + 1);
};
Symbol 346 MovieClip Frame 1
stop();
Symbol 349 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 20
stop();
Symbol 374 Button
on (press) {
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else if (_quality == "LOW") {
_quality = "HIGH";
}
}
Symbol 378 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 1
counter = 0;
onEnterFrame = function () {
counter++;
if (counter == 2) {
this._visible = false;
onEnterFrame = null;
}
};
Symbol 401 MovieClip Frame 1
stop();
hitA._visible = false;
Symbol 401 MovieClip Frame 48
_root.tasksCompleted++;
_root.bar.goals["c" + (_root.tasksCompleted - 1)].play();
Symbol 401 MovieClip Frame 145
stop();
sfw = _root.attachMovie("blackFade", "blackFade", _root.k++);
sfw._x = _root.bar._x;
sfw._y = _root.bar._y;
Symbol 410 MovieClip Frame 115
stop();
Symbol 413 MovieClip Frame 83
_root.loadPlayer();
Symbol 413 MovieClip Frame 115
stop();
Symbol 415 MovieClip Frame 1
this.swapDepths(_root.k++);
this._name = "carrot" + _root.carrotCount;
activ = false;
cory = _root.carrotCount;
_root.carrotCount++;
trace(_root.carrotCount);
Symbol 442 MovieClip Frame 1
onEnterFrame = function () {
this._visible = false;
};
Symbol 450 MovieClip Frame 1
this._visible = false;
Symbol 457 MovieClip Frame 1
trace("TERRAIN6");
Symbol 462 MovieClip Frame 1
trace("TERRAIN6");
Symbol 468 MovieClip Frame 1
onEnterFrame = function () {
this._visible = false;
};
Symbol 470 MovieClip Frame 1
trace("TERRAIN6");
Symbol 474 MovieClip Frame 1
trace("TERRAIN6");
Symbol 477 MovieClip Frame 1
this.swapDepths(_root.k++);
this._name = "key" + _root.keyCount;
trace(this._name);
activ = false;
_root.keyCount++;
Symbol 482 MovieClip Frame 1
trace("TERRAIN6");
Symbol 488 MovieClip Frame 1
this._visible = false;
Symbol 528 MovieClip Frame 1
this._visible = false;
Symbol 535 MovieClip Frame 1
trace("TERRAIN6");
Symbol 541 MovieClip Frame 83
_root.loadPlayer();
Symbol 541 MovieClip Frame 115
stop();
Symbol 565 MovieClip Frame 1018
stopAllSounds();
_root.gotoAndStop("menu");