Symbol 4 MovieClip [mcChipOrg] Frame 1
function start_upset(w) {
if (w == 0) {
play();
return(undefined);
}
cnt = 0;
wait = w;
onEnterFrame = function () {
cnt++;
if (cnt >= wait) {
delete onEnterFrame;
play();
}
};
}
stop();
stat = 0;
Symbol 4 MovieClip [mcChipOrg] Frame 8
stop();
stat = 1;
Symbol 15 MovieClip Frame 1
_visible = false;
game_no = 1;
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 15 MovieClip Frame 11
stop();
Symbol 24 MovieClip Frame 10
stop();
btn.onRelease = function () {
getURL ("http://www.gamedesign.jp/");
};
Symbol 25 MovieClip Frame 1
cmaxmax = 7;
i = 0;
while (i < cmaxmax) {
j = 0;
while (j < cmaxmax) {
mcname = (("mc_" + j) + "_") + i;
mcChipLayer.attachMovie("mcChipOrg", mcname, (i * cmaxmax) + j);
mc = eval ("mcChipLayer." + mcname);
mc.visible = false;
j++;
}
i++;
}
cmax = 4;
sndClick = new Sound();
sndClick.attachSound("click.wav");
Symbol 25 MovieClip Frame 3
function upset(ox, oy) {
var _local3 = 0;
while (_local3 < 5) {
var _local2 = ox + addx[_local3];
var _local1 = oy + addy[_local3];
if ((((_local2 < 0) || (_local2 >= cmax)) || (_local1 < 0)) || (_local1 >= cmax)) {
} else {
cel[_local1][_local2] = ((cel[_local1][_local2] == 0) ? 1 : 0);
}
_local3++;
}
}
play();
i = 0;
while (i < cmaxmax) {
j = 0;
while (j < cmaxmax) {
mc = eval ((("mcChipLayer.mc_" + j) + "_") + i);
mc._visible = false;
j++;
}
i++;
}
cpos = new Array();
i = 0;
while (i < cmax) {
cpos[i] = new Array();
j = 0;
while (j < cmax) {
cpos[i][j] = new Object();
j++;
}
i++;
}
screen_w = 800;
view_w = 100;
view_scale = screen_w / view_w;
view_z = 100;
ground_y = 40;
w = 10;
k = -20;
sc = Math.cos((Math.PI * k) / 180) * 0.9;
i = 0;
while (i < cmax) {
j = 0;
while (j < cmax) {
px = (((-w) * (cmax - 1)) / 2) + (w * j);
r = (((-w) * (cmax - 1)) / 2) + (w * i);
py = r * sc;
pz = 150 + (r * Math.sin((Math.PI * k) / 180));
var bai = (view_z / pz);
var bai100 = (bai * 100);
cpos[i][j].xs = bai100;
cpos[i][j].ys = bai100 * sc;
var baiv = (bai * view_scale);
cpos[i][j].dx = px * baiv;
cpos[i][j].dy = py * baiv;
j++;
}
i++;
}
cel = new Array();
i = 0;
while (i < cmax) {
cel[i] = new Array();
j = 0;
while (j < cmax) {
cel[i][j] = 0;
j++;
}
i++;
}
addx = [0, 1, 0, -1, 0];
addy = [0, 0, 1, 0, -1];
i = 0;
while (i < (cmax * cmax)) {
ox = Math.floor(Math.random() * cmax);
oy = Math.floor(Math.random() * cmax);
upset(ox, oy);
i++;
}
i = 0;
while (i < cmax) {
j = 0;
while (j < cmax) {
mc = eval ((("mcChipLayer.mc_" + j) + "_") + i);
mc._visible = true;
mc.gotoAndStop(((cel[i][j] == 0) ? "s0" : "s1"));
mc._xscale = cpos[i][j].xs;
mc._yscale = cpos[i][j].ys;
mc._x = 0;
mc._y = 0;
j++;
}
i++;
}
Symbol 25 MovieClip Frame 9
stop();
cnt = 0;
cnt_max = 10;
onEnterFrame = function () {
cnt++;
var i;
var j;
i = 0;
while (i < cmax) {
j = 0;
while (j < cmax) {
mc = eval ((("mcChipLayer.mc_" + j) + "_") + i);
var px = ((mc._x + cpos[i][j].dx) / 2);
var py = ((mc._y + cpos[i][j].dy) / 2);
mc._x = px;
mc._y = py;
j++;
}
i++;
}
if (cnt >= cnt_max) {
delete onEnterFrame;
gotoAndStop ("play");
}
};
Symbol 25 MovieClip Frame 12
function clickable(f) {
var i = 0;
while (i < cmax) {
var j = 0;
while (j < cmax) {
var mc = eval ((("mcChipLayer.mc_" + j) + "_") + i);
if (f) {
mc.onPress = function () {
var _local2 = this._name.split("_");
click_cel(Number(_local2[1]), Number(_local2[2]));
};
} else {
delete mc.onPress;
}
j++;
}
i++;
}
}
function click_cel(ox, oy) {
var i;
var j;
sndClick.start();
clickable(false);
upset(ox, oy);
i = 0;
while (i < cmax) {
j = 0;
while (j < cmax) {
var mc = eval ((("mcChipLayer.mc_" + j) + "_") + i);
if (mc.stat != cel[i][j]) {
var wait = (1 + Math.floor(Math.random() * 3));
if ((j == ox) && (i == oy)) {
wait = 0;
}
mc.start_upset(wait);
}
j++;
}
i++;
}
onEnterFrame = function () {
var comp = 1;
var f = 0;
var i = 0;
while (i < cmax) {
var j = 0;
while (j < cmax) {
var mc = eval ((("mcChipLayer.mc_" + j) + "_") + i);
if (mc.stat != cel[i][j]) {
f = 1;
}
if (cel[i][j] != cel[0][0]) {
comp = 0;
}
j++;
}
i++;
}
if (f == 0) {
delete onEnterFrame;
if (comp) {
gotoAndStop ("clear");
} else {
clickable(true);
}
}
};
}
stop();
clickable(true);
Symbol 25 MovieClip Frame 17
stop();
ot = getTimer();
onEnterFrame = function () {
if (getTimer() < (ot + 1000)) {
return(undefined);
}
delete onEnterFrame;
if (cmax < 7) {
cmax++;
gotoAndPlay ("start");
} else {
gotoAndStop ("comp");
}
};
Symbol 25 MovieClip Frame 24
stop();
i = 0;
while (i < cmaxmax) {
j = 0;
while (j < cmaxmax) {
mc = eval ((("mcChipLayer.mc_" + j) + "_") + i);
mc._visible = false;
j++;
}
i++;
}
w = 10;
k = -20;
sc = Math.cos((Math.PI * k) / 180) * 0.9;
cmax = 16;
cpos = new Array();
i = 0;
while (i < cmax) {
cpos[i] = new Object();
i++;
}
i = 0;
while (i < cmax) {
px = 30 * Math.cos((Math.PI * i) / (cmax / 2));
r = 30 * Math.sin((Math.PI * i) / (cmax / 2));
py = r * sc;
pz = 150 + (r * Math.sin((Math.PI * k) / 180));
var bai = (view_z / pz);
var bai100 = (bai * 100);
cpos[i].xs = bai100;
cpos[i].ys = bai100 * sc;
var baiv = (bai * view_scale);
cpos[i].dx = px * baiv;
cpos[i].dy = py * baiv;
i++;
}
i = 0;
while (i < cmax) {
mcname = "mc" + i;
mcChipLayer.attachMovie("mcChipOrg", mcname, i);
mc = eval ("mcChipLayer." + mcname);
mc._xscale = cpos[i].xs;
mc._yscale = cpos[i].ys;
mc._x = 0;
mc._y = 0;
i++;
}
cnt = 0;
onEnterFrame = function () {
var i = 0;
while (i < cmax) {
var mc = eval ("mcChipLayer.mc" + i);
mc._x = (mc._x + cpos[i].dx) / 2;
mc._y = (mc._y + cpos[i].dy) / 2;
i++;
}
cnt++;
if (cnt > 20) {
delete onEnterFrame;
gotoAndStop ("mes");
}
};
Symbol 25 MovieClip Frame 30
stop();
Symbol 25 MovieClip Frame 31
stop();
cnt = 0;
cn = 0;
onEnterFrame = function () {
cnt++;
if (cnt < 5) {
return(undefined);
}
cnt = 0;
var mc = eval ("mcChipLayer.mc" + cn);
mc.start_upset(0);
cn++;
if (cn >= cmax) {
cn = 0;
}
};