Instance of Symbol 3 MovieClip in Frame 1
onClipEvent (load) {
FPSTimer = 0;
}
onClipEvent (enterFrame) {
var date = new Date();
var lagCount = 0;
while (date.getTime() < FPSTimer) {
date = new Date();
lagCount++;
}
FPSTimer = date.getTime() + 20;
}
Frame 2
stopAllSounds();
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar.gotoAndStop(percentLoaded);
Stage.showMenu = false;
Frame 3
if (_root.percentLoaded == 100) {
gotoAndStop (4);
} else {
gotoAndPlay (2);
}
Frame 5
stop();
Frame 6
function gotoFrame(targ) {
_root.gotoAndStop("BLANK");
_root.gotoAndStop(targ);
FADER._alpha = 100;
}
function onEnterFrame() {
if (FADER._alpha > 0) {
FADER._alpha = FADER._alpha - 2;
}
}
function playSound(targ) {
if (_root.muteSound == false) {
sound.gotoAndStop(targ);
sound.gotoAndStop(1);
}
}
function setupSave() {
if (savefile.data.activ8 == undefined) {
savefile.data.activ8 = true;
savefile.data.ACTIVEARRAY = new Array();
savefile.data.NAMEARRAY = new Array();
savefile.data.SLOTNAMEARRAY = new Array();
savefile.data.SLOTLASTDATE = new Array();
savefile.data.SLOTARRAY = new Array();
savefile.data.IDSTORE = new Array();
savefile.data.SCORESTORE = new Array();
savefile.data.DATESTORE = new Array();
savefile.data.SLOTNAMEARRAY[1] = "Player 1";
savefile.data.SLOTNAMEARRAY[2] = "Player 2";
savefile.data.SLOTNAMEARRAY[3] = "Player 3";
savefile.data.flush();
}
if (savefile.data.ACTIVEARRAY[GAMEID] == undefined) {
savefile.data.ACTIVEARRAY[GAMEID] = true;
savefile.data.SLOTLASTDATE[GAMEID] = new Array();
savefile.data.SLOTLASTDATE[GAMEID][1] = "Never";
savefile.data.SLOTLASTDATE[GAMEID][2] = "Never";
savefile.data.SLOTLASTDATE[GAMEID][3] = "Never";
savefile.data.NAMEARRAY[GAMEID] = GAMENAME;
}
}
function eraseSlot(slot) {
var _local1 = 0;
while (_local1 < savefile.data.SLOTARRAY.length) {
if (savefile.data.SLOTARRAY[_local1] == slot) {
savefile.data.SLOTARRAY.splice(_local1, 1);
savefile.data.IDSTORE.splice(_local1, 1);
savefile.data.TIMESTORE.splice(_local1, 1);
savefile.data.SCORESTORE.splice(_local1, 1);
savefile.data.DATESTORE.splice(_local1, 1);
_local1--;
}
_local1++;
}
var _local2 = 0;
while (_local2 < 10) {
if (savefile.data.SLOTLASTDATE[_local2] != undefined) {
savefile.data.SLOTLASTDATE[_local2][slot] = "Never";
}
_local2++;
}
savefile.data.SLOTNAMEARRAY[slot] = "Player " + slot;
saveGame();
}
function saveGame() {
savefile.flush();
}
function shortDate(dateInput) {
return((((((((dateInput.getDate() + " / ") + dateInput.getMonth()) + " / ") + dateInput.getFullYear()) + " ") + checkDigits(dateInput.getHours())) + ":") + checkDigits(dateInput.getMinutes()));
}
function checkDigits(input) {
if (input < 10) {
input = "0" + input;
}
return(input);
}
_root.muteSound = false;
var GAMEID = 0;
var GAMENAME = "ESTIWEIGHT";
var savefile = SharedObject.getLocal("ARMORACTIVEL3");
setupSave();
_root.soundSel = 1;
Frame 7
stop();
userName1.text = savefile.data.SLOTNAMEARRAY[1];
userName2.text = savefile.data.SLOTNAMEARRAY[2];
userName3.text = savefile.data.SLOTNAMEARRAY[3];
userName1Date.text = savefile.data.SLOTLASTDATE[GAMEID][1];
userName2Date.text = savefile.data.SLOTLASTDATE[GAMEID][2];
userName3Date.text = savefile.data.SLOTLASTDATE[GAMEID][3];
_root.GRAPHTIME = undefined;
_root.GRAPHSTRING = " time(s) in total.";
Frame 8
stop();
if (savefile.data.SLOTLASTDATE[GAMEID][_root.SAVESLOT] == "Never") {
graphButton._alpha = 50;
}
_root.score = 0;
_root.ballMax = 2;
_root.holeMax = 2;
_root.roundNum = 1;
_root.ballCount = 0;
stopAllSounds();
playSound("MENU");
Frame 10
function populateGraph(timer) {
var _local8 = new Date();
var _local2 = new Array();
var _local4 = 0;
while (_local4 < savefile.data.DATESTORE.length) {
if ((savefile.data.SLOTARRAY[_local4] == _root.SAVESLOT) && ((savefile.data.DATESTORE[_local4].getTime() > (_local8.getTime() - timer)) || (timer == undefined))) {
_local2.push(_local4);
}
_local4++;
}
GRAPH.startDate.text = shortDate(savefile.data.DATESTORE[_local2[0]]);
GRAPH.endDate.text = shortDate(savefile.data.DATESTORE[savefile.data.DATESTORE.length - 1]);
var _local7 = savefile.data.DATESTORE[_local2[_local2.length - 1]] - savefile.data.DATESTORE[_local2[0]];
_local7 = 350 / _local7;
var _local3 = 0;
while (_local3 < _local2.length) {
var _local5 = savefile.data.DATESTORE[_local2[_local3]].getTime() - savefile.data.DATESTORE[_local2[0]].getTime();
addPoint(_local5 * _local7, savefile.data.SCORESTORE[_local2[_local3]] * -1, savefile.data.DATESTORE[_local2[_local3]]);
_local3++;
}
}
function addPoint(xPos, yPos, ID) {
var _local1 = GRAPH.attachMovie("RGP", "R" + pointCount, pointCount++);
yPos = (yPos / 3) * 2;
_local1._x = xPos;
_local1._y = yPos;
_local1.ID = shortDate(ID);
pointArray.push(_local1);
}
function drawLine() {
var _local1 = 0;
while (_local1 < pointArray.length) {
if (pointArray[_local1 + 1] != undefined) {
GRAPH.moveTo(pointArray[_local1]._x, pointArray[_local1]._y);
GRAPH.lineTo(pointArray[_local1 + 1]._x, pointArray[_local1 + 1]._y);
}
_local1++;
}
}
pointArray = new Array();
pointCount = 0;
cloneArray = new Array();
GRAPH.lineStyle(1, 16777215, 100);
populateGraph(_root.GRAPHTIME);
drawLine();
descText.text = ((("User " + savefile.data.SLOTNAMEARRAY[_root.SAVESLOT]) + " has played ") + pointCount) + _root.GRAPHSTRING;
Frame 11
ENGINE.setMask(SHUTTER);
Frame 12
BF_0 = "Over the course of a day, your brain uses the amount of energy contained in two large bananas.";
BF_1 = "Your brain uses less power than your refrigerator light.";
BF_2 = "Your brain uses a fifth of all your blood.";
BF_3 = "Neurosurgeons can probe the brain while a patient is conscious, as brains cannot feel pain!";
BF_4 = "Albert Einstein's brain may have been smaller than yours, because he was smaller than the average person.";
BF_5 = "An elephant's brain is huge - about six times as large as a human brain, and weighs about 6 KG!";
BF_6 = "The male brain is usually around 15 percent larger than the female brain - but the femal brain is more efficient!";
BF_7 = "The cerebral cortex is the part of the brain that distinguishes humans from other species";
BF_8 = "It is not possible to tickle yourself. The cerebellum, a part of the brain, warns the rest of the brain that you are about to tickle yourself.";
BF_9 = "Your brain is 80% water.";
brainFact = this["BF_" + random(10)];
Symbol 5 MovieClip [HOLE] Frame 1
function onEnterFrame() {
ring_O._rotation = ring_O._rotation + 5;
ring_I._rotation = ring_I._rotation - 5;
}
stop();
Symbol 34 Button
on (release) {
if (_root.EOB._x > 100) {
_root.gamePaused = true;
_root.quitScreen._x = 0;
}
}
on (rollOver, dragOver) {
OptionsDesc.text = "Click here to end the current game.";
}
on (rollOut, dragOut) {
OptionsDesc.text = "Roll over one of the buttons below to view a description of its properties.";
}
Symbol 36 Button
on (release) {
if (_root.soundSel == 1) {
soundText = "Music 2";
stopAllSounds();
_root.muteSound = false;
_root.playSound("MAIN2");
_root.soundSel = 2;
} else if (_root.soundSel == 2) {
_root.soundSel = 3;
soundText = "Muted";
_root.muteSound = true;
stopAllSounds();
} else if (_root.soundSel == 3) {
stopAllSounds();
soundText = "Music 1";
_root.muteSound = false;
_root.playSound("MAIN");
_root.soundSel = 1;
}
}
on (rollOver, dragOver) {
OptionsDesc.text = "Select which music you would like or choose to mute it.";
}
on (rollOut, dragOut) {
OptionsDesc.text = "Roll over one of the buttons below to view a description of its properties.";
}
Symbol 38 Button
on (release) {
if (_root.gamePaused == true) {
_root.gamePaused = false;
PTick._visible = false;
} else {
_root.gamePaused = true;
PTick._visible = true;
}
}
on (rollOver, dragOver) {
OptionsDesc.text = "Click here to pause the game.";
}
on (rollOut, dragOut) {
OptionsDesc.text = "Roll over one of the buttons below to view a description of its properties.";
}
Symbol 48 MovieClip [Area] Frame 1
function onEnterFrame() {
roundNumText = _root.roundNum - 1;
var _local3 = 1;
while (_local3 < 5) {
this["L" + _local3]._alpha = this["L" + _local3]._alpha / 1.1;
_local3++;
}
}
if (_root.soundSel == 1) {
soundText = "Music 1";
} else if (_root.soundSel == 2) {
soundText = "Music 2";
} else if (_root.soundSel == 3) {
soundText = "Muted";
}
Instance of Symbol 17 MovieClip "timerBottom" in Symbol 48 MovieClip [Area] Frame 1
onClipEvent (load) {
_yscale = 0;
}
Symbol 54 MovieClip [Ripple] Frame 1
function onEnterFrame() {
if (_alpha > 0) {
_xscale = (_xscale + 40);
_yscale = (_yscale + 40);
_alpha = (_alpha - 4);
} else {
this.removeMovieClip();
}
if (targ != undefined) {
gotoAndStop(targ);
}
}
var sizer = (random(20) + 40);
stop();
Symbol 57 Button
on (rollOver, dragOver) {
dispText = ID;
}
on (rollOut, dragOut) {
dispText = "";
}
Symbol 63 MovieClip [WeightSphere] Frame 1
function onPress() {
_parent._parent.newRipple(_x, _y);
_root.playSound("BOUNCE2");
this.swapDepths(_parent._parent.BALLS.getNextHighestDepth());
slotHold.contentsWeight = undefined;
slotHold.slotActive = false;
dragActive = true;
}
function onMouseUp() {
if (dragActive == true) {
found = false;
i = 0;
while (i < _parent._parent.slotArray.length) {
if (found == false) {
slot = _parent._parent.slotArray[i];
if (slot.slotActive == false) {
if (_parent._parent.pythag(_x, _y, slot._x, slot._y) < 40) {
slot.slotActive = true;
_root.playSound("BOUNCE" + (random(3) + 3));
_parent._parent.newRipple(slot._x, slot._y, 3);
slot.contentsWeight = weight;
slotHold = slot;
found = true;
}
}
}
i++;
}
if (found == false) {
_parent._parent.newRipple(_x, _y, 2);
_root.playSound("BOUNCE1");
setX = origX;
setY = origY;
slotHold = undefined;
}
dragActive = false;
}
}
function onEnterFrame() {
if (dragActive == true) {
targX = _parent._xmouse;
targY = _parent._ymouse;
} else if (slotHold != undefined) {
targX = slotHold._x;
targY = slotHold._y;
} else {
targX = setX;
targY = setY;
}
_x = (_x + ((targX - _x) / 2));
_y = (_y + ((targY - _y) / 2));
}
dragActive = false;
origX = _x;
origY = _y;
setX = origX;
setY = origY;
IDText = "";
IDText = ID;
slotHold = undefined;
Symbol 72 MovieClip Frame 1
var CPMStarPoolID = 1052;
var CPMStarSubPoolID = 1;
System.security.allowDomain("server.cpmstar.com");
var adVar = this.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
Symbol 84 Button
on (release) {
_root.play();
}
Symbol 100 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 103 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Symbol 103 MovieClip Frame 218
_root.play();
Symbol 109 Button
on (release) {
stopAllSounds();
this._x = -1000;
_root.eraseSlot(_root.SAVESLOT);
_root.gotoAndPlay(1);
}
Symbol 110 Button
on (release) {
this._x = -1000;
}
Symbol 116 Button
on (release) {
stopAllSounds();
this._x = -1000;
_root.gotoAndStop("TITLE");
}
Symbol 117 Button
on (release) {
_root.gamePaused = false;
this._x = -1000;
}
Symbol 131 MovieClip Frame 1
stop();
Symbol 133 Button
on (release) {
savefile.data.SLOTNAMEARRAY[1] = userName1.text;
_root.saveGame();
_root.SAVESLOT = 1;
gotoFrame("TITLE");
}
Symbol 137 Button
on (release) {
savefile.data.SLOTNAMEARRAY[2] = userName2.text;
_root.saveGame();
_root.SAVESLOT = 2;
gotoFrame("TITLE");
}
Symbol 140 Button
on (release) {
savefile.data.SLOTNAMEARRAY[3] = userName3.text;
_root.saveGame();
_root.SAVESLOT = 3;
gotoFrame("TITLE");
}
Symbol 150 Button
on (release) {
_root.SAVESLOT = 1;
eraseScreen._x = 0;
}
Symbol 151 Button
on (release) {
_root.SAVESLOT = 2;
eraseScreen._x = 0;
}
Symbol 152 Button
on (release) {
_root.SAVESLOT = 3;
eraseScreen._x = 0;
}
Symbol 157 Button
on (release) {
stopAllSounds();
gotoFrame("GAME");
}
Symbol 158 Button
on (release) {
gotoFrame("SAVELOAD");
}
Symbol 161 Button
on (release) {
if (graphButton._alpha == 100) {
_root.GRAPHTIME = undefined;
gotoFrame("GRAPH");
}
}
Symbol 163 Button
on (release) {
gotoFrame("ABOUT");
}
Symbol 165 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 166 Button
on (release) {
getURL ("http://www.armorblog.com", "_blank");
}
Symbol 170 Button
on (release) {
getURL ("http://armorgames.com/play/1665/lesson-1-trajestimate", "_blank");
}
Symbol 176 Button
on (release) {
getURL ("http://armorgames.com/play/1759/lesson-2-estiweight", "_blank");
}
Symbol 178 Button
on (release) {
gotoFrame("TITLE");
}
Symbol 192 Button
on (release) {
_root.GRAPHTIME = 604800000 /* 0x240C8400 */;
_root.GRAPHSTRING = " time(s) this week.";
gotoFrame("GRAPH");
}
Symbol 193 Button
on (release) {
_root.GRAPHTIME = 86400000 /* 0x5265C00 */;
_root.GRAPHSTRING = " time(s) today.";
gotoFrame("GRAPH");
}
Symbol 194 Button
on (release) {
_root.GRAPHTIME = 3600000 /* 0x36EE80 */;
_root.GRAPHSTRING = " times(s) in the last hour.";
gotoFrame("GRAPH");
}
Symbol 196 Button
on (release) {
_root.GRAPHTIME = undefined;
_root.GRAPHSTRING = " time(s) in total.";
gotoFrame("GRAPH");
}
Symbol 200 Button
on (release) {
_root.GRAPHTIME = 900000 /* 0x0DBBA0 */;
_root.GRAPHSTRING = " time(s) in the last 15 minutes.";
gotoFrame("GRAPH");
}
Symbol 217 MovieClip Frame 1
stop();
Symbol 224 Button
on (release) {
if (endGame != true) {
if (collectTotal == weightTarget) {
_root.correct = true;
} else {
_root.correct = false;
}
}
endGame = true;
}
Symbol 228 MovieClip Frame 1
function pythag(x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(y1 - y2, 2) + Math.pow(x1 - x2, 2)));
}
function angle(x1, y1, x2, y2) {
return(Math.round((Math.atan2(y2 - y1, x2 - x1) / 3.141593) * 180) + 90);
}
function calcSpeed(angle, speed) {
var _local2 = angle * 0.01745329;
var _local1 = new Object();
_local1.x = speed * Math.cos(_local2);
_local1.y = speed * Math.sin(_local2);
return(_local1);
}
function rotatedXY(xPos, yPos, rotate) {
var _local1 = new Object();
var _local2 = 0.0174444444444444 * rotate;
var _local4 = Math.sin(_local2);
var _local3 = Math.cos(_local2);
_local1.x = (xPos * _local3) - (yPos * _local4);
_local1.y = (xPos * _local4) + (yPos * _local3);
return(_local1);
}
function onEnterFrame() {
var _local2 = new Array();
i = 0;
while (i < slotNum) {
slot = SLOTS["H" + i];
if (slot.contentsWeight != undefined) {
_local2.push(slot.contentsWeight);
}
i++;
}
collectTotal = _local2.sum();
if (_root.EOB._alpha > 140) {
_root.EOB._x = 0;
_root.EOB._alpha = _root.EOB._alpha - 3;
} else {
_root.EOB._x = _root.EOB._x + EOBSpeed;
EOBSpeed++;
}
if (endGame == true) {
_root.EOB._x = 0;
if (_root.EOB._alpha < 300) {
_root.EOB._alpha = 300;
}
if (endTimer == 0) {
if (_root.correct == true) {
_root.playSound("WIN");
_root.score = _root.score + (5 + _root.bonus);
_root.EOB.scoreDisplay = ("5 Points plus bonus of " + _root.bonus) + " points!";
_root.EOB.displayText = "CONGRATULATIONS!";
_root.EOB._alpha = 200;
} else {
_root.playSound("LOSE");
_root.EOB.scoreDisplay = "Be more careful when you click!";
_root.EOB.displayText = "WRONG !";
_root.EOB._alpha = 200;
}
}
endTimer++;
if (endTimer > 80) {
if (_root.roundNum < 6) {
_root.gotoFrame("GAME");
} else {
_root.gotoFrame("RESULT");
}
}
} else {
_root.bonus = Math.round(AREA.timerTop._yscale / 3);
}
if (_root.gamePaused == true) {
_root.gamePausedBuffer = 15;
} else if (_root.gamePausedBuffer > 0) {
_root.gamePausedBuffer--;
}
if (_root.gamePausedBuffer == 0) {
timer--;
AREA.timerTop._yscale = (100 / maxTimer) * timer;
AREA.timerBottom._yscale = 100 - ((100 / maxTimer) * timer);
if (_root.bonus < 0) {
_root.bonus = 0;
}
if (SCALE1.contentsWeight == undefined) {
S1W = 0;
} else {
S1W = SCALE1.contentsWeight;
}
if (SCALE2.contentsWeight == undefined) {
S2W = 0;
} else {
S2W = SCALE2.contentsWeight;
}
if (S1W > S2W) {
scaleResult.gotoAndStop(2);
SCALE2Pos = SCALE2Orig - 20;
SCALE1Pos = SCALE1Orig + 20;
} else if (S1W < S2W) {
scaleResult.gotoAndStop(3);
SCALE2Pos = SCALE2Orig + 20;
SCALE1Pos = SCALE1Orig - 20;
} else {
scaleResult.gotoAndStop(1);
SCALE2Pos = SCALE2Orig;
SCALE1Pos = SCALE1Orig;
}
SCALE1._y = SCALE1._y + ((SCALE1Pos - SCALE1._y) / 4);
SCALE2._y = SCALE2._y + ((SCALE2Pos - SCALE2._y) / 4);
}
}
function newRipple(xPos, yPos, col) {
var _local1 = EFFECTS.attachMovie("Ripple", "R", EFFECTS.getNextHighestDepth());
_local1._x = xPos;
_local1._y = yPos;
_local1.targ = col;
}
function setFPS() {
var _local1 = new Date();
var _local2 = 0;
while (_local1.getTime() < FPSTimer) {
_local1 = new Date();
_local2++;
}
FPSTimer = _local1.getTime() + frameDelay;
}
function makeSlots() {
var _local2 = 0;
while (_local2 < slotNum) {
var _local1 = SLOTS.attachMovie("Hole", "H" + slotName, SLOTS.getNextHighestDepth());
slotName++;
_local1._x = slotXPos[_local2];
_local1._y = slotHeight[_local2];
_local1.slotActive = false;
slotArray.push(_local1);
_local2++;
}
}
function makeWeights() {
weightSum = 0;
weightCount = 0;
while (weightSum < weightTarget) {
addSum = Math.round((weightTarget / slotNum) + random(weightTarget / 3));
while ((addSum + weightSum) > weightTarget) {
addSum--;
trace("reduction");
}
weightDist[weightCount] = addSum;
weightSum = weightSum + addSum;
weightCount++;
}
if (weightTarget > weightSum) {
weightDist[weightDist.length] = weightDist[weightDist.length] - (weightDist.sum() - weightTarget);
}
weightTarget = weightDist.sum();
weightTargetText = weightTarget + "KG";
trace(weightDist);
while (weightDist.length < (slotNum + 2)) {
weightDist.push(Math.round(random(weightTarget / 3)));
}
weightDist.shuffle();
while (random(20) != 0) {
weightDist.shuffle();
}
trace(weightDist);
}
function makeBalls() {
i = 0;
while (i < (slotNum + 2)) {
clone = BALLS.attachMovie("WeightSphere", "H" + balIDCount, BALLS.getNextHighestDepth());
clone._x = (400 / (slotNum + 2)) * (i + 0.5);
clone._y = 275;
clone.weight = weightDist[i];
clone.weightText = clone.weight;
clone.typeText = "KG";
if (random(5) == 0) {
clone.weightText = clone.weight + ",000";
clone.typeText = "g";
}
clone._xscale = 80 + ((weightDist[i] * 20) / weightTarget);
clone._yscale = 80 + ((weightDist[i] * 20) / weightTarget);
clone.ID = balIDCount;
balIDCount++;
i++;
}
}
Array.prototype.sum = function () {
var _local3 = 0;
var _local2 = 0;
while (_local2 < this.length) {
_local3 = _local3 + this[_local2];
_local2++;
}
return(_local3);
};
Array.prototype.shuffle = function () {
i = 0;
while (i < this.length) {
var _local3 = this[i];
var _local2 = random(this.length);
this[i] = this[_local2];
this[_local2] = _local3;
i++;
}
};
animalGraphic.gotoAndStop(_root.roundNum);
_root.highLightOrigin = undefined;
_root.ballNumber = 0;
difficulty = 1;
createEmptyMovieClip("SLOTS", 0);
createEmptyMovieClip("LINES", 1);
createEmptyMovieClip("EFFECTS", 2);
createEmptyMovieClip("BALLS", 3);
createEmptyMovieClip("SCALESLIDES", 5);
var frameDelay = 34;
_root.highLightActive = false;
ballBuffer = 0;
ballReload = false;
attachMovie("Area", "AREA", 4);
EOBScale = _root.EOB._xscale;
_root.gamePaused = false;
maxTimer = (_root.roundNum / 2) * 2000;
timer = maxTimer;
if (_root.muteSound == false) {
AREA.MSTick._visible = false;
}
AREA.PTick._visible = false;
AREA.timerTop.setMask(AREA.timerTopMask);
AREA.timerBottom.setMask(AREA.timerBottomMask);
_root.gamePausedBuffer = 0;
if (_root.roundNum == 1) {
if (_root.soundSel == 1) {
_root.playSound("MAIN");
} else if (_root.soundSel == 2) {
_root.playSound("MAIN2");
}
}
endGame = false;
endTimer = 0;
var EOBSpeed = -5;
var FPSTimer = 0;
slotArray = new Array();
slotNumArray = new Array(1, 4, 5, 6, 7);
var slotNum = _root.roundNum;
var slotName = 0;
slotHeight = new Array(100, 100, 100, 150, 150, 150, 200, 200, 200);
slotXPos = new Array(250, 300, 350, 250, 300, 350, 250, 300, 350);
balIDCount = 0;
weightTargetArray = new Array(null, 8, 28, 280, 140, 400);
weightTarget = weightTargetArray[_root.roundNum] + random(10);
weightDist = new Array();
weightOver = 0;
randomBalls = new Array();
makeSlots();
makeWeights();
makeBalls();
Symbol 233 MovieClip Frame 1
function onEnterFrame() {
if (_root.gamePaused == false) {
if (currentScale < 100) {
_root.PSA._y = _root.PSA._y + 1;
if (_root.PSA._y > 0) {
_root.PSA._y = _root.PSA._y - (_root.PSA._height / 2);
}
currentScale = currentScale + 10;
var _local3 = 1;
while (_local3 < 9) {
this["shutter" + _local3]._yscale = currentScale;
this["shutter" + _local3].SA._xscale = currentScale;
_local3++;
}
}
} else {
_root.PSA._y = _root.PSA._y + 1;
if (_root.PSA._y > 0) {
_root.PSA._y = _root.PSA._y - (_root.PSA._height / 2);
}
if (currentScale > 0) {
currentScale = currentScale - 10;
var _local3 = 1;
while (_local3 < 9) {
this["shutter" + _local3]._yscale = currentScale;
this["shutter" + _local3].SA._xscale = currentScale;
_local3++;
}
}
}
}
var currentScale = 100;
Symbol 240 MovieClip Frame 1
_alpha = 400;
if (_root.roundNum == 1) {
displayText = "Welcome to Lesson 3";
scoreDisplay = "Time to test your mental agility.";
} else if (_root.roundNum == 2) {
displayText = "ROUND 2";
scoreDisplay = "This lesson is actually more about thought process than maths.";
} else if (_root.roundNum == 3) {
displayText = "Round 3";
scoreDisplay = "Ready for this to get alot more tricky?";
} else if (_root.roundNum == 4) {
displayText = "Democrat round";
scoreDisplay = "Keep going, partner, show that Donkey who's boss.";
} else if (_root.roundNum == 5) {
displayText = "Republican round";
scoreDisplay = "That Elephant sure is hefty - but can you outweigh its policies?";
}
_root.roundNum++;
stop();
Symbol 242 Button
on (release) {
var currentDate = new Date();
_root.savefile.data.SLOTLASTDATE[_root.GAMEID][_root.SAVESLOT] = _root.shortDate(currentDate);
_root.savefile.data.SCORESTORE.push(_root.score);
_root.savefile.data.DATESTORE.push(currentDate);
_root.savefile.data.SLOTARRAY.push(_root.SAVESLOT);
_root.savefile.data.IDSTORE.push(_root.GAMEID);
_root.saveGame();
gotoFrame("GRAPH");
}