Frame 1
stop();
playing = 1;
Instance of Symbol 10 MovieClip in Frame 1
onClipEvent (enterFrame) {
text = ((int(_parent.getBytesLoaded() / 1000) add " KBYTES OF ") add int(_parent.getBytesTotal() / 1000)) add " LOADED ...";
if (_parent.getBytesTotal() == _parent.getBytesLoaded()) {
_parent.gotoAndStop(2);
}
}
Frame 2
stopAllSounds();
stop();
Frame 3
bArray = [[0], [2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2], [1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2], [2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1], [2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1], [2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2], [2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1], [2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2], [2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2]];
playGame = true;
setButtons = function () {
left = 30;
top = 25;
step = 0;
i = 0;
while (i < 25) {
b = "b" + i;
t.attachMovie("button", b, 1000 + i);
t[b]._x = left;
t[b]._y = top;
((bArray[lv][i] == 1) ? ((t[b].state = false)) : ((t[b].state = true)));
t[b].gotoAndStop(bArray[lv][i]);
left = left + 55;
if (step == 4) {
left = 30;
top = top + 55;
step = 0;
} else {
step++;
}
i++;
}
};
doClick = function (pos, left, right, up, down) {
var _local1 = _root;
var _local2 = pos;
if (playGame) {
_local1.mc = _local1.t["b" + _local2];
_local1.lmc = _local1.t["b" + left];
_local1.rmc = _local1.t["b" + right];
_local1.dmc = _local1.t["b" + down];
_local1.umc = _local1.t["b" + up];
if (mc.state == true) {
mc.state = false;
mc.gotoAndStop(1);
} else {
mc.state = true;
mc.gotoAndStop(2);
}
if ((((_local2 != 5) and (_local2 != 10)) and (_local2 != 15)) and (_local2 != 20)) {
if (lmc.state == true) {
lmc.state = false;
lmc.gotoAndStop(1);
} else {
lmc.state = true;
lmc.gotoAndStop(2);
}
}
if ((((_local2 != 4) and (_local2 != 9)) and (_local2 != 14)) and (_local2 != 19)) {
if (rmc.state == true) {
rmc.state = false;
rmc.gotoAndStop(1);
} else {
rmc.state = true;
rmc.gotoAndStop(2);
}
}
if (dmc.state == true) {
dmc.state = false;
dmc.gotoAndStop(1);
} else {
dmc.state = true;
dmc.gotoAndStop(2);
}
if (umc.state == true) {
umc.state = false;
umc.gotoAndStop(1);
} else {
umc.state = true;
umc.gotoAndStop(2);
}
bleep.gotoAndPlay(2);
lightsOut = 0;
i = 0;
while (i < 25) {
b = "b" + i;
if (_local1.t[b].state == false) {
lightsOut++;
}
i++;
}
if (lightsOut == 25) {
playGame = false;
winSound.gotoAndPlay(2);
if (lv == 14) {
_local1.nextFrame();
} else {
nextLevel.gotoAndPlay(2);
}
}
}
};
lv = 1;
setButtons();
Symbol 4 Button
on (press) {
name = this._name;
len = length(name);
str = name.substring(1, len);
pos = Math.abs(str);
left = pos - 1;
right = pos + 1;
up = pos - 5;
down = pos + 5;
_root.doClick(pos, left, right, up, down);
}
Symbol 17 Button
on (press) {
nextFrame();
}
Symbol 21 Button
on (press) {
getURL ("http://www.freestuff.gr/lightforce", "_blank");
}
Symbol 26 Button
on (release) {
if (_root.playing == 1) {
stopAllSounds();
loopSound.gotoAndStop("Stop");
playing = 0;
} else {
loopSound.gotoAndStop("Play");
playing = 1;
}
}
Symbol 32 Button
on (press) {
if (playGame == true) {
setButtons();
}
}
Symbol 36 Button
on (press) {
if (playGame == true) {
gotoAndPlay (1);
}
}
Symbol 38 MovieClip Frame 1
Symbol 40 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 92
_root.lv++;
_root.setButtons();
_root.playGame = true;
Symbol 51 Button
on (press) {
gotoAndPlay (1);
}