Frame 1
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
if (getBytesTotal() == getBytesLoaded()) {
gotoAndPlay (4);
}
Frame 2
byteloaded = _root.getBytesLoaded();
bytetotal = _root.getBytesTotal();
loaded = int((byteloaded / bytetotal) * 100);
loadBar.gotoAndStop(loaded);
Frame 3
if (getBytesLoaded() < getBytesTotal()) {
gotoAndPlay (2);
}
Frame 5
_root.attachMovie("inst", "inst", 999999);
inst._x = instr._x;
inst._y = instr._y;
removeMovieClip(instr);
function generate() {
i = 1;
while (4 >= i) {
do {
gen = parseInt(random(8) + 1);
estealeasa = false;
j = 1;
while (j < i) {
if (generatele[j] == gen) {
estealeasa = true;
}
j++;
}
} while (estealeasa == true);
generatele[i] = gen;
i++;
}
}
function showwin(win) {
winlose.gotoAndStop(win);
i = 1;
while (4 >= i) {
duplicateMovieClip (_root[generatele[i]], "new" + i, kkk++);
_root["new" + i]._y = instr._y + 15;
_root["new" + i]._x = (instr._x - 63) + (i * 25);
_root["new" + i].gotoAndStop(2);
i++;
}
}
fscommand ("allowscale", "false");
var places = new Array(0, 0, 0, 0, 0);
var pieceplaces = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8);
var generatele = new Array(0, 0, 0, 0, 0);
nivel = 1;
maxlevel = 10;
kkk = 100;
generate();
stop();
Instance of Symbol 22 MovieClip "1" in Frame 5
onClipEvent (load) {
thisBulin = 1;
}
Instance of Symbol 23 MovieClip "2" in Frame 5
onClipEvent (load) {
thisBulin = 2;
}
Instance of Symbol 24 MovieClip "3" in Frame 5
onClipEvent (load) {
thisBulin = 3;
}
Instance of Symbol 25 MovieClip "4" in Frame 5
onClipEvent (load) {
thisBulin = 4;
}
Instance of Symbol 26 MovieClip "5" in Frame 5
onClipEvent (load) {
thisBulin = 5;
}
Instance of Symbol 27 MovieClip "6" in Frame 5
onClipEvent (load) {
thisBulin = 6;
}
Instance of Symbol 28 MovieClip "7" in Frame 5
onClipEvent (load) {
thisBulin = 7;
}
Instance of Symbol 29 MovieClip "8" in Frame 5
onClipEvent (load) {
thisBulin = 8;
}
Symbol 7 MovieClip [inst] Frame 1
stop();
Symbol 7 MovieClip [inst] Frame 7
stop();
Symbol 8 MovieClip [inst] Frame 1
stop();
Symbol 8 MovieClip [inst] Frame 7
stop();
Symbol 20 Button
on (press) {
this.swapDepths(10000);
this.startDrag();
x = this._x;
y = this._y;
}
on (release, releaseOutside) {
trace((_parent.places + " ") + _parent.pieceplaces);
this.stopDrag();
hit = true;
j = 0;
i = 1;
while (4 >= i) {
if (this.hitTest(_parent["bulin" add i]) && (_parent.places[i] == 0)) {
hit = false;
j = i;
}
i++;
}
hitpiece = true;
jp = 0;
i = 1;
while (8 >= i) {
if (this.hitTest(_parent["locbulin" add i]) && (_parent.pieceplaces[i] == 0)) {
hitpiece = false;
jp = i;
}
i++;
}
trace((hit + "-") + hitpiece);
if (hit and hitpiece) {
this._x = x;
this._y = y;
} else if (!hit) {
if (_parent.places[j] == 0) {
this._x = _parent["bulin" add j]._x;
this._y = _parent["bulin" add j]._y;
i = 1;
while (4 >= i) {
if ((i != j) and (_parent.places[i] == this.thisBulin)) {
_parent.places[i] = 0;
}
i++;
}
i = 1;
while (8 >= i) {
if (_parent.pieceplaces[i] == this.thisBulin) {
_parent.pieceplaces[i] = 0;
}
i++;
}
_parent.places[j] = this.thisBulin;
}
} else if (!hitpiece) {
if (_parent.pieceplaces[jp] == 0) {
this._x = _parent["locbulin" add jp]._x;
this._y = _parent["locbulin" add jp]._y;
i = 1;
while (8 >= i) {
if ((i != jp) and (_parent.pieceplaces[i] == this.thisBulin)) {
_parent.pieceplaces[i] = 0;
}
i++;
}
i = 1;
while (4 >= i) {
if (_parent.places[i] == this.thisBulin) {
_parent.places[i] = 0;
}
i++;
}
_parent.pieceplaces[jp] = this.thisBulin;
}
}
}
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 2
stop();
Symbol 23 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 2
stop();
Symbol 24 MovieClip Frame 1
stop();
Symbol 24 MovieClip Frame 2
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 2
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 2
stop();
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 2
stop();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 2
stop();
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 2
stop();
Symbol 33 MovieClip Frame 1
stop();
Symbol 33 MovieClip Frame 2
stop();
Symbol 33 MovieClip Frame 3
stop();
Symbol 42 MovieClip Frame 48
stop();
Symbol 45 Button
on (press) {
toate = true;
i = 1;
while (4 >= i) {
if (places[i] == 0) {
toate = false;
}
i++;
}
if ((toate == true) and (maxlevel >= nivel)) {
if (nivel != (maxlevel + 1)) {
i = 1;
while (4 >= i) {
duplicateMovieClip (_root[places[i]], ("nuconteaza" + nivel) + i, kkk++);
_root[("nuconteaza" + nivel) + i].gotoAndStop(2);
i++;
}
i = 1;
while (8 >= i) {
_root[i]._y = _root["locbulin" + i]._y;
_root[i]._x = _root["locbulin" + i]._x;
pieceplaces[i] = i;
i++;
}
i = 1;
while (4 >= i) {
duplicateMovieClip (_root["albaneagra" + i], ("nuconteazaan" + nivel) + i, kkk++);
if (nivel != maxlevel) {
_root["albaneagra" + i]._y = _root["albaneagra" + i]._y - 20;
}
if (nivel != maxlevel) {
_root["albaneagra" + i].gotoAndStop(1);
}
i++;
}
k = 1;
i = 1;
while (4 >= i) {
if (generatele[i] == places[i]) {
this[("nuconteazaan" + nivel) + k].gotoAndStop(2);
k++;
}
i++;
}
kk = k;
i = 1;
while (4 >= i) {
j = 1;
while (4 >= j) {
if ((i != j) and (generatele[i] == places[j])) {
this[("nuconteazaan" + nivel) + kk].gotoAndStop(3);
kk++;
}
j++;
}
i++;
}
if (k == 5) {
i = 1;
while (8 >= i) {
_root[i].gotoAndStop(2);
i++;
}
showwin("win");
} else {
i = 1;
while (4 >= i) {
if (nivel != maxlevel) {
_root["bulin" + i]._y = _root["bulin" + i]._y - 20;
}
i++;
}
if (nivel != maxlevel) {
nivel++;
curlevel = nivel;
} else {
i = 1;
while (8 >= i) {
_root[i].gotoAndStop(2);
i++;
}
showwin("lose");
}
}
i = 1;
while (4 >= i) {
places[i] = 0;
i++;
}
}
trace(generatele);
trace(places);
}
}
Symbol 49 Button
on (press) {
inst.gotoAndPlay(2);
}
on (release, releaseOutside) {
inst.gotoAndStop(1);
}
Symbol 51 Button
on (press) {
getURL ("http://www.2inventive.com", "_blank");
}
Symbol 54 Button
on (press) {
gotoAndStop (1);
_root.instr.gotoAndStop(1);
_root.places = new Array(0, 0, 0, 0, 0);
_root.pieceplaces = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8);
_root.generatele = new Array(0, 0, 0, 0, 0);
_root.generate();
i = 1;
while (4 >= i) {
removeMovieClip(_root["new" + i]);
_root["bulin" + i]._y = _root["bulin" + i]._y + (20 * (_root.nivel - 1));
_root["albaneagra" + i]._y = _root["albaneagra" + i]._y + (20 * ((_root.nivel + _currentframe) - 2));
j = 1;
while (_root.nivel >= j) {
removeMovieClip(_root[("nuconteaza" + j) + i]);
removeMovieClip(_root[("nuconteazaan" + j) + i]);
j++;
}
i++;
}
_root.nivel = 1;
i = 1;
while (8 >= i) {
_root[i].gotoAndStop(1);
i++;
}
}
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 2
stop();
Symbol 56 MovieClip Frame 3
stop();