Section 1
//1000p_240 (BrainWorkout_fla.1000p_240)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class 1000p_240 extends MovieClip {
public function 1000p_240(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
stop();
}
}
}//package BrainWorkout_fla
Section 2
//500p_235 (BrainWorkout_fla.500p_235)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class 500p_235 extends MovieClip {
public function 500p_235(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
stop();
}
}
}//package BrainWorkout_fla
Section 3
//animal_animations_301 (BrainWorkout_fla.animal_animations_301)
package BrainWorkout_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class animal_animations_301 extends MovieClip {
public function animal_animations_301(){
addFrameScript(0, frame1, 8, frame9, 17, frame18, 26, frame27, 35, frame36, 44, frame45, 53, frame54, 62, frame63);
}
function frame18(){
if (Object(parent.parent)._finalResult == 3){
stop();
};
}
function frame1(){
if (Object(parent.parent)._finalResult == 1){
stop();
};
}
function frame9(){
if (Object(parent.parent)._finalResult == 2){
stop();
};
}
function frame27(){
if (Object(parent.parent)._finalResult == 4){
stop();
};
}
function frame36(){
if (Object(parent.parent)._finalResult == 5){
stop();
};
}
function frame45(){
if (Object(parent.parent)._finalResult == 6){
stop();
};
}
function frame54(){
if (Object(parent.parent)._finalResult == 7){
stop();
};
}
function frame63(){
if (Object(parent.parent)._finalResult == 8){
stop();
};
}
}
}//package BrainWorkout_fla
Section 4
//bar_individual_263 (BrainWorkout_fla.bar_individual_263)
package BrainWorkout_fla {
import flash.display.*;
import flash.text.*;
public dynamic class bar_individual_263 extends MovieClip {
public var playerName:TextField;
public var rank:TextField;
public var score:TextField;
public function bar_individual_263(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package BrainWorkout_fla
Section 5
//blue_animate_165 (BrainWorkout_fla.blue_animate_165)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class blue_animate_165 extends MovieClip {
public function blue_animate_165(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 6
//blue_glow_164 (BrainWorkout_fla.blue_glow_164)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class blue_glow_164 extends MovieClip {
public var light:MovieClip;
public function blue_glow_164(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 7
//brown_animate_167 (BrainWorkout_fla.brown_animate_167)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class brown_animate_167 extends MovieClip {
public function brown_animate_167(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 8
//brown_glow_166 (BrainWorkout_fla.brown_glow_166)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class brown_glow_166 extends MovieClip {
public var light:MovieClip;
public function brown_glow_166(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 9
//darwin_countdown_2 (BrainWorkout_fla.darwin_countdown_2)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwin_countdown_2 extends MovieClip {
public function darwin_countdown_2(){
addFrameScript(89, frame90);
}
function frame90(){
stop();
parent.removeChild(this);
}
}
}//package BrainWorkout_fla
Section 10
//darwin_introducing_135 (BrainWorkout_fla.darwin_introducing_135)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwin_introducing_135 extends MovieClip {
public function darwin_introducing_135(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package BrainWorkout_fla
Section 11
//darwins_ranking_alien_348 (BrainWorkout_fla.darwins_ranking_alien_348)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwins_ranking_alien_348 extends MovieClip {
public function darwins_ranking_alien_348(){
addFrameScript(120, frame121);
}
function frame121(){
gotoAndPlay("loop");
}
}
}//package BrainWorkout_fla
Section 12
//darwins_ranking_cell_305 (BrainWorkout_fla.darwins_ranking_cell_305)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwins_ranking_cell_305 extends MovieClip {
public function darwins_ranking_cell_305(){
addFrameScript(105, frame106);
}
function frame106(){
gotoAndPlay("loop");
}
}
}//package BrainWorkout_fla
Section 13
//darwins_ranking_chimp_342 (BrainWorkout_fla.darwins_ranking_chimp_342)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwins_ranking_chimp_342 extends MovieClip {
public function darwins_ranking_chimp_342(){
addFrameScript(109, frame110);
}
function frame110(){
gotoAndPlay("loop");
}
}
}//package BrainWorkout_fla
Section 14
//darwins_ranking_dog_338 (BrainWorkout_fla.darwins_ranking_dog_338)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwins_ranking_dog_338 extends MovieClip {
public function darwins_ranking_dog_338(){
addFrameScript(109, frame110);
}
function frame110(){
gotoAndPlay("loop");
}
}
}//package BrainWorkout_fla
Section 15
//darwins_ranking_fish_327 (BrainWorkout_fla.darwins_ranking_fish_327)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwins_ranking_fish_327 extends MovieClip {
public function darwins_ranking_fish_327(){
addFrameScript(109, frame110);
}
function frame110(){
gotoAndPlay("loop");
}
}
}//package BrainWorkout_fla
Section 16
//darwins_ranking_lizard_332 (BrainWorkout_fla.darwins_ranking_lizard_332)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwins_ranking_lizard_332 extends MovieClip {
public function darwins_ranking_lizard_332(){
addFrameScript(109, frame110);
}
function frame110(){
gotoAndPlay("loop");
}
}
}//package BrainWorkout_fla
Section 17
//darwins_ranking_man_345 (BrainWorkout_fla.darwins_ranking_man_345)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwins_ranking_man_345 extends MovieClip {
public function darwins_ranking_man_345(){
addFrameScript(109, frame110);
}
function frame110(){
gotoAndPlay("loop");
}
}
}//package BrainWorkout_fla
Section 18
//darwins_ranking_rabbit_335 (BrainWorkout_fla.darwins_ranking_rabbit_335)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class darwins_ranking_rabbit_335 extends MovieClip {
public function darwins_ranking_rabbit_335(){
addFrameScript(109, frame110);
}
function frame110(){
gotoAndPlay("loop");
}
}
}//package BrainWorkout_fla
Section 19
//final_ranking_302 (BrainWorkout_fla.final_ranking_302)
package BrainWorkout_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class final_ranking_302 extends MovieClip {
public function final_ranking_302(){
addFrameScript(0, frame1, 53, frame54, 98, frame99, 145, frame146, 192, frame193, 239, frame240, 285, frame286, 333, frame334, 387, frame388);
}
function frame286(){
if (Object(parent.parent)._finalResult == 6){
stop();
};
}
function frame334(){
if (Object(parent.parent)._finalResult == 7){
stop();
};
}
function frame1(){
if (Object(parent.parent)._finalResult == 2){
gotoAndPlay(55);
};
if (Object(parent.parent)._finalResult == 3){
gotoAndPlay(100);
};
if (Object(parent.parent)._finalResult == 4){
gotoAndPlay(147);
};
if (Object(parent.parent)._finalResult == 5){
gotoAndPlay(194);
};
if (Object(parent.parent)._finalResult == 6){
gotoAndPlay(241);
};
if (Object(parent.parent)._finalResult == 7){
gotoAndPlay(287);
};
if (Object(parent.parent)._finalResult == 8){
gotoAndPlay(335);
};
}
function frame99(){
if (Object(parent.parent)._finalResult == 2){
stop();
};
}
function frame240(){
if (Object(parent.parent)._finalResult == 5){
stop();
};
}
function frame193(){
if (Object(parent.parent)._finalResult == 4){
stop();
};
}
function frame54(){
if (Object(parent.parent)._finalResult == 1){
stop();
};
}
function frame146(){
if (Object(parent.parent)._finalResult == 3){
stop();
};
}
function frame388(){
if (Object(parent.parent)._finalResult == 8){
stop();
};
}
}
}//package BrainWorkout_fla
Section 20
//final_results_359 (BrainWorkout_fla.final_results_359)
package BrainWorkout_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class final_results_359 extends MovieClip {
public var scores:MovieClip;
public var final:MovieClip;
public function final_results_359(){
addFrameScript(99, frame100, 305, frame306);
}
function frame306(){
Object(parent.parent).nextScreen();
}
function frame100(){
stop();
}
}
}//package BrainWorkout_fla
Section 21
//final_score_362 (BrainWorkout_fla.final_score_362)
package BrainWorkout_fla {
import flash.display.*;
import flash.text.*;
public dynamic class final_score_362 extends MovieClip {
public var final:TextField;
}
}//package BrainWorkout_fla
Section 22
//final_text_361 (BrainWorkout_fla.final_text_361)
package BrainWorkout_fla {
import flash.display.*;
import flash.text.*;
public dynamic class final_text_361 extends MovieClip {
public var game1:TextField;
public var game2:TextField;
public var game3:TextField;
public var game4:TextField;
}
}//package BrainWorkout_fla
Section 23
//fishbucketresults_373 (BrainWorkout_fla.fishbucketresults_373)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class fishbucketresults_373 extends MovieClip {
public function fishbucketresults_373(){
addFrameScript(414, frame415);
}
function frame415(){
stop();
}
}
}//package BrainWorkout_fla
Section 24
//fishbucketresults2_395 (BrainWorkout_fla.fishbucketresults2_395)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class fishbucketresults2_395 extends MovieClip {
public function fishbucketresults2_395(){
addFrameScript(414, frame415);
}
function frame415(){
stop();
}
}
}//package BrainWorkout_fla
Section 25
//fishbucketresults3_398 (BrainWorkout_fla.fishbucketresults3_398)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class fishbucketresults3_398 extends MovieClip {
public function fishbucketresults3_398(){
addFrameScript(414, frame415);
}
function frame415(){
stop();
}
}
}//package BrainWorkout_fla
Section 26
//fishbucketresults4_401 (BrainWorkout_fla.fishbucketresults4_401)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class fishbucketresults4_401 extends MovieClip {
public function fishbucketresults4_401(){
addFrameScript(414, frame415);
}
function frame415(){
stop();
}
}
}//package BrainWorkout_fla
Section 27
//green_animate_169 (BrainWorkout_fla.green_animate_169)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class green_animate_169 extends MovieClip {
public function green_animate_169(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 28
//green_glow_168 (BrainWorkout_fla.green_glow_168)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class green_glow_168 extends MovieClip {
public var light:MovieClip;
public function green_glow_168(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 29
//hud_182 (BrainWorkout_fla.hud_182)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class hud_182 extends MovieClip {
public var heart2:MovieClip;
public var heart3:MovieClip;
public var heart1:MovieClip;
}
}//package BrainWorkout_fla
Section 30
//indigo_animate_171 (BrainWorkout_fla.indigo_animate_171)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class indigo_animate_171 extends MovieClip {
public function indigo_animate_171(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 31
//indigo_glow_170 (BrainWorkout_fla.indigo_glow_170)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class indigo_glow_170 extends MovieClip {
public var light:MovieClip;
public function indigo_glow_170(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 32
//instruction_screens_27 (BrainWorkout_fla.instruction_screens_27)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class instruction_screens_27 extends MovieClip {
public var startBTN:MovieClip;
public function instruction_screens_27(){
addFrameScript(59, frame60, 120, frame121, 181, frame182, 242, frame243);
}
function frame182(){
stop();
}
function frame243(){
stop();
}
function frame121(){
stop();
}
function frame60(){
stop();
}
}
}//package BrainWorkout_fla
Section 33
//mark_25 (BrainWorkout_fla.mark_25)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class mark_25 extends MovieClip {
public function mark_25(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package BrainWorkout_fla
Section 34
//orange_animate_173 (BrainWorkout_fla.orange_animate_173)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class orange_animate_173 extends MovieClip {
public function orange_animate_173(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 35
//orange_glow_172 (BrainWorkout_fla.orange_glow_172)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class orange_glow_172 extends MovieClip {
public var light:MovieClip;
public function orange_glow_172(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 36
//panel_fish_217 (BrainWorkout_fla.panel_fish_217)
package BrainWorkout_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import com.doof.brainworkout.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class panel_fish_217 extends MovieClip {
public var hud:MovieClip;
public var guessTXT:TextField;
public var numpadMC:VirtualNumpad;
public function panel_fish_217(){
addFrameScript(0, frame1);
}
function frame1(){
}
public function numpad(_arg1:int):void{
guessTXT.appendText(_arg1.toString());
Object(parent.parent).checkGuess(guessTXT.text);
}
}
}//package BrainWorkout_fla
Section 37
//panel_fish_animation_216 (BrainWorkout_fla.panel_fish_animation_216)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class panel_fish_animation_216 extends MovieClip {
public var panel:MovieClip;
public function panel_fish_animation_216(){
addFrameScript(9, frame10, 49, frame50);
}
function frame10(){
stop();
}
function frame50(){
stop();
}
}
}//package BrainWorkout_fla
Section 38
//pink_animate_175 (BrainWorkout_fla.pink_animate_175)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class pink_animate_175 extends MovieClip {
public function pink_animate_175(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 39
//pink_glow_174 (BrainWorkout_fla.pink_glow_174)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class pink_glow_174 extends MovieClip {
public var light:MovieClip;
public function pink_glow_174(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 40
//purple_animate_177 (BrainWorkout_fla.purple_animate_177)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class purple_animate_177 extends MovieClip {
public function purple_animate_177(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 41
//purple_glow_176 (BrainWorkout_fla.purple_glow_176)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class purple_glow_176 extends MovieClip {
public var light:MovieClip;
public function purple_glow_176(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 42
//red_animate_179 (BrainWorkout_fla.red_animate_179)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class red_animate_179 extends MovieClip {
public function red_animate_179(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 43
//red_glow_178 (BrainWorkout_fla.red_glow_178)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class red_glow_178 extends MovieClip {
public var light:MovieClip;
public function red_glow_178(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 44
//results_panel_387 (BrainWorkout_fla.results_panel_387)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class results_panel_387 extends MovieClip {
public var scoreText:MovieClip;
public var board:MovieClip;
public function results_panel_387(){
addFrameScript(28, frame29, 57, frame58, 86, frame87, 115, frame116);
}
function frame87(){
stop();
}
function frame29(){
stop();
}
function frame116(){
stop();
}
function frame58(){
stop();
}
}
}//package BrainWorkout_fla
Section 45
//speech_bubble_main_137 (BrainWorkout_fla.speech_bubble_main_137)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class speech_bubble_main_137 extends MovieClip {
public function speech_bubble_main_137(){
addFrameScript(168, frame169);
}
function frame169(){
stop();
}
}
}//package BrainWorkout_fla
Section 46
//start_sequence_97 (BrainWorkout_fla.start_sequence_97)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class start_sequence_97 extends MovieClip {
public var goBTN:MovieClip;
public var logo:MovieClip;
public function start_sequence_97(){
addFrameScript(0, frame1, 129, frame130);
}
function frame1(){
stop();
}
function frame130(){
stop();
}
}
}//package BrainWorkout_fla
Section 47
//submit_panel_255 (BrainWorkout_fla.submit_panel_255)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class submit_panel_255 extends MovieClip {
public var submitBTN:SimpleButton;
public function submit_panel_255(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package BrainWorkout_fla
Section 48
//text_field_1_390 (BrainWorkout_fla.text_field_1_390)
package BrainWorkout_fla {
import flash.display.*;
import flash.text.*;
public dynamic class text_field_1_390 extends MovieClip {
public var score2TXT:TextField;
public var scoreTXT:TextField;
}
}//package BrainWorkout_fla
Section 49
//yellow_animate_181 (BrainWorkout_fla.yellow_animate_181)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class yellow_animate_181 extends MovieClip {
public function yellow_animate_181(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 50
//yellow_glow_180 (BrainWorkout_fla.yellow_glow_180)
package BrainWorkout_fla {
import flash.display.*;
public dynamic class yellow_glow_180 extends MovieClip {
public var light:MovieClip;
public function yellow_glow_180(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package BrainWorkout_fla
Section 51
//SHA1 (com.adobe.crypto.SHA1)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class SHA1 {
private static function hashBlocks(_arg1:Array):ByteArray{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Array;
var _local9:int;
var _local10:ByteArray;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
_local2 = 1732584193;
_local3 = 4023233417;
_local4 = 2562383102;
_local5 = 271733878;
_local6 = 3285377520;
_local7 = _arg1.length;
_local8 = new Array(80);
_local9 = 0;
while (_local9 < _local7) {
_local11 = _local2;
_local12 = _local3;
_local13 = _local4;
_local14 = _local5;
_local15 = _local6;
_local16 = 0;
while (_local16 < 80) {
if (_local16 < 16){
_local8[_local16] = _arg1[(_local9 + _local16)];
} else {
_local8[_local16] = IntUtil.rol((((_local8[(_local16 - 3)] ^ _local8[(_local16 - 8)]) ^ _local8[(_local16 - 14)]) ^ _local8[(_local16 - 16)]), 1);
};
_local17 = ((((IntUtil.rol(_local11, 5) + f(_local16, _local12, _local13, _local14)) + _local15) + int(_local8[_local16])) + k(_local16));
_local15 = _local14;
_local14 = _local13;
_local13 = IntUtil.rol(_local12, 30);
_local12 = _local11;
_local11 = _local17;
_local16++;
};
_local2 = (_local2 + _local11);
_local3 = (_local3 + _local12);
_local4 = (_local4 + _local13);
_local5 = (_local5 + _local14);
_local6 = (_local6 + _local15);
_local9 = (_local9 + 16);
};
_local10 = new ByteArray();
_local10.writeInt(_local2);
_local10.writeInt(_local3);
_local10.writeInt(_local4);
_local10.writeInt(_local5);
_local10.writeInt(_local6);
_local10.position = 0;
return (_local10);
}
private static function createBlocksFromByteArray(_arg1:ByteArray):Array{
var _local2:int;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = _arg1.position;
_arg1.position = 0;
_local3 = new Array();
_local4 = (_arg1.length * 8);
_local5 = 0xFF;
_local6 = 0;
while (_local6 < _local4) {
_local3[(_local6 >> 5)] = (_local3[(_local6 >> 5)] | ((_arg1.readByte() & _local5) << (24 - (_local6 % 32))));
_local6 = (_local6 + 8);
};
_local3[(_local4 >> 5)] = (_local3[(_local4 >> 5)] | (128 << (24 - (_local4 % 32))));
_local3[((((_local4 + 64) >> 9) << 4) + 15)] = _local4;
_arg1.position = _local2;
return (_local3);
}
private static function f(_arg1:int, _arg2:int, _arg3:int, _arg4:int):int{
if (_arg1 < 20){
return (((_arg2 & _arg3) | (~(_arg2) & _arg4)));
};
if (_arg1 < 40){
return (((_arg2 ^ _arg3) ^ _arg4));
};
if (_arg1 < 60){
return ((((_arg2 & _arg3) | (_arg2 & _arg4)) | (_arg3 & _arg4)));
};
return (((_arg2 ^ _arg3) ^ _arg4));
}
private static function k(_arg1:int):int{
if (_arg1 < 20){
return (1518500249);
};
if (_arg1 < 40){
return (1859775393);
};
if (_arg1 < 60){
return (2400959708);
};
return (3395469782);
}
private static function createBlocksFromString(_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (24 - (_local5 % 32))));
_local5 = (_local5 + 8);
};
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (24 - (_local3 % 32))));
_local2[((((_local3 + 64) >> 9) << 4) + 15)] = _local3;
return (_local2);
}
public static function hashBytes(_arg1:ByteArray):String{
var _local2:Array;
var _local3:ByteArray;
_local2 = SHA1.createBlocksFromByteArray(_arg1);
_local3 = hashBlocks(_local2);
return (((((IntUtil.toHex(_local3.readInt(), true) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)));
}
public static function hash(_arg1:String):String{
var _local2:Array;
var _local3:ByteArray;
_local2 = createBlocksFromString(_arg1);
_local3 = hashBlocks(_local2);
return (((((IntUtil.toHex(_local3.readInt(), true) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)));
}
}
}//package com.adobe.crypto
Section 52
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 53
//VirtualNumpad (com.doof.braintrain.VirtualNumpad)
package com.doof.braintrain {
import flash.display.*;
public dynamic class VirtualNumpad extends MovieClip {
public var key0:SimpleButton;
public var key2:SimpleButton;
public var key4:SimpleButton;
public var key6:SimpleButton;
public var key1:SimpleButton;
public var key9:SimpleButton;
public var key3:SimpleButton;
public var key5:SimpleButton;
public var key7:SimpleButton;
public var key8:SimpleButton;
}
}//package com.doof.braintrain
Section 54
//ArithmeticGame (com.doof.brainworkout.ArithmeticGame)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
public class ArithmeticGame extends MovieClip {
public var myTimer:GameTimerMC;
private var _questionNum:int;// = 1
public var guessTXT:TextField;
private var _penaltyTime:int;// = 10000
private var _answerString:String;
private var _score:int;// = 0
private var _numIncorrect:int;// = 0
private var _scrollList:Array;
public var numpadMC:VirtualNumpad;
private var _correctAnswer:Boolean;// = false
private var _amountToScroll:Number;// = 0
public var scrollHolder:MovieClip;
private var _nextQuestionAsked:Boolean;// = true
public var question:MathRow;
public var wave:TextField;
public function ArithmeticGame(){
_questionNum = 1;
_scrollList = new Array();
_amountToScroll = 0;
_nextQuestionAsked = true;
_correctAnswer = false;
_penaltyTime = 10000;
_score = 0;
_numIncorrect = 0;
super();
numpadMC.visible = false;
}
public function init():void{
numpadMC.visible = true;
scrollHolder.x = question.x;
scrollHolder.y = question.y;
question.mark.visible = false;
askQuestion();
addEventListener(Event.ENTER_FRAME, scrollDown);
myTimer.timeLength = 200000;
myTimer.startTimer();
}
private function generateWave3Q():void{
var _local1:String;
var _local2:Number;
var _local3:int;
var _local4:int;
wave.text = "wave 3: pace yourself";
_local2 = (Math.random() * 100);
if (_local2 > 50){
_local1 = "+";
} else {
_local1 = "-";
};
_local3 = Math.ceil((Math.random() * 99));
_local4 = Math.ceil((Math.random() * _local3));
if (_local1 == "+"){
_answerString = (_local3 + _local4).toString();
} else {
if (_local1 == "-"){
_answerString = (_local3 - _local4).toString();
} else {
_answerString = (_local3 * _local4).toString();
};
};
question.numA.text = _local3.toString();
question.numB.text = _local4.toString();
question.mathSymbol.text = _local1;
question.equals.text = "=";
}
private function scrollDown(_arg1:Event):void{
var _local2:int;
if (_amountToScroll > 0){
_local2 = 0;
while (_local2 < _scrollList.length) {
_scrollList[_local2].y = (_scrollList[_local2].y + 2.3);
_scrollList[_local2].alpha = ((100 - (_scrollList[_local2].y / 2)) / 100);
if (_scrollList[_local2].alpha < 0){
scrollHolder.removeChild(_scrollList[_local2]);
_scrollList.splice(_local2, 1);
};
_local2++;
};
_amountToScroll = (_amountToScroll - 1);
} else {
if (!_nextQuestionAsked){
question.visible = true;
askQuestion();
_nextQuestionAsked = true;
};
};
}
private function checkAnswer():void{
var _local1:int;
var _local2:Sound;
var _local3:Sound;
_local1 = 0;
while (_local1 < guessTXT.text.length) {
if (guessTXT.text.charAt(_local1) != _answerString.charAt(_local1)){
trace("wrong answer!");
_numIncorrect++;
_correctAnswer = false;
addRowToScroll();
myTimer._startTime = (myTimer._startTime - _penaltyTime);
_local2 = new WrongSND();
_local2.play(0, 1);
numpadMC._active = false;
return;
};
_local1++;
};
if (guessTXT.text.length == _answerString.length){
_correctAnswer = true;
addRowToScroll();
trace("correct!");
_score = (_score + 100);
_local3 = new CorrectSND();
_local3.play(0, 1);
numpadMC._active = false;
};
}
private function generateWave4Q():void{
var _local1:String;
var _local2:Number;
var _local3:int;
var _local4:int;
wave.text = "wave 3: final stretch";
_local2 = (Math.random() * 100);
if (_local2 > 90){
_local1 = "+";
} else {
if (_local2 > 70){
_local1 = "-";
} else {
_local1 = "x";
};
};
if (_local1 != "x"){
_local3 = Math.ceil((Math.random() * 99));
_local4 = Math.ceil((Math.random() * _local3));
} else {
_local3 = Math.ceil((Math.random() * 10));
_local4 = Math.ceil((Math.random() * _local3));
};
if (_local1 == "+"){
_answerString = (_local3 + _local4).toString();
} else {
if (_local1 == "-"){
_answerString = (_local3 - _local4).toString();
} else {
if (_local1 == "x"){
_answerString = (_local3 * _local4).toString();
} else {
_answerString = (_local3 / _local4).toString();
};
};
};
question.numA.text = _local3.toString();
question.numB.text = _local4.toString();
question.mathSymbol.text = _local1;
question.equals.text = "=";
}
public function timeOver():void{
}
private function askQuestion():void{
var _local1:int;
var _local2:Object;
guessTXT.text = "";
question.answer.text = "";
if (_questionNum <= 15){
generateWave1Q();
} else {
if (_questionNum <= 30){
generateWave2Q();
} else {
if (_questionNum <= 45){
generateWave4Q();
} else {
if (_questionNum <= 60){
numpadMC._active = false;
numpadMC.kill();
_score = (_score + Number(myTimer.seconds.text));
_local1 = (200000 - int(myTimer.seconds.text));
_local2 = {numIncorrect:_numIncorrect, bonus:myTimer.seconds.text, timeTaken:_local1};
Object(parent)._scoreDataArray.push(_local2);
Object(parent)._scoresArray.push(_score);
Object(parent).nextScreen();
};
};
};
};
_questionNum++;
numpadMC._active = true;
}
public function numpad(_arg1:int):void{
if (_nextQuestionAsked){
question.answer.appendText(_arg1.toString());
guessTXT.appendText(_arg1.toString());
checkAnswer();
};
}
private function addRowToScroll():void{
var _local1:MathRow;
_nextQuestionAsked = false;
question.visible = false;
_local1 = new MathRow();
if (_correctAnswer){
_local1.mark.gotoAndStop(1);
} else {
_local1.mark.gotoAndStop(2);
};
_local1.numA.text = question.numA.text;
_local1.numB.text = question.numB.text;
_local1.mathSymbol.text = question.mathSymbol.text;
_local1.answer.text = question.answer.text;
_local1.scaleX = question.scaleX;
_local1.scaleY = _local1.scaleX;
_scrollList.push(_local1);
scrollHolder.addChild(_local1);
_amountToScroll = 20;
}
private function generateWave1Q():void{
var _local1:String;
var _local2:int;
var _local3:int;
wave.text = "wave 1: warm up";
if ((Math.random() * 100) > 50){
_local1 = "+";
} else {
_local1 = "-";
};
_local2 = Math.ceil((Math.random() * 10));
_local3 = Math.ceil((Math.random() * _local2));
if (_local1 == "+"){
_answerString = (_local2 + _local3).toString();
} else {
_answerString = (_local2 - _local3).toString();
};
question.numA.text = _local2.toString();
question.numB.text = _local3.toString();
question.mathSymbol.text = _local1;
question.equals.text = "=";
}
private function generateWave2Q():void{
var _local1:String;
var _local2:int;
var _local3:int;
var _local4:int;
wave.text = "wave 2: stretch";
if ((Math.random() * 100) > 50){
_local1 = "+";
} else {
_local1 = "-";
};
_local2 = Math.ceil((Math.random() * 99));
if (_local2 > 10){
_local3 = 10;
} else {
_local3 = _local2;
};
_local4 = Math.ceil((Math.random() * _local3));
if (_local1 == "+"){
_answerString = (_local2 + _local4).toString();
} else {
_answerString = (_local2 - _local4).toString();
};
question.numA.text = _local2.toString();
question.numB.text = _local4.toString();
question.mathSymbol.text = _local1;
question.equals.text = "=";
}
}
}//package com.doof.brainworkout
Section 55
//Coin (com.doof.brainworkout.Coin)
package com.doof.brainworkout {
import flash.events.*;
import flash.filters.*;
public class Coin extends DraggableObject {
public var _inTray:Boolean;// = false
public var _parentRef:Object;
public function Coin(){
var _local1:DropShadowFilter;
var _local2:Array;
_inTray = false;
super();
_local1 = new DropShadowFilter(4, 45, 0, 1, 10, 10, 0.75);
_local2 = new Array();
_local2.push(_local1);
filters = _local2;
}
override public function mouseUpListener(_arg1:MouseEvent):void{
_dragging = false;
_parentRef.checkInTray(this);
}
override public function updatePosition():void{
if (_dragging){
x = (parent.mouseX + _offsetX);
y = (parent.mouseY + _offsetY);
_offsetX = (x - parent.mouseX);
_offsetY = (y - parent.mouseY);
_parentRef.setCoinToTop(this);
};
}
}
}//package com.doof.brainworkout
Section 56
//Coin1 (com.doof.brainworkout.Coin1)
package com.doof.brainworkout {
public class Coin1 extends Coin {
public var value:uint;// = 1
public function Coin1(){
value = 1;
super();
}
}
}//package com.doof.brainworkout
Section 57
//Coin10 (com.doof.brainworkout.Coin10)
package com.doof.brainworkout {
public class Coin10 extends Coin {
public var value:uint;// = 10
public function Coin10(){
value = 10;
super();
}
}
}//package com.doof.brainworkout
Section 58
//Coin100 (com.doof.brainworkout.Coin100)
package com.doof.brainworkout {
public class Coin100 extends Coin {
public var value:uint;// = 100
public function Coin100(){
value = 100;
super();
}
}
}//package com.doof.brainworkout
Section 59
//Coin2 (com.doof.brainworkout.Coin2)
package com.doof.brainworkout {
public class Coin2 extends Coin {
public var value:uint;// = 2
public function Coin2(){
value = 2;
super();
}
}
}//package com.doof.brainworkout
Section 60
//Coin20 (com.doof.brainworkout.Coin20)
package com.doof.brainworkout {
public class Coin20 extends Coin {
public var value:uint;// = 20
public function Coin20(){
value = 20;
super();
}
}
}//package com.doof.brainworkout
Section 61
//Coin200 (com.doof.brainworkout.Coin200)
package com.doof.brainworkout {
public class Coin200 extends Coin {
public var value:uint;// = 200
public function Coin200(){
value = 200;
super();
}
}
}//package com.doof.brainworkout
Section 62
//Coin5 (com.doof.brainworkout.Coin5)
package com.doof.brainworkout {
public class Coin5 extends Coin {
public var value:uint;// = 5
public function Coin5(){
value = 5;
super();
}
}
}//package com.doof.brainworkout
Section 63
//Coin50 (com.doof.brainworkout.Coin50)
package com.doof.brainworkout {
public class Coin50 extends Coin {
public var value:uint;// = 50
public function Coin50(){
value = 50;
super();
}
}
}//package com.doof.brainworkout
Section 64
//DoofBot (com.doof.brainworkout.DoofBot)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
public class DoofBot {
private static var doofBotStartURL:String = "http://www.doof.com/spoof/doofbot/ping/start/";
private static var doofBotEndURL:String = "http://www.doof.com/spoof/doofbot/ping/end/";
private static var doofBotInitURL:String = "http://www.doof.com/spoof/doofbot/ping/init/";
public function DoofBot(){
trace("no instantiation needed, please use the static methods");
}
public static function init(_arg1:Object, _arg2:String):void{
var gameID:String;
var hostURL:String;
var sendVars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
var trackCompleteHandler:Function;
var trackErrorHandler:Function;
var stageRef = _arg1;
var gameName = _arg2;
trackCompleteHandler = function (_arg1:Event):void{
var _local2:URLLoader;
trace("DoofBot tracking info sent!");
_local2 = URLLoader(_arg1.target);
trace(("DoofBot php sent me: " + _local2.data.toString()));
};
trackErrorHandler = function (_arg1:IOErrorEvent):void{
trace("Sorry, DoofBot tracking failed!");
trace(("Error: " + _arg1));
};
Security.allowDomain("*");
Security.allowInsecureDomain("*");
gameID = gameName;
hostURL = stageRef.loaderInfo.url;
trace(("DoofBot gameID: " + gameID));
trace(("DoofBot hostURL: " + hostURL));
sendVars = new URLVariables();
sendVars.gameID = gameID;
sendVars.hostURL = hostURL;
sendVars.rnd = Math.floor((Math.random() * 1000));
request = new URLRequest(doofBotInitURL);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = sendVars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, trackCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, trackErrorHandler);
loader.load(request);
}
public static function end(_arg1:Object, _arg2:String):void{
var gameID:String;
var hostURL:String;
var sendVars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
var trackCompleteHandler:Function;
var trackErrorHandler:Function;
var stageRef = _arg1;
var gameName = _arg2;
trackCompleteHandler = function (_arg1:Event):void{
var _local2:URLLoader;
trace("DoofBot tracking info sent!");
_local2 = URLLoader(_arg1.target);
trace(("DoofBot php sent me: " + _local2.data.toString()));
};
trackErrorHandler = function (_arg1:IOErrorEvent):void{
trace("Sorry, DoofBot tracking failed!");
trace(("Error: " + _arg1));
};
Security.allowDomain("*");
Security.allowInsecureDomain("*");
gameID = gameName;
hostURL = stageRef.loaderInfo.url;
trace(("DoofBot gameID: " + gameID));
trace(("DoofBot hostURL: " + hostURL));
sendVars = new URLVariables();
sendVars.gameID = gameID;
sendVars.hostURL = hostURL;
sendVars.rnd = Math.floor((Math.random() * 1000));
request = new URLRequest(doofBotEndURL);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = sendVars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, trackCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, trackErrorHandler);
loader.load(request);
}
public static function start(_arg1:Object, _arg2:String):void{
var gameID:String;
var hostURL:String;
var sendVars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
var trackCompleteHandler:Function;
var trackErrorHandler:Function;
var stageRef = _arg1;
var gameName = _arg2;
trackCompleteHandler = function (_arg1:Event):void{
var _local2:URLLoader;
trace("DoofBot tracking info sent!");
_local2 = URLLoader(_arg1.target);
trace(("DoofBot php sent me: " + _local2.data.toString()));
};
trackErrorHandler = function (_arg1:IOErrorEvent):void{
trace("Sorry, DoofBot tracking failed!");
trace(("Error: " + _arg1));
};
Security.allowDomain("*");
Security.allowInsecureDomain("*");
gameID = gameName;
hostURL = stageRef.loaderInfo.url;
trace(("DoofBot gameID: " + gameID));
trace(("DoofBot hostURL: " + hostURL));
sendVars = new URLVariables();
sendVars.gameID = gameID;
sendVars.hostURL = hostURL;
sendVars.rnd = Math.floor((Math.random() * 1000));
request = new URLRequest(doofBotStartURL);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = sendVars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, trackCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, trackErrorHandler);
loader.load(request);
}
}
}//package com.doof.brainworkout
Section 65
//DraggableObject (com.doof.brainworkout.DraggableObject)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
public class DraggableObject extends MovieClip {
public var _dragging:Boolean;// = false
public var _offsetX:Number;// = 0
public var _offsetY:Number;// = 0
public function DraggableObject(){
_offsetX = 0;
_offsetY = 0;
_dragging = false;
super();
this.buttonMode = true;
this.useHandCursor = true;
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener);
addEventListener(MouseEvent.MOUSE_UP, mouseUpListener);
addEventListener(Event.ENTER_FRAME, mouseMoveListener);
}
public function updatePosition():void{
if (_dragging){
x = (parent.mouseX + _offsetX);
y = (parent.mouseY + _offsetY);
_offsetX = (x - parent.mouseX);
_offsetY = (y - parent.mouseY);
};
}
public function mouseUpListener(_arg1:MouseEvent):void{
_dragging = false;
}
private function mouseDownListener(_arg1:MouseEvent):void{
if (!_dragging){
_dragging = true;
_offsetX = (x - parent.mouseX);
_offsetY = (y - parent.mouseY);
};
}
private function mouseMoveListener(_arg1:Event):void{
updatePosition();
}
}
}//package com.doof.brainworkout
Section 66
//FishAnimation (com.doof.brainworkout.FishAnimation)
package com.doof.brainworkout {
import flash.display.*;
import flash.geom.*;
public class FishAnimation extends MovieClip {
public var fish:MovieClip;
public var _moveTime:Number;
public var _jumper:Boolean;// = false
public var _inBucket:Boolean;// = true
public var _startTime:Number;
public function FishAnimation(_arg1:Number, _arg2:Number):void{
_inBucket = true;
_jumper = false;
super();
addFrameScript(99, frame100, 199, frame200);
_startTime = _arg1;
_moveTime = _arg2;
}
function frame200(){
visible = false;
stop();
}
function frame100(){
}
public function move(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:uint;
_local2 = (_arg1 - _startTime);
_local3 = (_local2 / _moveTime);
_local4 = Math.ceil((_local3 * totalFrames));
if (_local4 >= 200){
visible = false;
};
gotoAndStop(_local4);
}
public function randomizeColour():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:ColorTransform;
_local1 = (Math.random() * 0xFF);
_local2 = (Math.random() * 0xFF);
_local3 = (Math.random() * 0xFF);
_local4 = new ColorTransform(0, 0, 0, 1, _local1, _local2, _local3, 0);
transform.colorTransform = _local4;
}
}
}//package com.doof.brainworkout
Section 67
//FishBucketGame (com.doof.brainworkout.FishBucketGame)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class FishBucketGame extends MovieClip {
public var fishHolder:MovieClip;
private var _togetherPercentage:Number;// = 40
private var _numInBucket:int;
private var _fishArray:Array;
private var _existingFish:int;
private var _togetherness:Number;// = 60
private var _numFishMade:int;
private var _fishDelayTime:Number;
public var _score:Number;// = 0
private var _moveTime:Number;// = 3000
private var _maxFishCount:int;// = 5
public var _jumpChance:Number;// = 0
private var _jumpTime:Number;
private var _fishEscapePercent:Number;// = 0
private var _maxFish:int;
public var scoreTXT:TextField;
public var questionPanel:MovieClip;
public var markSymbol:MarkSymbol;
private var _roundNumber:int;// = 1
private var _lastFishTime:Number;// = 0
private var _numCorrect:int;// = 0
private var _startDelay:int;// = 0
public function FishBucketGame():void{
_lastFishTime = 0;
_moveTime = 3000;
_fishArray = new Array();
_fishEscapePercent = 0;
_roundNumber = 1;
_maxFishCount = 5;
_togetherPercentage = 40;
_togetherness = 60;
_score = 0;
_jumpChance = 0;
_startDelay = 0;
_numCorrect = 0;
super();
scoreTXT.text = ("Score: " + _score);
questionPanel.visible = false;
}
public function init():void{
var _local1:Number;
var _local2:Number;
var _local3:Object;
questionPanel.panel.guessTXT.text = "";
if (_roundNumber == 3){
_local2 = _roundNumber;
_roundNumber = 2;
};
if (_roundNumber > 6){
questionPanel.panel.numpadMC._active = false;
questionPanel.panel.numpadMC.kill();
_local3 = {numCorrect:_numCorrect};
Object(parent)._scoreDataArray.push(_local3);
Object(parent)._scoresArray.push(_score);
Object(parent).nextScreen();
return;
};
if (_roundNumber > 4){
_local2 = _roundNumber;
_roundNumber = 4;
};
_lastFishTime = getTimer();
_jumpTime = (_moveTime * Math.pow(0.998, (_roundNumber * 50)));
_local1 = 0;
if ((Math.random() * 100) < _togetherPercentage){
_local1 = ((Math.random() * _togetherness) * _roundNumber);
};
_fishDelayTime = ((_jumpTime * 0.333) - _local1);
_maxFish = (_maxFishCount * _roundNumber);
_numFishMade = 0;
_numInBucket = 0;
_existingFish = 0;
_fishArray = new Array();
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
if (_local2){
_roundNumber = _local2;
};
}
private function enterFrameHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:int;
_local2 = (getTimer() - _lastFishTime);
if ((((_local2 > _fishDelayTime)) && ((_numFishMade < _maxFish)))){
_lastFishTime = getTimer();
_local3 = 0;
if ((Math.random() * 100) < _togetherPercentage){
_local3 = ((Math.random() * _togetherness) * _roundNumber);
};
_fishDelayTime = ((_jumpTime * 0.333) - _local3);
_fishArray.push(FishAnimation(fishHolder.addChild(new FishAnimation(_lastFishTime, _jumpTime))));
_local4 = Math.ceil((Math.random() * 3));
_fishArray[(_fishArray.length - 1)].fish.gotoAndStop(_local4);
if ((Math.random() * 100) > (100 - (_jumpChance * 100))){
_fishArray[(_fishArray.length - 1)]._jumper = true;
};
_numFishMade++;
};
updateFishPositions();
}
private function startDelay():void{
_startDelay = getTimer();
addEventListener(Event.ENTER_FRAME, checkDelay);
}
private function checkDelay(_arg1:Event):void{
if ((getTimer() - _startDelay) > 2000){
stopDelay();
};
}
public function continueGame():void{
init();
}
private function stopMessageDisplay():void{
questionPanel.panel.numpadMC._active = false;
questionPanel.gotoAndPlay("hide");
}
private function stopDelay():void{
removeEventListener(Event.ENTER_FRAME, checkDelay);
continueGame();
}
private function updateFishPositions():void{
var _local1:int;
var _local2:int;
var _local3:MovieClip;
var _local4:MovieClip;
_local1 = 0;
_local2 = 0;
while (_local2 < _fishArray.length) {
_fishArray[_local2].move(getTimer());
if (_fishArray[_local2].currentFrame >= 200){
_local3 = MovieClip(addChild(new Splash()));
_local3.x = 550;
_local3.y = 350;
_fishArray.splice(_local2, 1);
_existingFish++;
} else {
if ((((_fishArray[_local2].currentFrame > 94)) && ((_fishArray[_local2].currentFrame < 99)))){
_local4 = MovieClip(addChild(new Splash()));
_local4.x = (fishHolder.x - 25);
_local4.y = (fishHolder.y - 15);
};
if ((((_fishArray[_local2].currentFrame > 100)) && (_fishArray[_local2]._inBucket))){
if ((Math.random() * 100) < _fishEscapePercent){
_fishArray[_local2]._inBucket = false;
} else {
_fishArray[_local2].visible = false;
_fishArray.splice(_local2, 1);
_numInBucket++;
_existingFish++;
};
};
};
_local2++;
};
if (_numInBucket < 0){
_numInBucket = 0;
};
if (_existingFish >= _maxFish){
_fishEscapePercent = (_fishEscapePercent + 5);
_roundNumber++;
stopRound();
startMessageDisplay();
};
}
private function stopRound():void{
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function startMessageDisplay():void{
questionPanel.visible = true;
questionPanel.gotoAndPlay("show");
questionPanel.panel.numpadMC._active = true;
}
public function checkGuess(_arg1:String):void{
var _local2:String;
var _local3:int;
var _local4:int;
_local2 = _numInBucket.toString();
_local3 = 0;
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg1.charAt(_local4) == _local2.charAt(_local4)){
_local3++;
};
_local4++;
};
if (_local3 == _local2.length){
_score = (_score + (100 * _roundNumber));
stopMessageDisplay();
trace("correct!");
_numCorrect++;
markSymbol.gotoAndPlay("right");
startDelay();
} else {
if (_arg1.length == _local2.length){
stopMessageDisplay();
trace("wrong!");
markSymbol.gotoAndPlay("wrong");
startDelay();
};
};
scoreTXT.text = ("Score: " + _score);
}
}
}//package com.doof.brainworkout
Section 68
//GameTimer (com.doof.brainworkout.GameTimer)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class GameTimer extends MovieClip {
private var _timeElapsed:Number;
public var bg:MovieClip;
public var overlay:MovieClip;
public var seconds:TextField;
public var _dispatcher:GameTimerEvents;
private var _timeLength:Number;
public var maskHolder:MovieClip;
public var _startTime:Number;
public function GameTimer(){
_dispatcher = new GameTimerEvents();
super();
render();
}
public function startTimer():void{
resetTimer();
addEventListener(Event.ENTER_FRAME, timerHandler);
_dispatcher.timerStarted();
}
public function get timeLength():Number{
return (_timeLength);
}
public function set timeLength(_arg1:Number):void{
_timeLength = _arg1;
}
public function resetTimer():void{
_startTime = getTimer();
}
private function timerHandler(_arg1:Event):void{
_timeElapsed = (getTimer() - _startTime);
if (_timeElapsed > _timeLength){
stopTimer();
};
render();
}
public function stopTimer():void{
removeEventListener(Event.ENTER_FRAME, timerHandler);
_dispatcher.timerStopped();
Object(parent).timeOver();
trace("clock stopped");
}
private function render():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:Number;
var _local8:Number;
_local1 = (-90 * (Math.PI / 180));
_local2 = (((_timeElapsed / _timeLength) * 360) * (Math.PI / 180));
maskHolder.graphics.clear();
maskHolder.graphics.beginFill(0);
maskHolder.graphics.moveTo(0, 0);
_local3 = 60;
_local4 = ((Math.PI / 180) * _local2);
_local5 = 0;
while (_local5 <= _local2) {
_local7 = (Math.cos((_local5 + _local1)) * _local3);
_local8 = (Math.sin((_local5 + _local1)) * _local3);
maskHolder.graphics.lineTo(_local7, _local8);
_local5 = (_local5 + _local4);
};
_local7 = (Math.cos((_local2 + _local1)) * _local3);
_local8 = (Math.sin((_local2 + _local1)) * _local3);
maskHolder.graphics.lineTo(_local7, _local8);
maskHolder.graphics.lineTo(0, 0);
maskHolder.graphics.endFill();
overlay.mask = maskHolder;
_local6 = Math.ceil(((_timeLength - _timeElapsed) / 1000));
if (_local6 < 0){
_local6 = 0;
};
seconds.text = _local6.toString();
}
}
}//package com.doof.brainworkout
Section 69
//GameTimerEvents (com.doof.brainworkout.GameTimerEvents)
package com.doof.brainworkout {
import flash.events.*;
public class GameTimerEvents extends EventDispatcher {
public static var TIMER_STOPPED:String = "timerFinished";
public static var TIMER_STARTED:String = "timerStarted";
public static var TIMER_PAUSED:String = "timerPaused";
public function GameTimerEvents():void{
}
public function timerStarted():void{
dispatchEvent(new Event(TIMER_STARTED));
}
public function timerStopped():void{
dispatchEvent(new Event(TIMER_STOPPED));
}
public function timerPaused():void{
dispatchEvent(new Event(TIMER_PAUSED));
}
}
}//package com.doof.brainworkout
Section 70
//LightGame (com.doof.brainworkout.LightGame)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
public class LightGame extends MovieClip {
private var _lives:int;// = 3
private var _sequenceLength:uint;// = 1
public var scoreTXT:TextField;
private var _lightArray:Array;
public var markSymbol:MarkSymbol;
public var HUD:MovieClip;
private var _sequence:Array;
private var _startSequenceTime:Number;
private var _finalDelay:Boolean;// = false
private var _lightOffPercent:Number;// = 0.75
private var _lightTime:uint;// = 1000
private var _score:int;// = 0
private var _inputSequence:Array;
private var _soundsArray:Array;
public var light0:MovieClip;
public var light1:MovieClip;
public var light2:MovieClip;
public var light3:MovieClip;
public var light4:MovieClip;
public var light5:MovieClip;
public var light6:MovieClip;
public var light7:MovieClip;
public var light8:MovieClip;
private var _startDelay:int;// = 0
public function LightGame(){
_lightArray = new Array();
_sequence = new Array();
_sequenceLength = 1;
_lightTime = 1000;
_lightOffPercent = 0.75;
_score = 0;
_lives = 3;
_soundsArray = new Array();
_startDelay = 0;
_finalDelay = false;
super();
}
private function showLives():void{
if (_lives < 0){
trace("gameover for light game");
trace(("score: " + _score));
stopDelay();
stopInputSequence();
stopSequence();
Mouse.show();
_finalDelay = true;
startDelay();
};
if (_lives >= 0){
HUD.heart1.visible = false;
HUD.heart2.visible = false;
HUD.heart3.visible = false;
};
if (_lives >= 1){
HUD.heart1.visible = true;
HUD.heart2.visible = false;
HUD.heart3.visible = false;
};
if (_lives >= 2){
HUD.heart1.visible = true;
HUD.heart2.visible = true;
HUD.heart3.visible = false;
};
if (_lives >= 3){
HUD.heart1.visible = true;
HUD.heart2.visible = true;
HUD.heart3.visible = true;
};
}
private function set lives(_arg1:int):void{
_lives = _arg1;
showLives();
}
private function light2ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(2);
insertInput(2);
}
private function playRandomLight(_arg1:TimerEvent):void{
var _local2:int;
_local2 = Math.floor((Math.random() * _lightArray.length));
turnOnLightNum(_local2);
}
private function startDelay():void{
_startDelay = getTimer();
addEventListener(Event.ENTER_FRAME, checkDelay);
}
private function inputFinished(_arg1:Boolean):void{
if (_arg1){
trace("all correct");
_score = (_score + Math.pow(_inputSequence.length, 2));
scoreTXT.text = _score.toString();
stopInputSequence();
addToSequence();
startDelay();
} else {
lives--;
markSymbol.gotoAndPlay("wrong");
trace("oops, you got a few wrong");
stopInputSequence();
startDelay();
};
}
public function generateSequence(_arg1:uint):void{
var _local2:uint;
_sequence = new Array();
_local2 = 0;
while (_local2 < _arg1) {
_sequence.push(Math.floor((Math.random() * _lightArray.length)));
_local2++;
};
}
private function light3ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(3);
insertInput(3);
}
private function startInputSequence():void{
var _local1:int;
Mouse.show();
_inputSequence = new Array();
light0.addEventListener(MouseEvent.MOUSE_DOWN, light0ClickedHandler);
light1.addEventListener(MouseEvent.MOUSE_DOWN, light1ClickedHandler);
light2.addEventListener(MouseEvent.MOUSE_DOWN, light2ClickedHandler);
light3.addEventListener(MouseEvent.MOUSE_DOWN, light3ClickedHandler);
light4.addEventListener(MouseEvent.MOUSE_DOWN, light4ClickedHandler);
light5.addEventListener(MouseEvent.MOUSE_DOWN, light5ClickedHandler);
light6.addEventListener(MouseEvent.MOUSE_DOWN, light6ClickedHandler);
light7.addEventListener(MouseEvent.MOUSE_DOWN, light7ClickedHandler);
light8.addEventListener(MouseEvent.MOUSE_DOWN, light8ClickedHandler);
_local1 = 0;
while (_local1 < _lightArray.length) {
_lightArray[_local1].buttonMode = true;
_lightArray[_local1].useHandCursor = true;
_local1++;
};
}
private function startRandomLights():void{
var _local1:Timer;
_local1 = new Timer(500);
_local1.addEventListener(TimerEvent.TIMER, playRandomLight);
_local1.start();
}
private function turnOffLightNum(_arg1:int):void{
_lightArray[_arg1].light.gotoAndStop(1);
_lightArray[_arg1].gotoAndStop(1);
}
private function playSequenceHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = ((getTimer() - _startSequenceTime) / _lightTime);
_local3 = Math.floor(_local2);
_local4 = (_local2 - _local3);
if (_local3 < _sequence.length){
if (_local4 > _lightOffPercent){
turnOnLightNum(_sequence[_local3]);
};
} else {
stopSequence();
};
}
private function light4ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(4);
insertInput(4);
}
private function stopDelay():void{
var _local1:Object;
removeEventListener(Event.ENTER_FRAME, checkDelay);
if (!_finalDelay){
playSequence();
} else {
_local1 = {sequenceLength:_sequence.length};
Object(parent)._scoreDataArray.push(_local1);
Object(parent)._scoresArray.push(_score);
Object(parent).nextScreen();
Mouse.show();
};
}
private function insertInput(_arg1:uint):void{
var _local2:Boolean;
if (_inputSequence.length < (_sequence.length - 1)){
_inputSequence.push(_arg1);
checkInput();
} else {
_inputSequence.push(_arg1);
_local2 = checkInputSequence();
inputFinished(_local2);
};
}
private function stopInputSequence():void{
var _local1:int;
Mouse.hide();
light0.removeEventListener(MouseEvent.MOUSE_DOWN, light0ClickedHandler);
light1.removeEventListener(MouseEvent.MOUSE_DOWN, light1ClickedHandler);
light2.removeEventListener(MouseEvent.MOUSE_DOWN, light2ClickedHandler);
light3.removeEventListener(MouseEvent.MOUSE_DOWN, light3ClickedHandler);
light4.removeEventListener(MouseEvent.MOUSE_DOWN, light4ClickedHandler);
light5.removeEventListener(MouseEvent.MOUSE_DOWN, light5ClickedHandler);
light6.removeEventListener(MouseEvent.MOUSE_DOWN, light6ClickedHandler);
light7.removeEventListener(MouseEvent.MOUSE_DOWN, light7ClickedHandler);
light8.removeEventListener(MouseEvent.MOUSE_DOWN, light8ClickedHandler);
_local1 = 0;
while (_local1 < _lightArray.length) {
_lightArray[_local1].buttonMode = false;
_lightArray[_local1].useHandCursor = false;
_local1++;
};
}
public function addToSequence():void{
_sequenceLength++;
_sequence.push(Math.floor((Math.random() * _lightArray.length)));
}
private function light5ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(5);
insertInput(5);
}
private function get lives():int{
return (_lives);
}
public function init():void{
_lightArray.push(light0);
_lightArray.push(light1);
_lightArray.push(light2);
_lightArray.push(light3);
_lightArray.push(light4);
_lightArray.push(light5);
_lightArray.push(light6);
_lightArray.push(light7);
_lightArray.push(light8);
_soundsArray.push(new note1SND());
_soundsArray.push(new note2SND());
_soundsArray.push(new note3SND());
_soundsArray.push(new note4SND());
_soundsArray.push(new note5SND());
_soundsArray.push(new note6SND());
_soundsArray.push(new note7SND());
_soundsArray.push(new note8SND());
_soundsArray.push(new note9SND());
generateSequence(1);
playSequence();
}
public function playSequence():void{
_lightTime = (600 - (25 * _sequence.length));
addEventListener(Event.ENTER_FRAME, playSequenceHandler);
_startSequenceTime = getTimer();
}
private function light6ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(6);
insertInput(6);
}
public function stopAllLights():void{
var _local1:uint;
SoundMixer.stopAll();
_local1 = 0;
while (_local1 < _lightArray.length) {
turnOffLightNum(_local1);
_local1++;
};
}
private function checkDelay(_arg1:Event):void{
if ((getTimer() - _startDelay) > 2000){
stopDelay();
};
}
private function light7ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(7);
insertInput(7);
}
private function checkInputSequence():Boolean{
var _local1:Boolean;
var _local2:uint;
var _local3:uint;
_local2 = 0;
_local3 = 0;
while (_local3 < _sequence.length) {
if (_inputSequence[_local3] == _sequence[_local3]){
_local2++;
};
_local3++;
};
if (_local2 == _sequence.length){
_local1 = true;
} else {
_local1 = false;
};
return (_local1);
}
private function light0ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(0);
insertInput(0);
}
private function checkInput():void{
var _local1:Number;
var _local2:Number;
var _local3:uint;
_local1 = 0;
_local2 = 0;
_local3 = 0;
while (_local3 < _inputSequence.length) {
_local1 = (_local1 + _inputSequence[_local3]);
_local2 = (_local2 + _sequence[_local3]);
_local3++;
};
if (_local2 != _local1){
lives--;
markSymbol.gotoAndPlay("wrong");
trace("oops, you got a few wrong");
stopInputSequence();
startDelay();
} else {
_score = (_score + Math.pow(_inputSequence.length, 2));
};
}
private function light8ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(8);
insertInput(8);
}
private function stopSequence():void{
removeEventListener(Event.ENTER_FRAME, playSequenceHandler);
startInputSequence();
}
private function light1ClickedHandler(_arg1:MouseEvent):void{
turnOnLightNum(1);
insertInput(1);
}
private function turnOnLightNum(_arg1:int):void{
var _local2:Sound;
_lightArray[_arg1].light.gotoAndPlay(1);
_lightArray[_arg1].gotoAndPlay(1);
_local2 = _soundsArray[_arg1];
_local2.play(0, 1);
}
}
}//package com.doof.brainworkout
Section 71
//Main (com.doof.brainworkout.Main)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import com.doof.gameconnector.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public dynamic class Main extends MovieClip {
private var _musicChannel:SoundChannel;
private var _scoreStartTime:Number;
private var _titleScreen:MovieClip;
private var _instructionNum:int;// = 0
public var _finalResult:int;// = 1
public var _scoreDataArray:Array;
private var _screenNum:int;// = 0
private var _splashScreen:MovieClip;
private var _thresholdsArray:Array;
private var _endScreen:EndScreen;
private var _leaderBoard:Leaderboard;
public var _totalScore:int;// = 0
private var _scoreDelay:Number;// = 10000
private var _instructionNames:Array;
public var _playerName:String;// = "Player"
private var _entryScreen:EntryScreen;
private var _connector:Connector;
private var _countDownScreen:MovieClip;
private var _screensArray:Array;
public var _scoresArray:Array;
public function Main(){
_splashScreen = new SplashScreen();
_titleScreen = new TitleScreen();
_instructionNames = new Array();
_instructionNum = 0;
_screenNum = 0;
_screensArray = new Array();
_scoresArray = new Array();
_thresholdsArray = new Array();
_scoreDataArray = new Array();
_totalScore = 0;
_playerName = "Player";
_scoreDelay = 10000;
_finalResult = 1;
_entryScreen = new EntryScreen();
_leaderBoard = new Leaderboard();
_endScreen = new EndScreen();
_connector = new Connector();
super();
Security.allowDomain("*");
Security.allowInsecureDomain("*");
init();
}
private function enterResults(_arg1:MouseEvent):void{
if (_entryScreen.playerNameTXT.text.length > 0){
_playerName = _entryScreen.playerNameTXT.text;
};
addChild(_leaderBoard);
_leaderBoard.nextBTN.addEventListener(MouseEvent.CLICK, sendAPIEnd);
_leaderBoard.startPHP(this);
}
private function doofLinkClickedHandler(_arg1:MouseEvent):void{
getURL("http://www.doof.com/?ref=brainworkout", "_blank");
}
private function init():void{
DoofBot.init(this, "BrainWorkout");
addChild(_connector);
addChild(_splashScreen);
_splashScreen.buttonMode = true;
_splashScreen.useHandCursor = true;
_splashScreen.addEventListener(MouseEvent.CLICK, doofLinkClickedHandler);
addEventListener(Event.ENTER_FRAME, checkSplash);
_instructionNames.push("game_1");
_instructionNames.push("game_2");
_instructionNames.push("game_3");
_instructionNames.push("game_4");
_screensArray.push(new InstructionScreen());
_screensArray.push(new LightGameScreen());
_screensArray.push(new ResultScreen());
_screensArray.push(new InstructionScreen());
_screensArray.push(new ArithmeticGameScreen());
_screensArray.push(new ResultScreen());
_screensArray.push(new InstructionScreen());
_screensArray.push(new FishGameScreen());
_screensArray.push(new ResultScreen());
_screensArray.push(new InstructionScreen());
_screensArray.push(new MoneyScreen());
_screensArray.push(new ResultScreen());
_screensArray.push(new TallyScreen());
_screensArray.push(new FinalScreen());
_thresholdsArray.push(1250);
_thresholdsArray.push(6000);
_thresholdsArray.push(3000);
_thresholdsArray.push(18000);
}
private function startGameClicked(_arg1:MouseEvent):void{
_musicChannel.stop();
_screensArray[_screenNum].instructions.startBTN.removeEventListener(MouseEvent.CLICK, startGameClicked);
nextScreen();
}
public function initGame():void{
_screensArray[_screenNum].init();
}
public function finishAd():void{
_splashScreen.play();
}
private function checkTitle(_arg1:Event):void{
if (_titleScreen.startSequence.currentFrame == _titleScreen.startSequence.totalFrames){
_titleScreen.removeEventListener(Event.ENTER_FRAME, checkTitle);
endTitleScreen();
};
}
private function endTitleScreen():void{
removeChild(_titleScreen);
_titleScreen = null;
loadScreen();
}
private function startTitle():void{
_titleScreen.startSequence.gotoAndPlay(2);
_titleScreen.startSequence.goBTN.addEventListener(MouseEvent.CLICK, goClickHandler);
_titleScreen.startSequence.goBTN.buttonMode = true;
_titleScreen.startSequence.goBTN.useHandCursor = true;
_titleScreen.startSequence.logo.addEventListener(MouseEvent.CLICK, doofLinkClickedHandler);
_titleScreen.startSequence.logo.buttonMode = true;
_titleScreen.startSequence.logo.useHandCursor = true;
addChild(_titleScreen);
}
public function nextScreen():void{
_screensArray[_screenNum].visible = false;
removeChild(_screensArray[_screenNum]);
_screensArray[_screenNum] = null;
delete _screensArray[_screenNum];
_screenNum++;
loadScreen();
Mouse.show();
}
private function getURL(_arg1:String, _arg2:String=null):void{
var req:URLRequest;
var url = _arg1;
var window = _arg2;
req = new URLRequest(url);
try {
navigateToURL(req, window);
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
private function gigyaShare(_arg1:MouseEvent):void{
var mcWF:MovieClip;
var ModuleID:String;
var cfg:Object;
var ldr:Loader;
var url:String;
var urlReq:URLRequest;
var e = _arg1;
Security.allowDomain("cdn.gigya.com");
Security.allowInsecureDomain("cdn.gigya.com");
mcWF = new MovieClip();
addChild(mcWF).name = "mcWF";
mcWF.x = 0;
mcWF.y = 0;
ModuleID = "PostModule1";
cfg = {};
cfg["width"] = "600";
cfg["height"] = "450";
cfg["bookmarkURL"] = "http://www.doof.com/#/games/BrainWorkout";
cfg["widgetTitle"] = "Track Star";
cfg["advancedTracking"] = "true";
cfg["partner"] = "177341";
cfg["UIConfig"] = "<config><display showDesktop=\"true\" showEmail=\"true\" useTransitions=\"true\" showBookmark=\"true\" codeBoxHeight=\"auto\" showCodeBox=\"true\" showCloseButton=\"true\" bulletinChecked=\"false\" networksWithCodeBox=\"\"></display><body corner-roundness=\"8;8;8;8\"><background frame-color=\"Transparent\" gradient-color-begin=\"#353535\" gradient-color-end=\"#606060\" corner-roundness=\"8;8;8;8\"></background><controls size=\"11\" bold=\"true\"><snbuttons iconsOnly=\"false\" type=\"textUnder\" frame-color=\"#6D0000\" background-color=\"#FFFFFF\" over-background-color=\"#FFFFFF\" color=\"#CACACA\" corner-roundness=\"0;8;8;8\" gradient-color-begin=\"#8A8A8A\" gradient-color-end=\"#000000\" font=\"Arial\" size=\"11\" bold=\"false\" over-gradient-color-begin=\"#AAAAAA\" over-gradient-color-end=\"#000000\" over-color=\"#F4F4F4\" down-color=\"#000000\"><more frame-color=\"Transparent\"></more></snbuttons><textboxes frame-color=\"#000000\" color=\"#AAAAAA\" corner-roundness=\"0;0;0;0\" gradient-color-begin=\"#202020\" gradient-color-end=\"#0B0B0B\" font=\"Arial\" bold=\"false\"><codeboxes color=\"#EAEAEA\" frame-color=\"#8A8A8A\" gradient-color-begin=\"#000000\" font=\"Arial\" bold=\"false\"></codeboxes><inputs frame-color=\"#6D0000\"></inputs><dropdowns frame-color=\"#6D0000\" handle-gradient-color-begin=\"#B60000\" handle-gradient-color-end=\"#6D0000\" handle-over-gradient-color-begin=\"#FF0000\" handle-over-gradient-color-end=\"#DA0000\" handle-down-gradient-color-begin=\"#FF0000\" handle-down-gradient-color-end=\"#6D0000\" background-color=\"#6D0000\" gradient-color-begin=\"#000000\" font=\"Arial\" bold=\"false\"></dropdowns></textboxes><buttons frame-color=\"#FF0000\" gradient-color-begin=\"#FF2424\" gradient-color-end=\"#6D0000\" color=\"#F4F4F4\" corner-roundness=\"0;8;8;8\" font=\"Arial\" size=\"10\" bold=\"false\" down-frame-color=\"#000000\" over-gradient-color-begin=\"#DA0000\" down-gradient-color-begin=\"#910000\" over-gradient-color-end=\"#DA0000\" down-gradient-color-end=\"#FF0000\" over-color=\"#F4F4F4\"><post-buttons gradient-color-begin=\"#FF4949\" gradient-color-end=\"#6D0000\"></post-buttons></buttons><listboxes corner-roundness=\"5;5;5;5\"></listboxes><servicemarker gradient-color-begin=\"#DA0000\" gradient-color-end=\"#DA0000\"></servicemarker></controls><texts color=\"#FFFFFF\" font=\"Arial\" size=\"10\"><privacy color=\"#959595\" size=\"11\"></privacy><headers size=\"11\" bold=\"true\"></headers><labels size=\"11\" bold=\"true\"></labels><messages color=\"#D5D5D5\" frame-thickness=\"0\" corner-roundness=\"0;0;0;0\" gradient-color-begin=\"#B60000\" gradient-color-end=\"#000000\" size=\"11\" bold=\"true\"></messages><links color=\"#DFDFDF\" underline=\"false\" size=\"11\" bold=\"true\" over-color=\"#FFFFFF\"></links></texts></body></config>";
cfg["defaultContent"] = "<object width=\"600\" height=\"450\"> <param name=\"movie\" value=\"http://static.doof.com/content/static/games/BrainWorkout/BrainWorkout.swf\"></param> <param name=\"wmode\" value=\"transparent\"></param> <embed src=\"http://static.doof.com/content/static/games/BrainWorkout/BrainWorkout.swf\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"600\" height=\"450\"></embed></object>";
cfg["onPostProfile"] = function (_arg1:Object):void{
trace(((((("event fired eventObj.type=" + _arg1.type) + " eventObj.network=") + _arg1.network) + " eventObj.partnerData=") + _arg1.partnerData));
};
cfg["onLoad"] = function (_arg1:Object):void{
trace(((("event fired eventObj.type=" + _arg1.type) + "eventObj.ModuleID=") + _arg1.ModuleID));
};
cfg["onClose"] = function (_arg1:Object):void{
mcWF.visible = false;
removeChild(mcWF);
};
ldr = new Loader();
url = ("http://cdn.gigya.com/WildFire/swf/wildfireInAS3.swf?ModuleID=" + ModuleID);
urlReq = new URLRequest(url);
mcWF[ModuleID] = cfg;
ldr.load(urlReq);
mcWF.addChild(ldr);
}
private function loadScreen():void{
var _local1:Sound;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Number;
var _local10:int;
trace(("screen loading = " + _screensArray[_screenNum]));
if ((_screensArray[_screenNum] is InstructionScreen)){
addChild(_screensArray[_screenNum]);
trace(("instructions playing: " + _instructionNames[_instructionNum]));
_screensArray[_screenNum].instructions.gotoAndPlay(_instructionNames[_instructionNum]);
_screensArray[_screenNum].instructions.startBTN.addEventListener(MouseEvent.CLICK, startGameClicked);
_screensArray[_screenNum].instructions.startBTN.buttonMode = true;
_screensArray[_screenNum].instructions.startBTN.useHandCursor = true;
_instructionNum++;
_local1 = new BrainMusic();
_musicChannel = _local1.play(0, 99999);
} else {
if ((_screensArray[_screenNum] is ResultScreen)){
_local1 = new BrainMusic();
_musicChannel = _local1.play(0, 99999);
_screensArray[_screenNum].x = 5;
_screensArray[_screenNum].y = 55;
startScoreTimer();
if (_instructionNum == 1){
_local4 = _scoreDataArray[(_instructionNum - 1)].sequenceLength;
_screensArray[_screenNum].resultsPanel.scoreText.scoreTXT.text = "Sequence length: \nScore: ";
_screensArray[_screenNum].resultsPanel.scoreText.score2TXT.text = (("" + _local4) + "\n");
_screensArray[_screenNum].resultsPanel.scoreText.score2TXT.appendText((_scoresArray[(_instructionNum - 1)].toString() + "\n"));
};
if (_instructionNum == 2){
_local5 = _scoreDataArray[(_instructionNum - 1)].bonus;
_local6 = _scoreDataArray[(_instructionNum - 1)].numIncorrect;
_local7 = (_scoreDataArray[(_instructionNum - 1)].timeTaken / 1000);
_screensArray[_screenNum].resultsPanel.scoreText.scoreTXT.text = "Time taken: \nIncorrect: \nBonus: \nScore: ";
_screensArray[_screenNum].resultsPanel.scoreText.score2TXT.text = ((((((_local7 + "\n") + _local6) + "\n") + _local5) + "\n") + _scoresArray[(_instructionNum - 1)]);
};
if (_instructionNum == 3){
_local8 = _scoreDataArray[(_instructionNum - 1)].numCorrect;
_screensArray[_screenNum].resultsPanel.scoreText.scoreTXT.text = "Correct: \nScore: ";
_screensArray[_screenNum].resultsPanel.scoreText.score2TXT.text = ((_local8 + "\n") + _scoresArray[(_instructionNum - 1)]);
};
if (_instructionNum == 4){
_local5 = _scoreDataArray[(_instructionNum - 1)].bonus;
trace(("bonus" + _local5));
_local7 = _scoreDataArray[(_instructionNum - 1)].timeTaken;
trace(("time taken" + _local7));
_local6 = _scoreDataArray[(_instructionNum - 1)].numIncorrect;
trace(("num incorrect" + _local6));
_screensArray[_screenNum].resultsPanel.scoreText.scoreTXT.text = "Time taken: \nIncorrect: \nBonus: \nScore: ";
_screensArray[_screenNum].resultsPanel.scoreText.score2TXT.text = ((((((_local7 + "\n") + _local6) + "\n") + _local5) + "\n") + _scoresArray[(_instructionNum - 1)]);
};
addChild(_screensArray[_screenNum]);
_local2 = _scoresArray[(_instructionNum - 1)];
trace(("SCORE: " + _local2));
_local3 = Math.ceil((_local2 / (_thresholdsArray[(_instructionNum - 1)] / 4)));
trace(("result: " + _local3));
_screensArray[_screenNum].gotoAndStop(_local3);
_screensArray[_screenNum].nextBTN.addEventListener(MouseEvent.CLICK, clickNextResults);
} else {
if ((_screensArray[_screenNum] is FinalScreen)){
trace(("TOTAL SCORE: " + _totalScore));
_local9 = (29000 / 8);
_finalResult = Math.ceil(((_totalScore / _local9) + 0.01));
trace(("FINAL RESULT: " + _finalResult));
addChild(_screensArray[_screenNum]);
_screensArray[_screenNum].gotoAndPlay(1);
_screensArray[_screenNum].ranking.gotoAndPlay(1);
_screensArray[_screenNum].endBTN.addEventListener(MouseEvent.CLICK, clickEndGame);
} else {
if ((_screensArray[_screenNum] is TallyScreen)){
_local10 = 0;
while (_local10 < _scoresArray.length) {
_totalScore = (_totalScore + _scoresArray[_local10]);
_local10++;
};
_screensArray[_screenNum].results.scores.game1.text = _scoresArray[0];
_screensArray[_screenNum].results.scores.game2.text = _scoresArray[1];
_screensArray[_screenNum].results.scores.game3.text = _scoresArray[2];
_screensArray[_screenNum].results.scores.game4.text = _scoresArray[3];
_screensArray[_screenNum].results.final.final.text = ("Total Score: " + _totalScore);
_screensArray[_screenNum].startBTN.addEventListener(MouseEvent.CLICK, clickShowFinal);
_screensArray[_screenNum].startBTN.buttonMode = true;
_screensArray[_screenNum].startBTN.useHandCursor = true;
_screensArray[_screenNum].results.gotoAndPlay(1);
addChild(_screensArray[_screenNum]);
} else {
addChild(_screensArray[_screenNum]);
addChild(new DarwinCountdown());
};
};
};
};
}
private function stopScoreTimer():void{
removeEventListener(Event.ENTER_FRAME, checkScoreTimer);
_screensArray[_screenNum].resultsPanel.visible = true;
_screensArray[_screenNum].resultsPanel.gotoAndPlay(_instructionNames[(_instructionNum - 1)]);
}
private function checkScoreTimer(_arg1:Event):void{
if ((getTimer() - _scoreStartTime) > _scoreDelay){
stopScoreTimer();
};
}
private function sendAPIEnd(_arg1:MouseEvent):void{
var _local2:String;
_leaderBoard.nextBTN.removeEventListener(MouseEvent.CLICK, sendAPIEnd);
_endScreen.scoreTXT.text = _totalScore.toString();
DoofBot.end(this, "BrainWorkout");
_connector.gameEnded(_totalScore);
_local2 = this.loaderInfo.url;
if (_local2.search("doof.com") == -1){
addChild(_endScreen);
_endScreen.replayBTN.addEventListener(MouseEvent.CLICK, restartGame);
_endScreen.shareBTN.addEventListener(MouseEvent.CLICK, gigyaShare);
_endScreen.doofBTN.addEventListener(MouseEvent.CLICK, doofLinkClickedHandler);
};
}
private function checkSplash(_arg1:Event):void{
if (_splashScreen.currentFrame == 50){
_splashScreen.gotoAndStop(51);
_splashScreen.logo.stop();
MochiAd.showPreGameAd({clip:root, id:"7cd4427e1a69020d", res:"600x450", ad_finished:finishAd});
};
if (_splashScreen.currentFrame >= _splashScreen.totalFrames){
removeEventListener(Event.ENTER_FRAME, checkSplash);
removeChild(_splashScreen);
_splashScreen = null;
startTitle();
};
}
private function goClickHandler(_arg1:MouseEvent):void{
_connector.gameStarted(0);
MochiBot.track(this, "973b8dee");
DoofBot.start(this, "BrainWorkout");
_titleScreen.startSequence.goBTN.removeEventListener(MouseEvent.CLICK, goClickHandler);
_titleScreen.startSequence.gotoAndPlay("play");
_titleScreen.addEventListener(Event.ENTER_FRAME, checkTitle);
}
private function clickEndGame(_arg1:MouseEvent):void{
_screensArray[_screenNum].visible = false;
removeChild(_screensArray[_screenNum]);
_screensArray[_screenNum] = null;
delete _screensArray[_screenNum];
addChild(_entryScreen);
_entryScreen.nextBTN.addEventListener(MouseEvent.CLICK, enterResults);
}
private function clickShowFinal(_arg1:MouseEvent):void{
_screensArray[_screenNum].startBTN.visible = false;
_screensArray[_screenNum].results.gotoAndPlay(101);
}
private function restartGame(_arg1:MouseEvent):void{
var _local2:int;
removeChild(_entryScreen);
removeChild(_leaderBoard);
removeChild(_endScreen);
_splashScreen = new SplashScreen();
_titleScreen = new TitleScreen();
_instructionNames = new Array();
_instructionNum = 0;
_screenNum = 0;
_screensArray = new Array();
_scoresArray = new Array();
_thresholdsArray = new Array();
_scoreDataArray = new Array();
_totalScore = 0;
_playerName = "Player";
_scoreStartTime = new Number();
_scoreDelay = 10000;
_finalResult = 1;
_countDownScreen = new MovieClip();
_musicChannel = null;
_entryScreen = new EntryScreen();
_leaderBoard = new Leaderboard();
_endScreen = new EndScreen();
_connector = new Connector();
_local2 = 0;
while (_local2 < this.numChildren) {
this.removeChildAt(_local2);
_local2++;
};
_local2 = 0;
while (_local2 < _screensArray.length) {
if (_screensArray[_local2] != null){
removeChild(_screensArray[_local2]);
};
_local2++;
};
init();
}
private function clickNextResults(_arg1:MouseEvent):void{
_musicChannel.stop();
_screensArray[_screenNum].nextBTN.removeEventListener(MouseEvent.CLICK, clickNextResults);
stopScoreTimer();
nextScreen();
}
private function startScoreTimer():void{
_screensArray[_screenNum].resultsPanel.visible = false;
_scoreStartTime = getTimer();
addEventListener(Event.ENTER_FRAME, checkScoreTimer);
}
}
}//package com.doof.brainworkout
Section 72
//PHPLeaderboard (com.doof.brainworkout.PHPLeaderboard)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
import com.adobe.crypto.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
public class PHPLeaderboard extends MovieClip {
public var _parentRef:Object;
public var _team:String;
public var nextBTN:SimpleButton;
public var _timeStamp:String;
public var _hashedKey:String;
public var row1:MovieClip;
public var row2:MovieClip;
public var row3:MovieClip;
public var row4:MovieClip;
public var row7:MovieClip;
public var row9:MovieClip;
public var _stats:String;
public var _score:Number;
public var row5:MovieClip;
public var row6:MovieClip;
public var row8:MovieClip;
public var loadingMC:MovieClip;
public static var key:String = "tof#hn7SRrsnr8h7?ghrioc-xhp9nhnt+h$&";
private function buildHashKey():void{
var _local1:String;
_local1 = key.concat(_timeStamp);
_local1 = getSHA1(_local1);
_hashedKey = _local1;
trace(("hashed time.key: " + _local1));
sendScore();
}
private function sendCompleteHandler(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
trace(("php sent me: " + _local2.data.toString()));
loadIndividuals();
}
private function loadIndividuals():void{
var _local1:URLVariables;
var _local2:URLRequest;
var _local3:URLLoader;
_local1 = new URLVariables();
_local1.score = _parentRef._totalScore;
_local1.name = _parentRef._playerName;
_local1.rnd = Math.floor((Math.random() * 1000));
_local2 = new URLRequest("http://www.doof.com/spoof/brainworkout/index.php/scores/get_individual/");
_local3 = new URLLoader();
_local3.dataFormat = URLLoaderDataFormat.TEXT;
_local2.data = _local1;
_local2.method = URLRequestMethod.POST;
_local3.addEventListener(Event.COMPLETE, individualsCompleteHandler);
_local3.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_local3.load(_local2);
}
private function sendData(_arg1:String, _arg2:Object):void{
var _local3:URLRequest;
var _local4:URLLoader;
_local3 = new URLRequest(_arg1);
_local4 = new URLLoader();
_local4.dataFormat = URLLoaderDataFormat.TEXT;
_local3.data = _arg2;
_local3.method = URLRequestMethod.POST;
_local4.addEventListener(Event.COMPLETE, sendCompleteHandler);
_local4.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_local4.load(_local3);
}
private function getSHA1(_arg1:String):String{
var _local2:String;
_local2 = SHA1.hash(_arg1);
return (_local2);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
trace(("io error generated by " + _arg1.target));
}
public function TestPHPResults():void{
}
private function loadTimeCompleteHandler(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
trace(("time received: " + _local2.data.toString()));
_timeStamp = _local2.data.toString();
buildHashKey();
}
public function startPHP(_arg1:Object):void{
_parentRef = _arg1;
trace("starting PHP");
Security.allowDomain("*");
Security.allowInsecureDomain("*");
trace("loading crossdomain policy from http://www.doof.com/crossdomain.xml");
Security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
loadTimeURL("http://www.doof.com/spoof/brainworkout/index.php/timestamp/get/");
}
private function loadTimeURL(_arg1:String):void{
var rnd:Number;
var loader:URLLoader;
var request:URLRequest;
var urlString = _arg1;
rnd = Math.floor((Math.random() * 1000));
urlString = urlString.concat(rnd);
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loadTimeCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
request = new URLRequest(urlString);
try {
loader.load(request);
} catch(error:Error) {
trace("Unable to load requested document.");
};
}
public function displayInd(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = 0;
while ((((_local2 < _arg1.length)) && ((_local2 < 9)))) {
_local4 = (_local2 + 1);
this[("row" + _local4)].gotoAndStop(1);
if ((((_arg1[_local2].score == Object(parent)._totalScore)) && ((_arg1[_local2].name == Object(parent)._playerName)))){
this[("row" + _local4)].gotoAndStop(2);
this[("row" + _local4)].rank.textColor = "0x000000";
this[("row" + _local4)].playerName.textColor = "0x000000";
this[("row" + _local4)].score.textColor = "0x000000";
};
if ((((_arg1[_local2].rank == null)) || ((_arg1[_local2].rank == undefined)))){
_arg1[_local2].rank = "";
};
if ((((_arg1[_local2].name == null)) || ((_arg1[_local2].name == undefined)))){
_arg1[_local2].name = "";
};
if ((((_arg1[_local2].score == null)) || ((_arg1[_local2].score == undefined)))){
_arg1[_local2].score = "";
};
this[("row" + _local4)].rank.text = _arg1[_local2].rank;
this[("row" + _local4)].playerName.text = _arg1[_local2].name;
this[("row" + _local4)].score.text = _arg1[_local2].score;
_local2++;
};
_local3 = (_arg1.length + 1);
while (_local3 <= 9) {
this[("row" + _local3)].visible = false;
_local3++;
};
}
public function readIndividualString(_arg1:String):Array{
var _local2:String;
var _local3:Array;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Array;
var _local8:Object;
_local2 = _arg1;
trace(("string before: " + _local2));
if (_local2.substr(_local2.length, -1) == "|"){
_local2 = _local2.substr(0, (_local2.length - 1));
};
trace(("string after: " + _local2));
_local3 = new Array();
_local4 = _local2.split("|");
_local5 = 0;
while (_local5 < _local4.length) {
_local7 = _local4[_local5].split(",");
trace(_local7.toString());
_local8 = {rank:_local7[0], name:_local7[1], score:_local7[2]};
_local3.push(_local8);
_local5++;
};
_local6 = 0;
while (_local6 < _local3.length) {
_local8 = _local3[_local6];
trace(_local8.rank);
trace(_local8.name);
trace(_local8.score);
_local6++;
};
return (_local3);
}
private function individualsCompleteHandler(_arg1:Event):void{
var _local2:URLLoader;
var _local3:String;
var _local4:*;
_local2 = URLLoader(_arg1.target);
_local3 = _local2.data.toString();
trace(("individual scores received: " + _local3));
loadingMC.visible = false;
_local4 = new Array();
_local4 = readIndividualString(_local3);
displayInd(_local4);
}
private function sendScore():void{
var _local1:URLVariables;
_local1 = new URLVariables();
_local1.key = _hashedKey;
_local1.score = _parentRef._totalScore;
_local1.name = _parentRef._playerName;
_local1.rnd = Math.floor((Math.random() * 1000));
trace(("Flash is sending vars: " + _local1.toString()));
sendData("http://www.doof.com/spoof/brainworkout/index.php/scores/process/", _local1);
}
}
}//package com.doof.brainworkout
Section 73
//PixelPerfectCollisionDetection (com.doof.brainworkout.PixelPerfectCollisionDetection)
package com.doof.brainworkout {
import flash.display.*;
import flash.geom.*;
public class PixelPerfectCollisionDetection {
public static function getCollisionRect(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Rectangle{
var _local6:Rectangle;
var _local7:Rectangle;
var _local8:Rectangle;
var _local9:BitmapData;
var _local10:BitmapData;
var _local11:uint;
var _local12:Rectangle;
var _local13:int;
_local6 = _arg1.getBounds(_arg3);
_local7 = _arg2.getBounds(_arg3);
_local8 = _local6.intersection(_local7);
if (_local8.size.length > 0){
if (_arg4){
_local8.width = Math.ceil(_local8.width);
_local8.height = Math.ceil(_local8.height);
_local9 = getAlphaMap(_arg1, _local8, BitmapDataChannel.RED, _arg3);
_local10 = getAlphaMap(_arg2, _local8, BitmapDataChannel.GREEN, _arg3);
_local9.draw(_local10, null, null, BlendMode.LIGHTEN);
if (_arg5 <= 0){
_local11 = 65792;
} else {
if (_arg5 > 1){
_arg5 = 1;
};
_local13 = Math.round((_arg5 * 0xFF));
_local11 = (((_local13 << 16) | (_local13 << 8)) | 0);
};
_local12 = _local9.getColorBoundsRect(_local11, _local11);
_local9.getColorBoundsRect(_local11, _local11).x = (_local12.x + _local8.x);
_local12.y = (_local12.y + _local8.y);
return (_local12);
} else {
return (_local8);
};
//unresolved jump
};
return (null);
}
public static function isColliding(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Boolean{
var _local6:Rectangle;
_local6 = getCollisionRect(_arg1, _arg2, _arg3, _arg4, _arg5);
if (((!((_local6 == null))) && ((_local6.size.length > 0)))){
return (true);
};
return (false);
}
public static function getCollisionPoint(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObjectContainer, _arg4:Boolean=false, _arg5:Number=0):Point{
var _local6:Rectangle;
var _local7:Number;
var _local8:Number;
_local6 = getCollisionRect(_arg1, _arg2, _arg3, _arg4, _arg5);
if (((!((_local6 == null))) && ((_local6.size.length > 0)))){
_local7 = ((_local6.left + _local6.right) / 2);
_local8 = ((_local6.top + _local6.bottom) / 2);
return (new Point(_local7, _local8));
};
return (null);
}
private static function getAlphaMap(_arg1:DisplayObject, _arg2:Rectangle, _arg3:uint, _arg4:DisplayObjectContainer):BitmapData{
var _local5:Matrix;
var _local6:Matrix;
var _local7:BitmapData;
var _local8:BitmapData;
_local5 = _arg4.transform.concatenatedMatrix.clone();
_local5.invert();
_local6 = _arg1.transform.concatenatedMatrix.clone();
_local6.concat(_local5);
_local6.translate(-(_arg2.x), -(_arg2.y));
_local7 = new BitmapData(_arg2.width, _arg2.height, true, 0);
_local7.draw(_arg1, _local6);
_local8 = new BitmapData(_arg2.width, _arg2.height, false, 0);
_local8.copyChannel(_local7, _local7.rect, new Point(0, 0), BitmapDataChannel.ALPHA, _arg3);
return (_local8);
}
}
}//package com.doof.brainworkout
Section 74
//TimeForChange (com.doof.brainworkout.TimeForChange)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import com.doof.braintrain.*;
public class TimeForChange extends MovieClip {
private var _numIncorrect:int;// = 0
private var _lives:Number;// = 8
private var _endTime:Number;
private var _startContinueTime:Number;
private var _coinPosX:Array;
private var _coinPosY:Array;
public var submitBTN:MovieClip;
private var _continueDelay:Number;// = 2000
public var tray:MovieClip;
private var _moneyGiven:Number;
public var itemsMC:MovieClip;
public var timeBonus:TextField;
private var _trayValue:Number;// = 0
private var _itemPrice:Number;
public var _score:uint;// = 0
public var p500:MovieClip;
private var _startTimer:Number;
private var _roundNum:int;// = 0
public var moneyGiven:TextField;
public var totalScore:TextField;
public var markSymbol:MarkSymbol;
private var _coinArray:Array;
public var p1000:MovieClip;
private var _timeBonus:uint;// = 10000
private var _totalBonus:int;// = 0
private var _startTime:Number;
private var _playing:Boolean;// = true
public var itemPrice:TextField;
public function TimeForChange(){
_coinArray = new Array();
_trayValue = 0;
_lives = 8;
_timeBonus = 10000;
_score = 0;
_playing = true;
_startTime = getTimer();
_coinPosX = new Array();
_coinPosY = new Array();
_roundNum = 0;
_totalBonus = 0;
_numIncorrect = 0;
_continueDelay = 2000;
super();
submitBTN.visible = false;
itemsMC.stop();
}
public function submitChange(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:uint;
_local2 = Number(((_moneyGiven - (_itemPrice * 100)) - _trayValue).toFixed(2));
if ((((_local2 < 0)) && ((_local2 >= -0.01)))){
_local2 = 0;
};
if ((((_local2 > 0)) && ((_local2 <= -0.01)))){
_local2 = 0;
};
if (_local2 == 0){
_playing = false;
_endTime = getTimer();
_local3 = ((_timeBonus / (_endTime - _startTime)) * 1000);
_totalBonus = (_totalBonus + _local3);
_score = (_score + (1000 + _local3));
trace("correct!");
markSymbol.gotoAndPlay("right");
_lives--;
startContinueTimer();
} else {
trace("wrong!");
_numIncorrect++;
markSymbol.gotoAndPlay("wrong");
_lives--;
startContinueTimer();
};
if (_lives < 0){
};
}
private function nextGameHandler(_arg1:Event):void{
}
public function resetCoins():void{
var _local1:uint;
_local1 = 0;
while (_local1 < _coinArray.length) {
_coinArray[_local1].coinRef.visible = false;
_local1++;
};
}
public function checkInTray(_arg1:Object):void{
var _local2:Number;
if (PixelPerfectCollisionDetection.isColliding(DisplayObject(_arg1), tray, this, true, 100)){
if (!_arg1._inTray){
_arg1._inTray = true;
_trayValue = (_trayValue + _arg1.value);
createNewCoin(_arg1.value);
trace((("Tray Value = " + _trayValue) + "p"));
_local2 = Number(((_moneyGiven - (_itemPrice * 100)) - _trayValue).toFixed(2));
trace(("balance = " + _local2));
};
} else {
if (_arg1._inTray){
_arg1._inTray = false;
_trayValue = (_trayValue - _arg1.value);
trace("dragged back out of tray");
trace((("Tray Value = " + _trayValue) + "p"));
_local2 = Number(((_moneyGiven - (_itemPrice * 100)) - _trayValue).toFixed(2));
trace(("balance = " + _local2));
};
};
}
private function checkContinueTimer(_arg1:Event):void{
if ((getTimer() - _startContinueTime) > _continueDelay){
continueGame();
};
}
public function init():void{
_startTimer = getTimer();
buildCoinArray();
createAllCoins();
customerPurchase();
startClock();
addEventListener(Event.ENTER_FRAME, timeBonusHandler);
submitBTN.addEventListener(MouseEvent.CLICK, submitChange);
submitBTN.visible = true;
itemsMC.stop();
}
public function continueGame():void{
var _local1:int;
var _local2:int;
var _local3:Object;
removeEventListener(Event.ENTER_FRAME, checkContinueTimer);
_local1 = Math.ceil((Math.random() * itemsMC.totalFrames));
itemsMC.gotoAndStop(_local1);
_roundNum++;
if (_roundNum > 5){
_local2 = ((getTimer() - _startTimer) / 1000);
_local3 = {timeTaken:_local2, bonus:_totalBonus, numIncorrect:_numIncorrect};
Object(parent)._scoreDataArray.push(_local3);
Object(parent)._scoresArray.push(_score);
Object(parent).nextScreen();
};
resetCoins();
_coinArray = new Array();
_trayValue = 0;
createNewCoin(1);
createNewCoin(2);
createNewCoin(5);
createNewCoin(10);
createNewCoin(20);
createNewCoin(50);
createNewCoin(100);
createNewCoin(200);
customerPurchase();
_playing = true;
}
public function createAllCoins():void{
createNewCoin(1);
createNewCoin(2);
createNewCoin(5);
createNewCoin(10);
createNewCoin(20);
createNewCoin(50);
createNewCoin(100);
createNewCoin(200);
}
public function setCoinToTop(_arg1:Coin):void{
var _local2:uint;
_local2 = 0;
while (_local2 < _coinArray.length) {
if (_coinArray[_local2].coinRef == _arg1){
setChildIndex(_coinArray[_local2].coinRef, (numChildren - 1));
};
_local2++;
};
}
private function timeBonusHandler(_arg1:Event):void{
var _local2:uint;
var _local3:String;
if (_playing){
_endTime = getTimer();
};
_local2 = ((_timeBonus / (_endTime - _startTime)) * 1000);
_local3 = _local2.toString();
timeBonus.text = ("Time bonus: " + _local3);
}
public function startClock():void{
}
public function createNewCoin(_arg1:uint):void{
var _local2:Object;
var _local3:Coin;
var _local4:Object;
if (_arg1 == 1){
_local2 = addChild(new Coin1());
_local2.x = _coinPosX[0];
_local2.y = _coinPosY[0];
};
if (_arg1 == 2){
_local2 = addChild(new Coin2());
_local2.x = _coinPosX[1];
_local2.y = _coinPosY[1];
};
if (_arg1 == 5){
_local2 = addChild(new Coin5());
_local2.x = _coinPosX[2];
_local2.y = _coinPosY[2];
};
if (_arg1 == 10){
_local2 = addChild(new Coin10());
_local2.x = _coinPosX[3];
_local2.y = _coinPosY[3];
};
if (_arg1 == 20){
_local2 = addChild(new Coin20());
_local2.x = _coinPosX[4];
_local2.y = _coinPosY[4];
};
if (_arg1 == 50){
_local2 = addChild(new Coin50());
_local2.x = _coinPosX[5];
_local2.y = _coinPosY[5];
};
if (_arg1 == 100){
_local2 = addChild(new Coin100());
_local2.x = _coinPosX[6];
_local2.y = _coinPosY[6];
};
if (_arg1 == 200){
_local2 = addChild(new Coin200());
_local2.x = _coinPosX[7];
_local2.y = _coinPosY[7];
};
_local3 = Coin(_local2);
_local3._parentRef = this;
_local4 = {coinRef:_local2, depth:100};
_coinArray.push(_local4);
}
public function buildCoinArray():void{
var _local1:uint;
var _local2:Coin;
var _local3:Object;
_local1 = 0;
while (_local1 < numChildren) {
if ((getChildAt(_local1) is Coin)){
_local2 = Coin(getChildAt(_local1));
_local2._parentRef = this;
_local3 = {coinRef:_local2, depth:_local1};
_local2.visible = false;
_coinPosX.push(_local2.x);
_coinPosY.push(_local2.y);
_coinArray.push(_local3);
};
_local1++;
};
}
private function startContinueTimer():void{
_startContinueTime = getTimer();
addEventListener(Event.ENTER_FRAME, checkContinueTimer);
}
public function customerPurchase():void{
var _local1:Array;
var _local2:uint;
totalScore.text = ("Total Score: " + _score.toString());
_itemPrice = Number(((Math.random() * 1000) / 100).toFixed(2));
if (_itemPrice >= 5){
_moneyGiven = Number(1000.toFixed(2));
MovieClip(getChildByName("p500")).gotoAndStop("stopped");
MovieClip(getChildByName("p1000")).gotoAndPlay("playing");
} else {
_moneyGiven = 500;
MovieClip(getChildByName("p500")).gotoAndPlay("playing");
MovieClip(getChildByName("p1000")).gotoAndStop("stopped");
};
moneyGiven.text = ("Money Given: £" + (_moneyGiven / 100));
_local1 = String(_itemPrice).split(".");
_local2 = _local1[1].length;
if (_local2 >= 2){
itemPrice.text = ("Item Price: £" + _itemPrice);
} else {
itemPrice.text = (("Item Price: £" + _itemPrice) + "0");
};
_startTime = getTimer();
}
}
}//package com.doof.brainworkout
Section 75
//VirtualNumpad (com.doof.brainworkout.VirtualNumpad)
package com.doof.brainworkout {
import flash.events.*;
import flash.display.*;
public class VirtualNumpad extends MovieClip {
private var _parentRef:Object;
public var _active:Boolean;// = false
public var key0:SimpleButton;
public var key2:SimpleButton;
public var key4:SimpleButton;
public var key6:SimpleButton;
public var key1:SimpleButton;
public var key9:SimpleButton;
public var key3:SimpleButton;
public var key5:SimpleButton;
public var key7:SimpleButton;
public var key8:SimpleButton;
public function VirtualNumpad(){
_active = false;
super();
_parentRef = Object(parent);
startListeners();
addEventListener(Event.ENTER_FRAME, checkStage);
}
public function key3Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(3);
};
}
public function key2Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(2);
};
}
public function startKeyListeners():void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
}
public function key9Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(9);
};
}
public function key1Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(1);
};
}
public function stopListeners():void{
key0.removeEventListener(MouseEvent.CLICK, key0Handler);
key1.removeEventListener(MouseEvent.CLICK, key1Handler);
key2.removeEventListener(MouseEvent.CLICK, key2Handler);
key3.removeEventListener(MouseEvent.CLICK, key3Handler);
key4.removeEventListener(MouseEvent.CLICK, key4Handler);
key5.removeEventListener(MouseEvent.CLICK, key5Handler);
key6.removeEventListener(MouseEvent.CLICK, key6Handler);
key7.removeEventListener(MouseEvent.CLICK, key7Handler);
key8.removeEventListener(MouseEvent.CLICK, key8Handler);
key9.removeEventListener(MouseEvent.CLICK, key9Handler);
}
public function kill():void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
stopListeners();
}
public function key0Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(0);
};
}
public function key8Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(8);
};
}
public function key6Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(6);
};
}
public function key7Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(7);
};
}
public function keyDownHandler(_arg1:KeyboardEvent):void{
if (_active){
if (_arg1.keyCode == 48){
_parentRef.numpad(0);
};
if (_arg1.keyCode == 49){
_parentRef.numpad(1);
};
if (_arg1.keyCode == 50){
_parentRef.numpad(2);
};
if (_arg1.keyCode == 51){
_parentRef.numpad(3);
};
if (_arg1.keyCode == 52){
_parentRef.numpad(4);
};
if (_arg1.keyCode == 53){
_parentRef.numpad(5);
};
if (_arg1.keyCode == 54){
_parentRef.numpad(6);
};
if (_arg1.keyCode == 55){
_parentRef.numpad(7);
};
if (_arg1.keyCode == 56){
_parentRef.numpad(8);
};
if (_arg1.keyCode == 57){
_parentRef.numpad(9);
};
};
}
public function key5Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(5);
};
}
public function key4Handler(_arg1:MouseEvent):void{
if (_active){
_parentRef.numpad(4);
};
}
public function checkStage(_arg1:Event):void{
if (stage != null){
trace("stage valid");
removeEventListener(Event.ENTER_FRAME, checkStage);
startKeyListeners();
};
}
public function startListeners():void{
key0.addEventListener(MouseEvent.CLICK, key0Handler);
key1.addEventListener(MouseEvent.CLICK, key1Handler);
key2.addEventListener(MouseEvent.CLICK, key2Handler);
key3.addEventListener(MouseEvent.CLICK, key3Handler);
key4.addEventListener(MouseEvent.CLICK, key4Handler);
key5.addEventListener(MouseEvent.CLICK, key5Handler);
key6.addEventListener(MouseEvent.CLICK, key6Handler);
key7.addEventListener(MouseEvent.CLICK, key7Handler);
key8.addEventListener(MouseEvent.CLICK, key8Handler);
key9.addEventListener(MouseEvent.CLICK, key9Handler);
}
}
}//package com.doof.brainworkout
Section 76
//Connector (com.doof.gameconnector.Connector)
package com.doof.gameconnector {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class Connector extends MovieClip {
private var _onStage:Boolean;
private var _localConnection:LocalConnection;
private var _doofConnectionName:String;// = "doof"
private var _stopGame:Function;
public function Connector():void{
_doofConnectionName = "doof";
super();
trace("allowing all domains");
_localConnection = new LocalConnection();
_localConnection.addEventListener(StatusEvent.STATUS, onStatus);
_localConnection.allowDomain("*");
_onStage = false;
}
public function get stopGame():Function{
return (_stopGame);
}
public function gameStatList(_arg1:Array):void{
trace(("GameConnectorAS3.gameStatList() stats=" + _arg1.toString()));
_localConnection.send(doofConnectionName, "gameStatList", _arg1);
}
public function gameStarted(_arg1:Number):void{
trace(("GameConnectorAS3.gameStarted() initialScore=" + String(_arg1)));
_localConnection.send(doofConnectionName, "gameStarted", _arg1);
}
public function gameStat(_arg1:String, _arg2:String):void{
trace(((("GameConnectorAS3.gameStat() statName=" + _arg1) + ", statValue=") + _arg2));
_localConnection.send(doofConnectionName, "gameStat", _arg1, _arg2);
}
public function set stopGame(_arg1:Function):void{
_stopGame = _arg1;
}
private function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "status":
trace("AS3 LocalConnection.send() succeeded");
break;
case "error":
trace("AS3 LocalConnection.send() failed");
break;
};
}
public function gameScore(_arg1:Number):void{
trace(("GameConnectorAS3.gameScore() score=" + String(_arg1)));
_localConnection.send(doofConnectionName, "gameScore", _arg1);
}
public function get doofConnectionName():String{
try {
_doofConnectionName = LoaderInfo(this.root.loaderInfo).parameters["doofConnectionName"];
} catch(error:Error) {
_doofConnectionName = "doof";
};
if ((((_doofConnectionName == null)) || ((_doofConnectionName.length == 0)))){
_doofConnectionName = "doof";
};
return (_doofConnectionName);
}
public function gameEnded(_arg1:Number):void{
trace(("GameConnectorAS3.gameEnded() finalScore=" + String(_arg1)));
_localConnection.send(doofConnectionName, "gameEnded", _arg1);
}
}
}//package com.doof.gameconnector
Section 77
//ArithmeticGameScreen (ArithmeticGameScreen)
package {
import com.doof.brainworkout.*;
public dynamic class ArithmeticGameScreen extends ArithmeticGame {
}
}//package
Section 78
//BrainMusic (BrainMusic)
package {
import flash.media.*;
public dynamic class BrainMusic extends Sound {
}
}//package
Section 79
//Button_black_downSkin (Button_black_downSkin)
package {
import flash.display.*;
public dynamic class Button_black_downSkin extends MovieClip {
}
}//package
Section 80
//Button_black_overSkin (Button_black_overSkin)
package {
import flash.display.*;
public dynamic class Button_black_overSkin extends MovieClip {
}
}//package
Section 81
//Button_black_upSkin_static (Button_black_upSkin_static)
package {
import flash.display.*;
public dynamic class Button_black_upSkin_static extends MovieClip {
}
}//package
Section 82
//CorrectSND (CorrectSND)
package {
import flash.media.*;
public dynamic class CorrectSND extends Sound {
}
}//package
Section 83
//DarwinCountdown (DarwinCountdown)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class DarwinCountdown extends MovieClip {
public var animation:MovieClip;
public function DarwinCountdown(){
addFrameScript(0, frame1, 84, frame85);
}
function frame85(){
stop();
Object(parent).initGame();
visible = false;
parent.removeChild(this);
}
function frame1(){
animation.scaleX = 0.35;
animation.scaleY = animation.scaleX;
}
}
}//package
Section 84
//EndScreen (EndScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class EndScreen extends MovieClip {
public var replayBTN:SimpleButton;
public var doofBTN:SimpleButton;
public var scoreTXT:TextField;
public var shareBTN:SimpleButton;
}
}//package
Section 85
//EntryScreen (EntryScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class EntryScreen extends MovieClip {
public var nextBTN:SimpleButton;
public var playerNameTXT:TextField;
}
}//package
Section 86
//FinalScreen (FinalScreen)
package {
import flash.display.*;
public dynamic class FinalScreen extends MovieClip {
public var ranking:MovieClip;
public var endBTN:SimpleButton;
public function FinalScreen(){
addFrameScript(105, frame106);
}
function frame106(){
stop();
}
}
}//package
Section 87
//FishGameScreen (FishGameScreen)
package {
import com.doof.brainworkout.*;
public dynamic class FishGameScreen extends FishBucketGame {
}
}//package
Section 88
//GameTimerMC (GameTimerMC)
package {
import com.doof.brainworkout.*;
public dynamic class GameTimerMC extends GameTimer {
}
}//package
Section 89
//InstructionScreen (InstructionScreen)
package {
import flash.display.*;
public dynamic class InstructionScreen extends MovieClip {
public var instructions:MovieClip;
}
}//package
Section 90
//Leaderboard (Leaderboard)
package {
import com.doof.brainworkout.*;
public dynamic class Leaderboard extends PHPLeaderboard {
}
}//package
Section 91
//LightGameScreen (LightGameScreen)
package {
import com.doof.brainworkout.*;
public dynamic class LightGameScreen extends LightGame {
}
}//package
Section 92
//MarkSymbol (MarkSymbol)
package {
import flash.display.*;
public dynamic class MarkSymbol extends MovieClip {
public function MarkSymbol(){
addFrameScript(0, frame1, 28, frame29, 34, frame35, 63, frame64);
}
function frame64(){
stop();
this.visible = false;
}
function frame1(){
this.visible = true;
}
function frame29(){
stop();
this.visible = false;
}
function frame35(){
this.visible = true;
}
}
}//package
Section 93
//MathRow (MathRow)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MathRow extends MovieClip {
public var numA:TextField;
public var numB:TextField;
public var answer:TextField;
public var mark:MovieClip;
public var equals:TextField;
public var mathSymbol:TextField;
}
}//package
Section 94
//MochiAd (MochiAd)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.5");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
setTimeout(options.ad_finished, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 95
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 96
//MoneyScreen (MoneyScreen)
package {
import com.doof.brainworkout.*;
public dynamic class MoneyScreen extends TimeForChange {
}
}//package
Section 97
//note1SND (note1SND)
package {
import flash.media.*;
public dynamic class note1SND extends Sound {
}
}//package
Section 98
//note2SND (note2SND)
package {
import flash.media.*;
public dynamic class note2SND extends Sound {
}
}//package
Section 99
//note3SND (note3SND)
package {
import flash.media.*;
public dynamic class note3SND extends Sound {
}
}//package
Section 100
//note4SND (note4SND)
package {
import flash.media.*;
public dynamic class note4SND extends Sound {
}
}//package
Section 101
//note5SND (note5SND)
package {
import flash.media.*;
public dynamic class note5SND extends Sound {
}
}//package
Section 102
//note6SND (note6SND)
package {
import flash.media.*;
public dynamic class note6SND extends Sound {
}
}//package
Section 103
//note7SND (note7SND)
package {
import flash.media.*;
public dynamic class note7SND extends Sound {
}
}//package
Section 104
//note8SND (note8SND)
package {
import flash.media.*;
public dynamic class note8SND extends Sound {
}
}//package
Section 105
//note9SND (note9SND)
package {
import flash.media.*;
public dynamic class note9SND extends Sound {
}
}//package
Section 106
//ResultScreen (ResultScreen)
package {
import flash.display.*;
public dynamic class ResultScreen extends MovieClip {
public var nextBTN:SimpleButton;
public var resultsPanel:MovieClip;
}
}//package
Section 107
//Splash (Splash)
package {
import flash.display.*;
public dynamic class Splash extends MovieClip {
public function Splash(){
addFrameScript(6, frame7);
}
function frame7(){
visible = false;
stop();
parent.removeChild(this);
}
}
}//package
Section 108
//SplashScreen (SplashScreen)
package {
import flash.display.*;
public dynamic class SplashScreen extends MovieClip {
public var background:MovieClip;
public var logo:MovieClip;
public function SplashScreen(){
addFrameScript(0, frame1, 49, frame50, 64, frame65);
}
function frame65(){
stop();
}
function frame1(){
logo.x = (stage.stageWidth / 2);
logo.y = (stage.stageHeight / 2);
background.width = stage.stageWidth;
background.height = stage.stageHeight;
}
function frame50(){
logo.stop();
}
}
}//package
Section 109
//TallyScreen (TallyScreen)
package {
import flash.display.*;
public dynamic class TallyScreen extends MovieClip {
public var startBTN:MovieClip;
public var results:MovieClip;
}
}//package
Section 110
//TitleScreen (TitleScreen)
package {
import flash.display.*;
public dynamic class TitleScreen extends MovieClip {
public var startSequence:MovieClip;
public var startBTN:SimpleButton;
}
}//package
Section 111
//WrongSND (WrongSND)
package {
import flash.media.*;
public dynamic class WrongSND extends Sound {
}
}//package