Frame 1
var mymenu = new ContextMenu();
mymenu.hideBuiltInItems();
_root.menu = mymenu;
var score_so = SharedObject.getLocal("highscore");
if (score_so.data.highscore == undefined) {
score_so.data.highscore = 0;
}
game_mc.highscore = score_so.data.highscore;
Symbol 8 Button
on (release) {
if (Key.isDown(69)) {
gotoAndPlay ("start360");
} else {
gotoAndPlay ("start180");
}
}
Symbol 13 MovieClip Frame 1
stop();
if (_parent.omakeVisible) {
gotoAndStop (2);
}
Symbol 35 MovieClip Frame 7
gotoAndPlay (1);
Symbol 37 MovieClip Frame 1
stop();
Symbol 37 MovieClip Frame 2
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 1
function answerCheck(selectedAnswer) {
answered = true;
if (answer == 9) {
if (answer == selectedAnswer) {
answerFunc(true);
} else {
answerFunc(false);
}
} else if (answer == selectedAnswer) {
answerFunc(false);
} else {
answerFunc(true);
}
}
function answerFunc(isCorrect) {
if (isCorrect) {
score = score + addedScore;
cirno_mc.gotoAndStop(2);
correctSE.start();
} else {
gotoAndPlay ("gameover");
}
}
stop();
var gameCount = 0;
var score = 0;
var addedScore = 0;
var num1 = 0;
var num2 = 0;
var answer = 0;
var dummy = 0;
var answered = false;
var LEVELUPCOUNT = 20;
var bgmCount = 0;
var mainSound = new Array(5);
var soundNameArray = new Array("180.wav", "200.wav", "240.wav", "300.wav", "360.wav");
var k = 0;
while (k < 5) {
mainSound[k] = new Array(2);
var i = 0;
while (i < 2) {
mainSound[k][i] = new Sound(_root);
mainSound[k][i].attachSound(soundNameArray[k]);
i++;
}
k++;
}
var correctSE = new Sound(this);
correctSE.attachSound("correct.wav");
Symbol 64 MovieClip Frame 11
num1 = Math.floor(Math.random() * 8) + 1;
if (Math.random() < 0.2) {
num2 = 9 - num1;
} else {
num2 = Math.floor(Math.random() * (8 - num1)) + 1;
}
answer = num1 + num2;
do {
dummy = Math.floor(Math.random() * 7) + 2;
} while (dummy == answer);
if (Math.random() < 0.5) {
var tmp = num1;
num1 = num2;
num2 = tmp;
}
answered = false;
cirno_mc.gotoAndStop(1);
gameCount++;
if ((gameCount % 4) == 1) {
bgmCount = (bgmCount + 1) % 2;
mainSound[0][bgmCount].start();
}
Symbol 64 MovieClip Frame 41
if (Math.random() < 0.5) {
ans1_mc.num = answer;
ans2_mc.num = dummy;
} else {
ans1_mc.num = dummy;
ans2_mc.num = answer;
}
addedScore = 5;
Instance of Symbol 52 MovieClip "ans1_mc" in Symbol 64 MovieClip Frame 41
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Instance of Symbol 52 MovieClip "ans2_mc" in Symbol 64 MovieClip Frame 41
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Symbol 64 MovieClip Frame 56
addedScore = 4;
Symbol 64 MovieClip Frame 66
addedScore = 3;
Symbol 64 MovieClip Frame 76
addedScore = 2;
Symbol 64 MovieClip Frame 85
addedScore = 1;
Symbol 64 MovieClip Frame 90
if (answered) {
if (gameCount >= LEVELUPCOUNT) {
gotoAndPlay ("start200");
} else {
gotoAndPlay ("start180");
}
} else {
gotoAndPlay ("gameover");
}
Symbol 64 MovieClip Frame 101
num1 = Math.floor(Math.random() * 8) + 1;
if (Math.random() < 0.2) {
num2 = 9 - num1;
} else {
num2 = Math.floor(Math.random() * (8 - num1)) + 1;
}
answer = num1 + num2;
do {
dummy = Math.floor(Math.random() * 7) + 2;
} while (dummy == answer);
if (Math.random() < 0.5) {
var tmp = num1;
num1 = num2;
num2 = tmp;
}
answered = false;
cirno_mc.gotoAndStop(1);
gameCount++;
if ((gameCount % 4) == 1) {
bgmCount = (bgmCount + 1) % 2;
mainSound[1][bgmCount].start();
}
Symbol 64 MovieClip Frame 128
if (Math.random() < 0.5) {
ans1_mc.num = answer;
ans2_mc.num = dummy;
} else {
ans1_mc.num = dummy;
ans2_mc.num = answer;
}
addedScore = 5;
Instance of Symbol 52 MovieClip "ans1_mc" in Symbol 64 MovieClip Frame 128
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Instance of Symbol 52 MovieClip "ans2_mc" in Symbol 64 MovieClip Frame 128
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Symbol 64 MovieClip Frame 141
addedScore = 4;
Symbol 64 MovieClip Frame 150
addedScore = 3;
Symbol 64 MovieClip Frame 159
addedScore = 2;
Symbol 64 MovieClip Frame 168
addedScore = 1;
Symbol 64 MovieClip Frame 172
if (answered) {
if (gameCount >= (LEVELUPCOUNT * 2)) {
gotoAndPlay ("start240");
} else {
gotoAndPlay ("start200");
}
} else {
gotoAndPlay ("gameover");
}
Symbol 64 MovieClip Frame 181
num1 = Math.floor(Math.random() * 8) + 1;
if (Math.random() < 0.2) {
num2 = 9 - num1;
} else {
num2 = Math.floor(Math.random() * (8 - num1)) + 1;
}
answer = num1 + num2;
do {
dummy = Math.floor(Math.random() * 7) + 2;
} while (dummy == answer);
if (Math.random() < 0.5) {
var tmp = num1;
num1 = num2;
num2 = tmp;
}
answered = false;
cirno_mc.gotoAndStop(1);
gameCount++;
if ((gameCount % 4) == 1) {
bgmCount = (bgmCount + 1) % 2;
mainSound[2][bgmCount].start();
}
Symbol 64 MovieClip Frame 203
if (Math.random() < 0.5) {
ans1_mc.num = answer;
ans2_mc.num = dummy;
} else {
ans1_mc.num = dummy;
ans2_mc.num = answer;
}
addedScore = 5;
Instance of Symbol 52 MovieClip "ans1_mc" in Symbol 64 MovieClip Frame 203
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Instance of Symbol 52 MovieClip "ans2_mc" in Symbol 64 MovieClip Frame 203
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Symbol 64 MovieClip Frame 214
addedScore = 4;
Symbol 64 MovieClip Frame 221
addedScore = 3;
Symbol 64 MovieClip Frame 229
addedScore = 2;
Symbol 64 MovieClip Frame 236
addedScore = 1;
Symbol 64 MovieClip Frame 240
if (answered) {
if (gameCount >= (LEVELUPCOUNT * 4)) {
gotoAndPlay ("start300");
} else {
gotoAndPlay ("start240");
}
} else {
gotoAndPlay ("gameover");
}
Symbol 64 MovieClip Frame 251
num1 = Math.floor(Math.random() * 8) + 1;
if (Math.random() < 0.2) {
num2 = 9 - num1;
} else {
num2 = Math.floor(Math.random() * (8 - num1)) + 1;
}
answer = num1 + num2;
do {
dummy = Math.floor(Math.random() * 7) + 2;
} while (dummy == answer);
if (Math.random() < 0.5) {
var tmp = num1;
num1 = num2;
num2 = tmp;
}
answered = false;
cirno_mc.gotoAndStop(1);
gameCount++;
if ((gameCount % 4) == 1) {
bgmCount = (bgmCount + 1) % 2;
mainSound[3][bgmCount].start();
}
Symbol 64 MovieClip Frame 269
if (Math.random() < 0.5) {
ans1_mc.num = answer;
ans2_mc.num = dummy;
} else {
ans1_mc.num = dummy;
ans2_mc.num = answer;
}
addedScore = 5;
Instance of Symbol 52 MovieClip "ans1_mc" in Symbol 64 MovieClip Frame 269
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Instance of Symbol 52 MovieClip "ans2_mc" in Symbol 64 MovieClip Frame 269
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Symbol 64 MovieClip Frame 278
addedScore = 4;
Symbol 64 MovieClip Frame 284
addedScore = 3;
Symbol 64 MovieClip Frame 290
addedScore = 2;
Symbol 64 MovieClip Frame 295
addedScore = 1;
Symbol 64 MovieClip Frame 298
if (answered) {
if (gameCount >= (LEVELUPCOUNT * 8)) {
gotoAndPlay ("start360");
} else {
gotoAndPlay ("start300");
}
} else {
gotoAndPlay ("gameover");
}
Symbol 64 MovieClip Frame 301
num1 = Math.floor(Math.random() * 8) + 1;
if (Math.random() < 0.2) {
num2 = 9 - num1;
} else {
num2 = Math.floor(Math.random() * (8 - num1)) + 1;
}
answer = num1 + num2;
do {
dummy = Math.floor(Math.random() * 7) + 2;
} while (dummy == answer);
if (Math.random() < 0.5) {
var tmp = num1;
num1 = num2;
num2 = tmp;
}
answered = false;
cirno_mc.gotoAndStop(1);
gameCount++;
if ((gameCount % 4) == 1) {
bgmCount = (bgmCount + 1) % 2;
mainSound[4][bgmCount].start();
}
Symbol 64 MovieClip Frame 316
if (Math.random() < 0.5) {
ans1_mc.num = answer;
ans2_mc.num = dummy;
} else {
ans1_mc.num = dummy;
ans2_mc.num = answer;
}
addedScore = 5;
Instance of Symbol 52 MovieClip "ans1_mc" in Symbol 64 MovieClip Frame 316
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Instance of Symbol 52 MovieClip "ans2_mc" in Symbol 64 MovieClip Frame 316
on (release) {
pressedFunc();
_parent.ans1_mc.pressedFunc = undefined;
_parent.ans2_mc.pressedFunc = undefined;
_parent.ans1_mc.num = "";
_parent.ans2_mc.num = "";
}
onClipEvent (load) {
pressedFunc = function () {
_parent.answerCheck(this.num);
};
}
Symbol 64 MovieClip Frame 323
addedScore = 4;
Symbol 64 MovieClip Frame 328
addedScore = 3;
Symbol 64 MovieClip Frame 333
addedScore = 2;
Symbol 64 MovieClip Frame 338
addedScore = 1;
Symbol 64 MovieClip Frame 340
if (answered) {
gotoAndPlay ("start360");
} else {
gotoAndPlay ("gameover");
}
Symbol 64 MovieClip Frame 349
stopAllSounds();
_root.score_so.data.highscore = Math.max(_root.score_so.data.highscore, score);
highscore = _root.score_so.data.highscore;
if (gameCount > 100) {
omakeVisible = true;
} else {
omakeVisible = false;
}
Symbol 64 MovieClip Frame 438
gotoAndStop ("title");