Frame 1
snd1 = new Sound(_root.snd1);
snd1.attachSound("win");
level = 1;
playing = 0;
stop();
Instance of Symbol 19 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 = 200;
}
}
Frame 2
function buildMap(map) {
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", (("t_" + _local2) + "_") + _local1, ++d);
t = _local3[(("t_" + _local2) + "_") + _local1];
t._x = (_local1 * size) + width;
t._y = (_local2 * size) + height;
t.gotoAndStop(map[_local2][_local1]);
_local1++;
}
_local2++;
}
}
function createBall(x, y) {
this.attachMovie("ball", "ball", ++d);
ball._x = (size * x) + width;
ball._y = (size * y) + height;
ball.stop();
}
function levelVar(lv) {
switch (lv) {
case 1 :
width = 80;
height = 40;
bx = 6;
by = 1;
return;
case 2 :
width = 80;
height = 40;
bx = 5;
by = 2;
return;
case 3 :
width = 80;
height = 40;
bx = 5;
by = 2;
return;
case 4 :
width = 80;
height = 40;
bx = 0;
by = 2;
return;
case 5 :
width = 80;
height = 40;
bx = 4;
by = 4;
return;
case 6 :
width = 80;
height = 40;
bx = 5;
by = 3;
return;
case 7 :
width = 80;
height = 40;
bx = 1;
by = 0;
return;
case 8 :
width = 80;
height = 40;
bx = 3;
by = 2;
return;
case 9 :
width = 60;
height = 20;
bx = 6;
by = 0;
return;
case 10 :
width = 60;
height = 20;
bx = 6;
by = 2;
return;
case 11 :
width = 80;
height = 20;
bx = 6;
by = 1;
return;
case 12 :
width = 60;
height = 20;
bx = 5;
by = 3;
return;
case 13 :
width = 90;
height = 60;
bx = 4;
by = 2;
return;
case 14 :
width = 60;
height = 20;
bx = 6;
by = 2;
}
}
function checkEmpty(x, y) {
gameOver = 0;
if ((myMap[y][x] == 1) or (myMap[y][x] == null)) {
gameOver = 1;
} else {
myMap[by][bx] = 1;
}
this[(("t_" + by) + "_") + bx].gotoAndPlay(2);
return(gameOver);
}
function countTile() {
redTile();
tiles = 0;
var _local2 = 0;
while (_local2 < H) {
var _local1 = 0;
while (_local1 < W) {
if (myMap[_local2][_local1] == 2) {
tiles++;
}
_local1++;
}
_local2++;
}
if (tiles == 1) {
play = 0;
level++;
snd1.start(0, 1);
nextFrame();
}
}
function redTile() {
this[(("t_" + by) + "_") + bx].clip.gotoAndStop(2);
}
myMap1 = [[1, 1, 1, 1, 2, 1, 1], [1, 2, 2, 2, 2, 2, 2], [1, 2, 1, 1, 2, 1, 1], [1, 2, 1, 1, 2, 1, 1], [2, 2, 1, 1, 2, 2, 2], [2, 1, 1, 1, 1, 1, 2], [2, 2, 2, 2, 2, 2, 2]];
myMap2 = [[2, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 1, 1, 1], [2, 1, 1, 1, 2, 2, 2], [2, 1, 1, 1, 1, 1, 1], [2, 1, 2, 2, 2, 1, 1], [1, 1, 1, 2, 1, 1, 1], [2, 2, 2, 2, 1, 1, 1]];
myMap3 = [[1, 1, 1, 1, 1, 2, 1], [1, 1, 2, 1, 2, 2, 2], [1, 1, 1, 1, 1, 2, 1], [1, 1, 2, 1, 1, 1, 1], [1, 2, 2, 2, 1, 2, 1], [1, 1, 2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]];
myMap4 = [[2, 1, 1, 1, 1, 1, 1], [2, 1, 2, 1, 2, 1, 2], [2, 1, 1, 1, 2, 1, 2], [1, 1, 1, 1, 1, 1, 2], [2, 2, 2, 1, 1, 1, 1], [1, 1, 1, 1, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2]];
myMap5 = [[1, 1, 2, 1, 1, 1, 1], [1, 1, 2, 1, 1, 1, 1], [1, 2, 2, 2, 1, 1, 1], [1, 1, 2, 1, 2, 1, 1], [1, 2, 1, 1, 2, 1, 2], [2, 2, 1, 2, 2, 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, 2, 1], [2, 2, 2, 1, 1, 1, 1], [2, 1, 2, 1, 1, 1, 1]];
myMap12 = [[1, 1, 1, 2, 1, 2, 1, 1], [1, 2, 1, 2, 2, 2, 2, 2], [1, 2, 1, 2, 1, 2, 1, 1], [2, 2, 2, 1, 1, 2, 1, 2], [1, 2, 1, 1, 2, 2, 2, 2], [1, 1, 2, 1, 1, 1, 1, 1], [1, 1, 1, 2, 2, 2, 1, 1], [1, 1, 2, 1, 2, 1, 1, 1]];
myMap13 = [[2, 1, 2, 2, 1, 2], [2, 1, 1, 2, 1, 2], [2, 2, 2, 1, 2, 1], [2, 1, 1, 1, 1, 1], [1, 2, 1, 2, 2, 2], [2, 1, 2, 1, 2, 1]];
myMap14 = [[1, 1, 1, 1, 2, 1, 1, 1], [2, 2, 2, 1, 2, 1, 1, 2], [1, 1, 2, 2, 2, 2, 2, 2], [1, 2, 1, 1, 1, 1, 1, 1], [2, 2, 2, 1, 2, 1, 1, 2], [1, 2, 1, 2, 2, 1, 2, 2], [1, 1, 1, 1, 2, 1, 1, 1], [1, 2, 2, 1, 2, 1, 2, 1]];
size = 36;
_root.onKeyDown = function () {
if (play) {
control = 0;
if (Key.isDown(17)) {
control = 1;
}
if (Key.isDown(37)) {
if (!control) {
play = 0;
gameOver = checkEmpty(bx - 1, by);
ball.gotoAndPlay(50);
} else {
play = 0;
gameOver = checkEmpty(bx - 2, by);
ball.gotoAndPlay(71);
}
}
if (Key.isDown(39)) {
if (!control) {
play = 0;
gameOver = checkEmpty(bx + 1, by);
ball.gotoAndPlay(2);
} else {
play = 0;
gameOver = checkEmpty(bx + 2, by);
ball.gotoAndPlay(22);
}
}
if (Key.isDown(38)) {
if (!control) {
play = 0;
gameOver = checkEmpty(bx, by - 1);
ball.gotoAndPlay(101);
} else {
play = 0;
gameOver = checkEmpty(bx, by - 2);
ball.gotoAndPlay(122);
}
}
if (Key.isDown(40)) {
if (!control) {
play = 0;
gameOver = checkEmpty(bx, by + 1);
ball.gotoAndPlay(151);
} else {
play = 0;
gameOver = checkEmpty(bx, by + 2);
ball.gotoAndPlay(172);
}
}
if (Key.isDown(32)) {
play = 0;
nextFrame();
}
}
};
_root.onKeyUp = function () {
control = 0;
};
d = 0;
play = 1;
tiles = 0;
myMap = _root["myMap" + level];
levelVar(level);
buildMap(myMap);
createBall(bx, by);
countTile();
redTile();
Key.addListener(_root);
stop();
Frame 3
var i = 0;
while (i < H) {
var j = 0;
while (j < W) {
removeMovieClip(this[(("t_" + i) + "_") + j]);
j++;
}
i++;
}
removeMovieClip(ball);
if (level == 15) {
nextFrame();
} else {
prevFrame();
}
Frame 4
stop();
Symbol 4 MovieClip Frame 1
stop();
Symbol 5 MovieClip [tile] Frame 15
stop();
Symbol 15 MovieClip [ball] Frame 21
stop();
this._x = this._x + 36;
if (_root.gameOver) {
gotoAndPlay (200);
} else {
gotoAndStop (1);
_root.bx++;
_root.play = 1;
_root.countTile();
}
Symbol 15 MovieClip [ball] Frame 49
stop();
this._x = this._x + 72;
if (_root.gameOver) {
gotoAndPlay (200);
} else {
gotoAndStop (1);
_root.bx = _root.bx + 2;
_root.play = 1;
_root.countTile();
}
Symbol 15 MovieClip [ball] Frame 70
stop();
this._x = this._x - 36;
if (_root.gameOver) {
gotoAndPlay (200);
} else {
gotoAndStop (1);
_root.bx--;
_root.play = 1;
_root.countTile();
}
Symbol 15 MovieClip [ball] Frame 100
stop();
this._x = this._x - 72;
if (_root.gameOver) {
gotoAndPlay (200);
} else {
gotoAndStop (1);
_root.bx = _root.bx - 2;
_root.play = 1;
_root.countTile();
}
Symbol 15 MovieClip [ball] Frame 121
stop();
this._y = this._y - 36;
if (_root.gameOver) {
gotoAndPlay (200);
} else {
gotoAndStop (1);
_root.by--;
_root.play = 1;
_root.countTile();
}
Symbol 15 MovieClip [ball] Frame 150
stop();
this._y = this._y - 72;
if (_root.gameOver) {
gotoAndPlay (200);
} else {
gotoAndStop (1);
_root.by = _root.by - 2;
_root.play = 1;
_root.countTile();
}
Symbol 15 MovieClip [ball] Frame 171
stop();
this._y = this._y + 36;
if (_root.gameOver) {
gotoAndPlay (200);
} else {
gotoAndStop (1);
_root.by++;
_root.play = 1;
_root.countTile();
}
Symbol 15 MovieClip [ball] Frame 199
stop();
this._y = this._y + 72;
if (_root.gameOver) {
gotoAndPlay (200);
} else {
gotoAndStop (1);
_root.by = _root.by + 2;
_root.play = 1;
_root.countTile();
}
Symbol 15 MovieClip [ball] Frame 212
stop();
_root.nextFrame();
Symbol 23 Button
on (press) {
nextFrame();
}
Symbol 27 Button
on (press) {
getURL ("http://lightforce.freestuff.gr", "_blank");
}
Symbol 31 MovieClip Frame 1
_parent.dp++;
_name = ("star" + _parent.dp);
nm = "??????" + _parent.dp;
_alpha = (random(70) + 50);
Symbol 32 MovieClip Frame 1
ck++;
if (ck > (5 + rr)) {
ck = 0;
rr = random(20);
r = random(10) + 1;
this["star" + r]._alpha = random(70) + 50;
}
Symbol 32 MovieClip Frame 2
gotoAndPlay (1);
Symbol 39 Button
on (release) {
if (playing == 1) {
stopAllSounds();
loop.gotoAndStop("Stop");
playing = 0;
} else {
loop.gotoAndStop("Play");
playing = 1;
}
}
Symbol 41 MovieClip Frame 1
stop();