Frame 1
function DemoInit(isSave) {
isSuspend = false;
isPause = false;
isDemo = true;
isHelp = false;
isOptions = false;
isVictory = false;
isRemoving = false;
game._visible = true;
vic._visible = false;
pause._visible = false;
help._visible = false;
options._visible = false;
demo._visible = true;
newgame._visible = false;
gameover._visible = false;
bar._visible = false;
if (isSave) {
oldLayout = layout;
oldBonesNum = bonesNum;
oldTime = bar.timer.value;
oldBones = new Array();
for (var fn in game) {
var f = eval ("game/" + fn);
oldBones.push(f.x, f.y, f.level, f.name, f.type);
}
}
layout = classic;
bones = demoBones;
types = demoTypes;
PlaceBones();
selected = 0;
var now = new Date();
bar.timer.lastTime = now.getTime();
bar.timer.value = 0;
bar.timer.isOn = true;
demoPhase = 0;
demoStep = 0;
stepTime = demoTimes[demoPhase];
}
function DemoDeInit() {
if (oldBonesNum == undefined) {
Initialize();
return(undefined);
}
layout = oldLayout;
bonesNum = oldBonesNum;
for (var fn in game) {
var f = eval ("game/" + fn);
f.removeMovieClip();
}
origX = (-layout[1]) * 20;
origY = (-layout[2]) * 22.5;
tileW = 40;
tileH = 50;
shiftX = 3.5;
shiftY = 3.5;
var sh = ((bonesNum - 1) * 5);
currentLevel = 0;
var name = ((((("tile_" + oldBones[sh + 0]) + "_") + oldBones[sh + 1]) + "_") + oldBones[sh + 2]);
game.attachMovie("eTile", name, currentLevel++);
t0 = eval ("game/" + name);
t0.x = oldBones[sh + 0];
t0.y = oldBones[sh + 1];
t0.level = oldBones[sh + 2];
t0._x = (origX + ((oldBones[sh + 0] / 2) * (tileW + 2))) - (oldBones[sh + 2] * shiftX);
t0._y = (origY + ((oldBones[sh + 1] / 2) * (tileH + 2))) - (oldBones[sh + 2] * shiftY);
t0.ta.attachMovie(oldBones[sh + 3], "pic", 2);
t0.name = oldBones[sh + 3];
t0.type = oldBones[sh + 4];
t0.ta.pic._x = -0.1;
t0.ta.pic._y = 1.9;
var i = (bonesNum - 2);
while (i >= 0) {
var name = ((((("tile_" + oldBones[(i * 5) + 0]) + "_") + oldBones[(i * 5) + 1]) + "_") + oldBones[(i * 5) + 2]);
t0.duplicateMovieClip(name, currentLevel++);
var added = eval ("game/" + name);
added._x = (origX + ((oldBones[(i * 5) + 0] / 2) * (tileW + 2))) - (oldBones[(i * 5) + 2] * shiftX);
added._y = (origY + ((oldBones[(i * 5) + 1] / 2) * (tileH + 2))) - (oldBones[(i * 5) + 2] * shiftY);
added.x = oldBones[(i * 5) + 0];
added.y = oldBones[(i * 5) + 1];
added.level = oldBones[(i * 5) + 2];
added.ta.attachMovie(oldBones[(i * 5) + 3], "pic", 2);
added.name = oldBones[(i * 5) + 3];
added.type = oldBones[(i * 5) + 4];
added.ta.pic._x = -0.1;
added.ta.pic._y = 1.9;
i--;
}
isSuspend = false;
isDemo = false;
isRemoving = false;
isHint = false;
game._visible = true;
vic._visible = false;
pause._visible = false;
help._visible = false;
options._visible = false;
demo._visible = false;
newgame._visible = false;
gameover._visible = false;
bar._visible = true;
selected = 0;
var now = new Date();
bar.timer.lastTime = now.getTime();
bar.timer.value = oldTime;
bar.timer.isOn = true;
}
function DemoFrame() {
if (bar.timer.value < stepTime) {
return(undefined);
}
if (demoPhase == 0) {
demoPhase++;
stepTime = demoTimes[demoPhase] + bar.timer.value;
Highlight(demoSteps[demoStep * 6], demoSteps[(demoStep * 6) + 1], demoSteps[(demoStep * 6) + 2], true);
} else if (demoPhase == 1) {
demoPhase++;
stepTime = demoTimes[demoPhase] + bar.timer.value;
Highlight(demoSteps[demoStep * 6], demoSteps[(demoStep * 6) + 1], demoSteps[(demoStep * 6) + 2], false);
Click(demoSteps[demoStep * 6], demoSteps[(demoStep * 6) + 1], demoSteps[(demoStep * 6) + 2]);
} else if (demoPhase == 2) {
demoPhase++;
stepTime = demoTimes[demoPhase] + bar.timer.value;
Highlight(demoSteps[(demoStep * 6) + 3], demoSteps[(demoStep * 6) + 4], demoSteps[(demoStep * 6) + 5], true);
} else if (demoPhase == 3) {
demoPhase = 0;
stepTime = demoTimes[demoPhase] + bar.timer.value;
Click(demoSteps[(demoStep * 6) + 3], demoSteps[(demoStep * 6) + 4], demoSteps[(demoStep * 6) + 5]);
demoStep++;
}
}
function Highlight(x, y, level, isHl) {
var mov = GetTile(x, y, level);
if (isHl) {
mov.hl._alpha = 30;
} else {
mov.hl._alpha = 0;
}
}
function MoreGames() {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=smaj";
getURL (sd, "blank");
}
function Publish(name, score, layout) {
var stSend = (((((((((Number(layout) + 1) + "\t") + Number(score)) + "\t") + name) + "\t") + "maj") + "\t") + "web");
getURL ("http://absolutist.com/cgi-bin/gameres.pl?e=" + _root.Crypto(stSend), "_top");
}
function Crypto(st) {
var sum1 = 0;
var sum2 = 0;
var i = 0;
while (i < st.length) {
sum1 = sum1 + st.charCodeAt(i);
sum2 = sum2 + (st.charCodeAt(i) ^ 175);
i++;
}
sum1 = sum1 % 256;
sum2 = sum2 % 256;
st = (String.fromCharCode(sum1) + String.fromCharCode(sum2)) + st;
var cryptSt = "";
var b0 = 193;
var i = 0;
while (i < st.length) {
var b = st.charCodeAt(i);
var CryptB = (b ^ b0);
CryptB = CryptB.toString();
var len = CryptB.length;
var j = 0;
while (j < (3 - len)) {
CryptB = "0" + CryptB;
j++;
}
cryptSt = cryptSt + CryptB;
b0 = b;
i++;
}
return(cryptSt);
}
function RandomizeBones() {
types = new Array(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 28, 29, 30, 31, 28, 29, 30, 31, 28, 29, 30, 31, 28, 29, 30, 31, 32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36);
bones = new Array("e1b", "e1b", "e1b", "e1b", "e1d", "e1d", "e1d", "e1d", "e1w", "e1w", "e1w", "e1w", "e2b", "e2b", "e2b", "e2b", "e2d", "e2d", "e2d", "e2d", "e2w", "e2w", "e2w", "e2w", "e3b", "e3b", "e3b", "e3b", "e3d", "e3d", "e3d", "e3d", "e3w", "e3w", "e3w", "e3w", "e4b", "e4b", "e4b", "e4b", "e4d", "e4d", "e4d", "e4d", "e4w", "e4w", "e4w", "e4w", "e5b", "e5b", "e5b", "e5b", "e5d", "e5d", "e5d", "e5d", "e5w", "e5w", "e5w", "e5w", "e6b", "e6b", "e6b", "e6b", "e6d", "e6d", "e6d", "e6d", "e6w", "e6w", "e6w", "e6w", "e7b", "e7b", "e7b", "e7b", "e7d", "e7d", "e7d", "e7d", "e7w", "e7w", "e7w", "e7w", "e8b", "e8b", "e8b", "e8b", "e8d", "e8d", "e8d", "e8d", "e8w", "e8w", "e8w", "e8w", "e9b", "e9b", "e9b", "e9b", "e9d", "e9d", "e9d", "e9d", "e9w", "e9w", "e9w", "e9w", "ewe", "ewn", "ews", "eww", "ewe", "ewn", "ews", "eww", "ewe", "ewn", "ews", "eww", "ewe", "ewn", "ews", "eww", "edg", "edg", "edg", "edg", "edr", "edr", "edr", "edr", "edw", "edw", "edw", "edw", "ef1", "ef2", "ef3", "ef4", "es1", "es2", "es3", "es4");
var i;
var j;
var temp;
i = 0;
while (i < 144) {
j = random(144);
temp = bones[i];
bones[i] = bones[j];
bones[j] = temp;
temp = types[i];
types[i] = types[j];
types[j] = temp;
i++;
}
}
function AddTile(x, y, level) {
if (isFirst) {
isFirst = false;
currentLevel = 0;
currentBone = 0;
var name = ((((("tile_" + x) + "_") + y) + "_") + level);
game.attachMovie("eTile", name, currentLevel++);
t0 = eval ("game/" + name);
t0.x = x;
t0.y = y;
t0.level = level;
t0._x = (origX + ((x / 2) * (tileW + 2))) - (level * shiftX);
t0._y = (origY + ((y / 2) * (tileH + 2))) - (level * shiftY);
t0.ta.attachMovie(bones[currentBone], "pic", 2);
t0.name = bones[currentBone];
t0.type = types[currentBone++];
t0.ta.pic._x = -0.1;
t0.ta.pic._y = 1.9;
} else {
var name = ((((("tile_" + x) + "_") + y) + "_") + level);
t0.duplicateMovieClip(name, currentLevel++);
var added = eval ("game/" + name);
added._x = (origX + ((x / 2) * (tileW + 2))) - (level * shiftX);
added._y = (origY + ((y / 2) * (tileH + 2))) - (level * shiftY);
added.x = x;
added.y = y;
added.level = level;
added.ta.attachMovie(bones[currentBone], "pic", 2);
added.name = bones[currentBone];
added.type = types[currentBone++];
added.ta.pic._x = -0.1;
added.ta.pic._y = 1.9;
}
}
function PlaceBones() {
bonesNum = 144;
origX = (-layout[1]) * 20;
origY = (-layout[2]) * 22.5;
tileW = 40;
tileH = 50;
shiftX = 3.5;
shiftY = 3.5;
isFirst = true;
var index = 4;
var cd = 0;
while (cd < layout[2]) {
var spans = layout[index++];
var span = 0;
while (span < spans) {
var cy = layout[index++];
var cxb = layout[index++];
var len = layout[index++];
var cx = 0;
while (cx < len) {
AddTile((cx * 2) + cxb, cy, cd);
cx++;
}
span++;
}
cd++;
}
}
function GetTile(x, y, level) {
return(eval ((((("game/tile_" + x) + "_") + y) + "_") + level));
}
function IsAvailable(mov) {
var x = mov.x;
var y = mov.y;
var level = mov.level;
if (eval ((((("game/tile_" + x) + "_") + y) + "_") + (level + 1)) != undefined) {
return(false);
}
if (eval ((((("game/tile_" + (x + 1)) + "_") + y) + "_") + (level + 1)) != undefined) {
return(false);
}
if (eval ((((("game/tile_" + (x - 1)) + "_") + y) + "_") + (level + 1)) != undefined) {
return(false);
}
if (eval ((((("game/tile_" + x) + "_") + (y + 1)) + "_") + (level + 1)) != undefined) {
return(false);
}
if (eval ((((("game/tile_" + x) + "_") + (y - 1)) + "_") + (level + 1)) != undefined) {
return(false);
}
if (eval ((((("game/tile_" + (x - 1)) + "_") + (y - 1)) + "_") + (level + 1)) != undefined) {
return(false);
}
if (eval ((((("game/tile_" + (x + 1)) + "_") + (y - 1)) + "_") + (level + 1)) != undefined) {
return(false);
}
if (eval ((((("game/tile_" + (x + 1)) + "_") + (y + 1)) + "_") + (level + 1)) != undefined) {
return(false);
}
if (eval ((((("game/tile_" + (x - 1)) + "_") + (y + 1)) + "_") + (level + 1)) != undefined) {
return(false);
}
if (((eval ((((("game/tile_" + (x + 2)) + "_") + y) + "_") + level) == undefined) && (eval ((((("game/tile_" + (x + 2)) + "_") + (y + 1)) + "_") + level) == undefined)) && (eval ((((("game/tile_" + (x + 2)) + "_") + (y - 1)) + "_") + level) == undefined)) {
return(true);
}
if (((eval ((((("game/tile_" + (x - 2)) + "_") + y) + "_") + level) == undefined) && (eval ((((("game/tile_" + (x - 2)) + "_") + (y + 1)) + "_") + level) == undefined)) && (eval ((((("game/tile_" + (x - 2)) + "_") + (y - 1)) + "_") + level) == undefined)) {
return(true);
}
return(false);
}
function IsPair(first, second) {
return(first.type == second.type);
}
function Click(x, y, level) {
if (isHint) {
isHint = false;
hint1.hl._alpha = 0;
hint2.hl._alpha = 0;
}
var mov = GetTile(x, y, level);
if (IsAvailable(mov)) {
if (!selected) {
selected = mov;
mov.ta.gotoAndPlay(2);
if (isSounds) {
soundSelect.start();
}
} else if (selected == mov) {
selected = 0;
mov.ta.gotoAndPlay(1);
if (isSounds) {
soundWrong.start();
}
} else if (IsPair(selected, mov)) {
if (isRemoving) {
Remove(remove1, remove2, true);
}
Remove(mov, selected, !isAnimation);
selected = 0;
if (isSounds) {
soundRemove.start();
}
} else {
selected.ta.gotoAndPlay(1);
selected = 0;
if (isSounds) {
soundWrong.start();
}
}
} else if (isSounds) {
soundNotAv.start();
}
}
function Suspend(isSus) {
isSuspend = isSus;
if (isSuspend == true) {
bar.timer.isOn = false;
game._visible = false;
bar._visible = false;
} else {
bar.timer.isOn = true;
var now = new Date();
bar.timer.lastTime = now.getTime();
game._visible = true;
bar._visible = true;
}
}
function Remove(first, second, isFinally) {
if (isFinally) {
removeMovieClip(first);
removeMovieClip(second);
bonesNum = bonesNum - 2;
if (bonesNum == 0) {
if (isDemo) {
DemoInit(false);
} else {
Suspend(true);
vic._visible = true;
vic.result = ("Your result is " + bar.timer.timeText) + "!";
}
}
isRemoving = false;
if ((!isDemo) && (!vic._visible)) {
if (!Validate()) {
gameover._visible = true;
}
}
} else {
remove1 = first;
remove2 = second;
isRemoving = true;
}
}
function Validate() {
for (var fn in game) {
var f = eval ("game/" + fn);
if (IsAvailable(f)) {
for (var sn in game) {
var s = eval ("game/" + sn);
if (((s != f) && (IsAvailable(s))) && (IsPair(f, s))) {
hint1 = f;
hint2 = s;
return(true);
}
}
}
}
return(false);
}
function Initialize() {
isSuspend = false;
isDemo = false;
isRemoving = false;
isHint = false;
game._visible = true;
vic._visible = false;
pause._visible = false;
help._visible = false;
options._visible = false;
demo._visible = false;
newgame._visible = false;
gameover._visible = false;
bar._visible = true;
RandomizeBones();
PlaceBones();
selected = 0;
var now = new Date();
bar.timer.lastTime = now.getTime();
bar.timer.value = 0;
bar.timer.isOn = true;
if (!Validate()) {
Initialize();
}
}
demoBones = new Array("e7w", "e7b", "e3b", "edg", "e7w", "e7d", "e1w", "ewe", "edr", "edw", "eww", "e3w", "e1b", "e8d", "e6w", "e7d", "edg", "e4b", "e7w", "e2b", "e3w", "e7b", "e2d", "ews", "e3d", "e1b", "edr", "ewe", "e7b", "e2b", "e8w", "e6b", "e2w", "e9d", "e1d", "e6d", "e5b", "e3d", "ews", "e4d", "e3b", "e9d", "e4w", "e8d", "e4d", "e5w", "ewn", "e9b", "e1b", "e6w", "eww", "e2d", "e6d", "e9b", "e1w", "e8b", "e8w", "e5b", "eww", "e6b", "e4w", "e9d", "e9d", "e1d", "ewn", "e4b", "eww", "e5b", "e5d", "e5w", "e4w", "es1", "e3b", "e9b", "e4b", "e7d", "e5w", "e1b", "e5d", "e1d", "e2d", "ews", "e4d", "e2b", "e2b", "e8w", "e6b", "e4d", "e6w", "ef1", "e5b", "ef2", "e6w", "e1w", "e7d", "ews", "edw", "e3b", "e9w", "es3", "e4b", "edg", "edw", "ewn", "e9b", "e5d", "e5w", "e9w", "e5d", "edr", "e3d", "edr", "e8w", "ewe", "e7w", "es2", "e6d", "edg", "e9w", "e4w", "e2w", "e6b", "e2w", "e8d", "e8b", "ewe", "e1d", "edw", "e1w", "e3d", "e8d", "e2w", "e8b", "e6d", "ef3", "e8b", "e3w", "ef4", "e3w", "es4", "e7b", "e2d", "ewn", "e9w");
demoTypes = new Array(21, 19, 7, 32, 21, 20, 3, 28, 33, 34, 31, 9, 1, 23, 18, 20, 32, 10, 21, 4, 9, 19, 5, 30, 8, 1, 33, 28, 19, 4, 24, 16, 6, 26, 2, 17, 13, 8, 30, 11, 7, 26, 12, 23, 11, 15, 29, 25, 1, 18, 31, 5, 17, 25, 3, 22, 24, 13, 31, 16, 12, 26, 26, 2, 29, 10, 31, 13, 14, 15, 12, 36, 7, 25, 10, 20, 15, 1, 14, 2, 5, 30, 11, 4, 4, 24, 16, 11, 18, 35, 13, 35, 18, 3, 20, 30, 34, 7, 27, 36, 10, 32, 34, 29, 25, 14, 15, 27, 14, 33, 8, 33, 24, 28, 21, 36, 17, 32, 27, 12, 6, 16, 6, 23, 22, 28, 2, 34, 3, 8, 23, 6, 22, 17, 35, 22, 9, 35, 9, 36, 19, 5, 29, 27);
demoSteps = new Array(18, 4, 1, 13, 7, 4, 22, 10, 0, 14, 8, 3, 8, 6, 1, 12, 6, 3, 4, 10, 0, 10, 10, 2, 0, 7, 0, 6, 10, 0, 28, 7, 0, 2, 6, 0, 20, 10, 0, 16, 4, 2, 2, 8, 0, 10, 4, 2, 4, 8, 0, 8, 2, 1, 18, 2, 1, 10, 2, 1, 12, 10, 2, 16, 10, 2, 24, 14, 0, 22, 4, 0, 22, 14, 0, 20, 2, 0, 20, 4, 0, 14, 6, 3, 16, 2, 1, 12, 2, 1, 14, 10, 2, 16, 8, 2, 18, 2, 0, 2, 0, 0, 2, 14, 0, 18, 6, 1, 14, 8, 2, 18, 10, 1, 18, 4, 0, 14, 4, 2, 20, 12, 0, 16, 4, 1, 10, 6, 2, 14, 4, 1, 16, 4, 0, 8, 10, 1, 10, 10, 1, 26, 7, 0, 24, 8, 0, 12, 6, 2, 10, 8, 2, 18, 12, 1, 6, 2, 0, 14, 4, 0, 16, 6, 2, 8, 2, 0, 14, 6, 2, 18, 8, 1, 6, 12, 0, 10, 6, 1, 16, 2, 0, 4, 14, 0, 8, 10, 0, 14, 2, 1, 12, 6, 1, 14, 2, 0, 24, 0, 0, 4, 4, 0, 4, 0, 0, 6, 4, 0, 22, 0, 0, 10, 10, 0, 14, 6, 1, 20, 0, 0, 16, 8, 1, 18, 0, 0, 18, 12, 0, 16, 10, 1, 16, 0, 0, 12, 10, 1, 16, 12, 1, 12, 10, 0, 24, 6, 0, 16, 12, 0, 18, 10, 0, 22, 6, 0, 4, 6, 0, 14, 12, 1, 16, 10, 0, 6, 6, 0, 14, 0, 0, 8, 4, 1, 12, 0, 0, 10, 4, 1, 6, 14, 0, 12, 2, 0, 6, 0, 0, 20, 6, 0, 8, 12, 1, 8, 0, 0, 18, 6, 0, 20, 14, 0, 8, 4, 0, 12, 8, 3, 12, 8, 2, 12, 4, 2, 10, 4, 0, 12, 4, 1, 14, 8, 1, 8, 8, 1, 10, 8, 1, 6, 8, 0, 16, 6, 1, 8, 8, 0, 16, 6, 0, 18, 14, 0, 10, 12, 1, 12, 8, 1, 8, 14, 0, 14, 12, 0, 10, 8, 0, 22, 8, 0, 14, 10, 1, 10, 0, 0, 12, 12, 1, 14, 10, 0, 14, 6, 0, 12, 4, 0, 12, 8, 0, 10, 14, 0, 12, 14, 0, 12, 12, 0, 10, 2, 0, 14, 8, 0, 8, 12, 0, 16, 8, 0, 10, 12, 0, 12, 6, 0, 20, 8, 0, 10, 6, 0, 16, 14, 0, 18, 8, 0, 8, 6, 0, 14, 14, 0);
demoTimes = new Array(1500, 400, 600, 1000);
classic = new Array(0, 15, 8, 5, 10, 0, 2, 12, 2, 6, 8, 4, 4, 10, 7, 0, 1, 6, 2, 12, 8, 2, 12, 10, 4, 10, 12, 6, 8, 14, 2, 12, 7, 26, 2, 6, 2, 8, 6, 4, 8, 6, 6, 8, 6, 8, 8, 6, 10, 8, 6, 12, 8, 6, 4, 4, 10, 4, 6, 10, 4, 8, 10, 4, 10, 10, 4, 2, 6, 12, 2, 8, 12, 2, 1, 7, 13, 1);
ring = new Array(1, 10, 8, 4, 14, 0, 4, 6, 2, 2, 2, 2, 14, 2, 4, 1, 2, 4, 15, 2, 6, 0, 2, 6, 16, 2, 8, 0, 2, 8, 16, 2, 10, 1, 2, 10, 15, 2, 12, 2, 2, 12, 14, 2, 14, 4, 6, 14, 0, 4, 6, 2, 2, 2, 2, 14, 2, 4, 1, 2, 4, 15, 2, 6, 0, 2, 6, 16, 2, 8, 0, 2, 8, 16, 2, 10, 1, 2, 10, 15, 2, 12, 2, 2, 12, 14, 2, 14, 4, 6, 14, 0, 4, 6, 2, 2, 2, 2, 14, 2, 4, 1, 2, 4, 15, 2, 6, 0, 2, 6, 16, 2, 8, 0, 2, 8, 16, 2, 10, 1, 2, 10, 15, 2, 12, 2, 2, 12, 14, 2, 14, 4, 6, 14, 0, 4, 6, 2, 2, 2, 2, 14, 2, 4, 1, 2, 4, 15, 2, 6, 0, 2, 6, 16, 2, 8, 0, 2, 8, 16, 2, 10, 1, 2, 10, 15, 2, 12, 2, 2, 12, 14, 2, 14, 4, 6);
pyramid = new Array(2, 10, 8, 6, 10, 0, 5, 6, 2, 4, 7, 4, 3, 8, 7, 0, 1, 6, 2, 9, 8, 2, 9, 7, 20, 1, 10, 3, 8, 12, 4, 7, 14, 5, 6, 7, 1, 6, 5, 3, 5, 6, 5, 4, 7, 7, 3, 8, 9, 4, 7, 11, 5, 6, 13, 6, 5, 5, 3, 8, 3, 5, 6, 5, 7, 6, 5, 9, 6, 5, 11, 8, 3, 3, 5, 7, 4, 7, 7, 4, 9, 7, 4, 2, 6, 9, 2, 8, 9, 2, 1, 7, 10, 1);
hole = new Array(3, 8, 6, 4, 8, 0, 0, 8, 2, 0, 8, 4, 0, 3, 4, 10, 3, 6, 0, 3, 6, 10, 3, 8, 0, 8, 10, 0, 8, 8, 0, 0, 8, 2, 2, 6, 4, 2, 2, 4, 10, 2, 6, 2, 2, 6, 10, 2, 8, 2, 6, 10, 0, 8, 8, 0, 0, 8, 2, 2, 6, 4, 2, 2, 4, 10, 2, 6, 2, 2, 6, 10, 2, 8, 2, 6, 10, 0, 8, 8, 0, 0, 8, 2, 4, 4, 4, 4, 1, 4, 10, 1, 6, 4, 1, 6, 10, 1, 8, 4, 4, 10, 0, 8);
hexagon = new Array(4, 14, 8, 5, 10, 0, 8, 6, 2, 6, 8, 4, 4, 10, 7, 0, 1, 6, 2, 12, 8, 2, 12, 7, 26, 1, 10, 4, 10, 12, 6, 8, 14, 8, 6, 6, 2, 8, 6, 4, 6, 8, 6, 4, 10, 8, 4, 10, 10, 6, 8, 12, 8, 6, 4, 4, 10, 4, 6, 10, 4, 8, 10, 4, 10, 10, 4, 2, 6, 12, 2, 8, 12, 2, 2, 6, 13, 1, 8, 13, 1);
arena = new Array(5, 13, 7, 5, 19, 0, 0, 5, 0, 16, 5, 2, 0, 4, 2, 10, 3, 2, 18, 4, 4, 0, 3, 4, 12, 1, 4, 20, 3, 6, 0, 2, 6, 10, 3, 6, 22, 2, 8, 0, 3, 8, 12, 1, 8, 20, 3, 10, 0, 4, 10, 10, 3, 10, 18, 4, 12, 0, 5, 12, 16, 5, 17, 0, 0, 4, 0, 18, 4, 2, 0, 3, 2, 12, 1, 2, 20, 3, 4, 0, 2, 4, 22, 2, 6, 0, 1, 6, 12, 1, 6, 24, 1, 8, 0, 2, 8, 22, 2, 10, 0, 3, 10, 12, 1, 10, 20, 3, 12, 0, 4, 12, 18, 4, 12, 0, 0, 3, 0, 20, 3, 2, 0, 2, 2, 22, 2, 4, 0, 1, 4, 24, 1, 8, 0, 1, 8, 24, 1, 10, 0, 2, 10, 22, 2, 12, 0, 3, 12, 20, 3, 8, 0, 0, 2, 0, 22, 2, 2, 0, 1, 2, 24, 1, 10, 0, 1, 10, 24, 1, 12, 0, 2, 12, 22, 2, 4, 0, 0, 1, 0, 24, 1, 12, 0, 1, 12, 24, 1);
hintPenalty = 100;
isAnimation = true;
isSounds = true;
layout = classic;
soundClick = new Sound();
soundClick.attachSound("sClick");
soundSwitch = new Sound();
soundSwitch.attachSound("sSwitch");
soundSelect = new Sound();
soundSelect.attachSound("sSelect");
soundWrong = new Sound();
soundWrong.attachSound("sWrong");
soundRemove = new Sound();
soundRemove.attachSound("sRemove");
soundNotAv = new Sound();
soundNotAv.attachSound("sNotAv");
DemoInit(false);
Frame 2
if (isDemo) {
DemoFrame();
}
if (isRemoving) {
if (remove1._alpha == 0) {
Remove(remove1, remove2, true);
}
if (remove1._alpha >= 20) {
remove1._alpha = remove1._alpha - 20;
remove2._alpha = remove2._alpha - 20;
} else {
remove1._alpha = 0;
remove2._alpha = 0;
}
}
Frame 3
gotoAndPlay (2);
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 11
gotoAndPlay (2);
Symbol 141 Button
on (press) {
if (!_root.isDemo) {
_root.Click(x, y, level);
}
}
Symbol 144 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
DemoDeInit();
};
}
Symbol 161 Button
on (release) {
if (isSounds) {
soundClick.start();
}
if (((!isDemo) && (!newgame._visible)) && (!gameover._visible)) {
Suspend(true);
isPause = true;
pause._visible = true;
}
MoreGames();
}
Symbol 165 MovieClip Frame 1
timeText = Math.floor(value / 1000);
if (isOn) {
var now = new Date();
var cur = now.getTime();
value = value + (cur - lastTime);
lastTime = cur;
}
Symbol 165 MovieClip Frame 2
gotoAndPlay (1);
Symbol 179 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 5
stop();
Symbol 179 MovieClip Frame 8
gotoAndStop (1);
Symbol 179 MovieClip Frame 12
gotoAndStop (1);
Symbol 181 Button
on (rollOver) {
knop1.gotoAndPlay(2);
}
on (rollOut) {
knop1.gotoAndPlay(6);
}
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
newgame._visible = true;
};
}
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 5
stop();
Symbol 188 Button
on (rollOver) {
knop2.gotoAndPlay(2);
}
on (rollOut) {
knop2.gotoAndPlay(6);
}
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
Suspend(true);
isPause = true;
pause._visible = true;
MoreGames();
};
}
Symbol 192 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
Suspend(true);
pause._visible = true;
};
}
Symbol 194 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
Suspend(true);
options._visible = true;
if (isSounds) {
options.checksounds.gotoAndStop(1);
} else {
options.checksounds.gotoAndStop(2);
}
if (isAnimation) {
options.checkalpha.gotoAndStop(1);
} else {
options.checkalpha.gotoAndStop(2);
}
options.radiolayout.gotoAndStop(layout[0] + 1);
oldSounds = isSounds;
oldAnimation = isAnimation;
oldLayout = layout;
};
}
Symbol 196 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
DemoInit(true);
};
}
Symbol 198 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
Suspend(true);
help._visible = true;
};
}
Symbol 200 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
isHint = true;
hint1.hl._alpha = 60;
hint2.hl._alpha = 60;
};
_root.bar.timer.value = _root.bar.timer.value + (_root.hintPenalty * 1000);
}
Symbol 203 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
isPause = false;
pause._visible = false;
Suspend(false);
};
}
Symbol 211 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
Suspend(false);
help._visible = false;
};
}
Symbol 220 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (1);
_root.layout = _root.classic;
}
Symbol 221 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (2);
_root.layout = _root.ring;
}
Symbol 222 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (3);
_root.layout = _root.pyramid;
}
Symbol 223 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (4);
_root.layout = _root.hole;
}
Symbol 224 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (5);
_root.layout = _root.hexagon;
}
Symbol 225 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (6);
_root.layout = _root.arena;
}
Symbol 226 MovieClip Frame 1
stop();
Symbol 230 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (2);
_root.isAnimation = false;
Set("/:check", "\"off\"");
}
Symbol 231 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (1);
_root.isAnimation = true;
Set("/:check", "\"on\"");
}
Symbol 232 MovieClip Frame 1
stop();
Symbol 235 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (2);
_root.isSounds = false;
Set("/:check", "\"off\"");
}
Symbol 236 Button
on (release) {
if (_root.isSounds) {
_root.soundSwitch.start();
}
gotoAndStop (1);
_root.isSounds = true;
Set("/:check", "\"on\"");
}
Symbol 237 MovieClip Frame 1
stop();
Symbol 241 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
if (layout != oldLayout) {
newgame._visible = true;
} else {
Suspend(false);
options._visible = false;
}
};
}
Symbol 242 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
Suspend(false);
options._visible = false;
isSounds = oldSounds;
isAnimation = oldAnimation;
layout = oldLayout;
};
}
Symbol 249 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
Initialize();
};
}
Symbol 250 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
Publish(victoryName, _root.timer.value, _root.layout[0]);
Initialize();
};
}
Symbol 256 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
newgame._visible = false;
Initialize();
};
}
Symbol 257 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
newgame._visible = false;
Suspend(false);
options._visible = false;
};
}
Symbol 262 Button
on (release) {
tellTarget (_root) {
if (isSounds) {
soundClick.start();
}
gameover._visible = false;
Initialize();
};
}