Frame 1
stop();
Stage.showMenu = false;
this.onEnterFrame = function () {
sofar = this.getBytesLoaded();
total = this.getBytesTotal();
pc_txt.text = int((sofar / total) * 100) + "%";
if (sofar == total) {
delete this.onEnterFrame;
nextFrame();
}
};
Frame 2
stop();
game_so = SharedObject.getLocal("neaveSimon");
if (highScore == undefined) {
highScore = Number(game_so.data.highScore);
}
score = 0;
play_btn.onRelease = function () {
play();
};
neave_btn.onRelease = function () {
getURL ("http://www.neave.com/games/", "_blank");
};
Frame 18
init = function () {
green_btn.enabled = (yellow_btn.enabled = (blue_btn.enabled = (red_btn.enabled = false)));
seq_array = new Array();
tempSeq_array = new Array();
compTurn = false;
};
green_btn.onPress = function () {
this.enabled = false;
checkLight(0);
};
yellow_btn.onPress = function () {
this.enabled = false;
checkLight(1);
};
blue_btn.onPress = function () {
this.enabled = false;
checkLight(2);
};
red_btn.onPress = function () {
this.enabled = false;
checkLight(3);
};
quit_btn.onRelease = function () {
Key.removeListener(keyListener);
gotoAndStop (2);
};
checkLight = function (num) {
if (compTurn) {
return(undefined);
}
thisNum = Number(tempSeq_array.shift());
if (thisNum != num) {
init();
light_mc.gotoAndPlay(10);
_root[thisNum].nextFrame();
gotoAndPlay (19);
sound_mc.gotoAndPlay(10);
return(undefined);
}
if (tempSeq_array.length == 0) {
green_btn.enabled = (yellow_btn.enabled = (blue_btn.enabled = (red_btn.enabled = false)));
light_mc.gotoAndPlay(1);
simon_mc.gotoAndPlay(2);
score++;
if (score > highScore) {
game_so.data.highScore = (highScore = score);
}
gotoAndPlay (53);
}
if (_root[num]._currentframe == 1) {
sound_mc.gotoAndPlay((num * 2) + 2);
_root[num].play();
}
};
keyListener = new Object();
keyListener.onKeyDown = function () {
switch (String.fromCharCode(Key.getCode())) {
case "G" :
if (green_btn.enabled) {
green_btn.onPress();
}
return;
case "Y" :
if (yellow_btn.enabled) {
yellow_btn.onPress();
}
return;
case "B" :
if (blue_btn.enabled) {
blue_btn.onPress();
}
return;
case "R" :
if (red_btn.enabled) {
red_btn.onPress();
}
return;
case "Q" :
Key.removeListener(keyListener);
gotoAndStop (2);
}
};
Key.addListener(keyListener);
score = 0;
init();
gotoAndPlay (53);
Frame 50
score = 0;
var l = 0;
while (l < 4) {
_root[l].gotoAndStop(1);
l++;
}
Frame 53
if (compTurn) {
if (tempSeq_array.length) {
thisNum = Number(tempSeq_array.shift());
sound_mc.gotoAndPlay((thisNum * 2) + 2);
_root[thisNum].play();
} else {
stop();
compTurn = false;
tempSeq_array = seq_array.slice();
green_btn.enabled = (yellow_btn.enabled = (blue_btn.enabled = (red_btn.enabled = true)));
}
} else {
seq_array.push(int(Math.random() * 4));
tempSeq_array = seq_array.slice();
compTurn = true;
}
Frame 57
if (score > 19) {
gotoAndPlay (53);
}
Frame 58
if (score > 14) {
gotoAndPlay (53);
}
Frame 60
if (score > 9) {
gotoAndPlay (53);
}
Frame 62
if (score > 4) {
gotoAndPlay (53);
}
Frame 64
gotoAndPlay (53);
Symbol 16 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 1
stop();
_root.green_btn.enabled = true;
Symbol 22 MovieClip Frame 5
if (_root.score > 14) {
gotoAndStop (1);
}
Symbol 22 MovieClip Frame 6
if (_root.score > 9) {
gotoAndStop (1);
}
Symbol 22 MovieClip Frame 8
if (_root.score > 4) {
gotoAndStop (1);
}
Symbol 29 MovieClip Frame 1
stop();
_root.yellow_btn.enabled = true;
Symbol 29 MovieClip Frame 5
if (_root.score > 14) {
gotoAndStop (1);
}
Symbol 29 MovieClip Frame 6
if (_root.score > 9) {
gotoAndStop (1);
}
Symbol 29 MovieClip Frame 8
if (_root.score > 4) {
gotoAndStop (1);
}
Symbol 34 MovieClip Frame 1
stop();
_root.blue_btn.enabled = true;
Symbol 34 MovieClip Frame 5
if (_root.score > 14) {
gotoAndStop (1);
}
Symbol 34 MovieClip Frame 6
if (_root.score > 9) {
gotoAndStop (1);
}
Symbol 34 MovieClip Frame 8
if (_root.score > 4) {
gotoAndStop (1);
}
Symbol 38 MovieClip Frame 1
stop();
_root.red_btn.enabled = true;
Symbol 38 MovieClip Frame 5
if (_root.score > 14) {
gotoAndStop (1);
}
Symbol 38 MovieClip Frame 6
if (_root.score > 9) {
gotoAndStop (1);
}
Symbol 38 MovieClip Frame 8
if (_root.score > 4) {
gotoAndStop (1);
}
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 9
gotoAndStop (1);
Symbol 41 MovieClip Frame 44
gotoAndStop (1);
Symbol 57 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 3
stop();
Symbol 57 MovieClip Frame 5
stop();
Symbol 57 MovieClip Frame 7
stop();
Symbol 57 MovieClip Frame 9
stop();