Frame 2
clearInterval(outCome2);
stop();
Frame 3
stop();
Frame 4
stop();
Frame 5
_global.Scores = ["999", "999", "999"];
oneWinner = false;
oneOver = false;
twoWinner = false;
twoOver = false;
threeWinner = false;
threeOver = false;
level = _global.Level;
Revel = _global.myLevel;
moves = 0;
if (_global.Level == 1) {
FullBack.swapDepths(Level3);
FullBack.swapDepths(Level1);
FullBack.swapDepths(Level2);
} else if (_global.Level == 2) {
FullBack.swapDepths(Level3);
FullBack.swapDepths(Level2);
} else if (_global.Level == 3) {
FullBack.swapDepths(Level2);
}
WinLevel1 = function () {
_global.Scores[0] = time;
_global.Scores[1] = 999;
_global.Scores[2] = 999;
clearInterval(outCome2);
gotoAndStop ("endd");
};
WinLevel2 = function () {
_global.Scores[1] = time;
_global.Scores[0] = 999;
_global.Scores[2] = 999;
clearInterval(outCome2);
gotoAndStop ("endd");
};
WinLevel3 = function () {
_global.Scores[2] = time;
_global.Scores[1] = 999;
_global.Scores[0] = 999;
clearInterval(outCome2);
gotoAndStop ("endd");
};
timeUP = function () {
clearInterval(outCome2);
gotoAndPlay ("endd");
};
stop();
timer2 = function () {
if (time == undefined) {
time = 0;
}
time++;
if (time > 500) {
timeUP();
}
};
outCome2 = setInterval(timer2, 1000);
beginTimer = function () {
outCome2 = setInterval(timer2, 1000);
};
Frame 6
XXXX = "--------";
if (_global.Scores[0] == 999) {
L1C = XXXX;
} else {
L1C = _global.Scores[0];
}
if (_global.Scores[1] == 999) {
L2C = XXXX;
} else {
L2C = _global.Scores[1];
}
if (_global.Scores[2] == 999) {
L3C = XXXX;
} else {
L3C = _global.Scores[2];
}
if (oneBest == undefined) {
oneBest = 999;
}
if (twoBest == undefined) {
twoBest = 999;
}
if (threeBest == undefined) {
threeBest = 999;
}
L1B = oneBest;
L2B = twoBest;
L3B = threeBest;
if (L1B > L1C) {
L1B = L1C;
}
if (L2B > L2C) {
L2B = L2C;
}
if (L3B > L3C) {
L3B = L3C;
}
oneBest = L1B;
twoBest = L2B;
threeBest = L3B;
L1B = L1B + " Seconds";
L2B = L2B + " Seconds";
L3B = L3B + " Seconds";
if (L1C != XXXX) {
L1C = L1C + " Seconds";
}
if (L2C != XXXX) {
L2C = L2C + " Seconds";
}
if (L3C != XXXX) {
L3C = L3C + " Seconds";
}
stop();
Symbol 10 Button
on (release) {
getURL ("http://www.peturo.com", "blank");
}
Symbol 20 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded == 100) {
gotoAndStop ("loaded");
}
Symbol 20 MovieClip Frame 2
gotoAndPlay (1);
Symbol 20 MovieClip Frame 3
_root.gotoAndPlay("intr");
Symbol 22 Button
on (release) {
gotoAndPlay ("ins");
}
on (keyPress "<Space>") {
gotoAndPlay ("ins");
}
Symbol 26 Button
on (release) {
getURL ("http://www.peturo.com", "blank");
}
Symbol 28 MovieClip Frame 5
stop();
Symbol 37 Button
on (release) {
count++;
}
Symbol 41 Button
on (release) {
_global.justClicked = numN;
_root.Level1.swapOut();
if (this.blank == false) {
gotoAndPlay ("blank");
_root.moves++;
numN = 0;
}
_global.justClicked = undefined;
}
Symbol 49 MovieClip Frame 1
makeFalse();
one = true;
numN = 1;
stop();
Symbol 49 MovieClip Frame 2
makeFalse();
two = true;
numN = 2;
stop();
Symbol 49 MovieClip Frame 3
makeFalse();
three = true;
numN = 3;
stop();
Symbol 49 MovieClip Frame 4
makeFalse();
four = true;
numN = 4;
stop();
Symbol 49 MovieClip Frame 5
makeFalse();
five = true;
numN = 5;
stop();
Symbol 49 MovieClip Frame 6
makeFalse();
six = true;
numN = 6;
stop();
Symbol 49 MovieClip Frame 7
makeFalse();
seven = true;
numN = 7;
stop();
Symbol 49 MovieClip Frame 8
makeFalse();
eight = true;
numN = 8;
stop();
Symbol 49 MovieClip Frame 9
makeFalse();
blank = true;
stop();
Symbol 50 MovieClip Frame 1
a1.gotoAndPlay("one");
a2.gotoAndPlay("two");
a3.gotoAndPlay("three");
b1.gotoAndPlay("four");
b2.gotoAndPlay("five");
b3.gotoAndPlay("six");
c1.gotoAndPlay("seven");
c2.gotoAndPlay("eight");
Symbol 51 MovieClip Frame 1
a1.gotoAndPlay("seven");
a2.gotoAndPlay("eight");
a3.gotoAndPlay("three");
b1.gotoAndPlay("four");
b2.gotoAndPlay("five");
b3.gotoAndPlay("six");
c1.gotoAndPlay("one");
c2.gotoAndPlay("two");
Symbol 53 Button
on (release) {
gotoAndPlay ("ins2");
}
on (keyPress "<Space>") {
gotoAndPlay ("ins");
}
Symbol 59 Button
on (release) {
_global.Level = 1;
time = 0;
gotoAndPlay ("gne");
_global.myLevel = Level1;
}
on (keyPress "e") {
_global.Level = 1;
time = 0;
gotoAndPlay ("gne");
_global.myLevel = Level1;
}
Symbol 62 Button
on (release) {
_global.Level = 2;
time = 0;
gotoAndPlay ("gne");
_global.myLevel = Level2;
}
on (keyPress "m") {
_global.Level = 2;
time = 0;
gotoAndPlay ("gne");
_global.myLevel = Level2;
}
Symbol 65 Button
on (release) {
_global.Level = 3;
time = 0;
gotoAndPlay ("gne");
_global.myLevel = Level3;
}
on (keyPress "h") {
_global.Level = 3;
time = 0;
gotoAndPlay ("gne");
_global.myLevel = Level3;
}
Symbol 68 Button
on (release) {
_global.Scores = ["999", "999", "999"];
gotoAndPlay ("endd");
}
Symbol 71 Button
on (release) {
gotoAndPlay ("ins");
}
Symbol 73 Button
on (keyPress "<Left>") {
Revel.key = 3;
Revel.keyFunction();
moves++;
}
on (keyPress "<Right>") {
Revel.key = 2;
Revel.keyFunction();
moves++;
}
on (keyPress "<Up>") {
Revel.key = 4;
Revel.keyFunction();
moves++;
}
on (keyPress "<Down>") {
Revel.key = 1;
Revel.keyFunction();
moves++;
}
on (keyPress "r") {
clearInterval(outCome2);
time = 0;
gotoAndPlay ("intr");
}
Symbol 83 Button
on (release) {
clearInterval(outCome2);
time = 0;
gotoAndPlay ("intr");
}
Symbol 96 Button
on (release) {
count++;
}
Symbol 98 Button
on (release) {
_global.justClicked = numN;
_root.Level1.swapOut();
if (this.blank == false) {
gotoAndPlay ("blank");
_root.moves++;
numN = 0;
}
_global.justClicked = undefined;
}
Symbol 106 MovieClip Frame 1
thisArray = [one, two, three, four, five, six, seven, eight, blank];
makeFalse = function () {
one = false;
two = false;
three = false;
four = false;
five = false;
six = false;
seven = false;
eight = false;
blank = false;
};
pos = 42;
row = 42;
numN = 42;
makeFalse();
one = true;
numN = 1;
stop();
Symbol 106 MovieClip Frame 2
makeFalse();
two = true;
numN = 2;
stop();
Symbol 106 MovieClip Frame 3
makeFalse();
three = true;
numN = 3;
stop();
Symbol 106 MovieClip Frame 4
makeFalse();
four = true;
numN = 4;
stop();
Symbol 106 MovieClip Frame 5
makeFalse();
five = true;
numN = 5;
stop();
Symbol 106 MovieClip Frame 6
makeFalse();
six = true;
numN = 6;
stop();
Symbol 106 MovieClip Frame 7
makeFalse();
seven = true;
numN = 7;
stop();
Symbol 106 MovieClip Frame 8
makeFalse();
eight = true;
numN = 8;
stop();
Symbol 106 MovieClip Frame 9
makeFalse();
blank = true;
stop();
Symbol 107 MovieClip Frame 1
one = false;
two = false;
three = false;
four = false;
five = false;
six = false;
seven = false;
eight = false;
aArray = ["blank", "one", "two", "three", "four", "five", "six", "seven", "eight"];
gArray = [];
oddArray = ["7", "8", "0", "4", "5", "6", "1", "2", "3"];
cc = 0;
bigButton = [a1.buttoen, a2.buttoen, a3.buttoen, b1.buttoen, b2.buttoen, b3.buttoen, c1.buttoen, c2.buttoen, c3.buttoen];
gogo = function () {
setUp();
clearInterval(outty);
};
outty = setInterval(gogo, 1);
randGen = function () {
rand = Math.round(Math.random() * 8) - 0;
return(undefined);
};
eski = function () {
randGen();
if ((rand == 0) && (!one)) {
one = true;
Checker = true;
}
if ((rand == 1) && (!two)) {
two = true;
Checker = true;
}
if ((rand == 2) && (!three)) {
three = true;
Checker = true;
}
if ((rand == 3) && (!four)) {
four = true;
Checker = true;
}
if ((rand == 4) && (!five)) {
five = true;
Checker = true;
}
if ((rand == 5) && (!six)) {
six = true;
Checker = true;
}
if ((rand == 6) && (!seven)) {
seven = true;
Checker = true;
}
if ((rand == 7) && (!eight)) {
eight = true;
Checker = true;
}
if ((rand == 8) && (!blank)) {
blank = true;
Checker = true;
}
if (Checker == false) {
eski();
}
Checker = false;
_global.sceney = rand;
return(undefined);
};
setUp = function () {
i = 0;
while (i < 9) {
eski();
if (i == 0) {
A1();
}
if (i == 1) {
A2();
}
if (i == 2) {
A3();
}
if (i == 3) {
B1();
}
if (i == 4) {
B2();
}
if (i == 5) {
B3();
}
if (i == 6) {
C1();
}
if (i == 7) {
C2();
}
if (i == 8) {
C3();
}
i++;
}
disableAll();
return(undefined);
};
swapOut = function () {
cf = 0;
while (cf < 9) {
if (gArray[cf] == _global.justClicked) {
tempp = gArray[cf];
gArray[cf] = "fix";
}
cf++;
}
cs = 0;
while (cs < 9) {
if (gArray[cs] == 0) {
gArray[cs] = _global.justClicked;
}
cs++;
}
cg = 0;
while (cg < 9) {
if (gArray[cg] == "fix") {
gArray[cg] = 0;
}
cg++;
}
chi = 1;
jil = 0;
pop = 0;
while (pop < gArray.length) {
if (gArray[pop] == chi) {
jil++;
}
if (jil == 8) {
youWin();
}
chi++;
pop++;
}
chi = 1;
jil = 0;
pop = 0;
while (pop < gArray.length) {
if (gArray[pop] == oddArray[chi - 1]) {
jil++;
}
if (jil == 8) {
youWin();
}
chi++;
pop++;
}
changeAgain();
disableAll();
};
youWin = function () {
_root.WinLevel1();
};
A1 = function () {
a1.row = 1;
a1.pos = 1;
a1.numN = _global.sceney;
gg = 0;
a1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A2 = function () {
a2.row = 1;
a2.pos = 2;
a2.numN = _global.sceney;
gg = 1;
a2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A3 = function () {
a3.row = 1;
a3.pos = 3;
a3.numN = _global.sceney;
gg = 2;
a3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B1 = function () {
b1.row = 2;
b1.pos = 4;
b1.numN = _global.sceney;
gg = 3;
b1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B2 = function () {
b2.row = 2;
b2.pos = 5;
b2.numN = _global.sceney;
gg = 4;
b2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B3 = function () {
b3.row = 2;
b3.pos = 6;
b3.numN = _global.sceney;
gg = 5;
b3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C1 = function () {
c1.row = 3;
c1.pos = 7;
c1.numN = _global.sceney;
gg = 6;
c1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C2 = function () {
c2.row = 3;
c2.pos = 8;
c2.numN = _global.sceney;
gg = 7;
c2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C3 = function () {
c3.row = 3;
c3.pos = 9;
c3.numN = _global.sceney;
gg = 8;
c3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
addArray = function () {
gArray[gg] = _global.sceney;
return(undefined);
};
wheresBlank = function () {
i = 0;
while (i < gArray.length) {
if (gArray[i] == 0) {
_global.heresBlank = i + 1;
}
i++;
}
wokk = _global.heresBlank % 3;
if (wokk == 1) {
_global.blankRow = 1;
} else if (wokk == 2) {
_global.blankRow = 2;
} else if (wokk == 0) {
_global.blankRow = 3;
}
return(undefined);
};
changeAgain = function () {
if (a1.blank == true) {
a1.gotoAndStop(aArray[_global.justClicked]);
}
if (a2.blank == true) {
a2.gotoAndStop(aArray[_global.justClicked]);
}
if (a3.blank == true) {
a3.gotoAndStop(aArray[_global.justClicked]);
}
if (b1.blank == true) {
b1.gotoAndStop(aArray[_global.justClicked]);
}
if (b2.blank == true) {
b2.gotoAndStop(aArray[_global.justClicked]);
}
if (b3.blank == true) {
b3.gotoAndStop(aArray[_global.justClicked]);
}
if (c1.blank == true) {
c1.gotoAndStop(aArray[_global.justClicked]);
}
if (c2.blank == true) {
c2.gotoAndStop(aArray[_global.justClicked]);
}
if (c3.blank == true) {
c3.gotoAndStop(aArray[_global.justClicked]);
}
return(undefined);
};
disableAll = function () {
a1.buttoen.enabled = false;
a2.buttoen.enabled = false;
a3.buttoen.enabled = false;
b1.buttoen.enabled = false;
b2.buttoen.enabled = false;
b3.buttoen.enabled = false;
c1.buttoen.enabled = false;
c2.buttoen.enabled = false;
c3.buttoen.enabled = false;
enableThem();
return(undefined);
};
enableThem = function () {
wheresBlank();
row = _global.blankRow;
doFun = _global.heresBlank;
bigButton[doFun - 4].enabled = true;
bigButton[doFun + 2].enabled = true;
if (row != 1) {
bigButton[doFun - 2].enabled = true;
}
if (row != 3) {
bigButton[doFun].enabled = true;
}
bigButton[doFun - 1].enabled = false;
return(undefined);
};
direct = function () {
wheresBlank();
ABC();
fArray = [a1, a2, a3, b1, b2, b3, c1, c2, c3];
pArray = ["err", "err", "err", "err"];
gg = 0;
q = 0;
while (q < 10) {
if (bigButton[q].enabled == true) {
if (_global.blankRow == 1) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 2) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 3) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else {
pArray[gg] = fArray[q];
gg++;
}
}
q++;
}
gg = 0;
q = 0;
};
keyFunction = function () {
direct();
wheresBlank();
key = key - 1;
if ((pArray.length > 4) || (pArray.length < 4)) {
trace("error explosion");
return(undefined);
}
if (pArray[key] != "err") {
_global.justClicked = pArray[key].numN;
swapOut();
if (pArray[key].blank == false) {
pArray[key].gotoAndPlay("blank");
pArray[key].numN = 0;
}
_global.justClicked = undefined;
}
};
ABC = function () {
if (_global.heresBlank < 4) {
coll = 1;
}
if ((_global.heresBlank > 3) && (_global.heresBlank < 7)) {
coll = 2;
}
if (_global.heresBlank > 6) {
coll = 3;
}
};
throwError = function () {
errorR();
};
errorR = function () {
throwError();
};
stop();
Symbol 109 Button
on (release) {
count++;
}
Symbol 111 Button
on (release) {
_global.justClicked = numN;
_root.Level2.swapOut();
if (this.blank == false) {
gotoAndPlay ("blank");
numN = 0;
}
_root.moves++;
_global.justClicked = undefined;
}
Symbol 126 MovieClip Frame 1
thisArray = [one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, blank];
makeFalse = function () {
one = false;
two = false;
three = false;
four = false;
five = false;
six = false;
seven = false;
eight = false;
nine = false;
ten = false;
eleven = false;
twelve = false;
thirteen = false;
fourteen = false;
fifteen = false;
blank = false;
};
pos = 42;
row = 42;
numN = 42;
makeFalse();
one = true;
numN = 1;
stop();
Symbol 126 MovieClip Frame 2
makeFalse();
two = true;
numN = 2;
stop();
Symbol 126 MovieClip Frame 3
makeFalse();
three = true;
numN = 3;
stop();
Symbol 126 MovieClip Frame 4
makeFalse();
four = true;
numN = 4;
stop();
Symbol 126 MovieClip Frame 5
makeFalse();
five = true;
numN = 5;
stop();
Symbol 126 MovieClip Frame 6
makeFalse();
six = true;
numN = 6;
stop();
Symbol 126 MovieClip Frame 7
makeFalse();
seven = true;
numN = 7;
stop();
Symbol 126 MovieClip Frame 8
makeFalse();
eight = true;
numN = 8;
stop();
Symbol 126 MovieClip Frame 9
makeFalse();
nine = true;
numN = 9;
stop();
Symbol 126 MovieClip Frame 10
makeFalse();
ten = true;
numN = 10;
stop();
Symbol 126 MovieClip Frame 11
makeFalse();
eleven = true;
numN = 11;
stop();
Symbol 126 MovieClip Frame 12
makeFalse();
twelve = true;
numN = 12;
stop();
Symbol 126 MovieClip Frame 13
makeFalse();
thirteen = true;
numN = 13;
stop();
Symbol 126 MovieClip Frame 14
makeFalse();
fourteen = true;
numN = 14;
stop();
Symbol 126 MovieClip Frame 15
makeFalse();
fifteen = true;
numN = 15;
stop();
Symbol 126 MovieClip Frame 16
makeFalse();
blank = true;
stop();
Symbol 127 MovieClip Frame 1
one = false;
two = false;
three = false;
four = false;
five = false;
six = false;
seven = false;
eight = false;
nine = false;
ten = false;
eleven = false;
twelve = false;
thirteen = false;
fourteen = false;
aArray = ["blank", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen"];
oddArray = ["13", "14", "15", "0", "9", "10", "11", "12", "5", "6", "7", "8", "1", "2", "3", "4"];
gArray = [];
cc = 0;
bigButton = [a1.buttoen, a2.buttoen, a3.buttoen, a4.buttoen, b1.buttoen, b2.buttoen, b3.buttoen, b4.buttoen, c1.buttoen, c2.buttoen, c3.buttoen, c4.buttoen, d1.buttoen, d2.buttoen, d3.buttoen, d4.buttoen];
gogo = function () {
setUp();
clearInterval(outty);
};
outty = setInterval(gogo, 1);
randGen = function () {
rand = Math.round(Math.random() * 15) - 0;
return(undefined);
};
eski = function () {
randGen();
if ((rand == 0) && (!one)) {
one = true;
Checker = true;
}
if ((rand == 1) && (!two)) {
two = true;
Checker = true;
}
if ((rand == 2) && (!three)) {
three = true;
Checker = true;
}
if ((rand == 3) && (!four)) {
four = true;
Checker = true;
}
if ((rand == 4) && (!five)) {
five = true;
Checker = true;
}
if ((rand == 5) && (!six)) {
six = true;
Checker = true;
}
if ((rand == 6) && (!seven)) {
seven = true;
Checker = true;
}
if ((rand == 7) && (!eight)) {
eight = true;
Checker = true;
}
if ((rand == 8) && (!nine)) {
nine = true;
Checker = true;
}
if ((rand == 9) && (!ten)) {
ten = true;
Checker = true;
}
if ((rand == 10) && (!eleven)) {
eleven = true;
Checker = true;
}
if ((rand == 11) && (!twelve)) {
twelve = true;
Checker = true;
}
if ((rand == 12) && (!thirteen)) {
thirteen = true;
Checker = true;
}
if ((rand == 13) && (!fourteen)) {
fourteen = true;
Checker = true;
}
if ((rand == 14) && (!fifteen)) {
fifteen = true;
Checker = true;
}
if ((rand == 15) && (!blank)) {
blank = true;
Checker = true;
}
if (Checker == false) {
eski();
}
Checker = false;
_global.sceney = rand;
return(undefined);
};
setUp = function () {
i = 0;
while (i < 16) {
eski();
if (i == 0) {
A1();
}
if (i == 1) {
A2();
}
if (i == 2) {
A3();
}
if (i == 3) {
A4();
}
if (i == 4) {
B1();
}
if (i == 5) {
B2();
}
if (i == 6) {
B3();
}
if (i == 7) {
B4();
}
if (i == 8) {
C1();
}
if (i == 9) {
C2();
}
if (i == 10) {
C3();
}
if (i == 11) {
C4();
}
if (i == 12) {
D1();
}
if (i == 13) {
D2();
}
if (i == 14) {
D3();
}
if (i == 15) {
D4();
}
i++;
}
disableAll();
return(undefined);
};
swapOut = function () {
cf = 0;
while (cf < 16) {
if (gArray[cf] == _global.justClicked) {
tempp = gArray[cf];
gArray[cf] = "fix";
}
cf++;
}
cs = 0;
while (cs < 16) {
if (gArray[cs] == 0) {
gArray[cs] = _global.justClicked;
}
cs++;
}
cg = 0;
while (cg < 16) {
if (gArray[cg] == "fix") {
gArray[cg] = 0;
}
cg++;
}
chi = 1;
jil = 0;
pop = 0;
while (pop < gArray.length) {
if (gArray[pop] == chi) {
jil++;
}
if (jil == 15) {
youWin();
}
chi++;
pop++;
}
chi = 1;
jil = 0;
pop = 0;
while (pop < gArray.length) {
if (gArray[pop] == oddArray[chi - 1]) {
jil++;
}
if (jil == 15) {
youWin();
}
chi++;
pop++;
}
changeAgain();
disableAll();
};
youWin = function () {
if (_root.twoOver != true) {
_root.twoWinner = true;
} else {
_root.twoWinner = false;
}
_root.WinLevel2();
};
A1 = function () {
a1.row = 1;
a1.pos = 1;
a1.numN = _global.sceney;
gg = 0;
a1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A2 = function () {
a2.row = 1;
a2.pos = 2;
a2.numN = _global.sceney;
gg = 1;
a2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A3 = function () {
a3.row = 1;
a3.pos = 3;
a3.numN = _global.sceney;
gg = 2;
a3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A4 = function () {
a4.row = 1;
a4.pos = 4;
a4.numN = _global.sceney;
gg = 3;
a4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B1 = function () {
b1.row = 2;
b1.pos = 5;
b1.numN = _global.sceney;
gg = 4;
b1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B2 = function () {
b2.row = 2;
b2.pos = 6;
b2.numN = _global.sceney;
gg = 5;
b2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B3 = function () {
b3.row = 2;
b3.pos = 7;
b3.numN = _global.sceney;
gg = 6;
b3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B4 = function () {
b4.row = 2;
b4.pos = 8;
b4.numN = _global.sceney;
gg = 7;
b4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C1 = function () {
c1.row = 3;
c1.pos = 9;
c1.numN = _global.sceney;
gg = 8;
c1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C2 = function () {
c2.row = 3;
c2.pos = 10;
c2.numN = _global.sceney;
gg = 9;
c2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C3 = function () {
c3.row = 3;
c3.pos = 11;
c3.numN = _global.sceney;
gg = 10;
c3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C4 = function () {
c4.row = 3;
c4.pos = 12;
c4.numN = _global.sceney;
gg = 11;
c4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D1 = function () {
d1.row = 4;
d1.pos = 13;
d1.numN = _global.sceney;
gg = 12;
d1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D2 = function () {
d2.row = 4;
d2.pos = 14;
d2.numN = _global.sceney;
gg = 13;
d2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D3 = function () {
d3.row = 4;
d3.pos = 15;
d3.numN = _global.sceney;
gg = 14;
d3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D4 = function () {
d4.row = 4;
d4.pos = 16;
d4.numN = _global.sceney;
gg = 15;
d4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
addArray = function () {
gArray[gg] = _global.sceney;
return(undefined);
};
wheresBlank = function () {
i = 0;
while (i < gArray.length) {
if (gArray[i] == 0) {
_global.heresBlank = i + 1;
}
i++;
}
wokk = _global.heresBlank % 4;
if (wokk == 1) {
_global.blankRow = 1;
} else if (wokk == 2) {
_global.blankRow = 2;
} else if (wokk == 3) {
_global.blankRow = 3;
} else if (wokk == 0) {
_global.blankRow = 4;
}
return(undefined);
};
changeAgain = function () {
if (a1.blank == true) {
a1.gotoAndStop(aArray[_global.justClicked]);
}
if (a2.blank == true) {
a2.gotoAndStop(aArray[_global.justClicked]);
}
if (a3.blank == true) {
a3.gotoAndStop(aArray[_global.justClicked]);
}
if (a4.blank == true) {
a4.gotoAndStop(aArray[_global.justClicked]);
}
if (b1.blank == true) {
b1.gotoAndStop(aArray[_global.justClicked]);
}
if (b2.blank == true) {
b2.gotoAndStop(aArray[_global.justClicked]);
}
if (b3.blank == true) {
b3.gotoAndStop(aArray[_global.justClicked]);
}
if (b4.blank == true) {
b4.gotoAndStop(aArray[_global.justClicked]);
}
if (c1.blank == true) {
c1.gotoAndStop(aArray[_global.justClicked]);
}
if (c2.blank == true) {
c2.gotoAndStop(aArray[_global.justClicked]);
}
if (c3.blank == true) {
c3.gotoAndStop(aArray[_global.justClicked]);
}
if (c4.blank == true) {
c4.gotoAndStop(aArray[_global.justClicked]);
}
if (d1.blank == true) {
d1.gotoAndStop(aArray[_global.justClicked]);
}
if (d2.blank == true) {
d2.gotoAndStop(aArray[_global.justClicked]);
}
if (d3.blank == true) {
d3.gotoAndStop(aArray[_global.justClicked]);
}
if (d4.blank == true) {
d4.gotoAndStop(aArray[_global.justClicked]);
}
return(undefined);
};
disableAll = function () {
a1.buttoen.enabled = false;
a2.buttoen.enabled = false;
a3.buttoen.enabled = false;
a4.buttoen.enabled = false;
b1.buttoen.enabled = false;
b2.buttoen.enabled = false;
b3.buttoen.enabled = false;
b4.buttoen.enabled = false;
c1.buttoen.enabled = false;
c2.buttoen.enabled = false;
c3.buttoen.enabled = false;
c4.buttoen.enabled = false;
d1.buttoen.enabled = false;
d2.buttoen.enabled = false;
d3.buttoen.enabled = false;
d4.buttoen.enabled = false;
enableThem();
return(undefined);
};
enableThem = function () {
wheresBlank();
row = _global.blankRow;
doFun = _global.heresBlank;
bigButton[doFun - 5].enabled = true;
bigButton[doFun + 3].enabled = true;
if (row != 1) {
bigButton[doFun - 2].enabled = true;
}
if (row != 4) {
bigButton[doFun].enabled = true;
}
bigButton[doFun - 1].enabled = false;
return(undefined);
};
direct = function () {
wheresBlank();
ABC();
fArray = [a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d1, d2, d3, d4];
pArray = ["err", "err", "err", "err"];
gg = 0;
q = 0;
while (q < 70) {
if (bigButton[q].enabled == true) {
if (_global.blankRow == 1) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 2) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 3) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 4) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
}
}
q++;
}
gg = 0;
q = 0;
};
keyFunction = function () {
wheresBlank();
direct();
key = key - 1;
if ((pArray.length > 4) || (pArray.length < 4)) {
return(undefined);
}
if (pArray[key] != "err") {
_global.justClicked = pArray[key].numN;
swapOut();
if (pArray[key].blank == false) {
pArray[key].gotoAndPlay("blank");
pArray[key].numN = 0;
}
_global.justClicked = undefined;
direct();
}
};
ABC = function () {
if (_global.heresBlank < 5) {
coll = 1;
}
if ((_global.heresBlank > 4) && (_global.heresBlank < 9)) {
coll = 2;
}
if ((_global.heresBlank > 8) && (_global.heresBlank < 13)) {
coll = 3;
}
if (_global.heresBlank > 12) {
coll = 4;
}
};
throwError = function () {
errorR();
};
errorR = function () {
throwError();
};
stop();
Symbol 129 Button
on (release) {
count++;
}
Symbol 131 Button
on (release) {
_global.justClicked = numN;
_root.Level3.swapOut();
if (this.blank == false) {
gotoAndPlay ("blank");
numN = 0;
}
_root.moves++;
_global.justClicked = undefined;
}
Symbol 155 MovieClip Frame 1
thisArray = [one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty, twentyone, twentytwo, twentythree, twentyfour, blank];
makeFalse = function () {
one = false;
two = false;
three = false;
four = false;
five = false;
six = false;
seven = false;
eight = false;
nine = false;
ten = false;
eleven = false;
twelve = false;
thirteen = false;
fourteen = false;
fifteen = false;
sixteen = false;
seventeen = false;
eighteen = false;
nineteen = false;
twenty = false;
twentyone = false;
twentytwo = false;
twentythree = false;
twentyfour = false;
blank = false;
};
pos = 42;
row = 42;
numN = 42;
makeFalse();
one = true;
numN = 1;
stop();
Symbol 155 MovieClip Frame 2
makeFalse();
two = true;
numN = 2;
stop();
Symbol 155 MovieClip Frame 3
makeFalse();
three = true;
numN = 3;
stop();
Symbol 155 MovieClip Frame 4
makeFalse();
four = true;
numN = 4;
stop();
Symbol 155 MovieClip Frame 5
makeFalse();
five = true;
numN = 5;
stop();
Symbol 155 MovieClip Frame 6
makeFalse();
six = true;
numN = 6;
stop();
Symbol 155 MovieClip Frame 7
makeFalse();
seven = true;
numN = 7;
stop();
Symbol 155 MovieClip Frame 8
makeFalse();
eight = true;
numN = 8;
stop();
Symbol 155 MovieClip Frame 9
makeFalse();
nine = true;
numN = 9;
stop();
Symbol 155 MovieClip Frame 10
makeFalse();
ten = true;
numN = 10;
stop();
Symbol 155 MovieClip Frame 11
makeFalse();
eleven = true;
numN = 11;
stop();
Symbol 155 MovieClip Frame 12
makeFalse();
twelve = true;
numN = 12;
stop();
Symbol 155 MovieClip Frame 13
makeFalse();
thirteen = true;
numN = 13;
stop();
Symbol 155 MovieClip Frame 14
makeFalse();
fourteen = true;
numN = 14;
stop();
Symbol 155 MovieClip Frame 15
makeFalse();
fifteen = true;
numN = 15;
stop();
Symbol 155 MovieClip Frame 16
makeFalse();
sixteen = true;
numN = 16;
stop();
Symbol 155 MovieClip Frame 17
makeFalse();
seventeen = true;
numN = 17;
stop();
Symbol 155 MovieClip Frame 18
makeFalse();
eighteen = true;
numN = 18;
stop();
Symbol 155 MovieClip Frame 19
makeFalse();
nineteen = true;
numN = 19;
stop();
Symbol 155 MovieClip Frame 20
makeFalse();
twenty = true;
numN = 20;
stop();
Symbol 155 MovieClip Frame 21
makeFalse();
twentyone = true;
numN = 21;
stop();
Symbol 155 MovieClip Frame 22
makeFalse();
twentytwo = true;
numN = 22;
stop();
Symbol 155 MovieClip Frame 23
makeFalse();
twentythree = true;
numN = 23;
stop();
Symbol 155 MovieClip Frame 24
makeFalse();
twentyfour = true;
numN = 24;
stop();
Symbol 155 MovieClip Frame 25
makeFalse();
blank = true;
stop();
Symbol 156 MovieClip Frame 1
one = false;
two = false;
three = false;
four = false;
five = false;
six = false;
seven = false;
eight = false;
nine = false;
ten = false;
eleven = false;
twelve = false;
thirteen = false;
fourteen = false;
fifteen = false;
sixteen = false;
seventeen = false;
eighteen = false;
nineteen = false;
twenty = false;
twentyone = false;
twentytwo = false;
twentythree = false;
twentyfour = false;
aArray = ["blank", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty", "twentyone", "twentytwo", "twentythree", "twentyfour"];
oddArray = ["21", "22", "23", "24", "0", "16", "17", "18", "19", "20", "11", "12", "13", "14", "15", "6", "7", "8", "9", "10", "1", "2", "3", "4", "5"];
gArray = [];
cc = 0;
bigButton = [a1.buttoen, a2.buttoen, a3.buttoen, a4.buttoen, a5.buttoen, b1.buttoen, b2.buttoen, b3.buttoen, b4.buttoen, b5.buttoen, c1.buttoen, c2.buttoen, c3.buttoen, c4.buttoen, c5.buttoen, d1.buttoen, d2.buttoen, d3.buttoen, d4.buttoen, d5.buttoen, e1.buttoen, e2.buttoen, e3.buttoen, e4.buttoen, e5.buttoen];
gogo = function () {
setUp();
clearInterval(outty);
};
outty = setInterval(gogo, 1);
randGen = function () {
rand = Math.round(Math.random() * 24) - 0;
return(undefined);
};
eski = function () {
randGen();
if ((rand == 0) && (!one)) {
one = true;
Checker = true;
}
if ((rand == 1) && (!two)) {
two = true;
Checker = true;
}
if ((rand == 2) && (!three)) {
three = true;
Checker = true;
}
if ((rand == 3) && (!four)) {
four = true;
Checker = true;
}
if ((rand == 4) && (!five)) {
five = true;
Checker = true;
}
if ((rand == 5) && (!six)) {
six = true;
Checker = true;
}
if ((rand == 6) && (!seven)) {
seven = true;
Checker = true;
}
if ((rand == 7) && (!eight)) {
eight = true;
Checker = true;
}
if ((rand == 8) && (!nine)) {
nine = true;
Checker = true;
}
if ((rand == 9) && (!ten)) {
ten = true;
Checker = true;
}
if ((rand == 10) && (!eleven)) {
eleven = true;
Checker = true;
}
if ((rand == 11) && (!twelve)) {
twelve = true;
Checker = true;
}
if ((rand == 12) && (!thirteen)) {
thirteen = true;
Checker = true;
}
if ((rand == 13) && (!fourteen)) {
fourteen = true;
Checker = true;
}
if ((rand == 14) && (!fifteen)) {
fifteen = true;
Checker = true;
}
if ((rand == 15) && (!sixteen)) {
sixteen = true;
Checker = true;
}
if ((rand == 16) && (!seventeen)) {
seventeen = true;
Checker = true;
}
if ((rand == 17) && (!eighteen)) {
eighteen = true;
Checker = true;
}
if ((rand == 18) && (!nineteen)) {
nineteen = true;
Checker = true;
}
if ((rand == 19) && (!twenty)) {
twenty = true;
Checker = true;
}
if ((rand == 20) && (!twentyone)) {
twentyone = true;
Checker = true;
}
if ((rand == 21) && (!twentytwo)) {
twentytwo = true;
Checker = true;
}
if ((rand == 22) && (!twentythree)) {
twentythree = true;
Checker = true;
}
if ((rand == 23) && (!twentyfour)) {
twentyfour = true;
Checker = true;
}
if ((rand == 24) && (!blank)) {
blank = true;
Checker = true;
}
if (Checker == false) {
eski();
}
Checker = false;
_global.sceney = rand;
return(undefined);
};
setUp = function () {
i = 0;
while (i < 25) {
eski();
if (i == 0) {
A1();
}
if (i == 1) {
A2();
}
if (i == 2) {
A3();
}
if (i == 3) {
A4();
}
if (i == 4) {
A5();
}
if (i == 5) {
B1();
}
if (i == 6) {
B2();
}
if (i == 7) {
B3();
}
if (i == 8) {
B4();
}
if (i == 9) {
B5();
}
if (i == 10) {
C1();
}
if (i == 11) {
C2();
}
if (i == 12) {
C3();
}
if (i == 13) {
C4();
}
if (i == 14) {
C5();
}
if (i == 15) {
D1();
}
if (i == 16) {
D2();
}
if (i == 17) {
D3();
}
if (i == 18) {
D4();
}
if (i == 19) {
D5();
}
if (i == 20) {
E1();
}
if (i == 21) {
E2();
}
if (i == 22) {
E3();
}
if (i == 23) {
E4();
}
if (i == 24) {
E5();
}
i++;
}
disableAll();
return(undefined);
};
swapOut = function () {
cf = 0;
while (cf < 25) {
if (gArray[cf] == _global.justClicked) {
tempp = gArray[cf];
gArray[cf] = "fix";
}
cf++;
}
cs = 0;
while (cs < 25) {
if (gArray[cs] == 0) {
gArray[cs] = _global.justClicked;
}
cs++;
}
cg = 0;
while (cg < 25) {
if (gArray[cg] == "fix") {
gArray[cg] = 0;
}
cg++;
}
chi = 1;
jil = 0;
pop = 0;
while (pop < gArray.length) {
if (gArray[pop] == chi) {
jil++;
}
if (jil == 24) {
youWin();
}
chi++;
pop++;
}
chi = 1;
jil = 0;
pop = 0;
while (pop < gArray.length) {
if (gArray[pop] == oddArray[chi - 1]) {
jil++;
}
if (jil == 24) {
youWin();
}
chi++;
pop++;
}
changeAgain();
disableAll();
};
youWin = function () {
if (_root.threeOver != true) {
_root.threeWinner = true;
} else {
_root.threeWinner = false;
}
_root.WinLevel3();
};
A1 = function () {
a1.row = 1;
a1.pos = 1;
a1.numN = _global.sceney;
gg = 0;
a1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A2 = function () {
a2.row = 1;
a2.pos = 2;
a2.numN = _global.sceney;
gg = 1;
a2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A3 = function () {
a3.row = 1;
a3.pos = 3;
a3.numN = _global.sceney;
gg = 2;
a3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A4 = function () {
a4.row = 1;
a4.pos = 4;
a4.numN = _global.sceney;
gg = 3;
a4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
A5 = function () {
a5.row = 1;
a5.pos = 5;
a5.numN = _global.sceney;
gg = 4;
a5.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B1 = function () {
b1.row = 2;
b1.pos = 6;
b1.numN = _global.sceney;
gg = 5;
b1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B2 = function () {
b2.row = 2;
b2.pos = 7;
b2.numN = _global.sceney;
gg = 6;
b2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B3 = function () {
b3.row = 2;
b3.pos = 8;
b3.numN = _global.sceney;
gg = 7;
b3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B4 = function () {
b4.row = 2;
b4.pos = 9;
b4.numN = _global.sceney;
gg = 8;
b4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
B5 = function () {
b5.row = 2;
b5.pos = 10;
b5.numN = _global.sceney;
gg = 9;
b5.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C1 = function () {
c1.row = 3;
c1.pos = 11;
c1.numN = _global.sceney;
gg = 10;
c1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C2 = function () {
c2.row = 3;
c2.pos = 12;
c2.numN = _global.sceney;
gg = 11;
c2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C3 = function () {
c3.row = 3;
c3.pos = 13;
c3.numN = _global.sceney;
gg = 12;
c3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C4 = function () {
c4.row = 3;
c4.pos = 14;
c4.numN = _global.sceney;
gg = 13;
c4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
C5 = function () {
c5.row = 3;
c5.pos = 15;
c5.numN = _global.sceney;
gg = 14;
c5.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D1 = function () {
d1.row = 4;
d1.pos = 16;
d1.numN = _global.sceney;
gg = 15;
d1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D2 = function () {
d2.row = 4;
d2.pos = 17;
d2.numN = _global.sceney;
gg = 16;
d2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D3 = function () {
d3.row = 4;
d3.pos = 18;
d3.numN = _global.sceney;
gg = 17;
d3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D4 = function () {
d4.row = 4;
d4.pos = 19;
d4.numN = _global.sceney;
gg = 18;
d4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
D5 = function () {
d5.row = 4;
d5.pos = 20;
d5.numN = _global.sceney;
gg = 19;
d5.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
E1 = function () {
e1.row = 5;
e1.pos = 21;
e1.numN = _global.sceney;
gg = 20;
e1.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
E2 = function () {
e2.row = 5;
e2.pos = 22;
e2.numN = _global.sceney;
gg = 21;
e2.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
E3 = function () {
e3.row = 5;
e3.pos = 23;
e3.numN = _global.sceney;
gg = 22;
e3.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
E4 = function () {
e4.row = 5;
e4.pos = 24;
e4.numN = _global.sceney;
gg = 23;
e4.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
E5 = function () {
e5.row = 5;
e5.pos = 25;
e5.numN = _global.sceney;
gg = 24;
e5.gotoAndStop(aArray[_global.sceney]);
addArray();
return(undefined);
};
addArray = function () {
gArray[gg] = _global.sceney;
return(undefined);
};
wheresBlank = function () {
i = 0;
while (i < gArray.length) {
if (gArray[i] == 0) {
_global.heresBlank = i + 1;
}
i++;
}
wokk = _global.heresBlank % 5;
if (wokk == 1) {
_global.blankRow = 1;
} else if (wokk == 2) {
_global.blankRow = 2;
} else if (wokk == 3) {
_global.blankRow = 3;
} else if (wokk == 4) {
_global.blankRow = 4;
} else if (wokk == 0) {
_global.blankRow = 5;
}
return(undefined);
};
changeAgain = function () {
if (a1.blank == true) {
a1.gotoAndStop(aArray[_global.justClicked]);
}
if (a2.blank == true) {
a2.gotoAndStop(aArray[_global.justClicked]);
}
if (a3.blank == true) {
a3.gotoAndStop(aArray[_global.justClicked]);
}
if (a4.blank == true) {
a4.gotoAndStop(aArray[_global.justClicked]);
}
if (a5.blank == true) {
a5.gotoAndStop(aArray[_global.justClicked]);
}
if (b1.blank == true) {
b1.gotoAndStop(aArray[_global.justClicked]);
}
if (b2.blank == true) {
b2.gotoAndStop(aArray[_global.justClicked]);
}
if (b3.blank == true) {
b3.gotoAndStop(aArray[_global.justClicked]);
}
if (b4.blank == true) {
b4.gotoAndStop(aArray[_global.justClicked]);
}
if (b5.blank == true) {
b5.gotoAndStop(aArray[_global.justClicked]);
}
if (c1.blank == true) {
c1.gotoAndStop(aArray[_global.justClicked]);
}
if (c2.blank == true) {
c2.gotoAndStop(aArray[_global.justClicked]);
}
if (c3.blank == true) {
c3.gotoAndStop(aArray[_global.justClicked]);
}
if (c4.blank == true) {
c4.gotoAndStop(aArray[_global.justClicked]);
}
if (c5.blank == true) {
c5.gotoAndStop(aArray[_global.justClicked]);
}
if (d1.blank == true) {
d1.gotoAndStop(aArray[_global.justClicked]);
}
if (d2.blank == true) {
d2.gotoAndStop(aArray[_global.justClicked]);
}
if (d3.blank == true) {
d3.gotoAndStop(aArray[_global.justClicked]);
}
if (d4.blank == true) {
d4.gotoAndStop(aArray[_global.justClicked]);
}
if (d5.blank == true) {
d5.gotoAndStop(aArray[_global.justClicked]);
}
if (e1.blank == true) {
e1.gotoAndStop(aArray[_global.justClicked]);
}
if (e2.blank == true) {
e2.gotoAndStop(aArray[_global.justClicked]);
}
if (e3.blank == true) {
e3.gotoAndStop(aArray[_global.justClicked]);
}
if (e4.blank == true) {
e4.gotoAndStop(aArray[_global.justClicked]);
}
if (e5.blank == true) {
e5.gotoAndStop(aArray[_global.justClicked]);
}
return(undefined);
};
disableAll = function () {
a1.buttoen.enabled = false;
a2.buttoen.enabled = false;
a3.buttoen.enabled = false;
a4.buttoen.enabled = false;
a5.buttoen.enabled = false;
b1.buttoen.enabled = false;
b2.buttoen.enabled = false;
b3.buttoen.enabled = false;
b4.buttoen.enabled = false;
b5.buttoen.enabled = false;
c1.buttoen.enabled = false;
c2.buttoen.enabled = false;
c3.buttoen.enabled = false;
c4.buttoen.enabled = false;
c5.buttoen.enabled = false;
d1.buttoen.enabled = false;
d2.buttoen.enabled = false;
d3.buttoen.enabled = false;
d4.buttoen.enabled = false;
d5.buttoen.enabled = false;
e1.buttoen.enabled = false;
e2.buttoen.enabled = false;
e3.buttoen.enabled = false;
e4.buttoen.enabled = false;
e5.buttoen.enabled = false;
enableThem();
return(undefined);
};
enableThem = function () {
wheresBlank();
row = _global.blankRow;
doFun = _global.heresBlank;
bigButton[doFun - 6].enabled = true;
bigButton[doFun + 4].enabled = true;
if (row != 1) {
bigButton[doFun - 2].enabled = true;
}
if (row != 5) {
bigButton[doFun].enabled = true;
}
bigButton[doFun - 1].enabled = false;
return(undefined);
};
direct = function () {
wheresBlank();
ABC();
fArray = [a1, a2, a3, a4, a5, b1, b2, b3, b4, b5, c1, c2, c3, c4, c5, d1, d2, d3, d4, d5, e1, e2, e3, e4, e5];
pArray = ["err", "err", "err", "err"];
gg = 0;
q = 0;
while (q < 100) {
if (bigButton[q].enabled == true) {
if (_global.blankRow == 1) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 5) {
if (gg == 1) {
pArray[1] = "err";
gg++;
}
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 2) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 5) {
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 3) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 5) {
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 4) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
pArray[gg] = fArray[q];
gg++;
} else if (coll == 5) {
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
} else if (_global.blankRow == 5) {
if (coll == 1) {
if (gg == 0) {
pArray[0] = "err";
gg++;
}
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 2) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 3) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 4) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
} else if (coll == 5) {
if (gg == 2) {
pArray[2] = "err";
gg++;
}
if (gg == 3) {
pArray[3] = "err";
gg++;
}
pArray[gg] = fArray[q];
gg++;
}
}
}
q++;
}
gg = 0;
q = 0;
};
keyFunction = function () {
wheresBlank();
direct();
key = key - 1;
if ((pArray.length > 4) || (pArray.length < 4)) {
return(undefined);
}
if (pArray[key] != "err") {
_global.justClicked = pArray[key].numN;
swapOut();
if (pArray[key].blank == false) {
pArray[key].gotoAndPlay("blank");
pArray[key].numN = 0;
}
_global.justClicked = undefined;
direct();
}
};
ABC = function () {
if (_global.heresBlank < 6) {
coll = 1;
}
if ((_global.heresBlank > 5) && (_global.heresBlank < 11)) {
coll = 2;
}
if ((_global.heresBlank > 10) && (_global.heresBlank < 16)) {
coll = 3;
}
if ((_global.heresBlank > 15) && (_global.heresBlank < 21)) {
coll = 4;
}
if (_global.heresBlank > 20) {
coll = 5;
}
};
throwError = function () {
errorR();
};
errorR = function () {
throwError();
};
stop();
Symbol 171 Button
on (release) {
gotoAndPlay ("intr");
}