Frame 1
stop();
Stage.showMenu = false;
this.onEnterFrame = function () {
loaded = this.getBytesLoaded();
total = this.getBytesTotal();
loaded_txt.text = int((loaded / total) * 100) + "%";
if (loaded == total) {
delete this.onEnterFrame;
nextFrame();
}
};
Frame 2
stop();
score = 0;
play_btn.onRelease = function () {
play();
};
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);
};
replay_btn.onRelease = function () {
Key.removeListener(keyListener);
gotoAndStop (2);
};
checkLight = function (num) {
if (compTurn) {
return(undefined);
}
thisNum = Number(tempSeq_array.shift());
if (thisNum != num) {
gotoAndPlay (65);
} else 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++;
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);
Frame 160
stop();
Symbol 17 Button
on (press) {
getURL ("http://www.winterrowd.com", "_top");
}
Symbol 24 MovieClip Frame 1
stop();
_root.green_btn.enabled = true;
Symbol 24 MovieClip Frame 5
if (_root.score > 14) {
gotoAndStop (1);
}
Symbol 24 MovieClip Frame 6
if (_root.score > 9) {
gotoAndStop (1);
}
Symbol 24 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 32 MovieClip Frame 1
stop();
_root.blue_btn.enabled = true;
Symbol 32 MovieClip Frame 5
if (_root.score > 14) {
gotoAndStop (1);
}
Symbol 32 MovieClip Frame 6
if (_root.score > 9) {
gotoAndStop (1);
}
Symbol 32 MovieClip Frame 8
if (_root.score > 4) {
gotoAndStop (1);
}
Symbol 35 MovieClip Frame 1
stop();
_root.red_btn.enabled = true;
Symbol 35 MovieClip Frame 5
if (_root.score > 14) {
gotoAndStop (1);
}
Symbol 35 MovieClip Frame 6
if (_root.score > 9) {
gotoAndStop (1);
}
Symbol 35 MovieClip Frame 8
if (_root.score > 4) {
gotoAndStop (1);
}
Symbol 48 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 3
stop();
Symbol 48 MovieClip Frame 5
stop();
Symbol 48 MovieClip Frame 7
stop();
Symbol 48 MovieClip Frame 9
stop();
Symbol 55 Button
on (release) {
gotoAndStop (2);
}
Symbol 59 Button
on (press) {
getURL ("http://twitter.com/home?status=Playing+the+best+brain+teaser+game!+Simon+Says!+http://www.winterrowd.com/simon+Via+@Winterrowd", "_blank");
}
Symbol 62 Button
on (press) {
getURL ("http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.winterrowd.com/simon", "_blank");
}
Symbol 70 Button
on (press) {
getURL ("http://www.facebook.com/sharer.php?u=http://www.winterrowd.com/simon&t=Simon+Says", "_blank");
}