[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 1 (193 B)
fscommand ("allowscale", false);
level = 1;
playing = 0;
klik = new Sound(_root.mySound);
klik.attachSound("klik");
error = new Sound(_root.mySound);
error.attachSound("error");
stop();
Instance of Symbol 19 MovieClip in Frame 1 (237 B)
onClipEvent (enterFrame) {
text = ((int(_parent.getBytesLoaded() / 1000) add " OF ") add int(_parent.getBytesTotal() / 1000)) add " LOADED ...";
if (_parent.getBytesTotal() == _parent.getBytesLoaded()) {
_root.goButton._x = 125;
}
}
Frame 2 (2.92 KiB) ●
function buildMap(map) {
var _local3 = map;
if ((level >= 1) and (level <= 5)) {
px = 55;
py = 50;
currentX = 0;
currentY = 0;
}
if ((level >= 6) and (level <= 10)) {
px = 55;
py = 50;
currentX = 1;
currentY = 1;
}
if (level >= 11) {
px = 30;
py = 30;
currentX = 0;
currentY = 0;
}
mapWidth = _local3[0].length;
mapHeight = _local3.length;
var _local2 = 0;
while (_local2 < mapHeight) {
var _local1 = 0;
while (_local1 < mapWidth) {
this.attachMovie("tile", (("t_" + _local2) + "_") + _local1, ++d);
t = this[(("t_" + _local2) + "_") + _local1];
t._x = (_local1 * tileW) + px;
t._y = (_local2 * tileH) + py;
t.gotoAndStop(_local3[_local2][_local1]);
t.clipState = false;
t.clipPos = _local3[_local2][_local1];
t.x = _local1;
t.y = _local2;
switch (t.clipPos) {
case 1 :
t.col = "red";
t.shape = "circle";
break;
case 2 :
t.col = "red";
t.shape = "box";
break;
case 3 :
t.col = "green";
t.shape = "circle";
break;
case 4 :
t.col = "green";
t.shape = "box";
break;
case 5 :
t.col = "blue";
t.shape = "circle";
break;
case 6 :
t.col = "blue";
t.shape = "box";
break;
case 7 :
t.clipState = true;
}
_local1++;
}
_local2++;
}
this[(("t_" + currentY) + "_") + currentX].clipState = true;
}
myMap1 = [[1, 6, 2], [5, 2, 5], [6, 5, 1]];
myMap2 = [[5, 6, 5], [2, 2, 5], [5, 1, 6]];
myMap3 = [[2, 6, 5], [5, 2, 2], [1, 2, 6]];
myMap4 = [[2, 1, 5], [5, 5, 6], [1, 6, 1]];
myMap5 = [[2, 5, 2], [2, 2, 6], [5, 5, 1]];
myMap6 = [[2, 3, 6], [3, 1, 3], [6, 4, 5]];
myMap7 = [[2, 3, 2], [4, 6, 1], [3, 4, 1]];
myMap8 = [[2, 6, 3], [2, 6, 1], [5, 4, 3]];
myMap9 = [[3, 1, 6], [3, 3, 3], [5, 3, 6]];
myMap10 = [[5, 3, 1], [2, 5, 3], [2, 6, 5]];
myMap11 = [[1, 5, 2, 7], [6, 1, 7, 6], [2, 7, 1, 5], [7, 6, 1, 2]];
myMap12 = [[2, 5, 7, 6], [6, 7, 5, 6], [5, 7, 5, 7], [7, 1, 2, 1]];
myMap13 = [[5, 1, 5, 7], [7, 7, 7, 6], [1, 2, 2, 6], [5, 1, 2, 7]];
myMap14 = [[1, 7, 7, 7], [5, 2, 2, 1], [5, 5, 1, 7], [2, 5, 2, 7]];
myMap15 = [[6, 7, 2, 7], [5, 1, 7, 5], [7, 2, 5, 6], [2, 7, 6, 6]];
myMap16 = [[1, 2, 3, 6], [4, 7, 6, 3], [6, 1, 7, 2], [1, 3, 4, 5]];
myMap17 = [[6, 7, 1, 2], [7, 3, 4, 2], [7, 7, 6, 1], [2, 1, 6, 1]];
myMap18 = [[6, 7, 2, 2], [6, 1, 6, 7], [1, 3, 4, 3], [1, 7, 6, 1]];
myMap19 = [[2, 1, 4, 4], [3, 6, 5, 1], [3, 2, 7, 7], [6, 6, 6, 6]];
myMap20 = [[3, 5, 3, 7], [4, 7, 1, 7], [6, 6, 1, 2], [1, 3, 7, 4]];
myMap21 = [[5, 5, 6, 4], [6, 6, 3, 1], [1, 1, 1, 4], [6, 1, 6, 1]];
myMap22 = [[1, 3, 6, 4], [5, 2, 1, 4], [2, 3, 3, 6], [1, 6, 4, 1]];
stageMoves = [0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 12, 11, 11, 11, 11, 14, 12, 13, 14, 12, 16, 16];
tileW = 50;
tileH = 50;
mov = 1;
playGame = true;
levelUp = true;
myMap = _root["myMap" + level];
buildMap(myMap);
stop();
Frame 3 (302 B)
var i = 0;
while (i < mapHeight) {
var j = 0;
while (j < mapWidth) {
removeMovieClip(_root[(("t_" + i) + "_") + j]);
j++;
}
i++;
}
if (levelUp == true) {
level++;
} else {
level--;
}
if (level < 1) {
level = 22;
}
if (level > 22) {
level = 1;
}
prevFrame();
Symbol 6 Button (689 B)
on (press) {
if (_root.playGame) {
if (this.clipState == false) {
lastPos = _root[(("t_" + _root.currentY) + "_") + _root.currentX];
if ((this.shape == lastPos.shape) or (this.col == lastPos.col)) {
if ((this.x == lastPos.x) or (this.y == lastPos.y)) {
lastPos.mark.gotoAndStop(2);
this.mark._alpha = 100;
this.clipState = true;
_root.currentX = this.x;
_root.currentY = this.y;
_root.mov++;
_root.klik.start(0, 1);
} else {
_root.error.start(0, 1);
}
} else {
_root.error.start(0, 1);
}
if (_root.mov == _root.stageMoves[_root.level]) {
_root.playGame = false;
_root.nextLevel.gotoAndPlay(2);
}
}
}
}
Symbol 9 MovieClip Frame 1 (8 B)
stop();
Instance of Symbol 9 MovieClip "mark" in Symbol 15 MovieClip [tile] Frame 1 (79 B)
onClipEvent (load) {
if (_parent.clipState == false) {
this._alpha = 0;
}
}
Symbol 24 Button (28 B)
on (press) {
nextFrame();
}
Symbol 28 Button (68 B)
on (press) {
if (playGame) {
levelUp = false;
nextFrame();
}
}
Symbol 29 Button (67 B)
on (press) {
if (playGame) {
levelUp = true;
nextFrame();
}
}
Symbol 33 Button (72 B)
on (press) {
getURL ("http://www.freestuff.gr/lightforce", "_blank");
}
Symbol 36 Button (68 B)
on (press) {
if (playGame == true) {
level--;
nextFrame();
}
}
Symbol 39 Button (171 B)
on (release) {
if (_root.playing == 1) {
stopAllSounds();
loopSound.gotoAndStop("Stop");
playing = 0;
} else {
loopSound.gotoAndStop("Play");
playing = 1;
}
}
Symbol 46 MovieClip Frame 1 (8 B)
stop();
Symbol 46 MovieClip Frame 110 (19 B)
_root.nextFrame();
Symbol 49 MovieClip Frame 1 (8 B)
stop();