Frame 1
loading = "LOAD\n" + Math.floor((100 * getBytesLoaded()) / getBytesTotal());
Frame 2
if (getBytesLoaded() < getBytesTotal()) {
gotoAndPlay (1);
}
Frame 3
stop();
Frame 4
count = 0;
counter = 1;
light = 0;
loops = 0;
Frame 5
count++;
if (count == counter) {
eval ("h" + light).gotoAndStop(1);
if (2 < loops) {
gotoAndPlay (7);
}
}
if (counter < count) {
light++;
if (light == 4) {
light = 0;
loops++;
}
eval ("h" + light).gotoAndStop(2);
count = 0;
}
Frame 6
gotoAndPlay (5);
Frame 7
count = 0;
counter = 5;
seq = [];
notes = 0;
noteCount = 0;
hitFlag = 1;
hitCount = 0;
hitIndex = -1;
keyFlag = 1;
Frame 8
if (Key.isdown(Key.ESCAPE)) {
getURL ("simon.html");
}
if (keyFlag == 1) {
if (Key.isdown(Key.UP)) {
hitIndex = 0;
h0.gotoAndStop(3);
} else if (Key.isdown(Key.DOWN)) {
hitIndex = 2;
h2.gotoAndStop(3);
} else if (Key.isdown(Key.LEFT)) {
hitIndex = 3;
h3.gotoAndStop(3);
} else if (Key.isdown(Key.RIGHT)) {
hitIndex = 1;
h1.gotoAndStop(3);
}
if (-1 < hitIndex) {
keyFlag = 0;
}
}
if (((((keyFlag == 2) && (!Key.isdown(Key.UP))) && (!Key.isdown(Key.DOWN))) && (!Key.isdown(Key.LEFT))) && (!Key.isdown(Key.RIGHT))) {
keyFlag = 1;
h0.gotoAndStop(1);
h1.gotoAndStop(1);
h2.gotoAndStop(1);
h3.gotoAndStop(1);
}
if (0 < hitFlag) {
count++;
if (count >= counter) {
if (count == counter) {
if (0 < seq.length) {
eval ("h" + seq[noteCount]).gotoAndStop(1);
if (hitFlag == 2) {
count = -6;
noteCount = -1;
hitFlag = -1;
} else {
noteCount++;
}
}
} else {
if (noteCount < notes) {
count = 0;
} else {
seq[notes] = Math.floor(Math.random() * 4);
notes++;
hitFlag = 2;
}
eval ("h" + seq[noteCount]).gotoAndStop(3);
}
}
} else if (hitFlag == -1) {
hitFlag = -2;
hitCount = 0;
hit.gotoAndStop(2);
} else if (-1 < hitIndex) {
if (seq[hitCount] == hitIndex) {
hitCount++;
hitIndex = -1;
keyFlag = 2;
if (hitCount == notes) {
hitFlag = 1;
hit.gotoAndStop(1);
eval ("h" + seq[hitCount - 1]).gotoAndStop(1);
}
} else {
gotoAndPlay (10);
}
}
Frame 9
gotoAndPlay (8);
Frame 10
score = notes;
Frame 11
if ((Key.isdown(78) || (Key.isdown(110))) || (Key.isdown(Key.ESCAPE))) {
getURL ("simon.html");
} else if (Key.isdown(89) || (Key.isdown(121))) {
gotoAndPlay (7);
}
Frame 12
gotoAndPlay (11);
Symbol 6 Button
on (release) {
_parent.gotoAndPlay("game");
}
Symbol 11 MovieClip Frame 1
text._x--;
if ((text._x + text._width) < 0) {
gotoAndPlay (3);
}
Symbol 11 MovieClip Frame 2
gotoAndPlay (1);
Symbol 11 MovieClip Frame 3
stop();
Symbol 15 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 2
stop();
Symbol 15 MovieClip Frame 3
stop();
Symbol 19 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 2
stop();
Symbol 19 MovieClip Frame 3
stop();
Symbol 23 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 2
stop();
Symbol 23 MovieClip Frame 3
stop();
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 2
stop();
Symbol 27 MovieClip Frame 3
stop();
Symbol 29 Button
on (rollOut, dragOut) {
_parent.h0.gotoAndstop(1);
}
on (press) {
_parent.h0.gotoAndstop(3);
}
on (release) {
_parent.h0.gotoAndstop(1);
_parent.hitIndex = 0;
}
Symbol 30 Button
on (rollOut, dragOut) {
_parent.h1.gotoAndstop(1);
}
on (press) {
_parent.h1.gotoAndstop(3);
}
on (release) {
_parent.h1.gotoAndstop(1);
_parent.hitIndex = 1;
}
Symbol 31 Button
on (rollOut, dragOut) {
_parent.h2.gotoAndstop(1);
}
on (press) {
_parent.h2.gotoAndstop(3);
}
on (release) {
_parent.h2.gotoAndstop(1);
_parent.hitIndex = 2;
}
Symbol 32 Button
on (rollOut, dragOut) {
_parent.h3.gotoAndstop(1);
}
on (press) {
_parent.h3.gotoAndstop(3);
}
on (release) {
_parent.h3.gotoAndstop(1);
_parent.hitIndex = 3;
}
Symbol 33 MovieClip Frame 1
stop();
Symbol 33 MovieClip Frame 2
stop();
Symbol 37 Button
on (release) {
gotoAndPlay (7);
}
Symbol 40 Button
on (release) {
getURL ("simon.html");
}