Frame 1
FRAMES_IN_FIRST_SCENE = 5;
BOTTOM_BAR_DEPTH = 10000;
bottomBarCreated = false;
ratioLoaded = 0;
lastBytesLoaded = 0;
frameCounter = 0;
loadingMessage = "Uh-oh!";
Instance of Symbol 2 MovieClip in Frame 2
onClipEvent (load) {
endX = 325;
startX = 0;
_x = startX;
}
onClipEvent (enterFrame) {
_x = (startX + ((endX - startX) * _root.ratioLoaded));
}
Frame 3
frameCounter++;
ratioLoaded = _root.getBytesLoaded() / _root.getBytesTotal();
if (frameCounter == 30) {
frameCounter = 0;
bytesLoadingPerSecond = _root.getBytesLoaded() - lastBytesLoaded;
bytesLeftToLoad = _root.getBytesTotal() - _root.getBytesLoaded();
secondsLeftToLoad = bytesLeftToLoad / bytesLoadingPerSecond;
loadingMessage = ("That's gonna be one sticky eye in " + Math.ceil(secondsLeftToLoad)) + " second(s)!";
lastBytesLoaded = _root.getBytesLoaded();
}
if (ratioLoaded < 1) {
gotoAndPlay (2);
}
Frame 4
stop();
Frame 5
stop();
Instance of Symbol 55 MovieClip in Frame 5
onClipEvent (load) {
stop();
}
Frame 6
function nextDepth() {
currDepth++;
if (currDepth == MAX_DEPTH) {
currDepth = START_DEPTH;
}
return(currDepth);
}
function playSound(snd) {
if (!_root.sounds.soundFXOn) {
return(undefined);
}
theSound = new Sound(_root.sounds);
theSound.setVolume(_root.sounds.soundFXVolume);
_root.sounds.gotoAndStop(snd);
}
START_DEPTH = 1000;
currDepth = START_DEPTH;
MAX_DEPTH = START_DEPTH + 100;
stop();
Instance of Symbol 102 MovieClip "music" in Frame 6
onClipEvent (load) {
function playCurrentSong() {
if (!musicOn) {
return(undefined);
}
stopAllSounds();
this.gotoAndStop(currentSong + 1);
}
function setVolume(vol) {
musicVolume = vol;
musicObj.setVolume(vol);
}
musicOn = true;
soundFXOn = true;
soundFXVolume = 100;
musicObj = new Sound(this);
musicVolume = 100;
currentSong = 1;
playCurrentSong();
}
Instance of Symbol 111 MovieClip "sounds" in Frame 6
onClipEvent (load) {
soundFXOn = true;
soundFXVolume = 100;
}
Instance of Symbol 55 MovieClip "backgroundMC" in Frame 6
onClipEvent (load) {
function prevBG() {
bgNum--;
if (bgNum < 1) {
bgNum = TOTAL_BG_COUNT;
}
updateDisplay();
}
function nextBG() {
bgNum++;
if (bgNum > TOTAL_BG_COUNT) {
bgNum = 1;
}
updateDisplay();
}
function updateDisplay() {
this.gotoAndStop(bgNum);
}
bgNum = 1;
TOTAL_BG_COUNT = 4;
updateDisplay();
}
Instance of Symbol 308 MovieClip "bottomBar" in Frame 6
onClipEvent (load) {
function mouseTouchingPreferencesBox() {
return(((((_root._xmouse > 375) and (_root._xmouse < 500)) and (_root._ymouse > 170)) and (_root._ymouse < 375)) and preferencesBox._visible);
}
function mouseTouchingManipulationBox() {
return(((((_root._xmouse > 250) and (_root._xmouse < 375)) and (_root._ymouse > 270)) and (_root._ymouse < 375)) and manipulateBox._visible);
}
function mouseTouchingInformationBox() {
return(((((_root._xmouse > 125) and (_root._xmouse < 250)) and (_root._ymouse > 270)) and (_root._ymouse < 375)) and informationBox._visible);
}
function mouseTouchingInstructionBox() {
return(((((_root._xmouse > 0) and (_root._xmouse < 125)) and (_root._ymouse > 305)) and (_root._ymouse < 375)) and instructionsBox._visible);
}
function mouseTouchingBar() {
return(_root._ymouse > (Stage.height - 30));
}
function mouseTouchingBottomBar() {
return((((mouseTouchingManipulationBox() or mouseTouchingBar()) or mouseTouchingInstructionBox()) or mouseTouchingInformationBox()) or mouseTouchingPreferencesBox());
}
this.swapDepths(0);
if (_root.bottomBarCreated) {
this.removeMovieClip();
}
this.swapDepths(_root.BOTTOM_BAR_DEPTH);
_root.bottomBarCreated = true;
}
Instance of Symbol 310 MovieClip "controller" in Frame 6
onClipEvent (load) {
startDrag (_root.star, true);
Mouse.hide();
starCount = 1;
totalStars = 1;
makeTrail = true;
degredationFactor = 0.9;
}
onClipEvent (enterFrame) {
if (!makeTrail) {
return(undefined);
}
currDepth = _root.nextDepth();
_root.star.duplicateMovieClip("star" + currDepth, currDepth);
newStar = _root["star" + currDepth];
newStar._x = _root.star._x;
newStar._y = _root.star._y;
starCount++;
totalStars++;
}
onClipEvent (unload) {
Mouse.show();
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
_root["star" + i].removeMovieClip();
i++;
}
}
Instance of Symbol 312 MovieClip "star" in Frame 6
onClipEvent (load) {
myX = _x;
}
onClipEvent (enterFrame) {
if (_name != "star") {
_xscale = (_xscale * _root.controller.degredationFactor);
_yscale = (_yscale * _root.controller.degredationFactor);
_alpha = (_alpha * _root.controller.degredationFactor);
if (_height < 10) {
_root.controller.starCount--;
removeMovieClip(this);
}
} else {
_rotation = (_rotation + ((_x - myX) + 2));
myX = _x;
if (_root.bottomBar.mouseTouchingBottomBar()) {
Mouse.show();
} else {
Mouse.hide();
}
}
}
Frame 7
currDepth = START_DEPTH;
MAX_DEPTH = START_DEPTH + 100;
stop();
Instance of Symbol 310 MovieClip in Frame 7
onClipEvent (load) {
_root.hoverbot.swapDepths(_root.MAX_DEPTH + 1);
}
onClipEvent (unload) {
_root.hoverbot.removeMovieClip();
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
_root["skidmark" + i].removeMovieClip();
i++;
}
}
Instance of Symbol 322 MovieClip "hoverbot" in Frame 7
onClipEvent (load) {
function createSkidMark(skidMarkTarget) {
currDepth = _root.nextDepth();
_root.skidmark.duplicateMovieClip("skidmark" + currDepth, currDepth);
newSkidmark = _root["skidmark" + currDepth];
point = new Object();
point.x = skidMarkTarget._x;
point.y = skidMarkTarget._y;
localToGlobal(point);
newSkidmark._x = point.x;
newSkidmark._y = point.y;
newSkidmark._rotation = _rotation;
}
function createRocketRing(rocketRingTarget) {
currDepth = _root.nextDepth();
_root.rocketRing.duplicateMovieClip("rocketRing" + currDepth, currDepth);
newRocketRing = _root["rocketRing" + currDepth];
point = new Object();
point.x = rocketRingTarget._x;
point.y = rocketRingTarget._y;
localToGlobal(point);
newRocketRing._x = point.x;
newRocketRing._y = point.y;
newRocketRing._rotation = _rotation;
}
function setShadow() {
_root.hoverbotshadow._x = _x + 10;
_root.hoverbotshadow._y = _y + 10;
_root.hoverbotshadow._rotation = _rotation;
}
ROTATION_DEGREE = 7;
MAX_SPEED = 50;
ACCELERATION = 0.25;
speed = 0;
setShadow();
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
_rotation = (_rotation - ROTATION_DEGREE);
}
if (Key.isDown(39)) {
_rotation = (_rotation + ROTATION_DEGREE);
}
rotationInDegrees = -_rotation;
if (rotationInDegrees < 0) {
rotationInDegrees = rotationInDegrees + 360;
}
rotationInRadians = (Math.PI * rotationInDegrees) / 180;
facingX = Math.cos(rotationInRadians);
facingY = -Math.sin(rotationInRadians);
if (Key.isDown(38)) {
speed = speed + ACCELERATION;
if (speed > MAX_SPEED) {
speed = MAX_SPEED;
}
createRocketRing(this.leftRocketHitArea);
createRocketRing(this.rightRocketHitArea);
} else {
speed = speed - (ACCELERATION * 2);
}
if (Key.isDown(40)) {
speed = speed - (ACCELERATION * 3);
if (speed > 0) {
createSkidMark(this.leftRocketHitArea);
createSkidMark(this.rightRocketHitArea);
}
}
if (speed < 0) {
speed = 0;
}
_x = (_x + (facingX * speed));
_y = (_y + (facingY * speed));
if (_x < ((-_width) / 2)) {
_x = (Stage.width + (_width / 2));
} else if (_x > (Stage.width + (_width / 2))) {
_x = ((-_width) / 2);
} else if (_y < ((-_height) / 2)) {
_y = (Stage.height + (_height / 2));
} else if (_y > (Stage.height + (_height / 2))) {
_y = ((-_height) / 2);
}
setShadow();
speedDisplay = Math.round(speed);
xPosDisplay = Math.round(_x);
yPosDisplay = Math.round(_y);
}
Instance of Symbol 324 MovieClip "skidmark" in Frame 7
onClipEvent (load) {
if (_name == "skidmark") {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_name != "skidmark") {
_alpha = (_alpha - 1);
if (_alpha <= 0) {
removeMovieClip(this);
}
}
}
Instance of Symbol 327 MovieClip "rocketRing" in Frame 7
onClipEvent (load) {
if (_name == "rocketRing") {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_name != "rocketRing") {
_alpha = (_alpha - 5);
_yscale = (_yscale + 15);
if (_alpha <= 0) {
removeMovieClip(this);
}
}
}
Frame 8
currDepth = START_DEPTH;
MAX_DEPTH = START_DEPTH + 105;
stop();
Instance of Symbol 310 MovieClip "controller" in Frame 8
onClipEvent (load) {
function clearAll() {
_root.webNode.destructNodes();
_root.webLine.destructLines();
nodeArray = new Array();
lastNode = null;
_root.currDepth = _root.START_DEPTH;
numLines = 0;
numNodes = 0;
}
function meshToLastNode() {
i = 0;
while (i < nodeArray.length) {
addLine(lastNode, nodeArray[i]);
i++;
}
}
function duplicateNode() {
currDepth = _root.nextDepth();
if (currDepth > (_root.MAX_DEPTH - 15)) {
clearAll();
return(undefined);
}
_root.webNode.duplicateMovieClip("webNode" + currDepth, currDepth);
newNode = _root["webNode" + currDepth];
newNode._x = _root._xmouse;
newNode._y = _root._ymouse;
if ((lastNode != null) and (!meshMode)) {
addLine(lastNode, newNode);
}
lastNode = newNode;
if ((lastNode != null) and meshMode) {
meshToLastNode();
}
nodeArray[nodeArray.length] = lastNode;
numNodes++;
}
function addLine(fromNode, toNode) {
xDiff = toNode._x - fromNode._x;
yDiff = toNode._y - fromNode._y;
hyp = Math.sqrt(Math.pow(Math.abs(xDiff), 2) + Math.pow(Math.abs(yDiff), 2));
cos = xDiff / hyp;
thetaRad = Math.acos(cos);
thetaDeg = (180 * thetaRad) / Math.PI;
if (yDiff < 0) {
thetaDeg = -thetaDeg;
} else if ((Math.round(yDiff) == 0) and (xDiff < 0)) {
thetaDeg = 180;
}
currDepth = _root.nextDepth();
_root.webLine.duplicateMovieClip("webLine" + currDepth, currDepth);
Set("newLine", _root["webLine" + currDepth]);
newLine._x = lastNode._x;
newLine._y = lastNode._y;
newLine._rotation = thetaDeg;
newLine._xscale = (hyp / 50) * 100;
numLines++;
}
lastNode = null;
nodeArray = new Array();
meshMode = false;
numLines = 0;
numNodes = 0;
}
onClipEvent (mouseDown) {
if (!_root.bottomBar.mouseTouchingBottomBar()) {
duplicateNode();
}
}
Instance of Symbol 335 MovieClip "webNode" in Frame 8
onClipEvent (load) {
function destructNodes() {
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
_root["webNode" + i].removeMovieClip();
i++;
}
}
_visible = (_name != "webNode");
}
onClipEvent (unload) {
destructNodes();
}
Instance of Symbol 341 MovieClip "webLine" in Frame 8
onClipEvent (load) {
function destructLines() {
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
_root["webLine" + i].removeMovieClip();
i++;
}
}
_visible = (_name != "webLine");
}
onClipEvent (unload) {
destructLines();
}
Frame 9
currDepth = START_DEPTH;
MAX_DEPTH = START_DEPTH + 100;
stop();
Instance of Symbol 310 MovieClip "controller" in Frame 9
onClipEvent (load) {
function duplicateRing(theXScale, theYScale) {
currDepth = _root.nextDepth();
_root.sphereRing.duplicateMovieClip("sphereRing" + currDepth, currDepth);
newRing = _root["sphereRing" + currDepth];
newRing._x = xPos;
newRing._y = yPos;
newRing._xscale = theXScale;
newRing._yscale = theYScale;
newRing.circle._width = SPHERE_SIZE;
newRing.circle._height = SPHERE_SIZE;
}
xPos = 275;
yPos = 200;
displacement = 5;
xScale = MAX_SCALE;
yScale = 0;
MAX_SCALE = 100;
SPHERE_SIZE = 50;
}
onClipEvent (enterFrame) {
if (Key.isDown(37) and (xPos > displacement)) {
xPos = xPos - displacement;
}
if (Key.isDown(39) and (xPos < (Stage.width - displacement))) {
xPos = xPos + displacement;
}
if (Key.isDown(38) and (yPos > displacement)) {
yPos = yPos - displacement;
}
if (Key.isDown(40) and (yPos < (Stage.height - displacement))) {
yPos = yPos + displacement;
}
xScale = xScale + 5;
yScale = yScale + 5;
if (xScale >= MAX_SCALE) {
xScale = -MAX_SCALE;
}
if (yScale >= MAX_SCALE) {
yScale = -MAX_SCALE;
}
duplicateRing(xScale, 100);
duplicateRing(100, yScale);
}
Instance of Symbol 345 MovieClip "sphereRing" in Frame 9
onClipEvent (load) {
function removeRings() {
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
_root["sphereRing" + i].removeMovieClip();
i++;
}
}
_visible = (_name != "sphereRing");
}
onClipEvent (enterFrame) {
if (_visible) {
_alpha = (_alpha * 0.9);
if (_alpha <= 0) {
this.removeMovieClip();
}
}
}
onClipEvent (unload) {
if (_name == "sphereRing") {
removeRings();
}
}
Frame 10
currDepth = START_DEPTH;
MAX_DEPTH = START_DEPTH + 100;
stop();
Instance of Symbol 310 MovieClip "controller5" in Frame 10
onClipEvent (load) {
function generateBubble() {
currDepth = _root.nextDepth();
_root.bubble.duplicateMovieClip("bubble" + currDepth, currDepth);
newBubble = _root["bubble" + currDepth];
thisScale = bubbleScale + (Math.random() * bubbleScale);
newBubble._xscale = thisScale;
newBubble._yscale = thisScale;
newBubble._x = (Stage.width / 2) + (((Math.random() * 2) - 1) * ((Stage.width * bubbleSpread) / 200));
newBubble._y = Stage.height + (newBubble._height / 2);
newBubble._alpha = bubbleAlpha;
bubbleColor = new Color(newBubble.coloring);
bubbleColor.setRGB(((redComponent << 16) + (greenComponent << 8)) + blueComponent);
onscreenBubbles++;
totalBubblesGenerated++;
}
function calcPopRatio() {
ratio = bubblesPopped / totalBubblesGenerated;
ratio = ratio * 1000;
ratio = Math.round(ratio);
ratio = ratio / 10;
popRatio = ratio + "%";
}
bubbleGenerationRate = 0.2;
maxGenerationRate = 0.8;
bubbleScale = 25;
bubbleSpeed = 5;
maxBubbleSpeed = 20;
bubbleAlpha = 40;
onscreenBubbles = 0;
totalBubblesGenerated = 0;
bubblesPopped = 0;
popRatio = 0;
redComponent = 255;
greenComponent = 255;
blueComponent = 255;
bubbleSpread = 100;
}
onClipEvent (enterFrame) {
calcPopRatio();
if ((Math.random() < bubbleGenerationRate) and (onscreenBubbles < (_root.MAX_DEPTH - _root.START_DEPTH))) {
generateBubble();
}
}
onClipEvent (unload) {
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
_root["bubble" + i].removeMovieClip();
i++;
}
}
Instance of Symbol 353 MovieClip "bubble" in Frame 10
onClipEvent (load) {
_visible = (_name != "bubble");
speed = (Math.random() * _root.controller5.bubbleSpeed) + ((Math.random() * _root.controller5.bubbleSpeed) / 3);
}
onClipEvent (enterFrame) {
if (_visible and (_currentframe == 1)) {
_y = (_y - speed);
if (_y < (-(_height / 2))) {
this.removeMovieClip();
}
}
}
onClipEvent (unload) {
_root.controller5.onscreenBubbles--;
}
Instance of Symbol 310 MovieClip "controller" in Frame 11
onClipEvent (load) {
stepsTaken = 0;
}
onClipEvent (keyDown) {
if (Key.isDown(37)) {
_root.penguin._y = _root.penguin.startY;
_root.penguin.sittingChange = 0;
_root.penguin.flying = false;
_root.penguin.gotoAndStop(3);
} else if (Key.isDown(39)) {
_root.penguin._y = _root.penguin.startY;
_root.penguin.sittingChange = 0;
_root.penguin.flying = false;
_root.penguin.gotoAndStop(2);
}
}
onClipEvent (keyUp) {
if ((!Key.isDown(37)) and (!Key.isDown(39))) {
_root.penguin.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
_root.penguin._x = _root.penguin._x - 2;
} else if (Key.isDown(39)) {
_root.penguin._x = _root.penguin._x + 2;
}
}
onClipEvent (unload) {
}
Instance of Symbol 422 MovieClip "penguin" in Frame 11
onClipEvent (load) {
flying = false;
sitting = false;
flyingCount = 10;
startY = _y;
sittingChange = 0;
pokeCount = 0;
}
onClipEvent (enterFrame) {
if (flying) {
_y = (_y - 3);
} else {
_y = (_y + 10);
}
if (_y > (startY + sittingChange)) {
_y = (startY + sittingChange);
}
}
Frame 12
currDepth = START_DEPTH;
MAX_DEPTH = START_DEPTH + 100;
stop();
Instance of Symbol 310 MovieClip "controller" in Frame 12
onClipEvent (load) {
function generateFloors() {
destroyFloors();
i = 2;
while (i <= floorCount) {
_root.aFloor1.duplicateMovieClip("aFloor" + i, ((_root.START_DEPTH - MAX_FLOORS) - 3) + i);
newFloor = _root["aFloor" + i];
newFloor._x = _root.aFloor1._x;
newFloor._y = _root.aFloor1._y - (40 * (i - 1));
newFloor.floorNumber = i;
i++;
}
}
function destroyFloors() {
i = 2;
while (i <= MAX_FLOORS) {
_root["aFloor" + i].removeMovieClip();
i++;
}
}
function createStickman(createOnFloor) {
if (totalStickmenInUse >= (MAX_STICKMEN - 1)) {
return(undefined);
}
totalStickmenInUse++;
currDepth = this.nextDepth();
_root.stickman.duplicateMovieClip("stickman" + currDepth, currDepth);
newStickman = _root["stickman" + currDepth];
newStickman._x = STICKMAN_START_X;
newStickman._y = STICKMAN_START_Y - (40 * (createOnFloor - 2));
newStickman.desiredFloor = Math.floor(Math.random() * floorCount) + 1;
newStickman.currentFloor = createOnFloor;
newStickman.idNumber = currDepth;
usedStickmanDepths[currDepth - _root.START_DEPTH] = true;
}
function destroyAllMen() {
i = stickmanStartDepth;
while (i <= _root.MAX_DEPTH) {
_root["stickman" + i].removeMovieClip();
i++;
}
}
function reset() {
destroyAllMen();
generateFloors();
_root.elevator1.reset();
_root.elevator2.reset();
}
function nextDepth() {
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
if (!usedStickmanDepths[i - _root.START_DEPTH]) {
return(i);
}
i++;
}
}
function updateAvgWaitTime(newWaitTime) {
totalWaitTime = totalWaitTime + newWaitTime;
avgWaitTime = Math.round((totalWaitTime / totalStickmenProcessed) / 30) + " seconds";
}
usedStickmanDepths = new Array();
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
usedStickmanDepths[i] = false;
i++;
}
floorCount = 4;
MAX_FLOORS = 9;
STICKMAN_START_X = 510;
STICKMAN_START_Y = 325;
STICKMAN_WAIT_X = 205;
MAX_STICKMEN = _root.MAX_DEPTH - _root.START_DEPTH;
elevator1Depth = _root.START_DEPTH - 2;
elevator2Depth = elevator1Depth + 1;
stickmanStartDepth = _root.START_DEPTH;
_root.elevator1.swapDepths(elevator1Depth);
_root.elevator2.swapDepths(elevator2Depth);
stickmenSpeed = 3;
totalStickmenInUse = 0;
totalStickmenProcessed = 0;
totalWaitTime = 0;
avgWaitTime = "0 seconds";
generateFloors();
_root.aFloor1.floorNumber = 1;
}
onClipEvent (unload) {
destroyAllMen();
destroyFloors();
_root.elevator1.removeMovieClip();
_root.elevator2.removeMovieClip();
}
Instance of Symbol 434 MovieClip "aFloor1" in Frame 12
onClipEvent (load) {
function addToWaitQueue(waiter) {
waitQueue[waitQueue.length] = waiter;
}
function removeFromWaitQueue() {
if (waitQueue.length == 0) {
return(null);
}
frontOfLine = waitQueue[waitQueue.length - 1];
waitQueue.length--;
return(frontOfLine);
}
waitQueue = new Array();
elevatorAtFloor = false;
}
Instance of Symbol 440 MovieClip "elevator1" in Frame 12
onClipEvent (load) {
startFloor = 1;
}
Instance of Symbol 440 MovieClip "elevator2" in Frame 12
onClipEvent (load) {
startFloor = 2;
}
Instance of Symbol 451 MovieClip "stickman" in Frame 12
onClipEvent (load) {
function stopMoving() {
moveForward = false;
gotoAndStop (6);
}
function resumeMoving() {
moveForward = true;
play();
}
moveForward = true;
enteringElevator = false;
_visible = (_name != "stickman");
waitTime = 0;
}
onClipEvent (enterFrame) {
if (_name != "stickman") {
waitTime++;
currentFloorObj = _root["aFloor" + currentFloor];
if (this.hitTest(currentFloorObj.endPortal.hitArea) and moveForward) {
stopMoving();
this.disappear.play();
} else if ((((_x < (_root.controller.STICKMAN_WAIT_X + (currentFloorObj.waitQueue.length * 5))) and moveForward) and (desiredFloor != currentFloor)) and (!enteringElevator)) {
currentFloorObj.addToWaitQueue(this);
stopMoving();
} else if (moveForward) {
_x = (_x - _root.controller.stickmenSpeed);
}
}
}
onClipEvent (unload) {
_root.controller.totalStickmenInUse--;
_root.controller.totalStickmenProcessed++;
_root.controller.updateAvgWaitTime(waitTime);
_root.controller.usedStickmanDepths[idNumber - _root.START_DEPTH] = false;
}
Frame 13
stop();
Instance of Symbol 477 MovieClip "pants" in Frame 13
onClipEvent (load) {
price = 19.99;
threadCount = 300;
}
onClipEvent (enterFrame) {
price = price + 0.001;
priceDisplay = substring("$" + price, 0, 6);
if ((threadCount > 1) && (Math.random() < 0.1)) {
threadCount--;
}
}
Frame 14
stop();
Instance of Symbol 310 MovieClip "controller9" in Frame 14
onClipEvent (load) {
function getHexCharacter(num) {
switch (num) {
case 10 :
return("A");
case 11 :
return("B");
case 12 :
return("C");
case 13 :
return("D");
case 14 :
return("E");
case 15 :
return("F");
}
return(num);
}
function getHexColorString(red, green, blue) {
rslt = "#";
rslt = rslt + getHexCharacter(Math.floor(red / 16));
rslt = rslt + getHexCharacter(red % 16);
rslt = rslt + getHexCharacter(Math.floor(green / 16));
rslt = rslt + getHexCharacter(green % 16);
rslt = rslt + getHexCharacter(Math.floor(blue / 16));
rslt = rslt + getHexCharacter(blue % 16);
return(rslt);
}
function randomizeAll() {
i = 1;
while (i <= 3) {
_root["orb" + i].setRandomColor();
i++;
}
_root.orb4.calculateAverageColor();
}
maxRed = (maxGreen = (maxBlue = 256));
}
Frame 15
currDepth = START_DEPTH;
MAX_DEPTH = START_DEPTH + 100;
stop();
Instance of Symbol 310 MovieClip "controller10" in Frame 15
onClipEvent (load) {
function updateSnakeSize(size) {
snakeSize = size;
_root.snake0._xscale = snakeSize;
_root.snake0._yscale = snakeSize;
}
function destroySnake() {
i = 1;
while (i <= snakeLinkCount) {
_root["snake" + i].removeMovieClip();
i++;
}
}
function resetSnake() {
_root.snake0.swapDepths(snakeLinkCount + 1);
i = 1;
while (i <= snakeLinkCount) {
_root.snake0.duplicateMovieClip("snake" + i, (snakeLinkCount - i) + 1);
newLink = _root["snake" + i];
newLink._y = _root.snake0._y;
newLink._x = _root.snake0._x - ((_root.snake0._width / 5) * i);
i++;
}
}
function getAngleInRadians(x1, y1, x2, y2) {
return(Math.atan2(y2 - y1, x2 - x1));
}
function getAngleInDegrees(x1, y1, x2, y2) {
return(getAngleInRadians(x1, y1, x2, y2) / (Math.PI/180));
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)));
}
function moveObjectCloserToPointBy(obj, point_x, point_y, distance) {
currDist = dist(obj._x, obj._y, point_x, point_y);
if ((currDist - snakeSpeed) < (_root.snake0._width / 2)) {
newDist = currDist - (_root.snake0._width / 3);
if ((newDist < distance) and (newDist > 0)) {
distance = newDist;
} else {
distance = 0;
}
}
angle = getAngleInRadians(obj._x, obj._y, point_x, point_y);
xOffset = Math.cos(angle) * distance;
yOffset = Math.sin(angle) * distance;
obj._x = obj._x + xOffset;
obj._y = obj._y + yOffset;
return(distance);
}
snakeLinkCount = 10;
snakeSpeed = 10;
snakeSize = 75;
distanceTravelled = 0;
distanceTravelledDisplay = "0 cm";
hissCount = 0;
updateSnakeSize(snakeSize);
resetSnake();
}
onClipEvent (enterFrame) {
i = snakeLinkCount;
while (i > 0) {
currLink = _root["snake" + i];
prevLink = _root["snake" + (i - 1)];
moveObjectCloserToPointBy(currLink, prevLink._x, prevLink._y, snakeSpeed);
i--;
}
if (dist(_root.snake0._x, _root.snake0._y, _root._xmouse, _root._ymouse) > 1) {
_root.snake0._rotation = getAngleInDegrees(_root.snake0._x, _root.snake0._y, _root._xmouse, _root._ymouse);
distanceTravelled = distanceTravelled + moveObjectCloserToPointBy(_root.snake0, _root._xmouse, _root._ymouse, snakeSpeed);
distanceTravelledDisplay = Math.floor(distanceTravelled) + " cm";
}
i = snakeLinkCount;
while (i > 0) {
currLink = _root["snake" + i];
prevLink = _root["snake" + (i - 1)];
currLink._rotation = getAngleInDegrees(currLink._x, currLink._y, prevLink._x, prevLink._y);
i--;
}
}
onClipEvent (mouseDown) {
if (!_root.bottomBar.mouseTouchingBottomBar()) {
_root.snake0.tongue.play();
_root.playSound("snakeHiss");
hissCount++;
}
}
onClipEvent (unload) {
destroySnake();
_root.snake0.removeMovieClip();
}
Frame 16
currDepth = START_DEPTH;
MAX_DEPTH = START_DEPTH + 500;
stop();
Instance of Symbol 310 MovieClip "controller" in Frame 16
onClipEvent (load) {
function changeSpeed(newSpeed) {
if ((newSpeed > 0) and (newSpeed < (MAX_SPEED + 1))) {
fireballSpeed = newSpeed;
i = 1;
while (i <= fireballCount) {
_root["fireball" + i].circle.speedEffect._alpha = (fireballSpeed / MAX_SPEED) * 100;
i++;
}
}
}
function changeRadius(newRad) {
if ((newRad > 20) and (newRad < 251)) {
fireballRadius = newRad;
i = 1;
while (i <= fireballCount) {
_root["fireball" + i].circle._x = newRad;
i++;
}
}
}
function destroyFireballs() {
i = 2;
while (i <= fireballCount) {
_root["fireball" + i].removeMovieClip();
i++;
}
}
function destroySparks() {
i = _root.START_DEPTH;
while (i <= _root.MAX_DEPTH) {
_root["spark" + i].removeMovieClip();
i++;
}
}
function changeFireballsNumber(newNum) {
if ((newNum > 0) and (newNum < 11)) {
destroyFireballs();
fireballCount = newNum;
theta = 360 / fireballCount;
i = 2;
while (i <= fireballCount) {
_root.fireball1.duplicateMovieClip("fireball" + i, i);
_root["fireball" + i]._rotation = _root["fireball" + i]._rotation + (theta * (i - 1));
i++;
}
changeRadius(fireballRadius);
changeSpeed(fireballSpeed);
}
}
MAX_SPEED = 30;
fireballSpeed = 5;
fireballRadius = 120;
fireballCount = 1;
sparkCount = 0;
throwSparks = true;
changeFireballsNumber(1);
_root.spark._visible = false;
}
onClipEvent (enterFrame) {
i = 1;
while (i <= fireballCount) {
_root["fireball" + i]._rotation = _root["fireball" + i]._rotation + fireballSpeed;
i++;
}
}
onClipEvent (unload) {
destroyFireballs();
destroySparks();
}
Instance of Symbol 495 MovieClip "spark" in Frame 16
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_name != "spark") {
_x = (_x + xComp);
_y = (_y + yComp);
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.removeMovieClip();
}
}
}
Instance of Symbol 507 MovieClip "fireball1" in Frame 16
onClipEvent (load) {
function createSpark() {
thisDepth = _root.nextDepth();
_root.spark.duplicateMovieClip("spark" + thisDepth, thisDepth);
newSpark = _root["spark" + thisDepth];
var _local2 = {x:10, y:10};
circle.sparkLaunchPoint.localToGlobal(_local2);
newSpark._x = _local2.x;
newSpark._y = _local2.y;
newSpark.xComp = (_local2.x - lastX) / 10;
newSpark.yComp = (_local2.y - lastY) / 10;
_root.controller.sparkCount++;
}
lastX = 0;
lastY = 0;
}
onClipEvent (enterFrame) {
_rotation = (_rotation + 2);
if (_root.controller.throwSparks) {
if (Math.random() < ((_root.controller.fireballSpeed / _root.controller.MAX_SPEED) / 2)) {
createSpark();
}
var myPoint = {x:10, y:10};
circle.sparkLaunchPoint.localToGlobal(myPoint);
lastX = myPoint.x;
lastY = myPoint.y;
}
}
Instance of Symbol 511 MovieClip in Frame 17
onClipEvent (load) {
displayString = "THANK YOU FOR PLAYING ";
theta = 360 / displayString.length;
outer1._rotation = theta;
i = 2;
while (i <= displayString.length) {
outer1.duplicateMovieClip("outer" + i, i);
newLetter = this["outer" + i];
newLetter._rotation = theta * i;
i++;
}
i = 1;
while (i <= displayString.length) {
this["outer" + i].innerMC.letter = displayString.charAt(i - 1);
i++;
}
}
onClipEvent (enterFrame) {
dist = Math.sqrt(Math.pow(_root._xmouse - 275, 2) + Math.pow(_root._ymouse - 200, 2));
i = 1;
while (i <= displayString.length) {
this["outer" + i].innerMC._y = -dist;
this["outer" + i]._rotation = this["outer" + i]._rotation - 2;
i++;
}
}
Symbol 13 Button
on (release) {
getURL ("http://www.brettbits.com/", "_blank");
}
Symbol 46 MovieClip Frame 134
_root.play();
Symbol 86 Button
on (release) {
gotoAndStop (6);
}
Symbol 91 Button
on (release) {
gotoAndStop (6);
}
Symbol 97 Button
on (release) {
getURL ("http://www.albinoblacksheep.com/", "_blank");
}
Symbol 102 MovieClip Frame 2
gotoAndStop (1);
Symbol 102 MovieClip Frame 3
gotoAndStop (1);
Symbol 102 MovieClip Frame 4
gotoAndStop (1);
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 2
gotoAndStop (1);
Symbol 111 MovieClip Frame 3
call(2);
Symbol 111 MovieClip Frame 4
call(2);
Symbol 111 MovieClip Frame 5
call(2);
Symbol 111 MovieClip Frame 6
call(2);
Symbol 111 MovieClip Frame 7
call(2);
Symbol 111 MovieClip Frame 8
call(2);
Symbol 111 MovieClip Frame 9
call(2);
Symbol 117 Button
on (release) {
_root.nextFrame();
instructionsBox.arrowClicked();
informationBox.arrowClicked();
manipulateBox.arrowClicked();
}
Symbol 118 Button
on (release) {
if (_root._currentframe > (_root.FRAMES_IN_FIRST_SCENE + 1)) {
_root.prevFrame();
instructionsBox.arrowClicked();
informationBox.arrowClicked();
manipulateBox.arrowClicked();
}
}
Symbol 125 Button
on (rollOut, press) {
swap();
}
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 90
if (_parent._visible) {
_parent.swap();
}
Symbol 151 MovieClip Frame 1
stop();
Symbol 162 Button
on (press) {
swap();
}
Symbol 218 Button
on (release) {
toggleBox();
}
Symbol 224 MovieClip Frame 5
stop();
Symbol 226 Button
on (release) {
rightArrow();
}
Symbol 227 Button
on (release) {
leftArrow();
}
Symbol 233 Button
on (press) {
draggable._x = _xmouse;
barSlid();
}
Symbol 235 Button
on (press) {
startDrag (this, true, -50, 4, 50, 4);
}
on (release, releaseOutside) {
stopDrag();
_parent.barSlid();
}
Instance of Symbol 225 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
function isChecked() {
return(_currentframe == 2);
}
function changeGraphic() {
gotoAndStop((currValue ? 2 : 1));
}
function toggleBox() {
currValue = (currValue ? false : true);
changeGraphic();
doFunction();
}
function doFunction() {
_root.music.musicOn = currValue;
if (_root.music.musicOn) {
_root.music.playCurrentSong();
} else {
stopAllSounds();
}
}
defaultValue = true;
currValue = defaultValue;
changeGraphic();
}
Instance of Symbol 228 MovieClip "currentSongControl" in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
function leftArrow() {
if (_root.music.currentSong > 1) {
_root.music.currentSong--;
} else {
_root.music.currentSong = 3;
}
_root.music.playCurrentSong();
}
function rightArrow() {
if (_root.music.currentSong < 3) {
_root.music.currentSong++;
} else {
_root.music.currentSong = 1;
}
_root.music.playCurrentSong();
}
}
onClipEvent (enterFrame) {
display = _root.music.currentSong;
}
Instance of Symbol 238 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
function updateGlobal() {
_root.music.setVolume(currValue);
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
}
minValue = 1;
maxValue = 100;
currValue = _root.music.musicVolume;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 225 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
function isChecked() {
return(_currentframe == 2);
}
function changeGraphic() {
gotoAndStop((currValue ? 2 : 1));
}
function toggleBox() {
currValue = (currValue ? false : true);
changeGraphic();
doFunction();
}
function doFunction() {
_root.sounds.soundFXOn = currValue;
}
defaultValue = true;
currValue = defaultValue;
changeGraphic();
}
Instance of Symbol 238 MovieClip in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
function updateGlobal() {
_root.sounds.soundFXVolume = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
}
minValue = 1;
maxValue = 100;
currValue = _root.sounds.soundFXVolume;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 228 MovieClip "qualityControl" in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
function leftArrow() {
if (_root._quality == "LOW") {
_root._quality = "HIGH";
} else if (_root._quality == "HIGH") {
_root._quality = "MEDIUM";
} else if (_root._quality == "MEDIUM") {
_root._quality = "LOW";
}
}
function rightArrow() {
if (_root._quality == "HIGH") {
_root._quality = "LOW";
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
} else if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
}
}
}
onClipEvent (enterFrame) {
display = _root._quality;
}
Instance of Symbol 228 MovieClip "backgroundControl" in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
function leftArrow() {
_root.backgroundMC.prevBG();
}
function rightArrow() {
_root.backgroundMC.nextBG();
}
}
onClipEvent (enterFrame) {
display = _root.backgroundMC.bgNum;
}
Symbol 247 Button
on (release) {
instructionsBox.swap();
}
Symbol 248 Button
on (release) {
manipulateBox.swap();
}
Symbol 262 Button
on (release) {
_root.controller.clearAll();
}
Symbol 280 Button
on (release) {
_root.controller.reset();
}
Symbol 285 Button
on (release) {
_root.controller9.randomizeAll();
}
Symbol 291 Button
on (release) {
_root.controller10.resetSnake();
}
Symbol 303 Button
on (release) {
stopAllSounds();
tellTarget ("_level0") {
gotoAndPlay (4);
};
_root.bottomBarCreated = false;
_root.bottomBar.removeMovieClip();
}
Instance of Symbol 225 MovieClip in Symbol 305 MovieClip Frame 1
onClipEvent (load) {
function isChecked() {
return(_currentframe == 2);
}
function changeGraphic() {
gotoAndStop((currValue ? 2 : 1));
}
function toggleBox() {
currValue = (currValue ? false : true);
changeGraphic();
doFunction();
}
function doFunction() {
_root.controller.makeTrail = currValue;
}
defaultValue = true;
currValue = defaultValue;
changeGraphic();
}
Instance of Symbol 228 MovieClip "degradationControl" in Symbol 305 MovieClip Frame 1
onClipEvent (load) {
function rightArrow() {
if (_root.controller.degredationFactor > 0.8) {
_root.controller.degredationFactor = _root.controller.degredationFactor - 0.01;
}
}
function leftArrow() {
if (_root.controller.degredationFactor < 0.98) {
_root.controller.degredationFactor = _root.controller.degredationFactor + 0.01;
}
}
}
onClipEvent (enterFrame) {
display = Math.round((1 - _root.controller.degredationFactor) * 100) + "%";
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 2
onClipEvent (load) {
function leftArrow() {
if (_root.hoverbot.ROTATION_DEGREE > 1) {
_root.hoverbot.ROTATION_DEGREE--;
}
}
function rightArrow() {
if (_root.hoverbot.ROTATION_DEGREE < 20) {
_root.hoverbot.ROTATION_DEGREE++;
}
}
}
onClipEvent (enterFrame) {
display = _root.hoverbot.ROTATION_DEGREE + "\u00B0";
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 2
onClipEvent (load) {
function leftArrow() {
if (_root.hoverbot.ACCELERATION > 0.1) {
_root.hoverbot.ACCELERATION = _root.hoverbot.ACCELERATION - 0.05;
}
twoDecimalPoints();
}
function rightArrow() {
if (_root.hoverbot.ACCELERATION < 2) {
_root.hoverbot.ACCELERATION = _root.hoverbot.ACCELERATION + 0.05;
}
twoDecimalPoints();
}
function twoDecimalPoints() {
_root.hoverbot.ACCELERATION = Math.round(_root.hoverbot.ACCELERATION * 100) / 100;
}
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 2
onClipEvent (load) {
function leftArrow() {
if (_root.hoverbot.MAX_SPEED > 10) {
_root.hoverbot.MAX_SPEED = _root.hoverbot.MAX_SPEED - 5;
}
}
function rightArrow() {
if (_root.hoverbot.MAX_SPEED < 200) {
_root.hoverbot.MAX_SPEED = _root.hoverbot.MAX_SPEED + 5;
}
}
}
Instance of Symbol 225 MovieClip in Symbol 305 MovieClip Frame 3
onClipEvent (load) {
function isChecked() {
return(_currentframe == 2);
}
function changeGraphic() {
gotoAndStop((currValue ? 2 : 1));
}
function toggleBox() {
currValue = (currValue ? false : true);
changeGraphic();
doFunction();
}
function doFunction() {
_root.controller.meshMode = currValue;
}
defaultValue = false;
currValue = defaultValue;
changeGraphic();
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 4
onClipEvent (load) {
function leftArrow() {
if (_root.controller.SPHERE_SIZE > 20) {
_root.controller.SPHERE_SIZE = _root.controller.SPHERE_SIZE - 5;
}
}
function rightArrow() {
if (_root.controller.SPHERE_SIZE < 100) {
_root.controller.SPHERE_SIZE = _root.controller.SPHERE_SIZE + 5;
}
}
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 4
onClipEvent (load) {
function leftArrow() {
if (_root.controller.displacement > 1) {
_root.controller.displacement = _root.controller.displacement - 1;
}
}
function rightArrow() {
if (_root.controller.displacement < 20) {
_root.controller.displacement = _root.controller.displacement + 1;
}
}
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 5
onClipEvent (load) {
function updateGlobal() {
_root.controller5.bubbleGenerationRate = currValue;
}
function updateDisplay() {
display = Math.round((currValue * 100) / maxValue) + "%";
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = (positionInPercent / 100) * maxValue;
updateDisplay();
updateGlobal();
}
minValue = 0;
maxValue = _root.controller5.maxGenerationRate;
currValue = _root.controller5.bubbleGenerationRate;
var display;
draggable._x = ((currValue / maxValue) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 5
onClipEvent (load) {
function updateGlobal() {
_root.controller5.bubbleAlpha = currValue;
}
function updateDisplay() {
display = Math.round((currValue / maxValue) * 100) + "%";
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
}
minValue = 20;
maxValue = 100;
currValue = _root.controller5.bubbleAlpha;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 5
onClipEvent (load) {
function updateGlobal() {
_root.controller5.bubbleSpeed = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
}
minValue = 1;
maxValue = _root.controller5.maxBubbleSpeed;
currValue = _root.controller5.bubbleSpeed;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 5
onClipEvent (load) {
function updateGlobal() {
_root.controller5.bubbleScale = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
}
minValue = 1;
maxValue = 100;
currValue = _root.controller5.bubbleScale;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 5
onClipEvent (load) {
function updateGlobal() {
_root.controller5.redComponent = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
}
minValue = 0;
maxValue = 255;
currValue = _root.controller5.redComponent;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 5
onClipEvent (load) {
function updateGlobal() {
_root.controller5.greenComponent = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
}
minValue = 0;
maxValue = 255;
currValue = _root.controller5.greenComponent;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 5
onClipEvent (load) {
function updateGlobal() {
_root.controller5.blueComponent = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
}
minValue = 0;
maxValue = 255;
currValue = _root.controller5.blueComponent;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 5
onClipEvent (load) {
function updateGlobal() {
_root.controller5.bubbleSpread = currValue;
}
function updateDisplay() {
display = Math.round((currValue * 100) / maxValue) + "%";
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = (positionInPercent / 100) * maxValue;
updateDisplay();
updateGlobal();
}
minValue = 0;
maxValue = 100;
currValue = _root.controller5.bubbleSpread;
draggable._x = ((currValue / maxValue) * 100) - 50;
updateDisplay();
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 7
onClipEvent (load) {
function leftArrow() {
if (_root.controller.floorCount > 2) {
_root.controller.floorCount--;
}
_root.controller.reset();
}
function rightArrow() {
if (_root.controller.floorCount < _root.controller.MAX_FLOORS) {
_root.controller.floorCount++;
}
_root.controller.reset();
}
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 7
onClipEvent (load) {
function leftArrow() {
if (_root.controller.stickmenSpeed > 0.5) {
_root.controller.stickmenSpeed = _root.controller.stickmenSpeed - 0.5;
}
}
function rightArrow() {
if (_root.controller.stickmenSpeed < 10) {
_root.controller.stickmenSpeed = _root.controller.stickmenSpeed + 0.5;
}
}
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 9
onClipEvent (load) {
function updateGlobal() {
_root.controller9.maxRed = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
_root.controller9.randomizeAll();
}
minValue = 0;
maxValue = 256;
currValue = _root.controller9.maxRed;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 9
onClipEvent (load) {
function updateGlobal() {
_root.controller9.maxGreen = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
_root.controller9.randomizeAll();
}
minValue = 0;
maxValue = 256;
currValue = _root.controller9.maxGreen;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 9
onClipEvent (load) {
function updateGlobal() {
_root.controller9.maxBlue = currValue;
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
_root.controller9.randomizeAll();
}
minValue = 0;
maxValue = 256;
currValue = _root.controller9.maxBlue;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 10
onClipEvent (load) {
function updateGlobal() {
_root.controller10.updateSnakeSize(currValue);
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
updateGlobal();
_root.controller10.resetSnake();
}
minValue = 10;
maxValue = 200;
currValue = _root.controller10.snakeSize;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 10
onClipEvent (load) {
function updateGlobal() {
_root.controller10.snakeLinkCount = Math.round(currValue);
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
_root.controller10.destroySnake();
updateGlobal();
_root.controller10.resetSnake();
}
minValue = 0;
maxValue = 100;
currValue = _root.controller10.snakeLinkCount;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 238 MovieClip in Symbol 305 MovieClip Frame 10
onClipEvent (load) {
function updateGlobal() {
_root.controller10.snakeSpeed = Math.round(currValue);
}
function updateDisplay() {
display = Math.round(currValue);
}
function barSlid() {
positionInPercent = draggable._x + 50;
currValue = ((positionInPercent / 100) * (maxValue - minValue)) + minValue;
updateDisplay();
_root.controller10.destroySnake();
updateGlobal();
_root.controller10.resetSnake();
}
minValue = 1;
maxValue = 40;
currValue = _root.controller10.snakeSpeed;
draggable._x = (((currValue - minValue) / (maxValue - minValue)) * 100) - 50;
updateDisplay();
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 11
onClipEvent (load) {
function leftArrow() {
_root.controller.changeSpeed(_root.controller.fireballSpeed - 1);
}
function rightArrow() {
_root.controller.changeSpeed(_root.controller.fireballSpeed + 1);
}
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 11
onClipEvent (load) {
function leftArrow() {
_root.controller.changeRadius(_root.controller.fireballRadius - 5);
}
function rightArrow() {
_root.controller.changeRadius(_root.controller.fireballRadius + 5);
}
}
Instance of Symbol 228 MovieClip "radiusControl" in Symbol 305 MovieClip Frame 11
onClipEvent (load) {
function leftArrow() {
_root.controller.changeFireballsNumber(_root.controller.fireballCount - 1);
}
function rightArrow() {
_root.controller.changeFireballsNumber(_root.controller.fireballCount + 1);
}
}
Instance of Symbol 225 MovieClip in Symbol 305 MovieClip Frame 11
onClipEvent (load) {
function isChecked() {
return(_currentframe == 2);
}
function changeGraphic() {
gotoAndStop((currValue ? 2 : 1));
}
function toggleBox() {
currValue = (currValue ? false : true);
changeGraphic();
doFunction();
}
function doFunction() {
_root.controller.throwSparks = currValue;
}
defaultValue = true;
currValue = defaultValue;
changeGraphic();
}
Symbol 306 Button
on (release) {
informationBox.swap();
}
Symbol 307 Button
on (release) {
preferencesBox.swap();
}
Instance of Symbol 151 MovieClip "instructionsBox" in Symbol 308 MovieClip Frame 1
onClipEvent (load) {
function swap() {
_visible = (_visible ? false : true);
}
function arrowClicked() {
_visible = true;
timeout.gotoAndPlay(2);
gotoAndStop(_root._currentframe - _root.FRAMES_IN_FIRST_SCENE);
}
_visible = false;
arrowClicked();
}
Instance of Symbol 214 MovieClip "informationBox" in Symbol 308 MovieClip Frame 1
onClipEvent (load) {
function swap() {
_visible = (_visible ? false : true);
}
function arrowClicked() {
gotoAndStop(_root._currentframe - _root.FRAMES_IN_FIRST_SCENE);
}
_visible = false;
arrowClicked();
}
Instance of Symbol 246 MovieClip "preferencesBox" in Symbol 308 MovieClip Frame 1
onClipEvent (load) {
function swap() {
_visible = (_visible ? false : true);
}
_visible = false;
}
Instance of Symbol 305 MovieClip "manipulateBox" in Symbol 308 MovieClip Frame 1
onClipEvent (load) {
function swap() {
_visible = (_visible ? false : true);
}
function arrowClicked() {
gotoAndStop(_root._currentframe - _root.FRAMES_IN_FIRST_SCENE);
}
_visible = false;
arrowClicked();
}
Symbol 310 MovieClip Frame 1
_visible = false;
Symbol 316 MovieClip Frame 1
_visible = false;
Symbol 321 MovieClip Frame 1
if (showFire()) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}
Symbol 321 MovieClip Frame 3
if (!showFire()) {
gotoAndPlay (1);
}
Instance of Symbol 321 MovieClip "rightRocket" in Symbol 322 MovieClip Frame 1
onClipEvent (load) {
function showFire() {
return(Key.isDown(37));
}
}
Instance of Symbol 321 MovieClip "leftRocket" in Symbol 322 MovieClip Frame 1
onClipEvent (load) {
function showFire() {
return(Key.isDown(39));
}
}
Symbol 349 Button
on (rollOver) {
if (!_root.bottomBar.mouseTouchingBottomBar()) {
_root.playSound("bubblePop" + Math.floor((Math.random() * 2.99) + 1));
play();
}
}
Symbol 353 MovieClip Frame 1
stop();
Symbol 353 MovieClip Frame 5
_root.controller5.bubblesPopped++;
this.removeMovieClip();
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 11
stop();
Symbol 357 Button
on (press) {
_parent.pokeCount++;
_root.playSound("penguinSquawk2");
_parent.speech.play();
}
Symbol 360 Button
on (press) {
_parent.pokeCount++;
play();
}
Symbol 362 MovieClip Frame 1
stop();
Symbol 362 MovieClip Frame 2
if ((_parent.foot1._currentframe > 1) and (_parent.foot2._currentframe > 1)) {
_parent.foot1.gotoAndStop(2);
_parent.foot2.gotoAndStop(2);
_parent.sitting = true;
_parent.sittingChange = 20;
_parent._y = _parent.startY;
_root.playSound("penguinFall");
_parent.dustCloud.play();
}
Symbol 362 MovieClip Frame 15
if ((_parent.foot1._currentframe == 1) or (_parent.foot2._currentframe == 1)) {
gotoAndStop (1);
}
Symbol 365 Button
on (press) {
_parent._parent.pokeCount++;
_root.playSound("penguinEyeSquish");
setSquinting(true);
play();
}
Symbol 367 Button
on (press) {
_parent._parent.pokeCount++;
_root.playSound("penguinEyeSquish");
gotoAndPlay ("tears");
}
Symbol 380 MovieClip Frame 1
setSquinting(false);
stop();
Symbol 380 MovieClip Frame 33
gotoAndStop (1);
Symbol 380 MovieClip Frame 108
gotoAndStop (1);
Symbol 383 Button
on (press) {
_parent._parent.pokeCount++;
_root.playSound("penguinSquawk");
_parent._parent.mouthOpen = true;
play();
}
Symbol 385 MovieClip Frame 1
_parent._parent.mouthOpen = false;
stop();
Symbol 386 Button
on (press) {
_parent._parent.pokeCount++;
play();
}
Symbol 397 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 52
stop();
Instance of Symbol 380 MovieClip in Symbol 398 MovieClip Frame 1
onClipEvent (load) {
function setSquinting(val) {
_parent._parent.squinting2 = val;
}
}
Instance of Symbol 380 MovieClip in Symbol 398 MovieClip Frame 1
onClipEvent (load) {
function setSquinting(val) {
_parent._parent.squinting1 = val;
}
}
Symbol 402 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 2
if ((_parent.arm1._currentframe > 1) and (_parent.arm2._currentframe > 1)) {
_parent.flying = true;
_parent.arm1.gotoAndPlay(46);
_parent.arm2.gotoAndPlay(46);
}
Symbol 402 MovieClip Frame 45
gotoAndStop (1);
Symbol 402 MovieClip Frame 55
_parent.flyingCount--;
if (_parent.flyingCount > 0) {
gotoAndPlay (46);
} else {
_parent.flyingCount = 10;
_parent.flying = false;
}
if (!_parent.flying) {
_parent.arm1.gotoAndStop(1);
_parent.arm2.gotoAndStop(1);
}
Symbol 412 MovieClip Frame 1
stop();
Instance of Symbol 411 MovieClip in Symbol 412 MovieClip Frame 11
onClipEvent (load) {
_parent.currNum++;
if (_parent.currNum > 7) {
_parent.currNum = 1;
}
gotoAndStop(_parent.currNum);
}
Symbol 421 MovieClip Frame 10
_root.controller.stepsTaken++;
Symbol 421 MovieClip Frame 20
_root.controller.stepsTaken++;
Symbol 422 MovieClip Frame 1
stop();
Instance of Symbol 412 MovieClip "speech" in Symbol 422 MovieClip Frame 1
onClipEvent (load) {
currNum = 0;
}
Symbol 427 Button
on (rollOver) {
portal.over();
}
on (rollOut, releaseOutside) {
portal.out();
}
on (release) {
_root.controller.createStickman(floorNumber);
}
Instance of Symbol 426 MovieClip "portal" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function over() {
doRotate = true;
_alpha = 100;
}
function out() {
doRotate = false;
_alpha = 50;
}
out();
}
onClipEvent (enterFrame) {
if (doRotate) {
_rotation = (_rotation + 5);
}
}
Instance of Symbol 433 MovieClip "endPortal" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(Math.floor(Math.random() * 300));
}
Symbol 436 MovieClip Frame 1
_visible = false;
Symbol 439 MovieClip Frame 2
_parent.reset();
Symbol 439 MovieClip Frame 7
currFrame = _currentframe;
count = count - _parent.moveSpeed;
_parent._y = _parent._y - _parent.moveSpeed;
i = 0;
while (i < _parent.ridersQueue.length) {
_parent.ridersQueue[i]._y = _parent.ridersQueue[i]._y - _parent.moveSpeed;
i++;
}
if (count > 0) {
gotoAndPlay(currFrame - 1);
} else {
_parent.currentFloor++;
_parent.arriveAtFloor();
}
Symbol 439 MovieClip Frame 8
stop();
Symbol 439 MovieClip Frame 25
currFrame = _currentframe;
count = count - _parent.moveSpeed;
_parent._y = _parent._y + _parent.moveSpeed;
i = 0;
while (i < _parent.ridersQueue.length) {
_parent.ridersQueue[i]._y = _parent.ridersQueue[i]._y + _parent.moveSpeed;
i++;
}
if (count > 0) {
gotoAndPlay(currFrame - 1);
} else {
_parent.currentFloor--;
_parent.arriveAtFloor();
}
Symbol 439 MovieClip Frame 26
stop();
Symbol 439 MovieClip Frame 41
currFrame = _currentframe;
currentFloorObj = _root["aFloor" + _parent.currentFloor];
gettingOnElevator = currentFloorObj.removeFromWaitQueue();
if (gettingOnElevator == null) {
gotoAndPlay(currFrame + 3);
} else {
gettingOnElevator.enteringElevator = true;
gettingOnElevator.resumeMoving();
}
Symbol 439 MovieClip Frame 43
currFrame = _currentframe;
if (gettingOnElevator.hitTest(_parent.hitArea)) {
gettingOnElevator.enteringElevator = false;
gettingOnElevator.stopMoving();
_parent.addToRidersQueue(gettingOnElevator);
gotoAndPlay(currFrame - 2);
} else {
gotoAndPlay(currFrame - 1);
}
Symbol 439 MovieClip Frame 44
_parent.endPickUpPeople();
Symbol 439 MovieClip Frame 60
searchIndex = 0;
Symbol 439 MovieClip Frame 61
currFrame = _currentframe;
currentFloorObj = _root["aFloor" + _parent.currentFloor];
gettingOffElevator = null;
while (searchIndex < _parent.ridersQueue.length) {
if (_parent.ridersQueue[searchIndex].desiredFloor == _parent.currentFloor) {
gettingOffElevator = _parent.removeFromRidersList(searchIndex);
break;
}
searchIndex++;
}
if (gettingOffElevator == null) {
gotoAndPlay(currFrame + 3);
}
gettingOffElevator.currentFloor = _parent.currentFloor;
gettingOffElevator.resumeMoving();
Symbol 439 MovieClip Frame 63
currFrame = _currentframe;
if (!gettingOffElevator.hitTest(_parent.hitArea)) {
gotoAndPlay(currFrame - 2);
} else {
gotoAndPlay(currFrame - 1);
}
Symbol 439 MovieClip Frame 64
_parent.arriveAtFloor();
Symbol 440 MovieClip Frame 1
function addToRidersQueue(rider) {
ridersQueue[ridersQueue.length] = rider;
}
function removeFromRidersList(index) {
if ((index >= ridersQueue.length) or (ridersQueue.length == 0)) {
return(null);
}
rider = ridersQueue[index];
i = index;
while (i < (ridersQueue.length - 1)) {
ridersQueue[i] = ridersQueue[i + 1];
i++;
}
ridersQueue.length--;
return(rider);
}
function arriveAtFloor() {
currentFloorObj = _root["aFloor" + currentFloor];
riderWantsOff = false;
i = 0;
while (i < ridersQueue.length) {
if (ridersQueue[i].desiredFloor == currentFloor) {
riderWantsOff = true;
break;
}
i++;
}
if (riderWantsOff) {
dropOffPeople();
} else if ((currentFloorObj.waitQueue.length == 0) or currentFloorObj.elevatorAtFloor) {
moveElevator();
} else {
beginPickUpPeople();
}
}
function moveElevator() {
if (goingUp) {
if (currentFloor == _root.controller.floorCount) {
goingUp = false;
moveElevator();
} else {
goUp();
}
} else if (currentFloor == 1) {
goingUp = true;
moveElevator();
} else {
goDown();
}
}
function goUp() {
stateControl.count = 40;
stateControl.gotoAndPlay("goUp");
}
function goDown() {
stateControl.count = 40;
stateControl.gotoAndPlay("goDown");
}
function beginPickUpPeople() {
currentFloorObj = _root["aFloor" + currentFloor];
currentFloorObj.elevatorAtFloor = true;
stateControl.gotoAndPlay("pickUp");
}
function endPickUpPeople() {
currentFloorObj = _root["aFloor" + currentFloor];
currentFloorObj.elevatorAtFloor = false;
moveElevator();
}
function dropOffPeople() {
stateControl.gotoAndPlay("dropOff");
}
function reset() {
stateControl.gotoAndStop(1);
goingUp = true;
_y = startY;
currentFloor = startFloor;
arriveAtFloor();
}
goingUp = true;
startY = _y;
moveSpeed = 5;
ridersQueue = new Array();
Instance of Symbol 436 MovieClip "hitArea" in Symbol 440 MovieClip Frame 1
onClipEvent (enterFrame) {
_width = (Math.floor(Math.random() * 30) + 1);
}
Symbol 447 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 14
_parent.removeMovieClip();
Symbol 482 MovieClip Frame 1
function setRandomColor() {
red = Math.floor(Math.random() * _root.controller9.maxRed);
green = Math.floor(Math.random() * _root.controller9.maxGreen);
blue = Math.floor(Math.random() * _root.controller9.maxBlue);
myColor.setRGB(((red << 16) + (green << 8)) + blue);
_root.orb4.calculateAverageColor();
colorString = _root.controller9.getHexColorString(red, green, blue);
}
function calculateAverageColor() {
red = Math.round(((_root.orb1.red + _root.orb2.red) + _root.orb3.red) / 3);
green = Math.round(((_root.orb1.green + _root.orb2.green) + _root.orb3.green) / 3);
blue = Math.round(((_root.orb1.blue + _root.orb2.blue) + _root.orb3.blue) / 3);
myColor.setRGB(((red << 16) + (green << 8)) + blue);
colorString = _root.controller9.getHexColorString(red, green, blue);
}
red = 0;
green = 0;
blue = 0;
myColor = new Color(colorCircle);
colorString = _root.controller9.getHexColorString(red, green, blue);
if (_name == "orb4") {
_root.controller9.randomizeAll();
}
Symbol 483 Button
on (release) {
_root.orb1.setRandomColor();
}
Symbol 484 Button
on (release) {
_root.orb2.setRandomColor();
}
Symbol 485 Button
on (release) {
_root.orb3.setRandomColor();
}
Symbol 487 MovieClip Frame 1
stop();
Instance of Symbol 490 MovieClip in Symbol 491 MovieClip Frame 1
onClipEvent (load) {
if (_parent._name != "snake0") {
_visible = false;
}
}