Frame 1
l = getBytesLoaded();
t = getBytesTotal();
ile = ("zaladowano juz " + int((l / t) * 100)) + " % gry";
pasek._width = (l / t) * 75;
if (l >= t) {
gotoAndPlay (4);
}
play();
Frame 2
prevFrame();
Instance of Symbol 34 MovieClip "timer" in Frame 3
onClipEvent (load) {
czasmax = 0;
zmiana = 0;
start = 1;
}
onClipEvent (enterFrame) {
if (start == 1) {
_root.czas = int((getTimer() / 1000) - _root.poczatek);
if (czasmax < _root.czas) {
czasmax = _root.czas;
zmiana = 1;
}
if (((_root.czas % 1) == 0) && (zmiana == 1)) {
_root.bonus = _root.bonus - 5;
zmiana = 0;
}
if (_root.bonus < 0) {
_root.bonus = 0;
}
}
}
Frame 4
function losujNumer() {
do {
liczba = random(36);
} while (free[liczba] < 1);
free[liczba]--;
return(liczba);
}
function losowanie() {
i = 0;
while (i < 5) {
j = 0;
while (j < 16) {
k = 0;
while (k < 30) {
tab[i][j][k] = -1;
k++;
}
j++;
}
i++;
}
var numer = losujNumer();
tab[4][7][13] = numer;
tab[4][8][13] = numer;
tab[4][7][14] = numer;
tab[4][8][14] = numer;
numer = losujNumer();
tab[0][7][0] = numer;
tab[0][8][0] = numer;
tab[0][7][1] = numer;
tab[0][8][1] = numer;
numer = losujNumer();
tab[0][7][26] = numer;
tab[0][8][26] = numer;
tab[0][7][27] = numer;
tab[0][8][27] = numer;
numer = losujNumer();
tab[0][7][28] = numer;
tab[0][8][28] = numer;
tab[0][7][29] = numer;
tab[0][8][29] = numer;
k = 2;
while (k < 26) {
var numer = losujNumer();
tab[0][0][k] = numer;
tab[0][1][k] = numer;
tab[0][0][k + 1] = numer;
tab[0][1][k + 1] = numer;
numer = losujNumer();
tab[0][6][k] = numer;
tab[0][7][k] = numer;
tab[0][6][k + 1] = numer;
tab[0][7][k + 1] = numer;
numer = losujNumer();
tab[0][8][k] = numer;
tab[0][9][k] = numer;
tab[0][8][k + 1] = numer;
tab[0][9][k + 1] = numer;
numer = losujNumer();
tab[0][14][k] = numer;
tab[0][15][k] = numer;
tab[0][14][k + 1] = numer;
tab[0][15][k + 1] = numer;
k = k + 2;
}
k = 6;
while (k < 22) {
var numer = losujNumer();
tab[0][2][k] = numer;
tab[0][3][k] = numer;
tab[0][2][k + 1] = numer;
tab[0][3][k + 1] = numer;
numer = losujNumer();
tab[0][12][k] = numer;
tab[0][13][k] = numer;
tab[0][12][k + 1] = numer;
tab[0][13][k + 1] = numer;
k = k + 2;
}
k = 4;
while (k < 24) {
var numer = losujNumer();
tab[0][4][k] = numer;
tab[0][5][k] = numer;
tab[0][4][k + 1] = numer;
tab[0][5][k + 1] = numer;
numer = losujNumer();
tab[0][10][k] = numer;
tab[0][11][k] = numer;
tab[0][10][k + 1] = numer;
tab[0][11][k + 1] = numer;
k = k + 2;
}
j = 6;
while (j < 10) {
k = 12;
while (k < 16) {
var numer = losujNumer();
tab[3][j][k] = numer;
tab[3][j + 1][k] = numer;
tab[3][j][k + 1] = numer;
tab[3][j + 1][k + 1] = numer;
k = k + 2;
}
j = j + 2;
}
j = 4;
while (j < 12) {
k = 10;
while (k < 18) {
var numer = losujNumer();
tab[2][j][k] = numer;
tab[2][j + 1][k] = numer;
tab[2][j][k + 1] = numer;
tab[2][j + 1][k + 1] = numer;
k = k + 2;
}
j = j + 2;
}
j = 2;
for(;;){
if (j >= 14) {
return(undefined);
}
k = 8;
while (k < 20) {
var numer = losujNumer();
tab[1][j][k] = numer;
tab[1][j + 1][k] = numer;
tab[1][j][k + 1] = numer;
tab[1][j + 1][k + 1] = numer;
k = k + 2;
}
j = j + 2;
};
}
function assign() {
var warstwa = 1;
var nr34 = 0;
var nr35 = 0;
var offset_x = 68;
var offset_y = 50;
var numer = tab[0][7][28];
if (numer == 34) {
duplicateMovieClip ("klocek34" + nr34, "kl3400728", 16384 + warstwa);
kl3400728._x = offset_x + 560;
kl3400728._y = offset_y + 196;
warstwa++;
nr34++;
} else if (numer == 35) {
duplicateMovieClip ("klocek35" + nr35, "kl3500728", 16384 + warstwa);
kl3500728._x = offset_x + 560;
kl3500728._y = offset_y + 196;
warstwa++;
nr35++;
} else {
duplicateMovieClip (((numer >= 10) ? "klocek" : "klocek0") + numer, (((numer >= 10) ? "kl" : "kl0") + numer) + "00728", 16384 + warstwa);
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "00728")._x = offset_x + 560;
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "00728")._y = offset_y + 196;
warstwa++;
}
numer = tab[0][7][26];
if (numer == 34) {
duplicateMovieClip ("klocek34" + nr34, "kl3400726", 16384 + warstwa);
kl3400726._x = offset_x + 520;
kl3400726._y = offset_y + 196;
warstwa++;
nr34++;
} else if (numer == 35) {
duplicateMovieClip ("klocek35" + nr35, "kl3500726", 16384 + warstwa);
kl3500726._x = offset_x + 520;
kl3500726._y = offset_y + 196;
warstwa++;
nr35++;
} else {
duplicateMovieClip (((numer >= 10) ? "klocek" : "klocek0") + numer, (((numer >= 10) ? "kl" : "kl0") + numer) + "00726", 16384 + warstwa);
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "00726")._x = offset_x + 520;
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "00726")._y = offset_y + 196;
warstwa++;
}
i = 0;
while (i < 4) {
j = 0;
while (j < 16) {
k = 24;
while (0 < k) {
numer = tab[i][j][k];
if (numer >= 0) {
if (numer == 34) {
duplicateMovieClip ("klocek34" + nr34, (((("kl34" + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k, 16384 + warstwa);
eval ((((("kl34" + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k)._x = (offset_x + (i * 5)) + (k * 20);
eval ((((("kl34" + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k)._y = (offset_y - (i * 5)) + (j * 28);
eval ((((("kl34" + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k).light._alpha = i * 15;
warstwa++;
nr34++;
} else if (numer == 35) {
duplicateMovieClip ("klocek35" + nr35, (((("kl35" + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k, 16384 + warstwa);
eval ((((("kl35" + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k)._x = (offset_x + (i * 5)) + (k * 20);
eval ((((("kl35" + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k)._y = (offset_y - (i * 5)) + (j * 28);
eval ((((("kl35" + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k).light._alpha = i * 15;
warstwa++;
nr35++;
} else {
duplicateMovieClip (((numer >= 10) ? "klocek" : "klocek0") + numer, (((((((numer >= 10) ? "kl" : "kl0") + numer) + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k, 16384 + warstwa);
eval ((((((((numer >= 10) ? "kl" : "kl0") + numer) + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k)._x = (offset_x + (i * 5)) + (k * 20);
eval ((((((((numer >= 10) ? "kl" : "kl0") + numer) + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k)._y = (offset_y - (i * 5)) + (j * 28);
eval ((((((((numer >= 10) ? "kl" : "kl0") + numer) + i) + ((j >= 10) ? "" : "0")) + j) + ((k >= 10) ? "" : "0")) + k).light._alpha = i * 15;
warstwa++;
}
}
k = k - 2;
}
j = j + 2;
}
i++;
}
var numer = tab[0][7][0];
if (numer == 34) {
duplicateMovieClip ("klocek34" + nr34, "kl3400700", 16384 + warstwa);
kl3400700._x = offset_x;
kl3400700._y = offset_y + 196;
warstwa++;
nr34++;
} else if (numer == 35) {
duplicateMovieClip ("klocek35" + nr35, "kl3500700", 16384 + warstwa);
kl3500700._x = offset_x;
kl3500700._y = offset_y + 196;
warstwa++;
nr35++;
} else {
duplicateMovieClip (((numer >= 10) ? "klocek" : "klocek0") + numer, (((numer >= 10) ? "kl" : "kl0") + numer) + "00700", 16384 + warstwa);
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "00700")._x = offset_x;
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "00700")._y = offset_y + 196;
warstwa++;
}
numer = tab[4][7][13];
if (numer == 34) {
duplicateMovieClip ("klocek34" + nr34, "kl3440713", 16384 + warstwa);
kl3440713._x = (offset_x + 20) + 260;
kl3440713._y = (offset_y - 20) + 196;
kl3440713.light._alpha = 60;
} else if (numer == 35) {
duplicateMovieClip ("klocek35" + nr35, "kl3540713", 16384 + warstwa);
kl3540713._x = (offset_x + 20) + 260;
kl3540713._y = (offset_y - 20) + 196;
kl3540713.light._alpha = 60;
} else {
duplicateMovieClip (((numer >= 10) ? "klocek" : "klocek0") + numer, (((numer >= 10) ? "kl" : "kl0") + numer) + "40713", 16384 + warstwa);
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "40713")._x = (offset_x + 20) + 260;
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "40713")._y = (offset_y - 20) + 196;
eval ((((numer >= 10) ? "kl" : "kl0") + numer) + "40713").light._alpha = 60;
}
stopAllSounds();
}
function freeCheck(nazwa) {
var ok = false;
var nr = parseInt(nazwa.substr(2, 2));
var z = parseInt(nazwa.substr(4, 1));
var y = parseInt(nazwa.substr(5, 2));
var x = parseInt(nazwa.substr(7, 2));
if (((z == 4) || (x == 0)) || (x == 28)) {
ok = true;
} else {
if ((((tab[z][y][x - 1] < 0) && (tab[z][y + 1][x - 1] < 0)) && (tab[z + 1][y][x] < 0)) || (((tab[z][y][x + 2] < 0) && (tab[z][y + 1][x + 2] < 0)) && (tab[z + 1][y][x] < 0))) {
ok = true;
}
if ((z == 3) && (tab[4][7][13] >= 0)) {
ok = false;
}
}
return(ok);
}
function ileRuchow() {
ruchy = 0;
i = 0;
while (i < 36) {
free[i] = 0;
i++;
}
i = 0;
while (i < 4) {
j = 0;
while (j < 16) {
k = 2;
while (k < 26) {
numer = tab[i][j][k];
if (numer >= 0) {
if ((((tab[i][j][k - 1] < 0) && (tab[i][j + 1][k - 1] < 0)) && (tab[i + 1][j][k] < 0)) || (((tab[i][j][k + 2] < 0) && (tab[i][j + 1][k + 2] < 0)) && (tab[i + 1][j][k] < 0))) {
free[numer]++;
}
if ((i == 3) && (tab[4][7][13] >= 0)) {
free[numer]--;
}
if (free[numer] < 0) {
free[numer] = 0;
}
}
k = k + 2;
}
j = j + 2;
}
i++;
}
if (tab[0][7][0] >= 0) {
free[tab[0][7][0]]++;
}
if (tab[0][7][28] >= 0) {
free[tab[0][7][28]]++;
}
if (tab[4][7][13] >= 0) {
free[tab[4][7][13]]++;
}
if ((tab[0][7][26] >= 0) && (tab[0][7][28] < 0)) {
free[tab[0][7][26]]++;
}
i = 0;
while (i < 36) {
if ((free[i] == 2) || (free[i] == 3)) {
ruchy = ruchy + 1;
}
if (free[i] == 4) {
ruchy = ruchy + 2;
}
i++;
}
if ((ruchy == 0) && (0 < ileKlockow)) {
_root.attachMovie("gameover", "gameover1", 2000);
gameover1._x = 320;
gameover1._y = 210;
timer.start = 0;
}
if (ileKlockow == 0) {
punkty = punkty + bonus;
ileKlockow = 144;
bonus = 5000;
i = 0;
while (i < 36) {
free[i] = 4;
i++;
}
losowanie();
assign();
}
}
var selected = 0;
var sel_name = "";
ileKlockow = 144;
punkty = 0;
click = new Sound();
click.attachSound("click");
zdjecie = new Sound();
zdjecie.attachSound("zdjecie");
zly = new Sound();
zly.attachSound("zly");
tasowanie = new Sound();
tasowanie.attachSound("tasowanie");
tab = new Array(6);
i = 0;
while (i < 5) {
tab[i] = new Array(16);
j = 0;
while (j < 16) {
tab[i][j] = new Array(28);
j++;
}
i++;
}
free = new Array(36);
i = 0;
while (i < 36) {
free[i] = 4;
i++;
}
tasowanie.start();
losowanie();
assign();
start.play();
ileRuchow();
stop();
Symbol 8 Button
on (release) {
getURL ("http://www.myapplegames.com", "_blank");
}
Symbol 10 Button
on (release) {
getURL ("http://www.solofriv.com", "_blank");
}
Symbol 17 Button
on (release) {
getURL ("http://www.y8.com", "_blank");
}
Symbol 24 Button
on (release) {
getURL ("http://www.solofriv.com", "_blank");
}
Symbol 27 Button
on (release) {
getURL ("http://www.myapplegames.com", "_blank");
}
Symbol 36 Button
on (press) {
_root.attachMovie("gameover", "gameover1", 2000);
gameover1._x = 320;
gameover1._y = 210;
timer.start = 0;
}
Symbol 39 Button
on (press) {
if (/:freeCheck(_name)) {
/:click.start();
if (/:selected == 0) {
Set("/:selected", 1);
Set("/:sel_name", _name);
glow._visible = true;
} else if (/:sel_name == _name) {
_root[/:sel_name].glow._visible = false;
Set("/:selected", 0);
} else if (/:sel_name.substr(2, 2) == _name.substr(2, 2)) {
/:zdjecie.start();
Set("/:selected", 0);
var z = parseInt(/:sel_name.substr(4, 1));
var y = parseInt(/:sel_name.substr(5, 2));
var x = parseInt(/:sel_name.substr(7, 7));
/:tab[z][y][x] = -1;
/:tab[z][y + 1][x] = -1;
/:tab[z][y][x + 1] = -1;
/:tab[z][y + 1][x + 1] = -1;
_root[/:sel_name].removeMovieClip();
Set("/:sel_name", "");
glow._visible = true;
var z = parseInt(_name.substr(4, 1));
var y = parseInt(_name.substr(5, 2));
var x = parseInt(_name.substr(7, 7));
/:tab[z][y][x] = -1;
/:tab[z][y + 1][x] = -1;
/:tab[z][y][x + 1] = -1;
/:tab[z][y + 1][x + 1] = -1;
Set("/:ileKlockow", /:ileKlockow - 2);
Set("/:punkty", /:punkty + 10);
/:ileRuchow();
this.removeMovieClip();
} else {
_root[/:sel_name].glow._visible = false;
Set("/:sel_name", _name);
glow._visible = true;
}
} else {
/:zly.start();
if (/:selected == 1) {
Set("/:selected", 0);
_root[/:sel_name].glow._visible = false;
Set("/:sel_name", "");
}
}
}
Instance of Symbol 42 MovieClip "glow" in Symbol 45 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 49 MovieClip "glow" in Symbol 50 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 54 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 56 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 58 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 60 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 62 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 64 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 66 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 68 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 71 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 74 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 76 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 77 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 79 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 81 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 83 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 87 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 94 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 95 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 97 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 98 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 100 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 102 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 106 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 108 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 112 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 115 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 118 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 121 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 125 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 131 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 135 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 138 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 145 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 148 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 42 MovieClip "glow" in Symbol 150 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 152 MovieClip Frame 1
stop();