Section 1
//png (cian.png)
package cian {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package cian
Section 2
//wav (error.wav)
package error {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package error
Section 3
//MainTimeline (genius5_fla.MainTimeline)
package genius5_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var bPlayerTurn:Boolean;
public var but0_mc:botao2;
public var highScore:TextField;
public var nPointer:Number;
public var but3_mc:mcYellowBut;
public var error_mc:mcError;
public var quitBut_mc:MovieClip;
public var led2_mc:ledCyanMc;
public var genius_mc:mcSprite;
public var aSequencer:Array;
public var PreLoader:mcPreLoad;
public var playBut_mc:MovieClip;
public var but1_mc:mcRedBut;
public var led0_mc:greenLed;
public var nRange:Number;
public var score:TextField;
public var audio1_mc:MovieClip;
public var fase:TextField;
public var audio2_mc:MovieClip;
public var iScore:Number;
public var led3_mc:ledYellowMc;
public var info:TextField;
public var myBestScore:SharedObject;
public var but2_mc:Botao3;
public var placar:TextField;
public var audio0_mc:MovieClip;
public var myBut_mc:MovieClip;
public var led1_mc:ledRed_mc;
public var audio3_mc:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2);
}
public function quitNow(_arg1:Event):void{
gameOver();
iScore = 0;
info.text = "Press Start to Play";
}
public function UpdateProgress(_arg1:Number):void{
PreLoader.output_TF.text = ("Loading: " + String((Math.floor((_arg1 * 100)) + "%")));
playBut_mc.addEventListener(MouseEvent.CLICK, playButClick);
playBut_mc.alpha = 1;
playBut_mc.buttonMode = true;
}
public function playSequence():void{
var ledTime:Timer;
var cCurrentLed:Number;
var playLed:Function;
playLed = function (_arg1:TimerEvent){
trace((aSequencer[cCurrentLed] + 2));
root[(("led" + aSequencer[cCurrentLed]) + "_mc")].gotoAndPlay(1);
root[(("audio" + aSequencer[cCurrentLed]) + "_mc")].gotoAndPlay(1);
if (cCurrentLed == (aSequencer.length - 1)){
ledTime.removeEventListener(TimerEvent.TIMER, playLed);
cCurrentLed = 0;
genius_mc.gotoAndStop(1);
delayCall("playerTime", 1000);
} else {
cCurrentLed++;
};
};
info.text = "CPU Turn";
ledTime = new Timer(500);
cCurrentLed = 0;
ledTime.addEventListener(TimerEvent.TIMER, playLed);
ledTime.start();
}
function frame1(){
stop();
playBut_mc.alpha = 0;
addEventListener(Event.ENTER_FRAME, handleProgress);
myBestScore = SharedObject.getLocal("bestScore");
if (!myBestScore.data.highScore){
myBestScore.data.highScore = 0;
myBestScore.flush();
} else {
placar.text = (("Your High-Score is: " + String(myBestScore.data.highScore)) + " points");
};
}
public function handleProgress(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = root.loaderInfo.bytesLoaded;
_local3 = root.loaderInfo.bytesTotal;
_local4 = (_local2 / _local3);
UpdateProgress(_local4);
if (_local2 >= _local3){
removeEventListener(Event.ENTER_FRAME, handleProgress);
};
}
public function compTime():void{
fase.text = ("Level: " + (aSequencer.length + 1));
but0_mc.removeEventListener(MouseEvent.CLICK, compareEntry);
but1_mc.removeEventListener(MouseEvent.CLICK, compareEntry);
but2_mc.removeEventListener(MouseEvent.CLICK, compareEntry);
but3_mc.removeEventListener(MouseEvent.CLICK, compareEntry);
but0_mc.buttonMode = false;
but1_mc.buttonMode = false;
but2_mc.buttonMode = false;
but3_mc.buttonMode = false;
aSequencer.push(addEntry(nRange));
delayCall("playSequence", 1500);
}
public function addEntry(_arg1:Number):Number{
return (Math.round((Math.random() * _arg1)));
}
public function tempEval(_arg1:Event){
iScore = 0;
score.text = "Score: 0";
info.text = "Ready...";
compTime();
myBut_mc.removeEventListener(MouseEvent.CLICK, tempEval);
myBut_mc.buttonMode = false;
quitBut_mc.addEventListener(MouseEvent.CLICK, quitNow);
quitBut_mc.buttonMode = true;
}
public function compareEntry(_arg1:Event):void{
root[(("led" + _arg1.target.valor) + "_mc")].gotoAndPlay(1);
root[(("audio" + _arg1.target.valor) + "_mc")].gotoAndPlay(1);
if (_arg1.target.valor == aSequencer[nPointer]){
iScore++;
score.text = ("Score: " + iScore);
checkHighScore();
highScore.text = ("High-Score: " + String(myBestScore.data.highScore));
trace(myBestScore.data.highScore);
if (nPointer == (aSequencer.length - 1)){
compTime();
nPointer = 0;
} else {
nPointer++;
};
} else {
gameOver();
};
}
public function playerTime():void{
info.text = "Your Turn";
bPlayerTurn = true;
but0_mc.addEventListener(MouseEvent.CLICK, compareEntry);
but1_mc.addEventListener(MouseEvent.CLICK, compareEntry);
but2_mc.addEventListener(MouseEvent.CLICK, compareEntry);
but3_mc.addEventListener(MouseEvent.CLICK, compareEntry);
but0_mc.buttonMode = true;
but1_mc.buttonMode = true;
but2_mc.buttonMode = true;
but3_mc.buttonMode = true;
}
function frame2(){
stop();
aSequencer = new Array();
nRange = 3;
nPointer = 0;
bPlayerTurn = false;
iScore = 0;
highScore.text = ("High-Score: " + String(myBestScore.data.highScore));
but0_mc.valor = 0;
but1_mc.valor = 1;
but2_mc.valor = 2;
but3_mc.valor = 3;
info.text = "Press Start to Play";
score.text = "Score: 0";
myBut_mc.addEventListener(MouseEvent.CLICK, tempEval);
myBut_mc.buttonMode = true;
}
public function delayCall(_arg1:String, _arg2:Number):void{
var delayTime:Timer;
var callNow:Function;
var functionName = _arg1;
var dTime = _arg2;
callNow = function (_arg1:TimerEvent):void{
var _local2 = root;
_local2[functionName]();
};
delayTime = new Timer(dTime, 1);
delayTime.addEventListener(TimerEvent.TIMER, callNow);
delayTime.start();
}
public function gameOver():void{
info.text = "GAME OVER";
but0_mc.removeEventListener(MouseEvent.CLICK, compareEntry);
but1_mc.removeEventListener(MouseEvent.CLICK, compareEntry);
but2_mc.removeEventListener(MouseEvent.CLICK, compareEntry);
but3_mc.removeEventListener(MouseEvent.CLICK, compareEntry);
but0_mc.buttonMode = false;
but1_mc.buttonMode = false;
but2_mc.buttonMode = false;
but3_mc.buttonMode = false;
nPointer = 0;
aSequencer = new Array();
myBut_mc.addEventListener(MouseEvent.CLICK, tempEval);
myBut_mc.buttonMode = true;
error_mc.gotoAndPlay(1);
}
public function checkHighScore():void{
trace(("iscore: " + iScore));
trace(("cookie: " + myBestScore.data.highScore));
if (iScore > myBestScore.data.highScore){
myBestScore.data.highScore = iScore;
myBestScore.flush();
trace("iscore é maior");
};
}
public function playButClick(_arg1:Event):void{
gotoAndPlay(2);
}
}
}//package genius5_fla
Section 4
//nota0_8 (genius5_fla.nota0_8)
package genius5_fla {
import flash.display.*;
public dynamic class nota0_8 extends MovieClip {
public function nota0_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package genius5_fla
Section 5
//nota1_9 (genius5_fla.nota1_9)
package genius5_fla {
import flash.display.*;
public dynamic class nota1_9 extends MovieClip {
public function nota1_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package genius5_fla
Section 6
//nota2_10 (genius5_fla.nota2_10)
package genius5_fla {
import flash.display.*;
public dynamic class nota2_10 extends MovieClip {
public function nota2_10(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package genius5_fla
Section 7
//nota3_11 (genius5_fla.nota3_11)
package genius5_fla {
import flash.display.*;
public dynamic class nota3_11 extends MovieClip {
public function nota3_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package genius5_fla
Section 8
//png (green.png)
package green {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package green
Section 9
//wav (led0.wav)
package led0 {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package led0
Section 10
//wav (led1.wav)
package led1 {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package led1
Section 11
//wav (led2.wav)
package led2 {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package led2
Section 12
//wav (led3.wav)
package led3 {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package led3
Section 13
//png (normal.png)
package normal {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package normal
Section 14
//png (red.png)
package red {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package red
Section 15
//png (yellow.png)
package yellow {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package yellow
Section 16
//Bitmap12 (Bitmap12)
package {
import flash.display.*;
public dynamic class Bitmap12 extends BitmapData {
public function Bitmap12(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 17
//Bitmap13 (Bitmap13)
package {
import flash.display.*;
public dynamic class Bitmap13 extends BitmapData {
public function Bitmap13(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 18
//Bitmap14 (Bitmap14)
package {
import flash.display.*;
public dynamic class Bitmap14 extends BitmapData {
public function Bitmap14(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 19
//Bitmap15 (Bitmap15)
package {
import flash.display.*;
public dynamic class Bitmap15 extends BitmapData {
public function Bitmap15(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 20
//Bitmap16 (Bitmap16)
package {
import flash.display.*;
public dynamic class Bitmap16 extends BitmapData {
public function Bitmap16(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 21
//Bitmap18 (Bitmap18)
package {
import flash.display.*;
public dynamic class Bitmap18 extends BitmapData {
public function Bitmap18(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 22
//Bitmap19 (Bitmap19)
package {
import flash.display.*;
public dynamic class Bitmap19 extends BitmapData {
public function Bitmap19(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 23
//Bitmap20 (Bitmap20)
package {
import flash.display.*;
public dynamic class Bitmap20 extends BitmapData {
public function Bitmap20(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 24
//Bitmap21 (Bitmap21)
package {
import flash.display.*;
public dynamic class Bitmap21 extends BitmapData {
public function Bitmap21(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 25
//Bitmap24 (Bitmap24)
package {
import flash.display.*;
public dynamic class Bitmap24 extends BitmapData {
public function Bitmap24(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 26
//Bitmap25 (Bitmap25)
package {
import flash.display.*;
public dynamic class Bitmap25 extends BitmapData {
public function Bitmap25(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 27
//Botao (Botao)
package {
import flash.display.*;
public class Botao extends MovieClip {
private var _nValue:Number;// = 0
public function Botao(){
_nValue = 0;
super();
}
public function set valor(_arg1:Number):void{
_nValue = _arg1;
}
public function get valor():Number{
return (_nValue);
}
}
}//package
Section 28
//botao2 (botao2)
package {
public dynamic class botao2 extends Botao {
public function botao2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 29
//Botao3 (Botao3)
package {
public dynamic class Botao3 extends Botao {
public function Botao3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 30
//greenLed (greenLed)
package {
import flash.display.*;
public dynamic class greenLed extends MovieClip {
public function greenLed(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 31
//ledCyanMc (ledCyanMc)
package {
import flash.display.*;
public dynamic class ledCyanMc extends MovieClip {
public function ledCyanMc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 32
//ledRed_mc (ledRed_mc)
package {
import flash.display.*;
public dynamic class ledRed_mc extends MovieClip {
public function ledRed_mc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 33
//ledYellowMc (ledYellowMc)
package {
import flash.display.*;
public dynamic class ledYellowMc extends MovieClip {
public function ledYellowMc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 34
//mcError (mcError)
package {
import flash.display.*;
public dynamic class mcError extends MovieClip {
public function mcError(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 35
//mcPreLoad (mcPreLoad)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcPreLoad extends MovieClip {
public var output_TF:TextField;
}
}//package
Section 36
//mcRedBut (mcRedBut)
package {
public dynamic class mcRedBut extends Botao {
public function mcRedBut(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 37
//mcSprite (mcSprite)
package {
import flash.display.*;
public dynamic class mcSprite extends MovieClip {
public function mcSprite(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 38
//mcYellowBut (mcYellowBut)
package {
public dynamic class mcYellowBut extends Botao {
public function mcYellowBut(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package