Frame 1
function gotoOphyr() {
getURL ("http://www.ophyr.nl", "_blank");
}
function gotoSogyo() {
getURL ("http://www.sogyo.nl", "_blank");
}
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
if (percentDone < 100) {
_root.playButt._visible = false;
_root.dragon._x = (119.5 + (2 * percentDone)) + 20.8;
_root.box._x = 140.3 + (2 * percentDone);
} else {
_root.box._visible = false;
_root.dragon._visible = false;
_root.preloadingtext._visible = false;
_root.ppath._visible = false;
_root.playButt._visible = true;
}
var myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
var link = new ContextMenuItem("Ophyr games", gotoOphyr);
myContextMenu.customItems.push(link);
var link2 = new ContextMenuItem("Sogyo Information Engineering", gotoSogyo);
myContextMenu.customItems.push(link2);
_root.menu = myContextMenu;
Frame 2
gotoAndPlay (1);
Frame 3
stopAllSounds();
Frame 4
var bitmapQuality;
var scale;
var xspeed;
var yspeed;
var octaves;
levelType = 16 - Math.floor(Math.random() * 15);
if (eval (_root.bbar)) {
_root.lc.removeMovieClip();
_root.musicplayer.removeMovieClip();
_root.char.removeMovieClip();
_root.bbar.removeMovieClip();
}
_quality = "HIGH";
bitmapQuality = 200;
scale = 240;
xspeed = 5;
yspeed = 6;
octaves = 1;
var bitmap = (new flash.display.BitmapData(bitmapQuality, bitmapQuality));
var container = _root.createEmptyMovieClip("container", 1);
container.attachBitmap(bitmap, 2, true, false);
container._xscale = scale;
container._yscale = scale;
var offset = (new flash.geom.Point(10, 10));
var offset2 = (new flash.geom.Point(10, 10));
var offset3 = (new flash.geom.Point(10, 10));
seed = 150;
container.onEnterFrame = function () {
if ((levelType % 16) == 0) {
levelType = 12;
}
this._visible = true;
offset.offset(xspeed, 1);
offset1.offset(yspeed, 1);
offset2.offset(0, 1);
this.convolution = new flash.filters.ConvolutionFilter(3, 2, [30, 1, 20]);
bitmap.perlinNoise(bitmapQuality, bitmapQuality, octaves, seed, true, true, levelType, false, [offset, offset1, offset2]);
};
Frame 5
stop();
_root.song = 1;
_root.music = new Sound(_root.mPlayer);
_root.music.attachSound("mus_1");
_root.songnames = new Array("Imaginary Friend", "Weather Girl", "Mountain King", "You and Me");
Instance of Symbol 188 MovieClip "menubar" in Frame 5
onClipEvent (load) {
this.swapDepths(5999);
}
Frame 6
function setBgQuality(quality) {
switch (quality) {
case HIGH :
_quality = "HIGH";
bitmapQuality = 200;
scale = 240;
xspeed = 5;
yspeed = 6;
octaves = 3;
break;
case LOW :
_quality = "LOW";
bitmapQuality = 100;
scale = 480;
xspeed = 1;
yspeed = -2;
octaves = 2;
}
}
function toggleBgQuality() {
trace(scale);
switch (scale) {
case 480 :
setBgQuality(HIGH);
_root.musicplayer.toggler.gotoAndStop(1);
break;
case 240 :
setBgQuality(LOW);
_root.musicplayer.toggler.gotoAndStop(2);
}
}
finishedSound = new Sound();
finishedSound.attachSound("finished");
moveSound = new Sound();
moveSound.attachSound("move");
resetSound = new Sound();
resetSound.attachSound("resetsound");
resetMapSound = new Sound();
resetMapSound.attachSound("resetMap");
if (keyListener == undefined) {
keyListener = new Object();
Key.addListener(keyListener);
}
var LOW = 1;
var HIGH = 2;
_root.FORMERMAPSIZE;
var bitmapQuality;
var scale;
var xspeed;
var yspeed;
var octaves;
setBgQuality(HIGH);
var bitmap = (new flash.display.BitmapData(bitmapQuality, bitmapQuality));
var container = _root.createEmptyMovieClip("container", 1);
container.attachBitmap(bitmap, 2, true, false);
container._xscale = scale;
container._yscale = scale;
var offset = (new flash.geom.Point(10, 10));
var offset2 = (new flash.geom.Point(10, 10));
var offset3 = (new flash.geom.Point(10, 10));
seed = 150;
var levelType;
_root.attachMovie("lc", "lc", 6001);
_root.attachMovie("bbar", "bbar", 4080);
_root.bbar.reset.onPress = function () {
resetMapSound.start(0, 1);
startFader(true);
};
_root.bbar.undo.onPress = function () {
resetSound.start(0, 1);
resetState();
};
_root.bbar.quit.onPress = function () {
var _local3;
var _local2;
width = level[0].length;
height = level.length;
_local2 = 10;
while (_local2 < 810) {
_root.getInstanceAtDepth(_local2).removeMovieClip();
_local2++;
}
BIG();
stopAllSounds();
_root.musicplayer.songtitle.text = "Stopped";
_root.gotoAndPlay(4);
};
_root.attachMovie("mPlayer", "musicplayer", 4082);
_root.musicplayer._y = scale;
_root.musicplayer._x = 0;
_root.musicplayer.toggler.onRelease = function () {
toggleBgQuality();
};
container.onEnterFrame = function () {
levelType = 16 - level;
if ((levelType % 16) == 0) {
levelType = 12;
}
this._visible = true;
offset.offset(xspeed, 1);
offset1.offset(yspeed, 1);
offset2.offset(0, 1);
this.convolution = new flash.filters.ConvolutionFilter(3, 2, [30, 1, 20]);
bitmap.perlinNoise(bitmapQuality, bitmapQuality, octaves, seed, true, true, levelType, false, [offset, offset1, offset2]);
};
Frame 8
function saveState() {
charRot = this.char._currentframe;
charX = this.char._x;
charY = this.char._y;
movedBox = "";
}
function resetState() {
if ((charX != this.char._x) || (charY != this.char._y)) {
this.char.gotoAndStop(charRot);
this.char._x = charX;
this.char._y = charY;
movedBox._x = boxStateX;
movedBox._y = boxStateY;
movedBox.gotoAndStop(movedBoxFrame);
moves--;
saveState();
}
}
function moveUp() {
this.char.gotoAndStop(1);
var _local9 = ((this.char._y - TILE_SIZE) - OFFSET) / TILE_SIZE;
var _local10 = (this.char._x - OFFSET) / TILE_SIZE;
var _local7 = ((this.char._y - (2 * TILE_SIZE)) - OFFSET) / TILE_SIZE;
var _local8 = (this.char._x - OFFSET) / TILE_SIZE;
var _local4 = false;
var _local2 = 0;
while (_local2 < currentBoxArray.length) {
var _local6 = (currentBoxArray[_local2]._x - OFFSET) / TILE_SIZE;
var _local5 = (currentBoxArray[_local2]._y - OFFSET) / TILE_SIZE;
if ((_local10 == _local6) && (_local9 == _local5)) {
if ((currentLevel[_local7][_local8] != 2) && (currentLevel[_local7][_local8] != 1)) {
var _local3 = 0;
while (_local3 < currentBoxArray.length) {
if ((currentBoxArray[_local3]._y == (currentBoxArray[_local2]._y - TILE_SIZE)) && (currentBoxArray[_local3]._x == currentBoxArray[_local2]._x)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
moveSound.start(0, 1);
boxStateX = currentBoxArray[_local2]._x;
boxStateY = currentBoxArray[_local2]._y;
movedBox = currentBoxArray[_local2];
movedBoxFrame = currentBoxArray[_local2]._currentframe;
currentBoxArray[_local2]._y = currentBoxArray[_local2]._y - TILE_SIZE;
checkDone();
}
} else {
_local4 = true;
}
}
_local2++;
}
if (((currentLevel[_local9][_local10] != 2) && (currentLevel[_local9][_local10] != 1)) && (!_local4)) {
moves++;
this.char._y = this.char._y - TILE_SIZE;
}
}
function moveDown() {
this.char.gotoAndStop(3);
var _local9 = ((this.char._y + TILE_SIZE) - OFFSET) / TILE_SIZE;
var _local10 = (this.char._x - OFFSET) / TILE_SIZE;
var _local7 = ((this.char._y + (2 * TILE_SIZE)) - OFFSET) / TILE_SIZE;
var _local8 = (this.char._x - OFFSET) / TILE_SIZE;
var _local4 = false;
var _local2 = 0;
while (_local2 < currentBoxArray.length) {
var _local6 = (currentBoxArray[_local2]._x - OFFSET) / TILE_SIZE;
var _local5 = (currentBoxArray[_local2]._y - OFFSET) / TILE_SIZE;
if ((_local10 == _local6) && (_local9 == _local5)) {
if ((currentLevel[_local7][_local8] != 2) && (currentLevel[_local7][_local8] != 1)) {
var _local3 = 0;
while (_local3 < currentBoxArray.length) {
if ((currentBoxArray[_local3]._y == (currentBoxArray[_local2]._y + TILE_SIZE)) && (currentBoxArray[_local3]._x == currentBoxArray[_local2]._x)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
moveSound.start(0, 1);
boxStateX = currentBoxArray[_local2]._x;
boxStateY = currentBoxArray[_local2]._y;
movedBox = currentBoxArray[_local2];
movedBoxFrame = currentBoxArray[_local2]._currentframe;
currentBoxArray[_local2]._y = currentBoxArray[_local2]._y + TILE_SIZE;
checkDone();
}
} else {
_local4 = true;
}
}
_local2++;
}
if (((currentLevel[_local9][_local10] != 2) && (currentLevel[_local9][_local10] != 1)) && (!_local4)) {
moves++;
this.char._y = this.char._y + TILE_SIZE;
}
}
function moveLeft() {
this.char.gotoAndStop(4);
var _local9 = (this.char._y - OFFSET) / TILE_SIZE;
var _local10 = ((this.char._x - TILE_SIZE) - OFFSET) / TILE_SIZE;
var _local7 = (this.char._y - OFFSET) / TILE_SIZE;
var _local8 = ((this.char._x - (2 * TILE_SIZE)) - OFFSET) / TILE_SIZE;
var _local4 = false;
var _local2 = 0;
while (_local2 < currentBoxArray.length) {
var _local6 = (currentBoxArray[_local2]._x - OFFSET) / TILE_SIZE;
var _local5 = (currentBoxArray[_local2]._y - OFFSET) / TILE_SIZE;
if ((_local10 == _local6) && (_local9 == _local5)) {
if ((currentLevel[_local7][_local8] != 3) && (currentLevel[_local7][_local8] != 1)) {
var _local3 = 0;
while (_local3 < currentBoxArray.length) {
if ((currentBoxArray[_local3]._x == (currentBoxArray[_local2]._x - TILE_SIZE)) && (currentBoxArray[_local3]._y == currentBoxArray[_local2]._y)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
moveSound.start(0, 1);
boxStateX = currentBoxArray[_local2]._x;
boxStateY = currentBoxArray[_local2]._y;
movedBox = currentBoxArray[_local2];
movedBoxFrame = currentBoxArray[_local2]._currentframe;
currentBoxArray[_local2]._x = currentBoxArray[_local2]._x - TILE_SIZE;
checkDone();
}
} else {
_local4 = true;
}
}
_local2++;
}
if (((currentLevel[_local9][_local10] != 3) && (currentLevel[_local9][_local10] != 1)) && (!_local4)) {
moves++;
this.char._x = this.char._x - TILE_SIZE;
}
}
function moveRight() {
this.char.gotoAndStop(2);
var _local9 = (this.char._y - OFFSET) / TILE_SIZE;
var _local10 = ((this.char._x + TILE_SIZE) - OFFSET) / TILE_SIZE;
var _local7 = (this.char._y - OFFSET) / TILE_SIZE;
var _local8 = ((this.char._x + (2 * TILE_SIZE)) - OFFSET) / TILE_SIZE;
var _local4 = false;
var _local2 = 0;
while (_local2 < currentBoxArray.length) {
var _local6 = (currentBoxArray[_local2]._x - OFFSET) / TILE_SIZE;
var _local5 = (currentBoxArray[_local2]._y - OFFSET) / TILE_SIZE;
if ((_local10 == _local6) && (_local9 == _local5)) {
if ((currentLevel[_local7][_local8] != 3) && (currentLevel[_local7][_local8] != 1)) {
var _local3 = 0;
while (_local3 < currentBoxArray.length) {
if ((currentBoxArray[_local3]._x == (currentBoxArray[_local2]._x + TILE_SIZE)) && (currentBoxArray[_local3]._y == currentBoxArray[_local2]._y)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
moveSound.start(0, 1);
boxStateX = currentBoxArray[_local2]._x;
boxStateY = currentBoxArray[_local2]._y;
movedBox = currentBoxArray[_local2];
movedBoxFrame = currentBoxArray[_local2]._currentframe;
currentBoxArray[_local2]._x = currentBoxArray[_local2]._x + TILE_SIZE;
checkDone();
}
} else {
_local4 = true;
}
}
_local2++;
}
if (((currentLevel[_local9][_local10] != 3) && (currentLevel[_local9][_local10] != 1)) && (!_local4)) {
moves++;
this.char._x = this.char._x + TILE_SIZE;
}
}
function checkDone() {
var _local2 = 0;
var _local4 = true;
var _local3 = false;
while (_local2 < currentBoxArray.length) {
var _local1 = 0;
_local3 = false;
while (_local1 < currentExitArray.length) {
if ((currentBoxArray[_local2]._x == currentExitArray[_local1]._x) && (currentBoxArray[_local2]._y == currentExitArray[_local1]._y)) {
_local3 = true;
currentBoxArray[_local2].gotoAndStop(2);
}
_local1++;
}
if (!_local3) {
currentBoxArray[_local2].gotoAndStop(1);
_local4 = false;
}
_local2++;
}
if (_local4) {
if (level == 0) {
finishedGame(true);
} else if (level != nLevels) {
level++;
finishedSound.start(0, 1);
startFader(false);
} else {
finishedGame(false);
}
}
}
function finishedGame(custom) {
trace(("You finished the game! [bCustom = " + custom) + "]");
Key.removeListener(keyListener);
var _local2;
width = level[0].length;
height = level.length;
_local2 = 1;
while (_local2 < 100000) {
_root.getInstanceAtDepth(_local2).removeMovieClip();
_local2++;
}
_root.bbar.removeMovieClip();
_root.lc.swapDepths(100);
_root.lc.removeMovieClip();
stopAllSounds();
_root.gotoAndStop(_currentframe + 1);
}
function startFader(reset) {
Key.removeListener(keyListener);
if (reset) {
this.attachMovie("resetfader", "fader", 9999);
} else {
this.attachMovie("fader", "fader", 9999);
this.fader.nextLevel = level;
this.fader.nextLevelPass = eval ("plevel" + level);
this.fader.nMoves = moves;
if (eval ("levelSize" + level.toString()) == "SMALL") {
this.fader._xscale = 50;
this.fader._yscale = 50;
}
}
this.fader._x = 0;
this.fader._y = 0;
this.fader.myFunction = unInit;
}
function createGameMap(level, character) {
if (level[0].length != undefined) {
currentLevel = level;
boxArray = new Array();
exitArray = new Array();
buildLevel(level, tileLayer, boxArray, exitArray);
if (boxArray.length != exitArray.length) {
throw "Number of boxes and exits should be equal";
return(undefined);
}
createCharacter(character);
}
}
function unInit() {
var _local3;
var _local2;
width = level[0].length;
height = level.length;
_local2 = 10;
while (_local2 < 810) {
_root.getInstanceAtDepth(_local2).removeMovieClip();
_local2++;
}
_root.gotoAndPlay(--_root._currentframe);
}
function createCharacter(start01) {
this.attachMovie("char", "char", playerLayer);
this.char._x = OFFSET + (start01[0] * TILE_SIZE);
this.char._y = OFFSET + (start01[1] * TILE_SIZE);
this.char.gotoAndStop(3);
}
function buildLevel(level, tileStartLayer, boxArray, exitArray) {
width = level[0].length;
height = level.length;
if ((height > 20) || (width > 20)) {
throw "level too big";
return(undefined);
}
var _local2;
var _local3;
var _local5;
_local3 = 0;
while (_local3 < height) {
_local2 = 0;
while (_local2 < width) {
if (level[_local3][_local2] != 0) {
this.attachMovie(tileSet, (("tile_" + _local3) + "_") + _local2, tileStartLayer++);
this[(("tile_" + _local3) + "_") + _local2]._width = TILE_SIZE;
this[(("tile_" + _local3) + "_") + _local2]._height = TILE_SIZE;
this[(("tile_" + _local3) + "_") + _local2]._x = OFFSET + (_local2 * TILE_SIZE);
this[(("tile_" + _local3) + "_") + _local2]._y = OFFSET + (_local3 * TILE_SIZE);
if (level[_local3][_local2] != 0) {
this[(("tile_" + _local3) + "_") + _local2].gotoAndStop(level[_local3][_local2]);
}
_local5 = level[_local3][_local2];
if (_local5 == 6) {
setBox(_local2, _local3, boxArray);
} else if (_local5 == 4) {
exitArray.push(this[(("tile_" + _local3) + "_") + _local2]);
}
}
_local2++;
}
_local3++;
}
currentBoxArray = boxArray;
boxStateArray = currentBoxArray;
currentExitArray = exitArray;
}
function setBox(lx, ly, boxArray) {
trace((((("Setting a box at " + lx) + ", ") + ly) + ". Tileset -> ") + tileSet);
this.attachMovie(tileSet + "tileBox", (("box_" + ly) + "_") + lx, boxLayer++);
this[(("box_" + ly) + "_") + lx]._x = OFFSET + (lx * TILE_SIZE);
this[(("box_" + ly) + "_") + lx]._y = OFFSET + (ly * TILE_SIZE);
this[(("box_" + ly) + "_") + lx]._width = TILE_SIZE;
this[(("box_" + ly) + "_") + lx]._height = TILE_SIZE;
this[(("box_" + ly) + "_") + lx].gotoAndStop(1);
boxArray.push(this[(("box_" + ly) + "_") + lx]);
}
function SMALL() {
_root.FORMERMAPSIZE = "SMALL";
_root._xscale = 200;
_root._yscale = 200;
_root.bbar._height = 17.5;
_root.bbar._width = 240;
_root.musicplayer._height = 30;
_root.musicplayer._width = 240;
_root.musicplayer._y = 240;
_root.lc._y = 14.2;
_root.lc._width = 45;
_root.lc._height = 13;
}
function BIG() {
trace("BIGGIFY!");
_root.FORMERMAPSIZE = "BIG";
_root._xscale = 100;
_root._yscale = 100;
_root.bbar._height = 35;
_root.bbar._width = 480;
_root.musicplayer._height = 60;
_root.musicplayer._width = 480;
_root.musicplayer._y = 480;
_root.lc._y = 28.4;
_root.lc._width = 90;
_root.lc._height = 26;
}
function startGame(level) {
tileSet = eval ("tileSet" + level.toString());
if (level == 0) {
if (eval ("levelSize" + level.toString()) == "SMALL") {
SMALL();
} else {
BIG();
}
}
if ((eval ("levelSize" + level.toString()) == "SMALL") && (_root.FORMERMAPSIZE != "SMALL")) {
SMALL();
} else if ((eval ("levelSize" + level.toString()) != "SMALL") && (_root.FORMERMAPSIZE == "SMALL")) {
BIG();
}
createGameMap(eval ("level" + level.toString()), eval ("start" + level.toString()));
_root.lc.levelCounterThingy.text = level.toString();
saveState();
Key.addListener(keyListener);
moves = 1;
}
nLevels = 48;
tileSet1 = "tech";
levelSize1 = "SMALL";
start1 = [5, 2];
level1 = [[1, 2, 2, 2, 1, 0, 0, 0], [3, 5, 8, 5, 1, 2, 1, 0], [3, 5, 1, 5, 4, 7, 1, 1], [3, 7, 8, 4, 6, 6, 8, 3], [1, 2, 1, 6, 5, 5, 5, 3], [0, 0, 3, 7, 5, 5, 4, 3], [0, 0, 1, 2, 2, 2, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0]];
tileSet2 = "tech";
levelSize2 = "SMALL";
start2 = [5, 2];
level2 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 2, 2, 2, 2, 1], [0, 3, 4, 5, 4, 5, 7, 3], [0, 3, 8, 1, 4, 1, 5, 3], [0, 3, 5, 5, 5, 6, 9, 3], [0, 3, 5, 6, 6, 8, 1, 1], [0, 3, 7, 5, 1, 2, 1, 0], [0, 1, 2, 2, 1, 0, 0, 0]];
tileSet3 = "tech";
levelSize3 = "SMALL";
start3 = [5, 1];
level3 = [[0, 0, 0, 1, 2, 2, 1, 0], [1, 2, 2, 1, 8, 5, 3, 0], [3, 7, 6, 4, 6, 5, 3, 0], [3, 5, 8, 5, 5, 7, 3, 0], [1, 1, 5, 4, 1, 2, 1, 0], [0, 3, 6, 8, 3, 0, 0, 0], [0, 3, 7, 4, 3, 0, 0, 0], [0, 1, 2, 2, 1, 0, 0, 0]];
tileSet4 = "glass";
levelSize4 = "SMALL";
start4 = [6, 4];
level4 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 1, 0, 1, 2, 1], [0, 3, 4, 1, 2, 1, 4, 3], [0, 3, 9, 1, 7, 5, 4, 3], [0, 3, 5, 6, 6, 5, 5, 3], [0, 3, 5, 5, 6, 5, 5, 3], [0, 3, 5, 5, 1, 5, 9, 3], [0, 3, 5, 7, 1, 2, 2, 1], [0, 1, 2, 2, 1, 0, 0, 0]];
tileSet5 = "glass";
levelSize5 = "SMALL";
start5 = [5, 1];
level5 = [[0, 1, 2, 2, 2, 2, 1, 0], [0, 3, 5, 5, 4, 5, 1, 1], [0, 3, 5, 5, 6, 6, 4, 3], [0, 1, 2, 1, 4, 1, 5, 3], [1, 1, 5, 5, 5, 5, 5, 3], [3, 5, 5, 6, 5, 5, 1, 1], [3, 5, 5, 5, 1, 2, 1, 0], [1, 2, 2, 2, 1, 0, 0, 0]];
tileSet6 = "glass";
levelSize6 = "SMALL";
start6 = [2, 5];
level6 = [[0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 2, 2, 1, 0, 0, 0], [3, 7, 4, 4, 1, 2, 2, 1], [3, 5, 6, 5, 5, 9, 5, 3], [3, 5, 8, 1, 6, 1, 5, 3], [3, 5, 5, 5, 4, 6, 7, 3], [1, 2, 2, 2, 2, 2, 2, 1]];
tileSet7 = "grass";
levelSize7 = "SMALL";
start7 = [4, 4];
level7 = [[0, 0, 1, 2, 2, 2, 1, 0], [1, 2, 1, 8, 5, 4, 3, 0], [3, 8, 6, 5, 1, 5, 3, 0], [3, 5, 4, 6, 7, 8, 3, 0], [3, 5, 4, 1, 5, 5, 1, 0], [3, 7, 6, 8, 7, 1, 1, 0], [3, 5, 9, 5, 1, 1, 0, 0], [1, 2, 2, 2, 1, 0, 0, 0]];
tileSet8 = "grass";
levelSize8 = "SMALL";
start8 = [4, 2];
level8 = [[0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 2, 2, 2, 2, 1, 0], [3, 4, 7, 5, 5, 4, 3, 0], [3, 5, 5, 6, 1, 7, 1, 1], [3, 5, 1, 8, 6, 4, 8, 3], [3, 7, 5, 5, 6, 1, 5, 3], [1, 2, 2, 1, 8, 5, 9, 3], [0, 0, 0, 1, 2, 2, 2, 1]];
tileSet9 = "grass";
levelSize9 = "SMALL";
start9 = [5, 4];
level9 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 2, 2, 1, 0, 0], [0, 3, 4, 7, 4, 1, 2, 1], [0, 3, 4, 1, 6, 6, 7, 3], [0, 3, 5, 5, 8, 5, 5, 3], [0, 3, 7, 6, 1, 9, 5, 3], [0, 1, 1, 8, 9, 5, 1, 1], [0, 0, 1, 2, 2, 2, 1, 0]];
tileSet10 = "candy";
levelSize10 = "SMALL";
start10 = [2, 5];
level10 = [[1, 2, 2, 2, 1, 0, 0, 0], [3, 4, 7, 5, 1, 2, 1, 0], [3, 8, 1, 5, 5, 9, 3, 0], [3, 5, 4, 5, 1, 8, 3, 0], [3, 7, 6, 4, 6, 5, 3, 0], [1, 1, 5, 6, 1, 2, 1, 0], [0, 3, 9, 5, 3, 0, 0, 0], [0, 1, 2, 2, 1, 0, 0, 0]];
tileSet11 = "candy";
levelSize11 = "SMALL";
start11 = [1, 4];
level11 = [[0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 2, 2, 2, 2, 2, 1], [3, 4, 8, 5, 5, 4, 7, 3], [3, 5, 1, 5, 1, 5, 5, 3], [3, 7, 6, 5, 9, 6, 4, 3], [1, 2, 2, 2, 1, 8, 6, 3], [0, 0, 0, 0, 3, 7, 9, 3], [0, 0, 0, 0, 1, 2, 2, 1]];
tileSet12 = "candy";
levelSize12 = "SMALL";
start12 = [4, 6];
level12 = [[1, 2, 2, 1, 0, 0, 0, 0], [3, 5, 7, 3, 0, 0, 0, 0], [3, 8, 6, 1, 2, 2, 2, 1], [3, 5, 4, 4, 6, 7, 7, 3], [1, 1, 5, 5, 5, 5, 5, 3], [0, 3, 5, 1, 6, 1, 2, 1], [0, 3, 4, 5, 8, 3, 0, 0], [0, 1, 2, 2, 2, 1, 0, 0]];
tileSet13 = "tech";
levelSize13 = "SMALL";
start13 = [3, 2];
level13 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 2, 2, 1, 0, 0], [0, 3, 7, 5, 9, 1, 2, 1], [1, 1, 5, 4, 8, 5, 9, 3], [3, 4, 9, 6, 4, 6, 5, 3], [1, 1, 6, 1, 5, 1, 2, 1], [0, 3, 7, 5, 8, 3, 0, 0], [0, 1, 2, 2, 2, 1, 0, 0]];
tileSet14 = "tech";
levelSize14 = "SMALL";
start14 = [4, 3];
level14 = [[0, 1, 2, 2, 2, 1, 0, 0], [1, 1, 5, 9, 5, 3, 0, 0], [3, 5, 6, 1, 5, 3, 0, 0], [3, 5, 4, 8, 5, 1, 1, 0], [3, 7, 4, 6, 5, 5, 3, 0], [1, 1, 5, 1, 6, 8, 3, 0], [0, 3, 4, 5, 7, 1, 1, 0], [0, 1, 2, 2, 2, 1, 0, 0]];
tileSet15 = "tech";
levelSize15 = "SMALL";
start15 = [5, 2];
level15 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 2, 2, 1, 0], [0, 0, 0, 3, 8, 5, 1, 1], [1, 2, 1, 3, 5, 5, 9, 3], [3, 4, 8, 1, 6, 6, 5, 3], [3, 9, 5, 5, 5, 7, 1, 1], [3, 4, 5, 5, 6, 1, 1, 0], [1, 1, 4, 5, 7, 3, 0, 0], [0, 1, 2, 2, 2, 1, 0, 0]];
tileSet16 = "glass";
levelSize16 = "SMALL";
start16 = [1, 5];
level16 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 2, 1, 0, 0, 0], [1, 1, 7, 8, 1, 2, 2, 1], [3, 4, 4, 6, 5, 7, 4, 3], [3, 8, 1, 6, 5, 6, 5, 3], [3, 7, 9, 5, 1, 5, 8, 3], [1, 2, 2, 2, 1, 8, 9, 3], [0, 0, 0, 0, 1, 2, 2, 1]];
tileSet17 = "glass";
levelSize17 = "SMALL";
start17 = [2, 2];
level17 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 2, 1, 0, 0, 0], [0, 3, 7, 9, 3, 0, 0, 0], [0, 3, 5, 8, 3, 0, 0, 0], [1, 1, 4, 5, 1, 2, 2, 1], [3, 7, 6, 6, 4, 7, 4, 3], [3, 5, 5, 6, 5, 1, 2, 1], [1, 2, 1, 8, 9, 3, 0, 0], [0, 0, 1, 2, 2, 1, 0, 0]];
tileSet18 = "glass";
levelSize18 = "SMALL";
start18 = [3, 5];
level18 = [[1, 2, 2, 2, 1, 0, 0, 0], [3, 4, 7, 5, 3, 0, 0, 0], [3, 5, 1, 8, 1, 2, 1, 0], [3, 5, 4, 6, 5, 8, 3, 0], [3, 9, 6, 6, 4, 9, 3, 0], [3, 7, 8, 5, 1, 2, 1, 0], [1, 2, 2, 2, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
tileSet19 = "grass";
levelSize19 = "SMALL";
start19 = [2, 5];
level19 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 2, 2, 2, 1], [0, 0, 0, 3, 9, 8, 9, 3], [0, 0, 0, 3, 7, 1, 4, 3], [0, 1, 2, 1, 5, 5, 4, 3], [0, 3, 5, 8, 6, 6, 5, 3], [0, 3, 7, 5, 4, 6, 7, 3], [0, 1, 2, 2, 2, 2, 2, 1]];
tileSet20 = "grass";
levelSize20 = "SMALL";
start20 = [2, 5];
level20 = [[1, 2, 2, 2, 2, 1, 0, 0], [3, 5, 5, 5, 7, 3, 0, 0], [3, 5, 6, 1, 9, 1, 2, 1], [3, 7, 4, 5, 6, 5, 5, 3], [3, 8, 6, 5, 1, 1, 8, 3], [1, 1, 4, 5, 5, 4, 8, 3], [0, 1, 1, 5, 9, 7, 1, 1], [0, 0, 1, 2, 2, 2, 1, 0]];
tileSet21 = "grass";
levelSize21 = "SMALL";
start21 = [4, 2];
level21 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 2, 2, 2, 1, 0], [0, 3, 7, 5, 5, 5, 1, 1], [0, 3, 5, 5, 1, 5, 8, 3], [0, 3, 4, 5, 5, 6, 5, 3], [0, 3, 8, 6, 6, 1, 4, 3], [0, 1, 2, 1, 9, 7, 4, 3], [0, 0, 0, 1, 2, 2, 2, 1]];
tileSet22 = "candy";
levelSize22 = "SMALL";
start22 = [6, 6];
level22 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 2, 2, 1, 0, 0], [1, 2, 1, 4, 9, 3, 0, 0], [3, 7, 4, 5, 5, 1, 2, 1], [3, 8, 5, 5, 6, 6, 7, 3], [1, 1, 5, 4, 5, 6, 5, 3], [0, 1, 2, 2, 2, 2, 2, 1]];
tileSet23 = "candy";
levelSize23 = "SMALL";
start23 = [2, 1];
level23 = [[0, 1, 2, 2, 2, 2, 1, 0], [1, 1, 5, 4, 8, 7, 3, 0], [3, 5, 6, 6, 4, 8, 3, 0], [3, 5, 7, 1, 6, 5, 1, 1], [3, 5, 5, 3, 5, 5, 4, 3], [1, 2, 2, 1, 5, 1, 9, 3], [0, 0, 0, 3, 8, 7, 8, 3], [0, 0, 0, 1, 2, 2, 2, 1]];
tileSet24 = "candy";
levelSize24 = "SMALL";
start24 = [6, 7];
level24 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 2, 2, 1], [0, 0, 0, 0, 3, 7, 8, 3], [0, 0, 1, 2, 1, 6, 4, 3], [0, 0, 3, 5, 5, 4, 5, 3], [1, 2, 1, 5, 5, 1, 4, 3], [3, 9, 6, 5, 5, 6, 5, 3], [3, 7, 8, 5, 1, 7, 5, 3], [1, 2, 2, 2, 1, 2, 2, 1]];
tileSet25 = "tech";
levelSize25 = "SMALL";
start25 = [6, 6];
level25 = [[0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 2, 2, 1, 0, 0, 0], [3, 9, 8, 4, 1, 2, 1, 0], [3, 8, 6, 4, 4, 8, 3, 0], [3, 5, 5, 1, 1, 6, 1, 1], [1, 1, 5, 7, 1, 5, 5, 3], [0, 3, 6, 5, 5, 5, 5, 3], [0, 3, 8, 5, 1, 2, 2, 1], [0, 1, 2, 2, 1, 0, 0, 0]];
tileSet26 = "tech";
levelSize26 = "SMALL";
start26 = [5, 6];
level26 = [[0, 0, 1, 2, 2, 1, 0, 0], [0, 0, 3, 9, 5, 3, 0, 0], [0, 0, 3, 5, 5, 1, 2, 1], [1, 2, 1, 5, 4, 4, 5, 3], [3, 5, 7, 6, 1, 5, 5, 3], [3, 5, 5, 4, 6, 6, 8, 3], [1, 2, 2, 1, 7, 5, 5, 3], [0, 0, 0, 1, 2, 2, 2, 1]];
tileSet27 = "tech";
levelSize27 = "SMALL";
start27 = [4, 6];
level27 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 2, 2, 2, 2, 1], [0, 1, 1, 7, 5, 4, 5, 3], [0, 3, 8, 6, 5, 1, 5, 3], [0, 3, 5, 4, 6, 5, 9, 3], [0, 3, 5, 9, 1, 6, 1, 1], [0, 3, 4, 5, 5, 7, 1, 0], [0, 1, 2, 2, 2, 2, 1, 0]];
tileSet28 = "glass";
levelSize28 = "SMALL";
start28 = [3, 2];
level28 = [[0, 0, 1, 2, 2, 2, 2, 1], [1, 2, 1, 5, 4, 7, 9, 3], [3, 9, 6, 5, 1, 4, 5, 3], [3, 5, 5, 6, 1, 8, 1, 1], [3, 8, 5, 4, 6, 5, 3, 0], [1, 1, 7, 5, 1, 5, 3, 0], [0, 1, 1, 5, 5, 5, 3, 0], [0, 0, 1, 2, 2, 2, 1, 0]];
tileSet29 = "glass";
levelSize29 = "SMALL";
start29 = [6, 3];
level29 = [[0, 1, 2, 2, 1, 0, 0, 0], [1, 1, 9, 5, 1, 2, 1, 0], [3, 7, 8, 5, 5, 7, 1, 1], [3, 5, 5, 1, 6, 6, 8, 3], [3, 5, 7, 4, 6, 4, 4, 3], [1, 2, 2, 2, 2, 2, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
tileSet30 = "glass";
levelSize30 = "SMALL";
start30 = [2, 2];
level30 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 2, 2, 2, 2, 1], [1, 1, 9, 8, 5, 9, 7, 3], [3, 4, 5, 1, 5, 5, 8, 3], [3, 5, 6, 6, 6, 4, 1, 1], [3, 9, 4, 1, 7, 5, 3, 0], [3, 8, 7, 1, 2, 2, 1, 0], [1, 2, 2, 1, 0, 0, 0, 0]];
tileSet31 = "grass";
levelSize31 = "SMALL";
start31 = [3, 3];
level31 = [[1, 2, 2, 2, 2, 2, 2, 1], [3, 9, 8, 5, 5, 5, 8, 3], [3, 5, 1, 7, 1, 1, 4, 3], [3, 5, 1, 5, 8, 6, 6, 3], [3, 4, 6, 5, 4, 5, 5, 3], [1, 2, 2, 2, 1, 9, 5, 3], [0, 0, 0, 0, 3, 7, 8, 3], [0, 0, 0, 0, 1, 2, 2, 1]];
tileSet32 = "grass";
levelSize32 = "SMALL";
start32 = [2, 1];
level32 = [[0, 1, 2, 2, 2, 2, 1, 0], [0, 3, 8, 5, 9, 5, 1, 1], [0, 1, 1, 6, 5, 5, 7, 3], [1, 2, 1, 5, 4, 5, 9, 3], [3, 8, 6, 5, 1, 6, 1, 1], [3, 7, 4, 9, 5, 4, 3, 0], [1, 2, 2, 1, 5, 7, 3, 0], [0, 0, 0, 1, 2, 2, 1, 0]];
tileSet33 = "grass";
levelSize33 = "SMALL";
start33 = [2, 4];
level33 = [[1, 2, 2, 2, 1, 0, 0, 0], [3, 5, 8, 7, 1, 2, 1, 0], [3, 7, 9, 6, 5, 9, 3, 0], [1, 1, 6, 6, 5, 4, 3, 0], [0, 3, 8, 5, 4, 8, 3, 0], [0, 1, 1, 5, 1, 7, 3, 0], [0, 0, 3, 5, 9, 4, 3, 0], [0, 0, 1, 2, 2, 2, 1, 0]];
tileSet34 = "candy";
levelSize34 = "SMALL";
start34 = [1, 1];
level34 = [[1, 2, 2, 2, 1, 0, 0, 0], [3, 5, 5, 7, 1, 2, 2, 1], [3, 5, 6, 6, 5, 5, 5, 3], [3, 5, 4, 1, 4, 5, 5, 3], [3, 5, 8, 3, 1, 7, 1, 1], [3, 5, 9, 1, 1, 6, 3, 0], [3, 5, 5, 5, 7, 4, 3, 0], [1, 2, 2, 2, 2, 2, 1, 0]];
tileSet35 = "candy";
levelSize35 = "SMALL";
start35 = [2, 4];
level35 = [[0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 2, 2, 2, 1, 0, 0], [3, 5, 4, 7, 8, 3, 0, 0], [3, 5, 4, 1, 5, 1, 2, 1], [3, 9, 5, 6, 6, 8, 5, 3], [3, 5, 6, 4, 7, 9, 5, 3], [1, 2, 2, 2, 2, 2, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0]];
tileSet36 = "candy";
levelSize36 = "SMALL";
start36 = [2, 1];
level36 = [[1, 2, 2, 2, 1, 2, 2, 1], [3, 7, 8, 4, 1, 7, 9, 3], [3, 5, 4, 6, 5, 4, 5, 3], [3, 5, 5, 1, 6, 9, 5, 3], [3, 9, 5, 6, 5, 9, 1, 1], [1, 2, 1, 5, 5, 1, 1, 0], [0, 0, 3, 8, 7, 3, 0, 0], [0, 0, 1, 2, 2, 1, 0, 0]];
tileSet37 = "tech";
levelSize37 = "SMALL";
start37 = [3, 1];
level37 = [[0, 1, 2, 2, 2, 2, 2, 1], [1, 1, 5, 5, 5, 4, 7, 3], [3, 9, 6, 5, 9, 6, 5, 3], [3, 4, 6, 4, 1, 2, 2, 1], [3, 5, 9, 1, 1, 0, 0, 0], [3, 8, 7, 3, 0, 0, 0, 0], [3, 7, 5, 3, 0, 0, 0, 0], [1, 2, 2, 1, 0, 0, 0, 0]];
tileSet38 = "tech";
levelSize38 = "SMALL";
start38 = [4, 2];
level38 = [[1, 2, 2, 2, 2, 1, 0, 0], [3, 9, 4, 9, 8, 3, 0, 0], [3, 5, 7, 1, 7, 3, 0, 0], [3, 5, 5, 6, 5, 1, 1, 0], [1, 1, 6, 1, 5, 5, 3, 0], [3, 9, 7, 9, 1, 5, 3, 0], [3, 4, 8, 4, 6, 7, 3, 0], [1, 2, 2, 2, 2, 2, 1, 0]];
tileSet39 = "tech";
levelSize39 = "SMALL";
start39 = [6, 2];
level39 = [[0, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 1, 9, 4, 8, 3], [3, 7, 4, 6, 5, 4, 7, 3], [3, 5, 6, 7, 1, 5, 5, 3], [3, 5, 1, 5, 5, 6, 8, 3], [3, 8, 5, 9, 1, 2, 2, 1], [1, 2, 2, 2, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
tileSet40 = "glass";
levelSize40 = "SMALL";
start40 = [6, 3];
level40 = [[0, 0, 1, 2, 2, 1, 0, 0], [1, 2, 1, 7, 9, 1, 2, 1], [3, 7, 4, 4, 8, 6, 4, 3], [3, 5, 5, 6, 6, 9, 5, 3], [1, 2, 2, 1, 8, 7, 5, 3], [0, 0, 0, 1, 2, 2, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
tileSet41 = "glass";
levelSize41 = "SMALL";
start41 = [5, 1];
level41 = [[0, 0, 0, 0, 1, 2, 2, 1], [0, 0, 0, 0, 3, 5, 5, 3], [1, 2, 2, 2, 1, 8, 4, 3], [3, 8, 6, 5, 6, 5, 6, 3], [3, 8, 5, 8, 4, 5, 5, 3], [1, 2, 1, 7, 4, 5, 8, 3], [0, 0, 1, 2, 2, 2, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0]];
tileSet42 = "glass";
levelSize42 = "SMALL";
start42 = [6, 5];
level42 = [[1, 2, 2, 2, 1, 2, 2, 1], [3, 8, 9, 7, 1, 5, 8, 3], [3, 5, 1, 4, 6, 5, 6, 3], [3, 7, 8, 5, 6, 5, 9, 3], [1, 2, 1, 2, 1, 4, 5, 3], [0, 0, 3, 5, 5, 5, 5, 3], [0, 0, 3, 7, 8, 5, 4, 3], [0, 0, 1, 2, 2, 2, 2, 1]];
tileSet43 = "grass";
levelSize43 = "SMALL";
start43 = [4, 1];
level43 = [[0, 0, 0, 1, 2, 2, 1, 0], [0, 0, 1, 1, 8, 9, 1, 1], [0, 1, 1, 9, 7, 4, 4, 3], [1, 1, 8, 6, 1, 6, 1, 1], [3, 5, 5, 5, 6, 4, 9, 3], [3, 5, 9, 1, 5, 8, 7, 3], [3, 8, 7, 8, 5, 1, 2, 1], [1, 2, 2, 2, 2, 1, 0, 0]];
tileSet44 = "grass";
levelSize44 = "SMALL";
start44 = [4, 1];
level44 = [[1, 2, 2, 2, 2, 1, 0, 0], [3, 9, 5, 5, 5, 3, 0, 0], [3, 5, 6, 6, 1, 1, 2, 1], [3, 5, 6, 9, 4, 5, 8, 3], [1, 1, 5, 1, 4, 1, 5, 3], [3, 4, 5, 5, 8, 1, 5, 3], [3, 7, 9, 5, 5, 5, 5, 3], [1, 2, 2, 2, 2, 2, 2, 1]];
tileSet45 = "grass";
levelSize45 = "SMALL";
start45 = [2, 3];
level45 = [[0, 0, 0, 1, 2, 2, 1, 0], [0, 0, 0, 3, 9, 5, 3, 0], [1, 2, 2, 1, 5, 6, 1, 1], [3, 5, 5, 6, 4, 7, 9, 3], [3, 8, 1, 1, 5, 5, 5, 3], [3, 9, 5, 5, 1, 1, 9, 3], [3, 7, 8, 6, 4, 7, 4, 3], [1, 2, 2, 2, 2, 2, 2, 1]];
tileSet46 = "candy";
levelSize46 = "SMALL";
start46 = [5, 1];
level46 = [[0, 0, 0, 1, 2, 2, 2, 1], [0, 0, 0, 3, 9, 8, 5, 3], [0, 1, 2, 1, 7, 5, 5, 3], [0, 3, 8, 6, 5, 6, 1, 1], [1, 1, 5, 6, 5, 5, 3, 0], [3, 4, 5, 5, 1, 9, 3, 0], [3, 4, 4, 5, 7, 5, 3, 0], [1, 2, 2, 2, 2, 2, 1, 0]];
tileSet47 = "candy";
levelSize47 = "SMALL";
start47 = [6, 1];
level47 = [[0, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 1, 4, 5, 5, 3], [3, 9, 5, 4, 6, 5, 8, 3], [3, 5, 1, 5, 5, 1, 2, 1], [3, 7, 6, 5, 6, 9, 4, 3], [1, 2, 2, 1, 5, 5, 5, 3], [0, 0, 0, 1, 2, 2, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0]];
tileSet48 = "candy";
levelSize48 = "SMALL";
start48 = [6, 1];
level48 = [[1, 2, 2, 2, 1, 2, 2, 1], [3, 5, 8, 4, 1, 8, 9, 3], [3, 5, 1, 5, 6, 5, 7, 3], [3, 7, 6, 4, 1, 6, 8, 3], [1, 1, 9, 4, 5, 5, 5, 3], [0, 3, 7, 8, 1, 2, 2, 1], [0, 1, 2, 2, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
nPasswords = 48;
plevel1 = "mlv7cs";
plevel2 = "ze9wi4";
plevel3 = "kmbupw";
plevel4 = "q87wbh";
plevel5 = "2sq1j3";
plevel6 = "uho7os";
plevel7 = "thwnwm";
plevel8 = "rg5s2y";
plevel9 = "jlhpok";
plevel10 = "hgtdjh";
plevel11 = "ky81k5";
plevel12 = "jxsiyo";
plevel13 = "wqfpr1";
plevel14 = "8o1yaf";
plevel15 = "9lpx0l";
plevel16 = "y61ots";
plevel17 = "p02icc";
plevel18 = "l10pgh";
plevel19 = "7rqlu5";
plevel20 = "rqlsbs";
plevel21 = "admqkf";
plevel22 = "buqpio";
plevel23 = "hir7ef";
plevel24 = "vpaybf";
plevel25 = "ejghm2";
plevel26 = "liw17y";
plevel27 = "svl98c";
plevel28 = "364yd3";
plevel29 = "nylodt";
plevel30 = "71y92e";
plevel31 = "bid8yg";
plevel32 = "oqurms";
plevel33 = "m1vqd7";
plevel34 = "ioqlfl";
plevel35 = "0zoe05";
plevel36 = "48h261";
plevel37 = "tgcglj";
plevel38 = "zhfr4j";
plevel39 = "50z9cc";
plevel40 = "o9nijq";
plevel41 = "jnz3dz";
plevel42 = "7yw8cy";
plevel43 = "baop4t";
plevel44 = "zwc5sp";
plevel45 = "h8eex8";
plevel46 = "pkryko";
plevel47 = "m64qvv";
plevel48 = "0n7qqr";
stop();
if (_root.passwordLevel != undefined) {
level = _root.passwordLevel;
_root.passwordLevel = undefined;
}
if (!_root.customLevel) {
if ((level == 0) || (level == undefined)) {
level = 1;
}
} else {
var start0 = new Array(2);
var tileSet0;
var levelSize0;
tileSet0 = _root.theCustomLevel[0].toString();
tileSet0 = tileSet0.substr(1, tileSet0.length);
levelSize0 = _root.theCustomLevel[1].toString();
start0[0] = _root.theCustomLevel[2];
start0[1] = _root.theCustomLevel[3];
var lWidth = 0;
if (((levelSize0 == "SMALL") ? ((lWidth = 8)) : ((lWidth = 18)))) {
}
var level0 = new Array(lWidth);
var i = 0;
while (i < lWidth) {
level0[i] = new Array(lWidth);
i++;
}
var xi;
var yi;
xi = (yi = 0);
var index = 4;
while (xi < lWidth) {
while (yi < lWidth) {
level0[xi][yi] = _root.theCustomLevel[index];
index++;
yi++;
}
yi = 0;
xi++;
}
level = 0;
}
trace("Starting level : " + level);
TILE_SIZE = 20;
OFFSET = 40;
EXIT_FRAME = 4;
BOX_FRAME = 6;
moves = 1;
keyListener.onKeyDown = function () {
KeyDown(Key.getCode());
};
keyListener.onKeyUp = function () {
KeyUp(Key.getCode());
};
KeyDown = function (keyCode) {
switch (keyCode) {
case 81 :
toggleBgQuality();
break;
case 37 :
saveState();
moveLeft();
break;
case 38 :
saveState();
moveUp();
break;
case 39 :
saveState();
moveRight();
break;
case 40 :
saveState();
moveDown();
}
};
KeyUp = function (keyCode) {
switch (keyCode) {
case 37 :
break;
case 38 :
break;
case 39 :
break;
case 40 :
}
};
var currentLevel = "";
var currentBoxArray = "";
var currentExitArray = "";
var boxStateX = "";
var boxStateY = "";
var movedBox = "";
var movedBoxFrame = "";
tileLayer = 10;
boxLayer = 410;
playerLayer = 810;
_root.FORMERMAPSIZE = "BIG";
startGame(level);
Frame 9
BIG();
trace("YOU ROCK");
stop();
var snd = new Sound();
snd.attachSound("boy");
snd.start(0, 1);
var counter = 10;
var nun = Math.floor(Math.random() * 65536);
var mc = this.createEmptyMovieClip("mc", 1);
var bmp = (new flash.display.BitmapData(270, 270, true, 0));
mc.attachBitmap(bmp, this.getNextHighestDepth());
mc._visible = false;
mc._xscale = (mc._yscale = 200);
var mc2 = this.createEmptyMovieClip("mc2", 2);
var bmp2 = (new flash.display.BitmapData(270, 270, true, 0));
mc2.attachBitmap(bmp2, this.getNextHighestDepth());
mc2._xscale = (mc2._yscale = 200);
mc2.blendMode = "add";
var mc3 = this.createEmptyMovieClip("mc3", 3);
var bmp3 = (new flash.display.BitmapData(540, 540, true, 0));
mc3.attachBitmap(bmp3, this.getNextHighestDepth());
mc3._x = -600;
var matrix = new Array();
matrix = matrix.concat([0.75, 0.25, 10, 0, 0]);
matrix = matrix.concat([0, 0.75, 10, 0, 0]);
matrix = matrix.concat([0.5, 0.5, 10, 0, 0]);
matrix = matrix.concat([0, 0, 0, 0, 255]);
var theFilter = (new flash.filters.ColorMatrixFilter(matrix));
var skale = (new flash.geom.Matrix());
skale.scale(2, 2);
var p0 = (new flash.geom.Point(0, 0));
var filter = (new flash.filters.DisplacementMapFilter(bmp3, p0, 1, 2, 10, 10, "wrap", 0, 0));
t.filters = new Array(filter);
this.onEnterFrame = function () {
counter = counter + 1;
var _local1 = t.filters[0];
bmp.perlinNoise(40 + (Math.sin(counter / 142) * 20), 60 + (Math.sin(counter / 122) * 30), 1, nun, false, true, 3, false, new Array(new flash.geom.Point(Math.sin(counter / 142) * 130, Math.sin(counter / 13) * 82), new flash.geom.Point(Math.sin(counter / 122) * 60, Math.sin(counter / 33) * 50), new flash.geom.Point(Math.sin(counter / 62) * 30, Math.sin(counter / 33) * 40)));
bmp3.draw(mc, skale);
bmp2.applyFilter(bmp3, bmp.rectangle, p0, theFilter);
_local1.mapBitmap = bmp3;
_local1.scaleX = (Math.sin(counter / 35) * 30) + 40;
_local1.scaleY = (Math.sin(counter / 22) * 30) + 40;
t.filters = new Array(_local1);
};
Instance of Symbol 89 MovieClip in Frame 9
onClipEvent (load) {
this.scrollspeed = 1;
}
onClipEvent (enterFrame) {
if ((this.mahpic._y + this.scrollspeed) < -1000) {
this.mahpic._y = -1000;
this.scrollspeed = 0;
} else {
this.mahpic._y = this.mahpic._y - this.scrollspeed;
}
}
Symbol 39 MovieClip Frame 1
stop();
Symbol 43 Button
on (press) {
_root.gotoAndPlay(4);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 93 Button
on (press) {
_parent.swapDepths(811);
y = 1;
while (y < 810) {
_root.getInstanceAtDepth(y).removeMovieClip();
y++;
}
stopAllSounds();
_root.gotoAndPlay(4);
}
Symbol 99 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
_root.fader.play();
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 101 MovieClip [fader] Frame 20
myFunction();
passwordstuff.passwordtext.text = ((((((("Finished level " + (this.nextLevel - 1)) + " with ") + this.nMoves) + " moves.\n") + "Password for level ") + this.nextLevel) + newline) + this.nextLevelPass;
Symbol 101 MovieClip [fader] Frame 40
stop();
Symbol 101 MovieClip [fader] Frame 80
this.removeMovieClip();
Symbol 104 MovieClip [resetfader] Frame 20
myFunction();
Symbol 104 MovieClip [resetfader] Frame 40
this.removeMovieClip();
Symbol 105 MovieClip [startgamefader] Frame 20
_root.gotoAndPlay(6);
_root.menubar.removeMovieClip();
Symbol 105 MovieClip [startgamefader] Frame 40
this.removeMovieClip();
Symbol 135 Button
on (press) {
if (_root.currentTitle == "Stopped") {
_root.music.start(0, 500);
_root.currentTitle = _root.songnames[_root.song - 1];
gotoAndStop (2);
}
}
Symbol 136 Button
on (press) {
stopAllSounds();
_root.currentTitle = "Stopped";
gotoAndStop (1);
}
Symbol 137 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 2
stop();
Symbol 140 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 2
stop();
Instance of Symbol 140 MovieClip in Symbol 142 MovieClip Frame 1
onClipEvent (load) {
this._y = -_root.music.getVolume();
}
on (press) {
this.startDrag(this, this._x, -120, this._x, 0);
}
on (release) {
this.stopDrag();
_root.music.setVolume(Math.abs(this._y));
}
on (releaseOutside) {
this.stopDrag();
this.gotoAndStop(1);
_root.music.setVolume(Math.abs(this._y));
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Symbol 145 Button
on (press) {
if (_root.song > 1) {
_root.song--;
} else {
_root.song = 4;
}
var soundToLoad = ("mus_" + _root.song);
stopAllSounds();
_root.music.attachSound(soundToLoad);
_root.music.start(0, 500);
_root.currentTitle = _root.songnames[_root.song - 1];
stopplay.gotoAndStop(2);
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Symbol 146 Button
on (press) {
if (_root.song < 4) {
_root.song++;
} else {
_root.song = 1;
}
var soundToLoad = ("mus_" + _root.song);
stopAllSounds();
_root.music.attachSound(soundToLoad);
_root.music.start(0, 500);
_root.currentTitle = _root.songnames[_root.song - 1];
stopplay.gotoAndStop(2);
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 2
stop();
Symbol 153 Button
on (press) {
_root.attachMovie("startgamefader", "startgamefader", 10000);
_root.startgamefader._x = 0;
_root.startgamefader._y = 0;
_root.customLevel = false;
trace("Pressed play with a level number of : " + level);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 154 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
this.gotoAndPlay(21);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 155 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
this.gotoAndPlay(59);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 156 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
this.gotoAndPlay(2);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 157 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
this.gotoAndPlay(40);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 163 Button
on (press) {
_root.getURL("http://www.sogyo.nl", "_blank");
}
Symbol 167 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
this.gotoAndPlay(11);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 171 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
this.gotoAndPlay(30);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 181 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
this.gotoAndPlay(49);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 182 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
nPasswords = 48;
plevel1 = "mlv7cs";
plevel2 = "ze9wi4";
plevel3 = "kmbupw";
plevel4 = "q87wbh";
plevel5 = "2sq1j3";
plevel6 = "uho7os";
plevel7 = "thwnwm";
plevel8 = "rg5s2y";
plevel9 = "jlhpok";
plevel10 = "hgtdjh";
plevel11 = "ky81k5";
plevel12 = "jxsiyo";
plevel13 = "wqfpr1";
plevel14 = "8o1yaf";
plevel15 = "9lpx0l";
plevel16 = "y61ots";
plevel17 = "p02icc";
plevel18 = "l10pgh";
plevel19 = "7rqlu5";
plevel20 = "rqlsbs";
plevel21 = "admqkf";
plevel22 = "buqpio";
plevel23 = "hir7ef";
plevel24 = "vpaybf";
plevel25 = "ejghm2";
plevel26 = "liw17y";
plevel27 = "svl98c";
plevel28 = "364yd3";
plevel29 = "nylodt";
plevel30 = "71y92e";
plevel31 = "bid8yg";
plevel32 = "oqurms";
plevel33 = "m1vqd7";
plevel34 = "ioqlfl";
plevel35 = "0zoe05";
plevel36 = "48h261";
plevel37 = "tgcglj";
plevel38 = "zhfr4j";
plevel39 = "50z9cc";
plevel40 = "o9nijq";
plevel41 = "jnz3dz";
plevel42 = "7yw8cy";
plevel43 = "baop4t";
plevel44 = "zwc5sp";
plevel45 = "h8eex8";
plevel46 = "pkryko";
plevel47 = "m64qvv";
plevel48 = "0n7qqr";
passFailed = true;
var i = 1;
while (i <= nPasswords) {
if (eval ("plevel" + i) == pwbox.passwordtxt.text) {
passFailed = false;
_root.passwordLevel = i;
_root.attachMovie("startgamefader", "startgamefader", 10000);
_root.startgamefader._x = 0;
_root.startgamefader._y = 0;
}
i++;
}
if (passFailed) {
pwbox.passwordtxt.text = "Nope!";
}
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 183 Button
on (press) {
finishedSound = new Sound();
finishedSound.attachSound("finished");
finishedSound.start(0, 1);
this.gotoAndPlay(69);
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 184 Button
on (press) {
_root.attachMovie("startgamefader", "startgamefader", 10000);
_root.startgamefader._x = 0;
_root.startgamefader._y = 0;
extractVariables(levelCodeBox.txt);
_root.customLevel = true;
}
on (rollOver) {
mvSound = new Sound();
mvSound.attachSound("move");
mvSound.start(0, 1);
}
on (rollOut) {
rsSound = new Sound();
rsSound.attachSound("resetsound");
rsSound.start(0, 1);
}
Symbol 188 MovieClip Frame 1
stop();
Symbol 188 MovieClip Frame 10
stop();
Instance of Symbol 170 MovieClip "www.ophyr.com" in Symbol 188 MovieClip Frame 10
onClipEvent (load) {
this._alpha = 0;
this.bb.onPress = function () {
_root.getURL("http://www.ophyr.com", "_blank");
};
}
Instance of Symbol 170 MovieClip "www.ophyr.com" in Symbol 188 MovieClip Frame 10
onClipEvent (load) {
this._alpha = 0;
this.bb.onPress = function () {
_root.getURL("http://www.mosaik.se", "_blank");
};
}
Instance of Symbol 170 MovieClip "www.ophyr.com" in Symbol 188 MovieClip Frame 10
onClipEvent (load) {
this._alpha = 0;
this.bb.onPress = function () {
_root.getURL("http://www.sogyo.nl", "_blank");
};
}
Symbol 188 MovieClip Frame 20
this.gotoAndStop(1);
Symbol 188 MovieClip Frame 29
stop();
Instance of Symbol 170 MovieClip "www.ophyr.com" in Symbol 188 MovieClip Frame 29
onClipEvent (load) {
this._alpha = 0;
this.bb.onPress = function () {
_root.getURL("http://www.ophyr.com", "_blank");
};
}
Symbol 188 MovieClip Frame 39
this.gotoAndStop(1);
Symbol 188 MovieClip Frame 48
stop();
Symbol 188 MovieClip Frame 58
this.gotoAndStop(1);
Symbol 188 MovieClip Frame 68
function extractVariables(object) {
var _local4 = object.text;
var _local5 = 0;
var _local3 = 0;
var _local2 = 0;
var _local7 = new Array();
var _local6 = 0;
while (_local2 < _local4.length) {
currentChar = _local4.charAt(_local2);
if (currentChar == "#") {
if (_local5 != 0) {
_local7[_local6] = _local4.substr(_local5, _local2 - _local3);
_local6++;
}
_local3 = _local2 + 1;
_local5 = _local3;
}
_local2++;
}
_root.theCustomLevel = _local7;
}
stop();
Symbol 188 MovieClip Frame 77
this.gotoAndStop(1);