STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229593
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/77310121?noj=FRM77310121-21DC" width="1" height="1"></div>

bric_a_brac.swf

This is the info page for
Flash #257024

(Click the ID number above for more basic data on this flash file.)


Text
Shuffling_

levels_played_

score_

levelsPlayedTf

scoreTf

countDownTf

register_to_play_

instructions_

instruction_3_

instruction_1_

instruction_2_

countDownTf

click_to_begin_

poäng: 24100

200

time_bonus_

00

8888

ActionScript [AS3]

Section 1
//BgAnimation (client.BgAnimation) package client { import flash.media.*; import mutual.*; import flash.display.*; import util.*; public class BgAnimation extends Sprite implements Renderable { public var animationTick:int;// = 0 public var bubble:Bubble;// = null public var wink:MovieClip; public var magnitude:Number; public var animatedObj:Sprite;// = null public var rot:ChainRotation;// = null public var leef:Leef;// = null public var sineChange:SineChange;// = null public var nextWink:int;// = 2147483647 public var nextStart:int;// = 2147483647 public var seed:Seed;// = null public var game:GameC;// = null public var coconut:Coconut;// = null public var movement:ChainMovement;// = null public var bend:int; public var resize:ChainResize; public function BgAnimation(_arg1:GameC){ this.game = _arg1; leef = new Leef(); coconut = new Coconut(); bubble = new Bubble(); seed = new Seed(); Time.startRender(this); wink = _arg1.arts[2].fish.wink; } public function updateDown(_arg1:int, _arg2:Number):void{ var _local3:int; if (movement != null){ _local3 = movement.render(_arg1, _arg2); if (_local3 == Time.STOP){ movement = null; nextStart = int.MAX_VALUE; }; }; if (rot != null){ _local3 = rot.render(_arg1, _arg2); if (_local3 == Time.STOP){ rot = null; }; }; } public function initDown(_arg1:int):void{ var _local3:int; var _local4:int; var _local5:Number; var _local6:Sound; var _local15:Number; var _local2:int = _arg1; var _local7:Number = 0.15; _local6 = new DownLoopSnd(); game.main.soundManager.startSound(_local6, _local7); var _local8:Sprite = new Sprite(); _local8.addChild(leef); var _local9:Number = (0.7 + (Math.random() * 0.3)); leef.scaleX = _local9; leef.scaleY = _local9; leef.y = 230; animatedObj = _local8; movement = new ChainMovement(animatedObj); rot = new ChainRotation(animatedObj); var _local10 = 8; var _local11 = 670; var _local12:int = (_local11 / (_local10 - 1)); _local3 = (100 + (Math.random() * 554)); var _local13:int = (-(leef.y) - 30); _local5 = 1; if (Math.random() > 0.5){ _local5 = -1; }; var _local14:int; while (_local14 < _local10) { _local5 = (_local5 * -1); _local15 = (5 + (Math.random() * 20)); rot.addRotation(_local2, (_local15 * _local5)); _local2 = (_local2 + 10); rot.addRotation(_local2, ((_local15 + 3) * _local5)); _local3 = (_local3 + (-(_local5) * (20 + (Math.random() * 80)))); _local4 = (_local13 + (_local14 * _local12)); movement.addMove(_local2, _local3, _local4); _local2 = (_local2 + 60); _local14++; }; } public function updateUp(_arg1:int, _arg2:Number):void{ var _local3:int; if (movement != null){ _local3 = movement.render(_arg1, _arg2); if (_local3 == Time.STOP){ movement = null; nextStart = int.MAX_VALUE; }; }; if (resize != null){ _local3 = resize.render(_arg1, _arg2); if (_local3 == Time.STOP){ resize = null; }; }; if (sineChange != null){ _local3 = sineChange.render(_arg1, _arg2); animatedObj.x = (animatedObj.x + ((magnitude * sineChange.value) * bend)); if (_local3 == Time.STOP){ sineChange = null; }; }; } public function render(_arg1:int, _arg2:Number):int{ var _local3:FramePlayer; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; if ((((game.fallDirection == 2)) && ((game.state == Game.IDLE)))){ if (nextWink == int.MAX_VALUE){ nextWink = ((animationTick + 600) + (Math.random() * 1000)); }; if (animationTick >= nextWink){ wink.gotoAndStop(1); _local3 = new FramePlayer(wink, _arg1, 20); Time.startRender(_local3); nextWink = int.MAX_VALUE; }; } else { nextWink = int.MAX_VALUE; }; if (nextStart == int.MAX_VALUE){ nextStart = ((animationTick + 240) + (Math.random() * 1000)); }; if ((((game.state == Game.IDLE)) && ((animationTick++ == nextStart)))){ this.alpha = 1; _local4 = _arg1; switch (game.fallDirection){ case 0: initDown(_arg1); break; case 1: initLeft(_arg1); break; case 2: initUp(_arg1); break; case 3: initRight(_arg1); break; }; addChild(animatedObj); }; switch (game.fallDirection){ case 0: updateDown(_arg1, _arg2); break; case 1: updateLeft(_arg1, _arg2); break; case 2: updateUp(_arg1, _arg2); break; case 3: updateRight(_arg1, _arg2); break; }; return (Time.CONTINUE); } public function fadeOut():void{ var _local1:ChainAlpha = new ChainAlpha(this); var _local2:int = Time.getTick(); _local1.addAlpha(_local2, 1); _local2 = (_local2 + 30); _local1.addAlpha(_local2, 0); Time.startRender(_local1); } public function initUp(_arg1:int):void{ var _local3:int; var _local4:int; var _local5:Number; var _local6:Sound; var _local2:int = _arg1; var _local7:Number = 0.15; if (Math.random() > 0.5){ _local6 = new UpLoop1Snd(); } else { _local6 = new UpLoop2Snd(); }; game.main.soundManager.startSound(_local6, _local7); animatedObj = bubble; _local5 = 1; if (Math.random() > 0.5){ _local5 = -1; }; movement = new ChainMovement(animatedObj); _local3 = (100 + (Math.random() * 554)); _local4 = (500 + (Math.random() * 100)); movement.addMove(_local2, _local3, _local4); magnitude = (0.3 + (Math.random() * 0.7)); resize = new ChainResize(animatedObj); resize.addResize(_local2, 0.3, 0.3); _local2 = (_local2 + 160); _local3 = (_local3 + (-50 + (Math.random() * 100))); _local4 = -20; movement.addMove(_local2, _local3, _local4); resize.addResize(_local2, 1, 1); bend = (_local5 * 80); sineChange = new SineChange(_arg1, _local2, 0, (2 * Math.PI)); } public function updateRight(_arg1:int, _arg2:Number):void{ var _local3:int; if (movement != null){ _local3 = movement.render(_arg1, _arg2); if (_local3 == Time.STOP){ movement = null; nextStart = int.MAX_VALUE; }; }; if (rot != null){ _local3 = rot.render(_arg1, _arg2); if (_local3 == Time.STOP){ rot = null; }; }; if (sineChange != null){ _local3 = sineChange.render(_arg1, _arg2); animatedObj.y = (animatedObj.y + ((magnitude * sineChange.value) * bend)); if (_local3 == Time.STOP){ sineChange = null; }; }; } public function initRight(_arg1):void{ var _local3:int; var _local4:int; var _local5:Number; var _local6:Sound; var _local2:int = _arg1; var _local7:Number = 0.15; _local6 = new RightLoopSnd(); game.main.soundManager.startSound(_local6, _local7); animatedObj = seed; _local5 = 1; if (Math.random() > 0.5){ _local5 = -1; }; movement = new ChainMovement(animatedObj); rot = new ChainRotation(animatedObj); _local3 = -30; _local4 = (90 + (Math.random() * 400)); movement.addMove(_local2, _local3, _local4); magnitude = (0.3 + (Math.random() * 0.7)); var _local8:Number = ((magnitude * _local5) * 15); rot.addRotation(_local2, _local8); _local2 = (_local2 + 60); _local3 = 810; movement.addMove(_local2, _local3, _local4); _local8 = ((magnitude * _local5) * 0); rot.addRotation(_local2, _local8); bend = (_local5 * 80); sineChange = new SineChange(_arg1, _local2, 0, (Math.PI / 2)); } public function updateLeft(_arg1:int, _arg2:Number):void{ var _local3:int; if (movement != null){ _local3 = movement.render(_arg1, _arg2); if (_local3 == Time.STOP){ movement = null; nextStart = int.MAX_VALUE; }; }; if (rot != null){ _local3 = rot.render(_arg1, _arg2); if (_local3 == Time.STOP){ rot = null; }; }; if (sineChange != null){ _local3 = sineChange.render(_arg1, _arg2); animatedObj.y = (animatedObj.y + (sineChange.value * bend)); if (_local3 == Time.STOP){ sineChange = null; }; }; } public function initLeft(_arg1:int):void{ var _local3:int; var _local4:int; var _local5:Number; var _local6:Sound; var _local2:int = _arg1; var _local7:Number = 0.15; _local6 = new LeftLoopSnd(); game.main.soundManager.startSound(_local6, _local7); animatedObj = coconut; movement = new ChainMovement(coconut); rot = new ChainRotation(coconut); _local3 = 770; _local4 = (100 + (Math.random() * 300)); movement.addMove(_local2, _local3, _local4); var _local8:Number = (Math.random() * 360); rot.addRotation(_local2, _local8); _local2 = (_local2 + 70); _local3 = -30; movement.addMove(_local2, _local3, _local4); _local8 = (Math.random() * 360); _local5 = 1; if (Math.random() > 0.5){ _local5 = -1; }; var _local9:int = (1 + (Math.random() * 1)); rot.addRotation(_local2, _local8, _local5, _local9); var _local10 = 1; if (Math.random() > 0.5){ _local10 = -1; }; bend = (_local10 * (70 + (Math.random() * 80))); sineChange = new SineChange(_arg1, _local2, (Math.PI / 2), Math.PI); } } }//package client
Section 2
//ClockMc (client.ClockMc) package client { import flash.media.*; import mutual.*; import flash.display.*; import util.*; import flash.filters.*; public class ClockMc extends MovieClip implements Renderable { public var game:GameC;// = null public var timeWarning:MovieClip; public function ClockMc(){ stop(); timeWarning.stop(); } public function init(_arg1:GameC):void{ this.game = _arg1; Time.startRender(this); } public function render(_arg1:int, _arg2:Number):int{ var _local4:Number; var _local3 = 1; if (game.clockCountDown != Game.COUNTDOWN_TICKS){ _local4 = ((Game.COUNTDOWN_TICKS - game.clockCountDown) / Game.COUNTDOWN_TICKS); _local3 = (_local4 * totalFrames); } else { if (game.clockCountDown == 0){ gotoAndStop(0); return (Time.STOP); }; }; if (_local3 != currentFrame){ gotoAndStop(_local3); }; return (Time.CONTINUE); } public function doTimeWarning(_arg1:Tray, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:MovieClip):void{ var _local7:Sound; var _local15:FramePlayer; var _local16:ChainGlow; var _local17:Number; var _local18:Number; var _local19:int; var _local6:int = Time.getTick(); if (_arg2){ _local15 = new FramePlayer(timeWarning, _local6, 25, 0); Time.startRender(_local15); }; if (_arg3){ _local16 = new ChainGlow(_arg5); _local16.quality = BitmapFilterQuality.MEDIUM; _local17 = 0xFF0000; _local18 = 0.85; _local19 = 15; _local16.add(_local6, _local17, _local18, 0, 0, 1); _local6 = (_local6 + _local19); _local16.add(_local6, _local17, _local18, 15, 15, 2.5); _local6 = (_local6 + _local19); _local16.add(_local6, _local17, _local18, 0, 0, 1); Time.startRender(_local16); }; if (_arg4){ _local7 = new EvenTimeWarningSnd(); } else { _local7 = new OddTimeWarningSnd(); }; game.main.soundManager.startSound(_local7, 0.4); game.main.soundManager.muteLoop(); var _local8:ChainGlow = new ChainGlow(_arg1.surface); var _local9:Number = 15018270; var _local10:Number = 0.85; var _local11:Number = 20; var _local12:Number = 20; var _local13:Number = 5; var _local14 = 15; _local6 = Time.getTick(); _local8.add(_local6, _local9, _local10, 0, 0, _local13); _local6 = (_local6 + _local14); _local8.add(_local6, _local9, _local10, _local11, _local12, _local13); _local6 = (_local6 + _local14); _local8.add(_local6, _local9, _local10, 0, 0, _local13); Time.startRender(_local8); } } }//package client
Section 3
//GameC (client.GameC) package client { import flash.events.*; import mutual.*; import flash.display.*; import util.*; public class GameC extends Game { public var fg:Sprite;// = null public var sign:SignS;// = null public var bg:Sprite;// = null public var musicBh:ButtonHandler;// = null public var soundMc:SoundMc;// = null public var clock:ClockMc;// = null private var doingLevelWarning:Boolean;// = false public var scoreDisplay:ScoreS;// = null public var exitBh:ButtonHandler;// = null public var exitMc:ExitMc;// = null public var middle:Sprite;// = null public var musicMc:MusicMc;// = null private var doingClockWarning:Boolean;// = false public var art:Sprite;// = null public var levelMeter:LevelMeterS;// = null public var arts:Array;// = null public var soundBh:ButtonHandler;// = null public var tray:Tray;// = null public var gradient:GradientS;// = null public var bgAnimation:BgAnimation;// = null public static const ROTATIONS:Array = [0, 90, 180, 270]; public function GameC(_arg1:Main){ super(_arg1); bg = new Sprite(); bg.mouseEnabled = false; _arg1.addChild(bg); _arg1.swapChildren(_arg1.intro, bg); middle = new Sprite(); middle.mouseEnabled = false; _arg1.addChild(middle); fg = new Sprite(); fg.mouseEnabled = false; fg.mouseChildren = false; _arg1.addChild(fg); arts = new Array(); arts.push(new BgDown()); arts.push(new BgLeft()); var _local2:BgUp = new BgUp(); _local2.fish.wink.stop(); arts.push(_local2); arts.push(new BgRight()); art = Sprite(arts[fallDirection]); bg.addChild(art); bgAnimation = new BgAnimation(this); bg.addChild(bgAnimation); tray = new Tray(); bg.addChild(tray); levelMeter = new LevelMeterS(); levelMeter.x = -20; levelMeter.y = 287; middle.addChild(levelMeter); gradient = new GradientS(); gradient.x = 381; gradient.y = 630; middle.addChild(gradient); clock = new ClockMc(); clock.x = 36; clock.y = 640; clock.init(this); middle.addChild(clock); scoreDisplay = new ScoreS(); scoreDisplay.x = 95; scoreDisplay.y = 580; scoreDisplay.score.text = (GameData.getText("score_label") + ": 0"); middle.addChild(scoreDisplay); _arg1.buttons = new Sprite(); _arg1.buttons.mouseEnabled = false; _arg1.addChild(_arg1.buttons); musicMc = new MusicMc(); musicMc.x = 667; musicMc.y = 579; musicMc.stop(); _arg1.buttons.addChild(musicMc); musicBh = new ButtonHandler(musicMc, false, false); musicBh.offFrame = 2; musicBh.setOnOff(_arg1.soundManager.getMusicOn()); musicBh.btn.addEventListener(MouseEvent.CLICK, toggleMusic); soundMc = new SoundMc(); soundMc.x = 701; soundMc.y = 579; soundMc.stop(); _arg1.buttons.addChild(soundMc); soundBh = new ButtonHandler(soundMc, false, false); soundBh.offFrame = 2; soundBh.setOnOff(_arg1.soundManager.getSoundOn()); soundBh.btn.addEventListener(MouseEvent.CLICK, toggleSound); exitMc = new ExitMc(); exitMc.x = 735; exitMc.y = 579; exitMc.stop(); exitMc.visible = false; _arg1.buttons.addChild(exitMc); exitBh = new ButtonHandler(exitMc); exitBh.btn.addEventListener(MouseEvent.CLICK, exitClick); sign = new SignS(); } private function maybeDoTimeWarning(_arg1:int, _arg2:Boolean, _arg3:int):Boolean{ var _local4:Boolean; var _local5:Boolean; var _local6:Boolean; if ((((_arg1 <= (Game.TIME_WARNING_TICKS * 5))) && ((_arg1 > 0)))){ if ((_arg1 % Game.TIME_WARNING_TICKS) == 0){ _local4 = _arg2; _local5 = !(_arg2); if (_arg3 <= (Game.TIME_WARNING_TICKS * 5)){ _local5 = true; _local4 = true; }; _local6 = (((_arg1 / Game.TIME_WARNING_TICKS) % 2) == 0); clock.doTimeWarning(tray, _local4, _local5, _local6, levelMeter.fluid); }; return (true); }; return (false); } override public function gameEnd(_arg1:int, _arg2:int):void{ super.gameEnd(_arg1, _arg2); disableExit(); main.addPlayData([Game.SOUND, main.soundManager.getSoundOn()]); main.addPlayData([Game.MUSIC, main.soundManager.getMusicOn()]); main.addPlayData([Game.LAST_TICK]); } override public function countDown(_arg1:int):void{ super.countDown(_arg1); if (!doingLevelWarning){ doingClockWarning = maybeDoTimeWarning(clockCountDown, true, levelCountDown); }; if (!doingClockWarning){ doingLevelWarning = maybeDoTimeWarning(levelCountDown, false, clockCountDown); }; } public function toggleSound(_arg1:MouseEvent=null):void{ main.soundManager.toggleSound(); } public function disableExit():void{ exitBh.btn.removeEventListener(MouseEvent.CLICK, exitClick); exitBh.btn.mouseEnabled = false; } override public function start():void{ super.start(); levelMeter.init(this); var _local1:ChainMovement = new ChainMovement(levelMeter); var _local2:ChainMovement = new ChainMovement(clock); var _local3:ChainMovement = new ChainMovement(gradient); var _local4:ChainMovement = new ChainMovement(scoreDisplay); var _local5:int = Time.getTick(); _local1.addMove(_local5, levelMeter.x, levelMeter.y); _local2.addMove(_local5, clock.x, clock.y); _local3.addMove(_local5, gradient.x, gradient.y); _local4.addMove(_local5, scoreDisplay.x, scoreDisplay.y); _local5 = (_local5 + (Game.LEVEL_CHANGE_TICKS / 6)); _local1.addMove(_local5, 38, levelMeter.y); _local2.addMove(_local5, clock.x, 563); _local3.addMove(_local5, gradient.x, 579); _local4.addMove(_local5, scoreDisplay.x, 541); Time.startRender(_local1); Time.startRender(_local2); Time.startRender(_local3); Time.startRender(_local4); new LevelAnimation(this, true); exitMc.visible = true; main.soundManager.gameStart(); } public function exitClick(_arg1:Event):void{ main.addPlayData([Game.INPUT_EXIT]); disableExit(); } public function toggleMusic(_arg1:MouseEvent=null):void{ main.soundManager.toggleMusic(); } override public function setState(_arg1:int):void{ var _local2:ShuffleAnimation; super.setState(_arg1); if (_arg1 == Game.SHUFFLING){ if (previousState == Game.ANIMATING_SUCCESS){ }; _local2 = new ShuffleAnimation(this, fg, sign, tiles.sprite, fallDirection, Time.getTick()); } else { if (_arg1 == Game.LEVEL_CHANGE){ bgAnimation.fadeOut(); new LevelAnimation(this); } else { if (_arg1 == Game.IDLE){ tiles.forceUpdate(); if (previousState == Game.SHUFFLING){ middle.filters = null; bg.filters = null; }; if (previousState == Game.ANIMATING_SUCCESS){ }; if (previousState == Game.LEVEL_CHANGE){ main.soundManager.levelStart(); }; }; }; }; } } }//package client
Section 4
//IntroMc (client.IntroMc) package client { import flash.events.*; import flash.media.*; import mutual.*; import flash.display.*; import util.*; public class IntroMc extends MovieClip implements Renderable { private var countDown2:String; private var countDown1:String; private var started:Boolean;// = false private var boxPlayer:SoundPlayer;// = null private var main:Main;// = null private var instructionsMove:ChainMovement;// = null private var endTick:int;// = -1 private var instr1Alpha:ChainAlpha;// = null public var instructions:InstructionsS; private var startTick:int;// = -1 private var framePlayer:FramePlayer;// = null private var lastSecondsLeft:int;// = -1 private var instr2Alpha:ChainAlpha;// = null private static const TICKS:int = 1620; public function IntroMc(){ instructions.visible = false; stop(); } public function init(_arg1:Main){ this.main = _arg1; GameData.translateTextfields(this); Time.startRender(this); startTick = Time.getTick(); endTick = (startTick + IntroMc.TICKS); countDown1 = (GameData.getText("game_starts_in") + " "); countDown2 = (" " + GameData.getText("seconds")); this.addEventListener(MouseEvent.CLICK, start); var _local2:int = (startTick + 60); framePlayer = new FramePlayer(this, _local2, (_local2 + 60)); var _local3:Sound = new LightSnd(); var _local4:SoundPlayer = new SoundPlayer(_local2, _arg1, _local3, 0.4); Time.startRender(_local4); _arg1.soundManager.lightSoundPlayer = _local4; instructionsMove = new ChainMovement(instructions); _local2 = (_local2 + 100); instructionsMove.addMove(_local2, instructions.x, (instructions.y - 600)); _local2 = (_local2 + 20); instructionsMove.addMove(_local2, instructions.x, instructions.y); boxPlayer = new SoundPlayer(_local2, _arg1, new BoxLandsSnd(), 0.8); Time.startRender(boxPlayer); _local2 = (_local2 + 400); instr1Alpha = new ChainAlpha(instructions.instructions1); instr2Alpha = new ChainAlpha(instructions.instructions2); instr1Alpha.addAlpha(_local2, 1); instr2Alpha.addAlpha(_local2, 0); _local2 = (_local2 + 20); instr1Alpha.addAlpha(_local2, 0); instr2Alpha.addAlpha(_local2, 1); _local2 = ((startTick + IntroMc.TICKS) - 20); instructionsMove.addMove(_local2, instructions.x, instructions.y); _local2 = (_local2 + 20); instructionsMove.addMove(_local2, instructions.x, (instructions.y + 600)); instructions.y = (instructions.y - 600); instructions.visible = true; instructions.instructions2.alpha = 0; } public function render(_arg1:int, _arg2:Number):int{ framePlayer.render(_arg1, _arg2); instructionsMove.render(_arg1, _arg2); instr1Alpha.render(_arg1, _arg2); instr2Alpha.render(_arg1, _arg2); var _local3:int = (endTick - _arg1); var _local4:int = (_local3 / Game.TICKS_PER_SECOND); if (_local4 < 0){ _local4 = 0; }; if (_local4 != lastSecondsLeft){ lastSecondsLeft = _local4; instructions.countDownTf.text = ((countDown1 + _local4) + countDown2); }; if (_arg1 < endTick){ return (Time.CONTINUE); }; main.introFinished(); return (Time.STOP_REMOVE); } protected function start(_arg1:MouseEvent):void{ if (!started){ started = true; removeEventListener(MouseEvent.CLICK, start); Time.stopRender(boxPlayer); endTick = 0; }; } } }//package client
Section 5
//LevelAnimation (client.LevelAnimation) package client { import flash.media.*; import flash.display.*; import util.*; public class LevelAnimation extends Sprite implements Renderable { public var bg:Sprite;// = null public var trayMovement:ChainMovement;// = null public var soundStartTick:int;// = 2147483647 public var middle:Sprite;// = null public var trayResize:ChainResize;// = null public var art:Sprite;// = null public var isFirst:Boolean; public var game:GameC;// = null public var tray:Tray;// = null public var artMovement:ChainMovement;// = null public var oldArt:Sprite;// = null public static const BG_MOVE_TICKS:int = 10; public static const TILE_FALL_TICKS:int = 15; public static const BG_WAIT_TICKS:int = 160; public static const FIRST_TRAY_WAIT_TICKS:int = 60; public static const FIRST_TILE_WAIT_TICKS:int = 80; public static const TRAY_DISAPPEAR_TICKS:int = 10; public static const TRAY_WAIT_TICKS:int = 170; public static const TRAY_MOVE_TICKS:int = 10; public static const TILE_WAIT_TICKS:int = 200; public function LevelAnimation(_arg1:GameC, _arg2:Boolean=false){ var _local5:TileC; var _local6:int; var _local7:int; var _local8:int; var _local9:MovePoint; var _local10:MovePoint; var _local11:int; var _local12:int; var _local13:TileC; var _local14:int; var _local15:int; var _local16:Sound; var _local17:int; var _local18:Number; var _local19:SoundPlayer; super(); this.game = _arg1; this.isFirst = _arg2; var _local3:SignS = _arg1.sign; middle = _arg1.middle; bg = _arg1.bg; Time.startRender(this); if (!_arg2){ _arg1.main.soundManager.levelClear(); }; if (!_arg2){ if (_arg1.art != null){ oldArt = _arg1.art; }; art = Sprite(_arg1.arts[_arg1.fallDirection]); _arg1.art = art; bg.addChild(art); _local8 = (Time.getTick() + LevelAnimation.BG_WAIT_TICKS); soundStartTick = _local8; _local9 = new MovePoint(_local8, 0, 0); _local8 = (_local8 + LevelAnimation.BG_MOVE_TICKS); _local10 = new MovePoint(_local8, 0, 0); _local11 = 754; _local12 = 600; switch (_arg1.fallDirection){ case 0: _local9.y = (_local9.y + -(_local11)); break; case 1: _local9.x = (_local9.x + _local12); break; case 2: _local9.y = (_local9.y + _local11); break; case 3: _local9.x = (_local9.x + -(_local12)); break; }; artMovement = new ChainMovement(art); artMovement.addMovePoint(_local9); artMovement.addMovePoint(_local10); }; tray = _arg1.tray; if (_arg2){ newTrayAnimation(); } else { _local8 = Time.getTick(); trayResize = new ChainResize(tray); trayResize.addResize(_local8, tray.scaleX, tray.scaleY); trayResize.addResize((_local8 + LevelAnimation.TRAY_DISAPPEAR_TICKS), 0, 0); }; _local12 = 754; _local11 = 600; switch (_arg1.fallDirection){ case 0: _local11 = -(_local11); _local12 = 0; break; case 1: _local11 = 0; break; case 2: _local12 = 0; break; case 3: _local11 = 0; _local12 = -(_local12); break; }; _local8 = Time.getTick(); if (_arg2){ _local8 = (_local8 + LevelAnimation.FIRST_TILE_WAIT_TICKS); } else { _local8 = (_local8 + LevelAnimation.TILE_WAIT_TICKS); }; var _local4:Array = _arg1.tiles.getTilesInPlay(); for each (_local5 in _local4) { _local5.resetAnimations(); }; _local6 = 3; _local7 = 0; while (_local7 < _local4.length) { _local13 = TileC(_local4[_local7]); _local13.mc.x = (_local13.mc.x + _local12); _local13.mc.y = (_local13.mc.y + _local11); _local14 = (-2 + (Math.random() * 5)); _local15 = ((_local8 + ((_local13.row - 1) * _local6)) + _local14); _local13.startFallAnimation(_local15, LevelAnimation.TILE_FALL_TICKS); _local17 = (Math.random() * 3); if (_local17 == 0){ _local16 = new Landing1Snd(); } else { if (_local17 == 1){ _local16 = new Landing2Snd(); } else { if (_local17 == 2){ _local16 = new Landing3Snd(); }; }; }; _local18 = 0; if (_arg1.fallDirection == 1){ _local18 = -0.7; } else { if (_arg1.fallDirection == 3){ _local18 = 0.7; }; }; _local19 = new SoundPlayer(((_local15 + LevelAnimation.TILE_FALL_TICKS) - 5), _arg1.main, _local16, 0.2, 0, _local18); Time.startRender(_local19); _local7++; }; } public function render(_arg1:int, _arg2:Number):int{ var _local3:int; if (trayResize != null){ _local3 = trayResize.render(_arg1, _arg2); if (_local3 == Time.STOP){ trayResize = null; newTrayAnimation(); }; }; if (artMovement != null){ _local3 = artMovement.render(_arg1, _arg2); if (_local3 == Time.STOP){ if (oldArt != null){ bg.removeChild(oldArt); artMovement = null; }; }; }; if (trayMovement != null){ _local3 = trayMovement.render(_arg1, _arg2); if (_local3 == Time.STOP){ return (Time.STOP); }; }; return (Time.CONTINUE); } public function newTrayAnimation():void{ tray.scaleX = 1; tray.scaleY = 1; var _local1:int = Time.getTick(); tray.init(TilesC(game.tiles), game.fallDirection); tray.setValues(); bg.swapChildren(tray, bg.getChildAt((bg.numChildren - 1))); bg.swapChildren(game.bgAnimation, bg.getChildAt((bg.numChildren - 2))); _local1 = Time.getTick(); if (isFirst){ _local1 = (_local1 + LevelAnimation.FIRST_TRAY_WAIT_TICKS); } else { _local1 = (_local1 + LevelAnimation.TRAY_WAIT_TICKS); }; var _local2:MovePoint = new MovePoint(_local1, tray.x, tray.y); _local1 = (_local1 + LevelAnimation.TRAY_MOVE_TICKS); var _local3:MovePoint = new MovePoint(_local1, tray.x, tray.y); var _local4 = 754; var _local5 = 600; switch (game.fallDirection){ case 0: _local2.y = (_local2.y + -(_local4)); break; case 1: _local2.x = (_local2.x + _local5); break; case 2: _local2.y = (_local2.y + _local4); break; case 3: _local2.x = (_local2.x + -(_local5)); break; }; trayMovement = new ChainMovement(tray); trayMovement.addMovePoint(_local2); trayMovement.addMovePoint(_local3); tray.x = _local2.x; tray.y = _local2.y; var _local6:SoundPlayer = new SoundPlayer(_local1, game.main, new BoxLandsSnd(), 0.6); Time.startRender(_local6); } } }//package client
Section 6
//LevelMeterS (client.LevelMeterS) package client { import mutual.*; import flash.text.*; import flash.display.*; import util.*; import flash.filters.*; public class LevelMeterS extends Sprite implements Renderable { public var textResize:ChainResize;// = null public var textMovement:ChainMovement;// = null public var startScale:Number; public var fluid:Fluid;// = null public var textRotation:ChainRotation;// = null public var lastLevel:int;// = 1 public var labelAlpha:ChainAlpha;// = null public var levelBonusFilled:Boolean; public var title:TextField;// = null public var timeBonusS:TimeBonusS; public var timeBonusLabel:TimeBonusLabel; public var lastState:int; public var inner:LevelMeterInnerS; public var fluidResize:ChainResize;// = null public var levelAnimationStartTick:int;// = 2147483647 public var emptyMeterTicks:int;// = 2147483647 public var glowTick:int;// = 2147483647 public var timeBonusStartX:int; public var game:GameC;// = null public var levelNrTf:TextField;// = null public var levelBonus:int; public var bonusAlpha:ChainAlpha;// = null public function LevelMeterS(){ levelNrTf = inner.levelNrTf; levelNrTf.text = "01"; fluid = inner.fluid; timeBonusS.visible = false; timeBonusLabel.visible = false; timeBonusStartX = timeBonusS.x; } public function render(_arg1:int, _arg2:Number):int{ var _local9:GlowFilter; var _local10:Number; var _local11:String; var _local12:Number; var _local13:int; var _local14:int; var _local15:SoundPlayer; var _local16:Number; var _local17:int; var _local18:GlowFilter; if (game.levelCountDown <= (Game.TIME_WARNING_TICKS * 5)){ if (fluid.currentFrame != 2){ fluid.gotoAndStop(2); }; } else { if (fluid.currentFrame != 1){ fluid.gotoAndStop(1); }; }; var _local3:Number = 0; var _local4:Number = 1; var _local5:Number = 1; var _local6:Number = 1; var _local7:Number = 2; var _local8:Number = BitmapFilterQuality.LOW; if (((!((game.state == Game.LEVEL_CHANGE))) && (!((game.tiles.level == lastLevel))))){ lastLevel = game.tiles.level; _local11 = ("" + (lastLevel + 1)); if (_local11.length == 1){ _local11 = ("0" + _local11); }; levelNrTf.text = _local11; }; if (game.state == Game.LEVEL_CHANGE){ if (lastState != Game.LEVEL_CHANGE){ startScale = fluid.scaleY; _local12 = fluid.scaleX; levelAnimationStartTick = _arg1; _local13 = Game.LEVEL_CHANGE_TICKS; timeBonusS.visible = true; timeBonusLabel.visible = true; timeBonusLabel.alpha = 0; levelBonus = game.score.getLevelBonus(); levelBonusFilled = false; _local9 = new GlowFilter(_local3, _local4, _local5, _local6, _local7, _local8); timeBonusS.filters = new Array(_local9); _local14 = _arg1; fluidResize = new ChainResize(fluid); fluidResize.addResize(_local14, _local12, startScale); textMovement = new ChainMovement(timeBonusS); textMovement.addMove(_local14, timeBonusStartX, (fluid.y - fluid.height)); timeBonusS.alpha = 1; timeBonusS.text = 0; textResize = new ChainResize(timeBonusS); textResize.addResize(_local14, 0, 0); _local14 = (_arg1 + (_local13 / 10)); textResize.addResize(_local14, 1, 1); _local15 = new SoundPlayer(_local14, game.main, new LevelBonusSnd(), 0.4); Time.startRender(_local15); emptyMeterTicks = (_local13 / 4); _local14 = (_arg1 + emptyMeterTicks); fluidResize.addResize(_local14, _local12, 0); textMovement.addMove(_local14, timeBonusStartX, fluid.y); textResize.addResize(_local14, 1, 1); textRotation = new ChainRotation(timeBonusS); textRotation.addRotation(_local14, 0); labelAlpha = new ChainAlpha(timeBonusLabel); _local14 = (_local14 + (_local13 / 6)); labelAlpha.addAlpha(_local14, 0); _local14 = ((_arg1 + (_local13 / 4)) + 20); fluidResize.addResize(_local14, _local12, 0); textMovement.addMove(_local14, 385, -5); textResize.addResize(_local14, 2.15, 2.15); textRotation.addRotation(_local14, 0, 1, 1); labelAlpha.addAlpha(_local14, 1); glowTick = _local14; _local14 = (_local14 + (_local13 / 15)); textResize.addResize(_local14, 2, 2); _local14 = (_local14 + (_local13 / 4)); labelAlpha.addAlpha(_local14, 1); bonusAlpha = new ChainAlpha(timeBonusS); bonusAlpha.addAlpha(_local14, 1); _local14 = (_arg1 + _local13); fluidResize.addResize(_local14, _local12, 1); labelAlpha.addAlpha(_local14, 0); bonusAlpha.addAlpha(_local14, 0); }; if (!levelBonusFilled){ _local16 = (((_arg1 + _arg2) - levelAnimationStartTick) / emptyMeterTicks); _local17 = (_local16 * levelBonus); if (_local17 >= levelBonus){ _local17 = levelBonus; levelBonusFilled = true; }; timeBonusS.timeBonus.text = ("" + _local17); }; fluidResize.render(_arg1, _arg2); textMovement.render(_arg1, _arg2); textResize.render(_arg1, _arg2); textRotation.render(_arg1, _arg2); labelAlpha.render(_arg1, _arg2); bonusAlpha.render(_arg1, _arg2); if (_arg1 >= glowTick){ glowTick = int.MAX_VALUE; _local7 = 1; _local9 = new GlowFilter(_local3, _local4, _local5, _local6, _local7, _local8); _local3 = 16777165; _local4 = 1; _local5 = 10; _local6 = 10; _local7 = 5; _local8 = BitmapFilterQuality.LOW; _local18 = new GlowFilter(_local3, _local4, _local5, _local6, _local7, _local8); timeBonusS.filters = new Array(_local9, _local18); }; } else { if (timeBonusS.visible){ timeBonusS.visible = false; timeBonusLabel.visible = false; }; _local10 = (game.levelCountDown / game.levelTicks); if (_local10 < 0){ _local10 = 0; } else { if (_local10 > 1){ _local10 = 1; }; }; fluid.scaleY = _local10; }; lastState = game.state; return (Time.CONTINUE); } public function init(_arg1:GameC):void{ this.game = _arg1; Time.startRender(this); GameData.translateTextfields(this); } } }//package client
Section 7
//LineMc (client.LineMc) package client { import mutual.*; import flash.display.*; import util.*; public class LineMc extends MovieClip implements Renderable { public var endY:int; public var length:int; public var scaleAlongX:Boolean; public var endScaleX:Number;// = 1 public var endScaleY:Number;// = 1 public var chainResize:ChainResize;// = null public var endTick:int; public var endX:int; public var startTick:int; public function render(_arg1:int, _arg2:Number):int{ var _local3:int = chainResize.render(_arg1, _arg2); return (_local3); } public function init(_arg1:Pos, _arg2:Pos, _arg3:Boolean, _arg4:Boolean):void{ var _local5:Pos = _arg1.getDirection(_arg2); var _local6 = 10; if (_arg3){ _local6 = 26; }; var _local7:Pos = _local5.multiplyCreate(new Pos(_local6, _local6)); var _local8:Pos = _arg1.addCreate(_local7); var _local9 = -10; if (_arg4){ _local9 = -26; }; var _local10:Pos = _local5.multiplyCreate(new Pos(_local9, _local9)); var _local11:Pos = _arg2.addCreate(_local10); x = _local8.x; y = _local8.y; var _local12 = 1; if (_local5 == Pos.RIGHT){ _local12 = 1; } else { if (_local5 == Pos.DOWN){ _local12 = 4; } else { if (_local5 == Pos.LEFT){ _local12 = 3; } else { if (_local5 == Pos.UP){ _local12 = 2; }; }; }; }; gotoAndStop(_local12); if (_arg2.x == _arg1.x){ scaleAlongX = false; length = Math.abs((_local11.y - _local8.y)); endScaleY = (length / height); scaleY = 0; } else { scaleAlongX = true; length = Math.abs((_local11.x - _local8.x)); endScaleX = (length / width); scaleX = 0; }; chainResize = new ChainResize(this); var _local13:int = Time.getTick(); } } }//package client
Section 8
//MatchAnimation (client.MatchAnimation) package client { import mutual.*; import util.*; public class MatchAnimation implements Renderable { public var selected:Tile;// = null public var startTick:int; public var scorePopTick:int; public var tilesC:TilesC;// = null public var tile:Tile;// = null public var destructionTick:int; public var scorePop1:ScorePopMc;// = null public var scorePop2:ScorePopMc;// = null public var pathAnimation:PathAnimationS;// = null public var fallTick:int; public var isMatch:Boolean; public var scoreTxt:String;// = "" public static const DISAPPEAR_RESIZE_TICKS = 17; public static const DRAW_WRONG_PATH_TICKS:int = 20; public static const PATH_FADE_TICKS:int = 10; public static const DRAW_PATH_TICKS:int = 10; public static const FALL_TICKS:int = 9; public static const WAIT_FROM_SCORE_TO_FALL_TICKS:int = 10; public function MatchAnimation(_arg1:TilesC, _arg2:Tile, _arg3:Tile, _arg4:Array, _arg5:Boolean){ var _local6:int; var _local7:int; super(); this.tilesC = _arg1; this.tile = _arg2; this.selected = _arg3; this.isMatch = _arg5; scoreTxt = (GameData.getText("score_label") + ": "); startTick = Time.getTick(); pathAnimation = new PathAnimationS(_arg1); _arg1.sprite.addChild(pathAnimation); pathAnimation.startPath(_arg4, startTick, _arg5); if (_arg5){ pathAnimation.fadeTick = (startTick + MatchAnimation.DRAW_PATH_TICKS); pathAnimation.removeTick = (pathAnimation.fadeTick + MatchAnimation.FALL_TICKS); _local6 = pathAnimation.fadeTick; _local7 = (_local6 + MatchAnimation.DISAPPEAR_RESIZE_TICKS); TileC(_arg2).initDisappear(_local6, _local7); TileC(_arg3).initDisappear(_local6, _local7); scorePopTick = (startTick + MatchAnimation.DRAW_PATH_TICKS); fallTick = (scorePopTick + MatchAnimation.WAIT_FROM_SCORE_TO_FALL_TICKS); destructionTick = (fallTick + MatchAnimation.FALL_TICKS); if (Game.ANIMATING_SUCCESS_TICKS != (destructionTick - startTick)){ trace(("good " + (destructionTick - startTick))); trace("MatchAnimation good is out of sync with Game"); }; } else { pathAnimation.fadeTick = (startTick + MatchAnimation.DRAW_WRONG_PATH_TICKS); pathAnimation.removeTick = (pathAnimation.fadeTick + MatchAnimation.FALL_TICKS); destructionTick = pathAnimation.removeTick; if (Game.ANIMATING_SUCCESS_TICKS != (destructionTick - startTick)){ trace(("bad " + (destructionTick - startTick))); trace("MatchAnimation bad is out of sync with Game"); }; }; Time.startRender(this); } public function render(_arg1:int, _arg2:Number):int{ var _local3:TileC; if (isMatch){ if (_arg1 > scorePopTick){ if (scorePop1 == null){ scorePop1 = new ScorePopMc(TileC(tile).mc, 0); tilesC.sprite.addChild(scorePop1); scorePop2 = new ScorePopMc(TileC(selected).mc, tilesC.game.score.getLastPairScore()); tilesC.sprite.addChild(scorePop2); }; }; if (_arg1 > fallTick){ while (tilesC.fallingTiles.size() > 0) { _local3 = TileC(tilesC.fallingTiles.pop()); _local3.startFallAnimation(Time.getTick(), MatchAnimation.FALL_TICKS); }; }; }; if (_arg1 >= destructionTick){ tilesC.gameC.scoreDisplay.score.text = (scoreTxt + tilesC.game.score.getTotalScore()); tilesC.destroyMatchAnimation(); return (Time.STOP); }; return (Time.CONTINUE); } } }//package client
Section 9
//OutroS (client.OutroS) package client { import flash.events.*; import flash.media.*; import mutual.*; import flash.text.*; import flash.display.*; import util.*; public class OutroS extends Sprite implements Renderable { public var flyingBugRotation:ChainRotation;// = null public var isGood:Boolean; public var maskedLeafs:MaskedLeafsS; public var light:LightMc; private var seconds:String; public var endTick:int; public var gameQuitSent:Boolean;// = false public var scoreCount:ChainTextCount; public var startTick:int; private var gameQuitReadyTick:int; public var titles:Titles; public var countDownTf:TextField; public var scoreTf:TextField; public var totalScore:int; public var blackAlphaOut:ChainAlpha;// = null public var alphaIn:ChainAlpha;// = null public var levelsPlayedTf:TextField; public var main:Main;// = null public var flyingBugMovement:ChainMovement;// = null private var endsIn:String; public var bird:BirdS; private var gameQuitReady:Boolean;// = false public var numbers:Numbers; public var registerToPlay:RegisterToPlay; public var leafs:LeafsS; public var flyingBug:FlyingBugS; public var birdStateChangeTick:int;// = 2147483647 public var countDownSeconds:int;// = -1 public var levels:int; public var flyingBugResize:ChainResize;// = null public var birdPlayer:FramePlayer;// = null public var black:Shape;// = null public static const MINIMAL_GAME_QUIT_DELAY:int = 120; public static const TICKS:int = 840; public function OutroS(_arg1:Boolean, _arg2:int, _arg3:int, _arg4:Main, _arg5:int){ var _local7:ChainGlow; var _local8:int; var _local9:int; super(); Time.stopAll(); this.isGood = _arg1; this.levels = _arg2; this.totalScore = _arg3; this.main = _arg4; startTick = Time.getTick(); endTick = (startTick + OutroS.TICKS); endsIn = GameData.getText("game_ends_in"); seconds = GameData.getText("seconds"); bird.wink.stop(); bird.speak2.stop(); bird.speak1.stop(); light.stop(); if (!_arg1){ removeChild(bird); removeChild(flyingBug); removeChild(leafs); removeChild(maskedLeafs); }; if (_arg5 == Game.SHORT_GAME_END){ _local7 = new ChainGlow(registerToPlay); _local8 = Time.getTick(); _local9 = 0; while (_local9 < 100) { _local7.add(_local8, 0xFFCC00, 1, 0, 0, 1.6); _local8 = (_local8 + 30); _local7.add(_local8, 0xFFCC00, 1, 8, 8, 1.6); _local8 = (_local8 + 30); _local9++; }; Time.startRender(_local7); } else { registerToPlay.visible = false; }; GameData.translateTextfields(this); alpha = 0; black = new Shape(); black.graphics.beginFill(0xFFFFFF); black.graphics.drawRect(0, 0, 754, 600); addChild(black); alphaIn = new ChainAlpha(this); alphaIn.addAlpha(startTick, 0); alphaIn.addAlpha((startTick + 20), 1); Time.startRender(alphaIn); blackAlphaOut = new ChainAlpha(black); blackAlphaOut.addAlpha((startTick + 30), 1); blackAlphaOut.addAlpha((startTick + 40), 0); Time.startRender(blackAlphaOut); var _local6:FramePlayer = new FramePlayer(light, (startTick + 60), 30); Time.startRender(_local6); numbers.levelsPlayedTf.text = ("" + _arg2); scoreTf = numbers.scoreTf; scoreTf.text = ""; scoreCount = new ChainTextCount(scoreTf); scoreCount.addValue((startTick + 100), 0); scoreCount.addValue((startTick + 200), _arg3); Time.startRender(scoreCount); gameQuitReadyTick = (startTick + 220); flyingBug.moueEnabled = false; flyingBug.y = (50 + (Math.random() * 500)); birdStateChangeTick = ((Time.getTick() + 60) + (Math.random() * 120)); bird.wink.visible = true; bird.speak1.visible = false; bird.speak2.visible = false; } public function switchClickListener():void{ removeEventListener(MouseEvent.CLICK, finishScoreAnimation); addEventListener(MouseEvent.CLICK, gameQuit); gameQuitReady = true; } public function finishScoreAnimation(_arg1:Event):void{ switchClickListener(); scoreTf.text = ("" + totalScore); Time.stopRender(scoreCount); } public function render(_arg1:int, _arg2:Number):int{ if (_arg1 >= (startTick + 40)){ addEventListener(MouseEvent.CLICK, finishScoreAnimation); }; if (((!(gameQuitReady)) && ((_arg1 >= gameQuitReadyTick)))){ switchClickListener(); }; if (((!(gameQuitSent)) && ((_arg1 >= endTick)))){ gameQuitSent = true; removeEventListener(MouseEvent.CLICK, gameQuit); countDownTf.text = ((((endsIn + " ") + 0) + " ") + seconds); if (Main.DEV_MODE){ Time.stopAll(); Time.setListener(null); Time.stop(); }; main.gameQuit(); }; if (((isGood) && ((_arg1 <= endTick)))){ updateLadyBug(_arg1, _arg2); updateBird(_arg1, _arg2); }; var _local3:int = (endTick - _arg1); var _local4:int = (_local3 / Game.TICKS_PER_SECOND); if (countDownSeconds != _local4){ countDownSeconds = _local4; if (countDownSeconds >= 0){ countDownTf.text = ((((endsIn + " ") + countDownSeconds) + " ") + seconds); }; }; return (Time.CONTINUE); } public function updateBird(_arg1:int, _arg2:Number):void{ var _local3:int; var _local4:Sound; if (_arg1 >= birdStateChangeTick){ birdStateChangeTick = int.MAX_VALUE; _local3 = (Math.random() * 3); bird.wink.visible = false; bird.speak1.visible = false; bird.speak2.visible = false; switch (_local3){ case 0: bird.wink.visible = true; birdPlayer = new FramePlayer(bird.wink, _arg1, 30); bird.setChildIndex(bird.wink, (bird.numchildren - 1)); break; case 1: bird.speak1.visible = true; birdPlayer = new FramePlayer(bird.speak1, _arg1, 30); bird.setChildIndex(bird.speak1, (bird.numchildren - 1)); _local4 = new Bird1Snd(); main.soundManager.startSound(_local4, 0.3); break; case 2: bird.speak2.visible = true; birdPlayer = new FramePlayer(bird.speak2, _arg1, 50); bird.setChildIndex(bird.speak2, (bird.numchildren - 1)); _local4 = new Bird2Snd(); main.soundManager.startSound(_local4, 0.3); break; }; }; if (birdPlayer != null){ if (birdPlayer.render(_arg1, _arg2) == Time.STOP){ birdPlayer.movieClip.gotoAndStop(0); birdPlayer = null; birdStateChangeTick = ((_arg1 + 120) + (Math.random() * 360)); }; }; } public function updateLadyBug(_arg1:int, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:Number; var _local12:int; var _local13:int; var _local14:Number; var _local15:Sound; var _local16:int; var _local17:int; var _local18:int; var _local19:SoundPlayer; if (flyingBugMovement == null){ flyingBugResize = new ChainResize(flyingBug); _local3 = flyingBug.scaleY; _local4 = (0.7 + (Math.random() * 0.3)); flyingBugMovement = new ChainMovement(flyingBug); _local5 = flyingBug.y; _local5 = verticalOk(_local5); do { _local6 = (50 + (Math.random() * 500)); } while (Math.abs((_local5 - _local6)) < 40); _local7 = -150; _local8 = (754 + 150); _local9 = _local7; _local10 = _local8; _local11 = 1; if (flyingBug.x == _local8){ _local9 = _local8; _local10 = _local7; _local11 = -1; }; flyingBugRotation = new ChainRotation(flyingBug); _local12 = 1; _local13 = 0; if (int((Math.random() * 7)) == 4){ _local13 = 360; }; if (_local9 < _local10){ _local14 = ((Math.atan2((_local6 - _local5), (_local10 - _local9)) * 180) / Math.PI); _local15 = new BugRightSnd(); } else { _local14 = ((Math.atan2((_local5 - _local6), (_local9 - _local10)) * 180) / Math.PI); _local15 = new BugLeftSnd(); }; _local16 = (60 + (Math.random() * 160)); _local17 = (_arg1 + _local16); _local18 = ((_arg1 + _local16) + 100); flyingBugMovement.addMove(_local17, _local9, _local5); flyingBugMovement.addMove(_local18, _local10, _local6); flyingBugResize.addResize(_local17, (_local3 * _local11), _local3); flyingBugResize.addResize(_local18, (_local4 * _local11), _local4); flyingBugRotation.addRotation(_local17, 0); flyingBugRotation.addRotation(_local18, (_local14 + _local13), _local12); _local19 = new SoundPlayer(_local17, main, _local15, 0.3); Time.startRender(_local19); }; flyingBugResize.render(_arg1, _arg2); flyingBugRotation.render(_arg1, _arg2); if (flyingBugMovement.render(_arg1, _arg2) == Time.STOP){ flyingBugMovement = null; flyingBugResize = null; }; } public function gameQuit(_arg1:MouseEvent):void{ main.soundManager.outroFadeOut(); var _local2:int = Time.getTick(); endTick = (startTick + OutroS.MINIMAL_GAME_QUIT_DELAY); removeEventListener(MouseEvent.CLICK, gameQuit); } public function verticalOk(_arg1:int):int{ if (_arg1 < 50){ _arg1 = (50 + Math.abs(_arg1)); } else { if (_arg1 > 550){ _arg1 = (550 - (_arg1 - 550)); }; }; return (_arg1); } } }//package client
Section 10
//PathAnimationS (client.PathAnimationS) package client { import mutual.*; import flash.display.*; import util.*; public class PathAnimationS extends Sprite implements Renderable { public var removeTick:int; public var grid:TilesC;// = null public var fader:Fader;// = null public var fadeTick:int; public var generations:Array;// = null public function PathAnimationS(_arg1:TilesC){ this.grid = _arg1; } public function render(_arg1:int, _arg2:Number):int{ if (_arg1 >= fadeTick){ if (fader == null){ fader = new Fader(this, _arg1, removeTick, 1, 0); }; fader.update(_arg1, _arg2); } else { if (_arg1 >= removeTick){ return (Time.STOP_REMOVE); }; }; return (Time.CONTINUE); } public function startPath(_arg1:Array, _arg2:int, _arg3:Boolean){ var _local6:Node; var _local10:Pos; var _local11:int; var _local12:Number; var _local13:Number; var _local14:Pos; var _local15:Pos; var _local16:LineMc; var _local17:Boolean; var _local18:Boolean; var _local19:Pos; var _local20:PipeCornerMc; var _local21:Object; var _local22:LineMc; var _local23:PipeCornerMc; var _local4:Array = new Array(); var _local5 = -1; var _local7:int; var _local8:Array = new Array(); var _local9:int; while (_local9 < _arg1.length) { _local6 = Node(_arg1[_local9]); _local10 = grid.getPixel(_local6); _local4[_local6.generation] = _local10; _local9++; }; if (_local6.steps == 1){ } else { Time.startRender(this); _local11 = 0; while (_local11 < (_local4.length - 1)) { _local14 = Pos(_local4[_local11]); _local15 = Pos(_local4[(_local11 + 1)]); if (_arg3){ _local16 = new LineMc(); } else { _local16 = new WrongLineMc(); }; _local17 = false; if (_local11 == 0){ _local17 = true; }; _local18 = false; if (_local11 == (_local4.length - 2)){ _local18 = true; }; _local16.init(_local14, _local15, _local17, _local18); _local7 = (_local7 + _local16.length); addChild(_local16); _local8.push(_local16); if (_local11 < (_local4.length - 2)){ _local19 = Pos(_local4[(_local11 + 2)]); if (_arg3){ _local20 = new PipeCornerMc(); } else { _local20 = new WrongPipeCornerMc(); }; _local20.x = _local15.x; _local20.y = _local15.y; addChild(_local20); _local8.push(_local20); _local20.init(_local14, _local15, _local19); _local7 = (_local7 + 20); }; _local11++; }; if (_arg3){ _local12 = (_local7 / MatchAnimation.DRAW_PATH_TICKS); } else { _local12 = (_local7 / MatchAnimation.DRAW_WRONG_PATH_TICKS); }; _local13 = (_arg2 + 0); while (_local8.length > 0) { _local21 = _local8.shift(); if ((_local21 is LineMc)){ _local22 = LineMc(_local21); _local22.chainResize.addResize(_local13, _local22.scaleX, _local22.scaleY); _local13 = (_local13 + (_local22.length / _local12)); _local22.chainResize.addResize(_local13, _local22.endScaleX, _local22.endScaleY); Time.startRender(_local22); } else { _local23 = PipeCornerMc(_local21); _local23.startTick = _local13; _local13 = (_local13 + (_local23.LENGTH / _local12)); _local23.endTick = _local13; Time.startRender(_local23); }; }; }; } } }//package client
Section 11
//PipeCornerMc (client.PipeCornerMc) package client { import mutual.*; import flash.display.*; import util.*; public class PipeCornerMc extends MovieClip implements Renderable { public const LENGTH:int = 20; public var directionIn:Pos;// = null public var directionOut:Pos;// = null public var endTick:int; public var startTick:int; public function PipeCornerMc(){ stop(); } public function isHorizontal(_arg1:Pos):Boolean{ return ((((_arg1 == Pos.RIGHT)) || ((_arg1 == Pos.LEFT)))); } public function render(_arg1:int, _arg2:Number):int{ if (_arg1 >= startTick){ visible = true; return (Time.STOP); }; return (Time.CONTINUE); } public function init(_arg1:Pos, _arg2:Pos, _arg3:Pos):void{ var _local6:Pos; var _local7:Pos; var _local4:Pos = _arg2.getDirection(_arg1); var _local5:Pos = _arg2.getDirection(_arg3); if (isHorizontal(_local4)){ _local6 = _local4; _local7 = _local5; } else { _local6 = _local5; _local7 = _local4; }; if (_local6 == Pos.LEFT){ if (_local7 == Pos.DOWN){ gotoAndStop(2); } else { gotoAndStop(1); }; } else { if (_local7 == Pos.UP){ gotoAndStop(4); } else { gotoAndStop(3); }; }; visible = false; } } }//package client
Section 12
//ScorePopMc (client.ScorePopMc) package client { import flash.display.*; import util.*; public class ScorePopMc extends MovieClip implements Renderable { public var textContainer:ScorePopText; private var chainResize:ChainResize;// = null private var framePlayer:FramePlayer;// = null public static const TEXT_SCALE_UP_TICKS:int = 20; public static const TOTAL_TICKS:int = 40; public function ScorePopMc(_arg1:Sprite, _arg2:int=0){ x = _arg1.x; y = _arg1.y; var _local3:int = Time.getTick(); if (_arg2 != 0){ textContainer.textField.text = ("" + _arg2); textContainer.scaleX = 0; textContainer.scaleY = 0; chainResize = new ChainResize(textContainer); chainResize.addResize(_local3, 0, 0); chainResize.addResize((_local3 + ScorePopMc.TEXT_SCALE_UP_TICKS), 1, 1); } else { textContainer.visible = false; }; stop(); framePlayer = new FramePlayer(this, _local3, ScorePopMc.TOTAL_TICKS, 0); mouseEnabled = false; mouseChildren = false; Time.startRender(this); } public function render(_arg1:int, _arg2:Number):int{ if (chainResize != null){ chainResize.render(_arg1, _arg2); }; if (framePlayer.render(_arg1, _arg2) == Time.STOP){ return (Time.STOP_REMOVE); }; return (Time.CONTINUE); } } }//package client
Section 13
//ShuffleAnimation (client.ShuffleAnimation) package client { import flash.display.*; import util.*; public class ShuffleAnimation implements Renderable { public var fg:Sprite;// = null public var bounce:Bounce;// = null public var chainMovement:ChainMovement;// = null public var fall1:Fall;// = null public var sign:SignS;// = null public var fall2:Fall;// = null public static const STAY_TICKS:int = 100; public static const HORIZONTAL_OUT:int = 400; public static const OUT_TICKS:int = 10; public static const VERTICAL_OUT:int = 400; public static const IN_TICKS:int = 10; public function ShuffleAnimation(_arg1:GameC, _arg2:Sprite, _arg3:SignS, _arg4:Sprite, _arg5:int, _arg6:int){ var _local9:MovePoint; super(); this.fg = _arg2; this.sign = _arg3; var _local7:ChainBlur = new ChainBlur(_arg4); _local7.addBlur(_arg6, 0, 0); _local7.addBlur((_arg6 + 20), 8, 8); _local7.addBlur((_arg6 + 105), 8, 8); _local7.addBlur((_arg6 + 120), 0, 0); Time.startRender(_local7); _arg3.x = 377; _arg3.y = 300; var _local8:int = _arg6; _local9 = new MovePoint(_local8, _arg3.x, _arg3.y); _local8 = (_local8 + ShuffleAnimation.IN_TICKS); var _local10:MovePoint = new MovePoint(_local8, _arg3.x, _arg3.y); bounce = new Bounce(_arg3); bounce.direction = _arg5; bounce.magnitude = 40; bounce.frequency = 0.4; bounce.startTick = (_local8 + 1); bounce.endTick = (_local8 + 25); Time.startRender(bounce); _local8 = (_local8 + ShuffleAnimation.STAY_TICKS); var _local11:MovePoint = new MovePoint(_local8, _arg3.x, _arg3.y); _local8 = (_local8 + ShuffleAnimation.OUT_TICKS); var _local12:MovePoint = new MovePoint(_local8, _arg3.x, _arg3.y); switch (_arg5){ case 0: _local9.y = (_local9.y + -(ShuffleAnimation.VERTICAL_OUT)); _local12.y = (_local12.y + ShuffleAnimation.VERTICAL_OUT); break; case 1: _local9.x = (_local9.x + ShuffleAnimation.HORIZONTAL_OUT); _local12.x = (_local12.x + -(ShuffleAnimation.HORIZONTAL_OUT)); break; case 2: _local9.y = (_local9.y + ShuffleAnimation.VERTICAL_OUT); _local12.y = (_local12.y + -(ShuffleAnimation.VERTICAL_OUT)); break; case 3: _local9.x = (_local9.x + -(ShuffleAnimation.HORIZONTAL_OUT)); _local12.x = (_local12.x + ShuffleAnimation.HORIZONTAL_OUT); break; default: trace("error in GridC.getPixel"); }; chainMovement = new ChainMovement(_arg3); chainMovement.addMovePoint(_local9); chainMovement.addMovePoint(_local10); chainMovement.addMovePoint(_local11); chainMovement.addMovePoint(_local12); Time.startRender(this); _arg3.x = _local9.x; _arg3.y = _local9.y; _arg2.addChild(_arg3); _arg1.main.soundManager.startSound(new ShuffleSnd(), 0.4); Time.startRender(this); } public function render(_arg1:int, _arg2:Number):int{ if (chainMovement.render(_arg1, _arg2) == Time.STOP){ fg.removeChild(sign); return (Time.STOP); }; return (Time.CONTINUE); } } }//package client
Section 14
//SignS (client.SignS) package client { import flash.text.*; import flash.display.*; import util.*; import flash.filters.*; public class SignS extends Sprite implements Renderable { public var bounce:Bounce;// = null public var shuffling_:TextField; public var chainMovement:ChainMovement;// = null public var fall1:Fall;// = null public var fall2:Fall;// = null public static const STAY_TICKS:int = 100; public static const HORIZONTAL_OUT:int = 400; public static const OUT_TICKS:int = 10; public static const VERTICAL_OUT:int = 400; public static const IN_TICKS:int = 10; public function SignS(){ var _local1:Number = 9062172; var _local2:Number = 1; var _local3:Number = 10; var _local4:Number = 10; var _local5:Number = 1; var _local6:Number = BitmapFilterQuality.LOW; var _local7:GlowFilter = new GlowFilter(_local1, _local2, _local3, _local4, _local5, _local6); filters = [_local7]; GameData.translateTextfields(this); } public function init(_arg1:int, _arg2:int):void{ x = 377; y = 300; var _local3:int = _arg2; var _local4:MovePoint = new MovePoint(_local3, x, y); _local3 = (_local3 + SignS.IN_TICKS); var _local5:MovePoint = new MovePoint(_local3, x, y); bounce = new Bounce(this); bounce.direction = _arg1; bounce.magnitude = 40; bounce.frequency = 0.4; bounce.startTick = (_local3 + 1); bounce.endTick = (_local3 + 25); Time.startRender(bounce); _local3 = (_local3 + SignS.STAY_TICKS); var _local6:MovePoint = new MovePoint(_local3, x, y); _local3 = (_local3 + SignS.OUT_TICKS); var _local7:MovePoint = new MovePoint(_local3, x, y); switch (_arg1){ case 0: _local4.y = (_local4.y + -(SignS.VERTICAL_OUT)); _local7.y = (_local7.y + SignS.VERTICAL_OUT); break; case 1: _local4.x = (_local4.x + SignS.HORIZONTAL_OUT); _local7.x = (_local7.x + -(SignS.HORIZONTAL_OUT)); break; case 2: _local4.y = (_local4.y + SignS.VERTICAL_OUT); _local7.y = (_local7.y + -(SignS.VERTICAL_OUT)); break; case 3: _local4.x = (_local4.x + -(SignS.HORIZONTAL_OUT)); _local7.x = (_local7.x + SignS.HORIZONTAL_OUT); break; default: trace("error in GridC.getPixel"); }; chainMovement = new ChainMovement(this); chainMovement.addMovePoint(_local4); chainMovement.addMovePoint(_local5); chainMovement.addMovePoint(_local6); chainMovement.addMovePoint(_local7); Time.startRender(this); x = _local4.x; y = _local4.y; } public function render(_arg1:int, _arg2:Number):int{ if (chainMovement.render(_arg1, _arg2) == Time.STOP){ return (Time.STOP_REMOVE); }; return (Time.CONTINUE); } } }//package client
Section 15
//SoundManager (client.SoundManager) package client { import flash.events.*; import flash.media.*; import util.*; import flash.utils.*; public class SoundManager { public const OUTRO_DELAY:int = 400; public const LOOP_DELAY:int = 400; public const OUTRO_FADE_OUT:int = 1400; private var introSoundChannel:SoundChannel; private var introSound:Sound; private var outroSoundTransform:SoundTransform; private var timeWarningSoundTransform:SoundTransform; private var timeWarningSoundChannel:SoundChannel; private var loopFaded:Boolean;// = false public var outroSoundChannel:SoundChannel; private var introSoundTransform:SoundTransform; private var loopSoundChannel:SoundChannel; private var timeWarningSound:Sound; private var outroSound:Sound; private var timer:Timer; private var loopStartTimer:Timer;// = null private var loopSound:Sound; private var soundOn:Boolean;// = true public var lightSoundPlayer:SoundPlayer;// = null private var loopSoundTransform:SoundTransform; private var musicOn:Boolean;// = true public static const VOLUME_CLICK:Number = 0.7; public static const VOLUME_OUTRO:Number = 0.7; public static const VOLUME_PENALTY:Number = 0.7; public static const VOLUME_LEVEL_WIN_POINTS:Number = 0.7; public static const VOLUME_TIME_WARNING:Number = 0.7; public static const VOLUME_MISSION_WIN_PONINTS:Number = 0.7; public static const VOLUME_MINI_GAME_MATCH:Number = 0.7; public static const STEREO_INTENSITY:Number = 0.7; public static const VOLUME_INTRO:Number = 0.6; public static const VOLUME_LOOP:Number = 0.3; public static const VOLUME_HINT:Number = 0.7; public static const VOLUME_NOT_FOUND:Number = 0.7; public static const VOLUME_ROLL_OVER:Number = 0.7; public static const VOLUME_OUTRO_SCORE:Number = 0.7; public static const VOLUME_FOUND:Number = 0.7; public function startIntroSound(_arg1:Event=null):void{ var _local2:Number = SoundManager.VOLUME_INTRO; if (!musicOn){ _local2 = 0; }; introSoundTransform = new SoundTransform(_local2); introSound = new IntroSnd(); introSoundChannel = introSound.play(0, 0, introSoundTransform); } public function gameEnd(_arg1:Boolean=false):void{ var _local4:Number; var _local5:SoundTransform; var _local6:Sound; var _local7:SoundChannel; if (loopStartTimer != null){ loopStartTimer.stop(); }; var _local2:int = OUTRO_DELAY; if (_arg1){ _local4 = 0.5; if (!soundOn){ _local4 = 0; }; _local5 = new SoundTransform(_local4); _local6 = new TimeEndSnd(); _local7 = _local6.play(0, 0, _local5); _local2 = (_local2 + 2000); } else { fadeOutLoops(); }; var _local3:Timer = new Timer(_local2, 1); _local3.addEventListener("timerComplete", startOutroSound); _local3.start(); } public function toggleSound(_arg1:MouseEvent=null):void{ soundOn = !(soundOn); if (!soundOn){ if (timeWarningSoundChannel != null){ timeWarningSoundChannel.soundTransform = new SoundTransform(0); }; } else { if (timeWarningSoundChannel != null){ timeWarningSoundChannel.soundTransform = new SoundTransform(SoundManager.VOLUME_TIME_WARNING); }; }; } public function unMuteLoop(_arg1:Event=null):void{ var _local2:Number = SoundManager.VOLUME_LOOP; if (!musicOn){ _local2 = 0; }; loopSoundChannel.soundTransform = new SoundTransform(_local2); loopFaded = false; } public function gameStart(_arg1:Event=null):void{ if (introSoundChannel != null){ new SoundFader(introSoundChannel, LOOP_DELAY); }; if (lightSoundPlayer != null){ Time.stopRender(lightSoundPlayer); if (lightSoundPlayer.soundChannel != null){ new SoundFader(lightSoundPlayer.soundChannel, LOOP_DELAY); }; }; var _local2:Number = SoundManager.VOLUME_LOOP; if (!musicOn){ _local2 = 0; }; if (loopSound == null){ loopSoundTransform = new SoundTransform(_local2); loopSound = new LoopSnd(); }; loopSoundChannel = loopSound.play(0, int.MAX_VALUE, loopSoundTransform); } public function getMusicOn():Boolean{ return (musicOn); } public function levelClear():void{ muteLoop(); startLevelClearSnd(); } public function toggleMusic(_arg1:Event=null):void{ musicOn = !(musicOn); if (musicOn){ startMusic(); } else { stopMusic(); }; } public function outroFadeOut():void{ if (outroSoundChannel != null){ new SoundFader(outroSoundChannel, OUTRO_FADE_OUT); }; } public function getSoundOn():Boolean{ return (soundOn); } protected function playSound(_arg1:Sound, _arg2:Number, _arg3:int=0, _arg4:Number=0):SoundChannel{ var _local5:SoundTransform = new SoundTransform(_arg2, _arg4); var _local6:Sound = _arg1; var _local7:SoundChannel = _local6.play(0, _arg3, _local5); return (_local7); } public function fadeOutLoops():void{ if (introSoundChannel != null){ new SoundFader(introSoundChannel, OUTRO_DELAY); }; if (((!(loopFaded)) && (!((loopSoundChannel == null))))){ new SoundFader(loopSoundChannel, OUTRO_DELAY); loopFaded = true; }; } public function stopMusic():void{ if (loopSoundChannel != null){ loopSoundChannel.soundTransform = new SoundTransform(0); }; if (introSoundChannel != null){ introSoundChannel.soundTransform = new SoundTransform(0); }; if (outroSoundChannel != null){ outroSoundChannel.soundTransform = new SoundTransform(0); }; } public function levelStart():void{ unMuteLoop(); } public function startSound(_arg1:Sound, _arg2:Number, _arg3:int=0, _arg4:Number=0):SoundChannel{ if (soundOn){ return (playSound(_arg1, _arg2, _arg3, _arg4)); }; return (null); } public function startOutroSound(_arg1:Event=null):void{ var _local2:Number = SoundManager.VOLUME_OUTRO; if (!musicOn){ _local2 = 0; }; outroSoundTransform = new SoundTransform(_local2); outroSound = new OutroSnd(); outroSoundChannel = outroSound.play(0, 0, outroSoundTransform); } public function startLevelClearSnd(_arg1:Event=null):void{ startSound(new LevelClearSnd(), 0.7); } public function muteLoop(_arg1:Event=null):void{ var _local2:Number; if (loopSoundChannel != null){ _local2 = 0; loopSoundChannel.soundTransform = new SoundTransform(_local2); }; } public function startMusic():void{ if (musicOn){ if (loopSoundChannel != null){ loopSoundChannel.soundTransform = new SoundTransform(SoundManager.VOLUME_LOOP); }; if (introSoundChannel != null){ introSoundChannel.soundTransform = new SoundTransform(SoundManager.VOLUME_INTRO); }; if (outroSoundChannel != null){ outroSoundChannel.soundTransform = new SoundTransform(SoundManager.VOLUME_OUTRO); }; }; } } }//package client
Section 16
//SoundPlayer (client.SoundPlayer) package client { import flash.media.*; import util.*; public class SoundPlayer implements Renderable { public var sound:Sound;// = null public var panning:Number; public var repeats:int; public var main:Main;// = null public var volume:Number; public var soundChannel:SoundChannel;// = null public var startTick:int; public function SoundPlayer(_arg1:int, _arg2:Main, _arg3:Sound, _arg4:Number, _arg5:int=0, _arg6:Number=0){ this.startTick = _arg1; this.main = _arg2; this.sound = _arg3; this.volume = _arg4; this.repeats = repeats; this.panning = _arg6; } public function render(_arg1:int, _arg2:Number):int{ if (_arg1 >= startTick){ soundChannel = main.soundManager.startSound(sound, volume, repeats, panning); return (Time.STOP); }; return (Time.CONTINUE); } } }//package client
Section 17
//TileC (client.TileC) package client { import flash.events.*; import mutual.*; import util.*; public class TileC extends Tile implements Renderable { private var selectionPlayer:FramePlayer;// = null private var chainResize:ChainResize;// = null public var mc:TileMc;// = null public var tilesC:TilesC;// = null public static const SELECT_TICKS:int = 15; public function TileC(_arg1:int, _arg2:int){ super(_arg1, _arg2); mc = TileMc.getTileMc(); mc.selection.stop(); mc.gotoAndStop((_arg1 + 1)); mc.mouseChildren = false; mc.addEventListener(MouseEvent.MOUSE_DOWN, click); } public function initDisappear(_arg1:int, _arg2:int):void{ chainResize = new ChainResize(mc); chainResize.addResize(_arg1, 1, 1); chainResize.addResize(_arg2, 0, 0); Time.startRender(this); } public function select():void{ Time.startRender(this); selectionPlayer = new FramePlayer(mc.selection, Time.getTick(), TileC.SELECT_TICKS, 0); } public function resetAnimations():void{ selectionPlayer = null; chainResize = null; Time.stopRender(this); } public function startFallAnimation(_arg1:int, _arg2:int):void{ var _local3:Fall = new Fall(mc); _local3.startTick = _arg1; _local3.endTick = (_arg1 + _arg2); var _local4:Pos = tilesC.getPixel(new Pos(col, row)); _local3.endX = _local4.x; _local3.endY = _local4.y; _local3.init(); Time.startRender(_local3); var _local5:Bounce = new Bounce(mc); _local5.startX = _local4.x; _local5.startY = _local4.y; _local5.startTick = (_local3.endTick + 1); _local5.endTick = (_local5.startTick + 8); _local5.direction = tiles.game.fallDirection; _local5.frequency = 0.7; _local5.magnitude = 12; Time.startRender(_local5); } public function click(_arg1:MouseEvent):void{ this.tiles.game.main.addPlayData([Game.TILE_CLICK, index]); } public function render(_arg1:int, _arg2:Number):int{ if (selectionPlayer != null){ if (selectionPlayer.render(_arg1, _arg2) == Time.STOP){ selectionPlayer = null; }; }; if (chainResize != null){ if (chainResize.render(_arg1, _arg2) == Time.STOP){ chainResize = null; tilesC.sprite.removeChild(mc); TileMc.saveTileMc(mc); }; }; if ((((selectionPlayer == null)) && ((chainResize == null)))){ return (Time.STOP); }; return (Time.CONTINUE); } override public function init(_arg1:int, _arg2:int, _arg3:Tiles):void{ super.init(_arg1, _arg2, _arg3); this.tilesC = TilesC(_arg3); var _local4:Pos = tilesC.getPixel(new Pos(_arg1, _arg2)); mc.x = _local4.x; mc.y = _local4.y; mc.alpha = 1; mc.scaleX = 1; mc.scaleY = 1; tilesC.sprite.addChild(mc); } public function forceUpdate():void{ var _local1:Pos = tilesC.getPixel(new Pos(col, row)); mc.x = _local1.x; mc.y = _local1.y; mc.scaleX = 1; mc.scaleY = 1; mc.visible = true; } public function deSelect():void{ Time.startRender(this); selectionPlayer = new FramePlayer(mc.selection, Time.getTick(), TileC.SELECT_TICKS, 0, false); } } }//package client
Section 18
//TileMc (client.TileMc) package client { import flash.display.*; public class TileMc extends MovieClip { public var selection:MovieClip; private static var unused:Array = null; public static function saveTileMc(_arg1:TileMc):void{ if (unused == null){ unused = new Array(); }; if (unused.indexOf(_arg1) == -1){ unused.push(_arg1); }; } public static function getTileMc():TileMc{ if ((((unused == null)) || ((unused.length == 0)))){ return (new (TileMc)); }; return (TileMc(unused.pop())); } } }//package client
Section 19
//TilesC (client.TilesC) package client { import mutual.*; import flash.display.*; public class TilesC extends Tiles { public var sprite:Sprite;// = null public var gameC:GameC;// = null public var matchAnimation:MatchAnimation;// = null public static const SPACING:int = 54; public static const CENTER_X:int = 412; public static const CENTER_Y:int = 273; public function TilesC(_arg1:Game){ super(_arg1); this.gameC = GameC(_arg1); sprite = new Sprite(); sprite.mouseEnabled = false; sprite.x = TilesC.CENTER_X; sprite.y = TilesC.CENTER_Y; gameC.middle.addChild(sprite); } override public function matchFound(_arg1:Tile, _arg2:Tile, _arg3:Array):void{ var _local4:Number = getPanning(TileC(_arg1)); super.matchFound(_arg1, _arg2, _arg3); game.main.soundManager.startSound(new SuccessSnd(), 0.4, 0, _local4); var _local5:Boolean; matchAnimation = new MatchAnimation(this, _arg1, _arg2, _arg3, _local5); } override public function init():void{ super.init(); } public function forceUpdate():void{ var _local2:TileC; var _local1:Array = super.getTilesInPlay(); for each (_local2 in _local1) { _local2.forceUpdate(); }; } override public function tooLongPath(_arg1:Tile, _arg2:Tile, _arg3:Array):void{ super.tooLongPath(_arg1, _arg2, _arg3); var _local4:Boolean; matchAnimation = new MatchAnimation(this, _arg1, _arg2, _arg3, _local4); var _local5:Number = getPanning(TileC(_arg1)); game.main.soundManager.startSound(new WrongSnd(), 0.4, 0, _local5); } public function getPixel(_arg1:Pos):Pos{ var _local2:int = ((_arg1.x - 1) * TilesC.SPACING); var _local3:int = ((_arg1.y - 1) * TilesC.SPACING); _local2 = (_local2 + (-(((layout.length / 2) * TilesC.SPACING)) + (TilesC.SPACING / 2))); _local3 = (_local3 + -215); var _local4:Pos; switch (gameC.fallDirection){ case 0: _local4 = new Pos(_local2, -(_local3)); break; case 1: _local4 = new Pos((_local3 - 65), _local2); break; case 2: _local4 = new Pos(-(_local2), _local3); break; case 3: _local4 = new Pos((-(_local3) + 65), -(_local2)); break; default: trace("error in GridC.getPixel"); }; return (_local4); } public function destroyMatchAnimation():void{ matchAnimation = null; } public function getPanning(_arg1:TileC):Number{ var _local2:Number = getPixel(_arg1.getPoint()).x; if (_local2 != 0){ _local2 = (_local2 / 500); }; return (_local2); } override public function setSelected(_arg1:Tile):void{ var _local2:TileC; var _local3:Number; if (selected != null){ _local2 = TileC(selected); _local2.deSelect(); }; super.setSelected(_arg1); if (_arg1 != null){ TileC(_arg1).select(); _local3 = getPanning(TileC(_arg1)); game.main.soundManager.startSound(new SelectSnd(), 0.4, 0, _local3); }; } } }//package client
Section 20
//Tray (client.Tray) package client { import mutual.*; import flash.display.*; import util.*; public class Tray extends Sprite { public var lineMask:Sprite;// = null public var tiles:TilesC;// = null public var surfaces:Array;// = null public var bottomLine:BottomLine;// = null public var movement:ChainMovement;// = null public var resize:ChainResize;// = null public var originalWidth:int; public var originalHeight:int; public var surface:Sprite;// = null public var direction:int; public static var CHANGE_TICKS:int = 20; public function Tray(){ surfaces = new Array(); surfaces[0] = new TrayDown(); surfaces[1] = new TrayLeft(); surfaces[2] = new TrayUp(); surfaces[3] = new TrayRight(); lineMask = new Sprite(); lineMask.graphics.beginFill(0xFF0000); lineMask.graphics.drawRect(-50, 0, 100, 12); bottomLine = new BottomLine(); bottomLine.y = -10; bottomLine.addChild(lineMask); bottomLine.mask = lineMask; addChild(bottomLine); } public function calculateNewValues():Array{ var _local12:int; var _local13:int; var _local15:TileC; var _local16:Pos; var _local1:int = (tiles.grid.getCols() - 1); var _local2:int = (tiles.grid.getRows() - 1); var _local3:int = int.MAX_VALUE; var _local4:int = int.MIN_VALUE; var _local5:int = int.MAX_VALUE; var _local6:int = int.MIN_VALUE; var _local7:Array = tiles.getTilesInPlay(); if (_local7.length == 0){ return ([x, y, 0, 0]); }; while (_local7.length > 0) { _local15 = TileC(_local7.pop()); _local16 = tiles.getPixel(_local15.getPoint()); if (_local16.x < _local3){ _local3 = _local16.x; }; if (_local16.x > _local4){ _local4 = _local16.x; }; if (_local16.y < _local5){ _local5 = _local16.y; }; if (_local16.y > _local6){ _local6 = _local16.y; }; }; var _local8:int = ((TilesC.CENTER_X + _local3) + ((_local4 - _local3) / 2)); var _local9:int = ((TilesC.CENTER_Y + _local5) + ((_local6 - _local5) / 2)); var _local10:int = ((_local4 - _local3) + 120); var _local11:int = ((_local6 - _local5) + 120); var _local14 = -34; switch (direction){ case 0: _local12 = 0; _local13 = ((_local11 / 2) + _local14); break; case 1: _local12 = ((-(_local10) / 2) - _local14); _local13 = 0; break; case 2: _local12 = 0; _local13 = ((-(_local11) / 2) - _local14); break; case 3: _local12 = ((_local10 / 2) + _local14); _local13 = 0; break; }; return ([_local8, _local9, _local10, _local11, _local12, _local13]); } public function setValues():void{ var _local1:Array = calculateNewValues(); x = int(_local1[0]); y = int(_local1[1]); if ((((direction == 1)) || ((direction == 3)))){ lineMask.width = (int(_local1[3]) - 66); } else { lineMask.width = (int(_local1[2]) - 66); }; surface.width = int(_local1[2]); surface.height = int(_local1[3]); bottomLine.x = int(_local1[4]); bottomLine.y = int(_local1[5]); } public function init(_arg1:TilesC, _arg2:int):void{ this.tiles = _arg1; this.direction = _arg2; if (surface != null){ removeChild(surface); }; surface = Sprite(surfaces[_arg2]); originalWidth = surface.width; originalHeight = surface.height; surface.alpha = 0.85; addChild(surface); this.swapChildren(surface, bottomLine); switch (_arg2){ case 0: bottomLine.rotation = 0; break; case 1: bottomLine.rotation = 90; break; case 2: bottomLine.rotation = 180; break; case 3: bottomLine.rotation = 270; break; }; } } }//package client
Section 21
//Game (mutual.Game) package mutual { import util.*; import client.*; public class Game implements TimeListener { public var fallDirection:int;// = 0 public var tiles:TilesC;// = null private var playData:Stack;// = null public var previousDirection:int;// = -1 public var state:int;// = 0 public var levelTicks:int;// = 0 public var previousState:int; public var stateChangeTick:int;// = -1 public var clockCountDown:int;// = 0 public var rand:Random;// = null public var pendingEndReason:int;// = -1 public var score:Score;// = null public var levelCountDown:int;// = 0 public var pendingTimeOut:Boolean;// = false public var main:Main;// = null public var mainRand:Random;// = null public static const ANIMATING_FAILURE_TICKS:int = 27; public static const GAME_OVER:int = 1; public static const MUSIC:int = 5; public static const LEVEL_CHANGE_TICKS:int = 220; public static const END_REASONS:Array = ["timeRanOut", "levelTimeRanOut", "userChoseExit", "shortGameEnd", "error", "completed"]; public static const ERROR_MESSAGE:int = 3; public static const INPUT_EXIT:int = 0; public static const STATE_STRINGS:Array = ["not started", "game over", "idle", "animating success", "shuffling", "animating failure", "level change"]; public static const USER_CHOSE_EXIT:int = 2; public static const TILE_CLICK:int = 2; public static const FIRST_LEVEL_ANIMATION_TICKS:int = 100; public static const SHUFFLE_PENALTY_TICKS:int = 300; public static const COMPLETED:int = 5; public static const LAST_TICK:int = 1; public static const LEVEL_TICKS_PER_TILE:int = 100; public static const NOT_SET:int = -1; public static const COUNTDOWN_TICKS:int = 7200; public static const COUNTDOWN_SECONDS:int = 120; public static const ANIMATING_SUCCESS_TICKS:int = 29; public static const INPUT_STRINGS:Array = ["exit", "lastTick", "tileClick", "errorMessage", "sound", "music"]; public static const IDLE:int = 2; public static const NOT_STARTED:int = 0; public static const SHUFFLING:int = 4; public static const TIME_WARNING_TICKS:int = 60; public static const ANIMATING_SUCCESS:int = 3; public static const SUB_RANDOM_RANGE:int = 1000000000; public static const ERROR:int = 4; public static const ANIMATING_FAILURE:int = 5; public static const LEVEL_CHANGE:int = 6; public static const SOUND:int = 4; public static const SHUFFLE_TICKS:int = 120; public static const SHORT_GAME_END:int = 3; public static const LEVEL_TIME_RAN_OUT:int = 1; public static const TIME_RAN_OUT:int = 0; public static const TICKS_PER_SECOND:int = 60; public function Game(_arg1:Main){ this.main = _arg1; _arg1.log((("[seed " + GameData.getSeed()) + "]")); mainRand = new Random(GameData.getSeed()); rand = new Random(this.mainRand.nextInt(Game.SUB_RANDOM_RANGE)); playData = new Stack(); clockCountDown = Game.COUNTDOWN_TICKS; score = new Score(this); } public function changeState():void{ if (pendingTimeOut){ gameEnd(Time.getTick(), pendingEndReason); return; }; if (state == Game.ANIMATING_SUCCESS){ score.lastPairTick = Time.getTick(); if (tiles.getNoTilesInPlay() == 0){ if (((GameData.isShortMode()) && ((tiles.level == 2)))){ gameEnd(Time.getTick(), Game.SHORT_GAME_END); } else { setState(Game.LEVEL_CHANGE); }; } else { if (tiles.noMoves(1) == 0){ setState(Game.SHUFFLING); } else { setState(Game.IDLE); executePending(); }; }; } else { if (state == Game.ANIMATING_FAILURE){ setState(Game.IDLE); executePending(); } else { if (state == Game.SHUFFLING){ setState(Game.IDLE); } else { if (state == Game.LEVEL_CHANGE){ setState(Game.IDLE); } else { if (state == Game.NOT_STARTED){ setState(Game.IDLE); }; }; }; }; }; } protected function update(_arg1:int):void{ if (!GameData.isRelaxMode()){ if ((((((state == Game.IDLE)) || ((state == Game.ANIMATING_FAILURE)))) || ((((state == Game.ANIMATING_SUCCESS)) && (!(pendingTimeOut)))))){ countDown(_arg1); }; }; if (_arg1 == stateChangeTick){ stateChangeTick = -1; changeState(); }; tiles.update(_arg1); } public function newFallDirection():void{ previousDirection = fallDirection; do { fallDirection = rand.nextInt(4); } while (previousDirection == fallDirection); } public function setState(_arg1:int):void{ previousState = state; state = _arg1; if (state == Game.ANIMATING_SUCCESS){ stateChangeTick = ((Time.getTick() + Game.ANIMATING_SUCCESS_TICKS) + 1); score.pairTaken(); } else { if (state == Game.ANIMATING_FAILURE){ stateChangeTick = ((Time.getTick() + Game.ANIMATING_FAILURE_TICKS) + 1); } else { if (state == Game.SHUFFLING){ tiles.pendingTile = -1; tiles.setSelected(null); clockCountDown = (clockCountDown - Game.SHUFFLE_PENALTY_TICKS); levelCountDown = (levelCountDown - Game.SHUFFLE_PENALTY_TICKS); stateChangeTick = (Time.getTick() + Game.SHUFFLE_TICKS); tiles.shuffleTick = (Time.getTick() + (Game.SHUFFLE_TICKS / 2)); } else { if (state == Game.LEVEL_CHANGE){ rand = new Random(this.mainRand.nextInt(Game.SUB_RANDOM_RANGE)); stateChangeTick = (Time.getTick() + Game.LEVEL_CHANGE_TICKS); score.levelComplete(); newFallDirection(); tiles.changeLevel(); levelTicks = (tiles.getNoTilesInPlay() * Game.LEVEL_TICKS_PER_TILE); levelCountDown = levelTicks; } else { if (state == Game.NOT_STARTED){ stateChangeTick = (Time.getTick() + Game.FIRST_LEVEL_ANIMATION_TICKS); }; }; }; }; }; main.log(("state " + Game.STATE_STRINGS[state])); } public function countDown(_arg1:int):void{ clockCountDown--; levelCountDown--; if (state != Game.GAME_OVER){ if (clockCountDown <= 0){ endNowOrLater(_arg1, Game.TIME_RAN_OUT); } else { if (levelCountDown <= 0){ endNowOrLater(_arg1, Game.LEVEL_TIME_RAN_OUT); }; }; }; } private function tileClick(_arg1:int, _arg2:int):void{ if ((((((state == Game.IDLE)) || ((state == Game.ANIMATING_SUCCESS)))) || ((state == Game.ANIMATING_FAILURE)))){ tiles.tileClick(_arg2); }; } public function tick(_arg1:int):void{ executePlayData(_arg1); update(_arg1); } protected function inputExit(_arg1:int):void{ gameEnd(_arg1, Game.USER_CHOSE_EXIT); } public function start():void{ tiles = new TilesC(this); tiles.init(); setState(Game.NOT_STARTED); levelTicks = (tiles.getNoTilesInPlay() * Game.LEVEL_TICKS_PER_TILE); levelCountDown = levelTicks; } public function endNowOrLater(_arg1:int, _arg2):void{ if ((((((state == Game.ANIMATING_SUCCESS)) || ((state == Game.ANIMATING_FAILURE)))) || ((state == Game.SHUFFLING)))){ pendingTimeOut = true; pendingEndReason = _arg2; } else { gameEnd(_arg1, _arg2); }; } protected function executePlayData(_arg1:int):void{ var _local2:Array; var _local3:int; var _local4:int; var _local5:String; var _local6:String; var _local7:int; var _local8:String; while (playData.size() > 0) { _local2 = playData.remove(0); _local3 = int(_local2[0]); _local4 = int(_local2[1]); _local5 = String(Game.INPUT_STRINGS[_local3]); _local6 = ((_local5 + " ") + _local4); _local7 = 2; while (_local7 < _local2.length) { var _temp1 = _local7; _local7 = (_local7 + 1); _local8 = _local2[_temp1]; _local6 = (_local6 + (" " + _local8)); }; main.log((("[" + _local6) + "]")); switch (_local3){ case Game.TILE_CLICK: tileClick(_arg1, int(_local2[2])); break; case Game.INPUT_EXIT: inputExit(_arg1); break; case Game.LAST_TICK: break; case Game.MUSIC: break; case Game.SOUND: break; default: main.log(("**** Error in game.tick(). Invalid inputType: " + _local3)); }; if (((!((_local4 == _arg1))) && (!((_local3 == Game.LAST_TICK))))){ main.log(((("**** Warning, bad sync! tickToExecute " + _local4) + " currentTick ") + _arg1)); }; }; } public function gameEnd(_arg1:int, _arg2:int):void{ var _local3:String = String(Game.END_REASONS[_arg2]); main.log(("gameEnd, endReason: " + _local3)); state = Game.GAME_OVER; main.gameEnd(score.getTotalScore(), _arg2); } public function executePending(){ var _local1:int; if (tiles.pendingTile != -1){ _local1 = tiles.pendingTile; tiles.pendingTile = -1; tiles.tileClick(_local1); }; } public function addPlayData(_arg1:Array):void{ playData.push(_arg1); } } }//package mutual
Section 22
//Node (mutual.Node) package mutual { public class Node extends Pos { public var steps:int;// = 0 public var value:int;// = -1 public var previous:Node;// = null public var generation:int;// = 0 public var heuristicSteps:int; public var direction:int;// = -1 public static const NOT_SET:int = -1; public function Node(_arg1:int, _arg2:int, _arg3:Node, _arg4:Tile){ super(_arg1, _arg2); if (_arg3 != null){ this.previous = _arg3; steps = (_arg3.steps + 1); generation = _arg3.generation; direction = _arg3.getDirectionNr(this); if (direction != _arg3.direction){ generation++; }; }; calculateHeuristic(_arg4); value = (((generation * 100) + (heuristicSteps * 10)) + steps); } public function calculateHeuristic(_arg1:Tile):int{ var _local2:int = Math.abs((_arg1.col - x)); var _local3:int = Math.abs((_arg1.row - y)); heuristicSteps = (_local2 + _local3); return (heuristicSteps); } } }//package mutual
Section 23
//PathFinder (mutual.PathFinder) package mutual { import util.*; public class PathFinder { private var cols:int; private var tileGrid:Grid;// = null private var rows:int; private var minCol:int; public function PathFinder(_arg1:Grid, _arg2:Tiles){ this.tileGrid = _arg1; cols = _arg1.getCols(); rows = _arg1.getRows(); } public function update():void{ var _local5:int; var _local1:int; var _local2:int; var _local3:int = cols; var _local4:int; while (_local4 < cols) { _local5 = 0; while (_local5 < rows) { if (!tileGrid.isEmpty(_local4, _local5)){ if (_local5 > _local1){ _local1 = _local5; }; if (_local4 > _local2){ _local2 = _local4; }; if (_local4 < _local3){ _local3 = _local4; }; }; _local5++; }; _local4++; }; rows = (_local1 + 2); cols = (_local2 + 2); minCol = (_local3 - 1); } private function getPath(_arg1:Node):Array{ var _local2:Array = new Array(); var _local3:Node = _arg1; do { _local2.unshift(_local3); _local3 = _local3.previous; } while (_local3 != null); return (_local2); } public function search(_arg1:Tile, _arg2:Tile, _arg3:Boolean=false):Array{ var _local10:int; var _local11:int; var _local12:Pos; var _local13:Pos; var _local14:Node; var _local15:Node; var _local4:Array = new Array(); var _local5:Array = new Array(cols); var _local6:int; while (_local6 < cols) { _local5[_local6] = new Array(rows); _local10 = 0; while (_local10 < rows) { _local5[_local6][_local10] = new Array(4); _local10++; }; _local6++; }; var _local7:Node = new Node(_arg1.col, _arg1.row, null, _arg2); _local4.push(_local7); var _local8:Node = _local7; var _local9:Boolean; while ((((_local4.length > 0)) && (!(_local9)))) { _local7 = _local4.pop(); if (_local7.heuristicSteps < _local8.heuristicSteps){ _local8 = _local7; }; if ((((_local7.x == _arg2.col)) && ((_local7.y == _arg2.row)))){ _local9 = true; } else { if (_local7.direction != Node.NOT_SET){ _local5[_local7.x][_local7.y][_local7.direction] = _local7; }; _local11 = 0; while (_local11 < 4) { _local12 = Pos(Pos.DIRECTIONS[_local11]); _local13 = _local7.addCreate(_local12); if (((((((tileGrid.isValid(_local13.x, _local13.y)) && ((_local13.y < rows)))) && ((_local13.x < cols)))) && ((_local13.x >= minCol)))){ if (((tileGrid.isEmpty(_local13.x, _local13.y)) || ((((_local13.x == _arg2.col)) && ((_local13.y == _arg2.row)))))){ _local14 = Node(_local5[_local13.x][_local13.y][_local11]); _local15 = new Node(_local13.x, _local13.y, _local7, _arg2); if (_local14 == null){ if (((!(_arg3)) || ((_local15.generation <= 3)))){ _local4.push(_local15); }; }; }; }; _local11++; }; }; _local4.sortOn("value", Array.DESCENDING); }; return (getPath(_local8)); } } }//package mutual
Section 24
//Pos (mutual.Pos) package mutual { public class Pos { public var x:int; public var y:int; public static const DOWN:Pos = new Pos(0, -1); ; public static const DIRECTIONS:Array = [Pos.RIGHT, Pos.DOWN, Pos.LEFT, Pos.UP]; public static const LEFT:Pos = new Pos(-1, 0); ; public static const UP:Pos = new Pos(0, 1); ; public static const RIGHT:Pos = new Pos(1, 0); ; public function Pos(_arg1:int, _arg2:int){ this.x = _arg1; this.y = _arg2; } public function multiplyCreate(_arg1:Pos):Pos{ return (new Pos((x * _arg1.x), (y * _arg1.y))); } public function add(_arg1:Pos):void{ x = (x + _arg1.x); y = (y + _arg1.y); } public function clone():Pos{ return (new Pos(x, y)); } public function getDirection(_arg1:Pos):Pos{ if (_arg1.x == x){ if (_arg1.y > y){ return (Pos.UP); }; return (Pos.DOWN); //unresolved jump }; if (_arg1.x > x){ return (Pos.RIGHT); }; return (Pos.LEFT); } public function multiply(_arg1:Pos):void{ x = (x * _arg1.x); y = (y * _arg1.y); } public function toString():String{ return ((((("(" + x) + ", ") + y) + ")")); } public function getDirectionNr(_arg1:Pos):int{ var _local2:Pos = getDirection(_arg1); return (Pos.DIRECTIONS.indexOf(_local2)); } public function multiply2(_arg1:int, _arg2:int):void{ this.x = (this.x * _arg1); this.y = (this.y * _arg2); } public function add2(_arg1:int, _arg2:int):void{ this.x = (this.x + _arg1); this.y = (this.y + _arg2); } public function addCreate2(_arg1:int, _arg2:int):Pos{ return (new Pos((_arg1 + this.x), (_arg2 + this.y))); } public function getDirection2(_arg1:int, _arg2:int):Pos{ if (_arg1 == this.x){ if (_arg2 > this.y){ return (Pos.UP); }; return (Pos.DOWN); //unresolved jump }; if (_arg1 > this.x){ return (Pos.RIGHT); }; return (Pos.LEFT); } public function equals2(_arg1:int, _arg2:int):Boolean{ return ((((this.x == _arg1)) && ((this.y == _arg2)))); } public function addCreate(_arg1:Pos):Pos{ return (new Pos((x + _arg1.x), (y + _arg1.y))); } public function equals(_arg1:Pos):Boolean{ return ((((x == _arg1.x)) && ((y == _arg1.y)))); } } }//package mutual
Section 25
//Score (mutual.Score) package mutual { import util.*; public class Score { public var levelScores:int;// = 0 public var allSpeedBonuses:Array;// = null public var lastPairTick:int;// = -1 public var lastSpeedBonus:int;// = 0 public var allScores:Array;// = null public var allLevelBonuses:Array;// = null public var lastScore:int;// = 0 public var levelSpeedBonuses:int;// = 0 public var game:Game;// = null public static const LEVEL_BONUS:int = 200; public static const LEVEL_1_BONUS:int = 500; public static const SPEED_BONUS_PER_PAIR:int = 50; public static const TICKS_PER_SPEED_POINT:int = Math.floor((0.1 * Game.TICKS_PER_SECOND)); public static const POINTS_PER_PAIR:int = 250; public function Score(_arg1:Game){ this.game = _arg1; allScores = new Array(); allSpeedBonuses = new Array(); allLevelBonuses = new Array(); _arg1.main.log(("Score.TICKS_PER_SPEED_POINT " + Score.TICKS_PER_SPEED_POINT)); } public function getLevelBonus():int{ return (int(allLevelBonuses[(allLevelBonuses.length - 1)])); } public function getAllSpeedBonuses():int{ var _local2:int; var _local1:int = levelSpeedBonuses; for each (_local2 in allSpeedBonuses) { _local1 = (_local1 + _local2); }; return (_local1); } public function pairTaken():void{ var _local2:int; lastScore = Score.POINTS_PER_PAIR; game.main.log(("score " + lastScore)); levelScores = (levelScores + lastScore); var _local1:int = Time.getTick(); if (lastPairTick != -1){ _local2 = (_local1 - lastPairTick); if (_local2 < 0){ _local2 = 0; }; lastSpeedBonus = (Score.SPEED_BONUS_PER_PAIR - int(Math.floor((1 * (Number(_local2) / Number(Score.TICKS_PER_SPEED_POINT)))))); if (lastSpeedBonus < 0){ lastSpeedBonus = 0; } else { game.main.log(("speed bonus " + lastSpeedBonus)); }; levelSpeedBonuses = (levelSpeedBonuses + lastSpeedBonus); }; } public function levelComplete():void{ game.main.log(("level score " + levelScores)); allScores.push(levelScores); levelScores = 0; lastScore = 0; allSpeedBonuses.push(levelSpeedBonuses); levelSpeedBonuses = 0; lastSpeedBonus = 0; var _local1:int = (Score.LEVEL_1_BONUS + (game.tiles.level * Score.LEVEL_BONUS)); allLevelBonuses[game.tiles.level] = int(((game.levelCountDown / game.levelTicks) * _local1)); game.main.log(("level bonus " + allLevelBonuses[game.tiles.level])); game.main.log(("total score " + getTotalScore())); lastPairTick = -1; } public function getAllScores():int{ var _local2:int; var _local1:int = levelScores; for each (_local2 in allScores) { _local1 = (_local1 + _local2); }; return (_local1); } public function getLastPairScore():int{ return ((lastScore + lastSpeedBonus)); } public function getAllLevelBonuses():int{ var _local2:int; var _local1:int; for each (_local2 in allLevelBonuses) { _local1 = (_local1 + _local2); }; return (_local1); } public function getTotalScore():int{ return (((getAllScores() + getAllSpeedBonuses()) + getAllLevelBonuses())); } } }//package mutual
Section 26
//Tile (mutual.Tile) package mutual { public class Tile { public var col:int;// = -1 public var faceNr:int;// = -1 public var tiles:Tiles;// = null public var index:int;// = -1 public var row:int;// = -1 public static const TILES_PER_FACE:int = 4; public static const FACES:int = 16; public function Tile(_arg1:int, _arg2:int){ this.faceNr = _arg1; this.index = _arg2; } public function getPoint():Pos{ return (new Pos(col, row)); } public function remove():void{ col = -1; row = -1; } public function toString():String{ return ((((((("t" + faceNr) + "(") + col) + ",") + row) + ")")); } public function init(_arg1:int, _arg2:int, _arg3:Tiles):void{ this.col = _arg1; this.row = _arg2; this.tiles = _arg3; } } }//package mutual
Section 27
//Tiles (mutual.Tiles) package mutual { import util.*; import client.*; import flash.utils.*; public class Tiles { public var level:int;// = -1 public var layouts:Array;// = null private var layoutNr:int;// = -1 public var levelChangeTick:int;// = -1 public var orderedTiles:Array;// = null public var selected:Tile;// = null public var layout:Array;// = null public var pathFinder:PathFinder;// = null public var shuffleTick:int;// = -1 private var difficulty:int;// = 0 public var fallingTiles:Stack;// = null public var grid:Grid;// = null public var shuffleCompleted:Boolean;// = true public var pendingTile:int;// = -1 public var game:Game;// = null public static const MAX_LEVEL:int = 2147483647; public function Tiles(_arg1:Game){ var _local4:Array; var _local5:int; var _local6:int; super(); this.game = _arg1; layouts = new Array(); layouts.push(new Array()); layouts.push(new Array()); layouts.push(new Array()); var _local2:XMLList = GameData.xml.layouts.layout; var _local3:int; while (_local3 < _local2.length()) { _local4 = String(_local2[_local3]).split(","); _local5 = 0; while (_local5 < _local4.length) { _local4[_local5] = int(_local4[_local5]); _local5++; }; _local6 = int(_local4[1]); layouts[_local6].push(_local4); _local3++; }; } public function noMoves(_arg1:int):int{ var _local6:Array; var _local7:int; var _local8:int; var _local9:Tile; var _local2:int; var _local3:int = getTimer(); pathFinder.update(); var _local4:int = (orderedTiles.length / 4); var _local5:int; while (_local5 < _local4) { _local6 = new Array(); _local7 = (_local5 * 4); _local8 = _local7; while (_local8 < (_local7 + 4)) { _local9 = Tile(orderedTiles[_local8]); if (_local9.col != -1){ _local6.push(_local9); }; _local8++; }; _local2 = (_local2 + similarTilesMoves(_local6)); if (_local2 >= _arg1){ return (_arg1); }; _local5++; }; _local3 = (getTimer() - _local3); return (_local2); } public function noMatch(_arg1:Tile, _arg2:Tile):void{ setSelected(null); } private function fillLayout(_arg1:Array, _arg2:Array):void{ var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:Tile; var _local3:int; var _local4:int; while (_local4 < _arg2.length) { _local5 = int(_arg2[_local4]); _local6 = 0; while (_local6 < _local5) { _local7 = (_local4 + 1); _local8 = (_local6 + 1); var _temp1 = _local3; _local3 = (_local3 + 1); _local9 = Tile(_arg1[_temp1]); _local9.init(_local7, _local8, this); grid.setObj(_local7, _local8, _local9); _local6++; }; _local4++; }; } public function similarTilesMoves(_arg1:Array):int{ var _local3:Tile; var _local4:int; var _local5:Tile; var _local6:Array; var _local7:Node; var _local2:int; while (_arg1.length > 0) { _local3 = Tile(_arg1.pop()); _local4 = 0; while (_local4 < _arg1.length) { _local5 = Tile(_arg1[_local4]); _local6 = pathFinder.search(_local3, _local5, true); _local7 = Node(_local6.pop()); if ((((_local7.x == _local5.col)) && ((_local7.y == _local5.row)))){ _local2++; }; _local4++; }; }; return (_local2); } public function init():void{ createTiles(); chooseNextLayout(); pathFinder = new PathFinder(grid, this); pathFinder.update(); if (noMoves(2) < 2){ shuffle(); }; } public function setSelected(_arg1:Tile):void{ selected = _arg1; } private function getLayout():Array{ var _local5:int; var _local6:int; var _local1:Array = new Array(layout.length); var _local2:int = (grid.getCols() - 1); var _local3:int = (grid.getRows() - 1); var _local4 = 1; while (_local4 < _local2) { _local5 = 0; _local6 = 1; while (_local6 < _local3) { if (!grid.isEmpty(_local4, _local6)){ _local5++; }; _local6++; }; _local1[(_local4 - 1)] = _local5; _local4++; }; return (_local1); } public function getTile(_arg1:int):Tile{ return (Tile(orderedTiles[_arg1])); } public function getNoTilesInPlay():int{ var _local3:Tile; var _local1:int; var _local2:int; while (_local2 < orderedTiles.length) { _local3 = Tile(orderedTiles[_local2]); if (_local3.col != -1){ _local1++; }; _local2++; }; return (_local1); } private function randomizeArray(_arg1:Array):Array{ var _local3:int; var _local2:Array = new Array(); while (_arg1.length > 0) { _local3 = game.rand.nextInt(_arg1.length); _local2.push(_arg1.splice(_local3, 1)[0]); }; return (_local2); } public function getTilesInPlay():Array{ var _local3:Tile; var _local1:Array = new Array(); var _local2:int; while (_local2 < orderedTiles.length) { _local3 = Tile(orderedTiles[_local2]); if (_local3.col != -1){ _local1.push(_local3); }; _local2++; }; return (_local1); } public function changeLevel():void{ setSelected(null); pendingTile = -1; chooseNextLayout(); pathFinder = new PathFinder(grid, this); pathFinder.update(); if ((noMoves(2) < 2)){ shuffle(); }; } public function tooLongPath(_arg1:Tile, _arg2:Tile, _arg3:Array):void{ setSelected(null); } public function matchFound(_arg1:Tile, _arg2:Tile, _arg3:Array):void{ removeTile(_arg1); removeTile(_arg2); setSelected(null); } public function update(_arg1:int):void{ if (_arg1 == shuffleTick){ shuffleTick = -1; shuffle(); }; } private function getTiles():Array{ var _local5:int; var _local1:Array = new Array(); var _local2:int = (grid.getCols() - 1); var _local3:int = (grid.getRows() - 1); var _local4 = 1; while (_local4 < _local2) { _local5 = 1; while (_local5 < _local3) { if (!grid.isEmpty(_local4, _local5)){ _local1.push(grid.getObj(_local4, _local5)); }; _local5++; }; _local4++; }; return (_local1); } public function getSimilarTiles(_arg1:Tile):Array{ var _local6:int; var _local7:Tile; var _local2:Array = new Array(); var _local3:int = (_arg1.index / 4); var _local4:int = (_local3 * 4); var _local5:int; while (_local5 < 4) { _local6 = (_local4 + _local5); if (_local6 != _arg1.index){ _local7 = Tile(orderedTiles[_local6]); if (_local7.col != -1){ _local2.push(_local7); }; }; _local5++; }; return (_local2); } public function removeTile(_arg1:Tile):void{ var _local6:Tile; var _local2:int = fallingTiles.indexOf(_arg1); if (_local2 != -1){ fallingTiles.remove(_local2); }; grid.remove(_arg1.col, _arg1.row); var _local3:int = _arg1.row; var _local4:int = _arg1.col; _arg1.remove(); var _local5:int = (_local3 + 1); while (_local5 < grid.getRows()) { if (!grid.isEmpty(_local4, _local5)){ _local6 = grid.getObj(_local4, _local5); grid.moveObj(_local4, _local5, _local4, _local3); _local6.row = _local3; if (fallingTiles.indexOf(_local6) == -1){ fallingTiles.push(_local6); }; _local3++; }; _local5++; }; } public function createTiles():void{ var _local3:int; var _local4:Tile; orderedTiles = new Array((Tile.FACES * 4)); fallingTiles = new Stack(); var _local1:int; var _local2:int; while (_local2 < Tile.FACES) { _local3 = 0; while (_local3 < 4) { _local4 = new TileC(_local2, _local1); var _temp1 = _local1; _local1 = (_local1 + 1); var _local5 = _temp1; orderedTiles[_local5] = _local4; _local3++; }; _local2++; }; } public function pairClicked(_arg1:Tile, _arg2:Tile):Boolean{ var _local3:Array = pathFinder.search(_arg2, _arg1); var _local4:Node = Node(_local3[(_local3.length - 1)]); var _local5:Boolean; if ((((((_local4.generation <= 3)) && ((_local4.x == _arg1.col)))) && ((_local4.y == _arg1.row)))){ _local5 = true; matchFound(_arg1, _arg2, _local3); } else { tooLongPath(_arg1, _arg2, _local3); setSelected(_arg1); }; return (_local5); } public function chooseNextLayout():void{ var _local1:int; var _local10:int; var _local11:Tile; var _local12:int; var _local15:int; var _local16:int; if (level == Tiles.MAX_LEVEL){ game.gameEnd(Time.getTick(), Game.COMPLETED); return; }; level++; game.main.log((("level " + level) + " (+1)")); if (level == 3){ difficulty = 1; } else { if (level == 8){ difficulty = 2; }; }; do { _local1 = game.rand.nextInt(layouts[difficulty].length); } while (_local1 == layoutNr); layoutNr = _local1; layout = layouts[difficulty][layoutNr].slice(); game.main.log(((("layout: " + layout[0]) + " difficulty: ") + difficulty)); var _local2:int = int(layout[2]); var _local3:int = int(layout[3]); layout = layout.slice(4); if ((_local2 + _local3) > Tile.FACES){ game.main.log("Error: layout is not correct, pairs + fours must be equal to Tile.FACES"); game.gameEnd(Time.getTick(), Game.ERROR); }; var _local4:int; var _local5:int; var _local6:int; while (_local6 < layout.length) { _local15 = int(layout[_local6]); _local4 = (_local4 + _local15); if (_local5 < _local15){ _local5 = _local15; }; _local6++; }; if (((_local2 * 2) + (_local3 * 4)) != _local4){ game.main.log("Error: layout is not correct, (pairs*2)+(fours*4) must be equal to noTiles"); game.gameEnd(Time.getTick(), Game.ERROR); }; grid = new Grid((layout.length + 2), (_local5 + 2)); var _local7:Array = new Array(); var _local8:Array = new Array(); var _local9:int; while (_local9 < Tile.FACES) { _local8.push(_local9); _local9++; }; var _local13:int; while (_local13 < _local2) { _local10 = game.rand.nextInt(_local8.length); _local12 = int(_local8.splice(_local10, 1)); _local11 = Tile(orderedTiles[(_local12 * 4)]); _local7.push(_local11); _local11 = Tile(orderedTiles[((_local12 * 4) + 1)]); _local7.push(_local11); _local13++; }; var _local14:int; while (_local14 < _local3) { _local10 = game.rand.nextInt(_local8.length); _local12 = int(_local8.splice(_local10, 1)); _local16 = 0; while (_local16 < 4) { _local11 = Tile(orderedTiles[((_local12 * 4) + _local16)]); _local7.push(_local11); _local16++; }; _local14++; }; _local7 = randomizeArray(_local7); fillLayout(_local7, layout); } private function shuffle():void{ var _local1:Array = getLayout(); var _local2:Array = getTiles(); var _local3:int; do { _local2 = randomizeArray(_local2); fillLayout(_local2, _local1); } while ((((noMoves(2) < 2)) && (!((_temp1 == 1000))))); if (_local3 == 1001){ game.main.log("Error: could not shuffle"); }; } public function tileClick(_arg1:int):void{ var _local2:Tile; var _local3:Boolean; if (pendingTile == -1){ _local2 = getTile(_arg1); if (_local2.col == -1){ return; }; if (selected == null){ setSelected(_local2); } else { if (_local2 == selected){ setSelected(null); } else { if (game.state == Game.ANIMATING_SUCCESS){ pendingTile = _arg1; } else { if (_local2.faceNr == selected.faceNr){ _local3 = pairClicked(_local2, selected); if (_local3){ game.setState(Game.ANIMATING_SUCCESS); } else { game.setState(Game.ANIMATING_FAILURE); }; } else { noMatch(_local2, selected); setSelected(_local2); }; }; }; }; }; } } }//package mutual
Section 28
//AlphaPoint (util.AlphaPoint) package util { public class AlphaPoint { public var tick:int; public var alpha:Number; public function AlphaPoint(_arg1:int, _arg2:Number){ this.tick = _arg1; this.alpha = _arg2; } } }//package util
Section 29
//Bounce (util.Bounce) package util { import flash.display.*; public class Bounce implements Renderable { private var started:Boolean;// = false public var direction:int; private var obj:DisplayObject;// = null public var magnitude:Number;// = 10 public var str:String;// = "" public var startX:Number;// = 1.79769313486232E308 public var startY:Number;// = 1.79769313486232E308 public var endTick:int; public var frequency:Number;// = 1 public var startTick:int; public function Bounce(_arg1:DisplayObject){ this.obj = _arg1; } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; var _local4:int; var _local5:Number; var _local6:Number; if ((((_arg1 >= startTick)) && (!(started)))){ started = true; if (startX == Number.MAX_VALUE){ startX = obj.x; }; if (startY == Number.MAX_VALUE){ startY = obj.y; }; }; if (started){ _local3 = ((_arg1 + _arg2) - startTick); _local4 = (endTick - startTick); _local5 = 0; if (_local3 < _local4){ _local5 = ((_local4 - _local3) / _local4); }; _local6 = ((magnitude * _local5) * Math.sin((_local3 * frequency))); switch (direction){ case 0: obj.y = (startY + _local6); break; case 1: obj.x = (startX + _local6); break; case 2: obj.y = (startY - _local6); break; case 3: obj.x = (startX - _local6); break; }; if (_arg1 >= endTick){ obj.x = startX; obj.y = startY; return (Time.STOP); }; }; return (Time.CONTINUE); } } }//package util
Section 30
//ButtonHandler (util.ButtonHandler) package util { import flash.events.*; import flash.display.*; public class ButtonHandler { public var func:Function;// = null public var active:Boolean;// = true public var onFrame:int;// = 1 public var showRollOver:Boolean;// = true public var currentState:int; public var showPressed:Boolean;// = true public var pressedFrame:int;// = 3 public var btn:MovieClip;// = null public var overFrame:int;// = 2 public var offFrame:int;// = 4 public function ButtonHandler(_arg1:MovieClip, _arg2:Boolean=true, _arg3:Boolean=true){ currentState = onFrame; super(); this.btn = _arg1; this.showRollOver = _arg2; this.showPressed = _arg3; _arg1.stop(); if (_arg2){ _arg1.addEventListener(MouseEvent.ROLL_OVER, rollOver); _arg1.addEventListener(MouseEvent.ROLL_OUT, rollOut); }; if (_arg3){ _arg1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown); }; _arg1.addEventListener(MouseEvent.MOUSE_UP, mouseUp); } public function rollOut(_arg1:MouseEvent):void{ if (active){ if (btn.currentFrame != pressedFrame){ btn.gotoAndStop(currentState); }; }; } public function setOnOff(_arg1:Boolean):void{ if (_arg1){ currentState = onFrame; } else { currentState = offFrame; }; btn.gotoAndStop(currentState); } public function mouseUp(_arg1:MouseEvent):void{ if (active){ if (func != null){ func(); }; if (currentState == onFrame){ currentState = offFrame; } else { currentState = onFrame; }; btn.gotoAndStop(currentState); }; } public function mouseDown(_arg1:MouseEvent):void{ if (active){ btn.gotoAndStop(pressedFrame); }; } public function rollOver(_arg1:MouseEvent):void{ if (active){ if (btn.currentFrame != pressedFrame){ btn.gotoAndStop(overFrame); }; }; } } }//package util
Section 31
//ChainAlpha (util.ChainAlpha) package util { import flash.display.*; public class ChainAlpha implements Renderable { public var displayObject:DisplayObject;// = null public var points:Array;// = null public var startPoint:AlphaPoint;// = null public var str:String;// = "" public var endPoint:AlphaPoint;// = null public function ChainAlpha(_arg1:DisplayObject){ this.displayObject = _arg1; points = new Array(); } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; var _local4:Number; var _local5:Number; if (startPoint == null){ startPoint = shift(); endPoint = shift(); }; if (_arg1 >= endPoint.tick){ if (points.length > 0){ startPoint = endPoint; endPoint = shift(); } else { displayObject.alpha = endPoint.alpha; return (Time.STOP); }; }; if (((((!((startPoint == null))) && (!((endPoint == null))))) && ((_arg1 >= startPoint.tick)))){ _local3 = (endPoint.tick - startPoint.tick); _local4 = (endPoint.alpha - startPoint.alpha); _local5 = (((_arg1 + _arg2) - startPoint.tick) / _local3); str = (str + (((_local4 + " ") + _local5) + "\n")); displayObject.alpha = (startPoint.alpha + (_local4 * _local5)); }; return (Time.CONTINUE); } public function shift():AlphaPoint{ return (AlphaPoint(points.shift())); } public function addAlpha(_arg1:int, _arg2:Number):void{ points.push(new AlphaPoint(_arg1, _arg2)); } } }//package util
Section 32
//ChainBlur (util.ChainBlur) package util { import flash.display.*; import flash.filters.*; public class ChainBlur implements Renderable { public var displayObject:DisplayObject;// = null public var blur:BlurFilter;// = null public var values:Array;// = null public var startPoint:Object;// = null public var blurX:Number;// = 10 public var blurY:Number;// = 10 public var oldFilters:Array;// = null public var endPoint:Object;// = null public var quality:int;// = 1 public function ChainBlur(_arg1:DisplayObject){ this.displayObject = _arg1; oldFilters = _arg1.filters; if (oldFilters == null){ oldFilters = new Array(); }; values = new Array(); } public function addBlur(_arg1:int, _arg2:Number, _arg3:Number):void{ var _local4:Object = new Object(); _local4.tick = _arg1; _local4.blurX = _arg2; _local4.blurY = _arg3; values.push(_local4); } public function setBlur(_arg1:Number, _arg2:Number):void{ var _local3:Array; if ((((_arg1 == 0)) && ((_arg2 == 0)))){ displayObject.filters = null; } else { blur = new BlurFilter(_arg1, _arg2, quality); _local3 = oldFilters.slice(); _local3.push(blur); displayObject.filters = _local3; }; } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; if (startPoint == null){ startPoint = values.shift(); endPoint = values.shift(); }; if (_arg1 >= endPoint.tick){ if (values.length > 0){ startPoint = endPoint; endPoint = values.shift(); } else { setBlur(endPoint.blurX, endPoint.blurY); return (Time.STOP); }; }; if (((((!((startPoint == null))) && (!((endPoint == null))))) && ((_arg1 >= startPoint.tick)))){ _local3 = (int(endPoint.tick) - int(startPoint.tick)); _local4 = (endPoint.blurX - startPoint.blurX); _local5 = (endPoint.blurY - startPoint.blurY); _local6 = (((_arg1 + _arg2) - int(startPoint.tick)) / _local3); blurX = (startPoint.blurX + (_local4 * _local6)); blurY = (startPoint.blurY + (_local5 * _local6)); setBlur(blurX, blurY); }; return (Time.CONTINUE); } } }//package util
Section 33
//ChainGlow (util.ChainGlow) package util { import flash.display.*; import flash.filters.*; public class ChainGlow implements Renderable { public var strength:Number; public var glow:GlowFilter;// = null public var startPoint:Object;// = null public var blurX:Number; public var blurY:Number; public var oldFilters:Array;// = null public var alpha:Number; public var displayObject:DisplayObject;// = null public var values:Array;// = null public var color:uint; public var endPoint:Object;// = null public var quality:int;// = 1 public function ChainGlow(_arg1:DisplayObject){ this.displayObject = _arg1; oldFilters = _arg1.filters; if (oldFilters == null){ oldFilters = new Array(); }; values = new Array(); } public function setGlow(_arg1:int, _arg2:uint, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Array; if ((((_arg6 == 0)) || ((((_arg4 == 0)) && ((_arg5 == 0)))))){ displayObject.filters = oldFilters.slice(); } else { glow = new GlowFilter(_arg2, _arg3, _arg4, _arg5, _arg6, quality); _local7 = oldFilters.slice(); _local7.push(glow); displayObject.filters = _local7; }; } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; var _local4:Number; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; if (startPoint == null){ startPoint = values.shift(); endPoint = values.shift(); }; if (_arg1 >= endPoint.tick){ if (values.length > 0){ startPoint = endPoint; endPoint = values.shift(); } else { setGlow(_arg1, endPoint.color, endPoint.alpha, endPoint.blurX, endPoint.blurY, endPoint.strength); return (Time.STOP); }; }; if (((((!((startPoint == null))) && (!((endPoint == null))))) && ((_arg1 >= startPoint.tick)))){ _local3 = (int(endPoint.tick) - int(startPoint.tick)); _local4 = (((_arg1 + _arg2) - int(startPoint.tick)) / _local3); _local5 = (endPoint.color - startPoint.color); _local6 = (endPoint.alpha - startPoint.alpha); _local7 = (endPoint.blurX - startPoint.blurX); _local8 = (endPoint.blurY - startPoint.blurY); _local9 = (endPoint.strength - startPoint.strength); color = (startPoint.color + (_local5 * _local4)); alpha = (startPoint.alpha + (_local6 * _local4)); blurX = (startPoint.blurX + (_local7 * _local4)); blurY = (startPoint.blurY + (_local8 * _local4)); strength = (startPoint.strength + (_local9 * _local4)); setGlow(_arg1, color, alpha, blurX, blurY, strength); }; return (Time.CONTINUE); } public function add(_arg1:int, _arg2:uint, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Object = new Object(); _local7.tick = _arg1; _local7.color = _arg2; _local7.alpha = _arg3; _local7.blurX = _arg4; _local7.blurY = _arg5; _local7.strength = _arg6; values.push(_local7); } } }//package util
Section 34
//ChainMovement (util.ChainMovement) package util { import flash.display.*; public class ChainMovement implements Renderable { public var displayObject:DisplayObject; public var movePoints:Array; public var from:MovePoint; public var to:MovePoint; public function ChainMovement(_arg1:DisplayObject){ this.displayObject = _arg1; movePoints = new Array(); } public function addMove(_arg1:int, _arg2:Number, _arg3:Number):void{ movePoints.push(new MovePoint(_arg1, _arg2, _arg3)); } public function shiftMove():MovePoint{ return (MovePoint(movePoints.shift())); } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; if (from == null){ from = shiftMove(); to = shiftMove(); }; if (_arg1 >= to.tick){ if (movePoints.length > 0){ from = to; to = shiftMove(); } else { displayObject.x = to.x; displayObject.y = to.y; return (Time.STOP); }; }; if (((!((from == null))) && (!((to == null))))){ _local3 = (to.tick - from.tick); _local4 = (to.x - from.x); _local5 = (to.y - from.y); _local6 = (((_arg1 + _arg2) - from.tick) / _local3); displayObject.x = (from.x + (_local4 * _local6)); displayObject.y = (from.y + (_local5 * _local6)); }; return (Time.CONTINUE); } public function addMovePoint(_arg1:MovePoint):void{ movePoints.push(_arg1); } } }//package util
Section 35
//ChainResize (util.ChainResize) package util { import flash.display.*; public class ChainResize implements Renderable { public var displayObject:DisplayObject; public var points:Array; public var startPoint:ResizePoint; public var endPoint:ResizePoint; public function ChainResize(_arg1:DisplayObject){ this.displayObject = _arg1; points = new Array(); } public function shift():ResizePoint{ return (ResizePoint(points.shift())); } public function addResize(_arg1:int, _arg2:Number, _arg3:Number):void{ points.push(new ResizePoint(_arg1, _arg2, _arg3)); } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; if (startPoint == null){ startPoint = ResizePoint(shift()); endPoint = ResizePoint(shift()); }; if (_arg1 >= endPoint.tick){ if (points.length > 0){ startPoint = endPoint; endPoint = shift(); } else { displayObject.scaleX = endPoint.scaleX; displayObject.scaleY = endPoint.scaleY; return (Time.STOP); }; }; if (((((!((startPoint == null))) && (!((endPoint == null))))) && ((_arg1 >= startPoint.tick)))){ _local3 = (endPoint.tick - startPoint.tick); _local4 = (endPoint.scaleX - startPoint.scaleX); _local5 = (endPoint.scaleY - startPoint.scaleY); _local6 = (((_arg1 + _arg2) - startPoint.tick) / _local3); displayObject.scaleX = (startPoint.scaleX + (_local4 * _local6)); displayObject.scaleY = (startPoint.scaleY + (_local5 * _local6)); }; return (Time.CONTINUE); } } }//package util
Section 36
//ChainRotation (util.ChainRotation) package util { import flash.display.*; public class ChainRotation implements Renderable { public var displayObject:DisplayObject; public var points:Array; public var totalRotation:Number; public var startPoint:RotationPoint; public var endPoint:RotationPoint; public function ChainRotation(_arg1:DisplayObject){ this.displayObject = _arg1; points = new Array(); } public function shift():RotationPoint{ return (RotationPoint(points.shift())); } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:*; if (startPoint == null){ startPoint = shift(); endPoint = shift(); totalRotation = (endPoint.direction * ((endPoint.fullRevolutions * 360) + (endPoint.rotation - startPoint.rotation))); }; if (_arg1 >= endPoint.tick){ if (points.length > 0){ startPoint = endPoint; endPoint = shift(); totalRotation = (endPoint.direction * ((endPoint.fullRevolutions * 360) + (endPoint.rotation - startPoint.rotation))); } else { displayObject.rotation = endPoint.rotation; return (Time.STOP); }; }; if (((((!((startPoint == null))) && (!((endPoint == null))))) && ((_arg1 >= startPoint.tick)))){ _local3 = (endPoint.tick - startPoint.tick); _local4 = (endPoint.rotation - startPoint.rotation); _local5 = (((_arg1 + _arg2) - startPoint.tick) / _local3); _local6 = (_local5 * totalRotation); displayObject.rotation = (startPoint.rotation + _local6); }; return (Time.CONTINUE); } public function addRotation(_arg1:int, _arg2:Number, _arg3:int=1, _arg4:int=0):void{ if (((!((_arg3 == 1))) && (!((_arg3 == -1))))){ trace("Error in ChainRotation.addRotation: direction must be 1 or -1"); }; points.push(new RotationPoint(_arg1, _arg2, _arg3, _arg4)); } } }//package util
Section 37
//ChainTextCount (util.ChainTextCount) package util { import flash.text.*; public class ChainTextCount implements Renderable { public var values:Array;// = null public var endPoint:Object;// = null public var textField:TextField;// = null public var startPoint:Object;// = null public function ChainTextCount(_arg1:TextField){ this.textField = _arg1; values = new Array(); } public function addValue(_arg1:int, _arg2:int):void{ var _local3:Object = new Object(); _local3.tick = _arg1; _local3.value = _arg2; values.push(_local3); } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; var _local4:Number; var _local5:Number; if (startPoint == null){ startPoint = values.shift(); endPoint = values.shift(); }; if (_arg1 >= endPoint.tick){ if (values.length > 0){ startPoint = endPoint; endPoint = values.shift(); } else { textField.text = endPoint.value; return (Time.STOP); }; }; if (((((!((startPoint == null))) && (!((endPoint == null))))) && ((_arg1 >= startPoint.tick)))){ _local3 = (int(endPoint.tick) - int(startPoint.tick)); _local4 = (int(endPoint.value) - int(startPoint.value)); _local5 = (((_arg1 + _arg2) - int(startPoint.tick)) / _local3); textField.text = ("" + int((startPoint.value + (_local4 * _local5)))); }; return (Time.CONTINUE); } } }//package util
Section 38
//Communicator (util.Communicator) package util { import flash.external.*; import flash.system.*; public class Communicator { public function sendFsCommand(_arg1:String, _arg2:String):void{ fscommand(_arg1, _arg2); } public function sendPlayData(_arg1:Array):void{ var _local2:String = ((String(_arg1[0]) + ",") + String(_arg1[1])); var _local3:int = _arg1.length; var _local4 = 2; while (_local4 < _local3) { _local2 = (_local2 + (" " + String(_arg1[_local4]))); _local4++; }; _local2 = (_local2 + "=0"); if (!Main.DEV_MODE){ ExternalInterface.call("playData", _local2); }; } } }//package util
Section 39
//Fader (util.Fader) package util { import flash.display.*; public class Fader { public var displayObject:DisplayObject; public var endAlpha:Number;// = 0 public var startTick:int;// = -1 public var totalTicks:int;// = -1 public var alphaChange:Number;// = 0 public var startAlpha:Number;// = 0 public var endTick:int;// = -1 public function Fader(_arg1:DisplayObject, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number){ this.displayObject = _arg1; this.startTick = _arg2; this.endTick = _arg3; this.totalTicks = (_arg3 - _arg2); this.startAlpha = _arg4; this.endAlpha = _arg5; this.alphaChange = (_arg5 - _arg4); } public function update(_arg1:int, _arg2:Number):Boolean{ var _local4:Number; var _local3:Boolean; if (_arg1 >= startTick){ if (_arg1 >= endTick){ displayObject.alpha = endAlpha; _local3 = true; } else { _local4 = (((_arg1 + _arg2) - startTick) / totalTicks); displayObject.alpha = (startAlpha + (alphaChange * _local4)); }; }; return (_local3); } } }//package util
Section 40
//Fall (util.Fall) package util { import flash.display.*; public class Fall implements Renderable { private var started:Boolean;// = false private var lastTime:Number;// = 0 private var distanceY:Number; public var bounceTick:int; private var speedIncreaseX:Number; private var speedIncreaseY:Number; public var endTick:int; private var totalTicks:int; private var distanceX:Number; public var endX:Number; public var endY:Number; public var startTick:int; public var displayObject:DisplayObject; private var str:String;// = "" private var speedY:Number;// = 0 public var startX:Number; public var startY:Number; private var speedX:Number;// = 0 private var lastTickAndAlpha:Number;// = -1 public function Fall(_arg1:DisplayObject){ this.displayObject = _arg1; startX = _arg1.x; startY = _arg1.y; endX = _arg1.x; endY = _arg1.y; } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; if (((!(started)) && ((_arg1 >= startTick)))){ started = true; }; if (started){ if (_arg1 >= endTick){ displayObject.x = endX; displayObject.y = endY; return (Time.STOP); }; _local3 = (((_arg1 + _arg2) - startTick) / totalTicks); displayObject.x = (startX + (((distanceX * _local3) * _local3) * _local3)); displayObject.y = (startY + (((distanceY * _local3) * _local3) * _local3)); }; return (Time.CONTINUE); } public function init():void{ totalTicks = (endTick - startTick); distanceX = (endX - startX); distanceY = (endY - startY); var _local1:Number = (distanceX / totalTicks); var _local2:Number = (distanceY / totalTicks); speedIncreaseX = ((_local1 * 2) / totalTicks); speedIncreaseY = ((_local2 * 2) / totalTicks); } } }//package util
Section 41
//FramePlayer (util.FramePlayer) package util { import flash.display.*; public class FramePlayer implements Renderable { public var movieClip:MovieClip; public var remainingRepeats:int; public var forward:Boolean; public var ticks:int; public var endTick:int; public var startTick:int; public function FramePlayer(_arg1:MovieClip, _arg2:int, _arg3:int, _arg4:int=0, _arg5:Boolean=true){ this.movieClip = _arg1; this.startTick = _arg2; this.ticks = _arg3; this.endTick = (_arg2 + _arg3); this.forward = _arg5; remainingRepeats = _arg4; } protected function getFrame(_arg1:int):int{ if (forward){ return (_arg1); }; return (((movieClip.totalFrames + 1) - _arg1)); } public function render(_arg1:int, _arg2:Number):int{ var _local3:int; var _local4:Number; var _local5:int; if (_arg1 >= startTick){ if (_arg1 >= endTick){ if (remainingRepeats-- > 0){ endTick = (_arg1 + ticks); startTick = _arg1; render(_arg1, _arg2); } else { movieClip.gotoAndStop(getFrame(movieClip.totalFrames)); return (Time.STOP); }; } else { _local3 = (_arg1 - startTick); _local4 = (_local3 / ticks); _local5 = (1 + (_local4 * movieClip.totalFrames)); movieClip.gotoAndStop(getFrame(_local5)); }; }; return (Time.CONTINUE); } } }//package util
Section 42
//GameData (util.GameData) package util { import flash.events.*; import flash.text.*; import flash.display.*; import flash.net.*; import flash.external.*; public class GameData { public static const DEV_GENERATE_SEED:Boolean = false; private static var loader:URLLoader = null; public static var xml:XML = null; private static var seed:int = -1; private static var listener:Object = null; private static var propertiesUrl:String = null; public function GameData(){ trace("Dont instantiate GameData class!"); } private static function loadError(_arg1:Event=null):void{ trace(("load error " + _arg1)); } public static function getNumber(_arg1:String):Number{ var id = _arg1; return (Number(GameData.xml.num.(@id == id))); } public static function isRelaxMode():Boolean{ if (GameData.xml.@relaxMode == "true"){ return (true); }; return (false); } private static function makeTag(_arg1:String):String{ var _local2:int; var _local3:int = _arg1.indexOf("="); if (_local3 < 1){ return (""); }; var _local4:String = _arg1.substring(_local2, _local3); _local2 = (_local3 + 1); _local3 = _arg1.length; var _local5:String = _arg1.substring(_local2, _local3); return ((((("<text id=\"" + _local4) + "\">") + _local5) + "</text>")); } private static function fakePropertiesLoaded(_arg1:Event):void{ var _local4:*; var _local5:*; var _local6:*; var _local2:String = String(GameData.loader.data); var _local3 = -1; do { _local4 = (_local3 + 1); _local3 = _local2.indexOf("\n", _local4); if (_local3 == -1){ _local3 = _local2.length; }; _local5 = _local2.substring(_local4, _local3); _local6 = makeTag(_local5); if (_local6 != ""){ GameData.xml.appendChild(new XMLList(_local6)); }; } while (_local3 != _local2.length); GameData.listener.gameDataLoaded(); } public static function translateTextfields(_arg1:Sprite):void{ var _local3:TextField; var _local2:int; while (_local2 < _arg1.numChildren) { if ((_arg1.getChildAt(_local2) is TextField)){ _local3 = TextField(_arg1.getChildAt(_local2)); GameData.translateTextfield(_local3); } else { if ((_arg1.getChildAt(_local2) is Sprite)){ GameData.translateTextfields(Sprite(_arg1.getChildAt(_local2))); }; }; _local2++; }; } public static function getText(_arg1:String):String{ var id = _arg1; return (String(GameData.xml.text.(@id == id))); } private static function fakeXmlLoaded(_arg1:Event):void{ GameData.xml = new XML(GameData.loader.data); if (GameData.DEV_GENERATE_SEED){ seed = (Math.random() * 100000); } else { seed = int(GameData.xml.@seed); }; if (GameData.propertiesUrl == null){ GameData.listener.gameDataLoaded(); } else { GameData.loader = new URLLoader(); GameData.loader.addEventListener(Event.COMPLETE, GameData.fakePropertiesLoaded); GameData.loader.addEventListener(IOErrorEvent.IO_ERROR, GameData.loadError); GameData.loader.load(new URLRequest(GameData.propertiesUrl)); }; } public static function load(_arg1:Object, _arg2:Boolean, _arg3:String, _arg4:String=null):void{ var _local5:Object; GameData.listener = _arg1; GameData.propertiesUrl = _arg4; if (_arg2){ GameData.loader = new URLLoader(); GameData.loader.addEventListener(Event.COMPLETE, GameData.fakeXmlLoaded); GameData.loader.addEventListener(IOErrorEvent.IO_ERROR, GameData.loadError); GameData.loader.load(new URLRequest(_arg3)); } else { _local5 = ExternalInterface.call("getGameData"); if (((!((_local5 == null))) && (_local5.success))){ GameData.xml = new XML(_local5.message); seed = int(GameData.xml.@seed); GameData.listener.gameDataLoaded(); } else { GameData.loadError(); }; }; } public static function getBoolean(_arg1:String):Boolean{ var id = _arg1; if (GameData.xml.(@id == id) == "true"){ return (true); }; return (false); } public static function isShortMode():Boolean{ if (GameData.xml.@mode == "short"){ return (true); }; return (false); } public static function getSeed():int{ return (seed); } public static function getInt(_arg1:String):int{ var id = _arg1; return (int(GameData.xml.int.(@id == id))); } public static function translateTextfield(_arg1:TextField):void{ var _local2:String = GameData.getText(_arg1.name); if (((!((_local2 == ""))) && (!((_local2 == null))))){ _arg1.text = _local2; }; } } }//package util
Section 43
//Grid (util.Grid) package util { import mutual.*; public class Grid { public var empty:Tile;// = null private var rows:int;// = -1 private var currentPos:Pos;// = null public var arr:Array;// = null private var length:int;// = -1 private var outsidePos:Pos;// = null private var iterateIndex:int;// = -1 private var cols:int;// = -1 public function Grid(_arg1:int, _arg2:int){ this.cols = _arg1; this.rows = _arg2; this.length = (_arg1 * _arg2); arr = new Array(length); empty = new Tile(int.MIN_VALUE, -1); currentPos = new Pos(-1, -1); outsidePos = new Pos(-1, -1); var _local3:int; while (_local3 < length) { arr[_local3] = empty; _local3++; }; } public function getObj(_arg1:int, _arg2:int):Tile{ return (Tile(arr[getIndex(_arg1, _arg2)])); } public function isEmpty(_arg1:int, _arg2:int):Boolean{ return ((getObj(_arg1, _arg2) == empty)); } public function remove(_arg1:int, _arg2:int):Tile{ var _local3:Tile = getObj(_arg1, _arg2); setObj(_arg1, _arg2, empty); return (_local3); } public function getRows():int{ return (rows); } public function getLength():int{ return (length); } private function getIndex(_arg1:int, _arg2:int):int{ return ((_arg1 + (_arg2 * cols))); } public function getCols():int{ return (cols); } public function isValid(_arg1:int, _arg2:int):Boolean{ return ((((((((_arg1 > -1)) && ((_arg1 < cols)))) && ((_arg2 > -1)))) && ((_arg2 < rows)))); } public function setObj(_arg1:int, _arg2:int, _arg3:Tile):void{ arr[getIndex(_arg1, _arg2)] = _arg3; } public function moveObj(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ setObj(_arg3, _arg4, remove(_arg1, _arg2)); } } }//package util
Section 44
//Integer64 (util.Integer64) package util { import util.*; class Integer64 { private var p:Array; private var r:Array; private var s:Array; function Integer64(_arg1){ r = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]; p = [0, 0, 0, 0, 0]; s = [0, 0, 0]; if (_arg1){ merge(_arg1); }; } public function binaryShiftRight(_arg1:Number):void{ var _local5:*; var _local6:*; var _local2:* = ((_arg1 / 15) >> 0); var _local3:* = (_arg1 - (_local2 * 15)); var _local4:* = (p.length - 1); while (_local4 > 0) { _local5 = 0; while (_local5 < _local2) { p[_local5] = p[(_local5 + 1)]; _local5++; }; var _temp1 = _local4; _local4 = (_local4 - 1); var _local7 = _temp1; p[_local7] = 0; }; if (_local3 > 0){ _local6 = 0; while (_local6 < _local3) { shr(); _local6++; }; }; } public function mul32(_arg1:Number):void{ mul64(new Integer64(_arg1)); } public function add32(_arg1:Number):void{ var _local2:* = 0; var _local3:* = (_arg1 & 32767); _arg1 = (_arg1 >> 15); var _local4:* = (_arg1 & 32767); _arg1 = (_arg1 >> 15); var _local5:* = (_arg1 & 3); _local2 = (_local2 + (p[0] + _local3)); p[0] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (p[1] + _local4)); p[1] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (p[2] + _local5)); p[2] = (_local2 & 32767); } public function binaryShiftLeft(_arg1:Number):void{ var _local2:* = 0; while (_local2 < _arg1) { shl(); _local2++; }; } public function mul64(_arg1:Integer64):void{ var _local4:*; var _local2:* = 0; var _local3:* = 0; while (_local3 < 5) { _local4 = _arg1.p[_local3]; _local2 = (_local4 * p[0]); r[_local3][0] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (_local4 * p[1])); r[_local3][1] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (_local4 * p[2])); r[_local3][2] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (_local4 * p[3])); r[_local3][3] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (_local4 * p[4])); r[_local3][4] = (_local2 & 32767); _local3++; }; _local2 = r[0][0]; p[0] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (r[0][1] + r[1][0])); p[1] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + ((r[0][2] + r[1][1]) + r[2][0])); p[2] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0])); p[3] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0])); p[4] = (_local2 & 7); } private function shr():void{ var _local1:* = 0; var _local2:* = 0; var _local3:* = (p.length - 1); while (_local3 >= 0) { _local1 = ((p[_local3] & 1) << 14); p[_local3] = (p[_local3] >> 1); p[_local3] = ((p[_local3] | _local2) & 32767); _local3--; _local2 = _local1; }; } public function init32(_arg1:Number):void{ p[0] = (_arg1 & 32767); _arg1 = (_arg1 >>> 15); p[1] = (_arg1 & 32767); _arg1 = (_arg1 >>> 15); p[2] = (_arg1 & 3); p[3] = 0; p[4] = 0; } public function init(_arg1:Integer64):void{ var _local2:* = 0; while (_local2 < p.length) { p[_local2] = _arg1.p[_local2]; _local2++; }; } private function merge(_arg1:Number):Number{ var _local2:* = 0; while (_local2 < 3) { p[_local2] = (p[_local2] + (_arg1 & 32767)); _arg1 = (_arg1 >>> 15); _local2++; }; return (_arg1); } public function binaryNot(_arg1:Integer64):void{ p[0] = (p[0] ^ _arg1.p[0]); p[1] = (p[1] ^ _arg1.p[1]); p[2] = (p[2] ^ _arg1.p[2]); p[3] = (p[3] ^ _arg1.p[3]); p[4] = (p[4] ^ _arg1.p[4]); } public function get lsb():Number{ return (((p[0] | (p[1] << 15)) | ((p[2] & 3) << 30))); } public function get msb():Number{ return (((((p[2] >> 2) | ((p[3] << 15) >> 2)) | ((p[4] << (15 * 2)) >> 2)) & 2147483647)); } public function mulu32(_arg1:Number):void{ var _local4:*; var _local2:* = 0; s[0] = (_arg1 & 32767); _arg1 = (_arg1 >>> 15); s[1] = (_arg1 & 32767); _arg1 = (_arg1 >>> 15); s[2] = (_arg1 & 3); var _local3:* = 0; while (_local3 < 3) { _local4 = s[_local3]; _local2 = (_local4 * p[0]); r[_local3][0] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (_local4 * p[1])); r[_local3][1] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (_local4 * p[2])); r[_local3][2] = (_local2 & 3); _local3++; }; _local2 = r[0][0]; p[0] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + (r[0][1] + r[1][0])); p[1] = (_local2 & 32767); _local2 = (_local2 >> 15); _local2 = (_local2 + ((r[0][2] + r[1][1]) + r[2][0])); p[2] = (_local2 & 3); p[3] = 0; p[4] = 0; } private function shl():void{ var _local1:* = 0; var _local2:* = 0; var _local3:* = 0; var _local4:* = p.length; while (_local3 < _local4) { _local1 = ((p[_local3] & 0x4000) >> 14); p[_local3] = (p[_local3] << 1); p[_local3] = ((p[_local3] | _local2) & 32767); _local3++; _local2 = _local1; }; } public function add64(_arg1:Integer64):void{ var _local2:* = 0; var _local3:* = 1; var _local4:* = 0; while ((((_local3 < p.length)) && (!((_arg1.p[_local4] == 0))))) { _local3++; }; _local4 = 0; while (_local4 < _local3) { _local2 = (_local2 + (p[_local4] + _arg1.p[_local4])); p[_local4] = (_local2 & 32767); _local2 = (_local2 >> 15); _local4++; }; } } }//package util
Section 45
//MovePoint (util.MovePoint) package util { public class MovePoint { public var x:Number; public var y:Number; public var tick:int; public function MovePoint(_arg1:int, _arg2:Number, _arg3:Number){ this.tick = _arg1; this.x = _arg2; this.y = _arg3; } public function toString():String{ return (((((("MovePoint " + tick) + ", ") + x) + ", ") + y)); } } }//package util
Section 46
//Random (util.Random) package util { import flash.utils.*; public class Random { private var mta:Array; private var mti:Number; private var lastSeed:Number; private static var MATRIX_A:Number = 2567483615; private static var UPPER_MASK:Number = 2147483648; private static var LOWER_MASK:Number = 2147483647; private static var M:Number = 397; private static var N:Number = 624; private static var mag01:Array = [0, 2567483615]; public function Random(_arg1:Number){ mta = new Array(N); mti = (N + 1); if (_arg1){ init_genrand(_arg1); }; } private function init_genrand(_arg1:Number):void{ _arg1 = int(_arg1); var _local2:* = getTimer(); lastSeed = _arg1; mta[0] = _arg1; var _local3:* = _arg1; var _local4:* = new Integer64(null); var _local5:Number = N; mti = 1; while (mti < _local5) { _local4.init32(((_local3 >>> 30) ^ _local3)); _local4.mulu32(1812433253); _local3 = (mta[mti] = int((_local4.lsb + mti))); mti++; }; var _local6:* = getTimer(); } public function nextFloat(){ return ((next(24) / (1 << 24))); } public function nextDouble(){ return ((next(24) / (1 << 24))); } public function get seed():Number{ return (lastSeed); } public function next(_arg1:Number){ if (_arg1 < 32){ return ((genrand_int32() & ((1 << _arg1) - 1))); }; return (genrand_int32()); } public function set seed(_arg1:Number){ init_genrand(_arg1); } public function nextInt(_arg1:Number){ return (((genrand_int32() & 2147483647) % _arg1)); } private function genrand_int32(){ var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local1:Number = N; var _local2:Number = 0; if (mti >= _local1){ if (mti == (_local1 + 1)){ init_genrand(5489); }; _local3 = M; _local4 = UPPER_MASK; _local5 = LOWER_MASK; _local6 = mag01; _local7 = getTimer(); _local8 = 0; _local9 = (_local1 - _local3); _local10 = (_local3 - _local1); _local8 = 0; while (_local8 < _local9) { _local2 = ((mta[_local8] & _local4) | (mta[(_local8 + 1)] & _local5)); mta[_local8] = ((mta[(_local8 + _local3)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]); _local8++; }; _local9 = (_local1 - 1); while (_local8 < _local9) { _local2 = ((mta[_local8] & _local4) | (mta[(_local8 + 1)] & _local5)); mta[_local8] = ((mta[(_local8 + _local10)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]); _local8++; }; _local2 = ((mta[(_local1 - 1)] & _local4) | (mta[0] & _local5)); mta[(_local1 - 1)] = ((mta[(_local3 - 1)] ^ (_local2 >>> 1)) ^ _local6[(_local2 & 1)]); mti = 0; _local11 = getTimer(); }; _local2 = mta[mti++]; _local2 = (_local2 ^ (_local2 >>> 11)); _local2 = (_local2 ^ ((_local2 << 7) & 2636928640)); _local2 = (_local2 ^ ((_local2 << 15) & 4022730752)); _local2 = (_local2 ^ (_local2 >>> 18)); return (_local2); } } }//package util
Section 47
//Renderable (util.Renderable) package util { public interface Renderable { function render(_arg1:int, _arg2:Number):int; } }//package util
Section 48
//ResizePoint (util.ResizePoint) package util { public class ResizePoint { public var scaleX:Number; public var tick:int; public var scaleY:Number; public function ResizePoint(_arg1:int, _arg2:Number, _arg3:Number){ this.tick = _arg1; this.scaleX = _arg2; this.scaleY = _arg3; } public function toString():String{ return ((((((("rp[" + tick) + " ") + scaleX) + " ") + scaleY) + "]")); } } }//package util
Section 49
//RotationPoint (util.RotationPoint) package util { public class RotationPoint { public var rotation:Number; public var fullRevolutions:int; public var tick:int; public var direction:int; public function RotationPoint(_arg1:int, _arg2:Number, _arg3:int=1, _arg4:int=0){ this.tick = _arg1; this.rotation = _arg2; this.direction = _arg3; this.fullRevolutions = _arg4; } } }//package util
Section 50
//SineChange (util.SineChange) package util { public class SineChange implements Renderable { public var startInput:Number; public var diff:Number; public var endInput:Number; public var value:Number;// = 0 public var totalTicks:int; public var endTick:int; public var startTick:int; public function SineChange(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number){ this.startTick = _arg1; this.endTick = _arg2; this.startInput = _arg3; this.endInput = _arg4; totalTicks = (_arg2 - _arg1); diff = (_arg4 - _arg3); } public function render(_arg1:int, _arg2:Number):int{ var _local3:Number; if (_arg1 >= startTick){ if (_arg1 >= endTick){ value = Math.sin(endInput); return (Time.STOP); }; _local3 = (((_arg1 + _arg2) - startTick) / totalTicks); value = Math.sin((startInput + (diff * _local3))); }; return (Time.CONTINUE); } } }//package util
Section 51
//SoundFader (util.SoundFader) package util { import flash.events.*; import flash.media.*; import flash.utils.*; public class SoundFader { private var miniStep:Number;// = 0.01 private var millisec:int; private var timer:Timer; private var fadeStep:Number;// = 0.03 private var nrOfSteps:int; private var panning:Number; private var listener:Object; private var extraRepeats:int;// = 5 public var soundChannel:SoundChannel; public function SoundFader(_arg1:SoundChannel, _arg2:int, _arg3:Object=null){ this.soundChannel = _arg1; this.millisec = _arg2; this.listener = _arg3; var _local4:Number = _arg1.soundTransform.volume; nrOfSteps = (_local4 / fadeStep); panning = _arg1.soundTransform.pan; var _local5:int = (_arg2 / nrOfSteps); timer = new Timer(_local5, (nrOfSteps + extraRepeats)); timer.addEventListener("timer", fade); timer.addEventListener("timerComplete", destroy); timer.start(); } public function destroy(_arg1:TimerEvent):void{ soundChannel.stop(); if (listener != null){ listener.soundFaderCompleted(this); }; } public function fade(_arg1:TimerEvent):void{ var _local2:Number = soundChannel.soundTransform.volume; if (_local2 > fadeStep){ _local2 = (_local2 - fadeStep); } else { _local2 = (_local2 - miniStep); }; if (_local2 < 0){ _local2 = 0; }; soundChannel.soundTransform = new SoundTransform(_local2, panning); } } }//package util
Section 52
//Stack (util.Stack) package util { public class Stack { protected var array:Array; public function Stack(){ array = new Array(); } public function add(_arg1:int, _arg2):void{ if ((((_arg1 < 0)) || ((_arg1 > array.length)))){ throw (new Error(((("index " + _arg1) + " out of range ") + array.length))); }; array.splice(_arg1, 0, _arg2); } public function s(_arg1:int, _arg2){ var _local3:*; if ((((_arg1 < 0)) || ((_arg1 >= array.length)))){ throw (new Error(((("index " + _arg1) + " out of range ") + array.length))); }; _local3 = array[_arg1]; array[_arg1] = _arg2; return (_local3); } public function remove(_arg1:int){ if ((((_arg1 < 0)) || ((_arg1 >= array.length)))){ throw (new Error(((("index " + _arg1) + " out of range ") + (array.length - 1)))); }; return (array.splice(_arg1, 1)[0]); } public function g(_arg1:int){ if ((((_arg1 < 0)) || ((_arg1 >= array.length)))){ throw (new Error(((("index " + _arg1) + " out of range ") + array.length))); }; return (array[_arg1]); } public function size():int{ return (array.length); } public function indexOf(_arg1, _arg2:int=0):int{ return (array.indexOf(_arg1, _arg2)); } public function toString():String{ return (array.toString()); } public function pop(){ return (array.pop()); } public function getArrayCopy():Array{ var _local1:Array = new Array(); var _local2:int; while (_local2 < size()) { _local1[_local2] = g(_local2); _local2++; }; return (_local1); } public function lastIndexOf(_arg1, _arg2:int=2147483647):int{ return (array.lastIndexOf(_arg1, _arg2)); } public function push(_arg1){ array.push(_arg1); return (_arg1); } } }//package util
Section 53
//Time (util.Time) package util { import flash.events.*; import flash.display.*; import flash.utils.*; public class Time { public static const STOP:int = 1; public static const STOP_HIDE:int = 2; public static const STOP_REMOVE:int = 3; public static const CONTINUE:int = 0; private static var unprocessedTime:Number = 0; private static var lastTime:Number = -1; private static var msPerTick:Number; private static var enterFrameSprite:Sprite = null; private static var passedTime:Number = 0; private static var alpha:Number = 0; private static var objectsToRender:Array; private static var listener:TimeListener = null; private static var currentTick:int = -1; public function Time(){ trace("Do not instantiate! Class Time should be used static!"); } public static function advanceTime(_arg1:Event):void{ var _local6:Renderable; var _local7:int; if (Time.lastTime == -1){ Time.lastTime = getTimer(); }; var _local2:int = getTimer(); Time.passedTime = (_local2 - Time.lastTime); Time.lastTime = _local2; Time.unprocessedTime = (Time.unprocessedTime + Time.passedTime); var _local3:int = int((Time.unprocessedTime / Time.msPerTick)); Time.unprocessedTime = (Time.unprocessedTime - (_local3 * Time.msPerTick)); var _local4:int; while (_local4 < _local3) { Time.currentTick++; if (listener != null){ listener.tick(currentTick); }; _local4++; }; Time.alpha = (Time.unprocessedTime / Time.msPerTick); var _local5:int = (Time.objectsToRender.length - 1); while (_local5 >= 0) { _local6 = Renderable(objectsToRender[_local5]); _local7 = _local6.render(currentTick, alpha); if (_local7 != Time.CONTINUE){ Time.stopRender(_local6); if (_local7 == Time.STOP_HIDE){ DisplayObject(_local6).visible = false; } else { if (_local7 == Time.STOP_REMOVE){ DisplayObject(_local6).parent.removeChild(DisplayObject(_local6)); }; }; }; _local5--; }; } public static function reset():void{ Time.currentTick = -1; } public static function init(_arg1:Number):void{ Time.msPerTick = (1000 / _arg1); Time.initRenderer(); } public static function getTick():int{ return (currentTick); } public static function stopAll():void{ Time.objectsToRender = new Array(); } public static function startRender(_arg1:Renderable):void{ var _local2:int = Time.objectsToRender.indexOf(_arg1, 0); if (_local2 == -1){ Time.objectsToRender.push(_arg1); }; } public static function stop():void{ enterFrameSprite.removeEventListener(Event.ENTER_FRAME, Time.advanceTime); } public static function start(_arg1:Sprite):void{ Time.enterFrameSprite = _arg1; _arg1.addEventListener(Event.ENTER_FRAME, Time.advanceTime); } public static function getMsPerTick():Number{ return (msPerTick); } public static function initRenderer():void{ Time.objectsToRender = new Array(); } public static function getAlpha():Number{ return (alpha); } public static function stopRender(_arg1:Renderable):void{ var _local2:int = Time.objectsToRender.indexOf(_arg1, 0); if (_local2 != -1){ Time.objectsToRender.splice(_local2, 1); }; } public static function setListener(_arg1:TimeListener):void{ Time.listener = _arg1; } public static function isRendered(_arg1:Renderable):Boolean{ return (!((Time.objectsToRender.indexOf(_arg1) == -1))); } } }//package util
Section 54
//TimeListener (util.TimeListener) package util { public interface TimeListener { function tick(_arg1:int):void; } }//package util
Section 55
//BgDown (BgDown) package { import flash.display.*; public dynamic class BgDown extends Sprite { } }//package
Section 56
//BgLeft (BgLeft) package { import flash.display.*; public dynamic class BgLeft extends Sprite { } }//package
Section 57
//BgRight (BgRight) package { import flash.display.*; public dynamic class BgRight extends Sprite { } }//package
Section 58
//BgUp (BgUp) package { import flash.display.*; public dynamic class BgUp extends Sprite { public var fish:MovieClip; } }//package
Section 59
//Bird1Snd (Bird1Snd) package { import flash.media.*; public dynamic class Bird1Snd extends Sound { } }//package
Section 60
//Bird2Snd (Bird2Snd) package { import flash.media.*; public dynamic class Bird2Snd extends Sound { } }//package
Section 61
//BirdS (BirdS) package { import flash.display.*; public dynamic class BirdS extends Sprite { public var speak2:BirdSpeak2Mc; public var speak1:BirdSpeak1Mc; public var wink:BirdWinkMc; } }//package
Section 62
//BirdSpeak1Mc (BirdSpeak1Mc) package { import flash.display.*; public dynamic class BirdSpeak1Mc extends MovieClip { } }//package
Section 63
//BirdSpeak2Mc (BirdSpeak2Mc) package { import flash.display.*; public dynamic class BirdSpeak2Mc extends MovieClip { } }//package
Section 64
//BirdWinkMc (BirdWinkMc) package { import flash.display.*; public dynamic class BirdWinkMc extends MovieClip { } }//package
Section 65
//BottomLine (BottomLine) package { import flash.display.*; public dynamic class BottomLine extends Sprite { } }//package
Section 66
//BoxLandsSnd (BoxLandsSnd) package { import flash.media.*; public dynamic class BoxLandsSnd extends Sound { } }//package
Section 67
//Bubble (Bubble) package { import flash.display.*; public dynamic class Bubble extends Sprite { } }//package
Section 68
//BugLeftSnd (BugLeftSnd) package { import flash.media.*; public dynamic class BugLeftSnd extends Sound { } }//package
Section 69
//BugRightSnd (BugRightSnd) package { import flash.media.*; public dynamic class BugRightSnd extends Sound { } }//package
Section 70
//Coconut (Coconut) package { import flash.display.*; public dynamic class Coconut extends Sprite { } }//package
Section 71
//DownLoopSnd (DownLoopSnd) package { import flash.media.*; public dynamic class DownLoopSnd extends Sound { } }//package
Section 72
//EvenTimeWarningSnd (EvenTimeWarningSnd) package { import flash.media.*; public dynamic class EvenTimeWarningSnd extends Sound { } }//package
Section 73
//ExitMc (ExitMc) package { import flash.display.*; public dynamic class ExitMc extends MovieClip { } }//package
Section 74
//Fluid (Fluid) package { import flash.display.*; public dynamic class Fluid extends MovieClip { } }//package
Section 75
//FlyingBugS (FlyingBugS) package { import flash.display.*; public dynamic class FlyingBugS extends Sprite { } }//package
Section 76
//GradientS (GradientS) package { import flash.display.*; public dynamic class GradientS extends Sprite { } }//package
Section 77
//Instructions1 (Instructions1) package { import flash.text.*; import flash.display.*; public dynamic class Instructions1 extends Sprite { public var instruction_2_:TextField; public var instruction_1_:TextField; } }//package
Section 78
//Instructions2 (Instructions2) package { import flash.text.*; import flash.display.*; public dynamic class Instructions2 extends Sprite { public var instruction_3_:TextField; } }//package
Section 79
//InstructionsS (InstructionsS) package { import flash.text.*; import flash.display.*; public dynamic class InstructionsS extends Sprite { public var click_to_begin_:TextField; public var countDownTf:TextField; public var instructions_:TextField; public var instructions1:Instructions1; public var instructions2:Instructions2; } }//package
Section 80
//IntroSnd (IntroSnd) package { import flash.media.*; public dynamic class IntroSnd extends Sound { } }//package
Section 81
//Landing1Snd (Landing1Snd) package { import flash.media.*; public dynamic class Landing1Snd extends Sound { } }//package
Section 82
//Landing2Snd (Landing2Snd) package { import flash.media.*; public dynamic class Landing2Snd extends Sound { } }//package
Section 83
//Landing3Snd (Landing3Snd) package { import flash.media.*; public dynamic class Landing3Snd extends Sound { } }//package
Section 84
//LeafS (LeafS) package { import flash.display.*; public dynamic class LeafS extends Sprite { } }//package
Section 85
//LeafsS (LeafsS) package { import flash.display.*; public dynamic class LeafsS extends Sprite { } }//package
Section 86
//Leef (Leef) package { import flash.display.*; public dynamic class Leef extends Sprite { } }//package
Section 87
//LeftLoopSnd (LeftLoopSnd) package { import flash.media.*; public dynamic class LeftLoopSnd extends Sound { } }//package
Section 88
//LevelBonusSnd (LevelBonusSnd) package { import flash.media.*; public dynamic class LevelBonusSnd extends Sound { } }//package
Section 89
//LevelClearSnd (LevelClearSnd) package { import flash.media.*; public dynamic class LevelClearSnd extends Sound { } }//package
Section 90
//LevelMeterInnerS (LevelMeterInnerS) package { import flash.text.*; import flash.display.*; public dynamic class LevelMeterInnerS extends Sprite { public var fluid:Fluid; public var levelNrTf:TextField; } }//package
Section 91
//LightMc (LightMc) package { import flash.display.*; public dynamic class LightMc extends MovieClip { } }//package
Section 92
//LightSnd (LightSnd) package { import flash.media.*; public dynamic class LightSnd extends Sound { } }//package
Section 93
//LoopSnd (LoopSnd) package { import flash.media.*; public dynamic class LoopSnd extends Sound { } }//package
Section 94
//Main (Main) package { import flash.events.*; import mutual.*; import flash.display.*; import util.*; import client.*; public class Main extends Sprite { public var buttons:Sprite;// = null public var bgDown:BgDown;// = null public var intro:IntroMc;// = null public var gameStarted:Boolean;// = false public var game:GameC;// = null public var communicator:Communicator;// = null public var gameLog:String;// = "" public var outro:OutroS;// = null public var soundManager:SoundManager;// = null public static const DEV_MODE:Boolean = false; public static var relaxMode:Boolean = false; public static var moneyGame:Boolean = true; public function Main(){ communicator = new Communicator(); Time.init(Game.TICKS_PER_SECOND); Time.start(this); soundManager = new SoundManager(); intro = new IntroMc(); addChild(intro); GameData.load(this, Main.DEV_MODE, "gamedata/gamedata.xml", "gamedata/bric_a_brac.properties"); } public function log(_arg1:String):void{ gameLog = (gameLog + (_arg1 + "\n")); } public function gameDataLoaded():void{ if (GameData.xml.@sound == "off"){ soundManager.toggleSound(); }; if (GameData.xml.@music == "off"){ soundManager.toggleMusic(); }; soundManager.startIntroSound(); intro.init(this); game = new GameC(this); } public function gameEnd(_arg1:int, _arg2:int):void{ log(("gameEnd " + Time.getTick())); if (!Main.DEV_MODE){ communicator.sendFsCommand("gameEnd", ("" + _arg1)); }; outro = new OutroS((game.tiles.level > -1), (game.tiles.level + 1), _arg1, this, _arg2); soundManager.gameEnd((((_arg2 == Game.TIME_RAN_OUT)) || ((_arg2 == Game.LEVEL_TIME_RAN_OUT)))); addChild(outro); swapChildren(outro, buttons); Time.startRender(outro); } public function introFinished():void{ if (!Main.DEV_MODE){ communicator.sendFsCommand("gameStart", ""); }; gameStarted = true; Time.reset(); Time.setListener(game); game.start(); } public function gameQuit(_arg1:Event=null):void{ if (!Main.DEV_MODE){ communicator.sendFsCommand("gameQuit", ""); }; trace("*****************************************************************************************"); trace(gameLog); } public function addPlayData(_arg1:Array):void{ var _local2:int = (Time.getTick() + 1); _arg1.splice(1, 0, _local2); game.addPlayData(_arg1); communicator.sendPlayData(_arg1); } } }//package
Section 95
//MaskedLeafsS (MaskedLeafsS) package { import flash.display.*; public dynamic class MaskedLeafsS extends Sprite { } }//package
Section 96
//MusicMc (MusicMc) package { import flash.display.*; public dynamic class MusicMc extends MovieClip { } }//package
Section 97
//Numbers (Numbers) package { import flash.text.*; import flash.display.*; public dynamic class Numbers extends Sprite { public var levelsPlayedTf:TextField; public var scoreTf:TextField; } }//package
Section 98
//OddTimeWarningSnd (OddTimeWarningSnd) package { import flash.media.*; public dynamic class OddTimeWarningSnd extends Sound { } }//package
Section 99
//OutroSnd (OutroSnd) package { import flash.media.*; public dynamic class OutroSnd extends Sound { } }//package
Section 100
//RegisterToPlay (RegisterToPlay) package { import flash.text.*; import flash.display.*; public dynamic class RegisterToPlay extends Sprite { public var register_to_play_:TextField; } }//package
Section 101
//RightLoopSnd (RightLoopSnd) package { import flash.media.*; public dynamic class RightLoopSnd extends Sound { } }//package
Section 102
//ScorePopText (ScorePopText) package { import flash.text.*; import flash.display.*; public dynamic class ScorePopText extends Sprite { public var textField:TextField; } }//package
Section 103
//ScoreS (ScoreS) package { import flash.text.*; import flash.display.*; public dynamic class ScoreS extends Sprite { public var score:TextField; } }//package
Section 104
//Seed (Seed) package { import flash.display.*; public dynamic class Seed extends Sprite { } }//package
Section 105
//SelectSnd (SelectSnd) package { import flash.media.*; public dynamic class SelectSnd extends Sound { } }//package
Section 106
//ShuffleSnd (ShuffleSnd) package { import flash.media.*; public dynamic class ShuffleSnd extends Sound { } }//package
Section 107
//SoundMc (SoundMc) package { import flash.display.*; public dynamic class SoundMc extends MovieClip { } }//package
Section 108
//SuccessSnd (SuccessSnd) package { import flash.media.*; public dynamic class SuccessSnd extends Sound { } }//package
Section 109
//TimeBonusLabel (TimeBonusLabel) package { import flash.text.*; import flash.display.*; public dynamic class TimeBonusLabel extends Sprite { public var time_bonus_:TextField; } }//package
Section 110
//TimeBonusS (TimeBonusS) package { import flash.text.*; import flash.display.*; public dynamic class TimeBonusS extends Sprite { public var timeBonus:TextField; } }//package
Section 111
//TimeEndSnd (TimeEndSnd) package { import flash.media.*; public dynamic class TimeEndSnd extends Sound { } }//package
Section 112
//Titles (Titles) package { import flash.text.*; import flash.display.*; public dynamic class Titles extends Sprite { public var levels_played_:TextField; public var score_:TextField; } }//package
Section 113
//TrayDown (TrayDown) package { import flash.display.*; public dynamic class TrayDown extends Sprite { } }//package
Section 114
//TrayLeft (TrayLeft) package { import flash.display.*; public dynamic class TrayLeft extends Sprite { } }//package
Section 115
//TrayRight (TrayRight) package { import flash.display.*; public dynamic class TrayRight extends Sprite { } }//package
Section 116
//TrayUp (TrayUp) package { import flash.display.*; public dynamic class TrayUp extends Sprite { } }//package
Section 117
//UpLoop1Snd (UpLoop1Snd) package { import flash.media.*; public dynamic class UpLoop1Snd extends Sound { } }//package
Section 118
//UpLoop2Snd (UpLoop2Snd) package { import flash.media.*; public dynamic class UpLoop2Snd extends Sound { } }//package
Section 119
//WrongLineMc (WrongLineMc) package { import client.*; public dynamic class WrongLineMc extends LineMc { } }//package
Section 120
//WrongPipeCornerMc (WrongPipeCornerMc) package { import client.*; public dynamic class WrongPipeCornerMc extends PipeCornerMc { } }//package
Section 121
//WrongSnd (WrongSnd) package { import flash.media.*; public dynamic class WrongSnd extends Sound { } }//package

