Section 1
//allShapes_257 (bustabrain_fla.allShapes_257)
package bustabrain_fla {
import flash.display.*;
public dynamic class allShapes_257 extends MovieClip {
public var rectangle:MovieClip;
public var circle:MovieClip;
public var triangle:MovieClip;
public var square:MovieClip;
public function allShapes_257(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package bustabrain_fla
Section 2
//bookCabinet_285 (bustabrain_fla.bookCabinet_285)
package bustabrain_fla {
import flash.display.*;
public dynamic class bookCabinet_285 extends MovieClip {
public var book:MovieClip;
public function bookCabinet_285(){
addFrameScript(0, frame1, 1, frame2, 59, frame60);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame60(){
stop();
}
}
}//package bustabrain_fla
Section 3
//chimneyAnim_297 (bustabrain_fla.chimneyAnim_297)
package bustabrain_fla {
import flash.display.*;
public dynamic class chimneyAnim_297 extends MovieClip {
public var cop:MovieClip;
public function chimneyAnim_297(){
addFrameScript(0, frame1, 1, frame2, 79, frame80);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame80(){
gotoAndPlay(2);
}
}
}//package bustabrain_fla
Section 4
//comboPanelLight_291 (bustabrain_fla.comboPanelLight_291)
package bustabrain_fla {
import flash.display.*;
public dynamic class comboPanelLight_291 extends MovieClip {
public function comboPanelLight_291(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 5
//comicBrainsVsBrawnFrame_166 (bustabrain_fla.comicBrainsVsBrawnFrame_166)
package bustabrain_fla {
import flash.display.*;
public dynamic class comicBrainsVsBrawnFrame_166 extends MovieClip {
public function comicBrainsVsBrawnFrame_166(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
gotoAndStop(2);
}
}
}//package bustabrain_fla
Section 6
//comicEnviromentalFrame_394 (bustabrain_fla.comicEnviromentalFrame_394)
package bustabrain_fla {
import flash.display.*;
public dynamic class comicEnviromentalFrame_394 extends MovieClip {
public function comicEnviromentalFrame_394(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
gotoAndStop(2);
}
}
}//package bustabrain_fla
Section 7
//comicHanginOutFrame_277 (bustabrain_fla.comicHanginOutFrame_277)
package bustabrain_fla {
import flash.display.*;
public dynamic class comicHanginOutFrame_277 extends MovieClip {
public function comicHanginOutFrame_277(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
gotoAndStop(2);
}
}
}//package bustabrain_fla
Section 8
//copAnim_308 (bustabrain_fla.copAnim_308)
package bustabrain_fla {
import flash.display.*;
public dynamic class copAnim_308 extends MovieClip {
public function copAnim_308(){
addFrameScript(0, frame1, 1, frame2, 39, frame40);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame40(){
stop();
}
}
}//package bustabrain_fla
Section 9
//counter_86 (bustabrain_fla.counter_86)
package bustabrain_fla {
import flash.display.*;
public dynamic class counter_86 extends MovieClip {
public function counter_86(){
addFrameScript(179, frame180);
}
function frame180(){
stop();
}
}
}//package bustabrain_fla
Section 10
//dice_312 (bustabrain_fla.dice_312)
package bustabrain_fla {
import flash.display.*;
public dynamic class dice_312 extends MovieClip {
public function dice_312(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package bustabrain_fla
Section 11
//dice0Anim_321 (bustabrain_fla.dice0Anim_321)
package bustabrain_fla {
import flash.display.*;
public dynamic class dice0Anim_321 extends MovieClip {
public function dice0Anim_321(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame15(){
stop();
}
}
}//package bustabrain_fla
Section 12
//dice1Anim_316 (bustabrain_fla.dice1Anim_316)
package bustabrain_fla {
import flash.display.*;
public dynamic class dice1Anim_316 extends MovieClip {
public function dice1Anim_316(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame15(){
stop();
}
}
}//package bustabrain_fla
Section 13
//dice2Anim_318 (bustabrain_fla.dice2Anim_318)
package bustabrain_fla {
import flash.display.*;
public dynamic class dice2Anim_318 extends MovieClip {
public function dice2Anim_318(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame15(){
stop();
}
}
}//package bustabrain_fla
Section 14
//dice3Anim_322 (bustabrain_fla.dice3Anim_322)
package bustabrain_fla {
import flash.display.*;
public dynamic class dice3Anim_322 extends MovieClip {
public function dice3Anim_322(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame15(){
stop();
}
}
}//package bustabrain_fla
Section 15
//dice4Anim_319 (bustabrain_fla.dice4Anim_319)
package bustabrain_fla {
import flash.display.*;
public dynamic class dice4Anim_319 extends MovieClip {
public function dice4Anim_319(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame15(){
stop();
}
}
}//package bustabrain_fla
Section 16
//dice5Anim_320 (bustabrain_fla.dice5Anim_320)
package bustabrain_fla {
import flash.display.*;
public dynamic class dice5Anim_320 extends MovieClip {
public function dice5Anim_320(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame15(){
stop();
}
}
}//package bustabrain_fla
Section 17
//door_199 (bustabrain_fla.door_199)
package bustabrain_fla {
import flash.display.*;
public dynamic class door_199 extends MovieClip {
public function door_199(){
addFrameScript(0, frame1, 1, frame2, 29, frame30);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame30(){
stop();
}
}
}//package bustabrain_fla
Section 18
//dudes_82 (bustabrain_fla.dudes_82)
package bustabrain_fla {
import flash.display.*;
public dynamic class dudes_82 extends MovieClip {
public function dudes_82(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
}
}//package bustabrain_fla
Section 19
//fgGameA_63 (bustabrain_fla.fgGameA_63)
package bustabrain_fla {
import flash.display.*;
import flash.text.*;
public dynamic class fgGameA_63 extends MovieClip {
public var speaker:MovieClip;
public var clicksText:TextField;
public var pass:MovieClip;
public var pauseGame:MovieClip;
public var levelNumText:TextField;
public var pauseFade:MovieClip;
public function fgGameA_63(){
addFrameScript(0, frame1, 10, frame11, 11, frame12);
}
function frame1(){
play();
}
function frame11(){
stop();
}
function frame12(){
play();
}
}
}//package bustabrain_fla
Section 20
//fgMenu_46 (bustabrain_fla.fgMenu_46)
package bustabrain_fla {
import flash.display.*;
import flash.text.*;
public dynamic class fgMenu_46 extends MovieClip {
public var speaker:MovieClip;
public var clicksText:TextField;
public function fgMenu_46(){
addFrameScript(0, frame1, 10, frame11, 11, frame12);
}
function frame1(){
play();
}
function frame11(){
stop();
}
function frame12(){
play();
}
}
}//package bustabrain_fla
Section 21
//ghostieEye_187 (bustabrain_fla.ghostieEye_187)
package bustabrain_fla {
import flash.display.*;
public dynamic class ghostieEye_187 extends MovieClip {
public function ghostieEye_187(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 22
//ghostieMouth_186 (bustabrain_fla.ghostieMouth_186)
package bustabrain_fla {
import flash.display.*;
public dynamic class ghostieMouth_186 extends MovieClip {
public function ghostieMouth_186(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 23
//gingerbreadMan_54 (bustabrain_fla.gingerbreadMan_54)
package bustabrain_fla {
import flash.display.*;
public dynamic class gingerbreadMan_54 extends MovieClip {
public function gingerbreadMan_54(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
function frame10(){
stop();
}
function frame11(){
stop();
}
function frame12(){
stop();
}
function frame13(){
stop();
}
}
}//package bustabrain_fla
Section 24
//gingerbreadManText_62 (bustabrain_fla.gingerbreadManText_62)
package bustabrain_fla {
import flash.display.*;
public dynamic class gingerbreadManText_62 extends MovieClip {
public function gingerbreadManText_62(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
function frame10(){
stop();
}
function frame11(){
stop();
}
function frame12(){
stop();
}
function frame13(){
stop();
}
}
}//package bustabrain_fla
Section 25
//letterBoxAnim_305 (bustabrain_fla.letterBoxAnim_305)
package bustabrain_fla {
import flash.display.*;
public dynamic class letterBoxAnim_305 extends MovieClip {
public function letterBoxAnim_305(){
addFrameScript(0, frame1, 1, frame2, 30, frame31);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame31(){
stop();
}
}
}//package bustabrain_fla
Section 26
//lightbulbAnim_234 (bustabrain_fla.lightbulbAnim_234)
package bustabrain_fla {
import flash.display.*;
public dynamic class lightbulbAnim_234 extends MovieClip {
public function lightbulbAnim_234(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 27
//lightbulbs_227 (bustabrain_fla.lightbulbs_227)
package bustabrain_fla {
import flash.display.*;
public dynamic class lightbulbs_227 extends MovieClip {
public function lightbulbs_227(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package bustabrain_fla
Section 28
//MainTimeline (bustabrain_fla.MainTimeline)
package bustabrain_fla {
import flash.geom.*;
import flash.utils.*;
import flash.events.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.events.*;
import org.flintparticles.twoD.zones.*;
import flash.filters.*;
import flash.display.*;
import org.flintparticles.common.energyEasing.*;
import flash.media.*;
import org.flintparticles.twoD.emitters.*;
import org.flintparticles.twoD.initializers.*;
import org.flintparticles.twoD.actions.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import org.flintparticles.twoD.renderers.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var item42:MovieClip;
public var item5:MovieClip;
public var alien:MovieClip;
public var line9:MovieClip;
public var letterbox:MovieClip;
public var comboPanel:MovieClip;
public var shapes:MovieClip;
public var plusSymbol:MovieClip;
public var matchstick11:MovieClip;
public var bus:MovieClip;
public var cityScape:MovieClip;
public var bubble0:MovieClip;
public var tileHolder3:MovieClip;
public var matchstick3:MovieClip;
public var item43:MovieClip;
public var item6:MovieClip;
public var beastie8:MovieClip;
public var matchstick10:MovieClip;
public var bubble1:MovieClip;
public var tile0:MovieClip;
public var tileHolder2:MovieClip;
public var matchstick0:MovieClip;
public var dirPanel:MovieClip;
public var item44:MovieClip;
public var item7:MovieClip;
public var matchstick13:MovieClip;
public var house:MovieClip;
public var tile1:MovieClip;
public var matchstick1:MovieClip;
public var bubble2:MovieClip;
public var buttonCredits:SimpleButton;
public var item10:MovieClip;
public var item8:MovieClip;
public var item45:MovieClip;
public var matchstick12:MovieClip;
public var matchstick6:MovieClip;
public var monster:MovieClip;
public var tile2:MovieClip;
public var buttonReset:SimpleButton;
public var bubble3:MovieClip;
public var player:MovieClip;
public var rectangle:MovieClip;
public var item46:MovieClip;
public var item20:MovieClip;
public var item11:MovieClip;
public var item9:MovieClip;
public var beastie6:MovieClip;
public var matchstick7:MovieClip;
public var buttonSubmit:SimpleButton;
public var clock:MovieClip;
public var bubble4:MovieClip;
public var tile3:MovieClip;
public var gingerbreadMan:MovieClip;
public var loader_info:TextField;
public var item47:MovieClip;
public var item30:MovieClip;
public var item12:MovieClip;
public var item21:MovieClip;
public var alienA:MovieClip;
public var boxes:MovieClip;
public var comboSwitch3:MovieClip;
public var beastie7:MovieClip;
public var hitmapLeft:MovieClip;
public var track:MovieClip;
public var bubble5:MovieClip;
public var tile4:MovieClip;
public var matchstick4:MovieClip;
public var fm_bar:MovieClip;
public var buttonMenu:SimpleButton;
public var ranks:MovieClip;
public var item31:MovieClip;
public var item22:MovieClip;
public var item13:MovieClip;
public var item48:MovieClip;
public var alienB:MovieClip;
public var tileHolder9:MovieClip;
public var diceAnim:MovieClip;
public var comboSwitch2:MovieClip;
public var beastie4:MovieClip;
public var quizAdditionButtonD:SimpleButton;
public var lightbulbAnim:MovieClip;
public var matchstick5:MovieClip;
public var comic:MovieClip;
public var tile5:MovieClip;
public var bubble6:MovieClip;
public var node0:MovieClip;
public var buttonWalkthrough:SimpleButton;
public var item32:MovieClip;
public var item23:MovieClip;
public var item14:MovieClip;
public var alienC:MovieClip;
public var tileHolder8:MovieClip;
public var quizBoxesButtonB:SimpleButton;
public var rocky:MovieClip;
public var comboSwitch1:MovieClip;
public var beastie5:MovieClip;
public var tile6:MovieClip;
public var bubble7:MovieClip;
public var quizAdditionButtonC:SimpleButton;
public var door:MovieClip;
public var node1:MovieClip;
public var gingerbreadManText:MovieClip;
public var item24:MovieClip;
public var item33:MovieClip;
public var item15:MovieClip;
public var quizBoxesButtonC:SimpleButton;
public var cop:MovieClip;
public var cabinet:MovieClip;
public var comboSwitch0:MovieClip;
public var tile7:MovieClip;
public var beastie2:MovieClip;
public var bubble8:MovieClip;
public var quizAdditionButtonB:SimpleButton;
public var jet:MovieClip;
public var picture3:MovieClip;
public var node2:MovieClip;
public var line0:MovieClip;
public var item16:MovieClip;
public var item34:MovieClip;
public var item25:MovieClip;
public var tile8:MovieClip;
public var beastie3:MovieClip;
public var bubble9:MovieClip;
public var quizAdditionButtonA:SimpleButton;
public var matchstick8:MovieClip;
public var dude:MovieClip;
public var panel:MovieClip;
public var picture2:MovieClip;
public var node3:MovieClip;
public var line1:MovieClip;
public var hitmap:MovieClip;
public var finalScoreText:TextField;
public var item35:MovieClip;
public var item26:MovieClip;
public var item17:MovieClip;
public var tile9:MovieClip;
public var quizBoxesButtonA:SimpleButton;
public var node4:MovieClip;
public var matchstick9:MovieClip;
public var picture1:MovieClip;
public var hitmapRight:MovieClip;
public var clockA:MovieClip;
public var bubbleGuide:MovieClip;
public var line2:MovieClip;
public var dudesAnim:MovieClip;
public var dude3:MovieClip;
public var buttonScores:SimpleButton;
public var beastie0:MovieClip;
public var fm_bar_bg:MovieClip;
public var ghostie:MovieClip;
public var item18:MovieClip;
public var item27:MovieClip;
public var item36:MovieClip;
public var beastie1:MovieClip;
public var node5:MovieClip;
public var picture0:MovieClip;
public var clockB:MovieClip;
public var tileHolder5:MovieClip;
public var line3:MovieClip;
public var tileHolder12:MovieClip;
public var item0:MovieClip;
public var item37:MovieClip;
public var item19:MovieClip;
public var item28:MovieClip;
public var car:MovieClip;
public var clockC:MovieClip;
public var quizCombinationsButton1:SimpleButton;
public var line4:MovieClip;
public var tileHolder4:MovieClip;
public var buttonLink:SimpleButton;
public var item29:MovieClip;
public var item1:MovieClip;
public var item38:MovieClip;
public var quizBoxesButtonD:SimpleButton;
public var matchstick15:MovieClip;
public var tileHolder7:MovieClip;
public var line5:MovieClip;
public var overlay:MovieClip;
public var quizCombinationsButton0:SimpleButton;
public var fg:MovieClip;
public var buttonHelp:SimpleButton;
public var item39:MovieClip;
public var item2:MovieClip;
public var tile10:MovieClip;
public var tileHolder10:MovieClip;
public var quizBoxesButtonE:MovieClip;
public var matchstick14:MovieClip;
public var shapesA:MovieClip;
public var tileHolder6:MovieClip;
public var line6:MovieClip;
public var quizCombinationsButton3:SimpleButton;
public var buttonLogo:SimpleButton;
public var item40:MovieClip;
public var item3:MovieClip;
public var tile11:MovieClip;
public var tileHolder11:MovieClip;
public var bubble10:MovieClip;
public var matchstick17:MovieClip;
public var shapesB:MovieClip;
public var line7:MovieClip;
public var quizCombinationsButton2:SimpleButton;
public var tileHolder1:MovieClip;
public var buttonPlay:SimpleButton;
public var tile12:MovieClip;
public var item41:MovieClip;
public var item4:MovieClip;
public var bubble11:MovieClip;
public var line8:MovieClip;
public var matchstick16:MovieClip;
public var shapesC:MovieClip;
public var tileHolder0:MovieClip;
public var matchstick2:MovieClip;
public var allowed_site:String;
public var domain:String;
public var domain_idx:int;
public var loaded:Number;
public var percent:Number;
public var sound:Boolean;
public var myMenu:ContextMenu;
public var agi_url:String;
public var devKey:String;
public var gameKey:String;
public var agi;
public var urlRequest:URLRequest;
public var loader:Loader;
public var obj:Object;
public var i:Number;
public var j:Number;
public var k:Number;
public var clicks:Number;
public var levelNum:Number;
public var quit:Boolean;
public var gamePaused:Boolean;
public var levelPassed:Boolean;
public var shaking:Boolean;
public var shakeCount:Number;
public var levelName:String;
public var clickX:Number;
public var clickY:Number;
public var menu:Boolean;
public var rock:Boolean;
public var help:Boolean;
public var scores:Boolean;
public var credits:Boolean;
public var submit:Boolean;
public var themeIntro:Sound;
public var lastSoundTime;
public var theme:Sound;
public var themeChannel:SoundChannel;
public var themeTransform:SoundTransform;
public var themeSongPaused;
public var themeStinger:Sound;
public var bass:Sound;
public var success:Sound;
public var crunch:Sound;
public var pop:Sound;
public var pickup:Sound;
public var blip:Sound;
public var reset:Sound;
public var mechanism:Sound;
public var slide:Sound;
public var doorSqueak:Sound;
public var snowStep:Sound;
public var crunching:Sound;
public var glassBreak:Sound;
public var policeSiren:Sound;
public var crash:Sound;
public var explosion:Emitter2D;
public var renderer:BitmapRenderer;
public var matchstickTotal;
public var matchsticksTaken;
public var matchstickPicked;
public var dudePicked;
public var totalDudes;
public var dudesFrame;
public var guessing;
public var memorizeSpeed;
public var tiles:Number;
public var dragging:Boolean;
public var myTargetName:String;
public var oldX:Number;
public var oldY:Number;
public var nodes;
public var lines;
public var allOff;
public var connected;
public var nodePicked;
public var combinationPicked;
public var growFactor;
public var bubblePosX;
public var bubblePosY;
public var speed;
public var radius;
public var X;
public var Y;
public var bubbleCount;
public var bubbleTotal;
public var collected;
public var draggingTrack;
public var myRectangle;
public var organized;
public var comicMoveLeft;
public var comicMoveRight;
public var comicSpeed;
public var comicFrame;
public var digitA;
public var digitB;
public var digitC;
public var digitD;
public var combination;
public var doorOpen;
public var chars;
public var draggingBus;
public var draggingCar;
public var draggingJet;
public var draggingDude;
public var eatenBus;
public var eatenCar;
public var eatenJet;
public var eatenDude;
public var lightbulbPick:String;
public var lightbulbCount:Number;
public var lightbulbFrame;
public var shapePicked;
public var totalShapes;
public var beastiePicked;
public var beasties;
public var beastiesSelected;
public var beastiePos;
public var totalComboSwitches;
public var draggingRocky:Boolean;
public var rockyX;
public var rockyY;
public var draggingCop:Boolean;
public var copX;
public var copY;
public var dicePick:String;
public var diceCount:Number;
public var diceProgress:Number;
public var leftUp:Boolean;
public var rightUp:Boolean;
public var itemPicked;
public var items;
public var lonerFrame;
public var totalDirs;
public var dirPicked:String;
public var finalScore;
public function MainTimeline(){
addFrameScript(0, frame1, 26, frame27, 243, frame244, 244, frame245, 245, frame246, 246, frame247, 247, frame248, 248, frame249, 249, frame250, 250, frame251, 251, frame252, 252, frame253, 253, frame254, 254, frame255, 0xFF, frame256, 0x0100, frame257, 0x0101, frame258, 258, frame259, 259, frame260, 260, frame261, 261, frame262, 262, frame263, 263, frame264, 264, frame265, 265, frame266, 266, frame267, 267, frame268, 268, frame269, 269, frame270, 270, frame271, 271, frame272, 272, frame273, 273, frame274, 274, frame275, 275, frame276, 276, frame277, 277, frame278, 278, frame279, 279, frame280, 280, frame281, 284, frame285, 285, frame286, 286, frame287, 287, frame288, 288, frame289, 289, frame290, 290, frame291, 291, frame292);
}
public function load_progress(_arg1:Event):void{
loaded = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal);
percent = Math.round((loaded * 100));
fm_bar.scaleX = loaded;
loader_info.text = (("Loading: " + percent) + "%");
if (percent == 100){
fm_bar.removeEventListener(Event.ENTER_FRAME, load_progress);
if (((!((domain_idx == -1))) && ((domain_idx == (domain.length - allowed_site.length))))){
gotoAndPlay(1, "splash");
} else {
stop();
this.x = 50000;
this.y = 40000;
};
};
}
public function loadComplete(_arg1:Event):void{
agi = _arg1.currentTarget.content;
addChild(agi);
agi.init(devKey, gameKey);
play();
}
public function handleOnAGUIClose():void{
gotoAndStop(1, "menu");
}
public function onMenuClick(_arg1:MouseEvent):void{
menu = true;
submit = false;
fg.play();
}
public function onSubmitClick(_arg1:MouseEvent):void{
menu = false;
submit = true;
fg.play();
}
public function onPlayClick(_arg1:MouseEvent):void{
rock = true;
help = false;
scores = false;
credits = false;
fg.play();
}
public function onHelpClick(_arg1:MouseEvent):void{
rock = false;
help = true;
scores = false;
credits = false;
fg.play();
}
public function onScoresClick(_arg1:MouseEvent):void{
rock = false;
help = false;
scores = true;
credits = false;
fg.play();
}
public function onCreditsClick(_arg1:MouseEvent):void{
rock = false;
help = false;
scores = false;
credits = true;
fg.play();
}
public function onLinkClick(_arg1:MouseEvent):void{
var event = _arg1;
var url = " http://www.facebook.com/pages/Armor-Games/19522089061";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function onWalkthroughClick(_arg1:MouseEvent):void{
var event = _arg1;
var url = " http://twitter.com/armorgames";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function onLogoClick(_arg1:MouseEvent):void{
var event = _arg1;
var url = "http://armorgames.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function menuScreen(_arg1:Event):void{
fg.speaker.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_OVER, onSpeakerMouseOver);
fg.speaker.addEventListener(MouseEvent.MOUSE_OUT, onSpeakerMouseOut);
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (fg.currentFrame == fg.totalFrames){
stage.removeEventListener(Event.ENTER_FRAME, menuScreen);
if (rock){
SoundMixer.stopAll();
themeChannel = theme.play(lastSoundTime, 1000, themeTransform);
nextScene();
stage.addEventListener(Event.ENTER_FRAME, myEnterFrame);
};
if (help){
gotoAndStop(1, "help");
};
if (scores){
gotoAndStop(1, "scores");
};
if (credits){
gotoAndStop(1, "credits");
};
};
}
public function myEnterFrame(_arg1:Event):void{
stage.addEventListener(MouseEvent.MOUSE_DOWN, clickCounter);
fg.clicksText.text = ("Clicks: " + clicks);
fg.levelNumText.text = ("Level: " + levelNum);
if (shaking){
this.x = (Math.floor((Math.random() * ((1 + 6) - 1))) + 1);
this.y = (Math.floor((Math.random() * ((1 + 6) - 1))) + 1);
shakeCount--;
if (shakeCount == 0){
shaking = false;
this.x = 0;
this.y = 0;
};
};
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
fg.speaker.buttonMode = true;
fg.pauseGame.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_OVER, onSpeakerMouseOver);
fg.speaker.addEventListener(MouseEvent.MOUSE_OUT, onSpeakerMouseOut);
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
fg.pauseGame.addEventListener(MouseEvent.MOUSE_OVER, onPauseMouseOver);
fg.pauseGame.addEventListener(MouseEvent.MOUSE_OUT, onPauseMouseOut);
fg.pauseGame.addEventListener(MouseEvent.MOUSE_DOWN, onPauseClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
} else {
fg.speaker.buttonMode = false;
fg.pauseGame.buttonMode = false;
fg.speaker.removeEventListener(MouseEvent.MOUSE_OVER, onSpeakerMouseOver);
fg.speaker.removeEventListener(MouseEvent.MOUSE_OUT, onSpeakerMouseOut);
fg.speaker.removeEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
fg.pauseGame.removeEventListener(MouseEvent.MOUSE_DOWN, onPauseClick);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, clickCounter);
if (levelPassed){
if (fg.pass.currentFrame == 1){
success.play();
fg.pass.play();
};
fg.pauseGame.gotoAndStop(2);
if (fg.pass.currentFrame == fg.pass.totalFrames){
if (fg.currentFrame != fg.totalFrames){
fg.play();
};
};
if (fg.currentFrame == fg.totalFrames){
if (levelName == "Rebus"){
removeChild(fg);
removeChild(renderer);
i = 0;
while (i < tiles) {
removeChild(this[("tile" + i)]);
i++;
};
};
nextScene();
quit = false;
gamePaused = false;
levelPassed = false;
this.x = 0;
this.y = 0;
levelNum++;
};
};
if (gamePaused){
if (fg.pauseFade.currentFrame == 1){
fg.pauseFade.play();
fg.pauseFade.pauseMenu.buttonResume.addEventListener(MouseEvent.MOUSE_DOWN, onResumeClick);
fg.pauseFade.pauseMenu.buttonQuit.addEventListener(MouseEvent.MOUSE_DOWN, onQuitClick);
};
if (quit){
if (fg.currentFrame != fg.totalFrames){
fg.play();
};
if (fg.currentFrame == fg.totalFrames){
if (levelName == "Rebus"){
removeChild(fg);
removeChild(renderer);
i = 0;
while (i < tiles) {
removeChild(this[("tile" + i)]);
i++;
};
};
gotoAndStop(1, "menu");
stage.removeEventListener(Event.ENTER_FRAME, myEnterFrame);
this.x = 0;
this.y = 0;
};
};
};
};
}
public function clickCounter(_arg1:MouseEvent):void{
if (((!(fg.speaker.hitTestPoint(mouseX, mouseY, true))) && (!(fg.pauseGame.hitTestPoint(mouseX, mouseY, true))))){
clicks++;
};
}
public function onSpeakerMouseOver(_arg1:MouseEvent):void{
fg.speaker.speaker.gotoAndStop("over");
}
public function onSpeakerMouseOut(_arg1:MouseEvent):void{
fg.speaker.speaker.gotoAndStop("out");
}
public function onSpeakerClick(_arg1:MouseEvent):void{
if (sound){
sound = false;
SoundMixer.soundTransform = new SoundTransform(0);
} else {
sound = true;
SoundMixer.soundTransform = new SoundTransform(1);
};
}
public function onPauseMouseOver(_arg1:MouseEvent):void{
fg.pauseGame.pauseGame.gotoAndStop("over");
}
public function onPauseMouseOut(_arg1:MouseEvent):void{
fg.pauseGame.pauseGame.gotoAndStop("out");
}
public function onPauseClick(_arg1:MouseEvent):void{
if (gamePaused){
gamePaused = false;
} else {
gamePaused = true;
};
}
public function onResumeClick(_arg1:MouseEvent):void{
gamePaused = false;
fg.pauseFade.pauseMenu.buttonResume.removeEventListener(MouseEvent.MOUSE_DOWN, onResumeClick);
fg.pauseFade.pauseMenu.buttonQuit.removeEventListener(MouseEvent.MOUSE_DOWN, onQuitClick);
if (fg.pauseFade.currentFrame == 10){
fg.pauseFade.play();
};
}
public function onQuitClick(_arg1:MouseEvent):void{
quit = true;
fg.pauseFade.pauseMenu.buttonResume.removeEventListener(MouseEvent.MOUSE_DOWN, onResumeClick);
fg.pauseFade.pauseMenu.buttonQuit.removeEventListener(MouseEvent.MOUSE_DOWN, onQuitClick);
}
public function remove(_arg1:EmitterEvent):void{
explosion.stop();
}
public function taskEat(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
gingerbreadMan.addEventListener(MouseEvent.MOUSE_DOWN, onGingerbreadManDown);
gingerbreadMan.buttonMode = true;
if (gingerbreadMan.currentFrame == gingerbreadMan.totalFrames){
levelPassed = true;
};
} else {
gingerbreadMan.removeEventListener(MouseEvent.MOUSE_DOWN, onGingerbreadManDown);
gingerbreadMan.buttonMode = false;
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, taskEat);
};
};
}
public function onGingerbreadManDown(_arg1:MouseEvent):void{
if (gingerbreadMan.currentFrame < gingerbreadMan.totalFrames){
crunch.play();
gingerbreadMan.play();
gingerbreadManText.play();
};
}
public function buttonResetMatchsticks(_arg1:MouseEvent):void{
reset.play();
i = 0;
while (i < matchstickTotal) {
this[("matchstick" + i)].visible = true;
i++;
};
matchsticksTaken = 0;
}
public function matchsticksDown(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
if (matchsticksTaken == 0){
buttonReset.alpha = 0.5;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
} else {
buttonReset.alpha = 1;
buttonReset.enabled = true;
buttonReset.addEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
};
i = 0;
while (i < matchstickTotal) {
this[("matchstick" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onMatchsticksDown);
this[("matchstick" + i)].buttonMode = true;
i++;
};
if ((((((((((matchstick0.visible == false)) && ((matchstick1.visible == false)))) && ((matchstick2.visible == true)))) && ((matchstick3.visible == true)))) && ((matchstick4.visible == true)))){
levelPassed = true;
};
} else {
buttonReset.alpha = 0.5;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
i = 0;
while (i < matchstickTotal) {
this[("matchstick" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onMatchsticksDown);
this[("matchstick" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, matchsticksDown);
};
};
}
public function onMatchsticksDown(_arg1:MouseEvent):void{
blip.play();
matchstickPicked = _arg1.currentTarget.name;
this[matchstickPicked].visible = false;
matchsticksTaken++;
}
public function memorizeDudes(_arg1:Event):void{
if (dudesAnim.counter.currentFrame == dudesAnim.counter.totalFrames){
if (!guessing){
if ((dudesAnim.x - memorizeSpeed) > -90){
dudesAnim.x = (dudesAnim.x - 40);
} else {
dudesAnim.x = -90;
guessing = true;
};
};
} else {
if (dudesAnim.counter.currentFrame == 1){
if (guessing){
if ((dudesAnim.x + memorizeSpeed) < 690){
dudesAnim.x = (dudesAnim.x + 40);
} else {
dudesAnim.x = 690;
guessing = false;
};
};
};
};
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < totalDudes) {
this.dudesAnim[("dude" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onDudesDown);
this.dudesAnim[("dude" + i)].buttonMode = true;
i++;
};
if ((((dudesAnim.counter.currentFrame == 1)) && ((this.currentFrame == 1)))){
if (!guessing){
dudesAnim.counter.play();
};
};
} else {
i = 0;
while (i < totalDudes) {
this.dudesAnim[("dude" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onDudesDown);
this.dudesAnim[("dude" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, memorizeDudes);
};
};
}
public function onDudesDown(_arg1:MouseEvent):void{
dudePicked = _arg1.currentTarget.name;
if (guessing){
if ((((dudePicked == "dude0")) && ((dudesAnim.dudes.currentFrame == 1)))){
levelPassed = true;
} else {
if ((((dudePicked == "dude1")) && ((dudesAnim.dudes.currentFrame == 2)))){
levelPassed = true;
} else {
if ((((dudePicked == "dude2")) && ((dudesAnim.dudes.currentFrame == 3)))){
levelPassed = true;
} else {
if ((((dudePicked == "dude3")) && ((dudesAnim.dudes.currentFrame == 4)))){
levelPassed = true;
} else {
if ((((dudePicked == "dude4")) && ((dudesAnim.dudes.currentFrame == 5)))){
levelPassed = true;
} else {
if ((((dudePicked == "dude5")) && ((dudesAnim.dudes.currentFrame == 6)))){
levelPassed = true;
} else {
dudesFrame = (Math.floor((Math.random() * ((1 + totalDudes) - 1))) + 1);
dudesAnim.dudes.gotoAndStop(dudesFrame);
dudesAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
};
};
};
};
};
};
};
}
public function rebusTenor(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) && (tileHolder1.hitTestPoint(tile1.x, tile1.y)))) && (tileHolder2.hitTestPoint(tile2.x, tile2.y)))) && (tileHolder3.hitTestPoint(tile3.x, tile3.y)))) && (tileHolder4.hitTestPoint(tile4.x, tile4.y)))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusTenor);
};
};
}
public function dragStart(_arg1:Event){
dragging = true;
_arg1.target.startDrag(false);
_arg1.target.alpha = 0.5;
myTargetName = _arg1.target.name;
oldX = _arg1.target.x;
oldY = _arg1.target.y;
setChildIndex(DisplayObjectContainer(_arg1.currentTarget), (numChildren - 1));
setChildIndex(renderer, (numChildren - 1));
}
public function dragStop(_arg1:Event){
blip.play();
dragging = false;
_arg1.target.stopDrag();
_arg1.target.alpha = 1;
}
public function rightClick(_arg1:Event){
dragging = false;
}
public function mouseLeave(_arg1:Event){
dragging = false;
}
public function dragCheck(_arg1:Event){
if (!dragging){
i = 0;
while (i < tiles) {
this[("tile" + i)].stopDrag();
this[("tile" + i)].alpha = 1;
if (!hitmap.hitTestPoint(this[("tile" + i)].x, this[("tile" + i)].y, true)){
this[("tile" + i)].x = oldX;
this[("tile" + i)].y = oldY;
};
j = 0;
while (j < tiles) {
if (i != j){
if (this[("tile" + i)].hitTestPoint(this[("tile" + j)].x, this[("tile" + j)].y, true)){
explosion.x = this[("tile" + i)].x;
explosion.y = this[("tile" + i)].y;
explosion.start();
if (myTargetName == ("tile" + j)){
this[("tile" + i)].x = oldX;
this[("tile" + i)].y = oldY;
} else {
this[("tile" + j)].x = oldX;
this[("tile" + j)].y = oldY;
};
};
};
if (this[("tileHolder" + j)].hitTestPoint(this[("tile" + i)].x, this[("tile" + i)].y, true)){
this[("tile" + i)].x = this[("tileHolder" + j)].x;
this[("tile" + i)].y = this[("tileHolder" + j)].y;
};
j++;
};
i++;
};
} else {
i = 0;
while (i < tiles) {
j = 0;
while (j < tiles) {
if (this[("tile" + i)].hitTestPoint(this[("tile" + j)].x, this[("tile" + j)].y, true)){
if (i != j){
if (myTargetName == ("tile" + j)){
this[("tile" + i)].alpha = 0.5;
};
};
} else {
if (i != j){
if (myTargetName == ("tile" + j)){
this[("tile" + i)].alpha = 1;
};
};
};
j++;
};
i++;
};
};
}
public function resetButtonConnect(_arg1:MouseEvent):void{
reset.play();
allOff = true;
connected = 0;
player.visible = false;
player.x = 0;
player.y = 0;
i = 0;
while (i < lines) {
this[("line" + i)].alpha = 0.1;
i++;
};
}
public function connectA(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
if (!allOff){
buttonReset.alpha = 1;
buttonReset.enabled = true;
buttonReset.addEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
} else {
buttonReset.alpha = 0.25;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
};
i = 0;
while (i < nodes) {
this[("node" + i)].addEventListener(MouseEvent.MOUSE_OVER, onNodeOver);
this[("node" + i)].addEventListener(MouseEvent.MOUSE_OUT, onNodeOut);
i++;
};
node0.buttonMode = true;
node0.addEventListener(MouseEvent.MOUSE_DOWN, onConnectANode0Click);
node1.buttonMode = true;
node1.addEventListener(MouseEvent.MOUSE_DOWN, onConnectANode1Click);
node2.buttonMode = true;
node2.addEventListener(MouseEvent.MOUSE_DOWN, onConnectANode2Click);
node3.buttonMode = true;
node3.addEventListener(MouseEvent.MOUSE_DOWN, onConnectANode3Click);
if (connected == 5){
levelPassed = true;
};
} else {
if (!allOff){
buttonReset.alpha = 0.25;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
};
i = 0;
while (i < nodes) {
this[("node" + i)].removeEventListener(MouseEvent.MOUSE_OVER, onNodeOver);
this[("node" + i)].removeEventListener(MouseEvent.MOUSE_OUT, onNodeOut);
i++;
};
node0.buttonMode = false;
node0.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectANode0Click);
node1.buttonMode = false;
node1.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectANode1Click);
node2.buttonMode = false;
node2.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectANode2Click);
node3.buttonMode = false;
node3.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectANode3Click);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, connectA);
};
};
}
public function onNodeOver(_arg1:MouseEvent):void{
nodePicked = _arg1.currentTarget.name;
this[nodePicked].gotoAndStop(2);
}
public function onNodeOut(_arg1:MouseEvent):void{
nodePicked = _arg1.currentTarget.name;
this[nodePicked].gotoAndStop(1);
}
public function onConnectANode0Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node0.x;
player.y = node0.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line0.alpha < 100){
blip.play();
player.x = node0.x;
player.y = node0.y;
line0.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line1.alpha < 100){
blip.play();
player.x = node0.x;
player.y = node0.y;
line1.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
}
public function onConnectANode1Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node1.x;
player.y = node1.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node0.x)) && ((player.y == node0.y)))){
if (line0.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line0.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line2.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line2.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line3.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line3.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
}
public function onConnectANode2Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node2.x;
player.y = node2.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node0.x)) && ((player.y == node0.y)))){
if (line1.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line1.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line2.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line2.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line4.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line4.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
}
public function onConnectANode3Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node3.x;
player.y = node3.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line3.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line3.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line4.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line4.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
}
public function quizCombinations(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < 4) {
this[("quizCombinationsButton" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onQuizCombinationsButtonDown);
i++;
};
} else {
i = 0;
while (i < 4) {
this[("quizCombinationsButton" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onQuizCombinationsButtonDown);
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, quizCombinations);
};
};
}
public function onQuizCombinationsButtonDown(_arg1:MouseEvent):void{
combinationPicked = _arg1.currentTarget.name;
if (combinationPicked == "quizCombinationsButton1"){
levelPassed = true;
} else {
clicks = (clicks + 19);
bass.play();
shakeCount = 10;
shaking = true;
};
}
public function collectA(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
stage.addEventListener(MouseEvent.MOUSE_DOWN, onCollectMouseDown);
player.x = (player.x + ((bubblePosX - player.x) / speed));
player.y = (player.y + ((bubblePosY - player.y) / speed));
radius = ((player.width / 2) - ((player.width / 2) / 5));
i = 0;
while (i < bubbleTotal) {
if (!collected[i]){
if (this[("bubble" + i)].hitTestObject(player)){
pickup.play();
collected[i] = true;
player.scaleX = (player.scaleX + growFactor);
player.scaleY = (player.scaleY + growFactor);
};
} else {
if (this[("bubble" + i)].alpha > 0){
this[("bubble" + i)].alpha = (this[("bubble" + i)].alpha - 0.05);
this[("bubble" + i)].scaleX = (this[("bubble" + i)].scaleX - 0.05);
this[("bubble" + i)].scaleY = (this[("bubble" + i)].scaleY - 0.05);
this[("bubble" + i)].rotation = (this[("bubble" + i)].rotation + 20);
} else {
if (this[("bubble" + i)].visible){
this[("bubble" + i)].visible = false;
bubbleCount++;
};
};
};
i++;
};
j = 0;
while (j < 360) {
X = ((Math.cos((j * (Math.PI / 180))) * radius) + player.x);
Y = ((Math.sin((j * (Math.PI / 180))) * radius) + player.y);
if (hitmap.hitTestPoint(X, Y, true)){
pop.play();
bass.play();
shakeCount = 10;
shaking = true;
player.x = 320;
player.y = 240;
bubblePosX = 320;
bubblePosY = 240;
player.scaleX = 1;
player.scaleY = 1;
bubbleGuide.visible = true;
bubbleCount = 0;
k = 0;
while (k < bubbleTotal) {
this[("bubble" + k)].scaleX = 0.5;
this[("bubble" + k)].scaleY = 0.5;
this[("bubble" + k)].alpha = 1;
this[("bubble" + k)].rotation = 0;
collected[k] = false;
this[("bubble" + k)].visible = true;
k++;
};
};
j = (j + 5);
};
if (bubbleCount == bubbleTotal){
levelPassed = true;
};
} else {
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onCollectMouseDown);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, collectA);
};
};
}
public function onCollectMouseDown(_arg1:MouseEvent):void{
bubbleGuide.visible = false;
bubblePosX = mouseX;
bubblePosY = mouseY;
}
public function rebusBowTie(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) && (tileHolder1.hitTestPoint(tile1.x, tile1.y)))) && (tileHolder2.hitTestPoint(tile2.x, tile2.y)))) && (tileHolder3.hitTestPoint(tile3.x, tile3.y)))) && (tileHolder4.hitTestPoint(tile4.x, tile4.y)))) && (tileHolder5.hitTestPoint(tile5.x, tile5.y)))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusBowTie);
};
};
}
public function logicClocks(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
clock.handSmall.buttonMode = true;
clock.handBig.buttonMode = true;
clock.mouth.buttonMode = true;
clock.handSmall.addEventListener(MouseEvent.MOUSE_DOWN, onClockHandSmallClick);
clock.handBig.addEventListener(MouseEvent.MOUSE_DOWN, onClockHandBigClick);
clock.mouth.addEventListener(MouseEvent.MOUSE_DOWN, onClockMouthClick);
if ((((((clock.handSmall.rotation == -90)) && ((clock.handBig.rotation == -90)))) && ((clock.mouth.rotation == 180)))){
levelPassed = true;
};
} else {
clock.handSmall.buttonMode = false;
clock.handBig.buttonMode = false;
clock.mouth.buttonMode = false;
clock.handSmall.removeEventListener(MouseEvent.MOUSE_DOWN, onClockHandSmallClick);
clock.handBig.removeEventListener(MouseEvent.MOUSE_DOWN, onClockHandBigClick);
clock.mouth.removeEventListener(MouseEvent.MOUSE_DOWN, onClockMouthClick);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, logicClocks);
};
};
}
public function onClockHandSmallClick(_arg1:MouseEvent):void{
blip.play();
clock.handSmall.rotation = (clock.handSmall.rotation + 90);
}
public function onClockHandBigClick(_arg1:MouseEvent):void{
blip.play();
clock.handBig.rotation = (clock.handBig.rotation + 90);
}
public function onClockMouthClick(_arg1:MouseEvent):void{
blip.play();
clock.mouth.rotation = (clock.mouth.rotation + 180);
}
public function findHidenseek(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
track.addEventListener(MouseEvent.MOUSE_DOWN, onTrackDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, onTrackDrop);
track.ninja.button.addEventListener(MouseEvent.MOUSE_DOWN, onNinjaContinueButtonDown);
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, onFindHidenseekRightClick);
stage.addEventListener(Event.MOUSE_LEAVE, onFindHidenseekMouseLeave);
track.buttonMode = true;
if (draggingTrack){
track.startDrag(false, myRectangle);
} else {
track.stopDrag();
};
} else {
track.stopDrag();
track.removeEventListener(MouseEvent.MOUSE_DOWN, onTrackDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onTrackDrop);
track.ninja.button.removeEventListener(MouseEvent.MOUSE_DOWN, onNinjaContinueButtonDown);
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, onFindHidenseekRightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, onFindHidenseekMouseLeave);
track.buttonMode = false;
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, findHidenseek);
};
};
}
public function onTrackDrag(_arg1:MouseEvent):void{
if (!track.ninja.hitTestPoint(mouseX, mouseY, true)){
snowStep.play();
};
draggingTrack = true;
}
public function onTrackDrop(_arg1:MouseEvent):void{
draggingTrack = false;
}
public function onNinjaContinueButtonDown(_arg1:MouseEvent):void{
levelPassed = true;
}
public function onFindHidenseekRightClick(_arg1:Event){
draggingTrack = false;
}
public function onFindHidenseekMouseLeave(_arg1:Event){
draggingTrack = false;
}
public function buttonSubmitComic(_arg1:MouseEvent):void{
if (organized){
levelPassed = true;
} else {
bass.play();
};
}
public function comicBrainsVsBrawn(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
buttonSubmit.alpha = 1;
buttonSubmit.enabled = true;
buttonSubmit.addEventListener(MouseEvent.MOUSE_DOWN, buttonSubmitComic);
i = 0;
while (i < 4) {
this.comic[("frame" + i)].buttonMode = true;
this.comic[("frame" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onComicFrameDown);
i++;
};
if (mouseX < 80){
comicSpeed = ((80 - mouseX) / 4);
comicMoveLeft = true;
} else {
comicMoveLeft = false;
};
if (mouseX > 560){
comicSpeed = ((560 - mouseX) / 4);
comicMoveRight = true;
} else {
comicMoveRight = false;
};
if (comicMoveLeft){
if ((comic.x + comicSpeed) < 680){
comic.x = (comic.x + comicSpeed);
} else {
comic.x = 680;
};
};
if (comicMoveRight){
if ((comic.x + comicSpeed) > -40){
comic.x = (comic.x + comicSpeed);
} else {
comic.x = -40;
};
};
if ((((comic.x <= 680)) && ((comic.x > -40)))){
hitmapRight.visible = true;
} else {
hitmapRight.visible = false;
};
if ((((comic.x >= -40)) && ((comic.x < 680)))){
hitmapLeft.visible = true;
} else {
hitmapLeft.visible = false;
};
if ((((((((comic.frame0.currentFrame == 2)) && ((comic.frame1.currentFrame == 3)))) && ((comic.frame2.currentFrame == 4)))) && ((comic.frame3.currentFrame == 5)))){
organized = true;
} else {
organized = false;
};
} else {
buttonSubmit.alpha = 0.25;
buttonSubmit.enabled = false;
buttonSubmit.removeEventListener(MouseEvent.MOUSE_DOWN, buttonSubmitComic);
i = 0;
while (i < 4) {
this.comic[("frame" + i)].buttonMode = false;
this.comic[("frame" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onComicFrameDown);
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, comicBrainsVsBrawn);
};
};
}
public function onComicFrameDown(_arg1:MouseEvent):void{
blip.play();
comicFrame = _arg1.currentTarget.name;
this.comic[comicFrame].play();
}
public function rebusRedSea(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) && (((tileHolder1.hitTestPoint(tile1.x, tile1.y)) || (tileHolder1.hitTestPoint(tile4.x, tile4.y)))))) && (tileHolder2.hitTestPoint(tile2.x, tile2.y)))) && (tileHolder3.hitTestPoint(tile3.x, tile3.y)))) && (((tileHolder4.hitTestPoint(tile1.x, tile1.y)) || (tileHolder4.hitTestPoint(tile4.x, tile4.y)))))) && (tileHolder5.hitTestPoint(tile5.x, tile5.y)))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusRedSea);
};
};
}
public function codeEyes(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
panel.key0.buttonMode = true;
panel.key1.buttonMode = true;
panel.key2.buttonMode = true;
panel.key3.buttonMode = true;
panel.keyReset.buttonMode = true;
panel.keyEnter.buttonMode = true;
panel.key0.addEventListener(MouseEvent.MOUSE_DOWN, onPanelKey0Down);
panel.key1.addEventListener(MouseEvent.MOUSE_DOWN, onPanelKey1Down);
panel.key2.addEventListener(MouseEvent.MOUSE_DOWN, onPanelKey2Down);
panel.key3.addEventListener(MouseEvent.MOUSE_DOWN, onPanelKey3Down);
panel.keyReset.addEventListener(MouseEvent.MOUSE_DOWN, onPanelKeyResetDown);
panel.keyEnter.addEventListener(MouseEvent.MOUSE_DOWN, onPanelKeyEnterDown);
} else {
panel.key0.buttonMode = false;
panel.key1.buttonMode = false;
panel.key2.buttonMode = false;
panel.key3.buttonMode = false;
panel.keyReset.buttonMode = false;
panel.keyEnter.buttonMode = false;
panel.key0.removeEventListener(MouseEvent.MOUSE_DOWN, onPanelKey0Down);
panel.key1.removeEventListener(MouseEvent.MOUSE_DOWN, onPanelKey1Down);
panel.key2.removeEventListener(MouseEvent.MOUSE_DOWN, onPanelKey2Down);
panel.key3.removeEventListener(MouseEvent.MOUSE_DOWN, onPanelKey3Down);
panel.keyReset.removeEventListener(MouseEvent.MOUSE_DOWN, onPanelKeyResetDown);
panel.keyEnter.removeEventListener(MouseEvent.MOUSE_DOWN, onPanelKeyEnterDown);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, codeEyes);
};
};
}
public function onPanelKey1Down(_arg1:MouseEvent):void{
blip.play();
if (panel.combinationText.text == "****"){
panel.combinationText.text = "";
chars = 0;
};
if (chars < 4){
panel.combinationText.text = (panel.combinationText.text + 1);
chars = (chars + 1);
};
}
public function onPanelKey2Down(_arg1:MouseEvent):void{
blip.play();
if (panel.combinationText.text == "****"){
panel.combinationText.text = "";
chars = 0;
};
if (chars < 4){
panel.combinationText.text = (panel.combinationText.text + 2);
chars = (chars + 1);
};
}
public function onPanelKey3Down(_arg1:MouseEvent):void{
blip.play();
if (panel.combinationText.text == "****"){
panel.combinationText.text = "";
chars = 0;
};
if (chars < 4){
panel.combinationText.text = (panel.combinationText.text + 3);
chars = (chars + 1);
};
}
public function onPanelKey0Down(_arg1:MouseEvent):void{
blip.play();
if (panel.combinationText.text == "****"){
panel.combinationText.text = "";
chars = 0;
};
if (chars < 4){
panel.combinationText.text = (panel.combinationText.text + 0);
chars = (chars + 1);
};
}
public function onPanelKeyResetDown(_arg1:MouseEvent):void{
reset.play();
panel.combinationText.text = "****";
}
public function onPanelKeyEnterDown(_arg1:MouseEvent):void{
if (panel.combinationText.text == combination){
if (door.currentFrame == 1){
doorSqueak.play();
door.play();
levelPassed = true;
};
} else {
panel.combinationText.text = "****";
};
}
public function taskFeed(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
bus.addEventListener(MouseEvent.MOUSE_DOWN, onBusDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, onBusDrop);
bus.buttonMode = true;
car.addEventListener(MouseEvent.MOUSE_DOWN, onCarDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, onCarDrop);
car.buttonMode = true;
jet.addEventListener(MouseEvent.MOUSE_DOWN, onJetDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, onJetDrop);
jet.buttonMode = true;
dude.addEventListener(MouseEvent.MOUSE_DOWN, onDudeDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, onDudeDrop);
dude.buttonMode = true;
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, onTaskFeedRightClick);
stage.addEventListener(Event.MOUSE_LEAVE, onTaskFeedMouseLeave);
if (monster.currentFrame == 45){
shakeCount = 10;
shaking = true;
};
if (((!(draggingBus)) && (!(eatenBus)))){
if (bus.x < 800){
bus.x = (bus.x + 2);
} else {
bus.x = -160;
};
if (((monster.hitTestPoint(bus.x, bus.y, true)) && (!(cityScape.hitTestPoint(bus.x, bus.y, true))))){
crunching.play();
monster.monsterAnim.play();
bus.visible = false;
eatenBus = true;
} else {
bus.y = 430;
};
};
if (((!(draggingCar)) && (!(eatenCar)))){
if (car.x > -160){
car.x = (car.x - 4);
} else {
car.x = 800;
};
if (((monster.hitTestPoint(car.x, car.y, true)) && (!(cityScape.hitTestPoint(car.x, car.y, true))))){
crunching.play();
monster.monsterAnim.play();
car.visible = false;
eatenCar = true;
} else {
car.y = 450;
};
};
if (((!(draggingJet)) && (!(eatenJet)))){
if (jet.x < 800){
jet.x = (jet.x + 8);
} else {
jet.x = -160;
};
if (((monster.hitTestPoint(jet.x, jet.y, true)) && (!(cityScape.hitTestPoint(jet.x, jet.y, true))))){
crunching.play();
monster.monsterAnim.play();
jet.visible = false;
eatenJet = true;
} else {
jet.y = 80;
};
};
if (((!(draggingDude)) && (!(eatenDude)))){
if (dude.x > 0){
dude.x = (dude.x - 0.5);
} else {
dude.x = 640;
};
if (((monster.hitTestPoint(dude.x, dude.y, true)) && (!(cityScape.hitTestPoint(dude.x, dude.y, true))))){
crunching.play();
monster.monsterAnim.play();
dude.visible = false;
eatenDude = true;
} else {
dude.y = 428;
};
};
if (((((((eatenBus) && (eatenCar))) && (eatenJet))) && (eatenDude))){
levelPassed = true;
};
} else {
bus.removeEventListener(MouseEvent.MOUSE_DOWN, onBusDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onBusDrop);
bus.buttonMode = false;
car.removeEventListener(MouseEvent.MOUSE_DOWN, onCarDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onCarDrop);
car.buttonMode = false;
jet.removeEventListener(MouseEvent.MOUSE_DOWN, onJetDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onJetDrop);
jet.buttonMode = false;
dude.removeEventListener(MouseEvent.MOUSE_DOWN, onDudeDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onDudeDrop);
dude.buttonMode = false;
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, onTaskFeedRightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, onTaskFeedMouseLeave);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, taskFeed);
};
};
}
public function onBusDrag(_arg1:MouseEvent):void{
draggingBus = true;
bus.rotation = -25;
bus.startDrag();
}
public function onBusDrop(_arg1:MouseEvent):void{
draggingBus = false;
bus.rotation = 0;
bus.stopDrag();
}
public function onCarDrag(_arg1:MouseEvent):void{
draggingCar = true;
car.rotation = -25;
car.startDrag();
}
public function onCarDrop(_arg1:MouseEvent):void{
draggingCar = false;
car.rotation = 0;
car.stopDrag();
}
public function onJetDrag(_arg1:MouseEvent):void{
draggingJet = true;
jet.rotation = -25;
jet.startDrag();
}
public function onJetDrop(_arg1:MouseEvent):void{
draggingJet = false;
jet.rotation = 0;
jet.stopDrag();
}
public function onDudeDrag(_arg1:MouseEvent):void{
draggingDude = true;
dude.rotation = -25;
dude.startDrag();
}
public function onDudeDrop(_arg1:MouseEvent):void{
draggingDude = false;
dude.rotation = 0;
dude.stopDrag();
}
public function onTaskFeedRightClick(_arg1:Event){
draggingBus = false;
draggingCar = false;
draggingJet = false;
draggingDude = false;
}
public function onTaskFeedMouseLeave(_arg1:Event){
draggingBus = false;
draggingCar = false;
draggingJet = false;
draggingDude = false;
}
public function matchsticksLove(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
if (matchsticksTaken == 0){
buttonReset.alpha = 0.5;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
} else {
buttonReset.alpha = 1;
buttonReset.enabled = true;
buttonReset.addEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
};
i = 0;
while (i < matchstickTotal) {
this[("matchstick" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onMatchsticksDown);
this[("matchstick" + i)].buttonMode = true;
i++;
};
if ((((((((((((((((((((((((matchstick0.visible == false)) && ((matchstick1.visible == false)))) && ((matchstick2.visible == true)))) && ((matchstick3.visible == true)))) && ((matchstick4.visible == true)))) && ((matchstick5.visible == true)))) && ((matchstick6.visible == true)))) && ((matchstick7.visible == false)))) && ((matchstick8.visible == false)))) && ((matchstick9.visible == true)))) && ((matchstick10.visible == true)))) && ((matchstick11.visible == true)))){
levelPassed = true;
};
} else {
buttonReset.alpha = 0.5;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
i = 0;
while (i < matchstickTotal) {
this[("matchstick" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onMatchsticksDown);
this[("matchstick" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, matchsticksLove);
};
};
}
public function memorizeLightbulbs(_arg1:Event):void{
if (lightbulbAnim.counter.currentFrame == lightbulbAnim.counter.totalFrames){
if (!guessing){
i = 0;
while (i < lightbulbCount) {
this.lightbulbAnim[("lightbulb" + i)].gotoAndStop(1);
i++;
};
if ((lightbulbAnim.x - memorizeSpeed) > -90){
lightbulbAnim.x = (lightbulbAnim.x - 40);
} else {
lightbulbAnim.x = -90;
guessing = true;
};
};
} else {
if (lightbulbAnim.counter.currentFrame == 1){
if (guessing){
if ((lightbulbAnim.x + memorizeSpeed) < 690){
lightbulbAnim.x = (lightbulbAnim.x + 40);
} else {
lightbulbAnim.x = 690;
guessing = false;
};
};
};
};
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < lightbulbCount) {
this.lightbulbAnim[("lightbulb" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onLightbulbsDown);
this.lightbulbAnim[("lightbulb" + i)].buttonMode = true;
i++;
};
if ((((lightbulbAnim.counter.currentFrame == 1)) && ((this.currentFrame == 1)))){
if (!guessing){
lightbulbAnim.counter.play();
};
};
if (lightbulbAnim.lightbulbs.currentFrame == 1){
if ((((((((((((((((((lightbulbAnim.lightbulb0.currentFrame == 1)) && ((lightbulbAnim.lightbulb1.currentFrame == 2)))) && ((lightbulbAnim.lightbulb2.currentFrame == 1)))) && ((lightbulbAnim.lightbulb3.currentFrame == 2)))) && ((lightbulbAnim.lightbulb4.currentFrame == 2)))) && ((lightbulbAnim.lightbulb5.currentFrame == 2)))) && ((lightbulbAnim.lightbulb6.currentFrame == 2)))) && ((lightbulbAnim.lightbulb7.currentFrame == 1)))) && ((lightbulbAnim.lightbulb8.currentFrame == 2)))){
levelPassed = true;
};
};
if (lightbulbAnim.lightbulbs.currentFrame == 2){
if ((((((((((((((((((lightbulbAnim.lightbulb0.currentFrame == 2)) && ((lightbulbAnim.lightbulb1.currentFrame == 1)))) && ((lightbulbAnim.lightbulb2.currentFrame == 2)))) && ((lightbulbAnim.lightbulb3.currentFrame == 2)))) && ((lightbulbAnim.lightbulb4.currentFrame == 2)))) && ((lightbulbAnim.lightbulb5.currentFrame == 2)))) && ((lightbulbAnim.lightbulb6.currentFrame == 1)))) && ((lightbulbAnim.lightbulb7.currentFrame == 2)))) && ((lightbulbAnim.lightbulb8.currentFrame == 1)))){
levelPassed = true;
};
};
if (lightbulbAnim.lightbulbs.currentFrame == 3){
if ((((((((((((((((((lightbulbAnim.lightbulb0.currentFrame == 2)) && ((lightbulbAnim.lightbulb1.currentFrame == 2)))) && ((lightbulbAnim.lightbulb2.currentFrame == 1)))) && ((lightbulbAnim.lightbulb3.currentFrame == 1)))) && ((lightbulbAnim.lightbulb4.currentFrame == 2)))) && ((lightbulbAnim.lightbulb5.currentFrame == 2)))) && ((lightbulbAnim.lightbulb6.currentFrame == 2)))) && ((lightbulbAnim.lightbulb7.currentFrame == 2)))) && ((lightbulbAnim.lightbulb8.currentFrame == 1)))){
levelPassed = true;
};
};
if (lightbulbAnim.lightbulbs.currentFrame == 4){
if ((((((((((((((((((lightbulbAnim.lightbulb0.currentFrame == 1)) && ((lightbulbAnim.lightbulb1.currentFrame == 2)))) && ((lightbulbAnim.lightbulb2.currentFrame == 2)))) && ((lightbulbAnim.lightbulb3.currentFrame == 2)))) && ((lightbulbAnim.lightbulb4.currentFrame == 2)))) && ((lightbulbAnim.lightbulb5.currentFrame == 1)))) && ((lightbulbAnim.lightbulb6.currentFrame == 1)))) && ((lightbulbAnim.lightbulb7.currentFrame == 2)))) && ((lightbulbAnim.lightbulb8.currentFrame == 2)))){
levelPassed = true;
};
};
} else {
i = 0;
while (i < lightbulbCount) {
this.lightbulbAnim[("lightbulb" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onLightbulbsDown);
this.lightbulbAnim[("lightbulb" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, memorizeLightbulbs);
};
};
}
public function onLightbulbsDown(_arg1:MouseEvent):void{
blip.play();
lightbulbPick = _arg1.currentTarget.name;
if (guessing){
if (lightbulbAnim.lightbulbs.currentFrame == 1){
if (lightbulbPick == "lightbulb1"){
this.lightbulbAnim.lightbulb1.play();
} else {
if (lightbulbPick == "lightbulb3"){
this.lightbulbAnim.lightbulb3.play();
} else {
if (lightbulbPick == "lightbulb4"){
this.lightbulbAnim.lightbulb4.play();
} else {
if (lightbulbPick == "lightbulb5"){
this.lightbulbAnim.lightbulb5.play();
} else {
if (lightbulbPick == "lightbulb6"){
this.lightbulbAnim.lightbulb6.play();
} else {
if (lightbulbPick == "lightbulb8"){
this.lightbulbAnim.lightbulb8.play();
} else {
lightbulbFrame = (Math.floor((Math.random() * ((1 + 4) - 1))) + 1);
lightbulbAnim.lightbulbs.gotoAndStop(lightbulbFrame);
lightbulbAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
};
};
};
};
};
};
};
if (lightbulbAnim.lightbulbs.currentFrame == 2){
if (lightbulbPick == "lightbulb0"){
this.lightbulbAnim.lightbulb0.play();
} else {
if (lightbulbPick == "lightbulb2"){
this.lightbulbAnim.lightbulb2.play();
} else {
if (lightbulbPick == "lightbulb3"){
this.lightbulbAnim.lightbulb3.play();
} else {
if (lightbulbPick == "lightbulb4"){
this.lightbulbAnim.lightbulb4.play();
} else {
if (lightbulbPick == "lightbulb5"){
this.lightbulbAnim.lightbulb5.play();
} else {
if (lightbulbPick == "lightbulb7"){
this.lightbulbAnim.lightbulb7.play();
} else {
lightbulbFrame = (Math.floor((Math.random() * ((1 + 4) - 1))) + 1);
lightbulbAnim.lightbulbs.gotoAndStop(lightbulbFrame);
lightbulbAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
};
};
};
};
};
};
};
if (lightbulbAnim.lightbulbs.currentFrame == 3){
if (lightbulbPick == "lightbulb0"){
this.lightbulbAnim.lightbulb0.play();
} else {
if (lightbulbPick == "lightbulb1"){
this.lightbulbAnim.lightbulb1.play();
} else {
if (lightbulbPick == "lightbulb4"){
this.lightbulbAnim.lightbulb4.play();
} else {
if (lightbulbPick == "lightbulb5"){
this.lightbulbAnim.lightbulb5.play();
} else {
if (lightbulbPick == "lightbulb6"){
this.lightbulbAnim.lightbulb6.play();
} else {
if (lightbulbPick == "lightbulb7"){
this.lightbulbAnim.lightbulb7.play();
} else {
lightbulbFrame = (Math.floor((Math.random() * ((1 + 4) - 1))) + 1);
lightbulbAnim.lightbulbs.gotoAndStop(lightbulbFrame);
lightbulbAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
};
};
};
};
};
};
};
if (lightbulbAnim.lightbulbs.currentFrame == 4){
if (lightbulbPick == "lightbulb1"){
this.lightbulbAnim.lightbulb1.play();
} else {
if (lightbulbPick == "lightbulb2"){
this.lightbulbAnim.lightbulb2.play();
} else {
if (lightbulbPick == "lightbulb3"){
this.lightbulbAnim.lightbulb3.play();
} else {
if (lightbulbPick == "lightbulb4"){
this.lightbulbAnim.lightbulb4.play();
} else {
if (lightbulbPick == "lightbulb7"){
this.lightbulbAnim.lightbulb7.play();
} else {
if (lightbulbPick == "lightbulb8"){
this.lightbulbAnim.lightbulb8.play();
} else {
lightbulbFrame = (Math.floor((Math.random() * ((1 + 4) - 1))) + 1);
lightbulbAnim.lightbulbs.gotoAndStop(lightbulbFrame);
lightbulbAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
};
};
};
};
};
};
};
};
}
public function rebusIcicle(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) || (tileHolder0.hitTestPoint(tile2.x, tile2.y)))) && (((tileHolder1.hitTestPoint(tile1.x, tile1.y)) || (tileHolder1.hitTestPoint(tile3.x, tile3.y)))))) && (((tileHolder2.hitTestPoint(tile0.x, tile0.y)) || (tileHolder2.hitTestPoint(tile2.x, tile2.y)))))) && (((tileHolder3.hitTestPoint(tile1.x, tile1.y)) || (tileHolder3.hitTestPoint(tile3.x, tile3.y)))))) && (tileHolder4.hitTestPoint(tile4.x, tile4.y)))) && (tileHolder5.hitTestPoint(tile5.x, tile5.y)))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusIcicle);
};
};
}
public function connectB(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
if (!allOff){
buttonReset.alpha = 1;
buttonReset.enabled = true;
buttonReset.addEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
} else {
buttonReset.alpha = 0.25;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
};
i = 0;
while (i < nodes) {
this[("node" + i)].addEventListener(MouseEvent.MOUSE_OVER, onNodeOver);
this[("node" + i)].addEventListener(MouseEvent.MOUSE_OUT, onNodeOut);
i++;
};
node0.buttonMode = true;
node0.addEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode0Click);
node1.buttonMode = true;
node1.addEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode1Click);
node2.buttonMode = true;
node2.addEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode2Click);
node3.buttonMode = true;
node3.addEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode3Click);
node4.buttonMode = true;
node4.addEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode4Click);
node5.buttonMode = true;
node5.addEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode5Click);
if (connected == 8){
levelPassed = true;
};
} else {
if (!allOff){
buttonReset.alpha = 0.25;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
};
i = 0;
while (i < nodes) {
this[("node" + i)].removeEventListener(MouseEvent.MOUSE_OVER, onNodeOver);
this[("node" + i)].removeEventListener(MouseEvent.MOUSE_OUT, onNodeOut);
i++;
};
node0.buttonMode = false;
node0.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode0Click);
node1.buttonMode = false;
node1.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode1Click);
node2.buttonMode = false;
node2.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode2Click);
node3.buttonMode = false;
node3.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode3Click);
node4.buttonMode = false;
node4.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode4Click);
node5.buttonMode = false;
node5.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectBNode5Click);
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, connectB);
};
};
}
public function onConnectBNode0Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node0.x;
player.y = node0.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line1.alpha < 100){
blip.play();
player.x = node0.x;
player.y = node0.y;
line1.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line0.alpha < 100){
blip.play();
player.x = node0.x;
player.y = node0.y;
line0.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
}
public function onConnectBNode1Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node1.x;
player.y = node1.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node0.x)) && ((player.y == node0.y)))){
if (line1.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line1.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line2.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line2.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
}
public function onConnectBNode3Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node3.x;
player.y = node3.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node0.x)) && ((player.y == node0.y)))){
if (line0.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line0.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line2.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line2.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line3.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line3.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node4.x)) && ((player.y == node4.y)))){
if (line4.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line4.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node5.x)) && ((player.y == node5.y)))){
if (line6.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line6.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
};
};
}
public function onConnectBNode2Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node2.x;
player.y = node2.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line3.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line3.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node5.x)) && ((player.y == node5.y)))){
if (line5.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line5.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
}
public function onConnectBNode4Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node4.x;
player.y = node4.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line4.alpha < 100){
blip.play();
player.x = node4.x;
player.y = node4.y;
line4.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node5.x)) && ((player.y == node5.y)))){
if (line7.alpha < 100){
blip.play();
player.x = node4.x;
player.y = node4.y;
line7.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
}
public function onConnectBNode5Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node5.x;
player.y = node5.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line5.alpha < 100){
blip.play();
player.x = node5.x;
player.y = node5.y;
line5.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line6.alpha < 100){
blip.play();
player.x = node5.x;
player.y = node5.y;
line6.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node4.x)) && ((player.y == node4.y)))){
if (line7.alpha < 100){
blip.play();
player.x = node5.x;
player.y = node5.y;
line7.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
}
public function quizAddition(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
quizAdditionButtonA.addEventListener(MouseEvent.MOUSE_DOWN, onQuizAdditionButtonAClick);
quizAdditionButtonB.addEventListener(MouseEvent.MOUSE_DOWN, onQuizAdditionButtonWrongClick);
quizAdditionButtonC.addEventListener(MouseEvent.MOUSE_DOWN, onQuizAdditionButtonWrongClick);
quizAdditionButtonD.addEventListener(MouseEvent.MOUSE_DOWN, onQuizAdditionButtonWrongClick);
plusSymbol.addEventListener(MouseEvent.MOUSE_DOWN, onPlusSymbolClick);
plusSymbol.buttonMode = true;
} else {
quizAdditionButtonA.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizAdditionButtonAClick);
quizAdditionButtonB.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizAdditionButtonWrongClick);
quizAdditionButtonC.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizAdditionButtonWrongClick);
quizAdditionButtonD.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizAdditionButtonWrongClick);
plusSymbol.removeEventListener(MouseEvent.MOUSE_DOWN, onPlusSymbolClick);
plusSymbol.buttonMode = false;
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, quizAddition);
};
};
}
public function onQuizAdditionButtonAClick(_arg1:MouseEvent):void{
if ((((((((plusSymbol.rotation == 45)) || ((plusSymbol.rotation == 135)))) || ((plusSymbol.rotation == -135)))) || ((plusSymbol.rotation == -45)))){
levelPassed = true;
} else {
clicks = (clicks + 19);
bass.play();
shakeCount = 10;
shaking = true;
};
}
public function onQuizAdditionButtonWrongClick(_arg1:MouseEvent):void{
clicks = (clicks + 19);
bass.play();
shakeCount = 10;
shaking = true;
}
public function onPlusSymbolClick(_arg1:MouseEvent):void{
blip.play();
plusSymbol.rotation = (plusSymbol.rotation + 45);
}
public function collectB(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
stage.addEventListener(MouseEvent.MOUSE_DOWN, onCollectMouseDown);
player.x = (player.x + ((bubblePosX - player.x) / speed));
player.y = (player.y + ((bubblePosY - player.y) / speed));
radius = ((player.width / 2) - ((player.width / 2) / 5));
i = 0;
while (i < bubbleTotal) {
if (!collected[i]){
if (this[("bubble" + i)].hitTestObject(player)){
pickup.play();
collected[i] = true;
player.scaleX = (player.scaleX + growFactor);
player.scaleY = (player.scaleY + growFactor);
};
} else {
if (this[("bubble" + i)].alpha > 0){
this[("bubble" + i)].alpha = (this[("bubble" + i)].alpha - 0.05);
this[("bubble" + i)].scaleX = (this[("bubble" + i)].scaleX - 0.05);
this[("bubble" + i)].scaleY = (this[("bubble" + i)].scaleY - 0.05);
this[("bubble" + i)].rotation = (this[("bubble" + i)].rotation + 20);
} else {
if (this[("bubble" + i)].visible){
this[("bubble" + i)].visible = false;
bubbleCount++;
};
};
};
i++;
};
j = 0;
while (j < 360) {
X = ((Math.cos((j * (Math.PI / 180))) * radius) + player.x);
Y = ((Math.sin((j * (Math.PI / 180))) * radius) + player.y);
if (hitmap.hitTestPoint(X, Y, true)){
pop.play();
bass.play();
shakeCount = 10;
shaking = true;
player.x = 320;
player.y = 380;
bubblePosX = 320;
bubblePosY = 380;
player.scaleX = 1;
player.scaleY = 1;
bubbleGuide.visible = true;
bubbleCount = 0;
k = 0;
while (k < bubbleTotal) {
this[("bubble" + k)].scaleX = 0.5;
this[("bubble" + k)].scaleY = 0.5;
this[("bubble" + k)].alpha = 1;
this[("bubble" + k)].rotation = 0;
collected[k] = false;
this[("bubble" + k)].visible = true;
k++;
};
};
j = (j + 5);
};
if (bubbleCount == bubbleTotal){
levelPassed = true;
};
} else {
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onCollectMouseDown);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, collectB);
};
};
}
public function rebusIceCube(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) && (((tileHolder1.hitTestPoint(tile1.x, tile1.y)) || (tileHolder1.hitTestPoint(tile3.x, tile3.y)))))) && (((tileHolder2.hitTestPoint(tile2.x, tile2.y)) || (tileHolder2.hitTestPoint(tile6.x, tile6.y)))))) && (((tileHolder3.hitTestPoint(tile1.x, tile1.y)) || (tileHolder3.hitTestPoint(tile3.x, tile3.y)))))) && (tileHolder4.hitTestPoint(tile4.x, tile4.y)))) && (tileHolder5.hitTestPoint(tile5.x, tile5.y)))) && (((tileHolder6.hitTestPoint(tile6.x, tile6.y)) || (tileHolder6.hitTestPoint(tile2.x, tile2.y)))))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusIceCube);
};
};
}
public function logicShapes(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
shapes.buttonMode = true;
i = 0;
while (i < totalShapes) {
this.shapes[("shape" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onShapesDown);
i++;
};
if ((((((((shapes.shape0.currentFrame == 4)) && ((shapes.shape1.currentFrame == 1)))) && ((shapes.shape2.currentFrame == 2)))) && ((shapes.shape3.currentFrame == 3)))){
levelPassed = true;
};
} else {
shapes.buttonMode = false;
i = 0;
while (i < totalShapes) {
this.shapes[("shape" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onShapesDown);
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, logicShapes);
};
};
}
public function onShapesDown(_arg1:Event):void{
blip.play();
shapePicked = _arg1.currentTarget.name;
this.shapes[shapePicked].play();
}
public function detailTwins(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < beasties) {
this[("beastie" + i)].addEventListener(MouseEvent.MOUSE_OVER, onBeastieOver);
this[("beastie" + i)].addEventListener(MouseEvent.MOUSE_OUT, onBeastieOut);
this[("beastie" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onBeastieDown);
this[("beastie" + i)].buttonMode = true;
i++;
};
} else {
i = 0;
while (i < beasties) {
this[("beastie" + i)].removeEventListener(MouseEvent.MOUSE_OVER, onBeastieOver);
this[("beastie" + i)].removeEventListener(MouseEvent.MOUSE_OUT, onBeastieOut);
this[("beastie" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onBeastieDown);
this[("beastie" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, detailTwins);
};
};
}
public function onBeastieDown(_arg1:MouseEvent):void{
beastiesSelected++;
beastiePicked = _arg1.currentTarget.name;
if (this[beastiePicked].alpha == 1){
this[beastiePicked].alpha = 0.5;
} else {
this[beastiePicked].alpha = 1;
};
if (beastiesSelected == 2){
if ((((beastie0.alpha == 0.5)) && ((beastie8.alpha == 0.5)))){
levelPassed = true;
} else {
bass.play();
shakeCount = 10;
shaking = true;
clicks = (clicks + 19);
beastiesSelected = 0;
i = 0;
while (i < beasties) {
this[("beastie" + i)].alpha = 1;
i++;
};
};
};
}
public function onBeastieOver(_arg1:MouseEvent):void{
beastiePicked = _arg1.currentTarget.name;
this[beastiePicked].scaleX = 1.4;
this[beastiePicked].scaleY = 1.4;
}
public function onBeastieOut(_arg1:MouseEvent):void{
beastiePicked = _arg1.currentTarget.name;
this[beastiePicked].scaleX = 1.2;
this[beastiePicked].scaleY = 1.2;
}
public function comicHangingOut(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
buttonSubmit.alpha = 1;
buttonSubmit.enabled = true;
buttonSubmit.addEventListener(MouseEvent.MOUSE_DOWN, buttonSubmitComic);
i = 0;
while (i < 4) {
this.comic[("frame" + i)].buttonMode = true;
this.comic[("frame" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onComicFrameDown);
i++;
};
if (mouseX < 80){
comicSpeed = ((80 - mouseX) / 4);
comicMoveLeft = true;
} else {
comicMoveLeft = false;
};
if (mouseX > 560){
comicSpeed = ((560 - mouseX) / 4);
comicMoveRight = true;
} else {
comicMoveRight = false;
};
if (comicMoveLeft){
if ((comic.x + comicSpeed) < 680){
comic.x = (comic.x + comicSpeed);
} else {
comic.x = 680;
};
};
if (comicMoveRight){
if ((comic.x + comicSpeed) > -40){
comic.x = (comic.x + comicSpeed);
} else {
comic.x = -40;
};
};
if ((((comic.x <= 680)) && ((comic.x > -40)))){
hitmapRight.visible = true;
} else {
hitmapRight.visible = false;
};
if ((((comic.x >= -40)) && ((comic.x < 680)))){
hitmapLeft.visible = true;
} else {
hitmapLeft.visible = false;
};
if ((((((((comic.frame0.currentFrame == 3)) && ((comic.frame1.currentFrame == 2)))) && ((comic.frame2.currentFrame == 5)))) && ((comic.frame3.currentFrame == 4)))){
organized = true;
} else {
organized = false;
};
} else {
buttonSubmit.alpha = 0.25;
buttonSubmit.enabled = false;
buttonSubmit.removeEventListener(MouseEvent.MOUSE_DOWN, buttonSubmitComic);
i = 0;
while (i < 4) {
this.comic[("frame" + i)].buttonMode = false;
this.comic[("frame" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onComicFrameDown);
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, comicHangingOut);
};
};
}
public function rebusApplePie(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) && (((((tileHolder1.hitTestPoint(tile1.x, tile1.y)) || (tileHolder1.hitTestPoint(tile2.x, tile2.y)))) || (tileHolder1.hitTestPoint(tile5.x, tile5.y)))))) && (((((tileHolder2.hitTestPoint(tile1.x, tile1.y)) || (tileHolder2.hitTestPoint(tile2.x, tile2.y)))) || (tileHolder2.hitTestPoint(tile5.x, tile5.y)))))) && (tileHolder3.hitTestPoint(tile3.x, tile3.y)))) && (((tileHolder4.hitTestPoint(tile4.x, tile4.y)) || (tileHolder4.hitTestPoint(tile7.x, tile7.y)))))) && (((((tileHolder5.hitTestPoint(tile1.x, tile1.y)) || (tileHolder5.hitTestPoint(tile2.x, tile2.y)))) || (tileHolder5.hitTestPoint(tile5.x, tile5.y)))))) && (tileHolder6.hitTestPoint(tile6.x, tile6.y)))) && (((tileHolder7.hitTestPoint(tile4.x, tile4.y)) || (tileHolder7.hitTestPoint(tile7.x, tile7.y)))))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusApplePie);
};
};
}
public function codeButtons(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
comboSwitch0.addEventListener(MouseEvent.MOUSE_DOWN, onComboSwitch0Down);
comboSwitch1.addEventListener(MouseEvent.MOUSE_DOWN, onComboSwitch1Down);
comboSwitch2.addEventListener(MouseEvent.MOUSE_DOWN, onComboSwitch2Down);
comboSwitch3.addEventListener(MouseEvent.MOUSE_DOWN, onComboSwitch3Down);
cabinet.book.addEventListener(MouseEvent.MOUSE_DOWN, onBookSwitchDown);
comboSwitch0.buttonMode = true;
comboSwitch1.buttonMode = true;
comboSwitch2.buttonMode = true;
comboSwitch3.buttonMode = true;
if (cabinet.currentFrame == 1){
cabinet.book.buttonMode = true;
} else {
cabinet.book.buttonMode = false;
};
if ((((((((comboPanel.comboLight0.currentFrame == 2)) && ((comboPanel.comboLight1.currentFrame == 2)))) && ((comboPanel.comboLight2.currentFrame == 2)))) && ((comboPanel.comboLight3.currentFrame == 2)))){
doorSqueak.play();
door.play();
levelPassed = true;
};
} else {
comboSwitch0.removeEventListener(MouseEvent.MOUSE_DOWN, onComboSwitch0Down);
comboSwitch1.removeEventListener(MouseEvent.MOUSE_DOWN, onComboSwitch1Down);
comboSwitch2.removeEventListener(MouseEvent.MOUSE_DOWN, onComboSwitch2Down);
comboSwitch3.removeEventListener(MouseEvent.MOUSE_DOWN, onComboSwitch3Down);
cabinet.book.removeEventListener(MouseEvent.MOUSE_DOWN, onBookSwitchDown);
comboSwitch0.buttonMode = false;
comboSwitch1.buttonMode = false;
comboSwitch2.buttonMode = false;
comboSwitch3.buttonMode = false;
cabinet.book.buttonMode = false;
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, codeButtons);
};
};
}
public function onBookSwitchDown(_arg1:MouseEvent):void{
if (cabinet.currentFrame == 1){
mechanism.play();
slide.play();
cabinet.play();
};
}
public function onComboSwitch0Down(_arg1:MouseEvent):void{
blip.play();
comboPanel.comboLight0.play();
}
public function onComboSwitch1Down(_arg1:MouseEvent):void{
blip.play();
comboPanel.comboLight1.play();
comboPanel.comboLight3.play();
}
public function onComboSwitch2Down(_arg1:MouseEvent):void{
blip.play();
comboPanel.comboLight2.play();
}
public function onComboSwitch3Down(_arg1:MouseEvent):void{
blip.play();
comboPanel.comboLight0.play();
comboPanel.comboLight1.play();
comboPanel.comboLight2.play();
}
public function taskBacon(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
house.chimney.addEventListener(MouseEvent.MOUSE_DOWN, onChimneyDown);
if (house.chimney.currentFrame == 1){
house.chimney.buttonMode = true;
} else {
house.chimney.buttonMode = false;
};
rocky.addEventListener(MouseEvent.MOUSE_DOWN, onRockyDragStart);
stage.addEventListener(MouseEvent.MOUSE_UP, onRockyDragStop);
rocky.buttonMode = true;
cop.addEventListener(MouseEvent.MOUSE_DOWN, onCopDragStart);
stage.addEventListener(MouseEvent.MOUSE_UP, onCopDragStop);
cop.buttonMode = true;
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, onTaskBaconRightClick);
stage.addEventListener(Event.MOUSE_LEAVE, onTaskBaconMouseLeave);
if (draggingRocky){
rocky.x = mouseX;
rocky.y = mouseY;
} else {
rocky.x = rockyX;
rocky.y = rockyY;
};
if (draggingCop){
cop.x = mouseX;
cop.y = mouseY;
} else {
cop.x = copX;
cop.y = copY;
};
if (cop.currentFrame == (cop.totalFrames - 1)){
crash.play();
letterbox.play();
};
if (((house.chimney.cop.visible) && ((house.chimney.currentFrame == house.chimney.totalFrames)))){
levelPassed = true;
};
} else {
rocky.removeEventListener(MouseEvent.MOUSE_DOWN, onRockyDragStart);
stage.removeEventListener(MouseEvent.MOUSE_UP, onRockyDragStop);
rocky.buttonMode = false;
cop.removeEventListener(MouseEvent.MOUSE_DOWN, onCopDragStart);
stage.removeEventListener(MouseEvent.MOUSE_UP, onCopDragStop);
cop.buttonMode = false;
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, taskBacon);
};
};
}
public function onChimneyDown(_arg1:MouseEvent):void{
house.chimney.play();
}
public function onRockyDragStart(_arg1:MouseEvent):void{
draggingRocky = true;
}
public function onRockyDragStop(_arg1:Event){
if (rocky.hitTestObject(house.windows)){
glassBreak.play();
policeSiren.play();
rocky.visible = false;
house.windows.play();
cop.play();
};
draggingRocky = false;
}
public function onCopDragStart(_arg1:MouseEvent):void{
draggingCop = true;
}
public function onCopDragStop(_arg1:Event){
if (cop.hitTestObject(house.chimney)){
cop.visible = false;
house.chimney.cop.visible = true;
};
draggingCop = false;
}
public function onTaskBaconRightClick(_arg1:Event){
draggingRocky = false;
draggingCop = false;
}
public function onTaskBaconMouseLeave(_arg1:Event){
draggingRocky = false;
draggingCop = false;
}
public function matchsticksTwo(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
if (matchsticksTaken == 0){
buttonReset.alpha = 0.5;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
} else {
buttonReset.alpha = 1;
buttonReset.enabled = true;
buttonReset.addEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
};
i = 0;
while (i < matchstickTotal) {
this[("matchstick" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onMatchsticksDown);
this[("matchstick" + i)].buttonMode = true;
i++;
};
if ((((((((((((((((((((((((((((((((((((matchstick0.visible == true)) && ((matchstick1.visible == false)))) && ((matchstick2.visible == true)))) && ((matchstick3.visible == false)))) && ((matchstick4.visible == false)))) && ((matchstick5.visible == false)))) && ((matchstick6.visible == false)))) && ((matchstick7.visible == true)))) && ((matchstick8.visible == true)))) && ((matchstick9.visible == true)))) && ((matchstick10.visible == true)))) && ((matchstick11.visible == false)))) && ((matchstick12.visible == true)))) && ((matchstick13.visible == true)))) && ((matchstick14.visible == false)))) && ((matchstick15.visible == true)))) && ((matchstick16.visible == true)))) && ((matchstick17.visible == false)))){
levelPassed = true;
};
} else {
buttonReset.alpha = 0.5;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, buttonResetMatchsticks);
i = 0;
while (i < matchstickTotal) {
this[("matchstick" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onMatchsticksDown);
this[("matchstick" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, matchsticksTwo);
};
};
}
public function memorizeDice(_arg1:Event):void{
if (diceAnim.counter.currentFrame == diceAnim.counter.totalFrames){
if (!guessing){
i = 0;
while (i < diceCount) {
this.diceAnim[("dice" + i)].gotoAndStop(1);
i++;
};
if ((diceAnim.x - memorizeSpeed) > -90){
diceAnim.x = (diceAnim.x - 40);
} else {
diceAnim.x = -90;
guessing = true;
};
};
} else {
if (diceAnim.counter.currentFrame == 1){
if (guessing){
if ((diceAnim.x + memorizeSpeed) < 690){
diceAnim.x = (diceAnim.x + 40);
} else {
diceAnim.x = 690;
guessing = false;
};
};
};
};
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < diceCount) {
this.diceAnim[("dice" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onDiceDown);
this.diceAnim[("dice" + i)].buttonMode = true;
i++;
};
if ((((diceAnim.counter.currentFrame == 1)) && ((this.currentFrame == 1)))){
if (!guessing){
diceAnim.counter.play();
};
};
if ((((((((((((diceAnim.dice0.currentFrame == diceAnim.dice0.totalFrames)) && ((diceAnim.dice1.currentFrame == diceAnim.dice1.totalFrames)))) && ((diceAnim.dice2.currentFrame == diceAnim.dice2.totalFrames)))) && ((diceAnim.dice3.currentFrame == diceAnim.dice3.totalFrames)))) && ((diceAnim.dice4.currentFrame == diceAnim.dice4.totalFrames)))) && ((diceAnim.dice5.currentFrame == diceAnim.dice5.totalFrames)))){
levelPassed = true;
};
} else {
i = 0;
while (i < diceCount) {
this.diceAnim[("dice" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onDiceDown);
this.diceAnim[("dice" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, memorizeDice);
};
};
}
public function onDiceDown(_arg1:MouseEvent):void{
blip.play();
dicePick = _arg1.currentTarget.name;
if (guessing){
if (diceProgress == 0){
if (dicePick == "dice0"){
this.diceAnim.dice0.play();
diceProgress++;
} else {
diceAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
diceProgress = 0;
};
} else {
if (diceProgress == 1){
if (dicePick == "dice1"){
this.diceAnim.dice1.play();
diceProgress++;
} else {
diceAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
diceProgress = 0;
};
} else {
if (diceProgress == 2){
if (dicePick == "dice2"){
this.diceAnim.dice2.play();
diceProgress++;
} else {
diceAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
diceProgress = 0;
};
} else {
if (diceProgress == 3){
if (dicePick == "dice3"){
this.diceAnim.dice3.play();
diceProgress++;
} else {
diceAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
diceProgress = 0;
};
} else {
if (diceProgress == 4){
if (dicePick == "dice4"){
this.diceAnim.dice4.play();
diceProgress++;
} else {
diceAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
diceProgress = 0;
};
} else {
if (diceProgress == 5){
if (dicePick == "dice5"){
this.diceAnim.dice5.play();
diceProgress++;
} else {
diceAnim.counter.gotoAndStop(1);
bass.play();
shakeCount = 10;
shaking = true;
diceProgress = 0;
};
};
};
};
};
};
};
};
}
public function rebusLionKing(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) && (((tileHolder1.hitTestPoint(tile1.x, tile1.y)) || (tileHolder1.hitTestPoint(tile5.x, tile5.y)))))) && (tileHolder2.hitTestPoint(tile2.x, tile2.y)))) && (((tileHolder3.hitTestPoint(tile3.x, tile3.y)) || (tileHolder3.hitTestPoint(tile6.x, tile6.y)))))) && (tileHolder4.hitTestPoint(tile4.x, tile4.y)))) && (((tileHolder5.hitTestPoint(tile1.x, tile1.y)) || (tileHolder5.hitTestPoint(tile5.x, tile5.y)))))) && (((tileHolder6.hitTestPoint(tile3.x, tile3.y)) || (tileHolder6.hitTestPoint(tile6.x, tile6.y)))))) && (tileHolder7.hitTestPoint(tile7.x, tile7.y)))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusLionKing);
};
};
}
public function connectC(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
if (!allOff){
buttonReset.alpha = 1;
buttonReset.enabled = true;
buttonReset.addEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
} else {
buttonReset.alpha = 0.25;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
};
i = 0;
while (i < nodes) {
this[("node" + i)].addEventListener(MouseEvent.MOUSE_OVER, onNodeOver);
this[("node" + i)].addEventListener(MouseEvent.MOUSE_OUT, onNodeOut);
i++;
};
node0.buttonMode = true;
node0.addEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode0Click);
node1.buttonMode = true;
node1.addEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode1Click);
node2.buttonMode = true;
node2.addEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode2Click);
node3.buttonMode = true;
node3.addEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode3Click);
node4.buttonMode = true;
node4.addEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode4Click);
node5.buttonMode = true;
node5.addEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode5Click);
if (connected == 10){
levelPassed = true;
};
} else {
if (!allOff){
buttonReset.alpha = 0.25;
buttonReset.enabled = false;
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
};
i = 0;
while (i < nodes) {
this[("node" + i)].removeEventListener(MouseEvent.MOUSE_OVER, onNodeOver);
this[("node" + i)].removeEventListener(MouseEvent.MOUSE_OUT, onNodeOut);
i++;
};
node0.buttonMode = false;
node0.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode0Click);
node1.buttonMode = false;
node1.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode1Click);
node2.buttonMode = false;
node2.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode2Click);
node3.buttonMode = false;
node3.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode3Click);
node4.buttonMode = false;
node4.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode4Click);
node5.buttonMode = false;
node5.removeEventListener(MouseEvent.MOUSE_DOWN, onConnectCNode5Click);
buttonReset.removeEventListener(MouseEvent.MOUSE_DOWN, resetButtonConnect);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, connectC);
};
};
}
public function onConnectCNode0Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node0.x;
player.y = node0.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line0.alpha < 100){
blip.play();
player.x = node0.x;
player.y = node0.y;
line0.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line1.alpha < 100){
blip.play();
player.x = node0.x;
player.y = node0.y;
line1.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
}
public function onConnectCNode1Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node1.x;
player.y = node1.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node0.x)) && ((player.y == node0.y)))){
if (line0.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line0.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line2.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line2.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line4.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line4.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node4.x)) && ((player.y == node4.y)))){
if (line3.alpha < 100){
blip.play();
player.x = node1.x;
player.y = node1.y;
line3.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
};
}
public function onConnectCNode2Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node2.x;
player.y = node2.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node0.x)) && ((player.y == node0.y)))){
if (line1.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line1.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line2.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line2.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line5.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line5.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node5.x)) && ((player.y == node5.y)))){
if (line6.alpha < 100){
blip.play();
player.x = node2.x;
player.y = node2.y;
line6.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
};
}
public function onConnectCNode3Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node3.x;
player.y = node3.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line4.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line4.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line5.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line5.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node4.x)) && ((player.y == node4.y)))){
if (line7.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line7.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node5.x)) && ((player.y == node5.y)))){
if (line8.alpha < 100){
blip.play();
player.x = node3.x;
player.y = node3.y;
line8.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
};
}
public function onConnectCNode4Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node4.x;
player.y = node4.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node1.x)) && ((player.y == node1.y)))){
if (line3.alpha < 100){
blip.play();
player.x = node4.x;
player.y = node4.y;
line3.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line7.alpha < 100){
blip.play();
player.x = node4.x;
player.y = node4.y;
line7.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node5.x)) && ((player.y == node5.y)))){
if (line9.alpha < 100){
blip.play();
player.x = node4.x;
player.y = node4.y;
line9.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
}
public function onConnectCNode5Click(_arg1:MouseEvent):void{
if (allOff){
blip.play();
player.x = node5.x;
player.y = node5.y;
player.visible = true;
allOff = false;
} else {
if ((((player.x == node2.x)) && ((player.y == node2.y)))){
if (line6.alpha < 100){
blip.play();
player.x = node5.x;
player.y = node5.y;
line6.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node3.x)) && ((player.y == node3.y)))){
if (line8.alpha < 100){
blip.play();
player.x = node5.x;
player.y = node5.y;
line8.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
if ((((player.x == node4.x)) && ((player.y == node4.y)))){
if (line9.alpha < 100){
blip.play();
player.x = node5.x;
player.y = node5.y;
line9.alpha = 100;
connected++;
} else {
bass.play();
};
} else {
bass.play();
};
};
};
};
}
public function quizBoxes(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
quizBoxesButtonA.addEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonWrongClick);
quizBoxesButtonB.addEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonWrongClick);
quizBoxesButtonC.addEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonWrongClick);
quizBoxesButtonD.addEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonWrongClick);
quizBoxesButtonE.addEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonEClick);
quizBoxesButtonE.buttonMode = true;
} else {
quizBoxesButtonA.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonWrongClick);
quizBoxesButtonB.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonWrongClick);
quizBoxesButtonC.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonWrongClick);
quizBoxesButtonD.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonWrongClick);
quizBoxesButtonE.removeEventListener(MouseEvent.MOUSE_DOWN, onQuizBoxesButtonEClick);
quizBoxesButtonE.buttonMode = false;
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, quizBoxes);
};
};
}
public function onQuizBoxesButtonWrongClick(_arg1:MouseEvent):void{
clicks = (clicks + 19);
bass.play();
shakeCount = 10;
shaking = true;
}
public function onQuizBoxesButtonEClick(_arg1:MouseEvent):void{
levelPassed = true;
}
public function collectC(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
stage.addEventListener(MouseEvent.MOUSE_DOWN, onCollectMouseDown);
player.x = (player.x + ((bubblePosX - player.x) / speed));
player.y = (player.y + ((bubblePosY - player.y) / speed));
radius = ((player.width / 2) - ((player.width / 2) / 5));
i = 0;
while (i < bubbleTotal) {
if (!collected[i]){
if (this[("bubble" + i)].hitTestObject(player)){
pickup.play();
collected[i] = true;
player.scaleX = (player.scaleX + growFactor);
player.scaleY = (player.scaleY + growFactor);
};
} else {
if (this[("bubble" + i)].alpha > 0){
this[("bubble" + i)].alpha = (this[("bubble" + i)].alpha - 0.05);
this[("bubble" + i)].scaleX = (this[("bubble" + i)].scaleX - 0.05);
this[("bubble" + i)].scaleY = (this[("bubble" + i)].scaleY - 0.05);
this[("bubble" + i)].rotation = (this[("bubble" + i)].rotation + 20);
} else {
if (this[("bubble" + i)].visible){
this[("bubble" + i)].visible = false;
bubbleCount++;
};
};
};
i++;
};
j = 0;
while (j < 360) {
X = ((Math.cos((j * (Math.PI / 180))) * radius) + player.x);
Y = ((Math.sin((j * (Math.PI / 180))) * radius) + player.y);
if (hitmap.hitTestPoint(X, Y, true)){
pop.play();
bass.play();
shakeCount = 10;
shaking = true;
player.x = 320;
player.y = 190;
bubblePosX = 320;
bubblePosY = 190;
player.scaleX = 1;
player.scaleY = 1;
bubbleGuide.visible = true;
bubbleCount = 0;
k = 0;
while (k < bubbleTotal) {
this[("bubble" + k)].scaleX = 0.5;
this[("bubble" + k)].scaleY = 0.5;
this[("bubble" + k)].alpha = 1;
this[("bubble" + k)].rotation = 0;
collected[k] = false;
this[("bubble" + k)].visible = true;
k++;
};
};
j = (j + 5);
};
if (bubbleCount == bubbleTotal){
levelPassed = true;
};
} else {
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onCollectMouseDown);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, collectC);
};
};
}
public function rebusSixFeetUnder(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((((((((((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) && (tileHolder1.hitTestPoint(tile1.x, tile1.y)))) && (tileHolder2.hitTestPoint(tile2.x, tile2.y)))) && (tileHolder3.hitTestPoint(tile3.x, tile3.y)))) && (((((tileHolder4.hitTestPoint(tile4.x, tile4.y)) || (tileHolder4.hitTestPoint(tile5.x, tile5.y)))) || (tileHolder4.hitTestPoint(tile10.x, tile10.y)))))) && (((((tileHolder5.hitTestPoint(tile4.x, tile4.y)) || (tileHolder5.hitTestPoint(tile5.x, tile5.y)))) || (tileHolder5.hitTestPoint(tile10.x, tile10.y)))))) && (tileHolder6.hitTestPoint(tile6.x, tile6.y)))) && (tileHolder7.hitTestPoint(tile7.x, tile7.y)))) && (tileHolder8.hitTestPoint(tile8.x, tile8.y)))) && (tileHolder9.hitTestPoint(tile9.x, tile9.y)))) && (((((tileHolder10.hitTestPoint(tile4.x, tile4.y)) || (tileHolder10.hitTestPoint(tile5.x, tile5.y)))) || (tileHolder10.hitTestPoint(tile10.x, tile10.y)))))) && (tileHolder11.hitTestPoint(tile11.x, tile11.y)))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusSixFeetUnder);
};
};
}
public function logicAliens(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
alien.eyes.buttonMode = true;
alien.nose.buttonMode = true;
alien.mouth.buttonMode = true;
alien.arm0.buttonMode = true;
alien.arm1.buttonMode = true;
alien.eyes.addEventListener(MouseEvent.MOUSE_DOWN, onAlienEyesDown);
alien.nose.addEventListener(MouseEvent.MOUSE_DOWN, onAlienNoseDown);
alien.mouth.addEventListener(MouseEvent.MOUSE_DOWN, onAlienMouthDown);
alien.arm0.addEventListener(MouseEvent.MOUSE_DOWN, onAlienArm0Down);
alien.arm1.addEventListener(MouseEvent.MOUSE_DOWN, onAlienArm1Down);
if ((((((((((alien.eyes.rotation == 180)) && ((alien.nose.rotation == 0)))) && ((alien.mouth.rotation == 180)))) && (!(leftUp)))) && (!(rightUp)))){
levelPassed = true;
};
} else {
alien.eyes.buttonMode = false;
alien.nose.buttonMode = false;
alien.mouth.buttonMode = false;
alien.arm0.buttonMode = false;
alien.arm1.buttonMode = false;
alien.eyes.removeEventListener(MouseEvent.MOUSE_DOWN, onAlienEyesDown);
alien.nose.removeEventListener(MouseEvent.MOUSE_DOWN, onAlienNoseDown);
alien.mouth.removeEventListener(MouseEvent.MOUSE_DOWN, onAlienMouthDown);
alien.arm0.removeEventListener(MouseEvent.MOUSE_DOWN, onAlienArm0Down);
alien.arm1.removeEventListener(MouseEvent.MOUSE_DOWN, onAlienArm1Down);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, logicAliens);
};
};
}
public function onAlienEyesDown(_arg1:MouseEvent):void{
blip.play();
alien.eyes.rotation = (alien.eyes.rotation + 180);
}
public function onAlienNoseDown(_arg1:MouseEvent):void{
blip.play();
alien.nose.rotation = (alien.nose.rotation + 180);
}
public function onAlienMouthDown(_arg1:MouseEvent):void{
blip.play();
alien.mouth.rotation = (alien.mouth.rotation + 180);
}
public function onAlienArm0Down(_arg1:MouseEvent):void{
blip.play();
if (!leftUp){
leftUp = true;
alien.arm0.y = (alien.arm0.y - 20);
} else {
leftUp = false;
alien.arm0.y = (alien.arm0.y + 20);
};
}
public function onAlienArm1Down(_arg1:MouseEvent):void{
blip.play();
if (!rightUp){
rightUp = true;
alien.arm1.y = (alien.arm1.y - 20);
} else {
rightUp = false;
alien.arm1.y = (alien.arm1.y + 20);
};
}
public function detailLoner(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < items) {
this[("item" + i)].addEventListener(MouseEvent.MOUSE_OVER, onitemOver);
this[("item" + i)].addEventListener(MouseEvent.MOUSE_OUT, onitemOut);
this[("item" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onitemDown);
this[("item" + i)].buttonMode = true;
i++;
};
} else {
i = 0;
while (i < items) {
this[("item" + i)].removeEventListener(MouseEvent.MOUSE_OVER, onitemOver);
this[("item" + i)].removeEventListener(MouseEvent.MOUSE_OUT, onitemOut);
this[("item" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onitemDown);
this[("item" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, detailLoner);
};
};
}
public function onitemDown(_arg1:MouseEvent):void{
itemPicked = _arg1.currentTarget.name;
if (this.currentFrame == 1){
if (itemPicked == "item48"){
levelPassed = true;
} else {
bass.play();
shakeCount = 10;
shaking = true;
clicks = (clicks + 19);
};
};
if (this.currentFrame == 2){
if (itemPicked == "item13"){
levelPassed = true;
} else {
bass.play();
shakeCount = 10;
shaking = true;
clicks = (clicks + 19);
};
};
if (this.currentFrame == 3){
if (itemPicked == "item4"){
levelPassed = true;
} else {
bass.play();
shakeCount = 10;
shaking = true;
clicks = (clicks + 19);
};
};
if (this.currentFrame == 4){
if (itemPicked == "item16"){
levelPassed = true;
} else {
bass.play();
shakeCount = 10;
shaking = true;
clicks = (clicks + 19);
};
};
}
public function onitemOver(_arg1:MouseEvent):void{
itemPicked = _arg1.currentTarget.name;
this[itemPicked].scaleX = 1.1;
this[itemPicked].scaleY = 1.1;
}
public function onitemOut(_arg1:MouseEvent):void{
itemPicked = _arg1.currentTarget.name;
this[itemPicked].scaleX = 1;
this[itemPicked].scaleY = 1;
}
public function comicEnviromental(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
buttonSubmit.alpha = 1;
buttonSubmit.enabled = true;
buttonSubmit.addEventListener(MouseEvent.MOUSE_DOWN, buttonSubmitComic);
i = 0;
while (i < 4) {
this.comic[("frame" + i)].buttonMode = true;
this.comic[("frame" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onComicFrameDown);
i++;
};
if (mouseX < 80){
comicSpeed = ((80 - mouseX) / 4);
comicMoveLeft = true;
} else {
comicMoveLeft = false;
};
if (mouseX > 560){
comicSpeed = ((560 - mouseX) / 4);
comicMoveRight = true;
} else {
comicMoveRight = false;
};
if (comicMoveLeft){
if ((comic.x + comicSpeed) < 680){
comic.x = (comic.x + comicSpeed);
} else {
comic.x = 680;
};
};
if (comicMoveRight){
if ((comic.x + comicSpeed) > -40){
comic.x = (comic.x + comicSpeed);
} else {
comic.x = -40;
};
};
if ((((comic.x <= 680)) && ((comic.x > -40)))){
hitmapRight.visible = true;
} else {
hitmapRight.visible = false;
};
if ((((comic.x >= -40)) && ((comic.x < 680)))){
hitmapLeft.visible = true;
} else {
hitmapLeft.visible = false;
};
if ((((((((comic.frame0.currentFrame == 5)) && ((comic.frame1.currentFrame == 2)))) && ((comic.frame2.currentFrame == 4)))) && ((comic.frame3.currentFrame == 3)))){
organized = true;
} else {
organized = false;
};
} else {
buttonSubmit.alpha = 0.25;
buttonSubmit.enabled = false;
buttonSubmit.removeEventListener(MouseEvent.MOUSE_DOWN, buttonSubmitComic);
i = 0;
while (i < 4) {
this.comic[("frame" + i)].buttonMode = false;
this.comic[("frame" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onComicFrameDown);
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, comicEnviromental);
};
};
}
public function rebusOnceUponATime(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < tiles) {
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].addEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = true;
i++;
};
myMenu.addEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.ENTER_FRAME, dragCheck);
if (((((((((((((((((((((((((((tileHolder0.hitTestPoint(tile0.x, tile0.y)) || (tileHolder0.hitTestPoint(tile6.x, tile6.y)))) && (((tileHolder1.hitTestPoint(tile1.x, tile1.y)) || (tileHolder1.hitTestPoint(tile7.x, tile7.y)))))) && (tileHolder2.hitTestPoint(tile2.x, tile2.y)))) && (((tileHolder3.hitTestPoint(tile3.x, tile3.y)) || (tileHolder3.hitTestPoint(tile12.x, tile12.y)))))) && (tileHolder4.hitTestPoint(tile4.x, tile4.y)))) && (tileHolder5.hitTestPoint(tile5.x, tile5.y)))) && (((tileHolder6.hitTestPoint(tile0.x, tile0.y)) || (tileHolder6.hitTestPoint(tile6.x, tile6.y)))))) && (((tileHolder7.hitTestPoint(tile1.x, tile1.y)) || (tileHolder7.hitTestPoint(tile7.x, tile7.y)))))) && (tileHolder8.hitTestPoint(tile8.x, tile8.y)))) && (tileHolder9.hitTestPoint(tile9.x, tile9.y)))) && (tileHolder10.hitTestPoint(tile10.x, tile10.y)))) && (tileHolder11.hitTestPoint(tile11.x, tile11.y)))) && (((tileHolder12.hitTestPoint(tile3.x, tile3.y)) || (tileHolder12.hitTestPoint(tile12.x, tile12.y)))))){
levelPassed = true;
};
} else {
setChildIndex(fg, (numChildren - 1));
i = 0;
while (i < tiles) {
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
this[("tile" + i)].removeEventListener(MouseEvent.MOUSE_UP, dragStop);
this[("tile" + i)].buttonMode = false;
i++;
};
myMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, rightClick);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.ENTER_FRAME, dragCheck);
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, rebusOnceUponATime);
};
};
}
public function codeDirs(_arg1:Event):void{
if (((((!(gamePaused)) && (!(levelPassed)))) && (!(quit)))){
i = 0;
while (i < totalDirs) {
this.dirPanel[("dir" + i)].addEventListener(MouseEvent.MOUSE_DOWN, onDirsDown);
this.dirPanel[("dir" + i)].buttonMode = true;
i++;
};
if ((((((((this.dirPanel.dir0.dir.rotation == -90)) && ((this.dirPanel.dir1.dir.rotation == 0)))) && ((this.dirPanel.dir2.dir.rotation == 90)))) && ((this.dirPanel.dir3.dir.rotation == 180)))){
doorSqueak.play();
door.play();
levelPassed = true;
};
} else {
i = 0;
while (i < totalDirs) {
this.dirPanel[("dir" + i)].removeEventListener(MouseEvent.MOUSE_DOWN, onDirsDown);
this.dirPanel[("dir" + i)].buttonMode = false;
i++;
};
if (((levelPassed) || (quit))){
stage.removeEventListener(Event.ENTER_FRAME, codeDirs);
};
};
}
public function onDirsDown(_arg1:Event):void{
blip.play();
dirPicked = _arg1.currentTarget.name;
this.dirPanel[dirPicked].dir.rotation = (this.dirPanel[dirPicked].dir.rotation + 90);
}
public function gameWonScreen(_arg1:Event):void{
fg.speaker.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (fg.currentFrame == fg.totalFrames){
buttonMenu.removeEventListener(MouseEvent.CLICK, onMenuClick);
buttonSubmit.removeEventListener(MouseEvent.CLICK, onSubmitClick);
stage.removeEventListener(Event.ENTER_FRAME, gameWonScreen);
if (menu){
gotoAndStop(1, "menu");
};
if (submit){
gotoAndStop(1, "submit");
};
};
}
public function helpScreen(_arg1:Event):void{
fg.speaker.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (fg.currentFrame == fg.totalFrames){
buttonMenu.removeEventListener(MouseEvent.CLICK, onMenuClick);
stage.removeEventListener(Event.ENTER_FRAME, helpScreen);
if (menu){
gotoAndStop(1, "menu");
};
};
}
public function creditsScreen(_arg1:Event):void{
fg.speaker.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (fg.currentFrame == fg.totalFrames){
buttonMenu.removeEventListener(MouseEvent.CLICK, onMenuClick);
stage.removeEventListener(Event.ENTER_FRAME, creditsScreen);
if (menu){
gotoAndStop(1, "menu");
};
};
}
function frame1(){
stop();
stage.quality = "high";
stage.scaleMode = StageScaleMode.NO_SCALE;
allowed_site = "armorgames.com";
domain = this.root.loaderInfo.url.split("/")[2];
domain_idx = domain.indexOf(allowed_site);
fm_bar.addEventListener(Event.ENTER_FRAME, load_progress);
sound = true;
SoundMixer.soundTransform = new SoundTransform(1);
myMenu = new ContextMenu();
myMenu.builtInItems.forwardAndBack = false;
myMenu.builtInItems.loop = false;
myMenu.builtInItems.play = false;
myMenu.builtInItems.print = false;
myMenu.builtInItems.quality = false;
myMenu.builtInItems.rewind = false;
myMenu.builtInItems.save = false;
myMenu.builtInItems.zoom = false;
contextMenu = myMenu;
}
function frame27(){
stop();
agi_url = "http://agi.armorgames.com/assets/agi/AGI.swf";
Security.allowDomain(agi_url);
devKey = "2e1a0ea07ba410b66df1e2aa99500abe";
gameKey = "bustabrain";
urlRequest = new URLRequest(agi_url);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(urlRequest);
obj = new Object();
obj.onClose = handleOnAGUIClose;
agi.initAGUI(obj);
}
function frame244(){
play();
}
function frame245(){
stop();
SoundMixer.stopAll();
fg.clicksText.visible = false;
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
i = 0;
j = 0;
k = 0;
clicks = 0;
levelNum = 1;
quit = false;
gamePaused = false;
levelPassed = false;
shaking = false;
shakeCount = 0;
menu = false;
rock = false;
help = false;
scores = false;
credits = false;
submit = false;
buttonPlay.addEventListener(MouseEvent.MOUSE_DOWN, onPlayClick);
buttonHelp.addEventListener(MouseEvent.MOUSE_DOWN, onHelpClick);
buttonScores.addEventListener(MouseEvent.MOUSE_DOWN, onScoresClick);
buttonCredits.addEventListener(MouseEvent.MOUSE_DOWN, onCreditsClick);
buttonLink.addEventListener(MouseEvent.MOUSE_DOWN, onLinkClick);
buttonWalkthrough.addEventListener(MouseEvent.MOUSE_DOWN, onWalkthroughClick);
buttonLogo.addEventListener(MouseEvent.MOUSE_DOWN, onLogoClick);
stage.addEventListener(Event.ENTER_FRAME, menuScreen);
themeIntro = new themeIntroWav();
themeIntro.play();
lastSoundTime = 0;
theme = new themeWav();
themeTransform = new SoundTransform(1, 0);
themeSongPaused = false;
themeStinger = new themeStingerWav();
bass = new bassWav();
success = new successWav();
crunch = new crunchWav();
pop = new popWav();
pickup = new pickupWav();
blip = new blipWav();
reset = new resetWav();
mechanism = new mechanismWav();
slide = new slideWav();
doorSqueak = new doorSqueakWav();
snowStep = new snowStepWav();
crunching = new crunchingWav();
glassBreak = new glassBreakWav();
policeSiren = new policeSirenWav();
crash = new crashWav();
explosion = new Emitter2D();
explosion.counter = new Blast(10);
explosion.addInitializer(new ImageClass(square));
explosion.addInitializer(new ScaleImageInit(0.5, 1));
explosion.addInitializer(new ColorInit(4294967295, 4294927872));
explosion.addInitializer(new Velocity(new DiscZone(new Point(0, 0), 200, 120)));
explosion.addInitializer(new Lifetime(1));
explosion.addAction(new Age(Quadratic.easeIn));
explosion.addAction(new Move());
explosion.addAction(new Fade());
explosion.addAction(new Accelerate(0, 500));
explosion.addAction(new LinearDrag(0.5));
explosion.addEventListener(EmitterEvent.EMITTER_EMPTY, remove, false, 0, true);
renderer = new BitmapRenderer(new Rectangle(0, 0, 640, 480));
renderer.addEmitter(explosion);
}
function frame246(){
stop();
levelName = "Task";
stage.addEventListener(Event.ENTER_FRAME, taskEat);
}
function frame247(){
stop();
levelName = "Matchsticks";
matchstickTotal = 5;
matchsticksTaken = 0;
stage.addEventListener(Event.ENTER_FRAME, matchsticksDown);
}
function frame248(){
stop();
levelName = "Memorize";
totalDudes = 6;
dudesFrame = (Math.floor((Math.random() * ((1 + totalDudes) - 1))) + 1);
dudesAnim.dudes.gotoAndStop(dudesFrame);
guessing = false;
memorizeSpeed = 40;
stage.addEventListener(Event.ENTER_FRAME, memorizeDudes);
}
function frame249(){
stop();
levelName = "Rebus";
tiles = 5;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusTenor);
}
function frame250(){
stop();
levelName = "Connect";
nodes = 4;
lines = 5;
allOff = true;
connected = 0;
player.mouseEnabled = false;
player.mouseChildren = false;
player.visible = false;
player.x = 0;
player.y = 0;
i = 0;
while (i < lines) {
this[("line" + i)].alpha = 0.1;
i++;
};
stage.addEventListener(Event.ENTER_FRAME, connectA);
}
function frame251(){
stop();
levelName = "Quiz";
stage.addEventListener(Event.ENTER_FRAME, quizCombinations);
}
function frame252(){
stop();
levelName = "Collect";
player.scaleX = 1;
player.scaleY = 1;
growFactor = 0.02;
bubblePosX = 320;
bubblePosY = 240;
speed = 5;
radius = ((player.width / 2) - ((player.width / 2) / 5));
X = ((Math.cos((j * (Math.PI / 180))) * radius) + player.x);
Y = ((Math.sin((j * (Math.PI / 180))) * radius) + player.y);
bubbleCount = 0;
bubbleTotal = 7;
collected = new Array();
i = 0;
while (i < bubbleTotal) {
this[("bubble" + i)].scaleX = 0.5;
this[("bubble" + i)].scaleY = 0.5;
this[("bubble" + i)].alpha = 1;
this[("bubble" + k)].rotation = 0;
collected[i] = false;
this[("bubble" + i)].visible = true;
i++;
};
stage.addEventListener(Event.ENTER_FRAME, collectA);
}
function frame253(){
stop();
levelName = "Rebus";
tiles = 6;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusBowTie);
}
function frame254(){
stop();
levelName = "Logic";
clockA.handSmall.rotation = 0;
clockA.handBig.rotation = 180;
clockA.mouth.rotation = 0;
clockB.handSmall.rotation = 90;
clockB.handBig.rotation = 90;
clockB.mouth.rotation = 180;
clockC.handSmall.rotation = 180;
clockC.handBig.rotation = 0;
clockC.mouth.rotation = 0;
stage.addEventListener(Event.ENTER_FRAME, logicClocks);
}
function frame255(){
stop();
levelName = "Find";
draggingTrack = false;
myRectangle = new Rectangle(-80, -1460, -1280, 1460);
stage.addEventListener(Event.ENTER_FRAME, findHidenseek);
}
function frame256(){
stop();
levelName = "Comic";
organized = false;
comicMoveLeft = false;
comicMoveRight = false;
comicSpeed = 8;
hitmapLeft.visible = false;
hitmapRight.visible = true;
stage.addEventListener(Event.ENTER_FRAME, comicBrainsVsBrawn);
}
function frame257(){
stop();
levelName = "Rebus";
tiles = 6;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusRedSea);
}
function frame258(){
stop();
levelName = "Code";
overlay.mouseEnabled = false;
overlay.mouseChildren = false;
picture0.ghostie.eye0.gotoAndStop(1);
picture0.ghostie.eye1.gotoAndStop(1);
picture0.ghostie.eye2.gotoAndStop(1);
picture1.ghostie.eye0.gotoAndStop(1);
picture1.ghostie.eye1.gotoAndStop(1);
picture1.ghostie.eye2.gotoAndStop(2);
picture2.ghostie.eye0.gotoAndStop(1);
picture2.ghostie.eye1.gotoAndStop(2);
picture2.ghostie.eye2.gotoAndStop(2);
picture3.ghostie.eye0.gotoAndStop(2);
picture3.ghostie.eye1.gotoAndStop(2);
picture3.ghostie.eye2.gotoAndStop(2);
digitA = 0;
digitB = 0;
digitC = 0;
digitD = 0;
if (picture0.ghostie.eye0.currentFrame == 1){
digitA++;
};
if (picture0.ghostie.eye1.currentFrame == 1){
digitA++;
};
if (picture0.ghostie.eye2.currentFrame == 1){
digitA++;
};
if (picture1.ghostie.eye0.currentFrame == 1){
digitB++;
};
if (picture1.ghostie.eye1.currentFrame == 1){
digitB++;
};
if (picture1.ghostie.eye2.currentFrame == 1){
digitB++;
};
if (picture2.ghostie.eye0.currentFrame == 1){
digitC++;
};
if (picture2.ghostie.eye1.currentFrame == 1){
digitC++;
};
if (picture2.ghostie.eye2.currentFrame == 1){
digitC++;
};
if (picture3.ghostie.eye0.currentFrame == 1){
digitD++;
};
if (picture3.ghostie.eye1.currentFrame == 1){
digitD++;
};
if (picture3.ghostie.eye2.currentFrame == 1){
digitD++;
};
combination = ((((((digitA + "") + digitB) + "") + digitC) + "") + digitD);
doorOpen = false;
chars = 0;
stage.addEventListener(Event.ENTER_FRAME, codeEyes);
}
function frame259(){
stop();
levelName = "Task";
overlay.mouseEnabled = false;
overlay.mouseChildren = false;
draggingBus = false;
draggingCar = false;
draggingJet = false;
draggingDude = false;
eatenBus = false;
eatenCar = false;
eatenJet = false;
eatenDude = false;
stage.addEventListener(Event.ENTER_FRAME, taskFeed);
}
function frame260(){
stop();
levelName = "Matchsticks";
matchstickTotal = 12;
matchsticksTaken = 0;
stage.addEventListener(Event.ENTER_FRAME, matchsticksLove);
}
function frame261(){
stop();
levelName = "Memorize";
lightbulbCount = 9;
lightbulbFrame = (Math.floor((Math.random() * ((1 + 4) - 1))) + 1);
lightbulbAnim.lightbulbs.gotoAndStop(lightbulbFrame);
guessing = false;
memorizeSpeed = 40;
stage.addEventListener(Event.ENTER_FRAME, memorizeLightbulbs);
}
function frame262(){
stop();
levelName = "Rebus";
tiles = 6;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusIcicle);
}
function frame263(){
stop();
levelName = "Connect";
nodes = 6;
lines = 8;
allOff = true;
connected = 0;
player.mouseEnabled = false;
player.mouseChildren = false;
player.visible = false;
player.x = 0;
player.y = 0;
i = 0;
while (i < lines) {
this[("line" + i)].alpha = 0.1;
i++;
};
stage.addEventListener(Event.ENTER_FRAME, connectB);
}
function frame264(){
stop();
levelName = "Quiz";
stage.addEventListener(Event.ENTER_FRAME, quizAddition);
}
function frame265(){
stop();
levelName = "Collect";
player.scaleX = 1;
player.scaleY = 1;
growFactor = 0.02;
bubblePosX = 320;
bubblePosY = 380;
speed = 5;
radius = ((player.width / 2) - ((player.width / 2) / 5));
X = ((Math.cos((j * (Math.PI / 180))) * radius) + player.x);
Y = ((Math.sin((j * (Math.PI / 180))) * radius) + player.y);
bubbleCount = 0;
bubbleTotal = 10;
collected = new Array();
i = 0;
while (i < bubbleTotal) {
this[("bubble" + i)].scaleX = 0.5;
this[("bubble" + i)].scaleY = 0.5;
this[("bubble" + i)].alpha = 1;
this[("bubble" + k)].rotation = 0;
collected[i] = false;
this[("bubble" + i)].visible = true;
i++;
};
stage.addEventListener(Event.ENTER_FRAME, collectB);
}
function frame266(){
stop();
levelName = "Rebus";
tiles = 7;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusIceCube);
}
function frame267(){
stop();
levelName = "Logic";
totalShapes = 4;
shapesA.shape0.gotoAndStop("circle");
shapesA.shape1.gotoAndStop("triangle");
shapesA.shape2.gotoAndStop("square");
shapesA.shape3.gotoAndStop("rectangle");
shapesB.shape0.gotoAndStop("triangle");
shapesB.shape1.gotoAndStop("square");
shapesB.shape2.gotoAndStop("rectangle");
shapesB.shape3.gotoAndStop("circle");
shapesC.shape0.gotoAndStop("square");
shapesC.shape1.gotoAndStop("rectangle");
shapesC.shape2.gotoAndStop("circle");
shapesC.shape3.gotoAndStop("triangle");
shapes.shape0.gotoAndStop("circle");
shapes.shape1.gotoAndStop("triangle");
shapes.shape2.gotoAndStop("square");
shapes.shape3.gotoAndStop("rectangle");
stage.addEventListener(Event.ENTER_FRAME, logicShapes);
}
function frame268(){
stop();
levelName = "Detail";
beastiePicked = false;
beasties = 9;
beastiesSelected = 0;
beastiePos = new Array();
beastiePos[0] = {x:140, y:100};
beastiePos[1] = {x:320, y:100};
beastiePos[2] = {x:500, y:100};
beastiePos[3] = {x:140, y:210};
beastiePos[4] = {x:320, y:210};
beastiePos[5] = {x:500, y:210};
beastiePos[6] = {x:140, y:320};
beastiePos[7] = {x:320, y:320};
beastiePos[8] = {x:500, y:320};
i = 0;
while (i < 9) {
j = Math.floor((Math.random() * beastiePos.length));
this[("beastie" + i)].x = beastiePos[j].x;
this[("beastie" + i)].y = beastiePos[j].y;
beastiePos.splice(j, 1);
i++;
};
stage.addEventListener(Event.ENTER_FRAME, detailTwins);
}
function frame269(){
stop();
levelName = "Comic";
organized = false;
comicMoveLeft = false;
comicMoveRight = false;
comicSpeed = 8;
hitmapLeft.visible = false;
hitmapRight.visible = true;
stage.addEventListener(Event.ENTER_FRAME, comicHangingOut);
}
function frame270(){
stop();
levelName = "Rebus";
tiles = 8;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusApplePie);
}
function frame271(){
stop();
levelName = "Code";
overlay.mouseEnabled = false;
overlay.mouseChildren = false;
totalComboSwitches = 4;
stage.addEventListener(Event.ENTER_FRAME, codeButtons);
}
function frame272(){
stop();
levelName = "Task";
overlay.mouseEnabled = false;
overlay.mouseChildren = false;
draggingRocky = false;
rockyX = rocky.x;
rockyY = rocky.y;
rocky.visible = true;
draggingCop = false;
copX = cop.x;
copY = cop.y;
house.chimney.cop.visible = false;
stage.addEventListener(Event.ENTER_FRAME, taskBacon);
}
function frame273(){
stop();
levelName = "Matchsticks";
matchstickTotal = 18;
matchsticksTaken = 0;
stage.addEventListener(Event.ENTER_FRAME, matchsticksTwo);
}
function frame274(){
stop();
levelName = "Memorize";
diceCount = 6;
diceProgress = 0;
guessing = false;
memorizeSpeed = 40;
stage.addEventListener(Event.ENTER_FRAME, memorizeDice);
}
function frame275(){
stop();
levelName = "Rebus";
tiles = 8;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusLionKing);
}
function frame276(){
stop();
levelName = "Connect";
nodes = 6;
lines = 10;
allOff = true;
connected = 0;
player.mouseEnabled = false;
player.mouseChildren = false;
player.visible = false;
player.x = 0;
player.y = 0;
i = 0;
while (i < lines) {
this[("line" + i)].alpha = 0.1;
i++;
};
stage.addEventListener(Event.ENTER_FRAME, connectC);
}
function frame277(){
stop();
levelName = "Quiz";
stage.addEventListener(Event.ENTER_FRAME, quizBoxes);
}
function frame278(){
stop();
levelName = "Collect";
player.scaleX = 1;
player.scaleY = 1;
growFactor = 0.02;
bubblePosX = 320;
bubblePosY = 190;
speed = 5;
radius = ((player.width / 2) - ((player.width / 2) / 5));
X = ((Math.cos((j * (Math.PI / 180))) * radius) + player.x);
Y = ((Math.sin((j * (Math.PI / 180))) * radius) + player.y);
bubbleCount = 0;
bubbleTotal = 12;
collected = new Array();
i = 0;
while (i < bubbleTotal) {
this[("bubble" + i)].scaleX = 0.5;
this[("bubble" + i)].scaleY = 0.5;
this[("bubble" + i)].alpha = 1;
this[("bubble" + k)].rotation = 0;
collected[i] = false;
this[("bubble" + i)].visible = true;
i++;
};
stage.addEventListener(Event.ENTER_FRAME, collectC);
}
function frame279(){
stop();
levelName = "Rebus";
tiles = 12;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusSixFeetUnder);
}
function frame280(){
stop();
levelName = "Logic";
leftUp = false;
rightUp = false;
alienA.eyes.rotation = 0;
alienA.nose.rotation = 180;
alienA.mouth.rotation = 0;
alienA.arm1.y = (alienA.arm1.y - 20);
alienB.eyes.rotation = 180;
alienB.nose.rotation = 0;
alienB.mouth.rotation = 180;
alienB.arm0.y = (alienB.arm0.y - 20);
alienB.arm1.y = (alienB.arm1.y - 20);
alienC.eyes.rotation = 0;
alienC.nose.rotation = 180;
alienC.mouth.rotation = 0;
alienC.arm0.y = (alienC.arm0.y - 20);
stage.addEventListener(Event.ENTER_FRAME, logicAliens);
}
function frame281(){
stop();
levelName = "Detail";
itemPicked = false;
items = 49;
lonerFrame = (Math.floor((Math.random() * ((1 + 4) - 1))) + 1);
this.gotoAndStop(lonerFrame);
stage.addEventListener(Event.ENTER_FRAME, detailLoner);
}
function frame285(){
stop();
levelName = "Comic";
organized = false;
comicMoveLeft = false;
comicMoveRight = false;
comicSpeed = 8;
hitmapLeft.visible = false;
hitmapRight.visible = true;
stage.addEventListener(Event.ENTER_FRAME, comicEnviromental);
}
function frame286(){
stop();
levelName = "Rebus";
tiles = 13;
dragging = false;
i = 0;
while (i < tiles) {
setChildIndex(this[("tile" + i)], (numChildren - 1));
i++;
};
setChildIndex(fg, (numChildren - 1));
addChild(renderer);
stage.addEventListener(Event.ENTER_FRAME, rebusOnceUponATime);
}
function frame287(){
stop();
levelName = "Code";
overlay.mouseEnabled = false;
overlay.mouseChildren = false;
totalDirs = 4;
stage.addEventListener(Event.ENTER_FRAME, codeDirs);
}
function frame288(){
stop();
SoundMixer.stopAll();
themeStinger.play();
fg.clicksText.visible = false;
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (clicks <= 250){
ranks.gotoAndStop(5);
};
if ((((clicks > 250)) && ((clicks <= 300)))){
ranks.gotoAndStop(4);
};
if ((((clicks > 300)) && ((clicks <= 350)))){
ranks.gotoAndStop(3);
};
if ((((clicks > 350)) && ((clicks <= 400)))){
ranks.gotoAndStop(2);
};
if ((((clicks > 400)) && ((clicks <= 450)))){
ranks.gotoAndStop(1);
};
finalScore = clicks;
finalScoreText.text = finalScore;
stage.removeEventListener(Event.ENTER_FRAME, myEnterFrame);
buttonMenu.addEventListener(MouseEvent.CLICK, onMenuClick);
buttonSubmit.addEventListener(MouseEvent.CLICK, onSubmitClick);
buttonLogo.addEventListener(MouseEvent.MOUSE_DOWN, onLogoClick);
stage.addEventListener(Event.ENTER_FRAME, gameWonScreen);
}
function frame289(){
stop();
fg.clicksText.visible = false;
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
stage.removeEventListener(Event.ENTER_FRAME, myEnterFrame);
buttonMenu.addEventListener(MouseEvent.CLICK, onMenuClick);
stage.addEventListener(Event.ENTER_FRAME, helpScreen);
}
function frame290(){
stop();
fg.clicksText.visible = false;
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
stage.removeEventListener(Event.ENTER_FRAME, myEnterFrame);
buttonMenu.addEventListener(MouseEvent.CLICK, onMenuClick);
stage.addEventListener(Event.ENTER_FRAME, creditsScreen);
}
function frame291(){
stop();
stage.quality = "high";
addChild(agi);
agi.showScoreboardSubmit(clicks, null, null, [{descending:false}]);
agi.initAGUI(obj);
}
function frame292(){
stop();
stage.quality = "high";
addChild(agi);
agi.showScoreboardList([{descending:false}]);
agi.initAGUI(obj);
}
}
}//package bustabrain_fla
Section 29
//monster_207 (bustabrain_fla.monster_207)
package bustabrain_fla {
import flash.display.*;
public dynamic class monster_207 extends MovieClip {
public function monster_207(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package bustabrain_fla
Section 30
//node_107 (bustabrain_fla.node_107)
package bustabrain_fla {
import flash.display.*;
public dynamic class node_107 extends MovieClip {
public function node_107(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 31
//passAnim_67 (bustabrain_fla.passAnim_67)
package bustabrain_fla {
import flash.display.*;
public dynamic class passAnim_67 extends MovieClip {
public function passAnim_67(){
addFrameScript(0, frame1, 1, frame2, 84, frame85);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame85(){
stop();
}
}
}//package bustabrain_fla
Section 32
//pauseAnim_69 (bustabrain_fla.pauseAnim_69)
package bustabrain_fla {
import flash.display.*;
public dynamic class pauseAnim_69 extends MovieClip {
public var pauseMenu:MovieClip;
public function pauseAnim_69(){
addFrameScript(0, frame1, 9, frame10, 10, frame11);
}
function frame1(){
stop();
}
function frame10(){
stop();
}
function frame11(){
play();
}
}
}//package bustabrain_fla
Section 33
//pauseGame_64 (bustabrain_fla.pauseGame_64)
package bustabrain_fla {
import flash.display.*;
public dynamic class pauseGame_64 extends MovieClip {
public var pauseGame:MovieClip;
public function pauseGame_64(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 34
//rankBubble_412 (bustabrain_fla.rankBubble_412)
package bustabrain_fla {
import flash.display.*;
public dynamic class rankBubble_412 extends MovieClip {
public function rankBubble_412(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
}
}//package bustabrain_fla
Section 35
//speaker_47 (bustabrain_fla.speaker_47)
package bustabrain_fla {
import flash.display.*;
public dynamic class speaker_47 extends MovieClip {
public var speaker:MovieClip;
public function speaker_47(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 36
//speakerOffHolder_50 (bustabrain_fla.speakerOffHolder_50)
package bustabrain_fla {
import flash.display.*;
public dynamic class speakerOffHolder_50 extends MovieClip {
public function speakerOffHolder_50(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 37
//speakerOnHolder_48 (bustabrain_fla.speakerOnHolder_48)
package bustabrain_fla {
import flash.display.*;
public dynamic class speakerOnHolder_48 extends MovieClip {
public function speakerOnHolder_48(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 38
//symbolPauseGameHolder_65 (bustabrain_fla.symbolPauseGameHolder_65)
package bustabrain_fla {
import flash.display.*;
public dynamic class symbolPauseGameHolder_65 extends MovieClip {
public function symbolPauseGameHolder_65(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 39
//tileF_356 (bustabrain_fla.tileF_356)
package bustabrain_fla {
import flash.display.*;
public dynamic class tileF_356 extends MovieClip {
public function tileF_356(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package bustabrain_fla
Section 40
//tileI_135 (bustabrain_fla.tileI_135)
package bustabrain_fla {
import flash.display.*;
public dynamic class tileI_135 extends MovieClip {
public function tileI_135(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package bustabrain_fla
Section 41
//tileL_236 (bustabrain_fla.tileL_236)
package bustabrain_fla {
import flash.display.*;
public dynamic class tileL_236 extends MovieClip {
public function tileL_236(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 42
//window_302 (bustabrain_fla.window_302)
package bustabrain_fla {
import flash.display.*;
public dynamic class window_302 extends MovieClip {
public function window_302(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package bustabrain_fla
Section 43
//Action (org.flintparticles.common.actions.Action)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.behaviours.*;
public interface Action extends Behaviour {
function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void;
}
}//package org.flintparticles.common.actions
Section 44
//ActionBase (org.flintparticles.common.actions.ActionBase)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class ActionBase implements Action {
protected var _priority:int;// = 0
public function set priority(_arg1:int):void{
_priority = _arg1;
}
public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
}
public function removedFromEmitter(_arg1:Emitter):void{
}
public function addedToEmitter(_arg1:Emitter):void{
}
public function get priority():int{
return (_priority);
}
}
}//package org.flintparticles.common.actions
Section 45
//Age (org.flintparticles.common.actions.Age)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.energyEasing.*;
public class Age extends ActionBase {
private var _easing:Function;
public function Age(_arg1:Function=null){
if (_arg1 == null){
_easing = Linear.easeNone;
} else {
_easing = _arg1;
};
}
public function set easing(_arg1:Function):void{
_easing = _arg1;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
_arg2.age = (_arg2.age + _arg3);
if (_arg2.age >= _arg2.lifetime){
_arg2.energy = 0;
_arg2.isDead = true;
} else {
_arg2.energy = _easing(_arg2.age, _arg2.lifetime);
};
}
public function get easing():Function{
return (_easing);
}
}
}//package org.flintparticles.common.actions
Section 46
//Fade (org.flintparticles.common.actions.Fade)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class Fade extends ActionBase {
private var _endAlpha:Number;
private var _diffAlpha:Number;
public function Fade(_arg1:Number=1, _arg2:Number=0){
priority = -5;
_diffAlpha = (_arg1 - _arg2);
_endAlpha = _arg2;
}
public function get endAlpha():Number{
return (_endAlpha);
}
public function set endAlpha(_arg1:Number):void{
_diffAlpha = ((_endAlpha + _diffAlpha) - _arg1);
_endAlpha = _arg1;
}
public function set startAlpha(_arg1:Number):void{
_diffAlpha = (_arg1 - _endAlpha);
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Number = (_endAlpha + (_diffAlpha * _arg2.energy));
_arg2.color = ((_arg2.color & 0xFFFFFF) | (Math.round((_local4 * 0xFF)) << 24));
}
public function get startAlpha():Number{
return ((_endAlpha + _diffAlpha));
}
}
}//package org.flintparticles.common.actions
Section 47
//Activity (org.flintparticles.common.activities.Activity)
package org.flintparticles.common.activities {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.behaviours.*;
public interface Activity extends Behaviour {
function initialize(_arg1:Emitter):void;
function update(_arg1:Emitter, _arg2:Number):void;
}
}//package org.flintparticles.common.activities
Section 48
//Behaviour (org.flintparticles.common.behaviours.Behaviour)
package org.flintparticles.common.behaviours {
import org.flintparticles.common.emitters.*;
public interface Behaviour {
function set priority(_arg1:int):void;
function addedToEmitter(_arg1:Emitter):void;
function get priority():int;
function removedFromEmitter(_arg1:Emitter):void;
}
}//package org.flintparticles.common.behaviours
Section 49
//BehaviourArrayUtils (org.flintparticles.common.behaviours.BehaviourArrayUtils)
package org.flintparticles.common.behaviours {
public class BehaviourArrayUtils {
public static function add(_arg1:Array, _arg2:Behaviour):uint{
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
if (Behaviour(_arg1[_local4]).priority < _arg2.priority){
break;
};
_local4++;
};
_arg1.splice(_local4, 0, _arg2);
return ((_local3 + 1));
}
public static function remove(_arg1:Array, _arg2:Behaviour):Boolean{
var _local3:int = _arg1.indexOf(_arg2);
if (_local3 != -1){
_arg1.splice(_local3, 1);
return (true);
};
return (false);
}
public static function removeAt(_arg1:Array, _arg2:uint):Behaviour{
var _local3:Behaviour = (_arg1[_arg2] as Behaviour);
_arg1.splice(_arg2, 1);
return (_local3);
}
public static function containsType(_arg1:Array, _arg2:Class):Boolean{
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
if ((_arg1[_local4] is _arg2)){
return (true);
};
_local4++;
};
return (false);
}
public static function sortArray(_arg1:Array):void{
_arg1.sortOn("priority", Array.NUMERIC);
}
public static function clear(_arg1:Array):void{
_arg1.length = 0;
}
public static function contains(_arg1:Array, _arg2:Behaviour):Boolean{
return (!((_arg1.indexOf(_arg2) == -1)));
}
}
}//package org.flintparticles.common.behaviours
Section 50
//Blast (org.flintparticles.common.counters.Blast)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public class Blast implements Counter {
private var _done:Boolean;// = false
private var _startCount:uint;
public function Blast(_arg1:uint=0){
_startCount = _arg1;
}
public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{
return (0);
}
public function startEmitter(_arg1:Emitter):uint{
_done = true;
_arg1.dispatchCounterComplete();
return (_startCount);
}
public function resume():void{
}
public function stop():void{
}
public function get startCount():Number{
return (_startCount);
}
public function get complete():Boolean{
return (_done);
}
public function set startCount(_arg1:Number):void{
_startCount = _arg1;
}
}
}//package org.flintparticles.common.counters
Section 51
//Counter (org.flintparticles.common.counters.Counter)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public interface Counter {
function stop():void;
function updateEmitter(_arg1:Emitter, _arg2:Number):uint;
function get complete():Boolean;
function startEmitter(_arg1:Emitter):uint;
function resume():void;
}
}//package org.flintparticles.common.counters
Section 52
//ZeroCounter (org.flintparticles.common.counters.ZeroCounter)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public class ZeroCounter implements Counter {
public function get complete():Boolean{
return (true);
}
public function stop():void{
}
public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{
return (0);
}
public function startEmitter(_arg1:Emitter):uint{
return (0);
}
public function resume():void{
}
}
}//package org.flintparticles.common.counters
Section 53
//Emitter (org.flintparticles.common.emitters.Emitter)
package org.flintparticles.common.emitters {
import org.flintparticles.common.particles.*;
import org.flintparticles.common.behaviours.*;
import flash.events.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.activities.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.events.*;
import org.flintparticles.common.utils.*;
public class Emitter extends EventDispatcher {
protected var _running:Boolean;// = false
protected var _activities:Array;
protected var _particles:Array;
protected var _initializers:Array;
protected var _dispatchCounterComplete:Boolean;// = false
protected var _counter:Counter;
protected var _started:Boolean;// = false
protected var _actions:Array;
protected var _useInternalTick:Boolean;// = true
protected var _particleFactory:ParticleFactory;
protected var _fixedFrameTime:Number;// = 0
protected var _maximumFrameTime:Number;// = 0.1
public function Emitter(){
_particles = new Array();
_actions = new Array();
_initializers = new Array();
_activities = new Array();
_counter = new ZeroCounter();
}
public function addInitializer(_arg1:Initializer):void{
BehaviourArrayUtils.add(_initializers, _arg1);
_arg1.addedToEmitter(this);
}
public function stop():void{
if (_useInternalTick){
FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, updateEventListener);
};
_started = false;
_running = false;
killAllParticles();
}
public function pause():void{
_running = false;
}
public function killAllParticles():void{
var _local1:int = _particles.length;
var _local2:int;
while (_local2 < _local1) {
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _particles[_local2]));
_particleFactory.disposeParticle(_particles[_local2]);
_local2++;
};
_particles.length = 0;
}
public function runAhead(_arg1:Number, _arg2:Number=10):void{
var _local3:Number = _maximumFrameTime;
var _local4:Number = (1 / _arg2);
_maximumFrameTime = _local4;
while (_arg1 > 0) {
_arg1 = (_arg1 - _local4);
update(_local4);
};
_maximumFrameTime = _local3;
}
public function set fixedFrameTime(_arg1:Number):void{
_fixedFrameTime = _arg1;
}
public function get maximumFrameTime():Number{
return (_maximumFrameTime);
}
public function set particles(_arg1:Array):void{
killAllParticles();
addExistingParticles(_arg1, false);
}
public function get useInternalTick():Boolean{
return (_useInternalTick);
}
public function set initializers(_arg1:Array):void{
var _local2:Initializer;
for each (_local2 in _initializers) {
_local2.removedFromEmitter(this);
};
_initializers = _arg1.slice();
BehaviourArrayUtils.sortArray(_initializers);
for each (_local2 in _arg1) {
_local2.addedToEmitter(this);
};
}
public function get particleFactory():ParticleFactory{
return (_particleFactory);
}
private function updateEventListener(_arg1:UpdateEvent):void{
if (_fixedFrameTime){
update(_fixedFrameTime);
} else {
update(_arg1.time);
};
}
protected function createParticle():Particle{
var _local1:Particle = _particleFactory.createParticle();
var _local2:int = _initializers.length;
initParticle(_local1);
var _local3:int;
while (_local3 < _local2) {
Initializer(_initializers[_local3]).initialize(this, _local1);
_local3++;
};
_particles.push(_local1);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_CREATED, _local1));
return (_local1);
}
public function get particles():Array{
return (_particles);
}
protected function sortParticles():void{
}
public function removeActivity(_arg1:Activity):void{
if (BehaviourArrayUtils.remove(_activities, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function set maximumFrameTime(_arg1:Number):void{
_maximumFrameTime = _arg1;
}
protected function initParticle(_arg1:Particle):void{
}
public function addAction(_arg1:Action):void{
BehaviourArrayUtils.add(_actions, _arg1);
_arg1.addedToEmitter(this);
}
public function hasInitializerOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_initializers, _arg1));
}
public function removeInitializer(_arg1:Initializer):void{
if (BehaviourArrayUtils.remove(_initializers, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function get running():Boolean{
return (_running);
}
public function hasActionOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_actions, _arg1));
}
public function get fixedFrameTime():Number{
return (_fixedFrameTime);
}
public function set particleFactory(_arg1:ParticleFactory):void{
_particleFactory = _arg1;
}
public function set useInternalTick(_arg1:Boolean):void{
if (_useInternalTick != _arg1){
_useInternalTick = _arg1;
if (_started){
if (_useInternalTick){
FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, updateEventListener, false, 0, true);
} else {
FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, updateEventListener);
};
};
};
}
public function resume():void{
_running = true;
}
public function addActivity(_arg1:Activity):void{
BehaviourArrayUtils.add(_activities, _arg1);
_arg1.addedToEmitter(this);
}
public function get initializers():Array{
return (_initializers);
}
public function addExistingParticles(_arg1:Array, _arg2:Boolean=false):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local3:int = _arg1.length;
if (_arg2){
_local5 = _initializers.length;
_local6 = 0;
while (_local6 < _local5) {
_local4 = 0;
while (_local4 < _local3) {
Initializer(_initializers[_local6]).initialize(this, _arg1[_local4]);
_local4++;
};
_local6++;
};
};
_local4 = 0;
while (_local4 < _local3) {
_particles.push(_arg1[_local4]);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_ADDED, _arg1[_local4]));
_local4++;
};
}
public function hasActivityOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_activities, _arg1));
}
public function set activities(_arg1:Array):void{
var _local2:Activity;
for each (_local2 in _activities) {
_local2.removedFromEmitter(this);
};
_activities = _arg1.slice();
BehaviourArrayUtils.sortArray(_activities);
for each (_local2 in _activities) {
_local2.addedToEmitter(this);
};
}
public function hasInitializer(_arg1:Initializer):Boolean{
return (BehaviourArrayUtils.contains(_initializers, _arg1));
}
public function removeAction(_arg1:Action):void{
if (BehaviourArrayUtils.remove(_actions, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function hasActivity(_arg1:Activity):Boolean{
return (BehaviourArrayUtils.contains(_activities, _arg1));
}
public function get activities():Array{
return (_activities);
}
public function hasAction(_arg1:Action):Boolean{
return (BehaviourArrayUtils.contains(_actions, _arg1));
}
public function start():void{
if (_useInternalTick){
FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, updateEventListener, false, 0, true);
};
_started = true;
_running = true;
var _local1:int = _activities.length;
var _local2:int;
while (_local2 < _local1) {
Activity(_activities[_local2]).initialize(this);
_local2++;
};
_local1 = _counter.startEmitter(this);
_local2 = 0;
while (_local2 < _local1) {
createParticle();
_local2++;
};
}
public function update(_arg1:Number):void{
var _local2:int;
var _local3:Particle;
var _local5:Action;
var _local6:int;
var _local7:int;
if (!_running){
return;
};
if (_arg1 > _maximumFrameTime){
_arg1 = _maximumFrameTime;
};
var _local4:int = _counter.updateEmitter(this, _arg1);
_local2 = 0;
while (_local2 < _local4) {
createParticle();
_local2++;
};
sortParticles();
_local4 = _activities.length;
_local2 = 0;
while (_local2 < _local4) {
Activity(_activities[_local2]).update(this, _arg1);
_local2++;
};
if (_particles.length > 0){
_local4 = _actions.length;
_local6 = _particles.length;
_local7 = 0;
while (_local7 < _local4) {
_local5 = _actions[_local7];
_local2 = 0;
while (_local2 < _local6) {
_local3 = _particles[_local2];
_local5.update(this, _local3, _arg1);
_local2++;
};
_local7++;
};
_local2 = _local6;
while (_local2--) {
_local3 = _particles[_local2];
if (_local3.isDead){
_particles.splice(_local2, 1);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _local3));
if (_local3.isDead){
_particleFactory.disposeParticle(_local3);
};
};
};
} else {
dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_EMPTY));
};
dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_UPDATED));
if (_dispatchCounterComplete){
_dispatchCounterComplete = false;
dispatchEvent(new EmitterEvent(EmitterEvent.COUNTER_COMPLETE));
};
}
public function set counter(_arg1:Counter):void{
_counter = _arg1;
if (running){
_counter.startEmitter(this);
};
}
public function set actions(_arg1:Array):void{
var _local2:Action;
for each (_local2 in _actions) {
_local2.removedFromEmitter(this);
};
_actions = _arg1.slice();
BehaviourArrayUtils.sortArray(_actions);
for each (_local2 in _arg1) {
_local2.addedToEmitter(this);
};
}
public function dispatchCounterComplete():void{
_dispatchCounterComplete = true;
}
public function get counter():Counter{
return (_counter);
}
public function get actions():Array{
return (_actions);
}
}
}//package org.flintparticles.common.emitters
Section 54
//Linear (org.flintparticles.common.energyEasing.Linear)
package org.flintparticles.common.energyEasing {
public class Linear {
public static function easeOut(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeIn(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeInOut(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeNone(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
}
}//package org.flintparticles.common.energyEasing
Section 55
//Quadratic (org.flintparticles.common.energyEasing.Quadratic)
package org.flintparticles.common.energyEasing {
public class Quadratic {
public static function easeOut(_arg1:Number, _arg2:Number):Number{
_arg1 = (1 - (_arg1 / _arg2));
return ((_arg1 * _arg1));
}
public static function easeIn(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 / _arg2);
return ((1 - (_arg1 * _arg1)));
}
public static function easeInOut(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 / (_arg2 * 0.5));
if (_arg1 < 1){
return ((1 - ((_arg1 * _arg1) * 0.5)));
};
_arg1 = (_arg1 - 2);
return (((_arg1 * _arg1) * 0.5));
}
}
}//package org.flintparticles.common.energyEasing
Section 56
//EmitterEvent (org.flintparticles.common.events.EmitterEvent)
package org.flintparticles.common.events {
import flash.events.*;
public class EmitterEvent extends Event {
public static var COUNTER_COMPLETE:String = "counterComplete";
public static var EMITTER_UPDATED:String = "emitterUpdated";
public static var EMITTER_EMPTY:String = "emitterEmpty";
public function EmitterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package org.flintparticles.common.events
Section 57
//ParticleEvent (org.flintparticles.common.events.ParticleEvent)
package org.flintparticles.common.events {
import org.flintparticles.common.particles.*;
import flash.events.*;
public class ParticleEvent extends Event {
public var particle:Particle;
public var otherObject;
public static var PARTICLES_COLLISION:String = "particlesCollision";
public static var BOUNDING_BOX_COLLISION:String = "boundingBoxCollision";
public static var PARTICLE_ADDED:String = "particleAdded";
public static var PARTICLE_CREATED:String = "particleCreated";
public static var PARTICLE_DEAD:String = "particleDead";
public static var ZONE_COLLISION:String = "zoneCollision";
public function ParticleEvent(_arg1:String, _arg2:Particle=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.particle = _arg2;
}
override public function clone():Event{
var _local1:ParticleEvent = new ParticleEvent(type, particle, bubbles, cancelable);
_local1.otherObject = otherObject;
return (_local1);
}
}
}//package org.flintparticles.common.events
Section 58
//UpdateEvent (org.flintparticles.common.events.UpdateEvent)
package org.flintparticles.common.events {
import flash.events.*;
public class UpdateEvent extends Event {
public var time:Number;
public static var UPDATE:String = "update";
public function UpdateEvent(_arg1:String, _arg2:Number=NaN, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.time = _arg2;
}
override public function clone():Event{
return (new UpdateEvent(type, time, bubbles, cancelable));
}
}
}//package org.flintparticles.common.events
Section 59
//ColorInit (org.flintparticles.common.initializers.ColorInit)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.utils.*;
public class ColorInit extends InitializerBase {
private var _max:uint;
private var _min:uint;
public function ColorInit(_arg1:uint=0xFFFFFF, _arg2:uint=0xFFFFFF){
_min = _arg1;
_max = _arg2;
}
public function set minColor(_arg1:uint):void{
_min = _arg1;
}
public function get color():uint{
return (((_min == _max)) ? _min : interpolateColors(_max, _min, 0.5));
}
public function set color(_arg1:uint):void{
_max = (_min = _arg1);
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
if (_max == _min){
_arg2.color = _min;
} else {
_arg2.color = interpolateColors(_min, _max, Math.random());
};
}
public function get minColor():uint{
return (_min);
}
public function set maxColor(_arg1:uint):void{
_max = _arg1;
}
public function get maxColor():uint{
return (_max);
}
}
}//package org.flintparticles.common.initializers
Section 60
//ImageClass (org.flintparticles.common.initializers.ImageClass)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.utils.*;
public class ImageClass extends InitializerBase {
private var _parameters:Array;
private var _imageClass:Class;
public function ImageClass(_arg1:Class=null, ... _args){
_imageClass = _arg1;
_parameters = _args;
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
_arg2.image = construct(_imageClass, _parameters);
}
public function get parameters():Array{
return (_parameters);
}
public function set parameters(_arg1:Array):void{
_parameters = _arg1;
}
public function set imageClass(_arg1:Class):void{
_imageClass = _arg1;
}
public function get imageClass():Class{
return (_imageClass);
}
}
}//package org.flintparticles.common.initializers
Section 61
//Initializer (org.flintparticles.common.initializers.Initializer)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.behaviours.*;
public interface Initializer extends Behaviour {
function initialize(_arg1:Emitter, _arg2:Particle):void;
}
}//package org.flintparticles.common.initializers
Section 62
//InitializerBase (org.flintparticles.common.initializers.InitializerBase)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class InitializerBase implements Initializer {
protected var _priority:int;// = 0
public function set priority(_arg1:int):void{
_priority = _arg1;
}
public function initialize(_arg1:Emitter, _arg2:Particle):void{
}
public function removedFromEmitter(_arg1:Emitter):void{
}
public function addedToEmitter(_arg1:Emitter):void{
}
public function get priority():int{
return (_priority);
}
}
}//package org.flintparticles.common.initializers
Section 63
//Lifetime (org.flintparticles.common.initializers.Lifetime)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class Lifetime extends InitializerBase {
private var _max:Number;
private var _min:Number;
public function Lifetime(_arg1:Number=1.79769313486232E308, _arg2:Number=NaN){
_max = _arg2;
_min = _arg1;
}
public function get lifetime():Number{
return (((_min == _max)) ? _min : ((_max + _min) * 0.5));
}
public function get maxLifetime():Number{
return (_max);
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
if (isNaN(_max)){
_arg2.lifetime = _min;
} else {
_arg2.lifetime = (_min + (Math.random() * (_max - _min)));
};
}
public function set lifetime(_arg1:Number):void{
_max = (_min = _arg1);
}
public function set minLifetime(_arg1:Number):void{
_min = _arg1;
}
public function set maxLifetime(_arg1:Number):void{
_max = _arg1;
}
public function get minLifetime():Number{
return (_min);
}
}
}//package org.flintparticles.common.initializers
Section 64
//ScaleImageInit (org.flintparticles.common.initializers.ScaleImageInit)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class ScaleImageInit extends InitializerBase {
private var _max:Number;
private var _min:Number;
public function ScaleImageInit(_arg1:Number=1, _arg2:Number=NaN){
_min = _arg1;
if (isNaN(_arg2)){
_max = _min;
} else {
_max = _arg2;
};
}
public function get scale():Number{
return (((_min == _max)) ? _min : ((_max + _min) / 2));
}
public function set maxScale(_arg1:Number):void{
_max = _arg1;
}
public function get maxScale():Number{
return (_max);
}
public function set minScale(_arg1:Number):void{
_min = _arg1;
}
public function set scale(_arg1:Number):void{
_max = (_min = _arg1);
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
if (_max == _min){
_arg2.scale = _min;
} else {
_arg2.scale = (_min + (Math.random() * (_max - _min)));
};
}
public function get minScale():Number{
return (_min);
}
}
}//package org.flintparticles.common.initializers
Section 65
//Particle (org.flintparticles.common.particles.Particle)
package org.flintparticles.common.particles {
import flash.geom.*;
import flash.utils.*;
public class Particle {
public var energy:Number;// = 1
public var lifetime:Number;// = 0
public var scale:Number;// = 1
public var image;// = null
public var color:uint;// = 4294967295
public var collisionRadius:Number;// = 1
private var _colorTransform:ColorTransform;// = null
private var _previousColor:uint;
public var isDead:Boolean;// = false
public var mass:Number;// = 1
private var _dictionary:Dictionary;// = null
public var age:Number;// = 0
public function revive():void{
lifetime = 0;
age = 0;
energy = 1;
isDead = false;
}
public function get dictionary():Dictionary{
if (_dictionary == null){
_dictionary = new Dictionary(true);
};
return (_dictionary);
}
public function get colorTransform():ColorTransform{
if (((!(_colorTransform)) || (!((_previousColor == color))))){
_colorTransform = new ColorTransform((((color >>> 16) & 0xFF) / 0xFF), (((color >>> 8) & 0xFF) / 0xFF), ((color & 0xFF) / 0xFF), (((color >>> 24) & 0xFF) / 0xFF), 0, 0, 0, 0);
_previousColor = color;
};
return (_colorTransform);
}
protected function cloneInto(_arg1:Particle):Particle{
var _local2:Object;
_arg1.color = color;
_arg1.scale = scale;
_arg1.mass = mass;
_arg1.collisionRadius = collisionRadius;
_arg1.lifetime = lifetime;
_arg1.age = age;
_arg1.energy = energy;
_arg1.isDead = isDead;
_arg1.image = image;
if (_dictionary){
_arg1._dictionary = new Dictionary(true);
for (_local2 in _dictionary) {
_arg1._dictionary[_local2] = _dictionary[_local2];
};
};
return (_arg1);
}
public function get alpha():Number{
return ((((color & 4278190080) >>> 24) / 0xFF));
}
public function initialize():void{
color = 4294967295;
scale = 1;
mass = 1;
collisionRadius = 1;
lifetime = 0;
age = 0;
energy = 1;
isDead = false;
image = null;
_dictionary = null;
_colorTransform = null;
}
public function clone(_arg1:ParticleFactory=null):Particle{
var _local2:Particle;
if (_arg1){
_local2 = _arg1.createParticle();
} else {
_local2 = new Particle();
};
return (cloneInto(_local2));
}
}
}//package org.flintparticles.common.particles
Section 66
//ParticleFactory (org.flintparticles.common.particles.ParticleFactory)
package org.flintparticles.common.particles {
public interface ParticleFactory {
function clearAllParticles():void;
function createParticle():Particle;
function disposeParticle(_arg1:Particle):void;
}
}//package org.flintparticles.common.particles
Section 67
//Renderer (org.flintparticles.common.renderers.Renderer)
package org.flintparticles.common.renderers {
import org.flintparticles.common.emitters.*;
public interface Renderer {
function removeEmitter(_arg1:Emitter):void;
function addEmitter(_arg1:Emitter):void;
}
}//package org.flintparticles.common.renderers
Section 68
//SpriteRendererBase (org.flintparticles.common.renderers.SpriteRendererBase)
package org.flintparticles.common.renderers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import flash.events.*;
import org.flintparticles.common.events.*;
import flash.display.*;
public class SpriteRendererBase extends Sprite implements Renderer {
protected var _emitters:Array;
public function SpriteRendererBase(){
_emitters = new Array();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, addedToStage, false, 0, true);
}
private function particleAdded(_arg1:ParticleEvent):void{
addParticle(_arg1.particle);
if (stage){
stage.invalidate();
};
}
public function set emitters(_arg1:Array):void{
var _local2:Emitter;
for each (_local2 in _emitters) {
removeEmitter(_local2);
};
for each (_local2 in _arg1) {
addEmitter(_local2);
};
}
private function addedToStage(_arg1:Event):void{
if (stage){
stage.invalidate();
};
}
public function get emitters():Array{
return (_emitters);
}
protected function addParticle(_arg1:Particle):void{
}
protected function updateParticles(_arg1:Event):void{
var _local2:Array = new Array();
var _local3:int;
while (_local3 < _emitters.length) {
_local2 = _local2.concat(Emitter(_emitters[_local3]).particles);
_local3++;
};
renderParticles(_local2);
}
protected function emitterUpdated(_arg1:EmitterEvent):void{
if (stage){
stage.invalidate();
};
}
public function removeEmitter(_arg1:Emitter):void{
var _local3:Particle;
var _local2:int;
while (_local2 < _emitters.length) {
if (_emitters[_local2] == _arg1){
_emitters.splice(_local2, 1);
_arg1.removeEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated);
_arg1.removeEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded);
_arg1.removeEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded);
_arg1.removeEventListener(ParticleEvent.PARTICLE_DEAD, particleRemoved);
for each (_local3 in _arg1.particles) {
removeParticle(_local3);
};
if (_emitters.length == 0){
removeEventListener(Event.RENDER, updateParticles);
renderParticles([]);
} else {
if (stage){
stage.invalidate();
};
};
return;
};
_local2++;
};
}
protected function renderParticles(_arg1:Array):void{
}
protected function removeParticle(_arg1:Particle):void{
}
private function particleRemoved(_arg1:ParticleEvent):void{
removeParticle(_arg1.particle);
if (stage){
stage.invalidate();
};
}
public function addEmitter(_arg1:Emitter):void{
var _local2:Particle;
_emitters.push(_arg1);
if (stage){
stage.invalidate();
};
_arg1.addEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_DEAD, particleRemoved, false, 0, true);
for each (_local2 in _arg1.particles) {
addParticle(_local2);
};
if (_emitters.length == 1){
addEventListener(Event.RENDER, updateParticles, false, 0, true);
};
}
}
}//package org.flintparticles.common.renderers
Section 69
//construct (org.flintparticles.common.utils.construct)
package org.flintparticles.common.utils {
public function construct(_arg1:Class, _arg2:Array){
switch (_arg2.length){
case 0:
return (new (_arg1));
case 1:
return (new _arg1(_arg2[0]));
case 2:
return (new _arg1(_arg2[0], _arg2[1]));
case 3:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2]));
case 4:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3]));
case 5:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4]));
case 6:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5]));
case 7:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5], _arg2[6]));
case 8:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5], _arg2[6], _arg2[7]));
case 9:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5], _arg2[6], _arg2[7], _arg2[8]));
case 10:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5], _arg2[6], _arg2[7], _arg2[8], _arg2[9]));
default:
return (null);
};
}
}//package org.flintparticles.common.utils
Section 70
//FrameUpdater (org.flintparticles.common.utils.FrameUpdater)
package org.flintparticles.common.utils {
import flash.utils.*;
import flash.events.*;
import org.flintparticles.common.events.*;
import flash.display.*;
public class FrameUpdater extends EventDispatcher {
private var _shape:Shape;
private var _running:Boolean;// = false
private var _time:Number;
private static var _instance:FrameUpdater;
public function FrameUpdater(){
_shape = new Shape();
}
private function startTimer():void{
_shape.addEventListener(Event.ENTER_FRAME, frameUpdate, false, 0, true);
_time = getTimer();
_running = true;
}
private function stopTimer():void{
_shape.removeEventListener(Event.ENTER_FRAME, frameUpdate);
_running = false;
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
if (((_running) && (!(hasEventListener(UpdateEvent.UPDATE))))){
stopTimer();
};
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
if (((!(_running)) && (hasEventListener(UpdateEvent.UPDATE)))){
startTimer();
};
}
private function frameUpdate(_arg1:Event):void{
var _local2:int = _time;
_time = getTimer();
var _local3:Number = ((_time - _local2) * 0.001);
dispatchEvent(new UpdateEvent(UpdateEvent.UPDATE, _local3));
}
public static function get instance():FrameUpdater{
if (_instance == null){
_instance = new (FrameUpdater);
};
return (_instance);
}
}
}//package org.flintparticles.common.utils
Section 71
//interpolateColors (org.flintparticles.common.utils.interpolateColors)
package org.flintparticles.common.utils {
public function interpolateColors(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number = (1 - _arg3);
var _local5:uint = Math.round(((((_arg1 >>> 16) & 0xFF) * _arg3) + (((_arg2 >>> 16) & 0xFF) * _local4)));
var _local6:uint = Math.round(((((_arg1 >>> 8) & 0xFF) * _arg3) + (((_arg2 >>> 8) & 0xFF) * _local4)));
var _local7:uint = Math.round((((_arg1 & 0xFF) * _arg3) + ((_arg2 & 0xFF) * _local4)));
var _local8:uint = Math.round(((((_arg1 >>> 24) & 0xFF) * _arg3) + (((_arg2 >>> 24) & 0xFF) * _local4)));
return (((((_local8 << 24) | (_local5 << 16)) | (_local6 << 8)) | _local7));
}
}//package org.flintparticles.common.utils
Section 72
//Maths (org.flintparticles.common.utils.Maths)
package org.flintparticles.common.utils {
public class Maths {
private static const DEGTORAD:Number = (Math.PI / 180);
private static const RADTODEG:Number = (180 / Math.PI);
public static function asRadians(_arg1:Number):Number{
return ((_arg1 * DEGTORAD));
}
public static function asDegrees(_arg1:Number):Number{
return ((_arg1 * RADTODEG));
}
}
}//package org.flintparticles.common.utils
Section 73
//Accelerate (org.flintparticles.twoD.actions.Accelerate)
package org.flintparticles.twoD.actions {
import org.flintparticles.twoD.particles.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
public class Accelerate extends ActionBase {
private var _x:Number;
private var _y:Number;
public function Accelerate(_arg1:Number=0, _arg2:Number=0){
this.x = _arg1;
this.y = _arg2;
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function get y():Number{
return (_y);
}
public function get x():Number{
return (_x);
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D;
_local4 = Particle2D(_arg2);
Particle2D(_arg2).velX = (_local4.velX + (_x * _arg3));
_local4.velY = (_local4.velY + (_y * _arg3));
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
}
}//package org.flintparticles.twoD.actions
Section 74
//LinearDrag (org.flintparticles.twoD.actions.LinearDrag)
package org.flintparticles.twoD.actions {
import org.flintparticles.twoD.particles.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
public class LinearDrag extends ActionBase {
private var _drag:Number;
public function LinearDrag(_arg1:Number=0){
this.drag = _arg1;
}
public function get drag():Number{
return (_drag);
}
public function set drag(_arg1:Number):void{
_drag = _arg1;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D = Particle2D(_arg2);
var _local5:Number = (1 - ((_drag * _arg3) / _local4.mass));
if (_local5 < 0){
_local4.velX = 0;
_local4.velY = 0;
} else {
_local4.velX = (_local4.velX * _local5);
_local4.velY = (_local4.velY * _local5);
};
}
}
}//package org.flintparticles.twoD.actions
Section 75
//Move (org.flintparticles.twoD.actions.Move)
package org.flintparticles.twoD.actions {
import org.flintparticles.twoD.particles.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
public class Move extends ActionBase {
public function Move(){
priority = -10;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D = Particle2D(_arg2);
Particle2D(_arg2).previousX = _local4.x;
_local4.previousY = _local4.y;
_local4.x = (_local4.x + (_local4.velX * _arg3));
_local4.y = (_local4.y + (_local4.velY * _arg3));
}
}
}//package org.flintparticles.twoD.actions
Section 76
//Emitter2D (org.flintparticles.twoD.emitters.Emitter2D)
package org.flintparticles.twoD.emitters {
import org.flintparticles.twoD.particles.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.utils.*;
public class Emitter2D extends Emitter {
protected var _y:Number;// = 0
public var spaceSort:Boolean;// = false
public var spaceSortedX:Array;
protected var _x:Number;// = 0
protected var _rotation:Number;// = 0
protected static var _creator:ParticleCreator2D = new ParticleCreator2D();
public function Emitter2D(){
_particleFactory = _creator;
}
public function get y():Number{
return (_y);
}
override protected function initParticle(_arg1:Particle):void{
var _local2:Particle2D = Particle2D(_arg1);
_local2.x = _x;
_local2.y = _y;
_local2.previousX = _x;
_local2.previousY = _y;
_local2.rotation = _rotation;
}
override protected function sortParticles():void{
var _local1:int;
var _local2:int;
if (spaceSort){
spaceSortedX = _particles.sortOn("x", (Array.NUMERIC | Array.RETURNINDEXEDARRAY));
_local1 = _particles.length;
_local2 = 0;
while (_local2 < _local1) {
Particle2D(_particles[spaceSortedX[_local2]]).sortID = _local2;
_local2++;
};
};
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function set rotRadians(_arg1:Number):void{
_rotation = _arg1;
}
public function get x():Number{
return (_x);
}
public function get rotRadians():Number{
return (_rotation);
}
public function set rotation(_arg1:Number):void{
_rotation = Maths.asRadians(_arg1);
}
public function get rotation():Number{
return (Maths.asDegrees(_rotation));
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
public static function get defaultParticleFactory():ParticleFactory{
return (_creator);
}
}
}//package org.flintparticles.twoD.emitters
Section 77
//Velocity (org.flintparticles.twoD.initializers.Velocity)
package org.flintparticles.twoD.initializers {
import flash.geom.*;
import org.flintparticles.twoD.particles.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.twoD.zones.*;
public class Velocity extends InitializerBase {
private var _zone:Zone2D;
public function Velocity(_arg1:Zone2D=null){
this.zone = _arg1;
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
var _local5:Number;
var _local6:Number;
var _local3:Particle2D = Particle2D(_arg2);
var _local4:Point = _zone.getLocation();
if (_local3.rotation == 0){
_local3.velX = _local4.x;
_local3.velY = _local4.y;
} else {
_local5 = Math.sin(_local3.rotation);
_local6 = Math.cos(_local3.rotation);
_local3.velX = ((_local6 * _local4.x) - (_local5 * _local4.y));
_local3.velY = ((_local6 * _local4.y) + (_local5 * _local4.x));
};
}
public function set zone(_arg1:Zone2D):void{
_zone = _arg1;
}
public function get zone():Zone2D{
return (_zone);
}
}
}//package org.flintparticles.twoD.initializers
Section 78
//Particle2D (org.flintparticles.twoD.particles.Particle2D)
package org.flintparticles.twoD.particles {
import flash.geom.*;
import org.flintparticles.common.particles.*;
public class Particle2D extends Particle {
public var y:Number;// = 0
public var previousX:Number;// = 0
public var previousY:Number;// = 0
private var _previousRadius:Number;
public var angVelocity:Number;// = 0
public var velX:Number;// = 0
public var velY:Number;// = 0
private var _previousMass:Number;
public var x:Number;// = 0
public var sortID:int;// = -1
private var _inertia:Number;
public var rotation:Number;// = 0
override public function clone(_arg1:ParticleFactory=null):Particle{
var _local2:Particle2D;
if (_arg1){
_local2 = (_arg1.createParticle() as Particle2D);
} else {
_local2 = new Particle2D();
};
cloneInto(_local2);
_local2.x = x;
_local2.y = y;
_local2.velX = velX;
_local2.velY = velY;
_local2.rotation = rotation;
_local2.angVelocity = angVelocity;
return (_local2);
}
override public function initialize():void{
super.initialize();
x = 0;
y = 0;
previousX = 0;
previousY = 0;
velX = 0;
velY = 0;
rotation = 0;
angVelocity = 0;
sortID = -1;
}
public function get matrixTransform():Matrix{
var _local1:Number = (scale * Math.cos(rotation));
var _local2:Number = (scale * Math.sin(rotation));
return (new Matrix(_local1, _local2, -(_local2), _local1, x, y));
}
public function get inertia():Number{
if (((!((mass == _previousMass))) || (!((collisionRadius == _previousRadius))))){
_inertia = (((mass * collisionRadius) * collisionRadius) * 0.5);
_previousMass = mass;
_previousRadius = collisionRadius;
};
return (_inertia);
}
}
}//package org.flintparticles.twoD.particles
Section 79
//ParticleCreator2D (org.flintparticles.twoD.particles.ParticleCreator2D)
package org.flintparticles.twoD.particles {
import org.flintparticles.common.particles.*;
public class ParticleCreator2D implements ParticleFactory {
private var _particles:Array;
public function ParticleCreator2D(){
_particles = new Array();
}
public function clearAllParticles():void{
_particles = new Array();
}
public function disposeParticle(_arg1:Particle):void{
if ((_arg1 is Particle2D)){
_arg1.initialize();
_particles.push(_arg1);
};
}
public function createParticle():Particle{
if (_particles.length){
return (_particles.pop());
};
return (new Particle2D());
}
}
}//package org.flintparticles.twoD.particles
Section 80
//BitmapRenderer (org.flintparticles.twoD.renderers.BitmapRenderer)
package org.flintparticles.twoD.renderers {
import flash.geom.*;
import org.flintparticles.twoD.particles.*;
import flash.filters.*;
import flash.display.*;
import org.flintparticles.common.renderers.*;
public class BitmapRenderer extends SpriteRendererBase {
protected var _bitmap:Bitmap;
protected var _bitmapData:BitmapData;
protected var _clearBetweenFrames:Boolean;
protected var _colorMap:Array;
protected var _smoothing:Boolean;
protected var _canvas:Rectangle;
protected var _postFilters:Array;
protected var _preFilters:Array;
protected static var ZERO_POINT:Point = new Point(0, 0);
public function BitmapRenderer(_arg1:Rectangle, _arg2:Boolean=false){
mouseEnabled = false;
mouseChildren = false;
_smoothing = _arg2;
_preFilters = new Array();
_postFilters = new Array();
_canvas = _arg1;
createBitmap();
_clearBetweenFrames = true;
}
public function get clearBetweenFrames():Boolean{
return (_clearBetweenFrames);
}
public function set clearBetweenFrames(_arg1:Boolean):void{
_clearBetweenFrames = _arg1;
}
override protected function renderParticles(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (!_bitmap){
return;
};
_bitmapData.lock();
_local3 = _preFilters.length;
_local2 = 0;
while (_local2 < _local3) {
_bitmapData.applyFilter(_bitmapData, _bitmapData.rect, BitmapRenderer.ZERO_POINT, _preFilters[_local2]);
_local2++;
};
if (((_clearBetweenFrames) && ((_local3 == 0)))){
_bitmapData.fillRect(_bitmap.bitmapData.rect, 0);
};
_local3 = _arg1.length;
if (_local3){
_local2 = _local3;
while (_local2--) {
drawParticle(_arg1[_local2]);
};
};
_local3 = _postFilters.length;
_local2 = 0;
while (_local2 < _local3) {
_bitmapData.applyFilter(_bitmapData, _bitmapData.rect, BitmapRenderer.ZERO_POINT, _postFilters[_local2]);
_local2++;
};
if (_colorMap){
_bitmapData.paletteMap(_bitmapData, _bitmapData.rect, ZERO_POINT, _colorMap[1], _colorMap[2], _colorMap[3], _colorMap[0]);
};
_bitmapData.unlock();
}
protected function createBitmap():void{
if (!_canvas){
return;
};
if (((_bitmap) && (_bitmapData))){
_bitmapData.dispose();
_bitmapData = null;
};
if (_bitmap){
removeChild(_bitmap);
_bitmap = null;
};
_bitmap = new Bitmap(null, "auto", _smoothing);
_bitmapData = new BitmapData(Math.ceil(_canvas.width), Math.ceil(_canvas.height), true, 0);
_bitmap.bitmapData = _bitmapData;
addChild(_bitmap);
_bitmap.x = _canvas.x;
_bitmap.y = _canvas.y;
}
public function get bitmapData():BitmapData{
return (_bitmapData);
}
public function set canvas(_arg1:Rectangle):void{
_canvas = _arg1;
createBitmap();
}
public function clearPaletteMap():void{
_colorMap = null;
}
public function get preFilters():Array{
return (_preFilters.slice());
}
public function removeFilter(_arg1:BitmapFilter):void{
var _local2:int;
while (_local2 < _preFilters.length) {
if (_preFilters[_local2] == _arg1){
_preFilters.splice(_local2, 1);
return;
};
_local2++;
};
_local2 = 0;
while (_local2 < _postFilters.length) {
if (_postFilters[_local2] == _arg1){
_postFilters.splice(_local2, 1);
return;
};
_local2++;
};
}
public function set smoothing(_arg1:Boolean):void{
_smoothing = _arg1;
if (_bitmap){
_bitmap.smoothing = _arg1;
};
}
public function set preFilters(_arg1:Array):void{
var _local2:BitmapFilter;
for each (_local2 in _preFilters) {
removeFilter(_local2);
};
for each (_local2 in _arg1) {
addFilter(_local2, false);
};
}
protected function drawParticle(_arg1:Particle2D):void{
var _local2:Matrix;
_local2 = _arg1.matrixTransform;
_local2.translate(-(_canvas.x), -(_canvas.y));
_bitmapData.draw(_arg1.image, _local2, _arg1.colorTransform, DisplayObject(_arg1.image).blendMode, null, _smoothing);
}
public function setPaletteMap(_arg1:Array=null, _arg2:Array=null, _arg3:Array=null, _arg4:Array=null):void{
_colorMap = new Array(4);
_colorMap[0] = _arg4;
_colorMap[1] = _arg1;
_colorMap[2] = _arg2;
_colorMap[3] = _arg3;
}
public function get smoothing():Boolean{
return (_smoothing);
}
public function set postFilters(_arg1:Array):void{
var _local2:BitmapFilter;
for each (_local2 in _postFilters) {
removeFilter(_local2);
};
for each (_local2 in _arg1) {
addFilter(_local2, true);
};
}
public function addFilter(_arg1:BitmapFilter, _arg2:Boolean=false):void{
if (_arg2){
_postFilters.push(_arg1);
} else {
_preFilters.push(_arg1);
};
}
public function get canvas():Rectangle{
return (_canvas);
}
public function get postFilters():Array{
return (_postFilters.slice());
}
}
}//package org.flintparticles.twoD.renderers
Section 81
//DiscZone (org.flintparticles.twoD.zones.DiscZone)
package org.flintparticles.twoD.zones {
import flash.geom.*;
import org.flintparticles.twoD.particles.*;
public class DiscZone implements Zone2D {
private var _innerRadius:Number;
private var _innerSq:Number;
private var _outerRadius:Number;
private var _center:Point;
private var _outerSq:Number;
private static const TWOPI:Number = 6.28318530717959;
public function DiscZone(_arg1:Point=null, _arg2:Number=0, _arg3:Number=0){
if (_arg2 < _arg3){
throw (new Error((((("The outerRadius (" + _arg2) + ") can't be smaller than the innerRadius (") + _arg3) + ") in your DiscZone. N.B. the outerRadius is the second argument in the constructor and the innerRadius is the third argument.")));
};
if (_arg1 == null){
_center = new Point(0, 0);
} else {
_center = _arg1;
};
_innerRadius = _arg3;
_outerRadius = _arg2;
_innerSq = (_innerRadius * _innerRadius);
_outerSq = (_outerRadius * _outerRadius);
}
public function getArea():Number{
return ((Math.PI * (_outerSq - _innerSq)));
}
public function set centerX(_arg1:Number):void{
_center.x = _arg1;
}
public function set centerY(_arg1:Number):void{
_center.y = _arg1;
}
public function get innerRadius():Number{
return (_innerRadius);
}
public function set innerRadius(_arg1:Number):void{
_innerRadius = _arg1;
_innerSq = (_innerRadius * _innerRadius);
}
public function get center():Point{
return (_center);
}
public function set outerRadius(_arg1:Number):void{
_outerRadius = _arg1;
_outerSq = (_outerRadius * _outerRadius);
}
public function get centerX():Number{
return (_center.x);
}
public function get centerY():Number{
return (_center.y);
}
public function contains(_arg1:Number, _arg2:Number):Boolean{
_arg1 = (_arg1 - _center.x);
_arg2 = (_arg2 - _center.y);
var _local3:Number = ((_arg1 * _arg1) + (_arg2 * _arg2));
return ((((_local3 <= _outerSq)) && ((_local3 >= _innerSq))));
}
public function getLocation():Point{
var _local1:Number = Math.random();
var _local2:Point = Point.polar((_innerRadius + ((1 - (_local1 * _local1)) * (_outerRadius - _innerRadius))), (Math.random() * TWOPI));
_local2.x = (_local2.x + _center.x);
_local2.y = (_local2.y + _center.y);
return (_local2);
}
public function get outerRadius():Number{
return (_outerRadius);
}
public function set center(_arg1:Point):void{
_center = _arg1;
}
public function collideParticle(_arg1:Particle2D, _arg2:Number=1):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number = 0.001;
var _local15:Number = (_arg1.x - _center.x);
var _local16:Number = (_arg1.y - _center.y);
var _local17:Number = ((_arg1.velX * _local15) + (_arg1.velY * _local16));
if (_local17 < 0){
_local3 = (_outerRadius + _arg1.collisionRadius);
if (Math.abs(_local15) > _local3){
return (false);
};
if (Math.abs(_local16) > _local3){
return (false);
};
_local7 = ((_local15 * _local15) + (_local16 * _local16));
_local5 = (_local3 * _local3);
if (_local7 > _local5){
return (false);
};
_local9 = (_arg1.previousX - _center.x);
_local10 = (_arg1.previousY - _center.y);
_local11 = ((_local9 * _local9) + (_local10 * _local10));
if (_local11 > _local5){
_local12 = (((1 + _arg2) * _local17) / _local7);
_arg1.velX = (_arg1.velX - (_local12 * _local15));
_arg1.velY = (_arg1.velY - (_local12 * _local16));
_local8 = Math.sqrt(_local7);
_local13 = ((((2 * _local3) - _local8) / _local8) + _local14);
_arg1.x = (_center.x + (_local15 * _local13));
_arg1.y = (_center.y + (_local16 * _local13));
return (true);
};
if (((!((_innerRadius == 0))) && (!((innerRadius == _outerRadius))))){
_local4 = (_innerRadius + _arg1.collisionRadius);
if (Math.abs(_local15) > _local4){
return (false);
};
if (Math.abs(_local16) > _local4){
return (false);
};
_local6 = (_local4 * _local4);
if (_local7 > _local6){
return (false);
};
if (_local11 > _local6){
_local12 = (((1 + _arg2) * _local17) / _local7);
_arg1.velX = (_arg1.velX - (_local12 * _local15));
_arg1.velY = (_arg1.velY - (_local12 * _local16));
_local8 = Math.sqrt(_local7);
_local13 = ((((2 * _local4) - _local8) / _local8) + _local14);
_arg1.x = (_center.x + (_local15 * _local13));
_arg1.y = (_center.y + (_local16 * _local13));
return (true);
};
};
return (false);
//unresolved jump
};
_local3 = (_outerRadius - _arg1.collisionRadius);
_local9 = (_arg1.previousX - _center.x);
_local10 = (_arg1.previousY - _center.y);
if (Math.abs(_local9) > _local3){
return (false);
};
if (Math.abs(_local10) > _local3){
return (false);
};
_local11 = ((_local9 * _local9) + (_local10 * _local10));
_local5 = (_local3 * _local3);
if (_local11 > _local5){
return (false);
};
_local7 = ((_local15 * _local15) + (_local16 * _local16));
if (((!((_innerRadius == 0))) && (!((innerRadius == _outerRadius))))){
_local4 = (_innerRadius - _arg1.collisionRadius);
_local6 = ((_innerRadius - _arg1.collisionRadius) * _local4);
if ((((_local11 < _local6)) && ((_local7 >= _local6)))){
_local12 = (((1 + _arg2) * _local17) / _local7);
_arg1.velX = (_arg1.velX - (_local12 * _local15));
_arg1.velY = (_arg1.velY - (_local12 * _local16));
_local8 = Math.sqrt(_local7);
_local13 = ((((2 * _local4) - _local8) / _local8) - _local14);
_arg1.x = (_center.x + (_local15 * _local13));
_arg1.y = (_center.y + (_local16 * _local13));
return (true);
};
};
if (_local7 >= _local5){
_local12 = (((1 + _arg2) * _local17) / _local7);
_arg1.velX = (_arg1.velX - (_local12 * _local15));
_arg1.velY = (_arg1.velY - (_local12 * _local16));
_local8 = Math.sqrt(_local7);
_local13 = ((((2 * _local3) - _local8) / _local8) - _local14);
_arg1.x = (_center.x + (_local15 * _local13));
_arg1.y = (_center.y + (_local16 * _local13));
return (true);
};
return (false);
}
}
}//package org.flintparticles.twoD.zones
Section 82
//Zone2D (org.flintparticles.twoD.zones.Zone2D)
package org.flintparticles.twoD.zones {
import flash.geom.*;
import org.flintparticles.twoD.particles.*;
public interface Zone2D {
function getArea():Number;
function getLocation():Point;
function collideParticle(_arg1:Particle2D, _arg2:Number=1):Boolean;
function contains(_arg1:Number, _arg2:Number):Boolean;
}
}//package org.flintparticles.twoD.zones
Section 83
//bassWav (bassWav)
package {
import flash.media.*;
public dynamic class bassWav extends Sound {
}
}//package
Section 84
//blipWav (blipWav)
package {
import flash.media.*;
public dynamic class blipWav extends Sound {
}
}//package
Section 85
//crashWav (crashWav)
package {
import flash.media.*;
public dynamic class crashWav extends Sound {
}
}//package
Section 86
//crunchingWav (crunchingWav)
package {
import flash.media.*;
public dynamic class crunchingWav extends Sound {
}
}//package
Section 87
//crunchWav (crunchWav)
package {
import flash.media.*;
public dynamic class crunchWav extends Sound {
}
}//package
Section 88
//doorSqueakWav (doorSqueakWav)
package {
import flash.media.*;
public dynamic class doorSqueakWav extends Sound {
}
}//package
Section 89
//glassBreakWav (glassBreakWav)
package {
import flash.media.*;
public dynamic class glassBreakWav extends Sound {
}
}//package
Section 90
//mechanismWav (mechanismWav)
package {
import flash.media.*;
public dynamic class mechanismWav extends Sound {
}
}//package
Section 91
//pickupWav (pickupWav)
package {
import flash.media.*;
public dynamic class pickupWav extends Sound {
}
}//package
Section 92
//policeSirenWav (policeSirenWav)
package {
import flash.media.*;
public dynamic class policeSirenWav extends Sound {
}
}//package
Section 93
//popWav (popWav)
package {
import flash.media.*;
public dynamic class popWav extends Sound {
}
}//package
Section 94
//resetWav (resetWav)
package {
import flash.media.*;
public dynamic class resetWav extends Sound {
}
}//package
Section 95
//slideWav (slideWav)
package {
import flash.media.*;
public dynamic class slideWav extends Sound {
}
}//package
Section 96
//snowStepWav (snowStepWav)
package {
import flash.media.*;
public dynamic class snowStepWav extends Sound {
}
}//package
Section 97
//square (square)
package {
import flash.display.*;
public dynamic class square extends MovieClip {
}
}//package
Section 98
//successWav (successWav)
package {
import flash.media.*;
public dynamic class successWav extends Sound {
}
}//package
Section 99
//themeIntroWav (themeIntroWav)
package {
import flash.media.*;
public dynamic class themeIntroWav extends Sound {
}
}//package
Section 100
//themeStingerWav (themeStingerWav)
package {
import flash.media.*;
public dynamic class themeStingerWav extends Sound {
}
}//package
Section 101
//themeWav (themeWav)
package {
import flash.media.*;
public dynamic class themeWav extends Sound {
}
}//package