Frame 1
function musicChoice(num) {
chooseMusic = num;
stopAllSounds();
musicMaker.gotoAndPlay(num);
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
function muteHandler() {
if (muted) {
globalSound.setVolume(0);
} else {
globalSound.setVolume(100);
}
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
var chooseMusic = 2;
stop();
stop();
k = 0;
onEnterFrame = function () {
var _local2 = Math.floor(framesLoaded / 4) - 1;
afw._x = afw._x - (0.3 * ((afw._x - _root["b" + _local2]._x) / 2));
afw._y = afw._y - (0.3 * ((afw._y - _root["b" + _local2]._y) / 2));
cat.removeMovieClip();
createEmptyMovieClip("cat", k++);
cat.lineStyle(1, 16777215, 50);
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded / total) * 100);
if ((framesLoaded >= 100) && (playMe.act == false)) {
playMe.act = true;
playMe.play();
}
perDisp = framesLoaded + "%";
i = 0;
while (i < 25) {
if (framesLoaded >= (i * 4)) {
_root["b" + i]._alpha = _root["b" + i]._alpha - (0.08 * ((_root["b" + i]._alpha - 100) / 2));
_root["b" + i]._x = _root["b" + i]._x - (0.3 * ((_root["b" + i]._x - _root["b" + i].mainX) / 2));
_root["b" + i]._y = _root["b" + i]._y - (0.3 * ((_root["b" + i]._y - _root["b" + i].mainY) / 2));
if (i != 0) {
cat.moveTo(_root["b" + i]._x, _root["b" + i]._y);
cat.lineTo(_root["b" + (i - 1)]._x, _root["b" + (i - 1)]._y);
}
}
base = 1.5;
if (_root["b" + i].hitTest(_xmouse, _ymouse)) {
if ((_xmouse - _root["b" + i]._x) > 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._x = _root["b" + (i - t)]._x - (base / (t + 1));
_root["b" + (i + t)]._x = _root["b" + (i + t)]._x - (base / (t + 1));
t++;
}
} else if ((_xmouse - _root["b" + i]._x) <= 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._x = _root["b" + (i - t)]._x + (base / (t + 1));
_root["b" + (i + t)]._x = _root["b" + (i + t)]._x + (base / (t + 1));
t++;
}
}
if ((_ymouse - _root["b" + i]._y) > 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._y = _root["b" + (i - t)]._y - (base / (t + 1));
_root["b" + (i + t)]._y = _root["b" + (i + t)]._y - (base / (t + 1));
t++;
}
} else if ((_ymouse - _root["b" + i]._y) <= 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._y = _root["b" + (i - t)]._y + (base / (t + 1));
_root["b" + (i + t)]._y = _root["b" + (i + t)]._y + (base / (t + 1));
t++;
}
}
}
i++;
}
};
i = 0;
while (i < 25) {
_root["b" + i].mainX = _root["b" + i]._x;
_root["b" + i].mainY = _root["b" + i]._y;
_root["b" + i]._x = random(Stage.width);
_root["b" + i]._y = random(Stage.height);
_root["b" + i]._alpha = 0;
_root["b" + i].act = true;
i++;
}
var globalSound = new Sound(this);
globalSound.setVolume(100);
Frame 2
stop();
onEnterFrame = function () {
for (var _local2 in _root) {
if (typeof(_root[_local2]) == "movieclip") {
_root[_local2].removeMovieClip();
}
}
};
Frame 3
function saveGame() {
savefile.data.ach1 = _root.ach1;
savefile.data.ach2 = _root.ach2;
savefile.data.ach3 = _root.ach3;
savefile.data.ach4 = _root.ach4;
savefile.data.ach5 = _root.ach5;
savefile.data.ach6 = _root.ach6;
savefile.data.ach7 = _root.ach7;
savefile.data.ach8 = _root.ach8;
i = 0;
while (i < myTimes.length) {
savefile.data.myTimes[i] = _root.myTimes[i];
i++;
}
savefile.data.oldName = _root.oldName;
savefile.flush();
}
stop();
var ach1 = false;
var ach2 = false;
var ach3 = false;
var ach4 = false;
var ach5 = false;
var ach6 = false;
var ach7 = false;
var ach8 = false;
var oldName;
var myTimes = new Array();
i = 0;
while (i < 25) {
myTimes.push(0);
i++;
}
trace(myTimes);
var savefile = SharedObject.getLocal("tbaflash");
if ((savefile.data.oldName == undefined) || (oldName == "fewigmw")) {
savefile.data.myTimes = myTimes;
trace(savefile.data.myTimes);
gotoAndStop ("NOSAVEGAME");
savefile.flush();
} else {
trace(savefile.data.myTimes);
ach1 = savefile.data.ach1;
ach2 = savefile.data.ach2;
ach3 = savefile.data.ach3;
ach4 = savefile.data.ach4;
ach5 = savefile.data.ach5;
ach6 = savefile.data.ach6;
ach7 = savefile.data.ach7;
ach8 = savefile.data.ach8;
oldName = savefile.data.oldName;
i = 0;
while (i < 25) {
_root.myTimes[i] = savefile.data.myTimes[i];
i++;
}
gotoAndStop ("menu");
}
myMenu.customItems[0].enabled = false;
myMenu.customItems[1].enabled = false;
myMenu.customItems[2].enabled = false;
Frame 5
stop();
function getParTime(lev) {
parTime = parTimes[lev] - 1;
}
var levChoice = 1;
onMouseDown = function () {
};
onEnterFrame = function () {
checkHit = false;
i = 1;
while (i < 26) {
if (_root["b" + i].hitTest(_root._xmouse, _root._ymouse)) {
blag._x = _xmouse;
blag._y = _ymouse;
blag._visible = true;
checkHit = true;
if (i < 10) {
blag.lev.text = "0" + i;
} else {
blag.lev.text = i;
}
if (myTimes[i - 1] == 0) {
blag.yTime.text = "X";
} else if (myTimes[i - 1] < 10) {
blag.yTime.text = "0" + myTimes[i - 1];
} else {
blag.yTime.text = myTimes[i - 1];
}
if (parTimes[i - 1] < 10) {
blag.pTime.text = "0" + parTimes[i - 1];
} else {
blag.pTime.text = parTimes[i - 1];
}
if (myTimes[i - 1] == 0) {
blag.gotoAndStop(1);
} else if (myTimes[i - 1] <= parTimes[i - 1]) {
blag.gotoAndStop(3);
} else if (myTimes[i - 1] > 0) {
blag.gotoAndStop(2);
}
}
i++;
}
if (!checkHit) {
blag._visible = false;
}
};
stop();
i = 1;
while (i < 26) {
_root["b" + i].onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
levChoice = Number(this._name.substr(1, 2));
playAll = false;
whiteFade.play();
}
};
i++;
}
var parTimes = new Array(2, 3, 4, 6, 5, 6, 10, 3, 7, 8, 6, 5, 14, 5, 7, 4, 16, 28, 2, 8, 16, 7, 13, 17, 31);
i = 0;
while (i < parTimes.length) {
parTimes[i] = parTimes[i] + 2;
i++;
}
var myProgress = 0;
i = 0;
while (i < 25) {
if (myTimes[i] > 0) {
_root["b" + (i + 1)].inside.gotoAndStop(2);
myProgress = myProgress + 2;
if (myTimes[i] <= parTimes[i]) {
_root["b" + (i + 1)].inside.gotoAndStop(3);
myProgress = myProgress + 2;
}
}
i++;
}
if (myProgress >= 100) {
goodStar.gotoAndStop(2);
}
if (myProgress < 10) {
myProgressDisp = ("0" + myProgress) + "%";
} else {
myProgressDisp = myProgress + "%";
}
myMenu.customItems[0].enabled = false;
myMenu.customItems[1].enabled = false;
myMenu.customItems[2].enabled = false;
Frame 7
stop();
function loadFadeOut() {
shel = attachMovie("loadFadeOut", "lfd", k++);
shel._x = camera._x;
shel._y = camera._y;
}
function detectPause() {
if (Key.isDown(80) && (!pDown)) {
pDown = true;
gamePaused = !gamePaused;
}
if ((!Key.isDown(80)) && (pDown)) {
pDown = false;
}
}
function checkMute() {
if (Key.isDown(83) && (!mutey)) {
mutey = true;
muted = !muted;
muteHandler();
} else if ((!Key.isDown(83)) && (mutey)) {
mutey = false;
}
}
function checkQuality() {
if (Key.isDown(81) && (!qy)) {
qy = true;
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else if (_quality == "LOW") {
_quality = "HIGH";
}
} else if ((!Key.isDown(81)) && (qy)) {
qy = false;
}
}
function checkMenuHit() {
if (Key.isDown(77)) {
gotoMenu();
}
}
function seeMap() {
if (gamePaused) {
easing("xscale", camera, 300, 1);
easing("yscale", camera, 300, 1);
easing("x", camera, 0, 1);
easing("y", camera, 0, 1);
easing("rotation", _root, 0, 0.6);
} else {
easing("xscale", camera, 100, 1);
easing("yscale", camera, 100, 1);
easing("rotation", _root, xC / 2, 0.1);
}
}
function resetStage() {
curPortals.splice(0, curPortals.length);
level++;
nextFrame();
cStatus = true;
ballActive = false;
tMiliCounter = 0;
totalSeconds = 0;
determineBeginEnd();
frameCount = -1;
loadBall();
}
function camRecenter() {
_root._x = 275;
_root._y = 200;
camera._x = 0;
camera._y = 0;
_root._rotation = 0;
camera._rotation = 0;
}
function depths() {
ball.swapDepths(k++);
completeMe.swapDepths(k++);
}
function ballSpice() {
if (ballActive) {
shel = attachMovie("blockBall", "b" + k, k++);
shel._x = (ball._x + 10) - random(20);
shel._y = (ball._y + 10) - random(20);
shel._xscale = random(100) + 50;
shel._yscale = shel._xscale;
shel._rotation = ball._rotation;
tap = Math.round(Math.random() * 16777215);
altColor = new Color(shel);
altColor.setRGB(tap);
}
starThing.removeMovieClip();
createEmptyMovieClip("starThing", k++);
i = 0;
while (i < starCounter) {
starThing.lineStyle(_root["star" + i]._xscale / 100, 16777215, 20);
starThing.moveTo(ball._x, ball._y);
starThing.lineTo(_root["star" + i]._x, _root["star" + i]._y);
i++;
}
}
function determineBeginEnd() {
i = 0;
while (i < curPortals.length) {
if (_root["port" + curPortals[i]].launchType == "start") {
beginning = i;
}
if (_root["port" + curPortals[i]].launchType == "end") {
end = i;
}
i++;
}
}
function takePic() {
var _local2 = new flash.geom.Matrix();
_local2.tx = _x;
_local2.ty = _y;
picArea.draw(_root, _local2);
}
function bg() {
bgStat = Math.floor((((totalSeconds * 100) + tMiliCounter) / (parTime * 100)) * 100);
if (bgStat > 100) {
bgStat = 100;
}
clouds.gotoAndStop(bgStat);
if (bgStat < 70) {
bar.asdf.emotion.gotoAndStop(1);
} else if (bgStat < 100) {
bar.asdf.emotion.gotoAndStop(2);
} else {
bar.asdf.emotion.gotoAndStop(3);
}
if (level < 10) {
levelDisp = "0" + level;
} else {
levelDisp = String(level);
}
}
function timer() {
tMiliCounter = tMiliCounter + ((1 / frameRate) * 100);
if (tMiliCounter >= 100) {
totalSeconds++;
tMiliCounter = 0;
}
if (totalSeconds < 10) {
totalSecondsDisp = "0" + totalSeconds;
} else {
totalSecondsDisp = String(totalSeconds);
}
if (Math.floor(tMiliCounter) < 10) {
tMiliCounterDisp = "0" + Math.floor(tMiliCounter);
} else {
tMiliCounterDisp = String(Math.floor(tMiliCounter));
}
}
function barControl() {
bar._x = (Stage.width / 2) - _root._x;
bar._y = (Stage.height / 2) - _root._y;
bar._rotation = -_root._rotation;
bar._xscale = camera._xscale;
bar._yscale = camera._yscale;
if (gamePaused) {
bar._x = ((Stage.width / 2) - _root._x) + 400;
bar._y = ((Stage.height / 2) - _root._y) - 400;
bar._xscale = camera._xscale / 2;
bar._yscale = camera._yscale / 2;
}
}
function frameStuff() {
frameCount++;
bCount++;
if (frameCount == 1) {
loadBall();
}
if (bCount == 1) {
_root.musicChoice(chooseMusic);
}
}
function walls() {
if (dynamicHitTest(ball, _root["lev" + level])) {
epicenter.removeMovieClip();
createEmptyMovieClip("epicenter", k++);
epicenter._x = ball._x;
epicenter._y = ball._y;
blocks(50, epicenter._x, epicenter._y);
ballActive = false;
timeOut = true;
cappy = new Sound(this);
cappy.attachSound("hard");
cappy.start(0, 1);
ball._removeMovieClip();
loadBall();
}
}
function blocks(num, xPos, yPos) {
i = 0;
while (i < num) {
shel = attachMovie("blockFinal", "block" + k, k++);
shel._x = xPos;
shel._y = yPos;
shel._rotation = random(360);
shel.life = 20;
shel._xscale = random(500) + 50;
shel._yscale = random(50) + 10;
tap = Math.round(Math.random() * 16777215);
altColor = new Color(shel.block.block);
altColor.setRGB(tap);
shel.onEnterFrame = function () {
this.block._x = this.block._x + 10;
this.life--;
if (this.life == 0) {
this.removeMovieClip();
}
if (this.life < 10) {
this._alpha = 5 * this.life;
}
};
i++;
}
}
function checkStats() {
i = 0;
while (i < curPortals.length) {
if (_root["port" + curPortals[i]].hitTest(_xmouse, _ymouse)) {
trace(_root["port" + i]._name);
if (i == beginning) {
trace("This is the beginning");
}
if (i == end) {
trace("This is the end");
}
}
i++;
}
}
function cam() {
if (gamePaused) {
easing("x", clouds, camera._x, 0.7);
easing("y", clouds, camera._y, 0.7);
} else if (timeOut) {
timeOutC--;
if (timeOutC == 0) {
timeOutC = 5;
timeOut = false;
}
} else {
easing("x", camera, ball._x, 0.3);
easing("y", camera, ball._y, 0.3);
clouds._x = camera._x / 3;
clouds._y = camera._y / 3;
}
}
function detectSpace() {
if (((((_root["port" + currentPort].launchType != "wait") && (Key.isDown(32))) && (!ballActive)) && (!spaceHeld)) || (launch == true)) {
ballActive = true;
launch = false;
ball._visible = true;
ball._rotation = _root["port" + currentPort]._rotation + _root["port" + currentPort].cur._rotation;
launch = false;
}
}
function ballLocation() {
if (!ballActive) {
ball._x = _root["port" + currentPort]._x + _root["port" + currentPort].cur._x;
ball._y = _root["port" + currentPort]._y + _root["port" + currentPort].cur._y;
}
}
function moveBall() {
youSpeed = Math.min(youMaxSpeed, youSpeed + youAcc);
xC = Math.cos((ball._rotation * Math.PI) / 180) * youSpeed;
yC = Math.sin((ball._rotation * Math.PI) / 180) * youSpeed;
yMov = yMov + gravity;
ball._x = ball._x + xC;
ball._y = ball._y + (yC + yMov);
ballTimeOut++;
oldX = ball._x;
oldY = ball._y;
}
function detectGoals() {
i = 0;
while (i < curPortals.length) {
if ((ballActive && ((ballTimeOut > 5) || (("port" + curPortals[i]) != ("port" + currentPort)))) && (ball.hitTest(_root["port" + i].cur.hitA))) {
ballActive = false;
currentPort = i;
shel = attachMovie("port-sign", "p" + k, k++);
shel._x = _root["port" + i]._x + _root["port" + i].cur._x;
shel._y = _root["port" + i]._y + _root["port" + i].cur._y;
shel._rotation = _root["port" + i]._rotation + _root["port" + i].cur._rotation;
ball._visible = false;
reloadStats();
if (_root["port" + i].launchType == "wait") {
_root["port" + i].play();
}
if (i == end) {
ballActive = false;
ball._visible = false;
reloadStats();
takePic();
loadTransition();
}
}
i++;
}
}
function loadTransition() {
camRecenter();
shel = attachMovie("complete", "completeMe", k++);
shel._x = camera._x - (Stage.width / 2);
shel._y = camera._y - (Stage.height / 2);
shel._rotation = -_root._rotation;
shel.fadeMe.attachBitmap(picArea, 1001);
cStatus = false;
}
function dynName(mov) {
choice = 0;
var _local2 = 0;
while (_local2 < 100) {
var _local1 = 0;
while (_local1 < curPortals.length) {
if (curPortals[_local1] == _local2) {
choice++;
}
_local1++;
}
_local2++;
}
curPortals.push(choice);
mov._name = "port" + choice;
}
function loadBall() {
ball.removeMovieClip();
reloadStats();
determineBeginEnd();
shel = attachMovie("ball", "ball", k++);
shel._x = _root["port" + curPortals[beginning]]._x;
shel._y = _root["port" + curPortals[beginning]]._y;
ballActive = false;
currentPort = beginning;
}
function reloadStats() {
youSpeed = 0;
xC = 0;
yMov = 0;
ballTimeOut = 0;
}
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 dist(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
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 dynamicHitTest(mover, station) {
if (ballActive) {
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 getParTime(lev) {
parTime = parTimes[lev - 1];
}
function spaceDown() {
if ((!spaceHeld) && (Key.isDown(32))) {
spaceHeld = true;
}
if (spaceHeld && (!Key.isDown(32))) {
spaceHeld = false;
}
}
function stars(num) {
i = 0;
while (i < num) {
shel = attachMovie("launchStars", "star" + (starCounter++), k++);
shel._x = ball._x;
shel._y = ball._y;
shel.youAcc = random(2) + 5;
shel.youDec = 0.2;
shel.youSpeed = 0;
shel.youMaxSpeed = random(30) + 10;
shel.grav = 0.3;
shel._rotation = random(360);
shel._xscale = random(75) + 50;
shel._yscale = shel._xscale;
shel.oldX = 100;
shel._x = random(Stage.width);
shel._y = random(Stage.height);
shel._alpha = 50;
shel.onEnterFrame = function () {
if (!gamePaused) {
this._rotation = this._rotation + this.youAcc;
if (!ballActive) {
this.youSpeed = Math.min(this.youMaxSpeed, this.youSpeed + this.youAcc);
this._rotation = _root.rot(this._x, this._y, _root["port" + currentPort]._x, _root["port" + currentPort]._y);
this.xC = Math.cos((this._rotation * Math.PI) / 180) * this.youSpeed;
this.yC = Math.sin((this._rotation * Math.PI) / 180) * this.youSpeed;
this._x = this._x + this.xC;
this._y = this._y + this.yC;
this.oldX = this._x;
this.oldY = this._y;
_root.easing("xscale", this, 100, 0.5);
_root.easing("yscale", this, 100, 0.3);
_root.easing("x", this, _root["port" + currentPort]._x + _root["port" + currentPort].cur._x, 0.3);
_root.easing("y", this, _root["port" + currentPort]._y + _root["port" + currentPort].cur._y, 0.3);
} else {
this.youSpeed = Math.min(this.youMaxSpeed, this.youSpeed + this.youAcc);
this.xC = Math.cos((this._rotation * Math.PI) / 180) * this.youSpeed;
this.yC = Math.sin((this._rotation * Math.PI) / 180) * this.youSpeed;
this._x = this._x + this.xC;
this._y = this._y + this.yC;
this.oldX = this._x;
this.oldY = this._y;
_root.easing("x", this, ball._x, 0.3);
_root.easing("y", this, ball._y, 0.3);
this._rotation = this._rotation - 10;
}
}
};
i++;
}
}
function restartLevel() {
if (Key.isDown(82)) {
loadBall();
totalSeconds = 0;
tMiliCounter = 0;
}
}
function generateFacts() {
if (totalSeconds == 0) {
totalSeconds = 1;
}
if (myTimes[level - 1] == 0) {
myTimes[level - 1] = totalSeconds;
} else if (myTimes[level - 1] > totalSeconds) {
myTimes[level - 1] = totalSeconds;
}
saveGame();
trace(level);
levelFinishedIn = ("That level was finished in <b>" + totalSeconds) + "</b> seconds.";
subTime = Math.abs(parTime - totalSeconds);
if ((_root.parTime - 1) == _root.totalSeconds) {
comparePar = ("That's barely <b><font color='#4032'>" + subTime) + "</font></b> second faster than par!";
} else if (_root.parTime > _root.totalSeconds) {
comparePar = ("That's <b><font color='#4032'>" + subTime) + "</font></b> seconds faster than par!";
} else if (_root.parTime < _root.totalSeconds) {
comparePar = ("You missed par by <b><font color='#990000'>" + subTime) + "</font></b> seconds, for shame.";
} else {
comparePar = "You nailed par, right on the money!";
}
randomFact = "Did you know that " + generateFact(subTime);
}
function generateFact(num) {
switch (num) {
case 0 :
return("par is the most common form of golf scoring, just before stroke play?");
case 1 :
return("the number 1 is the smallest odd integer? Mind blowing!");
case 2 :
return("people should not use the number 2 instead of 'to' on their cell phones?");
case 3 :
return("the number 3 is essential to make the lion face (>:3)?");
case 4 :
return("there are 4 Teenage Mutant Ninja Turtles? Leonardo, Donatello, Rafael, and Michelangelo (he's the party dude).");
case 5 :
return("the 5th element is love? *SPOILERS*");
case 6 :
return("there are 6 feet in a fathom? Fathom is a cool word.");
case 7 :
return("there are 7 dwarves in Snow White? My favorite is Sneezy. He gets no love.");
case 8 :
return("we only have 8 planets in our solar system now? Pluto doesn't count!");
case 9 :
return("that polygon with 9 sides is a nonagon? What a stupid name!");
case 10 :
return("there have been 10 Star Trek movies? I haven't seen any of them.");
case 11 :
return("some amps go up to 11? Because sometimes you need that 1 more...");
case 12 :
return("there are 12 days of Christmas? My favorite is day nine.");
case 13 :
return("Triskaidekaphobia is the term for being scared of the number 13?");
case 14 :
return("14 is the number of lines in a sonnet? Tasteful.");
case 15 :
return("15 is the atomic number for phosphorus, a common element in toothpaste and fireworks?");
case 16 :
return("caterpillars have 16 legs?");
case 17 :
return("17 is the coming of age of Wizards in Harry Potter? Too bad for muggles.");
case 18 :
return("18 degrees celsius is a great room temperature? Take that Imperial system!");
case 19 :
return("Abraham Lincoln stands 19 feet tall in his memorial? Well, sits, I guess.");
case 20 :
return("human infants grow an average of 20 teeth?");
case 21 :
return("you live in the 21st century?");
case 22 :
return("the standard cricket pitch is 22 yards in length?");
case 23 :
return("humans have 23 pairs of chromosomes?");
case 24 :
return("there are 24 hours in a day? Well, technically 23 hours and 56 minutes, but who's counting?");
case 25 :
return("25 is the usual port for TCP SMTP connections? You didn't? Oh you did!");
}
return("your score is too low or too high to generate a random question?");
}
function gotoMenu() {
clouds.gotoAndStop(1);
cStatus = false;
onEnterFrame = null;
camRecenter();
killSwitch();
_root._x = 0;
_root._y = 0;
camera._x = 275;
camera._y = 200;
_root._xscale = 100;
_root._yscale = 100;
camera._xscale = 100;
camera._yscale = 100;
stopAllSounds();
cali = new Sound(this);
cali.attachSound("TBA-intro");
cali.start(0, 5);
gotoAndStop ("menu");
}
function killSwitch() {
for (var _local2 in _root) {
if (typeof(_root[_local2]) == "movieclip") {
_root[_local2].removeMovieClip();
}
}
}
var youAcc = 10;
var youDec = 0.2;
var youSpeed = 0;
var youMaxSpeed = 25;
var grav = 0.3;
var ballActive = false;
var k = 0;
var spaceHeld = false;
var timeOut = false;
var timeOutC = 5;
var frameCount = 0;
var frameRate = 30;
var totalSeconds = 0;
var totalSecondsDisp;
var tMiliCounter = 0;
var tMiliCounterDisp;
var launch = false;
var curPortals = new Array();
var currentPort = 0;
var ballTimeOut = 0;
var ballTimeOutReady = false;
var parTime = 10;
var level = 1;
var levelDisp = "01";
var picArea = (new flash.display.BitmapData(550, 400));
var yMov = 0;
var gravity = 0.6;
var beginning = 0;
var end = 0;
var starCounter = 0;
var cStatus = true;
var gamePaused = false;
var pDown = false;
var bCount = 0;
loadFadeOut();
determineBeginEnd();
onEnterFrame = function () {
if (cStatus) {
if (!gamePaused) {
if (ballActive) {
moveBall();
detectGoals();
}
ballSpice();
timer();
detectSpace();
ballLocation();
walls();
spaceDown();
frameStuff();
bg();
checkMenuHit();
checkMute();
checkQuality();
}
restartLevel();
fixMap();
depths();
detectPause();
seeMap();
barControl();
cam();
getParTime(level);
} else {
camRecenter();
}
};
mutey = false;
qy = false;
var bgStat = 0;
stars(10);
_quality = "AUTOHIGH";
stop();
level = levChoice;
gotoAndStop("level" + levChoice);
myMenu.customItems[0].enabled = true;
myMenu.customItems[1].enabled = true;
myMenu.customItems[2].enabled = true;
Instance of Symbol 269 MovieClip in Frame 25
/* no clip actions */
Instance of Symbol 269 MovieClip in Frame 25
/* no clip actions */
Instance of Symbol 269 MovieClip in Frame 25
/* no clip actions */
Instance of Symbol 269 MovieClip in Frame 25
/* no clip actions */
Symbol 17 MovieClip Frame 1
stop();
Symbol 19 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 38 Button
on (release) {
_root.play();
}
Symbol 39 MovieClip Frame 1
stop();
act = false;
Symbol 39 MovieClip Frame 10
stop();
Symbol 75 MovieClip Frame 80
_root.nextFrame();
Symbol 81 MovieClip [block] Frame 30
stop();
Symbol 84 MovieClip [blockBall] Frame 15
this.removeMovieClip();
Symbol 96 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (Key.isDown(32) && (_currentframe < 98)) {
gotoAndPlay(_currentframe + 2);
}
};
Symbol 96 MovieClip Frame 100
_parent.play();
stop();
Symbol 102 MovieClip [complete] Frame 1
_root.generateFacts();
Symbol 102 MovieClip [complete] Frame 30
stop();
filler.play();
Symbol 102 MovieClip [complete] Frame 50
if (_root.playAll) {
if (_root.level == 25) {
_root.gotoMenu();
this.removeMovieClip();
}
_root.resetStage();
_root.loadFadeOut();
this.removeMovieClip();
} else {
_root.gotoMenu();
this.removeMovieClip();
}
Symbol 106 MovieClip [loadFadeOut] Frame 1
onEnterFrame = function () {
this._x = _root.camera._x;
this._y = _root.camera._y;
};
Symbol 106 MovieClip [loadFadeOut] Frame 12
this.removeMovieClip();
Symbol 110 MovieClip [port-sign] Frame 10
this.removeMovieClip();
Symbol 112 MovieClip Frame 1
stop();
Symbol 135 Button
on (release) {
_root.savefile.data.oldName = _root.oldName;
play();
}
Symbol 137 Button
on (release) {
play();
}
Symbol 140 MovieClip Frame 1
_root.oldName = "Me";
Symbol 140 MovieClip Frame 10
stop();
Symbol 140 MovieClip Frame 51
_root.play();
Symbol 143 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 156 Button
on (release) {
levChoice = 1;
playAll = true;
whiteFade.play();
}
Symbol 172 MovieClip Frame 10
stop();
Symbol 174 Button
on (release) {
oldName = "fewigmw";
gotoAndStop ("router");
}
Symbol 186 MovieClip Frame 10
stop();
Symbol 190 MovieClip Frame 10
stop();
Symbol 190 MovieClip Frame 45
stopAllSounds();
_root.gotoAndStop("loader");
Symbol 201 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 1
this._visible = false;
stop();
Symbol 207 MovieClip Frame 3
stop();
trace("cats");
Symbol 207 MovieClip Frame 5
stop();
Symbol 207 MovieClip Frame 6
stopAllSounds();
Symbol 207 MovieClip Frame 7
stop();
Symbol 216 MovieClip Frame 1
this._visible = false;
Symbol 218 MovieClip Frame 1
_root.dynName(this);
launchType = "end";
Symbol 220 MovieClip Frame 1
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
} else {
stop();
}
};
Symbol 222 MovieClip Frame 1
_root.dynName(this);
launchType = "start";
Symbol 225 MovieClip Frame 1
_root.dynName(this);
Symbol 242 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 256 MovieClip Frame 40
gotoAndPlay (2);
Symbol 259 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 259 MovieClip Frame 40
gotoAndPlay (2);
Symbol 260 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 260 MovieClip Frame 40
gotoAndPlay (2);
Symbol 263 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 263 MovieClip Frame 40
gotoAndPlay (2);
Symbol 269 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
launchType = "wait";
Symbol 269 MovieClip Frame 2
stop();
Symbol 269 MovieClip Frame 3
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 269 MovieClip Frame 10
_root.launch = true;
Symbol 269 MovieClip Frame 18
gotoAndPlay (2);
onEnterFrame = null;
Symbol 270 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 270 MovieClip Frame 40
gotoAndPlay (2);
Symbol 277 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 277 MovieClip Frame 100
gotoAndPlay (2);
Symbol 291 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 291 MovieClip Frame 80
gotoAndPlay (2);
Symbol 304 MovieClip Frame 1
_root.dynName(this);
nextFrame();
play();
onEnterFrame = function () {
if (!_root.gamePaused) {
play();
cur.play();
} else {
stop();
cur.stop();
}
};
Symbol 304 MovieClip Frame 25
gotoAndPlay (2);