Frame 1
stop();
Instance of Symbol 19 MovieClip in Frame 1
onClipEvent (enterFrame) {
text = ((int(_parent.getBytesLoaded() / 1000) add " OF ") add int(_parent.getBytesTotal() / 1000)) add " ...";
if (_parent.getBytesTotal() == _parent.getBytesLoaded()) {
_root.gotoAndPlay(2);
}
}
Frame 2
fscommand ("allowscale", false);
playing = 0;
score = 0;
restart = false;
clickCounter = 1;
playGame = true;
klik = new Sound(_root.mySound);
klik.attachSound("klik");
box = new Sound(_root.mySound);
box.attachSound("box");
error = new Sound(_root.mySound);
error.attachSound("error");
bonus = new Sound(_root.mySound);
bonus.attachSound("bonus");
stopAllSounds();
stop();
Frame 3
function setTiles() {
var _local3 = this;
var _local2 = 0;
var _local1 = 0;
while (_local2 < 10) {
while (_local1 < 10) {
duplicateMovieClip ("tiles", (("t" + _local2) + "_") + _local1, ++d);
t = _local3[(("t" + _local2) + "_") + _local1];
t._x = (_local2 * 28) + 14;
t._y = (_local1 * 28) + 13;
c = int(random(4)) + 1;
t.color = c;
t.state = false;
t.gotoAndStop(c);
t.x = _local2;
t.y = _local1;
_local1++;
}
_local1 = 0;
_local2++;
}
}
function createTar(tx, ty, cc) {
var _local1 = cc;
var _local2 = _root;
duplicateMovieClip ("tar", "tar" + _local1, ++d);
_local2["tar" + _local1].swapDepths(2000 + d);
_local2["tar" + _local1]._x = tx;
_local2["tar" + _local1]._y = ty;
if (_local1 != 4) {
klik.start(0, 1);
}
}
function createWall() {
var _local3 = _root;
wallBoundsX = Array();
wallBoundsY = Array();
var _local1 = 0;
var _local2 = 0;
while (_local2 < 10) {
while (_local1 < 10) {
if (_local3[(("t" + _local1) + "_") + _local2].state == true) {
wallBoundsX.push(_local1);
wallBoundsY.push(_local2);
}
_local1++;
}
_local1 = 0;
_local2++;
}
duplicateMovieClip ("wallClip", "wall", ++d);
wall.swapDepths(2000 + d);
wall._x = (wallBoundsX[0] * 28) + 14;
wall._y = (wallBoundsY[0] * 28) + 13;
width = (wallBoundsX[1] - wallBoundsX[0]) + 1;
height = (wallBoundsY[2] - wallBoundsY[0]) + 1;
wall._width = width * 28;
wall._height = height * 28;
box.start(0, 1);
fadeTiles();
}
function fadeTiles() {
var _local3 = 0;
var stepX = Math.abs(wallBoundsX[0] - wallBoundsX[1]);
var stepY = Math.abs(wallBoundsY[0] - wallBoundsY[2]);
var _local2 = wallBoundsX[0];
var _local1 = wallBoundsY[0];
var x = ((_local2 + stepX) + 1);
var y = ((_local1 + stepY) + 1);
while (_local2 < x) {
while (_local1 < y) {
_local3 = _local3 + 100;
_root[(("t" + _local2) + "_") + _local1].gotoAndPlay(5);
_local1++;
}
_local1 = wallBoundsY[0];
_local2++;
}
if (_local3 == 10000) {
_local3 = _local3 + _local3;
bonus.start(0, 1);
duplicateMovieClip ("twentyClip", "twenty", ++d);
twenty.swapDepths(2000 + d);
twenty._x = 130;
twenty._y = 140;
twenty.gotoAndPlay(1);
}
score = score + _local3;
cloud.myText.pts = _local3;
cloud.gotoAndPlay(2);
}
function resetStates(flag) {
var _local3 = this;
var _local1 = 0;
var _local2 = 0;
while (_local1 < 10) {
while (_local2 < 10) {
_local3[(("t" + _local1) + "_") + _local2].state = false;
if (flag) {
removeMovieClip(_local3[(("t" + _local1) + "_") + _local2]);
}
_local2++;
}
_local2 = 0;
_local1++;
}
_local1 = 1;
while (_local1 < 5) {
removeMovieClip("tar" + _local1);
_local1++;
}
clickCounter = 1;
}
tar.stop();
setTiles();
stop();
Instance of Symbol 15 MovieClip [tile] "tiles" in Frame 3
onClipEvent (load) {
if (this._name == "tiles") {
this.stop();
}
}
Instance of Symbol 68 MovieClip in Frame 3
//component parameters
onClipEvent (initialize) {
countAmount = 300;
}
onClipEvent (load) {
var startTime = getTimer();
var countAmount;
var elapsed = 0;
}
onClipEvent (enterFrame) {
elapsed = getTimer() - startTime;
if (elapsed <= (countAmount * 1000)) {
counterOutput = countAmount - Math.floor(elapsed / 1000);
this.sec = int(counterOutput % 60);
this.min = int(counterOutput / 60);
if (min < 10) {
min = "0" + min;
}
if (sec < 10) {
sec = "0" + sec;
}
counterOutput = this.min + this.sec;
} else {
this.sec = "00";
this.counterOutput = "00";
_root.gotoAndStop(4);
}
}
Frame 4
_root.resetStates(true);
removeMovieClip(wall);
if (restart == true) {
gotoAndPlay (2);
} else {
stop();
}
Symbol 12 Button
on (press) {
if (_root.playGame) {
legal = false;
if ((_root.clickCounter == 1) & (!this.state)) {
this.state = true;
_root.ax = this.x;
_root.ay = this.y;
_root.createTar(this._x, this._y, _root.clickCounter);
_root.clickCounter = 2;
_root.tempColor = this.color;
legal = true;
} else if (((_root.clickCounter == 2) & (!this.state)) & (this.color == _root.tempColor)) {
this.state = true;
_root.bx = this.x;
_root.by = this.y;
_root.createTar(this._x, this._y, _root.clickCounter);
_root.clickCounter = 3;
legal = true;
} else if (((_root.clickCounter == 3) & (!this.state)) & (this.color == _root.tempColor)) {
if ((_root.ax == _root.bx) & (this.x != _root.ax)) {
if ((this.y == _root.ay) or (this.y == _root.by)) {
legal = true;
}
}
if ((_root.ay == _root.by) & (this.y != _root.ay)) {
if ((this.x == _root.ax) or (this.x == _root.bx)) {
legal = true;
}
}
if ((_root.ax != _root.bx) & (_root.ay != _root.by)) {
if (((this.x == _root.ax) and (this.y == _root.by)) or ((this.x == _root.bx) and (this.y == _root.ay))) {
legal = true;
}
}
if (legal) {
this.state = true;
_root.cx = this.x;
_root.cy = this.y;
_root.createTar(this._x, this._y, _root.clickCounter);
_root.clickCounter = 4;
}
} else if (((_root.clickCounter == 4) & (!this.state)) & (this.color == _root.tempColor)) {
if ((((this.x == _root.ax) and ((this.y == _root.by) or (this.y == _root.cy))) or ((this.x == _root.bx) and ((this.y == _root.ay) or (this.y == _root.cy)))) or ((this.x == _root.cx) and ((this.y == _root.ay) or (this.y == _root.by)))) {
legal = true;
}
if (legal) {
this.state = true;
_root.createTar(this._x, this._y, _root.clickCounter);
_root.clickCounter = 1;
_root.playGame = false;
_root.createWall();
}
}
if (legal == false) {
_root.error.start(0, 1);
_root.resetStates(false);
}
}
}
Symbol 15 MovieClip [tile] Frame 25
c = random(4) + 1;
this.color = c;
this.gotoAndStop(c);
_root.playGame = true;
Symbol 34 Button
on (press) {
play();
}
Symbol 54 Button
on (release) {
if (_root.playing == 1) {
stopAllSounds();
loopSound.gotoAndStop("Stop");
playing = 0;
} else {
loopSound.gotoAndStop("Play");
playing = 1;
}
}
Symbol 63 MovieClip Frame 3
_root.resetStates(false);
Symbol 63 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 64 Button
on (press) {
getURL ("http://www.freestuff.gr/lightforce", "_blank");
}
Symbol 70 MovieClip Frame 1
stop();
Symbol 73 Button
on (press) {
if (playGame) {
restart = true;
nextFrame();
}
}
Symbol 78 MovieClip Frame 1
stop();
Instance of Symbol 77 MovieClip "myText" in Symbol 78 MovieClip Frame 45
/* no clip actions */
Symbol 81 MovieClip Frame 51
removeMovieClip(this);
stop();
Symbol 84 Button
on (press) {
gotoAndPlay (2);
}
Symbol 87 MovieClip Frame 25
stop();