Frame 11
stop();
comp = 0;
btReset.onRelease = function () {
btReset._visible = false;
gotoAndPlay (1);
};
btLink.onRelease = function () {
getURL ("http://www.gamedesign.jp/");
};
Symbol 7 MovieClip [mcCelOrg] Frame 1
stop();
Symbol 7 MovieClip [mcCelOrg] Frame 2
stop();
delete onPress;
Symbol 7 MovieClip [mcCelOrg] Frame 3
stop();
onPress = function () {
var _local3 = this._name.split("_");
_parent._parent.click_cel(Number(_local3[2]), Number(_local3[1]));
gotoAndStop (4);
};
Symbol 7 MovieClip [mcCelOrg] Frame 4
stop();
delete onPress;
Symbol 11 MovieClip Frame 1
_visible = false;
Symbol 11 MovieClip Frame 2
stop();
_visible = true;
Symbol 18 MovieClip Frame 1
stop();
Symbol 18 MovieClip Frame 8
if (_parent.act == 0) {
_parent._parent.cat_position();
gotoAndStop (1);
} else {
_parent._parent.cat_move();
gotoAndPlay (2);
}
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 8
if (_parent.act == 0) {
_parent._parent.cat_position();
gotoAndStop (1);
} else {
_parent._parent.cat_move();
gotoAndPlay (2);
}
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 8
if (_parent.act == 0) {
_parent._parent.cat_position();
gotoAndStop (1);
} else {
_parent._parent.cat_move();
gotoAndPlay (2);
}
Symbol 32 MovieClip Frame 1
function start_jump(dir) {
gotoAndPlay(2 + (dir * 2));
act = 0;
}
function start_run(dir) {
gotoAndPlay(2 + (dir * 2));
act = 1;
}
stop();
_visible = false;
Symbol 32 MovieClip Frame 3
stop();
mc.gotoAndPlay(2);
Symbol 32 MovieClip Frame 5
stop();
mc.gotoAndPlay(2);
Symbol 32 MovieClip Frame 7
stop();
mc.gotoAndPlay(2);
Symbol 32 MovieClip Frame 9
stop();
mc.gotoAndPlay(2);
Symbol 32 MovieClip Frame 11
stop();
mc.gotoAndPlay(2);
Symbol 32 MovieClip Frame 13
stop();
mc.gotoAndPlay(2);
Symbol 33 MovieClip Frame 1
function cat_position() {
mc = eval ((("mcCelLayer.mc_" + caty) + "_") + catx);
mcCat._x = mc._x;
mcCat._y = mc._y;
mcCat._visible = true;
}
function all_disable() {
var i;
var j;
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
if (cel[i][j].stat == 1) {
var mc = eval ((("mcCelLayer.mc_" + i) + "_") + j);
mc.gotoAndStop(2);
}
j++;
}
i++;
}
}
function all_enable() {
var i;
var j;
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
var mc = eval ((("mcCelLayer.mc_" + i) + "_") + j);
if (cel[i][j].stat == 1) {
if ((j == catx) && (i == caty)) {
mc.gotoAndStop(2);
} else {
mc.gotoAndStop(3);
}
mc._visible = true;
}
if (cel[i][j].stat == 2) {
mc.gotoAndStop(4);
mc._visible = true;
}
j++;
}
i++;
}
}
addx0 = [1, 0, -1, -1, -1, 0];
addy0 = [0, 1, 1, 0, -1, -1];
addx1 = [1, 1, 0, -1, 0, 1];
addy1 = [0, 1, 1, 0, -1, -1];
xmax = 15;
ymax = 15;
cel = new Array();
i = 0;
while (i < ymax) {
cel[i] = new Array();
j = 0;
while (j < xmax) {
cel[i][j] = new Object();
cel[i][j].stat = 0;
cel[i][j].win = 0;
j++;
}
i++;
}
catx = Math.floor(xmax / 2);
caty = Math.floor(ymax / 2);
cel[caty][catx].stat = 1;
lx = new Array();
ly = new Array();
ld = new Array();
lx[0] = catx;
ly[0] = caty;
lmax = 1;
lx2 = new Array();
ly2 = new Array();
i = 2;
while (i < (ymax - 2)) {
j = 2;
while (j < (xmax - 2)) {
cel[i][j].stat = 1;
j++;
}
i++;
}
loop = 0;
while (loop < 20) {
rx = Math.floor(Math.random() * xmax);
ry = Math.floor(Math.random() * ymax);
if ((rx != catx) && (ry != caty)) {
if (cel[ry][rx].stat == 1) {
cel[ry][rx].stat = 2;
}
}
loop++;
}
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
if (cel[i][j].stat != 1) {
} else {
k = 0;
while (k < 6) {
var nx = ((i % 2) ? (j + addx1[k]) : (j + addx0[k]));
var ny = (i + addy0[k]);
if (cel[ny][nx].stat == 0) {
cel[i][j].win = 1;
}
k++;
}
}
j++;
}
i++;
}
w = 34;
h = 26;
opx = ((-(xmax - 1)) * w) / 2;
opy = ((-(ymax - 1)) * h) / 2;
c = 0;
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
mcName = (("mc_" + i) + "_") + j;
mcCelLayer.attachMovie("mcCelOrg", mcName, c);
mc = eval ("mcCelLayer." + mcName);
mc._x = opx + (j * w);
if (i % 2) {
mc._x = mc._x + (w / 4);
} else {
mc._x = mc._x - (w / 4);
}
mc._y = opy + (i * h);
mc._visible = false;
c++;
j++;
}
i++;
}
Symbol 33 MovieClip Frame 5
function click_cel(cx, cy) {
cel[cy][cx].stat = 2;
gotoAndPlay ("cat");
all_disable();
}
stop();
cat_position();
all_enable();
Symbol 33 MovieClip Frame 11
function go_out() {
var _local1;
var _local5 = catx;
var _local4 = caty;
_local1 = 0;
while (_local1 < 6) {
var _local3 = ((_local4 % 2) ? (_local5 + addx1[_local1]) : (_local5 + addx0[_local1]));
var _local2 = _local4 + addy0[_local1];
if (cel[_local2][_local3].stat == 0) {
catx = _local3;
caty = _local2;
catdir = _local1;
return(1);
}
_local1++;
}
return(0);
}
function goto_win() {
var _local5 = catx;
var _local4 = caty;
var _local1 = 0;
while (_local1 < 6) {
var _local3 = ((_local4 % 2) ? (_local5 + addx1[_local1]) : (_local5 + addx0[_local1]));
var _local2 = _local4 + addy0[_local1];
if (cel[_local2][_local3].stat != 1) {
} else if (cel[_local2][_local3].win) {
catx = _local3;
caty = _local2;
catdir = _local1;
return(1);
}
_local1++;
}
return(0);
}
function get_nearest() {
var _local2;
var _local6;
var _local1;
var _local3;
var _local11;
cel[caty][catx].po = 0;
lx[0] = catx;
ly[0] = caty;
var _local12 = 1;
var _local7 = 999;
po = 1;
while (po < 200) {
_local3 = 0;
_local2 = 0;
while (_local2 < _local12) {
var _local5 = lx[_local2];
var _local4 = ly[_local2];
_local1 = 0;
while (_local1 < 6) {
var _local9 = ((_local4 % 2) ? (_local5 + addx1[_local1]) : (_local5 + addx0[_local1]));
var _local8 = _local4 + addy0[_local1];
if (cel[_local8][_local9].stat != 1) {
} else if (cel[_local8][_local9].po >= 0) {
} else {
cel[_local8][_local9].po = po;
lx2[_local3] = _local9;
ly2[_local3] = _local8;
_local3++;
if (cel[_local8][_local9].win && (po < _local7)) {
_local7 = po;
}
}
_local1++;
}
_local2++;
}
if (_local3 == 0) {
break;
}
_local2 = 0;
while (_local2 < _local3) {
lx[_local2] = lx2[_local2];
ly[_local2] = ly2[_local2];
_local2++;
}
_local12 = _local3;
po++;
}
if (_local7 == 999) {
return(0);
}
_local3 = 0;
_local2 = 0;
while (_local2 < ymax) {
_local6 = 0;
while (_local6 < xmax) {
if ((cel[_local2][_local6].po == _local7) && (cel[_local2][_local6].win)) {
lx[_local3] = _local6;
ly[_local3] = _local2;
_local3++;
}
_local6++;
}
_local2++;
}
if (_local3 == 0) {
return(0);
}
_local11 = Math.floor(Math.random() * _local3);
var _local5 = lx[_local11];
var _local4 = ly[_local11];
var _local10 = 0;
while (_local10 < 200) {
_local3 = 0;
_local1 = 0;
while (_local1 < 6) {
var _local9 = ((_local4 % 2) ? (_local5 + addx1[_local1]) : (_local5 + addx0[_local1]));
var _local8 = _local4 + addy0[_local1];
if (cel[_local8][_local9].stat != 1) {
} else if (cel[_local8][_local9].po >= cel[_local4][_local5].po) {
} else {
lx[_local3] = _local9;
ly[_local3] = _local8;
ld[_local3] = _local1;
_local3++;
}
_local1++;
}
if (_local3 == 0) {
return(0);
}
_local11 = Math.floor(Math.random() * _local3);
_local5 = lx[_local11];
_local4 = ly[_local11];
if (cel[_local4][_local5].po == 1) {
catx = _local5;
caty = _local4;
catdir = 0;
_local1 = 0;
while (_local1 < 6) {
var _local9 = ((_local4 % 2) ? (_local5 + addx1[_local1]) : (_local5 + addx0[_local1]));
var _local8 = _local4 + addy0[_local1];
if (cel[_local8][_local9].po == 0) {
catdir = (_local1 + 3) % 6;
}
_local1++;
}
return(1);
}
_local10++;
}
return(0);
}
function rand_move() {
var _local6 = catx;
var _local5 = caty;
var _local2 = 0;
var _local1 = 0;
while (_local1 < 6) {
var _local4 = ((_local5 % 2) ? (_local6 + addx1[_local1]) : (_local6 + addx0[_local1]));
var _local3 = _local5 + addy0[_local1];
if (cel[_local3][_local4].stat != 1) {
} else {
lx[_local2] = _local4;
ly[_local2] = _local3;
ld[_local2] = _local1;
_local2++;
}
_local1++;
}
if (_local2 == 0) {
return(0);
}
var _local7 = Math.floor(Math.random() * _local2);
catx = lx[_local7];
caty = ly[_local7];
catdir = ld[_local7];
return(1);
}
Symbol 33 MovieClip Frame 12
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
cel[i][j].reach = 0;
cel[i][j].po = -1;
j++;
}
i++;
}
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
if (cel[i][j].stat != 1) {
} else {
k = 0;
while (k < 6) {
var nx = ((i % 2) ? (j + addx1[k]) : (j + addx0[k]));
var ny = (i + addy0[k]);
if (cel[ny][nx].win) {
cel[i][j].reach++;
}
k++;
}
}
j++;
}
i++;
}
f = 0;
if (go_out() == 0) {
if (goto_win() == 0) {
if (get_nearest() == 0) {
if (rand_move() == 0) {
f = 1;
}
}
}
}
if (f) {
gotoAndStop ("over");
} else {
mcCat.start_jump(catdir);
}
Symbol 33 MovieClip Frame 19
if (cel[caty][catx].stat == 0) {
gotoAndStop ("run");
} else {
gotoAndStop ("wait");
}
Symbol 33 MovieClip Frame 21
function cat_move() {
var _local4 = 34;
var _local3 = 26;
var _local2 = [1, 0.5, -0.5, -1, -0.5, 0.5];
var _local1 = [0, 1, 1, 0, -1, -1];
mcCat._x = mcCat._x + (_local4 * _local2[catdir]);
mcCat._y = mcCat._y + (_local3 * _local1[catdir]);
}
stop();
mcCat.start_run(catdir);
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt > 50) {
delete onEnterFrame;
_parent.mcFade.start_fadeout();
}
};
Symbol 33 MovieClip Frame 27
stop();
mcCat.mc.gotoAndStop(2);
_root.comp = 1;
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt > 50) {
delete onEnterFrame;
_parent.mcFade.start_fadeout();
}
};
Symbol 48 MovieClip Frame 1
_visible = false;
game_no = 3;
cmax = 9;
stat = new Array();
i = 0;
while (i < cmax) {
stat[i] = new Object();
stat[i].num = i;
stat[i].done = 0;
i++;
}
dat = "";
soName = "gamedesignjp";
so = SharedObject.getLocal(soName, "/");
if (so != null) {
s = so.data.bingo_dat;
if (s != undefined) {
dat = s;
}
}
dat_exist = false;
if (dat) {
a = dat.split("/");
if (a.length == cmax) {
i = 0;
while (i < cmax) {
b = a[i].split("_");
stat[i].num = Number(b[0]);
stat[i].done = Number(b[1]);
if ((stat[i].num == game_no) && (stat[i].done == 1)) {
stat[i].done = 2;
dat_exist = true;
}
i++;
}
}
}
if (!dat_exist) {
stop();
_parent._parent.gotoAndPlay(1);
} else {
_visible = true;
}
btn.onRelease = function () {
var _local1 = "";
i = 0;
while (i < cmax) {
if (i > 0) {
_local1 = _local1 + "/";
}
_local1 = _local1 + ((stat[i].num + "_") + stat[i].done);
i++;
}
var _local2 = SharedObject.getLocal(soName, "/");
_local2.data.bingo_dat = _local1;
_local2.flush();
getURL ("http://www.gamedesign.jp/");
};
Symbol 48 MovieClip Frame 11
stop();
Symbol 49 MovieClip Frame 1
function start_fadeout() {
_alpha = 0;
onEnterFrame = function () {
_alpha = (_alpha + 4);
if (_alpha >= 100) {
delete onEnterFrame;
if (_root.comp) {
play();
} else {
_parent.gotoAndPlay(1);
}
}
};
}
stop();
_alpha = 100;
onEnterFrame = function () {
_alpha = (_alpha - 10);
if (_alpha <= 0) {
delete onEnterFrame;
}
};
Symbol 49 MovieClip Frame 2
stop();