Frame 1
snd1 = new Sound(_root.snd1);
snd1.attachSound("snd1");
snd1.setVolume(100);
playing = 0;
stop();
Instance of Symbol 50 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.nextFrame();
}
}
Frame 2
level = 1;
lives = 4;
stop();
Frame 3
function buildMap(map) {
W = map[0].length;
H = map.length;
var _local2 = 0;
while (_local2 < H) {
var _local1 = 0;
while (_local1 < W) {
this.attachMovie("tile", (("tile_" + _local2) + "_") + _local1, ++d);
var _local3 = this[(("tile_" + _local2) + "_") + _local1];
_local3._x = (_local1 * size) + width;
_local3._y = (_local2 * size) + height;
_local3.gotoAndStop(map[_local2][_local1]);
_local1++;
}
_local2++;
}
createLabel();
}
function createMc(x, y) {
this.attachMovie("mc", "mc", ++d);
mc._x = (x * size) + width;
mc._y = (y * size) + height;
cx = x;
cy = y;
}
function createLabel() {
this.attachMovie("levelText", "levelText", ++d);
levelText._x = 280;
levelText._y = 425;
levelText.gotoAndStop(level);
}
function doUp() {
var up = myMap[cy - 1][cx];
var uup = myMap[cy - 2][cx];
if ((((((up == 2) or (up == 15)) or (up == 11)) or (up == 12)) or (up == 13)) or (up == null)) {
} else if ((up == 1) or (up == 14)) {
mc._y = mc._y - 32;
cy--;
} else if ((up == 10) and ((uup == 1) or (uup == 14))) {
mc._y = mc._y - 64;
cy = cy - 2;
} else {
var _local3 = cy - 1;
var step = 0;
var space = 0;
var legal = 1;
var _local1 = _local3;
while (_local1 >= 0) {
var _local2 = myMap[_local1][cx];
step++;
if (_local2 == 1) {
space = 1;
break;
}
if (((_local2 == 2) or (_local2 == 4)) or ((_local2 > 5) and (_local2 < 14))) {
legal = 0;
}
_local1--;
}
if (space and legal) {
var c = (cy - step);
_local1 = c;
while (_local1 <= _local3) {
this[(("tile_" + _local1) + "_") + cx].gotoAndStop(myMap[_local1 + 1][cx]);
myMap[_local1][cx] = myMap[_local1 + 1][cx];
_local1++;
}
if (myMap[_local1][cx] == 14) {
this[(("tile_" + (_local1 - 1)) + "_") + cx].gotoAndStop(1);
myMap[_local1 - 1][cx] = 1;
}
mc._y = mc._y - 32;
snd1.start(0, 1);
cy--;
}
}
}
function doDown() {
var down = myMap[cy + 1][cx];
var ddown = myMap[cy + 2][cx];
if ((((((down == 2) or (down == 15)) or (down == 10)) or (down == 12)) or (down == 13)) or (down == null)) {
} else if ((down == 1) or (down == 14)) {
mc._y = mc._y + 32;
cy++;
} else if ((down == 11) and ((ddown == 1) or (ddown == 14))) {
mc._y = mc._y + 64;
cy = cy + 2;
} else {
var _local3 = cy + 1;
var step = 0;
var space = 0;
var legal = 1;
var _local1 = _local3;
while (_local1 <= H) {
var _local2 = myMap[_local1][cx];
step++;
if (_local2 == 1) {
space = 1;
break;
}
if (((_local2 == 2) or (_local2 == 4)) or ((_local2 > 5) and (_local2 < 14))) {
legal = 0;
}
_local1++;
}
if (space and legal) {
var c = (cy + step);
_local1 = c;
while (_local1 >= _local3) {
this[(("tile_" + _local1) + "_") + cx].gotoAndStop(myMap[_local1 - 1][cx]);
myMap[_local1][cx] = myMap[_local1 - 1][cx];
_local1--;
}
if (myMap[_local1][cx] == 14) {
this[(("tile_" + (_local1 + 1)) + "_") + cx].gotoAndStop(1);
myMap[_local1 + 1][cx] = 1;
}
mc._y = mc._y + 32;
snd1.start(0, 1);
cy++;
}
}
}
function doLeft() {
var left = myMap[cy][cx - 1];
var lleft = myMap[cy][cx - 2];
if ((((((left == 2) or (left == 15)) or (left == 10)) or (left == 11)) or (left == 13)) or (left == null)) {
} else if ((left == 1) or (left == 14)) {
mc._x = mc._x - 32;
cx--;
} else if ((left == 12) and ((lleft == 1) or (lleft == 14))) {
mc._x = mc._x - 64;
cx = cx - 2;
} else {
var _local3 = cx - 1;
var step = 0;
var space = 0;
var legal = 1;
var _local1 = _local3;
while (_local1 >= 0) {
var _local2 = myMap[cy][_local1];
step++;
if (_local2 == 1) {
space = 1;
break;
}
if (((_local2 == 2) or (_local2 == 3)) or ((_local2 > 5) and (_local2 < 14))) {
legal = 0;
}
_local1--;
}
if (space and legal) {
var c = (cx - step);
_local1 = c;
while (_local1 <= _local3) {
this[(("tile_" + cy) + "_") + _local1].gotoAndStop(myMap[cy][_local1 + 1]);
myMap[cy][_local1] = myMap[cy][_local1 + 1];
_local1++;
}
if (myMap[cy][_local1] == 14) {
this[(("tile_" + cy) + "_") + (_local1 - 1)].gotoAndStop(1);
myMap[cy][_local1 - 1] = 1;
}
mc._x = mc._x - 32;
snd1.start(0, 1);
cx--;
}
}
}
function doRight() {
right = myMap[cy][cx + 1];
rright = myMap[cy][cx + 2];
if ((((((right == 2) or (right == 15)) or (right == 10)) or (right == 11)) or (right == 12)) or (right == null)) {
} else if ((right == 1) or (right == 14)) {
mc._x = mc._x + 32;
cx++;
} else if ((right == 13) and ((rright == 1) or (rright == 14))) {
mc._x = mc._x + 64;
cx = cx + 2;
} else {
var _local3 = cx + 1;
var step = 0;
var space = 0;
var legal = 1;
var _local1 = _local3;
while (_local1 <= W) {
var _local2 = myMap[cy][_local1];
step++;
if (_local2 == 1) {
space = 1;
break;
}
if (((_local2 == 2) or (_local2 == 3)) or ((_local2 > 5) and (_local2 < 14))) {
legal = 0;
}
_local1++;
}
if (space and legal) {
var c = (cx + step);
_local1 = c;
while (_local1 >= _local3) {
this[(("tile_" + cy) + "_") + _local1].gotoAndStop(myMap[cy][_local1 - 1]);
myMap[cy][_local1] = myMap[cy][_local1 - 1];
_local1--;
}
if (myMap[cy][_local1] == 14) {
this[(("tile_" + cy) + "_") + (_local1 + 1)].gotoAndStop(1);
myMap[cy][_local1 + 1] = 1;
}
mc._x = mc._x + 32;
snd1.start(0, 1);
cx++;
}
}
}
function doPusher() {
var _local2 = 0;
while (_local2 < H) {
var _local1 = 0;
while (_local1 < W) {
if (myMap[_local2][_local1] == 8) {
pushLeft(_local2, _local1 - 1);
}
if (myMap[_local2][_local1] == 9) {
pushRight(_local2, _local1 + 1);
}
if (myMap[_local2][_local1] == 6) {
pushUp(_local2 - 1, _local1);
}
if (myMap[_local2][_local1] == 7) {
pushDown(_local2 + 1, _local1);
}
_local1++;
}
_local2++;
}
}
function pushDown(ry, rx) {
var _local3 = rx;
if ((cx == _local3) and (cy == ry)) {
} else {
var py = ry;
var step = 0;
var legal = 1;
var space = 0;
var _local1 = py;
while (_local1 <= H) {
var _local2 = myMap[_local1][_local3];
if (_local2 == 1) {
space = 1;
break;
}
step++;
if (((_local2 == 2) or (_local2 == 4)) or ((_local2 > 5) and (_local2 < 14))) {
legal = 0;
}
if ((cy == (_local1 + 1)) and (_local3 == cx)) {
legal = 0;
}
_local1++;
}
if (legal and space) {
var c = (ry + step);
_local1 = c;
while (_local1 >= py) {
this[(("tile_" + _local1) + "_") + _local3].gotoAndStop(myMap[_local1 - 1][_local3]);
myMap[_local1][_local3] = myMap[_local1 - 1][_local3];
_local1--;
}
this[(("tile_" + _local1) + "_") + _local3].gotoAndStop(1);
myMap[_local1][_local3] = 1;
doPusher();
}
}
}
function pushUp(ry, rx) {
var _local3 = rx;
if ((cx == _local3) and (cy == ry)) {
} else {
var py = ry;
var step = 0;
var legal = 1;
var space = 0;
var _local1 = py;
while (_local1 >= 0) {
var _local2 = myMap[_local1][_local3];
if (_local2 == 1) {
space = 1;
break;
}
step++;
if (((_local2 == 2) or (_local2 == 4)) or ((_local2 > 5) and (_local2 < 14))) {
legal = 0;
}
if ((cy == (_local1 - 1)) and (_local3 == cx)) {
legal = 0;
}
_local1--;
}
if (legal and space) {
var c = (ry - step);
_local1 = c;
while (_local1 <= py) {
this[(("tile_" + _local1) + "_") + _local3].gotoAndStop(myMap[_local1 + 1][_local3]);
myMap[_local1][_local3] = myMap[_local1 + 1][_local3];
_local1++;
}
this[(("tile_" + _local1) + "_") + _local3].gotoAndStop(1);
myMap[_local1][_local3] = 1;
doPusher();
}
}
}
function pushLeft(ry, rx) {
var _local3 = ry;
if ((cx == rx) and (cy == _local3)) {
} else {
var px = rx;
var step = 0;
var legal = 1;
var space = 0;
var _local1 = px;
while (_local1 >= 0) {
var _local2 = myMap[_local3][_local1];
if (_local2 == 1) {
space = 1;
break;
}
step++;
if (((_local2 == 2) or (_local2 == 3)) or ((_local2 > 5) and (_local2 < 14))) {
legal = 0;
}
if ((cx == (_local1 - 1)) and (_local3 == cy)) {
legal = 0;
}
_local1--;
}
if (legal and space) {
var c = (rx - step);
_local1 = c;
while (_local1 <= px) {
this[(("tile_" + _local3) + "_") + _local1].gotoAndStop(myMap[_local3][_local1 + 1]);
myMap[_local3][_local1] = myMap[_local3][_local1 + 1];
_local1++;
}
this[(("tile_" + _local3) + "_") + _local1].gotoAndStop(1);
myMap[_local3][_local1] = 1;
doPusher();
}
}
}
function pushRight(ry, rx) {
var _local3 = ry;
if ((cx == rx) and (cy == _local3)) {
} else {
var px = rx;
var step = 0;
var legal = 1;
var space = 0;
var _local1 = px;
while (_local1 <= W) {
var _local2 = myMap[_local3][_local1];
if (_local2 == 1) {
space = 1;
break;
}
step++;
if (((_local2 == 2) or (_local2 == 3)) or ((_local2 > 5) and (_local2 < 14))) {
legal = 0;
}
if ((cx == (_local1 + 1)) and (_local3 == cy)) {
legal = 0;
}
_local1++;
}
if (legal and space) {
var c = (rx + step);
_local1 = c;
while (_local1 >= px) {
this[(("tile_" + _local3) + "_") + _local1].gotoAndStop(myMap[_local3][_local1 - 1]);
myMap[_local3][_local1] = myMap[_local3][_local1 - 1];
_local1--;
}
this[(("tile_" + _local3) + "_") + _local1].gotoAndStop(1);
myMap[_local3][_local1] = 1;
doPusher();
}
}
}
function checkWin() {
if ((cx == 7) and (cy == 0)) {
playGame = 0;
mc.play();
}
}
myMap1 = [[1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 4, 3, 4, 3, 4, 1, 1, 1, 1, 1], [3, 1, 1, 1, 1, 1, 5, 1, 5, 1, 1, 1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12, 1, 1, 5, 1, 2, 11, 2, 2, 2, 1, 1, 1], [1, 1, 12, 1, 1, 5, 1, 1, 5, 1, 1, 4, 4, 1, 1], [1, 1, 12, 1, 1, 5, 1, 1, 5, 1, 2, 2, 6, 10, 10], [1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 15, 1, 4, 1, 15, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 15, 1, 1, 1, 15, 1, 1, 1, 1, 1]];
myMap13 = [[1, 1, 1, 1, 1, 1, 15, 15, 15, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1], [1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 12, 1, 1, 1], [2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 2], [1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 12, 1, 1], [2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 1], [1, 1, 1, 1, 1, 5, 1, 12, 1, 2, 1, 2, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 4, 1], [1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 6, 2]];
myMap14 = [[1, 1, 13, 1, 13, 1, 13, 1, 13, 1, 12, 1, 12, 1, 1], [1, 13, 1, 13, 1, 12, 1, 12, 1, 12, 1, 13, 1, 12, 1], [10, 1, 11, 1, 10, 1, 10, 1, 11, 1, 10, 1, 11, 1, 10], [1, 12, 1, 12, 1, 13, 1, 12, 1, 11, 1, 12, 1, 12, 1], [11, 1, 11, 1, 10, 1, 10, 1, 11, 1, 12, 1, 13, 1, 10], [1, 13, 1, 12, 1, 12, 1, 12, 1, 13, 1, 10, 1, 13, 1], [10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 10, 1, 10, 1, 11], [1, 12, 1, 13, 1, 13, 1, 12, 1, 13, 1, 13, 1, 13, 1], [11, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 10], [1, 13, 1, 12, 1, 12, 1, 1, 1, 13, 1, 13, 1, 13, 1]];
myMap15 = [[1, 5, 1, 1, 1, 4, 4, 7, 4, 4, 7, 4, 4, 7, 4], [1, 5, 1, 1, 2, 2, 2, 3, 2, 1, 15, 1, 1, 15, 1], [1, 2, 2, 2, 1, 1, 2, 3, 2, 1, 14, 1, 1, 14, 1], [10, 1, 1, 2, 2, 2, 1, 3, 2, 1, 14, 1, 1, 14, 1], [1, 3, 3, 1, 2, 1, 1, 15, 2, 2, 2, 5, 1, 2, 1], [2, 14, 14, 10, 2, 1, 1, 14, 1, 1, 2, 1, 2, 2, 2], [1, 3, 3, 1, 2, 1, 1, 14, 1, 1, 2, 1, 2, 1, 1], [2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1]];
myMap16 = [[1, 1, 1, 1, 1, 1, 2, 1, 12, 1, 1, 1, 1, 1, 1], [2, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 1, 1], [1, 1, 3, 14, 3, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2], [10, 1, 15, 2, 15, 2, 1, 1, 3, 1, 1, 4, 14, 4, 1], [1, 12, 14, 1, 14, 1, 2, 1, 15, 2, 2, 2, 2, 1, 2], [2, 1, 1, 1, 1, 1, 2, 1, 14, 1, 1, 4, 14, 4, 1], [1, 1, 1, 1, 1, 1, 2, 11, 15, 2, 2, 2, 2, 1, 2], [1, 1, 1, 1, 1, 1, 2, 1, 3, 13, 1, 4, 14, 4, 1], [1, 4, 4, 5, 4, 1, 12, 1, 1, 2, 2, 11, 2, 1, 2], [1, 1, 6, 1, 6, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1]];
myMap17 = [[1, 1, 3, 1, 3, 1, 1, 7, 1, 1, 2, 1, 1, 2, 1], [1, 1, 3, 1, 3, 1, 3, 5, 3, 1, 2, 1, 1, 2, 1], [1, 1, 1, 3, 1, 1, 3, 5, 3, 1, 2, 1, 1, 2, 1], [1, 1, 1, 3, 1, 1, 3, 5, 3, 1, 2, 1, 1, 2, 1], [1, 1, 1, 3, 1, 1, 1, 6, 1, 1, 1, 2, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 4, 1, 1, 1, 4, 1, 3, 1, 3, 1, 1, 3, 1, 1], [1, 4, 1, 4, 1, 4, 1, 3, 1, 3, 5, 1, 3, 1, 1], [1, 1, 4, 4, 4, 1, 1, 3, 1, 3, 1, 5, 3, 1, 1], [1, 1, 4, 1, 4, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1]];
size = 32;
width = 90;
height = 90;
_root.onKeyDown = function () {
if (playGame) {
if (Key.isDown(37)) {
doLeft();
doPusher();
} else if (Key.isDown(39)) {
doRight();
doPusher();
} else if (Key.isDown(40)) {
doDown();
doPusher();
} else if (Key.isDown(38)) {
doUp();
doPusher();
} else if (Key.isDown(82)) {
playGame = 0;
lives--;
nextFrame();
}
}
checkWin();
};
d = 0;
playGame = 1;
myMap = _root["myMap" + level];
buildMap(myMap);
createMc(7, 9);
Key.addListener(_root);
stop();
Frame 4
var i = 0;
while (i < H) {
var j = 0;
while (j < W) {
removeMovieClip(this[(("tile_" + i) + "_") + j]);
j++;
}
i++;
}
removeMovieClip(mc);
removeMovieClip(levelText);
if (lives < 0) {
gotoAndStop (2);
return(undefined);
}
if (level > 17) {
nextFrame();
} else {
prevFrame();
}
Frame 5
stop();
Symbol 20 MovieClip [mc] Frame 1
stop();
Symbol 20 MovieClip [mc] Frame 55
_root.level++;
_root.nextFrame();
Symbol 74 Button
on (press, keyPress "<Space>") {
nextFrame();
}
Symbol 75 Button
on (press) {
getURL ("http://lightforce.freestuff.gr", "_blank");
}
Symbol 76 Button
on (press) {
if (level < 17) {
level++;
}
}