Frame 1
function loadBgFiles() {
var _local2 = _root.createEmptyMovieClip(fileArray[f], 1 + f);
mcLoader.loadClip(((loadPath + webLink) + fileArray[f]) + ".swf", _local2);
}
function isFileLoaded(fileName) {
checkedFile = "";
fn = 0;
while (fn < loadedFiles.length) {
checkedFile = loadedFiles[fn];
if (checkedFile == fileName) {
userTrace("file is preloaded: " + fileName);
return(true);
}
fn++;
}
if ((fn == loadedFiles.length) and (checkedFile != fileName)) {
}
}
function finishedTheGame() {
didIWin = true;
girlGone = true;
}
function start(gameID) {
this.myGameID = gameID;
gotoAndStop ("menu");
}
function reset() {
wipeAction = "end";
wipe.play();
}
function quit() {
GameManager.getInstance().gameDone();
}
function enableMenu() {
menuDisabled = false;
gamemenu.saveBN.useHandCursor = true;
gamemenu.saveMC._alpha = 100;
gamemenu.saveBN.enabled = true;
if (gamemenu._currentframe == 4) {
gamemenu.gotoAndStop(1);
}
}
function disableMenu() {
menuDisabled = true;
gamemenu.gotoAndStop(4);
gamemenu.saveBN.useHandCursor = false;
gamemenu.saveBN.enabled = false;
gamemenu.saveMC._alpha = 0;
}
function gameInit(movieToLoad) {
if (popup._currentframe != 1) {
popup.play();
}
pause = false;
transportCheck = true;
inventoryNum = 1;
gotoAndStop ("game");
inventoryDescription = new Array();
mcLoader.loadClip(((loadPath + webLink) + defaultCurrentLocation) + ".swf", targetMC);
targetMC.tabEnabled = false;
targetMC.tabChildren = false;
_quality = userQuality;
currentLocation = defaultCurrentLocation;
userTrace(("gameInit: " + webLink) + currentLocation);
didIWin = false;
arrowColorVar = "";
}
function gameExit() {
userTrace("gameExit");
if (popup._currentframe != 1) {
popup.play();
}
if (gx_endgame._currentframe != 1) {
gx_endgame.play();
}
if (cutscene._currentframe != 1) {
exitCutscene();
}
currentTape = "";
saveData.removeMovieClip("");
popup.gotoAndStop(1);
inventoryNum = 1;
inventory = new Array();
states = new Array();
inventoryDescription = new Array();
roomObject = new Array();
navpointArray = new Array();
depthList = new Array();
destinationNeighbours = new Array();
unobstructedNodes = new Array();
oldNodes = new Array();
eventInteraction = "Done";
sound_fadeDown(currentSound, 0, 25);
deleteInventory();
gamemenu.removeMovieClip("");
unloadMovie ("targetMC");
_quality = "HIGH";
targetObject = "";
actionTxt = "";
hideAction();
currentMouseOverObject = "";
_root.eventInteraction = "Done";
cutscene.gotoAndStop(1);
cutscene.removeMovieClip("");
popup.removeMovieClip("");
gx_endgame.gotoAndStop(1);
gamemenu.gotoAndStop(1);
gamemenu.removeMovieClip("");
options.gotoAndStop(1);
options.removeMovieClip("");
loadData.gotoAndStop(1);
loadData.removeMovieClip("");
saveData.gotoAndStop(1);
speech.gotoAndStop(1);
speech.removeMovieClip("");
saveData.removeMovieClip("");
wipe.removeMovieClip("");
bgBlur.removeMovieClip("");
gx_endgame.removeMovieClip("");
debugBar.removeMovieClip("");
cleaner.removeMovieClip("");
}
function gamePause() {
if (pause == false) {
pause = true;
} else if (gx_endgame._currentframe != 1) {
gx_endgame.play();
pause = true;
} else {
pause = false;
popup.gotoAndPlay("out");
}
}
function displayFootCursor() {
if ((currentMouseOverObject == "") and (!targetMC.hinder.hitTest(_root._xmouse, _root._ymouse, true))) {
targetMC.footCursor._visible = true;
}
}
function hideFootCursor() {
targetMC.footCursor._x = -200;
targetMC.footCursor._y = -200;
targetMC.footCursor._visible = false;
}
function launchMenu(item) {
currentMenuItem = item;
bgBlur.gotoAndPlay("in");
}
function removeMenu() {
bgBlur.gotoAndPlay("out");
}
function enableBlur(target) {
var _local1 = new flash.filters.BlurFilter(6, 6, 3);
target.filters = [_local1];
blurState = "on";
}
function disableBlur(target) {
var _local1 = new flash.filters.BlurFilter(0, 0, 1);
target.filters = [_local1];
blurState = "off";
}
function modifyBrightness(target, amount) {
var _local2 = [1, 0, 0, 0, amount, 0, 1, 0, 0, amount, 0, 0, 1, 0, amount, 0, 0, 0, 1, 0];
var _local1 = new flash.filters.ColorMatrixFilter(_local2);
target.filters = [_local1];
}
function resetBrightness(target) {
var _local2 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
var _local1 = new flash.filters.ColorMatrixFilter(_local2);
target.filters = [_local1];
}
function applyOutlineFilter(target) {
var _local2 = new flash.filters.GlowFilter(0, 100, 3, 3, 1000, 2, false, false);
var _local1 = new Array();
_local1.push(_local2);
target.filters = _local1;
}
function displaySaveData() {
disableMenu();
if (popup._currentframe != 1) {
popup.play();
}
hideAction();
pause = true;
saveData.gotoAndStop(2);
targetMC.footCursor._visible = false;
s = 1;
ySpacing = 57;
while (s <= 9) {
_root["saveGameInfo" + s] = SharedObject.getLocal(cookieName + s);
duplicateMovieClip (_root.saveData.gameDataBox, "gameDataBox" + s, s);
saveData["gameDataBox" + s]._x = 18;
saveData["gameDataBox" + s]._y = 18 + ySpacing;
if (_root["saveGameInfo" + s].data.gameSaved == true) {
saveData["gameDataBox" + s].userName = _root["saveGameInfo" + s].data.userName;
userTrace("game is saved");
} else {
userTrace("game is NOT saved");
saveData["gameDataBox" + s].userName = "Empty";
}
saveData["gameDataBox" + s].userNum = s;
saveData["gameDataBox" + s]._visible = false;
s++;
ySpacing = ySpacing + 57;
}
saveData.gameDataBox9.userName = "Autosave";
saveData.gameDataBox9._alpha = 60;
saveData.gameDataBox9.bn.useHandCursor = false;
saveData.gameDataBox9.bn.enabled = false;
}
function hideSaveData() {
enableMenu();
s = 0;
while (s <= 9) {
saveData["gameDataBox" + s].removeMovieClip("");
s++;
}
pause = false;
saveData.gotoAndStop(1);
displayFootCursor();
}
function displayLoadData() {
disableMenu();
if (popup._currentframe != 1) {
popup.play();
}
hideAction();
pause = true;
targetMC.footCursor._visible = false;
bnNew._visible = false;
bnLoad._visible = false;
bnOptions._visible = false;
loadData.gotoAndStop(2);
s = 1;
ySpacing = 57;
while (s <= 9) {
_root["saveGameInfo" + s] = SharedObject.getLocal(cookieName + s);
duplicateMovieClip (_root.loadData.gameDataBox, "gameDataBox" + s, s);
loadData["gameDataBox" + s]._x = 18;
loadData["gameDataBox" + s]._y = 18 + ySpacing;
loadData["gameDataBox" + s].backplate._alpha = 100;
if (_root["saveGameInfo" + s].data.gameSaved == true) {
loadData["gameDataBox" + s].userName = _root["saveGameInfo" + s].data.userName;
userTrace(("game " + s) + " is saved");
} else {
userTrace(("game " + s) + " is NOT saved");
loadData["gameDataBox" + s].userName = "Empty";
loadData["gameDataBox" + s]._alpha = 60;
loadData["gameDataBox" + s].bn.enabled = false;
}
loadData["gameDataBox" + s].userNum = s;
loadData["gameDataBox" + s]._visible = false;
s++;
ySpacing = ySpacing + 57;
}
loadData.gameDataBox9.userName = "Autosave";
}
function hideLoadData() {
enableMenu();
s = 0;
while (s <= 9) {
loadData["gameDataBox" + s].removeMovieClip("");
s++;
}
loadData.gotoAndStop(1);
bnNew._visible = true;
bnLoad._visible = true;
bnOptions._visible = true;
pause = false;
displayFootCursor();
}
function autoSave() {
currentSaveBoxNum = 9;
saveBar.play();
saveGame("Autosave");
}
function saveGame(saveState) {
if (popup._currentframe == 1) {
_root["saveGameInfo" + currentSaveBoxNum] = SharedObject.getLocal(cookieName + currentSaveBoxNum);
_root["saveGameInfo" + currentSaveBoxNum].data.gameSaved = true;
_root["saveGameInfo" + currentSaveBoxNum].data.userQuality = userQuality;
_root["saveGameInfo" + currentSaveBoxNum].data.userSound = userSound;
_root["saveGameInfo" + currentSaveBoxNum].data.userTutorial = userTutorial;
_root["saveGameInfo" + currentSaveBoxNum].data.userWaterEffects = userWaterEffects;
_root["saveGameInfo" + currentSaveBoxNum].data.userColorAid = userColorAid;
_root["saveGameInfo" + currentSaveBoxNum].data.userHearingAid = userHearingAid;
if (saveState != "Autosave") {
_root["saveGameInfo" + currentSaveBoxNum].data.userName = saveData["gameDataBox" + currentSaveBoxNum].userName;
userTrace(saveData["gameDataBox" + currentSaveBoxNum].userName);
} else {
saveGameInfo9.data.userName = "Autosave";
userTrace(saveGameInfo9.data.userName);
userTrace("Autosave - test");
}
_root["saveGameInfo" + currentSaveBoxNum].data.currentTape = currentTape;
_root["saveGameInfo" + currentSaveBoxNum].data.currentLocation = currentLocation;
_root["saveGameInfo" + currentSaveBoxNum].data.playerXpos = targetMC.gubbe._x;
_root["saveGameInfo" + currentSaveBoxNum].data.playerYpos = targetMC.gubbe._y;
_root["saveGameInfo" + currentSaveBoxNum].data.playerDirection = targetMC.gubbe._currentframe;
_root["saveGameInfo" + currentSaveBoxNum].data.savedInventory = new Array();
_root["saveGameInfo" + currentSaveBoxNum].data.SaveInventoryNum = 1;
while (_root["saveGameInfo" + currentSaveBoxNum].data.SaveInventoryNum < (inventory.length + 1)) {
_root["saveGameInfo" + currentSaveBoxNum].data.savedInventory.push(inventory[_root["saveGameInfo" + currentSaveBoxNum].data.SaveInventoryNum - 1]);
_root["saveGameInfo" + currentSaveBoxNum].data.SaveInventoryNum++;
}
_root["saveGameInfo" + currentSaveBoxNum].data.savedInventoryDescription = new Array();
_root["saveGameInfo" + currentSaveBoxNum].data.SaveInventoryDescriptionNum = 1;
while (_root["saveGameInfo" + currentSaveBoxNum].data.SaveInventoryDescriptionNum < (inventoryDescription.length + 1)) {
_root["saveGameInfo" + currentSaveBoxNum].data.savedInventoryDescription.push(inventoryDescription[_root["saveGameInfo" + currentSaveBoxNum].data.SaveInventoryDescriptionNum - 1]);
_root["saveGameInfo" + currentSaveBoxNum].data.SaveInventoryDescriptionNum++;
}
_root["saveGameInfo" + currentSaveBoxNum].data.savedStates = new Array();
_root["saveGameInfo" + currentSaveBoxNum].data.SaveStatesNum = 1;
while (_root["saveGameInfo" + currentSaveBoxNum].data.SaveStatesNum < (states.length + 1)) {
_root["saveGameInfo" + currentSaveBoxNum].data.savedStates.push(states[_root["saveGameInfo" + currentSaveBoxNum].data.SaveStatesNum - 1]);
_root["saveGameInfo" + currentSaveBoxNum].data.SaveStatesNum++;
}
_root["saveGameInfo" + currentSaveBoxNum].flush();
if (currentSaveBoxNum != 0) {
currentSaveBoxNum = "";
}
}
}
function loadGame() {
hideLoadData();
if (_root["saveGameInfo" + currentSaveBoxNum].data.gameSaved == true) {
gotoAndStop ("game");
mcLoader.loadClip(((loadPath + webLink) + _root["saveGameInfo" + currentSaveBoxNum].data.currentLocation) + ".swf", targetMC);
targetMC.tabEnabled = false;
targetMC.tabChildren = false;
currentLocation = _root["saveGameInfo" + currentSaveBoxNum].data.currentLocation;
transportCheck = true;
userQuality = _root["saveGameInfo" + currentSaveBoxNum].data.userQuality;
userSound = _root["saveGameInfo" + currentSaveBoxNum].data.userSound;
userTutorial = _root["saveGameInfo" + currentSaveBoxNum].data.userTutorial;
userWaterEffects = _root["saveGameInfo" + currentSaveBoxNum].data.userWaterEffects;
userColorAid = _root["saveGameInfo" + currentSaveBoxNum].data.userColorAid;
userHearingAid = _root["saveGameInfo" + currentSaveBoxNum].data.userHearingAid;
targetMC.gubbe._x = _root["saveGameInfo" + currentSaveBoxNum].data.playerXpos;
targetMC.gubbe._y = _root["saveGameInfo" + currentSaveBoxNum].data.playerYpos;
facingDirectionVar = _root["saveGameInfo" + currentSaveBoxNum].data.playerDirection;
currentTape = _root["saveGameInfo" + currentSaveBoxNum].data.currentTape;
states = new Array();
statesNum = 1;
while (statesNum < (_root["saveGameInfo" + currentSaveBoxNum].data.savedStates.length + 1)) {
states.push(_root["saveGameInfo" + currentSaveBoxNum].data.savedStates[statesNum - 1]);
statesNum++;
}
inventory = new Array();
inventoryNum = 1;
_quality = userQuality;
while (inventoryNum < (_root["saveGameInfo" + currentSaveBoxNum].data.savedInventory.length + 1)) {
inventory.push(_root["saveGameInfo" + currentSaveBoxNum].data.savedInventory[inventoryNum - 1]);
inventoryNum++;
}
updateInventory();
inventoryDescription = new Array();
inventoryDescriptionNum = 1;
while (inventoryDescriptionNum < (_root["saveGameInfo" + currentSaveBoxNum].data.savedInventoryDescription.length + 1)) {
inventoryDescription.push(_root["saveGameInfo" + currentSaveBoxNum].data.savedInventoryDescription[inventoryDescriptionNum - 1]);
inventoryDescriptionNum++;
}
objects = 1;
navItemNum = 1;
roomObject = new Array();
navpointArray = new Array();
depthList = new Array();
destinationNeighbours = new Array();
unobstructedNodes = new Array();
oldNodes = new Array();
} else {
showMessage("No game has been saved. Press S in-game to save your progress.", "");
}
}
function loadRoom() {
debugBar._visible = false;
gotoAndStop ("game");
mcLoader.loadClip(((loadPath + webLink) + roomToLoad) + ".swf", targetMC);
targetMC.tabEnabled = false;
targetMC.tabChildren = false;
currentLocation = roomToLoad;
transportCheck = true;
states = new Array();
statesNum = 1;
inventory = new Array();
inventoryNum = 1;
_quality = userQuality;
updateInventory();
inventoryDescription = new Array();
inventoryDescriptionNum = 1;
objects = 1;
navItemNum = 1;
roomObject = new Array();
navpointArray = new Array();
depthList = new Array();
destinationNeighbours = new Array();
unobstructedNodes = new Array();
oldNodes = new Array();
}
function getDistance(fromObject, toObject) {
distance = Math.round(Math.sqrt(((fromObject._x - toObject._x) * (fromObject._x - toObject._x)) + ((fromObject._y - toObject._y) * (fromObject._y - toObject._y))));
return(distance);
}
function initiateNavpoint(navItem, navState) {
navItem._name = "navpoint" + navItemNum;
navItem.navState = navState;
navpointArray.push("navpoint" + navItemNum);
navItem.txt = "navPoint " + navItemNum;
navItemNum++;
}
function showNavPoints() {
if (navPoints != "shown") {
navPoints = "shown";
i = 1;
while (i <= navpointArray.length) {
targetMC["navpoint" + i]._visible = true;
i++;
}
} else {
navPoints = "";
i = 1;
while (i <= navpointArray.length) {
targetMC["navpoint" + i]._visible = false;
i++;
}
}
}
function findDestinationNeighbours() {
i = 1;
destinationNeighbours = new Array();
while (i <= navpointArray.length) {
if (drawPathLine(destination, targetMC["navpoint" + i])) {
destinationNeighbours.push(targetMC["navpoint" + i]);
}
i++;
}
}
function checkDestinationNeighbour(node) {
checkedNode = "";
o = 0;
while (o < destinationNeighbours.length) {
checkedNode = destinationNeighbours[o];
if (checkedNode == node) {
return(true);
}
o++;
}
if ((o == destinationNeighbours.length) and (checkedNode != node)) {
return(false);
}
}
function drawNodeGraph() {
if (nodeGraph != "drawn") {
nodeGraph = "drawn";
this.createEmptyMovieClip("pathLine", 250);
pathLine.lineStyle(0, 16711935, 100, true, "none", "round", "miter", 1);
i = 1;
while (i <= navpointArray.length) {
targetMC["navpoint" + i].navpointNeighbours = new Array();
ii = 1;
while (ii <= navpointArray.length) {
if (drawPathLine(targetMC["navpoint" + i], targetMC["navpoint" + ii]) and (i != ii)) {
targetMC["navpoint" + i].navpointNeighbours.push(targetMC["navpoint" + ii]);
if (_root.debugMode == true) {
pathLine.moveTo(targetMC["navpoint" + i]._x, targetMC["navpoint" + i]._y);
pathLine.lineTo(targetMC["navpoint" + ii]._x, targetMC["navpoint" + ii]._y);
}
}
ii++;
}
i++;
}
i = 1;
while (i <= navpointArray.length) {
userTrace((("Node " + i) + ":") + targetMC["navpoint" + i].navpointNeighbours);
i++;
}
} else {
pathLine.clear();
nodeGraph = "";
}
}
function checkNode(node) {
checkedNode = "";
o = 0;
while (o < oldNodes.length) {
checkedNode = oldNodes[o];
if (checkedNode == targetMC["navpoint" + i]) {
return(false);
}
o++;
}
if ((o == oldNodes.length) and (checkedNode != targetMC["navpoint" + i])) {
return(true);
}
}
function checkPath(entity, targetX, targetY) {
userTrace("checkPath");
if ((targetX == "") or (targetX == undefined)) {
targetX = _root._xmouse;
targetY = _root._ymouse;
}
destination._x = targetX;
destination._y = targetY;
if (((((destination._x > -200) and (destination._x < (_root.stage_X + 200))) and (destination._y > -200)) and (destination._y < (_root.stage_Y + 200))) and (!_parent.hinder.hitTest(destination._x, destination._y, true))) {
findDestinationNeighbours();
bestNode = "";
destination._visible = false;
if (!drawPathLine(entity, destination)) {
unobstructedNodes = new Array();
i = 0;
while (i <= navpointArray.length) {
if (drawPathLine(entity, targetMC["navpoint" + i])) {
if (checkNode(targetMC["navpoint" + i])) {
unobstructedNodes.push(targetMC["navpoint" + i]);
userTrace(("Added navpoint" + i) + " to unobstructedNodes array.");
}
}
i++;
}
if (bestNode == "") {
userTrace("Choosing the node closest to the destination.");
i = 0;
shortestDistance = 640;
while (i <= (unobstructedNodes.length - 1)) {
if (getDistance(destination, unobstructedNodes[i]) < shortestDistance) {
shortestDistance = getDistance(destination, unobstructedNodes[i]);
userTrace((("Node " + unobstructedNodes[i]) + " distance: ") + getDistance(destination, unobstructedNodes[i]));
bestNode = i;
} else {
userTrace(((("Node " + unobstructedNodes[i]) + " is further away (") + getDistance(destination, unobstructedNodes[i])) + "). Discarded.");
}
i++;
}
}
if (unobstructedNodes.length == 0) {
userTrace("A weird error has occured.");
walkError = true;
}
if (walkError != true) {
entity.clickSpot_x = unobstructedNodes[bestNode]._x;
entity.clickSpot_y = unobstructedNodes[bestNode]._y;
entity.walkState = "walking";
_root.facingDirectionVar = "";
} else {
entity.walkState = "stopped";
entity.clickSpot_x = entity._x;
entity.clickSpot_y = entity._y;
}
walkError = false;
oldNodes.push(unobstructedNodes[bestNode]);
if (checkDestinationNeighbour(unobstructedNodes[bestNode])) {
}
} else {
entity.clickSpot_x = targetX;
entity.clickSpot_y = targetY;
entity.walkState = "walking";
_root.facingDirectionVar = "";
}
} else {
userTrace("the destination is not reachable");
showSpeech("I can't seem to go there.", targetMC.gubbe, gubbeColor);
}
}
function drawLine(fromObject, toObject, color) {
if (_root.debugMode == true) {
this.createEmptyMovieClip("pathLine", p);
pathLine.lineStyle(0, color, 100, true, "none", "round", "miter", 1);
pathLine.moveTo(fromObject._x, fromObject._y);
pathLine.lineTo(toObject._x, toObject._y);
p++;
}
}
function drawPathLine(fromObject, toObject) {
Xdistance = fromObject._x - toObject._x;
Ydistance = fromObject._y - toObject._y;
pointNum = 50;
pl = 20;
pi = 1;
while (pi < pointNum) {
hittestpoint.duplicateMovieClip("pl_hittestpoint" + pl, pl);
_root["pl_hittestpoint" + pl]._x = fromObject._x - ((Xdistance / pointNum) * pi);
_root["pl_hittestpoint" + pl]._y = fromObject._y - ((Ydistance / pointNum) * pi);
_root["pl_hittestpoint" + pl]._visible = false;
if (!targetMC.hinder.hitTest(_root["pl_hittestpoint" + pl]._x + offsetx, _root["pl_hittestpoint" + pl]._y + offsety, true)) {
_root["pl_hittestpoint" + pl].gotoAndStop(2);
} else {
return(false);
}
pi++;
}
return(true);
}
function streamingEvent(item, frameNum) {
userTrace((("streamingEvent: " + item) + " ") + frameNum);
userTrace(eventInteraction);
if ((popup._currentframe == 1) and (eventInteraction != "Begun")) {
currentEventItem = item;
item.gotoAndStop(frameNum);
eventInteraction = "Begun";
initiateStreamingEvent();
}
}
function initiateStreamingEvent() {
if (popup._currentframe == 1) {
if (checkState(currentEventItem + "InteractionComplete")) {
eventInteraction = "Done";
} else {
currentEventItem.nextFrame();
}
}
}
function launchCutscene(movie) {
playState = "cutscene";
cutscene.gotoAndPlay("in");
movieToPlay = movie;
}
function exitCutscene() {
targetMC.gubbe.walkState = "stopped";
targetMC.gubbe.clickSpot_x = targetMC.gubbe._x;
targetMC.gubbe.clickSpot_y = targetMC.gubbe._y;
if (cutscene._currentframe != 1) {
cutscene.gotoAndPlay("out");
}
playState = "";
}
function addState(item) {
if (addedItem != item) {
addedItem = item;
checkedState = "";
s = 0;
while (s < states.length) {
checkedState = states[s];
if (checkedState == item) {
userTrace("state already exists: " + item);
break;
}
s++;
}
if ((s == states.length) and (checkedState != item)) {
states.push(item);
userTrace("state added: " + item);
}
}
}
function checkState(item) {
checkedState = "";
s = 0;
while (s < states.length) {
checkedState = states[s];
if (checkedState == item) {
return(true);
}
s++;
}
if ((s == states.length) and (checkedState != item)) {
}
}
function removeState(item) {
if (removedItem != item) {
removedItem = item;
checkedState = "";
s = 0;
while (s < states.length) {
checkedState = states[s];
if (checkedState == item) {
states.splice(s, 1);
userTrace("state removed: " + item);
break;
}
s++;
}
if ((s == states.length) and (checkedState != item)) {
userTrace("state NOT removed: " + item);
}
}
}
function hitCheck(item) {
if (item.hitTest(targetMC.gubbe._x + offsetx, targetMC.gubbe._y + offsety, true)) {
return(true);
}
}
function disableSelfTargeting() {
addState("selfTargeting_disabled");
}
function enableSelfTargeting() {
userTrace("selfTargeting enabled");
removeState("selfTargeting_disabled");
}
function walkTo(targetObject) {
if (pause == false) {
targetMC.gubbe.activation = false;
targetMC.gubbe.walkState = "walking";
checkPath(targetMC.gubbe, targetObject._x, targetObject._y);
oldNodes = new Array();
}
}
function forcedWalkTo(targetObject) {
targetMC.gubbe.walkState = "walking";
forcedWalk = true;
targetMC.gubbe.activation = false;
targetMC.gubbe._x = orgSpotX;
targetMC.gubbe._y = orgSpotY;
targetMC.gubbe.clickSpot_x = targetObject._x;
targetMC.gubbe.clickSpot_y = targetObject._y;
facingDirectionVar = "";
}
function forceMove(target) {
forceMoveOrgPos = targetMC.gubbe._currentframe;
targetMC.gubbe.activation = false;
targetMC.gubbe.clickSpot_x = target._x;
targetMC.gubbe.clickSpot_y = target._y;
orgPosX = targetMC.gubbe._x;
orgPosX = targetMC.gubbe._x;
targetMC.gubbe._x = target._x;
targetMC.gubbe._y = target._y;
targetMC.gubbe.bot.gotoAndStop(1);
targetMC.gubbe.walkState = "stopped";
_root.xSpeed = 0;
_root.ySpeed = 0;
targetMC.gubbe._currentframe = forceMoveOrgPos;
}
function forceMoveBack(target) {
if ((target == "") or (target == undefined)) {
targetMC.gubbe.activation = false;
targetMC.gubbe._x = orgPosX;
targetMC.gubbe._y = orgPosY;
orgPosX = "";
orgPosY = "";
} else {
targetMC.gubbe._x = target._x;
targetMC.gubbe._y = target._y;
}
}
function saveTempLocation() {
_root.saveGameInfo1.data.tempPlayerXpos = targetMC.gubbe._x;
_root.saveGameInfo1.data.tempPlayerYpos = targetMC.gubbe._y;
_root.saveGameInfo1.data.tempPlayerDirection = targetMC.gubbe._currentframe;
}
function loadTempLocation() {
targetMC.gubbe._x = _root.saveGameInfo1.data.tempPlayerXpos;
targetMC.gubbe._y = _root.saveGameInfo1.data.tempPlayerYpos;
_root.facingDirectionVar = _root.saveGameInfo1.data.tempPlayerDirection;
}
function hideForInteraction() {
hiddenActionTxt = "";
actionTxt = "";
hideAction();
displayFootCursor();
}
function currentMouseOver(targetObject) {
if (pause == false) {
currentMouseOverObject = targetObject;
}
}
function displayAction(item) {
objectName = item.name;
displayFootCursor();
actionTxt = (item.objectVerb + " ") + item.name;
actionBar.gotoAndStop(2);
actionBar.resizeActionBar();
}
function hideActionBar() {
actionBar._visible = false;
}
function showActionBar() {
actionBar._visible = true;
}
function getObjectBounds(item) {
item._xMin = item._x;
item._xMax = item._x + 38.5;
item._yMin = item._y;
item._yMax = item._y + 38.5;
x2._x = item._xMax;
x2._y = item._yMin;
y2._y = item._yMax;
y2._x = item._xMin;
}
function checkObjectBounds(item) {
x1._x = _root._xmouse;
x1._y = _root._ymouse;
y1._y = _root._ymouse;
y1._x = _root._xmouse;
if (x2.hitTest(y1) and y2.hitTest(x1)) {
return(true);
}
}
function targetCheck(item) {
if (pause == false) {
if (item.hitTest(_root._xmouse + offsetx, _root._ymouse + offsety, true)) {
if (currentObject.name != item.name) {
targetObject = item.name;
targetItem = item;
item.backplate._alpha = 100;
}
} else {
if (targetObject == item.name) {
targetObject = "";
targetItem = "";
}
item.backplate._alpha = 70;
}
}
}
function hideAction() {
actionBar.gotoAndStop(1);
targetObject = "";
objectName = "";
currentMouseOverObject = "";
updateAfterEvent();
}
function initiateObject(item, itemName) {
item.tabEnabled = false;
item.tabChildren = false;
item._name = itemName;
roomObject.push(itemName);
}
function worldItemActivationCheck() {
if (targetMC.gubbe.bot._currentframe < 3) {
if ((hiddenActionTxt != "") and (hiddenActionTxt != undefined)) {
if ((hiddenTargetItem != "") and (hiddenTargetItem != undefined)) {
userTrace("worldItemActivationCheck: inventory object used - o=" + o);
if ((hiddenTargetItem.standingDirection != "") and (hiddenTargetItem.standingDirection != undefined)) {
facingDirectionVar = hiddenTargetItem.standingDirection;
targetMC.gubbe.gotoAndStop(hiddenTargetItem.standingDirection);
}
if ((hiddenTargetItem[("launchAction_" + o) + "_animation"] != "") and (hiddenTargetItem[("launchAction_" + o) + "_animation"] != undefined)) {
userTrace(("displayAnimation: launchAction_" + o) + "_animation");
targetMC.gubbe.bot.gotoAndStop(hiddenTargetItem[("launchAction_" + o) + "_animation"]);
} else {
userTrace((("No animation requested, launching action " + o) + " on ") + hiddenTargetItem);
hiddenTargetItem["launchAction_" + o]();
targetObject = "";
hiddenTargetItem = "";
item = "";
actionTxt = "";
}
} else {
o = 0;
while (o <= roomObject.length) {
tempObject = roomObject[o];
if (targetMC[tempObject].actionArea.hitTest(targetMC.gubbe._x + offsetx, targetMC.gubbe._y + offsety, true)) {
if ((targetMC[tempObject].standingDirection != "") and (targetMC[tempObject].standingDirection != undefined)) {
facingDirectionVar = targetMC[tempObject].standingDirection;
targetMC.gubbe.gotoAndStop(targetMC[tempObject].standingDirection);
}
if ((targetMC[tempObject].operate_animation != "") and (targetMC[tempObject].operate_animation != undefined)) {
currentObject = targetMC[tempObject];
userTrace("displayAnimation: " + targetMC[tempObject].operate_animation);
targetMC.gubbe.bot.gotoAndStop(targetMC[tempObject].operate_animation);
return;
}
targetMC[tempObject].operate();
userTrace("interact with " + targetMC[tempObject]._name);
return;
}
o++;
}
}
}
}
}
function launchOperation() {
if ((hiddenTargetItem != "") and (hiddenTargetItem != undefined)) {
userTrace((("launchOperation: launchAction " + o) + " on ") + hiddenTargetItem);
hiddenTargetItem["launchAction_" + o]();
targetObject = "";
hiddenTargetItem = "";
item = "";
actionTxt = "";
targetMC.gubbe.bot.gotoAndStop(1);
o = 0;
} else {
currentObject.operate();
userTrace("interact with " + currentObject._name);
targetMC.gubbe.bot.gotoAndStop(1);
}
}
function worldItemComboCheck() {
o = 1;
userTrace("worldItemComboCheck - targetItem: " + targetItem);
if ((targetItem.goalLength == "") or (targetItem.goalLength == undefined)) {
targetItem.goalLength = 1;
}
while (o <= targetItem.goalLength) {
if (actionTxt == targetItem["goal_" + o]) {
hiddenActionTxt = targetItem["goal_" + o];
userTrace("targetCombination detected o=" + o);
return(true);
}
o++;
}
return(false);
}
function checkVisible(item) {
if (checkState(item + "PickedUp")) {
item._x = -500;
item._y = -500;
}
}
function inventoryAction_examine(item) {
if (pause == false) {
targetMC.footCursor._visible = false;
actionTxt = "Examine " + item.name;
actionBar.gotoAndStop(2);
actionBar.resizeActionBar();
}
}
function inventoryAction_move(item) {
if (pause == false) {
backplate._x = item._x;
backplate._y = item._y;
item.swapDepths(100);
currentObject = item;
targetMC.footCursor._visible = false;
onMouseMove = function () {
if (functionBreaker == false) {
if (checkObjectBounds(item)) {
actionTxt = "Examine " + item.name;
reverseActionTxt = "";
actionBar.resizeActionBar();
} else if ((targetObject != "") and (item.name != targetObject)) {
actionTxt = (("Use " + item.name) + " with ") + targetObject;
reverseActionTxt = (("Use " + targetObject) + " with ") + item.name;
actionBar.resizeActionBar();
} else {
actionTxt = ("Use " + item.name) + " with...";
reverseActionTxt = "";
actionBar.resizeActionBar();
}
updateAfterEvent();
}
};
onMouseUp = function () {
item = "";
functionBreaker = true;
};
actionBar.gotoAndStop(2);
}
}
function inventoryItemActivationCheck(item) {
userTrace("inventoryItemActivationCheck: " + actionTxt);
if (actionTxt == ("Examine " + item.name)) {
userTrace("Trying to examine " + item.name);
examinedObject = "";
o = 0;
while (o < inventory.length) {
examinedObject = inventory[o];
if (examinedObject == item.name) {
if (inventoryItemExamineCheck()) {
examineHolder["launchAction_" + p]();
break;
}
showSpeech(inventoryDescription[o], targetMC.gubbe, gubbeColor);
break;
}
o++;
}
} else if (actionTxt == (("Use " + item.name) + " with...")) {
} else if (worldItemComboCheck()) {
if (targetItem.hitTest(targetMC.gubbe._x + offsetx, targetMC.gubbe._y + offsety, true)) {
hiddenTargetItem = targetItem;
userTrace("frase match - close enough o=" + o);
worldItemActivationCheck();
} else if (targetItem.launchByProxy == true) {
hiddenTargetItem = targetItem;
userTrace("frase match - launchByProxy o=" + o);
worldItemActivationCheck();
} else {
hiddenTargetItem = targetItem;
walkTo(targetItem);
userTrace("frase match - NOT close enough o=" + o);
return(false);
}
} else if (inventoryItemComboCheck()) {
combinationHolder["launchAction_" + o]();
} else if (actionTxt != (("Use " + item.name) + " with...")) {
showSpeech("That doesn't seem to work.", targetMC.gubbe, gubbeColor);
targetObject = "";
targetItem = "";
item = "";
}
actionTxt = "";
}
function inventoryItemComboCheck() {
o = 1;
userTrace("inventoryItemComboCheck o=" + o);
while (o <= combinationHolder.goalLength) {
if ((actionTxt == combinationHolder["goal_" + o]) or (reverseActionTxt == combinationHolder["goal_" + o])) {
actionTxt = "";
reverseActionTxt = "";
userTrace("combination detected o=" + o);
return(true);
}
o++;
}
}
function inventoryItemExamineCheck() {
p = 1;
userTrace("inventoryItemExamineCheck p=" + p);
while (p <= examineHolder.goalLength) {
if (actionTxt == examineHolder["goal_" + p]) {
actionTxt = "";
reverseActionTxt = "";
userTrace("examine action detected p=" + p);
return(true);
}
p++;
}
}
function hideInventory() {
addState("inventoryIsHidden");
s = 0;
while (s < inventory.length) {
_root["inventoryClip" + s]._alpha = 0;
s++;
}
}
function showInventory() {
removeState("inventoryIsHidden");
s = 0;
while (s < inventory.length) {
_root["inventoryClip" + s]._alpha = 100;
s++;
}
}
function pickUp(item, name, prompt, description, slideEnabled) {
txt = prompt;
if (popup._currentframe == 1) {
userTrace("pickUp: " + name);
if (inventoryNum <= 19) {
inventory.push(name);
inventoryDescription.push(description);
addState(item + "PickedUp");
if (slideEnabled == true) {
beginSlideX = targetMC.gubbe._x;
beginSlideY = targetMC.gubbe._y - 30;
endSlideX = (_root["inventoryClip" + inventoryNum]._x = 6 + spacing);
endSlideY = 6;
inventoryClip.duplicateMovieClip("inventoryClip" + inventoryNum, inventoryNum + 500);
_root["inventoryClip" + inventoryNum].gotoAndStop(name);
_root["inventoryClip" + inventoryNum].text = inventoryNum;
_root["inventoryClip" + inventoryNum]._x = -150;
_root["inventoryClip" + inventoryNum]._y = -150;
_root["inventoryClip" + inventoryNum]._x = beginSlideX - (_root["inventoryClip" + inventoryNum]._width / 2);
_root["inventoryClip" + inventoryNum]._y = beginSlideY - (_root["inventoryClip" + inventoryNum]._height / 2);
_root["inventoryClip" + inventoryNum]._visible = true;
item._x = -200;
item._y = -200;
beginSlide(_root["inventoryClip" + inventoryNum]);
item.objectState = "taken";
} else {
item._x = -200;
item._y = -200;
updateInventory();
}
if ((prompt == "") or (prompt == undefined)) {
userTrace("no promt issued");
} else {
userTrace(promt);
showMessage(txt, "");
}
hideForInteraction();
} else {
showMessage("Your inventory is full. Make more room by using one of your items.", "");
hiddenActionTxt = "";
}
}
}
function removeFromInventory(item, slideEnabled, taker, oldItem) {
userTrace("removeFromInventory: " + item);
s = 0;
z = 0;
while (s < inventory.length) {
checkedInventory = inventory[s];
if (checkedInventory == item) {
if (slideEnabled == true) {
oldMC = oldItem;
z = s + 1;
beginSlideX = _root["inventoryClip" + z]._x + (_root["inventoryClip" + z]._width / 2);
beginSlideY = _root["inventoryClip" + z]._y + (_root["inventoryClip" + z]._height / 2);
endSlideX = taker._x;
endSlideY = taker._y;
beginSlide(_root["inventoryClip" + z]);
inventory.splice(s, 1);
inventoryDescription.splice(s, 1);
} else {
inventory.splice(s, 1);
inventoryDescription.splice(s, 1);
updateInventory();
}
} else {
userTrace("s checkpoint D: " + s);
s++;
}
}
}
function beginSlide(item) {
slider.MCobject = item;
slider.play();
}
function deleteInventory() {
while (inventoryNum > 0) {
_root["inventoryClip" + inventoryNum].removeMovieClip("");
inventoryNum--;
}
inventory = new Array();
}
function updateInventory() {
userTrace("updateInventory");
backplate._x = -100;
backplate._y = -100;
while (inventoryNum > 0) {
_root["inventoryClip" + inventoryNum].removeMovieClip("");
inventoryNum--;
}
inventoryNum = 1;
spacing = 0;
while (inventoryNum < (inventory.length + 1)) {
duplicateMovieClip (_root.inventoryClip, "inventoryClip" + inventoryNum, inventoryNum);
_root["inventoryClip" + inventoryNum].gotoAndStop(inventory[inventoryNum - 1]);
_root["inventoryClip" + inventoryNum].name = inventory[inventoryNum - 1];
_root["inventoryClip" + inventoryNum].text = inventoryNum;
_root["inventoryClip" + inventoryNum]._x = 6 + spacing;
_root["inventoryClip" + inventoryNum]._y = 6;
inventoryNum++;
spacing = spacing + 47;
}
displayFootCursor();
}
function hideInventory() {
while (inventoryNum > 0) {
_root["inventoryClip" + inventoryNum]._visible = false;
inventoryNum--;
}
}
function showInventory() {
while (inventoryNum < (inventory.length + 1)) {
_root["inventoryClip" + inventoryNum]._visible = true;
inventoryNum++;
}
}
function dimInventory() {
dimNum = 0;
while (dimNum <= inventoryNum) {
_root["inventoryClip" + dimNum]._alpha = 15;
dimNum++;
}
}
function initiateTransport(facingDirection, arrowColor, newLocation) {
if ((pause == false) and (wipe._currentframe == 1)) {
userTrace("transport");
wipeAction = "transport";
facingDirectionVar = facingDirection;
arrowColorVar = arrowColor;
userTrace("arrowColor: " + arrowColor);
userTrace("arrowColorVar: " + arrowColorVar);
newLocationVar = newLocation;
wipe.gotoAndPlay("in");
}
}
function transport(newLocation) {
targetMC.gubbe._y = -200;
targetMC.gubbe._x = -200;
currentLocation = newLocation;
objects = 1;
navItemNum = 1;
roomObject = new Array();
navpointArray = new Array();
depthList = new Array();
destinationNeighbours = new Array();
unobstructedNodes = new Array();
oldNodes = new Array();
mcLoader.loadClip(((loadPath + webLink) + newLocation) + ".swf", targetMC);
targetMC.tabEnabled = false;
targetMC.tabChildren = false;
}
function initializeNewLocation() {
actionBar.gotoAndStop(1);
userTrace("initializeNewLocation");
eventInteraction = "Done";
if (wipeAction == "transport") {
targetMC.gubbe.gotoAndStop(facingDirectionVar);
targetMC.gubbe._y = arrowColorVar._y;
targetMC.gubbe._x = arrowColorVar._x;
} else if (wipeAction == "load") {
targetMC.gubbe._x = _root["saveGameInfo" + currentSaveBoxNum].data.playerXpos;
targetMC.gubbe._y = _root["saveGameInfo" + currentSaveBoxNum].data.playerYpos;
targetMC.gubbe.gotoAndStop(facingDirectionVar);
}
if (dream == "on") {
dream_frame.gotoAndStop(2);
} else {
dream_frame.gotoAndStop(1);
}
displayFootCursor();
initiateLevelSound();
userTrace("New location initialized: " + currentLocation);
userTrace("WipeAction: " + wipeActionr);
userTrace("arrowColorVar: " + arrowColorVar);
}
function initiateDepthPointObject(item) {
item.swapDepths(Math.floor(item._y));
depthList.push(Math.floor(item._y));
}
function initiateDepthLineObject(item, point) {
item.swapDepths(Math.floor(item._y));
redMiddleX = ((item._x + point._x) + point._x) / 3;
redMiddleY = ((item._y + point._y) + item._y) / 3;
hittestpoint.duplicateMovieClip("redTriangleMiddle" + r, r);
_root["redTriangleMiddle" + r]._x = redMiddleX;
_root["redTriangleMiddle" + r]._y = redMiddleY;
_root["redTriangleMiddle" + r]._visible = false;
depthList.push(_root["redTriangleMiddle" + r]);
greenMiddleX = ((item._x + point._x) + item._x) / 3;
greenMiddleY = ((item._y + point._y) + point._y) / 3;
hittestpoint.duplicateMovieClip("greenTriangleMiddle" + g, g);
_root["greenTriangleMiddle" + g]._x = greenMiddleX;
_root["greenTriangleMiddle" + g]._y = greenMiddleY;
_root["greenTriangleMiddle" + g]._visible = false;
depthList.push(_root["greenTriangleMiddle" + g]);
item.redPoint = _root["redTriangleMiddle" + r];
item.greenPoint = _root["greenTriangleMiddle" + g];
r++;
g++;
}
function depthSwap(item, point) {
if (getDistance(targetMC.gubbe, item.redPoint) < getDistance(targetMC.gubbe, item.greenPoint)) {
item.swapDepths(point._y);
} else {
item.swapDepths(item._y);
}
}
function drawStatements(item) {
userTrace("drawStatements: " + item);
backPlate.gotoAndStop(2);
statementSender = item;
c = item.statements.length;
spacing = 0;
while (c > 0) {
duplicateMovieClip (conversationStatment, "conversationStatment_" + c, c + 4000);
_root["conversationStatment_" + c]._x = 20;
_root["conversationStatment_" + c]._y = 440 - spacing;
_root["conversationStatment_" + c].txt.text = item.statements[c - 1];
_root["conversationStatment_" + c].txt._alpha = 80;
_root["conversationStatment_" + c].resultNum = c;
_root["conversationStatment_" + c].gotoAndPlay(1);
applyOutlineFilter(_root["conversationStatment_" + c].txt);
spacing = spacing + 25;
c--;
}
}
function executeReply(item) {
c = 1;
statementSender["result_" + item.resultNum]();
while (c < 10) {
removeMovieClip(_root["conversationStatment_" + c]);
c++;
}
backPlate.gotoAndStop(1);
}
function showMessage(descriptionText) {
userTrace("Message: " + descriptionText);
if (popup._currentframe == 1) {
if ((speaker == "") or (speaker == undefined)) {
header = "";
} else {
header = speaker;
}
dimInventory();
popup.gotoAndPlay("in");
txt = descriptionText;
}
}
function showSpeech(speechText, speaker, color) {
userTrace("Speech: " + speechText);
if (speech._currentframe == 1) {
if ((color != "") or (color != undefined)) {
colorVar = color;
} else {
color = 16777215 /* 0xFFFFFF */;
colorVar = color;
}
if (speaker == targetMC.gubbe) {
speech._x = targetMC.gubbe._x;
speech._y = targetMC.gubbe._y - 50;
} else if ((speaker != "") or (speaker != undefined)) {
speech._x = speaker._x;
speech._y = speaker._y;
} else {
speech._x = Stage.width / 2;
speech._y = Stage.height / 2;
}
dimInventory();
speech.gotoAndPlay("in");
speechTxt = speechText;
}
}
function userTrace(traceMessage) {
if (previousTraceMessage != traceMessage) {
trace(traceMessage);
previousTraceMessage = traceMessage;
}
}
function sound_init(soundName) {
currentSound = soundName;
soundName.start(0, 999);
soundName.setVolume(0);
if (currentVolume != "") {
sound_fadeUp(soundName, currentVolume, 10);
} else {
sound_fadeUp(soundName, 25, 10);
}
soundState = "playing";
}
function sound_exit(soundName) {
soundState = "stopped";
currentSound = soundName;
sound_fadeDown(soundName, 0, 10);
}
function sound_fadeUp(soundName, targetVolume, steps) {
sound_exit(currentSound);
currentSound = soundName;
currentVolume = targetVolume;
if (userSound == "on") {
userTrace("sound_fadeUp: " + soundName);
targetVolumeNum = targetVolume;
stepNum = steps;
soundName.setVolume(0);
soundName.start(0, 999);
soundState = "playing";
soundFader.gotoAndPlay("fade");
}
}
function sound_fadeDown(soundName, targetVolume, steps) {
currentSound = soundName;
if (soundState == "playing") {
userTrace("sound_fadeDown: " + soundName);
targetVolumeNum = targetVolume;
stepNum = steps;
soundFader.gotoAndPlay("fade");
soundState = "stopped";
}
}
function toggleSound() {
if (soundState == "playing") {
sound_exit(currentSound);
gameoptions.bn_music.gotoAndStop(2);
soundState = "stopped";
userSound = "off";
} else {
userSound = "on";
sound_init(currentSound);
gameoptions.bn_music.gotoAndStop(1);
}
}
function playSound(sound) {
if (userSound == "on") {
snd_sounds.gotoAndPlay(sound);
}
}
function initiateLevelSound() {
if (_currentframe == mainMenuFrame) {
currentSound = "";
sound_fadeUp(currentSound, 100, 100);
currentSound.setVolume(100);
stopAllSounds();
} else if (currentLocation == "r1") {
currentSound = sound2;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if (currentLocation == "r2") {
currentSound = sound1;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if (currentLocation == "r3") {
currentSound = sound2;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if (currentLocation == "hub") {
if (_root.checkState("launchLastCutscene")) {
currentSound = sound6;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else {
currentSound = sound1;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
}
} else if (currentLocation == "eye") {
currentSound = sound2;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if ((currentLocation == "toilet") or (currentLocation == "mirror")) {
currentSound = sound4;
if (soundState != "playing") {
sound_fadeUp(currentSound, 15, 15);
}
} else if (currentLocation == "fire") {
currentSound = sound3;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if (currentLocation == "phone_a") {
currentSound = sound3;
if (soundState != "playing") {
sound_fadeUp(currentSound, 35, 35);
}
} else if (currentLocation == "red_bridge") {
currentSound = sound4;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if (currentLocation == "table_a") {
currentSound = sound3;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if (currentLocation == "shock") {
currentSound = sound3;
if (soundState != "playing") {
sound_fadeUp(currentSound, 50, 50);
}
} else if (currentLocation == "window") {
currentSound = sound3;
if (soundState != "playing") {
sound_fadeUp(currentSound, 15, 15);
}
} else if (currentLocation == "kitchen") {
currentSound = sound2;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if (currentLocation == "telescope") {
currentSound = sound5;
if (soundState != "playing") {
sound_fadeUp(currentSound, 50, 50);
}
} else if ((currentLocation == "phone_b") or (currentLocation == "table_b")) {
currentSound = sound5;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else {
currentSound = sound2;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
}
}
fscommand ("allowscale", false);
fscommand ("showmenu", false);
userQuality = "HIGH";
userSound = "on";
userWaterEffects = "off";
userTutorial = "on";
userHearingAid = "off";
userColorAid = "off";
mainMenu = "on";
mouseOverColor = 16777215 /* 0xFFFFFF */;
mouseOutColor = 0;
mainMenuFrame = 2;
n = 1;
i = 0;
t = 0;
s = 0;
o = 0;
forcedWalk = false;
header = "";
playState = "";
currentSound = sound2;
inventoryNum = 1;
spacing = 0;
pause = false;
eventInteraction = "Done";
hiddenTargetItem = "";
targetObject = "";
actionTxt = "";
backgroundLoading = "";
inventory = new Array();
states = new Array();
roomObject = new Array();
navpointArray = new Array();
depthList = new Array();
destinationNeighbours = new Array();
unobstructedNodes = new Array();
oldNodes = new Array();
debugMode = true;
stage_X = 640;
stage_Y = 480;
dream = "off";
askAboutTutorial = true;
newGame_withTutorial = "r1";
newGame_withoutTutorial = "hub";
cookieName = "gateway_2Cookie";
gameLoadPath = "./gateway_2/";
gubbeColor = 12040119 /* 0xB7B7B7 */;
motherColor = 15467010 /* 0xEC0202 */;
daugtherColor = 16625922 /* 0xFDB102 */;
mikeColor = 8421819 /* 0x8081BB */;
hearingAidColor = 16777215 /* 0xFFFFFF */;
firstWord = "video tape 1";
secondWord = "video tape 2";
thirdWord = "video tape 3";
fourthWord = "video tape 4";
webLink = "";
if (_level0.viewingThrough == "cockroach") {
loadPath = gameLoadPath;
offsetx = _level0.offsetx;
offsety = _level0.offsety;
} else {
loadPath = "http://uploads.ungrounded.net/userassets/295000/295497/gateway2/";
offsetx = 0;
offsety = 0;
}
fileArray = new Array("r1", "r2", "r3", "hub", "video", "eye", "toilet", "mirror", "red_bridge", "hall", "painting", "black_bridge", "phone_a", "table_a", "fire", "kitchen", "shock", "window", "phone_b", "telescope", "table_b", "living_room", "livingRoomTV", "girl");
loadedFiles = new Array();
lTxt = "PRELOADING: ";
preloading = "";
f = 0;
var loadListener = new Object();
loadListener.onLoadComplete = function (target_mc) {
if (!isFileLoaded(fileArray[f])) {
lTxt = (lTxt + fileArray[f]) + ".swf";
loadedFiles.push(fileArray[f]);
userTrace(("LoadComplete: " + fileArray[f]) + ".swf");
}
if (f < (fileArray.length - 1)) {
lTxt = lTxt + ", ";
f++;
loadBgFiles();
} else if (preloading != "done") {
lTxt = lTxt + " - preloading COMPLETE!";
preloading = "done";
}
};
loadListener.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal) {
pTxt = Math.floor((bytesLoaded / bytesTotal) * 100) + "%";
};
loadListener.onLoadError = function (target_mc, errorCode, httpStatus) {
userTrace(("LoadError: " + fileArray[f]) + ".swf");
userTrace("ErrorCode: " + errorCode);
lTxt = ((((lTxt + "(ERROR: ") + fileArray[f]) + ".swf - did NOT load due to: ") + errorCode) + "), ";
if (f < (fileArray.length - 1)) {
userTrace(("Moving on to: " + fileArray[f + 1]) + ".swf");
f++;
loadBgFiles();
}
};
var mcLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
didIWin = false;
testMode = true;
currUrl = _url.toLowerCase();
if (currUrl.indexOf("cockroach.se") <= 0) {
if (testMode == false) {
getURL ("http://cockroach.se", "_self");
}
}
navItemNum = 1;
navPoints = "";
nodeGraph = "";
p = 350;
objects = 1;
sound0 = new Sound(this);
sound0.attachSound("silence");
sound1 = new Sound(this);
sound1.attachSound("s1");
sound2 = new Sound(this);
sound2.attachSound("s2");
sound3 = new Sound(this);
sound3.attachSound("bg_phone");
sound4 = new Sound(this);
sound4.attachSound("s4");
sound5 = new Sound(this);
sound5.attachSound("telephone2");
sound6 = new Sound(this);
sound6.attachSound("endSong");
ring_sound = new Sound(this);
ring_sound.attachSound("ring");
stop();
Instance of Symbol 11 MovieClip in Frame 1
onClipEvent (load) {
this.swapDepths(99999999);
}
Instance of Symbol 34 MovieClip "wipe" in Frame 1
onClipEvent (load) {
this.swapDepths(3000);
}
Instance of Symbol 36 MovieClip in Frame 1
onClipEvent (load) {
percent = 0;
_parent.bar._xscale = 0;
_parent.percent_txt = "0 %";
}
onClipEvent (enterFrame) {
percent = Math.floor((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100);
_parent.percent_txt = percent + " %";
_parent.bar._xscale = percent;
if (percent == 100) {
_parent.gotoAndStop("menu");
} else {
_parent.stop();
}
}
Frame 2
stop();
if (backgroundLoading != "begun") {
loadBgFiles();
backgroundLoading = "begun";
}
if (popup._currentframe != 1) {
popup.play();
}
userTrace(("Back to menu: set " + sound0) + " volume to 100");
currentSound = sound0;
currentSound.setVolume(0);
sound_fadeUp(currentSound, 50, 50);
if (mainMenu == "off") {
if (wipeAction == "load") {
wipe.gotoAndPlay(20);
} else {
wipeAction = "start";
wipe.gotoAndPlay(20);
}
} else {
wipe.gotoAndPlay("out");
stop();
}
if (wipeAction == "inGameLoad") {
wipe.gotoAndPlay(20);
}
Instance of Symbol 58 MovieClip "popup" in Frame 2
onClipEvent (load) {
this.swapDepths(3005);
}
Instance of Symbol 61 MovieClip "bgBlur" in Frame 2
onClipEvent (load) {
this.swapDepths(195);
}
Instance of Symbol 106 MovieClip "options" in Frame 2
onClipEvent (load) {
this.swapDepths(555);
}
Instance of Symbol 128 MovieClip "loadData" in Frame 2
onClipEvent (load) {
this.swapDepths(2510);
}
Instance of Symbol 162 MovieClip "gx_firstgame" in Frame 2
onClipEvent (load) {
this.swapDepths(2000);
}
Frame 3
targetMC._visible = true;
cutscene.swapDepths(2000);
popup.swapDepths(2005);
blackFrame.useHandCursor = false;
blackFrame.tabEnabled = false;
inventoryClip.bn.tabEnabled = false;
gamemenu.saveBN.tabIndex = 1;
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.isDown(27) or (Key.isDown(9) and (cutscene._currentframe == 1))) {
if ((((gamemenu._currentframe == 1) and (loadData._currentframe == 1)) and (saveData._currentframe == 1)) and (options._currentframe == 1)) {
_root.launchMenu("gamemenu");
} else if (((loadData._currentframe == 2) or (saveData._currentframe == 2)) or (options._currentframe == 2)) {
} else {
gamemenu.gotoAndStop(1);
_root.removeMenu();
}
}
};
Key.addListener(keyListener);
stop();
Instance of Symbol 241 MovieClip "saveBar" in Frame 3
/* no clip actions */
Instance of Symbol 58 MovieClip "popup" in Frame 3
onClipEvent (load) {
this.swapDepths(3055);
}
Instance of Symbol 244 MovieClip "actionBar" in Frame 3
/* no clip actions */
Instance of Symbol 246 MovieClip "examineHolder" in Frame 3
onClipEvent (load) {
function launchAction_1() {
_root.saveTempLocation();
_root.initiateTransport(6, this, "note");
_root.hideAction();
_root.hideForInteraction();
}
goalLength = 1;
goal_1 = "Examine note";
}
Instance of Symbol 248 MovieClip "dream_frame" in Frame 3
onClipEvent (load) {
this.swapDepths(561);
}
Instance of Symbol 61 MovieClip "bgBlur" in Frame 3
onClipEvent (load) {
this.swapDepths(195);
this.tabEnabled = false;
this.tabChildren = false;
}
Instance of Symbol 250 MovieClip "backPlate" in Frame 3
onClipEvent (load) {
this.swapDepths(3999);
}
Instance of Symbol 265 MovieClip "gx_endgame" in Frame 3
onClipEvent (load) {
this.swapDepths(2022);
}
Instance of Symbol 282 MovieClip "saveData" in Frame 3
onClipEvent (load) {
this.swapDepths(2199);
}
Instance of Symbol 286 MovieClip "cutscene" in Frame 3
onClipEvent (load) {
this.swapDepths(2000);
}
Instance of Symbol 288 MovieClip "combinationHolder" in Frame 3
onClipEvent (load) {
function launchAction_1() {
_root.pickUp(_parent.giver, "working remote", "", "The remote seems to be working now.", false);
_root.removeFromInventory("remote");
_root.removeFromInventory("batteries");
_root.showMessage("You put the batteries in the remote control.", "");
_root.hideForInteraction();
}
goalLength = 1;
goal_1 = "Use batteries with remote";
}
Instance of Symbol 320 MovieClip "gamemenu" in Frame 3
onClipEvent (load) {
this.swapDepths(500);
this.tabEnabled = false;
this.tabChildren = false;
}
Instance of Symbol 322 MovieClip "x2" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 322 MovieClip "x1" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 322 MovieClip "y2" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 322 MovieClip "y1" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 329 MovieClip "speech" in Frame 3
onClipEvent (load) {
orgX = _x;
orgY = _y;
this.swapDepths(30100);
}
Instance of Symbol 124 MovieClip "middlePoint" in Frame 3
onClipEvent (mouseDown) {
_root.checkedItem = "";
_root.removedItem = "";
_root.addedItem = "";
}
Instance of Symbol 451 MovieClip "inventoryClip" in Frame 3
onClipEvent (mouseMove) {
if ((_parent.popup._currentframe == 1) and (_parent.slider._currentframe == 1)) {
_root.targetCheck(this);
}
}
Frame 4
gameExit();
dream_frame.gotoAndStop(1);
gamemenu.swapDepths(1);
cutscene.swapDepths(1);
popup.swapDepths(1);
gamemenu.swapDepths(1);
options.swapDepths(1);
loadData.swapDepths(1);
saveData.swapDepths(1);
wipe.swapDepths(1);
speech.swapDepths(1);
topFrame.swapDepths(1);
bgBlur.swapDepths(1);
gx_endgame.swapDepths(1);
debugBar.swapDepths(1);
this.createEmptyMovieClip("cleaner", 1);
stopAllSounds();
Key.removeListener(keyListener);
inventory = new Array();
states = new Array();
inventoryDescription = new Array();
roomObject = new Array();
navpointArray = new Array();
depthList = new Array();
destinationNeighbours = new Array();
unobstructedNodes = new Array();
oldNodes = new Array();
objects = 1;
navItemNum = 1;
inventoryNum = 1;
spacing = 0;
gotoAndStop ("menu");
Symbol 15 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 3
gotoAndStop (1);
Symbol 15 MovieClip Frame 5
gotoAndStop (1);
Symbol 15 MovieClip Frame 7
gotoAndStop (1);
Symbol 34 MovieClip Frame 1
if (_parent.popup._currentframe == 1) {
_root.pause = false;
}
stop();
Symbol 34 MovieClip Frame 2
_root.pause = true;
if (_parent.speech._currentframe != 1) {
_parent.speech.gotoAndPlay("out");
}
if (_root.userSound == "on") {
if (_root.soundState == "playing") {
if (_root.didIWin == true) {
_root.sound_fadeDown(_root.currentSound, 0, 100);
} else {
_root.sound_fadeDown(_root.currentSound, 0, 25);
}
}
}
play();
Symbol 34 MovieClip Frame 20
_root.pause = true;
if (_parent.gamemenu._currentframe != 1) {
_parent.gamemenu.gotoAndStop(1);
}
play();
Symbol 34 MovieClip Frame 21
stop();
if (_root.bgBlur._currentframe != 1) {
_root.bgBlur.gotoAndStop(1);
}
if (_parent.speech._currentframe != 1) {
_parent.speech.gotoAndPlay("out");
}
if (_parent.wipeAction == "transport") {
_parent.transport(_parent.newLocationVar);
_parent.wipeAction == "";
nextFrame();
}
if (_parent.wipeAction == "start") {
_root.deleteInventory();
_parent.gameInit();
_parent.wipeAction == "";
nextFrame();
}
if (_parent.wipeAction == "inGameLoad") {
_root.deleteInventory();
_parent.hideLoadData();
_parent.gameExit();
_parent.wipeAction = "load";
gotoAndStop (1);
}
if (_parent.wipeAction == "end") {
_root.deleteInventory();
_parent.gotoAndStop("empty");
_parent.wipeAction == "";
gotoAndPlay ("out");
}
if (_parent.wipeAction == "load") {
_root.deleteInventory();
_parent.hideLoadData();
_parent.loadGame();
nextFrame();
}
if (_parent.wipeAction == "roomLoad") {
_root.deleteInventory();
_parent.hideLoadData();
_root.loadRoom();
nextFrame();
}
Symbol 34 MovieClip Frame 22
percent_txt = "0 %";
loader.bar._xscale = 0;
stopAllSounds();
_root.bgBlur.gotoAndStop(1);
this.onEnterFrame = function () {
if (_root.isFileLoaded(_root.currentLocation)) {
_root.userTrace(("the file " + _root.currentLocation) + " has been loaded");
loader._visible = false;
} else {
loader._visible = true;
}
percent = Math.floor((_root.targetMC.getBytesLoaded() / _root.targetMC.getBytesTotal()) * 100);
percent_txt = percent + " %";
loader.bar._xscale = percent;
if (percent >= 100) {
_root.targetMC.gotoAndStop(2);
_root.wipe.gotoAndPlay("out");
trace("file loaded");
this.onEnterFrame = undefined;
} else {
stop();
}
};
Instance of Symbol 28 MovieClip "loader" in Symbol 34 MovieClip Frame 22
onClipEvent (load) {
_visible = false;
}
Symbol 34 MovieClip Frame 23
_parent.hideLoadData();
_parent.hideSaveData();
if (_root.targetMC._currentframe == 2) {
play();
} else if (_parent._currentframe != _root.mainMenuFrame) {
gotoAndStop (22);
}
Symbol 34 MovieClip Frame 24
if (userSound != "on") {
_root.currentSound.setVolume(0);
}
Symbol 34 MovieClip Frame 38
if (_parent.wipeAction == "load") {
_parent.wipeAction == "";
if (_root.currentSaveBoxNum != 0) {
} else {
_root.currentSaveBoxNum = "";
}
}
Symbol 34 MovieClip Frame 41
if (_parent.wipeAction == "end") {
initiateLevelSound();
_parent.wipeAction == "";
}
Symbol 52 MovieClip Frame 2
txt.text = _parent._parent.txt;
if (txt.length > 35) {
txt.wordWrap = true;
txt.autoSize = "left";
bg_top._visible = true;
bg_middle._visible = true;
bg_bottom._visible = true;
bg_left._visible = false;
bg_middle2._visible = false;
bg_right._visible = false;
txt._x = -(txt._width / 2);
txt._y = -(txt._height / 2);
bg_top._y = txt._y - 2;
bg_middle._y = bg_top._y + bg_top._height;
bg_middle._height = txt._height - 8;
bg_bottom._y = bg_middle._y + bg_middle._height;
} else {
txt.wordWrap = false;
txt.autoSize = "center";
bg_top._visible = false;
bg_middle._visible = false;
bg_bottom._visible = false;
bg_left._visible = true;
bg_middle2._visible = true;
bg_right._visible = true;
txt._x = -(txt._width / 2);
txt._y = -(txt._height / 2);
bgHeight = (-(bg_left._height / 2)) + 0.3;
bg_left._x = txt._x - 6.5;
bg_left._y = bgHeight;
bg_middle2._x = bg_left._x + bg_left._width;
bg_middle2._y = bgHeight;
bg_middle2._width = txt._width + 4;
bg_right._x = bg_middle2._x + bg_middle2._width;
bg_right._y = bgHeight;
}
stop();
Symbol 55 Button
on (press) {
gotoAndPlay ("out");
}
Symbol 58 MovieClip Frame 1
stop();
_root.pause = false;
if (_root.eventInteraction == "Begun") {
_root.initiateStreamingEvent();
}
_parent.targetMC.mouseCircle._visible = true;
Symbol 58 MovieClip Frame 2
_root.pause = true;
_parent.targetMC.mouseCircle._visible = false;
blackFrame.useHandCursor = false;
_root.hiddenActionTxt = "";
play();
Instance of Symbol 53 MovieClip in Symbol 58 MovieClip Frame 2
onClipEvent (mouseUp) {
gotoAndPlay ("out");
}
Symbol 58 MovieClip Frame 3
_root.pause = true;
Symbol 58 MovieClip Frame 4
_root.pause = true;
Symbol 58 MovieClip Frame 5
_root.pause = true;
Symbol 58 MovieClip Frame 6
_root.pause = true;
Symbol 58 MovieClip Frame 7
_root.pause = true;
Symbol 58 MovieClip Frame 8
_root.pause = true;
Symbol 58 MovieClip Frame 9
_root.pause = true;
stop();
Symbol 58 MovieClip Frame 10
_root.updateInventory();
blackFrame.useHandCursor = false;
_parent.targetMC.mouseCircle._visible = true;
Symbol 58 MovieClip Frame 11
_root.pause = true;
Symbol 58 MovieClip Frame 12
_root.pause = true;
Symbol 58 MovieClip Frame 13
_root.pause = true;
Symbol 58 MovieClip Frame 14
_root.pause = true;
Symbol 58 MovieClip Frame 15
_root.pause = true;
if (_root.blurState == "on") {
_root.disableBlur(_root.targetMC);
}
Symbol 61 MovieClip Frame 1
_root.enableMenu();
_root.showInventory();
if (_root._currentframe == _root.mainMenuFrame) {
_root.disableBlur(_root.menuMC);
} else {
_root.disableBlur(_root.targetMC);
}
_root.pause = false;
if (_root._currentframe == _root.mainMenuFrame) {
_parent.bnNew._visible = true;
_parent.bnLoad._visible = true;
_parent.bnOptions._visible = true;
_parent.roach._visible = true;
_parent.logo._visible = true;
}
stop();
Symbol 61 MovieClip Frame 2
_root.pause = true;
blackFrame.useHandCursor = false;
_parent.targetMC.mouseCircle._visible = false;
_root.disableMenu();
_root.hideInventory();
_parent.targetMC.gubbe.clickSpot_x = _parent.targetMC.gubbe._x;
_parent.targetMC.gubbe.clickSpot_y = _parent.targetMC.gubbe._y;
_parent.targetMC.gubbe.walkState = "stopped";
if (_root._currentframe == _root.mainMenuFrame) {
_root.enableBlur(_root.menuMC);
} else {
_root.enableBlur(_root.targetMC);
}
if (_root._currentframe == _root.mainMenuFrame) {
_parent.bnNew._visible = false;
_parent.bnLoad._visible = false;
_parent.bnOptions._visible = false;
_parent.roach._visible = false;
_parent.logo._visible = false;
}
Symbol 61 MovieClip Frame 3
blackFrame.useHandCursor = false;
Symbol 61 MovieClip Frame 6
blackFrame.useHandCursor = false;
Symbol 61 MovieClip Frame 7
stop();
_root.pause = true;
blackFrame.useHandCursor = false;
_parent.targetMC.mouseCircle._visible = false;
blackFrame.tabEnabled = false;
if (_root.currentMenuItem == "options") {
_root.options.play();
} else if (_root.currentMenuItem == "load") {
_root.displayLoadData();
} else if (_root.currentMenuItem == "new") {
_root.gx_firstgame.gotoAndPlay("in");
} else if (_root.currentMenuItem == "gamemenu") {
if (_root.mainMenu == "on") {
_parent.gamemenu.gotoAndStop(3);
} else {
_parent.gamemenu.gotoAndStop(2);
}
}
Symbol 61 MovieClip Frame 8
_parent.targetMC.mouseCircle._visible = true;
play();
Symbol 66 MovieClip Frame 1
if (soapbubble2MainTimeline.userQuality == "HIGH") {
gotoAndStop (4);
} else if (soapbubble2MainTimeline.userQuality == "MEDIUM") {
gotoAndStop (2);
} else if (soapbubble2MainTimeline.userQuality == "LOW") {
gotoAndStop (3);
}
stop();
Symbol 66 MovieClip Frame 2
stop();
Symbol 66 MovieClip Frame 3
stop();
Symbol 66 MovieClip Frame 4
stop();
Symbol 69 Button
on (release) {
_root.gameChange = true;
_root.userQuality = "HIGH";
quality_bock.gotoAndStop(4);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 71 Button
on (release) {
_root.gameChange = true;
_root.userQuality = "MEDIUM";
quality_bock.gotoAndStop(2);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 73 Button
on (release) {
_root.gameChange = true;
_root.userQuality = "LOW";
quality_bock.gotoAndStop(3);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 79 MovieClip Frame 1
if (soapbubble2MainTimeline.userSound == "off") {
gotoAndStop (2);
} else {
stop();
}
stop();
Symbol 79 MovieClip Frame 2
stop();
Symbol 79 MovieClip Frame 3
stop();
Symbol 80 Button
on (release) {
_root.gameChange = true;
_root.userHearingAid = "on";
hearing_bock.gotoAndStop(3);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 82 Button
on (release) {
_root.gameChange = true;
_root.userHearingAid = "off";
hearing_bock.gotoAndStop(2);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 85 Button
on (release) {
_root.gameChange = true;
_root.userTutorial = "on";
tutorial_bock.gotoAndStop(3);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 86 Button
on (release) {
_root.gameChange = true;
_root.userTutorial = "off";
tutorial_bock.gotoAndStop(2);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 91 Button
on (release) {
_root.gameChange = true;
_root.userColorAid = "on";
color_bock.gotoAndStop(3);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 92 Button
on (release) {
_root.gameChange = true;
_root.userColorAid = "off";
color_bock.gotoAndStop(2);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 95 Button
on (release) {
_root.userSound = "on";
sound_bock.gotoAndStop(3);
_root.sound_fadeUp(_root.currentSound, 25, 25);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 96 Button
on (release) {
_root.userSound = "off";
sound_bock.gotoAndStop(2);
_root.sound_fadeDown(_root.currentSound, 0, 25);
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 103 Button
on (release) {
if (_root._currentframe == _root.mainMenuFrame) {
gotoAndStop (1);
_root.removeMenu();
} else {
if (_root._currentframe != _root.mainMenuFrame) {
if (_root.mainMenu == "on") {
_parent.gamemenu.gotoAndStop(3);
} else {
_parent.gamemenu.gotoAndStop(2);
}
}
gotoAndStop (1);
}
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Instance of Symbol 53 MovieClip in Symbol 106 MovieClip Frame 2
onClipEvent (load) {
if (_root.userQuality == "HIGH") {
_parent.quality_bock.gotoAndStop(4);
} else if (_root.userQuality == "MEDIUM") {
_parent.quality_bock.gotoAndStop(2);
} else {
_parent.quality_bock.gotoAndStop(3);
}
}
onClipEvent (enterFrame) {
_root.disableMenu();
_root.hideAction();
_root.pause = true;
_root.targetMC.mouseCircle._visible = false;
}
Instance of Symbol 53 MovieClip in Symbol 106 MovieClip Frame 2
onClipEvent (load) {
if (_root.userHearingAid == "off") {
_parent.hearing_bock.gotoAndStop(2);
} else {
_parent.hearing_bock.gotoAndStop(1);
}
}
Instance of Symbol 53 MovieClip in Symbol 106 MovieClip Frame 2
onClipEvent (load) {
if (_root.userTutorial == "off") {
_parent.tutorial_bock.gotoAndStop(2);
} else {
_parent.tutorial_bock.gotoAndStop(1);
}
}
Instance of Symbol 53 MovieClip in Symbol 106 MovieClip Frame 2
onClipEvent (load) {
if (_root.userWaterEffects == "off") {
_parent.water_bock.gotoAndStop(2);
} else {
_parent.water_bock.gotoAndStop(1);
}
}
Instance of Symbol 53 MovieClip in Symbol 106 MovieClip Frame 2
onClipEvent (load) {
if (_root.userColorAid == "off") {
_parent.color_bock.gotoAndStop(2);
} else {
_parent.color_bock.gotoAndStop(1);
}
}
Instance of Symbol 53 MovieClip in Symbol 106 MovieClip Frame 2
onClipEvent (load) {
if (_root.userSound == "off") {
_parent.sound_bock.gotoAndStop(2);
} else {
_parent.sound_bock.gotoAndStop(1);
}
}
Symbol 109 MovieClip Frame 1
function bars_in() {
_parent["gameDataBox" + ii]._visible = true;
_parent["gameDataBox" + i].backplate.gotoAndPlay("in");
i++;
ii++;
}
i = 1;
ii = 0;
Symbol 109 MovieClip Frame 2
bars_in();
Symbol 109 MovieClip Frame 3
bars_in();
Symbol 109 MovieClip Frame 4
bars_in();
Symbol 109 MovieClip Frame 5
bars_in();
Symbol 109 MovieClip Frame 6
bars_in();
Symbol 109 MovieClip Frame 7
bars_in();
Symbol 109 MovieClip Frame 8
bars_in();
Symbol 109 MovieClip Frame 9
bars_in();
Symbol 109 MovieClip Frame 10
bars_in();
Symbol 109 MovieClip Frame 11
bars_in();
Symbol 109 MovieClip Frame 12
gotoAndStop (1);
Symbol 111 Button
on (rollOver) {
plateColor = new Color(backplate);
plateColor.setRGB(_root.mouseOverColor);
numColor = new Color(numTXT);
numColor.setRGB(_root.mouseOutColor);
txtColor = new Color(nameTXT);
txtColor.setRGB(_root.mouseOutColor);
_root.playSound("menuRollOver");
}
on (rollOut, releaseOutside) {
plateColor = new Color(backplate);
plateColor.setRGB(_root.mouseOutColor);
numColor = new Color(numTXT);
numColor.setRGB(_root.mouseOverColor);
txtColor = new Color(nameTXT);
txtColor.setRGB(_root.mouseOverColor);
}
on (release) {
_root.currentSaveBoxNum = userNum;
if (_root.popup._currentframe != 1) {
_root.popup.play();
} else if (_root["saveGameInfo" + _root.currentSaveBoxNum].data.gameSaved == true) {
if (_root._currentframe == 2) {
_root.wipeAction = "load";
} else {
_root.wipeAction = "load";
}
_root.wipe.play();
} else {
_root.showMessage("This slot is empty.", "");
}
}
Symbol 122 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 8
stop();
Symbol 122 MovieClip Frame 15
_parent._visible = false;
Symbol 123 MovieClip Frame 1
userNumTxt = userNum + ".";
stop();
Symbol 127 Button
on (release) {
if (_root._currentframe != _root.mainMenuFrame) {
if (_root.mainMenu == "on") {
_parent.gamemenu.gotoAndStop(3);
} else {
_parent.gamemenu.gotoAndStop(2);
}
}
if (_root._currentframe == _root.mainMenuFrame) {
_root.removeMenu();
}
_root.hideLoadData();
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 2
stop();
Instance of Symbol 123 MovieClip "gameDataBox" in Symbol 128 MovieClip Frame 2
onClipEvent (load) {
_parent.gameDataBox._visible = false;
}
Instance of Symbol 124 MovieClip in Symbol 128 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.pause = true;
}
Symbol 132 MovieClip Frame 1
function soundFade() {
if (i < _root.stepNum) {
currentVolume = _root.currentSound.getVolume();
_root.currentSound.setVolume(currentVolume + incrementSize);
_root.test = _root.currentSound.getVolume();
i++;
} else {
userTrace("fade complete");
_root.currentSound.setVolume(_root.targetVolumeNum);
if (_root.targetVolumeNum == 0) {
_root.currentSound.stop();
}
gotoAndStop (1);
}
}
incrementSize = (_root.targetVolumeNum - startVolume) / _root.stepNum;
stop();
Symbol 132 MovieClip Frame 2
i = 0;
startVolume = _root.currentSound.getVolume();
incrementSize = (_root.targetVolumeNum - startVolume) / _root.stepNum;
_root.userTrace("startVolume: " + startVolume);
_root.userTrace("targetVolume: " + _root.targetVolumeNum);
_root.userTrace("stepNum: " + _root.stepNum);
_root.userTrace("incrementSize: " + incrementSize);
play();
soundFade();
Symbol 132 MovieClip Frame 3
soundFade();
Symbol 132 MovieClip Frame 4
soundFade();
gotoAndPlay (3);
Symbol 134 MovieClip Frame 1
i = 0;
positions = new Array(0.015625, 0.03125, 0.0625, 0.125, 0.25, 0.5, 0.75, 0.875, 0.9375, 0.96875, 0.984375, 0.99);
_root.sliding = false;
stop();
Symbol 134 MovieClip Frame 2
function SlideNext() {
xPos = Math.floor(distNumX * positions[i]);
yPos = Math.floor(distNumY * positions[i]);
MCobject._x = beginSlideX - xPos;
MCobject._y = beginSlideY - yPos;
i++;
}
Symbol 134 MovieClip Frame 3
beginSlideX = _parent.beginSlideX - (MCobject._width / 2);
beginSlideY = _parent.beginSlideY - (MCobject._height / 2);
endSlideX = _parent.endSlideX;
endSlideY = _parent.endSlideY;
distNumX = beginSlideX - endSlideX;
distNumY = beginSlideY - endSlideY;
_root.sliding = true;
SlideNext();
Symbol 134 MovieClip Frame 4
SlideNext();
Symbol 134 MovieClip Frame 5
SlideNext();
Symbol 134 MovieClip Frame 6
SlideNext();
Symbol 134 MovieClip Frame 7
SlideNext();
Symbol 134 MovieClip Frame 8
SlideNext();
Symbol 134 MovieClip Frame 9
SlideNext();
Symbol 134 MovieClip Frame 10
SlideNext();
Symbol 134 MovieClip Frame 11
SlideNext();
Symbol 134 MovieClip Frame 12
SlideNext();
Symbol 134 MovieClip Frame 13
SlideNext();
Symbol 134 MovieClip Frame 14
MCobject._x = _parent.endSlideX;
MCobject._y = _parent.endSlideY;
if (_root.oldMC != "") {
_root.oldMC._x = _root.oldMC.orgX;
_root.oldMC._y = _root.oldMC.orgY;
_root.oldMC._visible = true;
_root.oldMC = "";
}
if ((_root.popup._currentframe == 1) and (_root.speech._currentframe == 1)) {
_root.updateInventory();
}
Symbol 140 Button
on (release) {
getURL ("http://cockroach.se", "_blank");
}
Symbol 147 Button
on (release) {
_root.addState("commingFromMainMenu");
_parent.wipeAction = "start";
_parent.wipe.play();
_root.defaultCurrentLocation = _root.newGame_withoutTutorial;
play();
}
Symbol 152 Button
on (release) {
_parent.wipeAction = "start";
_parent.wipe.play();
_root.defaultCurrentLocation = _root.newGame_withTutorial;
play();
}
Symbol 159 Button
on (release) {
gotoAndPlay ("out");
_root.removeMenu();
}
Symbol 160 Button
on (release) {
_root.addState("commingFromMainMenu");
_parent.wipeAction = "start";
_parent.wipe.play();
_root.defaultCurrentLocation = _root.newGame_withoutTutorial;
play();
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 161 Button
on (release) {
_parent.wipeAction = "start";
_parent.wipe.play();
_root.defaultCurrentLocation = _root.newGame_withTutorial;
play();
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 162 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 2
blackFrame.useHandCursor = false;
Symbol 162 MovieClip Frame 9
stop();
Symbol 162 MovieClip Frame 10
Symbol 173 Button
on (release) {
_root.launchMenu("options");
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 178 Button
on (release) {
_root.launchMenu("load");
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 183 Button
on (release) {
if (popup._currentframe != 1) {
popup.play();
}
if (_root.askAboutTutorial == true) {
_root.launchMenu("new");
} else {
_root.addState("commingFromMainMenu");
_root.wipeAction = "start";
_root.wipe.play();
_root.defaultCurrentLocation = _root.newGame_withoutTutorial;
}
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 209 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 2
_parent._parent.MCsound.play();
Symbol 209 MovieClip Frame 12
gotoAndPlay ("channelSwap");
Instance of Symbol 208 MovieClip in Symbol 209 MovieClip Frame 12
onClipEvent (enterFrame) {
if (_root.girlGone != true) {
if (_root.bgBlur._currentframe == 1) {
play();
} else {
stop();
}
}
}
Symbol 209 MovieClip Frame 17
gotoAndPlay ("loop");
Symbol 209 MovieClip Frame 34
if ((_parent._parent.MCsound._currentframe == 1) and (_parent._parent.clipFinished == false)) {
_parent._parent.MCsound.gotoAndPlay("short");
}
if (_root.speech._currentframe != 1) {
_root.speech.gotoAndStop(1);
}
Symbol 209 MovieClip Frame 35
if (_root.speech._currentframe != 1) {
_root.speech.gotoAndStop(1);
}
Symbol 209 MovieClip Frame 36
if (_root.speech._currentframe != 1) {
_root.speech.gotoAndStop(1);
}
Symbol 209 MovieClip Frame 37
if (_root.speech._currentframe != 1) {
_root.speech.gotoAndStop(1);
}
Symbol 209 MovieClip Frame 38
if (_root.speech._currentframe != 1) {
_root.speech.gotoAndStop(1);
}
Symbol 209 MovieClip Frame 39
if (_parent._parent.clipFinished == true) {
gotoAndPlay ("loop");
} else {
_parent.gotoAndStop(_parent._parent.channel + 1);
_root.streamingEvent(_parent.movie, 2);
}
stop();
if (_root.speech._currentframe != 1) {
_root.speech.gotoAndStop(1);
}
Instance of Symbol 209 MovieClip in Symbol 211 MovieClip Frame 1
onClipEvent (load) {
if (_root.girlGone != true) {
gotoAndPlay ("loop");
}
}
Symbol 234 MovieClip Frame 1
stop();
Instance of Symbol 216 MovieClip in Symbol 234 MovieClip Frame 1
onClipEvent (load) {
if (_root.girlGone == true) {
_visible = false;
}
}
Symbol 241 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 1
_root.actionTxt = "";
txt._visible = false;
this.onEnterFrame = function () {
if (txt.text == "Examine undefined") {
txt._visible = false;
} else {
delete this.onEnterFrame;
}
};
stop();
Symbol 244 MovieClip Frame 2
function resizeActionBar() {
txt.text = _parent.actionTxt;
txt.autoSize = "center";
txt._visible = true;
bgHeight = 444;
txt._x = 320 - (txt._width / 2);
txt._y = 445;
bg_left._x = txt._x - 10;
bg_left._y = bgHeight;
bg_middle._x = bg_left._x + bg_left._width;
bg_middle._y = bgHeight;
bg_middle._width = txt._width + 8;
bg_right._x = bg_middle._x + bg_middle._width;
bg_right._y = bgHeight;
}
this.onEnterFrame = function () {
if ((txt.text == "") or (txt.text == undefined)) {
_root.actionTxt = "Examine " + _root.currentRollOver.name;
resizeActionBar();
} else if (txt.text == "Examine undefined") {
gotoAndStop (1);
} else {
txt._visible = true;
delete this.onEnterFrame;
}
};
resizeActionBar();
stop();
Symbol 248 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 2
_root.pause = true;
_parent.targetMC.mouseCircle._visible = false;
blackFrame.useHandCursor = false;
stop();
Instance of Symbol 53 MovieClip in Symbol 250 MovieClip Frame 2
onClipEvent (mouseUp) {
gotoAndPlay ("out");
}
Symbol 253 Button
on (release) {
_root.executeReply(this);
}
on (rollOver) {
txt._alpha = 100;
}
on (rollOut, releaseOutside) {
txt._alpha = 80;
}
Symbol 254 MovieClip Frame 2
txt.autoSize = "left";
bn.tabEnabled = false;
bn._y = txt._y - 1;
bn._x = txt._x;
bn._width = txt._width;
bn._height = txt._height;
stop();
Symbol 256 Button
on (release) {
play();
}
Symbol 257 Button
on (release) {
_parent.wipeAction = "end";
_parent.wipe.play();
play();
}
Symbol 261 Button
on (release) {
gotoAndPlay ("out");
_root.removeMenu();
}
Symbol 262 Button
on (release) {
play();
_root.removeMenu();
}
Symbol 263 Button
on (release) {
play();
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 264 Button
on (release) {
_parent.wipeAction = "end";
_parent.wipe.play();
play();
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 265 MovieClip Frame 1
_root.enableMenu();
stop();
Symbol 265 MovieClip Frame 2
blackFrame.useHandCursor = false;
_root.disableMenu();
Symbol 265 MovieClip Frame 8
stop();
Symbol 265 MovieClip Frame 9
Symbol 265 MovieClip Frame 14
if (_root.wipeAction == "end") {
stop();
}
Symbol 269 Button
on (release) {
if (_root._currentframe != _root.mainMenuFrame) {
if (_root.mainMenu == "on") {
_parent.gamemenu.gotoAndStop(3);
} else {
_parent.gamemenu.gotoAndStop(2);
}
}
_root.hideSaveData();
}
on (rollOver) {
_root.playSound("menuRollOver");
}
Symbol 271 Button
on (rollOver) {
if ((_root.currentSaveBoxNum != "") and (_parent["gameDataBox" + _root.currentSaveBoxNum].userName != "")) {
plateColor = new Color(backplate);
plateColor.setRGB(16777215);
txtColor = new Color(txt_saveGame);
txtColor.setRGB(0);
backplate._alpha = 100;
txt_saveGame._alpha = 100;
_root.playSound("menuRollOver");
}
}
on (rollOut, releaseOutside) {
if ((_root.currentSaveBoxNum != "") and (_parent["gameDataBox" + _root.currentSaveBoxNum].userName != "")) {
plateColor = new Color(backplate);
plateColor.setRGB(0);
txtColor = new Color(txt_saveGame);
txtColor.setRGB(16777215);
} else {
backplate._alpha = 50;
txt_saveGame._alpha = 50;
}
}
on (press, keyPress "<Enter>") {
if (_root.currentSaveBoxNum != "") {
if (_parent["gameDataBox" + _root.currentSaveBoxNum].userName != "") {
_root.userTrace(_parent.userName);
_root.saveGame();
_root.gamemenu.gotoAndStop(1);
_root.removeMenu();
_root.showMessage("Saved...", "");
if (_root.gameChange == true) {
if (_root.mainMenu == "on") {
_root.gamemenu.gotoAndStop(3);
} else {
_root.gamemenu.gotoAndStop(2);
}
_root.hideSaveData();
} else {
_root.hideSaveData();
}
}
}
}
Instance of Symbol 273 MovieClip "txt_saveGame" in Symbol 277 MovieClip Frame 1
onClipEvent (load) {
_alpha = 50;
}
Instance of Symbol 276 MovieClip "backplate" in Symbol 277 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 15;
}
Symbol 278 Button
on (rollOver) {
plateColor = new Color(backplate);
plateColor.setRGB(16777215);
numColor = new Color(numTXT);
numColor.setRGB(0);
txtColor = new Color(txtHolder);
txtColor.setRGB(0);
_root.playSound("menuRollOver");
}
on (rollOut, releaseOutside) {
plateColor = new Color(backplate);
plateColor.setRGB(0);
numColor = new Color(numTXT);
numColor.setRGB(16777215);
txtColor = new Color(txtHolder);
txtColor.setRGB(16777215);
}
on (release) {
Selection.setFocus("userName");
gotoAndStop (2);
}
Symbol 281 MovieClip Frame 1
userNumTxt = userNum + ".";
stop();
Instance of Symbol 122 MovieClip "backplate" in Symbol 281 MovieClip Frame 1
onClipEvent (load) {
}
onClipEvent (mouseUp) {
if (_parent._name != "gameDataBox9") {
if (this.hitTest(_root._xmouse + _root.offsetx, _root._ymouse + _root.offsety, true)) {
if (_parent.userName == "Empty") {
_parent.tempUserName = _parent.userName;
_parent.userName = "";
_root.userTrace("text removed");
}
_root.currentSaveBoxNum = _parent.userNum;
} else if (!this.hitTest(_root._xmouse + _root.offsetx, _root._ymouse + _root.offsety, true)) {
if (_parent.userName == "") {
_parent.userName = _parent.tempUserName;
_root.currentSaveBoxNum = "";
_root.userTrace("text returned");
}
_parent.gotoAndStop(1);
}
}
}
Symbol 281 MovieClip Frame 2
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 2
stop();
saveBN.backplate._alpha = 50;
saveBN.bn.useHandCursor = false;
_root.disableMenu();
_root.currentSaveBoxNum = "";
Instance of Symbol 124 MovieClip in Symbol 282 MovieClip Frame 2
onClipEvent (enterFrame) {
_root.pause = true;
_parent.userName = _parent["gameDataBox" + _root.currentSaveBoxNum].userName;
if ((_root.currentSaveBoxNum != "") and (_parent["gameDataBox" + _root.currentSaveBoxNum].userName != "")) {
_parent.saveBN.bn.useHandCursor = true;
if (backplateLight != true) {
_parent.saveBN.backplate._alpha = 100;
_parent.saveBN.txt_saveGame._alpha = 100;
backplateLight = true;
}
} else {
backplateLight = false;
_parent.saveBN.bn.useHandCursor = false;
if (_parent.saveBN.backplate._alpha != 50) {
_parent.saveBN.backplate._alpha = 50;
_parent.saveBN.txt_saveGame._alpha = 50;
}
}
}
Instance of Symbol 281 MovieClip "gameDataBox" in Symbol 282 MovieClip Frame 2
onClipEvent (load) {
_parent.gameDataBox._visible = false;
}
Symbol 285 Button
on (release) {
if (_parent.popup._currentframe == 9) {
_parent.popup.gotoAndPlay("out");
}
}
Symbol 286 MovieClip Frame 1
_parent.cutscene.swapDepths(2000);
_root.enableMenu();
_root.hideForInteraction();
_parent.targetMC.mouseCircle._visible = true;
stop();
Symbol 286 MovieClip Frame 2
_parent.pause = true;
_parent.cutscene.swapDepths(2000);
_root.disableMenu();
blackFrame.useHandCursor = false;
_root.hideForInteraction();
Symbol 286 MovieClip Frame 3
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 4
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 5
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 6
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 7
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 8
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 9
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 10
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 11
_parent.pause = true;
_parent.cutscene.swapDepths(2000);
_root.hideInventory();
_root.hideActionBar();
stop();
Symbol 286 MovieClip Frame 12
_parent.cutscene.swapDepths(2000);
_root.showInventory();
_root.showActionBar();
_root.hideForInteraction();
Symbol 286 MovieClip Frame 13
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 14
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 15
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 16
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 17
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 18
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 19
_parent.cutscene.swapDepths(2000);
Symbol 286 MovieClip Frame 20
_parent.pause = false;
_parent.cutscene.swapDepths(2000);
Symbol 291 Button
on (release) {
_root.launchMenu("gamemenu");
}
on (rollOver) {
if (_root.menuDisabled == false) {
saveMC.gotoAndStop(2);
}
}
on (rollOut, releaseOutside) {
saveMC.gotoAndStop(1);
}
Symbol 295 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 1
function bars_in() {
_parent["bn" + ii]._visible = true;
_parent["bn" + i].backplate.gotoAndPlay("in");
i++;
ii++;
}
function bars_out() {
_parent["bn" + i].backplate.gotoAndPlay("out");
i++;
}
i = 1;
ii = 0;
Symbol 296 MovieClip Frame 2
bars_in();
Symbol 296 MovieClip Frame 3
bars_in();
Symbol 296 MovieClip Frame 4
bars_in();
Symbol 296 MovieClip Frame 5
bars_in();
Symbol 296 MovieClip Frame 6
bars_in();
Symbol 296 MovieClip Frame 7
bars_in();
Symbol 296 MovieClip Frame 8
gotoAndStop (1);
Symbol 296 MovieClip Frame 9
_parent.header._visible = false;
bars_out();
Symbol 296 MovieClip Frame 10
bars_out();
Symbol 296 MovieClip Frame 11
bars_out();
Symbol 296 MovieClip Frame 12
bars_out();
Symbol 296 MovieClip Frame 13
bars_out();
Symbol 296 MovieClip Frame 14
bars_out();
Symbol 296 MovieClip Frame 22
_root.removeMenu();
_parent.gotoAndStop(1);
gotoAndStop (1);
Symbol 300 Button
on (rollOver) {
plateColor = new Color(backplate);
plateColor.setRGB(16777215);
numColor = new Color(numTXT);
numColor.setRGB(0);
txtColor = new Color(txtHolder);
txtColor.setRGB(0);
_root.playSound("menuRollOver");
}
on (rollOut, releaseOutside) {
plateColor = new Color(backplate);
plateColor.setRGB(0);
numColor = new Color(numTXT);
numColor.setRGB(16777215);
txtColor = new Color(txtHolder);
txtColor.setRGB(16777215);
}
on (release) {
_root.options.gotoAndStop(2);
_parent.gotoAndStop(4);
}
Symbol 303 MovieClip Frame 1
stop();
Symbol 304 Button
on (rollOver) {
plateColor = new Color(backplate);
plateColor.setRGB(16777215);
numColor = new Color(numTXT);
numColor.setRGB(0);
txtColor = new Color(txtHolder);
txtColor.setRGB(0);
_root.playSound("menuRollOver");
}
on (rollOut, releaseOutside) {
plateColor = new Color(backplate);
plateColor.setRGB(0);
numColor = new Color(numTXT);
numColor.setRGB(16777215);
txtColor = new Color(txtHolder);
txtColor.setRGB(16777215);
}
on (release) {
if (_root.menuDisabled == false) {
_root.displayLoadData();
}
}
Symbol 307 MovieClip Frame 1
stop();
Symbol 308 Button
on (rollOver) {
plateColor = new Color(backplate);
plateColor.setRGB(16777215);
numColor = new Color(numTXT);
numColor.setRGB(0);
txtColor = new Color(txtHolder);
txtColor.setRGB(0);
_root.playSound("menuRollOver");
}
on (rollOut, releaseOutside) {
plateColor = new Color(backplate);
plateColor.setRGB(0);
numColor = new Color(numTXT);
numColor.setRGB(16777215);
txtColor = new Color(txtHolder);
txtColor.setRGB(16777215);
}
on (release) {
if (_root.menuDisabled == false) {
_root.displaySaveData();
}
}
Symbol 311 MovieClip Frame 1
stop();
Symbol 312 Button
on (rollOver) {
plateColor = new Color(backplate);
plateColor.setRGB(_root.mouseOverColor);
numColor = new Color(numTXT);
numColor.setRGB(_root.mouseOutColor);
txtColor = new Color(txtHolder);
txtColor.setRGB(_root.mouseOutColor);
_root.playSound("menuRollOver");
}
on (rollOut, releaseOutside) {
plateColor = new Color(backplate);
plateColor.setRGB(_root.mouseOutColor);
numColor = new Color(numTXT);
numColor.setRGB(_root.mouseOverColor);
txtColor = new Color(txtHolder);
txtColor.setRGB(_root.mouseOverColor);
}
on (release) {
if (_root.gameChange == true) {
_root.currentSaveBoxNum = 0;
_root.saveGame("saveGameInfo" + _root.currentSaveBoxNum);
_root.wipeAction = "load";
_root.wipe.play();
_root.gameChange = false;
} else {
_root.removeMenu();
_parent.gotoAndStop(1);
}
}
Symbol 315 MovieClip Frame 1
stop();
Symbol 316 Button
on (rollOver) {
plateColor = new Color(backplate);
plateColor.setRGB(16777215);
numColor = new Color(numTXT);
numColor.setRGB(0);
txtColor = new Color(txtHolder);
txtColor.setRGB(0);
_root.playSound("menuRollOver");
}
on (rollOut, releaseOutside) {
plateColor = new Color(backplate);
plateColor.setRGB(0);
numColor = new Color(numTXT);
numColor.setRGB(16777215);
txtColor = new Color(txtHolder);
txtColor.setRGB(16777215);
}
on (release) {
if (_root.menuDisabled == false) {
if (_root.popup._currentframe != 1) {
_root.popup.play();
}
_root.gx_endgame.play();
}
gotoAndStop (1);
}
Symbol 319 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 1
stop();
if (_parent.options._currentframe == 1) {
_root.pause = false;
_root.displayFootCursor();
if (((_parent.options._currentframe == 1) and (_parent.loadData._currentframe == 1)) and (_parent.saveData._currentframe == 1)) {
_root.enableMenu();
}
}
Instance of Symbol 295 MovieClip "saveMC" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
}
Symbol 320 MovieClip Frame 2
blackFrame.useHandCursor = false;
_root.menuDisabled = false;
_root.hideAction();
_root.pause = true;
_root.targetMC.mouseCircle._visible = false;
blackFrame.tabEnabled = false;
tabChildren = false;
bn1._visible = false;
bn2._visible = false;
bn3._visible = false;
bn4._visible = false;
bn5._visible = false;
Symbol 320 MovieClip Frame 3
blackFrame.useHandCursor = false;
_root.menuDisabled = false;
_root.hideAction();
_root.pause = true;
_root.targetMC.mouseCircle._visible = false;
blackFrame.tabEnabled = false;
tabChildren = false;
bn1._visible = false;
bn2._visible = false;
bn3._visible = false;
bn4._visible = false;
bn5._visible = false;
Symbol 320 MovieClip Frame 4
stop();
Symbol 327 MovieClip Frame 1
speechColor = new Color(txt);
speechColor.setRGB(_root.colorVar);
Symbol 328 Button
on (press) {
gotoAndPlay ("out");
}
Symbol 329 MovieClip Frame 1
stop();
_root.pause = false;
if (_root.eventInteraction == "Begun") {
_root.initiateStreamingEvent();
}
_parent.targetMC.mouseCircle._visible = true;
Instance of Symbol 324 MovieClip in Symbol 329 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 329 MovieClip Frame 2
_root.pause = true;
_parent.targetMC.mouseCircle._visible = false;
blackFrame.useHandCursor = false;
_root.hiddenActionTxt = "";
play();
Instance of Symbol 53 MovieClip in Symbol 329 MovieClip Frame 2
onClipEvent (mouseUp) {
gotoAndPlay ("out");
}
Symbol 329 MovieClip Frame 3
_root.pause = true;
Symbol 329 MovieClip Frame 4
_root.pause = true;
Symbol 329 MovieClip Frame 5
_root.pause = true;
Symbol 329 MovieClip Frame 6
_root.pause = true;
Symbol 329 MovieClip Frame 7
_root.pause = true;
Symbol 329 MovieClip Frame 8
_root.pause = true;
Symbol 329 MovieClip Frame 9
_root.pause = true;
stop();
Symbol 329 MovieClip Frame 10
_root.updateInventory();
blackFrame.useHandCursor = false;
_parent.targetMC.mouseCircle._visible = true;
Symbol 329 MovieClip Frame 11
_root.pause = true;
Symbol 329 MovieClip Frame 12
_root.pause = true;
Symbol 329 MovieClip Frame 13
_root.pause = true;
Symbol 329 MovieClip Frame 14
_root.pause = true;
Symbol 329 MovieClip Frame 15
_root.pause = true;
_x = orgX;
_y = orgY;
Instance of Symbol 331 MovieClip "actionArea" in Symbol 333 MovieClip Frame 1
onClipEvent (load) {
}
Symbol 336 MovieClip Frame 1
stop();
Instance of Symbol 331 MovieClip "actionArea" in Symbol 340 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 344 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 2
stop();
Symbol 350 Button
on (rollOver) {
if ((_root.pause == false) and (_root.sliding == false)) {
if ((_parent.popup._currentframe == 1) and (_parent.slider._currentframe == 1)) {
_root.inventoryAction_examine(this);
}
}
}
on (press) {
if ((_root.pause == false) and (_root.sliding == false)) {
if ((_parent.popup._currentframe == 1) and (_parent.slider._currentframe == 1)) {
_root.getObjectBounds(this);
_root.endSlideX = this._x;
_root.endSlideY = this._y;
_root.functionBreaker = false;
_root.inventoryAction_examine(this);
_root.inventoryAction_move(this);
_root.hideFootCursor();
this.startDrag();
}
}
}
on (release) {
if ((_root.pause == false) and (_root.sliding == false)) {
if ((_parent.popup._currentframe == 1) and (_parent.slider._currentframe == 1)) {
if (_root.currentObject == this) {
this.stopDrag();
_root.beginSlideX = this._x + (this._width / 2);
_root.beginSlideY = this._y + (this._height / 2);
_root.inventoryItemActivationCheck(this);
_root.beginSlide(this);
_root.hideAction();
_root.displayFootCursor();
}
}
}
}
on (releaseOutside) {
if ((_root.pause == false) and (_root.sliding == false)) {
if ((_parent.popup._currentframe == 1) and (_parent.slider._currentframe == 1)) {
if (_root.currentObject == this) {
_root.hideAction();
_root.beginSlideX = this._x + (this._width / 2);
_root.beginSlideY = this._y + (this._height / 2);
_root.beginSlide(this);
_root.displayFootCursor();
}
}
}
}
on (rollOut) {
_root.hideAction();
_root.displayFootCursor();
updateAfterEvent();
}
Symbol 438 MovieClip Frame 1
stop();
Symbol 451 MovieClip Frame 1
bn.tabEnabled = false;
stop();
Instance of Symbol 438 MovieClip "reflection" in Symbol 451 MovieClip Frame 58
onClipEvent (enterFrame) {
if (_root.shineState == "high") {
this.gotoAndStop(4);
} else if (_root.shineState == "medium") {
this.gotoAndStop(3);
} else if (_root.shineState == "low") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}