Symbol 14 MovieClip Frame 1
stop();
if (_root.lang) {
gotoAndStop (2);
}
Symbol 28 MovieClip Frame 1
stop();
Symbol 36 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 1
function start_timer() {
ot = getTimer();
onEnterFrame = function () {
var sec = Math.floor((getTimer() - ot) / 1000);
var p = (sec - 3);
if (p < 0) {
p = 0;
}
if (p > 10) {
p = 10;
}
bonus = 10 - p;
var i = 0;
while (i < 10) {
var mc = eval ("mc" + i);
mc.gotoAndStop(((bonus <= i) ? 2 : 1));
i++;
}
};
}
function stop_timer() {
delete onEnterFrame;
return(bonus);
}
stop();
bonus = 10;
Symbol 49 MovieClip Frame 1
function on_click(px, py) {
mcDraw.lineStyle(2);
mcDraw.moveTo(px, py);
his[cnt] = new Object();
his[cnt].px = px;
his[cnt].py = py;
cnt++;
}
function on_move(px, py) {
mcDraw.lineTo(px, py);
his[cnt] = new Object();
his[cnt].px = px;
his[cnt].py = py;
var _local3 = px - his[cnt - 1].px;
var _local2 = py - his[cnt - 1].py;
his[cnt].len = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local6 = Math.atan2(_local2, _local3) / Math.PI;
var _local5 = Math.floor(4 * ((3 + _local6) + 0.125)) % 8;
his[cnt].dir = _local5;
if (his[cnt - 1].dir != undefined) {
var _local1 = _local5 - his[cnt - 1].dir;
if (_local1 < 0) {
_local1 = _local1 + 8;
}
var _local4 = 0;
if (_local1 > 0) {
if (_local1 < 4) {
_local4 = 1;
}
if (_local1 > 4) {
_local4 = -1;
}
}
his[cnt].rot = _local4;
}
cnt++;
}
function discrimination() {
dat = new Array();
dat[0] = new Object();
dat[1] = new Object();
dat[0].sp = 0;
dat[0].cnt = cnt;
dat[1].sp = 0;
dat[1].cnt = 0;
if (sp2 > 0) {
dat[0].sp = 0;
dat[0].cnt = sp2;
dat[1].sp = sp2;
dat[1].cnt = cnt - sp2;
}
i = 0;
while (i < 2) {
dat[i].len = 0;
j = 0;
while (j < dat[i].cnt) {
var n = (dat[i].sp + j);
if (his[n].len != undefined) {
dat[i].len = dat[i].len + his[n].len;
}
j++;
}
if (dat[i].len == 0) {
} else {
j = 0;
while (j < dat[i].cnt) {
var n = (dat[i].sp + j);
if (his[n].len != undefined) {
his[n].per = his[n].len / dat[i].len;
}
j++;
}
}
i++;
}
i = 0;
while (i < 2) {
dat[i].dircnt = [0, 0, 0, 0, 0, 0, 0, 0];
dat[i].dircnt1 = [0, 0, 0, 0, 0, 0, 0, 0];
dat[i].dircnt2 = [0, 0, 0, 0, 0, 0, 0, 0];
var lc = 0;
j = 0;
while (j < dat[i].cnt) {
var n = (dat[i].sp + j);
var d = his[n].dir;
if (d != undefined) {
dat[i].dircnt[d] = dat[i].dircnt[d] + his[n].per;
if (lc < (dat[i].len / 2)) {
dat[i].dircnt1[d] = dat[i].dircnt1[d] + his[n].per;
} else {
dat[i].dircnt2[d] = dat[i].dircnt2[d] + his[n].per;
}
lc = lc + his[n].len;
}
j++;
}
j = 0;
while (j < 8) {
var mc = eval ((("mcDat" + i) + ".mcDir") + j);
mc.set_per(j, dat[i].dircnt[j]);
j++;
}
j = 0;
while (j < 8) {
var mc = eval ((("mcDatFirst" + i) + ".mcDir") + j);
mc.set_per(j, dat[i].dircnt1[j]);
j++;
}
j = 0;
while (j < 8) {
var mc = eval ((("mcDatSecond" + i) + ".mcDir") + j);
mc.set_per(j, dat[i].dircnt2[j]);
j++;
}
i++;
}
i = 0;
while (i < 2) {
dat[i].rot = 0;
j = 0;
while (j < dat[i].cnt) {
var n = (dat[i].sp + j);
var rot = his[n].rot;
if (rot != undefined) {
dat[i].rot = dat[i].rot + rot;
}
j++;
}
i++;
}
i = 0;
while (i < 2) {
dat[i].x1 = 9999;
dat[i].y1 = 9999;
dat[i].x2 = -9999;
dat[i].y2 = -9999;
var n = dat[i].sp;
dat[i].sx = his[n].px;
dat[i].sy = his[n].py;
j = 0;
while (j < dat[i].cnt) {
var n = (dat[i].sp + j);
if (his[n].px < dat[i].x1) {
dat[i].x1 = his[n].px;
}
if (his[n].px > dat[i].x2) {
dat[i].x2 = his[n].px;
}
if (his[n].py < dat[i].y1) {
dat[i].y1 = his[n].py;
}
if (his[n].py > dat[i].y2) {
dat[i].y2 = his[n].py;
}
dat[i].fx = his[n].px;
dat[i].fy = his[n].py;
j++;
}
dat[i].w = dat[i].x2 - dat[i].x1;
dat[i].h = dat[i].y2 - dat[i].y1;
i++;
}
abi = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
if (dat[1].sp == 0) {
if ((dat[0].dircnt[6] + dat[0].dircnt[7]) >= 0.6) {
abi[1] = abi[1] + 1;
}
if ((dat[0].dircnt[6] + dat[0].dircnt[7]) >= 0.7) {
abi[1] = abi[1] + 1;
}
if ((dat[0].dircnt[6] + dat[0].dircnt[7]) >= 0.8) {
abi[1] = abi[1] + 2;
}
if ((dat[0].dircnt[6] + dat[0].dircnt[7]) >= 0.9) {
abi[1] = abi[1] + 3;
}
}
if (dat[1].sp == 0) {
if (dat[0].dircnt[4] >= 0.4) {
abi[2] = abi[2] + 1;
}
if (dat[0].dircnt[4] >= 0.5) {
abi[2] = abi[2] + 1;
}
if ((((dat[0].dircnt[4] + dat[0].dircnt[5]) + dat[0].dircnt[6]) + dat[0].dircnt[7]) >= 0.8) {
abi[2] = abi[2] + 1;
}
if ((((dat[0].dircnt[4] + dat[0].dircnt[5]) + dat[0].dircnt[6]) + dat[0].dircnt[7]) >= 0.9) {
abi[2] = abi[2] + 3;
}
if (dat[0].dircnt2[4] >= 0.2) {
abi[2] = abi[2] + 1;
}
if (dat[0].fx < (dat[0].x1 + (dat[0].w / 2))) {
abi[2] = 0;
}
}
if (dat[1].sp > 0) {
if ((((dat[0].dircnt[4] + dat[0].dircnt[5]) + dat[0].dircnt[6]) + dat[0].dircnt[7]) >= 0.8) {
abi[4] = abi[4] + 2;
}
if ((dat[1].dircnt[6] + dat[1].dircnt[7]) >= 0.7) {
abi[4] = abi[4] + 1;
}
if ((dat[1].dircnt[6] + dat[1].dircnt[7]) >= 0.8) {
abi[4] = abi[4] + 1;
}
if ((dat[1].dircnt[6] + dat[1].dircnt[7]) >= 0.9) {
abi[4] = abi[4] + 3;
}
if (dat[0].len < (dat[1].len / 2)) {
abi[4] = 0;
}
}
if (((dat[1].dircnt[3] + dat[1].dircnt[4]) + dat[1].dircnt[5]) >= 0.7) {
abi[5] = abi[5] + 1;
}
if (((dat[1].dircnt[3] + dat[1].dircnt[4]) + dat[1].dircnt[5]) >= 0.8) {
abi[5] = abi[5] + 2;
}
if (((dat[1].dircnt[3] + dat[1].dircnt[4]) + dat[1].dircnt[5]) >= 0.9) {
abi[5] = abi[5] + 3;
}
if (dat[1].sp == 0) {
if (((dat[0].dircnt[4] + dat[0].dircnt[6]) + dat[0].dircnt[7]) >= 0.8) {
abi[7] = abi[7] + 1;
}
if (((dat[0].dircnt[4] + dat[0].dircnt[6]) + dat[0].dircnt[7]) >= 0.9) {
abi[7] = abi[7] + 3;
}
if (dat[0].dircnt1[4] >= 0.2) {
if ((dat[0].dircnt2[6] + dat[0].dircnt2[7]) >= 0.4) {
abi[7] = abi[7] + 3;
}
}
if (dat[0].dircnt2[4] >= 0.1) {
abi[7] = 0;
}
} else {
if ((dat[0].dircnt[6] + dat[0].dircnt[7]) >= 0.8) {
abi[7] = abi[7] + 1;
}
if ((dat[0].dircnt[6] + dat[0].dircnt[7]) >= 0.9) {
abi[7] = abi[7] + 1;
}
if (dat[1].dircnt1[4] >= 0.1) {
if ((dat[1].dircnt2[6] + dat[1].dircnt2[7]) >= 0.4) {
abi[7] = abi[7] + 3;
}
}
if (((dat[1].dircnt[4] + dat[1].dircnt[6]) + dat[1].dircnt[7]) >= 0.8) {
abi[7] = abi[7] + 1;
}
if (((dat[1].dircnt[4] + dat[1].dircnt[6]) + dat[1].dircnt[7]) >= 0.9) {
abi[7] = abi[7] + 3;
}
if (dat[0].len > (dat[1].len / 2)) {
abi[7] = 0;
}
}
if (dat[1].sp == 0) {
if ((dat[0].dircnt[2] + dat[0].dircnt[3]) >= 0.25) {
abi[8] = abi[8] + 1;
}
if ((dat[0].dircnt[2] + dat[0].dircnt[3]) >= 0.3) {
abi[8] = abi[8] + 1;
}
if (dat[0].fx > (dat[0].x1 + (dat[0].w / 2))) {
if (dat[0].fy < (dat[0].y1 + ((dat[0].h * 2) / 3))) {
abi[8] = abi[8] + 2;
}
}
if (dat[0].fy == dat[0].y2) {
abi[8] = 0;
}
}
if (dat[1].sp == 0) {
if (dat[0].rot > 0) {
abi[3] = abi[3] + 1;
}
if (dat[0].rot > 5) {
abi[3] = abi[3] + 1;
}
if (dat[0].rot > 10) {
abi[3] = abi[3] + 1;
}
if (dat[0].fx > (dat[0].x1 + (dat[0].w / 2))) {
abi[3] = 0;
}
}
if (dat[1].sp == 0) {
if (dat[0].rot < 0) {
abi[6] = abi[6] + 1;
}
if (dat[0].rot < -5) {
abi[6] = abi[6] + 1;
}
if (dat[0].rot < -10) {
abi[6] = abi[6] + 1;
}
if (dat[0].fy > (dat[0].y1 + (dat[0].h * 0.9))) {
abi[6] = 0;
}
}
if (dat[1].sp == 0) {
if (dat[0].rot < 0) {
abi[9] = abi[9] + 1;
}
if (dat[0].rot < -5) {
abi[9] = abi[9] + 1;
}
if (dat[0].rot < -10) {
abi[9] = abi[9] + 1;
}
if (dat[0].rot < 0) {
var f = 0;
i = 0;
while (i < 8) {
if (dat[0].dircnt1[i] >= 0.2) {
f = 1;
}
i++;
}
if (f == 0) {
if (dat[0].fy > (dat[0].y1 + (dat[0].h * 0.9))) {
abi[9] = abi[9] + 3;
}
}
}
}
if (dat[1].sp == 0) {
if (abi[6]) {
if (dat[0].fy < (dat[0].y1 + (dat[0].h * 0.3))) {
abi[0] = abi[0] + 5;
}
}
}
var max = 0;
var kouho = 0;
i = 0;
while (i <= 9) {
if (abi[i] > max) {
max = abi[i];
kouho = i;
}
i++;
}
num_txt = kouho;
var n = Number(this._name.slice(7));
_parent.input_number(n, kouho);
}
num_txt = "";
Symbol 49 MovieClip Frame 3
function start_read() {
this.clear();
his = new Array();
cnt = 0;
sp2 = 0;
onPress = function () {
delete onPress;
on_click(_xmouse, _ymouse);
onMouseMove = function () {
on_move(_xmouse, _ymouse);
};
onMouseUp = function () {
delete onMouseUp;
delete onMouseMove;
start_read2();
};
};
}
function start_read2() {
ot = getTimer();
onEnterFrame = function () {
if (getTimer() > (ot + 700)) {
delete onEnterFrame;
delete onPress;
discrimination();
}
};
onPress = function () {
delete onPress;
delete onEnterFrame;
sp2 = cnt;
on_click(_xmouse, _ymouse);
onMouseMove = function () {
on_move(_xmouse, _ymouse);
};
onMouseUp = function () {
delete onMouseUp;
delete onMouseMove;
discrimination();
};
};
}
stop();
start_read();
Symbol 52 MovieClip Frame 1
stop();
_visible = false;
Symbol 52 MovieClip Frame 2
stop();
_visible = true;
Symbol 52 MovieClip Frame 9
stop();
_visible = true;
Symbol 53 MovieClip Frame 1
ans = 20 + Math.floor(Math.random() * 80);
q1 = 10 + Math.floor(Math.random() * (ans - 20));
q2 = ans - q1;
num = [-1, -1];
Symbol 53 MovieClip Frame 2
function input_number(p, n) {
num[p] = Number(n);
var _local2 = 0;
var _local1 = 0;
while (_local1 < 2) {
if (num[_local1] < 0) {
_local2 = 1;
}
_local1++;
}
if (_local2) {
return(undefined);
}
correct = 0;
if (((num[0] * 10) + num[1]) == ans) {
correct = 1;
}
play();
}
stop();
Symbol 53 MovieClip Frame 6
if (correct) {
mcMaru.gotoAndStop("maru");
} else {
mcMaru.gotoAndStop("batu");
}
Symbol 53 MovieClip Frame 12
stop();
_parent.after_input(correct);
Symbol 60 MovieClip Frame 2
stop();
btStart.onRelease = function () {
question_no = 0;
correct_cnt = 0;
score = 0;
gotoAndPlay ("start");
};
btLink.onRelease = function () {
getURL ("http://www.gamedesign.jp/");
};
Symbol 60 MovieClip Frame 12
play();
btQuit.onRelease = function () {
gotoAndStop ("title");
};
Symbol 60 MovieClip Frame 17
function after_input(correct) {
bonus = mcTimer.stop_timer();
if (correct) {
score = score + 10;
score = score + bonus;
}
var mc = eval ("mcBox" + question_no);
mc.gotoAndStop((correct ? "maru" : "batu"));
gotoAndPlay ("after");
}
stop();
mcTimer.start_timer();
Symbol 60 MovieClip Frame 26
question_no++;
if (question_no < 10) {
gotoAndPlay ("start");
} else {
stop();
ot = getTimer();
onEnterFrame = function () {
if (getTimer() < (ot + 1000)) {
return(undefined);
}
delete onEnterFrame;
gotoAndStop ("score");
};
}
Symbol 60 MovieClip Frame 30
stop();
score_txt = "";
s = 0;
onEnterFrame = function () {
s = s + 4;
score_txt = s;
if (s >= score) {
score_txt = score;
delete onEnterFrame;
play();
}
};
Symbol 60 MovieClip Frame 45
stop();
btRetry.onRelease = function () {
gotoAndStop ("title");
};
btLink.onRelease = function () {
getURL ("http://www.gamedesign.jp/");
};