Frame 1
stop();
Frame 3
i = "1";
while ("16" >= i) {
Set(("n" add i) add "set", "0");
i = i + "1";
}
i = "1";
while ("16" >= i) {
Set("/:$X", "16" * (random("2147483647") / "2147483647"));
randnum = "1" + ((/:$X < int(/:$X)) ? (int(/:$X - "1")) : (int(/:$X)));
while (eval (("n" add randnum) add "set") == "1") {
Set("/:$X", "16" * (random("2147483647") / "2147483647"));
randnum = "1" + ((/:$X < int(/:$X)) ? (int(/:$X - "1")) : (int(/:$X)));
}
Set(("n" add randnum) add "loc", i);
Set(("n" add randnum) add "set", "1");
i = i + "1";
}
Frame 63
starttime = getTimer();
Frame 66
i = "1";
while ("16" >= i) {
loc_h = eval (("n" add i) add "loc") - (int(eval (("n" add i) add "loc") / "4") * "4");
if (loc_h == "0") {
loc_h = "4";
}
Set("/:$X", (eval (("n" add i) add "loc") - "1") / "4");
loc_v = "1" + ((/:$X < int(/:$X)) ? (int(/:$X - "1")) : (int(/:$X)));
tellTarget (i) {
_x = (/:loc_h * "80");
_y = ((/:loc_v * "60") + "30");
};
i = i + "1";
}
stop();
Frame 73
Set("/:$X", location / "10");
loc_h = ((/:$X < int(/:$X)) ? (int(/:$X - "1")) : (int(/:$X)));
loc_v = location - (int(location / "10") * "10");
mvdown_loc = loc_h + ((loc_v - "1") * "4");
mvleft_loc = (loc_h + "1") + ((loc_v - "1") * "4");
mvup_loc = (loc_h + "1") + (loc_v * "4");
mvright_loc = loc_h + (loc_v * "4");
i = "1";
while ("16" >= i) {
if (eval (("n" add i) add "loc") == mvdown_loc) {
mvdown = i;
break;
}
i = i + "1";
}
i = "1";
while ("16" >= i) {
if (eval (("n" add i) add "loc") == mvleft_loc) {
mvleft = i;
break;
}
i = i + "1";
}
i = "1";
while ("16" >= i) {
if (eval (("n" add i) add "loc") == mvup_loc) {
mvup = i;
break;
}
i = i + "1";
}
i = "1";
while ("16" >= i) {
if (eval (("n" add i) add "loc") == mvright_loc) {
mvright = i;
break;
}
i = i + "1";
}
Set(("n" add mvdown) add "loc", mvright_loc);
Set(("n" add mvleft) add "loc", mvdown_loc);
Set(("n" add mvup) add "loc", mvleft_loc);
Set(("n" add mvright) add "loc", mvup_loc);
move = "0";
gotoAndPlay (90);
Frame 82
Set("/:$X", location / "10");
loc_h = ((/:$X < int(/:$X)) ? (int(/:$X - "1")) : (int(/:$X)));
loc_v = location - (int(location / "10") * "10");
mvdown_loc = (loc_h + "1") + ((loc_v - "1") * "4");
mvleft_loc = (loc_h + "1") + (loc_v * "4");
mvup_loc = loc_h + (loc_v * "4");
mvright_loc = loc_h + ((loc_v - "1") * "4");
i = "1";
while ("16" >= i) {
if (eval (("n" add i) add "loc") == mvdown_loc) {
mvdown = i;
break;
}
i = i + "1";
}
i = "1";
while ("16" >= i) {
if (eval (("n" add i) add "loc") == mvleft_loc) {
mvleft = i;
break;
}
i = i + "1";
}
i = "1";
while ("16" >= i) {
if (eval (("n" add i) add "loc") == mvup_loc) {
mvup = i;
break;
}
i = i + "1";
}
i = "1";
while ("16" >= i) {
if (eval (("n" add i) add "loc") == mvright_loc) {
mvright = i;
break;
}
i = i + "1";
}
Set(("n" add mvdown) add "loc", mvleft_loc);
Set(("n" add mvleft) add "loc", mvup_loc);
Set(("n" add mvup) add "loc", mvright_loc);
Set(("n" add mvright) add "loc", mvdown_loc);
move = "0";
gotoAndPlay (90);
Frame 90
rotate_st = getTimer();
setProperty(mvdown, _y , getProperty(mvdown, _y) + "12");
setProperty(mvleft, _x , getProperty(mvleft, _x) - "16");
setProperty(mvup, _y , getProperty(mvup, _y) - "12");
setProperty(mvright, _x , getProperty(mvright, _x) + "16");
move = move + "1";
if (move == "5") {
if (((((((((((((((n1loc == "1") and (n2loc == "2")) and (n3loc == "3")) and (n4loc == "4")) and (n5loc == "5")) and (n6loc == "6")) and (n7loc == "7")) and (n8loc == "8")) and (n9loc == "9")) and (n10loc == "10")) and (n11loc == "11")) and (n12loc == "12")) and (n13loc == "13")) and (n14loc == "14")) and (n15loc == "15")) {
gotoAndPlay (100);
} else {
gotoAndStop (66);
}
}
Frame 91
gotoAndPlay (92);
Frame 92
rotate_ct = getTimer();
if ("50" < (rotate_ct - rotate_st)) {
gotoAndPlay (90);
} else {
gotoAndPlay (91);
}
Frame 100
endtime = getTimer();
score = (endtime - starttime) / "1000";
if (((score * "10") - (int((score * "10") / "10") * "10")) == "0") {
score = score add ".000";
} else if (((score * "100") - (int((score * "100") / "10") * "10")) == "0") {
score = score add "00";
} else if (((score * "1000") - (int((score * "1000") / "10") * "10")) == "0") {
score = score add "0";
}
Frame 256
stop();
Frame 257
stop();
Symbol 38 Button
on (release) {
gotoAndStop (257);
}
Symbol 41 Button
on (release) {
gotoAndPlay (3);
}
Symbol 60 Button
on (keyPress "2") {
tellTarget ("Square") {
gotoAndPlay ("MoveDown");
};
tellTarget ("Sound") {
gotoAndPlay (2);
};
}
on (keyPress "<Down>") {
tellTarget ("Square") {
gotoAndPlay ("MoveDown");
};
tellTarget ("Sound") {
gotoAndPlay (2);
};
}
on (keyPress "4") {
tellTarget ("Square") {
gotoAndPlay ("MoveLeft");
};
tellTarget ("Sound") {
gotoAndPlay (2);
};
}
on (keyPress "<Left>") {
tellTarget ("Square") {
gotoAndPlay ("MoveLeft");
};
tellTarget ("Sound") {
gotoAndPlay (2);
};
}
on (keyPress "6") {
tellTarget ("Square") {
gotoAndPlay ("MoveRight");
};
tellTarget ("Sound") {
gotoAndPlay (2);
};
}
on (keyPress "<Right>") {
tellTarget ("Square") {
gotoAndPlay ("MoveRight");
};
tellTarget ("Sound") {
gotoAndPlay (2);
};
}
on (keyPress "8") {
tellTarget ("Square") {
gotoAndPlay ("MoveUp");
};
tellTarget ("Sound") {
gotoAndPlay (2);
};
}
on (keyPress "<Up>") {
tellTarget ("Square") {
gotoAndPlay ("MoveUp");
};
tellTarget ("Sound") {
gotoAndPlay (2);
};
}
on (keyPress "7") {
gotoAndPlay (73);
tellTarget ("Sound") {
gotoAndPlay (3);
};
}
on (keyPress "9") {
gotoAndPlay (82);
tellTarget ("Sound") {
gotoAndPlay (3);
};
}
Symbol 62 MovieClip Frame 1
Set("/:location", "22");
Symbol 62 MovieClip Frame 2
stop();
Symbol 62 MovieClip Frame 3
if ((/:location - (int(/:location / "10") * "10")) < "3") {
Set("/:location", /:location + "1");
setProperty("/Square", _y , getProperty("/Square", _y) + "60");
} else {
Set("/:location", /:location - "2");
setProperty("/Square", _y , getProperty("/Square", _y) - "120");
}
gotoAndStop (2);
Symbol 62 MovieClip Frame 11
if ("13" < /:location) {
Set("/:location", /:location - "10");
setProperty("/Square", _x , getProperty("/Square", _x) - "80");
} else {
Set("/:location", /:location + "20");
setProperty("/Square", _x , getProperty("/Square", _x) + "160");
}
gotoAndStop (2);
Symbol 62 MovieClip Frame 18
if (/:location < "31") {
Set("/:location", /:location + "10");
setProperty("/Square", _x , getProperty("/Square", _x) + "80");
} else {
Set("/:location", /:location - "20");
setProperty("/Square", _x , getProperty("/Square", _x) - "160");
}
gotoAndStop (2);
Symbol 62 MovieClip Frame 26
if ("1" < (/:location - (int(/:location / "10") * "10"))) {
Set("/:location", /:location - "1");
setProperty("/Square", _y , getProperty("/Square", _y) - "60");
} else {
Set("/:location", /:location + "2");
setProperty("/Square", _y , getProperty("/Square", _y) + "120");
}
gotoAndStop (2);
Symbol 65 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 2
gotoAndStop (1);
Symbol 65 MovieClip Frame 3
gotoAndStop (1);
Symbol 75 Button
on (release) {
gotoAndPlay (3);
}
Symbol 90 Button
on (release) {
gotoAndPlay (3);
}