Instance of Symbol 16 MovieClip in Frame 1
onClipEvent (load) {
_root.stop();
}
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.play();
}
}
Frame 2
stop();
Frame 650
stop();
Frame 651
stop();
function startroutine() {
var _local1 = _root;
globalmode = 0;
_local1.dialog._y = -100;
_local1.sc.stop();
_local1.ac.stop();
_local1.rc.stop();
_local1.oc.stop();
_local1.pc.stop();
_local1.bkg.stop();
_local1.idiot._y = -100;
_local1.sc.onPress = function () {
pressme("sc");
};
_local1.ac.onPress = function () {
pressme("ac");
};
_local1.rc.onPress = function () {
pressme("rc");
};
_local1.oc.onPress = function () {
pressme("oc");
};
_local1.pc.onPress = function () {
pressme("pc");
};
listener_obj = new Object();
listener_obj.onKeyDown = function () {
switch (String.fromCharCode(Key.getAscii())) {
case "a" :
case "A" :
pressme("rc");
return;
case "s" :
case "S" :
pressme("ac");
return;
case "d" :
case "D" :
pressme("sc");
return;
case "f" :
case "F" :
pressme("oc");
return;
case "g" :
case "G" :
pressme("pc");
}
};
Key.addListener(listener_obj);
ssc1 = new Sound();
sac1 = new Sound();
src1 = new Sound();
soc1 = new Sound();
spc1 = new Sound();
ssc2 = new Sound();
sac2 = new Sound();
src2 = new Sound();
soc2 = new Sound();
spc2 = new Sound();
failure = new Sound();
ssc1.attachSound("a0");
sac1.attachSound("g0");
src1.attachSound("f0");
soc1.attachSound("c0");
spc1.attachSound("d0");
ssc2.attachSound("a1");
sac2.attachSound("g1");
src2.attachSound("f1");
soc2.attachSound("c1");
spc2.attachSound("d1");
failure.attachSound("fail");
levelnum.text = "";
_local1.hiscore.text = "0";
startgame();
}
function startgame() {
var _local1 = _root;
_local1.dialog._y = 51;
_local1.dialog.gametext.text = "Click!";
_local1.dialog.onMouseDown = function () {
var _local1 = _root;
_local1.globalmode = 1;
_local1.dialog._y = -100;
_local1.dialog.onMouseDown = undefined;
seqstring = "";
startsequence();
};
}
function startsequence() {
var _local1 = _root;
seqlength++;
_local1.seqpointer = 0;
levelnum.text = String(seqlength - 1);
if ((seqlength - 1) > highscore) {
highscore = seqlength - 1;
_local1.hiscore.text = highscore;
}
seqstring = String(seqstring + String(Math.floor(Math.random() * 5)));
_local1.cheat.text = seqstring;
if (seqlength > 3) {
speedupbackground();
}
if ((seqlength > 10) && (((seqlength - 1) % 5) == 0)) {
if (_local1.seqcallbackobj == undefined) {
_local1.seqcallbackobj = undefined;
_local1.seqcallbackobj = setInterval(startwipe, 400);
}
} else if (_local1.seqcallbackobj == undefined) {
_local1.seqcallbackobj = undefined;
_local1.seqcallbackobj = setInterval(playnext, initialdelay);
}
}
function speedupbackground() {
var _local1 = _root;
if (backgroundspeed > 250) {
backgroundspeed = Math.floor(backgroundspeed / 2);
} else {
backgroundspeed = backgroundspeed - 20;
}
if (backgroundspeed < 10) {
backgroundspeed = 10;
}
if (_local1.bgcbobj != undefined) {
clearInterval(_local1.bgcbobj);
}
_local1.bgcbobj = undefined;
_local1.bgcbobj = setInterval(flipbackground, backgroundspeed);
}
function flipbackground() {
var _local1 = _root;
if (_local1.bkg._currentframe == 4) {
_local1.bkg.gotoAndStop(1);
} else {
_local1.bkg.nextFrame();
}
}
function stopbackground() {
var _local1 = _root;
_local1.bkg.gotoAndStop(1);
if (_local1.bgcbobj != undefined) {
clearInterval(_local1.bgcbobj);
}
}
function startwipe() {
var _local1 = _root;
clearInterval(_local1.seqcallbackobj);
_local1.seqcallbackobj = undefined;
wipestring = "22103430129";
wipepointer = 0;
_local1.seqcallbackobj = setInterval(dowipe, 70);
}
function dowipe() {
var _local1 = _root;
wipepointer++;
wipelite = wipestring.charAt(wipepointer);
switch (wipelite) {
case "0" :
_local1.ccp = "sc";
ssc1.start();
break;
case "1" :
_local1.ccp = "ac";
sac1.start();
break;
case "2" :
_local1.ccp = "rc";
src1.start();
break;
case "3" :
_local1.ccp = "oc";
soc1.start();
break;
case "4" :
_local1.ccp = "pc";
spc1.start();
break;
case "9" :
}
if (wipelite != "9") {
resetclocks();
_local1[ccp].gotoAndStop(2);
} else {
clearInterval(_local1.seqcallbackobj);
resetclocks();
_local1.seqcallbackobj = undefined;
_local1.seqcallbackobj = setInterval(playnext, initialdelay);
}
}
function playnext() {
var _local1 = _root;
clearInterval(_local1.seqcallbackobj);
_local1.seqcallbackobj = undefined;
currentclock = seqstring.charAt(_local1.seqpointer);
switch (currentclock) {
case "0" :
_local1.ccp = "sc";
ssc1.start();
break;
case "1" :
_local1.ccp = "ac";
sac1.start();
break;
case "2" :
_local1.ccp = "rc";
src1.start();
break;
case "3" :
_local1.ccp = "oc";
soc1.start();
break;
case "4" :
_local1.ccp = "pc";
spc1.start();
}
resetclocks();
darkenotherclocks();
_local1[ccp].gotoAndStop(2);
_local1.seqcallbackobj = setInterval(beepwait, playbackdelay);
}
function darkenotherclocks() {
var _local1 = _root;
if (_local1.ccp != "sc") {
_local1.sc.gotoAndStop(3);
}
if (_local1.ccp != "ac") {
_local1.ac.gotoAndStop(3);
}
if (_local1.ccp != "rc") {
_local1.rc.gotoAndStop(3);
}
if (_local1.ccp != "oc") {
_local1.oc.gotoAndStop(3);
}
if (_local1.ccp != "pc") {
_local1.pc.gotoAndStop(3);
}
}
function resetclocks() {
var _local1 = _root;
_local1.sc.gotoAndStop(1);
_local1.ac.gotoAndStop(1);
_local1.rc.gotoAndStop(1);
_local1.oc.gotoAndStop(1);
_local1.pc.gotoAndStop(1);
}
function beepwait() {
var _local1 = _root;
clearInterval(_local1.seqcallbackobj);
_local1.seqcallbackobj = undefined;
_local1[ccp].gotoAndStop(1);
_local1.seqpointer++;
if ((seqpointer + 1) == seqlength) {
resetclocks();
_local1.dialog._y = 51;
_local1.dialog.gametext.text = "You try it!";
_local1.seqcallbackobj = undefined;
_local1.seqcallbackobj = setInterval(cleartext, 1000);
} else {
_local1.seqcallbackobj = undefined;
_local1.seqcallbackobj = setInterval(playnext, delaybwnotes);
}
}
function cleartext() {
var _local1 = _root;
clearInterval(_local1.seqcallbackobj);
_local1.seqcallbackobj = undefined;
globalmode = 2;
_local1.codepointer = 0;
_local1.dialog._y = -100;
_local1.enterstring = "";
}
function pressme(butan) {
var _local1 = _root;
var _local2 = butan;
if (globalmode == 2) {
if (_local1[_local2].callbackobj == undefined) {
codepointer++;
switch (_local2) {
case "sc" :
_local1.enterstring = _local1.enterstring + "0";
break;
case "ac" :
_local1.enterstring = _local1.enterstring + "1";
break;
case "rc" :
_local1.enterstring = _local1.enterstring + "2";
break;
case "oc" :
_local1.enterstring = _local1.enterstring + "3";
break;
case "pc" :
_local1.enterstring = _local1.enterstring + "4";
}
tempstr = _local1.seqstring.slice(0, _local1.enterstring.length);
if (_local1.enterstring != tempstr) {
losscondition();
} else {
switch (_local2) {
case "sc" :
ssc2.start();
break;
case "ac" :
sac2.start();
break;
case "rc" :
src2.start();
break;
case "oc" :
soc2.start();
break;
case "pc" :
spc2.start();
}
_local1[_local2].gotoAndStop(2);
_local1[_local2].callbackobj = undefined;
_local1[_local2].callbackobj = setInterval(declick, clockflashdelay, _local2);
}
}
}
}
function declick(butan) {
var _local1 = _root;
var _local2 = butan;
_local1[_local2].gotoAndStop(1);
clearInterval(_local1[_local2].callbackobj);
_local1[_local2].callbackobj = undefined;
if ((codepointer + 1) == seqlength) {
globalmode = 3;
verifycode();
}
}
function verifycode() {
if (_root.enterstring == _root.seqstring) {
playbackdelay = playbackdelay - 80;
if (playbackdelay < 320) {
playbackdelay = 320;
}
startsequence();
} else {
losscondition();
}
}
function losscondition() {
var _local1 = _root;
_local1.seqcallbackobj = undefined;
_local1.idiot._y = 120;
globalmode = 4;
failure.start();
failure.onSoundComplete = function () {
var _local1 = _root;
_local1.dialog._y = 51;
stopbackground();
_local1.dialog.gametext.text = "Click to Replay";
_local1.dialog.onMouseDown = function () {
var _local1 = _root;
_local1.globalmode = 1;
_local1.idiot._y = -104;
_local1.dialog._y = -150;
_local1.dialog.onMouseDown = undefined;
seqstring = "";
seqlength = 1;
seqpointer = 0;
codepointer = 0;
delaybwnotes = 30;
initialdelay = 2000;
playbackdelay = 1000;
backgroundspeed = 4000;
ccp = "";
clockflashdelay = 200;
startsequence();
};
};
}
clockflashdelay = 200;
highscore = 0;
delaybwnotes = 30;
initialdelay = 2000;
playbackdelay = 1000;
ccp = "";
backgroundspeed = 4000;
globalmode = 0;
seqlength = 1;
seqpointer = 0;
codepointer = 0;
startroutine();
stop();
Symbol 20 Button
on (release) {
play();
}
Symbol 55 Button
on (release) {
play();
}
Symbol 59 Button
on (press) {
_root.inst._y = 101.3;
}
Symbol 62 Button
on (press) {
_root.inst._y = -200;
}