Frame 1
stop();
var mymenu = new ContextMenu();
mymenu.hideBuiltInItems();
_root.menu = mymenu;
var bpm = 200;
Frame 2
var score_so = SharedObject.getLocal("highscore");
if (score_so.data.highscore == undefined) {
score_so.data.highscore = 0;
}
if (score_so.data.highscore_ex == undefined) {
score_so.data.highscore_ex = 0;
}
game_mc.highscore = score_so.data.highscore;
Frame 3
\u30DC\u30BF\u30F329._accProps = new Object();
\u30DC\u30BF\u30F329._accProps.silent = true;
gotoAndStop (2);
Symbol 12 MovieClip [onpuCorrect] Frame 1
stop();
Symbol 12 MovieClip [onpuCorrect] Frame 2
stop();
Symbol 12 MovieClip [onpuCorrect] Frame 3
stop();
Symbol 12 MovieClip [onpuCorrect] Frame 4
stop();
Symbol 13 MovieClip [onpuTyped] Frame 1
stop();
Symbol 13 MovieClip [onpuTyped] Frame 2
stop();
Symbol 13 MovieClip [onpuTyped] Frame 3
stop();
Symbol 13 MovieClip [onpuTyped] Frame 4
stop();
Symbol 14 MovieClip [onpuSample] Frame 1
stop();
Symbol 14 MovieClip [onpuSample] Frame 2
stop();
Symbol 14 MovieClip [onpuSample] Frame 3
stop();
Symbol 14 MovieClip [onpuSample] Frame 4
stop();
Symbol 31 MovieClip Frame 1
onEnterFrame = function () {
if (Key.isDown(83)) {
delete onEnterFrame;
_parent.isAutoMode = false;
_parent.gotoAndPlay("game");
} else if (Key.isDown(65)) {
delete onEnterFrame;
_parent.isAutoMode = true;
_parent.gotoAndPlay("game");
}
};
Symbol 33 Button
on (release) {
if (!_parent.isGameOver) {
return(undefined);
}
if (_root.bpm == 200) {
_root.bpm = 300;
_parent.highscore = _root.score_so.data.highscore_ex;
gotoAndStop (2);
} else {
_root.bpm = 200;
_parent.highscore = _root.score_so.data.highscore;
gotoAndStop (1);
}
}
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 2
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 2
stop();
Symbol 53 MovieClip [bpm150] Frame 1
#initclip 2
Object.registerClass("bpm150", Game);
#endinitclip
\u30DC\u30BF\u30F329._accProps = new Object();
\u30DC\u30BF\u30F329._accProps.silent = true;
stop();
this.isGameOver = true;
this.isAutoMode = false;
this.init();
if (_root.bpm == 300) {
highscore = _root.score_so.data.highscore_ex;
rumia.gotoAndStop(2);
} else {
highscore = _root.score_so.data.highscore;
rumia.gotoAndStop(1);
}
Symbol 53 MovieClip [bpm150] Frame 8
stop();
this.startGame(_root.bpm);
Instance of Symbol 47 MovieClip in Symbol 53 MovieClip [bpm150] Frame 8
onClipEvent (enterFrame) {
if (_parent.inputMode) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 50 MovieClip "automode_mc" in Symbol 53 MovieClip [bpm150] Frame 8
onClipEvent (load) {
this._visible = _parent.isAutoMode;
}
Symbol 53 MovieClip [bpm150] Frame 16
this.timing = Game.GOOD;
Symbol 53 MovieClip [bpm150] Frame 18
this.timing = Game.GREAT;
Symbol 53 MovieClip [bpm150] Frame 21
if (!initFlag) {
initFlag = true;
this.init(_root.bpm);
}
if (this.currentPos == 0) {
bgmCount = (bgmCount + 1) % 2;
mainSound[bgmCount].start();
if (!this.inputMode) {
silent_mc.gotoAndPlay(1);
}
}
if ((!this.inputMode) && (!this.sampleDisplayed)) {
this.sampleDisplayed = true;
this.displayOnpu(this.currentPos, this.soundArray[this.currentPos], 0, 0);
this.soundFileArray[this.soundArray[this.currentPos] - 1].start();
}
Symbol 53 MovieClip [bpm150] Frame 25
this.timing = Game.GOOD;
Symbol 53 MovieClip [bpm150] Frame 43
play();
initFlag = false;
if (this.bpm == 200) {
_root.score_so.data.highscore = Math.max(_root.score_so.data.highscore, score);
highscore = _root.score_so.data.highscore;
} else if (this.bpm == 300) {
_root.score_so.data.highscore_ex = Math.max(_root.score_so.data.highscore_ex, score);
highscore = _root.score_so.data.highscore_ex;
}
Instance of Symbol 52 MovieClip in Symbol 53 MovieClip [bpm150] Frame 43
onClipEvent (load) {
if (_parent.score >= 1000) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 53 MovieClip [bpm150] Frame 85
if (score >= 1000) {
this.stop();
this.intervalFunc = function () {
clearInterval(intervalID);
this.play();
};
intervalID = setInterval(this, "intervalFunc", 5000);
}
Symbol 53 MovieClip [bpm150] Frame 154
stop();
_parent.gotoAndStop(3);
Symbol 59 Button
on (release) {
gotoAndStop (2);
}
Symbol 61 MovieClip [__Packages.Game] Frame 0
class Game extends MovieClip
{
var isGameOver, isAutoMode, soundArray, soundFileArray, mainSound, bgmCount, sampleOnpuArray, typedOnpuArray, correctOnpuArray, attachMovie, bpm, gamemode, phraseTime, inputMode, sampleDisplayed, typeFinished, currentPos, currentSound, timing, pressingFlag, greatNum, goodNum, badNum, score, currentTime, previousTime, elapsedTime, eventCount, gotoAndPlay;
function Game () {
super();
}
function init() {
isGameOver = true;
isAutoMode = false;
soundArray = new Array(16);
soundFileArray = new Array(3);
var _local3 = 0;
while (_local3 < 3) {
soundFileArray[_local3] = new Sound(this);
_local3++;
}
soundFileArray[0].attachSound("voice1.wav");
soundFileArray[1].attachSound("voice2.wav");
soundFileArray[2].attachSound("voice3.wav");
mainSound = new Array(2);
_local3 = 0;
while (_local3 < 2) {
mainSound[_local3] = new Array(2);
var _local4 = 0;
while (_local4 < 2) {
mainSound[_local3][_local4] = new Sound(_root);
mainSound[_local3][_local4].attachSound(("main_" + ((2 + _local3) * 100)) + ".wav");
_local4++;
}
_local3++;
}
bgmCount = 0;
sampleOnpuArray = new Array(16);
typedOnpuArray = new Array(16);
correctOnpuArray = new Array(16);
_local3 = 0;
while (_local3 < 16) {
sampleOnpuArray[_local3] = attachMovie("onpuSample", "onpuSample" + _local3, 100 + _local3);
sampleOnpuArray[_local3]._x = _local3 * 40;
sampleOnpuArray[_local3]._y = 0;
sampleOnpuArray[_local3]._visible = false;
typedOnpuArray[_local3] = attachMovie("onpuTyped", "onpuTyped" + _local3, 200 + _local3);
typedOnpuArray[_local3]._x = _local3 * 40;
typedOnpuArray[_local3]._y = 0;
typedOnpuArray[_local3]._visible = false;
correctOnpuArray[_local3] = attachMovie("onpuCorrect", "onpuCorrect" + _local3, 300 + _local3);
correctOnpuArray[_local3]._x = _local3 * 40;
correctOnpuArray[_local3]._y = 0;
correctOnpuArray[_local3]._visible = false;
_local3++;
}
}
function startGame(_bpm) {
bpm = _bpm;
gamemode = ((bpm == 200) ? 0 : 1);
phraseTime = Math.round(60000 / _bpm);
inputMode = false;
isGameOver = false;
sampleDisplayed = false;
typeFinished = false;
currentPos = 0;
currentSound = 0;
timing = GOOD;
pressingFlag = false;
greatNum = 0;
goodNum = 0;
badNum = 0;
score = 0;
setNextPhrase();
currentTime = getTimer();
previousTime = getTimer();
elapsedTime = Math.floor(phraseTime * 0.8);
eventCount = 0;
}
function changeToNextPos() {
sampleDisplayed = false;
currentPos++;
typeFinished = false;
if (currentPos >= 16) {
currentPos = 0;
setModeChange();
}
currentSound = soundArray[currentPos];
}
function setModeChange() {
if (!isAutoMode) {
inputMode = !inputMode;
}
if (inputMode) {
} else {
var _local2 = 0;
while (_local2 < 16) {
sampleOnpuArray[_local2]._visible = false;
typedOnpuArray[_local2]._visible = false;
correctOnpuArray[_local2]._visible = false;
_local2++;
}
setNextPhrase();
}
}
function setNextPhrase() {
var _local2 = 0;
while (_local2 < 16) {
soundArray[_local2] = Math.floor((Math.random() * 7.5) / 2) + 1;
_local2++;
}
soundArray[14] = 2;
soundArray[15] = 3;
}
function onEnterFrame() {
previousTime = currentTime;
currentTime = getTimer();
if (isGameOver) {
return(undefined);
}
elapsedTime = elapsedTime + (currentTime - previousTime);
if ((elapsedTime >= (phraseTime * 0.25)) && (eventCount == 0)) {
timing = GREAT;
eventCount = 1;
}
if ((elapsedTime >= (phraseTime * 0.5)) && (eventCount == 1)) {
if (currentPos == 0) {
bgmCount = (bgmCount + 1) % 2;
mainSound[gamemode][bgmCount].start();
}
if ((!inputMode) && (!sampleDisplayed)) {
sampleDisplayed = true;
displayOnpu(currentPos, soundArray[currentPos], 0, 0);
soundFileArray[soundArray[currentPos] - 1].start();
}
eventCount = 2;
}
if ((elapsedTime >= (phraseTime * 0.75)) && (eventCount == 2)) {
timing = GOOD;
eventCount = 3;
}
if ((elapsedTime >= phraseTime) && (eventCount == 3)) {
if (inputMode) {
keyUntypedCheck();
}
elapsedTime = elapsedTime - phraseTime;
changeToNextPos();
eventCount = 0;
}
if (inputMode) {
var _local3 = 0;
if (Key.isDown(KEY1)) {
_local3 = 1;
} else if (Key.isDown(KEY2)) {
_local3 = 2;
} else if (Key.isDown(KEY3)) {
_local3 = 3;
}
var _local4 = false;
if (_local3 > 0) {
if (!pressingFlag) {
pressingFlag = true;
_local4 = true;
}
} else {
pressingFlag = false;
}
if (_local4) {
soundFileArray[_local3 - 1].start();
}
if (((!typeFinished) && (_local4)) && (_local3 > 0)) {
typeFinished = true;
if (_local3 == currentSound) {
if (timing == GREAT) {
greatNum++;
} else if (timing == GOOD) {
goodNum++;
}
displayOnpu(currentPos, 0, _local3, 0);
} else {
badNum++;
displayOnpu(currentPos, 0, _local3, currentSound);
}
}
}
setScore();
if (badNum >= 20) {
var _local2 = 0;
while (_local2 < 16) {
sampleOnpuArray[_local2]._visible = false;
typedOnpuArray[_local2]._visible = false;
correctOnpuArray[_local2]._visible = false;
_local2++;
}
isGameOver = true;
stopAllSounds();
gotoAndPlay("gameover");
}
}
function keyUntypedCheck() {
if (typeFinished) {
return(undefined);
}
if (currentSound != 4) {
badNum++;
displayOnpu(currentPos, 0, 4, currentSound);
} else {
displayOnpu(currentPos, 0, 4, 0);
}
}
function displayOnpu(pos, sample, typed, correct) {
if (sample != 0) {
sampleOnpuArray[pos].gotoAndStop(sample);
sampleOnpuArray[pos]._visible = true;
}
if (typed != 0) {
typedOnpuArray[pos].gotoAndStop(typed);
typedOnpuArray[pos]._visible = true;
}
if (correct != 0) {
correctOnpuArray[pos].gotoAndStop(correct);
correctOnpuArray[pos]._visible = true;
}
}
function setScore() {
score = (greatNum * 2) + goodNum;
}
static var GREAT = 2;
static var GOOD = 3;
static var BAD = 4;
static var KEY1 = 90;
static var KEY2 = 88;
static var KEY3 = 67;
}