Frame 1
function makeStupidThing() {
stupidThings[st] = this.attachMovie("startThing", "st" + st, st);
stupidThings[st]._y = 450;
stupidThings[st]._x = (Math.random() * 350) + 100;
stupidThings[st]._yscale = (stupidThings[st]._xscale = 66);
stupidThings[st].xSpeed = (Math.random() * 8) - 4;
stupidThings[st].ySpeed = -5 - (Math.random() * 7);
stupidThings[st].rotate = 2 - (Math.random() * 4);
stupidThings[st].gotoAndStop(Math.ceil(Math.random() * 7));
stupidThings[st].onEnterFrame = function () {
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.ySpeed = this.ySpeed + 0.1;
this._rotation = this._rotation + this.rotate;
if ((this._y > 450) && (this.ySpeed > 0)) {
this.removeMovieClip();
}
};
st++;
}
stop();
st = 0;
steamN = 0;
stupidThings = [];
Stage.showMenu = false;
Stage.scaleMode = "noScale";
loader.onEnterFrame = function () {
var _local4 = this._parent.getBytesTotal();
var _local5 = this._parent.getBytesLoaded();
if (_local4 > 0) {
if (_local5 < _local4) {
this.gotoAndStop(Math.ceil((_local5 / _local4) * 100));
if (Math.random() > 0.96) {
this._parent.makeStupidThing();
}
if (Math.random() > 0.4) {
var _local7 = this._parent.steamMC.attachMovie("steam", "st" + this._parent.steamN, this._parent.steamN++);
_local7.onEnterFrame = function () {
this._y = this._y - 4;
this._x = this._x - (1 + Math.random());
};
}
} else {
sth = this._parent.stupidThings;
var _local3 = 0;
while (_local3 < sth.length) {
delete sth[_local3].onEnterFrame;
sth[_local3].removeMovieClip();
_local3++;
}
var _local6 = new Sound(_root);
_local6.attachSound("hornSound");
_local6.start();
this._parent.gotoAndStop("game");
}
}
};
Frame 39
function getDistance(x1, y1, x2, y2) {
return(Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))));
}
function getAngle(x1, y1, x2, y2) {
return(Math.atan2(y2 - y1, x2 - x1) / PiRads);
}
function Point(x, y) {
this.x = x;
this.y = y;
}
function delStartButs() {
delete startScreen.easyB.onRelease;
delete startScreen.pubB.onRelease;
delete startScreen.instructionsBut.onRelease;
delete startScreen.sendFriendB.onRelease;
}
function showStart() {
delete highscores.sendToFriend.onRelease;
delete soundToggle.soundOffBut.onRelease;
delete soundToggle.soundOnBut.onRelease;
bgMusic.stop();
clearObjs();
iLScreen._visible = false;
instructions._visible = false;
highscores._visible = false;
noiseOmeter._visible = false;
scoreBoard._visible = false;
startScreen._visible = true;
backGrounds._visible = false;
soundToggle._visible = false;
startScreen.startB.onRelease = function () {
startGame();
};
startScreen.terms.onRelease = function () {
getURL ("javascript:openwin('../terms/game.asp','terms','500','450','scrollbars=yes,status=no,resizable=yes,toolbar=no,menubar=no,directories=no,location=no');");
};
startScreen.highScoresB.onRelease = showHighScoresMenu;
startScreen.sendFriendB.txt = "Send to a Friend";
}
function showSendToFriend() {
iLScreen._visible = true;
delStartButs();
iLScreen.gotoAndPlay("in");
iLScreen.intL.gotoAndStop("sendToFriend");
iLScreen.intL.but0.txt = "Send";
iLScreen.intL.but1.txt = "Back";
iLScreen.intL.but0.onRelease = send2Friend;
iLScreen.intL.but1.onRelease = showStart;
}
function startGame() {
delStartButs();
startScreen._visible = false;
noiseOmeter._visible = true;
scoreBoard._visible = true;
backGrounds._visible = true;
soundToggle._visible = true;
score = 0;
level = 0;
startLevel();
timePlaying = 0;
totalFrames = 0;
}
function startLevel() {
clearObjs();
if (level == OFFICE) {
difficulty = 0;
} else if (level == PUB) {
difficulty = 0.2;
} else if (level == LIBRARY) {
difficulty = 0.25;
}
numframes = 0;
pauseB.onPress = pauseGame;
paused = false;
playing = true;
pivotX = deskX;
pivotY = (startY = floorY - legHeight);
potNoodlesGot = 0;
numObjects = 0;
personNum = 0;
bObNum = 0;
looking = 0;
objectsFallen = 0;
objects = [];
bObjectsArray = [];
peopleArray = [];
theScreen = createEmptyMovieClip("scr", screenDepth);
wholeDesk = theScreen.createEmptyMovieClip("wd", wdDepth);
wholeDesk._x = pivotX;
wholeDesk._y = pivotY;
scale = 66;
theScreen._xscale = (theScreen._yscale = scale);
floor = theScreen.attachMovie("floor", "fl", floorDepth);
floor._y = floorY;
floor._x = 400;
floor.floor.gotoAndStop(level + 1);
theHorn = theScreen.attachMovie("horn", "horn", hornDepth);
theHorn._x = 400;
theHorn._y = floorY - 185;
bg.gotoAndStop(level + 1);
backGrounds.gotoAndStop(level + 1);
bg._x = (bg._y = -7);
d = new Desk(0, 0);
cumHeight = 0;
framesTaken = 0;
maxForce = 0;
count = 0;
deskWeight = d.force;
downwardsPressure = 0;
if (level == OFFICE) {
var _local14 = "potNoodle" + Math.floor(Math.random() * 3);
var _local10 = new Keyboard(50);
var _local16 = new Monitor(100);
var _local6 = new Phone(-120);
var _local13 = new HolePunch(-90);
var _local11 = new Penpot(140);
inTr = new Intray(-180, y, 10, 0.2, null, "inTray", false);
inTr.amount = 0;
inTr.mc.gotoAndStop(this.amount + 1);
outTray = new Intray(180, y, 10, 0.2, null, "inTray", true);
} else if (level == PUB) {
var _local17 = new Guiness(50);
var _local8 = new Burger(100);
var _local7 = new CockttailGlass(-120);
var _local15 = new Ashtray(50);
var _local12 = new Menu(-50);
var _local13 = new WineGlass(-90);
var _local9 = new Coke(140);
var _local3 = 0;
while (_local3 <= 7) {
_local3++;
}
} else {
var _local3 = 0;
while (_local3 <= 7) {
var _local4 = new libraryItems[_local3]((Math.random() * (halfDesk * 2)) - halfDesk);
_local3++;
}
}
deskYSpeed = 0;
enlargeCount = 0;
enlargeTimer = (getTimer() - (Math.random() * 5000)) - 5000;
clickRChange = 0;
noise = 0;
startTime = getTimer();
wholeDesk.onMouseDown = function () {
rClick = 3;
var _local2 = (_root._xmouse - 275) / 30;
if (_local2 > 5) {
_local2 = 5;
} else if (_local2 < -5) {
_local2 = -5;
}
goDown = (12 - Math.abs(_local2)) - difficulty;
dVal = 6 - Math.abs(_local2);
clickVal = _local2 / 8;
};
wholeDesk.tdEF = tiltDesk2;
wholeDesk.onEnterFrame = gameEF;
noiseOmeter.gotoAndStop(1);
noiseOmeter.red.gotoAndStop(1);
soundToggle.soundOffBut.onRelease = (soundToggle.soundOnBut.onRelease = toggleSound);
lastScore = score;
if (soundOn) {
delete bgMusic;
bgMusic = new Sound();
bgMusic.attachSound("bgMusic");
bgMusic.setVolume(100);
bgMusic.start(0, 1000);
}
barkTimer = (groanTimer = getTimer());
floor.legs.gotoAndStop(level + 1);
floor.chairBack.gotoAndStop(level + 1);
}
function nextLevel() {
if (canPress) {
delete iLScreen.intL.but0.onRelease;
iLScreen._visible = false;
level++;
startLevel();
}
}
function gameEF() {
numframes++;
moveObjects();
this.tdEF();
var _local2 = (rForce / gFac) * (1 + (difficulty / 2));
deskYSpeed = 0.5 + difficulty;
cumHeight = cumHeight + ((floorY - pivotY) - legHeight);
framesTaken++;
var _local6 = (1 + difficulty) / 2;
if (_local2 > _local6) {
_local2 = _local6;
} else if (_local2 < (-_local6)) {
_local2 = -_local6;
}
if ((rClick--) > 0) {
_local2 = clickVal;
deskYSpeed = -dVal;
if ((getTimer() - groanTimer) > 5000) {
changeExp = false;
groanTimer = getTimer() + (Math.random() * 3000);
groanSound = new Sound();
groanSound.attachSound("groan" + Math.floor(Math.random() * 3));
groanSound.onSoundComplete = function () {
changeExp = true;
headCount = 151;
};
expression = "grimice";
if (soundOn) {
groanSound.setVolume(100);
} else {
groanSound.setVolume(0);
}
groanSound.start();
}
}
if ((pivotY - (deskYSpeed / 10)) < (floorY - legHeight)) {
pivotY = pivotY - (deskYSpeed / 10);
}
if (d.rotate > maxRotate) {
if (_local2 > 0) {
_local2 = 0;
}
d.rotate = maxRotate;
} else if (d.rotate < (-maxRotate)) {
if (_local2 < 0) {
_local2 = 0;
}
d.rotate = -maxRotate;
}
d.rotate = d.rotate + _local2;
this._rotation = (floor.body._rotation = d.rotate);
if ((getTimer() - enlargeTimer) > 10000) {
if (enlargeCount == 0) {
if (soundOn) {
var _local7 = new Sound(this.parent.noiseOmeter);
_local7.attachSound("hornGrow");
_local7.start();
}
}
if ((enlargeCount++) < 15) {
pivotY = pivotY - (1 + (difficulty / 2));
} else {
enlargeCount = 0;
enlargeTimer = getTimer() - (Math.random() * 5000);
_local6 = Math.random();
if ((_local6 > 0.75) || (level != OFFICE)) {
evilAddObject();
} else {
inTr.addTo();
}
if (_local6 > 0.5) {
var _local9 = "potNoodle" + Math.floor(Math.random() * 3);
var _local10 = new floatBObject((Math.random() * 600) + 100, -25, _local9, 4, 0.1, isOnDesk);
} else {
var _local9 = "potNoodle" + Math.floor(Math.random() * 3);
var _local11 = new peopleA[level][Math.floor(Math.random() * peopleA[level].length)](_local9);
}
}
var _local8 = (getTimer() - startTime) / (numframes * 32.258064516129);
difficulty = difficulty + (0.015 * (_local8 * _local8));
}
for (var _local5 in bObjectsArray) {
if (bObjectsArray[_local5].mc.onMouseUp != undefined) {
} else {
bObjectsArray[_local5].ef();
}
}
for (var _local5 in peopleArray) {
peopleArray[_local5].ef();
}
var _local3 = Math.ceil(startY - pivotY);
floor.body.arms.frame = _local3;
floor.body.arms.gotoAndStop(_local3);
theHorn.gotoAndStop(_local3);
upP = "Height:" + _local3;
if (_local3 > 79) {
pivotY = startY - 79;
difficulty = difficulty + 0.1;
}
if (_xmouse < 180) {
looking = 0;
floor.body.head.gotoAndStop(2);
floor.body.head.head.gotoAndStop(expression);
} else if (_xmouse < 320) {
looking = 1;
floor.body.head.gotoAndStop(1);
floor.body.head.head.gotoAndStop(expression);
} else {
looking = 2;
floor.body.head.gotoAndStop(3);
floor.body.head.head.gotoAndStop(expression);
}
if (((headCount++) > 150) && (changeExp)) {
headCount = Math.ceil(Math.random() * 110);
if ((_local3 < 40) && (Math.abs(d.rotate) < (absMaxRotate / 2))) {
expression = expressions[Math.floor(Math.random() * expressions.length)];
} else {
expression = expressions2[Math.floor(Math.random() * expressions2.length)];
}
floor.body.head.head.gotoAndStop(expression);
}
goDown = 0;
clickRChange = 0;
var _local4 = Math.floor((getTimer() - startTime) / 10);
score = (lastScore + _local4) + (potNoodlesGot * 1000);
_local4 = _local4 / 100;
if ((_local4 % 0.1) != 0) {
noiseOmeter.time = _local4 + " seconds";
}
if (noise > 0) {
if (noiseOmeter._currentframe < Math.ceil((noise / noiseLimit) * 100)) {
noiseOmeter.nextFrame();
} else if (noiseOmeter._currentframe > Math.ceil((noise / noiseLimit) * 100)) {
noiseOmeter.prevFrame();
}
noiseOmeter.red.gotoAndStop(Math.ceil((noise / noiseLimit) * 100));
if (noise >= noiseLimit) {
noise = noiseLimit;
gameOver();
wholeDesk.onEnterFrame = endEF;
noiseOmeter.play();
} else {
noise = noise - 0.01;
}
}
}
function endEF() {
isFin = true;
var _local2 = 0;
for (var _local3 in bObjectsArray) {
bObjectsArray[_local3].ef();
_local2++;
}
for (var _local3 in objects) {
objects[_local3].ef();
_local2++;
}
if (_local2 == 0) {
delete this.onEnterFrame;
}
}
function makeBut() {
iLScreen.intL.but0.onRelease = nextLevel;
clearInterval(butInt);
}
function makeEndBut() {
iLScreen.intL.but0.onRelease = showSubmitScore;
iLScreen.intL.but1.onRelease = showStart;
clearInterval(butInt);
}
function gameOver() {
delete soundToggle.soundOffBut.onRelease;
delete soundToggle.soundOnBut.onRelease;
bgMusic.stop();
if (soundOn) {
var _local3 = new Sound(theScreen);
_local3.attachSound("hornSound");
_local3.start();
}
iLScreen._visible = true;
iLScreen.gotoAndPlay("in");
if ((level < 2) && ((score - lastScore) >= pointsBar[level])) {
iLScreen.intL.gotoAndStop("nextLevel");
iLScreen.intL.title = "Level Finished";
butInt = setInterval(makeBut, 1200);
iLScreen.intL.but0.txt = "Next Level";
} else {
iLScreen.intL.gotoAndStop("gameOver");
iLScreen.intL.title = "Game Over";
iLScreen.intL.but0.txt = "Submit Score";
iLScreen.intL.but1.txt = "Exit";
butInt = setInterval(makeEndBut, 1200);
}
var _local1 = Math.floor((getTimer() - startTime) / 10);
_local1 = _local1 / 100;
timePlaying = timePlaying + _local1;
totalFrames = totalFrames + numframes;
trace((("totalFrames:" + totalFrames) + ", numframes:") + numframes);
iLScreen.intL.timeT.text = ("Time lasted: " + _local1) + " seconds";
iLScreen.intL.timeTb.text = "x100 = " + (_local1 * 100);
iLScreen.intL.potN.text = "Pot Noodles grabbed: " + potNoodlesGot;
iLScreen.intL.potNb.text = "x1000 = " + (potNoodlesGot * 1000);
iLScreen.intL.totalScore.text = "Total Score: " + score;
canPress = false;
floor.body.head.head.gotoAndStop("bad");
for (var _local2 in objects) {
if (objects[_local2].ef == null) {
if (objects[_local2].mc2.onMouseUp != undefined) {
delete objects[_local2].mc2.onMouseUp;
objects[_local2].mc2.stopDrag();
objects[_local2].ef = objFall2;
} else {
delete objects[_local2].mc.onPress;
delete objects[objects[_local2].num];
}
}
}
for (var _local2 in bObjectsArray) {
bObjectsArray[_local2].ef = fallDown;
delete bObjectsArray[_local2].mc.onPress;
delete bObjectsArray[_local2].mc.onMouseUp;
bObjectsArray[_local2].mc.stopDrag();
}
for (var _local2 in peopleArray) {
delete peopleArray[_local2].ef;
delete peopleArray[_local2].mc.clickPlace.onPress;
}
}
function toggleSound() {
if (soundOn) {
soundOn = false;
bgMusic.stop();
stopAllSounds();
soundToggle.soundOnBut._visible = false;
soundToggle.soundOffBut._visible = true;
} else {
soundOn = true;
bgMusic.setVolume(100);
bgMusic.start(0, 1000);
soundToggle.soundOnBut._visible = true;
soundToggle.soundOffBut._visible = false;
}
}
function gObject() {
}
function MiscObj() {
this.d = objectDepth;
this.init(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.canPutOn = [sqaure];
}
function Intray() {
this.d = aObjectsDepth;
this.init(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], out);
if (arguments[6]) {
this.mc.inOut = "OUT";
} else {
this.mc.inOut = "IN";
this.mc.onPress = function () {
this.myObject.takeFrom();
};
}
this.out = arguments[6];
this.amount = 0;
this.mc.gotoAndStop(this.amount + 1);
}
function FallingObject(x, y, num, h, w) {
}
function addObject() {
var _local1 = (Math.random() * 400) - 200;
var _local2 = "potNoodle" + Math.floor(Math.random() * 3);
var _local3 = new MiscObj(_local1, y, 4, 0.07, takeOffTable, _local2);
}
function evilAddObject() {
if (rForce <= 0) {
var _local3 = 180 - (Math.random() * 150);
} else {
var _local3 = -180 + (Math.random() * 150);
}
var _local1 = new itemsList[level][Math.floor(Math.random() * itemsList[level].length)](_local3);
if (_local1.isDog && (soundOn)) {
var _local2 = new Sound(_local1.mc);
_local2.attachSound("bark" + Math.floor(Math.random() * 2));
_local2.start();
}
}
function moveObjects() {
maxForce = 0;
rForce = 0;
for (var _local6 in objects) {
if (objects[_local6].onTable) {
maxForce = maxForce + (Math.sin((d.rotate - 90) * PiRads) * (objects[_local6].force * (halfDesk / 2)));
var _local1 = Math.cos((d.rotate - 90) * PiRads) * objects[_local6].force;
var _local4 = Math.sin((d.rotate - 90) * PiRads) * objects[_local6].force;
var _local2 = Math.abs(_local4 * objects[_local6].coEf);
if (objects[_local6].xSpeed > 0) {
objects[_local6].xSpeed = objects[_local6].xSpeed - (_local2 - _local1);
if (objects[_local6].xSpeed < 0) {
objects[_local6].xSpeed = 0;
} else if (objects[_local6].xSpeed > maxSpeed) {
objects[_local6].xSpeed = maxSpeed;
}
} else if (objects[_local6].xSpeed < 0) {
objects[_local6].xSpeed = objects[_local6].xSpeed + (_local2 + _local1);
if (objects[_local6].xSpeed > 0) {
objects[_local6].xSpeed = 0;
} else if (objects[_local6].xSpeed < (-maxSpeed)) {
objects[_local6].xSpeed = -maxSpeed;
}
} else if (Math.abs(_local1) > _local2) {
var _local5 = Math.abs(_local1) - _local2;
if (_local1 < 0) {
_local5 = _local5 * -1;
}
objects[_local6].xSpeed = objects[_local6].xSpeed + _local5;
}
rForce = rForce - (_local4 * objects[_local6].x);
objects[_local6].x = objects[_local6].x + objects[_local6].xSpeed;
if (objects[_local6].x > halfDesk) {
objects[_local6].ef = objFall2;
objects[_local6].x = halfDesk;
objects[_local6].onTable = false;
objects[_local6].fallRight = true;
var _local3 = objects[_local6].deskToOutside();
objects[_local6].fObject(_local3.x, _local3.y);
objects[_local6].rSpeed = 0.5;
} else if (objects[_local6].x < (-halfDesk)) {
objects[_local6].ef = objFall2;
objects[_local6].x = -halfDesk;
objects[_local6].onTable = false;
objects[_local6].fallRight = false;
var _local3 = objects[_local6].deskToOutside();
objects[_local6].fObject(_local3.x, _local3.y);
objects[_local6].rSpeed = -0.5;
}
objects[_local6].mc._x = objects[_local6].x;
} else {
objects[_local6].ef();
}
}
}
function clearObjs() {
theScreen.removeMovieClip();
for (var _local1 in objects) {
objects[_local1].mc.removeMovieClip();
objects[_local1].mc2.removeMovieClip();
}
}
function takeOffTable() {
var _local3 = this.myObject.deskToOutside();
this.myObject.mc2 = theScreen.attachMovie(this.myObject.clipName, "genObject" + this.myObject.num, heldObjectsDepth + this.myObject.num);
this.myObject.mc2.myObject = this.myObject;
this.myObject.x = (this.myObject.mc2._x = _local3.x);
this.myObject.y = (this.myObject.mc2._y = _local3.y);
this.myObject.mc2.startDrag();
this.myObject.onTable = false;
if (soundOn == "what?") {
if (this.myObject.isDog) {
var _local6 = new Sound(this.myObject.mc2);
_local6.attachSound("bark" + Math.floor(Math.random() * 2));
_local6.start();
} else {
var _local5 = new Sound(this.myObject.mc2);
_local5.attachSound("putOnTable");
_local5.start();
}
}
this.myObject.mc2.onMouseUp = function () {
this.stopDrag();
this.myObject.x = this._x;
this.myObject.y = this._y;
var _local3 = outSideToDesk((this._x * scale) / 100, (this._y * scale) / 100);
var _local2 = false;
for (var _local4 in this.myObject.canPutOn) {
if (this.hitTest(this.myObject.canPutOn[_local4])) {
score = score + this.myObject.AScore;
this.myObject.givenAct();
delete objects[this.myObject.num];
delete this.myObject;
this.removeMovieClip();
_local2 == true;
}
}
if (!_local2) {
if ((((_local3.x < halfDesk) && (_local3.x > (-halfDesk))) && (_local3.y > -30)) && (_local3.y < 30)) {
this.myObject.mc = wholeDesk.attachMovie(this.myObject.clipName, "genObject" + this.myObject.num, objectDepth + this.myObject.num);
this.myObject.mc._x = (this.myObject.x = _local3.x);
this.myObject.y = (this.myObject.mc._y = 0);
this.myObject.mc._height = this.myObject.h;
this.myObject.mc._width = this.myObject.w;
this.myObject.mc.myObject = this.myObject;
objects[this.myObject.num] = this.myObject;
this.myObject.mc.onPress = takeOffTable;
this.myObject.onTable = true;
if (soundOn) {
if (this.myObject.isDog) {
if ((getTimer() - barkTimer) > 1000) {
barkTimer = getTimer();
var _local6 = new Sound(this.myObject.mc);
_local6.attachSound("bark" + Math.floor(Math.random() * 2));
_local6.start();
}
} else {
var _local5 = new Sound(this.myObject.mc);
_local5.attachSound("putOnTable");
_local5.start();
}
}
this.removeMovieClip();
} else {
this.myObject.ef = objFall;
objects[this.myObject.num] = this.myObject;
}
}
delete this.onMouseUp;
};
this.ef = true;
this.myObject.xSpeed = 0;
this.myObject.ySpeed = 0;
this.removeMovieClip();
}
function returnToTable() {
}
function outSideToDesk(x, y) {
var _local1 = new Point(x, y);
wholeDesk.globalToLocal(_local1);
return(_local1);
}
function objFall2() {
var _local3 = Math.abs(Math.sin(this.rotate * PiRads) * (this.w / 2));
if (((this.mc2._y + _local3) >= floorY) && (this.ySpeed > 0)) {
if (this.volume > 0) {
if (soundOn) {
var _local2 = new Sound(this.mc2);
_local2.attachSound("fall" + Math.floor(Math.random() * 4));
this.volume = this.volume - 25;
_local2.start();
}
}
this.ySpeed = this.ySpeed * -0.5;
this.xSpeed = this.xSpeed * 0.8;
if (this.rotate >= 0) {
var _local4 = Math.cos(this.rotate * PiRads) * (this.w / 2);
var _local5 = Math.sin(this.rotate * PiRads) * (this.h / 2);
if ((_local5 < _local4) && (this.rSpeed > 0)) {
this.rSpeed = this.rSpeed * -0.7;
}
} else {
var _local4 = Math.cos(this.rotate * PiRads) * (this.w / 2);
var _local5 = Math.sin(this.rotate * PiRads) * (this.h / 2);
if ((_local5 < _local4) && (this.rSpeed < 0)) {
this.rSpeed = this.rSpeed * -0.7;
}
}
if (this.ySpeed < 0.3) {
if ((((this.rotate < 2) && (this.rotate > -2)) || ((this.rotate < 92) && (this.rotate > 88))) || ((this.rotate < -88) && (this.rotate > -92))) {
delete objects[this.num];
}
}
if (!this.hasHit) {
this.hasHit = true;
noise = noise + this.force;
}
}
if (this.rotate > 90) {
this.rotate = 90;
} else if (this.rotate < -90) {
this.rotate = -90;
} else {
this.mc2._rotation = (this.rotate = this.rotate + this.rSpeed);
}
this.mc2._x = this.mc2._x + this.xSpeed;
this.mc2._y = this.mc2._y + this.ySpeed;
this.ySpeed = this.ySpeed + 0.2;
}
function objFall() {
if ((this.y < floorY) || (this.ySpeed < 0)) {
this.mc2._y = (this.y = this.y + ((this.ySpeed = this.ySpeed + 0.3)));
if (this.ySpeed > 7) {
this.ySpeed = 7;
}
} else {
if (this.ySpeed < 0.2) {
delete objects[this.num];
} else {
if (this.volume > 0) {
if (soundOn) {
var _local2 = new Sound(this.mc2);
_local2.attachSound("fall" + Math.floor(Math.random() * 4));
this.volume = this.volume - 25;
_local2.start();
}
}
this.ySpeed = this.ySpeed * -0.5;
}
if (!this.hasHit) {
this.hasHit = true;
noise = noise + this.force;
}
}
}
function followMouse() {
this.x = (this.mc._x = _xmouse);
this.y = (this.mc._y = _ymouse);
}
function Desk(x, y) {
this.mc = wholeDesk.attachMovie("desk" + level, "desk", deskDepth);
this.rSpeed = 0.1;
this.rotate = 0;
this.x = (this.mc._x = x);
this.y = (this.mc._y = y);
this.h = 170;
this.w = 400;
this.pivotH = getDistance(0, 0, halfDesk, legHeight);
this.pivotAngle = getAngle(0, 0, halfDesk, legHeight);
this.mass = 10;
this.force = this.mass * grav;
}
function tiltDesk2() {
if ((pivotY + d.pivotH) > floorY) {
var _local2 = Math.acos((floorY - pivotY) / d.pivotH) / PiRads;
maxRotate = (90 - d.pivotAngle) - _local2;
} else {
var _local2 = Math.acos(((floorY - d.pivotH) + 1) / d.pivotH) / PiRads;
maxRotate = (90 - d.pivotAngle) - _local2;
}
if (maxRotate > absMaxRotate) {
maxRotate = absMaxRotate;
} else if (maxRotate < (-absMaxRotate)) {
maxRotate = -absMaxRotate;
}
wholeDesk._x = pivotX;
wholeDesk._y = pivotY;
if (d.rotate > maxRotate) {
d.rotate = maxRotate;
} else if (d.rotate < (-maxRotate)) {
d.rotate = -maxRotate;
}
this._rotation = d.rotate;
}
function BObject() {
}
function floatBObject() {
this.init(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]);
this.ef = (this.efS = floatDown);
this.mc.onPress = tryToPlace;
bObjectsArray[this.num] = this;
}
function gotBObject() {
this.init(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]);
this.mc.startDrag();
this.mc.onMouseUp = this.action;
this.ef = fallDown;
}
function Person(x, y, type, action, amount, item, ef) {
this.mc = theScreen.attachMovie("person" + type, "person" + personNum, peopleDepth + personNum);
this.mc._x = (this.x = -500);
this.mc.myObject = this;
this.mc.gType = item;
peopleArray[personNum] = this;
this.num = personNum;
this.bx = -60;
this.by = -200;
this.mc.myObject = this;
this.action = action;
this.amount = amount;
this.item = item;
this.state = 0;
personNum++;
this.onP = getItem;
this.ef = ef;
this.notGot = true;
}
function Jon(item) {
this.pType = 1;
if (Math.random() > 0.5) {
this.ef = slideRight;
} else {
this.ef = slideLeft;
}
this.bx = -200;
this.by = -160;
this.item = item;
this.init();
if (soundOn) {
var _local2 = new Sound(this.mc);
_local2.attachSound("eheheh");
_local2.start();
}
}
function Dan(item) {
this.pType = 5;
if (Math.random() > 0.5) {
this.ef = slideRight;
} else {
this.ef = slideLeft;
}
this.bx = -80;
this.by = -300;
this.item = item;
this.init();
if (soundOn) {
var _local2 = new Sound(this.mc);
_local2.attachSound("scream");
_local2.start();
}
}
function Seb(item) {
this.pType = 0;
if (Math.random() > 0.5) {
this.ef = walkFromRight;
} else {
this.ef = walkFromLeft;
}
this.bx = -200;
this.by = -160;
this.item = item;
this.init();
}
function Des(item) {
this.pType = 2;
if (Math.random() > 0.5) {
this.ef = walkFromRight;
} else {
this.ef = walkFromLeft;
}
this.bx = -200;
this.by = -160;
this.item = item;
this.init();
}
function Jaime(item) {
this.pType = 4;
if (Math.random() > 0.5) {
this.ef = walkFromRight;
} else {
this.ef = walkFromLeft;
}
this.bx = -200;
this.by = -160;
this.item = item;
this.init();
if (soundOn) {
var _local2 = new Sound(this.mc);
_local2.attachSound("alrightMate");
_local2.start();
}
}
function Naz(item) {
this.pType = 3;
this.ef = nazChair1;
this.bx = -60;
this.by = -200;
this.item = item;
this.init();
if (soundOn) {
var _local2 = new Sound(this.mc);
_local2.attachSound("ahYa");
_local2.start();
}
}
function getItem() {
var _local3 = this._parent.myObject;
var _local4 = new gotBObject((_xmouse / scale) * 100, (_ymouse / scale) * 100, _local3.item, 4, 0.2, isOnDesk);
var _local5 = placeOnDesk;
this._parent.gotoAndPlay("giveItem");
_local3.state++;
if (soundOn) {
var _local2 = new Sound(this._parent);
_local2.attachSound("getPot");
_local2.start();
}
_local4.mc.a();
delete this.onPress;
}
function walkLeft() {
this.mc._x = (this.x = this.x - 1);
}
function floatDown() {
this.mc._y = (this.y = this.y + 1);
if (this.y > 650) {
this.mc.removeMovieClip();
delete bObjectsArray[this.num];
}
}
function fallDown() {
if ((this.y < floorY) || (this.ySpeed < 0)) {
this.mc._y = (this.y = this.y + ((this.ySpeed = this.ySpeed + 0.3)));
if (this.ySpeed > 7) {
this.ySpeed = 7;
}
} else {
if (!this.hasHit) {
this.hasHit = true;
noise = noise + (this.mass * grav);
trace("fallDown" + this.mc._y);
}
if (this.ySpeed < 0.2) {
delete bObjectsArray[this.num];
} else {
this.ySpeed = this.ySpeed * -0.5;
}
}
}
function tryToPlace() {
delete bObjectsArray[this.myObject.num];
this.startDrag();
if (soundOn) {
var _local2 = new Sound(this);
_local2.attachSound("getPot");
_local2.start();
}
this.onMouseUp = this.myObject.action;
}
function isOnAnyObject() {
delete this.onMouseUp;
this.stopDrag();
this.myObject.x = this.mc._x;
this.myObject.y = this._y;
var _local2 = false;
for (var _local3 in objects) {
if (this.hitTest(objects[_local3].mc)) {
_local2 = true;
this.myObject.doPlace(objects[_local3]);
}
}
if (_local2) {
delete this.myObject;
this.removeMovieClip();
} else {
bObjectsArray[this.myObject.num] = this.myObject;
}
}
function isOnDesk() {
delete this.onMouseUp;
this.stopDrag();
this.myObject.x = this._x;
this.myObject.y = this._y;
var _local2 = outSideToDesk((this._x * scale) / 100, (this._y * scale) / 100);
if ((((_local2.x < halfDesk) && (_local2.x > (-halfDesk))) && (_local2.y > -30)) && (_local2.y < 30)) {
var _local4 = new MiscObj(_local2.x, 0, this.myObject.mass, this.myObject.coEf, takeOffTable, this.myObject.clipName);
delete this.myObject;
potNoodlesGot++;
scoreBoard.flash.gotoAndPlay("flash");
if (soundOn) {
var _local3 = new Sound(this);
_local3.attachSound("putPot");
_local3.start();
}
this.removeMovieClip();
} else {
bObjectsArray[this.myObject.num] = this.myObject;
}
}
function isOnSpecificObject() {
delete this.onMouseUp;
this.stopDrag();
this.myObject.x = this._x;
this.myObject.y = this._y;
var _local2 = false;
if (this.hitTest(this.myObject.targ.mc)) {
_local2 = true;
this.myObject.doHit();
}
if (_local2) {
delete this.myObject;
this.removeMovieClip();
} else {
bObjectsArray[this.myObject.num] = this.myObject;
}
}
function pritStick(o) {
o.coEf = this.coEf;
}
function walkFromRight() {
switch (this.state) {
case 0 :
this.x = (this.mc._x = 900);
this.y = (this.mc._y = floorY);
this.state = 1;
break;
case 1 :
if (this.x > 700) {
this.mc._x = (this.x = this.x - 6);
} else {
this.mc.gotoAndPlay("show");
this.state++;
this.waitCount = 0;
this.notGot = true;
this.mc.clickPlace.onPress = getItem;
if (soundOn) {
var _local2 = new Sound(o.mc);
_local2.attachSound("whistle");
_local2.start();
}
}
break;
case 2 :
if ((this.waitCount++) > 200) {
delete this.mc.clickPlace.onPress;
this.mc.gotoAndPlay("leave");
this.state++;
}
break;
case 3 :
break;
case 4 :
if (this.x < 900) {
this.mc._x = (this.x = this.x + 6);
} else {
delete peopleArray[this.num];
this.mc.removeMovieClip();
}
}
}
function walkFromLeft() {
switch (this.state) {
case 0 :
this.x = (this.mc._x = -100);
this.y = (this.mc._y = floorY);
this.mc._xscale = -100;
this.state = 1;
break;
case 1 :
if (this.x < 100) {
this.mc._x = (this.x = this.x + 6);
} else {
this.mc.gotoAndPlay("show");
this.state++;
this.waitCount = 0;
this.notGot = true;
this.mc.clickPlace.onPress = getItem;
if (soundOn) {
var _local2 = new Sound(o.mc);
_local2.attachSound("whistle");
_local2.start();
}
}
break;
case 2 :
if ((this.waitCount++) > 200) {
delete this.mc.clickPlace.onPress;
this.mc.gotoAndPlay("leave");
this.state++;
}
break;
case 3 :
break;
case 4 :
if (this.x > -100) {
this.mc._x = (this.x = this.x - 6);
} else {
delete peopleArray[this.num];
this.mc.removeMovieClip();
}
}
}
function nazChair1() {
switch (this.state) {
case 0 :
this.x = (this.mc._x = 900);
this.y = (this.mc._y = floorY);
this.notGot = true;
this.state++;
break;
case 1 :
if (this.x > 200) {
this.mc._x = (this.x = this.x - 8);
} else {
this.mc.clickPlace.onPress = getItem;
this.mc.gotoAndPlay("spin");
this.state++;
this.waitCount = 0;
if (soundOn) {
var _local2 = new Sound(o.mc);
_local2.attachSound("whistle");
_local2.start();
}
}
break;
case 2 :
if ((this.waitCount++) > 100) {
delete this.mc.clickPlace.onPress;
this.mc.gotoAndStop("leave");
this.state++;
}
break;
case 3 :
if (this.x < 900) {
this.mc._x = (this.x = this.x + 8);
} else {
delete peopleArray[this.num];
this.mc.removeMovieClip();
}
}
}
function slideLeft() {
switch (this.state) {
case 0 :
this.x = (this.mc._x = 900);
this.y = (this.mc._y = floorY);
this.notGot = true;
this.state++;
this.mc.clickPlace.onPress = getItem;
this.mc.gotoAndPlay("loop");
if (soundOn) {
var _local2 = new Sound(o.mc);
_local2.attachSound("whistle");
_local2.start();
}
break;
case 1 :
if (this.x > -100) {
this.mc._x = (this.x = this.x - 8);
} else {
delete peopleArray[this.num];
this.mc.removeMovieClip();
}
break;
case 2 :
if (this.x < 900) {
this.mc._x = (this.x = this.x + 8);
} else {
delete peopleArray[this.num];
this.mc.removeMovieClip();
}
}
}
function slideRight() {
switch (this.state) {
case 0 :
this.x = (this.mc._x = -100);
this.y = (this.mc._y = floorY);
this.notGot = true;
this.mc._xscale = -100;
this.state++;
this.mc.clickPlace.onPress = getItem;
this.mc.gotoAndPlay("loop");
if (soundOn) {
var _local2 = new Sound(o.mc);
_local2.attachSound("whistle");
_local2.start();
}
break;
case 1 :
if (this.x < 800) {
this.mc._x = (this.x = this.x + 8);
} else {
delete peopleArray[this.num];
this.mc.removeMovieClip();
}
break;
case 2 :
if (this.x > -80) {
this.mc._x = (this.x = this.x - 8);
} else {
delete peopleArray[this.num];
this.mc.removeMovieClip();
}
}
}
function PotNoodle(x) {
this.mass = 4;
this.coEf = 0.2;
this.action = takeOffTable;
this.clipName = "potNoodle" + Math.floor(Math.random() * 3);
this.canPutOn = [sqaure];
this.AScore = 20;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.isPotNoodle = true;
this.fallSound = 4;
}
function Penpot(x) {
this.mass = 4;
this.coEf = 0.07;
this.action = takeOffTable;
this.clipName = "penPot";
this.canPutOn = [sqaure];
this.AScore = 20;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 0;
}
function HolePunch(x) {
this.mass = 3;
this.coEf = 0.1;
this.action = takeOffTable;
this.clipName = "holePunch";
this.canPutOn = [sqaure];
this.AScore = 20;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
}
function Stapler(x) {
this.mass = 2;
this.coEf = 0.1;
this.action = takeOffTable;
this.clipName = "stapler";
this.canPutOn = [sqaure];
this.AScore = 20;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
}
function Keyboard(x) {
this.mass = 10;
this.coEf = 0.1;
this.action = takeOffTable;
this.clipName = "keyBoard";
this.canPutOn = [sqaure];
this.AScore = 20;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 1;
}
function Monitor(x) {
this.mass = 20;
this.coEf = 0.1;
this.action = null;
this.clipName = "computer";
this.d = objectDepth;
this.init2(x);
this.fallSound = 0;
}
function Phone(x) {
this.mass = 6;
this.coEf = 0.15;
this.action = takeOffTable;
this.clipName = "phone";
this.AScore = 20;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 1;
}
function Mug(x) {
this.mass = 5;
this.coEf = 0.1;
this.action = takeOffTable;
this.clipName = "mug";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 0;
}
function WineGlass(x) {
this.mass = 4;
this.coEf = 0.09;
this.action = takeOffTable;
this.clipName = "wineGlass";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 0;
}
function CockttailGlass(x) {
this.mass = 3;
this.coEf = 0.08;
this.action = takeOffTable;
this.clipName = "cocktailGlass";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 0;
}
function Guiness(x) {
this.mass = 5;
this.coEf = 0.07;
this.action = takeOffTable;
this.clipName = "guiness";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
}
function Coke(x) {
this.mass = 3;
this.coEf = 0.07;
this.action = takeOffTable;
this.clipName = "coke";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
}
function Ashtray(x) {
this.mass = 6;
this.coEf = 0.08;
this.action = takeOffTable;
this.clipName = "ashTray";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 1;
}
function Menu(x) {
this.mass = 2;
this.coEf = 0.06;
this.action = takeOffTable;
this.clipName = "menu";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
}
function Burger(x) {
this.mass = 9;
this.coEf = 0.08;
this.action = takeOffTable;
this.clipName = "burger";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 1;
}
function Laptop(x) {
this.mass = 9;
this.coEf = 0.08;
this.action = takeOffTable;
this.clipName = "lapTop";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 1;
}
function Dog0(x) {
this.mass = 9;
this.coEf = 0.1;
this.action = takeOffTable;
this.clipName = "dog0";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
this.isDog = true;
}
function Dog1(x) {
this.mass = 14;
this.coEf = 0.08;
this.action = takeOffTable;
this.clipName = "dog1";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.isDog = true;
this.fallSound = 0;
}
function Book0(x) {
this.mass = 6;
this.coEf = 0.08;
this.action = takeOffTable;
this.clipName = "book0";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
}
function Book1(x) {
this.mass = 8;
this.coEf = 0.08;
this.action = takeOffTable;
this.clipName = "book1";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
}
function Book2(x) {
this.mass = 4;
this.coEf = 0.1;
this.action = takeOffTable;
this.clipName = "book2";
this.canPutOn = [sqaure];
this.AScore = 10;
this.d = objectDepth;
this.init2(x);
if (this.action != null) {
this.mc.onPress = this.action;
}
this.fallSound = 4;
}
function showHighScoresMenu() {
highscores.sendToFriend.onRelease = sendToFriend;
soundToggle.soundOffBut.onRelease = (soundToggle.soundOnBut.onRelease = toggleSound);
soundToggle._visible = true;
if (soundOn) {
delete bgMusic;
bgMusic = new Sound();
bgMusic.attachSound("bgMusic");
bgMusic.setVolume(100);
bgMusic.start(0, 1000);
}
highscores._visible = true;
iLScreen._visible = false;
startScreen._visible = false;
delete highScoresB.onRelease;
highscores.back.onRelease = showStart;
resetEntered();
results = new LoadVars();
results.onLoad = populateScores;
results.load("/play/get_top10_action.asp");
}
function showHighScoresSubmit() {
highscores.sendToFriend.onRelease = sendToFriend;
soundToggle._visible = true;
soundToggle.soundOffBut.onRelease = (soundToggle.soundOnBut.onRelease = toggleSound);
if (soundOn) {
delete bgMusic;
bgMusic = new Sound();
bgMusic.attachSound("bgMusic");
bgMusic.setVolume(100);
bgMusic.start(0, 1000);
}
clearObjs();
clearInterval(scoreInt);
highscores._visible = true;
iLScreen._visible = false;
startScreen._visible = false;
noiseOmeter._visible = false;
highscores.back.onRelease = showStart;
highscores.arrow._visible = true;
}
function showHighScoreNoSubmit() {
clearObjs();
highscores._visible = true;
iLScreen._visible = false;
startScreen._visible = false;
noiseOmeter._visible = false;
highscores.inf = "If you had submitted your score you would have come x'th";
highscores.back.onRelease = showStart;
}
function showSubmitScore() {
iLScreen.intL.gotoAndStop("submit");
iLScreen.intL.but0.txt = "Submit Score";
iLScreen.intL.name.text = "";
iLScreen.intL.eAddress.text = "";
iLScreen.intL.but0.onRelease = mailcheck;
iLScreen.intL.error._visible = false;
spamMe = 0;
iLScreen.intL.tickBox.onPress = toggleSpam;
iLScreen.intL.tickBox.gotoAndStop("off");
iLScreen.intL.privacyP.onPress = showPrivacy;
}
function sendToFriend() {
getURL ("javascript:sendtofriend(8);");
}
function showPrivacy() {
getURL ("javascript:openwin('../privacy/game.asp','terms','500','450','scrollbars=yes,status=no,resizable=yes,toolbar=no,menubar=no,directories=no,location=no');");
}
function toggleSpam() {
if (spamMe) {
spamMe = 0;
iLScreen.intL.tickBox.gotoAndStop("off");
} else {
spamMe = 1;
iLScreen.intL.tickBox.gotoAndStop("on");
}
}
function mailcheck() {
var _local1 = iLScreen.intL.eAddress;
var _local3 = iLScreen.intL.name;
var _local2 = true;
if ((_local3.text == "") || (_local3.text == null)) {
_local2 = false;
}
if ((_local1.text == "") || (_local1.text == null)) {
_local2 = false;
}
if (_local1.text.indexOf("@") < 1) {
_local2 = false;
}
if (_local1.text.indexOf("@") > (_local1.text.length - 2)) {
trace("error");
_local2 = false;
}
if (_local1.text.indexOf(".") < 1) {
_local2 = false;
}
if (_local1.text.indexOf(".") > (_local1.text.length - 2)) {
_local2 = false;
}
if (!_local2) {
iLScreen.intL.error._visible = true;
if (soundOn) {
var _local4 = new Sound();
_local4.attachSound("whistle");
_local4.start();
}
} else {
trace("ok");
iLScreen.intL.error._visible = false;
details = new Array(_local3.text, _local1.text, spamMe);
resetEntered();
submitScores();
delete iLScreen.intL.but0.onRelease;
delete iLScreen.intL.tickBox.onPress;
delete iLScreen.intL.privacyP.onPress;
scoreInt = setInterval(showHighScoresSubmit, 800);
}
}
function submitScores() {
if (soundOn) {
var _local2 = new Sound();
_local2.attachSound("fax");
_local2.start();
}
var _local3 = totalFrames / timePlaying;
var _local8 = random(100);
var _local7 = random(100);
var _local6 = random(100);
var _local5 = _local3;
var _local4 = random(100);
var _local1 = new LoadVars();
results = new LoadVars();
results.onLoad = populateScores;
_local1.name = details[0];
_local1.email = details[1];
_local1.optin = details[2];
_local1.score = score;
_local1.sendAndLoad("/play/send_score_action.asp", results, "POST");
}
function populateScores() {
for (var _local2 in this) {
if (typeof(this[_local2]) == "string") {
sc = [];
sc = this[_local2].split("|");
}
}
var _local2 = 0;
while (_local2 < 10) {
highscores.table["name" + (_local2 + 1)] = sc[_local2 * 2];
highscores.table["score" + (_local2 + 1)] = sc[(_local2 * 2) + 1];
_local2++;
}
if (sc[20] != undefined) {
highscores.table.playerPos = sc[20];
highscores.table.playerName = sc[21];
highscores.table.playerScore = sc[22];
highscores.arrow._visible = true;
}
}
function resetEntered() {
var _local1 = 1;
while (_local1 <= 10) {
highscores.table["name" + _local1] = "Loading...";
highscores.table["score" + _local1] = "--";
_local1++;
}
highscores.table.playerPos = "";
highscores.table.playerName = "";
highscores.table.playerScore = "";
highscores.arrow._visible = false;
}
Function.prototype.extend = function (superClass) {
this.prototype.__proto__ = superClass.prototype;
this.prototype.__constructor__ = superClass;
ASSetPropFlags(this.prototype, ["__constructor__"], 1);
};
ASSetPropFlags(Function.prototype, ["extend"], 1);
MovieClip.prototype.mcExtends = function (superClass) {
if (typeof(superClass) == "function") {
this.__proto__ = superClass.prototype;
if (typeof(this.attachMovie) == "undefined") {
var _local4 = this.__proto__;
var _local3 = _local4.__proto__.__proto__;
while (_local3 != null) {
_local3 = _local3.__proto__;
_local4 = _local4.__proto__;
}
_local4.__proto__ = MovieClip.prototype;
}
arguments.splice(0, 1);
superClass.apply(this, arguments);
} else {
trace("mcExtends: Incorrect superClass type or path - " + typeof(superClass));
}
};
ASSetPropFlags(MovieClip.prototype, ["mcExtends"], 1);
deskDepth = 10;
objectDepth = 30;
aObjectsDepth = 100;
bgDepth = 2;
floorDepth = 4;
wdDepth = 5;
hornDepth = 6;
peopleDepth = 60;
bObDepth = 100;
heldObjectsDepth = 200;
screenDepth = 9;
noiseDepth = 6;
scoreBoardDepth = 7;
soundTDepth = 14;
intDepth = 12;
highscoresDepth = 11;
grav = 3;
gFac = 2000 * grav;
maxSpeed = 1.5;
absMaxRotate = 10;
noiseLimit = 60;
halfDesk = 250;
legHeight = 200;
floorY = 585;
deskX = 400;
PiRads = (Math.PI/180);
maxRotate = 20;
maxWeight = 200;
soundOn = true;
OFFICE = 1;
PUB = 0;
LIBRARY = 2;
officeItems = [Phone, Mug, Stapler, HolePunch, Penpot];
pubItems = [Dog1, Dog0, Coke, Guiness, WineGlass, CockttailGlass, Ashtray, Menu, Burger];
libraryItems = [Laptop, Book0, Book1, Book2, Penpot];
itemsList = [pubItems, officeItems, libraryItems];
iLScreen._visible = false;
highscores._visible = false;
highscores.swapDepths(highscoresDepth);
iLScreen.swapDepths(intDepth);
noiseOmeter.swapDepths(noiseDepth);
scoreBoard.swapDepths(scoreBoardDepth);
soundToggle.swapDepths(soundTDepth);
soundToggle.soundOnBut._visible = true;
soundToggle.soundOffBut._visible = false;
pointsBar = [3000, 5000];
expressions = ["default", "smile", "frown", "bad", "ooh", "gurn", "smile", "frown", "bad", "ooh"];
expressions2 = ["frown", "bad", "ooh", "gurn"];
headCount = 0;
gObject.prototype.init = function (x, y, mass, coEf, action, clipName) {
this.mc = wholeDesk.attachMovie(clipName, "genObject" + numObjects, this.d + numObjects);
this.mc.myObject = this;
this.clipName = clipName;
this.num = numObjects;
this.x = (this.mc._x = x);
this.y = (this.mc._y = 0);
this.h = this.mc._height;
this.w = this.mc._width;
this.coEf = coEf;
this.mass = mass;
this.force = this.mass * grav;
this.xSpeed = 0;
this.ySpeed = 0;
this.rSpeed = 0;
this.rotate = 0;
objects[this.num] = this;
this.onTable = true;
this.hyp = getDistance(0, 0, h / 2, w / 2);
if (action != null) {
}
this.canPutOn = [sqaure];
this.action = action;
this.hasHit = false;
this.AScore = 20;
numObjects++;
this.ef = null;
this.volume = 100;
};
gObject.prototype.init2 = function (x) {
this.mc = wholeDesk.attachMovie(this.clipName, "genObject" + numObjects, this.d + numObjects);
this.mc.myObject = this;
this.num = numObjects;
this.x = (this.mc._x = x);
this.y = (this.mc._y = 0);
this.h = this.mc._height;
this.w = this.mc._width;
this.force = this.mass * grav;
this.xSpeed = 0;
this.ySpeed = 0;
this.rSpeed = 0;
this.rotate = 0;
objects[this.num] = this;
this.onTable = true;
this.hyp = getDistance(0, 0, h / 2, w / 2);
this.hasHit = false;
numObjects++;
this.ef = null;
this.volume = 100;
};
gObject.prototype.deskToOutside = function () {
var _local4 = wholeDesk._x + (Math.cos(d.rotate * PiRads) * this.x);
var _local3 = wholeDesk._y + (Math.sin(d.rotate * PiRads) * this.x);
var _local2 = new Point(_local4, _local3);
return(_local2);
};
gObject.prototype.fObject = function (x, y) {
this.mc2 = theScreen.attachMovie(this.clipName, "genObject" + this.num, objectDepth + this.num);
this.x = (this.mc2._x = x);
this.y = (this.mc2._y = y);
this.mc2._height = this.h;
this.mc2._width = this.w;
this.mc2._rotation = (this.rotate = d.rotate);
this.xSpeed = Math.cos(d.rotate * PiRads) * this.xSpeed;
this.ySpeed = Math.sin(d.rotate * PiRads) * this.xSpeed;
this.mc.removeMovieClip();
};
MiscObj.extend(gObject);
Intray.extend(gObject);
Intray.prototype.addTo = function () {
this.amount++;
this.mc.gotoAndStop(this.amount + 1);
this.mass++;
this.force = this.mass * grav;
};
Intray.prototype.takeFrom = function () {
if (this.amount > 0) {
this.amount--;
this.mc.gotoAndStop(this.amount + 1);
this.mass--;
this.force = this.mass * grav;
if (!this.out) {
var _local2 = new gotBObject((_xmouse / scale) * 100, (_ymouse / scale) * 100, "work", 5, 0.2, isOnSpecificObject);
_local2.targ = outTray;
_local2.doHit = function () {
outTray.addTo();
noise = noise - 5;
if (noise < 0) {
noise = 0;
floor.noiseBar.gotoAndStop(1);
}
};
}
}
};
BObject.prototype.init = function (x, y, clipName, mass, coEf, action, onHit) {
this.mc = theScreen.attachMovie(clipName, "bObj" + bObNum, bObDepth + bObNum);
this.clipName = clipName;
this.num = bObNum++;
this.h = this.mc._height;
this.w = this.mc._width;
this.coEf = coEf;
this.mass = mass;
this.x = (this.mc._x = x);
this.y = (this.mc._y = y);
this.mc.myObject = this;
this.action = action;
this.xSpeed = (this.ySpeed = 0);
this.doPlace = onHit;
this.hasHit = false;
};
floatBObject.extend(BObject);
gotBObject.extend(BObject);
Person.prototype.init = function () {
this.mc = theScreen.attachMovie("person" + this.pType, "person" + personNum, peopleDepth + personNum);
this.mc._x = (this.x = -500);
this.mc.myObject = this;
this.mc.gType = this.item;
peopleArray[personNum] = this;
this.num = personNum;
this.mc.myObject = this;
this.amount = 1;
this.state = 0;
personNum++;
this.onP = getItem;
this.notGot = true;
};
Jon.extend(Person);
Dan.extend(Person);
Seb.extend(Person);
Des.extend(Person);
Jaime.extend(Person);
Naz.extend(Person);
peopleA = [];
peopleA[0] = [Dan, Jon, Jaime];
peopleA[1] = [Seb, Naz, Jaime, Des];
peopleA[2] = [Des, Dan, Jon];
PotNoodle.extend(gObject);
Penpot.extend(gObject);
HolePunch.extend(gObject);
Stapler.extend(gObject);
Keyboard.extend(gObject);
Monitor.extend(gObject);
Phone.extend(gObject);
Mug.extend(gObject);
WineGlass.extend(gObject);
CockttailGlass.extend(gObject);
Guiness.extend(gObject);
Coke.extend(gObject);
Ashtray.extend(gObject);
Menu.extend(gObject);
Burger.extend(gObject);
Laptop.extend(gObject);
Dog0.extend(gObject);
Dog1.extend(gObject);
Book0.extend(gObject);
Book1.extend(gObject);
Book2.extend(gObject);
showStart();
Symbol 22 MovieClip [steam] Frame 13
this.removeMovieClip();
Symbol 38 MovieClip Frame 1
stop();
Symbol 88 MovieClip [bg] Frame 1
stop();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
stop();
Symbol 119 MovieClip Frame 3
stop();
Symbol 125 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 1
gotoAndPlay(Math.ceil(Math.random * 50));
Symbol 145 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 1
gotoAndPlay(Math.ceil(Math.random() * 90));
Symbol 158 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 2
stop();
Symbol 159 MovieClip Frame 3
stop();
Symbol 169 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 2
stop();
Symbol 169 MovieClip Frame 3
stop();
Symbol 188 MovieClip [inTray] Frame 1
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 2
stop();
Symbol 207 MovieClip Frame 3
stop();
Symbol 211 MovieClip [person0] Frame 1
stop();
Symbol 211 MovieClip [person0] Frame 2
this.giveObj.gotoAndStop(this.gType);
Symbol 211 MovieClip [person0] Frame 8
this.giveObj.gotoAndStop(this.gType);
Symbol 211 MovieClip [person0] Frame 21
if (this.myObject.notGot) {
gotoAndPlay ("loop");
}
Symbol 211 MovieClip [person0] Frame 27
gotoAndStop (1);
this.myObject.state++;
this._xscale = this._xscale * -1;
Symbol 211 MovieClip [person0] Frame 34
gotoAndStop (1);
this.myObject.state++;
this._xscale = this._xscale * -1;
Symbol 220 MovieClip [person2] Frame 1
stop();
Symbol 220 MovieClip [person2] Frame 2
this.giveObj.gotoAndStop(this.gType);
Symbol 220 MovieClip [person2] Frame 8
this.giveObj.gotoAndStop(this.gType);
Symbol 220 MovieClip [person2] Frame 21
if (this.myObject.notGot) {
gotoAndPlay ("loop");
}
Symbol 220 MovieClip [person2] Frame 27
gotoAndStop (1);
this.myObject.state++;
this._xscale = this._xscale * -1;
Symbol 220 MovieClip [person2] Frame 34
gotoAndStop (1);
this.myObject.state++;
this._xscale = this._xscale * -1;
Symbol 233 MovieClip [person3] Frame 1
stop();
this.giveObj.gotoAndStop(this.gType);
Symbol 233 MovieClip [person3] Frame 2
this.giveObj.gotoAndStop(this.gType);
Symbol 233 MovieClip [person3] Frame 24
if (this.myObject.notGot) {
gotoAndPlay ("loop");
}
Symbol 233 MovieClip [person3] Frame 25
stop();
this._xscale = this._xscale * -1;
Symbol 233 MovieClip [person3] Frame 26
stop();
this._xscale = this._xscale * -1;
Symbol 243 MovieClip [horn] Frame 1
stop();
Symbol 248 MovieClip [person5] Frame 1
stop();
Symbol 248 MovieClip [person5] Frame 2
this.giveObj.gotoAndStop(this.gType);
Symbol 248 MovieClip [person5] Frame 8
this.giveObj.gotoAndStop(this.gType);
play();
Symbol 248 MovieClip [person5] Frame 21
if (this.myObject.notGot) {
gotoAndPlay ("loop");
}
Symbol 248 MovieClip [person5] Frame 27
gotoAndStop (1);
this.myObject.state++;
this._xscale = this._xscale * -1;
Symbol 248 MovieClip [person5] Frame 34
gotoAndStop (1);
this._xscale = this._xscale * -1;
Symbol 255 MovieClip [person4] Frame 1
stop();
Symbol 255 MovieClip [person4] Frame 2
this.giveObj.gotoAndStop(this.gType);
Symbol 255 MovieClip [person4] Frame 8
this.giveObj.gotoAndStop(this.gType);
Symbol 255 MovieClip [person4] Frame 21
if (this.myObject.notGot) {
gotoAndPlay ("loop");
}
Symbol 255 MovieClip [person4] Frame 27
gotoAndStop (1);
this.myObject.state++;
this._xscale = this._xscale * -1;
Symbol 255 MovieClip [person4] Frame 34
gotoAndStop (1);
this.myObject.state++;
this._xscale = this._xscale * -1;
Symbol 260 MovieClip [person1] Frame 1
stop();
Symbol 260 MovieClip [person1] Frame 2
this.giveObj.gotoAndStop(this.gType);
Symbol 260 MovieClip [person1] Frame 8
this.giveObj.gotoAndStop(this.gType);
play();
Symbol 260 MovieClip [person1] Frame 21
if (this.myObject.notGot) {
gotoAndPlay ("loop");
}
Symbol 260 MovieClip [person1] Frame 27
gotoAndStop (1);
this.myObject.state++;
this._xscale = this._xscale * -1;
Symbol 260 MovieClip [person1] Frame 34
gotoAndStop (1);
this._xscale = this._xscale * -1;
Symbol 270 MovieClip Frame 1
stop();
Symbol 270 MovieClip Frame 2
stop();
Symbol 270 MovieClip Frame 3
stop();
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
Symbol 273 MovieClip Frame 3
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 2
stop();
Symbol 277 MovieClip Frame 3
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 2
stop();
Symbol 292 MovieClip Frame 3
stop();
Symbol 311 MovieClip Frame 1
stop();
Symbol 311 MovieClip Frame 2
stop();
Symbol 311 MovieClip Frame 3
stop();
Symbol 322 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 2
stop();
Symbol 331 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 2
stop();
Symbol 331 MovieClip Frame 3
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 2
play();
Symbol 332 MovieClip Frame 13
stop();
this._parent.canPress = true;
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 2
stop();
Symbol 337 MovieClip Frame 3
stop();
Symbol 377 MovieClip Frame 1
if (loaded == "1") {
playerName = _parent.playerName;
playerPos = theirpos;
playerScore = _parent.totalScore;
}
Symbol 383 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 2
stop();
Symbol 383 MovieClip Frame 3
stop();
Symbol 391 MovieClip Frame 1
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 395 MovieClip Frame 100
stop();
Symbol 403 MovieClip Frame 1
stop();