Frame 1
playing = 0;
level = 1;
snd2 = new Sound(_root.snd2);
snd2.attachSound("snd2");
stop();
Instance of Symbol 37 MovieClip in Frame 1
onClipEvent (enterFrame) {
text = ((int(_parent.getBytesLoaded() / 1000) add " OF ") add int(_parent.getBytesTotal() / 1000)) add " LOADED ...";
if (_parent.getBytesTotal() == _parent.getBytesLoaded()) {
_root.goButton._x = 240;
}
}
Frame 2
function buildBox(box) {
var w = box[0].length;
var h = box.length;
var _local2 = 0;
while (_local2 < h) {
var _local1 = 0;
while (_local1 < w) {
this.attachMovie("box", (("box_" + _local2) + "_") + _local1, ++d);
var _local3 = this[(("box_" + _local2) + "_") + _local1];
_local3._x = (_local1 * size) + width;
_local3._y = (_local2 * size) + height;
_local3.gotoAndStop(box[_local2][_local1]);
_local1++;
}
_local2++;
}
if (!playing) {
sndClip.gotoAndStop(2);
} else {
sndClip.gotoAndStop(1);
}
}
function buildMap(map, exit) {
var _local3 = this;
W = map[0].length;
H = map.length;
var _local2 = 0;
while (_local2 < h) {
var _local1 = 0;
while (_local1 < w) {
_local3.attachMovie("tile", (("tile_" + _local2) + "_") + _local1, ++d);
var t = _local3[(("tile_" + _local2) + "_") + _local1];
t._x = (_local1 * size) + width;
t._y = (_local2 * size) + height;
t.gotoAndStop(map[_local2][_local1]);
t.exit = null;
t.exitFrame = null;
_local1++;
}
_local2++;
}
var c = 0;
exitCounter = exit.length;
while (c < exit.length) {
var x = exit[c][0];
var y = exit[c][1];
_local3.attachMovie("exit", "exit" + e, ++e);
var t = _local3["exit" + e];
t._x = (x * size) + width;
t._y = (y * size) + height;
t.gotoAndStop(exitFrame[c]);
_local3[(("tile_" + y) + "_") + x].exit = 1;
_local3[(("tile_" + y) + "_") + x].exitFrame = exitFrame[c];
c++;
}
}
function createPlayer(x, y) {
this.attachMovie("char", "char", ++d);
char._x = (x * size) + width;
char._y = (y * size) + height;
cx = x;
cy = y;
}
function doLevel(lv) {
switch (lv) {
case 1 :
createPlayer(3, 8);
return;
case 2 :
createPlayer(1, 8);
return;
case 3 :
createPlayer(1, 6);
return;
case 4 :
createPlayer(3, 7);
return;
case 5 :
createPlayer(4, 4);
return;
case 6 :
createPlayer(5, 6);
return;
case 7 :
createPlayer(3, 6);
return;
case 8 :
createPlayer(4, 7);
return;
case 9 :
createPlayer(5, 5);
return;
case 10 :
createPlayer(3, 3);
return;
case 11 :
createPlayer(5, 7);
return;
case 12 :
createPlayer(6, 4);
return;
case 13 :
createPlayer(3, 5);
return;
case 14 :
createPlayer(2, 5);
return;
case 15 :
createPlayer(6, 4);
return;
case 16 :
createPlayer(3, 6);
return;
case 17 :
createPlayer(4, 2);
return;
case 18 :
createPlayer(2, 6);
return;
case 19 :
createPlayer(6, 5);
return;
case 20 :
createPlayer(1, 6);
}
}
function moveLeft() {
if (myMap[cy][cx - 1] == 1) {
saveCurrent();
char._x = char._x - 30;
cx--;
moves++;
return(undefined);
}
if ((myMap[cy][cx - 1] > 1) and (myMap[cy][cx - 2] == 1)) {
saveCurrent();
moves++;
count = 0;
step = 0;
playGame = 0;
px = cx - 1;
py = cy;
ob = this[(("tile_" + py) + "_") + px];
tempFrame = myMap[py][px];
char.play();
snd2.start(0, 1);
move = setInterval(this, "moveTileLeft", 10);
return(undefined);
}
}
function moveTileLeft() {
ob._x = ob._x - 2;
count++;
if (count == 15) {
count = 0;
step++;
myMap[py][px] = 1;
px--;
if (myMap[py][px - 1] != 1) {
ob.gotoAndStop(1);
ob._x = ob._x + (size * step);
myMap[py][px] = tempFrame;
this[(("tile_" + py) + "_") + px].gotoAndStop(tempFrame);
clearInterval(move);
playGame = 1;
}
}
}
function moveRight() {
if (myMap[cy][cx + 1] == 1) {
saveCurrent();
char._x = char._x + 30;
cx++;
moves++;
return(undefined);
}
if ((myMap[cy][cx + 1] > 1) and (myMap[cy][cx + 2] == 1)) {
saveCurrent();
moves++;
count = 0;
step = 0;
playGame = 0;
px = cx + 1;
py = cy;
ob = this[(("tile_" + py) + "_") + px];
tempFrame = myMap[py][px];
char.play();
snd2.start(0, 1);
move = setInterval(this, "moveTileRight", 10);
return(undefined);
}
}
function moveTileRight() {
ob._x = ob._x + 2;
count++;
if (count == 15) {
count = 0;
step++;
myMap[py][px] = 1;
px++;
if (myMap[py][px + 1] != 1) {
ob.gotoAndStop(1);
ob._x = ob._x - (size * step);
myMap[py][px] = tempFrame;
this[(("tile_" + py) + "_") + px].gotoAndStop(tempFrame);
clearInterval(move);
playGame = 1;
}
}
}
function moveDown() {
if ((myMap[cy + 1][cx] == 1) and (cy < 8)) {
saveCurrent();
char._y = char._y + 30;
cy++;
moves++;
return(undefined);
}
if ((((myMap[cy + 1][cx] > 1) and (myMap[cy + 2][cx] == 1)) and (cy < 7)) or ((cy == 7) and (myMap[10][cx] == 1))) {
saveCurrent();
moves++;
count = 0;
step = 0;
playGame = 0;
px = cx;
py = cy + 1;
ob = this[(("tile_" + py) + "_") + px];
tempFrame = myMap[py][px];
char.play();
snd2.start(0, 1);
move = setInterval(this, "moveTileDown", 10);
return(undefined);
}
}
function moveTileDown() {
ob._y = ob._y + 2;
count++;
if (count == 15) {
count = 0;
step++;
myMap[py][px] = 1;
py++;
if ((myMap[py + 1][px] != 1) or (((myMap[11][px] != 1) and (myMap[10][px] != 1)) and (py > 7))) {
ob.gotoAndStop(1);
ob._y = ob._y - (size * step);
myMap[py][px] = tempFrame;
this[(("tile_" + py) + "_") + px].gotoAndStop(tempFrame);
clearInterval(move);
playGame = 1;
checkWin();
}
}
}
function moveUp() {
if (myMap[cy - 1][cx] == 1) {
saveCurrent();
char._y = char._y - 30;
cy--;
moves++;
return(undefined);
}
if ((myMap[cy - 1][cx] > 1) and (myMap[cy - 2][cx] == 1)) {
saveCurrent();
moves++;
count = 0;
step = 0;
playGame = 0;
px = cx;
py = cy - 1;
ob = this[(("tile_" + py) + "_") + px];
tempFrame = myMap[py][px];
char.play();
snd2.start(0, 1);
move = setInterval(this, "moveTileUp", 10);
return(undefined);
}
}
function moveTileUp() {
ob._y = ob._y - 2;
count++;
if (count == 15) {
count = 0;
step++;
myMap[py][px] = 1;
py--;
if (myMap[py - 1][px] != 1) {
ob.gotoAndStop(1);
ob._y = ob._y + (size * step);
myMap[py][px] = tempFrame;
this[(("tile_" + py) + "_") + px].gotoAndStop(tempFrame);
clearInterval(move);
playGame = 1;
}
}
}
function checkWin() {
var counter = 0;
var _local2 = 10;
while (_local2 < H) {
var _local1 = 0;
while (_local1 < W) {
var _local3 = this[(("tile_" + _local2) + "_") + _local1];
if (_local3.exit and (myMap[_local2][_local1] > 1)) {
if (_local3.exitFrame == (myMap[_local2][_local1] - 2)) {
this[(("box_" + _local2) + "_") + _local1].gotoAndStop(3);
counter++;
}
} else {
this[(("box_" + _local2) + "_") + _local1].gotoAndStop(1);
}
_local1++;
}
_local2++;
}
correct = (counter + "/") + exitCounter;
if (counter == exitCounter) {
playGame = 0;
this.attachMovie("labelClip", "labelClip", ++d);
labelClip._width = 100;
labelClip._height = 70;
labelClip._x = 405;
labelClip._y = 350;
}
}
function saveCurrent() {
var _local3 = this;
var _local1 = 0;
var _local2 = 0;
while (_local2 < H) {
while (_local1 < W) {
_local3[(("tile_" + _local2) + "_") + _local1]["tmpCol" + moves] = myMap[_local2][_local1];
_local1++;
}
_local1 = 0;
_local2++;
}
_local3["tmpCharX" + moves] = cx;
_local3["tmpCharY" + moves] = cy;
}
function undoMove() {
if (moves >= 1) {
moves--;
var _local1 = 0;
var _local2 = 0;
while (_local2 < H) {
while (_local1 < W) {
var _local3 = this[(("tile_" + _local2) + "_") + _local1]["tmpCol" + moves];
this[(("tile_" + _local2) + "_") + _local1].gotoAndStop(_local3);
myMap[_local2][_local1] = _local3;
_local1++;
}
_local1 = 0;
_local2++;
}
_local1 = this["tmpCharX" + moves];
_local2 = this["tmpCharY" + moves];
char._x = (_local1 * size) + width;
char._y = (_local2 * size) + height;
cx = _local1;
cy = _local2;
checkWin();
}
}
myBox = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 3, 1, 1, 8, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
myMap20 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 6, 1, 7, 1, 1, 10, 1, 10, 1], [1, 1, 1, 1, 1, 1, 1, 10, 1, 1], [1, 6, 1, 1, 10, 1, 7, 1, 5, 1], [1, 1, 1, 5, 1, 1, 1, 1, 1, 1], [1, 1, 10, 1, 1, 6, 1, 4, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 7, 1, 7, 1, 1, 10, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
myExit1 = [[1, 10], [3, 10], [4, 10], [7, 10], [3, 11], [6, 11]];
myExit2 = [[2, 10], [5, 10], [8, 10], [2, 11], [6, 11], [8, 11]];
myExit3 = [[1, 10], [7, 10], [9, 10], [1, 11], [2, 11], [7, 11]];
myExit4 = [[1, 10], [7, 10], [8, 10], [1, 11], [7, 11], [8, 11]];
myExit5 = [[1, 10], [6, 10], [7, 10], [1, 11], [6, 11], [7, 11]];
myExit6 = [[5, 10], [6, 10], [8, 10], [5, 11], [6, 11]];
myExit7 = [[0, 10], [2, 10], [5, 10], [7, 10], [1, 11], [2, 11]];
myExit8 = [[2, 10], [5, 10], [1, 11], [2, 11], [4, 11], [9, 11]];
myExit9 = [[5, 10], [7, 10], [9, 10], [6, 11], [8, 11], [9, 11]];
myExit10 = [[0, 10], [1, 10], [2, 10], [8, 10], [2, 11], [8, 11]];
myExit11 = [[0, 10], [2, 10], [5, 10], [6, 10], [2, 11], [3, 11]];
myExit12 = [[0, 10], [6, 10], [1, 11], [4, 11], [6, 11], [8, 11]];
myExit13 = [[0, 10], [2, 10], [5, 10], [1, 11], [2, 11], [8, 11]];
myExit14 = [[1, 10], [2, 10], [3, 11], [4, 11], [5, 11], [7, 11]];
myExit15 = [[0, 10], [3, 10], [5, 10], [1, 11], [3, 11], [9, 11]];
myExit16 = [[1, 10], [4, 10], [1, 11], [5, 11], [6, 11], [9, 11]];
myExit17 = [[1, 10], [5, 10], [6, 10], [1, 11], [3, 11], [6, 11], [7, 11], [8, 11]];
myExit18 = [[1, 10], [2, 10], [3, 10], [9, 10], [1, 11], [2, 11], [3, 11], [8, 11]];
myExit19 = [[5, 10], [6, 10], [7, 10], [9, 10], [1, 11], [3, 11], [7, 11], [9, 11]];
myExit20 = [[1, 10], [4, 10], [7, 10], [9, 10], [0, 11], [1, 11], [3, 11], [4, 11], [5, 11], [6, 11]];
exitFrame1 = [3, 4, 4, 4, 2, 3];
exitFrame2 = [2, 2, 5, 4, 4, 4];
exitFrame3 = [3, 2, 3, 4, 4, 4];
exitFrame4 = [4, 3, 3, 3, 3, 5];
exitFrame5 = [3, 4, 4, 3, 1, 4];
exitFrame6 = [4, 1, 2, 2, 4];
exitFrame7 = [1, 3, 1, 1, 4, 4];
exitFrame8 = [5, 5, 2, 2, 3, 3];
exitFrame9 = [2, 2, 1, 1, 3, 3];
exitFrame10 = [3, 6, 5, 6, 5, 3];
exitFrame11 = [4, 1, 5, 5, 4, 4];
exitFrame12 = [6, 3, 6, 6, 2, 2];
exitFrame13 = [6, 1, 5, 6, 1, 5];
exitFrame14 = [6, 3, 2, 3, 6, 3];
exitFrame15 = [6, 6, 6, 5, 1, 5];
exitFrame16 = [3, 4, 4, 5, 5, 3];
exitFrame17 = [6, 3, 1, 3, 6, 1, 3, 3];
exitFrame18 = [5, 2, 2, 3, 5, 3, 5, 5];
exitFrame19 = [6, 3, 1, 1, 3, 6, 6, 1];
exitFrame20 = [2, 5, 3, 5, 4, 4, 3, 5, 5, 4];
size = 30;
width = 30;
height = 20;
_root.onKeyDown = function () {
if (playGame) {
if (Key.isDown(37)) {
moveLeft();
} else if (Key.isDown(39)) {
moveRight();
} else if (Key.isDown(40)) {
moveDown();
} else if (Key.isDown(38)) {
moveUp();
}
}
};
d = 100;
e = 0;
moves = 0;
playGame = 1;
px = null;
py = null;
cx = null;
cy = null;
myMap = _root["myMap" + level];
myExit = _root["myExit" + level];
exitFrame = _root["exitFrame" + level];
buildBox(myBox);
buildMap(myMap, myExit);
doLevel(level);
levelText = (level + "/") + 20;
correct = "0/" + exitCounter;
saveCurrent();
Key.addListener(_root);
stop();
Frame 3
var i = 0;
while (i < H) {
var j = 0;
while (j < W) {
removeMovieClip(this[(("tile_" + i) + "_") + j]);
removeMovieClip(this[(("box_" + i) + "_") + j]);
j++;
}
i++;
}
var e = 1;
while (e <= exitCounter) {
removeMovieClip(this["exit" + e]);
e++;
}
removeMovieClip(char);
if (level > 20) {
level = 1;
}
if (level < 1) {
level = 20;
}
prevFrame();
Symbol 6 MovieClip Frame 91
removeMovieClip(_root.labelClip);
_root.level++;
_root.nextFrame();
Symbol 9 MovieClip [labelClip] Frame 10
stop();
Symbol 12 MovieClip [char] Frame 1
stop();
Symbol 22 MovieClip [tile] Frame 1
stop();
Symbol 44 Button
on (press) {
play();
}
Symbol 46 Button
on (press) {
getURL ("http://lightforce.freestuff.gr", "_blank");
}
Symbol 52 Button
on (release) {
if (playing == 1) {
stopAllSounds();
loop.gotoAndStop("Stop");
sndClip.gotoAndStop(2);
playing = 0;
} else {
loop.gotoAndStop("Play");
sndClip.gotoAndStop(1);
playing = 1;
}
}
Symbol 60 MovieClip Frame 2
stop();
Symbol 61 Button
on (press) {
if (playGame) {
nextFrame();
}
}
Symbol 65 MovieClip Frame 1
stop();
Symbol 68 Button
on (press) {
if (playGame) {
level--;
nextFrame();
}
}
Symbol 69 Button
on (press) {
if (playGame) {
level++;
nextFrame();
}
}
Symbol 71 Button
on (press) {
if (playGame) {
undoMove();
}
}