Frame 3
stop();
Frame 125
stageNum = 1;
Frame 126
function rand(x) {
return(Math.floor(Math.random() * x));
}
function move(id, coord) {
name = "tile" + id;
if (!(((coord % w) != 0) && (grid[coord - 1] == -1))) {
if (!(((coord % w) != (w - 1)) && (grid[coord + 1] == -1))) {
if (!(((coord - w) >= 0) && (grid[coord - w] == -1))) {
if (((coord + w) < (w * w)) && (grid[coord + w] == -1)) {
with (eval (name)) {
q = q + w;
}
grid[coord + w] = id;
grid[coord] = -1;
}
} else {
with (eval (name)) {
q = q - w;
}
grid[coord - w] = id;
grid[coord] = -1;
}
} else {
with (eval (name)) {
q++;
}
grid[coord + 1] = id;
grid[coord] = -1;
}
} else {
with (eval (name)) {
q--;
}
grid[coord - 1] = id;
grid[coord] = -1;
}
with (eval (name)) {
gotoAndPlay("mov");
}
}
function init(x) {
tmp = (w * w) - 1;
i = 0;
for ( ; i < x ; i++) {
r = rand(4);
if (!((r == 0) && ((tmp - w) >= 0))) {
if (!((r == 1) && ((tmp + 1) < (w * w)))) {
if (!((r == 2) && ((tmp + w) < (w * w)))) {
if ((r == 3) && ((tmp - 1) >= 0)) {
move(grid[tmp - 1], tmp - 1);
tmp = tmp - 1;
}
} else {
move(grid[tmp + w], tmp + w);
tmp = tmp + w;
}
} else {
move(grid[tmp + 1], tmp + 1);
tmp = tmp + 1;
}
} else {
move(grid[tmp - w], tmp - w);
tmp = tmp - w;
}
}
}
function next() {
i = 0;
for ( ; i < ((w * w) - 1) ; i++) {
if ((grid[i] != i) && (grid[i] != -1)) {
return(null);
}
}
stageNum++;
this.play();
}
var grid = new Array();
w = 4;
h = w;
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
for ( ; (i == (w - 1)) && (j == (h - 1)) ; j++) {
grid[t] = -1;
}
grid[t] = t;
name = "tile" + t;
duplicateMovieClip ("til", name, t + 100);
this[name].id = t;
this[name].q = t;
with (eval (name)) {
gotoAndPlay("dup");
}
}
}
init(200);
Frame 127
stop();
Frame 128
if (stageNum != 2) {
gotoAndPlay("error");
}
w = 5;
h = w;
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
name = "tile" + t;
removeMovieClip(name);
}
}
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
for ( ; (i == (w - 1)) && (j == (h - 1)) ; j++) {
grid[t] = -1;
}
grid[t] = t;
name = "tile" + t;
duplicateMovieClip ("til", name, t + 100);
this[name].id = t;
this[name].q = t;
with (eval (name)) {
gotoAndPlay("dup");
}
}
}
init(400);
Frame 129
stop();
Frame 130
if (stageNum != 3) {
gotoAndPlay("error");
}
w = 5;
h = w;
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
name = "tile" + t;
removeMovieClip(name);
}
}
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
for ( ; (i == (w - 1)) && (j == (h - 1)) ; j++) {
grid[t] = -1;
}
for ( ; (i == 1) && (j == 1) ; j++) {
grid[t] = -1;
}
for ( ; (i == 2) && (j == 2) ; j++) {
grid[t] = -1;
}
grid[t] = t;
name = "tile" + t;
duplicateMovieClip ("til", name, t + 100);
this[name].id = t;
this[name].q = t;
with (eval (name)) {
gotoAndPlay("dup");
}
}
}
init(600);
Frame 131
stop();
Frame 132
if (stageNum != 4) {
gotoAndPlay("error");
}
w = 8;
h = w;
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
name = "tile" + t;
removeMovieClip(name);
}
}
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
for ( ; (i == (w - 1)) && (j == (h - 1)) ; j++) {
grid[t] = -1;
}
for ( ; (i == 2) && (j == 2) ; j++) {
grid[t] = -1;
}
for ( ; (i == 3) && (j == 4) ; j++) {
grid[t] = -1;
}
for ( ; (i == 6) && (j == 1) ; j++) {
grid[t] = -1;
}
grid[t] = t;
name = "tile" + t;
duplicateMovieClip ("til", name, t + 100);
this[name].id = t;
this[name].q = t;
with (eval (name)) {
gotoAndPlay("dup");
}
}
}
init(800);
Frame 133
stop();
Frame 134
if (stageNum != 5) {
gotoAndPlay("error");
}
w = 9;
h = w;
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
name = "tile" + t;
removeMovieClip(name);
}
}
Frame 156
stop();
Frame 158
w = 9;
h = w;
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
name = "tile" + t;
removeMovieClip(name);
}
}
Frame 239
w = 9;
h = w;
i = 0;
for ( ; i < w ; i++) {
j = 0;
for ( ; j < h ; j++) {
t = (i * w) + j;
name = "tile" + t;
removeMovieClip(name);
}
}
Symbol 48 MovieClip Frame 79
stop();
Symbol 38 MovieClip Frame 20
stop();
Symbol 20052 Button
on (release) {
_parent.play();
}
on () {
}
Symbol 36 MovieClip [title] Frame 21
stop();
Symbol 40 MovieClip [err] Frame 1
count = 0;
Symbol 40 MovieClip [err] Frame 2
txt = "\uFF65\uFF65\uFF65\u305D\u30FC\u3086\u30FC\u306E\u306F\u30E4\u3060\u306A\uFF65\uFF65\uFF65";
txt = txt.substr(0, count);
count++;
Symbol 40 MovieClip [err] Frame 3
gotoAndPlay("_re");
Symbol 20053 Button
on (release) {
img.play();
}
on () {
}
Symbol 46 MovieClip [ED] Frame 1
count = 0;
Symbol 46 MovieClip [ED] Frame 2
txt = "\u3057\u305F\u3044\u3058\u3083\u306A\u3044\u3088\u3001\u30AD\u30E7\u30F3\u30B7\u30FC\u3060\u3088\n (pass:sitai)";
txt = txt.substr(0, count);
count++;
if (80 < count) {
gotoAndPlay("END");
}
Symbol 46 MovieClip [ED] Frame 3
gotoAndPlay("_re");
Symbol 46 MovieClip [ED] Frame 5
stop();
Symbol 34 MovieClip [OP] Frame 1
count = 0;
Symbol 34 MovieClip [OP] Frame 2
txt = "\u308F\u305F\u3057\u3092\u898B\u308B\u306A\u308A\u300C\u3057\u305F\u3044\u3001\u3057\u305F\u3044\u300D\u3060\u306A\u3093\u3066\uFF65\uFF65\uFF65\n\u3046\u30FC\u3093\u3002\u3057\u3087\u3046\u304C\u306A\u3044\u306B\u3083\u3042\uFF65\uFF65\uFF65\u3044\u3044\u3088///";
txt = txt.substr(0, count);
count++;
if (80 < count) {
count = 0;
gotoAndPlay("_re2");
}
Symbol 34 MovieClip [OP] Frame 3
gotoAndPlay("_re");
Symbol 34 MovieClip [OP] Frame 4
txt = "\u30B9\u30E9\u30A4\u30C9\u30D1\u30BA\u30EB\u3092\u89E3\u3044\u3066\u8131\u8863\uFF01\u5B9F\u969B\u5358\u7D14\uFF01";
txt = txt.substr(0, count);
count++;
Symbol 34 MovieClip [OP] Frame 5
gotoAndPlay("_re2");
Symbol 20054 Button
on (release) {
_parent.next();
}
on () {
}
Symbol 28 MovieClip [一枚絵] Frame 1
stop();
Symbol 28 MovieClip [一枚絵] Frame 3
stop();
Symbol 28 MovieClip [一枚絵] Frame 5
stop();
Symbol 28 MovieClip [一枚絵] Frame 8
stop();
Symbol 20055 Button
on (release) {
_parent.move(this.id, this.q);
cnt++;
}
on () {
}
Symbol 50 MovieClip [size8] Frame 2
stop();
Symbol 50 MovieClip [size8] Frame 3
cnt = 1;
img.gotoAndPlay("_3");
w = this._parent.w;
h = this._parent.h;
this.img._x = (-1 * (id % w)) * (640 / w);
this._x = this.img._x * -1;
this.img._y = (-1 * Math.floor(id / h)) * (640 / h);
this._y = this.img._y * -1;
this.img._x = this.img._x - 155;
Symbol 50 MovieClip [size8] Frame 5
goal_x = (q % w) * (640 / w);
goal_y = Math.floor(q / h) * (640 / h);
tbox.txt = id;
if (7 < cnt) {
tbox.txt = "";
}
Symbol 50 MovieClip [size8] Frame 6
this._x = this._x + ((goal_x - this._x) / 5);
this._y = this._y + ((goal_y - this._y) / 5);
if (((goal_x - this._x) == 0) && ((goal_y - this._y) == 0)) {
stop();
}
Symbol 50 MovieClip [size8] Frame 7
gotoAndPlay("_re");
Symbol 50 MovieClip [size8] Frame 8
stop();
Symbol 20056 Button
on (release) {
_parent.move(this.id, this.q);
}
on () {
}
Symbol 44 MovieClip [size6] Frame 2
stop();
Symbol 44 MovieClip [size6] Frame 3
img.gotoAndPlay("_3");
w = this._parent.w;
h = this._parent.h;
this.img._x = (-1 * (id % w)) * (640 / w);
this._x = this.img._x * -1;
this.img._y = (-1 * Math.floor(id / h)) * (640 / h);
this._y = this.img._y * -1;
this.img._x = this.img._x - 160;
Symbol 44 MovieClip [size6] Frame 5
goal_x = (q % w) * (640 / w);
goal_y = Math.floor(q / h) * (640 / h);
Symbol 44 MovieClip [size6] Frame 6
this._x = this._x + ((goal_x - this._x) / 5);
this._y = this._y + ((goal_y - this._y) / 5);
Symbol 44 MovieClip [size6] Frame 7
gotoAndPlay("_re");
Symbol 44 MovieClip [size6] Frame 8
stop();
Symbol 20057 Button
on (release) {
_parent.move(this.id, this.q);
}
on () {
}
Symbol 42 MovieClip [size5(2)] Frame 2
stop();
Symbol 42 MovieClip [size5(2)] Frame 3
img.gotoAndPlay("_2");
w = this._parent.w;
h = this._parent.h;
this.img._x = (-1 * (id % w)) * (640 / w);
this._x = this.img._x * -1;
this.img._y = (-1 * Math.floor(id / h)) * (640 / h);
this._y = this.img._y * -1;
this.img._x = this.img._x - 160;
Symbol 42 MovieClip [size5(2)] Frame 5
goal_x = (q % w) * (640 / w);
goal_y = Math.floor(q / h) * (640 / h);
Symbol 42 MovieClip [size5(2)] Frame 6
this._x = this._x + ((goal_x - this._x) / 5);
this._y = this._y + ((goal_y - this._y) / 5);
Symbol 42 MovieClip [size5(2)] Frame 7
gotoAndPlay("_re");
Symbol 42 MovieClip [size5(2)] Frame 8
stop();
Symbol 20058 Button
on (release) {
_parent.move(this.id, this.q);
}
on () {
}
Symbol 30 MovieClip [size5] Frame 2
stop();
Symbol 30 MovieClip [size5] Frame 3
img.play();
w = this._parent.w;
h = this._parent.h;
this.img._x = (-1 * (id % w)) * (640 / w);
this._x = this.img._x * -1;
this.img._y = (-1 * Math.floor(id / h)) * (640 / h);
this._y = this.img._y * -1;
this.img._x = this.img._x - 160;
Symbol 30 MovieClip [size5] Frame 5
goal_x = (q % w) * (640 / w);
goal_y = Math.floor(q / h) * (640 / h);
Symbol 30 MovieClip [size5] Frame 6
this._x = this._x + ((goal_x - this._x) / 5);
this._y = this._y + ((goal_y - this._y) / 5);
Symbol 30 MovieClip [size5] Frame 7
gotoAndPlay("_re");
Symbol 30 MovieClip [size5] Frame 8
stop();
Symbol 20059 Button
on (release) {
_parent.move(this.id, this.q);
}
on () {
}
Symbol 16 MovieClip [size4] Frame 2
stop();
Symbol 16 MovieClip [size4] Frame 3
w = this._parent.w;
h = this._parent.h;
this.img._x = (-1 * (id % w)) * (640 / w);
this._x = this.img._x * -1;
this.img._y = (-1 * Math.floor(id / h)) * (640 / h);
this._y = this.img._y * -1;
Symbol 16 MovieClip [size4] Frame 5
goal_x = (q % w) * (640 / w);
goal_y = Math.floor(q / h) * (640 / h);
Symbol 16 MovieClip [size4] Frame 6
this._x = this._x + ((goal_x - this._x) / 5);
this._y = this._y + ((goal_y - this._y) / 5);
Symbol 16 MovieClip [size4] Frame 7
gotoAndPlay("_re");
Symbol 16 MovieClip [size4] Frame 8
stop();
Symbol 20060 Button
on (keyPress "0") {
gotoAndPlay("error");
}
on (keyPress "1") {
gotoAndPlay("reset");
}
on (keyPress "q") {
gotoAndPlay("reset");
}
on (keyPress "r") {
gotoAndPlay(100);
}
on (keyPress "s") {
sitai = 1;
}
on (keyPress "i") {
if (sitai != 1) {
if (sitai != 4) {
sitai = 0;
} else {
stageNum = 5;
gotoAndPlay("main_ED");
}
} else {
sitai = 2;
}
}
on (keyPress "t") {
if (sitai != 2) {
sitai = 0;
} else {
sitai = 3;
}
}
on (keyPress "a") {
if (sitai != 3) {
sitai = 0;
} else {
sitai = 4;
}
}
on (keyPress "g") {
sitai = 0;
}
on (keyPress "k") {
sitai = 0;
}
on (keyPress "e") {
sitai = 0;
}
on (keyPress "u") {
sitai = 0;
}
on () {
}