Frame 1
stop();
this.onEnterFrame = function () {
if (this.getBytesTotal() <= this.getBytesLoaded()) {
delete this.onEnterFrame;
gotoAndStop ("game");
}
};
Frame 2
stop();
Symbol 53 MovieClip [card] Frame 1
stop();
Symbol 62 MovieClip Frame 1
_visible = false;
game_no = 2;
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 62 MovieClip Frame 11
stop();
Symbol 71 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 1
function speak() {
mc0.gotoAndStop(fn);
mc1.gotoAndStop(fn);
fn = ((fn == 2) ? 3 : 2);
}
function shutup() {
mc0.gotoAndStop(2);
mc1.gotoAndStop(2);
}
function smile() {
mc0.gotoAndStop(4);
mc1.gotoAndStop(4);
}
stop();
fn = 3;
Symbol 81 Button
on (release) {
gotoAndStop (1);
_parent.gotoAndPlay("start");
}
Symbol 82 Button
on (release) {
getURL ("http://www.gamedesign.jp/");
}
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 30
stop();
Symbol 85 MovieClip Frame 51
stop();
fc = 0;
onEnterFrame = function () {
fc++;
if (fc > 30) {
delete onEnterFrame;
play();
}
};
Symbol 85 MovieClip Frame 53
stop();
comments = ["You did it!", "Congratulations!", "Way to go!", "Good job!", "Nice work!"];
cn = Math.floor(Math.random() * comments.length);
txt = "";
pos = 0;
fc = 0;
onEnterFrame = function () {
fc++;
if (fc < 10) {
return(undefined);
}
fc = 0;
txt = txt + comments[cn].charAt(pos);
pos++;
queen.speak();
if (pos >= comments[cn].length) {
delete onEnterFrame;
queen.shutup();
play();
}
};
Symbol 85 MovieClip Frame 55
stop();
fc = 0;
onEnterFrame = function () {
fc++;
if (fc > 30) {
delete onEnterFrame;
queen.smile();
play();
}
};
Symbol 85 MovieClip Frame 57
stop();
Symbol 96 Button
on (release) {
getURL ("http://www.gamedesign.jp/");
}
Symbol 98 Button
on (release) {
gotoAndPlay ("start");
}
Symbol 99 Button
on (release) {
gotoAndPlay ("finish");
}
Symbol 100 Button
on (release) {
getURL ("http://www.gamedesign.jp/");
}
Symbol 106 MovieClip Frame 1
CARD_MAX = 52;
COLUM_MAX = 8;
COLUM2_MAX = 12;
CARD_W = 35;
CARD_H = 45;
card = new Array(COLUM2_MAX);
i = 0;
while (i < COLUM2_MAX) {
card[i] = new Array(CARD_MAX);
j = 0;
while (j < CARD_MAX) {
card[i][j] = new Object();
card[i][j].exist = 0;
card[i][j].cn = 0;
card[i][j].omo = 0;
card[i][j].x = 0;
card[i][j].y = 0;
j++;
}
i++;
}
i = 0;
while (i < 4) {
colum = COLUM_MAX + i;
j = 0;
while (j < CARD_MAX) {
card[colum][j].x = (250 + (i * 75)) - (j * 0.5);
card[colum][j].y = 80 - (j * 1);
j++;
}
i++;
}
i = 0;
while (i < 4) {
mc = eval ("mcPos" + i);
mc._x = card[COLUM_MAX + i][0].x;
mc._y = card[COLUM_MAX + i][0].y;
mc.gotoAndStop(1 + i);
i++;
}
c = 0;
i = 0;
while (i < COLUM2_MAX) {
j = 0;
while (j < CARD_MAX) {
mcName = (("mcCard_" + i) + "_") + j;
attachMovie("card", mcName, c);
mc = eval (mcName);
c++;
j++;
}
i++;
}
j = 0;
while (j < CARD_MAX) {
mcName = "mcMove" + j;
attachMovie("card", mcName, c);
mc = eval (mcName);
c++;
j++;
}
yama = new Array(CARD_MAX);
i = 0;
while (i < CARD_MAX) {
s = i % 4;
n = 12 - Math.floor(i / 4);
yama[i] = (s * 13) + n;
i++;
}
Symbol 106 MovieClip Frame 3
function card_pos() {
var _local2;
var _local1;
_local2 = 0;
while (_local2 < COLUM_MAX) {
var _local6 = 0;
var _local4 = 0;
_local1 = 0;
while (_local1 < CARD_MAX) {
if (card[_local2][_local1].exist == 0) {
break;
}
if (card[_local2][_local1].omo) {
_local4++;
} else {
_local6++;
}
_local1++;
}
if (_local4 < 2) {
_local4 = 2;
}
var _local5 = (290 - (_local6 * 10)) / (_local4 - 1);
if (_local5 > 24) {
_local5 = 24;
}
var _local3 = 0;
_local1 = 0;
while (_local1 < CARD_MAX) {
card[_local2][_local1].x = 55 + (_local2 * 75);
card[_local2][_local1].y = 200 + _local3;
if (card[_local2][_local1].omo == 0) {
_local3 = _local3 + 10;
} else {
_local3 = _local3 + _local5;
}
_local1++;
}
_local2++;
}
}
function draw_card() {
var i;
var j;
i = 0;
while (i < COLUM2_MAX) {
j = 0;
while (j < CARD_MAX) {
var mc = eval ((("mcCard_" + i) + "_") + j);
if (card[i][j].exist == 0) {
mc._visible = false;
} else {
mc._x = card[i][j].x;
mc._y = card[i][j].y;
if (card[i][j].omo == 0) {
mc.gotoAndStop(2);
} else {
mc.gotoAndStop(3 + card[i][j].cn);
}
mc._visible = true;
}
j++;
}
i++;
}
}
function draw_card_colum(colum) {
var i = colum;
var j = 0;
while (j < CARD_MAX) {
var mc = eval ((("mcCard_" + i) + "_") + j);
if (card[i][j].exist == 0) {
mc._visible = false;
} else {
mc._x = card[i][j].x;
mc._y = card[i][j].y;
if (card[i][j].omo == 0) {
mc.gotoAndStop(2);
} else {
mc.gotoAndStop(3 + card[i][j].cn);
}
mc._visible = true;
}
j++;
}
}
Symbol 106 MovieClip Frame 5
function start_init_click() {
gotoAndPlay ("draw");
}
function init_click() {
var i;
var j;
i = 0;
while (i < COLUM2_MAX) {
j = 0;
for ( ; j < (CARD_MAX - 1) ; j++) {
if (card[i][j].exist != 1) {
} else {
var mc = eval ((("mcCard_" + i) + "_") + j);
if (card[i][j].omo) {
if ((i >= COLUM_MAX) && (card[i][j + 1].exist)) {
continue;
}
mc.onPress = function () {
var _local2 = this._name.split("_");
PickColum = Number(_local2[1]);
PickLine = Number(_local2[2]);
PickX = this._xmouse;
PickY = this._ymouse;
start_drag();
};
} else if (card[i][j + 1].exist == 0) {
mc.onPress = function () {
delete this.onPress;
var _local2 = this._name.split("_");
PickColum = Number(_local2[1]);
PickLine = Number(_local2[2]);
start_upset();
};
}
}
}
i++;
}
}
function start_drag() {
var i;
var j;
i = 0;
while (i < COLUM2_MAX) {
j = 0;
while (j < CARD_MAX) {
if (card[i][j].exist != 1) {
} else if (card[i][j].omo != 1) {
} else {
var mc = eval ((("mcCard_" + i) + "_") + j);
delete mc.onPress;
}
j++;
}
i++;
}
i = PickLine;
while (i < CARD_MAX) {
if (card[PickColum][i].exist != 1) {
break;
}
var mc = eval ((("mcCard_" + PickColum) + "_") + i);
mc._visible = false;
var mc2 = eval ("mcMove" + i);
mc2._visible = true;
mc2._x = mc._x;
mc2._y = mc._y;
mc2.sy = card[PickColum][i].y - card[PickColum][PickLine].y;
mc2.gotoAndStop(3 + card[PickColum][i].cn);
i++;
}
onMouseMove = function () {
drag_card();
};
onMouseUp = function () {
end_drag();
};
}
function drag_card() {
var ox = (_xmouse - PickX);
var oy = (_ymouse - PickY);
var i;
i = PickLine;
while (i < CARD_MAX) {
if (card[PickColum][i].exist != 1) {
return;
}
var mc2 = eval ("mcMove" + i);
mc2._x = ox;
mc2._y = oy + mc2.sy;
i++;
}
}
function end_drag() {
delete onMouseMove;
delete onMouseUp;
var ox = (_xmouse - PickX);
var oy = (_ymouse - PickY);
var i;
var j;
var pick_num = 0;
i = PickLine;
while (i < CARD_MAX) {
if (card[PickColum][i].exist != 1) {
break;
}
var mc2 = eval ("mcMove" + i);
mc2._visible = false;
pick_num++;
i++;
}
var suit = Math.floor(card[PickColum][PickLine].cn / 13);
var num = (card[PickColum][PickLine].cn % 13);
var list_colum = new Array();
var list_line = new Array();
var lc = 0;
i = 0;
while (i < COLUM_MAX) {
if (i == PickColum) {
} else {
j = 0;
while (j < (CARD_MAX - 1)) {
if (card[i][j].exist) {
if ((card[i][j].omo == 1) && (card[i][j + 1].exist == 0)) {
if (((suit % 2) != (Math.floor(card[i][j].cn / 13) % 2)) && (num == ((card[i][j].cn % 13) - 1))) {
if (check_hit(ox, oy, i, j)) {
list_colum[lc] = i;
list_line[lc] = j + 1;
lc++;
}
}
}
} else {
if (j > 0) {
break;
}
if ((card[PickColum][PickLine].cn % 13) == 12) {
if (check_hit(ox, oy, i, j)) {
list_colum[lc] = i;
list_line[lc] = j;
lc++;
}
}
}
j++;
}
}
i++;
}
if (lc > 0) {
var dest = 0;
var min = 99999;
i = 0;
while (i < lc) {
var colum = list_colum[i];
var line = list_line[i];
var d = (Math.abs(ox - card[colum][line].x) + Math.abs(oy - card[colum][line].y));
if (d < min) {
min = d;
dest = i;
}
i++;
}
put_card(list_colum[dest], list_line[dest]);
card_pos();
draw_card();
} else {
var f = 0;
if (pick_num == 1) {
if (check_upper()) {
f = 1;
}
}
if (f) {
var cn = card[PickColum][PickLine].cn;
var colum = (COLUM_MAX + Math.floor(cn / 13));
put_card(colum, cn % 13);
card_pos();
draw_card();
} else {
i = PickLine;
while (i < CARD_MAX) {
if (card[PickColum][i].exist != 1) {
break;
}
var mc = eval ((("mcCard_" + PickColum) + "_") + i);
mc._visible = true;
i++;
}
}
}
if (check_clear()) {
gotoAndStop ("clear");
} else {
start_init_click();
}
}
function check_hit(ox, oy, colum, line) {
var _local2 = card[colum][line].x;
var _local1 = card[colum][line].y;
if (((ox + CARD_W) > (_local2 - CARD_W)) && ((ox - CARD_W) < (_local2 + CARD_W))) {
if (((oy + CARD_H) > (_local1 - CARD_H)) && ((oy - CARD_H) < (_local1 + CARD_H))) {
return(1);
}
}
return(0);
}
function put_card(colum, line) {
var _local1;
var _local2 = 0;
_local1 = PickLine;
while (_local1 < CARD_MAX) {
if (card[PickColum][_local1].exist != 1) {
break;
}
card[PickColum][_local1].exist = 0;
card[colum][line + _local2].exist = 1;
card[colum][line + _local2].cn = card[PickColum][_local1].cn;
card[colum][line + _local2].omo = 1;
_local2++;
_local1++;
}
}
function check_upper() {
var _local1 = card[PickColum][PickLine].cn;
var _local3 = COLUM_MAX + Math.floor(_local1 / 13);
var _local2 = _local1 % 13;
if (_local2 == 0) {
return(1);
}
if (card[_local3][_local2 - 1].exist == 1) {
return(1);
}
return(0);
}
function start_upset() {
card[PickColum][PickLine].omo = 1;
var mc = eval ((("mcCard_" + PickColum) + "_") + PickLine);
mc.gotoAndStop(3 + card[PickColum][PickLine].cn);
start_init_click();
}
function check_clear() {
i = 0;
while (i < COLUM_MAX) {
if (card[i][0].exist) {
return(0);
}
i++;
}
return(1);
}
Symbol 106 MovieClip Frame 8
i = 0;
while (i < COLUM2_MAX) {
j = 0;
while (j < CARD_MAX) {
card[i][j].exist = 0;
j++;
}
i++;
}
i = 0;
while (i < CARD_MAX) {
r = Math.floor(Math.random() * CARD_MAX);
tmp = yama[i];
yama[i] = yama[r];
yama[r] = tmp;
i++;
}
colum = 0;
line = 0;
i = 0;
while (i < CARD_MAX) {
card[colum][line].exist = 1;
card[colum][line].cn = yama[i];
if (line < colum) {
card[colum][line].omo = 0;
} else {
card[colum][line].omo = 1;
}
colum++;
if (colum >= COLUM_MAX) {
line++;
colum = line - 2;
if (colum < 0) {
colum = 0;
}
}
if (colum > COLUM_MAX) {
break;
}
i++;
}
card_pos();
draw_card();
i = 0;
while (i < COLUM2_MAX) {
j = 0;
while (j < CARD_MAX) {
if (card[i][j].exist != 1) {
} else {
var mc = eval ((("mcCard_" + i) + "_") + j);
delete mc.onPress;
}
j++;
}
i++;
}
Symbol 106 MovieClip Frame 10
stop();
init_click();
Symbol 106 MovieClip Frame 15
draw_card();
Symbol 106 MovieClip Frame 17
gotoAndStop ("play");
Symbol 106 MovieClip Frame 20
i = 0;
while (i < COLUM2_MAX) {
j = 0;
while (j < CARD_MAX) {
var mc = eval ((("mcCard_" + i) + "_") + j);
delete mc.onPress;
j++;
}
i++;
}
Symbol 106 MovieClip Frame 21
num = 13;
i = 0;
while (i < 4) {
colum = COLUM_MAX + i;
n = 0;
j = 0;
while (j < 13) {
if (card[colum][j].exist) {
n++;
}
j++;
}
if (n < num) {
num = n;
}
i++;
}
if (num == 13) {
gotoAndStop ("clear");
} else {
f = 0;
suit = 0;
i = 0;
while (i < COLUM_MAX) {
a = -1;
j = 0;
while (j < CARD_MAX) {
if (card[i][j].exist) {
a = j;
}
j++;
}
if (a < 0) {
} else if (card[i][a].omo) {
if ((card[i][a].cn % 13) == num) {
suit = Math.floor(card[i][a].cn / 13);
colum = i;
line = a;
f = 1;
}
}
i++;
}
if (f) {
PickColum = colum;
PickLine = line;
DestColum = COLUM_MAX + suit;
DestLine = num;
nextFrame();
} else {
gotoAndStop ("play");
}
}
Symbol 106 MovieClip Frame 22
stop();
mc = eval ((("mcCard_" + PickColum) + "_") + PickLine);
mc._visible = false;
mc2 = mcMove0;
mc2._visible = true;
mc2._x = mc._x;
mc2._y = mc._y;
mc2.gotoAndStop(3 + card[PickColum][PickLine].cn);
div = 6;
ax = (card[DestColum][DestLine].x - mc._x) / div;
ay = (card[DestColum][DestLine].y - mc._y) / div;
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt < div) {
mcMove0._x = mcMove0._x + ax;
mcMove0._y = mcMove0._y + ay;
} else {
delete onEnterFrame;
mcMove0._visible = 0;
card[PickColum][PickLine].exist = 0;
card[DestColum][DestLine].exist = 1;
card[DestColum][DestLine].omo = 1;
card[DestColum][DestLine].cn = card[PickColum][PickLine].cn;
draw_card_colum(DestColum);
gotoAndStop(_currentframe - 1);
}
};
Symbol 106 MovieClip Frame 27
stop();
mcClear.gotoAndPlay(2);