Library Items

Symbol 1 Sound {WrongSnd}
Symbol 2 Sound {UpLoop2Snd}
Symbol 3 Sound {UpLoop1Snd}
Symbol 4 Sound {TimeEndSnd}
Symbol 5 Sound {SuccessSnd}
Symbol 6 Sound {ShuffleSnd}
Symbol 7 Sound {SelectSnd}
Symbol 8 Sound {RightLoopSnd}
Symbol 9 Sound {OutroSnd}
Symbol 10 Sound {OddTimeWarningSnd}
Symbol 11 Sound {LoopSnd}
Symbol 12 Sound {LightSnd}
Symbol 13 Sound {LevelClearSnd}
Symbol 14 Sound {LevelBonusSnd}
Symbol 15 Sound {LeftLoopSnd}
Symbol 16 Sound {Landing3Snd}
Symbol 17 Sound {Landing2Snd}
Symbol 18 Sound {Landing1Snd}
Symbol 19 Sound {IntroSnd}
Symbol 20 Sound {EvenTimeWarningSnd}
Symbol 21 Sound {DownLoopSnd}
Symbol 22 Sound {BugRightSnd}
Symbol 23 Sound {BugLeftSnd}
Symbol 24 Sound {BoxLandsSnd}
Symbol 25 Sound {Bird2Snd}
Symbol 26 Sound {Bird1Snd}
Symbol 27 BitmapUsed by:28
Symbol 28 GraphicUses:27Used by:29
Symbol 29 MovieClip {Seed}Uses:28
Symbol 30 BitmapUsed by:31
Symbol 31 GraphicUses:30Used by:32
Symbol 32 MovieClip {Bubble}Uses:31
Symbol 33 BitmapUsed by:34
Symbol 34 GraphicUses:33Used by:35
Symbol 35 MovieClip {Coconut}Uses:34
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClipUses:36Used by:38
Symbol 38 MovieClip {BottomLine}Uses:37
Symbol 39 GraphicUsed by:42
Symbol 40 FontUsed by:41
Symbol 41 EditableTextUses:40Used by:42
Symbol 42 MovieClip {client.SignS}Uses:39 41
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClip {TrayRight}Uses:43
Symbol 45 GraphicUsed by:46
Symbol 46 MovieClip {TrayLeft}Uses:45
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClip {TrayUp}Uses:47
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClip {TrayDown}Uses:49
Symbol 51 BitmapUsed by:52
Symbol 52 GraphicUses:51Used by:94
Symbol 53 FontUsed by:54 55 57 58 60 85 104 106 107 127 128
Symbol 54 EditableTextUses:53Used by:56
Symbol 55 EditableTextUses:53Used by:56
Symbol 56 MovieClip {Titles}Uses:54 55Used by:94
Symbol 57 EditableTextUses:53Used by:59
Symbol 58 EditableTextUses:53Used by:59
Symbol 59 MovieClip {Numbers}Uses:57 58Used by:94
Symbol 60 EditableTextUses:53Used by:94
Symbol 61 GraphicUsed by:65
Symbol 62 BitmapUsed by:63
Symbol 63 GraphicUses:62Used by:64
Symbol 64 MovieClip {LeafS}Uses:63Used by:65 66
Symbol 65 MovieClip {MaskedLeafsS}Uses:61 64Used by:94
Symbol 66 MovieClip {LeafsS}Uses:64Used by:94
Symbol 67 BitmapUsed by:68
Symbol 68 GraphicUses:67Used by:84
Symbol 69 BitmapUsed by:70
Symbol 70 GraphicUses:69Used by:75 76 83
Symbol 71 BitmapUsed by:72
Symbol 72 GraphicUses:71Used by:75 76
Symbol 73 BitmapUsed by:74
Symbol 74 GraphicUses:73Used by:75 76
Symbol 75 MovieClip {BirdSpeak1Mc}Uses:70 72 74Used by:84
Symbol 76 MovieClip {BirdSpeak2Mc}Uses:70 72 74Used by:84
Symbol 77 BitmapUsed by:78
Symbol 78 GraphicUses:77Used by:83
Symbol 79 BitmapUsed by:80
Symbol 80 GraphicUses:79Used by:83
Symbol 81 BitmapUsed by:82
Symbol 82 GraphicUses:81Used by:83
Symbol 83 MovieClip {BirdWinkMc}Uses:70 78 80 82Used by:84
Symbol 84 MovieClip {BirdS}Uses:68 75 76 83Used by:94
Symbol 85 EditableTextUses:53Used by:86
Symbol 86 MovieClip {RegisterToPlay}Uses:85Used by:94
Symbol 87 BitmapUsed by:88
Symbol 88 GraphicUses:87Used by:89
Symbol 89 MovieClip {FlyingBugS}Uses:88Used by:94
Symbol 90 GraphicUsed by:93
Symbol 91 ShapeTweeningUsed by:93
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClip {LightMc}Uses:90 91 92Used by:94
Symbol 94 MovieClip {client.OutroS}Uses:52 56 59 60 65 66 84 86 89 93
Symbol 95 BitmapUsed by:96
Symbol 96 GraphicUses:95Used by:149
Symbol 97 GraphicUsed by:129
Symbol 98 FontUsed by:99 152 282
Symbol 99 EditableTextUses:98Used by:129
Symbol 100 GraphicUsed by:101
Symbol 101 MovieClipUses:100Used by:105
Symbol 102 BitmapUsed by:103 119 125
Symbol 103 GraphicUses:102Used by:105
Symbol 104 EditableTextUses:53Used by:105
Symbol 105 MovieClip {Instructions2}Uses:101 103 104Used by:129
Symbol 106 EditableTextUses:53Used by:126
Symbol 107 EditableTextUses:53Used by:126
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClipUses:108Used by:126
Symbol 110 BitmapUsed by:118 183
Symbol 111 BitmapUsed by:118 184
Symbol 112 BitmapUsed by:118 191
Symbol 113 BitmapUsed by:118 190
Symbol 114 BitmapUsed by:118 189
Symbol 115 BitmapUsed by:118 187
Symbol 116 BitmapUsed by:118 186
Symbol 117 BitmapUsed by:118 195
Symbol 118 GraphicUses:110 111 112 113 114 115 116 117Used by:126
Symbol 119 GraphicUses:102Used by:120 257
Symbol 120 MovieClipUses:119Used by:126
Symbol 121 BitmapUsed by:122
Symbol 122 GraphicUses:121Used by:123 257
Symbol 123 MovieClipUses:122Used by:126
Symbol 124 BitmapUsed by:125 230
Symbol 125 GraphicUses:124 102Used by:126
Symbol 126 MovieClip {Instructions1}Uses:106 107 109 118 120 123 125Used by:129
Symbol 127 EditableTextUses:53Used by:129
Symbol 128 EditableTextUses:53Used by:129
Symbol 129 MovieClip {InstructionsS}Uses:97 99 105 126 127 128Used by:149
Symbol 130 BitmapUsed by:131
Symbol 131 GraphicUses:130Used by:149
Symbol 132 BitmapUsed by:133
Symbol 133 GraphicUses:132Used by:149
Symbol 134 BitmapUsed by:135
Symbol 135 GraphicUses:134Used by:149
Symbol 136 BitmapUsed by:137
Symbol 137 GraphicUses:136Used by:149
Symbol 138 BitmapUsed by:139
Symbol 139 GraphicUses:138Used by:149
Symbol 140 BitmapUsed by:141
Symbol 141 GraphicUses:140Used by:149
Symbol 142 BitmapUsed by:143
Symbol 143 GraphicUses:142Used by:149
Symbol 144 BitmapUsed by:145
Symbol 145 GraphicUses:144Used by:149
Symbol 146 ShapeTweeningUsed by:149
Symbol 147 ShapeTweeningUsed by:149
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClip {client.IntroMc}Uses:96 129 131 133 135 137 139 141 143 145 146 147 148
Symbol 150 GraphicUsed by:151
Symbol 151 MovieClip {GradientS}Uses:150
Symbol 152 EditableTextUses:98Used by:153
Symbol 153 MovieClip {ScoreS}Uses:152
Symbol 154 GraphicUsed by:155 159 162
Symbol 155 MovieClipUses:154Used by:158
Symbol 156 GraphicUsed by:158
Symbol 157 GraphicUsed by:158 161
Symbol 158 MovieClip {SoundMc}Uses:155 156 157
Symbol 159 MovieClipUses:154Used by:161
Symbol 160 GraphicUsed by:161
Symbol 161 MovieClip {MusicMc}Uses:159 160 157
Symbol 162 MovieClipUses:154Used by:164
Symbol 163 GraphicUsed by:164
Symbol 164 MovieClip {ExitMc}Uses:162 163
Symbol 165 GraphicUsed by:182
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClipUses:166Used by:182
Symbol 168 GraphicUsed by:182
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClipUses:169Used by:182
Symbol 171 GraphicUsed by:175
Symbol 172 ShapeTweeningUsed by:175
Symbol 173 ShapeTweeningUsed by:175
Symbol 174 GraphicUsed by:175
Symbol 175 MovieClipUses:171 172 173 174Used by:182
Symbol 176 GraphicUsed by:182
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClipUses:177Used by:182
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClipUses:179Used by:182
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClip {client.ClockMc}Uses:165 167 168 170 175 176 178 180 181
Symbol 183 GraphicUses:110Used by:185
Symbol 184 GraphicUses:111Used by:185
Symbol 185 MovieClip {WrongLineMc}Uses:183 184
Symbol 186 GraphicUses:116Used by:188
Symbol 187 GraphicUses:115Used by:188
Symbol 188 MovieClip {client.LineMc}Uses:186 187
Symbol 189 GraphicUses:114Used by:194
Symbol 190 GraphicUses:113Used by:194
Symbol 191 GraphicUses:112Used by:194
Symbol 192 BitmapUsed by:193
Symbol 193 GraphicUses:192Used by:194
Symbol 194 MovieClip {WrongPipeCornerMc}Uses:189 190 191 193
Symbol 195 GraphicUses:117Used by:202
Symbol 196 BitmapUsed by:197
Symbol 197 GraphicUses:196Used by:202
Symbol 198 BitmapUsed by:199
Symbol 199 GraphicUses:198Used by:202
Symbol 200 BitmapUsed by:201
Symbol 201 GraphicUses:200Used by:202
Symbol 202 MovieClip {client.PipeCornerMc}Uses:195 197 199 201
Symbol 203 FontUsed by:204 290 292
Symbol 204 EditableTextUses:203Used by:205
Symbol 205 MovieClip {ScorePopText}Uses:204Used by:222
Symbol 206 BitmapUsed by:207
Symbol 207 GraphicUses:206Used by:222
Symbol 208 BitmapUsed by:209
Symbol 209 GraphicUses:208Used by:222
Symbol 210 BitmapUsed by:211
Symbol 211 GraphicUses:210Used by:222
Symbol 212 BitmapUsed by:213
Symbol 213 GraphicUses:212Used by:222
Symbol 214 BitmapUsed by:215
Symbol 215 GraphicUses:214Used by:222
Symbol 216 BitmapUsed by:217
Symbol 217 GraphicUses:216Used by:222
Symbol 218 BitmapUsed by:219
Symbol 219 GraphicUses:218Used by:222
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:222
Symbol 222 MovieClip {client.ScorePopMc}Uses:205 207 209 211 213 215 217 219 221
Symbol 223 BitmapUsed by:224
Symbol 224 GraphicUses:223Used by:229
Symbol 225 BitmapUsed by:226
Symbol 226 GraphicUses:225Used by:229
Symbol 227 BitmapUsed by:228
Symbol 228 GraphicUses:227Used by:229
Symbol 229 MovieClipUses:224 226 228Used by:257
Symbol 230 GraphicUses:124Used by:257
Symbol 231 BitmapUsed by:232
Symbol 232 GraphicUses:231Used by:257
Symbol 233 BitmapUsed by:234
Symbol 234 GraphicUses:233Used by:257
Symbol 235 BitmapUsed by:236
Symbol 236 GraphicUses:235Used by:257
Symbol 237 BitmapUsed by:238
Symbol 238 GraphicUses:237Used by:257
Symbol 239 BitmapUsed by:240
Symbol 240 GraphicUses:239Used by:257
Symbol 241 BitmapUsed by:242
Symbol 242 GraphicUses:241Used by:257
Symbol 243 BitmapUsed by:244
Symbol 244 GraphicUses:243Used by:257
Symbol 245 BitmapUsed by:246
Symbol 246 GraphicUses:245Used by:257
Symbol 247 BitmapUsed by:248
Symbol 248 GraphicUses:247Used by:257
Symbol 249 BitmapUsed by:250
Symbol 250 GraphicUses:249Used by:257
Symbol 251 BitmapUsed by:252
Symbol 252 GraphicUses:251Used by:257
Symbol 253 BitmapUsed by:254
Symbol 254 GraphicUses:253Used by:257
Symbol 255 BitmapUsed by:256
Symbol 256 GraphicUses:255Used by:257
Symbol 257 MovieClip {client.TileMc}Uses:119 229 230 122 232 234 236 238 240 242 244 246 248 250 252 254 256
Symbol 258 BitmapUsed by:259
Symbol 259 GraphicUses:258Used by:260
Symbol 260 MovieClip {BgDown}Uses:259
Symbol 261 BitmapUsed by:262
Symbol 262 GraphicUses:261Used by:263
Symbol 263 MovieClip {BgLeft}Uses:262
Symbol 264 BitmapUsed by:265
Symbol 265 GraphicUses:264Used by:266
Symbol 266 MovieClip {BgRight}Uses:265
Symbol 267 BitmapUsed by:268
Symbol 268 GraphicUses:267Used by:281
Symbol 269 BitmapUsed by:270
Symbol 270 GraphicUses:269Used by:280
Symbol 271 BitmapUsed by:272
Symbol 272 GraphicUses:271Used by:279
Symbol 273 BitmapUsed by:274
Symbol 274 GraphicUses:273Used by:279
Symbol 275 BitmapUsed by:276
Symbol 276 GraphicUses:275Used by:279
Symbol 277 BitmapUsed by:278
Symbol 278 GraphicUses:277Used by:279
Symbol 279 MovieClipUses:272 274 276 278Used by:280
Symbol 280 MovieClipUses:270 279Used by:281
Symbol 281 MovieClip {BgUp}Uses:268 280
Symbol 282 EditableTextUses:98Used by:283
Symbol 283 MovieClip {TimeBonusLabel}Uses:282Used by:294
Symbol 284 GraphicUsed by:291
Symbol 285 GraphicUsed by:287
Symbol 286 GraphicUsed by:287
Symbol 287 MovieClip {Fluid}Uses:285 286Used by:291
Symbol 288 BitmapUsed by:289
Symbol 289 GraphicUses:288Used by:291
Symbol 290 EditableTextUses:203Used by:291
Symbol 291 MovieClip {LevelMeterInnerS}Uses:284 287 289 290Used by:294
Symbol 292 EditableTextUses:203Used by:293
Symbol 293 MovieClip {TimeBonusS}Uses:292Used by:294
Symbol 294 MovieClip {client.LevelMeterS}Uses:291 293 283
Symbol 295 BitmapUsed by:296
Symbol 296 GraphicUses:295Used by:297
Symbol 297 MovieClip {Leef}Uses:296

