Frame 1
function paulHoggRightClickLink() {
_root.getURL("http://www.misterphogg.com", "_blank");
}
function facebookRightClickLink() {
_root.getURL("http://www.facebook.com/pages/Strange-Laboratory/325938680774634", "_blank");
}
function setLowQuality() {
_root._quality = "LOW";
}
function setMediumQuality() {
_root._quality = "MEDIUM";
}
function setHighQuality() {
_root._quality = "HIGH";
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain != "flashgamelicense.com") {
}
_root.createEmptyMovieClip("beGamerLegitUpdater", _root.getNextHighestDepth());
beGamerLegitUpdater.loadMovie("http://www.andrascik.sk/strangelaboratory/strangelaboratory-logo.swf");
var rightClickMenu = new ContextMenu();
rightClickMenu.hideBuiltInItems();
strangeItem = new ContextMenuItem("Strange Laboratory", facebookRightClickLink);
createdByItem = new ContextMenuItem("Paul Hogg 2012", paulHoggRightClickLink);
lowQualityItem = new ContextMenuItem("Low Quality", setLowQuality);
mediumQualityItem = new ContextMenuItem("Medium Quality", setMediumQuality);
highQualityItem = new ContextMenuItem("High Quality", setHighQuality);
rightClickMenu.customItems.push(strangeItem);
rightClickMenu.customItems.push(createdByItem);
rightClickMenu.customItems.push(lowQualityItem);
rightClickMenu.customItems.push(mediumQualityItem);
rightClickMenu.customItems.push(highQualityItem);
_root.menu = rightClickMenu;
__com_mochibot__("2fd855ca", this, 10301, true);
__com_mochibot__("22d8ca72", this, 10301, true);
function initCheckpoint() {
checkPoint = {};
checkPoint.playerX = player._x;
checkPoint.playerY = player._y;
checkPoint.groundX = ground._x;
checkPoint.groundY = ground._y;
checkPoint.xScale = player._xscale;
}
function initPlayer() {
player.regen = false;
player.regenTimer = 0;
player.deathTimer = 0;
player.ySpeed = 0;
player.xSpeed = 0;
player.scrollWidth = 150;
player.errorMargin = 8.3;
player.canJump = true;
player.onLadder = false;
player.climbSpeed = 1.1;
player.jumpSpeed = 15;
player.jumping = false;
player.maxSpeed = 8.2;
player.hWidth = player._width / 2;
player.hHeight = player._height / 2;
player.dead = false;
player.jetPack._visible = false;
player.canJetPack = false;
player.footSteps = false;
}
function initGame() {
gravity = 1.5;
friction = 0.7;
scrollEase = 2.5;
scrollFriction = 0.89;
scrollX = 0;
upDown = false;
messageBarY = 525;
messageBarTimer = 0;
messageBarLimit = 0;
checkPointNum = 0;
gearsCollected = 0;
gearsCollectedX = 660;
gearsCollectedTimer = 182;
bonusGears = 0;
bonusGearsX = -63;
bonusGearsTimer = 182;
gamePaused = false;
pDown = false;
gameTimer = 0;
intervalTimer = setInterval(incrementGameTimer, 1000);
muteScale = 50;
}
function incrementGameTimer() {
if (!gamePaused) {
gameTimer++;
}
}
function secondsToMinutes(seconds) {
tempMins = Math.floor(seconds / 60);
tempSeconds = Math.round(seconds - (tempMins * 60));
if (tempSeconds <= 9) {
tempSeconds = "0" + tempSeconds;
}
return((tempMins + ":") + tempSeconds);
}
function chooseFrame() {
if (!player.dead) {
if (player.ySpeed < 20) {
if (player.onLadder) {
player.gotoAndStop(4);
} else if (player.jumping) {
player.gotoAndStop(3);
} else if (Math.abs(player.xSpeed) > 1) {
player.gotoAndStop(2);
} else {
player.gotoAndStop(1);
}
} else {
player.gotoAndStop(5);
}
} else {
player.gotoAndStop(6);
}
}
function scrollStage() {
if (player._x > (700 - (player.scrollWidth * 1.6))) {
scrollX = (-(player._x - (700 - (player.scrollWidth * 1.6)))) / (scrollEase * 2);
}
if (player._x < ((player.scrollWidth * 1.6) - 1)) {
scrollX = (-(player._x - (player.scrollWidth * 1.6))) / (scrollEase * 2);
}
if (player._y < player.scrollWidth) {
ground._y = ground._y - ((player._y - player.scrollWidth) / scrollEase);
player._y = player._y - ((player._y - player.scrollWidth) / scrollEase);
}
if (player._y > (500 - player.scrollWidth)) {
ground._y = ground._y - ((player._y - (500 - player.scrollWidth)) / scrollEase);
player._y = player._y - ((player._y - (500 - player.scrollWidth)) / scrollEase);
}
}
function moveHorizontal() {
if (Key.isDown(39) || (Key.isDown(68))) {
player._xscale = -100;
if (player.xSpeed < player.maxSpeed) {
player.xSpeed = player.xSpeed + 2;
} else {
player.xSpeed = player.maxSpeed;
}
} else if (Key.isDown(37) || (Key.isDown(65))) {
player._xscale = 100;
if (player.xSpeed > (-player.maxSpeed)) {
player.xSpeed = player.xSpeed - 2;
} else {
player.xSpeed = -player.maxSpeed;
}
} else {
player.xSpeed = player.xSpeed * friction;
}
}
function moveVertical() {
if (!player.onLadder) {
if (player.onGround) {
if (Key.isDown(38) || (Key.isDown(87))) {
if (player.canJump) {
player.ySpeed = player.ySpeed - player.jumpSpeed;
player.canJump = false;
player.jumping = true;
}
} else {
player.canJump = true;
}
}
} else {
if (Key.isDown(38) || (Key.isDown(87))) {
if (ground.ladder.hitTest(player._x, player._y - player.hHeight, true)) {
if (player.climbAnim._currentframe != player.climbAnim._totalframes) {
player.climbAnim.nextFrame();
} else {
player.climbAnim.gotoAndStop(1);
}
player.ySpeed = player.ySpeed - player.climbSpeed;
}
}
if (Key.isDown(40) || (Key.isDown(83))) {
if (!ground.ground.hitTest(player._x, (player._y + player.hHeight) + 3, true)) {
if (player.climbAnim._currentframe != 1) {
player.climbAnim.prevFrame();
} else {
player.climbAnim.gotoAndStop(player.climbAnim._totalframes);
}
player.ySpeed = player.ySpeed + player.climbSpeed;
}
}
}
}
function boundFloor() {
player.onGround = false;
while ((ground.ground.hitTest(player._x, player._y + player.hHeight, true) || (ground.ground.hitTest((player._x - player.hWidth) + player.errorMargin, player._y + player.hHeight, true))) || (ground.ground.hitTest((player._x + player.hWidth) - player.errorMargin, player._y + player.hHeight, true))) {
player._y = player._y - 0.5;
player.ySpeed = 0;
player.onGround = true;
player.jumping = false;
}
if (player.ySpeed > 2) {
while ((ground.cloud.hitTest(player._x, player._y + player.hHeight, true) || (ground.cloud.hitTest((player._x - player.hWidth) + player.errorMargin, player._y + player.hHeight, true))) || (ground.cloud.hitTest((player._x + player.hWidth) - player.errorMargin, player._y + player.hHeight, true))) {
player._y = player._y - 0.5;
player.ySpeed = 0;
player.onGround = true;
player.jumping = false;
}
}
}
function matchGrounds() {
blackArea._x = ground._x;
blackArea._y = ground._y;
frontGround._x = ground._x;
frontGround._y = ground._y;
}
function scrollBackground() {
if (backGround._x > 700) {
backGround._x = 0;
}
if (backGround._x < 0) {
backGround._x = 700;
}
if (backGround2._x > 0) {
backGround2._x = -2000;
}
if (backGround2._x < -2000) {
backGround2._x = 0;
}
}
function boundPlayer() {
while ((ground.ground.hitTest(player._x, player._y - player.hHeight, true) || (ground.ground.hitTest((player._x - player.hWidth) + player.errorMargin, player._y - player.hHeight, true))) || (ground.ground.hitTest((player._x + player.hWidth) - player.errorMargin, player._y - player.hHeight, true))) {
player._y = player._y + 2;
player.ySpeed = 0;
}
while ((((ground.ground.hitTest(player._x - player.hWidth, player._y, true) || (ground.ground.hitTest(player._x - player.hWidth, (player._y + player.hHeight) - player.errorMargin, true))) || (ground.ground.hitTest(player._x - player.hWidth, (player._y - player.hHeight) + player.errorMargin, true))) || (ground.ground.hitTest(player._x - player.hWidth, player._y - (player.hHeight * 0.5), true))) || (ground.ground.hitTest(player._x - player.hWidth, player._y + (player.hHeight * 0.5), true))) {
player._x = player._x + 2;
player.xSpeed = 0;
}
while ((((ground.ground.hitTest(player._x + player.hWidth, player._y, true) || (ground.ground.hitTest(player._x + player.hWidth, (player._y + player.hHeight) - player.errorMargin, true))) || (ground.ground.hitTest(player._x + player.hWidth, (player._y - player.hHeight) + player.errorMargin, true))) || (ground.ground.hitTest(player._x + player.hWidth, player._y - (player.hHeight * 0.5), true))) || (ground.ground.hitTest(player._x + player.hWidth, player._y + (player.hHeight * 0.5), true))) {
player._x = player._x - 2;
player.xSpeed = 0;
}
}
function limitSpeeds() {
if (Math.abs(player.xSpeed) < 0.2) {
player.xSpeed = 0;
}
if (Math.abs(player.ySpeed) < 0.2) {
player.ySpeed = 0;
}
if (Math.abs(scrollX) < 0.2) {
scrollX = 0;
}
}
function detectLadder() {
if (!player.canJetPack) {
if (ground.ladder.hitTest(player._x, player._y, true)) {
if (!player.onLadder) {
player.onLadder = true;
player.ySpeed = 0;
player.maxSpeed = 4;
}
} else {
player.onLadder = false;
player.maxSpeed = 8.2;
}
}
}
function resetGame() {
if (player.dead) {
player.xSpeed = player.xSpeed * 0.95;
player.ySpeed = player.ySpeed * 0.95;
player._alpha = player._alpha - 0.5;
player._rotation = player._rotation + 1.5;
deathscreen._x = player._x;
deathscreen._y = player._y;
if ((player.deathTimer++) > 30) {
ground._x = checkPoint.groundX;
ground._y = checkPoint.groundY;
player._x = checkPoint.playerX;
player._y = checkPoint.playerY;
player._xscale = checkPoint.xScale;
player.xSpeed = 0;
player.ySpeed = 0;
player.regen = true;
player.deathTimer = 0;
player.dead = false;
player.regen = true;
player._rotation = 0;
player._alpha = 100;
player.gotoAndStop(7);
deathscreen.gotoAndStop(26);
}
}
if (player.regen) {
player.regenTimer++;
if (player.regenTimer > 40) {
player.regen = false;
player.regenTimer = 0;
}
}
}
function manageMessageBar() {
messageBar._y = messageBar._y + ((messageBarY - messageBar._y) / 3);
if (messageBarTimer > messageBarLimit) {
messageBarY = 525;
} else {
messageBarY = 480;
messageBarTimer++;
}
if (Math.abs(messageBar._y - 525) < 2) {
messageBar._visible = false;
} else {
messageBar._visible = true;
}
}
function makeMessage(messageText, duration) {
if ((messageBarTimer > messageBarLimit) || (messageText != messageBar.messageTextBox)) {
messageBarTimer = 0;
messageBarLimit = duration;
messageBar.messageTextBox = messageText;
}
}
function manageGearsDisplay() {
gearsCollectedDisplay._x = gearsCollectedDisplay._x + ((gearsCollectedX - gearsCollectedDisplay._x) / 5);
gearsCollectedDisplay.gearsCollectedText = gearsCollected;
if (gearsCollectedTimer < 180) {
gearsCollectedTimer++;
gearsCollectedX = 660;
} else {
gearsCollectedX = 730;
}
bonusGearsDisplay._x = bonusGearsDisplay._x + ((bonusGearsX - bonusGearsDisplay._x) / 5);
if (bonusGearsTimer < 180) {
bonusGearsTimer++;
bonusGearsX = 63;
} else {
bonusGearsX = -110;
}
if (Key.isDown(16)) {
bonusGearsTimer = 0;
gearsCollectedTimer = 0;
}
begamerlogo._y = -26 + ((bonusGearsDisplay._x - 63) / -3.33);
hintButton._y = 30 - ((730 - gearsCollectedDisplay._x) / 0.86);
if ((_xmouse > 660) && (_ymouse > 460)) {
muteScale = 100;
} else {
muteScale = 50;
}
muteSymbol._xscale = muteSymbol._xscale + ((muteScale - muteSymbol._xscale) / 3);
muteSymbol._yscale = muteSymbol._xscale;
}
function killPlayer() {
if (!gamePaused) {
if (!player.dead) {
if (deathscreen == null) {
attachMovie("deathscreen", "deathscreen", _root.getNextHighestDepth());
}
deathscreen._x = player._x;
deathscreen._y = player._y;
deathscreen.gotoAndPlay(1);
player.dead = true;
player.xSpeed = player.xSpeed * 1.3;
player.ySpeed = player.ySpeed - 2;
if (player.ySpeed < 0) {
}
player.deathTimer = 0;
player.gotoAndStop(3);
}
}
}
function makeSteam(x, y, xSpeed, ySpeed) {
d = _root.getNextHighestDepth();
s = attachMovie("steamPart", "steamPart" + d, d);
s._x = x;
s._y = y;
s.xSpeed = xSpeed;
s.ySpeed = ySpeed;
steam.push(s);
}
function makeSteamGrey(x, y, xSpeed, ySpeed) {
d = _root.getNextHighestDepth();
s = attachMovie("steamPartGrey", "steamPartGrey" + d, d);
s._x = x;
s._y = y;
s.xSpeed = xSpeed;
s.ySpeed = ySpeed;
steam.push(s);
}
function isOnScreen(object) {
tempValue = false;
tempX = object._parent._x + object._x;
tempY = object._parent._y + object._y;
if ((((tempX > 0) && (tempX < 700)) && (tempY > 0)) && (tempY < 500)) {
tempValue = true;
}
return(tempValue);
}
function isOnScreenDeep(object) {
tempValue = false;
tempX = (object._parent._parent._x + object._parent._x) + object._x;
tempY = (object._parent._parent._y + object._parent._y) + object._y;
if ((((tempX > 0) && (tempX < 700)) && (tempY > 0)) && (tempY < 500)) {
tempValue = true;
}
return(tempValue);
}
stop();
gearSpin = 0;
showContinue = false;
continue_btn._alpha = 0;
totalBytes = _root.getBytesTotal();
loadedBytes = _root.getBytesLoaded();
gameLoaded = false;
delayTimer = 0;
exitTimer = 0;
bulbDown = false;
gear._alpha = 0;
restartFrame = 0;
muted = false;
beGamerContinue._alpha = 0;
onEnterFrame = function () {
if (bulbDown) {
if (gearSpin < 10) {
gearSpin = gearSpin + 0.08;
if (gearSpin > 3) {
bulb.gotoAndStop(2);
}
if (gearSpin > 1) {
if (bulb.filament._currentframe == 1) {
bulb.filament.gotoAndPlay(2);
}
}
} else {
bulb.gotoAndStop(3);
if (bulb.bulbFlash._currentframe == 24) {
if ((exitTimer++) > 10) {
gotoAndStop (15);
}
}
}
} else if (Math.abs(bulb._y - 160) < 10) {
if (bulb.ding._currentframe == 1) {
bulb.ding.gotoAndPlay(2);
}
if (bulb.ding._currentframe == 17) {
if ((delayTimer++) > 15) {
bulbDown = true;
}
}
}
if (gameLoaded) {
bulb._y = bulb._y + ((160 - bulb._y) / 5);
if (bulb._y > 40) {
if (beGamerLogoMask._currentframe == 1) {
beGamerLogoMask.gotoAndPlay(2);
}
}
}
gear._rotation = gear._rotation + gearSpin;
loadedBytes = _root.getBytesLoaded();
if (loadedBytes == totalBytes) {
if (!showContinue) {
showContinue = true;
continue_btn._y = 406;
}
}
if (showContinue) {
if (gameLoaded) {
if (continue_btn._alpha > 0) {
continue_btn._alpha = continue_btn._alpha - 4;
}
if (continue_btn._alpha < 5) {
if (beGamerContinue._alpha < 100) {
beGamerContinue._alpha = beGamerContinue._alpha + 4;
beGamerContinue._y = 406;
}
}
} else if (loadingText._alpha > 1) {
loadingText._alpha = loadingText._alpha - 4;
} else if (continue_btn._alpha < 100) {
continue_btn._alpha = continue_btn._alpha + 4;
}
}
gear._alpha = Math.round(100 * (loadedBytes / totalBytes));
loadPercent = Math.round(100 * (loadedBytes / totalBytes)) + "%";
};
continue_btn.onRelease = function () {
if (continue_btn._alpha >= 100) {
if (showContinue) {
gameLoaded = true;
this.enabled = false;
}
}
};
Frame 2
function getArrayAmount(bonusArray) {
tempCount = 0;
i = 0;
while (i < bonusArray.length) {
if (bonusArray[i] == 1) {
tempCount++;
}
i++;
}
return(tempCount);
}
saveData = SharedObject.getLocal("strangeLab_saveGame");
if (saveData.data.madeData == undefined) {
saveData.data.madeData = true;
saveData.data.upToLevel = 1;
saveData.data.level1Time = 0;
saveData.data.level1Bonus = new Array(0, 0);
saveData.data.level2Time = 0;
saveData.data.level2Bonus = new Array(0, 0);
saveData.data.level3Time = 0;
saveData.data.level3Bonus = new Array(0, 0);
saveData.data.level4Time = 0;
saveData.data.level4Bonus = new Array(0, 0);
saveData.data.level5Time = 0;
}
lightning._alpha = 0;
lightningTimer = 100;
goToFrame = 0;
if (menuMusicMade == undefined) {
soundsMovieClip = _root.createEmptyMovieClip("soundsMovieClip", _root.getNextHighestDepth());
fireSound = _root.createEmptyMovieClip("fireSound", _root.getNextHighestDepth());
gameMusic = _root.createEmptyMovieClip("gameMusic", _root.getNextHighestDepth());
jetpackSteamEffect = _root.createEmptyMovieClip("jetpackSteamEffect", _root.getNextHighestDepth());
menuMusic = new Object();
menuMusic.music = new Sound(gameMusic);
menuMusic.music.attachSound("menuMusic");
menuMusicMade = true;
menuMusicPlaying = false;
levelMusic = new Object();
levelMusic.level1 = new Sound(gameMusic);
levelMusic.level1.attachSound("level1Music");
levelMusic.level2 = new Sound(gameMusic);
levelMusic.level2.attachSound("level2Music");
levelMusic.level3 = new Sound(gameMusic);
levelMusic.level3.attachSound("level3Music");
levelMusic.level4 = new Sound(gameMusic);
levelMusic.level4.attachSound("level4Music");
levelMusic.level5 = new Sound(gameMusic);
levelMusic.level5.attachSound("level5Music");
fireCrackle = new Sound(fireSound);
fireCrackle.attachSound("fireCrackle");
rainLoop = new Sound(soundsMovieClip);
rainLoop.attachSound("rainLoop");
bonusGearSound = new Sound(soundsMovieClip);
bonusGearSound.attachSound("bonusGearSound");
bouncepadSound = new Sound(soundsMovieClip);
bouncepadSound.attachSound("bouncepadSound");
cannonSound = new Sound(soundsMovieClip);
cannonSound.attachSound("cannonSound");
explosionSound = new Sound(soundsMovieClip);
explosionSound.attachSound("explosionSound");
gearSound = new Sound(soundsMovieClip);
gearSound.attachSound("gearSound");
leverSound = new Sound(soundsMovieClip);
leverSound.attachSound("leverSound");
steamSound = new Sound(soundsMovieClip);
steamSound.attachSound("steamSound");
thunderClap = new Sound(soundsMovieClip);
thunderClap.attachSound("thunderClap");
thunderClap2 = new Sound(soundsMovieClip);
thunderClap2.attachSound("thunderClap2");
checkpointSound = new Sound(soundsMovieClip);
checkpointSound.attachSound("checkpointSound");
level1Clip = new Sound(soundsMovieClip);
level1Clip.attachSound("level1Clip");
level1Gen = new Sound(soundsMovieClip);
level1Gen.attachSound("level1Gen");
wheelSqueak = new Sound(soundsMovieClip);
wheelSqueak.attachSound("wheelSqueak");
woosh = new Sound(soundsMovieClip);
woosh.attachSound("woosh");
pageTurn1 = new Sound(soundsMovieClip);
pageTurn1.attachSound("pageTurn1");
pageTurn2 = new Sound(soundsMovieClip);
pageTurn2.attachSound("pageTurn2");
generatorSound = new Sound(soundsMovieClip);
generatorSound.attachSound("generatorSound");
doorsClose = new Sound(soundsMovieClip);
doorsClose.attachSound("doorsClose");
squeak1 = new Sound(soundsMovieClip);
squeak1.attachSound("squeak1");
squeak2 = new Sound(soundsMovieClip);
squeak2.attachSound("squeak2");
ladderRise = new Sound(soundsMovieClip);
ladderRise.attachSound("ladderRise");
metalSwitch = new Sound(soundsMovieClip);
metalSwitch.attachSound("metalSwitch");
steam3 = new Sound(soundsMovieClip);
steam3.attachSound("steam3");
steam2 = new Sound(soundsMovieClip);
steam2.attachSound("steam2");
elevatorDoor = new Sound(soundsMovieClip);
elevatorDoor.attachSound("elevatorDoor");
elevatorRumble = new Sound(soundsMovieClip);
elevatorRumble.attachSound("elevatorRumble");
singleSpark = new Sound(soundsMovieClip);
singleSpark.attachSound("singleSpark");
sparkOn = new Sound(soundsMovieClip);
sparkOn.attachSound("sparkOn");
machineLoop = new Sound(soundsMovieClip);
machineLoop.attachSound("machineLoop");
spark1 = new Sound(soundsMovieClip);
spark1.attachSound("spark1");
spark2 = new Sound(soundsMovieClip);
spark2.attachSound("spark2");
spark3 = new Sound(soundsMovieClip);
spark3.attachSound("spark3");
spark4 = new Sound(soundsMovieClip);
spark4.attachSound("spark4");
spark5 = new Sound(soundsMovieClip);
spark5.attachSound("spark5");
machine2 = new Sound(soundsMovieClip);
machine2.attachSound("machine2");
steamFade = new Sound(soundsMovieClip);
steamFade.attachSound("steamFade");
clickSound = new Sound(soundsMovieClip);
clickSound.attachSound("clickSound");
clickSound2 = new Sound(soundsMovieClip);
clickSound2.attachSound("click2");
tickLong = new Sound(soundsMovieClip);
tickLong.attachSound("tickLong");
tickShort = new Sound(soundsMovieClip);
tickShort.attachSound("tickShort");
jetpackSteam = new Sound(fireSound);
jetpackSteam.attachSound("jetpackSteam");
crank = new Sound(soundsMovieClip);
crank.attachSound("crank");
unsheath = new Sound(soundsMovieClip);
unsheath.attachSound("unsheath");
creak = new Sound(soundsMovieClip);
creak.attachSound("creak");
doorsCloseShort = new Sound(soundsMovieClip);
doorsCloseShort.attachSound("doorsCloseShort");
welding = new Sound(fireSound);
welding.attachSound("welding");
airBlast = new Sound(soundsMovieClip);
airBlast.attachSound("airBlast");
platformDrop = new Sound(soundsMovieClip);
platformDrop.attachSound("platformDrop");
platformRaise = new Sound(soundsMovieClip);
platformRaise.attachSound("platformRaise");
}
if (!menuMusicPlaying) {
menuMusic.music.start(0, 999);
rainLoop.start(0, 999);
menuMusicPlaying = true;
}
onEnterFrame = function () {
if (whiteScreen._alpha > 0) {
whiteScreen._alpha = whiteScreen._alpha - 10;
}
if (lightning._alpha <= 0) {
if ((lightningTimer++) > 100) {
if (random(100) == 0) {
lightning._alpha = 100;
lightning.frames.gotoAndStop(random(7) + 1);
lightning.gotoAndPlay(1);
lightning.frames.gotoAndStop(random(7) + 1);
lightningTimer = 0;
thunderClap2.start(0, 1);
}
} else {
lightningTimer++;
}
} else {
lightning._alpha = lightning._alpha - 15;
}
};
play_btn.onRelease = function () {
gotoAndStop (3);
whiteScreen._alpha = 100;
thunderClap.start(0, 1);
};
credits_btn.onRelease = function () {
gotoAndStop (4);
whiteScreen._alpha = 100;
rainLoop.stop();
thunderClap.start(0, 1);
};
options_btn.onRelease = function () {
gotoAndStop (5);
whiteScreen._alpha = 100;
rainLoop.stop();
thunderClap.start(0, 1);
};
extras_btn.onRelease = function () {
gotoAndStop (6);
whiteScreen._alpha = 100;
rainLoop.stop();
thunderClap.start(0, 1);
};
moreGames_btn.onRelease = function () {
_root.getURL("http://www.begamer.com/index/index/strange-laboratory", "_blank");
};
Frame 3
clearInterval(intervalTimer);
descTimer = 0;
levelDescription = "";
if (saveData.data.upToLevel > 1) {
pointer._visible = false;
}
level1.onRollOver = function () {
levelDescription = (((((("Level 1\rBest Time - " + secondsToMinutes(saveData.data.level1Time)) + " seconds") + newline) + "Bonus Gears - ") + getArrayAmount(saveData.data.level1Bonus)) + "/") + saveData.data.level1Bonus.length;
};
level1.onRollOut = function () {
levelDescription = "";
};
level1.onRelease = function () {
gotoAndStop (7);
menuMusic.music.stop();
menuMusicPlaying = false;
rainLoop.stop();
};
level2.onRelease = function () {
if (saveData.data.upToLevel >= 2) {
gotoAndStop (8);
menuMusic.music.stop();
menuMusicPlaying = false;
rainLoop.stop();
}
};
level2.onRollOver = function () {
if (saveData.data.upToLevel > 1) {
levelDescription = (((((("Level 2\rBest Time - " + secondsToMinutes(saveData.data.level2Time)) + " seconds") + newline) + "Bonus Gears - ") + getArrayAmount(saveData.data.level2Bonus)) + "/") + saveData.data.level2Bonus.length;
} else {
levelDescription = "Locked";
}
};
level2.onRollOut = function () {
levelDescription = "";
};
level3.onRelease = function () {
if (saveData.data.upToLevel >= 3) {
gotoAndStop (9);
menuMusic.music.stop();
menuMusicPlaying = false;
rainLoop.stop();
}
};
level3.onRollOver = function () {
if (saveData.data.upToLevel > 2) {
levelDescription = (((((("Level 3\rBest Time - " + secondsToMinutes(saveData.data.level3Time)) + " seconds") + newline) + "Bonus Gears - ") + getArrayAmount(saveData.data.level3Bonus)) + "/") + saveData.data.level3Bonus.length;
} else {
levelDescription = "Locked";
}
};
level3.onRollOut = function () {
levelDescription = "";
};
level4.onRelease = function () {
if (saveData.data.upToLevel >= 4) {
gotoAndStop (10);
menuMusic.music.stop();
menuMusicPlaying = false;
rainLoop.stop();
}
};
level4.onRollOver = function () {
if (saveData.data.upToLevel > 3) {
levelDescription = (((((("Level 4\rBest Time - " + secondsToMinutes(saveData.data.level4Time)) + " seconds") + newline) + "Bonus Gears - ") + getArrayAmount(saveData.data.level4Bonus)) + "/") + saveData.data.level4Bonus.length;
} else {
levelDescription = "Locked";
}
};
level4.onRollOut = function () {
levelDescription = "";
};
level5.onRollOver = function () {
if (saveData.data.upToLevel > 4) {
levelDescription = ("Level 5\rBest Time - " + secondsToMinutes(saveData.data.level5Time)) + " seconds";
} else {
levelDescription = "Locked";
}
};
level5.onRollOut = function () {
levelDescription = "";
};
level5.onRelease = function () {
if (saveData.data.upToLevel >= 5) {
gotoAndStop (11);
menuMusic.music.stop();
rainLoop.stop();
menuMusicPlaying = false;
}
};
onEnterFrame = function () {
if (whiteScreen._alpha > 0) {
whiteScreen._alpha = whiteScreen._alpha - 10;
}
i = 1;
while (i <= 5) {
l = _root["level" + i];
if (l.hitTest(_xmouse, _ymouse, true)) {
trace("hit");
levelDescription = (((("Level " + i) + newline) + "Best Time - ") + newline) + "Bonus Gears - ";
descTimer = 0;
}
i++;
}
if (descTimer > 30) {
levelDescription = "";
}
};
back_btn.onRelease = function () {
whiteScreen._alpha = 100;
thunderClap.start(0, 1);
gotoAndStop (2);
};
Frame 4
onEnterFrame = function () {
if (whiteScreen._alpha > 0) {
whiteScreen._alpha = whiteScreen._alpha - 10;
}
};
back_btn.onRelease = function () {
whiteScreen._alpha = 100;
thunderClap.start(0, 1);
rainLoop.start(0, 999);
gotoAndStop (2);
};
musicCredits.onRelease = function () {
gotoAndStop (13);
};
paulHoggCredit.onRelease = function () {
_root.getURL("http://www.misterphogg.com", "_blank");
};
Frame 5
if (_root._quality == "LOW") {
qualityText.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
qualityText.gotoAndStop(2);
} else if (_root._quality == "HIGH") {
qualityText.gotoAndStop(3);
}
if (muted) {
soundText.gotoAndStop(2);
} else {
soundText.gotoAndStop(1);
}
back_btn.onRelease = function () {
gotoAndStop (2);
whiteScreen._alpha = 100;
thunderClap.start(0, 1);
rainLoop.start(0, 999);
};
deleteProgress_btn.onRelease = function () {
deleteProgress_btn._x = -150;
sure_mc._x = 272;
};
sure_mc.no_btn.onRelease = function () {
sure_mc._x = 900;
deleteProgress_btn._x = 360;
};
sure_mc.yes_btn.onRelease = function () {
saveData.data.upToLevel = 1;
saveData.data.level1Time = 0;
saveData.data.level1Bonus = new Array(0, 0);
saveData.data.level2Time = 0;
saveData.data.level2Bonus = new Array(0, 0);
saveData.data.level3Time = 0;
saveData.data.level3Bonus = new Array(0, 0);
saveData.data.level4Time = 0;
saveData.data.level4Bonus = new Array(0, 0);
saveData.data.level5Time = 0;
sure_mc._x = 900;
deleteProgress_btn._x = 360;
};
qualityButton_btn.onRelease = function () {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
qualityText.gotoAndStop(2);
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
qualityText.gotoAndStop(3);
} else if (_root._quality == "HIGH") {
_root._quality = "LOW";
qualityText.gotoAndStop(1);
}
};
soundButton_btn.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
}
if (muted) {
soundText.gotoAndStop(2);
} else {
soundText.gotoAndStop(1);
}
};
onEnterFrame = function () {
if (whiteScreen._alpha > 0) {
whiteScreen._alpha = whiteScreen._alpha - 10;
}
};
Frame 6
bonusGearCount = ((getArrayAmount(saveData.data.level1Bonus) + getArrayAmount(saveData.data.level2Bonus)) + getArrayAmount(saveData.data.level3Bonus)) + getArrayAmount(saveData.data.level4Bonus);
frameLimit = Math.floor(bonusGearCount / 2) + 1;
collectedDisplay = ("Collected Bonus Gears: " + bonusGearCount) + " / 8";
prevArrow.onRelease = function () {
letters.prevFrame();
if (letters._currentframe > 1) {
pageTurn2.start(0, 1);
}
};
nextArrow.onRelease = function () {
if (letters._currentframe < frameLimit) {
letters.nextFrame();
pageTurn1.start(0, 1);
}
};
back_btn.onRelease = function () {
gotoAndStop (2);
whiteScreen._alpha = 100;
thunderClap.start(0, 1);
rainLoop.start(0, 999);
};
onEnterFrame = function () {
if (whiteScreen._alpha > 0) {
whiteScreen._alpha = whiteScreen._alpha - 10;
}
};
Frame 7
player._xscale = -100;
initCheckpoint();
initPlayer();
initGame();
makeMessage("Use the arrow keys or WASD to move", 60);
levelMusic.level1.start(0, 999);
tempBonusArray = new Array(0, 0);
leftKeyAlpha = (rightKeyAlpha = (upKeyAlpha = (downKeyAlpha = (orTextAlpha = 100))));
arrowKeysTimer = 0;
spaceKey._alpha = 0;
spaceKeyAlpha = 0;
shiftKey._alpha = 0;
shiftKeyAlpha = 0;
onEnterFrame = function () {
if (!gamePaused) {
if (!player.dead) {
if (Key.isDown(80) || (Key.isDown(27))) {
gamePaused = true;
attachMovie("pauseMenu", "pauseMenu", _root.getNextHighestDepth());
pauseMenu._x = 350;
pauseMenu._y = 250;
pauseMenu.resumeButton.onRelease = function () {
removeMovieClip(pauseMenu);
gamePaused = false;
};
pauseMenu.restartButton.onRelease = function () {
removeMovieClip(pauseMenu);
levelMusic.level1.stop();
gamePaused = false;
restartFrame = 7;
gotoAndStop (12);
};
pauseMenu.menuButton.onRelease = function () {
removeMovieClip(pauseMenu);
gamePaused = false;
levelMusic.level1.stop();
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
rainLoop.start(0, 999);
gotoAndStop (2);
};
if (_root._quality == "LOW") {
pauseMenu.qualityText.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "HIGH") {
pauseMenu.qualityText.gotoAndStop(3);
}
pauseMenu.qualityButton.onRelease = function () {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
pauseMenu.qualityText.gotoAndStop(3);
} else if (_root._quality == "HIGH") {
_root._quality = "LOW";
pauseMenu.qualityText.gotoAndStop(1);
}
};
pauseMenu.beGamerPauseLogo.onRelease = function () {
getURL ("http://www.begamer.com/index/index/strange-laboratory", "_blank");
};
pauseMenu.getAHintButton.onRelease = function () {
getURL ("http://begamer.com/walkthrough/strange-laboratory", "_blank");
};
if (muted) {
pauseMenu.soundText.gotoAndStop(2);
} else {
pauseMenu.soundText.gotoAndStop(1);
}
pauseMenu.soundButton.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
}
}
if (Key.isDown(32) && ((((((((_root.ground.circle1Hit.hitTest(player._x, player._y, true) || (_root.ground.circle2Hit.hitTest(player._x, player._y, true))) || (_root.ground.circle3Hit.hitTest(player._x, player._y, true))) || (_root.ground.circle4Hit.hitTest(player._x, player._y, true))) || (_root.ground.circle5Hit.hitTest(player._x, player._y, true))) || (_root.ground.circle6Hit.hitTest(player._x, player._y, true))) || (_root.ground.valve1.hitTest(player._x, player._y, true))) || (_root.ground.valve2.hitTest(player._x, player._y, true))) || (_root.ground.valve3.hitTest(player._x, player._y, true)))) {
player.maxSpeed = 0;
player.canJump = false;
player._xscale = -100 * (tempDir / Math.abs(tempDir));
} else {
player.maxSpeed = 8.2;
tempDir = player.xSpeed;
}
player._x = player._x + player.xSpeed;
player._y = player._y + player.ySpeed;
player._x = player._x + scrollX;
ground._x = ground._x + scrollX;
backGround._x = backGround._x + (scrollX * 0.6);
backGround2._x = backGround2._x + (scrollX * 0.8);
scrollX = scrollX * scrollFriction;
limitSpeeds();
if ((!player.regen) && (!player.dead)) {
moveHorizontal();
if (Key.isDown(32) && ((((((((_root.ground.circle1Hit.hitTest(player._x, player._y, true) || (_root.ground.circle2Hit.hitTest(player._x, player._y, true))) || (_root.ground.circle3Hit.hitTest(player._x, player._y, true))) || (_root.ground.circle4Hit.hitTest(player._x, player._y, true))) || (_root.ground.circle5Hit.hitTest(player._x, player._y, true))) || (_root.ground.circle6Hit.hitTest(player._x, player._y, true))) || (_root.ground.valve1.hitTest(player._x, player._y, true))) || (_root.ground.valve2.hitTest(player._x, player._y, true))) || (_root.ground.valve3.hitTest(player._x, player._y, true)))) {
player._xscale = -100 * (tempDir / Math.abs(tempDir));
}
chooseFrame();
}
if (!player.onLadder) {
if (!player.dead) {
player.ySpeed = player.ySpeed + gravity;
}
} else {
player.ySpeed = player.ySpeed * friction;
}
if (!player.dead) {
boundFloor();
}
if (!player.regen) {
moveVertical();
}
if (!player.dead) {
boundPlayer();
}
scrollStage();
matchGrounds();
detectLadder();
if (blackArea._currentframe == 1) {
if (blackArea.hitTest(player._x, player._y, true)) {
blackArea.gotoAndStop(2);
}
} else if (blackArea.hitTest(player._x, player._y, true)) {
blackArea.gotoAndStop(1);
}
scrollBackground();
resetGame();
if (player.getBounds(_root).yMin > ground.getBounds(_root).yMax) {
player.dead = true;
if (ground._y < -1200) {
player.ySpeed = 0;
}
}
if (ground.finishBlock.hitTest(player._x, player._y, true)) {
levelMusic.level1.stop();
if (!menuMusicPlaying) {
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
}
if ((saveData.data.level1Time > gameTimer) || (saveData.data.level1Time == 0)) {
saveData.data.level1Time = gameTimer;
}
if (saveData.data.level1Bonus[0] == 0) {
saveData.data.level1Bonus[0] = tempBonusArray[0];
}
if (saveData.data.level1Bonus[1] == 0) {
saveData.data.level1Bonus[1] = tempBonusArray[1];
}
if (saveData.data.upToLevel == 1) {
saveData.data.upToLevel = 2;
}
clearInterval(intervalTimer);
gotoAndStop (3);
}
manageMessageBar();
manageGearsDisplay();
subTimer++;
if (subTimer > 30) {
subTimer = 0;
timer++;
}
if (arrowKeysTimer < 450) {
arrowKeysClip.aKey._alpha = arrowKeysClip.aKey._alpha + ((leftKeyAlpha - arrowKeysClip.aKey._alpha) / 5);
arrowKeysClip.sKey._alpha = arrowKeysClip.sKey._alpha + ((downKeyAlpha - arrowKeysClip.sKey._alpha) / 5);
arrowKeysClip.dKey._alpha = arrowKeysClip.dKey._alpha + ((rightKeyAlpha - arrowKeysClip.dKey._alpha) / 5);
arrowKeysClip.wKey._alpha = arrowKeysClip.wKey._alpha + ((upKeyAlpha - arrowKeysClip.wKey._alpha) / 5);
arrowKeysClip.leftKey._alpha = arrowKeysClip.leftKey._alpha + ((leftKeyAlpha - arrowKeysClip.leftKey._alpha) / 5);
arrowKeysClip.downKey._alpha = arrowKeysClip.downKey._alpha + ((downKeyAlpha - arrowKeysClip.downKey._alpha) / 5);
arrowKeysClip.rightKey._alpha = arrowKeysClip.rightKey._alpha + ((rightKeyAlpha - arrowKeysClip.rightKey._alpha) / 5);
arrowKeysClip.upKey._alpha = arrowKeysClip.upKey._alpha + ((upKeyAlpha - arrowKeysClip.upKey._alpha) / 5);
arrowKeysClip.orText._alpha = arrowKeysClip.orText._alpha + ((orTextAlpha - arrowKeysClip.orText._alpha) / 5);
if ((((leftKeyAlpha == 0) && (rightKeyAlpha == 0)) && (upKeyAlpha == 0)) && (downKeyAlpha == 0)) {
orTextAlpha = 0;
}
arrowKeysTimer++;
}
if (arrowKeysTimer < 300) {
if (Key.isDown(37) || (Key.isDown(65))) {
leftKeyAlpha = 0;
}
if (Key.isDown(39) || (Key.isDown(68))) {
rightKeyAlpha = 0;
}
if (Key.isDown(38) || (Key.isDown(87))) {
upKeyAlpha = 0;
}
if (Key.isDown(40) || (Key.isDown(83))) {
downKeyAlpha = 0;
}
arrowKeysClip._x = arrowKeysClip._x + ((player._x - arrowKeysClip._x) / 5);
arrowKeysClip._y = arrowKeysClip._y + ((player._y - arrowKeysClip._y) / 5);
} else {
leftKeyAlpha = (rightKeyAlpha = (upKeyAlpha = (downKeyAlpha = (orTextAlpha = 0))));
}
spaceKey._alpha = spaceKey._alpha + ((spaceKeyAlpha - spaceKey._alpha) / 5);
spaceKey._x = spaceKey._x + ((player._x - spaceKey._x) / 5);
spaceKey._y = spaceKey._y + ((player._y - spaceKey._y) / 5);
shiftKey._alpha = shiftKey._alpha + ((shiftKeyAlpha - shiftKey._alpha) / 5);
shiftKey._x = shiftKey._x + ((player._x - shiftKey._x) / 5);
shiftKey._y = shiftKey._y + ((player._y - shiftKey._y) / 5);
if (shiftKeyAlpha == 100) {
if (Key.isDown(16)) {
shiftKeyAlpha = 0;
}
}
noSound._xscale = (noSound._yscale = muteSymbol._xscale);
if (!muted) {
noSound._visible = false;
} else {
noSound._visible = true;
}
}
};
muteSymbol.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
Frame 8
player._xscale = -100;
initCheckpoint();
initPlayer();
initGame();
levelMusic.level2.start(0, 999);
fireCrackle.start(0, 999);
fireCrackle.setVolume(0);
tempBonusArray = new Array(0, 0, 0);
selectedPainting = 0;
movePaintings = true;
oldPainting = 0;
tempPainting = 0;
paintingExplain = false;
player._xscale = -100;
pistonSpeed = 1.5;
tVolume = 0;
onEnterFrame = function () {
if (!gamePaused) {
if (!player.dead) {
if (Key.isDown(80) || (Key.isDown(27))) {
gamePaused = true;
attachMovie("pauseMenu", "pauseMenu", _root.getNextHighestDepth());
pauseMenu._x = 350;
pauseMenu._y = 250;
pauseMenu.resumeButton.onRelease = function () {
removeMovieClip(pauseMenu);
gamePaused = false;
};
pauseMenu.restartButton.onRelease = function () {
removeMovieClip(pauseMenu);
levelMusic.level2.stop();
fireCrackle.stop();
gamePaused = false;
restartFrame = 8;
gotoAndStop (12);
};
pauseMenu.menuButton.onRelease = function () {
removeMovieClip(pauseMenu);
gamePaused = false;
levelMusic.level2.stop();
fireCrackle.stop();
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
rainLoop.start(0, 999);
gotoAndStop (2);
};
if (_root._quality == "LOW") {
pauseMenu.qualityText.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "HIGH") {
pauseMenu.qualityText.gotoAndStop(3);
}
pauseMenu.qualityButton.onRelease = function () {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
pauseMenu.qualityText.gotoAndStop(3);
} else if (_root._quality == "HIGH") {
_root._quality = "LOW";
pauseMenu.qualityText.gotoAndStop(1);
}
};
pauseMenu.beGamerPauseLogo.onRelease = function () {
getURL ("http://www.begamer.com/index/index/strange-laboratory", "_blank");
};
pauseMenu.getAHintButton.onRelease = function () {
getURL ("http://begamer.com/walkthrough/strange-laboratory", "_blank");
};
if (muted) {
pauseMenu.soundText.gotoAndStop(2);
} else {
pauseMenu.soundText.gotoAndStop(1);
}
pauseMenu.soundButton.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
}
}
player._x = player._x + player.xSpeed;
player._y = player._y + player.ySpeed;
player._x = player._x + scrollX;
ground._x = ground._x + scrollX;
backGround._x = backGround._x + (scrollX * 0.2);
backGround2._x = backGround2._x + (scrollX * 0.4);
scrollX = scrollX * scrollFriction;
limitSpeeds();
if ((!player.regen) && (!player.dead)) {
moveHorizontal();
chooseFrame();
}
if (!player.onLadder) {
if (!player.dead) {
player.ySpeed = player.ySpeed + gravity;
}
} else {
player.ySpeed = player.ySpeed * friction;
}
if (!player.dead) {
boundFloor();
}
if (!player.regen) {
moveVertical();
}
if (!player.dead) {
boundPlayer();
}
if (player._x > (700 - (player.scrollWidth * 1.6))) {
scrollX = (-(player._x - (700 - (player.scrollWidth * 1.6)))) / (scrollEase * 2);
}
if (player._x < ((player.scrollWidth * 1.6) - 1)) {
scrollX = (-(player._x - (player.scrollWidth * 1.6))) / (scrollEase * 2);
}
if ((!ground.ground.endPlatform.active) && (ground.ground.endPlatform._y > -150)) {
if (player._y < player.scrollWidth) {
ground._y = ground._y - ((player._y - player.scrollWidth) / scrollEase);
player._y = player._y - ((player._y - player.scrollWidth) / scrollEase);
}
} else if (player._y < -50) {
machineLoop.stop();
levelMusic.level2.stop();
if (!menuMusicPlaying) {
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
}
if ((saveData.data.level2Time > gameTimer) || (saveData.data.level2Time == 0)) {
saveData.data.level2Time = gameTimer;
}
if (saveData.data.level2Bonus[0] == 0) {
saveData.data.level2Bonus[0] = tempBonusArray[0];
}
if (saveData.data.level2Bonus[1] == 0) {
saveData.data.level2Bonus[1] = tempBonusArray[1];
}
if (saveData.data.upToLevel == 2) {
saveData.data.upToLevel = 3;
}
clearInterval(intervalTimer);
gotoAndStop (3);
}
if (player._y > (500 - player.scrollWidth)) {
ground._y = ground._y - ((player._y - (500 - player.scrollWidth)) / scrollEase);
player._y = player._y - ((player._y - (500 - player.scrollWidth)) / scrollEase);
}
matchGrounds();
if (!muted) {
if (movePaintings) {
tVolume = Math.round(100 - ((((1906 + ground._x) - player._x) / 1500) * 100));
if (tVolume > 0) {
fireCrackle.setVolume(tVolume + 10);
} else {
tVolume = 0;
}
} else {
fireCrackle.stop();
}
}
detectLadder();
if (blackArea._currentframe == 1) {
if (blackArea.hitTest(player._x, player._y, true)) {
blackArea.gotoAndStop(2);
}
} else if (blackArea.hitTest(player._x, player._y, true)) {
blackArea.gotoAndStop(1);
}
scrollBackground();
resetGame();
if (player.getBounds(_root).yMin > ground.getBounds(_root).yMax) {
player.dead = true;
}
manageMessageBar();
manageGearsDisplay();
subTimer++;
if (subTimer > 30) {
subTimer = 0;
timer++;
}
noSound._xscale = (noSound._yscale = muteSymbol._xscale);
if (!muted) {
noSound._visible = false;
} else {
noSound._visible = true;
}
}
};
muteSymbol.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
Frame 9
player._xscale = -100;
initCheckpoint();
initPlayer();
initGame();
levelMusic.level3.start(0, 999);
tempBonusArray = new Array(0, 0);
player._xscale = -100;
player.jetPacking = false;
player.canJetPack = false;
player.endRot = 0;
steam = new Array();
steamOn = true;
scrollOn = true;
steamOnTimer = 0;
steamSound = false;
onEnterFrame = function () {
if (!gamePaused) {
if (!Key.isDown(32)) {
if (steamSound) {
steamSound = false;
_root.jetpackSteam.stop();
}
}
player._x = player._x + player.xSpeed;
player._y = player._y + player.ySpeed;
player._x = player._x + scrollX;
ground._x = ground._x + scrollX;
backGround._x = backGround._x + (scrollX * 0.6);
backGround2._x = backGround2._x + (scrollX * 0.8);
scrollX = scrollX * scrollFriction;
limitSpeeds();
for (i in steam) {
s = steam[i];
s._x = s._x + (scrollX + s.xSpeed);
s._y = s._y + s.ySpeed;
s.xSpeed = s.xSpeed * 0.96;
s.ySpeed = s.ySpeed * 0.96;
s._alpha = s._alpha - 4;
s._xscale = s._xscale + 3;
s._yscale = s._yscale + 3;
if (s._alpha <= 0) {
removeMovieClip(s);
steam.splice(i, 1);
}
}
if (player.canJetPack) {
player.errorMargin = 12;
} else {
player.errorMargin = 8.3;
}
if ((player.canJetPack && (!player.dead)) && (!player.regen)) {
if (player.jetPacking) {
player.jetPack._visible = false;
player.harness._visible = false;
gravity = 1;
player._rotation = player._rotation + ((player.endRot - player._rotation) / 10);
player.gotoAndStop(8);
if (Key.isDown(32)) {
if (!steamSound) {
steamSound = true;
_root.jetpackSteam.start(0, 99);
}
if (player.ySpeed > -12.5) {
player.ySpeed = player.ySpeed - 2.5;
}
if (steamOn) {
makeSteam(player._x - 20, (player._y + 20) - player.ySpeed, (-2 + (Math.random() * 4)) - 2, (8 + (Math.random() * 4)) - 2);
makeSteam(player._x + 20, (player._y + 20) - player.ySpeed, (2 + (Math.random() * 4)) - 2, (8 + (Math.random() * 4)) - 2);
}
} else if (steamSound) {
steamSound = false;
_root.jetpackSteam.stop();
}
if (Key.isDown(39) || (Key.isDown(68))) {
if (player.xSpeed < 11) {
player.xSpeed = player.xSpeed + 0.5;
player._xscale = -100;
}
player.endRot = 10;
}
if (Key.isDown(37) || (Key.isDown(65))) {
if (player.xSpeed > -11) {
player.xSpeed = player.xSpeed - 0.5;
player._xscale = 100;
}
player.endRot = -10;
}
if ((((!Key.isDown(39)) && (!Key.isDown(68))) && (!Key.isDown(37))) && (!Key.isDown(65))) {
player.xSpeed = player.xSpeed * 0.95;
player.endRot = 0;
}
if (ground.ground.hitTest(player._x, (player._y + player.hHeight) + 1, true)) {
player.jetPacking = false;
}
} else {
player.jetPack._visible = true;
player.harness._visible = true;
gravity = 1.5;
player.endRot = 0;
player._rotation = 0;
if (Key.isDown(32) && (!player.regen)) {
player.jetPacking = true;
player._y = player._y - 3;
player.ySpeed = player.ySpeed - 5;
}
if ((!player.regen) && (!player.dead)) {
chooseFrame();
moveHorizontal();
}
}
} else {
player.jetPack._visible = false;
player.harness._visible = false;
gravity = 1.5;
player.endRot = 0;
player._rotation = 0;
if ((!player.regen) && (!player.dead)) {
moveHorizontal();
chooseFrame();
}
}
if (player._currentframe == 2) {
player.harness._alpha = 0;
if (player.canJetPack) {
player.jetArms._visible = true;
} else {
player.jetArms._visible = false;
}
} else {
player.harness._alpha = 100;
}
if (!player.regen) {
if (!player.canJetPack) {
if (!player.onLadder) {
if (!player.dead) {
player.ySpeed = player.ySpeed + gravity;
}
} else {
player.ySpeed = player.ySpeed * friction;
}
} else if (!player.dead) {
player.ySpeed = player.ySpeed + gravity;
}
} else {
player.gotoAndStop(7);
}
if (!player.dead) {
boundFloor();
} else if (steamSound) {
steamSound = false;
_root.jetpackSteam.stop();
}
if (!player.regen) {
if (!player.jetPacking) {
moveVertical();
}
}
if (!player.dead) {
boundPlayer();
}
if (player._x > (700 - (player.scrollWidth * 1.6))) {
scrollX = (-(player._x - (700 - (player.scrollWidth * 1.6)))) / (scrollEase * 2);
}
if (player._x < ((player.scrollWidth * 1.6) - 1)) {
scrollX = (-(player._x - (player.scrollWidth * 1.6))) / (scrollEase * 2);
}
if (scrollOn) {
if (player._y < player.scrollWidth) {
ground._y = ground._y - ((player._y - player.scrollWidth) / scrollEase);
player._y = player._y - ((player._y - player.scrollWidth) / scrollEase);
}
if (player.hitTest(ground.endGameBlock)) {
scrollOn = false;
}
}
if (player.deathTimer > 20) {
scrollOn = true;
}
if (player._y > (500 - player.scrollWidth)) {
ground._y = ground._y - ((player._y - (500 - player.scrollWidth)) / scrollEase);
player._y = player._y - ((player._y - (500 - player.scrollWidth)) / scrollEase);
}
matchGrounds();
detectLadder();
if (blackArea._currentframe == 1) {
if (blackArea.hitTest(player._x, player._y, true)) {
blackArea.gotoAndStop(2);
}
} else if (blackArea.hitTest(player._x, player._y, true)) {
blackArea.gotoAndStop(1);
}
if (backGround._x > 700) {
backGround._x = 0;
}
if (backGround._x < 0) {
backGround._x = 700;
}
if (backGround2._x > 0) {
backGround2._x = -1500;
}
if (backGround2._x < -1500) {
backGround2._x = 0;
}
if (ground.endGameBlock2.hitTest(player._x, player._y, true)) {
welding.stop();
levelMusic.level3.stop();
if (!menuMusicPlaying) {
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
}
if ((saveData.data.level3Time > gameTimer) || (saveData.data.level3Time == 0)) {
saveData.data.level3Time = gameTimer;
}
if (saveData.data.level3Bonus[0] == 0) {
saveData.data.level3Bonus[0] = tempBonusArray[0];
}
if (saveData.data.level3Bonus[1] == 0) {
saveData.data.level3Bonus[1] = tempBonusArray[1];
}
if (saveData.data.upToLevel == 3) {
saveData.data.upToLevel = 4;
}
clearInterval(intervalTimer);
gotoAndStop (3);
}
resetGame();
if (player.getBounds(_root).yMin > ground.getBounds(_root).yMax) {
player.dead = true;
}
manageMessageBar();
manageGearsDisplay();
subTimer++;
if (subTimer > 30) {
subTimer = 0;
timer++;
}
noSound._xscale = (noSound._yscale = muteSymbol._xscale);
if (!muted) {
noSound._visible = false;
} else {
noSound._visible = true;
}
if (!played.dead) {
if (Key.isDown(80) || (Key.isDown(27))) {
gamePaused = true;
attachMovie("pauseMenu", "pauseMenu", _root.getNextHighestDepth());
pauseMenu._x = 350;
pauseMenu._y = 250;
pauseMenu.resumeButton.onRelease = function () {
removeMovieClip(pauseMenu);
gamePaused = false;
};
pauseMenu.restartButton.onRelease = function () {
removeMovieClip(pauseMenu);
for (i in steam) {
s = steam[i];
removeMovieClip(s);
steam.splice(i, 1);
}
levelMusic.level3.stop();
gamePaused = false;
restartFrame = 9;
gotoAndStop (12);
};
pauseMenu.menuButton.onRelease = function () {
removeMovieClip(pauseMenu);
for (i in steam) {
s = steam[i];
removeMovieClip(s);
steam.splice(i, 1);
}
levelMusic.level3.stop();
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
rainLoop.start(0, 999);
gamePaused = false;
gotoAndStop (2);
};
if (_root._quality == "LOW") {
pauseMenu.qualityText.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "HIGH") {
pauseMenu.qualityText.gotoAndStop(3);
}
pauseMenu.qualityButton.onRelease = function () {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
pauseMenu.qualityText.gotoAndStop(3);
} else if (_root._quality == "HIGH") {
_root._quality = "LOW";
pauseMenu.qualityText.gotoAndStop(1);
}
};
pauseMenu.beGamerPauseLogo.onRelease = function () {
getURL ("http://www.begamer.com/index/index/strange-laboratory", "_blank");
};
pauseMenu.getAHintButton.onRelease = function () {
getURL ("http://begamer.com/walkthrough/strange-laboratory", "_blank");
};
if (muted) {
pauseMenu.soundText.gotoAndStop(2);
} else {
pauseMenu.soundText.gotoAndStop(1);
}
pauseMenu.soundButton.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
}
}
}
};
muteSymbol.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
Frame 10
player._xscale = -100;
initCheckpoint();
initPlayer();
initGame();
levelMusic.level4.start(0, 999);
tempBonusArray = new Array(0, 0);
player._xscale = -100;
largeGearSpeed = 0.8;
stopWatch._alpha = 0;
scrollOn = true;
onEnterFrame = function () {
if (!gamePaused) {
if (!player.dead) {
if (Key.isDown(80) || (Key.isDown(27))) {
gamePaused = true;
attachMovie("pauseMenu", "pauseMenu", _root.getNextHighestDepth());
pauseMenu._x = 350;
pauseMenu._y = 250;
pauseMenu.resumeButton.onRelease = function () {
removeMovieClip(pauseMenu);
gamePaused = false;
};
pauseMenu.restartButton.onRelease = function () {
removeMovieClip(pauseMenu);
levelMusic.level4.stop();
gamePaused = false;
restartFrame = 10;
gotoAndStop (12);
};
pauseMenu.menuButton.onRelease = function () {
removeMovieClip(pauseMenu);
gamePaused = false;
levelMusic.level4.stop();
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
rainLoop.start(0, 999);
gotoAndStop (2);
};
if (_root._quality == "LOW") {
pauseMenu.qualityText.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "HIGH") {
pauseMenu.qualityText.gotoAndStop(3);
}
pauseMenu.qualityButton.onRelease = function () {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
pauseMenu.qualityText.gotoAndStop(3);
} else if (_root._quality == "HIGH") {
_root._quality = "LOW";
pauseMenu.qualityText.gotoAndStop(1);
}
};
pauseMenu.beGamerPauseLogo.onRelease = function () {
getURL ("http://www.begamer.com/index/index/strange-laboratory", "_blank");
};
pauseMenu.getAHintButton.onRelease = function () {
getURL ("http://begamer.com/walkthrough/strange-laboratory", "_blank");
};
if (muted) {
pauseMenu.soundText.gotoAndStop(2);
} else {
pauseMenu.soundText.gotoAndStop(1);
}
pauseMenu.soundButton.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
}
}
player._x = player._x + player.xSpeed;
player._y = player._y + player.ySpeed;
player._x = player._x + scrollX;
ground._x = ground._x + scrollX;
backGround._x = backGround._x + (scrollX * 0.6);
backGround2._x = backGround2._x + (scrollX * 0.8);
scrollX = scrollX * scrollFriction;
limitSpeeds();
if ((!player.regen) && (!player.dead)) {
moveHorizontal();
chooseFrame();
}
if (!player.onLadder) {
if (!player.dead) {
player.ySpeed = player.ySpeed + gravity;
}
} else {
player.ySpeed = player.ySpeed * friction;
}
if (!player.dead) {
boundFloor();
}
if (!player.regen) {
moveVertical();
}
if (!player.dead) {
boundPlayer();
}
if (player._x > (700 - (player.scrollWidth * 1.6))) {
scrollX = (-(player._x - (700 - (player.scrollWidth * 1.6)))) / (scrollEase * 2);
}
if (player._x < ((player.scrollWidth * 1.6) - 1)) {
scrollX = (-(player._x - (player.scrollWidth * 1.6))) / (scrollEase * 2);
}
if (scrollOn) {
if (player._y < player.scrollWidth) {
ground._y = ground._y - ((player._y - player.scrollWidth) / scrollEase);
player._y = player._y - ((player._y - player.scrollWidth) / scrollEase);
}
}
if (ground.endScrollBlock.hitTest(player)) {
scrollOn = false;
} else {
scrollOn = true;
}
if (player._y > (500 - player.scrollWidth)) {
ground._y = ground._y - ((player._y - (500 - player.scrollWidth)) / scrollEase);
player._y = player._y - ((player._y - (500 - player.scrollWidth)) / scrollEase);
}
matchGrounds();
detectLadder();
if (blackArea._currentframe == 1) {
if (blackArea.hitTest(player._x, player._y, true)) {
blackArea.gotoAndStop(2);
}
} else if (blackArea.hitTest(player._x, player._y, true)) {
blackArea.gotoAndStop(1);
}
if (backGround._x > 700) {
backGround._x = 0;
}
if (backGround._x < 0) {
backGround._x = 700;
}
if (backGround2._x > 0) {
backGround2._x = -1500;
}
if (backGround2._x < -1500) {
backGround2._x = 0;
}
if (ground.finishBlock.hitTest(player._x, player._y, true)) {
levelMusic.level4.stop();
if (!menuMusicPlaying) {
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
}
if ((saveData.data.level4Time > gameTimer) || (saveData.data.level4Time == 0)) {
saveData.data.level4Time = gameTimer;
}
if (saveData.data.level4Bonus[0] == 0) {
saveData.data.level4Bonus[0] = tempBonusArray[0];
}
if (saveData.data.level4Bonus[1] == 0) {
saveData.data.level4Bonus[1] = tempBonusArray[1];
}
if (saveData.data.upToLevel == 4) {
saveData.data.upToLevel = 5;
}
clearInterval(intervalTimer);
gotoAndStop (3);
}
resetGame();
if (player.getBounds(_root).yMin > ground.getBounds(_root).yMax) {
player.dead = true;
}
manageMessageBar();
manageGearsDisplay();
subTimer++;
if (subTimer > 30) {
subTimer = 0;
timer++;
}
noSound._xscale = (noSound._yscale = muteSymbol._xscale);
if (!muted) {
noSound._visible = false;
} else {
noSound._visible = true;
}
}
};
muteSymbol.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
Frame 11
levelMusic.level5.start(0, 999);
player.xSpeed = 0;
player.ySpeed = 0;
player.maxSpeed = 8;
player.accel = 0.5;
player.friction = 0.98;
player.boostReload = 0;
player.boostSpeed = 8;
player.dead = false;
player.deathTimer = 0;
player.lives = 3;
livesDisplay.livesText = player.lives;
bgScrollSpeed = -5;
steam = new Array();
ship.startX = ship._x;
ship.startY = ship._y;
ship.offsetX = 0;
ship.offsetY = 0;
ship.shootTimer = 0;
ship.speed = -1;
engine1damage = 0;
engine1grav = -5;
engine1xspeed = 0;
ship.wires1._visible = false;
engine2damage = 0;
engine2grav = -5;
engine2xspeed = 0;
ship.wires2._visible = false;
bullets = new Array();
endTimer = 0;
gameTimer = 0;
intervalTimer = setInterval(incrementGameTimer, 1000);
messageBarY = 525;
messageBarTimer = 0;
messageBarLimit = 0;
storyTimer = 0;
makeMessage("Stop Dr Strangeglove escaping in the Professor's airship!", 150);
onEnterFrame = function () {
if (!gamePaused) {
storyTimer++;
if (storyTimer == 300) {
makeMessage("Press space to use deflector shield once fully charged!", 300);
}
if (storyTimer == 700) {
makeMessage("Deflect the bullets towards the ship engines to take it down!", 300);
}
manageMessageBar();
ship._x = ship.startX + ship.offsetX;
ship._y = ship.startY + ship.offsetY;
ship.shootTimer++;
ship.offsetX = ship.offsetX + (ship.speed + (player.xSpeed / -2));
ship.windowGun.barrel._rotation = (57.2957795130823 * Math.atan2(player._y - ship._y, player._x - ship._x)) + 180;
ship.windowGun.gears._rotation = ship.windowGun.barrel._rotation / 2;
if (engine1damage == 2) {
if (random(5) == 0) {
makeSteam(((ship._x - 190) + (Math.random() * 40)) - 20, ((ship._y - 15) + (Math.random() * 80)) - 40, 0, -3);
}
}
if (engine1damage >= 3) {
if (random(60) == 0) {
makeSteam(((ship._x - 190) + (Math.random() * 40)) - 20, ((ship._y - 15) + (Math.random() * 40)) - 20, 0, -3);
}
if (ship.engine1._y < 2000) {
engine1grav++;
engine1xspeed = engine1xspeed + 1;
ship.engine1._y = ship.engine1._y + engine1grav;
ship.engine1._x = ship.engine1._x + engine1xspeed;
ship.engine1._rotation = ship.engine1._rotation + 2;
}
}
if (engine2damage == 2) {
if (random(5) == 0) {
makeSteam(((ship._x + 190) + (Math.random() * 40)) - 20, ((ship._y - 15) + (Math.random() * 80)) - 40, 0, -3);
}
}
if (engine2damage >= 3) {
if (random(60) == 0) {
makeSteam(((ship._x + 190) + (Math.random() * 40)) - 20, ((ship._y - 15) + (Math.random() * 40)) - 20, 0, -3);
}
if (ship.engine2._y < 2000) {
engine2grav++;
engine2xspeed = engine2xspeed + 1;
ship.engine2._y = ship.engine2._y + engine2grav;
ship.engine2._x = ship.engine2._x + engine2xspeed;
ship.engine2._rotation = ship.engine2._rotation + 2;
}
}
if ((engine1damage >= 3) && (engine2damage >= 3)) {
endTimer++;
if (endTimer > 30) {
for (i in steam) {
s = steam[i];
removeMovieClip(s);
steam.splice(i, 1);
}
for (i in bullets) {
b = bullets[i];
removeMovieClip(b);
bullets.splice(i, 1);
}
clearInterval(intervalTimer);
if ((saveData.data.level5Time > gameTimer) || (saveData.data.level5Time == 0)) {
saveData.data.level5Time = gameTimer;
}
gotoAndStop (14);
}
}
if (ship.shootTimer > 120) {
ship.shootTimer = 0;
d = _root.getNextHighestDepth();
b = attachMovie("camilleBullet", "camilleBullet" + d, d);
b.startX = (ship._x + (75 * Math.cos((Math.PI/180) * (ship.windowGun.barrel._rotation + 180)))) - ship.offsetX;
b.startY = (ship._y + (75 * Math.sin((Math.PI/180) * (ship.windowGun.barrel._rotation + 180)))) - ship.offsetY;
b.offsetX = 0;
b.offsetY = 0;
b._x = b.startX + ship.offsetX;
b._y = b.startY + ship.offsetY;
c = 0;
while (c < 10) {
makeSteamGrey((b._x + (Math.random() * 4)) - 2, (b._y + (Math.random() * 4)) - 2, (Math.random() * 15) - 6, (Math.random() * 20) - 10);
c++;
}
b._rotation = ship.windowGun.barrel._rotation;
b.speedX = 10 * Math.cos((Math.PI/180) * (b._rotation + 180));
b.speedY = 10 * Math.sin((Math.PI/180) * (b._rotation + 180));
b.bulletType = 1;
b.glow._visible = false;
cannonSound.start(0, 1);
bullets.push(b);
}
for (i in bullets) {
b = bullets[i];
b.offsetX = b.offsetX + b.speedX;
b.offsetY = b.offsetY + b.speedY;
b._x = (b.startX + b.offsetX) + ship.offsetX;
b._y = (b.startY + b.offsetY) + ship.offsetY;
if (b.bulletType == 1) {
if (player.hitTest(b._x, b._y, true)) {
if ((player.boost._currentframe >= 2) && (b._x > player._x)) {
b.speedX = b.speedX * -1;
b.speedY = (b._y - player._y) / 25;
b._rotation = (57.2957795130823 * Math.atan2(b.speedY, b.speedX)) + 180;
b.bulletType = 2;
b.glow._visible = true;
} else {
explosion._x = b._x;
explosion._y = b._y;
explosionSound.start(0, 1);
explosion.gotoAndPlay(1);
removeMovieClip(b);
bullets.splice(i, 1);
player.xSpeed = player.xSpeed - 6;
player.ySpeed = player.ySpeed - 3;
if (player.lives == 0) {
player.dead = true;
} else {
player.lives--;
livesDisplay.livesText = player.lives;
}
}
}
} else if (b.bulletType == 2) {
if (ship.engine1.hitTest(b._x, b._y, true)) {
engine1damage++;
if (engine1damage == 3) {
ship.wires1._visible = true;
}
ship.engine1.damages.nextFrame();
explosion._x = b._x;
explosion._y = b._y;
explosion.gotoAndPlay(1);
explosionSound.start(0, 1);
removeMovieClip(b);
bullets.splice(i, 1);
}
if (ship.engine2.hitTest(b._x, b._y, true)) {
engine2damage++;
if (engine2damage == 3) {
ship.wires2._visible = true;
}
ship.engine2.damages.nextFrame();
explosion._x = b._x;
explosion._y = b._y;
explosion.gotoAndPlay(1);
explosionSound.start(0, 1);
removeMovieClip(b);
bullets.splice(i, 1);
}
}
if ((((b._x > 9000) || (b._x < -100)) || (b._y > 600)) || (b._y < -100)) {
removeMovieClip(b);
bullets.splice(i, 1);
}
}
if (!player.dead) {
if (Key.isDown(39) || (Key.isDown(68))) {
if (player.xSpeed < player.maxSpeed) {
player.xSpeed = player.xSpeed + player.accel;
} else {
player.xSpeed = player.maxSpeed;
}
} else if (Key.isDown(37) || (Key.isDown(65))) {
if (player.xSpeed > (-player.maxSpeed)) {
player.xSpeed = player.xSpeed - player.accel;
} else {
player.xSpeed = -player.maxSpeed;
}
} else {
player.xSpeed = player.xSpeed * player.friction;
}
}
if (!player.dead) {
if (Key.isDown(38) || (Key.isDown(87))) {
if (player.ySpeed > (-player.maxSpeed)) {
player.ySpeed = player.ySpeed - player.accel;
} else {
player.ySpeed = -player.maxSpeed;
}
} else if (Key.isDown(40) || (Key.isDown(83))) {
if (player.ySpeed < player.maxSpeed) {
player.ySpeed = player.ySpeed + player.accel;
} else {
player.ySpeed = player.maxSpeed;
}
} else {
player.ySpeed = player.ySpeed * player.friction;
}
}
if (player.boostReload < 200) {
player.boostReload++;
}
if (!player.dead) {
if (player.boostReload >= 200) {
if (Key.isDown(32)) {
charge.gotoAndPlay(2);
woosh.start(0, 1);
player.boostReload = 0;
player.xSpeed = player.xSpeed + player.boostSpeed;
player.boost.gotoAndPlay(2);
i = 0;
while (i < 20) {
makeSteam(((player._x - 30) + (Math.random() * 10)) - 5, (player._y + (Math.random() * 130)) - 65, (-2 + (Math.random() * 4)) - 2, (Math.random() * 8) - 4);
i++;
}
}
}
}
player._x = player._x + player.xSpeed;
player._y = player._y + player.ySpeed;
player._rotation = player.xSpeed;
player.xSpeed = player.xSpeed - 0.15;
if (!player.dead) {
if (player._x > 500) {
player._x = player._x + ((500 - player._x) / 20);
}
if (player._x < 150) {
player._x = player._x + ((150 - player._x) / 20);
}
if (player._y < 150) {
player._y = player._y + ((150 - player._y) / 10);
ship.offsetY = ship.offsetY + ((150 - player._y) / 20);
}
if (player._y > 350) {
player._y = player._y + ((350 - player._y) / 10);
ship.offsetY = ship.offsetY + ((350 - player._y) / 20);
}
}
bg._x = bg._x + ((-2 + bgScrollSpeed) + ((-player.xSpeed) / 5));
bg._y = 250 - ((player._y - 250) / 5);
if (player.dead) {
if (bg._y < 200) {
bg._y = 200;
}
}
if (bg._x < -700) {
bg._x = 700;
}
if (bg._x > 700) {
bg._x = -700;
}
if (player.dead) {
player.xSpeed = player.xSpeed - 0.05;
player.ySpeed = player.ySpeed + 0.5;
if (ship.speed < 4) {
ship.speed = ship.speed + 0.1;
}
if (player._y > 500) {
player.deathTimer++;
}
if (player.deathTimer > 45) {
for (i in steam) {
s = steam[i];
removeMovieClip(s);
steam.splice(i, 1);
}
restartFrame = 11;
gotoAndStop (16);
}
}
if (!player.dead) {
makeSteam(player._x - 20, (player._y + 20) - player.ySpeed, (-2 + (Math.random() * 4)) - 2, (10 + (Math.random() * 8)) - 4);
makeSteam(player._x + 20, (player._y + 20) - player.ySpeed, (2 + (Math.random() * 4)) - 2, (10 + (Math.random() * 8)) - 4);
if (player.lives == 2) {
if (random(10) == 0) {
makeSteamGrey((player._x + random(40)) - 20, (player._y + random(120)) - 60, (-2 + (Math.random() * 4)) - 2, (Math.random() * 8) - 4);
}
}
if (player.lives == 1) {
if (random(5) == 0) {
makeSteamGrey((player._x + random(40)) - 20, (player._y + random(120)) - 60, (-2 + (Math.random() * 4)) - 2, (Math.random() * 8) - 4);
}
}
if (player.lives == 0) {
if (random(2) == 0) {
makeSteamGrey((player._x + random(40)) - 20, (player._y + random(120)) - 60, (-2 + (Math.random() * 4)) - 2, (Math.random() * 8) - 4);
}
}
} else {
if (random(30) == 0) {
makeSteam(player._x - 20, (player._y + 20) - player.ySpeed, (-2 + (Math.random() * 4)) - 2, (10 + (Math.random() * 8)) - 4);
}
if (random(30) == 0) {
makeSteam(player._x + 20, (player._y + 20) - player.ySpeed, (2 + (Math.random() * 4)) - 2, (10 + (Math.random() * 8)) - 4);
}
}
for (i in steam) {
s = steam[i];
s._x = s._x + ((s.xSpeed + bgScrollSpeed) - 10);
s._y = s._y + s.ySpeed;
s.xSpeed = s.xSpeed * 0.96;
s.ySpeed = s.ySpeed * 0.96;
s._alpha = s._alpha - 4;
s._xscale = s._xscale + 10;
s._yscale = s._yscale + 10;
if (s._alpha <= 0) {
removeMovieClip(s);
steam.splice(i, 1);
}
}
noSound._xscale = (noSound._yscale = muteSymbol._xscale);
if (!muted) {
noSound._visible = false;
} else {
noSound._visible = true;
}
if (Key.isDown(80) || (Key.isDown(27))) {
gamePaused = true;
attachMovie("pauseMenu", "pauseMenu", _root.getNextHighestDepth());
pauseMenu._x = 350;
pauseMenu._y = 250;
pauseMenu.resumeButton.onRelease = function () {
removeMovieClip(pauseMenu);
gamePaused = false;
};
pauseMenu.restartButton.onRelease = function () {
removeMovieClip(pauseMenu);
for (i in steam) {
s = steam[i];
removeMovieClip(s);
steam.splice(i, 1);
}
for (i in bullets) {
b = bullets[i];
removeMovieClip(b);
bullets.splice(i, 1);
}
levelMusic.level5.stop();
gamePaused = false;
restartFrame = 11;
gotoAndStop (12);
};
pauseMenu.menuButton.onRelease = function () {
removeMovieClip(pauseMenu);
for (i in steam) {
s = steam[i];
removeMovieClip(s);
steam.splice(i, 1);
}
for (i in bullets) {
b = bullets[i];
removeMovieClip(b);
bullets.splice(i, 1);
}
levelMusic.level5.stop();
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
rainLoop.start(0, 999);
gamePaused = false;
gotoAndStop (2);
};
if (_root._quality == "LOW") {
pauseMenu.qualityText.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "HIGH") {
pauseMenu.qualityText.gotoAndStop(3);
}
pauseMenu.qualityButton.onRelease = function () {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
pauseMenu.qualityText.gotoAndStop(2);
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
pauseMenu.qualityText.gotoAndStop(3);
} else if (_root._quality == "HIGH") {
_root._quality = "LOW";
pauseMenu.qualityText.gotoAndStop(1);
}
};
pauseMenu.beGamerPauseLogo.onRelease = function () {
getURL ("http://www.begamer.com/index/index/strange-laboratory", "_blank");
};
pauseMenu.getAHintButton.onRelease = function () {
getURL ("http://begamer.com/walkthrough/strange-laboratory", "_blank");
};
if (muted) {
pauseMenu.soundText.gotoAndStop(2);
} else {
pauseMenu.soundText.gotoAndStop(1);
}
pauseMenu.soundButton.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
}
}
};
muteSymbol.onRelease = function () {
if (muted) {
muted = false;
rainLoop.setVolume(100);
fireCrackle.setVolume(100);
menuMusic.music.setVolume(100);
pauseMenu.soundText.gotoAndStop(1);
} else {
muted = true;
rainLoop.setVolume(0);
fireCrackle.setVolume(0);
menuMusic.music.setVolume(0);
pauseMenu.soundText.gotoAndStop(2);
}
};
Frame 12
clearInterval(intervalTimer);
gotoAndStop(restartFrame);
Frame 13
back_btn.onRelease = function () {
gotoAndStop (4);
};
Frame 14
stop();
theEnd._alpha = 0;
blackScreen._visible = false;
timer = 0;
clipPlayed = false;
moreGames._alpha = (continueButton._alpha = 0);
onEnterFrame = function () {
jetFly._x++;
if (ship._currentframe == 140) {
theEnd._alpha = theEnd._alpha + 1;
}
if (theEnd._alpha >= 90) {
if (!clipPlayed) {
clipPlayed = true;
level1Clip.start(0, 1);
}
if (continueButton._alpha < 100) {
continueButton._alpha = continueButton._alpha + 1;
moreGames._alpha = moreGames._alpha + 1;
}
}
if (timer > 10) {
blackScreen._visible = true;
}
if (!muted) {
if (levelMusic.level5.getVolume() > 2) {
levelMusic.level5.setVolume(levelMusic.level5.getVolume() - 2);
}
}
if (timer > 30) {
if (!muted) {
levelMusic.level5.setVolume(100);
}
levelMusic.level5.stop();
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
rainLoop.start(0, 999);
gotoAndStop (3);
}
};
moreGames.onRelease = function () {
_root.getURL("http://www.begamer.com/index/index/strange-laboratory", "_blank");
};
continueButton.onRelease = function () {
if (!muted) {
levelMusic.level5.setVolume(100);
}
levelMusic.level5.stop();
menuMusic.music.start(0, 999);
menuMusicPlaying = true;
rainLoop.start(0, 999);
gotoAndStop (2);
};
Frame 15
stop();
beGamerVoiceClip = _root.createEmptyMovieClip("beGamerVoiceClip", _root.getNextHighestDepth());
beGamerVoice = new Sound(beGamerVoiceClip);
beGamerVoice.attachSound("beGamerVoice");
beGamerVoice.setVolume(50);
Frame 16
tGrav = 0;
shipDif = 0;
shipY = flyingShip._y;
bTimer = 0;
moreGames._alpha = 0;
continueButton._alpha = 0;
spaceIsDown = true;
onEnterFrame = function () {
if (!muted) {
levelMusic.level5.setVolume(levelMusic.level5.getVolume() - 2);
}
if (levelMusic.level5.getVolume() == 2) {
levelMusic.level5.stop();
}
jetFly._x = jetFly._x + 1;
tGrav = tGrav + 0.02;
jetFly._y = jetFly._y + tGrav;
jetFly._rotation = jetFly._rotation + 0.2;
flyingShip._x = flyingShip._x + 0.5;
shipDif = shipDif - 0.02;
flyingShip._y = shipY + (Math.sin(shipDif) * 10);
if (bTimer > 60) {
moreGames._alpha = moreGames._alpha + 5;
continueButton._alpha = continueButton._alpha + 5;
} else {
bTimer++;
}
if (bTimer > 55) {
if (Key.isDown(32)) {
if (!spaceIsDown) {
levelMusic.level5.stop();
if (!muted) {
levelMusic.level5.setVolume(100);
}
gotoAndStop (11);
}
} else {
spaceIsDown = false;
}
}
};
moreGames.onRelease = function () {
_root.getURL("http://www.begamer.com/index/index/strange-laboratory", "_blank");
};
continueButton.onRelease = function () {
levelMusic.level5.stop();
if (!muted) {
levelMusic.level5.setVolume(100);
}
gotoAndStop (11);
};
Symbol 96 MovieClip Frame 1
this._visible = false;
Instance of Symbol 96 MovieClip in Symbol 101 MovieClip Frame 1
on (release) {
getURL ("http://www.begamer.com/index/index/thewok", "_blank");
}
Symbol 107 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 118 MovieClip [pauseMenu] Frame 1
onEnterFrame = function () {
leftGear._rotation = leftGear._rotation - 5;
leftStick._y = leftStick._y - 5.21666666;
if (leftStick._y < -65) {
leftStick._y = 59;
}
rightGear._rotation = rightGear._rotation - 5;
rightStick._y = rightStick._y + 5.2166666;
if (rightStick._y > 48) {
rightStick._y = -45.9;
}
};
Symbol 124 MovieClip Frame 6
stop();
Symbol 125 MovieClip [deathscreen] Frame 25
stop();
Symbol 125 MovieClip [deathscreen] Frame 26
stop();
Symbol 142 MovieClip [explode] Frame 9
stop();
Symbol 155 Button
on (release) {
_root.getURL("http://www.begamer.com/index/index/strange-laboratory", "_blank");
}
Symbol 156 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 4
stop();
Symbol 173 MovieClip Frame 1
stop();
Symbol 173 MovieClip Frame 17
stop();
Symbol 182 MovieClip Frame 24
stop();
Symbol 183 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 2
stop();
Symbol 256 MovieClip Frame 10
gotoAndPlay (1);
Symbol 339 MovieClip Frame 141
stop();
Symbol 413 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 1
stop();
Symbol 484 MovieClip Frame 1
stop();
Symbol 484 MovieClip Frame 5
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 519 MovieClip Frame 1
stop();
Instance of Symbol 477 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.sound = false;
}
onClipEvent (enterFrame) {
if ((_root.ground.circle6.line1.filament._currentframe == 2) && (Math.abs(_root.ground.circle6._rotation) < 4)) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
if (this._y > -170) {
if (!this.sound) {
this.sound = true;
_root.machineLoop.start(0, 99);
}
this._y = this._y - 5;
_root.player._y = _root.player._y - 5;
_root.ground.risingPlatformGear._rotation = _root.ground.risingPlatformGear._rotation + 10;
} else if (this.sound) {
this.sound = false;
_root.machineLoop.stop();
}
} else {
if (this.sound) {
this.sound = false;
_root.machineLoop.stop();
}
if (this._y < 470) {
this._y = this._y + 5;
_root.ground.risingPlatformGear._rotation = _root.ground.risingPlatformGear._rotation - 10;
}
}
} else if (this.sound) {
this.sound = false;
_root.machineLoop.stop();
}
}
Instance of Symbol 484 MovieClip "hiddenLiftSwitch" in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
_root.ground.ground.hiddenBouncePad.highered = true;
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 498 MovieClip "hiddenBouncePad" in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.highered = false;
}
onClipEvent (enterFrame) {
if (this.highered) {
if (this._y > 362) {
this._y--;
}
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
if (this._currentframe == 1) {
this.play();
_root.bouncepadSound.start(0, 1);
_root.player.ySpeed = -50;
_root.player.jumping = true;
}
}
}
}
Instance of Symbol 507 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.ySpeed = -5;
this.bottomY = this._y;
this.topY = -659;
}
onClipEvent (enterFrame) {
this._y = this._y + this.ySpeed;
_root.frontGround.platformChains._y = _root.frontGround.platformChains._y + this.ySpeed;
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 6, true)) {
_root.player._y = _root.player._y + this.ySpeed;
}
if (this.hitTest(_root.player._x, (_root.player._y - _root.player.hHeight) - 5, true)) {
_root.player._y = _root.player._y + 5;
}
if (this.ySpeed == -5) {
if (this._y < this.topY) {
this.ySpeed = 5;
}
} else if (this.ySpeed == 5) {
if (this._y > this.bottomY) {
this.ySpeed = -5;
}
}
}
Instance of Symbol 509 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._rotation < 0) {
if (this._rotation == -1) {
_root.doorsClose.start(0, 1);
}
if (_root.ground.bridgeGenerator.powered) {
this._rotation = this._rotation + 1;
}
}
}
Instance of Symbol 511 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._rotation > 0) {
if (_root.ground.bridgeGenerator.powered) {
this._rotation = this._rotation - 1;
}
}
}
Instance of Symbol 498 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.timer = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.gotoAndPlay(3);
_root.player.ySpeed = -37;
_root.player.jumping = true;
_root.bouncepadSound.start(0, 1);
}
}
Instance of Symbol 507 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.ySpeed = 0;
this.distance = 150;
this.startY = this._y;
this.canRise = true;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.canRise = false;
if (_root.player.ySpeed > -5) {
if (this._y < (this.startY + this.distance)) {
this.ySpeed = 3.5;
} else {
this.ySpeed = 0;
}
_root.player._y = _root.player._y + this.ySpeed;
}
} else {
if (this.canRise) {
if (this._y > this.startY) {
this.ySpeed = -3.5;
} else {
this.ySpeed = 0;
}
}
if (Math.abs(this._y - (this.startY + this.distance)) < 5) {
this.canRise = true;
}
}
this._y = this._y + this.ySpeed;
_root.frontGround.platformChains4._y = _root.frontGround.platformChains4._y + this.ySpeed;
}
Instance of Symbol 507 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.ySpeed = 0;
this.distance = 150;
this.startY = this._y;
this.canRise = true;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.canRise = false;
if (_root.player.ySpeed > -5) {
if (this._y < (this.startY + this.distance)) {
this.ySpeed = 3.5;
} else {
this.ySpeed = 0;
}
_root.player._y = _root.player._y + this.ySpeed;
}
} else {
if (this.canRise) {
if (this._y > this.startY) {
this.ySpeed = -3.5;
} else {
this.ySpeed = 0;
}
}
if (Math.abs(this._y - (this.startY + this.distance)) < 5) {
this.canRise = true;
}
}
this._y = this._y + this.ySpeed;
_root.frontGround.platformChains3._y = _root.frontGround.platformChains3._y + this.ySpeed;
}
Instance of Symbol 484 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 5;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (_root.ground.lightsClip._currentframe != 5) {
if (_root.ground.lightsClip._currentframe == 3) {
_root.ground.lightsClip.gotoAndStop(4);
} else {
_root.ground.lightsClip.gotoAndStop(1);
}
}
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 484 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (_root.ground.lightsClip._currentframe != 5) {
if (_root.ground.lightsClip._currentframe == 2) {
_root.ground.lightsClip.gotoAndStop(3);
} else {
_root.ground.lightsClip.gotoAndStop(1);
}
}
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 484 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (_root.ground.lightsClip._currentframe != 5) {
if (_root.ground.lightsClip._currentframe == 4) {
_root.ground.lightsClip.gotoAndStop(5);
_root.spark4.start();
} else {
_root.ground.lightsClip.gotoAndStop(1);
}
}
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 484 MovieClip in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (_root.ground.lightsClip._currentframe != 5) {
if (_root.ground.lightsClip._currentframe == 1) {
_root.ground.lightsClip.gotoAndStop(2);
} else {
_root.ground.lightsClip.gotoAndStop(1);
}
}
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 519 MovieClip "elevator" in Symbol 523 MovieClip Frame 1
onClipEvent (load) {
this.goingDown = false;
this.stage = 1;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
if ((_root.ground.lightsClip._currentframe == 5) && (_root.ground.valveLight._currentframe == 2)) {
if (this.stage == 1) {
if (_root.frontGround.elevatorFront._currentframe == 1) {
_root.frontGround.elevatorFront.gotoAndPlay(2);
_root.elevatorDoor.start(0, 1);
this.stage = 2;
}
}
if (this.stage == 2) {
if (_root.frontGround.elevatorFront._currentframe == 40) {
this.stage = 3;
this.gotoAndStop(1);
}
}
if (this.stage == 3) {
if (_root.ground.elevatorBack.elevatorTrigger.hitTest(_root.player._x, _root.player._y, true)) {
this.stage = 4;
this.gotoAndStop(2);
_root.frontGround.elevatorFront.gotoAndPlay(41);
_root.elevatorDoor.start(0, 1);
}
}
if (this.stage == 4) {
if (_root.frontGround.elevatorFront._currentframe == 1) {
this.stage = 5;
_root.elevatorRumble.start(0, 1);
}
}
if (this.stage == 5) {
if (this._y < 390) {
this._y = this._y + 3;
_root.ground.elevatorBack._y = _root.ground.elevatorBack._y + 3;
_root.frontGround.elevatorFront._y = _root.frontGround.elevatorFront._y + 3;
_root.player._y = _root.player._y + 3;
this.gear1._rotation = this.gear1._rotation - 11.5;
this.gear2._rotation = this.gear2._rotation + 11.5;
} else {
this.stage = 6;
}
}
if (this.stage == 6) {
_root.frontGround.elevatorFront.gotoAndPlay(2);
_root.elevatorDoor.start(0, 1);
_root.doorsClose.start(0, 1);
this.stage = 7;
}
if (this.stage == 7) {
if (_root.frontGround.elevatorFront._currentframe == 40) {
this.gotoAndStop(3);
this.stage = 8;
}
}
if (this.stage == 8) {
if (_root.ground.elevatorTurnOff.hitTest(_root.player._x, _root.player._y, true)) {
this.gotoAndStop(2);
_root.frontGround.elevatorFront.gotoAndPlay(41);
this.stage = 9;
}
}
if (this.stage == 9) {
this.stage = 10;
}
if (this.stage == 10) {
if (_root.ground.ground.hiddenLiftSwitch._y > 393) {
_root.ground.ground.hiddenLiftSwitch._y--;
}
if (this._y > -90) {
this._y = this._y - 3;
_root.ground.elevatorBack._y = _root.ground.elevatorBack._y - 3;
_root.frontGround.elevatorFront._y = _root.frontGround.elevatorFront._y - 3;
} else {
this.stage = 10;
}
}
}
}
Symbol 533 MovieClip Frame 1
stop();
Symbol 534 MovieClip Frame 1
stop();
Symbol 534 MovieClip Frame 60
gotoAndPlay (2);
Symbol 580 MovieClip Frame 1
stop();
Symbol 581 MovieClip Frame 1
stop();
Symbol 581 MovieClip Frame 15
stop();
Instance of Symbol 507 MovieClip in Symbol 586 MovieClip Frame 1
onClipEvent (load) {
this.ySpeed = 0;
this.distance = 150;
this.startY = this._y;
this.canRise = true;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.canRise = false;
if (_root.player.ySpeed > -5) {
if (this._y < (this.startY + this.distance)) {
this.ySpeed = 3.5;
} else {
this.ySpeed = 0;
}
_root.player._y = _root.player._y + this.ySpeed;
}
} else {
if (this.canRise) {
if (this._y > this.startY) {
this.ySpeed = -3.5;
} else {
this.ySpeed = 0;
}
}
if (Math.abs(this._y - (this.startY + this.distance)) < 5) {
this.canRise = true;
}
}
this._y = this._y + this.ySpeed;
_root.frontGround.platformChains5._y = _root.frontGround.platformChains5._y + this.ySpeed;
}
Instance of Symbol 594 MovieClip in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
this.topY = -530;
this.bottomY = -155;
this._y = this.bottomY;
}
onClipEvent (enterFrame) {
if (_root.ground.ladderSwitch.switchOn) {
if (this._y > this.topY) {
this._y = this._y - 3;
if (this.hitTest(_root.player)) {
if (_root.player.onLadder) {
_root.player._y = _root.player._y - 3;
}
}
}
} else if (this._y < this.bottomY) {
this._y = this._y + 3;
if (this.hitTest(_root.player)) {
if (_root.player.onLadder) {
_root.player._y = _root.player._y + 3;
}
}
}
}
Symbol 600 MovieClip Frame 1
stop();
Symbol 614 MovieClip Frame 1
stop();
Symbol 619 MovieClip Frame 1
stop();
Symbol 621 MovieClip Frame 1
stop();
Symbol 621 MovieClip Frame 30
stop();
Symbol 624 MovieClip Frame 1
stop();
Symbol 624 MovieClip Frame 11
stop();
Symbol 630 MovieClip Frame 1
stop();
Instance of Symbol 447 MovieClip "pipeValve1" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.handleRotation = 0;
this.spaceDown = true;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
if (!Key.isDown(32)) {
this.spaceDown = false;
}
this.wheel.gotoAndStop(2);
_root.makeMessage("Press space to turn handle", 0);
if (!this.spaceDown) {
if (Key.isDown(32)) {
if (this.handleRotation < 40) {
this.handleRotation = this.handleRotation + 40;
} else {
this.handleRotation = -40;
}
this.spaceDown = true;
if (random(2) == 0) {
_root.squeak1.start(0, 1);
} else {
_root.squeak2.start(0, 1);
}
}
}
} else {
this.wheel.gotoAndStop(1);
}
if (this.handle._rotation > this.handleRotation) {
this.handle._rotation = this.handle._rotation - 5;
}
if (this.handle._rotation < this.handleRotation) {
this.handle._rotation = this.handle._rotation + 5;
}
this.wheel._rotation = this.handle._rotation * 3;
}
Instance of Symbol 447 MovieClip "pipeValve2" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.handleRotation = 0;
this.spaceDown = true;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
if (!Key.isDown(32)) {
this.spaceDown = false;
}
this.wheel.gotoAndStop(2);
_root.makeMessage("Press space to turn handle", 0);
if (!this.spaceDown) {
if (Key.isDown(32)) {
if (this.handleRotation < 40) {
this.handleRotation = this.handleRotation + 40;
} else {
this.handleRotation = -40;
}
this.spaceDown = true;
if (random(2) == 0) {
_root.squeak1.start(0, 1);
} else {
_root.squeak2.start(0, 1);
}
}
}
} else {
this.wheel.gotoAndStop(1);
}
if (this.handle._rotation > this.handleRotation) {
this.handle._rotation = this.handle._rotation - 5;
}
if (this.handle._rotation < this.handleRotation) {
this.handle._rotation = this.handle._rotation + 5;
}
this.wheel._rotation = this.handle._rotation * 3;
}
Instance of Symbol 447 MovieClip "pipeValve3" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.handleRotation = 0;
this.spaceDown = true;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
if (!Key.isDown(32)) {
this.spaceDown = false;
}
this.wheel.gotoAndStop(2);
_root.makeMessage("Press space to turn handle", 0);
if (!this.spaceDown) {
if (Key.isDown(32)) {
if (this.handleRotation < 40) {
this.handleRotation = this.handleRotation + 40;
} else {
this.handleRotation = -40;
}
this.spaceDown = true;
if (random(2) == 0) {
_root.squeak1.start(0, 1);
} else {
_root.squeak2.start(0, 1);
}
}
}
} else {
this.wheel.gotoAndStop(1);
}
if (this.handle._rotation > this.handleRotation) {
this.handle._rotation = this.handle._rotation - 5;
}
if (this.handle._rotation < this.handleRotation) {
this.handle._rotation = this.handle._rotation + 5;
}
this.wheel._rotation = this.handle._rotation * 3;
}
Instance of Symbol 453 MovieClip "valveLight" in Symbol 645 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((_root.ground.pipeValve1.handleRotation == -40) && (_root.ground.pipeValve2.handleRotation == -40)) && (_root.ground.pipeValve3.handleRotation == 40)) {
if (this._currentframe == 1) {
this.gotoAndStop(2);
_root.spark4.start(0, 1);
}
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 96 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.madeMessage = false;
}
onClipEvent (enterFrame) {
if (!this.madeMessage) {
if (this.hitTest(_root.player)) {
_root.makeMessage("Press SHIFT to check your gear-count", 90);
_root.shiftKeyAlpha = 100;
this.madeMessage = true;
}
}
}
Instance of Symbol 534 MovieClip "bridgeGenerator" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.maxGears = 3;
this.gears = 0;
this.powered = false;
this.shouldSpace = true;
}
onClipEvent (enterFrame) {
if (!this.powered) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage(("This machine needs " + (this.maxGears - this.gears)) + " extra gears to work", 0);
if (_root.gearsCollected > 0) {
if (this.shouldSpace) {
_root.spaceKeyAlpha = 100;
this.shouldSpace = false;
}
}
if (Key.isDown(32)) {
_root.spaceKeyAlpha = 0;
if (_root.gearsCollected > 0) {
if (_root.gearsCollected < (this.maxGears - this.gears)) {
this.gears = this.gears + _root.gearsCollected;
_root.gearsCollected = 0;
}
if ((_root.gearsCollected - (this.maxGears - this.gears)) >= 0) {
_root.gearsCollected = _root.gearsCollected - (this.maxGears - this.gears);
this.gears = this.maxGears;
}
}
}
} else if (!this.shouldSpace) {
this.shouldSpace = true;
_root.spaceKeyAlpha = 0;
}
this.gearsClip.gotoAndStop(this.gears + 1);
if (this.gears == this.maxGears) {
this.powered = true;
_root.generatorSound.start(0, 1);
this.gotoAndPlay(2);
_root.spaceKeyAlpha = 0;
}
}
}
Instance of Symbol 580 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 1;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 96 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.triggered = false;
}
onClipEvent (enterFrame) {
if (!this.triggered) {
if (this.hitTest(_root.player)) {
this.triggered = true;
_root.makeMessage("Step on the bounce pad to be launched upwards", 60);
}
}
}
Instance of Symbol 581 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearSound.start(0, 1);
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
}
}
}
Instance of Symbol 581 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 581 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 580 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 2;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 580 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 3;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 96 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.triggered = false;
}
onClipEvent (enterFrame) {
if (!this.triggered) {
if (this.hitTest(_root.player)) {
this.triggered = true;
_root.makeMessage("Be careful not to walk into the steam", 90);
}
}
}
Instance of Symbol 583 MovieClip "valve1" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.madeMessage = false;
this.dir = -1;
this.speed = 2.5;
this.squeak = false;
}
onClipEvent (enterFrame) {
if (this.hitChecker.hitTest(_root.player._x, _root.player._y, true)) {
if (this.wheel._currentframe == 1) {
this.wheel.gotoAndStop(2);
}
if (!this.madeMessage) {
_root.makeMessage("Hold space to position the platforms", 150);
this.madeMessage = true;
}
if (Key.isDown(32)) {
if (!this.squeak) {
_root.wheelSqueak.start(0, 99);
this.squeak = true;
}
_root.player.xSpeed = 0;
this.wheel._rotation = this.wheel._rotation + (4 * this.dir);
_root.ground.ground.piston1._y = _root.ground.ground.piston1._y + (this.dir * this.speed);
if (_root.ground.ground.piston1._y > 488) {
_root.ground.ground.piston1._y = 488;
this.dir = this.dir * -1;
}
if (_root.ground.ground.piston1._y < 253) {
_root.ground.ground.piston1._y = 253;
this.dir = this.dir * -1;
}
} else if (this.squeak) {
this.squeak = false;
_root.wheelSqueak.stop();
}
} else if (this.wheel._currentframe == 2) {
this.wheel.gotoAndStop(1);
}
}
Instance of Symbol 583 MovieClip "valve2" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.dir = -1;
this.speed = 3;
this.squeak = false;
}
onClipEvent (enterFrame) {
if (this.hitChecker.hitTest(_root.player._x, _root.player._y, true)) {
if (this.wheel._currentframe == 1) {
this.wheel.gotoAndStop(2);
}
if (Key.isDown(32)) {
if (!this.squeak) {
_root.wheelSqueak.start(0, 99);
this.squeak = true;
}
_root.player.xSpeed = 0;
this.wheel._rotation = this.wheel._rotation + (4 * this.dir);
_root.ground.ground.piston2._y = _root.ground.ground.piston2._y + (this.dir * this.speed);
if (_root.ground.ground.piston2._y > 488) {
_root.ground.ground.piston2._y = 488;
this.dir = this.dir * -1;
}
if (_root.ground.ground.piston2._y < 253) {
_root.ground.ground.piston2._y = 253;
this.dir = this.dir * -1;
}
} else if (this.squeak) {
this.squeak = false;
_root.wheelSqueak.stop();
}
} else if (this.wheel._currentframe == 2) {
this.wheel.gotoAndStop(1);
}
}
Instance of Symbol 583 MovieClip "valve3" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.dir = -1;
this.speed = 5;
this.squeak = false;
}
onClipEvent (enterFrame) {
if (this.hitChecker.hitTest(_root.player._x, _root.player._y, true)) {
if (this.wheel._currentframe == 1) {
this.wheel.gotoAndStop(2);
}
if (Key.isDown(32)) {
if (!this.squeak) {
_root.wheelSqueak.start(0, 99);
this.squeak = true;
}
_root.player.xSpeed = 0;
this.wheel._rotation = this.wheel._rotation + (4 * this.dir);
_root.ground.ground.piston3._y = _root.ground.ground.piston3._y + (this.dir * this.speed);
if (_root.ground.ground.piston3._y > 488) {
_root.ground.ground.piston3._y = 488;
this.dir = this.dir * -1;
}
if (_root.ground.ground.piston3._y < 253) {
_root.ground.ground.piston3._y = 253;
this.dir = this.dir * -1;
}
} else if (this.squeak) {
this.squeak = false;
_root.wheelSqueak.stop();
}
} else if (this.wheel._currentframe == 2) {
this.wheel.gotoAndStop(1);
}
if (_root.ground.ground.piston2._y < _root.ground.ground.piston3._y) {
_root.ground.ground.pistonBlocker._y = _root.ground.ground.piston2._y;
} else {
_root.ground.ground.pistonBlocker._y = _root.ground.ground.piston3._y;
}
}
Instance of Symbol 621 MovieClip "ladderSwitch" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
this.messaged = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
this.switchGear.gotoAndStop(2);
if (!this.messaged) {
_root.makeMessage("Press space to pull lever", 30);
this.messaged = true;
}
if (Key.isDown(32)) {
if ((this._currentframe == 1) || (this._currentframe == 30)) {
_root.leverSound.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
_root.ladderRise.start(0, 1);
this.switchOn = true;
}
}
}
} else {
this.switchGear.gotoAndStop(1);
}
if (this.switchOn) {
if (this._currentframe == 1) {
this.play();
}
} else if (this._currentframe == 30) {
this.play();
}
}
Instance of Symbol 624 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_root.tempBonusArray[0] = 1;
_root.bonusGearSound.start(0, 1);
_root.bonusGearsTimer = 0;
_root.bonusGearsDisplay._x = 63;
if (_root.bonusGearsDisplay.gear1._alpha < 100) {
_root.bonusGearsDisplay.gear1._alpha = 100;
}
_root.bonusGearsDisplay.gear1._xscale = (_root.bonusGearsDisplay.gear1._yscale = 29);
_root.makeMessage("Every level has 2 bonus gears which unlock extras", 150);
}
}
}
Instance of Symbol 624 MovieClip in Symbol 645 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_root.tempBonusArray[1] = 1;
_root.bonusGearSound.start(0, 1);
_root.bonusGearsTimer = 0;
_root.bonusGearsDisplay._x = 63;
if (_root.bonusGearsDisplay.gear2._alpha < 100) {
_root.bonusGearsDisplay.gear2._alpha = 100;
}
}
}
}
Instance of Symbol 633 MovieClip "circle1" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.madeMessage = false;
this.speed = 2;
this.powered = 0;
this.tol = 4;
this._rotation = random(360);
this.played = true;
}
onClipEvent (enterFrame) {
this.powered = 0;
if (((((Math.abs(this._rotation + 105) < this.tol) || (Math.abs(this._rotation) < this.tol)) || (Math.abs(this._rotation + 91) < this.tol)) || (Math.abs(this._rotation - 112) < this.tol)) || (Math.abs(this._rotation + 174) < this.tol)) {
if (!this.played) {
this.played = true;
_root.singleSpark.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
if (Math.abs(this._rotation + 105) < this.tol) {
this.line2.filament.gotoAndStop(2);
} else {
this.line2.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation + 174) < this.tol) {
this.line3.filament.gotoAndStop(2);
} else {
this.line3.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation - 112) < this.tol) {
this.line4.filament.gotoAndStop(2);
} else {
this.line4.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation + 91) < this.tol) {
this.line1.filament.gotoAndStop(2);
this.powered = 3;
if (_root.ground.circle3.connected) {
this.line4.filament.gotoAndStop(2);
}
} else {
this.line1.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation) < this.tol) {
this.powered = 2;
this.line5.filament.gotoAndStop(2);
if (_root.ground.circle2.connected) {
this.line1.filament.gotoAndStop(2);
}
} else {
this.line5.filament.gotoAndStop(1);
}
if (_root.ground.circle1Hit.hitTest(_root.player._x, _root.player._y, true)) {
_root.ground.glow1.gotoAndStop(2);
if (!this.madeMessage) {
_root.makeMessage("Hold space and use the arrows to spin the wheel", 150);
this.madeMessage = true;
}
if (Key.isDown(32)) {
if (Key.isDown(37) || (Key.isDown(65))) {
this._rotation = this._rotation - this.speed;
} else if (Key.isDown(39) || (Key.isDown(68))) {
this._rotation = this._rotation + this.speed;
}
}
} else {
_root.ground.glow1.gotoAndStop(1);
}
}
Instance of Symbol 640 MovieClip "circle2" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.speed = 2;
this._rotation = random(360);
this.connected = false;
this.tol = 4;
this.played = true;
}
onClipEvent (enterFrame) {
if ((((Math.abs(this._rotation) < this.tol) || (Math.abs(this._rotation - 108) < this.tol)) || (Math.abs(this._rotation + 162) < this.tol)) || (Math.abs(this._rotation + 67) < this.tol)) {
this.connected = true;
if (_root.ground.circle1.powered == 2) {
if (!this.played) {
this.played = true;
_root.singleSpark.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
} else {
if (this.played) {
this.played = false;
}
this.connected = false;
}
if (_root.ground.circle1.powered == 2) {
if (Math.abs(this._rotation) < this.tol) {
this.line3.filament.gotoAndStop(2);
} else {
this.line3.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation + 67) < this.tol) {
this.line4.filament.gotoAndStop(2);
} else {
this.line4.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation + 162) < this.tol) {
this.line1.filament.gotoAndStop(2);
} else {
this.line1.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation - 108) < this.tol) {
this.line2.filament.gotoAndStop(2);
} else {
this.line2.filament.gotoAndStop(1);
}
} else {
this.line1.filament.gotoAndStop(1);
this.line2.filament.gotoAndStop(1);
this.line3.filament.gotoAndStop(1);
this.line4.filament.gotoAndStop(1);
}
if (_root.ground.circle2Hit.hitTest(_root.player._x, _root.player._y, true)) {
_root.ground.glow2.gotoAndStop(2);
if (Key.isDown(32)) {
if (Key.isDown(37) || (Key.isDown(65))) {
this._rotation = this._rotation - this.speed;
} else if (Key.isDown(39) || (Key.isDown(68))) {
this._rotation = this._rotation + this.speed;
}
}
} else {
_root.ground.glow2.gotoAndStop(1);
}
}
Instance of Symbol 641 MovieClip "circle3" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.speed = 2;
this._rotation = random(360);
this.connected = false;
this.tol = 4;
this.played = true;
}
onClipEvent (enterFrame) {
if ((((Math.abs(this._rotation) < this.tol) || (Math.abs(this._rotation - 93) < this.tol)) || (Math.abs(this._rotation + 122) < this.tol)) || (Math.abs(this._rotation + 64) < this.tol)) {
this.connected = true;
if (_root.ground.circle1.powered == 3) {
if (!this.played) {
this.played = true;
_root.singleSpark.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
} else {
if (this.played) {
this.played = false;
}
this.connected = false;
}
if (_root.ground.circle1.powered == 3) {
if (Math.abs(this._rotation + 64) < this.tol) {
this.line4.filament.gotoAndStop(2);
} else {
this.line4.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation + 122) < this.tol) {
this.line1.filament.gotoAndStop(2);
} else {
this.line1.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation - 93) < this.tol) {
this.line2.filament.gotoAndStop(2);
} else {
this.line2.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation) < this.tol) {
this.line3.filament.gotoAndStop(2);
if (_root.ground.circle4.connected) {
this.line1.filament.gotoAndStop(2);
}
} else {
this.line3.filament.gotoAndStop(1);
}
} else {
this.line1.filament.gotoAndStop(1);
this.line2.filament.gotoAndStop(1);
this.line3.filament.gotoAndStop(1);
this.line4.filament.gotoAndStop(1);
}
if (_root.ground.circle3Hit.hitTest(_root.player._x, _root.player._y, true)) {
_root.ground.glow3.gotoAndStop(2);
if (Key.isDown(32)) {
if (Key.isDown(37) || (Key.isDown(65))) {
this._rotation = this._rotation - this.speed;
} else if (Key.isDown(39) || (Key.isDown(68))) {
this._rotation = this._rotation + this.speed;
}
}
} else {
_root.ground.glow3.gotoAndStop(1);
}
}
Instance of Symbol 642 MovieClip "circle4" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.speed = 2;
this._rotation = random(360);
this.connected = false;
this.tol = 4;
this.played = true;
}
onClipEvent (enterFrame) {
if ((((Math.abs(this._rotation) < this.tol) || (Math.abs(this._rotation + 76) < this.tol)) || (Math.abs(this._rotation - 172) < this.tol)) || (Math.abs(this._rotation - 142) < this.tol)) {
this.connected = true;
if ((_root.ground.circle3.line1.filament._currentframe == 2) && (Math.abs(_root.ground.circle3._rotation) < this.tol)) {
if (!this.played) {
this.played = true;
_root.singleSpark.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
} else {
if (this.played) {
this.played = false;
}
this.connected = false;
}
if ((_root.ground.circle3.line1.filament._currentframe == 2) && (Math.abs(_root.ground.circle3._rotation) < this.tol)) {
if (Math.abs(this._rotation + 76) < this.tol) {
this.line4.filament.gotoAndStop(2);
} else {
this.line4.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation - 172) < this.tol) {
this.line1.filament.gotoAndStop(2);
} else {
this.line1.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation) < this.tol) {
this.line3.filament.gotoAndStop(2);
if (_root.ground.circle5.connected) {
this.line1.filament.gotoAndStop(2);
}
} else {
this.line3.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation - 142) < this.tol) {
this.line2.filament.gotoAndStop(2);
} else {
this.line2.filament.gotoAndStop(1);
}
} else {
this.line1.filament.gotoAndStop(1);
this.line2.filament.gotoAndStop(1);
this.line3.filament.gotoAndStop(1);
this.line4.filament.gotoAndStop(1);
}
if (_root.ground.circle4Hit.hitTest(_root.player._x, _root.player._y, true)) {
_root.ground.glow4.gotoAndStop(2);
if (Key.isDown(32)) {
if (Key.isDown(37) || (Key.isDown(65))) {
this._rotation = this._rotation - this.speed;
} else if (Key.isDown(39) || (Key.isDown(68))) {
this._rotation = this._rotation + this.speed;
}
}
} else {
_root.ground.glow4.gotoAndStop(1);
}
}
Instance of Symbol 643 MovieClip "circle5" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.speed = 2;
this._rotation = random(360);
this.connected = false;
this.tol = 4;
this.played = true;
}
onClipEvent (enterFrame) {
if ((((Math.abs(this._rotation) < this.tol) || (Math.abs(this._rotation + 47) < this.tol)) || (Math.abs(this._rotation - 102) < this.tol)) || (Math.abs(this._rotation - 151) < this.tol)) {
this.connected = true;
if ((Math.abs(_root.ground.circle4._rotation) < this.tol) && (_root.ground.circle4.line1.filament._currentframe == 2)) {
if (!this.played) {
this.played = true;
_root.singleSpark.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
} else {
if (this.played) {
this.played = false;
}
this.connected = false;
}
if ((Math.abs(_root.ground.circle4._rotation) < this.tol) && (_root.ground.circle4.line1.filament._currentframe == 2)) {
if (Math.abs(this._rotation + 47) < this.tol) {
this.line4.filament.gotoAndStop(2);
} else {
this.line4.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation - 102) < this.tol) {
this.line2.filament.gotoAndStop(2);
} else {
this.line2.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation - 151) < this.tol) {
this.line1.filament.gotoAndStop(2);
} else {
this.line1.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation) < this.tol) {
if (_root.ground.circle6.connected) {
this.line2.filament.gotoAndStop(2);
}
this.line3.filament.gotoAndStop(2);
} else {
this.line3.filament.gotoAndStop(1);
}
} else {
this.line1.filament.gotoAndStop(1);
this.line2.filament.gotoAndStop(1);
this.line3.filament.gotoAndStop(1);
this.line4.filament.gotoAndStop(1);
}
if (_root.ground.circle5Hit.hitTest(_root.player._x, _root.player._y, true)) {
_root.ground.glow5.gotoAndStop(2);
if (Key.isDown(32)) {
if (Key.isDown(37) || (Key.isDown(65))) {
this._rotation = this._rotation - this.speed;
} else if (Key.isDown(39) || (Key.isDown(68))) {
this._rotation = this._rotation + this.speed;
}
}
} else {
_root.ground.glow5.gotoAndStop(1);
}
}
Instance of Symbol 644 MovieClip "circle6" in Symbol 645 MovieClip Frame 1
onClipEvent (load) {
this.speed = 2;
this._rotation = random(360);
this.connected = false;
this.tol = 4;
this.played = true;
}
onClipEvent (enterFrame) {
if (((Math.abs(this._rotation) < this.tol) || (Math.abs(this._rotation + 137) < this.tol)) || (Math.abs(this._rotation - 72) < this.tol)) {
this.connected = true;
if ((_root.ground.circle5.line2.filament._currentframe == 2) && (Math.abs(_root.ground.circle5._rotation) < this.tol)) {
if (!this.played) {
this.played = true;
_root.singleSpark.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
} else {
if (this.played) {
this.played = false;
}
this.connected = false;
}
if ((_root.ground.circle5.line2.filament._currentframe == 2) && (Math.abs(_root.ground.circle5._rotation) < this.tol)) {
if (Math.abs(this._rotation + 137) < this.tol) {
this.line1.filament.gotoAndStop(2);
} else {
this.line1.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation) < this.tol) {
this.line3.filament.gotoAndStop(2);
this.line1.filament.gotoAndStop(2);
} else {
this.line3.filament.gotoAndStop(1);
}
if (Math.abs(this._rotation - 72) < this.tol) {
this.line2.filament.gotoAndStop(2);
} else {
this.line2.filament.gotoAndStop(1);
}
} else {
this.line1.filament.gotoAndStop(1);
this.line2.filament.gotoAndStop(1);
this.line3.filament.gotoAndStop(1);
}
if ((this.line1.filament._currentframe == 2) && (this.line3.filament._currentframe == 2)) {
if (_root.ground.downfallEnd.endGlow._currentframe == 1) {
_root.sparkOn.start(0, 1);
_root.ground.downfallEnd.endGlow.gotoAndStop(2);
}
} else {
_root.ground.downfallEnd.endGlow.gotoAndStop(1);
}
if (_root.ground.circle6Hit.hitTest(_root.player._x, _root.player._y, true)) {
_root.ground.glow6.gotoAndStop(2);
if (Key.isDown(32)) {
if (Key.isDown(37) || (Key.isDown(65))) {
this._rotation = this._rotation - this.speed;
} else if (Key.isDown(39) || (Key.isDown(68))) {
this._rotation = this._rotation + this.speed;
}
}
} else {
_root.ground.glow6.gotoAndStop(1);
}
}
Symbol 771 MovieClip Frame 1
stop();
Symbol 779 MovieClip Frame 15
stop();
Symbol 793 MovieClip Frame 1
stop();
Symbol 805 MovieClip Frame 1
gotoAndPlay(random(8) + 1);
Symbol 805 MovieClip Frame 8
gotoAndPlay (2);
Symbol 811 MovieClip Frame 1
gotoAndPlay(random(50) + 1);
Symbol 811 MovieClip Frame 100
gotoAndPlay (2);
Symbol 816 MovieClip Frame 1
stop();
Symbol 816 MovieClip Frame 40
stop();
Instance of Symbol 811 MovieClip in Symbol 818 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._currentframe < 60) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.killPlayer();
}
}
if (_root.isOnScreen(this)) {
if (this._currentframe == 90) {
_root.steam3.start(0, 1);
}
}
}
Instance of Symbol 811 MovieClip in Symbol 818 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._currentframe < 60) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.killPlayer();
}
}
if (_root.isOnScreen(this)) {
if (this._currentframe == 90) {
_root.steam3.start(0, 1);
}
}
}
Instance of Symbol 811 MovieClip in Symbol 818 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._currentframe < 60) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.killPlayer();
}
}
if (_root.isOnScreen(this)) {
if (this._currentframe == 90) {
_root.steam3.start(0, 1);
}
}
}
Symbol 822 MovieClip Frame 1
stop();
Symbol 826 MovieClip Frame 1
stop();
Symbol 830 Button
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (7);
}
on (release) {
getURL ("http://www.begamer.com/index/index/strange-laboratory", "_blank");
}
Symbol 833 MovieClip Frame 1
stop();
Symbol 833 MovieClip Frame 6
stop();
Symbol 871 Button
on (release) {
getURL ("http://begamer.com/walkthrough/strange-laboratory", "_blank");
}
Symbol 886 MovieClip Frame 12
gotoAndPlay (1);
Symbol 914 MovieClip Frame 1
stop();
Symbol 923 MovieClip Frame 1
stop();
Instance of Symbol 900 MovieClip "slideGridPart" in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.grateClosed = true;
}
onClipEvent (enterFrame) {
if (_root.ground.ground.trapDoorSwitch1.switchOn && (_root.ground.ground.trapDoorSwitch2.switchOn)) {
if (this.grateClosed) {
this.grateClosed = false;
_root.machine2.start(0, 1);
}
} else {
this.grateClosed = true;
}
if (this.grateClosed) {
if (this._y > 21.5) {
this._y = this._y - 0.5;
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 10)) {
_root.player._y = _root.player._y + 2;
}
}
} else if (this._y < 78) {
this._y = this._y + 0.5;
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 10)) {
_root.player._y = _root.player._y + 2;
}
}
}
Instance of Symbol 902 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.endX = this._x;
}
onClipEvent (enterFrame) {
if (!_root.ground.midGearLevel.switchOn) {
if (this._x > 7840) {
this._x = this._x - 3;
}
} else if (this._x < 8044) {
this._x = this._x + 3;
}
}
Instance of Symbol 904 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.endY = this._y - 200;
}
onClipEvent (enterFrame) {
if (_root.ground.doorSwitch.switchOn) {
if (this._y > this.endY) {
this._y = this._y - 1.5;
}
} else if (this._y < (this.endY + 200)) {
this._y = this._y + 1.5;
}
}
Instance of Symbol 484 MovieClip "trapDoorSwitch1" in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 5;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 484 MovieClip "trapDoorSwitch2" in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 5;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 911 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.topY = 126;
this.medY = 160;
this.botY = 192;
this._y = this.medY;
this.played = true;
}
onClipEvent (enterFrame) {
if (_root.ground.pipePuzzle.pipeArrow.dir == 1) {
if (Math.abs(this._y - this.topY) > 5) {
this._y = this._y + (((this.topY - this._y) / Math.abs(this.topY - this._y)) * _root.pistonSpeed);
} else {
this._y = this.topY;
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 2) {
if (Math.abs(this._y - this.medY) > 5) {
this._y = this._y + (((this.medY - this._y) / Math.abs(this.medY - this._y)) * _root.pistonSpeed);
} else {
this._y = this.medY;
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 3) {
if (Math.abs(this._y - this.botY) > 5) {
this._y = this._y + (((this.botY - this._y) / Math.abs(this.botY - this._y)) * _root.pistonSpeed);
} else {
this._y = this.botY;
}
}
if (((Math.abs(this._y - this.topY) < 5) || (Math.abs(this._y - this.botY) < 5)) || (Math.abs(this._y - this.medY) < 5)) {
if (!this.played) {
this.played = true;
_root.doorsClose.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
}
Instance of Symbol 911 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.topY = 81;
this.medY = 160;
this.botY = 237;
this.ranY = this.botY + (Math.random() * (this.topY - this.botY));
this._y = this.medY;
this.played = true;
}
onClipEvent (enterFrame) {
if (_root.ground.pipePuzzle.pipeArrow.dir == 1) {
if (this._y > this.topY) {
this._y = this._y - _root.pistonSpeed;
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 2) {
if (Math.abs(this._y - this.medY) > 2) {
this._y = this._y + (((this.medY - this._y) / Math.abs(this.medY - this._y)) * _root.pistonSpeed);
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 3) {
if (this._y < this.botY) {
this._y = this._y + _root.pistonSpeed;
}
}
if (((Math.abs(this._y - this.topY) < 5) || (Math.abs(this._y - this.botY) < 5)) || (Math.abs(this._y - this.medY) < 5)) {
if (!this.played) {
this.played = true;
_root.doorsClose.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
}
Instance of Symbol 911 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.topY = 37;
this.medY = 160;
this.botY = 281;
this.ranY = this.botY + (Math.random() * (this.topY - this.botY));
this._y = this.medY;
this.played = true;
}
onClipEvent (enterFrame) {
if (_root.ground.pipePuzzle.pipeArrow.dir == 1) {
if (this._y > this.topY) {
this._y = this._y - _root.pistonSpeed;
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 2) {
if (Math.abs(this._y - this.medY) > 2) {
this._y = this._y + (((this.medY - this._y) / Math.abs(this.medY - this._y)) * _root.pistonSpeed);
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 3) {
if (this._y < this.botY) {
this._y = this._y + _root.pistonSpeed;
}
}
if (((Math.abs(this._y - this.topY) < 5) || (Math.abs(this._y - this.botY) < 5)) || (Math.abs(this._y - this.medY) < 5)) {
if (!this.played) {
this.played = true;
_root.doorsClose.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
}
Instance of Symbol 911 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.topY = -7;
this.medY = 160;
this.botY = 327;
this.ranY = this.botY + (Math.random() * (this.topY - this.botY));
this._y = this.medY;
this.played = true;
}
onClipEvent (enterFrame) {
if (_root.ground.pipePuzzle.pipeArrow.dir == 1) {
if (this._y > this.topY) {
this._y = this._y - _root.pistonSpeed;
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 2) {
if (Math.abs(this._y - this.medY) > 2) {
this._y = this._y + (((this.medY - this._y) / Math.abs(this.medY - this._y)) * _root.pistonSpeed);
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 3) {
if (this._y < this.botY) {
this._y = this._y + _root.pistonSpeed;
}
}
if (((Math.abs(this._y - this.topY) < 5) || (Math.abs(this._y - this.botY) < 5)) || (Math.abs(this._y - this.medY) < 5)) {
if (!this.played) {
this.played = true;
_root.doorsClose.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
}
Instance of Symbol 911 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.topY = -51;
this.medY = 160;
this.botY = 368;
this.ranY = this.botY + (Math.random() * (this.topY - this.botY));
this._y = this.medY;
this.played = true;
}
onClipEvent (enterFrame) {
if (_root.ground.pipePuzzle.pipeArrow.dir == 1) {
if (this._y > this.topY) {
this._y = this._y - _root.pistonSpeed;
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 2) {
if (Math.abs(this._y - this.medY) > 2) {
this._y = this._y + (((this.medY - this._y) / Math.abs(this.medY - this._y)) * _root.pistonSpeed);
}
} else if (_root.ground.pipePuzzle.pipeArrow.dir == 3) {
if (this._y < this.botY) {
this._y = this._y + _root.pistonSpeed;
}
}
if (((Math.abs(this._y - this.topY) < 5) || (Math.abs(this._y - this.botY) < 5)) || (Math.abs(this._y - this.medY) < 5)) {
if (!this.played) {
this.played = true;
_root.doorsClose.start(0, 1);
}
} else if (this.played) {
this.played = false;
}
}
Instance of Symbol 914 MovieClip "endPlatform" in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.active = false;
this.setY = 0;
}
onClipEvent (enterFrame) {
if (!this.active) {
if (_root.ground.platformGenerator.powered) {
if (_root.ground.platformTrigger.hitTest(_root.player)) {
this.active = true;
this.setY = _root.ground._y;
this.gotoAndStop(2);
_root.machineLoop.start(0, 1);
}
}
} else {
this.gear._rotation = this.gear._rotation + 2;
_root.frontGround.handRail._y = _root.frontGround.handRail._y - 3.63;
this._y = this._y - 3;
}
}
Instance of Symbol 96 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.movePaintings) {
this._y = 260;
}
}
Instance of Symbol 923 MovieClip in Symbol 924 MovieClip Frame 1
onClipEvent (load) {
this.xSpeed = 0;
this.madeMessage = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
if (!this.madeMessage) {
_root.makeMessage("Press space to activate the launcher", 60);
this.madeMessage = true;
}
if (Key.isDown(32)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
}
_root.player.ySpeed = -40;
_root.player.jumping = true;
_root.bouncepadSound.start(0, 1);
}
}
this._x = this._x + this.xSpeed;
if (this.hitTest((_root.player._x + _root.player.hWidth) + 10, _root.player._y + 30, true) || (this.hitTest((_root.player._x - _root.player.hWidth) - 10, _root.player._y + 30, true))) {
_root.player.maxSpeed = 6.5;
} else {
_root.player.maxSpeed = 8.2;
}
if (_root.ground.ground.slideGridPart._y > 23) {
if ((this._x > 4883) && (this._x < 5113)) {
if (this._x > 4998) {
this._x = 5113;
} else {
this._x = 4883;
}
}
}
if (_root.player.xSpeed > 0) {
if (this._x < 5153) {
if (this.hitTest((_root.player._x + _root.player.hWidth) + 5, _root.player._y + 30, true)) {
this._x = this._x + _root.player.xSpeed;
this.gear._rotation = this.gear._rotation + (_root.player.xSpeed * 2);
this.gear2._rotation = this.gear2._rotation - (_root.player.xSpeed * 2);
}
}
} else if (this._x > 4013) {
if (this.hitTest((_root.player._x - _root.player.hWidth) - 5, _root.player._y + 30, true)) {
this._x = this._x + _root.player.xSpeed;
this.gear._rotation = this.gear._rotation + (_root.player.xSpeed * 2);
this.gear2._rotation = this.gear2._rotation - (_root.player.xSpeed * 2);
}
}
}
Symbol 989 MovieClip Frame 1
this.gotoAndStop(random(11) + 2);
Symbol 1010 MovieClip Frame 1
stop();
Symbol 1016 MovieClip Frame 1
stop();
Symbol 1020 MovieClip Frame 1
stop();
Instance of Symbol 1011 MovieClip "pipeArrow" in Symbol 1021 MovieClip Frame 1
onClipEvent (load) {
this.dir = 2;
this.arrowR = 0;
}
onClipEvent (enterFrame) {
this.rot1 = _root.ground.pipePuzzle.pipe1.endR;
this.rot2 = _root.ground.pipePuzzle.pipe2.endR;
this.rot3 = _root.ground.pipePuzzle.pipe3.endR;
this.rot4 = _root.ground.pipePuzzle.pipe4.endR;
if (((this.rot1 == 0) && ((this.rot2 == 90) || (this.rot2 == 270))) && (this.rot3 == 90)) {
this.dir = 1;
this.pipesArrow.gotoAndStop(2);
} else if (((this.rot1 == 90) && ((this.rot2 == 0) || (this.rot2 == 180))) && ((this.rot4 == 90) || (this.rot4 == 270))) {
this.dir = 2;
this.pipesArrow.gotoAndStop(2);
} else if ((((this.rot1 == 0) && ((this.rot2 == 90) || (this.rot2 == 270))) && (this.rot3 == 0)) && ((this.rot4 == 0) || (this.rot4 == 180))) {
this.dir = 3;
this.pipesArrow.gotoAndStop(2);
} else {
this.pipesArrow.gotoAndStop(1);
}
this.arrowR = (this.dir - 1) * 89;
if (Math.abs(this.pipesArrow._rotation - this.arrowR) > 3) {
this.pipesArrow._rotation = this.pipesArrow._rotation + (1.5 * ((this.arrowR - this.pipesArrow._rotation) / Math.abs(this.arrowR - this.pipesArrow._rotation)));
} else {
this.pipesArrow._rotation = this.arrowR;
}
}
Instance of Symbol 1016 MovieClip "pipe1" in Symbol 1021 MovieClip Frame 1
onClipEvent (load) {
this.endR = 90;
this.rX = 0;
this.rY = 0;
this.spaceDown = false;
this.messaged = false;
}
onClipEvent (enterFrame) {
this._rotation = 57.2957795130823 * Math.atan2(this.rY, this.rX);
this.rX = this.rX + (((10 * Math.sin((Math.PI/180) * this.endR)) - this.rX) / 5);
this.rY = this.rY + (((-10 * Math.cos((Math.PI/180) * this.endR)) - this.rY) / 5);
if (this.hitTest(_root.player)) {
this.gotoAndStop(2);
if (!this.messaged) {
_root.makeMessage("Press space to turn pipe", 60);
}
if (!this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = true;
this.endR = this.endR + 90;
if (random(2) == 0) {
_root.squeak1.start(0, 1);
} else {
_root.squeak2.start(0, 1);
}
if (this.endR == 360) {
this.endR = 0;
}
}
}
} else {
this.gotoAndStop(1);
}
if (!Key.isDown(32)) {
this.spaceDown = false;
}
}
Instance of Symbol 1016 MovieClip "pipe3" in Symbol 1021 MovieClip Frame 1
onClipEvent (load) {
this.endR = 0;
this.rX = 0;
this.rY = 0;
this.spaceDown = false;
}
onClipEvent (enterFrame) {
this._rotation = 57.2957795130823 * Math.atan2(this.rY, this.rX);
this.rX = this.rX + (((10 * Math.sin((Math.PI/180) * this.endR)) - this.rX) / 5);
this.rY = this.rY + (((-10 * Math.cos((Math.PI/180) * this.endR)) - this.rY) / 5);
if (this.hitTest(_root.player)) {
this.gotoAndStop(2);
if (!this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = true;
this.endR = this.endR + 90;
if (random(2) == 0) {
_root.squeak1.start(0, 1);
} else {
_root.squeak2.start(0, 1);
}
if (this.endR == 360) {
this.endR = 0;
}
}
}
} else {
this.gotoAndStop(1);
}
if (!Key.isDown(32)) {
this.spaceDown = false;
}
}
Instance of Symbol 1020 MovieClip "pipe2" in Symbol 1021 MovieClip Frame 1
onClipEvent (load) {
this.endR = 0;
this.rX = 0;
this.rY = 0;
this.spaceDown = false;
}
onClipEvent (enterFrame) {
this._rotation = 57.2957795130823 * Math.atan2(this.rY, this.rX);
this.rX = this.rX + (((10 * Math.sin((Math.PI/180) * this.endR)) - this.rX) / 5);
this.rY = this.rY + (((-10 * Math.cos((Math.PI/180) * this.endR)) - this.rY) / 5);
if (this.hitTest(_root.player)) {
this.gotoAndStop(2);
if (!this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = true;
this.endR = this.endR + 90;
if (random(2) == 0) {
_root.squeak1.start(0, 1);
} else {
_root.squeak2.start(0, 1);
}
if (this.endR == 360) {
this.endR = 0;
}
}
}
} else {
this.gotoAndStop(1);
}
if (!Key.isDown(32)) {
this.spaceDown = false;
}
}
Instance of Symbol 1020 MovieClip "pipe4" in Symbol 1021 MovieClip Frame 1
onClipEvent (load) {
this.endR = 90;
this.rX = 0;
this.rY = 0;
this.spaceDown = false;
}
onClipEvent (enterFrame) {
this._rotation = 57.2957795130823 * Math.atan2(this.rY, this.rX);
this.rX = this.rX + (((10 * Math.sin((Math.PI/180) * this.endR)) - this.rX) / 5);
this.rY = this.rY + (((-10 * Math.cos((Math.PI/180) * this.endR)) - this.rY) / 5);
if (this.hitTest(_root.player)) {
this.gotoAndStop(2);
if (!this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = true;
this.endR = this.endR + 90;
if (random(2) == 0) {
_root.squeak1.start(0, 1);
} else {
_root.squeak2.start(0, 1);
}
if (this.endR == 360) {
this.endR = 0;
}
}
}
} else {
this.gotoAndStop(1);
}
if (!Key.isDown(32)) {
this.spaceDown = false;
}
}
Symbol 1027 MovieClip Frame 1
stop();
Symbol 1032 MovieClip Frame 1
stop();
Instance of Symbol 889 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.gears = 0;
this.active = false;
this.gear1._visible = false;
this.gear2._visible = false;
this.played = false;
}
onClipEvent (enterFrame) {
if (!this.active) {
if (this.gears == 2) {
this.gear1._visible = true;
this.gear2._visible = true;
this.active = true;
} else if (this.gears == 1) {
this.gear1._visible = true;
this.gear1._rotation = this.gear1._rotation - 1;
}
if (this.hitTest(_root.player)) {
_root.makeMessage(("This machine needs " + (2 - this.gears)) + " more gears to work, press space to place gears", 0);
if (Key.isDown(32)) {
this.gears = this.gears + _root.gearsCollected;
_root.gearsCollected = 0;
}
}
} else {
if (!this.played) {
this.played = true;
_root.singleSpark.start(0, 1);
_root.ladderRise.start(0, 1);
}
if (_root.ground.ground.slidingDoor2._y < 118) {
_root.ground.ground.slidingDoor2._y = _root.ground.ground.slidingDoor2._y + 1.2;
this.gear1._rotation = this.gear1._rotation - 1;
this.gear2._rotation = this.gear2._rotation + 1;
} else {
this.gearPole.gearPoleTeeth.stop();
}
}
}
Instance of Symbol 624 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_root.tempBonusArray[1] = 1;
_root.bonusGearsTimer = 0;
_root.bonusGearSound.start(0, 1);
_root.bonusGearsDisplay._x = 63;
if (_root.bonusGearsDisplay.gear2._alpha < 100) {
_root.bonusGearsDisplay.gear2._alpha = 100;
}
_root.bonusGearsDisplay.gear2._xscale = (_root.bonusGearsDisplay.gear2._yscale = 29);
}
}
}
Instance of Symbol 891 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.killPlayer();
}
}
Instance of Symbol 453 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(int(_root.ground.ground.trapDoorSwitch2.switchOn) + 1);
}
Instance of Symbol 453 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(int(_root.ground.ground.trapDoorSwitch1.switchOn) + 1);
}
Instance of Symbol 581 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 621 MovieClip "doorSwitch" in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
this.messaged = false;
this.played = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
this.switchGear.gotoAndStop(2);
if (!this.messaged) {
_root.makeMessage("Press space to pull lever", 60);
this.messaged = true;
}
if (Key.isDown(32)) {
if ((this._currentframe == 1) || (this._currentframe == 30)) {
_root.leverSound.start(0, 1);
if (!this.played) {
this.played = true;
_root.generatorSound.start(0, 1);
}
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
}
} else {
this.switchGear.gotoAndStop(1);
}
if (this.switchOn) {
if (this._currentframe == 1) {
this.play();
}
} else if (this._currentframe == 30) {
this.play();
}
}
Instance of Symbol 581 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 581 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 3;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
_root.checkpointSound.start(0, 1);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
}
}
}
}
Instance of Symbol 534 MovieClip "platformGenerator" in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.maxGears = 3;
this.gears = 0;
this.powered = false;
}
onClipEvent (enterFrame) {
if (!this.powered) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage(("This machine needs " + (this.maxGears - this.gears)) + " extra gears to work, press space to deposit gears", 0);
if (Key.isDown(32)) {
if (_root.gearsCollected > 0) {
if (_root.gearsCollected < (this.maxGears - this.gears)) {
this.gears = this.gears + _root.gearsCollected;
_root.gearsCollected = 0;
}
if ((_root.gearsCollected - (this.maxGears - this.gears)) >= 0) {
_root.gearsCollected = _root.gearsCollected - (this.maxGears - this.gears);
this.gears = this.maxGears;
}
}
}
}
this.gearsClip.gotoAndStop(this.gears + 1);
if (this.gears == this.maxGears) {
_root.spark4.start(0, 1);
this.powered = true;
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 581 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 974 MovieClip "fire" in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._alpha > 2) {
if (!_root.movePaintings) {
this._yscale++;
this._alpha = this._alpha - 5;
}
}
}
Instance of Symbol 1041 MovieClip "painting1" in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.paintingNumber = 3;
this.gotoAndStop(paintingNumber);
this.spaceDown = true;
}
onClipEvent (enterFrame) {
if (!Key.isDown(32)) {
this.spaceDown = true;
}
if (_root.movePaintings) {
if (_root.player.hitTest(_root.ground.painting1)) {
if (!_root.paintingExplain) {
_root.makeMessage("Press space once to select a painting & again to swap it", 150);
_root.paintingExplain = true;
}
this.highLighter.gotoAndStop(2);
if (this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = false;
if (_root.selectedPainting == 0) {
_root.oldPainting = this;
_root.selectedPainting = 1;
_root.clickSound2.start(0, 1);
} else {
_root.tempPainting = _root.oldPainting._currentframe;
_root.oldPainting.gotoAndStop(this._currentframe);
this.gotoAndStop(_root.tempPainting);
_root.selectedPainting = 0;
_root.oldPainting = 0;
_root.pageTurn2.start(0, 1);
}
if (((((_root.ground.painting1._currentframe == 1) && (_root.ground.painting2._currentframe == 2)) && (_root.ground.painting3._currentframe == 3)) && (_root.ground.painting4._currentframe == 4)) && (_root.ground.painting5._currentframe == 5)) {
_root.movePaintings = false;
}
}
}
} else {
this.highLighter.gotoAndStop(1);
}
if (_root.oldPainting == this) {
this.lights.gotoAndStop(2);
} else {
this.lights.gotoAndStop(1);
}
} else {
this.highLighter.gotoAndStop(1);
this.lights.gotoAndStop(2);
}
}
Instance of Symbol 1041 MovieClip "painting2" in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.paintingNumber = 1;
this.gotoAndStop(paintingNumber);
this.spaceDown = true;
}
onClipEvent (enterFrame) {
if (!Key.isDown(32)) {
this.spaceDown = true;
}
if (_root.movePaintings) {
if (_root.player.hitTest(_root.ground.painting2)) {
this.highLighter.gotoAndStop(2);
if (this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = false;
if (_root.selectedPainting == 0) {
_root.oldPainting = this;
_root.selectedPainting = 1;
_root.clickSound2.start(0, 1);
} else {
_root.tempPainting = _root.oldPainting._currentframe;
_root.oldPainting.gotoAndStop(this._currentframe);
this.gotoAndStop(_root.tempPainting);
_root.selectedPainting = 0;
_root.oldPainting = 0;
_root.pageTurn2.start(0, 1);
}
if (((((_root.ground.painting1._currentframe == 1) && (_root.ground.painting2._currentframe == 2)) && (_root.ground.painting3._currentframe == 3)) && (_root.ground.painting4._currentframe == 4)) && (_root.ground.painting5._currentframe == 5)) {
_root.movePaintings = false;
}
}
}
} else {
this.highLighter.gotoAndStop(1);
}
if (_root.oldPainting == this) {
this.lights.gotoAndStop(2);
} else {
this.lights.gotoAndStop(1);
}
} else {
this.highLighter.gotoAndStop(1);
this.lights.gotoAndStop(2);
}
}
Instance of Symbol 1041 MovieClip "painting3" in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.paintingNumber = 5;
this.gotoAndStop(paintingNumber);
this.spaceDown = true;
}
onClipEvent (enterFrame) {
if (!Key.isDown(32)) {
this.spaceDown = true;
}
if (_root.movePaintings) {
if (_root.player.hitTest(_root.ground.painting3)) {
this.highLighter.gotoAndStop(2);
if (this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = false;
if (_root.selectedPainting == 0) {
_root.oldPainting = this;
_root.selectedPainting = 1;
_root.clickSound2.start(0, 1);
} else {
_root.tempPainting = _root.oldPainting._currentframe;
_root.oldPainting.gotoAndStop(this._currentframe);
this.gotoAndStop(_root.tempPainting);
_root.selectedPainting = 0;
_root.oldPainting = 0;
_root.pageTurn2.start(0, 1);
}
if (((((_root.ground.painting1._currentframe == 1) && (_root.ground.painting2._currentframe == 2)) && (_root.ground.painting3._currentframe == 3)) && (_root.ground.painting4._currentframe == 4)) && (_root.ground.painting5._currentframe == 5)) {
_root.movePaintings = false;
}
}
}
} else {
this.highLighter.gotoAndStop(1);
}
if (_root.oldPainting == this) {
this.lights.gotoAndStop(2);
} else {
this.lights.gotoAndStop(1);
}
} else {
this.highLighter.gotoAndStop(1);
this.lights.gotoAndStop(2);
}
}
Instance of Symbol 1041 MovieClip "painting4" in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.paintingNumber = 2;
this.gotoAndStop(paintingNumber);
this.spaceDown = true;
}
onClipEvent (enterFrame) {
if (!Key.isDown(32)) {
this.spaceDown = true;
}
if (_root.movePaintings) {
if (_root.player.hitTest(_root.ground.painting4)) {
this.highLighter.gotoAndStop(2);
if (this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = false;
if (_root.selectedPainting == 0) {
_root.oldPainting = this;
_root.selectedPainting = 1;
_root.clickSound2.start(0, 1);
} else {
_root.tempPainting = _root.oldPainting._currentframe;
_root.oldPainting.gotoAndStop(this._currentframe);
this.gotoAndStop(_root.tempPainting);
_root.selectedPainting = 0;
_root.oldPainting = 0;
_root.pageTurn2.start(0, 1);
}
if (((((_root.ground.painting1._currentframe == 1) && (_root.ground.painting2._currentframe == 2)) && (_root.ground.painting3._currentframe == 3)) && (_root.ground.painting4._currentframe == 4)) && (_root.ground.painting5._currentframe == 5)) {
_root.movePaintings = false;
}
}
}
} else {
this.highLighter.gotoAndStop(1);
}
if (_root.oldPainting == this) {
this.lights.gotoAndStop(2);
} else {
this.lights.gotoAndStop(1);
}
} else {
this.highLighter.gotoAndStop(1);
this.lights.gotoAndStop(2);
}
}
Instance of Symbol 1041 MovieClip "painting5" in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.paintingNumber = 4;
this.gotoAndStop(paintingNumber);
this.spaceDown = true;
}
onClipEvent (enterFrame) {
if (!Key.isDown(32)) {
this.spaceDown = true;
}
if (_root.movePaintings) {
if (_root.player.hitTest(_root.ground.painting5)) {
this.highLighter.gotoAndStop(2);
if (this.spaceDown) {
if (Key.isDown(32)) {
this.spaceDown = false;
if (_root.selectedPainting == 0) {
_root.oldPainting = this;
_root.selectedPainting = 1;
_root.clickSound2.start(0, 1);
} else {
_root.tempPainting = _root.oldPainting._currentframe;
_root.oldPainting.gotoAndStop(this._currentframe);
this.gotoAndStop(_root.tempPainting);
_root.selectedPainting = 0;
_root.oldPainting = 0;
_root.pageTurn2.start(0, 1);
}
if (((((_root.ground.painting1._currentframe == 1) && (_root.ground.painting2._currentframe == 2)) && (_root.ground.painting3._currentframe == 3)) && (_root.ground.painting4._currentframe == 4)) && (_root.ground.painting5._currentframe == 5)) {
_root.movePaintings = false;
}
}
}
} else {
this.highLighter.gotoAndStop(1);
}
if (_root.oldPainting == this) {
this.lights.gotoAndStop(2);
} else {
this.lights.gotoAndStop(1);
}
} else {
this.highLighter.gotoAndStop(1);
this.lights.gotoAndStop(2);
}
}
Instance of Symbol 96 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.madeMessage = false;
}
onClipEvent (enterFrame) {
if (!this.madeMessage) {
if (this.hitTest(_root.player)) {
this.madeMessage = true;
_root.makeMessage("Don't get hit by the electricity", 72);
}
}
}
Instance of Symbol 624 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_root.tempBonusArray[0] = 1;
_root.bonusGearsTimer = 0;
_root.bonusGearsDisplay._x = 63;
if (_root.bonusGearsDisplay.gear1._alpha < 100) {
_root.bonusGearsDisplay.gear1._alpha = 100;
}
_root.bonusGearsDisplay.gear1._xscale = (_root.bonusGearsDisplay.gear1._yscale = 29);
_root.bonusGearSound.start(0, 1);
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 2;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 96 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.ground.pipePuzzle.pipe1.endR = 90;
_root.ground.pipePuzzle.pipe2.endR = 0;
_root.ground.pipePuzzle.pipe4.endR = 90;
}
}
Instance of Symbol 96 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.ground.pipePuzzle.pipe1.endR = 0;
_root.ground.pipePuzzle.pipe2.endR = 90;
_root.ground.pipePuzzle.pipe3.endR = 90;
}
}
Instance of Symbol 96 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.ground.pipePuzzle.pipe1.endR = 0;
_root.ground.pipePuzzle.pipe2.endR = 90;
_root.ground.pipePuzzle.pipe3.endR = 0;
_root.ground.pipePuzzle.pipe4.endR = 0;
}
}
Instance of Symbol 581 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 621 MovieClip "midGearLevel" in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
this.messaged = false;
this.played = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
this.switchGear.gotoAndStop(2);
if (!this.messaged) {
_root.makeMessage("Press space to pull lever", 30);
this.messaged = true;
}
if (Key.isDown(32)) {
if ((this._currentframe == 1) || (this._currentframe == 30)) {
_root.leverSound.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
if (!this.played) {
this.played = true;
_root.machine2.start(0, 1);
}
}
}
}
} else {
this.switchGear.gotoAndStop(1);
}
if (this.switchOn) {
if (this._currentframe == 1) {
this.play();
}
} else if (this._currentframe == 30) {
this.play();
}
}
Instance of Symbol 621 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
this.active = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
this.switchGear.gotoAndStop(2);
if (Key.isDown(32)) {
this.active = true;
_root.frontGround.steamWalk._visible = false;
if ((this._currentframe == 1) || (this._currentframe == 30)) {
_root.leverSound.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
}
} else {
this.switchGear.gotoAndStop(1);
}
if (this.active) {
if (_root.frontGround.steamRun._yscale > 0) {
_root.frontGround.steamRun._yscale = _root.frontGround.steamRun._yscale - 3;
} else {
_root.frontGround.steamRun._visible = false;
}
}
if (this.switchOn) {
if (this._currentframe == 1) {
this.play();
}
} else if (this._currentframe == 30) {
this.play();
}
}
Instance of Symbol 580 MovieClip in Symbol 1042 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 1;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 1107 MovieClip in Symbol 1109 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(255));
this._yscale = 100 * Math.pow(-1, random(5));
}
onClipEvent (enterFrame) {
if (Math.abs(((_root.frontGround._y + _parent._y) + this._y) - _root.player._y) < 50) {
if (this.hitTest(_root.player)) {
_root.killPlayer();
}
}
if (_root.isOnScreen(this._parent)) {
if ((this._currentframe == 1) || (this._currentframe == 110)) {
d = random(3);
if (d == 0) {
_root.spark1.start(0, 1);
} else if (d == 1) {
_root.spark2.start(0, 1);
} else {
_root.spark3.start(0, 1);
}
}
if ((this._currentframe == 87) || (this._currentframe == 197)) {
if (random(2) == 0) {
_root.spark4.start(0, 1);
} else {
_root.spark5.start(0, 1);
}
}
}
}
Symbol 1119 MovieClip Frame 1
stop();
Instance of Symbol 453 MovieClip in Symbol 1122 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(int(_root.ground.ground.trapDoorSwitch1.switchOn) + 1);
}
Instance of Symbol 453 MovieClip in Symbol 1122 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(int(_root.ground.ground.trapDoorSwitch2.switchOn) + 1);
}
Instance of Symbol 1116 MovieClip "steamWalk" in Symbol 1122 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._visible) {
if (this.hitter.hitTest(_root.player._x, _root.player._y, true)) {
_root.killPlayer();
}
if (_root.isOnScreen(this)) {
if ((this._currentframe == 80) || (this._currentframe == 170)) {
_root.steam2.start(0, 1);
}
}
}
}
Instance of Symbol 1119 MovieClip "steamRun" in Symbol 1122 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._yscale >= 5) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.killPlayer();
}
if (_root.isOnScreen(this)) {
if (this.steam._currentframe == 1) {
_root.steamFade.start(0, 1);
}
}
}
}
Symbol 1125 MovieClip Frame 1
stop();
Symbol 1147 MovieClip Frame 1
stop();
Symbol 1167 MovieClip Frame 1
stop();
Instance of Symbol 1160 MovieClip in Symbol 1171 MovieClip Frame 1
onClipEvent (load) {
this.ySpeed = 0;
this.speed = 0;
this.plunging = 1;
this.timer = 0;
this.retract = 0;
this.madeMessage = 0;
this.played = false;
}
onClipEvent (enterFrame) {
_root.ground.ground.plungerGear2._x = _root.ground.ground.plungerGear2._x + (((440 + this.retract) - _root.ground.ground.plungerGear2._x) / 3);
_root.ground.ground.plungerGear1._x = _root.ground.ground.plungerGear1._x + (((374 - this.retract) - _root.ground.ground.plungerGear1._x) / 3);
if (this.madeMessage == 0) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.madeMessage = 1;
_root.makeMessage("Hold space to plunge", 60);
}
}
if (this.plunging == 1) {
this.retract = 20;
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
if (Key.isDown(32)) {
this.plunging = 2;
_root.crank.start(0, 1);
}
}
} else if (this.plunging == 2) {
if (Key.isDown(32) && (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true))) {
this.retract = 0;
if (this._y < -747) {
_root.player._y = _root.player._y + 2;
this._y = this._y + 2;
_root.ground.ground.plungerGear1._rotation = _root.ground.ground.plungerGear1._rotation + 4.83380794;
_root.ground.ground.plungerGear2._rotation = _root.ground.ground.plungerGear2._rotation - 4.83380794;
} else {
_root.crank.stop();
}
} else {
this.plunging = 3;
this.ySpeed = 0;
this.timer = 0;
this.speed = (this._y + 837.3) / 8;
_root.crank.stop();
}
} else if (this.plunging == 3) {
this.retract = 20;
this.ySpeed = this.ySpeed - this.speed;
this._y = this._y + this.ySpeed;
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player.jumping = true;
_root.player.ySpeed = _root.player.ySpeed - (this.speed + 1.5);
}
if (this._y <= -837.3) {
_root.ground.ground.plungerGear1._rotation = (_root.ground.ground.plungerGear2._rotation = 0);
this._y = -837.3;
this.plunging = 1;
_root.doorsCloseShort.start(0, 1);
}
}
}
Instance of Symbol 484 MovieClip "jumpSwitch1" in Symbol 1171 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.switchOn) {
if (_root.ground.ground.gearBlocker._x > 240) {
_root.ground.ground.gearBlocker._x = _root.ground.ground.gearBlocker._x - 4;
if (_root.ground.ground.gearBlocker.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x - 4;
}
}
} else if (_root.ground.ground.gearBlocker._x < 520) {
_root.ground.ground.gearBlocker._x = _root.ground.ground.gearBlocker._x + 4;
if (_root.ground.ground.gearBlocker.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + 4;
}
}
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 5;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
_root.machine2.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 498 MovieClip in Symbol 1171 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.gotoAndPlay(3);
_root.player.ySpeed = -18;
_root.player.jumping = true;
_root.bouncepadSound.start(0, 1);
}
}
Symbol 1194 MovieClip Frame 1
stop();
Symbol 1198 MovieClip Frame 1
stop();
Symbol 1205 MovieClip Frame 1
stop();
Symbol 1222 MovieClip Frame 1
stop();
Instance of Symbol 1141 MovieClip "risingBlades" in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.rising = false;
this.speed = 2.2;
this.startSpeed = this.speed;
this.rotSpeed = 10;
this.ladderStartY = _root.ground.ladder.dropLadder._y;
this.startY = this._y;
this.resetting = false;
this.yDif = 0;
}
onClipEvent (enterFrame) {
if (this.resetting) {
if (_root.player.deathTimer >= 29) {
_root.welding.stop();
this.resetting = false;
if (_root.tempBonusArray[1] == 1) {
_root.tempBonusArray[1] = 0;
_root.ground.risingBonus.gotoAndStop(1);
_root.bonusGearsDisplay.gear2._alpha = 20;
_root.bonusGearsDisplay.gear2._xscale = (_root.bonusGearsDisplay.gear2._yscale = 25);
}
this.speed = this.startSpeed;
_root.scrollOn = true;
this.rising = false;
this.rotSpeed = 10;
this._y = this.startY;
_root.ground.ground.fallingCover._y = -3076;
_root.ground.risingLever.blockerYSpeed = 0;
_root.ground.ladder.dropLadder._y = this.ladderStartY;
_root.ground.risingLever.pulled = false;
_root.ground.risingLever.ladderSpeed = 0;
_root.ground.risingLever.rotSpeed = 0;
_root.ground.risingLever.lever._rotation = -23;
_root.ground.ground.risingBlocker._yscale = 0;
_root.ground.risingLever.played = false;
_root.ground.risingLever.played2 = false;
}
}
if (this.rising) {
if (this.hitTest(_root.player._x, _root.player._y + _root.player.hHeight, false) || ((this._y + this._parent._y) < _root.player._y)) {
_root.killPlayer();
this.resetting = true;
}
if (!_root.gamePaused) {
this._y = this._y - this.speed;
this.blade1._rotation = this.blade1._rotation - this.rotSpeed;
this.blade2._rotation = this.blade2._rotation - (this.rotSpeed * 1.3);
this.blade3._rotation = this.blade3._rotation + this.rotSpeed;
this.blade4._rotation = this.blade4._rotation - (this.rotSpeed * 0.9);
this.blade5._rotation = this.blade5._rotation + (this.rotSpeed * 1.1);
if (this._y < -5350) {
this.speed = this.speed * 0.88;
this.rotSpeed = this.rotSpeed * 0.98;
if (!_root.muted) {
if (_root.welding.getVolume() > 0) {
_root.welding.setVolume(_root.welding.getVolume() - 5);
}
}
} else if (!_root.muted) {
if (((7000 / this.yDif) + 60) < 200) {
_root.welding.setVolume((10000 / this.yDif) + 30);
}
}
this.yDif = (this._y + this._parent._y) - _root.player._y;
}
}
}
Instance of Symbol 581 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 581 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 581 MovieClip "topGear" in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y)) {
if (this._currentframe == 1) {
_root.gearsCollected++;
this.gotoAndPlay(2);
_root.gearsCollectedDisplay._x = 660;
_root.gearsCollectedTimer = 0;
_root.gearsCollectedDisplay.gotoAndPlay(2);
_root.gearSound.start(0, 1);
}
}
}
Instance of Symbol 534 MovieClip "genMachine" in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.maxGears = 3;
this.gears = 0;
this.powered = false;
this.inc = 0;
this.closed = false;
this.active = true;
i = 1;
while (i <= 5) {
tG = _root.ground.ground["lBlocker" + i];
tG.endX = 1067;
tG = _root.ground.ground["rBlocker" + i];
tG.endX = 1210;
i++;
}
this.played = false;
}
onClipEvent (enterFrame) {
if (this.active) {
if (_root.player.hitTest(_root.ground.genChecker)) {
this.active = false;
}
i = 1;
while (i <= 5) {
tLG = _root.ground.ground["lBlocker" + i];
tRG = _root.ground.ground["rBlocker" + i];
tLG._x = tLG._x + ((tLG.endX - tLG._x) / 5);
tRG._x = tRG._x + ((tRG.endX - tRG._x) / 5);
i++;
}
if (!this.powered) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage(((("Collected " + this.gears) + "/") + this.maxGears) + " gears", 0);
if (_root.gearsCollected > 0) {
if (_root.gearsCollected < (this.maxGears - this.gears)) {
this.gears = this.gears + _root.gearsCollected;
_root.gearsCollected = 0;
_root.singleSpark.start(0, 1);
}
if ((_root.gearsCollected - (this.maxGears - this.gears)) >= 0) {
_root.gearsCollected = _root.gearsCollected - (this.maxGears - this.gears);
this.gears = this.maxGears;
}
}
}
this.gearsClip.gotoAndStop(this.gears + 1);
if (this.gears == this.maxGears) {
if (!this.played) {
this.played = true;
_root.airBlast.start(0, 1);
}
if (this.inc > 5) {
this.powered = true;
this.gotoAndPlay(2);
this.inc = 0;
} else {
this.inc = this.inc + 0.5;
tLG = _root.ground.ground["lBlocker" + this.inc];
tRG = _root.ground.ground["rBlocker" + this.inc];
tLG.endX = 967;
tRG.endX = 1310;
}
}
} else if (!this.closed) {
if (_root.ground.blockChecker.hitTest(_root.player._x, _root.player._y, true)) {
this.closed = true;
_root.airBlast.start(0, 1);
_root.ground.leftJet._visible = true;
_root.ground.rightJet._visible = true;
_root.player.canJetPack = false;
_root.player.jetPacking = false;
}
} else if (this.inc > 5) {
this.powered = true;
this.gotoAndPlay(2);
this.inc = 0;
} else {
this.inc = this.inc + 0.5;
tLG = _root.ground.ground["lBlocker" + this.inc];
tRG = _root.ground.ground["rBlocker" + this.inc];
tLG.endX = 1067;
tRG.endX = 1210;
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 1;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkpointSound.start(0, 1);
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
}
}
}
}
Instance of Symbol 1174 MovieClip "jetPackUpgrade" in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._visible) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
this._visible = false;
_root.player.canJetPack = true;
_root.makeMessage("Hold space to fly!", 60);
}
}
}
Instance of Symbol 1177 MovieClip "leftJet" in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
this.xSpeed = 0;
this.ySpeed = 0;
this.timer = 0;
}
onClipEvent (enterFrame) {
if (this._visible) {
if (this.xSpeed == 0) {
this.xSpeed = -10;
this.ySpeed = -10;
this._x = _root.player._x - _root.ground._x;
this._y = _root.player._y - _root.ground._y;
this.timer = 0;
}
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.xSpeed = this.xSpeed * 0.98;
this.ySpeed = this.ySpeed + 0.8;
this.timer++;
this._rotation = this._rotation - 3;
if ((this.timer > 120) || (_root.player.deathTimer > 25)) {
this._visible = false;
this.xSpeed = 0;
}
}
}
Instance of Symbol 1180 MovieClip "rightJet" in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
this.xSpeed = 0;
this.ySpeed = 0;
this.timer = 0;
}
onClipEvent (enterFrame) {
if (this._visible) {
if (this.xSpeed == 0) {
this.xSpeed = 10;
this.ySpeed = -10;
this._x = _root.player._x - _root.ground._x;
this._y = _root.player._y - _root.ground._y;
this.timer = 0;
}
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.xSpeed = this.xSpeed * 0.98;
this.ySpeed = this.ySpeed + 0.8;
this.timer++;
this._rotation = this._rotation + 3;
if ((this.timer > 120) || (_root.player.deathTimer > 25)) {
this._visible = false;
this.xSpeed = 0;
}
}
}
Instance of Symbol 96 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y + _root.player.hHeight, true)) {
_root.killPlayer();
player.jetPacking = false;
_root.ground.rightJet._visible = true;
_root.ground.leftJet._visible = true;
if (!_root.ground.genMachine) {
if (_root.ground.topGear._currentframe == 15) {
_root.ground.topGear.gotoAndStop(1);
_root.gearsCollected = 0;
}
}
}
}
Instance of Symbol 1198 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.acX = (_root.ground.accessCode._x = 190);
this.acY = (_root.ground.accessCode._y = -1211);
this.acS = (_root.ground.accessCode._xscale = (_root.ground.accessCode._yscale = 8));
this.acA = (_root.ground.accessCode._alpha = 0);
this.madeMessage = false;
}
onClipEvent (enterFrame) {
_root.ground.accessCode._x = _root.ground.accessCode._x + ((this.acX - _root.ground.accessCode._x) / 6);
_root.ground.accessCode._y = _root.ground.accessCode._y + ((this.acY - _root.ground.accessCode._y) / 6);
_root.ground.accessCode._xscale = _root.ground.accessCode._xscale + ((this.acS - _root.ground.accessCode._xscale) / 4);
_root.ground.accessCode._yscale = _root.ground.accessCode._yscale + ((this.acS - _root.ground.accessCode._yscale) / 4);
_root.ground.accessCode._alpha = _root.ground.accessCode._alpha + ((this.acA - _root.ground.accessCode._alpha) / 4);
if (this.hitTest(_root.player._x, _root.player._y, true)) {
this.gotoAndStop(2);
if (!this.madeMessage) {
this.madeMessage = true;
_root.makeMessage("Hold space to view the message on the table", 60);
}
} else if (this._currentframe != 1) {
this.gotoAndStop(1);
}
if (this.hitTest(_root.player._x, _root.player._y, true) && (Key.isDown(32))) {
if (this.acA == 0) {
this.miniCode._visible = false;
this.acX = 333;
this.acY = -1250;
this.acS = 120;
this.acA = 100;
}
} else if (this.acA == 100) {
this.miniCode._visible = true;
this.acX = 190;
this.acY = -1211;
this.acS = 8;
this.acA = 0;
}
}
Instance of Symbol 96 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.done = 0;
}
onClipEvent (enterFrame) {
if (this.done == 0) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.ground.bookcase.secretBook.gotoAndStop(2);
_root.makeMessage("Press space to read literature", 0);
if (Key.isDown(32)) {
this.done = 1;
_root.ladderRise.start(0, 1);
_root.pageTurn2.start(0, 1);
_root.ground.bookcase.secretBook.gotoAndStop(1);
}
} else {
_root.ground.bookcase.secretBook.gotoAndStop(1);
}
} else if (this.done == 1) {
if (_root.ground.bookcase.secretBook._rotation < 100) {
_root.ground.bookcase.secretBook._rotation = _root.ground.bookcase.secretBook._rotation + 7;
} else {
this.done = 2;
}
} else if ((this.done >= 2) && (this.done < 20)) {
this.done++;
if (_root.ground.ground.passwordCover._yxscale > 1) {
_root.ground.ground.passwordCover._yscale = _root.ground.ground.passwordCover._yscale - 0.8;
}
} else if (this.done >= 20) {
if (_root.ground.ground.passwordCover._yscale > 1) {
_root.ground.ground.passwordCover._yscale = _root.ground.ground.passwordCover._yscale - 0.8;
}
if (_root.ground.bookcase.secretBook._rotation > 0) {
_root.ground.bookcase.secretBook._rotation = _root.ground.bookcase.secretBook._rotation - 2;
}
}
}
Instance of Symbol 96 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.num1 = 0;
this.num2 = 0;
this.num3 = 0;
this.numSelect = 1;
this.active = false;
this.passA = 0;
this.passX = 162;
this.passY = -1590;
this.passS = 25;
this.spaceDown = false;
this.upDown = false;
this.downDown = false;
this.leftDown = false;
this.rightDown = false;
this.unlocked = false;
}
onClipEvent (enterFrame) {
_root.ground.passCode._x = _root.ground.passCode._x + ((this.passX - _root.ground.passCode._x) / 4);
_root.ground.passCode._y = _root.ground.passCode._y + ((this.passY - _root.ground.passCode._y) / 4);
_root.ground.passCode._alpha = _root.ground.passCode._alpha + ((this.passA - _root.ground.passCode._alpha) / 4);
_root.ground.passCode._xscale = _root.ground.passCode._xscale + ((this.passS - _root.ground.passCode._xscale) / 4);
_root.ground.passCode._yscale = _root.ground.passCode._yscale + ((this.passS - _root.ground.passCode._yscale) / 4);
if (!this.unlocked) {
if (!Key.isDown(32)) {
this.spaceDown = false;
}
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.makeMessage("Press space to show/hide the door lock", 0);
_root.ground.ground.passwordDoor.gotoAndStop(2);
if (Key.isDown(32)) {
if (!this.spaceDown) {
if (!this.active) {
this.active = true;
_root.ground.passCode.number1.gotoAndStop(1);
_root.ground.passCode.number2.gotoAndStop(1);
_root.ground.passCode.number3.gotoAndStop(1);
_root.ground.passCode["number" + this.numSelect].gotoAndStop(2);
} else {
this.active = false;
_root.ground.passCode.number1.gotoAndStop(1);
_root.ground.passCode.number2.gotoAndStop(1);
_root.ground.passCode.number3.gotoAndStop(1);
if (((this.num1 == 2) && (this.num2 == 0)) && (this.num3 == 9)) {
this.unlocked = true;
_root.ground.ground.passwordDoor.gotoAndStop(1);
_root.generatorSound.start(0, 1);
}
}
}
this.spaceDown = true;
}
} else {
_root.ground.ground.passwordDoor.gotoAndStop(1);
}
if (this.active) {
_root.player._xscale = 100;
_root.player.maxSpeed = 0;
_root.player.canJump = false;
if (this.passA == 0) {
this.passA = 100;
this.passX = 288;
this.passY = -1580;
this.passS = 75;
}
i = 1;
while (i <= 3) {
_root.ground.passCode["number" + i].numberStrip._x = _root.ground.passCode["number" + i].numberStrip._x + (((-20 * this["num" + i]) - _root.ground.passCode["number" + i].numberStrip._x) / 4);
if (this["num" + i] >= 10) {
if (_root.ground.passCode["number" + i].numberStrip._x <= -199) {
_root.ground.passCode["number" + i].numberStrip._x = 0;
this["num" + i] = 0;
}
}
if (this["num" + i] <= -1) {
if (_root.ground.passCode["number" + i].numberStrip._x >= 19) {
_root.ground.passCode["number" + i].numberStrip._x = -180;
this["num" + i] = 9;
}
}
i++;
}
if (!this.leftDown) {
if (Key.isDown(37) || (Key.isDown(65))) {
this["num" + this.numSelect]--;
this.leftDown = true;
_root.clickSound2.start(0, 1);
}
}
if (!this.rightDown) {
if (Key.isDown(39) || (Key.isDown(68))) {
this["num" + this.numSelect]++;
this.rightDown = true;
_root.clickSound2.start(0, 1);
}
}
if (!this.upDown) {
if (Key.isDown(38) || (Key.isDown(87))) {
_root.ground.passCode["number" + this.numSelect].gotoAndStop(1);
_root.clickSound.start(0, 1);
this.numSelect--;
if (this.numSelect == 0) {
this.numSelect = 3;
}
_root.ground.passCode["number" + this.numSelect].gotoAndStop(2);
this.upDown = true;
}
}
if (!this.downDown) {
if (Key.isDown(40) || (Key.isDown(83))) {
_root.clickSound.start(0, 1);
_root.ground.passCode["number" + this.numSelect].gotoAndStop(1);
this.numSelect++;
if (this.numSelect == 4) {
this.numSelect = 1;
}
_root.ground.passCode["number" + this.numSelect].gotoAndStop(2);
this.downDown = true;
}
}
if ((!Key.isDown(37)) && (!Key.isDown(65))) {
this.leftDown = false;
}
if ((!Key.isDown(39)) && (!Key.isDown(68))) {
this.rightDown = false;
}
if ((!Key.isDown(38)) && (!Key.isDown(87))) {
this.upDown = false;
}
if ((!Key.isDown(40)) && (!Key.isDown(83))) {
this.downDown = false;
}
} else {
_root.player.maxSpeed = 8.2;
if (this.passA == 100) {
this.passA = 0;
this.passX = 162;
this.passY = -1590;
this.passS = 25;
}
}
} else if (_root.ground.ground.passwordDoor._y > -1760) {
_root.ground.ground.passwordDoor._y = _root.ground.ground.passwordDoor._y - 2;
}
}
Instance of Symbol 1174 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._visible) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
this._visible = false;
_root.player.canJetPack = true;
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 2;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 624 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_root.tempBonusArray[0] = 1;
_root.bonusGearsTimer = 0;
_root.bonusGearSound.start(0, 1);
_root.bonusGearsDisplay._x = 63;
if (_root.bonusGearsDisplay.gear1._alpha < 100) {
_root.bonusGearsDisplay.gear1._alpha = 100;
}
_root.bonusGearsDisplay.gear1._xscale = (_root.bonusGearsDisplay.gear1._yscale = 29);
}
}
}
Instance of Symbol 96 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y - _root.player.hHeight, true)) {
_root.killPlayer();
player.jetPacking = false;
_root.ground.rightJet._visible = true;
_root.ground.leftJet._visible = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y + _root.player.hHeight, true)) {
_root.killPlayer();
player.jetPacking = false;
_root.ground.rightJet._visible = true;
_root.ground.leftJet._visible = true;
}
}
Instance of Symbol 1210 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y + _root.player.hHeight, true)) {
_root.killPlayer();
player.jetPacking = false;
_root.ground.rightJet._visible = true;
_root.ground.leftJet._visible = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.done = false;
}
onClipEvent (enterFrame) {
if (!this.done) {
if (!_root.player.dead) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.ground.leftJet._visible = true;
_root.ground.rightJet._visible = true;
_root.player.canJetPack = false;
_root.player.jetPacking = false;
this.done = true;
}
}
}
}
Instance of Symbol 96 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y + _root.player.hHeight, true)) {
_root.killPlayer();
player.jetPacking = false;
_root.ground.rightJet._visible = true;
_root.ground.leftJet._visible = true;
}
}
Instance of Symbol 96 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y - _root.player.hHeight, true)) {
_root.killPlayer();
player.jetPacking = false;
_root.ground.rightJet._visible = true;
_root.ground.leftJet._visible = true;
}
}
Instance of Symbol 1222 MovieClip "risingLever" in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.pulled = false;
this.ladderSpeed = 0;
this.rotSpeed = 0;
_root.ground.ground.risingBlocker._yscale = 0;
this.blockerYSpeed = 0;
this.played = false;
this.played2 = false;
}
onClipEvent (enterFrame) {
if (!this.pulled) {
if (_root.ground.risingPuzzleChecker.hitTest(_root.player._x, _root.player._y, true)) {
_root.makeMessage("Press space to pull lever", 0);
if (Key.isDown(32)) {
_root.clickSound.start(0, 1);
_root.welding.start(0, 999);
_root.welding.setVolume(0);
_root.ground.risingBlades.rising = true;
this.pulled = true;
_root.ground.ground.risingBlocker._yscale = 100;
this.gotoAndStop(1);
}
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else {
if (_root.ground.ladder.dropLadder._y < -2926) {
_root.ground.ladder.dropLadder._y = _root.ground.ladder.dropLadder._y + this.ladderSpeed;
if (player.onLadder) {
_root.player._y = _root.player._y + this.ladderSpeed;
}
this.ladderSpeed = this.ladderSpeed + 0.4;
} else {
if (!this.played) {
_root.doorsCloseShort.start(0, 1);
this.played = true;
}
_root.ground.ladder.dropLadder._y = -2926;
}
if (_root.ground.ground.fallingCover._y < -2815) {
this.blockerYSpeed = this.blockerYSpeed + 0.7;
_root.ground.ground.fallingCover._y = _root.ground.ground.fallingCover._y + this.blockerYSpeed;
} else if (!this.played2) {
this.played2 = true;
_root.doorsCloseShort.start(0, 1);
}
this.gotoAndStop(1);
if (this.lever._rotation > -150) {
this.rotSpeed = this.rotSpeed + 1;
this.lever._rotation = this.lever._rotation - this.rotSpeed;
}
}
}
Instance of Symbol 624 MovieClip "risingBonus" in Symbol 1225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_root.tempBonusArray[1] = 1;
_root.bonusGearsTimer = 0;
_root.bonusGearSound.start(0, 1);
_root.bonusGearsDisplay._x = 63;
if (_root.bonusGearsDisplay.gear2._alpha < 100) {
_root.bonusGearsDisplay.gear2._alpha = 100;
}
_root.bonusGearsDisplay.gear2._xscale = (_root.bonusGearsDisplay.gear2._yscale = 29);
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 4;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1225 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 3;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Symbol 1247 MovieClip Frame 1
stop();
Symbol 1250 MovieClip Frame 1
stop();
Instance of Symbol 1255 MovieClip "bolt" in Symbol 1256 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.abs((_root.frontGround._y + _parent._y) - _root.player._y) < 55) {
if (this.hitTest(_root.player)) {
_root.killPlayer();
_root.player.jetPacking = false;
_root.ground.rightJet._visible = true;
_root.ground.leftJet._visible = true;
}
}
if (_root.isOnScreen(this._parent)) {
if ((this._currentframe == 1) || (this._currentframe == 139)) {
d = random(3);
if (d == 0) {
_root.spark1.start(0, 1);
} else if (d == 1) {
_root.spark2.start(0, 1);
} else {
_root.spark3.start(0, 1);
}
} else if ((this._currentframe == 88) || (this._currentframe == 198)) {
if (random(2) == 0) {
_root.spark4.start(0, 1);
} else {
_root.spark5.start(0, 1);
}
}
}
}
Instance of Symbol 1255 MovieClip "bolt" in Symbol 1258 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.abs((_root.frontGround._y + _parent._y) - _root.player._y) < 55) {
if (this.hitTest(_root.player)) {
_root.killPlayer();
_root.player.jetPacking = false;
_root.ground.rightJet._visible = true;
_root.ground.leftJet._visible = true;
}
}
if (_root.isOnScreen(this._parent)) {
if ((this._currentframe == 1) || (this._currentframe == 139)) {
d = random(3);
if (d == 0) {
_root.spark1.start(0, 1);
} else if (d == 1) {
_root.spark2.start(0, 1);
} else {
_root.spark3.start(0, 1);
}
} else if ((this._currentframe == 88) || (this._currentframe == 198)) {
if (random(2) == 0) {
_root.spark4.start(0, 1);
} else {
_root.spark5.start(0, 1);
}
}
}
}
Instance of Symbol 1256 MovieClip in Symbol 1260 MovieClip Frame 1
onClipEvent (load) {
this.bolt.gotoAndPlay(3);
}
Instance of Symbol 1256 MovieClip in Symbol 1260 MovieClip Frame 1
onClipEvent (load) {
this.bolt.gotoAndPlay(97);
}
Instance of Symbol 1258 MovieClip in Symbol 1260 MovieClip Frame 1
onClipEvent (load) {
this.bolt.gotoAndPlay(100);
}
Instance of Symbol 1256 MovieClip in Symbol 1260 MovieClip Frame 1
onClipEvent (load) {
this.bolt.gotoAndPlay(168);
}
Instance of Symbol 1258 MovieClip in Symbol 1260 MovieClip Frame 1
onClipEvent (load) {
this.bolt.gotoAndPlay(170);
}
Instance of Symbol 1259 MovieClip in Symbol 1260 MovieClip Frame 1
onClipEvent (enterFrame) {
if (Math.abs(_root.player._y - (_root.frontGround._y + this._y)) < 60) {
if (_root.player._x > ((_root.frontGround._x + this._x) - 100)) {
if (this.hitTest(_root.player)) {
_root.killPlayer();
}
}
}
if (_root.isOnScreen(this)) {
if (this._currentframe == 109) {
_root.steam2.start(0, 1);
}
}
}
Instance of Symbol 1275 MovieClip "ladder1" in Symbol 1277 MovieClip Frame 1
onClipEvent (load) {
this.startY = this._y;
this.angle = 0;
this.speed = 0;
}
onClipEvent (enterFrame) {
this.angle = this.angle + this.speed;
this._y = this.startY + (Math.sin((Math.PI/180) * this.angle) * 50);
_root.ground.ladder.ladder2._y = this.startY - (Math.sin((Math.PI/180) * this.angle) * 50);
if (this.hitTest(_root.player._x, _root.player._y, true)) {
if (_root.player.onLadder) {
_root.player._y = _root.player._y + ((((5 * this.speed) * Math.PI) / 18) * Math.cos((Math.PI/180) * this.angle));
}
}
if (_root.ground.ladder.ladder2.hitTest(_root.player._x, _root.player._y, true)) {
if (_root.player.onLadder) {
_root.player._y = _root.player._y - ((((5 * this.speed) * Math.PI) / 18) * Math.cos((Math.PI/180) * this.angle));
}
}
}
Instance of Symbol 1276 MovieClip "extendLadder" in Symbol 1277 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ground.spinDials.active) {
if (this._x > 8085) {
this._x = this._x - 2;
_root.ground.ladderSticks._x = this._x + 81;
}
} else if (this._x < 8165) {
this._x = this._x + 2;
_root.ground.ladderSticks._x = this._x + 81;
}
}
Symbol 1282 MovieClip Frame 1
stop();
Instance of Symbol 96 MovieClip in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.rotDif = -45;
this.totRot = 0;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this.totRot = (Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif);
this._x = _root.ground.largeGear1._x + (243 * Math.sin(this.totRot));
this._y = _root.ground.largeGear1._y - (243 * Math.cos(this.totRot));
}
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + ((((_root.largeGearSpeed * 243) * Math.PI) * Math.cos(this.totRot)) / 180);
_root.player._y = _root.player._y + ((((_root.largeGearSpeed * 243) * Math.PI) * Math.sin(this.totRot)) / 180);
}
}
Instance of Symbol 96 MovieClip in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.rotDif = 45;
this.totRot = 0;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this.totRot = (Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif);
this._x = _root.ground.largeGear1._x + (243 * Math.sin(this.totRot));
this._y = _root.ground.largeGear1._y - (243 * Math.cos(this.totRot));
}
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + ((((_root.largeGearSpeed * 243) * Math.PI) * Math.cos(this.totRot)) / 180);
_root.player._y = _root.player._y + ((((_root.largeGearSpeed * 243) * Math.PI) * Math.sin(this.totRot)) / 180);
}
}
Instance of Symbol 96 MovieClip in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.rotDif = 135;
this.totRot = 0;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this.totRot = (Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif);
this._x = _root.ground.largeGear1._x + (243 * Math.sin(this.totRot));
this._y = _root.ground.largeGear1._y - (243 * Math.cos(this.totRot));
}
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + ((((_root.largeGearSpeed * 243) * Math.PI) * Math.cos(this.totRot)) / 180);
_root.player._y = _root.player._y + ((((_root.largeGearSpeed * 243) * Math.PI) * Math.sin(this.totRot)) / 180);
}
}
Instance of Symbol 96 MovieClip in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.rotDif = -135;
this.totRot = 0;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this.totRot = (Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif);
this._x = _root.ground.largeGear1._x + (243 * Math.sin(this.totRot));
this._y = _root.ground.largeGear1._y - (243 * Math.cos(this.totRot));
}
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + ((((_root.largeGearSpeed * 243) * Math.PI) * Math.cos(this.totRot)) / 180);
_root.player._y = _root.player._y + ((((_root.largeGearSpeed * 243) * Math.PI) * Math.sin(this.totRot)) / 180);
}
}
Instance of Symbol 96 MovieClip in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.stage = 1;
this.ySpeed = 0;
this.startY = this._y;
this.partsY = new Array(_root.ground.part3._y, _root.ground.part2._y, _root.ground.part1._y);
this.active = false;
this.madeMessage = false;
this.played1 = false;
this.played2 = false;
this.played3 = false;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
if (this.active) {
if (this.stage == 1) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.ground.part4.lever.gotoAndStop(2);
if (!this.madeMessage) {
_root.makeMessage("Press space to be launched", 60);
this.madeMessage = true;
}
if (Key.isDown(32)) {
_root.ground.part4.lever._rotation = -10;
_root.ground.part4.lever.gotoAndStop(1);
this.stage = 2;
_root.airBlast.start(0, 1);
this.played1 = false;
this.played2 = false;
this.played3 = false;
}
} else {
_root.ground.part4.lever.gotoAndStop(1);
}
}
if (this.stage == 2) {
if (_root.ground.part4.lever._rotation < 0) {
_root.ground.part4.lever._rotation++;
}
this.ySpeed = this.ySpeed - 0.5;
this._y = this._y + this.ySpeed;
_root.ground.part4._y = this._y;
if (_root.ground.part3._y > -198) {
_root.ground.part3._y = _root.ground.part3._y + this.ySpeed;
} else {
_root.ground.part3._y = -198;
if (!this.played3) {
this.played3 = true;
_root.doorsCloseShort.start(0, 1);
}
}
if (_root.ground.part2._y > 5) {
_root.ground.part2._y = _root.ground.part2._y + this.ySpeed;
} else {
_root.ground.part2._y = 5;
if (!this.played2) {
this.played2 = true;
_root.doorsCloseShort.start(0, 1);
}
}
if (_root.ground.part1._y > 207) {
_root.ground.part1._y = _root.ground.part1._y + this.ySpeed;
} else {
_root.ground.part1._y = 207;
if (!this.played1) {
this.played1 = true;
_root.doorsCloseShort.start(0, 1);
}
}
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 10, true)) {
_root.player._y = _root.player._y + this.ySpeed;
}
if (this._y < -393) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 10, true)) {
_root.player.ySpeed = -37;
_root.player.jumping = true;
}
this.ySpeed = 0;
this._y = -393;
_root.ground.part4._y = this._y;
this.stage = 3;
_root.doorsCloseShort.start(0, 1);
}
}
if (this.stage == 3) {
this.ySpeed = this.ySpeed + 0.2;
if (this._y < this.startY) {
this._y = this._y + this.ySpeed;
_root.ground.part4._y = _root.ground.part4._y + this.ySpeed;
if (this._y > this.startY) {
this._y = startY;
_root.ground.part4._y = this.startY;
this.stage = 1;
this.ySpeed = 0;
}
}
if (_root.ground.part3._y < this.partsY[0]) {
_root.ground.part3._y = _root.ground.part3._y + this.ySpeed;
if (_root.ground.part3._y > this.partsY[0]) {
_root.ground.part3._y = this.partsY[0];
}
}
if (_root.ground.part2._y < this.partsY[1]) {
_root.ground.part2._y = _root.ground.part2._y + this.ySpeed;
if (_root.ground.part2._y > this.partsY[1]) {
_root.ground.part2._y = this.partsY[1];
}
}
if (_root.ground.part1._y < this.partsY[2]) {
_root.ground.part1._y = _root.ground.part1._y + this.ySpeed;
if (_root.ground.part1._y > this.partsY[2]) {
_root.ground.part1._y = this.partsY[2];
}
}
}
} else if (_root.ground.lightSwitches1._currentframe == 4) {
this.active = true;
}
}
}
Instance of Symbol 1281 MovieClip "droppingPlatformCloud1" in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.up = true;
this.timer = 0;
this.interval = 3;
_root.ground.cloud.droppingPlatformCloud1._x = this._x;
_root.ground.cloud.droppingPlatformCloud1._y = this._y;
}
onClipEvent (enterFrame) {
this.timer++;
if (this.timer > (this.interval * 30)) {
if (this.up) {
this.up = false;
this.gotoAndPlay(2);
this.timer = 0;
} else {
this.gotoAndPlay(15);
this.timer = 0;
this.up = true;
}
}
}
Instance of Symbol 1281 MovieClip "droppingPlatformCloud2" in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.up = true;
this.timer = 0;
this.interval = 3;
_root.ground.cloud.droppingPlatformCloud1._x = this._x;
_root.ground.cloud.droppingPlatformCloud1._y = this._y;
}
onClipEvent (enterFrame) {
this.timer++;
if (this.timer > (this.interval * 30)) {
if (this.up) {
this.up = false;
this.gotoAndPlay(2);
this.timer = 0;
} else {
this.gotoAndPlay(15);
this.timer = 0;
this.up = true;
}
}
}
Instance of Symbol 1281 MovieClip "droppingPlatformCloud3" in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.up = true;
this.timer = 0;
this.interval = 3;
_root.ground.cloud.droppingPlatformCloud1._x = this._x;
_root.ground.cloud.droppingPlatformCloud1._y = this._y;
}
onClipEvent (enterFrame) {
this.timer++;
if (this.timer > (this.interval * 30)) {
if (this.up) {
this.up = false;
this.gotoAndPlay(2);
this.timer = 0;
} else {
this.gotoAndPlay(15);
this.timer = 0;
this.up = true;
}
}
}
Instance of Symbol 1281 MovieClip "droppingPlatformCloud4" in Symbol 1283 MovieClip Frame 1
onClipEvent (load) {
this.up = true;
this.timer = 0;
this.interval = 3;
_root.ground.cloud.droppingPlatformCloud1._x = this._x;
_root.ground.cloud.droppingPlatformCloud1._y = this._y;
}
onClipEvent (enterFrame) {
this.timer++;
if (this.timer > (this.interval * 30)) {
if (this.up) {
this.up = false;
this.gotoAndPlay(2);
this.timer = 0;
} else {
this.gotoAndPlay(15);
this.timer = 0;
this.up = true;
}
}
}
Symbol 1295 MovieClip Frame 1
stop();
Instance of Symbol 1301 MovieClip "boilerLid" in Symbol 1302 MovieClip Frame 1
onClipEvent (load) {
this.opened = 0;
_root.ground.cloud.boilerCloud.gotoAndStop(2);
}
onClipEvent (enterFrame) {
if (this.opened == 0) {
this.pressureScale.pointer._rotation = this.pressureScale.pointer._rotation + 2;
if (this.pressureScale.pointer._rotation == 0) {
this.opened = 1;
_root.creak.start(0, 1);
}
} else if (this.opened == 1) {
if (this._rotation < 80) {
this._rotation = this._rotation + 4;
} else {
_root.doorsClose.start(0, 1);
this.opened = 2;
}
if (_root.ground.bonusGear1._y > 215) {
_root.ground.bonusGear1._y--;
}
} else if (this.opened == 2) {
if (_root.ground.bonusGear1._y > 215) {
_root.ground.bonusGear1._y--;
}
_root.ground.cloud.boilerCloud.gotoAndStop(1);
}
}
Symbol 1306 MovieClip Frame 1
stop();
Symbol 1311 MovieClip Frame 6
stop();
Symbol 1312 MovieClip Frame 6
stop();
Symbol 1313 MovieClip Frame 2
stop();
Symbol 1319 MovieClip Frame 1
stop();
Symbol 1375 MovieClip Frame 1
stop();
Instance of Symbol 891 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.killPlayer();
}
}
Instance of Symbol 891 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.killPlayer();
}
}
Instance of Symbol 498 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.gotoAndPlay(3);
_root.player.ySpeed = -19;
_root.player.jumping = true;
_root.bouncepadSound.start(0, 1);
}
}
Instance of Symbol 498 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.player.dead) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.gotoAndPlay(3);
_root.player.ySpeed = -19;
_root.player.jumping = true;
_root.bouncepadSound.start(0, 1);
}
}
}
Instance of Symbol 498 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.player.dead) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.gotoAndPlay(3);
_root.player.ySpeed = -19;
_root.player.jumping = true;
_root.bouncepadSound.start(0, 1);
}
}
}
Instance of Symbol 498 MovieClip "ladderBouncePad" in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.timer = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.gotoAndPlay(3);
_root.player.ySpeed = -20;
_root.player.jumping = true;
_root.bouncepadSound.start(0, 1);
}
}
Instance of Symbol 1360 MovieClip "movingPlatform" in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.xSpeed = 0;
this.limit = false;
this.startX = this._x;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
if (_root.player.deathTimer >= 30) {
this._x = this.startX;
this.limit = false;
_root.ground.leverStick._x = this.startX;
_root.ground.leverStick.active = false;
}
if (!this.limit) {
if (this._x > 2920) {
this.limit = true;
_root.clickSound.start(0, 1);
}
if (_root.ground.leverStick.active) {
if (this.xSpeed < 4) {
this.xSpeed = this.xSpeed + 1;
}
} else {
this.xSpeed = this.xSpeed * 0.75;
}
} else {
this.xSpeed = this.xSpeed * 0.75;
}
this._x = this._x + this.xSpeed;
_root.ground.leverStick._x = _root.ground.leverStick._x + this.xSpeed;
this.gear1._rotation = this.gear1._rotation + ((180 * this.xSpeed) / 70.6858347057703);
this.gear2._rotation = this.gear1._rotation;
this.gear3._rotation = this.gear3._rotation - ((180 * this.xSpeed) / 70.6858347057703);
this.gear4._rotation = this.gear3._rotation;
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + this.xSpeed;
}
}
}
Instance of Symbol 1364 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5)) {
_root.killPlayer();
}
if (_root.isOnScreenDeep(this)) {
trace("on screen");
if (this._currentframe == 98) {
_root.unsheath.start(0, 1);
}
}
}
Instance of Symbol 1365 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.xSpeed = 3;
this.active = false;
this.moveDir = -1;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
this.active = true;
} else {
this.active = false;
}
if (this.active) {
if (this._x < 680) {
this._x = 680;
this.moveDir = this.moveDir * -1;
}
if (this._x > 1150) {
this._x = 1150;
this.moveDir = this.moveDir * -1;
}
this._x = this._x + (this.xSpeed * this.moveDir);
_root.frontGround.movingChains._x = this._x;
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + (this.xSpeed * this.moveDir);
}
}
}
}
Instance of Symbol 1373 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this.hitChecker.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true) || (this.hitChecker.hitTest((_root.player._x + _root.player.hWidth) + 5, (_root.player._y + _root.player.hHeight) - 15, true))) || (this.hitChecker.hitTest((_root.player._x - _root.player.hWidth) - 5, (_root.player._y + _root.player.hHeight) - 15, true))) {
_root.killPlayer();
}
}
Instance of Symbol 1373 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this.hitChecker.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true) || (this.hitChecker.hitTest((_root.player._x + _root.player.hWidth) + 5, (_root.player._y + _root.player.hHeight) - 15, true))) || (this.hitChecker.hitTest((_root.player._x - _root.player.hWidth) - 5, (_root.player._y + _root.player.hHeight) - 15, true))) {
_root.killPlayer();
}
}
Instance of Symbol 1373 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this.hitChecker.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true) || (this.hitChecker.hitTest((_root.player._x + _root.player.hWidth) + 5, (_root.player._y + _root.player.hHeight) - 15, true))) || (this.hitChecker.hitTest((_root.player._x - _root.player.hWidth) - 5, (_root.player._y + _root.player.hHeight) - 15, true))) {
_root.killPlayer();
}
}
Instance of Symbol 484 MovieClip "stopTimerButton" in Symbol 1376 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.player.dead) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
}
} else if (this._currentframe == 5) {
this.play();
}
}
}
Instance of Symbol 484 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (_root.ground.lightSwitches1._currentframe != 4) {
if (_root.ground.lightSwitches1._currentframe == 2) {
_root.ground.lightSwitches1.gotoAndStop(3);
_root.singleSpark.start(0, 1);
} else {
_root.ground.lightSwitches1.gotoAndStop(1);
}
}
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 1375 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y - _root.player.hHeight) - 5, true)) {
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (_root.ground.lightSwitches1._currentframe != 4) {
if (_root.ground.lightSwitches1._currentframe == 1) {
_root.ground.lightSwitches1.gotoAndStop(2);
_root.singleSpark.start(0, 1);
} else {
_root.ground.lightSwitches1.gotoAndStop(1);
}
}
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
}
}
Instance of Symbol 484 MovieClip in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (_root.ground.lightSwitches1._currentframe != 4) {
if (_root.ground.lightSwitches1._currentframe == 3) {
_root.ground.lightSwitches1.gotoAndStop(4);
_root.singleSpark.start(0, 1);
_root.spark4.start(0, 1);
} else {
_root.ground.lightSwitches1.gotoAndStop(1);
}
}
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 484 MovieClip "spinSwitch4" in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 484 MovieClip "spinSwitch3" in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 484 MovieClip "spinSwitch2" in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Instance of Symbol 484 MovieClip "spinSwitch1" in Symbol 1376 MovieClip Frame 1
onClipEvent (load) {
this.switchOn = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._y = _root.player._y + 10;
if (this._currentframe == 1) {
this.play();
_root.metalSwitch.start(0, 1);
if (this.switchOn) {
this.switchOn = false;
} else {
this.switchOn = true;
}
}
} else if (this._currentframe == 5) {
this.play();
}
}
Symbol 1394 MovieClip Frame 1
stop();
Symbol 1394 MovieClip Frame 14
stop();
Instance of Symbol 1399 MovieClip "spinDial1" in Symbol 1406 MovieClip Frame 1
onClipEvent (load) {
this.hand._rotation = random(360) - 180;
this.inLimits = false;
}
onClipEvent (enterFrame) {
if (_root.ground.ground.spinSwitch4._currentframe == 5) {
this.hand._rotation = this.hand._rotation + 3;
this.inLimits = false;
} else if ((this.hand._rotation > 45) && (this.hand._rotation < 90)) {
this.inLimits = true;
} else {
this.inLimits = false;
}
}
Instance of Symbol 1401 MovieClip "spinDial2" in Symbol 1406 MovieClip Frame 1
onClipEvent (load) {
this.hand._rotation = random(360) - 180;
this.inLimits = false;
}
onClipEvent (enterFrame) {
if (_root.ground.ground.spinSwitch2._currentframe == 5) {
this.hand._rotation = this.hand._rotation + 6;
this.inLimits = false;
} else if ((this.hand._rotation < -45) && (this.hand._rotation > -90)) {
this.inLimits = true;
} else {
this.inLimits = false;
}
}
Instance of Symbol 1403 MovieClip "spinDial3" in Symbol 1406 MovieClip Frame 1
onClipEvent (load) {
this.hand._rotation = random(360) - 180;
this.inLimits = false;
}
onClipEvent (enterFrame) {
if (_root.ground.ground.spinSwitch1._currentframe == 5) {
this.hand._rotation = this.hand._rotation - 2;
this.inLimits = false;
} else if ((this.hand._rotation > 135) && (this.hand._rotation < 180)) {
this.inLimits = true;
} else {
this.inLimits = false;
}
}
Instance of Symbol 1405 MovieClip "spinDial4" in Symbol 1406 MovieClip Frame 1
onClipEvent (load) {
this.hand._rotation = random(360) - 180;
this.inLimits = false;
}
onClipEvent (enterFrame) {
if (_root.ground.ground.spinSwitch3._currentframe == 5) {
this.hand._rotation = this.hand._rotation + 3.5;
this.inLimits = false;
} else if ((this.hand._rotation > 0) && (this.hand._rotation < 45)) {
this.inLimits = true;
} else {
this.inLimits = false;
}
}
Symbol 1415 MovieClip Frame 1
stop();
Symbol 1433 MovieClip Frame 1
onEnterFrame = function () {
largeGear1._rotation = largeGear1._rotation + _root.largeGearSpeed;
largeGear1.hexagon._rotation = largeGear1.hexagon._rotation - _root.largeGearSpeed;
gear1._rotation = gear1._rotation - (_root.largeGearSpeed * 5.33333333333333);
gear2._rotation = gear2._rotation + ((_root.largeGearSpeed * 5.33333333333333) * 1.5);
piston._x = gear2._x + (33 * Math.sin((Math.PI/180) * gear2._rotation));
piston._y = gear2._y - (33 * Math.cos((Math.PI/180) * gear2._rotation));
piston._rotation = 15 * Math.sin((Math.PI/180) * gear2._rotation);
piston.hexagon._rotation = -piston._rotation;
};
Instance of Symbol 1280 MovieClip "ladderSticks" in Symbol 1433 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ground.spinDials.active) {
if (this._x > 8647) {
this._x = this._x - 2;
}
}
}
Instance of Symbol 624 MovieClip "bonusGear1" in Symbol 1433 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._y < 220) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_root.tempBonusArray[0] = 1;
_root.bonusGearsTimer = 0;
_root.bonusGearSound.start(0, 1);
_root.bonusGearsDisplay._x = 63;
if (_root.bonusGearsDisplay.gear1._alpha < 100) {
_root.bonusGearsDisplay.gear1._alpha = 100;
}
_root.bonusGearsDisplay.gear1._xscale = (_root.bonusGearsDisplay.gear1._yscale = 29);
}
}
}
}
Instance of Symbol 624 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
_root.tempBonusArray[1] = 1;
_root.bonusGearsTimer = 0;
_root.bonusGearsDisplay._x = 63;
if (_root.bonusGearsDisplay.gear2._alpha < 100) {
_root.bonusGearsDisplay.gear2._alpha = 100;
}
_root.bonusGearsDisplay.gear2._xscale = (_root.bonusGearsDisplay.gear2._yscale = 29);
_root.bonusGearSound.start(0, 1);
}
}
}
Instance of Symbol 1314 MovieClip "leverStick" in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.active = false;
this.madeMessage = false;
this.canPress = true;
this.active2 = true;
}
onClipEvent (enterFrame) {
if (this.active) {
if (this.lever._currentframe == 2) {
this.lever.gotoAndStop(1);
}
} else if (this.lever._currentframe == 1) {
this.lever.gotoAndStop(2);
}
if (!_root.ground.ground.movingPlatform.limit) {
if (this.hitChecker.hitTest(_root.player._x, _root.player._y, true)) {
if (!this.madeMessage) {
_root.makeMessage("Press space to start and stop this platform", 60);
this.madeMessage = true;
}
if (this.canPress) {
if (Key.isDown(32)) {
if (this.active) {
_root.clickSound.start(0, 1);
this.active = false;
} else {
_root.clickSound2.start(0, 1);
this.active = true;
}
this.canPress = false;
}
}
this.panel.gotoAndStop(2);
} else {
this.panel.gotoAndStop(1);
}
if (!Key.isDown(32)) {
this.canPress = true;
}
} else {
this.active = false;
this.panel.gotoAndStop(1);
}
}
Instance of Symbol 1342 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.rotDif = -45;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this._x = _root.ground.largeGear1._x + (243 * Math.sin((Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif)));
this._y = _root.ground.largeGear1._y - (243 * Math.cos((Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif)));
}
}
Instance of Symbol 1342 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.rotDif = 45;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this._x = _root.ground.largeGear1._x + (243 * Math.sin((Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif)));
this._y = _root.ground.largeGear1._y - (243 * Math.cos((Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif)));
}
}
Instance of Symbol 1342 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.rotDif = 135;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this._x = _root.ground.largeGear1._x + (243 * Math.sin((Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif)));
this._y = _root.ground.largeGear1._y - (243 * Math.cos((Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif)));
}
}
Instance of Symbol 1342 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.rotDif = -135;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this._x = _root.ground.largeGear1._x + (243 * Math.sin((Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif)));
this._y = _root.ground.largeGear1._y - (243 * Math.cos((Math.PI/180) * (_root.ground.largeGear1._rotation + this.rotDif)));
}
}
Instance of Symbol 1394 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.up = true;
this.timer = -45;
this.interval = 2;
_root.ground.cloud.droppingPlatformCloud1._x = this._x;
_root.ground.cloud.droppingPlatformCloud1._y = this._y;
}
onClipEvent (enterFrame) {
this.timer++;
if (this.timer > (this.interval * 30)) {
if (this.up) {
this.up = false;
if (_root.isOnScreen(this)) {
_root.platformDrop.start(0, 1);
}
this.gotoAndPlay(2);
this.timer = 0;
} else {
this.gotoAndPlay(15);
if (_root.isOnScreen(this)) {
_root.platformRaise.start(0, 1);
}
this.timer = 0;
this.up = true;
}
}
if (this._currentframe == 1) {
_root.ground.cloud.droppingPlatformCloud1.gotoAndStop(1);
} else {
_root.ground.cloud.droppingPlatformCloud1.gotoAndStop(2);
}
}
Instance of Symbol 1394 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.up = true;
this.interval = 2;
this.timer = (this.interval * 30) - 30;
_root.ground.cloud.droppingPlatformCloud2._x = this._x;
_root.ground.cloud.droppingPlatformCloud2._y = this._y;
}
onClipEvent (enterFrame) {
this.timer++;
if (this.timer > (this.interval * 30)) {
if (this.up) {
this.up = false;
if (_root.isOnScreen(this)) {
_root.platformDrop.start(0, 1);
}
this.gotoAndPlay(2);
this.timer = 0;
} else {
this.gotoAndPlay(15);
if (_root.isOnScreen(this)) {
_root.platformRaise.start(0, 1);
}
this.timer = 0;
this.up = true;
}
}
if (this._currentframe == 1) {
_root.ground.cloud.droppingPlatformCloud2.gotoAndStop(1);
} else {
_root.ground.cloud.droppingPlatformCloud2.gotoAndStop(2);
}
}
Instance of Symbol 1394 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.up = true;
this.timer = -15;
this.interval = 2;
_root.ground.cloud.droppingPlatformCloud3._x = this._x;
_root.ground.cloud.droppingPlatformCloud3._y = this._y;
}
onClipEvent (enterFrame) {
this.timer++;
if (this.timer > (this.interval * 30)) {
if (this.up) {
this.up = false;
this.gotoAndPlay(2);
if (_root.isOnScreen(this)) {
_root.platformDrop.start(0, 1);
}
this.timer = 0;
} else {
this.gotoAndPlay(15);
if (_root.isOnScreen(this)) {
_root.platformRaise.start(0, 1);
}
this.timer = 0;
this.up = true;
}
}
if (this._currentframe == 1) {
_root.ground.cloud.droppingPlatformCloud3.gotoAndStop(1);
} else {
_root.ground.cloud.droppingPlatformCloud3.gotoAndStop(2);
}
}
Instance of Symbol 1394 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.up = true;
this.interval = 2;
this.timer = (this.interval * 30) + 30;
_root.ground.cloud.droppingPlatformCloud4._x = this._x;
_root.ground.cloud.droppingPlatformCloud4._y = this._y;
}
onClipEvent (enterFrame) {
this.timer++;
if (this.timer > (this.interval * 30)) {
if (this.up) {
this.up = false;
this.gotoAndPlay(2);
if (_root.isOnScreen(this)) {
_root.platformDrop.start(0, 1);
}
this.timer = 0;
} else {
this.gotoAndPlay(15);
if (_root.isOnScreen(this)) {
_root.platformRaise.start(0, 1);
}
this.timer = 0;
this.up = true;
}
}
if (this._currentframe == 1) {
_root.ground.cloud.droppingPlatformCloud4.gotoAndStop(1);
} else {
_root.ground.cloud.droppingPlatformCloud4.gotoAndStop(2);
}
}
Instance of Symbol 1406 MovieClip "spinDials" in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.active = false;
this.played = false;
}
onClipEvent (enterFrame) {
if (((this.spinDial1.inLimits && (this.spinDial2.inLimits)) && (this.spinDial3.inLimits)) && (this.spinDial4.inLimits)) {
this.active = true;
if (!this.played) {
this.played = true;
_root.machine2.start(0, 1);
}
} else {
this.active = false;
if (this.played) {
this.played = false;
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 2;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 3;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 580 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 4;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
}
}
}
}
Instance of Symbol 96 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.madeMessage = false;
}
onClipEvent (enterFrame) {
if (!this.madeMessage) {
if (this.hitTest(_root.player)) {
this.madeMessage = true;
_root.makeMessage("Swing the chandeliers by running left and right in time", 210);
}
}
}
Instance of Symbol 96 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.killPlayer();
_root.player.deathTimer = 35;
_root.player.ySpeed = 0;
}
}
Instance of Symbol 96 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.killPlayer();
_root.player.ySpeed = 0;
_root.player.deathTimer = 35;
}
}
Instance of Symbol 1314 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.timer = 0;
this.timeLimit = 810;
this.timing = false;
_root.stopWatch._alpha = 0;
this.activated = false;
this.lever.gotoAndStop(1);
this.changed = false;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
if (!this.activated) {
if (!this.timing) {
if (_root.ground.ladder.ladder1.speed > 0) {
_root.ground.ladder.ladder1.speed = _root.ground.ladder.ladder1.speed - 0.1;
}
if (this.hitTest(_root.player._x, _root.player._y, true)) {
this.panel.gotoAndStop(2);
if (Key.isDown(32)) {
this.changed = false;
_root.machine2.start(0, 1);
_root.clickSound.start(0, 1);
this.panel.gotoAndStop(1);
this.lever.gotoAndStop(2);
this.timing = true;
_root.tickLong.start(0, 999);
this.timer = 0;
_root.stopWatch.hand._rotation = 0;
_root.stopWatch._x = _root.player._x + 60;
_root.stopWatch._y = _root.player._y - 80;
}
} else {
this.panel.gotoAndStop(1);
}
if (_root.stopWatch._alpha > 0) {
_root.stopWatch._alpha = _root.stopWatch._alpha - 10;
}
if (_root.ground.ground.ladderBouncePad._y < -905) {
_root.ground.ground.ladderBouncePad._y++;
}
} else {
if (_root.ground.ladder.ladder1.speed < 3.5) {
_root.ground.ladder.ladder1.speed = _root.ground.ladder.ladder1.speed + 0.1;
}
if (_root.player.deathTimer >= 5) {
this.timing = false;
_root.tickLong.stop();
_root.tickShort.stop();
this.timer = 0;
this.lever.gotoAndStop(1);
}
this.timer++;
if (this.timer > this.timeLimit) {
this.timer = 0;
this.timing = false;
_root.tickShort.stop();
this.lever.gotoAndStop(1);
}
if (this.timer > (this.timeLimit - 150)) {
if (!this.changed) {
this.changed = true;
_root.tickLong.stop();
_root.tickShort.start(0, 999);
}
}
if (_root.stopWatch._alpha < 100) {
_root.stopWatch._alpha = _root.stopWatch._alpha + 10;
}
_root.stopWatch.hand._rotation = _root.stopWatch.hand._rotation + (360 / this.timeLimit);
_root.stopWatch._x = _root.stopWatch._x + (((_root.player._x + 60) - _root.stopWatch._x) / 3);
_root.stopWatch._y = _root.stopWatch._y + (((_root.player._y - 80) - _root.stopWatch._y) / 3);
if (_root.ground.ground.stopTimerButton._currentframe == 5) {
this.activated = true;
this.timing = false;
_root.ground.ground.risingGatesBlocker._yscale = 0;
_root.tickLong.stop();
_root.tickShort.stop();
_root.machine2.start(0, 1);
}
if (_root.ground.ground.ladderBouncePad._y > -979) {
_root.ground.ground.ladderBouncePad._y--;
}
}
} else {
if (_root.ground.risingGate._y > -1170) {
_root.ground.risingGate._y = _root.ground.risingGate._y - 3;
}
if (_root.stopWatch._alpha > 0) {
_root.stopWatch._alpha = _root.stopWatch._alpha - 10;
}
}
} else {
_root.tickLong.stop();
_root.tickShort.stop();
}
}
Instance of Symbol 580 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.checked = false;
this.checkNum = 1;
}
onClipEvent (enterFrame) {
if (!this.checked) {
if (this.checkNum > _root.checkPointNum) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.makeMessage("Reached Checkpoint " + this.checkNum, 60);
this.gotoAndPlay(2);
this.checked = true;
_root.checkPoint.playerX = _root.player._x;
_root.checkPoint.xScale = _root.player._xscale;
_root.checkPoint.playerY = _root.player._y;
_root.checkPoint.groundX = _root.ground._x;
_root.checkPoint.groundY = _root.ground._y;
_root.checkpointSound.start(0, 1);
_root.ground.ground.movingPlatform.startX = 1204;
}
}
}
}
Instance of Symbol 1415 MovieClip "lightSwitches2" in Symbol 1433 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.ground.lightSwitches1._currentframe);
}
Instance of Symbol 1415 MovieClip "lightSwitches3" in Symbol 1433 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.ground.lightSwitches1._currentframe);
}
Instance of Symbol 1428 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.xSpeed = 0;
this.dDif = 0;
this.startX = this._x;
this.startY = this._y;
this.playerHit = false;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
if (_root.ground.cloud.c1t1.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + this.xSpeed;
this.xSpeed = this.xSpeed + (_root.player.xSpeed / 55);
this.playerHit = true;
} else {
this.playerHit = false;
}
this._y = this.startY - Math.abs(this.xDif / 10);
this.xSpeed = this.xSpeed * 0.996;
this.xDif = this.startX - this._x;
this.xSpeed = this.xSpeed + (this.xDif / 200);
this.chain1._rotation = (this.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 430));
this.tier2._x = (-this.xDif) / 10;
this.tier2.tier3._x = (-this.xDif) / 10;
this.tier2.chain1._rotation = (this.tier2.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 500));
this.tier2.tier3.chain1._rotation = (this.tier2.tier3.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 500));
_root.ground.cloud.c1t1._x = this._x;
_root.ground.cloud.c1t1._y = this._y;
i = 1;
while (i <= 11) {
tL = this["light" + i];
tL._rotation = (-this.xDif) / 10;
i++;
}
}
}
Instance of Symbol 1428 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.xSpeed = 0;
this.dDif = 0;
this.startX = this._x;
this.startY = this._y;
this.playerHit = false;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
if (_root.ground.cloud.c2t1.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + this.xSpeed;
this.xSpeed = this.xSpeed + (_root.player.xSpeed / 65);
this.playerHit = true;
} else {
this.playerHit = false;
}
this._y = this.startY - Math.abs(this.xDif / 10);
this.xSpeed = this.xSpeed * 0.996;
this.xDif = this.startX - this._x;
this.xSpeed = this.xSpeed + (this.xDif / 200);
this.chain1._rotation = (this.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 430));
this.tier2._x = (-this.xDif) / 10;
this.tier2.tier3._x = (-this.xDif) / 10;
this.tier2.chain1._rotation = (this.tier2.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 500));
this.tier2.tier3.chain1._rotation = (this.tier2.tier3.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 500));
_root.ground.cloud.c2t1._x = this._x;
_root.ground.cloud.c2t1._y = this._y;
i = 1;
while (i <= 11) {
tL = this["light" + i];
tL._rotation = (-this.xDif) / 10;
i++;
}
}
}
Instance of Symbol 1428 MovieClip in Symbol 1433 MovieClip Frame 1
onClipEvent (load) {
this.xSpeed = 0;
this.dDif = 0;
this.startX = this._x;
this.startY = this._y;
this.playerHit = false;
}
onClipEvent (enterFrame) {
if (!_root.gamePaused) {
this._x = this._x + this.xSpeed;
if (_root.ground.cloud.c3t1.hitTest(_root.player._x, (_root.player._y + _root.player.hHeight) + 5, true)) {
_root.player._x = _root.player._x + this.xSpeed;
this.xSpeed = this.xSpeed + (_root.player.xSpeed / 70);
this.playerHit = true;
} else {
this.playerHit = false;
}
this._y = this.startY - Math.abs(this.xDif / 10);
this.xSpeed = this.xSpeed * 0.996;
this.xDif = this.startX - this._x;
this.xSpeed = this.xSpeed + (this.xDif / 200);
this.chain1._rotation = (this.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 430));
this.tier2._x = (-this.xDif) / 10;
this.tier2.tier3._x = (-this.xDif) / 10;
this.tier2.chain1._rotation = (this.tier2.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 500));
this.tier2.tier3.chain1._rotation = (this.tier2.tier3.chain2._rotation = 57.2957795130823 * Math.asin(this.xDif / 500));
_root.ground.cloud.c3t1._x = this._x;
_root.ground.cloud.c3t1._y = this._y;
i = 1;
while (i <= 11) {
tL = this["light" + i];
tL._rotation = (-this.xDif) / 10;
i++;
}
}
}
Instance of Symbol 1255 MovieClip in Symbol 1438 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(268));
this._yscale = 100 * Math.pow(-1, random(5));
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, false)) {
_root.killPlayer();
}
if (_root.isOnScreen(this._parent)) {
if ((this._currentframe == 1) || (this._currentframe == 139)) {
d = random(3);
if (d == 0) {
_root.spark1.start(0, 1);
} else if (d == 1) {
_root.spark2.start(0, 1);
} else {
_root.spark3.start(0, 1);
}
} else if ((this._currentframe == 88) || (this._currentframe == 198)) {
if (random(2) == 0) {
_root.spark4.start(0, 1);
} else {
_root.spark5.start(0, 1);
}
}
}
}
Instance of Symbol 1117 MovieClip in Symbol 1440 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.killPlayer();
}
if (_root.isOnScreen(this)) {
if (this._currentframe == 1) {
_root.steamFade.start(0, 1);
}
}
}
Instance of Symbol 1117 MovieClip in Symbol 1440 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.killPlayer();
}
if (_root.isOnScreen(this)) {
if (this._currentframe == 1) {
_root.steamFade.start(0, 1);
}
}
}
Instance of Symbol 811 MovieClip in Symbol 1440 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.player._x, _root.player._y, true)) {
_root.killPlayer();
}
if (_root.isOnScreen(this)) {
if (this._currentframe == 90) {
_root.steam2.start(0, 1);
}
}
}
Symbol 1443 MovieClip Frame 1
stop();
Symbol 1510 MovieClip Frame 5
gotoAndPlay (1);
Symbol 1514 MovieClip Frame 1
stop();
Symbol 1548 MovieClip Frame 1
stop();
Symbol 1556 MovieClip Frame 200
stop();
Symbol 1569 MovieClip Frame 140
stop();
Symbol 1598 MovieClip Frame 1
stop();
Symbol 1626 MovieClip Frame 46
stop();
Symbol 1660 MovieClip Frame 125
gotoAndPlay (2);
Symbol 1699 MovieClip Frame 70
_root.beGamerVoice.start(0, 1);
Symbol 1699 MovieClip Frame 125
_root.gotoAndStop(2);
stop();
Symbol 1700 Button
on (release) {
_root.getURL("http://www.begamer.com/index/index/strange-laboratory", "_blank");
}