Symbol 2 MovieClip [mcShadowOrg] Frame 1
function start_erase() {
cnt = 0;
_alpha = 100;
a = 10;
onEnterFrame = function () {
_x = (_x + a);
_y = (_y - a);
a = a / 2;
cnt++;
_alpha = (_alpha - 10);
if (_alpha <= 0) {
delete onEnterFrame;
_visible = false;
_x = ox;
_y = oy;
_alpha = 100;
}
};
}
stop();
Symbol 6 MovieClip [mcCelOrg] Frame 1
function start_erase() {
cnt = 0;
_alpha = 100;
a = 10;
onEnterFrame = function () {
_x = (_x + a);
_y = (_y - a);
a = a / 2;
cnt++;
_alpha = (_alpha - 10);
if (_alpha <= 0) {
delete onEnterFrame;
_parent.finish_erase();
_visible = false;
_x = ox;
_y = oy;
_alpha = 100;
}
};
}
stop();
Symbol 11 Button
on (release) {
getURL ("http://www.gamedesign.jp/");
}
Symbol 26 MovieClip Frame 1
_visible = false;
game_no = 6;
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.play();
} 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 26 MovieClip Frame 11
stop();
Symbol 29 MovieClip Frame 1
col1 = 2378611 /* 0x244B73 */;
col2 = 16777215 /* 0xFFFFFF */;
xmax = 8;
ymax = 8;
cel_w = 41;
cel_h = 41;
ox = 80;
oy = 360;
cmax = xmax * ymax;
list = new Array(cmax);
i = 0;
while (i < cmax) {
list[i] = Math.floor(i / 4);
i++;
}
i = 0;
while (i < cmax) {
r = Math.floor(Math.random() * cmax);
tmp = list[r];
list[r] = list[i];
list[i] = tmp;
i++;
}
c = 0;
ofs = 100;
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
mcname = (("mc_" + j) + "_") + i;
this.attachMovie("mcCelOrg", mcname, ofs + c);
mc = eval (mcname);
mc._x = (mc.ox = ox + (j * cel_w));
mc._y = (mc.oy = (oy - (i * cel_h)) + (j * 2));
mc.symbol = String.fromCharCode(65 + list[c]);
mc.pushed = 0;
mc.tf.textColor = col1;
mcname2 = (("shadow_" + j) + "_") + i;
this.attachMovie("mcShadowOrg", mcname2, c);
mc2 = eval (mcname2);
mc2._x = (mc2.ox = (ox + (i * 21)) + (j * cel_w));
mc2._y = (mc2.oy = (oy - (14 * i)) + (j * 2));
c++;
j++;
}
i++;
}
Symbol 29 MovieClip Frame 4
function able_press_rollover() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
mc.onPress = function () {
var _local2 = this._name.split("_");
this._parent.click_cel(Number(_local2[1]), Number(_local2[2]));
};
mc.onRollOver = function () {
var _local2 = this._name.split("_");
this._parent.over_cel(Number(_local2[1]), Number(_local2[2]));
};
j++;
}
i++;
}
}
function normal_position() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
mc._x = mc.ox;
mc._y = mc.oy;
mc.pushed = 0;
mc.tf.textColor = col1;
var mc2 = eval ((("shadow_" + j) + "_") + i);
mc2._x = mc2.ox;
mc2._y = mc2.oy;
j++;
}
i++;
}
}
function click_cel(cx, cy) {
var mc = eval ((("mc_" + cx) + "_") + cy);
var mc2 = eval ((("shadow_" + cx) + "_") + cy);
if (mc.pushed == 0) {
if (check_pair(cx, cy)) {
mc._x = mc._x + 5;
mc._y = mc._y - 5;
mc2._x = mc2._x + 5;
mc2._y = mc2._y - 5;
mc.pushed = 1;
disable_all();
start_erase();
} else {
normal_position();
mc._x = mc._x + 5;
mc._y = mc._y - 5;
mc2._x = mc2._x + 5;
mc2._y = mc2._y - 5;
mc.pushed = 1;
color_symbol(cx, cy);
disable_rollover();
}
} else {
mc._x = mc.ox;
mc._y = mc.oy;
mc2._x = mc2.ox;
mc2._y = mc2.oy;
mc.pushed = 0;
able_press_rollover();
}
}
function over_cel(cx, cy) {
color_symbol(cx, cy);
}
function color_symbol(cx, cy) {
var omc = eval ((("mc_" + cx) + "_") + cy);
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
if (mc.symbol == omc.symbol) {
mc.tf.textColor = col2;
} else {
mc.tf.textColor = col1;
}
j++;
}
i++;
}
}
function color_init() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
mc.tf.textColor = col1;
j++;
}
i++;
}
}
function disable_rollover() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
delete mc.onRollOver;
j++;
}
i++;
}
}
function disable_all() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
delete mc.onPress;
delete mc.onRollOver;
j++;
}
i++;
}
}
function check_pair(ox, oy) {
var i;
var omc = eval ((("mc_" + ox) + "_") + oy);
i = 0;
while (i < ymax) {
var mc = eval ((("mc_" + ox) + "_") + i);
if (i == oy) {
} else if (!mc._visible) {
} else if (mc.symbol != omc.symbol) {
} else if (mc.pushed) {
return(1);
}
i++;
}
i = 0;
while (i < xmax) {
var mc = eval ((("mc_" + i) + "_") + oy);
if (i == ox) {
} else if (!mc._visible) {
} else if (mc.symbol != omc.symbol) {
} else if (mc.pushed) {
return(1);
}
i++;
}
}
function start_erase() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
if (!mc._visible) {
} else if (!mc.pushed) {
} else {
mc.start_erase();
var mc2 = eval ((("shadow_" + j) + "_") + i);
mc2.start_erase();
}
j++;
}
i++;
}
}
function finish_erase() {
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt > 3) {
start_drop();
}
};
}
function start_drop() {
color_init();
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
if (!mc._visible) {
} else if (!mc.pushed) {
} else {
mc._x = mc.ox;
mc._y = mc.oy;
mc._alpha = 100;
}
j++;
}
i++;
}
onEnterFrame = function () {
if (!drop()) {
delete onEnterFrame;
if (check_clear()) {
btReset.enabled = false;
btFinish.enabled = false;
play();
} else {
normal_position();
if (auto) {
do_auto();
} else {
able_press_rollover();
}
}
}
};
}
function drop() {
var i;
var j;
var ret = 0;
j = 0;
while (j < xmax) {
i = 0;
while (i < (ymax - 1)) {
var mc = eval ((("mc_" + j) + "_") + i);
var up = eval ((("mc_" + j) + "_") + (i + 1));
if (mc._visible) {
} else if (!up._visible) {
} else {
mc._visible = true;
up._visible = false;
mc.symbol = up.symbol;
ret = 1;
var mc2 = eval ((("shadow_" + j) + "_") + i);
var up2 = eval ((("shadow_" + j) + "_") + (i + 1));
mc2._visible = true;
up2._visible = false;
break;
}
i++;
}
j++;
}
return(ret);
}
function start_auto() {
if (auto) {
return(undefined);
}
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mc_" + j) + "_") + i);
delete mc.onPress;
delete mc.onRollOver;
mc._x = mc.ox;
mc._y = mc.oy;
mc.pushed = 0;
mc.tf.textColor = col1;
var mc2 = eval ((("shadow_" + j) + "_") + i);
mc2._x = mc2.ox;
mc2._y = mc2.oy;
j++;
}
i++;
}
do_auto();
}
function do_auto() {
if (!find_pair()) {
auto = false;
normal_position();
able_press_rollover();
return(undefined);
}
auto = true;
start_erase();
}
function find_pair() {
var _local7 = false;
var _local11;
var _local9;
var _local10;
var _local8;
var _local5 = 0;
while (_local5 < ymax) {
var _local4 = 0;
while (_local4 < xmax) {
if (!this[(("mc_" + _local4) + "_") + _local5]._visible) {
} else {
var _local6 = this[(("mc_" + _local4) + "_") + _local5].symbol;
var _local3 = _local5;
while (_local3 < ymax) {
var _local2 = _local4;
while (_local2 < xmax) {
if ((_local2 == _local4) && (_local3 == _local5)) {
} else if ((_local2 != _local4) && (_local3 != _local5)) {
} else if (!this[(("mc_" + _local2) + "_") + _local3]._visible) {
} else if (this[(("mc_" + _local2) + "_") + _local3].symbol != _local6) {
} else {
_local11 = _local4;
_local10 = _local5;
_local9 = _local2;
_local8 = _local3;
_local7 = true;
}
_local2++;
}
_local3++;
}
}
_local4++;
}
_local5++;
}
if (_local7) {
this[(("mc_" + _local11) + "_") + _local10].pushed = 1;
this[(("mc_" + _local11) + "_") + _local10].tf.textColor = col2;
this[(("mc_" + _local9) + "_") + _local8].pushed = 1;
this[(("mc_" + _local9) + "_") + _local8].tf.textColor = col2;
}
return(_local7);
}
function check_clear() {
var j = 0;
while (j < xmax) {
var i = 0;
while (i < (ymax - 1)) {
var mc = eval ((("mc_" + j) + "_") + i);
if (mc._visible) {
return(0);
}
i++;
}
j++;
}
return(1);
}
stop();
auto = false;
able_press_rollover();
btFinish.onRelease = function () {
btFinish._visible = false;
start_auto();
};
btReset.onRelease = function () {
_parent.gotoAndPlay("reset");
};
Symbol 29 MovieClip Frame 6
Symbol 29 MovieClip Frame 17
stop();
Symbol 29 MovieClip Frame 97
stop();
_parent.gotoAndPlay("reset");
Symbol 30 MovieClip Frame 8
stop();