Frame 1
function addFree(urls_allowed) {
freeOfAds = false;
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
freeOfAds = true;
}
}
if (freeOfAds) {
}
}
stop();
preloader.onEnterFrame = function () {
filesize = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
this._visible = true;
this.loader = Math.round((100 * loaded) / filesize);
this.loader = this.loader + "%";
if (loaded != filesize) {
} else {
this.loader = "";
_root.loader = "Ready to play";
playButton._y = 350;
}
};
urls_allowed = ["www.dojo.com", "dojo.com", "http://www.dojo.com", "www.dojofiles.com", "dojofiles.com", "http://www.dojofiles.com", "www.gamemazing.com", "gamemazing.com", "http://www.gamemazing.com", "www.madsanthony.com", "madsanthony.com", "http://www.madsanthony.com", "www.kongregate.com", "kongregate.com", "http://www.kongregate.com", "www.cdn2.kongregate.com.com", "cdn2.kongregate.com.com", "http://www.cdn2.kongregate.com.com", "www.cdn3.kongregate.com.com", "cdn3.kongregate.com.com", "http://www.cdn3.kongregate.com.com", "www.chat.kongregate.com", "chat.kongregate.com", "http://www.chat.kongregate.com"];
addFree(urls_allowed);
if (!freeOfAds) {
var CPMStarContentSpotID = "13262QF1F48B41";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
}
Instance of Symbol 1303 MovieClip "playButton" in Frame 1
on (press) {
_root.gotoAndPlay(2);
}
Frame 2
user = SharedObject.getLocal("sideomorph");
_root.notFirstTimeUnlockedWorld1 = _root.user.data.notFirstTimeUnlockedWorld1;
_root.notFirstTimeUnlockedWorld2 = _root.user.data.notFirstTimeUnlockedWorld2;
_root.notFirstTimeUnlockedWorld3 = _root.user.data.notFirstTimeUnlockedWorld3;
_root.notFirstTimeUnlockedWorldBonus = _root.user.data.notFirstTimeUnlockedWorldBonus;
_root.notFirstTimeUnlockedWorldSecret = _root.user.data.notFirstTimeUnlockedWorldSecret;
_root.machineIsWorkingAndMoved = _root.user.data.machineIsWorkingAndMoved;
_root.machineIsWorking = _root.user.data.machineIsWorking;
_root.levelBoss1ChestGotten = _root.user.data.levelBoss1ChestGotten;
_root.levelBoss2ChestGotten = _root.user.data.levelBoss2ChestGotten;
_root.levelBoss3ChestGotten = _root.user.data.levelBoss3ChestGotten;
userI = 0;
while (userI <= 18) {
_root[("level" + _root.userI) + "ChestGotten"] = _root.user.data[("level" + _root.userI) + "ChestGotten"];
_root[("level" + this.userI) + "FirstTimeUnlocked"] = _root.user.data[("level" + _root.userI) + "ChestGotten"];
_root[("level" + _root.userI) + "DiamondGotten"] = _root.user.data[("level" + _root.userI) + "DiamondGotten"];
_root[("level" + _root.userI) + "KeyGotten"] = _root.user.data[("level" + _root.userI) + "KeyGotten"];
userI++;
}
_root.levelTutorial1ChestGotten = _root.user.data.levelTutorial1ChestGotten;
_root.levelTutorial2ChestGotten = _root.user.data.levelTutorial2ChestGotten;
_root.levelTutorial1KeyGotten = _root.user.data.levelTutorial1KeyGotten;
_root.levelTutorial2KeyGotten = _root.user.data.levelTutorial2KeyGotten;
_root.level4GearGotten = _root.user.data.level4GearGotten;
_root.level5GearGotten = _root.user.data.level5GearGotten;
_root.level7GearGotten = _root.user.data.level7GearGotten;
_root.level10GearGotten = _root.user.data.level10GearGotten;
_root.level11GearGotten = _root.user.data.level11GearGotten;
_root.level12GearGotten = _root.user.data.level12GearGotten;
_root.levelJustVisited = _root.user.data.levelJustVisited;
_root.optimizeDrawVar = 0;
_root.blurSide = true;
_root.graphicTry = 0;
_root.musicIsOnMute = false;
stop();
Frame 3
_root.timeOutLevel = true;
_root.layer = _root.attachMovie("backgroundMain", "layer" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:270, _y:200});
_root.averageFps = 0;
_root.graphicPoke = true;
_root.cubeReflectionOn = false;
this.gotoAndStop("level");
Frame 4
Mouse.hide();
_root.timeOutLevel = false;
_root.switchTrack = 1;
_root.exitButtonPressed = false;
_root.trackSelectMenu.stop();
_root.trackSelectMenu = new Sound();
_root.trackSelectMenu.attachSound("trackSelect1");
_root.trackSelectMenu.setVolume(5);
_root.trackSelectMenu.start(0, 5);
_root.hintCounter = 0;
if (_root.musicIsOnMute) {
_root.trackSelectMenu.setVolume(0);
}
_root.trackSelectMenuVolume = _root.trackSelectMenu.getVolume();
if (_root.levelBoss3ChestGotten) {
_root.mainMenu.chairman.gotoAndStop("reveal");
_root.mainMenu.chairmanReflection.gotoAndStop("reveal");
}
stop();
onMouseDown = function () {
_root.mouseIsDown = true;
};
onMouseUp = function () {
_root.mouseIsDown = false;
};
if (_root.level0ChestGotten) {
_root.levelVar = "Select";
} else {
_root.levelVar = 0;
}
Instance of Symbol 48 MovieClip "cursorFinger" in Frame 4
onClipEvent (load) {
this.cursorCounter = 0;
}
onClipEvent (enterFrame) {
if (this.enableCursor) {
this._x = _root._xmouse - 12;
this._y = _root._ymouse - 12;
} else {
this._x = 1000;
this.cursorCounter++;
if (this.cursorCounter > 10) {
this.enableCursor = true;
this.cursorCounter = 0;
}
}
}
Instance of Symbol 1545 MovieClip in Frame 4
onClipEvent (load) {
this.volumeMute = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(77) && (!this.mIsDown)) {
_root.musicIsOnMute = !_root.musicIsOnMute;
this.mIsDown = true;
}
if (!Key.isDown(77)) {
this.mIsDown = false;
}
if (_root.musicIsOnMute) {
if (!this.volumeMute) {
_root.trackSelectMenuVolume = _root.trackSelectMenu.getVolume();
_root.trackSelectMenu.setVolume(0);
this.volumeMute = true;
}
} else if (this.volumeMute) {
_root.trackSelectMenu.setVolume(_root.trackSelectMenuVolume);
this.volumeMute = false;
}
}
Instance of Symbol 1204 MovieClip "cursor" in Frame 4
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
Frame 5
Mouse.hide();
_root.blurFilter = new flash.filters.BlurFilter(2, 2, 1);
_root.trackSelectMenu.stop();
_root.cubeSound = new Sound();
_root.soundTrack1 = _root.sound.createEmptyMovieClip("track1", _root.sound.getNextHighestDepth());
_root.cubeSound2 = new Sound(_root.soundTrack1);
_root.cubeSound2.attachSound("impactSound");
_root.jumpSound = new Sound(_root.soundTrack1);
_root.jumpSound.attachSound("jumpSound");
_root.impactSound = new Sound(_root.soundTrack1);
_root.impactSound.attachSound("impactSound3");
_root.springSound = new Sound(_root.soundTrack1);
_root.springSound.attachSound("springSound");
_root.clickSound = new Sound(_root.soundTrack1);
_root.clickSound.attachSound("clickSound");
_root.explosionSound = new Sound(_root.soundTrack1);
_root.explosionSound.attachSound("explosionSound");
_root.treasureSound = new Sound(_root.soundTrack1);
_root.treasureSound.attachSound("treasureSound");
_root.barrelBreakSound = new Sound(_root.soundTrack1);
_root.barrelBreakSound.attachSound("barrelBreakSound3");
_root.musicTrack1 = _root.music.createEmptyMovieClip("track1", _root.music.getNextHighestDepth());
_root.track1 = new Sound(_root.musicTrack1);
_root.track1.attachSound("track1");
_root.track1.setVolume(0);
_root.musicTrack2 = _root.music.createEmptyMovieClip("track2", _root.music.getNextHighestDepth());
_root.track2 = new Sound(_root.musicTrack2);
_root.track2.attachSound("track2");
_root.track2.setVolume(0);
_root.musicTrackSelect = _root.music.createEmptyMovieClip("trackSelect", _root.music.getNextHighestDepth());
_root.trackSelect = new Sound(_root.musicTrackSelect);
_root.trackSelect.attachSound("trackSelect1");
_root.trackSelect.setVolume(0);
_root.trackBoss = new Sound(_root.musicTrackBoss);
_root.trackBoss.attachSound("robotFight");
_root.trackBoss.setVolume(0);
_root.hintCounter = 0;
_root.drawingPlane1.setBlurSides(true);
if (optimizeDrawVar == undefined) {
_root.optimizeDrawVar = 0;
}
_root.levelSelectStartCounter = 0;
_root.gearGottenTemporary = false;
_root.amuletPartGottenTemporary = false;
_root.level4HasGear = true;
_root.level5HasGear = true;
_root.level7HasGear = true;
_root.level10HasGear = true;
_root.level11HasGear = true;
_root.level12HasGear = true;
_root.heroCanPush = true;
_root.heroCarryBlock = false;
_root.heroCarryBlockCounter = 0;
_root.removeThisCarryBlock = undefined;
_root.gotoEditor = false;
if (_root.user.data.canThrowBombs == undefined) {
_root.canThrowBombs = false;
} else {
_root.canThrowBombs = _root.user.data.canThrowBombs;
}
if (_root.canThrowBombs == undefined) {
_root.canThrowBombs = false;
}
if (_root.machineIsWorking == undefined) {
_root.machineIsWorking = false;
}
if ((_root.levelJustVisited == undefined) || (_root.levelJustVisited == "UserLevel")) {
_root.levelJustVisited = 0;
}
_root.user.data.levelJustVisited = _root.levelJustVisited;
_root.user.data.levelBoss1ChestGotten = _root.levelBoss1ChestGotten;
_root.user.data.levelBoss2ChestGotten = _root.levelBoss2ChestGotten;
_root.user.data.levelBoss3ChestGotten = _root.levelBoss3ChestGotten;
_root.user.data.machineIsWorking = _root.machineIsWorking;
_root.totalGears = 0;
if (_root.level4GearGotten) {
_root.totalGears++;
}
if (_root.level5GearGotten) {
_root.totalGears++;
}
if (_root.level7GearGotten) {
_root.totalGears++;
}
if (_root.level10GearGotten) {
_root.totalGears++;
}
if (_root.level11GearGotten) {
_root.totalGears++;
}
if (_root.level12GearGotten) {
_root.totalGears++;
}
if (((levelVar >= 0) && (levelVar != "Select")) && ((substring(_root.levelVar, 0, 4)) != "Boss")) {
if (_root.switchTrack == 1) {
_root.track1.start(0, 10);
_root.switchTrack = 2;
} else {
_root.switchTrack = 1;
_root.track2.start(0, 10);
}
}
if (levelVar == "Select") {
_root.totalDiamonds = 0;
i = 1;
while (i <= 18) {
if (_root[("level" + i) + "DiamondGotten"]) {
_root.totalDiamonds++;
}
i++;
}
_root.totalKeys = 0;
i = 0;
while (i <= 18) {
if (_root[("level" + i) + "KeyGotten"]) {
_root.totalKeys++;
}
i++;
}
if (levelTutorial1KeyGotten) {
_root.totalKeys++;
}
if (levelTutorial2KeyGotten) {
_root.totalKeys++;
}
}
if (levelVar != "UserLevel") {
_root.startMc = undefined;
}
if (firstLoad == undefined) {
levelVar = 0;
firstLoad = 1;
}
if (levelVar != "UserLevel") {
mcI = 1;
while (mcI < 7) {
mcShelter = _root.createEmptyMovieClip(("mc" + mcI) + "Shelter", _root.getNextHighestDepth());
mcShelter._visible = false;
_root.mcShelter.attachMovie(("level" + levelVar) + chr(mcI + 96), "mc", _root.getNextHighestDepth(), {_x:0, _y:0});
mcShelter.mc.blockList = new Array();
blockListI = 0;
while (blockListI <= 9) {
mcShelter.mc.blockList[blockListI] = "empty";
blockListI++;
}
if (mcShelter.mc.startHero != undefined) {
_root.startMc = _root.mcShelter.mc;
}
mcI++;
}
}
_root.mc1Shelter.filters = null;
var filter = (new flash.filters.BlurFilter(0, 0, 1));
_root.mc1Shelter.filters = [filter];
if (_root.startMc == undefined) {
_root.startMc = _root.mc1Shelter.mc;
}
_root.createEmptyMovieClip("movFrameRate", 100);
_root.movFrameRate.onEnterFrame = function () {
this.t = getTimer();
this.frameRate = Math.round(1000 / (this.t - this.o));
_root.fps = this.frameRate;
this.o = this.t;
};
_root.depth = 10;
if (_root.startMc.startHero != undefined) {
startX = _root.startMc.startHero._x;
startY = _root.startMc.startHero._y;
} else {
startX = 220;
startY = 150;
}
if ((_root.levelVar == "Diamond") || (_root.levelVar == "BombBag")) {
_root.heroCanPush = false;
}
if (_root.levelVar == "Select") {
_root.heroCanPush = false;
if (((((typeof(_root.levelJustVisited) == "string") && ((substring(_root.levelJustVisited, 0, 4)) != "Boss")) && ((substring(_root.levelJustVisited, 0, 7)) != "Diamond")) && ((substring(_root.levelJustVisited, 0, 9)) != "UserLevel")) && ((substring(_root.levelJustVisited, 0, 7)) != "BombBag")) {
_root.levelJustVisited = Number(_root.levelJustVisited);
}
if ((((((_root.levelJustVisited == 0) && (typeof(_root.levelJustVisited) == "number")) || (_root.levelJustVisited == "Diamond")) || (_root.levelJustVisited == "UserLevel")) || (_root.levelJustVisited == "Diamond")) || (_root.levelJustVisited == "BombBag")) {
_root.startMc = _root.mc4Shelter.mc;
}
if ((((_root.levelJustVisited >= 1) && (_root.levelJustVisited <= 5)) && (typeof(_root.levelJustVisited) == "number")) || (_root.levelJustVisited == "Boss1")) {
_root.startMc = _root.mc1Shelter.mc;
}
if ((((_root.levelJustVisited >= 6) && (_root.levelJustVisited <= 10)) && (typeof(_root.levelJustVisited) == "number")) || (_root.levelJustVisited == "Boss2")) {
_root.startMc = _root.mc2Shelter.mc;
}
if ((((_root.levelJustVisited >= 11) && (_root.levelJustVisited <= 15)) && (typeof(_root.levelJustVisited) == "number")) || (_root.levelJustVisited == "Boss3")) {
_root.startMc = _root.mc3Shelter.mc;
}
if ((substring(_root.levelJustVisited, 0, 4)) == "Boss") {
startX = _root.startMc["boss" + (substring(_root.levelJustVisited, 5, 1))]._x;
startY = _root.startMc["boss" + (substring(_root.levelJustVisited, 5, 1))]._y;
} else if ((substring(_root.levelJustVisited, 0, 7)) == "Diamond") {
startX = _root.startMc.diamondTeleport._x;
startY = _root.startMc.diamondTeleport._y - 70;
} else if ((substring(_root.levelJustVisited, 0, 7)) == "BombBag") {
startX = _root.startMc.diamondTeleport._x + 70;
startY = _root.startMc.diamondTeleport._y + 10;
} else {
startX = _root.startMc["level" + _root.levelJustVisited]._x;
startY = _root.startMc["level" + _root.levelJustVisited]._y;
}
if (((_root.levelJustVisited >= 16) && (_root.levelJustVisited <= 18)) && (typeof(_root.levelJustVisited) == "number")) {
_root.startMc = _root.mc4Shelter.mc;
startX = _root.startMc.bonusStartBlock._x;
startY = _root.startMc.bonusStartBlock._y - 70;
}
}
_root.hero = _root.startMc.attachMovie("hero", "hero" + (_root.depth++), _root.startMc.getNextHighestDepth(), {_x:startX, _y:startY});
_root.startMc.heroPointer = _root.hero;
_root.hero.heroReference = "";
_root.doubleHeroArray = new Array();
if (levelVar == "Boss1") {
_root.initiateBoss = false;
_root.wormLooseHealth = false;
_root.wormLoosePart = undefined;
_root.wormLooseHealthCounter = 0;
_root.wormSpeed = 0;
_root.wormDistance = 30;
_root.wormHealth = 5;
_root.wormArray = new Array();
_root.bossBigHitbox = false;
}
if (levelVar == "Boss2") {
_root.laserSpeed = -2;
_root.heroCanPush = false;
}
_root.isRotateCameraMode = false;
_root.rotateCameraModeSpeed = 1;
if (_root.levelVar == "Select") {
_root.boss3PhaseStart = 0;
}
if (_root.levelVar == "Boss3") {
_root.heroCanPush = false;
_root.boss3Phase = _root.boss3PhaseStart;
_root.boss3PhaseStart = 1;
}
_root.diamondRunOn = false;
if (_root[("level" + this.levelVar) + "ChestGotten"]) {
_root.barrelArray = new Array(30);
_root.barrelIndex = 1;
_root.barrelLength = undefined;
}
updateAllGravity = function () {
i = 0;
while (i < 7) {
_root[("mc" + i) + "Shelter"].mc.updateGravity();
h = 0;
while (h < _root.doubleHeroArray.length) {
_root.doubleHeroArray[h]._rotation = _root.doubleHeroArray[h]._parent.gravityRotation;
_root.doubleHeroArray[h].updatePosXY();
h++;
}
i++;
}
_root.isHeroPlayable = true;
};
_root.isHeroPlayable = true;
_root.gravity = 0;
_root.jumpPower = 0;
restart = function () {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.trackBoss.stop();
_root.gotoAndPlay("restart");
};
_root.drawingPlane1._rotation = 0;
_root.floorIsEnabled = true;
stop();
Instance of Symbol 1569 MovieClip "engine" in Frame 5
onClipEvent (load) {
a = 0;
b = 0;
xSpeed = 0;
ySpeed = 0;
scale = 280;
scaleFactor = 0;
var mouseListener = new Object();
mouseListener.onMouseWheel = function (delta) {
if (_root.engine.cheatsOn) {
scaleFactor = scaleFactor + delta;
}
};
Mouse.addListener(mouseListener);
var cube1 = (new three_d.Cube());
cube1.setPosition(new three_d.VectorClass([[-0.5], [-0.5], [-0.5]]));
cube1.setRotationPoint(new three_d.VectorClass([[0], [-1], [0]]));
if (_root.cubeReflectionOn) {
var cube2 = (new three_d.Cube());
cube2.setPosition(new three_d.VectorClass([[-0.5], [0.5], [-0.5]]));
cube2.setRotationPoint(new three_d.VectorClass([[0], [0], [0]]));
}
_root.drawingPlane1.addFigure(cube1);
if (_root.cubeReflectionOn) {
_root.drawingPlane1.addFigure(cube2);
}
cube1.getSideCollection()[0].setMovieClip(_parent.mc5Shelter);
cube1.getSideCollection()[0].setRotation(90);
cube1.getSideCollection()[0].setXScale(-1);
cube1.getSideCollection()[1].setMovieClip(_parent.mc2Shelter);
cube1.getSideCollection()[2].setMovieClip(_parent.mc1Shelter);
cube1.getSideCollection()[3].setMovieClip(_parent.mc3Shelter);
cube1.getSideCollection()[4].setMovieClip(_parent.mc6Shelter);
cube1.getSideCollection()[4].setRotation(270);
cube1.getSideCollection()[5].setMovieClip(_parent.mc4Shelter);
cube1.getSideCollection()[5].setRotation(270);
cube1.getSideCollection()[2].setRotation(270);
if (_root.cubeReflectionOn) {
cube2.getSideCollection()[0].setMovieClip(_parent.mc6Shelter);
cube2.getSideCollection()[0].setRotation(270);
cube2.getSideCollection()[1].setMovieClip(_parent.mc2Shelter);
cube2.getSideCollection()[1].setXScale(-1);
cube2.getSideCollection()[2].setMovieClip(_parent.mc1Shelter);
cube2.getSideCollection()[2].setRotation(270);
cube2.getSideCollection()[2].setYScale(-1);
cube2.getSideCollection()[3].setMovieClip(_parent.mc3Shelter);
cube2.getSideCollection()[3].setXScale(-1);
cube2.getSideCollection()[4].setMovieClip(_parent.mc5Shelter);
cube2.getSideCollection()[4].setRotation(270);
cube2.getSideCollection()[4].setYScale(-1);
cube2.getSideCollection()[5].setMovieClip(_parent.mc4Shelter);
cube2.getSideCollection()[5].setRotation(270);
cube2.getSideCollection()[5].setYScale(-1);
cube2.getSideCollection()[0].setIsBrightnessOn(true);
cube2.getSideCollection()[1].setIsBrightnessOn(true);
cube2.getSideCollection()[2].setIsBrightnessOn(true);
cube2.getSideCollection()[3].setIsBrightnessOn(true);
cube2.getSideCollection()[4].setIsBrightnessOn(true);
cube2.getSideCollection()[5].setIsBrightnessOn(true);
}
rotationX = 0;
rotationZ = 0;
rotationAcc = 1;
positionZ = 0;
cameraX = 0;
cameraY = 0;
cameraZ = 0;
rotationLimitX = 0;
rotationLimitZ = 0;
X = 0;
Z = 0;
waitCounter = 0;
keyHToggle = -1;
isHeroFollowedAngle = true;
this.jumpPressed = false;
_root.mc1.rotationAlign = "Z";
_root.mc1.rotationInvertZ = -1;
_root.mc1.rotationInvertX = 1;
_root.mc1.z1 = rotationZ;
_root.mc1.x1 = rotationX;
_root.mc1.zAdd = 0;
_root.mc1.xAdd = 0;
updateMcCounter = 0;
countOptimizer = 0;
smokeArray = new Array();
this.dIsDown = false;
if (_root.levelVar == "UserLevel") {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].mc.figure = _root.engine.cube1;
_root[("mc" + mcI) + "Shelter"].mc.side = _root[("mc" + mcI) + "Shelter"].mc.figure.getSideWithMovieClip(_root[("mc" + mcI) + "Shelter"]);
mcI++;
}
}
_root.drawingPlane1.setBlurSides(_root.blurSide);
}
onClipEvent (enterFrame) {
function followHeroAngle() {
if (_root.doubleHeroArray[0]._parent.sidePosition == "xFront") {
heroAngleLatitude = 0;
}
if (_root.doubleHeroArray[0]._parent.sidePosition == "zFront") {
heroAngleLatitude = 90;
}
if (_root.doubleHeroArray[0]._parent.sidePosition == "xBack") {
heroAngleLatitude = 180;
}
if (_root.doubleHeroArray[0]._parent.sidePosition == "zBack") {
heroAngleLatitude = -90;
}
if (_root.doubleHeroArray[0] != undefined) {
heroXPercentage = ((_root.doubleHeroArray[0]._parent.startWidth / 2) - _root.doubleHeroArray[0].posX) / _root.doubleHeroArray[0]._parent.startWidth;
heroYPercentage = (_root.doubleHeroArray[0]._parent.startHeight - _root.doubleHeroArray[0].posY) / _root.doubleHeroArray[0]._parent.startHeight;
}
if (_root.doubleHeroArray[0]._parent.sidePosition == "yFront") {
heroYPercentage = heroYPercentage + 1;
}
if (!_root.isRotateCameraMode) {
rotateCameraSmoothLatitude(heroAngleLatitude - (heroXPercentage * 90));
rotateCameraSmoothLongitude(heroYPercentage * -30);
}
if (_root.isRotateCameraMode) {
if ((_root.drawingPlane1._rotation >= 0) && (_root.drawingPlane1._rotation < 90)) {
rotateCameraSmoothLatitude(heroAngleLatitude - (heroXPercentage * 90));
rotateCameraSmoothLongitude(heroYPercentage * -30);
}
if ((_root.drawingPlane1._rotation >= 90) && (_root.drawingPlane1._rotation < 180)) {
rotateCameraSmoothLatitude(heroAngleLatitude - (heroYPercentage * 30));
rotateCameraSmoothLongitude((heroXPercentage * -90) * -1);
}
if ((_root.drawingPlane1._rotation >= -180) && (_root.drawingPlane1._rotation < -90)) {
rotateCameraSmoothLatitude(heroAngleLatitude - ((heroXPercentage * 90) * -1));
rotateCameraSmoothLongitude(heroYPercentage * -30);
}
if ((_root.drawingPlane1._rotation >= -90) && (_root.drawingPlane1._rotation < 0)) {
rotateCameraSmoothLatitude(heroAngleLatitude - (heroYPercentage * -30));
rotateCameraSmoothLongitude(heroXPercentage * -90);
}
}
}
function rotateCameraSmoothLatitude(newLatitude) {
newLatitude = newLatitude % 360;
if (newLatitude < 0) {
newLatitude = newLatitude + 360;
}
a1 = newLatitude - _root.drawingPlane1.getCamera().getLatitude();
if (a1 > 180) {
a1 = -(360 - a1);
}
if (a1 < -180) {
a1 = a1 % 360;
if (a1 < 0) {
a1 = a1 + 360;
}
}
a = a + (a1 * 0.2);
xSpeed = 0;
}
function rotateCameraSmoothLongitude(newLongitude) {
newLongitude = newLongitude % 360;
if (newLongitude < 0) {
newLongitude = newLongitude + 360;
}
b1 = newLongitude - _root.drawingPlane1.getCamera().getLongitude();
if (b1 > 180) {
b1 = -(360 - b1);
}
if (b1 < -180) {
b1 = b1 % 360;
if (b1 < 0) {
b1 = b1 + 360;
}
}
b = b + (b1 * 0.2);
ySpeed = 0;
}
function alignCamera() {
waitCounter++;
if (waitCounter > 5) {
realPosition = new three_d.VectorClass(cube1.getPosition().add(new three_d.VectorClass([[-1 * X], [0], [-1 * Z]])));
moveCameraVector = new three_d.VectorClass((new three_d.VectorClass([[-0.5], [-0.5], [-0.5]])).subtract(realPosition));
moveCameraVector.setVector(moveCameraVector.scale(0.1));
_root.drawingPlane1.setCameraPosition(new three_d.VectorClass(_root.drawingPlane1.getCamera().getPositionVector().add(moveCameraVector)));
moveCameraVector.setVector(moveCameraVector.scale(1000));
moveCameraVector.setVector(moveCameraVector.round());
moveCameraVector.setVector(moveCameraVector.scale(0.01));
if (moveCameraVector.equals(new three_d.VectorClass([[0], [0], [0]]))) {
isCameraAligning = false;
}
moveCameraVector.setVector(moveCameraVector.round());
if (moveCameraVector.equals(new three_d.VectorClass([[0], [0], [0]]))) {
isHeroFollowedAngle = true;
}
}
}
function moveRightX() {
rotationX = rotationX + (5 * rotationAcc);
rotationAcc = rotationAcc + 0.2;
isCameraAligning = false;
if (rotationX >= rotationLimitX) {
cube1.setRotation(rotationLimitX, "x");
cube1.setRotationPoint(new three_d.VectorClass([[X], [-1], [Z]]));
cube2.setRotation(rotationLimitX * -1, "x");
cube2.setRotationPoint(new three_d.VectorClass([[X], [0], [Z]]));
rotationAcc = 1;
isMoveGoingRightX = false;
rotationX = rotationLimitX;
isCameraAligning = true;
_root.updateAllGravity();
_root.cubeSound2.start();
return(undefined);
}
cube1.setRotation(rotationX, "x");
cube2.setRotation(rotationX * -1, "x");
}
function moveLeftX() {
cube1.setRotationPoint(new three_d.VectorClass([[X], [-1], [Z]]));
cube2.setRotationPoint(new three_d.VectorClass([[X], [0], [Z]]));
isCameraAligning = false;
rotationX = rotationX - (5 * rotationAcc);
rotationAcc = rotationAcc + 0.2;
if (rotationX <= rotationLimitX) {
cube1.setRotation(rotationLimitX, "x");
cube2.setRotation(rotationLimitX * -1, "x");
rotationAcc = 1;
isMoveGoingLeftX = false;
rotationX = rotationLimitX;
isCameraAligning = true;
_root.updateAllGravity();
_root.cubeSound2.start();
return(undefined);
}
cube1.setRotation(rotationX, "x");
cube2.setRotation(rotationX * -1, "x");
}
function moveRightZ() {
rotationZ = rotationZ + (5 * rotationAcc);
rotationAcc = rotationAcc + 0.2;
isCameraAligning = false;
if (rotationZ >= rotationLimitZ) {
cube1.setRotation(rotationLimitZ, "z");
cube1.setRotationPoint(new three_d.VectorClass([[X], [-1], [Z]]));
cube2.setRotation(rotationLimitZ * -1, "z");
cube2.setRotationPoint(new three_d.VectorClass([[X], [0], [Z]]));
rotationAcc = 1;
isMoveGoingRightZ = false;
rotationZ = rotationLimitZ;
isCameraAligning = true;
_root.updateAllGravity();
_root.cubeSound2.start();
return(undefined);
}
cube1.setRotation(rotationZ, "z");
cube2.setRotation(rotationZ * -1, "z");
}
function moveLeftZ() {
cube1.setRotationPoint(new three_d.VectorClass([[X], [-1], [Z]]));
cube2.setRotationPoint(new three_d.VectorClass([[X], [0], [Z]]));
rotationZ = rotationZ - (5 * rotationAcc);
rotationAcc = rotationAcc + 0.2;
isCameraAligning = false;
if (rotationZ <= rotationLimitZ) {
cube1.setRotation(rotationLimitZ, "z");
cube2.setRotation(rotationLimitZ * -1, "z");
rotationAcc = 1;
isMoveGoingLeftZ = false;
rotationZ = rotationLimitZ;
isCameraAligning = true;
_root.updateAllGravity();
_root.cubeSound2.start();
return(undefined);
}
cube1.setRotation(rotationZ, "z");
cube2.setRotation(rotationZ * -1, "z");
}
function moveCube(direction, axis) {
isHeroFollowedAngle = false;
if (direction == 1) {
if (axis == "X") {
Z = Z + 1;
rotationLimitX = rotationLimitX + 90;
isMoveGoingRightX = true;
}
if (axis == "Z") {
X = X + 1;
rotationLimitZ = rotationLimitZ + 90;
isMoveGoingRightZ = true;
}
}
if (direction == -1) {
if (axis == "X") {
Z = Z - 1;
rotationLimitX = rotationLimitX - 90;
isMoveGoingLeftX = true;
}
if (axis == "Z") {
X = X - 1;
rotationLimitZ = rotationLimitZ - 90;
isMoveGoingLeftZ = true;
}
}
}
if (_root.doubleHeroArray.length > 1) {
h = 1;
while (h < _root.doubleHeroArray.length) {
_root.doubleHeroArray[h].removeMovieClip();
h++;
}
_root.doubleHeroArray.splice(1, _root.doubleHeroArray.length);
}
countOptimizer++;
if (countOptimizer > _root.optimizeDrawVar) {
_root.drawingPlane1.draw();
countOptimizer = 0;
}
_root.drawingPlane1.setCamera(a, b, scale);
if ((scale + scaleFactor) > 0) {
scale = scale + scaleFactor;
} else {
scale = 0;
}
scaleFactor = scaleFactor * 0.9;
a = a + (xSpeed * (Math.pow(-1, Math.ceil(Math.cos((b * Math.PI) / 180))) * -1));
b = b + ySpeed;
xSpeed = xSpeed * 0.9;
ySpeed = ySpeed * 0.9;
if (_root.mouseIsDown) {
if (isMouseDown) {
isHeroFollowedAngle = false;
xSpeed = (xDownStart - _root._xmouse) / 1.4;
ySpeed = (yDownStart - _root._ymouse) / 1.4;
} else {
this.isMouseDown = true;
}
this.xDownStart = _root._xmouse;
this.yDownStart = _root._ymouse;
}
if ((!_root.mouseIsDown) && (isMouseDown)) {
isHeroFollowedAngle = true;
this.isMouseDown = false;
}
if (Key.isDown(17)) {
if (!controlDown) {
isCameraAligning = true;
shiftDown = true;
}
}
if (!Key.isDown(17)) {
controlDown = false;
}
if ((!isCameraAligning) && (waitCounter != 0)) {
waitCounter = 0;
}
if (isMoveGoingRightX) {
moveRightX();
}
if (isMoveGoingLeftX) {
moveLeftX();
}
if (isMoveGoingRightZ) {
moveRightZ();
}
if (isMoveGoingLeftZ) {
moveLeftZ();
}
if (isCameraAligning) {
alignCamera();
}
if (isHeroFollowedAngle) {
followHeroAngle();
}
if (_root.removeThisCarryBlock != undefined) {
_root.removeThisCarryBlock.removeMovieClip();
_root.removeThisCarryBlock = undefined;
_root.doubleHeroArray[0].isStandingOnPlatform = false;
_root.doubleHeroArray[0].hero.isStandingOnPlatform = false;
_root.heroCanPush = false;
}
_root.jumpPower = _root.jumpPower + 1.2;
_root.gravity = _root.jumpPower;
if (Key.isDown(83) || (Key.isDown(38))) {
if (!this.jumpPressed) {
if (((_root.doubleHeroArray[0].isStandingOnPlatform || (_root.doubleHeroArray[0].hero.isStandingOnPlatform)) || (_root.doubleHeroArray[0].isStandingOnFloor)) || (_root.doubleHeroArray[0].hero.isStandingOnFloor)) {
_root.doubleHeroArray[0].isStandingOnPlatform = false;
_root.doubleHeroArray[0].hero.isStandingOnPlatform = false;
_root.doubleHeroArray[0].animationVar = "jump";
_root.depth++;
smoke = _root.doubleHeroArray[0]._parent.attachMovie("smoke2", "smoke2" + _root.doubleHeroArray[0]._parent.getNextHighestDepth(), _root.doubleHeroArray[0]._parent.getNextHighestDepth(), {_x:_root.doubleHeroArray[0]._x, _y:_root.doubleHeroArray[0]._y});
smoke._rotation = _root.doubleHeroArray[0]._rotation;
smokeArray.push(smoke);
_root.depth++;
smoke = _root.doubleHeroArray[0].hero._parent.attachMovie("smoke2", "smoke2" + _root.doubleHeroArray[0].hero._parent.getNextHighestDepth(), _root.doubleHeroArray[0].hero._parent.getNextHighestDepth(), {_x:_root.doubleHeroArray[0].hero._x, _y:_root.doubleHeroArray[0].hero._y});
smoke._rotation = _root.doubleHeroArray[0].hero._rotation;
smokeArray.push(smoke);
_root.jumpAnimationDone = false;
_root.gravity = _root.gravity - 15;
_root.jumpPower = -15;
if (_root.heroCarryBlock && (!thereIsAnotherCarryBlock)) {
_root.gravity = _root.gravity - 8;
_root.jumpPower = -8;
}
this.jumpPressed = true;
_root.jumpSound.start();
}
}
}
if (_root.heroCarryBlock) {
_root.heroCarryBlockCounter++;
}
if ((_root.heroCarryBlock && (_root.heroCarryBlockCounter > 10)) && (!_root.heroCanPush)) {
useThisHeroForCarry = _root.doubleHeroArray[0];
if (((Math.floor(_root.doubleHeroArray[0]._x / 40) < 0) || (Math.floor(_root.doubleHeroArray[0]._x / 40) > 9)) || ((Math.floor(_root.doubleHeroArray[0]._y / 40) < 0) || (Math.floor(_root.doubleHeroArray[0]._y / 40) > 9))) {
useThisHeroForCarry = _root.doubleHeroArray[0].hero;
}
if (useThisHeroForCarry._parent.gravityRotation == 0) {
this.carryBlockHerolinkAddX = 1;
this.carryBlockHerolinkAddY = 1;
}
if (useThisHeroForCarry._parent.gravityRotation == 90) {
this.carryBlockHerolinkAddX = 2;
this.carryBlockHerolinkAddY = 0;
}
if (useThisHeroForCarry._parent.gravityRotation == -90) {
this.carryBlockHerolinkAddX = 0;
this.carryBlockHerolinkAddY = 0;
}
if (Math.abs(useThisHeroForCarry._parent.gravityRotation) == 180) {
this.carryBlockHerolinkAddX = 1;
this.carryBlockHerolinkAddY = -1;
}
carryBlockCheckForBlock = useThisHeroForCarry._parent.blockList[Math.round((useThisHeroForCarry._x + 20) / 40) - this.carryBlockHerolinkAddX];
thereIsAnotherCarryBlock = false;
while ((carryBlockCheckForBlock != "empty") && (carryBlockCheckForBlock != undefined)) {
if (Math.round((carryBlockCheckForBlock._y + 20) / 40) == (Math.round((useThisHeroForCarry._y + 20) / 40) + this.carryBlockHerolinkAddY)) {
thereIsAnotherCarryBlock = true;
break;
}
carryBlockCheckForBlock = carryBlockCheckForBlock.linkBlock;
}
if (Key.isDown(65) && (!thereIsAnotherCarryBlock)) {
_root.heroCanPush = true;
boxBlock = useThisHeroForCarry._parent.attachMovie("boxBlockCarry", "boxBlockCarry" + useThisHeroForCarry._parent.getNextHighestDepth(), useThisHeroForCarry._parent.getNextHighestDepth(), {_x:(Math.floor(useThisHeroForCarry._x / 40) * 40) + 20, _y:(Math.floor(useThisHeroForCarry._y / 40) * 40) + 20});
useThisHeroForCarry.swapDepths(useThisHeroForCarry._parent.getNextHighestDepth());
if (useThisHeroForCarry._rotation == 0) {
if (useThisHeroForCarry == _root.doubleHeroArray[0].hero) {
_root.doubleHeroArray[0]._y = _root.doubleHeroArray[0]._y - 40;
}
boxBlock._y = boxBlock._y + 40;
}
if (useThisHeroForCarry._rotation == 90) {
if (useThisHeroForCarry == _root.doubleHeroArray[0].hero) {
_root.doubleHeroArray[0]._x = _root.doubleHeroArray[0]._x + 40;
}
boxBlock._x = boxBlock._x - 40;
}
if (useThisHeroForCarry._rotation == -90) {
if (useThisHeroForCarry == _root.doubleHeroArray[0].hero) {
_root.doubleHeroArray[0]._x = _root.doubleHeroArray[0]._x - 40;
}
boxBlock._x = boxBlock._x + 40;
}
if (Math.abs(useThisHeroForCarry._rotation) == 180) {
if (useThisHeroForCarry == _root.doubleHeroArray[0].hero) {
_root.doubleHeroArray[0]._y = _root.doubleHeroArray[0]._y + 40;
}
boxBlock._y = boxBlock._y - 40;
}
_root.heroCarryBlockCounter = 0;
_root.heroCarryBlock = false;
}
}
if ((!Key.isDown(83)) && (!Key.isDown(38))) {
if (this.jumpPressed) {
this.jumpPressed = false;
}
}
if (_root.canThrowBombs && (_root.levelVar != "Select")) {
if (Key.isDown(68) && (!this.dIsDown)) {
bombThrowable = _root.doubleHeroArray[0]._parent.attachMovie("bombThrowable", "bombThrowable" + _root.doubleHeroArray[0]._parent.getNextHighestDepth(), _root.doubleHeroArray[0]._parent.getNextHighestDepth(), {_x:_root.doubleHeroArray[0]._x, _y:_root.doubleHeroArray[0]._y});
_root.doubleHeroArray[0]._parent.bombThrowable = bombThrowable;
bombThrowable._rotation = _root.doubleHeroArray[0]._rotation;
this.dIsDown = true;
}
if (!Key.isDown(68)) {
if (this.dIsDown) {
this.dIsDown = false;
}
}
}
if (_root.gravity < -20) {
_root.gravity = -20;
}
if (_root.gravity > 15) {
_root.gravity = 15;
}
if ((Key.isDown(82) && (typeof(_root.levelVar) == "string")) && (_root.levelVar != "UserLevel")) {
_root.restart();
}
if ((Key.isDown(82) && (typeof(_root.levelVar) == "string")) && (_root.levelVar == "UserLevel")) {
_root.restartUserLevel = true;
_root.gotoEditor = true;
}
if (((((_root.levelVar != 1) && (_root.levelVar != 2)) && (_root.levelVar != 3)) && (_root.levelVar != "Tutorial2")) && (_root.levelVar != "Select")) {
if (_root.hintCounter != 0) {
_root.hintCounter = 0;
}
if (Key.isDown(72) && (_root.noHint._x != 495)) {
_root.noHint._x = 495;
_root.noHint._y = 40;
_root.noHint.gotoAndPlay(2);
}
}
if (((_root.levelVar == 1) && (!_root.level1ChestGotten)) && (this.usedHint == undefined)) {
_root.hintCounter++;
}
if (((_root.levelVar == 2) && (!_root.level2ChestGotten)) && (this.usedHint == undefined)) {
_root.hintCounter++;
}
if (((_root.levelVar == 3) && (!_root.level3ChestGotten)) && (this.usedHint == undefined)) {
_root.hintCounter++;
}
if (((_root.levelVar == "Tutorial2") && (!_root.levelTutorial2ChestGotten)) && (this.usedHint == undefined)) {
_root.hintCounter++;
}
if (_root.hintCounter > 200) {
_root.hint._x = 490;
_root.hint._y = 40;
if (Key.isDown(72)) {
_root.hint._x = 1000;
_root.hintCounter = 0;
this.usedHint = true;
}
}
if ((Key.isDown(84) && (Key.isDown(86))) && (Key.isDown(87))) {
this.cheatsOn = true;
_root.fpstext._x = 500;
}
if (this.cheatsOn) {
if (Key.isDown(81)) {
_root.levelVar = 0;
_root.restart();
}
if (Key.isDown(48)) {
_root.levelVar = 10;
_root.restart();
}
if (Key.isDown(49)) {
_root.levelVar = "Boss1";
_root.restart();
}
if (Key.isDown(50)) {
_root.levelVar = "Boss2";
_root.restart();
}
if (Key.isDown(51)) {
_root.levelVar = "Boss3";
_root.restart();
}
if (Key.isDown(52)) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.trackBoss.stop();
_root.gotoAndPlay("cutscene");
}
if (Key.isDown(54)) {
_root.levelVar = "BombBag";
_root.restart();
}
if (Key.isDown(55)) {
_root.levelVar = "Tutorial2";
_root.restart();
}
if (Key.isDown(56)) {
_root.levelVar = 18;
_root.restart();
}
if (Key.isDown(57)) {
_root.levelVar = 9;
_root.restart();
}
if (Key.isDown(85)) {
levelUnlockI = 0;
while (levelUnlockI < 6) {
_root.mc1Shelter.mc["level" + levelUnlockI].isLocked = false;
levelUnlockI++;
}
_root.mc1Shelter.mc.boss1.isLocked = false;
_root.level0ChestGotten = true;
_root.notFirstTimeUnlockedWorld1 = true;
_root.levelBoss1ChestGotten = true;
_root.notFirstTimeUnlockedWorld2 = true;
_root.levelBoss2ChestGotten = true;
_root.notFirstTimeUnlockedWorld3 = true;
_root.levelBoss3ChestGotten = true;
levelUnlockI = 0;
while (levelUnlockI < 6) {
_root.mc2Shelter.mc["level" + (levelUnlockI + 5)].isLocked = false;
levelUnlockI++;
}
levelUnlockI = 0;
while (levelUnlockI < 6) {
_root.mc3Shelter.mc["level" + (levelUnlockI + 10)].isLocked = false;
levelUnlockI++;
}
levelUnlockI = 0;
while (levelUnlockI < 4) {
_root.mc5Shelter.mc["level" + (levelUnlockI + 15)].isLocked = false;
levelUnlockI++;
}
_root.level4GearGotten = true;
_root.level5GearGotten = true;
_root.level7GearGotten = true;
_root.level10GearGotten = true;
_root.level11GearGotten = true;
_root.level12GearGotten = true;
i = 1;
while (i <= 18) {
_root[("level" + i) + "DiamondGotten"] = true;
i++;
}
_root.levelTutorial1KeyGotten = true;
_root.level1KeyGotten = true;
_root.level5KeyGotten = true;
_root.level8KeyGotten = true;
_root.level10KeyGotten = true;
_root.level13KeyGotten = true;
_root.level14KeyGotten = true;
_root.level16KeyGotten = true;
_root.level18KeyGotten = true;
}
}
if ((Key.isDown(27) || (_root.exitButtonPressed)) && (_root.levelVar == "UserLevel")) {
_root.exitButtonPressed = false;
_root.gotoEditor = true;
}
if (_root.gotoEditor) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.trackBoss.stop();
_root.gotoAndPlay("editor");
_root.gotoEditor = false;
}
if ((Key.isDown(27) || (_root.exitButtonPressed)) && (_root.levelVar != "UserLevel")) {
if (_root.levelVar == "Select") {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.trackBoss.stop();
_root.exitButtonPressed = false;
_root.gotoAndPlay("menu");
}
if (((_root.levelVar == "Select") || (_root.levelVar == "Tutorial1")) || (_root.levelVar == "Tutorial2")) {
_root.levelJustVisited = 0;
} else {
_root.levelJustVisited = _root.levelVar;
}
_root.levelVar = "Select";
_root.exitButtonPressed = false;
_root.restart();
}
if (_root.doubleHeroArray[0] != undefined) {
cubeI = 0;
while (cubeI < cube1.getSideCollection().length) {
cube1.getSideCollection()[cubeI].setUpdateDrawMc(false);
cubeI++;
}
}
if ((((isMoveGoingRightX || (isMoveGoingLeftX)) || (isMoveGoingRightZ)) || (isMoveGoingLeftZ)) || (updateMcCounter < 50)) {
if (updateMcCounter > 50) {
updateMcCounter = 0;
}
updateMcCounter++;
cubeI = 0;
while (cubeI < cube1.getSideCollection().length) {
cube1.getSideCollection()[cubeI].setUpdateDrawMc(true);
cubeI++;
}
}
_root.doubleHeroArray[0]._parent.side.setUpdateDrawMc(true);
_root.doubleHeroArray[0].hero._parent.side.setUpdateDrawMc(true);
smoke._parent.side.setUpdateDrawMc(true);
smoke2._parent.side.setUpdateDrawMc(true);
smokeArrayI = 0;
while (smokeArrayI < smokeArray.length) {
if (((smokeArray[smokeArrayI] + "empty") == "empty") || (smokeArray[smokeArrayI] == undefined)) {
smokeArray.splice(smokeArrayI, 1);
} else {
smokeArray[smokeArrayI]._parent.side.setUpdateDrawMc(true);
}
smokeArrayI++;
}
if (_root.levelVar == "Boss1") {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if ((_root.wormArray[wormArrayI] + "empty") == "empty") {
_root.wormArray.splice(wormArrayI, 1);
}
wormArrayI++;
}
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
_root.wormArray[wormArrayI]._parent.side.setUpdateDrawMc(true);
wormArrayI++;
}
}
if (_root.canThrowBombs) {
bombThrowableI = 0;
while (bombThrowableI <= 6) {
if ((_root[("mc" + bombThrowableI) + "Shelter"].mc.bombThrowable != undefined) && ((_root[("mc" + bombThrowableI) + "Shelter"].mc.bombThrowable + "empty") != "empty")) {
_root[("mc" + bombThrowableI) + "Shelter"].mc.side.setUpdateDrawMc(true);
}
bombThrowableI++;
}
}
if (_root.levelVar == "Select") {
if (this.tempCounterWorldUnlock > 0) {
this.unlockWorldMc.side.setUpdateDrawMc(true);
}
if ((((_root.levelJustVisited >= 16) && (_root.levelJustVisited <= 18)) && (typeof(_root.levelJustVisited) == "number")) || ((typeof(_root.levelJustVisited) == "string") && (_root.levelJustVisited == "BombBag"))) {
if (_root.levelSelectStartCounter == 0) {
cube1.setRotationPoint(new three_d.VectorClass([[-0.5], [-0.5], [-0.5]]));
cube1.setRotation(-90, "z");
isCameraAligning = true;
_root.updateAllGravity();
if (((_root.levelJustVisited >= 16) && (_root.levelJustVisited <= 18)) && (typeof(_root.levelJustVisited) == "number")) {
_root.startMc = _root.mc5Shelter.mc;
}
_root.doubleHeroArray[0].removeMovieClip();
if (((_root.levelJustVisited >= 16) && (_root.levelJustVisited <= 18)) && (typeof(_root.levelJustVisited) == "number")) {
_root.startX = _root.startMc["level" + _root.levelJustVisited]._x;
_root.startY = _root.startMc["level" + _root.levelJustVisited]._y;
}
if (_root.levelJustVisited == "BombBag") {
_root.startMc.diamondTeleport._rotation = _root.startMc.gravityRotation;
}
_root.hero = _root.startMc.attachMovie("hero", "hero" + (_root.depth++), _root.startMc.getNextHighestDepth(), {_x:_root.startX, _y:_root.startY});
_root.startMc.heroPointer = _root.hero;
_root.hero.heroReference = "";
_root.doubleHeroArray = new Array();
rotationLimitZ = rotationLimitZ - 90;
rotationZ = rotationLimitZ;
cube1.setRotationPoint(new three_d.VectorClass([[X], [-1], [Z]]));
_root.mc4Shelter.mc.machineHitbox.moveCubeDirection = _root.mc4Shelter.mc.machineHitbox.moveCubeDirection * -1;
_root.levelSelectStartCounter++;
}
}
}
if (_root.cubeReflectionOn) {
cubeI = 0;
while (cubeI < cube1.getSideCollection().length) {
cube2.getSideCollection()[cubeI].setUpdateDrawMc(cube1.getSideCollection()[cubeI].getUpdateDrawMc());
cubeI++;
}
if (updateMcCounter < 50) {
cubeI = 0;
while (cubeI < cube1.getSideCollection().length) {
if (cube2.getSideCollection()[cubeI].getMovieClip().mc.heroPointer == undefined) {
cube2.getSideCollection()[cubeI].setUpdateDrawMc(false);
}
cubeI++;
}
}
}
if (_root.wormLooseHealth) {
_root.wormLooseHealthCounter++;
_root.wormSpeed = 0;
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].positionNumber == 1) {
_root.wormArray[wormArrayI].worm_mc.animation.gotoAndStop("hurt");
}
wormArrayI++;
}
}
if (_root.wormLooseHealthCounter > 2) {
_root.wormLoosePart.wormReference.removeMovieClip();
_root.wormLoosePart.worm.removeMovieClip();
_root.wormLoosePart.removeMovieClip();
}
if (_root.wormLooseHealthCounter > 10) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].positionNumber == 1) {
_root.wormArray[wormArrayI].worm_mc.animation.gotoAndStop("eat");
}
wormArrayI++;
}
_root.wormSpeed = 10;
_root.wormLooseHealthCounter = 0;
_root.wormHealth = _root.wormHealth - 1;
_root.wormLooseHealth = false;
}
if (_root.wormHealth == 1) {
_root.wormSpeed = 0;
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].positionNumber == 1) {
_root.wormArray[wormArrayI].worm_mc.animation.gotoAndStop("die");
}
wormArrayI++;
}
}
if (_root.levelVar == "Boss2") {
if (_root.mc2Shelter.mc.robot.phase == 3) {
_root.mc2Shelter.mc.side.setUpdateDrawMc(true);
}
if (_root.mc3Shelter.mc.robot.phase == 3) {
_root.mc3Shelter.mc.side.setUpdateDrawMc(true);
}
}
if (_root.levelVar == "Boss3") {
if (_root.boss3Phase == 2) {
_root.mc4Shelter.mc.side.setUpdateDrawMc(true);
}
}
if (_root.levelVar == "Select") {
mcIShelter = 1;
while (mcIShelter < 7) {
if (((_root[("mc" + mcIShelter) + "Shelter"].mc.cubeRotateShelterPointer + "Empty") != "Empty") && (_root[("mc" + mcIShelter) + "Shelter"].mc.cubeRotateShelterPointer != undefined)) {
_root[("mc" + mcIShelter) + "Shelter"].mc.side.setUpdateDrawMc(true);
}
mcIShelter++;
}
}
if ((!_root.diamondRunActivate._visible) && (this.diamondRunActivateDisapear == undefined)) {
_root.diamondRunActivate._parent.side.setUpdateDrawMc(true);
this.diamondRunActivateDisapear = 1;
}
if (_root.diamondRunOn) {
if (_root.barrelLength == undefined) {
_root.hereIsTheChest._visible = false;
_root.hereIsTheChest._parent.side.setUpdateDrawMc(true);
_root.hereIsTheGear._visible = false;
_root.hereIsTheGear._parent.side.setUpdateDrawMc(true);
this.barrelI = 1;
while (this.barrelI < _root.barrelArray.length) {
_root.barrelArray[this.barrelI]._visible = true;
_root.barrelArray[this.barrelI]._parent.side.setUpdateDrawMc(true);
if ((_root.barrelArray[this.barrelI] == undefined) && (_root.barrelLength == undefined)) {
_root.barrelLength = this.barrelI - 1;
}
this.barrelI++;
}
}
if (!_root.barrelArray[_root.barrelIndex].arrowMc._visible) {
_root.barrelArray[_root.barrelIndex]._alpha = 100;
_root.barrelArray[_root.barrelIndex].arrowMc._visible = true;
_root.barrelArray[_root.barrelIndex]._parent.side.setUpdateDrawMc(true);
}
}
if (_root.levelVar == "Select") {
var colorTransform = (new flash.geom.ColorTransform(this));
colorTransform.redOffset = -30;
colorTransform.greenOffset = -30;
colorTransform.blueOffset = -30;
if (_root.doubleHeroArray[0]._parent == _root.mc3Shelter.mc) {
var trans = (new flash.geom.Transform(_root.doubleHeroArray[0]));
trans.colorTransform = colorTransform;
}
if (_root.doubleHeroArray[0].hero._parent == _root.mc3Shelter.mc) {
var trans2 = (new flash.geom.Transform(_root.doubleHeroArray[0].hero));
trans2.colorTransform = colorTransform;
}
if (_root.doubleHeroArray[0]._parent == _root.mc5Shelter.mc) {
colorTransform.redOffset = 30;
colorTransform.greenOffset = 30;
colorTransform.blueOffset = 30;
var trans = (new flash.geom.Transform(_root.doubleHeroArray[0]));
trans.colorTransform = colorTransform;
}
if (_root.doubleHeroArray[0].hero._parent == _root.mc5Shelter.mc) {
colorTransform.redOffset = 30;
colorTransform.greenOffset = 30;
colorTransform.blueOffset = 30;
var trans = (new flash.geom.Transform(_root.doubleHeroArray[0].hero));
trans.colorTransform = colorTransform;
}
if (_root.doubleHeroArray[0]._parent == _root.mc6Shelter.mc) {
var trans = (new flash.geom.Transform(_root.doubleHeroArray[0]));
trans.colorTransform = colorTransform;
}
if (_root.doubleHeroArray[0].hero._parent == _root.mc6Shelter.mc) {
var trans = (new flash.geom.Transform(_root.doubleHeroArray[0].hero));
trans.colorTransform = colorTransform;
}
if (_root.level0ChestGotten) {
if ((this.tempCounterWorldUnlock == undefined) && (_root.notFirstTimeUnlockedWorld1)) {
_root.mc1Shelter.mc.worldLocked._visible = false;
_root.mc4Shelter.mc.worldGateBlock1._y = 1000;
_root.mc4Shelter.mc.worldGateBlock2._y = 1000;
_root.mc4Shelter.mc.worldGateBlock3._y = 1000;
_root.mc4Shelter.mc.worldGateBlock4._y = 1000;
}
if ((this.tempCounterWorldUnlock == undefined) && (!_root.notFirstTimeUnlockedWorld1)) {
this.unlockWorldMc = _root.mc1Shelter.mc;
this.unlockWorldMc2 = _root.mc4Shelter.mc;
this.unlockWorldLatitude = 0;
this.tempCounterWorldUnlock = 1;
}
}
if (_root.levelBoss1ChestGotten) {
if ((this.tempCounterWorldUnlock == undefined) && (_root.notFirstTimeUnlockedWorld2)) {
_root.mc2Shelter.mc.worldLocked._visible = false;
_root.mc1Shelter.mc.worldGateBlock1._y = 1000;
_root.mc1Shelter.mc.worldGateBlock2._y = 1000;
_root.mc1Shelter.mc.worldGateBlock3._y = 1000;
_root.mc1Shelter.mc.worldGateBlock4._y = 1000;
}
if ((this.tempCounterWorldUnlock == undefined) && (!_root.notFirstTimeUnlockedWorld2)) {
this.unlockWorldMc = _root.mc2Shelter.mc;
this.unlockWorldMc2 = _root.mc1Shelter.mc;
this.unlockWorldLatitude = 90;
this.tempCounterWorldUnlock = 1;
}
}
if (_root.levelBoss2ChestGotten) {
if ((this.tempCounterWorldUnlock == undefined) && (_root.notFirstTimeUnlockedWorld3)) {
_root.mc3Shelter.mc.worldLocked._visible = false;
_root.mc2Shelter.mc.worldGateBlock1._y = 1000;
_root.mc2Shelter.mc.worldGateBlock2._y = 1000;
_root.mc2Shelter.mc.worldGateBlock3._y = 1000;
_root.mc2Shelter.mc.worldGateBlock4._y = 1000;
_root.mc2Shelter.mc.worldGateBlock5._y = 1000;
_root.mc2Shelter.mc.worldGateBlock6._y = 1000;
}
if ((this.tempCounterWorldUnlock == undefined) && (!_root.notFirstTimeUnlockedWorld3)) {
this.unlockWorldMc = _root.mc3Shelter.mc;
this.unlockWorldMc2 = _root.mc2Shelter.mc;
this.unlockWorldLatitude = 180;
this.tempCounterWorldUnlock = 1;
}
}
if (_root.machineIsWorkingAndMoved) {
if ((this.tempCounterWorldUnlock == undefined) && (_root.notFirstTimeUnlockedWorldBonus)) {
_root.mc4Shelter.mc.mudBlock1._y = 1000;
_root.mc4Shelter.mc.mudBlock2._y = 1000;
_root.mc4Shelter.mc.mudBlock3._y = 1000;
_root.mc4Shelter.mc.mudBlock4._y = 1000;
_root.mc4Shelter.mc.mudBlock5._y = 1000;
_root.mc4Shelter.mc.grassBlock1._rotation = -90;
}
if ((this.tempCounterWorldUnlock == undefined) && (!_root.notFirstTimeUnlockedWorldBonus)) {
this.unlockWorldMc = _root.mc5Shelter.mc;
this.unlockWorldMc2 = undefined;
this.unlockWorldLatitude = 180;
this.tempCounterWorldUnlock = 1;
}
}
if (_root.canThrowBombs) {
if ((this.tempCounterWorldUnlock == undefined) && (_root.notFirstTimeUnlockedWorldSecret)) {
_root.mc4Shelter.mc.grassBlock2._y = 1000;
_root.mc4Shelter.mc.grassBlock3._y = 1000;
_root.mc4Shelter.mc.grassBlock4._y = 1000;
_root.mc4Shelter.mc.grassBlock5._y = 1000;
_root.mc4Shelter.mc.grassBlock6._y = 1000;
_root.mc4Shelter.mc.grassBlock7._y = 1000;
}
if ((this.tempCounterWorldUnlock == undefined) && (!_root.notFirstTimeUnlockedWorldSecret)) {
this.unlockWorldMc = _root.mc6Shelter.mc;
this.unlockWorldMc2 = undefined;
this.unlockWorldLatitude = 0;
this.tempCounterWorldUnlock = 1;
}
}
if (this.tempCounterWorldUnlock > 0) {
this.tempCounterWorldUnlock++;
}
if (this.tempCounterWorldUnlock > 20) {
_root.isHeroPlayable = false;
isHeroFollowedAngle = false;
_root.doubleHeroArray[0].shelter.gotoAndStop("idle");
rotateCameraSmoothLatitude(this.unlockWorldLatitude);
}
if (this.tempCounterWorldUnlock == 30) {
this.unlockWorldMc.worldLocked.chains.gotoAndStop(2);
}
if ((this.tempCounterWorldUnlock > 45) && (_root.mc1Shelter.mc.worldLocked._alpha > 0)) {
this.unlockWorldMc.worldLocked._alpha = this.unlockWorldMc.worldLocked._alpha - 10;
}
if (_root.mc1Shelter.mc.worldLocked._alpha <= 0) {
this.unlockWorldMc.worldLocked._visible = false;
}
if (this.tempCounterWorldUnlock > 100) {
this.unlockWorldMc2.worldGateBlock1._y = 1000;
this.unlockWorldMc2.worldGateBlock2._y = 1000;
this.unlockWorldMc2.worldGateBlock3._y = 1000;
this.unlockWorldMc2.worldGateBlock4._y = 1000;
this.unlockWorldMc2.worldGateBlock5._y = 1000;
this.unlockWorldMc2.worldGateBlock6._y = 1000;
if (_root.level0ChestGotten) {
_root.notFirstTimeUnlockedWorld1 = true;
_root.user.data.notFirstTimeUnlockedWorld1 = _root.notFirstTimeUnlockedWorld1;
}
if (_root.levelBoss1ChestGotten) {
_root.notFirstTimeUnlockedWorld2 = true;
_root.user.data.notFirstTimeUnlockedWorld2 = _root.notFirstTimeUnlockedWorld2;
}
if (_root.levelBoss2ChestGotten) {
_root.notFirstTimeUnlockedWorld3 = true;
_root.user.data.notFirstTimeUnlockedWorld3 = _root.notFirstTimeUnlockedWorld3;
}
if (_root.machineIsWorkingAndMoved) {
_root.mc4Shelter.mc.mudBlock1._y = 1000;
_root.mc4Shelter.mc.mudBlock2._y = 1000;
_root.mc4Shelter.mc.mudBlock3._y = 1000;
_root.mc4Shelter.mc.mudBlock4._y = 1000;
_root.mc4Shelter.mc.mudBlock5._y = 1000;
_root.mc4Shelter.mc.grassBlock1._rotation = -90;
_root.notFirstTimeUnlockedWorldBonus = true;
_root.user.data.notFirstTimeUnlockedWorldBonus = _root.notFirstTimeUnlockedWorldBonus;
}
if (_root.canThrowBombs) {
_root.mc4Shelter.mc.grassBlock2._y = 1000;
_root.mc4Shelter.mc.grassBlock3._y = 1000;
_root.mc4Shelter.mc.grassBlock4._y = 1000;
_root.mc4Shelter.mc.grassBlock5._y = 1000;
_root.mc4Shelter.mc.grassBlock6._y = 1000;
_root.mc4Shelter.mc.grassBlock7._y = 1000;
_root.notFirstTimeUnlockedWorldSecret = true;
_root.user.data.notFirstTimeUnlockedWorldSecret = _root.notFirstTimeUnlockedWorldSecret;
}
isHeroFollowedAngle = true;
_root.isHeroPlayable = true;
this.tempCounterWorldUnlock = 0;
}
}
if ((((((_root.levelVar == 11) || (_root.levelVar == 12)) || (_root.levelVar == 13)) || (_root.levelVar == 14)) || (_root.levelVar == 15)) || (_root.levelVar == "Boss3")) {
var colorTransform = (new flash.geom.ColorTransform(this));
colorTransform.redOffset = -30;
colorTransform.greenOffset = -30;
colorTransform.blueOffset = -30;
var trans = (new flash.geom.Transform(_root.doubleHeroArray[0]));
trans.colorTransform = colorTransform;
var trans2 = (new flash.geom.Transform(_root.doubleHeroArray[0].hero));
trans2.colorTransform = colorTransform;
}
if (((_root.levelVar == 16) || (_root.levelVar == 17)) || (_root.levelVar == 18)) {
var colorTransform = (new flash.geom.ColorTransform(this));
colorTransform.redOffset = 30;
colorTransform.greenOffset = 30;
colorTransform.blueOffset = 30;
var trans = (new flash.geom.Transform(_root.doubleHeroArray[0]));
trans.colorTransform = colorTransform;
var trans2 = (new flash.geom.Transform(_root.doubleHeroArray[0].hero));
trans2.colorTransform = colorTransform;
}
if (_root.isRotateCameraMode) {
_root.floorIsEnabled = false;
_root.drawingPlane1._rotation = _root.drawingPlane1._rotation + _root.rotateCameraModeSpeed;
_root.doubleHeroArray[0]._rotation = _root.doubleHeroArray[0]._parent.gravityRotation;
if ((_root.drawingPlane1._rotation % 90) == 0) {
boss3mcI = 1;
while (boss3mcI < 7) {
if ((_root[("mc" + boss3mcI) + "Shelter"].mc.sidePosition == "yFront") || (_root[("mc" + boss3mcI) + "Shelter"].mc.sidePosition == "yBack")) {
_root[("mc" + boss3mcI) + "Shelter"].mc.sidePosition = "none";
}
_root[("mc" + boss3mcI) + "Shelter"].mc.gravityRotation = _root.drawingPlane1._rotation * -1;
boss3mcI++;
}
_root.doubleHeroArray[0]._rotation = _root.doubleHeroArray[0]._parent.gravityRotation;
_root.doubleHeroArray[0].updatePosXY();
if (_root.doubleHeroArray[0].heroString != "empty") {
_root.doubleHeroArray[0].hero.removeMovieClip();
if (_root.doubleHeroArray[0].heroDir == "right") {
_root.doubleHeroArray[0].posY = 360;
}
if (_root.doubleHeroArray[0].heroDir == "left") {
_root.doubleHeroArray[0].posY = 40;
}
if (_root.doubleHeroArray[0].heroDir == "up") {
_root.doubleHeroArray[0].posX = 360;
}
if (_root.doubleHeroArray[0].heroDir == "down") {
_root.doubleHeroArray[0].posX = 40;
}
_root.doubleHeroArray[0].evaluatePosCoordinates();
}
}
}
}
Instance of Symbol 1584 MovieClip in Frame 5
onClipEvent (load) {
this.counter = 0;
this.sumFps = 0;
}
onClipEvent (enterFrame) {
if (_root.timeOutLevel == true) {
this.counter++;
}
if (this.counter > 5) {
this.sumFps = this.sumFps + _root.fps;
}
if (this.counter >= 10) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.layer.removeMovieClip();
_root.averageFps = this.sumFps / 5;
if ((_root.averageFps < 25) && (_root.graphicTry <= 3)) {
if (_root.graphicTry == 0) {
_root.blurSide = false;
}
if (_root.graphicTry == 1) {
_root._quality = "MEDIUM";
}
if (_root.graphicTry == 2) {
_root.optimizeDrawVar = 1;
}
if (_root.graphicTry == 3) {
_root._quality = "LOW";
}
_root.graphicTry++;
_root.gotoAndPlay("configureGraphic");
}
_root.gotoAndPlay("menu");
}
}
Instance of Symbol 1584 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.graphicPoke) {
_root.drawingPlane1.setBlurSides(_root.blurSide);
_root.graphicPoke = false;
}
}
Instance of Symbol 1596 MovieClip "helpBubble2" in Frame 5
onClipEvent (load) {
this._x = 1000;
}
onClipEvent (enterFrame) {
if (this._x != 1000) {
if (((!_root.blurSide) && (_root.optimizeDrawVar == 1)) && (_root._quality == "LOW")) {
this.low.gotoAndStop(2);
} else {
this.low.gotoAndStop(1);
}
if (((!_root.blurSide) && (_root.optimizeDrawVar == 0)) && (_root._quality == "MEDIUM")) {
this.medium.gotoAndStop(2);
} else {
this.medium.gotoAndStop(1);
}
if ((_root.blurSide && (_root.optimizeDrawVar == 0)) && (_root._quality == "HIGH")) {
this.high.gotoAndStop(2);
} else {
this.high.gotoAndStop(1);
}
if (this._alpha < 100) {
this._alpha = this._alpha + 30;
}
if (this._alpha > 100) {
this._alpha = 100;
}
if (this.buttonHigh.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.blurSide = true;
_root.optimizeDrawVar = 0;
_root._quality = "HIGH";
_root.graphicPoke = true;
}
}
if (this.buttonMedium.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.blurSide = false;
_root.optimizeDrawVar = 0;
_root._quality = "MEDIUM";
_root.graphicPoke = true;
}
}
if (this.buttonLow.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.blurSide = false;
_root.optimizeDrawVar = 1;
_root._quality = "LOW";
_root.graphicPoke = true;
}
}
} else if (this._alpha != 0) {
this._alpha = 0;
}
}
Instance of Symbol 1545 MovieClip "music" in Frame 5
onClipEvent (load) {
counter = 0;
counter2 = 0;
counter3 = 0;
turnDownMusic = false;
this.mIsDown = false;
}
onClipEvent (enterFrame) {
if (!_root.timeOutLevel) {
if (turnDownMusic) {
if (counter > 0) {
counter = counter - 0.2;
}
if (counter2 > 0) {
counter2 = counter2 - 2;
}
if (counter3 > 0) {
counter = counter - 0.2;
}
} else {
if (counter < 10) {
counter = counter + 0.5;
}
if (counter2 == 4) {
if (_root.levelVar == "Select") {
_root.trackSelect.start(0, 10);
_root.trackSelect.setVolume(5);
}
if ((substring(_root.levelVar, 0, 4)) == "Boss") {
_root.trackBoss.start(0, 10);
_root.trackBoss.setVolume(8);
}
}
if (counter2 < 5) {
counter2 = counter2 + 0.5;
}
if (counter3 < 10) {
counter3 = counter3 + 0.5;
}
}
_root.track1.setVolume(counter);
_root.track2.setVolume(counter3);
}
if (Key.isDown(77) && (!this.mIsDown)) {
_root.musicIsOnMute = !_root.musicIsOnMute;
this.mIsDown = true;
}
if (!Key.isDown(77)) {
this.mIsDown = false;
}
if (_root.musicIsOnMute) {
_root.buttonMusic.gotoAndStop(2);
_root.cubeSound.setVolume(0);
_root.track1.setVolume(0);
_root.track2.setVolume(0);
_root.trackSelect.setVolume(0);
} else {
_root.buttonMusic.gotoAndStop(1);
_root.cubeSound.setVolume(100);
if (counter2 > 4) {
_root.trackSelect.setVolume(5);
}
}
}
Instance of Symbol 1612 MovieClip in Frame 5
onClipEvent (load) {
this.counter = 0;
this.idle = false;
}
onClipEvent (enterFrame) {
if ((_root.engine.cheatsOn && (Key.isDown(32))) && (this._currentframe == 1)) {
this.gotoAndPlay(this._currentframe + 1);
}
if (this.idle) {
this.counter++;
}
if ((this.counter > 40) && (!Key.isDown(32))) {
this.gotoAndPlay(this._currentframe + 1);
this.idle = false;
this.counter = 0;
}
}
Instance of Symbol 1615 MovieClip "helpBubble" in Frame 5
onClipEvent (load) {
this._x = 1000;
}
onClipEvent (enterFrame) {
if (this._x != 1000) {
if (this._alpha < 100) {
this._alpha = this._alpha + 30;
}
if (this._alpha > 100) {
this._alpha = 100;
}
} else if (this._alpha != 0) {
this._alpha = 0;
}
}
Instance of Symbol 1204 MovieClip "cursor" in Frame 5
onClipEvent (load) {
this.oldX = _root._xmouse;
this.oldY = _root._ymouse;
this.counter = 0;
this._alpha = _root.globalMouseAlpha;
}
onClipEvent (enterFrame) {
_root.globalMouseAlpha = this._alpha;
this._x = _root._xmouse;
this._y = _root._ymouse;
if (!_root.helpBubble2.hitTest(_root.cursorFinger)) {
_root.helpBubble2._x = 1000;
}
if (!_root.buttonMusic.hitTest(_root.cursorFinger)) {
_root.helpBubble._x = 1000;
}
if ((_root.menuHitbox.hitTest(_root.cursorFinger) || (this.hitTest(_root.helpBubble2))) && (this._currentframe != 3)) {
this.gotoAndStop(1);
if (_root.buttonExit.hitTest(_root.cursorFinger)) {
_root.helpBubble._x = _root.buttonExit._x - 10;
_root.helpBubble.textVar = "Exit (Esc)";
if (_root.mouseIsDown) {
_root.exitButtonPressed = true;
}
}
if (_root.buttonRestart.hitTest(_root.cursorFinger)) {
_root.helpBubble._x = _root.buttonRestart._x - 10;
_root.helpBubble.textVar = "Restart (r)";
if ((_root.mouseIsDown && (typeof(_root.levelVar) == "string")) && (_root.levelVar != "UserLevel")) {
_root.restart();
}
if ((_root.mouseIsDown && (typeof(_root.levelVar) == "string")) && (_root.levelVar == "UserLevel")) {
_root.restartUserLevel = true;
_root.gotoEditor = true;
}
}
if (_root.buttonMusic.hitTest(_root.cursorFinger)) {
_root.helpBubble2._x = 1000;
_root.helpBubble._x = _root.buttonMusic._x - 10;
if (_root.musicIsOnMute) {
_root.helpBubble.textVar = "Unmute (m)";
} else {
_root.helpBubble.textVar = "Mute (m)";
}
if (_root.mouseIsDown && (this.mouseClickReady)) {
_root.musicIsOnMute = !_root.musicIsOnMute;
this.mouseClickReady = false;
}
}
if (_root.buttonGraphics.hitTest(_root.cursorFinger)) {
_root.helpBubble._x = 1000;
_root.helpBubble2._x = _root.buttonGraphics._x - 10;
if (_root.mouseIsDown && (this.mouseClickReady)) {
if (_root.helpBubble2.low._currentframe == 2) {
_root.blurSide = true;
_root.optimizeDrawVar = 0;
_root._quality = "HIGH";
_root.graphicPoke = true;
this.mouseClickReady = false;
}
if (_root.helpBubble2.medium._currentframe == 2) {
_root.blurSide = false;
_root.optimizeDrawVar = 2;
_root._quality = "MEDIUM";
_root.graphicPoke = true;
this.mouseClickReady = false;
}
if (_root.helpBubble2.high._currentframe == 2) {
_root.blurSide = false;
_root.optimizeDrawVar = 1;
_root._quality = "HIGH";
_root.graphicPoke = true;
this.mouseClickReady = false;
}
}
}
} else {
this.gotoAndStop(2);
if (_root.mouseIsDown) {
this.counter = 0;
this._alpha = 100;
this.gotoAndStop(3);
}
}
if ((this._x == this.oldX) && (this._y == this.oldY)) {
this.counter++;
} else {
this.counter = 0;
this._alpha = 100;
}
if ((this.counter > 20) && (this._alpha > 0)) {
this._alpha = this._alpha - 10;
}
if (this._alpha <= 0) {
this._alpha = 0;
}
this.oldX = this._x;
this.oldY = this._y;
if ((!_root.mouseIsDown) && (!this.mouseClickReady)) {
this.mouseClickReady = true;
}
}
Frame 6
this.gotoAndPlay("level");
Frame 7
this.onEnterFrame = function () {
if (Key.isDown(27)) {
_root.levelVar = "Select";
_root.restart();
}
if (Key.isDown(32)) {
_root.chairman.gotoAndStop("reveal");
}
if (Key.isDown(38)) {
_root.chairman.gotoAndStop("useAmuletRevealed");
}
if (Key.isDown(40)) {
_root.chairman.gotoAndStop("hurt4TransitionRevealed");
}
if (Key.isDown(39)) {
this.tempCount = _root.chairman.animation.chair.count;
_root.chairman.gotoAndStop("absorbRevealed");
_root.chairman.animation.chair.count = this.tempCount;
}
};
_root.chairman.gotoAndStop("talk");
stop();
Frame 8
Mouse.show();
_root.levelVar = "Editor";
visibleLevelCode = "";
_root.heroCanPush = true;
_root.cursor.cursorMode = "idle";
_root.editorButtonWorks = true;
_root.trackSelectMenu.stop();
_root.ed.setUp = function () {
mcI = 1;
while (mcI < 7) {
mcShelter = _root.createEmptyMovieClip(("mc" + mcI) + "Shelter", _root.getNextHighestDepth());
mcShelter._visible = false;
_root.mcShelter.attachMovie(("level" + levelVar) + chr(mcI + 96), "mc", _root.getNextHighestDepth(), {_x:0, _y:0});
mcShelter.mc.blockList = new Array();
if (mcI == 1) {
mcShelter.mc.startHero = mcShelter.mc.attachMovie("minerStart2", "startHero", mcShelter.mc.getNextHighestDepth(), {_x:100, _y:100});
mcShelter.mc.chest = mcShelter.mc.attachMovie("chestShelter", "chest", mcShelter.mc.getNextHighestDepth(), {_x:300, _y:100});
}
if (_root.setupLevelCode != undefined) {
_root.mcShelter.mc.emptyCorners = true;
}
blockListI = 0;
while (blockListI <= 9) {
mcShelter.mc.blockList[blockListI] = "empty";
blockListI++;
}
if (mcShelter.mc.startHero != undefined) {
_root.startMc = _root.mcShelter.mc;
}
mcI++;
}
};
_root.ed.setUp();
_root.createEmptyMovieClip("movFrameRate", 100);
_root.movFrameRate.onEnterFrame = function () {
this.t = getTimer();
this.frameRate = Math.round(1000 / (this.t - this.o));
_root.fps = this.frameRate;
this.o = this.t;
};
str = "";
_root.ed.getMyChrValue = function (value1) {
value1 = value1 + 35;
if (value1 >= 127) {
value1 = value1 + 65;
}
return(value1);
};
_root.ed.getMyRealChrValue = function (value1) {
value1 = value1 - 35;
if (value1 >= 127) {
value1 = value1 - 65;
}
return(value1);
};
_root.ed.getByteValue = function (byte) {
byteValue = 0;
tempByte = byte;
bitValue = 1;
byteI = 0;
while (byteI < byte.length) {
bit = byte.substring(tempByte.length - 1, tempByte.length);
if (bit == "1") {
byteValue = byteValue + bitValue;
}
bitValue = bitValue * 2;
tempByte = byte.substring(0, tempByte.length - 1);
byteI++;
}
return(byteValue);
};
_root.ed.getByte = function (byteValue) {
tempByte = "";
byteI = 0;
while (byteI < 8) {
if (byteValue >= Math.pow(2, 7 - byteI)) {
tempByte = tempByte + "1";
byteValue = byteValue - Math.pow(2, 7 - byteI);
} else {
tempByte = tempByte + "0";
}
byteI++;
}
return(tempByte);
};
_root.ed.getAndMakeCode = function () {
levelCode = "";
tempLevelCode = "";
mcI = 1;
while (mcI < 7) {
if ((_root[("mc" + mcI) + "Shelter"].mc.startHero != undefined) && ((_root[("mc" + mcI) + "Shelter"].mc.startHero + "empty") != "empty")) {
_root.startMc = _root[("mc" + mcI) + "Shelter"].mc;
}
if ((_root[("mc" + mcI) + "Shelter"].mc.chest != undefined) && ((_root[("mc" + mcI) + "Shelter"].mc.chest + "empty") != "empty")) {
_root.chestMc = _root[("mc" + mcI) + "Shelter"].mc;
}
mcI++;
}
levelCode = levelCode + (_root.startMc.startHero._parent + "").substr(10, 1);
levelCode = levelCode + chr(_root.ed.getMyChrValue(((Math.floor(_root.startMc.startHero._y / 40) * 10) + Math.floor(_root.startMc.startHero._x / 40)) + 1));
levelCode = levelCode + "!";
levelCode = levelCode + (_root.chestMc.chest._parent + "").substr(10, 1);
levelCode = levelCode + chr(_root.ed.getMyChrValue(((Math.floor(_root.chestMc.chest._y / 40) * 10) + Math.floor(_root.chestMc.chest._x / 40)) + 1));
levelCode = levelCode + "!";
mcI = 1;
while (mcI < 7) {
tempMcBlockArray = _root[("mc" + mcI) + "Shelter"].mc.fullBlockArray;
tempMcBlArI = 1;
while (tempMcBlArI < 101) {
if (tempMcBlockArray[tempMcBlArI] != undefined) {
tempLevelCode = tempLevelCode + "1";
} else {
tempLevelCode = tempLevelCode + "0";
}
if (tempLevelCode.length == 8) {
levelCode = levelCode + chr(_root.ed.getMyChrValue(_root.ed.getByteValue(tempLevelCode)));
tempLevelCode = "";
}
tempMcBlArI++;
}
mcI++;
}
return(levelCode);
};
_root.ed.makeLevel = function (levelCode) {
tempLevelByte = "";
_root.edTempStartHeroPosition = _root.ed.getMyRealChrValue(ord(levelCode.substr(1, 1)));
_root.startMc = _root[("mc" + levelCode.substr(0, 1)) + "Shelter"].mc;
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].mc.startHero.removeMovieClip();
mcI++;
}
_root.ed.startHero = _root.startMc.attachMovie("minerStart2", "startHero", _root.startMc.getNextHighestDepth(), {_x:0, _y:0});
_root.ed.startHero._x = (((_root.edTempStartHeroPosition - 1) % 10) * 40) + 20;
_root.ed.startHero._y = (Math.ceil(_root.edTempStartHeroPosition / 10) * 40) - 30;
levelCode = levelCode.substr(3, levelCode.length);
_root.edTempChestPosition = _root.ed.getMyRealChrValue(ord(levelCode.substr(1, 1)));
_root.chestMc = _root[("mc" + levelCode.substr(0, 1)) + "Shelter"].mc;
levelCode = levelCode.substr(3, levelCode.length);
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].mc.chest.removeMovieClip();
mcI++;
}
_root.ed.chest = _root.chestMc.attachMovie("chestShelter", "chest", _root.chestMc.getNextHighestDepth(), {_x:0, _y:0});
_root.ed.chest._x = ((_root.edTempChestPosition - 1) % 10) * 40;
_root.ed.chest._y = (Math.ceil(_root.edTempChestPosition / 10) * 40) - 40;
levelCodeLength = levelCode.length;
levelCodeI = 0;
while (levelCodeI < levelCodeLength) {
tempLevelByte = tempLevelByte + _root.ed.getByte(_root.ed.getMyRealChrValue(ord(levelCode.substr(0, 1))));
levelCode = levelCode.substr(1, levelCode.length);
levelCodeI++;
}
_root.ed.insertBlockByte(tempLevelByte);
};
_root.ed.insertBlockByte = function (levelByte) {
levelByteLength = levelByte.length;
levelByteI = 0;
while (levelByteI < levelByteLength) {
levelBit = levelByte.substr(0, 1);
tempLevelShelter = _root[("mc" + Math.ceil((levelByteI + 1) / 100)) + "Shelter"].mc;
tempBlockPosition = (levelByteI % 100) + 1;
if (levelBit == "1") {
this.whatBlockArray = tempLevelShelter.whatBlock(tempBlockPosition, true);
this.mudBlock = tempLevelShelter.attachMovie("mud" + this.whatBlockArray[0], ("mud" + this.whatBlockArray[0]) + tempLevelShelter.getNextHighestDepth(), tempLevelShelter.getNextHighestDepth(), {_x:(((tempBlockPosition - 1) % 10) * 40) + 20, _y:(Math.ceil(tempBlockPosition / 10) * 40) - 20});
this.mudBlock.blockEngine._visible = false;
this.mudBlock._rotation = this.whatBlockArray[1];
this.mudBlock._xscale = 100 * this.whatBlockArray[2];
this.mudBlock._yscale = 100 * this.whatBlockArray[3];
tempLevelShelter.fullBlockArray[tempBlockPosition] = this.mudBlock;
tempLevelShelter.updateRestOfBlocks(this.whatBlockArray[4]);
}
levelByte = levelByte.substr(1, levelByte.length);
levelByteI++;
}
};
_root.ed.setupPlayabelLevelNextVar = 0;
_root.ed.setupPlayableLevel = function () {
_root.setupLevelCode = _root.ed.getAndMakeCode();
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
_root.ed.setUp();
_root.ed.setupPlayabelLevelNextVar = 1;
};
i = 0;
while (i < 258) {
str = str + chr(_root.ed.getMyChrValue(i));
i++;
}
stop();
Instance of Symbol 1569 MovieClip "engine" in Frame 8
onClipEvent (load) {
a = 15;
b = -15;
xSpeed = 0;
ySpeed = 0;
scale = 280;
scaleFactor = 0;
var mouseListener = new Object();
mouseListener.onMouseWheel = function (delta) {
scaleFactor = scaleFactor + delta;
};
Mouse.addListener(mouseListener);
var cube1 = (new three_d.Cube());
cube1.setPosition(new three_d.VectorClass([[-0.5], [-0.5], [-0.5]]));
cube1.setRotationPoint(new three_d.VectorClass([[0], [-1], [0]]));
_root.drawingPlane1.addFigure(cube1);
cube1.getSideCollection()[0].setMovieClip(_parent.mc5Shelter);
cube1.getSideCollection()[0].setRotation(90);
cube1.getSideCollection()[0].setXScale(-1);
cube1.getSideCollection()[1].setMovieClip(_parent.mc2Shelter);
cube1.getSideCollection()[2].setMovieClip(_parent.mc1Shelter);
cube1.getSideCollection()[3].setMovieClip(_parent.mc3Shelter);
cube1.getSideCollection()[4].setMovieClip(_parent.mc6Shelter);
cube1.getSideCollection()[4].setRotation(270);
cube1.getSideCollection()[5].setMovieClip(_parent.mc4Shelter);
cube1.getSideCollection()[5].setRotation(270);
cube1.getSideCollection()[2].setRotation(270);
rotationX = 0;
rotationZ = 0;
rotationAcc = 1;
positionZ = 0;
cameraX = 0;
cameraY = 0;
cameraZ = 0;
rotationLimitX = 0;
rotationLimitZ = 0;
X = 0;
Z = 0;
waitCounter = 0;
keyHToggle = -1;
isHeroFollowedAngle = true;
this.jumpPressed = false;
_root.mc1.rotationAlign = "Z";
_root.mc1.rotationInvertZ = -1;
_root.mc1.rotationInvertX = 1;
_root.mc1.z1 = rotationZ;
_root.mc1.x1 = rotationX;
_root.mc1.zAdd = 0;
_root.mc1.xAdd = 0;
updateMcCounter = 0;
countOptimizer = 0;
smokeArray = new Array();
canUseCamera = false;
canInsertBlock = false;
canRemoveBlock = false;
countToInsertBlock = 1;
this.startSetupLevelCode = 0;
escapeCounter = 0;
isSetupPlayableLevel = false;
shiftIsDown = false;
spaceIsDown = false;
}
onClipEvent (enterFrame) {
function rotateCameraSmoothLatitude(newLatitude) {
newLatitude = newLatitude % 360;
if (newLatitude < 0) {
newLatitude = newLatitude + 360;
}
a1 = newLatitude - _root.drawingPlane1.getCamera().getLatitude();
if (a1 > 180) {
a1 = -(360 - a1);
}
if (a1 < -180) {
a1 = a1 % 360;
if (a1 < 0) {
a1 = a1 + 360;
}
}
a = a + (a1 * 0.2);
xSpeed = 0;
}
function rotateCameraSmoothLongitude(newLongitude) {
newLongitude = newLongitude % 360;
if (newLongitude < 0) {
newLongitude = newLongitude + 360;
}
b1 = newLongitude - _root.drawingPlane1.getCamera().getLongitude();
if (b1 > 180) {
b1 = -(360 - b1);
}
if (b1 < -180) {
b1 = b1 % 360;
if (b1 < 0) {
b1 = b1 + 360;
}
}
b = b + (b1 * 0.2);
ySpeed = 0;
}
countOptimizer++;
if (countOptimizer > _root.optimizeDrawVar) {
_root.drawingPlane1.draw();
countOptimizer = 0;
}
_root.drawingPlane1.setCamera(a, b, scale);
if ((scale + scaleFactor) > 0) {
scale = scale + scaleFactor;
} else {
scale = 0;
}
scaleFactor = scaleFactor * 0.9;
a = a + (xSpeed * (Math.pow(-1, Math.ceil(Math.cos((b * Math.PI) / 180))) * -1));
b = b + ySpeed;
xSpeed = xSpeed * 0.9;
ySpeed = ySpeed * 0.9;
if (countToInsertBlock > 0) {
countToInsertBlock++;
}
if (countToInsertBlock > 5) {
canInsertBlock = true;
countToInsertBlock = 0;
}
if (Key.isDown(16)) {
canInsertBlock = false;
canRemoveBlock = false;
canUseCamera = true;
shiftIsDown = true;
}
if (!Key.isDown(16)) {
if (shiftIsDown) {
canInsertBlock = true;
canRemoveBlock = false;
canUseCamera = false;
shiftIsDown = false;
}
}
if (Key.isDown(32)) {
canRemoveBlock = true;
canInsertBlock = false;
canUseCamera = false;
spaceIsDown = true;
}
if (!Key.isDown(32)) {
if (spaceIsDown) {
canInsertBlock = true;
canRemoveBlock = false;
canUseCamera = false;
spaceIsDown = false;
}
}
if ((_root.mouseIsDown && (canUseCamera)) && (_root.editorButtonWorks)) {
if (isMouseDown) {
isHeroFollowedAngle = false;
xSpeed = (xDownStart - _root._xmouse) / 1.4;
ySpeed = (yDownStart - _root._ymouse) / 1.4;
} else {
this.isMouseDown = true;
}
this.xDownStart = _root._xmouse;
this.yDownStart = _root._ymouse;
}
if ((!_root.mouseIsDown) && (isMouseDown)) {
isHeroFollowedAngle = true;
this.isMouseDown = false;
}
if (Key.isDown(72)) {
if (!iskeyHDown) {
iskeyHDown = true;
}
if (keyHToggle == 1) {
isHeroFollowedAngle = true;
} else {
isHeroFollowedAngle = false;
}
}
if (!Key.isDown(72)) {
if (iskeyHDown) {
keyHToggle = keyHToggle * -1;
iskeyHDown = false;
}
}
if (Key.isDown(17)) {
if (!controlDown) {
isCameraAligning = true;
shiftDown = true;
}
}
if (!Key.isDown(17)) {
controlDown = false;
}
escapeCounter++;
if (Key.isDown(27) && (escapeCounter > 10)) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.gotoAndPlay("menu");
escapeCounter = 0;
}
if (Key.isDown(38)) {
a = 0;
b = 0;
}
if (_root.ed.setupPlayabelLevelNextVar == 2) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].mc.levelEditorCursor.removeMovieClip();
mcI++;
}
_root.levelVar = "UserLevel";
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.gotoAndPlay("restart");
}
if (_root.ed.setupPlayabelLevelNextVar == 1) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].mc.emptyCorners = true;
mcI++;
}
_root.ed.makeLevel(_root.setupLevelCode);
_root.startMc.startHero._visible = false;
_root.ed.setupPlayabelLevelNextVar = 2;
}
if (this.startSetupLevelCode == 0) {
_root.startMc.startHero._visible = true;
if (_root.setupLevelCode != undefined) {
_root.ed.makeLevel(_root.setupLevelCode);
}
this.startSetupLevelCode = 1;
}
if (isSetupPlayableLevel) {
_root.ed.setupPlayableLevel();
isSetupPlayableLevel = false;
}
allLevelEditorCursorOutsideMc = true;
mcI = 1;
while (mcI < 7) {
allLevelEditorCursorOutsideMc = allLevelEditorCursorOutsideMc & (!_root[("mc" + mcI) + "Shelter"].mc.levelEditorCursor.insideMc);
mcI++;
}
if (!canUseCamera) {
_root.cursor.cursorMode = "idle";
if (allLevelEditorCursorOutsideMc) {
if (!_root.cursor._visible) {
Mouse.hide();
_root.cursor._visible = true;
}
} else if (_root.cursor._visible) {
Mouse.show();
_root.cursor._visible = false;
}
}
if (canUseCamera) {
if (_root.editorButtonWorks) {
_root.cursor.cursorMode = "grab";
} else {
_root.cursor.cursorMode = "idle";
}
if (!_root.cursor._visible) {
Mouse.hide();
_root.cursor._visible = true;
}
}
_root.showEditorWarning = false;
mcI = 1;
while (mcI < 7) {
if ((_root[("mc" + mcI) + "Shelter"].mc.startHero != undefined) && ((_root[("mc" + mcI) + "Shelter"].mc.startHero + "empty") != "empty")) {
if ((_root[("mc" + mcI) + "Shelter"].mc == _root.mc5Shelter.mc) || (_root[("mc" + mcI) + "Shelter"].mc == _root.mc6Shelter.mc)) {
_root.showEditorWarning = true;
}
}
mcI++;
}
}
Instance of Symbol 1626 MovieClip in Frame 8
on (press) {
_root.visibleLevelCode = _root.ed.getAndMakeCode();
}
Instance of Symbol 1630 MovieClip in Frame 8
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (_root.editorButtonWorks) {
if (_root.engine.canRemoveBlock) {
this._alpha = 50;
} else {
this._alpha = 100;
}
if (this.hitTest(_root.cursorFinger)) {
_root.helpBubble.appear = true;
if (_root.helpBubble._y != this._y) {
_root.helpBubble._alpha = 0;
_root.helpBubble.appearCounter = 0;
_root.helpBubble.helpText = "erase (space)";
_root.helpBubble._y = this._y;
}
if (_root.mouseIsDown) {
_root.engine.canInsertBlock = false;
_root.engine.canRemoveBlock = true;
_root.engine.canUseCamera = false;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 1)) && (Math.round(this._width) < (Math.round(this.startWidth) + 1))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
this._width = this.startWidth;
this._height = this.startHeight;
}
}
}
}
}
Instance of Symbol 1632 MovieClip in Frame 8
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (_root.editorButtonWorks) {
if (_root.engine.canUseCamera) {
this._alpha = 50;
} else {
this._alpha = 100;
}
if (this.hitTest(_root.cursorFinger)) {
_root.helpBubble.appear = true;
if (_root.helpBubble._y != this._y) {
_root.helpBubble._alpha = 0;
_root.helpBubble.appearCounter = 0;
_root.helpBubble.helpText = "view (shift)";
_root.helpBubble._y = this._y;
}
if (_root.mouseIsDown) {
_root.engine.canInsertBlock = false;
_root.engine.canRemoveBlock = false;
_root.engine.canUseCamera = true;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 1)) && (Math.round(this._width) < (Math.round(this.startWidth) + 1))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
this._width = this.startWidth;
this._height = this.startHeight;
}
}
}
}
}
Instance of Symbol 1634 MovieClip in Frame 8
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (_root.editorButtonWorks) {
if (_root.engine.canInsertBlock) {
this._alpha = 50;
} else {
this._alpha = 100;
}
if (this.hitTest(_root.cursorFinger)) {
_root.helpBubble.appear = true;
if (_root.helpBubble._y != this._y) {
_root.helpBubble._alpha = 0;
_root.helpBubble.appearCounter = 0;
_root.helpBubble.helpText = "block";
_root.helpBubble._y = this._y;
}
if (_root.mouseIsDown) {
_root.engine.canInsertBlock = true;
_root.engine.canRemoveBlock = false;
_root.engine.canUseCamera = false;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 1)) && (Math.round(this._width) < (Math.round(this.startWidth) + 1))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
this._width = this.startWidth;
this._height = this.startHeight;
}
}
}
}
}
Instance of Symbol 1636 MovieClip in Frame 8
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (_root.editorButtonWorks) {
if (this.hitTest(_root.cursorFinger)) {
_root.helpBubble.appear = true;
if (_root.mouseIsDown) {
_parent.levelEditorBox._y = 195;
_parent.levelEditorBox.gotoAndPlay(2);
}
if (_root.helpBubble._y != this._y) {
_root.helpBubble._alpha = 0;
_root.helpBubble.appearCounter = 0;
_root.helpBubble.helpText = "settings";
_root.helpBubble._y = this._y;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 1)) && (Math.round(this._width) < (Math.round(this.startWidth) + 1))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
this._width = this.startWidth;
this._height = this.startHeight;
}
}
}
}
}
Instance of Symbol 1638 MovieClip in Frame 8
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
this.buttonPressed = false;
}
onClipEvent (enterFrame) {
if (_root.editorButtonWorks) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
if ((!this.buttonPressed) && (!_root.showEditorWarning)) {
_root.engine.isSetupPlayableLevel = true;
this.buttonPressed = true;
}
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
if (_root.restartUserLevel) {
_root.engine.isSetupPlayableLevel = true;
_root.restartUserLevel = false;
}
}
}
Instance of Symbol 1641 MovieClip "helpBubble" in Frame 8
onClipEvent (load) {
appearCounter = -1;
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (appear) {
appear = false;
if (appearCounter >= 0) {
appearCounter++;
}
if (appearCounter > 20) {
if (this._alpha < 100) {
this._alpha = this._alpha + 20;
}
} else {
this._alpha = 0;
}
appear = false;
} else if (this._alpha > 0) {
this._alpha = this._alpha - 20;
}
}
Instance of Symbol 1643 MovieClip in Frame 8
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
this.buttonPressed = false;
}
onClipEvent (enterFrame) {
if (_root.editorButtonWorks) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_parent.levelEditorBox._y = 195;
_parent.levelEditorBox.gotoAndPlay(2);
_parent.levelEditorBox.box.box.gotoAndStop(1);
_root.visibleLevelCode = _root.ed.getAndMakeCode();
_root.editorButtonWorks = false;
_root.engine.canInsertBlock = false;
_root.engine.canRemoveBlock = false;
_root.engine.canUseCamera = true;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1645 MovieClip in Frame 8
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
this.buttonPressed = false;
}
onClipEvent (enterFrame) {
if (_root.editorButtonWorks) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_parent.levelEditorBox._y = 195;
_parent.levelEditorBox.gotoAndPlay(2);
_parent.levelEditorBox.box.box.gotoAndStop(2);
_root.visibleLevelCode = _root.ed.getAndMakeCode();
_root.editorButtonWorks = false;
_root.engine.canInsertBlock = false;
_root.engine.canRemoveBlock = false;
_root.engine.canUseCamera = true;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
}
Instance of Symbol 1665 MovieClip "levelEditorBox" in Frame 8
onClipEvent (enterFrame) {
this.box.box.levelCode = _root.visibleLevelCode;
}
Instance of Symbol 48 MovieClip "cursorFinger" in Frame 8
onClipEvent (load) {
this.cursorCounter = 0;
}
onClipEvent (enterFrame) {
if (this.enableCursor) {
this._x = _root._xmouse - 12;
this._y = _root._ymouse - 12;
} else {
this._x = 1000;
this.cursorCounter++;
if (this.cursorCounter > 10) {
this.enableCursor = true;
this.cursorCounter = 0;
}
}
}
Instance of Symbol 1204 MovieClip "cursor" in Frame 8
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
if (this.cursorMode == "idle") {
this.gotoAndStop(1);
}
if (this.cursorMode == "grab") {
this.gotoAndStop(2);
if (_root.mouseIsDown) {
this.gotoAndStop(3);
}
}
if (_root.buttonExit.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.gotoAndPlay("menu");
}
}
}
Instance of Symbol 1667 MovieClip "editorWarning" in Frame 8
onClipEvent (enterFrame) {
if (_root.showEditorWarning) {
this._y = 380;
} else {
this._y = 1000;
}
}
Frame 9
this.onEnterFrame = function () {
if (Key.isDown(27)) {
_root.gotoAndStop("menu");
}
};
stop();
Instance of Symbol 1671 MovieClip in Frame 9
onClipEvent (load) {
this.counter = 0;
this.idle = false;
this.textState = 0;
}
onClipEvent (enterFrame) {
if (_parent.gameProgress.gameProgressNumber < 100) {
this.optionString1 = "You only got " + _parent.gameProgress.gameProgress;
this.optionString2 = "Keep playing!";
} else {
this.optionString1 = "You got 100%";
this.optionString2 = "Congratulations";
}
this.textArray = [["created by:", "Mads Anthony"], ["graphics by:", "Mads Anthony"], ["programming by:", "Mads Anthony"], ["music by:", "Brian Holmes"], ["ideas and execution by:", "Mads Anthony"], ["", "Thanks for playing!!!"], [this.optionString1, this.optionString2]];
if ((this._currentframe == 1) && (this.textState < this.textArray.length)) {
this.counter++;
this.textBlock.textTitle = this.textArray[this.textState][0];
this.textBlock.textName = this.textArray[this.textState][1];
if (this.counter > 20) {
this.gotoAndPlay(this._currentframe + 1);
this.counter = 0;
}
}
if (this.idle) {
this.counter++;
}
if (this.counter > 40) {
if (this.textState < 6) {
this.gotoAndPlay(this._currentframe + 1);
this.idle = false;
this.textState++;
this.counter = 0;
} else if (this.counter > 100) {
_root.gotoAndStop("menu");
}
}
}
Instance of Symbol 1289 MovieClip "heroOutside" in Frame 9
onClipEvent (load) {
this.originY = this._y;
this.gravity = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(39)) {
this._x = this._x + 7;
this._xscale = 100;
if (this.gravity == 0) {
this.gotoAndStop("run");
}
}
if (Key.isDown(37)) {
this._x = this._x - 7;
this._xscale = -100;
if (this.gravity == 0) {
this.gotoAndStop("run");
}
}
if (((!Key.isDown(39)) && (!Key.isDown(37))) && (this.gravity == 0)) {
this.gotoAndStop("idle");
}
if (this._y != this.originY) {
this.jumpPower = this.jumpPower + 1.2;
this.gravity = this.jumpPower;
}
if ((Key.isDown(83) || (Key.isDown(38))) && (this.gravity == 0)) {
if (!this.jumpPressed) {
this.gotoAndStop("jump");
this.animationVar = "jump";
_root.jumpAnimationDone = false;
this.gravity = this.gravity - 15;
this.jumpPower = -15;
this.jumpPressed = true;
_root.jumpSound.start();
this._y = this._y - 0.1;
}
}
if ((!Key.isDown(83)) && (!Key.isDown(38))) {
if (this.jumpPressed) {
this.jumpPressed = false;
}
}
this._y = this._y + this.gravity;
if (this._y > this.originY) {
this.gravity = 0;
this.jumpPower = 0;
this._y = this.originY;
}
if (_root.jumpAnimationDone && (this.gravity != 0)) {
this.gotoAndStop("fall");
}
if (this.gravity > 0) {
this.gotoAndStop("fall");
}
}
Instance of Symbol 1289 MovieClip "hero" in Frame 9
onClipEvent (enterFrame) {
this._x = _parent.heroOutside._x;
this._y = ((2 * _parent.heroOutside.originY) - _parent.heroOutside._y) + 100;
this._xscale = _parent.heroOutside._xscale;
this.gotoAndStop(_parent.heroOutside._currentframe);
}
Instance of Symbol 1612 MovieClip in Frame 9
onClipEvent (load) {
this.counter = 0;
this.idle = false;
this.startVar = true;
}
onClipEvent (enterFrame) {
if ((this._currentframe == 1) && (this.startVar)) {
this.gotoAndPlay(this._currentframe + 1);
}
if (this.idle) {
this.counter++;
}
if (this.counter > 550) {
this.gotoAndPlay(this._currentframe + 1);
this.idle = false;
this.startVar = false;
this.counter = 0;
}
}
Instance of Symbol 1204 MovieClip "cursor" in Frame 9
onClipEvent (load) {
this.oldX = _root._xmouse;
this.oldY = _root._ymouse;
this.counter = 0;
this._alpha = _root.globalMouseAlpha;
}
onClipEvent (enterFrame) {
_root.globalMouseAlpha = this._alpha;
this._x = _root._xmouse;
this._y = _root._ymouse;
this.gotoAndStop(2);
if (_root.mouseIsDown) {
this.counter = 0;
this._alpha = 100;
this.gotoAndStop(3);
}
if ((this._x == this.oldX) && (this._y == this.oldY)) {
this.counter++;
} else {
this.counter = 0;
this._alpha = 100;
}
if ((this.counter > 20) && (this._alpha > 0)) {
this._alpha = this._alpha - 10;
}
if (this._alpha <= 0) {
this._alpha = 0;
}
this.oldX = this._x;
this.oldY = this._y;
}
Frame 11
this.gotoAndPlay("editor");
Symbol 24 MovieClip [blockEngine] Frame 1
_parent.filters = [_root.blurFilter];
_parent.linkBlock = "empty";
_parent.prevBlock = "empty";
_parent.tail = "empty";
if (_parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1] == "empty") {
_parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1] = _parent;
_parent.tail = _parent;
} else {
_parent.prevBlock = _parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1].tail;
_parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1].tail.linkBlock = _parent;
_parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1].tail = _parent;
_parent._parent.blockList.push(_parent);
}
_parent.checkForHit = function () {
if (_parent._parent.heroPointer.shelter.feetHitbox.hitTest(_parent) || (_parent._parent.heroPointer.shelter.topHitbox.hitTest(_parent))) {
_parent._parent.mainPlatform = this;
}
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent)) {
_parent._parent.mainPlatformWall = this;
}
};
this._visible = false;
this.unloadMovie();
Instance of Symbol 41 MovieClip in Symbol 49 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Instance of Symbol 46 MovieClip in Symbol 49 MovieClip Frame 1
onClipEvent (load) {
this.count = 0;
_root.hereIsTheGear = _parent;
}
onClipEvent (enterFrame) {
if (_parent._visible) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.normalHitbox.hitTest(_parent.hitbox)) {
_root.gearGottenTemporary = true;
_parent.unloadMovie();
}
}
}
Symbol 67 MovieClip Frame 3
_root.barrelBreakSound.start();
Symbol 67 MovieClip Frame 16
stop();
Symbol 73 MovieClip Frame 1
stop();
Instance of Symbol 41 MovieClip in Symbol 73 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Instance of Symbol 72 MovieClip in Symbol 73 MovieClip Frame 1
onClipEvent (load) {
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
this._rotation = _parent._parent._parent._parent.gravityRotation - _parent._parent._parent._rotation;
if (_parent._parent._parent._parent.heroPointer.shelter.normalHitbox.hitTest(_parent.hitbox)) {
_parent._visible = false;
_root[("level" + _root.levelVar) + "DiamondGotten"] = true;
_root.user.data[("level" + _root.levelVar) + "DiamondGotten"] = _root[("level" + _root.levelVar) + "DiamondGotten"];
_root.user.flush();
_root.levelJustVisited = _root.levelVar;
_root.levelVar = "Select";
_root.restart();
}
}
Symbol 80 MovieClip Frame 3
_root.barrelBreakSound.start();
Symbol 80 MovieClip Frame 16
stop();
Symbol 81 MovieClip Frame 1
stop();
if (!_root.diamondRunOn) {
this._visible = false;
}
if (_root[("level" + _root.levelVar) + "ChestGotten"] && (_parent._parent != _root)) {
this._alpha = 40;
this.number = this._name.substring(6, 8);
arrowMc._visible = false;
_root.barrelArray[this.number] = this;
}
Symbol 83 MovieClip Frame 1
_parent.startWidth = Math.round(_parent._width / 100) * 100;
_parent.startHeight = Math.round(_parent._height / 100) * 100;
_parent.figure = _root.engine.cube1;
_parent.side = _parent.figure.getSideWithMovieClip(_parent._parent);
_parent.xInvert = 0;
_parent.yInvert = 0;
_parent.xInvert2 = 1;
_parent.yInvert2 = 1;
_parent.gravityRotation = 0;
_parent.gravity = 5;
_parent.sidePosition = "none";
if (_parent.side.getRotation() == 270) {
_parent.addToVectorSide = 3;
_parent.addToVectorSide2 = 3;
}
if (_parent.side.getRotation() == 180) {
_parent.addToVectorSide = 2;
_parent.addToVectorSide2 = 2;
}
if (_parent.side.getRotation() == 90) {
_parent.addToVectorSide = 1;
_parent.addToVectorSide2 = 1;
}
if (_parent.side.getRotation() == 0) {
_parent.addToVectorSide = 2;
_parent.addToVectorSide2 = 0;
}
if (_parent.side.getXScale() < 0) {
_parent.xInvert = 2;
_parent.xInvert2 = -1;
}
if (_parent.side.getYScale() < 0) {
_parent.yInvert = 2;
_parent.yInvert2 = -1;
}
_parent.updateGravity = function () {
_parent.vector1 = _parent.side.getVectorCollection()[((0 + _parent.yInvert) + _parent.addToVectorSide) % 4];
_parent.vector2 = _parent.side.getVectorCollection()[((3 + _parent.yInvert) + _parent.addToVectorSide) % 4];
if (((Math.round(_parent.vector1.get()[1][0] * 10) / 10) == 0.5) && ((Math.round(_parent.vector2.get()[1][0] * 10) / 10) == 0.5)) {
_parent.gravityRotation = 0 * _parent.xInvert2;
}
if (((Math.round(_parent.vector1.get()[1][0] * 10) / 10) == 0.5) && ((Math.round(_parent.vector2.get()[1][0] * 10) / 10) == -0.5)) {
_parent.gravityRotation = -90 * _parent.xInvert2;
}
if (((Math.round(_parent.vector1.get()[1][0] * 10) / 10) == -0.5) && ((Math.round(_parent.vector2.get()[1][0] * 10) / 10) == -0.5)) {
_parent.gravityRotation = 180 * _parent.xInvert2;
}
if (((Math.round(_parent.vector1.get()[1][0] * 10) / 10) == -0.5) && ((Math.round(_parent.vector2.get()[1][0] * 10) / 10) == 0.5)) {
_parent.gravityRotation = 90 * _parent.xInvert2;
}
_parent.updateSidePosition();
if (_parent.sidePosition == "yFront") {
_parent.gravityRotation = 0;
}
};
_parent.updateSidePosition = function () {
_parent.vector1 = _parent.side.getVectorCollection()[((0 + _parent.yInvert) + _parent.addToVectorSide) % 4];
_parent.vector2 = _parent.side.getVectorCollection()[((2 + _parent.yInvert) + _parent.addToVectorSide) % 4];
_parent.vector3 = three_d.VectorClass.removeVectorsFromVectorCollection(_parent.vector1.getReference(), _parent.side.getVectorCollection())[0];
_parent.vector3Difference = _parent.vector1.subtract(_parent.vector3);
if (Math.round(_parent.vector3Difference[0][0]) == -1) {
_parent.sidePosition = "xFront";
}
if (((Math.round(_parent.vector3Difference[0][0]) == -1) && (Math.round(_parent.vector3Difference[1][0]) == 0)) && (Math.round(_parent.vector3Difference[2][0]) == 0)) {
_parent.sidePosition = "xFront";
}
if (((Math.round(_parent.vector3Difference[0][0]) == 1) && (Math.round(_parent.vector3Difference[1][0]) == 0)) && (Math.round(_parent.vector3Difference[2][0]) == 0)) {
_parent.sidePosition = "xBack";
}
if (((Math.round(_parent.vector3Difference[0][0]) == 0) && (Math.round(_parent.vector3Difference[1][0]) == 0)) && (Math.round(_parent.vector3Difference[2][0]) == -1)) {
_parent.sidePosition = "zFront";
}
if (((Math.round(_parent.vector3Difference[0][0]) == 0) && (Math.round(_parent.vector3Difference[1][0]) == 0)) && (Math.round(_parent.vector3Difference[2][0]) == 1)) {
_parent.sidePosition = "zBack";
}
if (((Math.round(_parent.vector3Difference[0][0]) == 0) && (Math.round(_parent.vector3Difference[1][0]) == -1)) && (Math.round(_parent.vector3Difference[2][0]) == 0)) {
_parent.sidePosition = "yFront";
}
if (((Math.round(_parent.vector3Difference[0][0]) == 0) && (Math.round(_parent.vector3Difference[1][0]) == 1)) && (Math.round(_parent.vector3Difference[2][0]) == 0)) {
_parent.sidePosition = "yBack";
}
};
_parent.updateSidePosition();
_parent.getRealCoordinates = function (xCoordinate, yCoordinate) {
if (((_parent.sidePosition != "yFront") && (_parent.sidePosition != "yBack")) && ((_parent.heroPointer.heroReference._parent.sidePosition != "yFront") && (_parent.heroPointer.heroReference._parent.sidePosition != "yBack"))) {
if ((_parent.gravityRotation == 0) || (_parent.gravityRotation == 90)) {
realX = (xCoordinate * Math.cos((Math.PI/180) * _parent.gravityRotation)) + (yCoordinate * Math.sin((Math.PI/180) * _parent.gravityRotation));
}
if ((_parent.gravityRotation == -90) || (Math.abs(_parent.gravityRotation) == 180)) {
realX = (_parent.startWidth - (xCoordinate * Math.abs(Math.cos((Math.PI/180) * _parent.gravityRotation)))) - (yCoordinate * Math.abs(Math.sin((Math.PI/180) * _parent.gravityRotation)));
}
if ((_parent.gravityRotation == 0) || (_parent.gravityRotation == -90)) {
realY = ((-xCoordinate) * Math.sin((Math.PI/180) * _parent.gravityRotation)) + (yCoordinate * Math.cos((Math.PI/180) * _parent.gravityRotation));
}
if ((_parent.gravityRotation == 90) || (Math.abs(_parent.gravityRotation) == 180)) {
realY = (_parent.startWidth - (xCoordinate * Math.sin((Math.PI/180) * _parent.gravityRotation))) + (yCoordinate * Math.cos((Math.PI/180) * _parent.gravityRotation));
}
} else {
if (_parent.heroPointer._rotation == 0) {
realX = xCoordinate;
realY = yCoordinate;
}
if (_parent.heroPointer._rotation == 90) {
realX = yCoordinate;
realY = _parent.startWidth - xCoordinate;
}
if (Math.abs(_parent.heroPointer._rotation) == 180) {
realX = _parent.startWidth - xCoordinate;
realY = _parent.startWidth - yCoordinate;
}
if (_parent.heroPointer._rotation == -90) {
realX = _parent.startWidth - yCoordinate;
realY = xCoordinate;
}
}
return([realX, realY]);
};
_parent.getLevelCoordinates = function (xCoordinate, yCoordinate) {
if (((_parent.sidePosition != "yFront") && (_parent.sidePosition != "yBack")) && ((_parent.heroPointer.heroReference._parent.sidePosition != "yFront") && (_parent.heroPointer.heroReference._parent.sidePosition != "yBack"))) {
if (_parent.gravityRotation == 0) {
levelX = xCoordinate;
levelY = yCoordinate;
}
if (_parent.gravityRotation == 90) {
levelX = _parent.startWidth - yCoordinate;
levelY = xCoordinate;
}
if (Math.abs(_parent.gravityRotation) == 180) {
levelX = _parent.startWidth - xCoordinate;
levelY = _parent.startWidth - yCoordinate;
}
if (_parent.gravityRotation == -90) {
levelX = yCoordinate;
levelY = _parent.startWidth - xCoordinate;
}
} else {
if (_parent.heroPointer._rotation == 0) {
levelX = xCoordinate;
levelY = yCoordinate;
}
if (_parent.heroPointer._rotation == 90) {
levelX = _parent.startWidth - yCoordinate;
levelY = xCoordinate;
}
if (Math.abs(_parent.heroPointer._rotation) == 180) {
levelX = _parent.startWidth - xCoordinate;
levelY = _parent.startWidth - yCoordinate;
}
if (_parent.heroPointer._rotation == -90) {
levelX = yCoordinate;
levelY = _parent.startWidth - xCoordinate;
}
}
return([levelX, levelY]);
};
_parent.getSideDirection = function (vector1, vector2) {
_parent.vectorCollection = _parent.side.getVectorCollection();
_parent.tempAngle = undefined;
if (vector1.equals(_parent.vectorCollection[0]) && (vector2.equals(_parent.vectorCollection[1]))) {
_parent.tempAngle = 90 * _parent.side.getXScale();
}
if (vector1.equals(_parent.vectorCollection[1]) && (vector2.equals(_parent.vectorCollection[2]))) {
_parent.tempAngle = 0 * _parent.side.getXScale();
}
if (vector1.equals(_parent.vectorCollection[2]) && (vector2.equals(_parent.vectorCollection[3]))) {
_parent.tempAngle = -90 * _parent.side.getXScale();
}
if (vector1.equals(_parent.vectorCollection[3]) && (vector2.equals(_parent.vectorCollection[0]))) {
_parent.tempAngle = 180 * _parent.side.getXScale();
}
if (_parent.tempAngle == undefined) {
return(_parent.getSideDirection(vector2, vector1));
}
_parent.tempAngle = _parent.tempAngle - _parent.side.getRotation();
if (_parent.side.getXScale() == -1) {
_parent.tempAngle = _parent.tempAngle + 180;
}
_parent.tempAngle = _parent.tempAngle % 360;
if (_parent.tempAngle == 0) {
return("downSide");
}
if ((_parent.tempAngle == 90) || (_parent.tempAngle == -270)) {
return("leftSide");
}
if ((_parent.tempAngle == -90) || (_parent.tempAngle == 270)) {
return("rightSide");
}
if (Math.abs(_parent.tempAngle) == 180) {
return("upSide");
}
};
this._visible = false;
Symbol 114 MovieClip Frame 10
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Instance of Symbol 131 MovieClip in Symbol 132 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 2
stop();
Symbol 136 MovieClip Frame 4
stop();
Symbol 137 MovieClip Frame 10
stop();
Symbol 138 MovieClip Frame 1
stop();
Instance of Symbol 41 MovieClip in Symbol 139 MovieClip [chestShelter] Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Instance of Symbol 138 MovieClip in Symbol 139 MovieClip [chestShelter] Frame 1
onClipEvent (load) {
this.count = 0;
this.gotIt = false;
this.gotItCounter = 0;
_root.hereIsTheChest = _parent;
}
onClipEvent (enterFrame) {
if (_parent._visible) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.normalHitbox.hitTest(_parent.hitbox) && (!this.gotIt)) {
_root.music.turnDownMusic = true;
_root[("level" + _root.levelVar) + "ChestGotten"] = true;
_root.user.data[("level" + _root.levelVar) + "ChestGotten"] = _root[("level" + _root.levelVar) + "ChestGotten"];
_root.user.flush();
if (_root.gearGottenTemporary) {
_root[("level" + _root.levelVar) + "GearGotten"] = true;
_root.user.data[("level" + _root.levelVar) + "GearGotten"] = _root[("level" + _root.levelVar) + "GearGotten"];
_root.user.flush();
}
_root.levelJustVisited = _root.levelVar;
_root.levelVar = "Select";
if (_root.levelJustVisited == 0) {
_root.levelVar = "Tutorial1";
}
if (_root.levelJustVisited == "Tutorial1") {
_root.levelVar = "Tutorial2";
}
if (_root.levelJustVisited == "Tutorial2") {
_root.levelJustVisited = 0;
}
_root.isHeroPlayable = false;
_parent._parent.heroPointer._visible = false;
this.gotoAndStop(2);
_parent.swapDepths(_parent.getNextHighestDepth());
this.oldX = _parent._x;
this.oldY = _parent._y;
this.oldRotation = _parent._rotation;
if (_parent._x < _parent._parent.heroPointer._x) {
this.chestMoveDirX = 1;
} else {
this.chestMoveDirX = -1;
}
if (_parent._y > _parent._parent.heroPointer._y) {
this.chestMoveDirY = 1;
} else {
this.chestMoveDirY = -1;
}
this.gotIt = true;
}
if (this.gotIt) {
this.gotItCounter++;
if (this.gotItCounter == 2) {
_root.treasureSound.start();
}
if (this.gotItCounter == 10) {
this.chestMoveDirX = this.chestMoveDirX * -1;
this.chestMoveDirY = this.chestMoveDirY * -1;
}
if (this.gotItCounter < 10) {
if ((oldRotation == 0) || (oldRotation == 90)) {
moveToRotation(90 * this.chestMoveDirX);
} else {
moveToRotation(-90 * this.chestMoveDirX);
}
} else if (this.gotItCounter < 20) {
_parent._parent.heroPointer._x = this.oldX;
_parent._parent.heroPointer._y = this.oldY;
moveToRotation(0);
} else {
this._rotation = 0;
}
if (this.gotItCounter > 30) {
if (_root.levelJustVisited == "UserLevel") {
_root.gotoEditor = true;
}
if (_root.levelJustVisited != "UserLevel") {
_root.restart();
}
}
}
}
moveToRotation = function (rotation) {
rotationSpeed = 10;
if (this._rotation > rotation) {
if ((rotation != 0) && ((this._rotation / rotation) != 0)) {
this._rotation = this._rotation - (rotationSpeed * ((this._rotation / rotation) + 0.5));
} else {
this._rotation = this._rotation - rotationSpeed;
}
}
if (this._rotation < rotation) {
if ((rotation != 0) && ((this._rotation / rotation) != 0)) {
this._rotation = this._rotation + (rotationSpeed * ((this._rotation / rotation) + 0.5));
} else {
this._rotation = this._rotation + rotationSpeed;
}
}
if (_parent._x < _parent._parent.heroPointer._x) {
if (this.chestMoveDirX == 1) {
_parent._x = _parent._x + 5;
}
} else if (this.chestMoveDirX == -1) {
_parent._x = _parent._x - 5;
}
if (_parent._y > _parent._parent.heroPointer._y) {
if (this.chestMoveDirY == 1) {
_parent._y = _parent._y - 5;
}
} else if (this.chestMoveDirY == -1) {
_parent._y = _parent._y + 5;
}
};
}
Symbol 157 MovieClip Frame 1
this._rotation = random(3) * 90;
Symbol 173 MovieClip Frame 1
this.filters = [_root.blurFilter];
Symbol 193 MovieClip [boxBlock] Frame 1
this.counter = 0;
if (_parent._parent != _root) {
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList.push(this);
}
}
if (this.boxSpeed == undefined) {
this.boxSpeed = 2;
}
this.onEnterFrame = function () {
this.counter++;
if (_parent.gravityRotation == 0) {
this.linkAddX = 0;
this.linkAddY = 1;
}
if (_parent.gravityRotation == 90) {
this.linkAddX = -1;
this.linkAddY = 0;
}
if (_parent.gravityRotation == -90) {
this.linkAddX = 1;
this.linkAddY = 0;
}
if (Math.abs(_parent.gravityRotation) == 180) {
this.linkAddX = 0;
this.linkAddY = -1;
}
this.isLegalMove = true;
if ((((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) >= 0) && (((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) < 10)) {
this.temporaryLinkBlock = _parent.blockList[(Math.round((this._x + 20) / 40) - 1) + this.linkAddX];
} else {
this.isLegalMove = false;
}
if ((((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) >= 0) && (((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) < 10)) {
} else {
this.isLegalMove = false;
}
if (((((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) == Math.floor((_parent.heroPointer._x + 20) / 40)) || (((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) == (Math.floor((_parent.heroPointer._x + 20) / 40) - 1))) && ((((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) == Math.floor((_parent.heroPointer._y + 20) / 40)) || (((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) == (Math.floor((_parent.heroPointer._y + 20) / 40) - 1)))) {
this.isLegalMove = false;
}
this.temporaryCounter = 0;
if (_parent._parent != _root) {
if ((_parent.sidePosition == "yFront") || (_parent.sidePosition == "yBack")) {
this.isLegalMove = false;
}
while ((this.temporaryLinkBlock != "empty") && (this.isLegalMove)) {
this.temporaryCounter++;
this.isLegalMove = ((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) != (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if (this.isLegalMove) {
if (_parent.gravityRotation == 0) {
if ((this.counter % this.boxSpeed) == 0) {
this._y = this._y + 40;
}
}
if (_parent.gravityRotation == 90) {
if ((this.counter % this.boxSpeed) == 0) {
this.prevBlock.linkBlock = this.linkBlock;
this.linkBlock.prevBlock = this.prevBlock;
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this.prevBlock;
}
if (this.prevBlock == "empty") {
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = "empty";
} else {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this.linkBlock;
this.linkBlock.prevBlock = "empty";
this.linkBlock.tail = this.tail;
}
}
this._x = this._x - 40;
this.prevBlock = "empty";
this.linkBlock = "empty";
this.tail = "empty";
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this;
this.tail = this;
} else {
this.prevBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1].tail;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail.linkBlock = this;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this;
}
}
}
if (_parent.gravityRotation == -90) {
if ((this.counter % this.boxSpeed) == 0) {
this.prevBlock.linkBlock = this.linkBlock;
this.linkBlock.prevBlock = this.prevBlock;
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this.prevBlock;
}
if (this.prevBlock == "empty") {
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = "empty";
} else {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this.linkBlock;
this.linkBlock.prevBlock = "empty";
this.linkBlock.tail = this.tail;
}
}
this._x = this._x + 40;
this.prevBlock = "empty";
this.linkBlock = "empty";
this.tail = "empty";
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this;
this.tail = this;
} else {
this.prevBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1].tail;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail.linkBlock = this;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this;
}
}
}
if (Math.abs(_parent.gravityRotation) == 180) {
if ((this.counter % this.boxSpeed) == 0) {
this._y = this._y - 40;
}
}
}
};
Instance of Symbol 180 MovieClip "button" in Symbol 200 MovieClip [level11d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 200 MovieClip [level11d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 203 MovieClip [level11c] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 203 MovieClip [level11c] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 204 MovieClip [level11b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 41 MovieClip in Symbol 209 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Instance of Symbol 208 MovieClip in Symbol 209 MovieClip Frame 1
onClipEvent (load) {
this.count = 0;
this.originY = this._y;
_parent._visible = false;
this.levelVar = _root.levelVar;
}
onClipEvent (enterFrame) {
if (_root.canThrowBombs && (!_root[("level" + this.levelVar) + "KeyGotten"])) {
_parent._visible = true;
currentBlock = _parent._parent.blockList[_parent.specialX];
while ((currentBlock != "empty") && (currentBlock != undefined)) {
if (Math.round((currentBlock._y - 20) / 40) == _parent.specialY) {
_parent._visible = false;
}
currentBlock = currentBlock.linkBlock;
}
if (_parent._visible) {
this.count = this.count + 0.3;
this._y = this.originY + (Math.cos(this.count) * 2);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.normalHitbox.hitTest(_parent.hitbox)) {
_parent._visible = false;
_root[("level" + _root.levelVar) + "KeyGotten"] = true;
_root.user.data[("level" + _root.levelVar) + "KeyGotten"] = _root[("level" + _root.levelVar) + "KeyGotten"];
_root.user.flush();
_root.levelJustVisited = _root.levelVar;
if ((_root.levelJustVisited == "Tutorial1") || (_root.levelJustVisited == "Tutorial2")) {
_root.levelJustVisited = 0;
}
_root.levelVar = "Select";
_root.restart();
}
}
}
}
Instance of Symbol 209 MovieClip in Symbol 210 MovieClip [level8b] Frame 1
onClipEvent (load) {
this.specialX = 5;
this.specialY = 6;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Instance of Symbol 209 MovieClip in Symbol 216 MovieClip [level10e] Frame 1
onClipEvent (load) {
this.specialX = 6;
this.specialY = 6;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Symbol 223 MovieClip [minerStart] Frame 1
this._visible = false;
Symbol 247 MovieClip Frame 1
_root.explosionSound.start();
Symbol 247 MovieClip Frame 15
this.unloadMovie();
Symbol 248 MovieClip Frame 10
stop();
Symbol 255 MovieClip Frame 1
stop();
Instance of Symbol 41 MovieClip in Symbol 256 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Instance of Symbol 255 MovieClip "parts" in Symbol 256 MovieClip Frame 1
onClipEvent (load) {
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent.hitbox)) {
_root.amuletPartGottenTemporary = true;
_parent._visible = false;
}
}
Instance of Symbol 256 MovieClip "amuletPart" in Symbol 257 MovieClip Frame 1
onClipEvent (load) {
this.parts.gotoAndStop(3);
}
onClipEvent (enterFrame) {
this._rotation = _parent._parent._parent.gravityRotation + 180;
if (_parent._parent._parent.heroPointer.shelter.normalHitbox.hitTest(this.hitbox)) {
_root[("level" + _root.levelVar) + "ChestGotten"] = true;
if (_root.gearGottenTemporary) {
_root[("level" + _root.levelVar) + "GearGotten"] = true;
}
_root.levelJustVisited = _root.levelVar;
_root.levelVar = "Select";
_root.restart();
_parent.unloadMovie();
}
}
Symbol 257 MovieClip Frame 20
stop();
Symbol 258 MovieClip Frame 1
stop();
Instance of Symbol 180 MovieClip "button" in Symbol 259 MovieClip [levelBoss2c] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.counter = 0;
this.buttonPressed = false;
}
onClipEvent (enterFrame) {
_parent._rotation = _parent._parent.gravityRotation;
if (_parent.heroPointer.shelter.feetHitbox.hitTest(this.button)) {
if (!this.buttonPressed) {
this.bomb = _parent.attachMovie("boxBomb", "boxBomb" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:340, _y:380});
this.buttonPressed = true;
_root.clickSound.start();
}
}
if (this.buttonPressed) {
this.button._y = 3;
this.counter++;
} else {
this.button._y = this.originalButtonY;
}
if (this.counter == 300) {
this.bomb.bombShelter.gotoAndStop("explode");
}
if (this.counter > 350) {
this.counter = 0;
this.buttonPressed = false;
}
}
Instance of Symbol 227 MovieClip "laser3" in Symbol 259 MovieClip [levelBoss2c] Frame 1
onClipEvent (load) {
this._visible = false;
this.originalHeight = this.pole._height;
}
onClipEvent (enterFrame) {
this._rotation = _parent.robot._rotation + 90;
this._x = _parent.robot._x;
this._y = _parent.robot._y;
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this) && (this._visible)) {
_root.restart();
}
}
Instance of Symbol 229 MovieClip "laserPack" in Symbol 259 MovieClip [levelBoss2c] Frame 1
onClipEvent (enterFrame) {
this._x = _parent.robot._x;
this._y = _parent.robot._y;
this._visible = _parent.robot._visible;
if (_parent.robot.phase == 1) {
this._rotation = this._rotation + _root.laserSpeed;
}
if (_parent.robot.phase == 2) {
this._rotation = _parent.robot._rotation + 90;
}
if (_parent.robot.phase == 3) {
this._rotation = _parent.robot._rotation + 90;
}
if (_parent.robot.phase == 4) {
this._alpha = this._alpha - 5;
}
}
Instance of Symbol 258 MovieClip "robot" in Symbol 259 MovieClip [levelBoss2c] Frame 1
onClipEvent (load) {
this.phase = 0;
this.counter = 0;
this._visible = false;
this.startPhase3 = false;
this.moveADirection = -1;
this.waitCounter = 0;
}
onClipEvent (enterFrame) {
if (this.phase == 3) {
if (this.hitTest(_parent.button.bomb)) {
_parent.button.bomb.removeMovieClip();
this.phase = 4;
_parent.laser3._visible = false;
this.gotoAndStop("explode2");
}
if ((_parent.heroPointer.heroReferenceString == "empty") && (this.moveADirection == 0)) {
if (!this.startPhase3) {
_parent.laser3._visible = true;
_parent.laser3.pole._height = 150;
this.startPhase3 = true;
}
}
if (!this.startPhase3) {
this._visible = true;
}
if (this.moveADirection == -1) {
if (this._x < 350) {
this._x = this._x + 5;
}
this.counter++;
if (this.counter > 50) {
if (this._rotation < 180) {
this._rotation = this._rotation + 5;
} else {
this.moveADirection = 0;
this.counter = 0;
}
if (this._y > 50) {
this._y = this._y - 5;
}
}
}
if (this.startPhase3) {
this.waitCounter++;
if (this.waitCounter > 20) {
if (this.moveADirection == 0) {
this._rotation = 180;
this._y = this._y + 2;
if ((this._y > 0) && (this._y < 90)) {
_parent.laser3.pole._height = 150;
}
if ((this._y >= 90) && (this._y <= 280)) {
_parent.laser3.pole._height = _parent.laser3.originalHeight * 2;
}
if (this._y > 280) {
_parent.laser3.pole._height = 150;
}
if (this._y > 350) {
this.moveADirection = 1;
}
}
if (this.moveADirection == 1) {
this._rotation = 180;
this._y = this._y - 2;
if ((this._y > 0) && (this._y < 90)) {
_parent.laser3.pole._height = 150;
}
if ((this._y >= 90) && (this._y <= 280)) {
_parent.laser3.pole._height = _parent.laser3.originalHeight * 2;
}
if (this._y < 50) {
this.moveADirection = 0;
}
}
}
}
}
}
Instance of Symbol 229 MovieClip "laserPack" in Symbol 260 MovieClip [levelBoss2b] Frame 1
onClipEvent (enterFrame) {
this._x = _parent.robot._x;
this._y = _parent.robot._y;
this._visible = _parent.robot._visible;
if (_parent.robot.phase == 1) {
this._rotation = this._rotation + _root.laserSpeed;
}
if (_parent.robot.phase == 2) {
this._rotation = _parent.robot._rotation + 90;
}
if (_parent.robot.phase == 3) {
this._rotation = _parent.robot._rotation + 90;
}
}
Instance of Symbol 258 MovieClip "robot" in Symbol 260 MovieClip [levelBoss2b] Frame 1
onClipEvent (load) {
this.phase = 0;
this.counter = 0;
this._visible = false;
}
onClipEvent (enterFrame) {
if (this.phase == 3) {
this._visible = true;
_parent.block1._x = 1000;
_parent.block1._y = 1000;
_parent.block2._x = 1000;
_parent.block2._y = 1000;
_parent.block3._x = 1000;
_parent.block3._y = 1000;
_parent.block4._x = 1000;
_parent.block4._y = 1000;
this._x = this._x + 5;
}
if (this._x > (400 - (this._width / 2))) {
if (_root.mc3Shelter.mc.robot.phase == 0) {
_root.mc3Shelter.mc.robot._x = -(this._width / 2);
_root.mc3Shelter.mc.robot._y = 200;
_root.mc3Shelter.mc.robot.phase = 3;
}
}
if (this._x > (400 + (this._width / 2))) {
this.phase = 0;
this.counter = 0;
this._visible = false;
_parent.laserPack._visible = false;
}
}
Symbol 273 MovieClip Frame 18
_parent.isActivated = true;
stop();
Symbol 274 MovieClip Frame 10
_parent.gotoAndStop("idle");
Symbol 275 MovieClip Frame 1
stop();
_parent.isActivated = false;
this.isTriggered = false;
Instance of Symbol 180 MovieClip "button" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.counter = 0;
this.buttonPressed = false;
}
onClipEvent (enterFrame) {
if (_parent.robot.phase == 1) {
_parent._rotation = _parent._parent.gravityRotation;
if (_parent.heroPointer.shelter.feetHitbox.hitTest(this.button)) {
if (!this.buttonPressed) {
this.bomb = _parent.attachMovie("boxBomb", "boxBomb" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:380, _y:380});
this.buttonPressed = true;
_root.clickSound.start();
}
}
if (this.buttonPressed) {
this.button._y = 3;
this.counter++;
} else {
this.button._y = this.originalButtonY;
}
if (this.counter == 400) {
this.bomb.bombShelter.gotoAndStop("explode");
}
if (this.counter > 450) {
this.counter = 0;
this.buttonPressed = false;
}
}
}
Instance of Symbol 195 MovieClip in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.originalX = this._x;
this.originalY = this._y;
this.stay = false;
}
onClipEvent (enterFrame) {
if (_parent.robot.phase == 3) {
this.stay = true;
}
if ((_parent.button.buttonPressed && (_parent.robot.phase == 1)) || (this.stay)) {
this._x = this.originalX;
this._y = this.originalY;
} else {
this._x = 1000;
this._y = 1000;
}
}
Instance of Symbol 256 MovieClip "amuletPart" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.parts.gotoAndStop(3);
this.counter = 0;
}
onClipEvent (enterFrame) {
if (this.counter > 0) {
this.counter++;
}
if (this.counter > 10) {
this._y = 1000;
this.counter = 0;
}
if (_parent.robot.hitTest(this) && (this.counter == 0)) {
this.counter = 1;
}
}
Instance of Symbol 227 MovieClip "laser3" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (enterFrame) {
if (_parent.robot.phase == 1) {
this._visible = false;
}
if (_parent.robot.phase == 2) {
this._visible = true;
}
if (_parent.robot.phase == 3) {
this._visible = false;
}
this._rotation = _parent.robot._rotation + 90;
this._x = _parent.robot._x;
this._y = _parent.robot._y;
if (this.hitTest(_parent.laserTrigger1)) {
if (!_parent.laserTrigger1.isTriggered) {
_parent.laserTrigger1.isTriggered = true;
_parent.laserTrigger1.gotoAndStop("receive");
}
} else if (_parent.laserTrigger1.isTriggered && (_parent.laserTrigger1._currentframe == 2)) {
_parent.laserTrigger1.gotoAndStop("close");
}
if (this.hitTest(_parent.laserTrigger2)) {
if (!_parent.laserTrigger2.isTriggered) {
_parent.laserTrigger2.isTriggered = true;
_parent.laserTrigger2.gotoAndStop("receive");
}
} else if (_parent.laserTrigger2.isTriggered && (_parent.laserTrigger2._currentframe == 2)) {
_parent.laserTrigger2.gotoAndStop("close");
}
if (this.hitTest(_parent.laserTrigger3)) {
if (!_parent.laserTrigger3.isTriggered) {
_parent.laserTrigger3.isTriggered = true;
_parent.laserTrigger3.gotoAndStop("receive");
}
} else if (_parent.laserTrigger3.isTriggered && (_parent.laserTrigger3._currentframe == 2)) {
_parent.laserTrigger3.gotoAndStop("close");
}
if (this.hitTest(_parent.laserTrigger4)) {
if (!_parent.laserTrigger4.isTriggered) {
_parent.laserTrigger4.isTriggered = true;
_parent.laserTrigger4.gotoAndStop("receive");
}
} else if (_parent.laserTrigger4.isTriggered && (_parent.laserTrigger4._currentframe == 2)) {
_parent.laserTrigger4.gotoAndStop("close");
}
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this) && (this._visible)) {
_root.restart();
}
}
Instance of Symbol 264 MovieClip "laser1" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.originalHeight = this.pole._height;
this.pole._height = this.originalHeight * 2;
}
onClipEvent (enterFrame) {
if (_parent.robot.phase == 1) {
this._rotation = this._rotation + _root.laserSpeed;
this.rotationIn360 = ((360 - this._rotation) + 90) % 360;
if ((this.rotationIn360 > 248) && (this.rotationIn360 < 292)) {
_parent.laserHitbox1._y = _parent.laserHitbox1.originalY;
_parent.laserHitbox1._x = 200 + (Math.cos(this.rotationIn360 * (Math.PI/180)) * 200);
_parent.laserHitbox3._y = _parent.laserHitbox3.originalY;
_parent.laserHitbox3._x = 200 + ((Math.cos(this.rotationIn360 * (Math.PI/180)) * 200) * -1);
}
if ((this.rotationIn360 > 68) && (this.rotationIn360 < 112)) {
_parent.laserHitbox1._y = _parent.laserHitbox1.originalY;
_parent.laserHitbox1._x = 200 + (Math.cos(((this.rotationIn360 + 180) % 360) * (Math.PI/180)) * 200);
_parent.laserHitbox3._y = _parent.laserHitbox3.originalY;
_parent.laserHitbox3._x = 200 + ((Math.cos(((this.rotationIn360 + 180) % 360) * (Math.PI/180)) * 200) * -1);
}
if (((this.rotationIn360 > 338) && (this.rotationIn360 < 359)) || ((this.rotationIn360 > 0) && (this.rotationIn360 < 22))) {
_parent.laserHitbox2._x = _parent.laserHitbox2.originalX;
_parent.laserHitbox2._y = 200 + ((Math.sin(this.rotationIn360 * (Math.PI/180)) * 200) * -1);
_parent.laserHitbox4._x = _parent.laserHitbox4.originalX;
_parent.laserHitbox4._y = 200 + (Math.sin(this.rotationIn360 * (Math.PI/180)) * 200);
}
if ((this.rotationIn360 > 158) && (this.rotationIn360 < 202)) {
_parent.laserHitbox2._x = _parent.laserHitbox2.originalX;
_parent.laserHitbox2._y = 200 + ((Math.sin((this.rotationIn360 + 180) * (Math.PI/180)) * 200) * -1);
_parent.laserHitbox4._x = _parent.laserHitbox4.originalX;
_parent.laserHitbox4._y = 200 + (Math.sin((this.rotationIn360 + 180) * (Math.PI/180)) * 200);
}
if ((Math.abs(this._rotation) >= 30) && (Math.abs(this._rotation) <= 45)) {
this.pole._height = this.originalHeight * (1 - (Math.abs(this._rotation) / 100));
}
if ((Math.abs(this._rotation) >= 45) && (Math.abs(this._rotation) <= 60)) {
this.pole._height = this.originalHeight * (1 - ((45 + (45 - Math.abs(this._rotation))) / 100));
}
if ((Math.abs(_rotation) > 60) && (Math.abs(_rotation) < 120)) {
this.pole._height = this.originalHeight * 2;
}
if ((Math.abs(this._rotation) >= 120) && (Math.abs(this._rotation) <= 135)) {
this.pole._height = this.originalHeight * (1 - ((Math.abs(this._rotation) - 90) / 100));
}
if ((Math.abs(this._rotation) >= 135) && (Math.abs(this._rotation) <= 150)) {
this.pole._height = this.originalHeight * (1 - ((45 + (45 - (Math.abs(this._rotation) - 90))) / 100));
}
if ((Math.abs(this._rotation) > 150) && (Math.abs(this._rotation) < 210)) {
this.pole._height = this.originalHeight * 2;
}
if ((Math.abs(this._rotation) > 0) && (Math.abs(this._rotation) < 30)) {
this.pole._height = this.originalHeight * 2;
}
}
}
Instance of Symbol 264 MovieClip "laser2" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.originalHeight = this.pole._height;
this.pole._height = this.originalHeight * 2;
}
onClipEvent (enterFrame) {
if (_parent.robot.phase == 1) {
this._rotation = this._rotation + _root.laserSpeed;
this.rotationIn360 = ((360 - this._rotation) + 90) % 360;
if ((this.rotationIn360 > 248) && (this.rotationIn360 < 292)) {
_parent.laserHitbox1._y = _parent.laserHitbox1.originalY;
_parent.laserHitbox1._x = 200 + (Math.cos(this.rotationIn360 * (Math.PI/180)) * 200);
_parent.laserHitbox3._y = _parent.laserHitbox3.originalY;
_parent.laserHitbox3._x = 200 + ((Math.cos(this.rotationIn360 * (Math.PI/180)) * 200) * -1);
}
if ((this.rotationIn360 > 68) && (this.rotationIn360 < 112)) {
_parent.laserHitbox1._y = _parent.laserHitbox1.originalY;
_parent.laserHitbox1._x = 200 + (Math.cos(((this.rotationIn360 + 180) % 360) * (Math.PI/180)) * 200);
_parent.laserHitbox3._y = _parent.laserHitbox3.originalY;
_parent.laserHitbox3._x = 200 + ((Math.cos(((this.rotationIn360 + 180) % 360) * (Math.PI/180)) * 200) * -1);
}
if (((this.rotationIn360 > 338) && (this.rotationIn360 < 359)) || ((this.rotationIn360 > 0) && (this.rotationIn360 < 22))) {
_parent.laserHitbox2._x = _parent.laserHitbox2.originalX;
_parent.laserHitbox2._y = 200 + ((Math.sin(this.rotationIn360 * (Math.PI/180)) * 200) * -1);
_parent.laserHitbox4._x = _parent.laserHitbox4.originalX;
_parent.laserHitbox4._y = 200 + (Math.sin(this.rotationIn360 * (Math.PI/180)) * 200);
}
if ((this.rotationIn360 > 158) && (this.rotationIn360 < 202)) {
_parent.laserHitbox2._x = _parent.laserHitbox2.originalX;
_parent.laserHitbox2._y = 200 + ((Math.sin((this.rotationIn360 + 180) * (Math.PI/180)) * 200) * -1);
_parent.laserHitbox4._x = _parent.laserHitbox4.originalX;
_parent.laserHitbox4._y = 200 + (Math.sin((this.rotationIn360 + 180) * (Math.PI/180)) * 200);
}
if ((Math.abs(this._rotation) >= 30) && (Math.abs(this._rotation) <= 45)) {
this.pole._height = this.originalHeight * (1 - (Math.abs(this._rotation) / 100));
}
if ((Math.abs(this._rotation) >= 45) && (Math.abs(this._rotation) <= 60)) {
this.pole._height = this.originalHeight * (1 - ((45 + (45 - Math.abs(this._rotation))) / 100));
}
if ((Math.abs(_rotation) > 60) && (Math.abs(_rotation) < 120)) {
this.pole._height = this.originalHeight * 2;
}
if ((Math.abs(this._rotation) >= 120) && (Math.abs(this._rotation) <= 135)) {
this.pole._height = this.originalHeight * (1 - ((Math.abs(this._rotation) - 90) / 100));
}
if ((Math.abs(this._rotation) >= 135) && (Math.abs(this._rotation) <= 150)) {
this.pole._height = this.originalHeight * (1 - ((45 + (45 - (Math.abs(this._rotation) - 90))) / 100));
}
if ((Math.abs(this._rotation) > 150) && (Math.abs(this._rotation) < 210)) {
this.pole._height = this.originalHeight * 2;
}
if ((Math.abs(this._rotation) > 0) && (Math.abs(this._rotation) < 30)) {
this.pole._height = this.originalHeight * 2;
}
}
}
Instance of Symbol 229 MovieClip "laserPack" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (enterFrame) {
this._x = _parent.robot._x;
this._y = _parent.robot._y;
if (_parent.robot.phase == 1) {
this._rotation = this._rotation + _root.laserSpeed;
}
if ((_parent.robot.phase == 2) && (_parent.robot.counter < 70)) {
this._rotation = this._rotation + _root.laserSpeed;
}
}
Instance of Symbol 258 MovieClip "robot" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.phase = -1;
this.counter = -20;
this.makeAMove = false;
this.whatMove = 0;
this.phase2MoveSpeed = 5;
this.XorY = this._y;
this.explodeCounter = 0;
this.nextPhase = 1;
this.originalX = this._x;
this.originalY = this._y;
this.phase0start = false;
_parent.laser1._visible = false;
_parent.laser2._visible = false;
_parent.laser3._visible = false;
_parent.laserTrigger1._visible = false;
_parent.laserTrigger2._visible = false;
_parent.laserTrigger3._visible = false;
_parent.laserTrigger4._visible = false;
}
onClipEvent (enterFrame) {
if (this.phase == -1) {
if (!this.phase0start) {
this._y = 500;
this.phase0start = true;
}
}
if (this.phase == 0) {
this._y = this._y - 5;
if (this._y <= this.originalY) {
this._y = this.originalY;
this.phase = 1;
_parent.laser1._visible = true;
_parent.laser2._visible = true;
}
}
if (this.phase == "explode") {
if (this.explodeCounter == 0) {
this.gotoAndStop("explode");
this._rotation = _parent.gravityRotation;
if (this.nextPhase == 2) {
_parent.laser1._visible = false;
_parent.laser2._visible = false;
}
if (this.nextPhase == 3) {
this.phase2MoveSpeed = 15;
this.makeAMove = false;
_parent.laser3._visible = false;
this._rotation = 0;
}
}
this.explodeCounter++;
if (this.explodeCounter > 25) {
this.gotoAndStop("idle");
this.phase = this.nextPhase;
this.explodeCounter = 0;
}
}
if (this.phase == 1) {
if (this.hitTest(_parent.button.bomb)) {
_parent.button.bomb.removeMovieClip();
this.phase = "explode";
this.nextPhase = 2;
}
this._rotation = this._rotation + _root.laserSpeed;
}
if (this.phase == 2) {
if (this.hitTest(this.bomb)) {
this.bomb.removeMovieClip();
this.phase = "explode";
this.nextPhase = 3;
}
if (!_parent.laserTrigger1._visible) {
_parent.laserTrigger1.gotoAndStop("appear");
}
if (!_parent.laserTrigger2._visible) {
_parent.laserTrigger2.gotoAndStop("appear");
}
if (!_parent.laserTrigger3._visible) {
_parent.laserTrigger3.gotoAndStop("appear");
}
if (!_parent.laserTrigger4._visible) {
_parent.laserTrigger4.gotoAndStop("appear");
}
_parent.laserTrigger1._visible = true;
_parent.laserTrigger2._visible = true;
_parent.laserTrigger3._visible = true;
_parent.laserTrigger4._visible = true;
_parent.button._visible = false;
if (this.whatMove == 0) {
this.XorY = 400 - this._y;
}
if (this.whatMove == 90) {
this.XorY = this._x;
}
if (this.whatMove == -90) {
this.XorY = 400 - this._x;
}
if (Math.abs(this.whatMove) == 180) {
this.XorY = this._y;
}
if (counter <= 70) {
_parent.laser3.pole._height = 0;
this._rotation = (_parent.gravityRotation + ((Math.atan((200 - _parent.heroPointer.posX) / this.XorY) * 180) / Math.PI)) + 90;
}
if (!this.makeAMove) {
this.counter++;
if (this.counter > 50) {
this.makeAMove = true;
this.whatMove = _parent.gravityRotation;
this.phase2MoveSpeed = 15;
}
}
}
if (this.makeAMove) {
this.phase2MoveSpeed = this.phase2MoveSpeed * 0.92;
if (counter == 71) {
if (((((this._rotation < (whatMove + 90)) && ((whatMove + 90) != 270)) && ((whatMove + 90) != 180)) || (((whatMove + 90) == 270) && (this._rotation < -90))) || (((whatMove + 90) == 180) && (this._rotation > -90))) {
this._rotation = whatMove;
} else {
this._rotation = whatMove - 180;
}
}
if (counter > 70) {
_parent.laserPack._rotation = _parent.robot._rotation + 90;
}
if (counter > 90) {
if (_parent.laser3.pole._height < 500) {
_parent.laser3.pole._height = _parent.laser3.pole._height + 80;
}
}
if (this.whatMove == 0) {
if (_y < 350) {
this._y = this._y + this.phase2MoveSpeed;
}
}
if (this.whatMove == 90) {
if (_x > 50) {
this._x = this._x - this.phase2MoveSpeed;
}
}
if (this.whatMove == -90) {
if (_x < 350) {
this._x = this._x + this.phase2MoveSpeed;
}
}
if (Math.abs(this.whatMove) == 180) {
if (_y > 50) {
this._y = this._y - this.phase2MoveSpeed;
}
}
this.counter++;
}
if (!this.makeAMove) {
this.phase2MoveSpeed = this.phase2MoveSpeed * 0.92;
if (this.whatMove == 0) {
if (_y > 200) {
this._y = this._y - this.phase2MoveSpeed;
}
}
if (this.whatMove == 90) {
if (_x < 200) {
this._x = this._x + this.phase2MoveSpeed;
}
}
if (this.whatMove == -90) {
if (_x > 200) {
this._x = this._x - this.phase2MoveSpeed;
}
}
if (Math.abs(this.whatMove) == 180) {
if (_y < 200) {
this._y = this._y + this.phase2MoveSpeed;
}
}
}
if (this.counter > 140) {
this.phase2MoveSpeed = 15;
this.makeAMove = false;
this.counter = -20;
}
if (((_parent.laserTrigger1.isActivated && (_parent.laserTrigger2.isActivated)) && (_parent.laserTrigger3.isActivated)) && (_parent.laserTrigger4.isActivated)) {
if (!this.allTriggersActivated) {
this.bomb = _parent.attachMovie("boxBomb", "boxBomb" + (_root.depth++), _root.depth++, {_x:380, _y:380});
this.allTriggersActivated = true;
_root.clickSound.start();
}
}
if (this.phase == 3) {
this._rotation = 0;
_parent.button._visible = false;
_parent.laser1._visible = false;
_parent.laser2._visible = false;
this._x = this._x + 5;
if (this._x > (400 - (this._width / 2))) {
if (_root.mc2Shelter.mc.robot.phase == 0) {
_root.mc2Shelter.mc.robot._x = -(this._width / 2);
_root.mc2Shelter.mc.robot._y = 200;
_root.mc2Shelter.mc.robot.phase = 3;
}
}
if (this._x > (400 + (this._width / 2))) {
this.phase = -1;
this._visible = false;
_parent.laserPack._visible = false;
}
}
}
Instance of Symbol 277 MovieClip "laserHitbox1" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.originalY = this._y;
this._visible = false;
}
onClipEvent (enterFrame) {
if (_parent.robot.phase == 1) {
if ((this._x <= 132) || (this._x >= 268)) {
this._y = 1000;
}
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this)) {
_root.restart();
}
}
}
Instance of Symbol 277 MovieClip "laserHitbox2" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.originalX = this._x;
this._visible = false;
}
onClipEvent (enterFrame) {
if (_parent.robot.phase == 1) {
if ((this._y <= 132) || (this._y >= 268)) {
this._x = 1000;
}
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this)) {
_root.restart();
}
}
}
Instance of Symbol 277 MovieClip "laserHitbox3" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.originalY = this._y;
this._visible = false;
}
onClipEvent (enterFrame) {
if (_parent.robot.phase == 1) {
if ((this._x <= 132) || (this._x >= 268)) {
this._y = 1000;
}
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this)) {
_root.restart();
}
}
}
Instance of Symbol 277 MovieClip "laserHitbox4" in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (load) {
this.originalX = this._x;
this._visible = false;
}
onClipEvent (enterFrame) {
if (_parent.robot.phase == 1) {
if ((this._y <= 132) || (this._y >= 268)) {
this._x = 1000;
}
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this)) {
_root.restart();
}
}
}
Instance of Symbol 57 MovieClip in Symbol 278 MovieClip [levelBoss2a] Frame 1
onClipEvent (enterFrame) {
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this) && (_parent.robot.phase == -1)) {
_parent.robot.phase = 0;
_root.isHeroPlayable = false;
_parent.heroPointer.shelter.gotoAndStop("idle");
}
if ((_parent.robot.phase == 1) && (this._y != 1000)) {
_root.isHeroPlayable = true;
_root.heroCanPush = true;
_parent.hiddenBlock1._y = 1000;
_parent.hiddenBlock2._y = 1000;
this._y = 1000;
}
}
Instance of Symbol 280 MovieClip in Symbol 281 MovieClip Frame 1
onClipEvent (load) {
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._rotation = this._rotation + (Math.cos(this.count) * 2);
this._rotation = _parent._parent._parent._parent.gravityRotation - _parent._parent._parent._rotation;
}
Symbol 285 MovieClip Frame 15
if (this.counter.number == 0) {
this.stop();
_parent._visible = false;
}
Symbol 285 MovieClip Frame 30
this.counter.number--;
Symbol 286 MovieClip Frame 1
counterShelter.counter.number = 5;
if (_root[("level" + _root.levelVar) + "ChestGotten"]) {
this._visible = true;
} else {
this._visible = false;
}
Instance of Symbol 281 MovieClip in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
this.count = 0;
_root.diamondRunActivate = _parent;
}
onClipEvent (enterFrame) {
if (_parent._visible) {
this.count = this.count + 0.1;
this._y = this._y + (Math.cos(this.count) * 0.3);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.normalHitbox.hitTest(_parent.hitbox)) {
_root.diamondRunOn = true;
_parent._visible = false;
}
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 290 MovieClip [level13e] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox2 = _root.mc1Shelter.mc.buttonBox2._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc1Shelter.mc.buttonBox2._y = 1000;
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc1Shelter.mc.buttonBox2._y = this.originalYbuttonBox2;
}
}
if (this.counter > 0) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 291 MovieClip [level13d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _root.mc1Shelter.mc.buttonBox3._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc1Shelter.mc.buttonBox3._y = 1000;
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc1Shelter.mc.buttonBox3._y = this.originalYbuttonBox3;
}
}
if (this.counter > 0) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 294 MovieClip [level14e] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox2 = _root.mc1Shelter.mc.buttonBox2._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc1Shelter.mc.buttonBox2._y = 1000;
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc1Shelter.mc.buttonBox2._y = this.originalYbuttonBox2;
}
}
if (this.counter > 0) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 295 MovieClip [level14d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _root.mc1Shelter.mc.buttonBox1._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc1Shelter.mc.buttonBox1._y = 1000;
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc1Shelter.mc.buttonBox1._y = this.originalYbuttonBox1;
}
}
if (this.counter > 0) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 209 MovieClip in Symbol 295 MovieClip [level14d] Frame 1
onClipEvent (load) {
this.specialX = 5;
this.specialY = 4;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Instance of Symbol 180 MovieClip "button2" in Symbol 298 MovieClip [level13b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _root.mc1Shelter.mc.buttonBox1._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc1Shelter.mc.buttonBox1._y = 1000;
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc1Shelter.mc.buttonBox1._y = this.originalYbuttonBox1;
}
}
if (this.counter > 0) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 209 MovieClip in Symbol 298 MovieClip [level13b] Frame 1
onClipEvent (load) {
this.specialX = 8;
this.specialY = 1;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Instance of Symbol 180 MovieClip "button3" in Symbol 299 MovieClip [level15f] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 299 MovieClip [level15f] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 299 MovieClip [level15f] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
this.originalYbuttonBox5 = _parent.buttonBox5._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox4._y = 1000;
_parent.buttonBox5._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox4._y = this.originalYbuttonBox4;
_parent.buttonBox5._y = this.originalYbuttonBox5;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 301 MovieClip [level15d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox9 = _root.mc1Shelter.mc.buttonBox9._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc1Shelter.mc.buttonBox9._y = 1000;
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc1Shelter.mc.buttonBox9._y = this.originalYbuttonBox9;
}
}
if (this.counter > 0) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 303 MovieClip [level15b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
this.originalYbuttonBox5 = _parent.buttonBox5._y;
this.originalYbuttonBox6 = _parent.buttonBox6._y;
this.originalYbuttonBox7 = _parent.buttonBox7._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
_parent.buttonBox5._y = 1000;
_parent.buttonBox6._y = 1000;
_parent.buttonBox7._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
_parent.buttonBox5._y = this.originalYbuttonBox5;
_parent.buttonBox6._y = this.originalYbuttonBox6;
_parent.buttonBox7._y = this.originalYbuttonBox7;
}
}
Instance of Symbol 180 MovieClip "button3" in Symbol 303 MovieClip [level15b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox8 = _parent.buttonBox8._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox8._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox8._y = this.originalYbuttonBox8;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 306 MovieClip [level12f] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _root.mc4Shelter.mc.buttonBox1._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc4Shelter.mc.buttonBox1._y = 1000;
_root.mc4Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc4Shelter.mc.buttonBox1._y = this.originalYbuttonBox1;
}
}
if (this.counter > 0) {
_root.mc4Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 309 MovieClip [level12c] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 311 MovieClip [level12a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
_parent.buttonBox3._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
_parent.buttonBox3._y = this.originalYbuttonBox3;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 314 MovieClip [level15a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
}
}
Instance of Symbol 180 MovieClip "button2" in Symbol 314 MovieClip [level15a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox5 = _parent.buttonBox5._y;
this.originalYbuttonBox6 = _parent.buttonBox6._y;
this.originalYbuttonBox7 = _parent.buttonBox7._y;
this.originalYbuttonBox8 = _parent.buttonBox8._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox5._y = 1000;
_parent.buttonBox6._y = 1000;
_parent.buttonBox7._y = 1000;
_parent.buttonBox8._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox5._y = this.originalYbuttonBox5;
_parent.buttonBox6._y = this.originalYbuttonBox6;
_parent.buttonBox7._y = this.originalYbuttonBox7;
_parent.buttonBox8._y = this.originalYbuttonBox8;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 318 MovieClip [level13a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
this.originalYbuttonBox5 = _parent.buttonBox5._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox4._y = 1000;
_parent.buttonBox5._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox4._y = this.originalYbuttonBox4;
_parent.buttonBox5._y = this.originalYbuttonBox5;
}
}
Instance of Symbol 180 MovieClip "button5" in Symbol 318 MovieClip [level13a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox6 = _parent.buttonBox6._y;
this.originalYbuttonBox7 = _parent.buttonBox7._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox6._y = 1000;
_parent.buttonBox7._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox6._y = this.originalYbuttonBox6;
_parent.buttonBox7._y = this.originalYbuttonBox7;
}
}
Instance of Symbol 180 MovieClip "button6" in Symbol 318 MovieClip [level13a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox8 = _parent.buttonBox8._y;
this.originalYbuttonBox9 = _parent.buttonBox9._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox8._y = 1000;
_parent.buttonBox9._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox8._y = this.originalYbuttonBox8;
_parent.buttonBox9._y = this.originalYbuttonBox9;
}
}
Instance of Symbol 180 MovieClip "button" in Symbol 319 MovieClip [level11a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Symbol 331 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 17
stop();
Symbol 347 MovieClip Frame 1
stop();
Instance of Symbol 333 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
blurFilter = new flash.filters.BlurFilter(2, 2, 1);
this.levelNumber = substring(_parent._name, "level".length + 1, _parent._name.length);
_parent.isLocked = !_root[("level" + (this.levelNumber - 1)) + "ChestGotten"];
if (this.levelNumber == 6) {
_parent.isLocked = !_root.levelBoss1ChestGotten;
}
if (this.levelNumber == 11) {
_parent.isLocked = !_root.levelBoss2ChestGotten;
}
if (this.levelNumber == 16) {
_parent.isLocked = false;
}
var colorTransform = (new flash.geom.ColorTransform(this));
colorTransform.redOffset = -40;
colorTransform.greenOffset = -40;
colorTransform.blueOffset = -40;
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
this.firstTimeUnlocked = _root[("level" + this.levelNumber) + "FirstTimeUnlocked"];
this.chainsBreakCounter = 0;
}
onClipEvent (enterFrame) {
if (!_parent.isLocked) {
if (!this.firstTimeUnlocked) {
this.chainsBreakCounter++;
if (this.chainsBreakCounter > 10) {
_parent.chains.gotoAndStop(2);
_root[("level" + this.levelNumber) + "FirstTimeUnlocked"] = true;
}
} else {
_parent.chains._visible = false;
}
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
trans.colorTransform = colorTransform;
this.filters = null;
if (this.cubeRotateShelter != undefined) {
this.cubeRotateShelterString = this.cubeRotateShelter + "Empty";
} else {
this.cubeRotateShelterString = "Empty";
}
if (this.cubeRotateShelterString == "Empty") {
this.cube.gotoAndStop(1);
this.cube._visible = true;
}
if ((_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox) && (this.cube._visible == true)) && (this.cubeRotateShelterString == "Empty")) {
this.cube.gotoAndStop(2);
this.cube._visible = false;
_root.depth++;
this.cubeRotateShelter = _parent._parent.attachMovie("cubeRotateShelter", "cubeRotateShelter" + _root.depth, _root.depth, {_x:_parent._x, _y:_parent._y});
if (_parent._parent == _root.mc5Shelter.mc) {
this.cubeRotateShelter._yscale = -100;
this.cubeRotateShelter._xscale = -100;
}
this.cubeRotateShelter.filters = [blurFilter];
this.cubeRotateShelter.levelText = "Level " + this.levelNumber;
this.cubeRotateShelter.levelNumber = this.levelNumber;
_parent._parent.cubeRotateShelterPointer = this.cubeRotateShelter;
}
if ((!_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox)) && (this.cubeRotateShelter.idle)) {
this.cubeRotateShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
}
if ((Key.isDown(65) && (this.cubeRotateShelter.idle)) && (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox))) {
_root.levelVar = this.levelNumber;
_root.restart();
}
} else {
if (this.levelLockedShelter != undefined) {
this.levelLockedShelterString = this.levelLockedShelter + "Empty";
} else {
this.levelLockedShelterString = "Empty";
}
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox) && (this.levelLockedShelterString == "Empty")) {
_root.depth++;
this.levelLockedShelter = _parent._parent.attachMovie("levelLockedShelter", "levelLockedShelter" + _root.depth, _root.depth, {_x:_parent._x, _y:_parent._y - 60});
if (_parent._parent == _root.mc5Shelter.mc) {
this.levelLockedShelter._yscale = -100;
this.levelLockedShelter._xscale = -100;
this.levelLockedShelter._y = _parent._y + 60;
}
this.levelLockedShelter.filters = [blurFilter];
this.levelLockedShelter.levelText = "Level " + this.levelNumber;
}
if (((!_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox)) && (this.levelLockedShelter.idle)) && (_root.isHeroPlayable)) {
this.levelLockedShelter.gotoAndPlay(this.levelLockedShelter._currentframe + 1);
}
}
}
Symbol 352 MovieClip Frame 1
this.filters = [_root.blurFilter];
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 10
stop();
Symbol 375 MovieClip Frame 31
stop();
Symbol 376 MovieClip Frame 1
levelVar = 0;
if (_root.level11ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level12ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level13ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level14ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level15ChestGotten) {
levelVar = levelVar + 1;
}
levelVar = levelVar + "/5";
bossVar = 0;
if (_root.levelBoss3ChestGotten) {
bossVar = bossVar + 1;
}
bossVar = bossVar + "/1";
Instance of Symbol 377 MovieClip in Symbol 380 MovieClip Frame 1
onClipEvent (load) {
blurFilter = new flash.filters.BlurFilter(2, 2, 1);
if ((substring(_parent._name, "boss".length + 1, _parent._name.length)) == 1) {
levelNumber = 5;
}
if ((substring(_parent._name, "boss".length + 1, _parent._name.length)) == 2) {
levelNumber = 10;
}
if ((substring(_parent._name, "boss".length + 1, _parent._name.length)) == 3) {
levelNumber = 15;
}
_parent.isLocked = !_root[("level" + this.levelNumber) + "ChestGotten"];
var colorTransform = (new flash.geom.ColorTransform(this));
colorTransform.redOffset = -40;
colorTransform.greenOffset = -40;
colorTransform.blueOffset = -40;
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
}
onClipEvent (enterFrame) {
if (!_parent.isLocked) {
_parent.chains._visible = false;
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
trans.colorTransform = colorTransform;
this.filters = null;
if (this.cubeRotateShelter != undefined) {
this.cubeRotateShelterString = this.cubeRotateShelter + "Empty";
} else {
this.cubeRotateShelterString = "Empty";
}
if (this.cubeRotateShelterString == "Empty") {
this.cube._visible = true;
}
if ((_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox) && (this.cube._visible == true)) && (this.cubeRotateShelterString == "Empty")) {
this.cube._visible = false;
_root.depth++;
this.cubeRotateShelter = _parent._parent.attachMovie("cubeRotateShelter", "cubeRotateShelter" + _root.depth, _root.depth, {_x:_parent._x, _y:_parent._y});
this.cubeRotateShelter.filters = [blurFilter];
this.cubeRotateShelter.levelText = "Boss " + (substring(_parent._name, "boss".length + 1, _parent._name.length));
this.cubeRotateShelter.levelNumber = _parent._name;
this.skullShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
}
if ((!_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox)) && (this.cubeRotateShelter.idle == true)) {
this.skullShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
this.cubeRotateShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
}
if ((Key.isDown(65) && (this.cubeRotateShelter.idle)) && (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox))) {
_root.levelVar = "Boss" + (substring(_parent._name, "boss".length + 1, _parent._name.length));
_root.restart();
}
} else {
if (this.levelLockedShelter != undefined) {
this.levelLockedShelterString = this.levelLockedShelter + "Empty";
} else {
this.levelLockedShelterString = "Empty";
}
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox) && (this.levelLockedShelterString == "Empty")) {
_root.depth++;
this.levelLockedShelter = _parent._parent.attachMovie("levelLockedShelter", "levelLockedShelter" + _root.depth, _root.depth, {_x:_parent._x, _y:_parent._y - 60});
this.levelLockedShelter.filters = [blurFilter];
this.levelLockedShelter.levelText = "Boss " + (substring(_parent._name, "boss".length + 1, _parent._name.length));
}
if (((!_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox)) && (this.levelLockedShelter.idle)) && (_root.isHeroPlayable)) {
this.levelLockedShelter.gotoAndPlay(this.levelLockedShelter._currentframe + 1);
}
}
}
Instance of Symbol 386 MovieClip "worldLocked" in Symbol 387 MovieClip [levelSelectc] Frame 1
onClipEvent (load) {
this.worldTag = "WORLD 3";
if (_root.notFirstTimeUnlockedWorld3) {
this._visible = false;
}
}
Symbol 403 MovieClip Frame 1
levelVar = 0;
if (_root.level6ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level7ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level8ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level9ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level10ChestGotten) {
levelVar = levelVar + 1;
}
levelVar = levelVar + "/5";
bossVar = 0;
if (_root.levelBoss2ChestGotten) {
bossVar = bossVar + 1;
}
bossVar = bossVar + "/1";
Instance of Symbol 386 MovieClip "worldLocked" in Symbol 406 MovieClip [levelSelectb] Frame 1
onClipEvent (load) {
this.worldTag = "WORLD 2";
if (_root.notFirstTimeUnlockedWorld2) {
this._visible = false;
}
}
Instance of Symbol 209 MovieClip in Symbol 416 MovieClip [levelTutorial1f] Frame 1
onClipEvent (load) {
this.specialX = 4;
this.specialY = 7;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Symbol 423 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 2
stop();
Symbol 432 MovieClip Frame 1
stop();
Instance of Symbol 447 MovieClip in Symbol 448 MovieClip [levelTutorial2c] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.engine.usedHint && (_parent.gravityRotation != -90)) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 477 MovieClip Frame 1
animationOn = false;
stop();
Symbol 477 MovieClip Frame 2
animationOn = true;
Symbol 478 MovieClip Frame 1
typeOf = "spring";
Instance of Symbol 447 MovieClip in Symbol 492 MovieClip [level2e] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.engine.usedHint && (Math.abs(_parent.gravityRotation) != 180)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 209 MovieClip in Symbol 494 MovieClip [level5f] Frame 1
onClipEvent (load) {
this.specialX = 8;
this.specialY = 4;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Instance of Symbol 209 MovieClip in Symbol 510 MovieClip [level1b] Frame 1
onClipEvent (load) {
this.specialX = 4;
this.specialY = 5;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Instance of Symbol 509 MovieClip in Symbol 510 MovieClip [level1b] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.engine.usedHint && (_parent.gravityRotation != 90)) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 509 MovieClip in Symbol 516 MovieClip [level3a] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.engine.usedHint && (_parent.gravityRotation != 0)) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 520 MovieClip Frame 1
_parent.startWidth = Math.round(_parent._width / 100) * 100;
_parent.startHeight = Math.round(_parent._height / 100) * 100;
_parent.figure = _root.engine.cube1;
_parent.side = _parent.figure.getSideWithMovieClip(_parent._parent);
_parent.fullBlockArray = new Array();
this._visible = false;
_parent.attachMovie("levelEditorCursor", "levelEditorCursor", _parent.getNextHighestDepth(), {_x:100, _y:100});
fullBlockArrayI = 0;
while (fullBlockArrayI < 100) {
_parent.fullBlockArray[fullBlockArrayI] = undefined;
fullBlockArrayI++;
}
if (_parent.emptyCorners == undefined) {
_parent.emptyCorners = false;
}
if (!_parent.emptyCorners) {
_parent.fullBlockArray[1] = _parent.cornerBlock1;
_parent.fullBlockArray[10] = _parent.cornerBlock2;
_parent.fullBlockArray[91] = _parent.cornerBlock3;
_parent.fullBlockArray[100] = _parent.cornerBlock4;
this.mudBlock = _parent.attachMovie("mudBlock4", "mudBlock4" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:20, _y:20});
this.mudBlock._rotation = 180;
_parent.fullBlockArray[1] = this.mudBlock;
this.mudBlock = _parent.attachMovie("mudBlock4", "mudBlock4" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:380, _y:20});
_parent.fullBlockArray[10] = this.mudBlock;
this.mudBlock._rotation = -90;
this.mudBlock = _parent.attachMovie("mudBlock4", "mudBlock4" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:20, _y:380});
_parent.fullBlockArray[91] = this.mudBlock;
this.mudBlock._rotation = 90;
this.mudBlock = _parent.attachMovie("mudBlock4", "mudBlock4" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:380, _y:380});
_parent.fullBlockArray[100] = this.mudBlock;
this.mudBlock._rotation = 0;
}
_parent.whatBlock = function (position, original) {
whatBlockString = "Block8";
whatBlockRotation = 0;
whatBlockOther = new Array();
whatBlockXScale = 1;
whatBlockYScale = 1;
originalPosition = position;
this.blockPrimary = 0;
this.blockSecondary = 0;
this.blockLeft = false;
this.blockRight = false;
this.blockUp = false;
this.blockDown = false;
this.blockUpLeft = false;
this.blockUpRight = false;
this.blockDownLeft = false;
this.blockDownRight = false;
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if (((position - 1) % 10) == 0) {
position = position + 10;
whatFullBlockArray = _parent.leftSideMc.fullBlockArray;
if (_parent == _root.mc5Shelter.mc) {
position = ((originalPosition - 1) / 10) + 2;
}
if (_parent == _root.mc6Shelter.mc) {
position = ((10 - ((originalPosition - 1) / 10)) + 1) + 90;
}
}
if (whatFullBlockArray[position - 1] != undefined) {
this.blockLeft = true;
this.blockPrimary++;
if (original) {
whatBlockOther.push(whatFullBlockArray[position - 1]);
}
}
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if (((position + 1) % 10) == 1) {
position = position - 10;
whatFullBlockArray = _parent.rightSideMc.fullBlockArray;
if (_parent == _root.mc5Shelter.mc) {
position = 10 - (originalPosition / 10);
}
if (_parent == _root.mc6Shelter.mc) {
position = ((originalPosition / 10) - 1) + 90;
}
}
if (whatFullBlockArray[position + 1] != undefined) {
this.blockRight = true;
this.blockPrimary++;
if (original) {
whatBlockOther.push(whatFullBlockArray[position + 1]);
}
}
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if ((position - 10) <= 0) {
position = position + 100;
whatFullBlockArray = _parent.upSideMc.fullBlockArray;
if (_parent == _root.mc2Shelter.mc) {
position = 120 - (originalPosition * 10);
}
if ((_parent == _root.mc5Shelter.mc) || (_parent == _root.mc3Shelter.mc)) {
position = ((10 - originalPosition) + 10) + 1;
}
if (_parent == _root.mc4Shelter.mc) {
position = (originalPosition * 10) + 1;
}
}
if (whatFullBlockArray[position - 10] != undefined) {
this.blockUp = true;
this.blockPrimary++;
if (original) {
whatBlockOther.push(whatFullBlockArray[position - 10]);
}
}
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if ((position + 10) > 100) {
position = position - 100;
whatFullBlockArray = _parent.downSideMc.fullBlockArray;
if (_parent == _root.mc2Shelter.mc) {
position = ((originalPosition - 90) * 10) - 10;
}
if ((_parent == _root.mc6Shelter.mc) || (_parent == _root.mc3Shelter.mc)) {
position = ((10 - (originalPosition - 90)) + 1) + 80;
}
if (_parent == _root.mc4Shelter.mc) {
position = (((100 - originalPosition) * 10) + 1) - 10;
}
}
if (whatFullBlockArray[position + 10] != undefined) {
this.blockDown = true;
this.blockPrimary++;
if (original) {
whatBlockOther.push(whatFullBlockArray[position + 10]);
}
}
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if ((((position - 1) - 10) % 10) == 0) {
position = position + 10;
whatFullBlockArray = _parent.leftSideMc.fullBlockArray;
if (_parent == _root.mc5Shelter.mc) {
position = (((originalPosition - 1) / 10) + 1) + 10;
}
if (_parent == _root.mc6Shelter.mc) {
position = ((((10 - ((originalPosition - 1) / 10)) + 1) + 90) + 10) + 1;
}
}
if (((position - 1) - 10) <= 0) {
position = position + 100;
whatFullBlockArray = _parent.upSideMc.fullBlockArray;
if (_parent == _root.mc2Shelter.mc) {
position = ((100 - (originalPosition * 10)) + 1) + 30;
}
if ((_parent == _root.mc5Shelter.mc) || (_parent == _root.mc3Shelter.mc)) {
position = (((10 - originalPosition) + 10) + 1) + 2;
}
if (_parent == _root.mc4Shelter.mc) {
position = (((originalPosition * 10) + 1) - 10) + 1;
}
}
if (whatFullBlockArray[(position - 1) - 10] != undefined) {
this.blockUpLeft = true;
this.blockSecondary++;
if (original) {
whatBlockOther.push(whatFullBlockArray[(position - 1) - 10]);
}
}
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if ((((position + 1) - 10) % 10) == 1) {
position = position - 10;
if (_parent == _root.mc5Shelter.mc) {
position = ((10 - (originalPosition / 10)) + 10) + 1;
}
if (_parent == _root.mc6Shelter.mc) {
position = ((((originalPosition / 10) - 1) + 90) + 10) - 1;
}
whatFullBlockArray = _parent.rightSideMc.fullBlockArray;
}
if (((position + 1) - 10) <= 0) {
position = position + 100;
whatFullBlockArray = _parent.upSideMc.fullBlockArray;
if (_parent == _root.mc2Shelter.mc) {
position = ((100 - (originalPosition * 10)) - 1) + 10;
}
if ((_parent == _root.mc5Shelter.mc) || (_parent == _root.mc3Shelter.mc)) {
position = (((10 - originalPosition) + 10) + 1) - 2;
}
if (_parent == _root.mc4Shelter.mc) {
position = (((originalPosition * 10) + 1) + 10) - 1;
}
}
if (whatFullBlockArray[(position + 1) - 10] != undefined) {
this.blockUpRight = true;
this.blockSecondary++;
if (original) {
whatBlockOther.push(whatFullBlockArray[(position + 1) - 10]);
}
}
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if ((((position - 1) + 10) % 10) == 0) {
position = position + 10;
whatFullBlockArray = _parent.leftSideMc.fullBlockArray;
if (_parent == _root.mc5Shelter.mc) {
position = (((originalPosition - 1) / 10) + 3) - 10;
}
if (_parent == _root.mc6Shelter.mc) {
position = ((((10 - ((originalPosition - 1) / 10)) + 1) + 90) - 10) - 1;
}
}
if (((position - 1) + 10) > 100) {
position = position - 100;
whatFullBlockArray = _parent.downSideMc.fullBlockArray;
if (_parent == _root.mc2Shelter.mc) {
position = ((((originalPosition - 90) * 10) - 10) - 10) + 1;
}
if ((_parent == _root.mc6Shelter.mc) || (_parent == _root.mc3Shelter.mc)) {
position = (((10 - (originalPosition - 90)) + 1) + 80) + 2;
}
if (_parent == _root.mc4Shelter.mc) {
position = (((((100 - originalPosition) * 10) + 1) - 10) + 10) + 1;
}
}
if (whatFullBlockArray[(position - 1) + 10] != undefined) {
this.blockDownLeft = true;
this.blockSecondary++;
if (original) {
whatBlockOther.push(whatFullBlockArray[(position - 1) + 10]);
}
}
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if ((((position + 1) + 10) % 10) == 1) {
position = position - 10;
if (_parent == _root.mc5Shelter.mc) {
position = ((10 - (originalPosition / 10)) - 10) - 1;
}
if (_parent == _root.mc6Shelter.mc) {
position = ((((originalPosition / 10) - 1) + 90) - 10) + 1;
}
whatFullBlockArray = _parent.rightSideMc.fullBlockArray;
}
if (((position + 1) + 10) > 100) {
position = position - 100;
whatFullBlockArray = _parent.downSideMc.fullBlockArray;
if (_parent == _root.mc2Shelter.mc) {
position = ((((originalPosition - 90) * 10) - 10) + 10) - 1;
}
if ((_parent == _root.mc6Shelter.mc) || (_parent == _root.mc3Shelter.mc)) {
position = (((10 - (originalPosition - 90)) + 1) + 80) - 2;
}
if (_parent == _root.mc4Shelter.mc) {
position = (((((((100 - originalPosition) * 10) + 1) - 10) + 10) + 1) - 20) - 2;
}
}
if (whatFullBlockArray[(position + 1) + 10] != undefined) {
this.blockDownRight = true;
this.blockSecondary++;
if (original) {
whatBlockOther.push(whatFullBlockArray[(position + 1) + 10]);
}
}
whatFullBlockArray = _parent.fullBlockArray;
position = originalPosition;
if (this.blockPrimary == 1) {
whatBlockString = "Block2";
if (this.blockLeft) {
whatBlockRotation = 90;
}
if (this.blockUp) {
whatBlockRotation = 180;
}
if (this.blockRight) {
whatBlockRotation = -90;
}
if (this.blockDown) {
whatBlockRotation = 0;
}
}
if (this.blockPrimary == 2) {
if (this.blockLeft && (this.blockRight)) {
whatBlockString = "Block6";
whatBlockRotation = 0;
}
if (this.blockUp && (this.blockDown)) {
whatBlockString = "Block6";
whatBlockRotation = 90;
}
if (this.blockLeft && (this.blockUp)) {
whatBlockString = "Block7";
whatBlockRotation = -90;
if (this.blockUpLeft) {
whatBlockString = "Block4";
whatBlockRotation = 180;
}
}
if (this.blockUp && (this.blockRight)) {
whatBlockString = "Block7";
whatBlockRotation = 0;
if (this.blockUpRight) {
whatBlockString = "Block4";
whatBlockRotation = -90;
}
}
if (this.blockRight && (this.blockDown)) {
whatBlockString = "Block7";
whatBlockRotation = 90;
if (this.blockDownRight) {
whatBlockString = "Block4";
whatBlockRotation = 0;
}
}
if (this.blockDown && (this.blockLeft)) {
whatBlockString = "Block7";
whatBlockRotation = 180;
if (this.blockDownLeft) {
whatBlockString = "Block4";
whatBlockRotation = 90;
}
}
}
if (this.blockPrimary == 3) {
whatBlockString = "Block1";
if (!this.blockLeft) {
whatBlockRotation = -90;
if (this.blockUpRight && (!this.blockDownRight)) {
whatBlockString = "Block9";
whatBlockXScale = -1;
whatBlockRotation = -90;
}
if ((!this.blockUpRight) && (this.blockDownRight)) {
whatBlockString = "Block9";
whatBlockRotation = -90;
}
if ((!this.blockUpRight) && (!this.blockDownRight)) {
whatBlockRotation = 90;
whatBlockString = "Block10";
}
}
if (!this.blockUp) {
whatBlockRotation = 0;
if (this.blockDownLeft && (!this.blockDownRight)) {
whatBlockString = "Block9";
whatBlockRotation = 0;
}
if ((!this.blockDownLeft) && (this.blockDownRight)) {
whatBlockString = "Block9";
whatBlockXScale = -1;
whatBlockRotation = 0;
}
if ((!this.blockDownLeft) && (!this.blockDownRight)) {
whatBlockRotation = 180;
whatBlockString = "Block10";
}
}
if (!this.blockRight) {
whatBlockRotation = 90;
if (this.blockDownLeft && (!this.blockUpLeft)) {
whatBlockString = "Block9";
whatBlockXScale = -1;
whatBlockRotation = 90;
}
if ((!this.blockDownLeft) && (this.blockUpLeft)) {
whatBlockString = "Block9";
whatBlockRotation = 90;
}
if ((!this.blockDownLeft) && (!this.blockUpLeft)) {
whatBlockRotation = -90;
whatBlockString = "Block10";
}
}
if (!this.blockDown) {
whatBlockRotation = 180;
if (this.blockUpLeft && (!this.blockUpRight)) {
whatBlockString = "Block9";
whatBlockXScale = -1;
whatBlockRotation = 180;
}
if ((!this.blockUpLeft) && (this.blockUpRight)) {
whatBlockString = "Block9";
whatBlockRotation = 180;
}
if ((!this.blockUpLeft) && (!this.blockUpRight)) {
whatBlockRotation = 0;
whatBlockString = "Block10";
}
}
}
if (this.blockPrimary == 4) {
if (this.blockSecondary == 0) {
whatBlockString = "Block14";
}
if (this.blockSecondary == 1) {
whatBlockString = "Block13";
if (this.blockUpLeft) {
whatBlockRotation = 90;
}
if (this.blockUpRight) {
whatBlockRotation = 180;
}
if (this.blockDownLeft) {
whatBlockRotation = 0;
}
if (this.blockDownRight) {
whatBlockRotation = -90;
}
}
if (this.blockSecondary == 2) {
if (this.blockUpLeft && (this.blockUpRight)) {
whatBlockString = "Block3";
whatBlockRotation = 180;
}
if (this.blockUpRight && (this.blockDownRight)) {
whatBlockString = "Block3";
whatBlockRotation = -90;
}
if (this.blockUpLeft && (this.blockDownLeft)) {
whatBlockString = "Block3";
whatBlockRotation = 90;
}
if (this.blockDownLeft && (this.blockDownRight)) {
whatBlockString = "Block3";
whatBlockRotation = 0;
}
if (this.blockUpLeft && (this.blockDownRight)) {
whatBlockString = "Block12";
}
if (this.blockDownLeft && (this.blockUpRight)) {
whatBlockString = "Block12";
whatBlockRotation = 90;
}
}
if (this.blockSecondary == 3) {
whatBlockString = "Block5";
if (!this.blockUpLeft) {
whatBlockRotation = -90;
}
if (!this.blockUpRight) {
whatBlockRotation = 0;
}
if (!this.blockDownLeft) {
whatBlockRotation = 180;
}
if (!this.blockDownRight) {
whatBlockRotation = 90;
}
}
if (this.blockSecondary == 4) {
whatBlockString = "Block11";
}
}
return([whatBlockString, whatBlockRotation, whatBlockXScale, whatBlockYScale, whatBlockOther]);
};
Symbol 521 MovieClip [levelEditorf] Frame 1
leftSideMc = _root.mc4Shelter.mc;
rightSideMc = _root.mc2Shelter.mc;
upSideMc = _root.mc1Shelter.mc;
downSideMc = _root.mc3Shelter.mc;
Symbol 522 MovieClip [levelEditore] Frame 1
leftSideMc = _root.mc4Shelter.mc;
rightSideMc = _root.mc2Shelter.mc;
upSideMc = _root.mc3Shelter.mc;
downSideMc = _root.mc1Shelter.mc;
Symbol 523 MovieClip [levelEditord] Frame 1
leftSideMc = _root.mc3Shelter.mc;
rightSideMc = _root.mc1Shelter.mc;
upSideMc = _root.mc5Shelter.mc;
downSideMc = _root.mc6Shelter.mc;
Symbol 524 MovieClip [levelEditorc] Frame 1
leftSideMc = _root.mc2Shelter.mc;
rightSideMc = _root.mc4Shelter.mc;
upSideMc = _root.mc5Shelter.mc;
downSideMc = _root.mc6Shelter.mc;
Symbol 525 MovieClip [levelEditorb] Frame 1
leftSideMc = _root.mc1Shelter.mc;
rightSideMc = _root.mc3Shelter.mc;
upSideMc = _root.mc5Shelter.mc;
downSideMc = _root.mc6Shelter.mc;
Symbol 526 MovieClip [levelUserLevel] Frame 1
leftSideMc = _root.mc4Shelter.mc;
rightSideMc = _root.mc2Shelter.mc;
upSideMc = _root.mc5Shelter.mc;
downSideMc = _root.mc6Shelter.mc;
Symbol 529 MovieClip Frame 1
_parent.filters = [_root.blurFilter];
_parent.linkBlock = "empty";
_parent.prevBlock = "empty";
_parent.tail = "empty";
if (_parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1] == "empty") {
_parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1] = _parent;
_parent.tail = _parent;
} else {
_parent.prevBlock = _parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1].tail;
_parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1].tail.linkBlock = _parent;
_parent._parent.blockList[Math.round((_parent._x + 20) / 40) - 1].tail = _parent;
_parent._parent.blockList.push(_parent);
}
_parent.checkForHit = function () {
if (_parent._parent.heroPointer.shelter.feetHitbox.hitTest(_parent.topHitbox)) {
_parent.steppedOn = true;
_parent._parent.mainPlatform = this;
} else {
_parent.steppedOn = false;
}
};
this._visible = false;
this.unloadMovie();
Symbol 530 MovieClip Frame 1
this.diamondNumber = Number(substring(_name, 8, 2));
if (_root.totalDiamonds >= this.diamondNumber) {
this.gotoAndStop(2);
}
this.count = 0 + (this.diamondNumber / 2);
this.steppedOn = false;
this.originY = this._y;
this.onEnterFrame = function () {
if (!this.steppedOn) {
this.count = this.count + 0.3;
this._y = this.originY + (Math.cos(this.count) * 5);
}
};
stop();
Symbol 544 MovieClip Frame 10
_parent.gotoAndStop("eat");
Instance of Symbol 231 MovieClip in Symbol 554 MovieClip [levelDiamondc] Frame 1
onClipEvent (load) {
this.originY = this._y;
this.originRotation = this._rotation;
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.3;
this._y = this.originY + (Math.cos(this.count / 2) * 10);
this._rotation = this.originRotation + (Math.cos(this.count) * 5);
}
Symbol 556 MovieClip Frame 40
stop();
Symbol 560 MovieClip Frame 1
stop();
Symbol 560 MovieClip Frame 2
stop();
Symbol 582 MovieClip Frame 1
if (_parent.heroPointer != undefined) {
this.newDepth = _parent.heroPointer.getDepth();
_parent.heroPointer.swapDepths(_parent.getNextHighestDepth());
} else {
this.newDepth = _parent.getNextHighestDepth();
}
this.boxCarryBlock = _parent.attachMovie("boxBlockCarry", "boxBlockCarry" + this.newDepth, this.newDepth, {_x:(Math.floor(this._x / 40) * 40) + 20, _y:(Math.floor(this._y / 40) * 40) + 20});
this._visible = false;
Instance of Symbol 180 MovieClip "button5" in Symbol 583 MovieClip [level17f] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button6" in Symbol 583 MovieClip [level17f] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
}
}
Instance of Symbol 180 MovieClip "button3" in Symbol 595 MovieClip [level17b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 595 MovieClip [level17b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
}
}
Instance of Symbol 209 MovieClip in Symbol 597 MovieClip [level16e] Frame 1
onClipEvent (load) {
this.specialX = 5;
this.specialY = 5;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Instance of Symbol 180 MovieClip "button3" in Symbol 598 MovieClip [level16d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 598 MovieClip [level16d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
}
}
Instance of Symbol 180 MovieClip "button6" in Symbol 598 MovieClip [level16d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
this.originalYbuttonBox5 = _parent.buttonBox5._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox4._y = 1000;
_parent.buttonBox5._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox4._y = this.originalYbuttonBox4;
_parent.buttonBox5._y = this.originalYbuttonBox5;
}
}
Instance of Symbol 180 MovieClip "button5" in Symbol 598 MovieClip [level16d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _root.mc2Shelter.mc.buttonBox3._y;
this.originalYbuttonBox4 = _root.mc2Shelter.mc.buttonBox4._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc2Shelter.mc.buttonBox3._y = 1000;
_root.mc2Shelter.mc.buttonBox4._y = 1000;
_root.mc2Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc2Shelter.mc.buttonBox3._y = this.originalYbuttonBox3;
_root.mc2Shelter.mc.buttonBox4._y = this.originalYbuttonBox4;
}
}
if (this.counter > 0) {
_root.mc2Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 180 MovieClip "button3" in Symbol 599 MovieClip [level16c] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 599 MovieClip [level16c] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
}
}
Instance of Symbol 180 MovieClip "button3" in Symbol 600 MovieClip [level16b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 600 MovieClip [level16b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _root.mc1Shelter.mc.buttonBox1._y;
this.originalYbuttonBox2 = _root.mc1Shelter.mc.buttonBox2._y;
this.originalYbuttonBox3 = _root.mc1Shelter.mc.buttonBox3._y;
this.counter = 0;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (_parent._parent != _root) {
if (this.buttonPressed) {
this.button._y = 3;
_root.mc1Shelter.mc.buttonBox1._y = 1000;
_root.mc1Shelter.mc.buttonBox2._y = 1000;
_root.mc1Shelter.mc.buttonBox3._y = 1000;
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this.counter = 1;
} else {
this.button._y = this.originalButtonY;
_root.mc1Shelter.mc.buttonBox1._y = this.originalYbuttonBox1;
_root.mc1Shelter.mc.buttonBox2._y = this.originalYbuttonBox2;
_root.mc1Shelter.mc.buttonBox3._y = this.originalYbuttonBox3;
}
}
if (this.counter > 0) {
_root.mc2Shelter.mc.side.setUpdateDrawMc(true);
this.counter++;
}
if (this.counter > 20) {
this.counter = 0;
}
}
Instance of Symbol 180 MovieClip "button3" in Symbol 606 MovieClip [level18e] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 606 MovieClip [level18e] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
}
}
Instance of Symbol 180 MovieClip "button3" in Symbol 607 MovieClip [level18d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 209 MovieClip in Symbol 608 MovieClip [level18c] Frame 1
onClipEvent (load) {
this.specialX = 2;
this.specialY = 4;
this._x = (this.specialX * 40) + 20;
this._y = (this.specialY * 40) + 20;
}
Instance of Symbol 180 MovieClip "button3" in Symbol 609 MovieClip [level18b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 609 MovieClip [level18b] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button3" in Symbol 610 MovieClip [level18a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 610 MovieClip [level18a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox5 = _parent.buttonBox5._y;
this.originalYbuttonBox6 = _parent.buttonBox6._y;
this.originalYbuttonBox7 = _parent.buttonBox7._y;
this.originalYbuttonBox8 = _parent.buttonBox8._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox5._y = 1000;
_parent.buttonBox6._y = 1000;
_parent.buttonBox7._y = 1000;
_parent.buttonBox8._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox5._y = this.originalYbuttonBox5;
_parent.buttonBox6._y = this.originalYbuttonBox6;
_parent.buttonBox7._y = this.originalYbuttonBox7;
_parent.buttonBox8._y = this.originalYbuttonBox8;
}
}
Instance of Symbol 180 MovieClip "button5" in Symbol 610 MovieClip [level18a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox9 = _parent.buttonBox9._y;
this.originalYbuttonBox10 = _parent.buttonBox10._y;
this.originalYbuttonBox11 = _parent.buttonBox11._y;
this.originalYbuttonBox12 = _parent.buttonBox12._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox9._y = 1000;
_parent.buttonBox10._y = 1000;
_parent.buttonBox11._y = 1000;
_parent.buttonBox12._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox9._y = this.originalYbuttonBox9;
_parent.buttonBox10._y = this.originalYbuttonBox10;
_parent.buttonBox11._y = this.originalYbuttonBox11;
_parent.buttonBox12._y = this.originalYbuttonBox12;
}
}
Instance of Symbol 180 MovieClip "button6" in Symbol 610 MovieClip [level18a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox13 = _parent.buttonBox13._y;
this.originalYbuttonBox14 = _parent.buttonBox14._y;
this.originalYbuttonBox15 = _parent.buttonBox15._y;
this.originalYbuttonBox16 = _parent.buttonBox16._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox13._y = 1000;
_parent.buttonBox14._y = 1000;
_parent.buttonBox15._y = 1000;
_parent.buttonBox16._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox13._y = this.originalYbuttonBox13;
_parent.buttonBox14._y = this.originalYbuttonBox14;
_parent.buttonBox15._y = this.originalYbuttonBox15;
_parent.buttonBox16._y = this.originalYbuttonBox16;
}
}
Symbol 612 MovieClip Frame 1
stop();
Symbol 613 MovieClip [boxBlockCarry] Frame 1
this.counter = 0;
if (_parent._parent != _root) {
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList.push(this);
}
}
if (this.boxSpeed == undefined) {
this.boxSpeed = 2;
}
this.onEnterFrame = function () {
this.counter++;
this.topHitbox.gotoAndStop(1);
this.topHitbox._rotation = _parent.gravityRotation;
if (_parent.gravityRotation == 0) {
this.linkAddX = 0;
this.linkAddY = 1;
}
if (_parent.gravityRotation == 90) {
this.linkAddX = -1;
this.linkAddY = 0;
}
if (_parent.gravityRotation == -90) {
this.linkAddX = 1;
this.linkAddY = 0;
}
if (Math.abs(_parent.gravityRotation) == 180) {
this.linkAddX = 0;
this.linkAddY = -1;
}
this.isLegalMove = true;
if ((((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) >= 0) && (((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) < 10)) {
this.temporaryLinkBlock = _parent.blockList[(Math.round((this._x + 20) / 40) - 1) + this.linkAddX];
} else {
this.isLegalMove = false;
}
if ((((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) >= 0) && (((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) < 10)) {
} else {
this.isLegalMove = false;
}
if (((((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) == Math.floor((_parent.heroPointer._x + 20) / 40)) || (((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) == (Math.floor((_parent.heroPointer._x + 20) / 40) - 1))) && ((((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) == Math.floor((_parent.heroPointer._y + 20) / 40)) || (((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) == (Math.floor((_parent.heroPointer._y + 20) / 40) - 1)))) {
this.isLegalMove = false;
}
this.temporaryCounter = 0;
if (_parent._parent != _root) {
if ((_parent.sidePosition == "yFront") || (_parent.sidePosition == "yBack")) {
this.isLegalMove = false;
this.topHitbox.gotoAndStop(2);
}
while ((this.temporaryLinkBlock != "empty") && (this.isLegalMove)) {
this.temporaryCounter++;
this.isLegalMove = ((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) != (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if (this.isLegalMove) {
if (_parent.gravityRotation == 0) {
if ((this.counter % this.boxSpeed) == 0) {
this._y = this._y + 40;
}
}
if (_parent.gravityRotation == 90) {
if ((this.counter % this.boxSpeed) == 0) {
this.prevBlock.linkBlock = this.linkBlock;
this.linkBlock.prevBlock = this.prevBlock;
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this.prevBlock;
}
if (this.prevBlock == "empty") {
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = "empty";
} else {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this.linkBlock;
this.linkBlock.prevBlock = "empty";
this.linkBlock.tail = this.tail;
}
}
this._x = this._x - 40;
this.prevBlock = "empty";
this.linkBlock = "empty";
this.tail = "empty";
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this;
this.tail = this;
} else {
this.prevBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1].tail;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail.linkBlock = this;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this;
}
}
}
if (_parent.gravityRotation == -90) {
if ((this.counter % this.boxSpeed) == 0) {
this.prevBlock.linkBlock = this.linkBlock;
this.linkBlock.prevBlock = this.prevBlock;
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this.prevBlock;
}
if (this.prevBlock == "empty") {
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = "empty";
} else {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this.linkBlock;
this.linkBlock.prevBlock = "empty";
this.linkBlock.tail = this.tail;
}
}
this._x = this._x + 40;
this.prevBlock = "empty";
this.linkBlock = "empty";
this.tail = "empty";
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this;
this.tail = this;
} else {
this.prevBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1].tail;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail.linkBlock = this;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this;
}
}
}
if (Math.abs(_parent.gravityRotation) == 180) {
if ((this.counter % this.boxSpeed) == 0) {
this._y = this._y - 40;
}
}
}
if ((((_parent.heroPointer.shelter.bodyHitbox.hitTest(this) || (_parent.heroPointer.shelter.feetHitbox.hitTest(this))) && (this.counter > 10)) && (Key.isDown(65))) && (_root.isHeroPlayable)) {
this.counter = 0;
if (!_root.heroCarryBlock) {
_root.heroCarryBlock = true;
_root.heroCarryBlockCounter = 0;
_root.heroCanPush = false;
this.prevBlock.linkBlock = this.linkBlock;
this.linkBlock.prevBlock = this.prevBlock;
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this.prevBlock;
}
if (this.prevBlock == "empty") {
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = "empty";
} else {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this.linkBlock;
this.linkBlock.prevBlock = "empty";
this.linkBlock.tail = this.tail;
}
}
_root.removeThisCarryBlock = this;
}
}
};
Symbol 616 MovieClip Frame 1
stop();
Symbol 619 MovieClip Frame 1
stop();
Symbol 622 MovieClip Frame 1
stop();
Symbol 629 MovieClip Frame 1
stop();
Instance of Symbol 180 MovieClip "button6" in Symbol 637 MovieClip [level17a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox7 = _parent.buttonBox7._y;
this.originalYbuttonBox8 = _parent.buttonBox8._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox7._y = 1000;
_parent.buttonBox8._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox7._y = this.originalYbuttonBox7;
_parent.buttonBox8._y = this.originalYbuttonBox8;
}
}
Instance of Symbol 180 MovieClip "button3" in Symbol 637 MovieClip [level17a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 180 MovieClip "button5" in Symbol 637 MovieClip [level17a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox5 = _parent.buttonBox5._y;
this.originalYbuttonBox6 = _parent.buttonBox6._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox5._y = 1000;
_parent.buttonBox6._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox5._y = this.originalYbuttonBox5;
_parent.buttonBox6._y = this.originalYbuttonBox6;
}
}
Instance of Symbol 180 MovieClip "button4" in Symbol 637 MovieClip [level17a] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox3 = _parent.buttonBox3._y;
this.originalYbuttonBox4 = _parent.buttonBox4._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox3._y = 1000;
_parent.buttonBox4._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox3._y = this.originalYbuttonBox3;
_parent.buttonBox4._y = this.originalYbuttonBox4;
}
}
Symbol 641 MovieClip Frame 1
if (_root.totalDiamonds >= 1) {
this.gotoAndStop(2);
}
this.count = 0;
this.steppedOn = false;
this.originY = this._y;
this.originRotation = this._rotation;
this.onEnterFrame = function () {
if (!this.steppedOn) {
this.count = this.count + 0.3;
this._y = this.originY + (Math.cos(this.count) * 5);
this.diamond._rotation = this.originRotation + (Math.cos(this.count / 3) * 10);
}
};
stop();
Instance of Symbol 641 MovieClip in Symbol 642 MovieClip [levelBombBagc] Frame 1
onClipEvent (load) {
blurFilter = new flash.filters.BlurFilter(2, 2, 1);
var matrix = new Array();
waitCount = 0;
brightnessCount = 1;
alphaCount = 1;
brightnessFilter = new flash.filters.ColorMatrixFilter(matrix);
this.transitionDone = true;
if (_root.levelVar == "Diamond") {
brightnessCount = 3;
alphaCount = 0;
this.needToStepOff = false;
this.transitionDone = false;
} else {
this.needToStepOff = true;
}
}
onClipEvent (enterFrame) {
if (((!this.transitionDone) && (_root.isHeroPlayable)) && (_parent._parent != _root)) {
_root.isHeroPlayable = false;
}
if ((((!this.needToStepOff) && (!this.transitionDone)) && (!_root.isHeroPlayable)) && (_parent._parent != _root)) {
_parent.heroPointer.shelter.gotoAndStop("idle");
waitCount = waitCount + 0.1;
if ((waitCount > 0.5) && (alphaCount < 1)) {
alphaCount = alphaCount + 0.1;
}
if (alphaCount >= 0.5) {
brightnessCount = brightnessCount - 0.1;
}
var matrix = new Array();
matrix = matrix.concat([brightnessCount, 0, 0, 0, 0]);
matrix = matrix.concat([0, brightnessCount, 0, 0, 0]);
matrix = matrix.concat([0, 0, brightnessCount, 0, 0]);
matrix = matrix.concat([0, 0, 0, alphaCount, 0]);
brightnessFilter.matrix = matrix;
this.filters = [brightnessFilter];
_parent.heroPointer.filters = [brightnessFilter];
if (brightnessCount <= 1) {
waitCount = 0;
brightnessCount = 1;
alphaCount = 1;
this.filters = undefined;
_parent.heroPointer.filters = undefined;
this.transitionDone = true;
_root.isHeroPlayable = true;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox) && (!this.showLabel)) && (this.needToStepOff)) {
this.showLabel = true;
this.diamondLabelShelter = _parent.attachMovie("diamondLabelShelter2", "diamondLabelShelter2" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:this._x, _y:this._y - 120});
this.diamondLabelShelter.filters = [blurFilter];
}
if (!_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox)) {
this.needToStepOff = true;
}
if ((!_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox)) && (this.showLabel)) {
this.diamondLabelShelter.gotoAndPlay(10);
this.showLabel = false;
}
if (((Key.isDown(65) && (_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox))) && (_root.isHeroPlayable)) && (this.needToStepOff)) {
startTeleport = true;
_root.isHeroPlayable = false;
this.diamondLabelShelter.gotoAndPlay(10);
_root.levelJustVisited = "BombBag";
}
if (startTeleport) {
waitCount = waitCount + 0.1;
if (waitCount > 1) {
brightnessCount = brightnessCount + 0.1;
}
if (brightnessCount > 2) {
alphaCount = alphaCount - 0.05;
}
var matrix = new Array();
matrix = matrix.concat([brightnessCount, 0, 0, 0, 0]);
matrix = matrix.concat([0, brightnessCount, 0, 0, 0]);
matrix = matrix.concat([0, 0, brightnessCount, 0, 0]);
matrix = matrix.concat([0, 0, 0, alphaCount, 0]);
brightnessFilter.matrix = matrix;
this.filters = [brightnessFilter];
_parent.heroPointer.filters = [brightnessFilter];
if (alphaCount < 0) {
_root.levelVar = "Select";
_root.restart();
}
}
}
Symbol 674 MovieClip Frame 15
_root.explosionSound.start();
Symbol 674 MovieClip Frame 30
_parent._parent.removeMovieClip();
Symbol 675 MovieClip Frame 1
stop();
Symbol 676 MovieClip [boxBomb] Frame 1
this.counter = 0;
if (this.boxSpeed == undefined) {
this.boxSpeed = 1;
}
this.depth = 1;
this.hasHitSpring = false;
this.onEnterFrame = function () {
if (((this.counter % 2) == 0) && (this.bombShelter._currentframe == 1)) {
this.smoke = this.attachMovie("bombSmoke", "bombSmoke" + (depth++), depth++, {_x:random(10) + 2, _y:-10, smokeSpeed:random(2) + 1});
this.bombShelter.swapDepths(depth * 2);
}
this.counter++;
this._rotation = _parent.gravityRotation;
if (_parent.gravityRotation == 0) {
this.linkAddX = 0;
this.linkAddY = 1;
}
if (_parent.gravityRotation == 90) {
this.linkAddX = -1;
this.linkAddY = 0;
}
if (_parent.gravityRotation == -90) {
this.linkAddX = 1;
this.linkAddY = 0;
}
if (Math.abs(_parent.gravityRotation) == 180) {
this.linkAddX = 0;
this.linkAddY = -1;
}
this.isLegalMove = true;
if ((((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) >= 0) && (((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) < 10)) {
this.temporaryLinkBlock = _parent.blockList[(Math.round((this._x + 20) / 40) - 1) + this.linkAddX];
} else {
this.isLegalMove = false;
}
if ((((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) >= 0) && (((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) < 10)) {
} else {
this.isLegalMove = false;
}
this.temporaryCounter = 0;
if (_parent._parent != _root) {
if ((_parent.sidePosition == "yFront") || (_parent.sidePosition == "yBack")) {
this.isLegalMove = false;
}
while ((this.temporaryLinkBlock != "empty") && (this.isLegalMove)) {
this.temporaryCounter++;
this.isLegalMove = ((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) != (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
if ((this.temporaryLinkBlock.linkBlock == "empty") && (!this.isLegalMove)) {
if (this.temporaryLinkBlock.typeOf == "spring") {
this.hasHitSpring = true;
this.isLegalMove = true;
this.springAnimation = true;
if (!this.temporaryLinkBlock.springShelter.animationOn) {
_root.springSound.start();
this.temporaryLinkBlock.springShelter.gotoAndPlay(2);
}
}
}
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if (this.isLegalMove) {
if (this.hasHitSpring) {
if (_parent.gravityRotation == 0) {
if ((this.counter % this.boxSpeed) == 0) {
if ((this.boxSpeed % 2) != 0) {
this.boxSpeed = this.boxSpeed + 1;
}
this._y = this._y - 40;
}
}
}
if (!this.hasHitSpring) {
if (_parent.gravityRotation == 0) {
if ((this.counter % this.boxSpeed) == 0) {
this._y = this._y + 40;
}
}
if (_parent.gravityRotation == 90) {
if ((this.counter % this.boxSpeed) == 0) {
this._x = this._x - 40;
}
}
if (_parent.gravityRotation == -90) {
if ((this.counter % this.boxSpeed) == 0) {
this._x = this._x + 40;
}
}
if (Math.abs(_parent.gravityRotation) == 180) {
if ((this.counter % this.boxSpeed) == 0) {
this._y = this._y - 40;
}
}
}
}
};
Symbol 686 MovieClip Frame 1
this.done = false;
stop();
Symbol 686 MovieClip Frame 56
this.done = true;
stop();
Instance of Symbol 686 MovieClip in Symbol 687 MovieClip [levelBombBaga] Frame 1
onClipEvent (load) {
this.count = 0;
this._alpha = 0;
this.originY = this._y;
}
onClipEvent (enterFrame) {
if (_parent._parent != _root) {
if (this.count >= 0) {
this.count++;
}
if (this.count == 1) {
this._x = _parent.heroPointer._x;
_parent.heroPointer.shelter.gotoAndStop(1);
_root.isHeroPlayable = false;
}
if ((this.count > 10) && (this._alpha < 100)) {
this._y = this._y - 4;
this._alpha = this._alpha + 5;
}
if (this.count == 20) {
this.gotoAndPlay(2);
}
if (this.done) {
if (this._y > (this.originY + 40)) {
if (this.count != -1) {
_root.isHeroPlayable = true;
this.count = -1;
this._visible = false;
}
} else {
this._y = this._y + 4;
}
}
}
}
Instance of Symbol 41 MovieClip in Symbol 690 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Instance of Symbol 652 MovieClip in Symbol 690 MovieClip Frame 1
onClipEvent (load) {
this.count = 0;
this.originY = this._y;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.3;
this._y = this.originY + (Math.cos(this.count) * 2);
if (_parent._parent.heroPointer.shelter.normalHitbox.hitTest(_parent.hitbox)) {
_root.canThrowBombs = true;
_root.user.data.canThrowBombs = _root.canThrowBombs;
_root.user.flush();
_root.levelJustVisited = _root.levelVar;
_root.levelVar = "BombBag";
_root.restart();
}
}
Instance of Symbol 641 MovieClip in Symbol 691 MovieClip [levelDiamonda] Frame 1
onClipEvent (load) {
blurFilter = new flash.filters.BlurFilter(2, 2, 1);
var matrix = new Array();
waitCount = 0;
brightnessCount = 1;
alphaCount = 1;
brightnessFilter = new flash.filters.ColorMatrixFilter(matrix);
this.transitionDone = true;
if (_root.levelVar == "Diamond") {
brightnessCount = 3;
alphaCount = 0;
this.needToStepOff = false;
this.transitionDone = false;
} else {
this.needToStepOff = true;
}
}
onClipEvent (enterFrame) {
if (((!this.transitionDone) && (_root.isHeroPlayable)) && (_parent._parent != _root)) {
_root.isHeroPlayable = false;
}
if ((((!this.needToStepOff) && (!this.transitionDone)) && (!_root.isHeroPlayable)) && (_parent._parent != _root)) {
_parent.heroPointer.shelter.gotoAndStop("idle");
waitCount = waitCount + 0.1;
if ((waitCount > 0.5) && (alphaCount < 1)) {
alphaCount = alphaCount + 0.1;
}
if (alphaCount >= 0.5) {
brightnessCount = brightnessCount - 0.1;
}
var matrix = new Array();
matrix = matrix.concat([brightnessCount, 0, 0, 0, 0]);
matrix = matrix.concat([0, brightnessCount, 0, 0, 0]);
matrix = matrix.concat([0, 0, brightnessCount, 0, 0]);
matrix = matrix.concat([0, 0, 0, alphaCount, 0]);
brightnessFilter.matrix = matrix;
this.filters = [brightnessFilter];
_parent.heroPointer.filters = [brightnessFilter];
if (brightnessCount <= 1) {
waitCount = 0;
brightnessCount = 1;
alphaCount = 1;
this.filters = undefined;
_parent.heroPointer.filters = undefined;
this.transitionDone = true;
_root.isHeroPlayable = true;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox) && (!this.showLabel)) && (this.needToStepOff)) {
this.showLabel = true;
this.diamondLabelShelter = _parent.attachMovie("diamondLabelShelter2", "diamondLabelShelter2" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:this._x, _y:this._y - 120});
this.diamondLabelShelter.filters = [blurFilter];
}
if (!_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox)) {
this.needToStepOff = true;
}
if ((!_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox)) && (this.showLabel)) {
this.diamondLabelShelter.gotoAndPlay(10);
this.showLabel = false;
}
if (((Key.isDown(65) && (_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox))) && (_root.isHeroPlayable)) && (this.needToStepOff)) {
startTeleport = true;
_root.isHeroPlayable = false;
this.diamondLabelShelter.gotoAndPlay(10);
_root.levelJustVisited = "Diamond";
_root.levelVar = "Select";
}
if (startTeleport) {
waitCount = waitCount + 0.1;
if (waitCount > 1) {
brightnessCount = brightnessCount + 0.1;
}
if (brightnessCount > 2) {
alphaCount = alphaCount - 0.05;
}
var matrix = new Array();
matrix = matrix.concat([brightnessCount, 0, 0, 0, 0]);
matrix = matrix.concat([0, brightnessCount, 0, 0, 0]);
matrix = matrix.concat([0, 0, brightnessCount, 0, 0]);
matrix = matrix.concat([0, 0, 0, alphaCount, 0]);
brightnessFilter.matrix = matrix;
this.filters = [brightnessFilter];
_parent.heroPointer.filters = [brightnessFilter];
if (alphaCount < 0) {
_root.restart();
}
}
}
Symbol 715 MovieClip Frame 1
stop();
Symbol 718 MovieClip Frame 1
stop();
Instance of Symbol 133 MovieClip in Symbol 718 MovieClip Frame 2
onClipEvent (load) {
counter = 0;
}
onClipEvent (enterFrame) {
counter = counter + 0.3;
this._rotation = this._rotation + (Math.cos(counter) * 3);
}
Symbol 721 MovieClip Frame 1
stop();
Symbol 730 MovieClip Frame 1
_visible = false;
Instance of Symbol 729 MovieClip in Symbol 730 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.extraAddRotation == undefined) {
_parent.extraAddRotation = 90;
}
if (_parent._rotation == 0) {
boxDirection = "upSide";
}
if (_parent._rotation == 90) {
boxDirection = "rightSide";
}
if (_parent._rotation == -90) {
boxDirection = "leftSide";
}
if (_parent._rotation == 180) {
boxDirection = "downSide";
}
if (_parent.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitbox.hitTest(_parent.hitbox) && (_root.wormArray[wormArrayI]._parent == _parent._parent)) {
_root.wormArray[wormArrayI]._rotation = _parent._rotation + _parent.extraAddRotation;
if (_parent.extraSpringAddRotation != undefined) {
if (_root.wormArray[wormArrayI].positionNumber == 3) {
_root.wormArray[wormArrayI]._rotation = _parent.extraSpringAddRotation;
}
}
_root.wormArray[wormArrayI].sideDirection = boxDirection;
}
wormArrayI++;
}
}
}
Symbol 731 MovieClip Frame 1
_visible = false;
Instance of Symbol 729 MovieClip in Symbol 731 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._rotation == 0) {
boxDirection = "upSide";
}
if (_parent._rotation == 90) {
boxDirection = "rightSide";
}
if (_parent._rotation == -90) {
boxDirection = "leftSide";
}
if (_parent._rotation == 180) {
boxDirection = "downSide";
}
if (_parent.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if ((_root.wormArray[wormArrayI].hitbox.hitTest(_parent.hitbox) && (_root.wormArray[wormArrayI]._parent == _parent._parent)) && (_root.wormArray[wormArrayI].positionNumber == 1)) {
if (this.wormPush == undefined) {
_root.engine.moveCube(1, "X");
_root.wormSpeed = 0;
_root.isHeroPlayable = false;
this.wormPush = 1;
_root.wormArray[wormArrayI].worm_mc.animation.gotoAndStop("rage");
}
if (_root.isHeroPlayable) {
_root.wormSpeed = 5;
}
}
wormArrayI++;
}
}
}
Symbol 734 MovieClip Frame 1
stop();
Symbol 734 MovieClip Frame 2
_parent.checkForHit = undefined;
Instance of Symbol 730 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 731 MovieClip "pushBox" in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this.isPushed = true;
}
wormArrayI++;
}
}
}
Instance of Symbol 730 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 730 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 730 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 734 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 730 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if ((_root.wormHealth == 3) && (_parent.pushBox.isPushed)) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 734 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if ((_root.wormHealth == 3) && (_parent.pushBox.isPushed)) {
this.gotoAndStop("Appear");
} else {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 735 MovieClip [levelBoss1f] Frame 1
onClipEvent (enterFrame) {
if ((_root.wormHealth == 3) && (_parent.pushBox.isPushed)) {
this.gotoAndStop("Appear");
} else {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 100 MovieClip [mudBlock9] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if ((_root.wormHealth == 4) || (_root.wormHealth == 2)) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if ((_root.wormHealth == 4) || (_root.wormHealth == 2)) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 483 MovieClip [mudBlock7] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 731 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
this.isWorking = true;
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 94 MovieClip [mudBlock6] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth <= 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.extraSpringAddRotation = 0;
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 98 MovieClip [mudBlock1] in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 731 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 736 MovieClip [levelBoss1e] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.extraSpringAddRotation = 0;
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 96 MovieClip [mudBlock2] in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this.counter = 0;
}
onClipEvent (enterFrame) {
if ((_root.wormHealth == 5) && (this.counter < 50)) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
if (!this._visible) {
this.counter++;
}
if (this.counter > 50) {
this.isWorking = false;
this._visible = true;
this.counter = 0;
}
}
Instance of Symbol 96 MovieClip [mudBlock2] in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this.counter = 0;
}
onClipEvent (enterFrame) {
if ((_root.wormHealth == 5) && (this.counter < 50)) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
this._visible = false;
}
wormArrayI++;
}
} else {
this._visible = true;
}
if (!this._visible) {
this.counter++;
}
if (this.counter > 50) {
this.isWorking = false;
this._visible = true;
this.counter = 0;
}
}
Instance of Symbol 730 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (enterFrame) {
this.isWorking = true;
}
Instance of Symbol 730 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 48 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_parent.heroPointer.hitbox.hitTest(this)) {
_root.wormSpeed = 5;
_root.isHeroPlayable = false;
_root.doubleHeroArray[0].shelter.gotoAndPlay("idle");
_root.initiateBoss = true;
this.unloadMovie();
}
}
Instance of Symbol 48 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 5) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitbox.hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
if (_root.wormArray[wormArrayI].positionNumber == 1) {
_root.isHeroPlayable = true;
_root.wormSpeed = 5;
}
}
wormArrayI++;
}
}
}
Instance of Symbol 48 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitbox.hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
if (_root.wormArray[wormArrayI].positionNumber == 1) {
_root.bossBigHitbox = false;
}
}
wormArrayI++;
}
}
}
Instance of Symbol 48 MovieClip in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitbox.hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
if (_root.wormArray[wormArrayI].positionNumber == 1) {
_root.bossBigHitbox = true;
}
}
wormArrayI++;
}
}
}
Instance of Symbol 256 MovieClip "amuletPart" in Symbol 737 MovieClip [levelBoss1d] Frame 1
onClipEvent (load) {
this.parts.gotoAndStop(2);
this.counter = 0;
}
onClipEvent (enterFrame) {
if (this.goAway) {
this.counter++;
}
if (this.counter > 5) {
this._y = 1000;
}
if (this.counter > 15) {
wormHead.animation.gotoAndStop("eat");
this.counter = 0;
this.goAway = false;
}
}
Symbol 759 MovieClip Frame 1
stop();
Instance of Symbol 256 MovieClip in Symbol 772 MovieClip Frame 1
onClipEvent (load) {
this.parts.gotoAndStop(2);
}
Symbol 772 MovieClip Frame 35
stop();
Instance of Symbol 256 MovieClip in Symbol 772 MovieClip Frame 35
onClipEvent (load) {
this.parts.gotoAndStop(2);
}
onClipEvent (enterFrame) {
if (_parent._parent._parent._parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox)) {
_root[("level" + _root.levelVar) + "ChestGotten"] = true;
if (_root.gearGottenTemporary) {
_root[("level" + _root.levelVar) + "GearGotten"] = true;
}
_root.levelJustVisited = _root.levelVar;
_root.levelVar = "Select";
_root.restart();
_parent.unloadMovie();
}
}
Symbol 787 MovieClip Frame 35
gotoAndPlay (21);
Symbol 788 MovieClip Frame 1
stop();
Symbol 789 MovieClip Frame 1
stop();
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 4) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 789 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (load) {
_root.depth++;
worm = _parent.attachMovie("wormShelter", "worm" + _root.depth, _root.depth, {_x:this._x, _y:this._y});
worm.positionNumber = 1;
worm._visible = false;
this.unloadMovie();
}
Instance of Symbol 789 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (load) {
_root.depth++;
worm = _parent.attachMovie("wormShelter", "worm" + _root.depth, _root.depth, {_x:this._x, _y:this._y});
worm.positionNumber = 2;
worm._visible = false;
this.unloadMovie();
}
Instance of Symbol 789 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (load) {
_root.depth++;
worm = _parent.attachMovie("wormShelter", "worm" + _root.depth, _root.depth, {_x:this._x, _y:this._y});
worm.positionNumber = 3;
worm._visible = false;
this.unloadMovie();
}
Instance of Symbol 789 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (load) {
_root.depth++;
worm = _parent.attachMovie("wormShelter", "worm" + _root.depth, _root.depth, {_x:this._x, _y:this._y});
worm.positionNumber = 4;
worm._visible = false;
this.unloadMovie();
}
Instance of Symbol 789 MovieClip in Symbol 790 MovieClip [levelBoss1c] Frame 1
onClipEvent (load) {
_root.depth++;
worm = _parent.attachMovie("wormShelter", "worm" + _root.depth, _root.depth, {_x:this._x, _y:this._y});
worm.positionNumber = 5;
worm._visible = false;
this.unloadMovie();
}
Instance of Symbol 48 MovieClip in Symbol 791 MovieClip [levelBoss1b] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 5) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitbox.hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
if (_root.wormArray[wormArrayI].positionNumber == 1) {
_root.bossBigHitbox = false;
}
}
wormArrayI++;
}
}
}
Instance of Symbol 48 MovieClip in Symbol 791 MovieClip [levelBoss1b] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 5) {
this.isWorking = true;
} else {
this.isWorking = false;
}
if (this.isWorking) {
wormArrayI = 0;
while (wormArrayI < _root.wormArray.length) {
if (_root.wormArray[wormArrayI].hitbox.hitTest(this) && (_root.wormArray[wormArrayI]._parent == _parent)) {
if (_root.wormArray[wormArrayI].positionNumber == 1) {
_root.bossBigHitbox = true;
}
}
wormArrayI++;
}
}
}
Instance of Symbol 730 MovieClip in Symbol 791 MovieClip [levelBoss1b] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 3) {
this.isWorking = true;
}
}
Instance of Symbol 734 MovieClip in Symbol 791 MovieClip [levelBoss1b] Frame 1
onClipEvent (load) {
this.gotoAndStop("Appear");
}
onClipEvent (enterFrame) {
if (_root.initiateBoss) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 791 MovieClip [levelBoss1b] Frame 1
onClipEvent (load) {
this.gotoAndStop("Appear");
}
onClipEvent (enterFrame) {
if (_root.initiateBoss) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 730 MovieClip in Symbol 791 MovieClip [levelBoss1b] Frame 1
onClipEvent (enterFrame) {
this.isWorking = true;
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Disappear");
}
}
Instance of Symbol 730 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 734 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (load) {
this.gotoAndStop("Disappear");
}
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.gotoAndStop("Appear");
}
}
Instance of Symbol 730 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Instance of Symbol 730 MovieClip in Symbol 792 MovieClip [levelBoss1a] Frame 1
onClipEvent (enterFrame) {
if (_root.wormHealth == 2) {
this.isWorking = true;
} else {
this.isWorking = false;
}
}
Symbol 816 MovieClip [smoke2] Frame 19
this.removeMovieClip();
Symbol 841 MovieClip Frame 1
stop();
Symbol 843 MovieClip Frame 1
this.crownVar = _parent.crownVar;
Symbol 844 MovieClip [crownRotateShelter] Frame 1
idle = false;
Symbol 844 MovieClip [crownRotateShelter] Frame 15
idle = true;
stop();
Instance of Symbol 841 MovieClip "crown" in Symbol 844 MovieClip [crownRotateShelter] Frame 15
onClipEvent (load) {
this.count = 0;
this.originY = this._y;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this.originY + (Math.cos(this.count) * 3);
if (_parent._parent != _root.mc5Shelter.mc) {
_parent._rotation = _parent._parent.gravityRotation;
}
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent.hitbox)) {
_parent.unloadMovie();
}
}
Symbol 844 MovieClip [crownRotateShelter] Frame 16
idle = false;
Symbol 844 MovieClip [crownRotateShelter] Frame 29
this.removeMovieClip();
Symbol 853 MovieClip Frame 1
if (_root[("level" + _parent._parent.levelNumber) + "ChestGotten"]) {
this.nextFrame();
}
if (_parent._parent.levelText == "Tutorial") {
if ((_root.level0ChestGotten && (this._name != "chest2")) && (this._name != "chest3")) {
this.nextFrame();
}
}
stop();
Symbol 853 MovieClip Frame 2
if (_parent._parent.levelText == "Tutorial") {
this.chest.gotoAndStop(1);
}
Symbol 854 MovieClip Frame 1
if (_root[("level" + _parent._parent.levelNumber) + "DiamondGotten"]) {
this.nextFrame();
}
stop();
Symbol 858 MovieClip Frame 1
if (_root[("level" + _parent._parent.levelNumber) + "GearGotten"]) {
this.nextFrame();
}
stop();
Symbol 860 MovieClip Frame 1
if (_root[("levelBoss" + (substring(_parent._parent.levelNumber, 5, 1))) + "ChestGotten"]) {
this.nextFrame();
}
stop();
Symbol 865 MovieClip [level locked label] Frame 1
if (_root[("level" + _parent.levelNumber) + "HasGear"]) {
this.nextFrame();
}
if (((_parent.levelNumber == "boss1") || (_parent.levelNumber == "boss2")) || (_parent.levelNumber == "boss3")) {
this.gotoAndStop(3);
}
if (_parent.levelText == "Tutorial") {
this.gotoAndStop(6);
}
levelText = _parent.levelText;
stop();
if (_root[("level" + _parent.levelNumber) + "KeyGotten"]) {
this.gotoAndStop(4);
}
Symbol 865 MovieClip [level locked label] Frame 2
if (_root[("level" + _parent.levelNumber) + "KeyGotten"]) {
this.gotoAndStop(5);
}
Symbol 865 MovieClip [level locked label] Frame 6
if (_root.levelTutorial1KeyGotten) {
this.gotoAndStop(7);
}
if (_root.levelTutorial1ChestGotten) {
this.chest2.nextFrame();
}
if (_root.levelTutorial2ChestGotten) {
this.chest3.nextFrame();
}
Symbol 865 MovieClip [level locked label] Frame 7
if (_root.levelTutorial1ChestGotten) {
this.chest2.nextFrame();
}
if (_root.levelTutorial2ChestGotten) {
this.chest3.nextFrame();
}
Symbol 866 MovieClip [cubeRotateShelter] Frame 1
idle = false;
Symbol 866 MovieClip [cubeRotateShelter] Frame 15
idle = true;
stop();
Instance of Symbol 851 MovieClip [cubeRotate] in Symbol 866 MovieClip [cubeRotateShelter] Frame 15
onClipEvent (load) {
this.count = 0;
this.originY = this._y + 10;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.4;
this._y = this.originY - (Math.cos(this.count) * 6);
if (_parent._parent != _root.mc5Shelter.mc) {
_parent._rotation = _parent._parent.gravityRotation;
}
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent.hitbox)) {
_parent.unloadMovie();
}
}
Symbol 866 MovieClip [cubeRotateShelter] Frame 16
idle = false;
Symbol 866 MovieClip [cubeRotateShelter] Frame 29
this.removeMovieClip();
Symbol 869 MovieClip Frame 1
levelText = _parent.levelText;
Symbol 870 MovieClip [levelLockedShelter] Frame 1
idle = false;
Symbol 870 MovieClip [levelLockedShelter] Frame 10
idle = true;
stop();
Symbol 870 MovieClip [levelLockedShelter] Frame 11
idle = false;
Symbol 870 MovieClip [levelLockedShelter] Frame 20
this.removeMovieClip();
Symbol 875 MovieClip [wormShelter] Frame 1
this.addToVectorSide = 2;
this.xInvert = 0;
this.yInvert = 0;
this.xInvert2 = 1;
this.yInvert2 = 1;
this.eat2Counter = 0;
this.isEating = false;
if (positionNumber != 1) {
this.blockEngine = this.attachMovie("blockEngine", "blockEngine10", 10, {_x:0, _y:0});
}
_root.wormArray.push(this);
this.wormLink = _parent.currentWorm;
_parent.currentWorm = this;
this.swapDepthWithNext = function () {
this.wormLink.swapDepths(this);
this.wormLink.swapDepthWithNext();
};
this.swapDepthWithNext();
if (positionNumber == 1) {
this.worm_mc.gotoAndStop("head");
this.worm_mc.animation.animation.gotoAndPlay(this.wormReference.worm_mc.animation.animation._currentFrame);
}
if (positionNumber == 2) {
wormDistance = _root.wormDistance + 10;
} else {
wormDistance = _root.wormDistance;
}
if (sideDirection == "downSide") {
_y = (400 - (((_y + (this._height / 2)) + 50) % _parent.startHeight));
if (dir == "down") {
this._rotation = this.wormReference._rotation + 180;
this._x = _parent.startWidth - this.wormReference._x;
}
if (dir == "up") {
this._x = this.wormReference._x;
}
if (dir == "right") {
this._rotation = this.wormReference._rotation - 90;
this._x = this.wormReference._y;
}
if (dir == "left") {
this._rotation = this.wormReference._rotation + 90;
this._x = _parent.startHeight - this.wormReference._y;
}
}
if (sideDirection == "upSide") {
_y = (((_y + (this._height / 2)) + 50) % _parent.startHeight);
if (dir == "down") {
this._x = this.wormReference._x;
}
if (dir == "up") {
this._rotation = this.wormReference._rotation + 180;
this._x = _parent.startWidth - this.wormReference._x;
}
if (dir == "right") {
this._rotation = this.wormReference._rotation + 90;
this._x = _parent.startHeight - this.wormReference._y;
}
if (dir == "left") {
this._rotation = this.wormReference._rotation - 90;
this._x = this.wormReference._y;
}
}
if (sideDirection == "leftSide") {
_x = (((_x + (this._height / 2)) + 50) % _parent.startHeight);
this._y = this.wormReference._y;
if (dir == "down") {
this._rotation = this.wormReference._rotation - 90;
this._y = _parent.startHeight - this.wormReference._x;
}
if (dir == "up") {
this._rotation = this.wormReference._rotation + 90;
this._y = this.wormReference._x;
}
}
if (sideDirection == "rightSide") {
_x = (400 - (((_x + (this._height / 2)) + 50) % _parent.startHeight));
this._y = this.wormReference._y;
if (dir == "down") {
this._rotation = this.wormReference._rotation + 90;
this._y = this.wormReference._x;
}
if (dir == "up") {
this._rotation = this.wormReference._rotation - 90;
this._y = _parent.startHeight - this.wormReference._x;
}
}
if (wormReference == undefined) {
counter = positionNumber;
} else {
counter = wormReference.counter;
}
this.onEnterFrame = function () {
if (positionNumber != 1) {
counter = counter + 0.4;
this.worm_mc._y = this.worm_mc._y + (Math.sin(counter) * 1.5);
}
if (startVar == undefined) {
if (this._parent.side.getRotation() == 270) {
this.addToVectorSide = 3;
this.addToVectorSide2 = 3;
}
if (this._parent.side.getRotation() == 180) {
this.addToVectorSide = 2;
this.addToVectorSide2 = 2;
}
if (this._parent.side.getRotation() == 90) {
this.addToVectorSide = 1;
this.addToVectorSide2 = 1;
}
if (this._parent.side.getRotation() == 0) {
this.addToVectorSide = 2;
this.addToVectorSide2 = 0;
}
if (this._parent.side.getXScale() < 0) {
this.xInvert = 2;
this.xInvert2 = -1;
}
if (this._parent.side.getYScale() < 0) {
this.yInvert = 2;
this.yInvert2 = -1;
}
startVar = 1;
}
if (sideDirection == undefined) {
sideDirection = "leftSide";
}
if (sideDirection == "downSide") {
if ((((wormLink + "empty") == "empty") || (wormLink.sideDirection != sideDirection)) || (wormLink == undefined)) {
this._y = this._y - _root.wormSpeed;
} else if (!_root.wormLooseHealth) {
if (this._y > wormLink._y) {
this._y = wormLink._y + wormDistance;
}
} else if (this._y > wormLink._y) {
this._y = this._y - 10;
}
}
if (sideDirection == "upSide") {
if ((((wormLink + "empty") == "empty") || (wormLink.sideDirection != sideDirection)) || (wormLink == undefined)) {
this._y = this._y + _root.wormSpeed;
} else if (!_root.wormLooseHealth) {
if (this._y < wormLink._y) {
this._y = wormLink._y - wormDistance;
}
} else if (this._y < wormLink._y) {
this._y = this._y + 10;
}
}
if (sideDirection == "rightSide") {
if ((((wormLink + "empty") == "empty") || (wormLink.sideDirection != sideDirection)) || (wormLink == undefined)) {
this._x = this._x - _root.wormSpeed;
} else if (!_root.wormLooseHealth) {
if (this._x > wormLink._x) {
this._x = wormLink._x + wormDistance;
}
} else if (this._x > wormLink._x) {
this._x = this._x - 10;
}
}
if (sideDirection == "leftSide") {
if ((((wormLink + "empty") == "empty") || (wormLink.sideDirection != sideDirection)) || (wormLink == undefined)) {
this._x = this._x + _root.wormSpeed;
} else if (!_root.wormLooseHealth) {
if (this._x < wormLink._x) {
this._x = wormLink._x - wormDistance;
}
} else if (this._x < wormLink._x) {
this._x = this._x + 10;
}
}
if (this.wormReference != undefined) {
this.wormReferenceString = this.wormReference + "empty";
} else {
this.wormReferenceString = "empty";
}
if (this.worm != undefined) {
this.wormString = this.worm + "empty";
} else {
this.wormString = "empty";
}
if (this.wormReferenceString == "empty") {
if ((this._x + this._width) > this._parent.startWidth) {
this.vector1x = this._parent.side.getVectorCollection()[((0 + this.xInvert) + this.addToVectorSide) % 4];
this.vector2x = this._parent.side.getVectorCollection()[((1 + this.xInvert) + this.addToVectorSide) % 4];
this.wormDir = "right";
}
if ((this._x - (this._width / 2)) < 0) {
this.vector1x = this._parent.side.getVectorCollection()[((2 + this.xInvert) + this.addToVectorSide) % 4];
this.vector2x = this._parent.side.getVectorCollection()[((3 + this.xInvert) + this.addToVectorSide) % 4];
this.wormDir = "left";
}
if ((this._y - (this._height / 2)) < 0) {
this.vector1y = this._parent.side.getVectorCollection()[((1 + this.yInvert) + this.addToVectorSide) % 4];
this.vector2y = this._parent.side.getVectorCollection()[((2 + this.yInvert) + this.addToVectorSide) % 4];
this.wormDir = "up";
}
if ((this._y + (this._height / 2)) > this._parent.startHeight) {
this.vector1y = this._parent.side.getVectorCollection()[((0 + this.yInvert) + this.addToVectorSide) % 4];
this.vector2y = this._parent.side.getVectorCollection()[((3 + this.yInvert) + this.addToVectorSide) % 4];
this.wormDir = "down";
}
if (((this._x + (this._width / 2)) > this._parent.startWidth) || ((this._x - (this._width / 2)) < 0)) {
this.vector1 = this.vector1x;
this.vector2 = this.vector2x;
}
if (((this._y - (this._height / 2)) < 0) || ((this._y + (this._height / 2)) > this._parent.startHeight)) {
this.vector1 = this.vector1y;
this.vector2 = this.vector2y;
}
if ((((this._x + (this._width / 2)) > this._parent.startWidth) || ((this._x - (this._width / 2)) < 0)) && (((this._y - (this._height / 2)) < 0) || ((this._y + (this._height / 2)) > this._parent.startHeight))) {
if ((_parent.gravityRotation == 90) || (_parent.gravityRotation == -90)) {
this.vector1 = this.vector1x;
this.vector2 = this.vector2x;
}
}
if ((((this._x + (this._width / 2)) > this._parent.startWidth) || ((this._x - (this._width / 2)) < 0)) || (((this._y - (this._height / 2)) < 0) || ((this._y + (this._height / 2)) > this._parent.startHeight))) {
if (this.wormString == "empty") {
this.worm.removeMovieClip();
this.otherSide = three_d.Side.removeSideFromSideCollection(this._parent.figure.getSidesWithVectors([this.vector1, this.vector2]), this._parent.side);
this.otherSideMc = this.otherSide[0].getMovieClip();
_root.depth++;
this.worm = this.otherSideMc.mc.attachMovie("wormShelter", "worm" + _root.depth, _root.depth, {_x:-100, _y:-100});
this.worm._rotation = this._rotation;
this.worm.wormReference = this;
this.worm._xscale = this._xscale;
this.worm.dir = this.wormDir;
this.worm.positionNumber = positionNumber;
this.worm.sideDirection = this.otherSideMc.mc.getSideDirection(this.vector1, this.vector2);
this.worm.formerExtraDistant = this.heroFormerExtraDistant;
}
}
}
if (_parent.amuletPart.hitbox.hitTest(this) && (positionNumber == 1)) {
this.worm_mc.animation.gotoAndStop("eat2");
_parent.amuletPart.goAway = true;
_parent.amuletPart.wormHead = this.worm_mc;
}
if (_root.bossBigHitbox) {
if ((_parent.heroPointer.hitbox.hitTest(this) && (positionNumber == 1)) && (_root.wormHealth != 1)) {
this.isEating = true;
}
} else if ((_parent.heroPointer.hitbox.hitTest(this.hitbox) && (positionNumber == 1)) && (_root.wormHealth != 1)) {
this.isEating = true;
}
if (this.isEating) {
if (this.eat2Counter == 0) {
_root.wormSpeed = _root.wormSpeed / 1.5;
_root.isHeroPlayable = false;
}
this.worm_mc.animation.gotoAndStop("eat2");
this.eat2Counter++;
if (this.eat2Counter > 5) {
_root.wormSpeed = 0;
_parent.heroPointer._visible = false;
_parent.heroPointer.hero._visible = false;
}
if (this.eat2Counter > 60) {
_root.restart();
this.eat2Counter = 0;
}
}
if (((positionNumber == _root.wormHealth) && (positionNumber != 1)) && (_root.wormSpeed == 5)) {
typeOf = "spring";
this.worm_mc.gotoAndStop("tail");
}
if (this.springShelter.animationOn && (positionNumber == _root.wormHealth)) {
if (!_root.wormLooseHealth) {
_root.wormLooseHealth = true;
_root.wormLoosePart = this;
}
}
if ((this._x + (this._width / 2)) < 0) {
this.removeMovieClip();
}
if ((this._x - (this._width / 2)) > this._parent.startWidth) {
this.removeMovieClip();
}
if ((this._y + (this._height / 2)) < 0) {
this.removeMovieClip();
}
if ((this._y - (this._height / 2)) > this._parent.startHeight) {
this.removeMovieClip();
}
};
Symbol 877 MovieClip [bombThrowable] Frame 1
if (this.boxSpeed == undefined) {
this.boxSpeed = 1;
}
this.depth = 1;
this.hasHitSpring = false;
this.throwSpeed = -10;
this.xInvert = 0;
this.yInvert = 0;
this.fixedWidth = 5;
if (dir == undefined) {
this.counter = random(8) * -1;
this.bombDirectionX = _parent.heroPointer._xscale / 100;
this.bombDirectionY = 1;
}
if (this._parent.side.getRotation() == 270) {
this.addToVectorSide = 3;
this.addToVectorSide2 = 3;
}
if (this._parent.side.getRotation() == 180) {
this.addToVectorSide = 2;
this.addToVectorSide2 = 2;
}
if (this._parent.side.getRotation() == 90) {
this.addToVectorSide = 1;
this.addToVectorSide2 = 1;
}
if (this._parent.side.getRotation() == 0) {
this.addToVectorSide = 2;
this.addToVectorSide2 = 0;
}
if (this._parent.side.getXScale() < 0) {
this.xInvert = 2;
this.xInvert2 = -1;
}
if (this._parent.side.getYScale() < 0) {
this.yInvert = 2;
this.yInvert2 = -1;
}
this.hitboxHeightOrWidth = this.fixedWidth * 2;
this.hitboxHeightOrWidth2 = this.fixedWidth * 2;
if (sideDirection == "downSide") {
_y = (400 - (((_y + (this._height / 2)) + 50) % _parent.startHeight));
_y = (400 - this.fixedWidth);
if (dir == "down") {
this._rotation = this.wormReference._rotation + 180;
this._x = _parent.startWidth - this.lastBombX;
}
if (dir == "up") {
this._x = this.lastBombX;
}
if (dir == "right") {
this._rotation = this.wormReference._rotation - 90;
this._x = this.lastBombY;
}
if (dir == "left") {
this._rotation = this.wormReference._rotation + 90;
this._x = _parent.startHeight - this.lastBombY;
}
}
if (sideDirection == "upSide") {
_y = (((_y + (this._height / 2)) + 50) % _parent.startHeight);
_y = this.fixedWidth;
if (dir == "down") {
this._x = this.lastBombX;
}
if (dir == "up") {
this._rotation = this.wormReference._rotation + 180;
this._x = _parent.startWidth - this.lastBombX;
}
if (dir == "right") {
this._rotation = this.wormReference._rotation + 90;
this._x = _parent.startHeight - this.lastBombY;
}
if (dir == "left") {
this._rotation = this.wormReference._rotation - 90;
this._x = this.lastBombY;
}
}
if (sideDirection == "leftSide") {
_x = (((_x + (this._height / 2)) + 50) % _parent.startHeight);
_x = this.fixedWidth;
this._y = this.lastBombY;
if (dir == "down") {
this._rotation = this.wormReference._rotation - 90;
this._y = _parent.startHeight - this.lastBombX;
}
if (dir == "up") {
this._rotation = this.wormReference._rotation + 90;
this._y = this.lastBombX;
}
}
if (sideDirection == "rightSide") {
_x = (400 - (((_x + (this._height / 2)) + 50) % _parent.startHeight));
_x = (400 - this.fixedWidth);
this._y = this.lastBombY;
if (dir == "down") {
this._rotation = this.wormReference._rotation + 90;
this._y = this.lastBombX;
}
if (dir == "up") {
this._rotation = this.wormReference._rotation - 90;
this._y = _parent.startHeight - this.lastBombX;
}
}
this.onEnterFrame = function () {
if ((_parent.bombThrowable == undefined) || ((_parent.bombThrowable + "empty") == "empty")) {
_parent.bombThrowable = this;
}
this._rotation = _parent.gravityRotation;
this.bombWall._xscale = ((100 * this.bombDirectionX) / Math.abs(this.bombDirectionX)) * -1;
if (((this.counter % 2) == 0) && (this.bombShelter._currentframe == 1)) {
this.smoke = this.attachMovie("bombSmoke", "bombSmoke" + (depth++), depth++, {_x:random(10) + 2, _y:-10, smokeSpeed:random(2) + 1});
this.bombShelter.swapDepths(depth * 2);
}
this.counter++;
if (Math.round(bombDirectionX * 1000) == 0) {
this.bombShelter.gotoAndStop("explode");
}
if (this.bombDirectionX == 1) {
this.specialX = Math.ceil((this._x + 20) / 40);
} else {
this.specialX = Math.floor((this._x + 20) / 40);
}
this.specialY = Math.ceil((this._y + 20) / 40);
if (_parent.gravityRotation == 0) {
this._x = this._x + (5 * this.bombDirectionX);
this._y = this._y + ((this.throwSpeed + this.counter) * this.bombDirectionY);
}
if (_parent.gravityRotation == 90) {
this._y = this._y + (5 * this.bombDirectionX);
this._x = this._x - ((this.throwSpeed + this.counter) * this.bombDirectionY);
}
if (_parent.gravityRotation == -90) {
this._y = this._y - (5 * this.bombDirectionX);
this._x = this._x + ((this.throwSpeed + this.counter) * this.bombDirectionY);
}
if (Math.abs(_parent.gravityRotation) == 180) {
this._x = this._x - (5 * this.bombDirectionX);
this._y = this._y - ((this.throwSpeed + this.counter) * this.bombDirectionY);
}
if (_parent.gravityRotation == 0) {
this.linkAddX = 0;
this.linkAddY = 1;
}
if (_parent.gravityRotation == 90) {
this.linkAddX = -1;
this.linkAddY = 0;
}
if (_parent.gravityRotation == -90) {
this.linkAddX = 1;
this.linkAddY = 0;
}
if (Math.abs(_parent.gravityRotation) == 180) {
this.linkAddX = 0;
this.linkAddY = -1;
}
i = 0;
while (i < 5) {
currentBlock = _parent.blockList[(this.specialX + i) - 3];
while ((currentBlock != "empty") && (currentBlock != undefined)) {
this.bombHitFloor = false;
this.bombHitCeil = false;
this.bombHitWall = false;
if (currentBlock.hitTest(this.bombFloor)) {
this.bombHitFloor = true;
}
if (currentBlock.hitTest(this.bombCeil) && (counter < 10)) {
this.bombHitCeil = true;
}
if (currentBlock.hitTest(this.bombWall)) {
this.bombHitWall = true;
}
if (this.bombHitFloor) {
if (_parent.gravityRotation == 0) {
this._y = currentBlock._y - 40;
}
if (_parent.gravityRotation == 90) {
this._x = currentBlock._x + 40;
}
if (_parent.gravityRotation == -90) {
this._x = currentBlock._x - 40;
}
if (Math.abs(_parent.gravityRotation) == 180) {
this._y = currentBlock._y + 40;
}
this.bombDirectionX = this.bombDirectionX * 0.5;
this.counter = Math.abs(this.throwSpeed) - (15 * Math.abs(this.bombDirectionX));
}
if (this.bombHitCeil) {
if (_parent.gravityRotation == 0) {
this._y = currentBlock._y + 40;
}
if (_parent.gravityRotation == 90) {
this._x = currentBlock._x - 40;
}
if (_parent.gravityRotation == -90) {
this._x = currentBlock._x + 40;
}
if (Math.abs(_parent.gravityRotation) == 180) {
this._y = currentBlock._y - 40;
}
this.counter = this.counter + 10;
}
if (this.bombHitWall) {
if (_parent.gravityRotation == 0) {
this._x = currentBlock._x + ((40 * this.bombWall._xscale) / 100);
}
if (_parent.gravityRotation == 90) {
this._y = currentBlock._y + ((40 * this.bombWall._xscale) / 100);
}
if (_parent.gravityRotation == -90) {
this._y = currentBlock._y - ((40 * this.bombWall._xscale) / 100);
}
if (Math.abs(_parent.gravityRotation) == 180) {
this._x = currentBlock._x - ((40 * this.bombWall._xscale) / 100);
}
this.bombDirectionX = this.bombDirectionX * 0.5;
this.bombDirectionX = bombDirectionX * -1;
}
if (currentBlock.hitTest(this.bombShelter.bombExplode.Explosion)) {
currentBlock._y = 1000;
}
currentBlock = currentBlock.linkBlock;
}
i++;
}
if ((_parent.sidePosition != "yFront") && (_parent.sidePosition != "yBack")) {
if (_parent.gravityRotation == 0) {
if (this._y > 380) {
this._y = 380;
this.bombDirectionX = this.bombDirectionX * 0.5;
this.counter = Math.abs(this.throwSpeed) - (15 * Math.abs(this.bombDirectionX));
}
}
if (_parent.gravityRotation == 90) {
if (this._x < 20) {
this._x = 20;
this.bombDirectionX = this.bombDirectionX * 0.5;
this.counter = Math.abs(this.throwSpeed) - (15 * Math.abs(this.bombDirectionX));
}
}
if (_parent.gravityRotation == -90) {
if (this._x > 380) {
this._x = 380;
this.bombDirectionX = this.bombDirectionX * 0.5;
this.counter = Math.abs(this.throwSpeed) - (15 * Math.abs(this.bombDirectionX));
}
}
if (Math.abs(_parent.gravityRotation) == 180) {
if (this._y < 20) {
this._y = 20;
this.bombDirectionX = this.bombDirectionX * 0.5;
this.counter = Math.abs(this.throwSpeed) - (15 * Math.abs(this.bombDirectionX));
}
}
}
if ((this._x + (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) {
this.vector1x = this._parent.side.getVectorCollection()[((0 + this.xInvert) + this.addToVectorSide) % 4];
this.vector2x = this._parent.side.getVectorCollection()[((1 + this.xInvert) + this.addToVectorSide) % 4];
this.bombDir = "right";
}
if ((this._x - (this.hitboxHeightOrWidth / 2)) < 0) {
this.vector1x = this._parent.side.getVectorCollection()[((2 + this.xInvert) + this.addToVectorSide) % 4];
this.vector2x = this._parent.side.getVectorCollection()[((3 + this.xInvert) + this.addToVectorSide) % 4];
this.bombDir = "left";
}
if ((this._y - (this.hitboxHeightOrWidth2 / 2)) < 0) {
this.vector1y = this._parent.side.getVectorCollection()[((1 + this.yInvert) + this.addToVectorSide) % 4];
this.vector2y = this._parent.side.getVectorCollection()[((2 + this.yInvert) + this.addToVectorSide) % 4];
this.bombDir = "up";
}
if ((this._y + (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight) {
this.vector1y = this._parent.side.getVectorCollection()[((0 + this.yInvert) + this.addToVectorSide) % 4];
this.vector2y = this._parent.side.getVectorCollection()[((3 + this.yInvert) + this.addToVectorSide) % 4];
this.bombDir = "down";
}
if (((this._x + (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) || ((this._x - (this.hitboxHeightOrWidth / 2)) < 0)) {
this.vector1 = this.vector1x;
this.vector2 = this.vector2x;
}
if (((this._y - (this.hitboxHeightOrWidth2 / 2)) < 0) || ((this._y + (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight)) {
this.vector1 = this.vector1y;
this.vector2 = this.vector2y;
}
if ((((this._x + (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) || ((this._x - (this.hitboxHeightOrWidth / 2)) < 0)) && (((this._y - (this.hitboxHeightOrWidth2 / 2)) < 0) || ((this._y + (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight))) {
if ((_parent.gravityRotation == 90) || (_parent.gravityRotation == -90)) {
this.vector1 = this.vector1x;
this.vector2 = this.vector2x;
}
}
if ((((this._x + (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) || ((this._x - (this.hitboxHeightOrWidth / 2)) < 0)) || (((this._y - (this.hitboxHeightOrWidth2 / 2)) < 0) || ((this._y + (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight))) {
this.otherSide = three_d.Side.removeSideFromSideCollection(this._parent.figure.getSidesWithVectors([this.vector1, this.vector2]), this._parent.side);
this.otherSideMc = this.otherSide[0].getMovieClip();
_root.depth++;
this.bombThrowable = this.otherSideMc.mc.attachMovie("bombThrowable", "bombThrowable" + this.otherSideMc.mc.getNextHighestDepth(), this.otherSideMc.mc.getNextHighestDepth(), {_x:1000, _y:1000});
this.bombThrowable.dir = this.bombDir;
this.otherSideMc.mc.bombThrowable = this.bombThrowable;
this.bombThrowable.sideDirection = this.otherSideMc.mc.getSideDirection(this.vector1, this.vector2);
this.bombThrowable.lastBombX = this._x;
this.bombThrowable.lastBombY = this._y;
this.bombThrowable.bombDirectionX = this.bombDirectionX;
this.bombThrowable.bombDirectionY = this.bombDirectionY;
this.bombThrowable.counter = this.counter;
this.removeMovieClip();
}
};
Symbol 878 MovieClip [boxSpring] Frame 1
this.counter = 0;
this.typeOf = "spring";
if (_parent._parent != _root) {
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList.push(this);
}
}
if (this.boxSpeed == undefined) {
this.boxSpeed = 2;
}
this.onEnterFrame = function () {
this.counter++;
if (_parent.gravityRotation == 0) {
this.linkAddX = 0;
this.linkAddY = 1;
}
if (_parent.gravityRotation == 90) {
this.linkAddX = -1;
this.linkAddY = 0;
}
if (_parent.gravityRotation == -90) {
this.linkAddX = 1;
this.linkAddY = 0;
}
if (Math.abs(_parent.gravityRotation) == 180) {
this.linkAddX = 0;
this.linkAddY = -1;
}
this.isLegalMove = true;
if ((((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) >= 0) && (((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) < 10)) {
this.temporaryLinkBlock = _parent.blockList[(Math.round((this._x + 20) / 40) - 1) + this.linkAddX];
} else {
this.isLegalMove = false;
}
if ((((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) >= 0) && (((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) < 10)) {
} else {
this.isLegalMove = false;
}
if (((((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) == Math.floor((_parent.heroPointer._x + 20) / 40)) || (((Math.round((this._x + 20) / 40) - 1) + this.linkAddX) == (Math.floor((_parent.heroPointer._x + 20) / 40) - 1))) && ((((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) == Math.floor((_parent.heroPointer._y + 20) / 40)) || (((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) == (Math.floor((_parent.heroPointer._y + 20) / 40) - 1)))) {
this.isLegalMove = false;
}
this.temporaryCounter = 0;
if (_parent._parent != _root) {
if ((_parent.sidePosition == "yFront") || (_parent.sidePosition == "yBack")) {
this.isLegalMove = false;
}
while ((this.temporaryLinkBlock != "empty") && (this.isLegalMove)) {
this.temporaryCounter++;
this.isLegalMove = ((Math.round((this._y + 20) / 40) - 1) + this.linkAddY) != (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if (this.isLegalMove) {
if (_parent.gravityRotation == 0) {
if ((this.counter % this.boxSpeed) == 0) {
this._y = this._y + 40;
}
}
if (_parent.gravityRotation == 90) {
if ((this.counter % this.boxSpeed) == 0) {
this.prevBlock.linkBlock = this.linkBlock;
this.linkBlock.prevBlock = this.prevBlock;
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this.prevBlock;
}
if (this.prevBlock == "empty") {
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = "empty";
} else {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this.linkBlock;
this.linkBlock.prevBlock = "empty";
this.linkBlock.tail = this.tail;
}
}
this._x = this._x - 40;
this.prevBlock = "empty";
this.linkBlock = "empty";
this.tail = "empty";
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this;
this.tail = this;
} else {
this.prevBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1].tail;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail.linkBlock = this;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this;
}
}
}
if (_parent.gravityRotation == -90) {
if ((this.counter % this.boxSpeed) == 0) {
this.prevBlock.linkBlock = this.linkBlock;
this.linkBlock.prevBlock = this.prevBlock;
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this.prevBlock;
}
if (this.prevBlock == "empty") {
if (this.linkBlock == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = "empty";
} else {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this.linkBlock;
this.linkBlock.prevBlock = "empty";
this.linkBlock.tail = this.tail;
}
}
this._x = this._x + 40;
this.prevBlock = "empty";
this.linkBlock = "empty";
this.tail = "empty";
if (_parent.blockList[Math.round((this._x + 20) / 40) - 1] == "empty") {
_parent.blockList[Math.round((this._x + 20) / 40) - 1] = this;
this.tail = this;
} else {
this.prevBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1].tail;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail.linkBlock = this;
_parent.blockList[Math.round((this._x + 20) / 40) - 1].tail = this;
}
}
}
if (Math.abs(_parent.gravityRotation) == 180) {
if ((this.counter % this.boxSpeed) == 0) {
this._y = this._y - 40;
}
}
}
};
Symbol 884 MovieClip [bombSmoke] Frame 1
if (this.smokeSpeed == undefined) {
this.smokeSpeed = 1;
}
this.onEnterFrame = function () {
this._y = this._y - this.smokeSpeed;
};
Symbol 884 MovieClip [bombSmoke] Frame 30
this.removeMovieClip();
Symbol 895 MovieClip Frame 1
stop();
Symbol 896 MovieClip Frame 1
stop();
Symbol 897 MovieClip Frame 1
_parent.gearArray.push(this);
this.originalWidth = this._width;
this.originalHeight = this._height;
this.gearShelter.gotoAndStop(this.gearType);
this.hitboxGearShelter.gotoAndStop(this.gearType);
this.checkForLink = false;
this.stopGearRotation = false;
this.count = 0;
trans = new flash.geom.Transform(this.gearShelter);
if (_root[_name + "TempPin"] != undefined) {
this.tempPin = _root[_name + "TempPin"];
}
if (_root[_name + "TempPinGearRotation"] != undefined) {
this.tempPin.gearRotation = _root[_name + "TempPinGearRotation"];
}
if (_root[_name + "TempPinGear"] != undefined) {
this.tempPin.gear = _root[_name + "TempPinGear"];
}
this.onEnterFrame = function () {
if (this.gearUnlocked) {
_root[_name + "TempPin"] = this.tempPin;
_root[_name + "TempPinGearRotation"] = this.tempPin.gearRotation;
_root[_name + "TempPinGear"] = this.tempPin.gear;
trans.colorTransform = _parent.colorTransformNormal;
if (this.isPicked) {
this._x = _parent._parent.cursor._x - 200;
this._y = (_parent._parent.cursor._y + 30) - 170;
this._alpha = 50;
this.tempPin = undefined;
this.i = 0;
while (this.i < _parent.gearPinArray.length) {
if (this.hitbox.hitTest(_parent.gearPinArray[this.i])) {
this.tempPin = _parent.gearPinArray[this.i];
}
this.i++;
}
if (this.tempPin != undefined) {
trans.colorTransform = _parent.colorTransformBright;
this._x = this.tempPin._x;
this._y = this.tempPin._y;
this.gearI = 0;
while (this.gearI < _parent.gearArray.length) {
if ((this.hitboxGearShelter.hitTest(_parent.gearArray[this.gearI].hitboxGearShelter) && (_parent.gearArray[this.gearI] != this)) && (!_parent.gearArray[this.gearI].isPicked)) {
this.tempCheckGear = false;
this.linkI = 0;
while (this.linkI < this.tempPin.linkArray.length) {
this.tempLink = this.tempPin.linkArray[this.linkI][0];
this.tempLinkGearUser = this.tempPin.linkArray[this.linkI][1];
this.tempLinkTheOtherGearUser = this.tempPin.linkArray[this.linkI][2];
if ((((!this.tempCheckGear) && (this.tempLinkGearUser == this.gearType)) && (_parent.gearArray[this.gearI] == this.tempLink.gear)) && (_parent.gearArray[this.gearI].gearType == this.tempLinkTheOtherGearUser)) {
this.tempCheckGear = true;
}
this.linkI++;
}
if ((!this.tempCheckGear) && (_parent.gearArray[this.gearI].gearType != 0)) {
trans.colorTransform = _parent.colorTransformRed;
}
if ((!this.tempCheckGear) && (_parent.gearArray[this.gearI].gearType == 0)) {
trans.colorTransform = _parent.colorTransformRed;
}
}
this.gearI++;
}
}
}
if (!this.isPicked) {
if (this.tempPin == undefined) {
this.tempPin = _parent.o1;
}
if (this.tempPin != undefined) {
if (this.tempPin.gearRotation == undefined) {
if (this.gearShelter._rotation != 0) {
this.count++;
}
if (this.count > 5) {
this.gearShelter._rotation = 0;
this.count = 0;
}
}
this.realLink = undefined;
if ((this.gearType == 0) && (this == _parent.gear1)) {
this.tempPin.gearRotation = 5;
}
this.linkI = 0;
while (this.linkI < this.tempPin.linkArray.length) {
this.tempLink = this.tempPin.linkArray[this.linkI][0];
this.tempLinkGearUser = this.tempPin.linkArray[this.linkI][1];
this.tempLinkTheOtherGearUser = this.tempPin.linkArray[this.linkI][2];
if (((this.tempLinkGearUser == this.gearType) && (this.tempPin.gearRotation != undefined)) && (this.tempLink.gear.gearType == this.tempLinkTheOtherGearUser)) {
if (!this.stopGearRotation) {
this.realLink = this.tempLink;
if (this.realLink.gearRotation == undefined) {
this.realLink.gear.gearShelter._rotation = this.gearShelter._rotation * -1;
}
this.realLink.gearRotation = this.tempPin.gearRotation * -1;
}
}
this.linkI++;
}
if (this.stopGearRotation) {
this.tempPin.gearRotation = undefined;
this.stopGearRotation = false;
}
if (((this._alpha != 100) && (this.tempPin.gear.gearType != 0)) && (this.tempPin.gear == undefined)) {
this.tempPin.gear = this;
}
this.gearShelter._rotation = this.gearShelter._rotation + this.tempPin.gearRotation;
this._x = this.tempPin._x;
this._y = this.tempPin._y;
if (this._alpha != 100) {
this.gearI = 0;
while (this.gearI < _parent.gearArray.length) {
if ((this.hitboxGearShelter.hitTest(_parent.gearArray[this.gearI].hitboxGearShelter) && (_parent.gearArray[this.gearI] != this)) && (!_parent.gearArray[this.gearI].isPicked)) {
this.tempCheckGear = false;
this.linkI = 0;
while (this.linkI < this.tempPin.linkArray.length) {
this.tempLink = this.tempPin.linkArray[this.linkI][0];
this.tempLinkGearUser = this.tempPin.linkArray[this.linkI][1];
this.tempLinkTheOtherGearUser = this.tempPin.linkArray[this.linkI][2];
if ((((!this.tempCheckGear) && (this.tempLinkGearUser == this.gearType)) && (_parent.gearArray[this.gearI] == this.tempLink.gear)) && (_parent.gearArray[this.gearI].gearType == this.tempLinkTheOtherGearUser)) {
this.tempCheckGear = true;
}
this.linkI++;
}
if ((!this.tempCheckGear) && (_parent.gearArray[this.gearI].gearType != 0)) {
this.checkForLink = true;
this.checkForLinkGear = true;
}
if ((!this.tempCheckGear) && (_parent.gearArray[this.gearI].gearType == 0)) {
this.checkForLink = true;
this.checkForLinkGear = true;
}
}
this.gearI++;
}
}
}
this._alpha = 100;
}
if (this.checkForLink) {
if ((this.tempPin.gear.gearType != 0) && (this.tempPin.gear == this)) {
this.tempPin.gearRotation = undefined;
this.tempPin.gear = undefined;
}
this.tempPin = _parent.o1;
this.gearI = 0;
while (this.gearI < _parent.gearArray.length) {
if (this.tempPin != undefined) {
_parent.gearArray[this.gearI].stopGearRotation = true;
}
this.gearI++;
}
this.checkForLinkGear = undefined;
this.checkForLink = false;
}
if (this.gearType != 0) {
if (((_parent._parent.cursor._currentframe == 3) && (_parent._parent.cursor.hitTest(this.hitboxGearShelter))) && (_parent._parent.cursor.gear == undefined)) {
this.highestGearDepthGear = this;
_parent._parent.cursor.gear = this;
this.gearI = 0;
while (this.gearI < _parent.gearArray.length) {
if (this.tempPin != undefined) {
_parent.gearArray[this.gearI].stopGearRotation = true;
}
if (_parent.gearArray[this.gearI].getDepth() > this.highestGearDepthGear.getDepth()) {
this.highestGearDepthGear = _parent.gearArray[this.gearI];
}
this.swapDepths(this.highestGearDepthGear);
this.gearI++;
}
if ((this.tempPin.gear.gearType != 0) && (this.tempPin.gear == this)) {
this.tempPin.gearRotation = undefined;
this.tempPin.gear = undefined;
}
this._rotation = 0;
this.isPicked = true;
}
if (_parent._parent.cursor._currentframe != 3) {
this.isPicked = false;
if (_parent._parent.cursor.gear == this) {
_parent._parent.cursor.gear = undefined;
}
}
}
}
};
Symbol 899 MovieClip Frame 1
_parent.gearPinArray.push(this);
Symbol 903 MovieClip [gearPuzzle] Frame 1
this.filters = [_root.blurFilter];
this.gearPinArray = new Array();
this.gearArray = new Array();
var colorTransformNormal = (new flash.geom.ColorTransform(this));
colorTransformNormal.redOffset = 0;
colorTransformNormal.greenOffset = 0;
colorTransformNormal.blueOffset = 0;
var colorTransformBright = (new flash.geom.ColorTransform(this));
colorTransformBright.redOffset = 80;
colorTransformBright.greenOffset = 80;
colorTransformBright.blueOffset = 80;
var colorTransformRed = (new flash.geom.ColorTransform(this));
colorTransformRed.redOffset = 0;
colorTransformRed.greenOffset = -80;
colorTransformRed.blueOffset = -80;
this._visible = false;
this._alpha = 0;
if (this.makeVisible == undefined) {
this.makeVisible = true;
}
if (_root.gearPuzzlegearPinArray != undefined) {
this.gearPinArray = _root.gearPuzzlegearPinArray;
}
if (_root.gearPuzzlegearArray != undefined) {
this.gearArray = _root.gearPuzzlegearArray;
}
this.counter = 0;
this.onEnterFrame = function () {
_root.gearPuzzlegearPinArray = this.gearPinArray;
_root.gearPuzzlegearArray = this.gearArray;
if (Math.abs(this.gear2.tempPin.gearRotation) == 5) {
this.counter++;
if (this.counter > 20) {
_root.machineIsWorking = true;
}
} else {
this.counter = 0;
_root.machineIsWorking = false;
}
if (this.makeVisible) {
this._visible = true;
if (this._alpha < 100) {
this._alpha = this._alpha + 4;
this._alpha = this._alpha * 1.4;
} else {
this._alpha = 100;
}
}
if (this._alpha > 100) {
this._alpha = 100;
}
if (!this.makeVisible) {
if (this._alpha > 0) {
this._alpha = this._alpha - 4;
this._alpha = this._alpha * 0.8;
} else {
this._alpha = 0;
this._visible = false;
this.removeMovieClip();
}
}
if (this._alpha < 0) {
this._alpha = 0;
}
};
Instance of Symbol 897 MovieClip "gear1" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.gearType = 0;
this.gearUnlocked = true;
}
Instance of Symbol 897 MovieClip "gear2" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.gearType = 0;
this.gearUnlocked = true;
}
Instance of Symbol 899 MovieClip "p16" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.s2, 1, 0]);
this.linkArray.push([_parent.p14, 1, 1]);
}
Instance of Symbol 899 MovieClip "p1" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.s1, 2, 0]);
this.linkArray.push([_parent.p5, 2, 1]);
}
Instance of Symbol 899 MovieClip "p3" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.s1, 1, 0]);
this.linkArray.push([_parent.p2, 2, 2]);
this.linkArray.push([_parent.p6, 1, 1]);
}
Instance of Symbol 899 MovieClip "p4" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p5, 2, 1]);
}
Instance of Symbol 899 MovieClip "p8" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p9, 2, 2]);
this.linkArray.push([_parent.p7, 2, 1]);
}
Instance of Symbol 899 MovieClip "p7" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p8, 1, 2]);
this.linkArray.push([_parent.p12, 1, 1]);
}
Instance of Symbol 899 MovieClip "p13" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.s2, 1, 0]);
this.linkArray.push([_parent.p14, 1, 1]);
}
Instance of Symbol 899 MovieClip "p10" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p11, 2, 1]);
this.linkArray.push([_parent.p11, 1, 2]);
this.linkArray.push([_parent.p5, 1, 1]);
this.linkArray.push([_parent.p9, 1, 2]);
this.linkArray.push([_parent.p9, 2, 1]);
}
Instance of Symbol 899 MovieClip "p9" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p10, 2, 1]);
this.linkArray.push([_parent.p8, 2, 2]);
this.linkArray.push([_parent.p14, 2, 1]);
this.linkArray.push([_parent.p10, 1, 2]);
}
Instance of Symbol 899 MovieClip "p14" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p9, 1, 2]);
this.linkArray.push([_parent.p16, 1, 1]);
this.linkArray.push([_parent.p15, 1, 2]);
this.linkArray.push([_parent.p13, 1, 1]);
this.linkArray.push([_parent.p15, 2, 1]);
}
Instance of Symbol 899 MovieClip "p12" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.s2, 1, 0]);
this.linkArray.push([_parent.p7, 1, 1]);
}
Instance of Symbol 899 MovieClip "p5" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p1, 1, 2]);
this.linkArray.push([_parent.p10, 1, 1]);
this.linkArray.push([_parent.p4, 1, 2]);
}
Instance of Symbol 899 MovieClip "p6" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p2, 2, 2]);
this.linkArray.push([_parent.p3, 1, 1]);
this.linkArray.push([_parent.p11, 1, 2]);
this.linkArray.push([_parent.p11, 2, 1]);
}
Instance of Symbol 899 MovieClip "p11" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p6, 1, 2]);
this.linkArray.push([_parent.p6, 2, 1]);
this.linkArray.push([_parent.p10, 2, 1]);
this.linkArray.push([_parent.p10, 1, 2]);
this.linkArray.push([_parent.p15, 1, 2]);
this.linkArray.push([_parent.p15, 2, 1]);
}
Instance of Symbol 899 MovieClip "p15" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p11, 2, 1]);
this.linkArray.push([_parent.p14, 2, 1]);
this.linkArray.push([_parent.p11, 1, 2]);
this.linkArray.push([_parent.p14, 1, 2]);
}
Instance of Symbol 899 MovieClip "p2" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.s1, 2, 0]);
this.linkArray.push([_parent.p6, 2, 2]);
this.linkArray.push([_parent.p3, 2, 2]);
}
Instance of Symbol 899 MovieClip "s1" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p2, 0, 2]);
this.linkArray.push([_parent.p1, 0, 2]);
this.linkArray.push([_parent.p3, 0, 1]);
this.gearRotation = 5;
this.gear = _parent.gear1;
this.gear.tempPin = this;
}
Instance of Symbol 899 MovieClip "s2" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.linkArray = new Array();
this.linkArray.push([_parent.p12, 0, 1]);
this.linkArray.push([_parent.p13, 0, 1]);
this.linkArray.push([_parent.p16, 0, 1]);
this.gear = _parent.gear2;
this.gear.tempPin = this;
}
Instance of Symbol 897 MovieClip "newGear3" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.gearType = 1;
if (!_root.level7GearGotten) {
this.gearUnlocked = false;
this._y = 1000;
} else {
this.gearUnlocked = true;
}
}
Instance of Symbol 897 MovieClip "newGear5" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.gearType = 2;
if (!_root.level11GearGotten) {
this.gearUnlocked = false;
this._y = 1000;
} else {
this.gearUnlocked = true;
}
}
Instance of Symbol 897 MovieClip "newGear1" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.gearType = 1;
if (!_root.level4GearGotten) {
this.gearUnlocked = false;
this._y = 1000;
} else {
this.gearUnlocked = true;
}
}
Instance of Symbol 897 MovieClip "newGear4" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.gearType = 2;
if (!_root.level10GearGotten) {
this.gearUnlocked = false;
this._y = 1000;
} else {
this.gearUnlocked = true;
}
}
Instance of Symbol 897 MovieClip "newGear2" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.gearType = 1;
if (!_root.level5GearGotten) {
this.gearUnlocked = false;
this._y = 1000;
} else {
this.gearUnlocked = true;
}
}
Instance of Symbol 897 MovieClip "newGear6" in Symbol 903 MovieClip [gearPuzzle] Frame 1
onClipEvent (load) {
this.gearType = 2;
if (!_root.level12GearGotten) {
this.gearUnlocked = false;
this._y = 1000;
} else {
this.gearUnlocked = true;
}
}
Symbol 904 MovieClip [levelEditorCursor] Frame 1
this.addToSide = 0;
this.isACorner = false;
this.onEnterFrame = function () {
if (_parent.side.getRotation() == 0) {
this.addToSide = 0;
}
if (_parent.side.getRotation() == 270) {
this.addToSide = 1;
}
if (_parent.side.getRotation() == 90) {
this.addToSide = -1;
}
if (_parent.side.getRotation() == 180) {
this.addToSide = -2;
}
_parent.x1Point = _parent.side.getVectorCollection()[(4 + this.addToSide) % 4].getVectorImage().get()[0][0];
_parent.x2Point = _parent.side.getVectorCollection()[(7 + this.addToSide) % 4].getVectorImage().get()[0][0];
_parent.x3Point = _parent.side.getVectorCollection()[(6 + this.addToSide) % 4].getVectorImage().get()[0][0];
_parent.x4Point = _parent.side.getVectorCollection()[(5 + this.addToSide) % 4].getVectorImage().get()[0][0];
_parent.y1Point = _parent.side.getVectorCollection()[(4 + this.addToSide) % 4].getVectorImage().get()[1][0];
_parent.y2Point = _parent.side.getVectorCollection()[(7 + this.addToSide) % 4].getVectorImage().get()[1][0];
_parent.y3Point = _parent.side.getVectorCollection()[(6 + this.addToSide) % 4].getVectorImage().get()[1][0];
_parent.y4Point = _parent.side.getVectorCollection()[(5 + this.addToSide) % 4].getVectorImage().get()[1][0];
_parent.imageXDistance = _parent.x2Point - _parent.x1Point;
_parent.imageYDistance = _parent.y4Point - _parent.y1Point;
_parent.imageXDistanceBetweenY = _parent.x4Point - _parent.x1Point;
_parent.imageYDistanceBetweenX = _parent.y2Point - _parent.y1Point;
this.extraX = ((_root._ymouse - (_parent.y1Point + _root.drawingPlane1._y)) * _parent.imageXDistanceBetweenY) / _parent.imageYDistance;
this.extraY = ((_root._xmouse - (_parent.x1Point + _root.drawingPlane1._x)) * _parent.imageYDistanceBetweenX) / _parent.imageXDistance;
if ((_root.mc5Shelter.mc != _parent) && (_root.mc6Shelter.mc != _parent)) {
this._x = ((_root._xmouse - (_parent.x1Point + _root.drawingPlane1._x)) * 400) / _parent.imageXDistance;
this._y = ((_root._ymouse - ((_parent.y1Point + this.extraY) + _root.drawingPlane1._y)) * 400) / _parent.imageYDistance;
} else {
this.tempLowestXImageVector = _parent.side.getVectorCollection()[0];
this.tempHighestXImageVector = _parent.side.getVectorCollection()[0];
this.tempLowestYImageVector = _parent.side.getVectorCollection()[0];
this.tempHighestYImageVector = _parent.side.getVectorCollection()[0];
sideI = 0;
while (sideI < _parent.side.getVectorCollection().length) {
if (_parent.side.getVectorCollection()[sideI].getVectorImage().get()[0][0] < this.tempLowestXImageVector.getVectorImage().get()[0][0]) {
this.tempLowestXImageVector = _parent.side.getVectorCollection()[sideI];
}
if (_parent.side.getVectorCollection()[sideI].getVectorImage().get()[0][0] > this.tempHighestXImageVector.getVectorImage().get()[0][0]) {
this.tempHighestXImageVector = _parent.side.getVectorCollection()[sideI];
}
if (_parent.side.getVectorCollection()[sideI].getVectorImage().get()[1][0] < this.tempLowestYImageVector.getVectorImage().get()[1][0]) {
this.tempLowestYImageVector = _parent.side.getVectorCollection()[sideI];
}
if (_parent.side.getVectorCollection()[sideI].getVectorImage().get()[1][0] > this.tempHighestYImageVector.getVectorImage().get()[1][0]) {
this.tempHighestYImageVector = _parent.side.getVectorCollection()[sideI];
}
sideI++;
}
this.highestXGap = this.tempHighestXImageVector.getVectorImage().get()[0][0] - this.tempLowestXImageVector.getVectorImage().get()[0][0];
this.highestYGap = this.tempHighestYImageVector.getVectorImage().get()[1][0] - this.tempLowestYImageVector.getVectorImage().get()[1][0];
this.c1 = Math.sqrt(Math.pow(_parent.imageXDistance, 2) + Math.pow(_parent.imageYDistanceBetweenX, 2));
this.c2 = Math.sqrt(Math.pow(_parent.imageYDistance, 2) + Math.pow(_parent.imageXDistanceBetweenY, 2));
this.diagonal1 = Math.sqrt(Math.pow(_parent.x3Point - _parent.x1Point, 2) + Math.pow(_parent.y3Point - _parent.y1Point, 2));
this.diagonal2 = Math.sqrt(Math.pow(_parent.x4Point - _parent.x2Point, 2) + Math.pow(_parent.y4Point - _parent.y2Point, 2));
rotationPointX = this.tempHighestXImageVector.getVectorImage().get()[0][0] - (this.highestXGap / 2);
rotationPointY = this.tempHighestYImageVector.getVectorImage().get()[1][0] - (this.highestYGap / 2);
this.realHalfDiagonal = 282.842712474619;
this.realXComposant = Math.cos((((_root.engine.a + 45) + 180) * Math.PI) / 180) * this.realHalfDiagonal;
this.realYComposant = Math.sin(((_root.engine.a + 45) * Math.PI) / 180) * this.realHalfDiagonal;
this.distanceX4RotationPoint = _parent.x4Point - this.rotationPointX;
this.distanceY4RotationPoint = _parent.y4Point - this.rotationPointY;
this.fixUpInterval = 3;
if (((Math.round(this.realYComposant) > (this.fixUpInterval * -1)) && (Math.round(this.realYComposant) < this.fixUpInterval)) || ((Math.round(this.distanceY4RotationPoint) > (this.fixUpInterval * -1)) && (Math.round(this.distanceY4RotationPoint) < this.fixUpInterval))) {
this.realYComposant = 400;
this.distanceY4RotationPoint = diagonal1 * Math.SQRT1_2;
}
if (((Math.round(this.realXComposant) > (this.fixUpInterval * -1)) && (Math.round(this.realXComposant) < this.fixUpInterval)) || ((Math.round(this.distanceX4RotationPoint) > (this.fixUpInterval * -1)) && (Math.round(this.distanceX4RotationPoint) < this.fixUpInterval))) {
this.realXComposant = 400;
this.distanceX4RotationPoint = (diagonal1 * Math.SQRT1_2) * _parent.side.getXScale();
}
this._x = (200 + ((Math.cos((_root.engine.a * Math.PI) / 180) * (_root._xmouse - _root.drawingPlane1._x)) * (this.realXComposant / this.distanceX4RotationPoint))) - ((Math.sin((_root.engine.a * Math.PI) / 180) * (_root._ymouse - (this.rotationPointY + _root.drawingPlane1._y))) * (this.realYComposant / this.distanceY4RotationPoint));
if (_parent.side.getXScale() == -1) {
this._x = 400 - this._x;
}
this._y = (200 + ((Math.sin((_root.engine.a * Math.PI) / 180) * (_root._xmouse - _root.drawingPlane1._x)) * (this.realXComposant / this.distanceX4RotationPoint))) + ((Math.cos((_root.engine.a * Math.PI) / 180) * (_root._ymouse - (this.rotationPointY + _root.drawingPlane1._y))) * (this.realYComposant / this.distanceY4RotationPoint));
}
this._x = (Math.floor(this._x / 40) * 40) + 20;
this._y = (Math.floor(this._y / 40) * 40) + 20;
this.numberPosition = ((Math.floor(this._y / 40) * 10) + Math.floor(this._x / 40)) + 1;
this.isAtHero = false;
if (this.hitTest(_parent.startHero)) {
if ((((Math.floor(_parent.startHero._y / 40) * 10) + Math.floor(_parent.startHero._x / 40)) + 1) == this.numberPosition) {
this.isAtHero = true;
}
}
this.isAtChest = false;
if (this.hitTest(_parent.chest)) {
if (((((((Math.floor(_parent.chest._y / 40) * 10) + Math.floor(_parent.chest._x / 40)) + 1) == this.numberPosition) || (((((Math.floor(_parent.chest._y / 40) * 10) + Math.floor(_parent.chest._x / 40)) + 1) - 1) == this.numberPosition)) || (((((Math.floor(_parent.chest._y / 40) * 10) + Math.floor(_parent.chest._x / 40)) + 1) - 10) == this.numberPosition)) || ((((((Math.floor(_parent.chest._y / 40) * 10) + Math.floor(_parent.chest._x / 40)) + 1) - 1) - 10) == this.numberPosition)) {
this.isAtChest = true;
}
}
if (_root.engine.canRemoveBlock) {
this._alpha = 50;
} else {
this._alpha = 100;
}
if ((((this.isAtHero || (_root.ed.heroAsCursor)) || (this.isAtChest)) || (_root.ed.chestAsCursor)) || (_root.engine.canUseCamera)) {
this._visible = false;
} else {
this._visible = true;
}
this.bAngle = ((360 + (_root.engine.b % 360)) % 360) - 360;
if ((((this.numberPosition == 1) || (this.numberPosition == 10)) || (this.numberPosition == 91)) || (this.numberPosition == 100)) {
isACorner = true;
} else {
isACorner = false;
}
this.insideMc = false;
if ((((this._x >= 0) && (this._x <= 400)) && (this._y >= 0)) && (this._y <= 400)) {
if (((((_root.mc5Shelter.mc != _parent) && (_root.mc6Shelter.mc != _parent)) && (((((bAngle >= -90) || (bAngle <= -275)) && (_parent.imageXDistance > 0)) && (_parent.imageYDistance > 0)) || ((((bAngle < -90) && (bAngle > -275)) && (_parent.imageXDistance < 0)) && (_parent.imageYDistance < 0)))) || (((_root.mc5Shelter.mc == _parent) && (bAngle <= 0)) && (bAngle > -180))) || ((_root.mc6Shelter.mc == _parent) && (bAngle <= -180))) {
this.insideMc = true;
if ((((((Key.isDown(1) && (!this.isAtHero)) && (!_root.ed.heroAsCursor)) && (!this.isAtChest)) && (!_root.ed.chestAsCursor)) && (_root.engine.canInsertBlock)) && (_parent.fullBlockArray[this.numberPosition] == undefined)) {
this.whatBlockArray = _parent.whatBlock(this.numberPosition, true);
this.mudBlock = _parent.attachMovie("mud" + this.whatBlockArray[0], ("mud" + this.whatBlockArray[0]) + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:this._x, _y:this._y});
this.mudBlock.blockEngine._visible = false;
this.mudBlock._rotation = this.whatBlockArray[1];
this.mudBlock._xscale = 100 * this.whatBlockArray[2];
this.mudBlock._yscale = 100 * this.whatBlockArray[3];
_parent.fullBlockArray[this.numberPosition] = this.mudBlock;
_parent.updateRestOfBlocks(this.whatBlockArray[4]);
}
if (((((((Key.isDown(1) && (!this.isAtHero)) && (!_root.ed.heroAsCursor)) && (!this.isAtChest)) && (!_root.ed.chestAsCursor)) && (_root.engine.canRemoveBlock)) && (_parent.fullBlockArray[this.numberPosition] != undefined)) && (!isACorner)) {
this.whatBlockArray = _parent.whatBlock(this.numberPosition, true);
_parent.fullBlockArray[this.numberPosition].removeMovieClip();
_parent.fullBlockArray[this.numberPosition] = undefined;
_parent.updateRestOfBlocks(this.whatBlockArray[4]);
}
if (((Key.isDown(1) && (this.isAtHero)) && (!_root.ed.chestAsCursor)) && (!_root.engine.canRemoveBlock)) {
_root.ed.heroAsCursor = true;
}
if (((!Key.isDown(1)) && (_root.ed.heroAsCursor)) || (_root.engine.canUseCamera)) {
_root.ed.heroAsCursor = false;
}
if (_root.ed.heroAsCursor && ((_parent.startHero == undefined) || ((_parent.startHero + "empty") == "empty"))) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].mc.startHero.removeMovieClip();
mcI++;
}
_parent.startHero = _parent.attachMovie("minerStart2", "startHero" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
if (_root.ed.chestAsCursor && ((_parent.chest == undefined) || ((_parent.chest + "empty") == "empty"))) {
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].mc.chest.removeMovieClip();
mcI++;
}
_parent.chest = _parent.attachMovie("chestShelter", "chest" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:this._x, _y:this._y});
}
if (((Key.isDown(1) && (this.isAtChest)) && (!_root.ed.heroAsCursor)) && (!_root.engine.canRemoveBlock)) {
_root.ed.chestAsCursor = true;
}
if (((!Key.isDown(1)) && (_root.ed.chestAsCursor)) || (_root.engine.canUseCamera)) {
_root.ed.chestAsCursor = false;
}
}
}
if (_root.ed.heroAsCursor) {
_parent.startHero._x = this._x;
_parent.startHero._y = this._y - 10;
}
if (_parent.startHero._x < 0) {
_parent.startHero._x = 20;
}
if (_parent.startHero._x > 400) {
_parent.startHero._x = 380;
}
if (_parent.startHero._y < 0) {
_parent.startHero._y = 10;
}
if (_parent.startHero._y > 400) {
_parent.startHero._y = 370;
}
if (_root.ed.chestAsCursor) {
_parent.chest._x = this._x + 20;
_parent.chest._y = this._y + 20;
}
if (_parent.chest._x < 40) {
_parent.chest._x = 40;
}
if (_parent.chest._x > 360) {
_parent.chest._x = 360;
}
if (_parent.chest._y < 40) {
_parent.chest._y = 40;
}
if (_parent.chest._y > 360) {
_parent.chest._y = 360;
}
};
_parent.updateRestOfBlocks = function (functionBlockArray) {
whatOtherBlockI = 0;
while (whatOtherBlockI < functionBlockArray.length) {
this.tempOtherBlock = functionBlockArray[whatOtherBlockI];
this.tempOtherBlockSideMc = this.tempOtherBlock._parent;
this.tempOtherBlockX = this.tempOtherBlock._x;
this.tempOtherBlockY = this.tempOtherBlock._y;
this.tempOtherBlockPosition = ((Math.floor(this.tempOtherBlock._y / 40) * 10) + Math.floor(this.tempOtherBlock._x / 40)) + 1;
this.tempOtherBlockSideMc.fullBlockArray[this.tempOtherBlockPosition] = undefined;
functionBlockArray[whatOtherBlockI].removeMovieClip();
this.tempOtherWhatBlockArray = this.tempOtherBlockSideMc.whatBlock(this.tempOtherBlockPosition, false);
this.tempMudBlock = this.tempOtherBlockSideMc.attachMovie("mud" + this.tempOtherWhatBlockArray[0], ("mud" + this.tempOtherWhatBlockArray[0]) + this.tempOtherBlockSideMc.getNextHighestDepth(), this.tempOtherBlockSideMc.getNextHighestDepth(), {_x:this.tempOtherBlockX, _y:this.tempOtherBlockY});
this.tempMudBlock.blockEngine._visible = false;
this.tempMudBlock._rotation = this.tempOtherWhatBlockArray[1];
this.tempMudBlock._xscale = 100 * this.tempOtherWhatBlockArray[2];
this.tempMudBlock._yscale = 100 * this.tempOtherWhatBlockArray[3];
this.tempOtherBlockSideMc.fullBlockArray[this.tempOtherBlockPosition] = this.tempMudBlock;
whatOtherBlockI++;
}
};
Symbol 910 MovieClip [diamondLabelShelter2] Frame 9
stop();
Symbol 910 MovieClip [diamondLabelShelter2] Frame 18
this.removeMovieClip();
Symbol 914 MovieClip Frame 1
totalDiamonds = _root.totalDiamonds;
Symbol 915 MovieClip [diamondLabelShelter] Frame 9
stop();
Symbol 915 MovieClip [diamondLabelShelter] Frame 18
this.removeMovieClip();
Symbol 920 MovieClip [machineLabel] Frame 1
totalGears = _root.totalGears;
stop();
Symbol 921 MovieClip [machineLabelShelter] Frame 9
stop();
Symbol 921 MovieClip [machineLabelShelter] Frame 18
this.removeMovieClip();
Symbol 930 MovieClip Frame 1
if (_root.levelBoss1ChestGotten) {
this.part1._alpha = 100;
}
if (_root.levelBoss2ChestGotten) {
this.part2._alpha = 100;
}
if (_root.levelBoss3ChestGotten) {
this.part3._alpha = 100;
}
Symbol 931 MovieClip [speakBubbleMiniShelter] Frame 1
this.count = 0;
this.steppedOn = false;
this.originX = this._x;
this.originY = this._y;
this.onEnterFrame = function () {
if (!this.steppedOn) {
this.count = this.count + 0.3;
if (_parent._rotation == 0) {
this._y = this.originY + (Math.cos(this.count) * 2);
} else {
this._x = this.originX + (Math.cos(this.count) * 2);
}
}
};
Symbol 931 MovieClip [speakBubbleMiniShelter] Frame 15
idle = true;
stop();
Symbol 931 MovieClip [speakBubbleMiniShelter] Frame 30
this.removeMovieClip();
Symbol 934 MovieClip [transitionShelter] Frame 189
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.trackBoss.stop();
_root.gotoAndStop("credits");
this.removeMovieClip();
Symbol 941 MovieClip Frame 1
levelVar = 0;
if (_root.level16ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level17ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level18ChestGotten) {
levelVar = levelVar + 1;
}
levelVar = levelVar + "/3";
diamondVar = 0;
if (_root.level16DiamondGotten) {
diamondVar = diamondVar + 1;
}
if (_root.level17DiamondGotten) {
diamondVar = diamondVar + 1;
}
if (_root.level18DiamondGotten) {
diamondVar = diamondVar + 1;
}
diamondVar = diamondVar + "/3";
Instance of Symbol 386 MovieClip "worldLocked" in Symbol 942 MovieClip [levelSelecte] Frame 1
onClipEvent (load) {
this.worldTag = "? ? ? ?";
if (_root.notFirstTimeUnlockedWorldBonus) {
this._visible = false;
}
}
Symbol 946 MovieClip Frame 1
this.filters = [_root.blurFilter];
Symbol 960 MovieClip Frame 1
amuletVar = 0;
if (_root.levelBoss3ChestGotten) {
amuletVar = 1;
}
amuletVar = amuletVar + "/1";
keyVar = _root.totalKeys;
keyVar = keyVar + "/9";
Symbol 962 MovieClip Frame 1
stop();
Instance of Symbol 57 MovieClip in Symbol 965 MovieClip [levelSelectf] Frame 1
onClipEvent (load) {
blurFilter = new flash.filters.BlurFilter(2, 2, 1);
if (_root.heroGotCostume == "costume1") {
_parent.crownStand.gotoAndStop(2);
}
if (_root.totalKeys >= 1) {
_parent.door1.chains1._visible = false;
}
if (_root.totalKeys >= 2) {
_parent.door1.chains3._visible = false;
}
if (_root.totalKeys >= 3) {
_parent.door1._visible = false;
_parent.invisibleBlock1._x = _parent.invisibleBlock1._x + 50;
_parent.invisibleBlock2._x = _parent.invisibleBlock2._x + 50;
_parent.invisibleBlock3._x = _parent.invisibleBlock3._x + 50;
}
if (_root.totalKeys >= 4) {
_parent.door2.chains1._visible = false;
}
if (_root.totalKeys >= 5) {
_parent.door2.chains3._visible = false;
}
if (_root.totalKeys >= 6) {
_parent.door2._visible = false;
_parent.invisibleBlock1._x = _parent.invisibleBlock1._x + 45;
_parent.invisibleBlock2._x = _parent.invisibleBlock2._x + 45;
_parent.invisibleBlock3._x = _parent.invisibleBlock3._x + 45;
}
if (_root.totalKeys >= 7) {
_parent.door3.chains1._visible = false;
}
if (_root.totalKeys >= 8) {
_parent.door3.chains3._visible = false;
}
if (_root.totalKeys >= 9) {
_parent.door3._visible = false;
}
this.needToStepAway = false;
}
onClipEvent (enterFrame) {
if ((_root.totalKeys == 9) && (_parent.invisibleBlock1._x != 1000)) {
_parent.invisibleBlock1._x = 1000;
_parent.invisibleBlock2._x = 1000;
_parent.invisibleBlock3._x = 1000;
}
if (_parent.heroPointer.hitTest(this)) {
this.atCrownStand = true;
} else {
this.atCrownStand = false;
}
if ((_parent.heroPointer.hitTest(this) && (Key.isDown(65))) && (this.cubeRotateShelter.idle)) {
this.cubeRotateShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
_parent.heroPointer.swapDepths(_parent.getNextHighestDepth());
this.needToStepAway = true;
if (_root.heroGotCostume == "costume1") {
_root.heroGotCostume = "none";
this.counter = 0;
_parent.crownStand.gotoAndStop(1);
_parent.heroPointer.shelter.gotoAndPlay("idle");
return(undefined);
}
_parent.crownStand.gotoAndStop(2);
_root.heroGotCostume = "costume1";
}
if ((_parent.heroPointer.hitTest(this) && (_parent.crownStand.crown._visible)) && (!this.needToStepAway)) {
this.cubeRotateShelter = _parent.attachMovie("crownRotateShelter", "crownRotateShelter" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_parent.crownStand._x, _y:_parent.crownStand._y});
this.cubeRotateShelter.filters = [blurFilter];
if (_root.heroGotCostume == "costume1") {
this.cubeRotateShelter.crownVar = "Helmet";
} else {
this.cubeRotateShelter.crownVar = "Crown";
}
_parent.crownStand.crown._visible = false;
}
if ((!_parent.heroPointer.hitTest(this)) && (!_parent.crownStand.crown._visible)) {
this.cubeRotateShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
_parent.heroPointer.swapDepths(_parent.getNextHighestDepth());
}
if (_root.heroGotCostume == "costume1") {
this.cubeRotateShelter.crown.gotoAndStop("helmet");
}
if ((!_parent.heroPointer.hitTest(this)) && (this.needToStepAway)) {
this.needToStepAway = false;
}
if (this.cubeRotateShelter == undefined) {
this.cubeRotateShelter = "";
}
if ((this.cubeRotateShelter + "Empty") == "Empty") {
_parent.crownStand.crown._visible = true;
}
}
Instance of Symbol 386 MovieClip "worldLocked" in Symbol 965 MovieClip [levelSelectf] Frame 1
onClipEvent (load) {
this.worldTag = "? ? ? ?";
if (_root.notFirstTimeUnlockedWorldSecret) {
this._visible = false;
}
}
Symbol 975 MovieClip Frame 1
levelVar = 0;
if (_root.level1ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level2ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level3ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level4ChestGotten) {
levelVar = levelVar + 1;
}
if (_root.level5ChestGotten) {
levelVar = levelVar + 1;
}
levelVar = levelVar + "/5";
bossVar = 0;
if (_root.levelBoss1ChestGotten) {
bossVar = bossVar + 1;
}
bossVar = bossVar + "/1";
Instance of Symbol 386 MovieClip "worldLocked" in Symbol 976 MovieClip [levelSelecta] Frame 1
onClipEvent (load) {
this.worldTag = "WORLD 1";
if (_root.notFirstTimeUnlockedWorld1) {
this._visible = false;
}
}
Symbol 997 MovieClip Frame 1
stop();
Symbol 997 MovieClip Frame 2
stop();
Symbol 997 MovieClip Frame 6
stop();
Symbol 1022 MovieClip Frame 9
stop();
Symbol 1042 MovieClip Frame 35
stop();
Symbol 1043 MovieClip Frame 37
if (_root.levelVar == "Boss3") {
_parent.gotoAndStop("idleRevealedNoAmulet");
} else {
_parent.gotoAndStop("idleRevealed");
}
Symbol 1049 MovieClip Frame 1
stop();
Symbol 1049 MovieClip Frame 4
stop();
Symbol 1057 MovieClip Frame 10
stop();
Instance of Symbol 1056 MovieClip in Symbol 1058 MovieClip Frame 1
onClipEvent (load) {
this.counter = 0;
}
onClipEvent (enterFrame) {
this.counter = this.counter + 1;
this._y = Math.sin(10 * this.counter) * 3;
}
Symbol 1075 MovieClip Frame 20
this.gotoAndPlay(5);
Symbol 1078 MovieClip Frame 15
this.gotoAndPlay(3);
Symbol 1079 MovieClip Frame 25
stop();
Symbol 1093 MovieClip Frame 35
_parent.gotoAndStop("flip");
Symbol 1153 MovieClip Frame 80
stop();
Symbol 1162 MovieClip Frame 15
_parent.gotoAndStop("hurt4Revealed");
Symbol 1174 MovieClip Frame 1
stop();
Instance of Symbol 676 MovieClip [boxBomb] in Symbol 1174 MovieClip Frame 13
onClipEvent (load) {
this.bombShelter._visible = false;
}
Instance of Symbol 676 MovieClip [boxBomb] in Symbol 1174 MovieClip Frame 13
onClipEvent (load) {
this.bombShelter._visible = false;
}
Instance of Symbol 676 MovieClip [boxBomb] in Symbol 1174 MovieClip Frame 13
onClipEvent (load) {
this.bombShelter._visible = false;
}
Instance of Symbol 997 MovieClip "chair" in Symbol 1174 MovieClip Frame 13
onClipEvent (load) {
this.count = 0;
this.originalY = this._y;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this.originalY + (Math.cos(this.count * 2) * 2);
_parent._rotation = _parent._parent.gravityRotation;
}
Instance of Symbol 180 MovieClip "button" in Symbol 1175 MovieClip [levelBoss3d] Frame 1
onClipEvent (load) {
this.originalButtonY = this.button._y;
this.originalYbuttonBox1 = _parent.buttonBox1._y;
this.originalYbuttonBox2 = _parent.buttonBox2._y;
}
onClipEvent (enterFrame) {
this.temporaryLinkBlock = _parent.blockList[Math.round((this._x + 20) / 40) - 1];
this.blockPress = false;
if (_parent._parent != _root) {
while ((this.temporaryLinkBlock != "empty") && (!this.blockPress)) {
this.blockPress = (Math.round((this._y + 20) / 40) - 1) == (Math.round((this.temporaryLinkBlock._y + 20) / 40) - 1);
this.temporaryLinkBlock = this.temporaryLinkBlock.linkBlock;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.buttonHitbox) || (_parent.heroPointer.shelter.normalHitbox.hitTest(this.buttonHitbox))) || (this.blockPress)) {
if (!this.buttonPressed) {
this.buttonPressed = true;
_root.clickSound.start();
}
} else {
this.buttonPressed = false;
}
if (this.buttonPressed) {
this.button._y = 3;
_parent.buttonBox1._y = 1000;
_parent.buttonBox2._y = 1000;
} else {
this.button._y = this.originalButtonY;
_parent.buttonBox1._y = this.originalYbuttonBox1;
_parent.buttonBox2._y = this.originalYbuttonBox2;
}
}
Instance of Symbol 163 MovieClip in Symbol 1175 MovieClip [levelBoss3d] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.startNextPhase && (_parent.boss.hitbox.hitTest(this))) {
this._x = 1000;
}
}
Instance of Symbol 163 MovieClip in Symbol 1175 MovieClip [levelBoss3d] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.startNextPhase && (_parent.boss.hitbox.hitTest(this))) {
this._x = 1000;
}
}
Instance of Symbol 1174 MovieClip "boss" in Symbol 1175 MovieClip [levelBoss3d] Frame 1
onClipEvent (load) {
this.gotoAndStop("idleRevealed");
this._xscale = -100;
this.speed = 3;
this._visible = false;
this.startNextPhase = false;
_parent.bomb._visible = false;
this.startNextPhaseCounter = 0;
this.counter = 0;
}
onClipEvent (enterFrame) {
if (((_parent.heroPointer != undefined) && ((_parent.heroPointer + "empty") != "empty")) && ((_parent.heroPointer.heroReference + "empty") == "empty")) {
if ((_root.boss3Phase == 2) && (!this.startNextPhase)) {
_parent.bomb._visible = true;
this.stopUsingAmulet = true;
this.gotoAndStop("idleRevealed");
this.animation.gotoAndPlay(this.animation._currentframe);
}
}
if ((_root.boss3Phase == 2) && (!this.startNextPhase)) {
this.counter++;
if (!this.stopUsingAmulet) {
this.gotoAndStop("useAmuletRevealed");
}
this._visible = true;
this._rotation = _root.drawingPlane1._rotation * -1;
if (_parent.gravityRotation == 0) {
this._x = this._x - this.speed;
if (this._x < 70) {
this._x = 70;
}
}
if (_parent.gravityRotation == 90) {
this._y = this._y - this.speed;
if (this._y < 70) {
this._y = 70;
}
}
if (_parent.gravityRotation == -90) {
this._y = this._y + this.speed;
if (this._y > 300) {
this._y = 300;
}
}
if (Math.abs(_parent.gravityRotation) == 180) {
this._x = this._x + this.speed;
if (this._x > 330) {
this._x = 330;
}
}
if (this.hitbox.hitTest(_parent.bomb)) {
this.startNextPhase = true;
this.startNextPhaseCounter = 1;
this.gotoAndStop("hurt3Revealed");
_root.rotateCameraModeSpeed = 2;
if ((_root.drawingPlane1._rotation % 2) != 0) {
_root.drawingPlane1._rotation = _root.drawingPlane1._rotation + 1;
_root.drawingPlane1._rotation;
}
_parent.bomb._visible = false;
}
}
if (this.startNextPhase) {
if (this.startNextPhaseCounter > 0) {
this.startNextPhaseCounter++;
}
if (this.startNextPhaseCounter == 30) {
this.gotoAndStop("idleRevealed");
this._xscale = -100;
this._y = 280;
}
if (this.startNextPhaseCounter > 10) {
this._rotation = this._rotation - 7;
}
if (this.startNextPhaseCounter > 15) {
if (this._rotation < 0) {
this._rotation = 0;
this.startNextPhaseCounter = -10;
}
}
if (this.startNextPhaseCounter == -10) {
this._x = this._x - 5;
this._rotation = this._rotation - 0.2;
}
if (_root.drawingPlane1._rotation > 0) {
_root.drawingPlane1._rotation = 0;
_root.isRotateCameraMode = false;
_root.drawingPlane1._rotation = 0;
_root.rotateCameraModeSpeed = 1;
}
if (this._x < (0 + (this._width / 2))) {
_root.mc3Shelter.mc.side.setUpdateDrawMc(true);
_root.mc3Shelter.mc.boss._x = 400 + this._x;
_root.mc3Shelter.mc.boss._y = this._y;
_root.mc3Shelter.mc.boss._xscale = this._xscale;
_root.mc3Shelter.mc.boss._rotation = this._rotation;
_root.mc3Shelter.mc.boss._visible = true;
_root.mc3Shelter.mc.boss.animation.gotoAndStop(this.animation._currentframe);
}
if (this._x < -100) {
_root.boss3Phase = 3;
this.startNextPhase = false;
this._x = -100;
}
}
}
Instance of Symbol 188 MovieClip in Symbol 1175 MovieClip [levelBoss3d] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.hitbox.hitTest(this)) {
this._x = 1000;
}
}
Instance of Symbol 188 MovieClip in Symbol 1175 MovieClip [levelBoss3d] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.hitbox.hitTest(this)) {
this._x = 1000;
}
}
Symbol 1184 MovieClip Frame 1
if (startVar == undefined) {
this.gotoAndStop(random(9) + 1);
startVar = 1;
}
Symbol 1187 MovieClip Frame 1
if (_root.totalGears <= 0) {
gear1._visible = false;
} else {
gear1._visible = true;
}
if (_root.totalGears <= 1) {
gear6._visible = false;
} else {
gear6._visible = true;
}
if (_root.totalGears <= 2) {
gear2._visible = false;
} else {
gear2._visible = true;
}
if (_root.totalGears <= 3) {
gear5._visible = false;
} else {
gear5._visible = true;
}
if (_root.totalGears <= 4) {
gear3._visible = false;
} else {
gear3._visible = true;
}
if (_root.totalGears <= 5) {
gear4._visible = false;
} else {
gear4._visible = true;
}
Instance of Symbol 109 MovieClip in Symbol 1187 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation++;
}
Symbol 1192 MovieClip Frame 1
stop();
Symbol 1192 MovieClip Frame 10
stop();
Symbol 1192 MovieClip Frame 31
stop();
Instance of Symbol 1193 MovieClip in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
blurFilter = new flash.filters.BlurFilter(2, 2, 1);
}
onClipEvent (enterFrame) {
if (_parent._parent.gravityRotation == 0) {
if (this.cubeRotateShelter != undefined) {
this.cubeRotateShelterString = this.cubeRotateShelter + "Empty";
} else {
this.cubeRotateShelterString = "Empty";
}
if (this.cubeRotateShelterString == "Empty") {
this.cube._visible = true;
}
if ((_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox) && (this.cube._visible == true)) && (this.cubeRotateShelterString == "Empty")) {
this.cube._visible = false;
_root.depth++;
this.cubeRotateShelter = _parent._parent.attachMovie("cubeRotateShelter", "cubeRotateShelter" + _root.depth, _root.depth, {_x:_parent._x, _y:_parent._y});
this.cubeRotateShelter.filters = [blurFilter];
this.cubeRotateShelter.levelText = "Tutorial";
this.bookShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
}
if ((!_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox)) && (this.cubeRotateShelter.idle == true)) {
this.bookShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
this.cubeRotateShelter.gotoAndPlay(this.cubeRotateShelter._currentframe + 1);
}
if (((Key.isDown(65) && (this.cubeRotateShelter.idle)) && (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(this.hitbox))) && (_root.isHeroPlayable)) {
_root.levelVar = 0;
_root.restart();
}
} else if (this.cubeRotateShelter != undefined) {
this.bookShelter.gotoAndStop(1);
this.cube._visible = true;
this.cubeRotateShelter.removeMovieClip();
}
}
Symbol 1200 MovieClip Frame 1
gearVar = _root.totalGears;
gearVar = gearVar + "/6";
amuletVar = 0;
if (_root.levelBoss1ChestGotten) {
amuletVar = amuletVar + 1;
}
if (_root.levelBoss2ChestGotten) {
amuletVar = amuletVar + 1;
}
if (_root.levelBoss3ChestGotten) {
amuletVar = amuletVar + 1;
}
amuletVar = amuletVar + "/3";
Symbol 1204 MovieClip Frame 1
stop();
Instance of Symbol 1174 MovieClip "chairman" in Symbol 1205 MovieClip [levelSelectd] Frame 1
onClipEvent (load) {
this.startVar = 0;
this.speakBubbleMiniShelter = "";
this.originX = this._x;
this.originY = this._y;
this.count = 0;
}
onClipEvent (enterFrame) {
if ((_parent.mudBlock3._y == 1000) && (_parent.invisibleBlock._y != 1000)) {
_parent.invisibleBlock._y = 1000;
}
if (this.startVar == 0) {
this.swapDepths(_parent.getNextHighestDepth());
this.startVar = 1;
}
if ((((_parent.heroPointer != undefined) && ((_parent.heroPointer + "empty") != "empty")) && ((_parent.heroPointer.heroReference + "empty") == "empty")) && (_parent._parent != _root)) {
if (this.getDepth() < _parent.heroPointer.getDepth()) {
this.startVar = 0;
}
}
if (_root.levelBoss3ChestGotten) {
this.gotoAndStop("chair");
this.count = this.count + 0.3;
if (_parent.gravityRotation == 0) {
this._y = this.originY + (Math.cos(this.count) * 2);
} else {
this._x = (this.originX + (Math.cos(this.count) * 2)) + 15;
}
} else if (this.hitTest(_parent.heroPointer.hitbox)) {
this.gotoAndStop("talk");
if (((this.speakBubbleMiniShelter + "Empty") == "Empty") || (this.speakBubbleMiniShelter == undefined)) {
this.speakBubbleMiniShelter = _parent.attachMovie("speakBubbleMiniShelter", "speakBubbleMiniShelter" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth());
_parent.cubeRotateShelterPointer = this.speakBubbleMiniShelter;
if (_parent.gravityRotation == 0) {
this.speakBubbleMiniShelter._x = this._x + 60;
this.speakBubbleMiniShelter._y = this._y - 55;
} else {
this.speakBubbleMiniShelter._x = this._x + 55;
this.speakBubbleMiniShelter._y = this._y - 60;
this.speakBubbleMiniShelter._rotation = 90;
this.speakBubbleMiniShelter._xscale = -100;
}
this.speakBubbleMiniShelter.idle = false;
}
} else {
if (((this.speakBubbleMiniShelter + "Empty") != "Empty") || (this.speakBubbleMiniShelter != undefined)) {
if (this.speakBubbleMiniShelter.idle) {
this.speakBubbleMiniShelter.gotoAndPlay(this.speakBubbleMiniShelter._currentframe + 1);
this.speakBubbleMiniShelter.idle = false;
}
}
this.gotoAndStop("idle");
}
}
Instance of Symbol 57 MovieClip "machineHitbox" in Symbol 1205 MovieClip [levelSelectd] Frame 1
onClipEvent (load) {
blurFilter = new flash.filters.BlurFilter(2, 2, 1);
this.machineLabelOn = false;
this.buttonPressed = false;
this.moveCubeDirection = -1;
this.counter = 0;
this.originAlChairmanRotation = _parent.chairman._rotation;
this.originAlChairmanXscale = _parent.chairman._xscale;
this.originAlChairmanX = _parent.chairman._x;
this.originAlChairmanY = _parent.chairman._y;
}
onClipEvent (enterFrame) {
if (_parent.gearPuzzle == undefined) {
_parent.gearPuzzle = "";
}
if ((((_parent.heroPointer.hitTest(this) && (Key.isDown(65))) && (_root.gravity == 0)) && ((_parent.gearPuzzle + "empty") == "empty")) && (!_root.machineIsWorking)) {
_root.isHeroPlayable = false;
_parent.heroPointer.shelter.gotoAndStop("idle");
_parent.gearPuzzle = _parent.attachMovie("gearPuzzle", "gearPuzzle", _parent.getNextHighestDepth(), {_x:200, _y:146});
_parent.gearPuzzle._visible = false;
_parent.gearPuzzle._alpha = 0;
_parent.gearPuzzle.makeVisible = true;
_parent.cursor._visible = true;
_parent.cursor.swapDepths(_parent.getNextHighestDepth());
if (this.machineLabelOn) {
this.buttonPressed = true;
}
}
if ((((_parent.heroPointer.hitTest(this) && (Key.isDown(65))) && (_root.gravity == 0)) && ((_parent.gearPuzzle + "empty") == "empty")) && (_root.machineIsWorking)) {
_root.isHeroPlayable = false;
_parent.heroPointer.shelter.gotoAndStop("idle");
this.counter = 1;
}
if (this.counter > 0) {
this.counter++;
}
if (this.counter == 4) {
_parent.machine.gear1.gotoAndPlay(_parent.machine.gear1._currentframe);
}
if (this.counter == 6) {
_parent.machine.gear2.gotoAndPlay(_parent.machine.gear2._currentframe);
}
if (this.counter == 8) {
_parent.machine.gear3.gotoAndPlay(_parent.machine.gear3._currentframe);
}
if (this.counter == 10) {
_parent.machine.gear4.gotoAndPlay(_parent.machine.gear4._currentframe);
}
if (this.counter == 12) {
_parent.machine.gear5.gotoAndPlay(_parent.machine.gear5._currentframe);
}
if (this.counter == 14) {
_parent.machine.gear6.gotoAndPlay(_parent.machine.gear6._currentframe);
}
if (this.counter == 30) {
_root.engine.moveCube(this.moveCubeDirection, "Z");
_parent.machine.gear1.gotoAndStop(_parent.machine.gear1._currentframe);
_parent.machine.gear2.gotoAndStop(_parent.machine.gear2._currentframe);
_parent.machine.gear3.gotoAndStop(_parent.machine.gear3._currentframe);
_parent.machine.gear4.gotoAndStop(_parent.machine.gear4._currentframe);
_parent.machine.gear5.gotoAndStop(_parent.machine.gear5._currentframe);
_parent.machine.gear6.gotoAndStop(_parent.machine.gear6._currentframe);
this.moveCubeDirection = this.moveCubeDirection * -1;
if (_root.notFirstTimeUnlockedWorldBonus) {
this.counter = 0;
}
}
if ((this.counter > 30) && (this.counter < 80)) {
_root.isHeroPlayable = false;
_parent.heroPointer.shelter.gotoAndStop("idle");
}
if (this.counter > 80) {
_root.mc5Shelter.mc.worldLocked._rotation = 180;
_root.machineIsWorkingAndMoved = true;
_root.user.data.machineIsWorkingAndMoved = _root.machineIsWorkingAndMoved;
this.counter = 0;
}
if ((_root.isHeroPlayable && (this.moveCubeDirection == 1)) && (_parent.chairman._rotation != 90)) {
_parent.chairman._rotation = 90;
_parent.chairman._xscale = -100;
_parent.chairman._x = 110;
_parent.chairman._y = 140;
}
if ((_root.isHeroPlayable && (this.moveCubeDirection == -1)) && (_parent.chairman._rotation != this.originAlChairmanRotation)) {
_parent.chairman._rotation = this.originAlChairmanRotation;
_parent.chairman._xscale = this.originAlChairmanXscale;
_parent.chairman._x = this.originAlChairmanX;
_parent.chairman._y = this.originAlChairmanY;
}
if ((_parent.heroPointer.hitTest(this) && (Key.isDown(83))) || (_parent.gearPuzzle.makeVisible && (_root.machineIsWorking))) {
_root.isHeroPlayable = true;
_parent.gearPuzzle.makeVisible = false;
_parent.cursor._visible = false;
}
if ((_parent.heroPointer.hitTest(this) && (!this.machineLabelOn)) && (!_parent.gearPuzzle.makeVisible)) {
this.machineLabelShelter = _parent.attachMovie("machineLabelShelter", "machineLabelShelter" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:180, _y:200});
if (_root.machineIsWorking) {
this.machineLabelShelter.machineLabel.gotoAndStop(2);
}
this.machineLabelShelter.filters = [blurFilter];
this.machineLabelOn = true;
}
if (_parent.gravityRotation == 0) {
this.machineLabelShelter._x = 180;
this.machineLabelShelter._y = 200;
this.machineLabelShelter._rotation = 0;
}
if (_parent.gravityRotation == 90) {
this.machineLabelShelter._x = 280;
this.machineLabelShelter._y = 280;
this.machineLabelShelter._rotation = 90;
}
if (((!_parent.heroPointer.hitTest(this)) && (this.machineLabelOn)) || (this.buttonPressed && (this.machineLabelOn))) {
this.machineLabelShelter.gotoAndPlay(10);
this.machineLabelOn = false;
this.buttonPressed = false;
}
}
Instance of Symbol 1204 MovieClip "cursor" in Symbol 1205 MovieClip [levelSelectd] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (this._visible) {
if (Key.isDown(39)) {
this._x = this._x + 7;
}
if (Key.isDown(37)) {
this._x = this._x - 7;
}
if (Key.isDown(38)) {
this._y = this._y - 7;
}
if (Key.isDown(40)) {
this._y = this._y + 7;
}
if (this._x > 382) {
this._x = 382;
}
if (this._x < 18) {
this._x = 18;
}
if (this._y < 18) {
this._y = 18;
}
if (this._y > 376) {
this._y = 376;
}
this.gotoAndStop(1);
this.gearI = 0;
while (this.gearI < _parent.gearPuzzle.gearArray.length) {
if (_parent.gearPuzzle.gearArray[this.gearI].hitboxGearShelter.hitTest(this) && (_parent.gearPuzzle.gearArray[this.gearI].gearType != 0)) {
this.gotoAndStop(2);
}
this.gearI++;
}
if (this._currentframe == 2) {
if (Key.isDown(1) || (Key.isDown(65))) {
this.gotoAndStop(3);
}
}
}
}
Instance of Symbol 641 MovieClip "diamondTeleport" in Symbol 1205 MovieClip [levelSelectd] Frame 1
onClipEvent (load) {
blurFilter = new flash.filters.BlurFilter(2, 2, 1);
var matrix = new Array();
waitCount = 0;
brightnessCount = 1;
alphaCount = 1;
brightnessFilter = new flash.filters.ColorMatrixFilter(matrix);
this.transitionDone = true;
BombBagCounter = 0;
if ((_root.levelJustVisited == "Diamond") || (_root.levelJustVisited == "BombBag")) {
brightnessCount = 3;
alphaCount = 0;
this.needToStepOff = false;
this.transitionDone = false;
} else {
this.needToStepOff = true;
}
}
onClipEvent (enterFrame) {
if (_parent._parent != _root) {
if ((_parent.gravityRotation != 0) && ((_root.levelJustVisited != "BombBag") || (this._rotation != 90))) {
if ((this.oldTopHitboxx == this.topHitbox._x) || (this.oldTopHitboxx == undefined)) {
this.oldTopHitboxx = this.topHitbox._x;
this.oldHitboxx = this.hitbox._x;
this.topHitbox._x = 1000;
this.hitbox._x = 1000;
}
} else {
this.topHitbox._x = this.oldTopHitboxx;
this.hitbox._x = this.oldHitboxx;
}
}
if (((!this.transitionDone) && (_root.isHeroPlayable)) && (_parent._parent != _root)) {
_root.isHeroPlayable = false;
}
if ((((!this.needToStepOff) && (!this.transitionDone)) && (!_root.isHeroPlayable)) && (_parent._parent != _root)) {
_parent.heroPointer.shelter.gotoAndStop("idle");
waitCount = waitCount + 0.1;
if ((waitCount > 0.5) && (alphaCount < 1)) {
alphaCount = alphaCount + 0.1;
}
if (alphaCount >= 0.5) {
brightnessCount = brightnessCount - 0.1;
}
var matrix = new Array();
matrix = matrix.concat([brightnessCount, 0, 0, 0, 0]);
matrix = matrix.concat([0, brightnessCount, 0, 0, 0]);
matrix = matrix.concat([0, 0, brightnessCount, 0, 0]);
matrix = matrix.concat([0, 0, 0, alphaCount, 0]);
brightnessFilter.matrix = matrix;
this.filters = [brightnessFilter];
_parent.heroPointer.filters = [brightnessFilter];
if (brightnessCount <= 1) {
waitCount = 0;
brightnessCount = 1;
alphaCount = 1;
this.filters = undefined;
_parent.heroPointer.filters = undefined;
this.transitionDone = true;
_root.isHeroPlayable = true;
}
}
if ((_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox) && (!this.showLabel)) && (this.needToStepOff)) {
this.showLabel = true;
this.diamondLabelShelter = _parent.attachMovie("diamondLabelShelter", "diamondLabelShelter" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:this._x, _y:this._y - 120});
this.diamondLabelShelter.filters = [blurFilter];
}
if (!_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox)) {
this.needToStepOff = true;
}
if (BombBagCounter >= 0) {
BombBagCounter++;
}
if (((_root.levelJustVisited == "BombBag") && (BombBagCounter >= 0)) && (BombBagCounter < 10)) {
this.needToStepOff = false;
BombBagCounter = -1;
}
if ((_root.levelJustVisited == "BombBag") && (this.needToStepOff)) {
BombBagCounter2++;
if (BombBagCounter2 > 5) {
if (this._rotation <= 0) {
this._rotation = 0;
} else {
this._rotation = this._rotation - 5;
}
}
} else {
BombBagCounter2 = 0;
}
if ((!_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox)) && (this.showLabel)) {
this.diamondLabelShelter.gotoAndPlay(10);
this.showLabel = false;
}
if (((Key.isDown(65) && (_parent.heroPointer.shelter.feetHitbox.hitTest(this.hitbox))) && (_root.isHeroPlayable)) && (this.needToStepOff)) {
startTeleport = true;
_root.isHeroPlayable = false;
this.diamondLabelShelter.gotoAndPlay(10);
_root.levelVar = "Diamond";
}
if (startTeleport) {
waitCount = waitCount + 0.1;
if (waitCount > 1) {
brightnessCount = brightnessCount + 0.1;
}
if (brightnessCount > 2) {
alphaCount = alphaCount - 0.05;
}
var matrix = new Array();
matrix = matrix.concat([brightnessCount, 0, 0, 0, 0]);
matrix = matrix.concat([0, brightnessCount, 0, 0, 0]);
matrix = matrix.concat([0, 0, brightnessCount, 0, 0]);
matrix = matrix.concat([0, 0, 0, alphaCount, 0]);
brightnessFilter.matrix = matrix;
this.filters = [brightnessFilter];
_parent.heroPointer.filters = [brightnessFilter];
if (alphaCount < 0) {
_root.restart();
}
}
}
Instance of Symbol 1174 MovieClip "boss" in Symbol 1208 MovieClip [levelBoss3c] Frame 1
onClipEvent (load) {
this.moveDirection = -1;
this.isMoving = true;
this.thrownBlockCounter = 0;
this.gotoAndStop("idleRevealed");
this._visible = false;
this.thrownBlocks = 0;
this.startNextPhase = false;
this.startNextPhaseCounter = 0;
this.startVar = 0;
}
onClipEvent (enterFrame) {
if ((_root.boss3Phase == 3) && (!this.startNextPhase)) {
if (!(((_parent.heroPointer != undefined) && ((_parent.heroPointer + "empty") != "empty")) && ((_parent.heroPointer.heroReference + "empty") == "empty"))) {
_root.mc3Shelter.mc.side.setUpdateDrawMc(true);
}
if (this.startVar == 0) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
_root.mc1Shelter.mc.boss.removeBoxes = true;
this.startVar = 1;
}
if (this._y > 90) {
this._y = this._y - 5;
}
this._visible = true;
if (this.isMoving) {
this._x = this._x + (5 * this.moveDirection);
this._rotation = this._rotation + (0.2 * this.moveDirection);
}
if (!this.isMoving) {
}
this._xscale = 100 * this.moveDirection;
if (Math.round(this._x / 40) == Math.round((_parent.heroPointer._x + 20) / 40)) {
if (this.thrownBlockCounter == 0) {
if (Math.round((_parent.heroPointer._y + 20) / 40) >= 2) {
this.isMoving = false;
this.thrownBlockCounter = 1;
}
}
}
if (this.thrownBlockCounter > 0) {
this.thrownBlockCounter++;
}
if (this.thrownBlockCounter == 10) {
if (Math.round((_parent.heroPointer._y + 20) / 40) >= 2) {
if (this.thrownBlocks < 4) {
this.boxBomb = _parent.attachMovie("boxBomb", "boxBomb" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:(Math.round(this._x / 40) * 40) - 20, _y:((Math.round(this._y / 40) - 1) * 40) - 20});
this.boxBomb.boxSpeed = 0;
this.boxBomb._alpha = 0;
} else {
if (this.boxSpring != undefined) {
this.boxSpring.prevBlock.linkBlock = this.boxSpring.linkBlock;
this.boxSpring.linkBlock.prevBlock = this.boxSpring.prevBlock;
if (this.boxSpring.linkBlock == "empty") {
_parent.blockList[Math.round((this.boxSpring._x + 20) / 40) - 1].tail = this.boxSpring.prevBlock;
}
this.boxSpring.removeMovieClip();
}
this.boxSpring.removeMovieClip();
this.boxSpring = _parent.attachMovie("boxSpring", "boxSpring" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:(Math.round(this._x / 40) * 40) - 20, _y:((Math.round(this._y / 40) - 1) * 40) - 20});
this.boxSpring.boxSpeed = 0;
this.boxSpring._alpha = 0;
this.thrownBlocks = 0;
}
this.gotoAndStop("useAmuletRevealed");
this.thrownBlocks++;
}
}
this.boxBomb._alpha = this.boxBomb._alpha + 15;
this.boxSpring._alpha = this.boxSpring._alpha + 15;
if (this.thrownBlockCounter > 20) {
this.boxBomb.boxSpeed = 1;
this.boxSpring.boxSpeed = 2;
}
if (this.thrownBlockCounter > 25) {
this.boxBomb.bombShelter.gotoAndStop("explode");
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this.boxBomb.bombShelter.bombExplode)) {
_root.restart();
}
}
if (this.thrownBlockCounter > 40) {
this.isMoving = true;
this.gotoAndStop("idleRevealed");
}
if (this.thrownBlockCounter > 60) {
this.thrownBlockCounter = 0;
}
if (this._x > 350) {
this.moveDirection = this.moveDirection * -1;
this._rotation = 0;
this._x = 350;
}
if (this._x < 50) {
this.moveDirection = this.moveDirection * -1;
this._rotation = 0;
this._x = 50;
}
if (this.hitbox.hitTest(this.boxBomb) && (this.boxBomb.hasHitSpring)) {
this.boxBomb.removeMovieClip();
this.gotoAndStop("hurt3Revealed");
this._rotation = 0;
this.startNextPhase = true;
this.startNextPhaseCounter = 1;
}
}
if (this.startNextPhase && (_parent._parent != _root)) {
if (this.startNextPhaseCounter > 0) {
this.startNextPhaseCounter++;
}
if (this.startNextPhaseCounter > 20) {
this._x = this._x - 5;
this._rotation = this._rotation - 0.2;
this._xscale = -100;
this.gotoAndStop("idleRevealed");
}
if (this._x < (0 + (this._width / 2))) {
_root.mc2Shelter.mc.side.setUpdateDrawMc(true);
_root.mc2Shelter.mc.boss._x = 400 + this._x;
_root.mc2Shelter.mc.boss._y = this._y;
_root.mc2Shelter.mc.boss._xscale = this._xscale;
_root.mc2Shelter.mc.boss._rotation = this._rotation;
_root.mc2Shelter.mc.boss._visible = true;
_root.mc2Shelter.mc.boss.animation.gotoAndStop(this.animation._currentframe);
}
if (this._x < -100) {
_root.boss3Phase = 4;
this.startNextPhase = false;
this._x = -100;
}
}
}
Instance of Symbol 163 MovieClip in Symbol 1208 MovieClip [levelBoss3c] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.hitbox.hitTest(this)) {
this._x = 1000;
}
}
Instance of Symbol 163 MovieClip in Symbol 1208 MovieClip [levelBoss3c] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.hitbox.hitTest(this)) {
this._x = 1000;
}
}
Instance of Symbol 188 MovieClip in Symbol 1209 MovieClip [levelBoss3b] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.hitbox.hitTest(this)) {
this._x = 1000;
}
}
Instance of Symbol 188 MovieClip in Symbol 1209 MovieClip [levelBoss3b] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.hitbox.hitTest(this)) {
this._x = 1000;
}
}
Instance of Symbol 188 MovieClip in Symbol 1209 MovieClip [levelBoss3b] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.hitbox.hitTest(this)) {
this._x = 1000;
}
}
Instance of Symbol 188 MovieClip in Symbol 1209 MovieClip [levelBoss3b] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.startNextPhase && (_parent.boss.hitbox.hitTest(this))) {
this._x = 1000;
}
}
Instance of Symbol 188 MovieClip in Symbol 1209 MovieClip [levelBoss3b] Frame 1
onClipEvent (enterFrame) {
if (_parent.boss.startNextPhase && (_parent.boss.hitbox.hitTest(this))) {
this._x = 1000;
}
}
Instance of Symbol 1174 MovieClip "boss" in Symbol 1209 MovieClip [levelBoss3b] Frame 1
onClipEvent (load) {
this.gotoAndStop("idleRevealed");
this._xscale = -100;
this.speed = 7;
this._visible = false;
this.addAngle = 180;
this.counter = 1;
this.startCharge = false;
this.charge = false;
this.chargeCounter = 0;
this.numberOfCharges = 0;
this.moveRoundVar = 1;
this.confusedCounter = 0;
this.startNextPhase = false;
this.startVar = 0;
this.lockRotation = false;
this.startNextPhaseCounter = 0;
}
onClipEvent (enterFrame) {
if ((_root.boss3Phase == 4) && (!this.startNextPhase)) {
_root.mc2Shelter.mc.side.setUpdateDrawMc(true);
if (_parent.heroPointer.shelter.normalHitbox.hitTest(this.hitbox)) {
if (!this.isConfused) {
_root.restart();
}
}
if ((!(((_parent.heroPointer != undefined) && ((_parent.heroPointer + "empty") != "empty")) && ((_parent.heroPointer.heroReference + "empty") == "empty"))) && (_parent._parent != _root)) {
this.counter = 1;
this.startCharge = false;
this.charge = false;
this.chargeCounter = 0;
this.numberOfCharges = 0;
this.moveRoundVar = 1;
this.confusedCounter = 0;
this.startVar = 0;
this.gotoAndStop("useAmuletRevealed");
this._rotation = _parent.gravityRotation - 90;
this.lockRotation = false;
_root.isRotateCameraMode = true;
}
}
if ((((_root.boss3Phase == 4) && (!this.startNextPhase)) && (((_parent.heroPointer != undefined) && ((_parent.heroPointer + "empty") != "empty")) && ((_parent.heroPointer.heroReference + "empty") == "empty"))) && (_parent._parent != _root)) {
if (this.startVar == 0) {
this.gotoAndStop("idleRevealed");
this.startVar = 1;
}
this._visible = true;
this._xscale = -100;
if (this._x < _parent.heroPointer._x) {
this.addAngle = 180;
} else {
this.addAngle = 0;
}
this.slope = (_parent.heroPointer._y - this._y) / (_parent.heroPointer._x - this._x);
if (this.startCharge) {
this.counter++;
}
if (this.counter == 2) {
if ((_parent.gravityRotation == 0) || (_parent.gravityRotation == 90)) {
if (this._rotation > (_parent.gravityRotation - 90)) {
this._rotation = _parent.gravityRotation - 90;
}
}
if (Math.abs(_parent.gravityRotation) == 180) {
if (this._rotation > ((360 + _parent.gravityRotation) - 90)) {
this._rotation = _parent.gravityRotation - 90;
}
}
if (_parent.gravityRotation == -90) {
if (this._rotation < 0) {
this._rotation = _parent.gravityRotation - 90;
}
}
this.chargeXSpeed = Math.cos((this._rotation * Math.PI) / 180) * -60;
this.chargeYSpeed = Math.sin((this._rotation * Math.PI) / 180) * -60;
this.lockRotation = true;
}
if ((this.counter % 30) == 0) {
this.charge = true;
this.gotoAndStop("chargeRevealed");
this.startCharge = false;
this.counter = 1;
}
if (this.charge) {
if ((((this._x >= 70) && (this._x <= 330)) && (this._y >= 70)) && (this._y <= 330)) {
this._y = this._y + this.chargeYSpeed;
this._x = this._x + this.chargeXSpeed;
this.outOfBound = false;
}
if (this._x < 70) {
this.outOfBound = true;
this._x = 70;
}
if (this._x > 330) {
this.outOfBound = true;
this._x = 330;
}
if (this._y < 70) {
this.outOfBound = true;
this._y = 70;
}
if (this._y > 330) {
this.outOfBound = true;
this._y = 330;
}
if (this.outOfBound) {
if (this.chargeCounter == 0) {
this.chargeCounter = 1;
if (!this.isConfused) {
this.gotoAndStop("idleRevealed");
}
}
if (this.chargeCounter == 2) {
this.chargeCounter = 0;
if (this.isConfused) {
this.confusedCounter = 1;
} else {
this.lockRotation = false;
this.charge = false;
}
}
}
if (this.hitbox.hitTest(_parent.plateHitbox)) {
if (this.chargeCounter == 1) {
this.gotoAndStop("hurtRevealed");
this.isConfused = true;
}
}
if (!this.isConfused) {
if (this.chargeCounter == 1) {
this.chargeXSpeed = this.chargeXSpeed * -0.5;
this.chargeYSpeed = this.chargeYSpeed * -0.5;
this.chargeCounter = 2;
}
}
if (this.isConfused) {
if (this.chargeCounter == 1) {
this.chargeXSpeed = this.chargeXSpeed * 0;
this.chargeYSpeed = this.chargeYSpeed * -0.1;
this.chargeCounter = 2;
}
if (this.chargeCounter == 2) {
this._rotation = this._rotation + 20;
}
if (this.confusedCounter > 0) {
if (this.topHitbox.hitTest(_parent.heroPointer.shelter.feetHitbox) && (_root.gravity > 0)) {
_parent.heroPointer.animationVar = "jump";
_root.jumpAnimationDone = false;
_root.gravity = _root.gravity - 19.5;
_root.jumpPower = -19.5;
this.startNextPhase = true;
_root.rotateCameraModeSpeed = -1;
this.startNextPhaseCounter = 0;
this.gotoAndStop("hurt2Revealed");
}
}
}
if (this.confusedCounter > 0) {
this._rotation = 0;
this.chargeYSpeed = 0;
this._y = 285;
this.confusedCounter++;
}
if (this.confusedCounter > 110) {
this.lockRotation = false;
this.charge = false;
this.confusedCounter = 0;
this.isConfused = false;
this.chargeCounter = 0;
this.gotoAndStop("idleRevealed");
}
}
if (this.lockRotation && (!this.charge)) {
this.gotoAndStop("chargeUpRevealed");
}
if (!this.lockRotation) {
this._rotation = (Math.atan(this.slope) * 57.2957795130823) + this.addAngle;
}
}
if (_root.boss3Phase == 4) {
if ((!this.charge) && (!this.startCharge)) {
if (_parent.gravityRotation == 0) {
this._x = this._x - this.speed;
if (this._x < 70) {
this._x = 70;
if (this.moveRoundVar == 1) {
this.startCharge = true;
}
this.moveRoundVar = 2;
}
}
if (_parent.gravityRotation == -90) {
this._y = this._y + this.speed;
if (this._y > 330) {
this._y = 330;
if (this.moveRoundVar == 2) {
this.startCharge = true;
}
this.moveRoundVar = 3;
}
}
if (Math.abs(_parent.gravityRotation) == 180) {
this._x = this._x + this.speed;
if (this._x > 330) {
this._x = 330;
if (this.moveRoundVar == 3) {
this.startCharge = true;
}
this.moveRoundVar = 4;
}
}
if (_parent.gravityRotation == 90) {
this._y = this._y - this.speed;
if (this._y < 70) {
this._y = 70;
if (this.moveRoundVar == 4) {
this.startCharge = true;
}
this.moveRoundVar = 1;
}
}
}
}
if (this.startNextPhase) {
this.startNextPhaseCounter++;
if (this.startNextPhaseCounter > 15) {
this._x = this._x - 7;
this._xscale = -100;
this.gotoAndStop("brokenRevealed");
}
if (Math.round(_root.drawingPlane1._rotation) == 0) {
_root.drawingPlane1._rotation = 0;
_root.isRotateCameraMode = false;
_root.drawingPlane1._rotation = 0;
_root.rotateCameraModeSpeed = 1;
}
if (_root.boss3Phase == 4) {
if (this._x < (0 + (this._width / 2))) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
_root.mc1Shelter.mc.boss2._x = 400 + this._x;
_root.mc1Shelter.mc.boss2._xscale = this._xscale;
_root.mc1Shelter.mc.boss2._y = this._y;
_root.mc1Shelter.mc.boss2._rotation = this._rotation;
_root.mc1Shelter.mc.boss2._visible = true;
_root.mc1Shelter.mc.boss2.gotoAndStop("brokenRevealed");
_root.mc1Shelter.mc.boss2.animation.gotoAndStop(this.animation._currentframe);
}
if (this._x < -100) {
_root.boss3Phase = 5;
this._x = -100;
}
}
}
}
Symbol 1210 MovieClip Frame 40
_parent.gotoAndStop("shine");
Symbol 1216 MovieClip Frame 20
_parent.gotoAndStop("shine");
Symbol 1217 MovieClip Frame 35
_parent.gotoAndStop("merge");
Symbol 1218 MovieClip Frame 1
stop();
Instance of Symbol 41 MovieClip in Symbol 1218 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Symbol 1219 MovieClip Frame 1
stop();
Symbol 1219 MovieClip Frame 65
stop();
_parent.chairman.gotoAndStop("idleRevealed");
Instance of Symbol 1174 MovieClip "boss" in Symbol 1220 MovieClip [levelBoss3a] Frame 1
onClipEvent (load) {
this.moveDirection = 1;
this.isMoving = true;
this.thrownBlockCounter = 0;
this.isActivated = true;
this.countToRotate = 0;
this.gotoAndStop("idleRevealed");
this.boxArray = new Array();
this.boxStackArray = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this.removeBoxes = false;
this._visible = false;
}
onClipEvent (enterFrame) {
if (_parent._parent != _root) {
if (this.isActivated && (_root.boss3Phase == 1)) {
this._visible = true;
_parent.amuletPart._visible = false;
_parent.amuletPart._x = 1000;
_parent.amulet._visible = false;
if (this.isMoving) {
this._x = this._x + (5 * this.moveDirection);
this._rotation = this._rotation + (0.2 * this.moveDirection);
}
if (!this.isMoving) {
}
this._xscale = 100 * this.moveDirection;
if (Math.round(this._x / 40) == Math.round((_parent.heroPointer._x + 20) / 40)) {
if (this.thrownBlockCounter == 0) {
if ((Math.round((_parent.heroPointer._y + 20) / 40) >= 5) && (this.boxStackArray[Math.round(this._x / 40)] < 4)) {
this.isMoving = false;
this.thrownBlockCounter = 1;
}
}
}
if (this.thrownBlockCounter > 0) {
this.thrownBlockCounter++;
}
if (this.thrownBlockCounter == 2) {
this.gotoAndStop("useAmuletRevealed");
}
if (this.thrownBlockCounter == 10) {
if ((Math.round((_parent.heroPointer._y + 20) / 40) >= 5) && (this.boxStackArray[Math.round(this._x / 40)] < 4)) {
this.boxStackArray[Math.round(this._x / 40)] = this.boxStackArray[Math.round(this._x / 40)] + 1;
this.boxBlock = _parent.attachMovie("boxBlock", "boxBlock" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:(Math.round(this._x / 40) * 40) - 20, _y:((Math.round(this._y / 40) - 1) * 40) - 20});
this.boxBlock._alpha = 0;
this.boxBlock.boxSpeed = 0;
this.boxArray.push(this.boxBlock);
}
}
this.boxBlock._alpha = this.boxBlock._alpha + 10;
if (this.thrownBlockCounter > 25) {
this.boxBlock._alpha = 100;
this.boxBlock.boxSpeed = 2;
}
if (this.thrownBlockCounter > 30) {
this.isMoving = true;
this.gotoAndStop("idleRevealed");
}
if (this.thrownBlockCounter > 60) {
this.thrownBlockCounter = 0;
}
if (this.topHitbox.hitTest(_parent.heroPointer.shelter.feetHitbox) && (_root.gravity > 0)) {
if (this.countToRotate == 0) {
this.gotoAndStop("hurt2Revealed");
this.thrownBlockCounter = 0;
this.isMoving = false;
this.countToRotate = 1;
_parent.heroPointer.animationVar = "jump";
_root.jumpAnimationDone = false;
_root.gravity = _root.gravity - 19.5;
_root.jumpPower = -19.5;
this.isActivated = false;
}
}
if (this.countToRotate <= 0) {
if (this._x > 350) {
this.moveDirection = this.moveDirection * -1;
this._rotation = 0;
this._x = 350;
}
if (this._x < 50) {
this.moveDirection = this.moveDirection * -1;
this._rotation = 0;
this._x = 50;
}
}
}
if (this.countToRotate > 0) {
this.countToRotate++;
}
if ((this.countToRotate > 0) && (this.countToRotate <= 15)) {
this._y = this._y + 5;
}
if (this.countToRotate > 15) {
if (this._y > 80) {
this._y = this._y - 5;
}
this.gotoAndStop("idleRevealed");
this._x = this._x - 5;
this._rotation = this._rotation - 0.7;
this._xscale = -100;
}
if (_root.boss3Phase == 1) {
if (this._x < (0 + (this._width / 2))) {
_root.mc4Shelter.mc.side.setUpdateDrawMc(true);
_root.mc4Shelter.mc.boss._x = 400 + this._x;
_root.mc4Shelter.mc.boss._y = this._y;
_root.mc4Shelter.mc.boss._rotation = this._rotation;
_root.mc4Shelter.mc.boss._visible = true;
_root.mc4Shelter.mc.boss.animation.gotoAndStop(this.animation._currentframe);
}
if (this._x < -100) {
_root.boss3Phase = 2;
_root.isRotateCameraMode = true;
this.countToRotate = 0;
this._x = -100;
}
}
if (this.removeBoxes) {
this.boxI = 0;
while (this.boxI < this.boxArray.length) {
this.tempBox = this.boxArray[this.boxI];
this.tempBox.prevBlock.linkBlock = this.tempBox.linkBlock;
this.tempBox.linkBlock.prevBlock = this.tempBox.prevBlock;
if (this.tempBox.linkBlock == "empty") {
_parent.blockList[Math.round((this.tempBox._x + 20) / 40) - 1].tail = this.tempBox.prevBlock;
}
this.tempBox.removeMovieClip();
this.boxI++;
}
this.removeBoxes = false;
}
}
}
Instance of Symbol 1174 MovieClip "boss2" in Symbol 1220 MovieClip [levelBoss3a] Frame 1
onClipEvent (load) {
this.moveDirection = -1;
this.isMoving = true;
this._visible = false;
}
onClipEvent (enterFrame) {
if ((_root.boss3Phase == 5) && (_parent._parent != _root)) {
_root.mc1Shelter.mc.side.setUpdateDrawMc(true);
this._visible = true;
if (this.isMoving) {
this.gotoAndStop("brokenRevealed");
this.animation.gotoAndPlay(this.animation._currentframe);
this._x = this._x + (7 * this.moveDirection);
}
this._xscale = 100 * this.moveDirection;
if (this.isMoving) {
if ((this._x < 30) && (this.moveDirection == -1)) {
this.moveDirection = 1;
}
if ((this._x > 110) && (this.moveDirection == 1)) {
this.isMoving = false;
this.gotoAndStop("hurt4TransitionRevealed");
this.isHurt = true;
}
}
if ((this.hurtHitbox.hitTest(_parent.heroPointer.shelter.feetHitbox) && (this.isHurt)) && (_root.gravity > 0)) {
this.gotoAndStop("absorbRevealed");
_parent.heroPointer.animationVar = "jump";
_root.jumpAnimationDone = false;
_root.gravity = _root.gravity - 6.5;
_root.jumpPower = -6.5;
this.gameCompletedVar = true;
}
if (this.gameCompletedVar) {
_root.levelBoss3ChestGotten = true;
_root.attachMovie("transitionShelter", "transitionShelter" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:280, _y:200});
this.gameCompletedVar = false;
}
}
}
Instance of Symbol 1218 MovieClip "amulet" in Symbol 1220 MovieClip [levelBoss3a] Frame 1
onClipEvent (load) {
this.count = 0;
this.count2 = 0;
this.gotoAndStop("shine");
this._visible = false;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_root.amuletPartGottenTemporary && (this.count2 >= 0)) {
if (this.count2 == 0) {
_root.isHeroPlayable = false;
_root.doubleHeroArray[0].shelter.gotoAndPlay("idle");
this.gotoAndStop("beforeMerge");
this._visible = true;
}
this.count2++;
if (this.count2 > 150) {
_root.doubleHeroArray[0]._xscale = -100;
_parent.chairman._visible = true;
_parent.chairman.isMoving = true;
this.count2 = -1;
}
}
}
Instance of Symbol 1174 MovieClip "chairman" in Symbol 1220 MovieClip [levelBoss3a] Frame 1
onClipEvent (load) {
this._visible = false;
this.isMoving = false;
this.counter = 0;
this.startVar = 0;
}
onClipEvent (enterFrame) {
if (this.startVar == 0) {
this._x = -100;
this.startVar = 1;
}
if (this.isMoving) {
this._x = this._x + 5;
this._rotation = this._rotation + 0.2;
}
if (this._x > 100) {
this.isMoving = false;
this.counter = 1;
this._rotation = 0;
this._x = 100;
}
if (this.counter > 0) {
this.counter = this.counter + 1;
}
if (this.counter == 40) {
this.gotoAndStop("reveal");
}
if (this.counter == 100) {
this.gotoAndStop("useMagicRevealed");
_parent.amulet._visible = false;
_parent.amuletFly._visible = true;
_parent.amuletFly.gotoAndPlay(2);
}
if (this.counter > 200) {
this._y = this._y - 3;
if (this._x > 70) {
this._x = this._x - 0.5;
}
if (this._y < 80) {
_root.boss3Phase = 1;
_root.isHeroPlayable = true;
this._visible = false;
this.counter = 0;
}
}
}
Instance of Symbol 1219 MovieClip "amuletFly" in Symbol 1220 MovieClip [levelBoss3a] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 1221 MovieClip [levelEditora] Frame 1
leftSideMc = _root.mc4Shelter.mc;
rightSideMc = _root.mc2Shelter.mc;
upSideMc = _root.mc5Shelter.mc;
downSideMc = _root.mc6Shelter.mc;
Symbol 1223 MovieClip Frame 1
this._visible = false;
Symbol 1224 MovieClip [Symbol1] Frame 1
#initclip 8
Object.registerClass("Symbol1", three_d.DrawingPlane);
#endinitclip
Symbol 1241 MovieClip Frame 1
stop();
Symbol 1253 MovieClip Frame 7
_root.jumpAnimationDone = true;
stop();
Symbol 1254 MovieClip Frame 29
stop();
Symbol 1255 MovieClip Frame 20
stop();
Symbol 1258 MovieClip Frame 1
stop();
Symbol 1261 MovieClip Frame 1
stop();
Symbol 1265 MovieClip Frame 1
stop();
Symbol 1268 MovieClip Frame 1
stop();
Symbol 1277 MovieClip Frame 29
stop();
Symbol 1287 MovieClip Frame 7
_root.jumpAnimationDone = true;
Symbol 1288 MovieClip Frame 29
stop();
Symbol 1289 MovieClip Frame 1
stop();
Symbol 1292 MovieClip [hero] Frame 1
this.speed = 7;
this.animationVar = "idle";
_parent.heroPointer = this;
if ((_parent.sidePosition != "yFront") && (_parent.sidePosition != "yBack")) {
this._rotation = _parent.gravityRotation;
} else {
if (this.sideDirection == "downSide") {
this._rotation = 0;
}
if (this.sideDirection == "rightSide") {
this._rotation = -90;
}
if (this.sideDirection == "upSide") {
this._rotation = 180;
}
if (this.sideDirection == "leftSide") {
this._rotation = 90;
}
}
if ((this.heroReference._parent.sidePosition == "yFront") || (this.heroReference._parent.sidePosition == "yBack")) {
if (this.dir == "down") {
this._rotation = this._rotation + 0;
}
if (this.dir == "right") {
this._rotation = this._rotation + 90;
}
if (this.dir == "up") {
this._rotation = this._rotation + 180;
}
if (this.dir == "left") {
this._rotation = this._rotation + -90;
}
this.isNotRealGravityOn = true;
}
this.nearBorderX = true;
this.nearBorderY = true;
this.addToVectorSide = 2;
this.xInvert = 0;
this.yInvert = 0;
this.xInvert2 = 1;
this.yInvert2 = 1;
this.start1 = 1;
this.isADown = false;
if (this._parent.side.getRotation() == 270) {
this.addToVectorSide = 3;
this.addToVectorSide2 = 3;
}
if (this._parent.side.getRotation() == 180) {
this.addToVectorSide = 2;
this.addToVectorSide2 = 2;
}
if (this._parent.side.getRotation() == 90) {
this.addToVectorSide = 1;
this.addToVectorSide2 = 1;
}
if (this._parent.side.getRotation() == 0) {
this.addToVectorSide = 2;
this.addToVectorSide2 = 0;
}
if (this._parent.side.getXScale() < 0) {
this.xInvert = 2;
this.xInvert2 = -1;
}
if (this._parent.side.getYScale() < 0) {
this.yInvert = 2;
this.yInvert2 = -1;
}
if (dir == "left") {
this.newPoint = _parent.getLevelCoordinates((_parent.startWidth + (this.hitbox._width / 2)) + this.formerExtraDistant, this.heroReference.posY);
this._x = this.newPoint[0];
this._y = this.newPoint[1];
}
if (dir == "right") {
this.newPoint = _parent.getLevelCoordinates((-(this.hitbox._width / 2)) + this.formerExtraDistant, this.heroReference.posY);
this._x = this.newPoint[0];
this._y = this.newPoint[1];
}
if (dir == "up") {
this.newPoint = _parent.getLevelCoordinates(this.heroReference.posX, (_parent.startWidth + (this.hitbox._height / 2)) + this.formerExtraDistant);
this._x = this.newPoint[0];
this._y = this.newPoint[1];
}
if (dir == "down") {
this.newPoint = _parent.getLevelCoordinates(this.heroReference.posX, (-(this.hitbox._height / 2)) + this.formerExtraDistant);
this._x = this.newPoint[0];
this._y = this.newPoint[1];
}
updatePosXY = function () {
this.posX = _parent.getRealCoordinates(this._x, this._y)[0];
this.posY = _parent.getRealCoordinates(this._x, this._y)[1];
};
updatePosXY();
evaluatePosCoordinates = function () {
this._x = _parent.getLevelCoordinates(posX, posY)[0];
this._y = _parent.getLevelCoordinates(posX, posY)[1];
};
evaluateHitboxes = function () {
if (this.shelter.feetHitbox.hitTest(_parent.mainPlatform)) {
if (((!isStandingOnPlatform) && (_root.jumpPower > 12)) && (this.heroReferenceString == "empty")) {
_root.impactSound.start();
}
isStandingOnPlatform = true;
} else {
isStandingOnPlatform = false;
}
if (this.shelter.bodyHitbox.hitTest(_parent.mainPlatformWall)) {
isNextToWall = true;
} else {
isNextToWall = false;
}
if (this.shelter.topHitbox.hitTest(_parent.mainPlatform)) {
isUnderCeiling = true;
} else {
isUnderCeiling = false;
}
if (_parent.mainPlatformWall == _parent.mainPlatform) {
if ((isStandingOnPlatform && (isNextToWall)) || (isUnderCeiling && (isNextToWall))) {
isNextToWall = false;
}
}
};
evaluateHeroString = function () {
if (this.hero != undefined) {
this.heroString = this.hero + "empty";
} else {
this.heroString = "empty";
}
};
this.onEnterFrame = function () {
blockListLength = _parent.blockList.length;
blockI = 0;
while (blockI < blockListLength) {
_parent.blockList[blockI].checkForHit();
blockI++;
}
if (_root.isHeroPlayable) {
this.heroReferenceString = this.heroReference + "empty";
evaluateHeroString();
if ((this._rotation == 0) || (Math.abs(this._rotation) == 180)) {
this.hitboxHeightOrWidth = this.hitbox._width;
}
if ((this._rotation == 90) || (this._rotation == -90)) {
this.hitboxHeightOrWidth = this.hitbox._height;
}
if ((this._rotation == 0) || (Math.abs(this._rotation) == 180)) {
this.hitboxHeightOrWidth2 = this.hitbox._height;
}
if ((this._rotation == 90) || (this._rotation == -90)) {
this.hitboxHeightOrWidth2 = this.hitbox._width;
}
if (((this._x - (this.hitboxHeightOrWidth / 2)) > 0) && ((this._x + (this.hitboxHeightOrWidth / 2)) < this._parent.startWidth)) {
this.nearBorderX = false;
}
if (((this._y - (this.hitboxHeightOrWidth2 / 2)) > 0) && ((this._y + (this.hitboxHeightOrWidth2 / 2)) < this._parent.startHeight)) {
this.nearBorderY = false;
}
if (this.heroReferenceString == "empty") {
if (this.start2 == undefined) {
if (this.isNotRealGravityOn) {
this._rotation = _parent.gravityRotation;
updatePosXY();
this.isNotRealGravityOn = false;
}
_root.doubleHeroArray.push(this);
this.nearBorderX = false;
this.nearBorderY = false;
if (((this._y - (this.hitbox._height / 2)) > 0) && ((this._y + (this.hitbox._height / 2)) < this._parent.startHeight)) {
} else {
this.nearBorderX = true;
}
if (((this._x - (this.hitbox._width / 2)) > 0) && ((this._x + (this.hitbox._width / 2)) < this._parent.startWidth)) {
} else {
this.nearBorderY = true;
}
this.start2 = 1;
}
}
this.rememberAnimation = undefined;
this.rememberRememberAnimation = undefined;
if (this.heroReferenceString == "empty") {
if ((!Key.isDown(39)) && (!Key.isDown(37))) {
if (this.shelter._currentframe == 6) {
if (!this.isADown) {
this.rememberAnimation = this.shelter.animation._currentframe;
}
}
this.animationVar = "idle";
}
if (this.isADown) {
if (this.shelter._currentframe == 1) {
this.rememberAnimation = this.shelter.animation._currentframe;
}
this.animationVar = "idleBeforePush";
}
this.posY = this.posY + _root.gravity;
if (Key.isDown(39)) {
this.posX = this.posX + this.speed;
this._xscale = 100;
if (!this.isADown) {
if (this.shelter._currentframe == 7) {
this.rememberRememberAnimation = this.shelter.animation.animation._currentframe;
this.rememberAnimation = this.shelter.animation._currentframe;
}
this.animationVar = "run";
} else {
if (this.shelter._currentframe == 2) {
this.rememberRememberAnimation = this.shelter.animation.animation._currentframe;
this.rememberAnimation = this.shelter.animation._currentframe;
}
this.animationVar = "runBeforePush";
}
}
if (Key.isDown(37)) {
this.posX = this.posX - this.speed;
this._xscale = -100;
if (!this.isADown) {
if (this.shelter._currentframe == 7) {
this.rememberRememberAnimation = this.shelter.animation.animation._currentframe;
this.rememberAnimation = this.shelter.animation._currentframe;
}
this.animationVar = "run";
} else {
if (this.shelter._currentframe == 2) {
this.rememberRememberAnimation = this.shelter.animation.animation._currentframe;
this.rememberAnimation = this.shelter.animation._currentframe;
}
this.animationVar = "runBeforePush";
}
}
if ((((!isStandingOnPlatform) && (!isStandingOnFloor)) && (!hero.isStandingOnPlatform)) && (!hero.isStandingOnFloor)) {
if (!_root.jumpAnimationDone) {
this.animationVar = "jump";
}
if ((_root.jumpPower > 0) || (_root.jumpAnimationDone)) {
this.animationVar = "fall";
}
}
}
evaluateHitboxes();
if (this.heroReferenceString == "empty") {
if ((_parent.sidePosition != "yFront") && (_parent.sidePosition != "yBack")) {
if (((this.posY + (this.hitbox._height / 2)) > _parent.startHeight) && (_root.floorIsEnabled)) {
isStandingOnFloor = true;
this.posY = (_parent.startHeight - (this.hitbox._height / 2)) - 1;
} else {
isStandingOnFloor = false;
}
}
if (isNextToWall) {
this.posX = _parent.getRealCoordinates(_parent.mainPlatformWall._x, _parent.mainPlatformWall._y)[0] - (40 * (this._xscale / 100));
}
if (this.hero.isNextToWall) {
if (((this.hero._parent.sidePosition != "yFront") && (this.hero._parent.sidePosition != "yBack")) && ((hero.dir != "up") && (hero.dir != "down"))) {
otherMainPlatformWall = this.hero._parent.mainPlatformWall;
this.posX = (otherMainPlatformWall._parent.getRealCoordinates(otherMainPlatformWall._x, otherMainPlatformWall._y)[0] - (40 * (this.hero._xscale / 100))) - ((_parent.startWidth * (this.hero._xscale / 100)) * -1);
} else {
otherMainPlatformWall = this.hero._parent.mainPlatformWall;
this.posX = otherMainPlatformWall._parent.getRealCoordinates(otherMainPlatformWall._x, otherMainPlatformWall._y)[0] - (40 * (this.hero._xscale / 100));
}
}
if (isStandingOnPlatform) {
if (_root.gravity > 0) {
_root.jumpPower = 3;
_root.gravity = 0;
this.posY = _parent.getRealCoordinates(_parent.mainPlatform._x, _parent.mainPlatform._y)[1] - 70;
}
}
if (this.hero.isStandingOnPlatform) {
if (_root.gravity > 0) {
if (((this.hero._parent.sidePosition != "yFront") && (this.hero._parent.sidePosition != "yBack")) && ((hero.dir != "up") && (hero.dir != "down"))) {
otherMainPlatform = this.hero._parent.mainPlatform;
this.posY = otherMainPlatform._parent.getRealCoordinates(otherMainPlatform._x, otherMainPlatform._y)[1] - 70;
_root.jumpPower = 3;
_root.gravity = 0;
} else {
otherMainPlatform = this.hero._parent.mainPlatform;
this.posY = (otherMainPlatform._parent.getRealCoordinates(otherMainPlatform._x, otherMainPlatform._y)[1] - 70) + _parent.startHeight;
_root.jumpPower = 3;
_root.gravity = 0;
}
}
}
if (isUnderCeiling) {
_root.jumpPower = 0;
this.posY = (_parent.getRealCoordinates(_parent.mainPlatform._x, _parent.mainPlatform._y)[1] + 44) + 2;
}
if (this.hero.isUnderCeiling) {
if (((this.hero._parent.sidePosition != "yFront") && (this.hero._parent.sidePosition != "yBack")) && ((hero.dir != "up") && (hero.dir != "down"))) {
otherMainPlatform = this.hero._parent.mainPlatform;
this.posY = (otherMainPlatform._parent.getRealCoordinates(otherMainPlatform._x, otherMainPlatform._y)[1] + 44) + 2;
_root.jumpPower = 0;
} else {
otherMainPlatform = this.hero._parent.mainPlatform;
this.posY = ((otherMainPlatform._parent.getRealCoordinates(otherMainPlatform._x, otherMainPlatform._y)[1] + 44) + 2) - _parent.startHeight;
_root.jumpPower = 0;
}
}
}
if (isStandingOnPlatform) {
if (Key.isDown(83) || (Key.isDown(38))) {
if (!this.sDown) {
this.posY = this.posY - 5;
this.jumpPower = -25;
this.sDown = true;
}
}
}
if ((!Key.isDown(83)) && (!Key.isDown(38))) {
if (this.sDown) {
this.sDown = false;
}
}
evaluatePosCoordinates();
this.speed = 7;
if (Key.isDown(65)) {
if ((!this.isADown) && (_root.heroCanPush)) {
this.vector1 = this._parent.side.getVectorCollection()[((0 + this.yInvert) + this.addToVectorSide) % 4];
this.vector2 = this._parent.side.getVectorCollection()[((2 + this.yInvert) + this.addToVectorSide) % 4];
this.vector3 = three_d.VectorClass.removeVectorsFromVectorCollection(this.vector1.getReference(), _parent.side.getVectorCollection())[0];
this.vector3Difference = vector1.subtract(vector3);
this.xOrZ = Math.abs(Math.round(this.vector1.subtract(this.vector2)[2][0]));
if ((_parent.sidePosition == "yFront") || (_parent.sidePosition == "yBack")) {
this.vectorExtra = this._parent.side.getVectorCollection()[(((1 + this.yInvert) + this.addToVectorSide) + (Math.abs(this._rotation / 90) * 2)) % 4];
this.pushOtherSidePosition = three_d.Side.removeSideFromSideCollection(this._parent.figure.getSidesWithVectors([this.vector1, this.vectorExtra]), this._parent.side)[0].getMovieClip().mc.sidePosition;
this.pushOtherSidePositionAxis = substring(this.pushOtherSidePosition, 0, 1);
this.pushOtherSidePositionDir = substring(this.pushOtherSidePosition, 2, this.pushOtherSidePosition.length);
if (this.pushOtherSidePositionAxis == "x") {
this.xOrZ = 0;
}
if (this.pushOtherSidePositionAxis == "z") {
this.xOrZ = 1;
}
}
this.isADown = true;
}
} else if (this.isADown) {
this.isADown = false;
}
if (((this.heroReferenceString == "empty") && (this.heroString == "empty")) || (((this.heroReferenceString == "empty") && (this.hero.isNextToWall)) && (((this.posX >= 18.5) && (this.posX < 50)) || ((this.posX <= (_parent.startWidth - 18.5)) && (this.posX > ((_parent.startWidth - 18.5) - 50)))))) {
if (this.isADown) {
this.hero.removeMovieClip();
this.invertRotation = 1;
if ((_parent.sidePosition == "zBack") || (_parent.sidePosition == "xFront")) {
this.invertRotation = 1;
}
if ((_parent.sidePosition == "zFront") || (_parent.sidePosition == "xBack")) {
this.invertRotation = -1;
}
if ((_parent.sidePosition == "yFront") || (_parent.sidePosition == "yBack")) {
if (this.pushOtherSidePositionDir == "Front") {
this.invertRotation = 1;
}
if (this.pushOtherSidePositionDir == "Back") {
this.invertRotation = -1;
}
invertRotationYSide = this._rotation / Math.abs(this._rotation);
if (this._rotation != 0) {
this.invertRotation = this.invertRotation * invertRotationYSide;
}
if (this._rotation == 180) {
this.invertRotation = this.invertRotation * (this._parent.side.getXScale() * -1);
}
if (this._rotation == 0) {
this.invertRotation = this.invertRotation * this._parent.side.getXScale();
}
}
if (this.xOrZ == 1) {
this.xOrZChar = "X";
}
if (this.xOrZ == 0) {
this.xOrZChar = "Z";
}
if ((this.posX + (this.hitbox._width / 2)) > this._parent.startWidth) {
this.animationVar = "push";
_root.engine.moveCube(1 * this.invertRotation, this.xOrZChar);
_root.isHeroPlayable = false;
this.posX = this._parent.startWidth - (this.hitbox._width / 2);
}
if ((this.posX - (this.hitbox._width / 2)) < 0) {
this.animationVar = "push";
_root.engine.moveCube(-1 * this.invertRotation, this.xOrZChar);
_root.isHeroPlayable = false;
this.posX = 0 + (this.hitbox._width / 2);
}
this.evaluatePosCoordinates();
}
}
if (((_parent.mainPlatform.typeOf == "spring") && (_parent.mainPlatform._rotation == 180)) && (this._rotation == -180)) {
_parent.mainPlatform._rotation = -180;
}
if ((((_parent.mainPlatform.typeOf == "spring") && (isStandingOnPlatform)) && (_root.gravity == 0)) && (_parent.mainPlatform._rotation == this._rotation)) {
if (!_parent.mainPlatform.springShelter.animationOn) {
_root.springSound.start();
_parent.mainPlatform.springShelter.gotoAndPlay(2);
} else {
this.animationVar = "jump";
_root.jumpAnimationDone = false;
_root.gravity = _root.gravity - 19.5;
_root.jumpPower = -19.5;
}
}
if ((((hero._parent.mainPlatform.typeOf == "spring") && (hero.isStandingOnPlatform)) && (_root.gravity == 0)) && (hero._parent.mainPlatform._rotation == hero._rotation)) {
if (!hero._parent.mainPlatform.springShelter.animationOn) {
_root.springSound.start();
hero._parent.mainPlatform.springShelter.gotoAndPlay(2);
} else {
this.animationVar = "jump";
_root.jumpAnimationDone = false;
_root.gravity = _root.gravity - 19.5;
_root.jumpPower = -19.5;
}
}
if (_root.diamondRunOn) {
if (((this.shelter.feetHitbox.hitTest(_root.barrelArray[_root.barrelIndex].hitbox) && (_parent == _root.barrelArray[_root.barrelIndex]._parent)) && (_root.gravity > 0)) && (((this._rotation + 180) % 360) == ((_root.barrelArray[_root.barrelIndex]._rotation + 180) % 360))) {
if (_root.barrelIndex == _root.barrelLength) {
_root.barrelArray[_root.barrelIndex].gotoAndStop("breakWithDiamond");
} else {
_root.barrelArray[_root.barrelIndex].gotoAndStop("break");
}
this.animationVar = "jump";
_root.jumpAnimationDone = false;
_root.gravity = _root.gravity - 15.6;
_root.jumpPower = -15.6;
_root.barrelIndex++;
}
}
if (_root.heroCarryBlock) {
this.speed = 4;
if (this.animationVar.substr(-10, 10) == "BeforePush") {
this.animationVar = this.animationVar.substr(0, length(this.animationVar) - 10);
}
this.animationVar = this.animationVar + "Carry";
}
this.shelter.gotoAndStop(this.animationVar);
if (this.rememberAnimation != undefined) {
this.shelter.animation.gotoAndPlay(this.rememberAnimation);
}
if (this.rememberRememberAnimation != undefined) {
this.shelter.animation.animation.gotoAndPlay(this.rememberRememberAnimation);
}
if (this.heroReferenceString == "empty") {
this.heroDir = "reset";
this.heroDirX = this.heroDir;
this.heroDirY = this.heroDir;
if ((this.posX - (this.hitbox._width / 2)) < 0) {
if ((this.hero.dir == "left") || (this.hero.dir == undefined)) {
this.heroDir = "left";
this.heroFormerExtraDistant = this.posX - (this.hitbox._width / 2);
} else {
this.posX = 0 + (this.hitbox._width / 2);
this.evaluatePosCoordinates();
}
}
if ((this.posX + (this.hitbox._width / 2)) > this._parent.startWidth) {
if ((this.hero.dir == "right") || (this.hero.dir == undefined)) {
this.heroDir = "right";
this.heroFormerExtraDistant = (this.posX + (this.hitbox._width / 2)) - this._parent.startWidth;
} else {
this.posX = _parent.startWidth - (this.hitbox._width / 2);
this.evaluatePosCoordinates();
}
}
this.heroDirX = this.heroDir;
if ((this.posY - (this.hitbox._height / 2)) < 0) {
if ((this.hero.dir == "up") || (this.hero.dir == undefined)) {
this.heroDir = "up";
this.heroFormerExtraDistant = this.posY - (this.hitbox._height / 2);
} else {
_root.jumpPower = 0;
this.posY = 0 + (this.hitbox._height / 2);
this.evaluatePosCoordinates();
}
}
if ((this.posY + (this.hitbox._height / 2)) > this._parent.startHeight) {
if ((this.hero.dir == "down") || (this.hero.dir == undefined)) {
this.heroDir = "down";
this.heroFormerExtraDistant = (this.posY + (this.hitbox._height / 2)) - this._parent.startHeight;
} else {
_root.jumpPower = 0;
this.posY = _parent.startHeight - (this.hitbox._height / 2);
this.evaluatePosCoordinates();
}
}
this.heroDirY = this.heroDir;
if (this.heroDir == "left") {
this.hero.posX = (this.hero._parent.startWidth + (this.hero.hitbox._width / 2)) + this.heroFormerExtraDistant;
this.hero.posY = this.posY;
this.hero.evaluatePosCoordinates();
this.hero.evaluateHitboxes();
}
if (this.heroDir == "right") {
this.hero.posX = this.heroFormerExtraDistant - (this.hero.hitbox._width / 2);
this.hero.posY = this.posY;
this.hero.evaluatePosCoordinates();
this.hero.evaluateHitboxes();
}
if (this.heroDir == "up") {
this.hero.posX = this.posX;
this.hero.posY = (this.hero._parent.startHeight + (this.hero.hitbox._height / 2)) + this.heroFormerExtraDistant;
this.hero.evaluatePosCoordinates();
this.hero.evaluateHitboxes();
}
if (this.heroDir == "down") {
this.hero.posX = this.posX;
this.hero.posY = ((-this.hero.hitbox._height) / 2) + this.heroFormerExtraDistant;
this.hero.evaluatePosCoordinates();
this.hero.evaluateHitboxes();
}
if (this.heroDir == "reset") {
this.hero.rect.setEmpty();
this.hero.removeMovieClip();
}
}
this.hero._xscale = this._xscale;
this.hero.shelter.gotoAndStop(this.shelter._currentFrame);
this.hero.shelter.animation.gotoAndPlay(this.shelter.animation._currentframe);
if (this.hero.shelter.animation.animation != undefined) {
this.hero.shelter.animation.animation.gotoAndPlay(this.shelter.animation.animation._currentFrame);
}
if ((_root.heroGotCostume != "none") || (_root.heroGotCostume == undefined)) {
this.shelter.animation.head.gotoAndStop(_root.heroGotCostume);
this.shelter.animation.animation.head.gotoAndStop(_root.heroGotCostume);
this.hero.shelter.animation.head.gotoAndStop(_root.heroGotCostume);
this.hero.shelter.animation.animation.head.gotoAndStop(_root.heroGotCostume);
if (_root.heroGotCostume == "costume1") {
this.shelter.animation.animation.head.head.amulet._visible = false;
this.hero.shelter.animation.animation.head.head.amulet._visible = false;
}
this.shelter.animation.arm1.gotoAndStop(_root.heroGotCostume);
this.shelter.animation.arm2.gotoAndStop(_root.heroGotCostume);
this.shelter.animation.animation.arm1.gotoAndStop(_root.heroGotCostume);
this.shelter.animation.animation.arm2.gotoAndStop(_root.heroGotCostume);
this.hero.shelter.animation.arm1.gotoAndStop(_root.heroGotCostume);
this.hero.shelter.animation.arm2.gotoAndStop(_root.heroGotCostume);
this.hero.shelter.animation.animation.arm1.gotoAndStop(_root.heroGotCostume);
this.hero.shelter.animation.animation.arm2.gotoAndStop(_root.heroGotCostume);
this.shelter.animation.body.gotoAndStop(_root.heroGotCostume);
this.shelter.animation.animation.body.gotoAndStop(_root.heroGotCostume);
this.hero.shelter.animation.body.gotoAndStop(_root.heroGotCostume);
this.hero.shelter.animation.animation.body.gotoAndStop(_root.heroGotCostume);
}
if (this.heroReferenceString == "empty") {
if ((this._x + (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) {
this.vector1x = this._parent.side.getVectorCollection()[((0 + this.xInvert) + this.addToVectorSide) % 4];
this.vector2x = this._parent.side.getVectorCollection()[((1 + this.xInvert) + this.addToVectorSide) % 4];
}
if ((this._x - (this.hitboxHeightOrWidth / 2)) < 0) {
this.vector1x = this._parent.side.getVectorCollection()[((2 + this.xInvert) + this.addToVectorSide) % 4];
this.vector2x = this._parent.side.getVectorCollection()[((3 + this.xInvert) + this.addToVectorSide) % 4];
}
if ((this._y - (this.hitboxHeightOrWidth2 / 2)) < 0) {
this.vector1y = this._parent.side.getVectorCollection()[((1 + this.yInvert) + this.addToVectorSide) % 4];
this.vector2y = this._parent.side.getVectorCollection()[((2 + this.yInvert) + this.addToVectorSide) % 4];
}
if ((this._y + (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight) {
this.vector1y = this._parent.side.getVectorCollection()[((0 + this.yInvert) + this.addToVectorSide) % 4];
this.vector2y = this._parent.side.getVectorCollection()[((3 + this.yInvert) + this.addToVectorSide) % 4];
}
if (((this._x + (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) || ((this._x - (this.hitboxHeightOrWidth / 2)) < 0)) {
this.vector1 = this.vector1x;
this.vector2 = this.vector2x;
}
if (((this._y - (this.hitboxHeightOrWidth2 / 2)) < 0) || ((this._y + (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight)) {
this.vector1 = this.vector1y;
this.vector2 = this.vector2y;
}
if ((((this._x + (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) || ((this._x - (this.hitboxHeightOrWidth / 2)) < 0)) && (((this._y - (this.hitboxHeightOrWidth2 / 2)) < 0) || ((this._y + (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight))) {
if ((_parent.gravityRotation == 90) || (_parent.gravityRotation == -90)) {
this.vector1 = this.vector1x;
this.vector2 = this.vector2x;
}
}
if ((((this._x + (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) || ((this._x - (this.hitboxHeightOrWidth / 2)) < 0)) || (((this._y - (this.hitboxHeightOrWidth2 / 2)) < 0) || ((this._y + (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight))) {
if (this.heroString == "empty") {
this.hero.removeMovieClip();
this.otherSide = three_d.Side.removeSideFromSideCollection(this._parent.figure.getSidesWithVectors([this.vector1, this.vector2]), this._parent.side);
this.otherSideMc = this.otherSide[0].getMovieClip();
_root.depth++;
this.hero = this.otherSideMc.mc.attachMovie("hero", "hero" + _root.depth, this.otherSideMc.mc.getNextHighestDepth(), {_x:-100, _y:-100});
this.hero._rotation = this._rotation;
this.hero.heroReference = this;
this.hero._xscale = this._xscale;
this.hero.dir = this.heroDir;
this.hero.sideDirection = this.otherSideMc.mc.getSideDirection(this.vector1, this.vector2);
this.hero.formerExtraDistant = this.heroFormerExtraDistant;
}
}
}
if ((this._x + (this.hitboxHeightOrWidth / 2)) < 0) {
if (this.heroReferenceString == "empty") {
_root.doubleHeroArray.pop();
}
this.removeMovieClip();
}
if ((this._x - (this.hitboxHeightOrWidth / 2)) > this._parent.startWidth) {
if (this.heroReferenceString == "empty") {
_root.doubleHeroArray.pop();
}
this.removeMovieClip();
}
if ((this._y + (this.hitboxHeightOrWidth2 / 2)) < 0) {
if (this.heroReferenceString == "empty") {
_root.doubleHeroArray.pop();
}
this.removeMovieClip();
}
if ((this._y - (this.hitboxHeightOrWidth2 / 2)) > this._parent.startHeight) {
if (this.heroReferenceString == "empty") {
_root.doubleHeroArray.pop();
}
this.removeMovieClip();
}
}
};
Symbol 1674 MovieClip [__Packages.three_d.MatrixClass] Frame 0
class three_d.MatrixClass
{
var matrix;
function MatrixClass (newMatrix) {
matrix = newMatrix;
}
function multiply(m2) {
var _local8 = length();
var _local10 = m2.length();
if (_local8 != _local10) {
return(null);
}
var _local9 = new Array();
var _local5 = 0;
while (_local5 < _local8) {
var _local7 = new Array();
var _local3 = 0;
while (_local3 < m2.get()[0].length) {
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local8) {
_local4 = _local4 + (matrix[_local5][_local2] * m2.get()[_local2][_local3]);
_local2++;
}
_local7[_local3] = _local4;
_local3++;
}
_local9[_local5] = _local7;
_local5++;
}
return(_local9);
}
function set(newMatrix) {
matrix = newMatrix;
}
function get() {
return(matrix);
}
function length() {
return(matrix.length);
}
function scale(scalar) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < matrix.length) {
var _local4 = new Array();
var _local2 = 0;
while (_local2 < matrix[_local3].length) {
_local4.push(matrix[_local3][_local2] * scalar);
_local2++;
}
_local6.push(_local4);
_local3++;
}
return(_local6);
}
function round() {
var _local5 = new Array();
var _local3 = 0;
while (_local3 < matrix.length) {
var _local4 = new Array();
var _local2 = 0;
while (_local2 < matrix[_local3].length) {
_local4.push(Math.round(matrix[_local3][_local2]));
_local2++;
}
_local5.push(_local4);
_local3++;
}
return(_local5);
}
}
Symbol 1675 MovieClip [__Packages.three_d.VectorClass] Frame 0
class three_d.VectorClass extends three_d.MatrixClass
{
var set, reference, get, vectorImage;
function VectorClass (newMatrix) {
super();
set(newMatrix);
}
function setReference(newReference) {
reference = newReference;
}
function getReference() {
return(reference);
}
function getColor() {
return(color);
}
function setVector(newVector) {
set(newVector);
}
function add(v2) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < get().length) {
_local3.push([get()[_local2][0] + v2.get()[_local2][0]]);
_local2++;
}
return(_local3);
}
function subtract(v2) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < get().length) {
_local3.push([get()[_local2][0] - v2.get()[_local2][0]]);
_local2++;
}
return(_local3);
}
function equals(v2) {
var _local3 = true;
var _local2 = 0;
while (_local2 < get().length) {
_local3 = _local3 and (get()[_local2][0] == v2.get()[_local2][0]);
_local2++;
}
return(_local3);
}
static function removeVectorsFromVectorCollection(mainVectorCollection, removeVectorCollection) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < mainVectorCollection.length) {
var _local1 = true;
var _local2 = 0;
while (_local2 < removeVectorCollection.length) {
if (mainVectorCollection[_local3] == removeVectorCollection[_local2]) {
_local1 = _local1 and false;
} else {
_local1 = _local1 and true;
}
_local2++;
}
if (_local1) {
_local6.push(mainVectorCollection[_local3]);
}
_local3++;
}
return(_local6);
}
function setVectorImage(v1) {
vectorImage = v1;
}
function getVectorImage() {
return(vectorImage);
}
var color = 0;
}
Symbol 1676 MovieClip [__Packages.three_d.Side] Frame 0
class three_d.Side
{
var vectorCollection, color, transparent, texture, rotation, xScale, yScale, isBrightnessOn, movieClip, movieClipWidth, movieClipHeight, depth, angleMode;
function Side (vectorCollection) {
this.vectorCollection = vectorCollection;
color = 15214632 * random(300);
transparent = false;
texture = new flash.display.BitmapData(1, 1, transparent, color);
rotation = 0;
xScale = 1;
yScale = 1;
isBrightnessOn = false;
}
function getVectorCollection() {
return(vectorCollection);
}
function getTexture() {
return(texture);
}
function setTexture(newTexture) {
texture = newTexture;
}
function setColor(color) {
this.color = color;
texture = new flash.display.BitmapData(1, 1, transparent, this.color);
}
function getTransparent() {
return(transparent);
}
function setTransparent(boolean) {
transparent = boolean;
updateTransparent();
}
function updateTransparent() {
if (movieClip == undefined) {
texture = new flash.display.BitmapData(1, 1, transparent, 0);
} else {
texture = new flash.display.BitmapData(movieClipWidth, movieClipHeight, transparent, 0);
}
}
function setMovieClip(movieClip) {
this.movieClip = movieClip;
movieClipWidth = Math.round(movieClip._width / 100) * 100;
movieClipHeight = Math.round(movieClip._height / 100) * 100;
texture = new flash.display.BitmapData(movieClipWidth, movieClipHeight);
}
function getMovieClip() {
return(movieClip);
}
function getMovieClipWidth() {
return(movieClipWidth);
}
function getMovieClipHeight() {
return(movieClipHeight);
}
function setDepth(camera) {
depth = 0;
var _local2 = 0;
while (_local2 < vectorCollection.length) {
depth = depth + camera.getCameraMatrix().multiply(vectorCollection[_local2])[2][0];
_local2++;
}
}
function getDepth() {
return(depth);
}
function setRotation(rotation) {
this.rotation = rotation;
}
function getRotation() {
return(rotation);
}
static function removeSideFromSideCollection(sideCollection, side) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < sideCollection.length) {
if (sideCollection[_local1] != side) {
_local3.push(sideCollection[_local1]);
}
_local1++;
}
return(_local3);
}
function getXScale() {
return(xScale);
}
function setXScale(xScale) {
this.xScale = xScale;
}
function getYScale() {
return(yScale);
}
function setYScale(yScale) {
this.yScale = yScale;
}
function getVectorPlace(vector) {
var _local2 = 0;
while (_local2 < vectorCollection.length) {
if (vectorCollection[_local2].equals(vector)) {
return(_local2);
}
_local2++;
}
return(undefined);
}
function setUpdateDrawMc(updateDrawMc) {
this.updateDrawMc = updateDrawMc;
}
function getUpdateDrawMc() {
return(updateDrawMc);
}
function setAngleMode(newAngleMode) {
angleMode = newAngleMode;
}
function getAngleMode() {
return(angleMode);
}
function setIsBrightnessOn(newIsBrightnessOn) {
isBrightnessOn = newIsBrightnessOn;
}
function getIsBrightnessOn() {
return(isBrightnessOn);
}
var updateDrawMc = true;
}
Symbol 1677 MovieClip [__Packages.three_d.CameraClass] Frame 0
class three_d.CameraClass
{
var zoom, positionVector, latitude, longitude, cameraMatrix;
function CameraClass (latitude, longitude, zoom) {
setLatitude(latitude);
setLongitude(longitude);
this.zoom = zoom;
positionVector = new three_d.VectorClass([[0], [0], [0]]);
updateCameraMatrix();
}
function updateCameraMatrix() {
var _local3 = (latitude * Math.PI) / 180;
var _local2 = (longitude * Math.PI) / 180;
cameraMatrix = new three_d.MatrixClass([[(zoom * 1) * Math.sin(_local3), 0, (zoom * -1) * Math.cos(_local3)], [((zoom * 1) * Math.sin(_local2)) * Math.cos(_local3), zoom * Math.cos(_local2), (zoom * Math.sin(_local3)) * Math.sin(_local2)], [((zoom * -1) * Math.cos(_local2)) * Math.cos(_local3), zoom * Math.sin(_local2), ((-1 * zoom) * Math.sin(_local3)) * Math.cos(_local2)]]);
}
function getCameraMatrix() {
updateCameraMatrix();
return(cameraMatrix);
}
function setLatitude(latitude) {
latitude = latitude % 360;
if (latitude < 0) {
latitude = latitude + 360;
}
this.latitude = latitude;
}
function setLongitude(longitude) {
longitude = longitude % 360;
if (longitude < 0) {
longitude = longitude + 360;
}
this.longitude = longitude;
}
function setZoom(zoom) {
this.zoom = zoom;
}
function getLatitude() {
return(latitude);
}
function getLongitude() {
return(longitude);
}
function getZoom() {
return(zoom);
}
function getPositionVector() {
return(positionVector);
}
function setPositionVector(positionVector) {
this.positionVector = positionVector;
}
}
Symbol 1678 MovieClip [__Packages.three_d.DrawingPlane] Frame 0
class three_d.DrawingPlane extends MovieClip
{
var _x, _y, cameraCollection, figureCollection, blurSides, cameraPointer, lineStyle, lineTo, clear, beginBitmapFill, moveTo, endFill;
function DrawingPlane (newX, newY) {
super();
_x = newX;
_y = newY;
cameraCollection = new Array();
figureCollection = new Array();
cameraCollection.push(new three_d.CameraClass(0, 0, 100));
chooseCamera(0);
blurSides = false;
}
function getFigureCollection() {
return(figureCollection);
}
function chooseCamera(index) {
cameraPointer = cameraCollection[index];
}
function drawVector(v1) {
lineStyle(1, v1.getColor(), 100);
lineTo(v1.get()[0][0], v1.get()[1][0]);
}
function addFigure(figure) {
figureCollection.push(figure);
}
function draw() {
clear();
var _local3 = 0;
while (_local3 < figureCollection.length) {
figureCollection[_local3].setSideDepth(cameraPointer);
var _local4 = figureCollection[_local3].getVectorCollection().length;
var _local2 = 0;
while (_local2 < _local4) {
figureCollection[_local3].getVectorCollection()[_local2].setVectorImage(undefined);
_local2++;
}
_local3++;
}
drawSideCollection(getLocalSideCollection(figureCollection));
}
function getLocalSideCollection(figureCollection) {
var _local4 = new Array();
var _local2 = 0;
while (_local2 < figureCollection.length) {
var _local1 = 0;
while (_local1 < figureCollection[_local2].getSideCollection().length) {
_local4.push([figureCollection[_local2].getSideCollection()[_local1], figureCollection[_local2].getSideCollection()[_local1].getDepth()]);
_local1++;
}
_local2++;
}
return(_local4);
}
function drawSideCollection(sideCollection) {
sideCollection.sortOn([1], Array.NUMERIC);
var _local2 = 0;
while (_local2 < sideCollection.length) {
drawSide(sideCollection[_local2][0]);
_local2++;
}
}
function drawFigure(figure) {
var _local2 = 0;
while (_local2 < figure.getSideCollection().length) {
drawSide(figure.getSideCollection()[_local2]);
_local2++;
}
}
function drawSide(side) {
var _local7 = new Array();
var _local3 = 0;
while (_local3 < side.getVectorCollection().length) {
var _local4;
if (side.getVectorCollection()[_local3].getVectorImage() == undefined) {
_local4 = new three_d.VectorClass(cameraPointer.getCameraMatrix().multiply(side.getVectorCollection()[_local3]));
side.getVectorCollection()[_local3].setVectorImage(_local4);
}
_local4 = side.getVectorCollection()[_local3].getVectorImage();
_local7.push([_local4.get()[0][0], _local4.get()[1][0]]);
_local3++;
}
var _local5 = _local7[3][0];
var _local6 = _local7[3][1];
var _local13 = _local7[0][0];
var _local16 = _local7[0][1];
var _local11 = _local7[1][0];
var _local12 = _local7[1][1];
var _local15 = _local7[2][0];
var _local14 = _local7[2][1];
var _local24;
if ((side.getMovieClip() != undefined) && (!side.getTransparent())) {
var _local27;
var _local26;
var _local21;
var _local20;
var _local18 = new flash.geom.Matrix();
var _local9;
var _local17;
var _local8;
var _local29 = side.getAngleMode();
if (Math.round(_local13 - _local5) == 0) {
_local27 = (_local14 - _local6) / (_local15 - _local5);
_local26 = (_local13 - _local5) / (_local16 - _local6);
_local20 = (((_local16 - _local6) / side.getMovieClipHeight()) * -1) * side.getYScale();
_local21 = (((_local15 - _local5) / side.getMovieClipWidth()) * -1) * side.getXScale();
_local9 = side.getRotation() + 90;
side.setAngleMode(1);
} else {
_local27 = (_local16 - _local6) / (_local13 - _local5);
_local26 = (_local15 - _local5) / (_local14 - _local6);
_local20 = ((_local14 - _local6) / side.getMovieClipHeight()) * side.getXScale();
_local21 = (((_local13 - _local5) / side.getMovieClipWidth()) * -1) * side.getYScale();
_local9 = side.getRotation();
side.setAngleMode(2);
}
_local9 = _local9 % 360;
if (_local9 < 0) {
_local9 = _local9 + 360;
}
if (((360 + side.getMovieClip().mc._rotation) % 360) != _local9) {
side.getMovieClip().mc._rotation = _local9;
}
if (_local9 == 90) {
_local18.translate(side.getMovieClipWidth(), side.getMovieClipHeight() * 0);
}
if (_local9 == 180) {
_local18.translate(side.getMovieClipWidth(), side.getMovieClipHeight());
}
if (_local9 == 270) {
_local18.translate(side.getMovieClipWidth() * 0, side.getMovieClipHeight());
}
_local24 = new flash.geom.Matrix(_local21, _local27 * _local21, _local26 * _local20, _local20, _local5, _local6);
if (side.getUpdateDrawMc() || (_local29 != side.getAngleMode())) {
side.getTexture().draw(side.getMovieClip(), _local18);
}
} else {
_local24 = new flash.geom.Matrix();
}
var _local17 = side.getTexture().clone();
if (blurSides) {
if (Math.abs(_local5 - _local11) < 150) {
if ((Math.round(Math.abs(_local5 - _local13)) == 0) || (Math.round(Math.abs(_local5 - _local15)) == 0)) {
var _local8 = side.getTexture().clone();
_local8.applyFilter(_local8, new flash.geom.Rectangle(0, 0, 400, 400), new flash.geom.Point(0, 0), new flash.filters.BlurFilter((-0.1 * Math.abs(_local5 - _local11)) + 15, Math.abs((-0.0285714285714286 * Math.abs(_local6 - _local12)) + 8), 1));
_local17 = _local8;
}
}
if ((Math.abs(_local6 - _local12) < 150) && (Math.abs(_local16 - _local14) < 150)) {
var _local19;
var _local23;
var _local28;
if ((Math.abs(_local6 - _local12) != 0) && (Math.abs(_local5 - _local11) != 0)) {
_local19 = ((_local6 - _local12) / Math.abs(_local6 - _local12)) * ((_local5 - _local11) / Math.abs(_local5 - _local11));
_local19 = _local19 * (side.getXScale() * side.getYScale());
var _local8 = side.getTexture().clone();
if (Math.abs(_local5 - _local11) < 280) {
_local23 = (-0.0285714285714286 * Math.abs(_local5 - _local11)) + 8;
} else {
_local23 = (0.0695652173913043 * Math.abs(_local5 - _local11)) - 19.4782608695652;
}
_local28 = Math.abs((-0.115384615384615 * Math.abs(_local6 - _local12)) + 15);
if (_local19 == -1) {
_local8.applyFilter(_local8, new flash.geom.Rectangle(0, 0, 400, 400), new flash.geom.Point(0, 0), new flash.filters.BlurFilter(_local23, _local28, 1));
}
if (_local19 == 1) {
_local8.applyFilter(_local8, new flash.geom.Rectangle(0, 0, 400, 400), new flash.geom.Point(0, 0), new flash.filters.BlurFilter(_local28, _local23, 1));
}
_local17 = _local8;
}
}
}
if (side.getIsBrightnessOn()) {
var _local8 = side.getTexture().clone();
var _local10 = new Array();
var _local22 = 100;
var _local25 = new flash.filters.ColorMatrixFilter(_local10);
_local10 = _local10.concat([1, 0, 0, 0, _local22]);
_local10 = _local10.concat([0, 1, 0, 0, _local22]);
_local10 = _local10.concat([0, 0, 1, 0, _local22]);
_local10 = _local10.concat([0, 0, 0, 1, 0]);
_local25.matrix = _local10;
_local8.applyFilter(_local8, new flash.geom.Rectangle(0, 0, 400, 400), new flash.geom.Point(0, 0), _local25);
_local17 = _local8;
}
beginBitmapFill(_local17, _local24, true, true);
if (!side.getIsBrightnessOn()) {
lineStyle(1, 0, 100);
} else {
lineStyle(1, 13421772, 100);
}
moveTo(_local5, _local6);
lineTo(_local13, _local16);
lineTo(_local11, _local12);
lineTo(_local15, _local14);
endFill();
}
function drawVectorCollection(vectorCollection) {
var _local5 = cameraPointer.getCameraMatrix();
var _local3 = 0;
while (_local3 < vectorCollection.length) {
var _local4 = vectorCollection[_local3].getReference();
var _local2 = 0;
while (_local2 < _local4.length) {
drawVectorFromVector(new three_d.VectorClass(_local5.multiply(vectorCollection[_local3])), new three_d.VectorClass(_local5.multiply(_local4[_local2])));
_local2++;
}
_local3++;
}
}
function drawVectorFromVector(v1, startV1) {
lineStyle(1, v1.getColor(), 100);
moveTo(startV1.get()[0][0], startV1.get()[1][0]);
lineTo(v1.get()[0][0], v1.get()[1][0]);
}
function setCameraPosition(positionVector) {
if (cameraPointer.getPositionVector().equals(positionVector)) {
return(undefined);
}
var _local4 = new three_d.VectorClass(positionVector.subtract(cameraPointer.getPositionVector()));
var _local2 = 0;
while (_local2 < figureCollection.length) {
var _local3 = new three_d.VectorClass(figureCollection[_local2].getPosition().add(_local4));
figureCollection[_local2].setPosition(_local3);
_local2++;
}
cameraPointer.setPositionVector(positionVector);
}
function setCamera(latitude, longitude, zoom) {
cameraPointer.setLatitude(latitude);
cameraPointer.setLongitude(longitude);
cameraPointer.setZoom(zoom);
}
function getCamera() {
return(cameraPointer);
}
function setBlurSides(newBlurSides) {
blurSides = newBlurSides;
}
}
Symbol 1679 MovieClip [__Packages.three_d.Figure] Frame 0
class three_d.Figure
{
var vectorCollection, sideCollection, positionVector, rotationVector, rotationX, rotationZ;
function Figure (vectorCollection) {
setVectorCollection(vectorCollection);
}
function setVectorCollection(vectorCollection) {
this.vectorCollection = new Array();
sideCollection = new Array();
positionVector = new three_d.VectorClass([[0], [0], [0]]);
rotationVector = new three_d.VectorClass([[-0.5], [-0.5], [-0.5]]);
rotationX = 0;
rotationZ = 0;
this.vectorCollection = vectorCollection;
findSides();
}
function getVectorCollection() {
return(vectorCollection);
}
function getSideCollection() {
return(sideCollection);
}
function setRotationPoint(rotationVector) {
this.rotationVector = rotationVector;
}
function setRotation(angle, axis) {
angle = angle % 360;
if (angle < 0) {
angle = angle + 360;
}
var _local5;
var _local3;
if (axis == "x") {
if (rotationX == angle) {
return(undefined);
}
_local3 = rotationX - angle;
_local5 = new three_d.MatrixClass([[1, 0, 0], [0, Math.cos((Math.PI/180) * _local3), Math.sin((Math.PI/180) * _local3)], [0, Math.sin((Math.PI/180) * (_local3 + 180)), Math.cos((Math.PI/180) * _local3)]]);
rotationX = angle;
}
if (axis == "z") {
if (rotationZ == angle) {
return(undefined);
}
_local3 = rotationZ - angle;
_local5 = new three_d.MatrixClass([[Math.cos((Math.PI/180) * _local3), -1 * Math.sin((Math.PI/180) * _local3), 0], [Math.sin((Math.PI/180) * _local3), Math.cos((Math.PI/180) * _local3), 0], [0, 0, 1]]);
rotationZ = angle;
}
var _local6 = positionVector;
setPosition(rotationVector);
var _local2 = 0;
while (_local2 < vectorCollection.length) {
vectorCollection[_local2].setVector(_local5.multiply(vectorCollection[_local2]));
_local2++;
}
setPosition(_local6);
}
function getRotation(axis) {
if (axis == "x") {
return(rotationX);
}
if (axis == "z") {
return(rotationZ);
}
}
function setPosition(positionVector) {
if (this.positionVector.equals(positionVector)) {
return(undefined);
}
var _local2 = new three_d.VectorClass(positionVector.subtract(this.positionVector));
move(_local2);
this.positionVector = positionVector;
}
function getPosition() {
return(positionVector);
}
function move(moveVector) {
var _local2 = 0;
while (_local2 < vectorCollection.length) {
vectorCollection[_local2].setVector(vectorCollection[_local2].add(moveVector));
_local2++;
}
}
function setSideDepth(camera) {
var _local2 = 0;
while (_local2 < sideCollection.length) {
sideCollection[_local2].setDepth(camera);
_local2++;
}
}
function findSides() {
var _local6 = 0;
while (_local6 < vectorCollection.length) {
var _local3 = vectorCollection[_local6].getReference();
var _local12 = new Array();
var _local4 = 0;
while (_local4 < _local3.length) {
_local12.push(removeVector(_local3[_local4].getReference(), vectorCollection[_local6]));
_local4++;
}
var _local5 = getSide(_local12);
var _local2 = 0;
while (_local2 < _local5.length) {
var _local10 = vectorCollection[_local6];
var _local8 = _local3[_local5[_local2][1]];
var _local9 = _local5[_local2][0];
var _local11 = _local3[_local5[_local2][2]];
var _local7 = new three_d.Side([_local10, _local8, _local9, _local11]);
if (!containSide(sideCollection, _local7)) {
sideCollection.push(_local7);
}
_local2++;
}
_local6++;
}
}
function removeVector(vectorCollection, vector) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < vectorCollection.length) {
if (vectorCollection[_local1] != vector) {
_local3.push(vectorCollection[_local1]);
}
_local1++;
}
return(_local3);
}
function getSide(vectorRefArray) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < vectorRefArray.length) {
var _local5 = 0;
while (_local5 < vectorRefArray[_local3].length) {
var _local2 = 0;
while (_local2 < vectorRefArray.length) {
if (_local2 != _local3) {
if (containVector(vectorRefArray[_local2], vectorRefArray[_local3][_local5])) {
if (!containVector2(_local6, vectorRefArray[_local3][_local5])) {
_local6.push([vectorRefArray[_local3][_local5], _local2, _local3]);
}
}
}
_local2++;
}
_local5++;
}
_local3++;
}
return(_local6);
}
function containVector(vectorCollection, vector) {
var _local1 = 0;
while (_local1 < vectorCollection.length) {
if (vectorCollection[_local1] == vector) {
return(true);
}
_local1++;
}
return(false);
}
function containVector2(array1, vector) {
var _local1 = 0;
while (_local1 < array1.length) {
if (array1[_local1][0] == vector) {
return(true);
}
_local1++;
}
return(false);
}
function containSide(sideCollection, side) {
var _local4 = 0;
while (_local4 < sideCollection.length) {
if (containVector(sideCollection[_local4].getVectorCollection(), side.getVectorCollection()[0])) {
var _local2 = true;
var _local3 = 1;
while (_local3 < side.getVectorCollection().length) {
if (containVector(sideCollection[_local4].getVectorCollection(), side.getVectorCollection()[_local3])) {
_local2 = _local2 and true;
} else {
_local2 = _local2 and false;
}
_local3++;
}
if (_local2) {
return(_local2);
}
}
_local4++;
}
return(false);
}
function getSideWithMovieClip(movieClip) {
var _local2 = 0;
while (_local2 < sideCollection.length) {
if (sideCollection[_local2].getMovieClip() == movieClip) {
return(sideCollection[_local2]);
}
_local2++;
}
return(undefined);
}
function getSidesWithVectors(vectorCollection) {
var _local8 = new Array();
var _local7 = 0;
while (_local7 < sideCollection.length) {
var _local5 = sideCollection[_local7].getVectorCollection();
var _local6 = 0;
var _local3 = 0;
while (_local3 < _local5.length) {
var _local2 = 0;
while (_local2 < vectorCollection.length) {
if (_local5[_local3].equals(vectorCollection[_local2])) {
_local6++;
}
_local2++;
}
_local3++;
}
if (_local6 == vectorCollection.length) {
_local8.push(sideCollection[_local7]);
}
_local7++;
}
return(_local8);
}
}
Symbol 1680 MovieClip [__Packages.three_d.Cube] Frame 0
class three_d.Cube extends three_d.Figure
{
var vector0, vector1, vector2, vector3, vector4, vector5, vector6, vector7, setVectorCollection;
function Cube () {
super();
vector0 = new three_d.VectorClass([[0], [0], [0]]);
vector1 = new three_d.VectorClass([[1], [0], [0]]);
vector2 = new three_d.VectorClass([[0], [1], [0]]);
vector3 = new three_d.VectorClass([[1], [1], [0]]);
vector4 = new three_d.VectorClass([[0], [0], [1]]);
vector5 = new three_d.VectorClass([[1], [0], [1]]);
vector6 = new three_d.VectorClass([[0], [1], [1]]);
vector7 = new three_d.VectorClass([[1], [1], [1]]);
vector0.setReference([vector1, vector2, vector4]);
vector1.setReference([vector0, vector5, vector3]);
vector2.setReference([vector0, vector3, vector6]);
vector3.setReference([vector2, vector7, vector1]);
vector4.setReference([vector0, vector6, vector5]);
vector5.setReference([vector1, vector4, vector7]);
vector6.setReference([vector4, vector2, vector7]);
vector7.setReference([vector3, vector5, vector6]);
setVectorCollection([vector0, vector1, vector2, vector3, vector4, vector5, vector6, vector7]);
}
}
Symbol 1308 MovieClip Frame 80
_parent.gotoAndPlay(2);
Symbol 1450 MovieClip Frame 182
_parent.gotoAndPlay(3);
Symbol 1451 MovieClip Frame 1
stop();
Instance of Symbol 1310 MovieClip in Symbol 1451 MovieClip Frame 1
on (press) {
_root.getURL("http://www.madsanthony.com", "_blank");
}
Symbol 1451 MovieClip Frame 2
stop();
Instance of Symbol 1310 MovieClip in Symbol 1451 MovieClip Frame 2
on (press) {
_root.getURL("http://www.dojo.com", "_blank");
}
Symbol 1451 MovieClip Frame 3
_parent.gotoAndPlay("configureGraphic");
Symbol 1476 MovieClip Frame 1
stop();
Symbol 1480 MovieClip Frame 1
if (_root.level0ChestGotten) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
Symbol 1482 MovieClip Frame 1
gameProgress = 0;
if (_root.levelBoss1ChestGotten) {
part1._alpha = 100;
gameProgress = gameProgress + 3.33333333333333;
} else {
part1._alpha = 20;
}
if (_root.levelBoss2ChestGotten) {
part2._alpha = 100;
gameProgress = gameProgress + 3.33333333333333;
} else {
part2._alpha = 20;
}
if (_root.levelBoss3ChestGotten) {
part3._alpha = 100;
gameProgress = gameProgress + 3.33333333333333;
} else {
part3._alpha = 20;
}
levelI = 1;
while (levelI <= 18) {
if (_root[("level" + levelI) + "ChestGotten"]) {
gameProgress = gameProgress + 2.22222222222222;
}
if (_root[("level" + levelI) + "GearGotten"]) {
gameProgress = gameProgress + 1.66666666666667;
}
if (_root[("level" + levelI) + "DiamondGotten"]) {
gameProgress = gameProgress + 1.11111111111111;
}
if (_root[("level" + levelI) + "KeyGotten"]) {
gameProgress = gameProgress + 2.22222222222222;
}
levelI++;
}
if (_root.levelTutorial1KeyGotten) {
gameProgress = gameProgress + 2.22222222222222;
}
if (_root.levelTutorial2KeyGotten) {
gameProgress = gameProgress + 2.22222222222222;
}
gameProgress = Math.floor(gameProgress);
gameProgressNumber = gameProgress;
gameProgress = gameProgress + "%";
Symbol 1504 MovieClip Frame 1
stop();
Symbol 1548 MovieClip Frame 1
this.onEnterFrame = function () {
if (this.hitTest(_root.cursorFinger)) {
this.gotoAndStop(2);
if (_root.mouseIsDown) {
_root.gotoAndStop("level");
}
} else {
this.gotoAndStop(1);
}
};
stop();
Symbol 1549 MovieClip Frame 44
stop();
Instance of Symbol 1093 MovieClip in Symbol 1552 MovieClip Frame 1
onClipEvent (load) {
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent.hitbox)) {
_root.amuletPartGottenTemporary = true;
_parent._visible = false;
}
}
Instance of Symbol 136 MovieClip in Symbol 1552 MovieClip Frame 125
onClipEvent (load) {
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent.hitbox)) {
_root.amuletPartGottenTemporary = true;
_parent._visible = false;
}
}
Instance of Symbol 136 MovieClip in Symbol 1552 MovieClip Frame 145
onClipEvent (load) {
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent.hitbox)) {
_root.amuletPartGottenTemporary = true;
_parent._visible = false;
}
}
Instance of Symbol 256 MovieClip in Symbol 1552 MovieClip Frame 165
onClipEvent (load) {
this.parts.gotoAndStop(3);
}
Instance of Symbol 256 MovieClip in Symbol 1552 MovieClip Frame 165
onClipEvent (load) {
this.parts.gotoAndStop(2);
}
Instance of Symbol 256 MovieClip in Symbol 1552 MovieClip Frame 165
onClipEvent (load) {
this.parts.gotoAndStop(1);
}
Instance of Symbol 136 MovieClip in Symbol 1552 MovieClip Frame 170
onClipEvent (load) {
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent.hitbox)) {
_root.amuletPartGottenTemporary = true;
_parent._visible = false;
}
}
Instance of Symbol 1093 MovieClip in Symbol 1552 MovieClip Frame 260
onClipEvent (load) {
this.count = 0;
}
onClipEvent (enterFrame) {
this.count = this.count + 0.2;
this._y = this._y + (Math.cos(this.count) * 0.5);
_parent._rotation = _parent._parent.gravityRotation;
if (_parent._parent.heroPointer.shelter.bodyHitbox.hitTest(_parent.hitbox)) {
_root.amuletPartGottenTemporary = true;
_parent._visible = false;
}
}
Symbol 1552 MovieClip Frame 290
_parent.gotoAndPlay(_parent._currentframe + 1);
stop();
Symbol 1566 MovieClip Frame 1
stop();
if (_root.level0ChestGotten) {
_root.mainMenu.gameProgress._visible = true;
} else {
_root.mainMenu.gameProgress._visible = false;
}
Instance of Symbol 1480 MovieClip in Symbol 1566 MovieClip Frame 1
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
if (_root.level0ChestGotten) {
_root.gotoAndStop("level");
} else {
_parent.gotoAndPlay("begin");
}
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1484 MovieClip in Symbol 1566 MovieClip Frame 1
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_parent.gotoAndPlay(_parent._currentframe + 1);
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1334 MovieClip in Symbol 1566 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.mouseIsDown = false;
_root.getURL("http://www.dojo.com", "_blank");
}
}
}
Symbol 1566 MovieClip Frame 15
this.onEnterFrame = function () {
this.frameSkips = _root.frameSkipsSetting;
};
stop();
Instance of Symbol 1507 MovieClip in Symbol 1566 MovieClip Frame 15
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_parent.gotoAndPlay("graphic");
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1509 MovieClip in Symbol 1566 MovieClip Frame 15
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_parent.gotoAndPlay("sound");
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1511 MovieClip in Symbol 1566 MovieClip Frame 15
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_parent.gotoAndPlay("other");
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1513 MovieClip in Symbol 1566 MovieClip Frame 15
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_parent.gotoAndPlay(1);
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Symbol 1566 MovieClip Frame 30
this.gotoAndStop(1);
Instance of Symbol 1513 MovieClip in Symbol 1566 MovieClip Frame 30
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_parent.gotoAndPlay(_parent._currentframe + 1);
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Symbol 1566 MovieClip Frame 50
this.onEnterFrame = function () {
this.frameSkips = _root.optimizeDrawVar;
};
stop();
Instance of Symbol 1518 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root.blurSide) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.blurSide = true;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1520 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (!_root.blurSide) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.blurSide = false;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1513 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.cursorFinger.enableCursor = false;
_parent.gotoAndStop("options");
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1523 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (!(((((!_root.blurSide) && (_root.optimizeDrawVar == 1)) && (_root._quality == "LOW")) || (((!_root.blurSide) && (_root.optimizeDrawVar == 0)) && (_root._quality == "MEDIUM"))) || ((_root.blurSide && (_root.optimizeDrawVar == 0)) && (_root._quality == "HIGH")))) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.graphicSetting = "custom";
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1525 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (((!_root.blurSide) && (_root.optimizeDrawVar == 1)) && (_root._quality == "LOW")) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.blurSide = false;
_root.optimizeDrawVar = 1;
_root._quality = "LOW";
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1527 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (((!_root.blurSide) && (_root.optimizeDrawVar == 0)) && (_root._quality == "MEDIUM")) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.blurSide = false;
_root.optimizeDrawVar = 0;
_root._quality = "MEDIUM";
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1529 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if ((_root.blurSide && (_root.optimizeDrawVar == 0)) && (_root._quality == "HIGH")) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.blurSide = true;
_root.optimizeDrawVar = 0;
_root._quality = "HIGH";
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1518 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root.updateAllSidesSetting) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.updateAllSidesSetting = true;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1520 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (!_root.updateAllSidesSetting) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.updateAllSidesSetting = false;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1534 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root._quality == "LOW") {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root._quality = "LOW";
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1536 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root._quality == "MEDIUM") {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root._quality = "MEDIUM";
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1538 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root._quality == "HIGH") {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root._quality = "HIGH";
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1513 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
this.isPressed = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root.optimizeDrawVar > 0) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown && (!this.isPressed)) {
if (_root.optimizeDrawVar > 0) {
_root.optimizeDrawVar = _root.optimizeDrawVar - 1;
}
this.isPressed = true;
}
if ((!_root.mouseIsDown) && (this.isPressed)) {
this.isPressed = false;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1513 MovieClip in Symbol 1566 MovieClip Frame 50
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
this.isPressed = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root.optimizeDrawVar < 5) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown && (!this.isPressed)) {
if (_root.optimizeDrawVar < 5) {
_root.optimizeDrawVar = _root.optimizeDrawVar + 1;
}
this.isPressed = true;
}
if ((!_root.mouseIsDown) && (this.isPressed)) {
this.isPressed = false;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Symbol 1566 MovieClip Frame 65
stop();
Instance of Symbol 1518 MovieClip in Symbol 1566 MovieClip Frame 65
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (!_root.musicIsOnMute) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.musicIsOnMute = false;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1520 MovieClip in Symbol 1566 MovieClip Frame 65
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root.musicIsOnMute) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.musicIsOnMute = true;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Symbol 1566 MovieClip Frame 80
stop();
Instance of Symbol 1518 MovieClip in Symbol 1566 MovieClip Frame 80
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (_root.cubeReflectionOn) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.cubeReflectionOn = true;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1520 MovieClip in Symbol 1566 MovieClip Frame 80
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
var colorTransform = (new flash.geom.ColorTransform(this));
if (!_root.cubeReflectionOn) {
colorTransform.redOffset = 0;
colorTransform.greenOffset = 0;
colorTransform.blueOffset = 0;
} else {
colorTransform.redOffset = 100;
colorTransform.greenOffset = 100;
colorTransform.blueOffset = 100;
}
var trans = (new flash.geom.Transform(this));
trans.colorTransform = colorTransform;
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.cubeReflectionOn = false;
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1543 MovieClip in Symbol 1566 MovieClip Frame 80
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.user.clear();
_root.gotoAndPlay(2);
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1545 MovieClip in Symbol 1566 MovieClip Frame 81
onClipEvent (load) {
this.counter = 0;
}
onClipEvent (enterFrame) {
this.trackVolume = _root.trackSelectMenu.getVolume();
this.counter++;
if ((this.trackVolume > 0) && ((this.counter % 15) == 0)) {
_root.trackSelectMenu.setVolume(this.trackVolume - 1);
}
if (this.trackVolume <= 0) {
_root.trackSelectMenu.setVolume(0);
}
}
Instance of Symbol 1334 MovieClip in Symbol 1566 MovieClip Frame 95
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (_root.mouseIsDown) {
_root.mouseIsDown = false;
_root.getURL("http://www.dojo.com");
}
}
}
Symbol 1566 MovieClip Frame 180
stop();
Symbol 1566 MovieClip Frame 360
_root.gotoAndStop("level");
Symbol 1580 MovieClip Frame 1
stop();
Symbol 1589 MovieClip Frame 1
stop();
Symbol 1592 MovieClip Frame 1
stop();
Symbol 1595 MovieClip Frame 1
stop();
Symbol 1612 MovieClip Frame 1
stop();
Instance of Symbol 1611 MovieClip in Symbol 1612 MovieClip Frame 1
onClipEvent (load) {
this.counter = 0;
}
onClipEvent (enterFrame) {
this.counter++;
if (this.counter > 0) {
_parent.loadingText = "Loading";
}
if (this.counter > 20) {
_parent.loadingText = "Loading.";
}
if (this.counter > 30) {
_parent.loadingText = "Loading..";
}
if (this.counter > 40) {
_parent.loadingText = "Loading...";
}
if (this.counter > 50) {
this.counter = 0;
}
}
Symbol 1612 MovieClip Frame 20
this.idle = true;
stop();
Symbol 1612 MovieClip Frame 40
gotoAndStop (1);
Symbol 1622 MovieClip Frame 38
this._x = 1000;
stop();
Symbol 1663 MovieClip Frame 1
stop();
Instance of Symbol 1658 MovieClip in Symbol 1663 MovieClip Frame 2
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
this.buttonPressed = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (Key.isDown(1)) {
if (_parent._parent._parent._currentframe == 10) {
_root.setupLevelCode = _parent.insertLevelCode.text.split(newline).join("").split("\t").join("").split("\r").join("").split(" ").join("");
mcI = 1;
while (mcI < 7) {
_root[("mc" + mcI) + "Shelter"].removeMovieClip();
mcI++;
}
Mouse.removeListener(_root.engine.mouseListener);
delete cube1;
delete cube2;
_root.track1.stop();
_root.track2.stop();
_root.trackSelect.stop();
_root.gotoAndPlay("restartEditor");
}
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Instance of Symbol 1649 MovieClip "button" in Symbol 1664 MovieClip Frame 1
onClipEvent (load) {
this.startWidth = this._width;
this.startHeight = this._height;
this.reduceWidthHeight = 1;
this.counter = 0;
this.isRollOverEffect = false;
this.isRollOverEffectMax = false;
this.buttonPressed = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.cursorFinger)) {
if (Key.isDown(1)) {
if (!this.buttonPressed) {
_root.editorButtonWorks = true;
_parent._parent.gotoAndPlay(11);
this.buttonPressed = true;
}
}
if (!this.isRollOverEffect) {
this.reduceWidthHeight = 1;
this.isRollOverEffect = true;
this.isRollOverEffectMax = true;
}
}
if (this.isRollOverEffect) {
this._width = this._width + ((this.startWidth / 10) * this.reduceWidthHeight);
this._height = this._height + ((this.startHeight / 10) * this.reduceWidthHeight);
this.reduceWidthHeight = this.reduceWidthHeight - 0.2;
if ((this.reduceWidthHeight <= 0) && (this.isRollOverEffectMax)) {
this.reduceWidthHeight = 0;
}
if (!this.hitTest(_root.cursorFinger)) {
if (this.reduceWidthHeight == 0) {
this.isRollOverEffectMax = false;
}
}
if ((Math.round(this._width) > (Math.round(this.startWidth) - 5)) && (Math.round(this._width) < (Math.round(this.startWidth) + 5))) {
if (!this.isRollOverEffectMax) {
this.isRollOverEffect = false;
}
}
}
}
Symbol 1665 MovieClip Frame 1
box.button.buttonPressed = false;
this._y = -800;
stop();
Symbol 1665 MovieClip Frame 10
stop();
Symbol 1671 MovieClip Frame 1
stop();
Symbol 1671 MovieClip Frame 20
idle = true;
stop();
Symbol 1671 MovieClip Frame 40
gotoAndStop (1);