Instance Names

"shuffling_"Symbol 42 MovieClip {client.SignS} Frame 1Symbol 41 EditableText
"levels_played_"Symbol 56 MovieClip {Titles} Frame 1Symbol 54 EditableText
"score_"Symbol 56 MovieClip {Titles} Frame 1Symbol 55 EditableText
"levelsPlayedTf"Symbol 59 MovieClip {Numbers} Frame 1Symbol 57 EditableText
"scoreTf"Symbol 59 MovieClip {Numbers} Frame 1Symbol 58 EditableText
"speak1"Symbol 84 MovieClip {BirdS} Frame 1Symbol 75 MovieClip {BirdSpeak1Mc}
"speak2"Symbol 84 MovieClip {BirdS} Frame 1Symbol 76 MovieClip {BirdSpeak2Mc}
"wink"Symbol 84 MovieClip {BirdS} Frame 1Symbol 83 MovieClip {BirdWinkMc}
"register_to_play_"Symbol 86 MovieClip {RegisterToPlay} Frame 1Symbol 85 EditableText
"titles"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 56 MovieClip {Titles}
"numbers"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 59 MovieClip {Numbers}
"countDownTf"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 60 EditableText
"maskedLeafs"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 65 MovieClip {MaskedLeafsS}
"leafs"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 66 MovieClip {LeafsS}
"bird"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 84 MovieClip {BirdS}
"registerToPlay"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 86 MovieClip {RegisterToPlay}
"flyingBug"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 89 MovieClip {FlyingBugS}
"light"Symbol 94 MovieClip {client.OutroS} Frame 1Symbol 93 MovieClip {LightMc}
"instruction_3_"Symbol 105 MovieClip {Instructions2} Frame 1Symbol 104 EditableText
"instruction_1_"Symbol 126 MovieClip {Instructions1} Frame 1Symbol 106 EditableText
"instruction_2_"Symbol 126 MovieClip {Instructions1} Frame 1Symbol 107 EditableText
"instructions_"Symbol 129 MovieClip {InstructionsS} Frame 1Symbol 99 EditableText
"instructions2"Symbol 129 MovieClip {InstructionsS} Frame 1Symbol 105 MovieClip {Instructions2}
"instructions1"Symbol 129 MovieClip {InstructionsS} Frame 1Symbol 126 MovieClip {Instructions1}
"countDownTf"Symbol 129 MovieClip {InstructionsS} Frame 1Symbol 127 EditableText
"click_to_begin_"Symbol 129 MovieClip {InstructionsS} Frame 1Symbol 128 EditableText
"instructions"Symbol 149 MovieClip {client.IntroMc} Frame 1Symbol 129 MovieClip {InstructionsS}
"score"Symbol 153 MovieClip {ScoreS} Frame 1Symbol 152 EditableText
"timeWarning"Symbol 182 MovieClip {client.ClockMc} Frame 1Symbol 175 MovieClip
"textField"Symbol 205 MovieClip {ScorePopText} Frame 1Symbol 204 EditableText
"textContainer"Symbol 222 MovieClip {client.ScorePopMc} Frame 1Symbol 205 MovieClip {ScorePopText}
"selection"Symbol 257 MovieClip {client.TileMc} Frame 1Symbol 229 MovieClip
"wink"Symbol 280 MovieClip Frame 1Symbol 279 MovieClip
"fish"Symbol 281 MovieClip {BgUp} Frame 1Symbol 280 MovieClip
"time_bonus_"Symbol 283 MovieClip {TimeBonusLabel} Frame 1Symbol 282 EditableText
"fluid"Symbol 291 MovieClip {LevelMeterInnerS} Frame 1Symbol 287 MovieClip {Fluid}
"levelNrTf"Symbol 291 MovieClip {LevelMeterInnerS} Frame 1Symbol 290 EditableText
"timeBonus"Symbol 293 MovieClip {TimeBonusS} Frame 1Symbol 292 EditableText
"inner"Symbol 294 MovieClip {client.LevelMeterS} Frame 1Symbol 291 MovieClip {LevelMeterInnerS}
"timeBonusS"Symbol 294 MovieClip {client.LevelMeterS} Frame 1Symbol 293 MovieClip {TimeBonusS}
"timeBonusLabel"Symbol 294 MovieClip {client.LevelMeterS} Frame 1Symbol 283 MovieClip {TimeBonusLabel}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 11284 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmln ..."




http://swfchan.com/52/257024/info.shtml
Created: 8/9 -2024 03:17:53 Last modified: 8/9 -2024 03:17:53 Server time: 21/12 -2024 18:29:43