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

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

Dragball-2.swf

This is the info page for
Flash #118551

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


Text
don't hit these guys

credits

programming, graphics, music, soundeffects all done by me
special thanks to ...

settings

quality settings:

<p align="left"></p>

audio settings:

in-game menu

<p align="left"></p>

<p align="left"></p>

game statistics:

play

you're on your own now. good luck.

press the 'm' key to bring up the in-game menu. remember to press the 'space' key to reset the level.

the goal of the game is to hit all of the checkpoints (the smallest circles) in a level before you hit the finish. you can't complete
a level without collecting the checkpoints.
the game calculates your score based on the number of resets and bounces. you can find your score in the menu.

nice job, let's try that again. note that you can't drag the ball any further than the thin circle and you can only click on the
dragBall once.

the small, dark ball is your dragBall. click and hold down the cursor on the dragBall, aim and  throw it by releasing the mouse.
try to hit the large circle.

alternatively, touchpad users can aim the dragBall with the 'left' and 'right' arrow keys and fire it with the 'up' arrow key.
Hold down the 'shift' key for a more precise aim.
you can reset a level by pressing the 'space' key.

this circle shows where you first hit the wall.
use it to correct your aim.

a xepticdesigns production

dragBall2

congratulations

<p align="center"></p>

<p align="left"></p>

ActionScript [AS3]

Section 1
//MainTimeline (dragBall2_fla.MainTimeline) package dragBall2_fla { import fl.controls.*; import flash.display.*; import flash.events.*; import gs.*; import flash.filters.*; import flash.geom.*; import flash.utils.*; import mochi.as3.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.errors.*; import flash.ui.*; import adobe.utils.*; import flash.accessibility.*; import flash.external.*; import flash.printing.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public var thud:Thud; public var bounceMenu:int; public var nextTimer:Timer; public var vRotation:Number; public var numResets:int; public var bounceTextAdded:Boolean; public var startX:Number; public var startY:Number; public var finishColour:uint; public var bounceTextShown:Number; public var bg:MovieClip; public var introPop:Pop; public var graphicsContainer:MovieClip; public var __setPropDict:Dictionary; public var totalScore_txt:TextField; public var historyX:Number; public var historyY:Number; public var menuDisplayed:Boolean; public var shiftDown:Boolean; public var balls:Array; public var container:MovieClip; public var numBounces:int; public var prevY:Number; public var bounce:Number; public var justKilled:Boolean; public var credits:Credits; public var prevX:Number; public var leftRotation:Boolean; public var finish:Finish; public var mainMenu:MainMenuScreen; public var settingsBall; public var vy:Number; public var keysDown:Boolean; public var vx:Number; public var newGameBall; public var qualitySet:Number; public var fps:FPSCounter; public var xd:MovieClip; public var menuShown:Boolean; public var animatieTimer:Timer; public var mainMenuDisplayed:Boolean; public var oldY:Number; public var bounced:Boolean; public var shot:Boolean; public var musicChannel:SoundChannel; public var oldX:Number; public var continueLevel:int; public var midX:Number; public var midY:Number; public var mainMenuShown:Boolean; public var loadingBar:MovieClip; public var afterDrag:Boolean; public var score_txt:TextField; public var bgMenu:MovieClip; public var continueBall; public var playBall; public var _mochiads_game_id:String; public var submitScore:Button; public var menu:MenuScreen; public var dragBall:DragBall; public var checkPoint:CheckPoint; public var lineAdded:Boolean; public var dragballData:SharedObject; public var maxCircle:MaxCircle; public var lowY:Number; public var mouseDownBoolean:Boolean; public var currentLevel:Number; public var bounceSpotAdded:Boolean; public var enemy:Enemy; public var firstBounce:Boolean; public var exitToMain:Button; public var tekst2:Tekst2; public var tekst5:Tekst5; public var muteMusic:Boolean; public var tekst1:Tekst1; public var tekst3:Tekst3; public var tekst4:Tekst4; public var lowX:Number; public var bounceSpot:BounceSpot; public var muteSFX:Boolean; public var enemyArray:Array; public var creditsBall; public var rightRotation:Boolean; public var song1:Song1; public var song2:Song2; public var cam:MovieClip; public var checkPointArray:Array; public var beingDragged:Boolean; public var bounceText:BounceTekst; public var totalScore:Number; public var bouncePoint:Point; public var lineLeven:Number; public var line:AimLine; public function MainTimeline(){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6); } public function progressListener(_arg1:ProgressEvent):void{ var _local2:Number; var _local3:int; _local2 = (_arg1.bytesLoaded / _arg1.bytesTotal); _local3 = (_local2 * 100); loadingBar.scaleX = _local2; } public function checkCollision():void{ var _local1:int; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:int; var _local6:Point; var _local7:Number; var _local8:Number; var _local9:Number; _local1 = (checkPointArray.length - 1); while (_local1 >= 0) { _local2 = (checkPointArray[_local1].x - dragBall.x); _local3 = (checkPointArray[_local1].y - dragBall.y); _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); if ((((_local4 <= 25)) && (!((checkPointArray[_local1] == null))))){ soundHandler("hitEffect"); checkPointArray[_local1].hit(vx, vy, qualitySet); finishColour = checkPointArray[_local1].getColor(); changeTint(finishColour); checkPointArray[_local1].parent.removeChild(checkPointArray[_local1]); checkPointArray.splice(_local1, 1); }; _local1--; }; if (checkPointArray.length > 0){ _local5 = (checkPointArray.length - 1); while (_local5 >= 0) { _local6 = new Point(); _local6.x = (dragBall.x - ((dragBall.x - prevX) / 2)); _local6.y = (dragBall.y - ((dragBall.y - prevY) / 2)); _local7 = (checkPointArray[_local5].x - _local6.x); _local8 = (checkPointArray[_local5].y - _local6.y); _local9 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8))); if ((((_local9 <= 25)) && (!((checkPointArray[_local1] == null))))){ soundHandler("hitEffect"); checkPointArray[_local5].hit(vx, vy, qualitySet); finishColour = checkPointArray[_local1].getColor(); changeTint(finishColour); checkPointArray[_local5].parent.removeChild(checkPointArray[_local5]); checkPointArray.splice(_local5, 1); }; _local5--; }; }; } public function showMenu():void{ if (menuShown == false){ if (beingDragged == true){ dragBallUpActions(); }; stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeysDown); stage.addEventListener(KeyboardEvent.KEY_DOWN, secondKeyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeysUp); removeEventListener(Event.ENTER_FRAME, gameLoop); dragBall.removeEventListener(MouseEvent.MOUSE_DOWN, onDragBallDown); removeEventListener(MouseEvent.MOUSE_UP, onDragBallUp); dragballData.data.numberBounces = numBounces; dragballData.data.numberResets = numResets; dragballData.flush(); menu.x = 350; menu.y = 200; menu.alpha = 0; addChild(menu); menu.checkSelected(); menu.showStats(); TweenMax.to(cam, 1, {colorMatrixFilter:{colorize:0xFFFFFF, saturation:0}}); TweenMax.to(menu, 1, {alpha:1, onComplete:menuUp}); menuShown = true; }; if ((((menuShown == true)) && ((menuDisplayed == true)))){ menu.removeText(); removeMenu(); }; } public function onDragBallDown(_arg1:MouseEvent):void{ if (shot == false){ if (lineAdded == true){ leftRotation = false; rightRotation = false; dragBall.removeChild(line); dragBall.lineBoolean = false; lineAdded = false; }; afterDrag = false; dragBall.startDrag(); mouseDownBoolean = true; maxCircle = new MaxCircle(); maxCircle.x = dragBall.x; maxCircle.y = dragBall.y; addChild(maxCircle); stage.addEventListener(MouseEvent.MOUSE_UP, onDragBallUp); beingDragged = true; }; } public function removeMenu():void{ stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeysDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeysUp); stage.removeEventListener(KeyboardEvent.KEY_DOWN, secondKeyDown); addEventListener(Event.ENTER_FRAME, gameLoop); dragBall.addEventListener(MouseEvent.MOUSE_DOWN, onDragBallDown); removeChild(menu); changeTint(finishColour); menuShown = false; menuDisplayed = false; stage.focus = stage; } public function shoot():void{ var _local1:Number; _local1 = ((dragBall.rotation * Math.PI) / 180); vx = (Math.cos(_local1) * 10); vy = (Math.sin(_local1) * 10); afterDrag = true; removeLine(); shot = true; } public function setValues():void{ dragBall = new DragBall(); line = new AimLine(); finish = new Finish(); menu = new MenuScreen(); enemy = new Enemy(); bouncePoint = new Point(); graphicsContainer = new MovieClip(); bounce = -0.9; vx = 0; vy = 0; oldX = 0; oldY = 0; midX = 0; midY = 0; lowX = 0; lowY = 0; lineLeven = 0; prevX = dragBall.x; prevY = dragBall.y; vRotation = 3; finishColour = 0xDDDDDD; checkPointArray = new Array(); enemyArray = new Array(); lineAdded = false; afterDrag = false; leftRotation = false; rightRotation = false; shiftDown = false; shot = false; menuShown = false; beingDragged = false; menuDisplayed = false; firstBounce = false; bounced = false; } public function addLine():void{ if ((((lineAdded == false)) && ((shot == false)))){ line = new AimLine(); lineLeven = 0; dragBall.addChild(line); dragBall.lineBoolean = true; lineAdded = true; }; } public function checkBallMovements():void{ var _local1:uint; var _local2:MenuBall; var _local3:MenuBall; var _local4:Number; var _local5:MenuBall; _local1 = 0; while (_local1 < balls.length) { _local2 = balls[_local1]; _local2.x = (_local2.x + _local2.vx); _local2.y = (_local2.y + _local2.vy); checkWallsMenu(_local2); _local1++; }; _local1 = 0; while (_local1 < (balls.length - 1)) { _local3 = balls[_local1]; _local4 = (_local1 + 1); while (_local4 < balls.length) { _local5 = balls[_local4]; checkCollisionMenu(_local3, _local5); _local4++; }; _local1++; }; checkWallsMenu(_local3); checkWallsMenu(_local5); } function __setProp_exitToMain_Scene1_objects_6(){ try { exitToMain["componentInspectorSetting"] = true; } catch(e:Error) { }; exitToMain.emphasized = false; exitToMain.enabled = true; exitToMain.label = "exit to main menu"; exitToMain.labelPlacement = "right"; exitToMain.selected = false; exitToMain.toggle = false; exitToMain.visible = true; try { exitToMain["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function drawLines():void{ var _local1:Number; var _local2:*; var _local3:int; graphics.clear(); _local1 = 200; _local2 = Math.sqrt((((finish.x - dragBall.x) * (finish.x - dragBall.x)) + ((finish.y - dragBall.y) * (finish.y - dragBall.y)))); if (_local2 <= 200){ _local1 = _local2; graphics.lineStyle(2, 0, (1 - (_local1 / 200))); graphics.moveTo(dragBall.x, dragBall.y); graphics.lineTo(finish.x, finish.y); }; if (checkPointArray.length > 0){ _local3 = (checkPointArray.length - 1); while (_local3 >= 0) { _local2 = Math.sqrt((((checkPointArray[_local3].x - dragBall.x) * (checkPointArray[_local3].x - dragBall.x)) + ((checkPointArray[_local3].y - dragBall.y) * (checkPointArray[_local3].y - dragBall.y)))); if (_local2 <= 150){ _local1 = _local2; graphics.lineStyle(2, 0, (1 - (_local1 / 150))); graphics.moveTo(dragBall.x, dragBall.y); graphics.lineTo(checkPointArray[_local3].x, checkPointArray[_local3].y); }; _local3--; }; }; } public function playMusicMenu():void{ musicChannel = song2.play(0, -1); muteMusic = false; } public function onPlayBallClick(_arg1:MouseEvent):void{ var _local2:int; removeEventListener(MouseEvent.CLICK, onMouseClickMenu); playBall.removeEventListener(MouseEvent.CLICK, onPlayBallClick); addEventListener(MouseEvent.CLICK, onMouseClickMenu2); particlesMenu(playBall.x, playBall.y, playBall.x, playBall.y); continueBall = new MenuBall(25, 0x555555); if ((((playBall.x >= 110)) && ((playBall.x <= 590)))){ continueBall.x = (playBall.x - 26); } else { continueBall.x = (playBall.x + 100); }; continueBall.y = playBall.y; continueBall.vx = 2; continueBall.vy = playBall.vy; continueBall.gotoAndStop(4); addChild(continueBall); newGameBall = new MenuBall(25, 0x222222); if ((((playBall.x >= 110)) && ((playBall.x <= 590)))){ newGameBall.x = (playBall.x + 26); } else { newGameBall.x = (playBall.x - 100); }; newGameBall.y = playBall.y; newGameBall.vx = -2; newGameBall.vy = playBall.vy; newGameBall.gotoAndStop(5); addChild(newGameBall); removeChild(playBall); _local2 = (balls.length - 1); while (_local2 >= 0) { balls.splice(_local2, 1); _local2--; }; balls.push(settingsBall); balls.push(creditsBall); balls.push(newGameBall); balls.push(continueBall); } public function menuUp():void{ menuDisplayed = true; } function frame5(){ stop(); fps = new FPSCounter(); bounceSpot = new BounceSpot(); bounceSpotAdded = false; keysDown = false; justKilled = false; bounceText = new BounceTekst(); bounceTextAdded = false; bounceTextShown = 0; tekst1 = new Tekst1(); tekst2 = new Tekst2(); tekst3 = new Tekst3(); tekst4 = new Tekst4(); tekst5 = new Tekst5(); mouseDownBoolean = false; init(); if (muteMusic == false){ TweenMax.to(musicChannel, 1, {volume:1}); musicChannel = song1.play(0, 9999); }; TweenMax.to(cam, 0, {colorMatrixFilter:{colorize:0x999999, saturation:0.25}}); TweenMax.to(bg, 0, {colorMatrixFilter:{colorize:0x999999, saturation:0.75}}); } function frame6(){ if ((((__setPropDict[exitToMain] == undefined)) || (!((int(__setPropDict[exitToMain]) == 6))))){ __setPropDict[exitToMain] = currentFrame; __setProp_exitToMain_Scene1_objects_6(); }; if ((((__setPropDict[submitScore] == undefined)) || (!((int(__setPropDict[submitScore]) == 6))))){ __setPropDict[submitScore] = currentFrame; __setProp_submitScore_Scene1_objects_6(); }; stop(); totalScore = ((numResets * 10) + numBounces); initEnd(); } function frame1(){ loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener); loaderInfo.addEventListener(Event.COMPLETE, completeListener); setRightClick(); _mochiads_game_id = "4e3d6176b05471da"; MochiServices.connect("4e3d6176b05471da", root); } function frame3(){ qualitySet = 1; muteSFX = false; muteMusic = false; } public function goToEnd():void{ var _local1:int; var _local2:int; removeEventListener(Event.ENTER_FRAME, gameLoop); stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeysDown); stage.removeEventListener(KeyboardEvent.KEY_DOWN, secondKeyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeysUp); dragBall.removeEventListener(MouseEvent.MOUSE_DOWN, onDragBallDown); removeChild(finish); if (dragBall != null){ dragBall.parent.removeChild(dragBall); }; _local1 = (checkPointArray.length - 1); while (_local1 >= 0) { checkPointArray[_local1].parent.removeChild(checkPointArray[_local1]); checkPointArray.splice(_local1, 1); _local1--; }; _local2 = (enemyArray.length - 1); while (_local2 >= 0) { enemyArray[_local2].parent.removeChild(enemyArray[_local2]); enemyArray.splice(_local2, 1); _local2--; }; if (bounceSpotAdded == true){ bounceSpot.parent.removeChild(bounceSpot); bounceSpotAdded = false; }; TweenMax.to(cam, 1, {colorMatrixFilter:{colorize:0xFFFFFF, saturation:0}}); TweenMax.to(bg, 1, {colorMatrixFilter:{colorize:0xFFFFFF, saturation:0}}); musicChannel.stop(); dragballData.data.maxLevels = 40; dragballData.flush(); gotoAndStop("end"); } public function removeCircle():void{ removeChild(maxCircle); } function frame2(){ stop(); introPop = new Pop(); song2 = new Song2(); musicChannel = new SoundChannel(); musicChannel = song2.play(0, 99999); animatieTimer = new Timer(1000, 1); animatieTimer.addEventListener(TimerEvent.TIMER_COMPLETE, animatieTimerComplete); animatieTimer.start(); nextTimer = new Timer(4000, 1); nextTimer.addEventListener(TimerEvent.TIMER_COMPLETE, nextTimerComplete); } public function initMenu():void{ qualitySet = 1; mainMenu = new MainMenuScreen(); credits = new Credits(); } public function onKeysUp(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case 16: shiftDown = false; break; case 37: leftRotation = false; keysDown = false; break; case 39: rightRotation = false; keysDown = false; break; }; } public function menuLoop(_arg1:Event):void{ checkBallMovements(); } public function onHitDragBall():void{ soundHandler("deadEffect"); dragBall.hit(qualitySet); changeTint(finishColour); removeEventListener(Event.ENTER_FRAME, gameLoop); dragBall.alpha = 0; dragBall.removeEventListener(MouseEvent.MOUSE_DOWN, onDragBallDown); justKilled = true; } public function setVxVy():void{ vx = ((mouseX - oldX) / 6); vy = ((mouseY - oldY) / 6); if ((((vx >= 20)) || ((vx <= -20)))){ vy = (vy / 2); vx = (vx / 2); }; if ((((vy >= 20)) || ((vy <= -20)))){ vy = (vy / 2); vx = (vx / 2); }; } public function onMouseClickMenu2(_arg1:MouseEvent):void{ if (_arg1.target == newGameBall){ dragballData.data.maxLevels = 1; continueLevel = 1; numResets = 0; numBounces = 0; removeEventListener(MouseEvent.CLICK, onMouseClickMenu2); fadeStuff(); }; if (_arg1.target == continueBall){ removeEventListener(MouseEvent.CLICK, onMouseClickMenu2); currentLevel = continueLevel; fadeStuff(); }; if (_arg1.target == settingsBall){ initiateMenu(); }; if (_arg1.target == creditsBall){ showCredits(); }; } public function onDragBallUp(_arg1:MouseEvent):void{ dragBallUpActions(); } public function createBalls():void{ playBall = new MenuBall(37.5, 0x555555); playBall.radius = 37.5; balls.push(playBall); playBall.x = 350; playBall.y = 100; playBall.gotoAndStop(1); playBall.alpha = 0; addChild(playBall); TweenMax.to(playBall, 1, {alpha:1}); settingsBall = new MenuBall(25, 0x222222); balls.push(settingsBall); settingsBall.x = 100; settingsBall.y = 200; settingsBall.gotoAndStop(2); settingsBall.alpha = 0; addChild(settingsBall); TweenMax.to(settingsBall, 1, {alpha:1}); creditsBall = new MenuBall(25, 5593224); balls.push(creditsBall); creditsBall.x = 600; creditsBall.y = 300; creditsBall.gotoAndStop(3); creditsBall.alpha = 0; addChild(creditsBall); TweenMax.to(creditsBall, 1, {alpha:1}); } public function secondKeyDown(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case 77: if (mouseDownBoolean == false){ showMenu(); }; break; }; } public function checkWallsMenu(_arg1:MenuBall):void{ if ((_arg1.x + _arg1.radius) > stage.stageWidth){ _arg1.x = (stage.stageWidth - _arg1.radius); _arg1.vx = (_arg1.vx * bounceMenu); } else { if ((_arg1.x - _arg1.radius) < 0){ _arg1.x = _arg1.radius; _arg1.vx = (_arg1.vx * bounceMenu); }; }; if ((_arg1.y + _arg1.radius) > stage.stageHeight){ _arg1.y = (stage.stageHeight - _arg1.radius); _arg1.vy = (_arg1.vy * bounceMenu); } else { if ((_arg1.y - _arg1.radius) < 0){ _arg1.y = _arg1.radius; _arg1.vy = (_arg1.vy * bounceMenu); }; }; } function frame4(){ stop(); currentLevel = 1; numBounces = 0; numResets = 0; balls = new Array(); bounceMenu = -1; thud = new Thud(); createBalls(); addEventListener(Event.ENTER_FRAME, menuLoop); mainMenuShown = false; mainMenuDisplayed = false; song1 = new Song1(); playBall.addEventListener(MouseEvent.CLICK, onPlayBallClick); addEventListener(MouseEvent.CLICK, onMouseClickMenu); initMenu(); dragballData = SharedObject.getLocal("dragBall2"); if ((((dragballData.data.maxLevels == undefined)) || ((dragballData.data.maxLevels == 0)))){ dragballData.data.maxLevels = 1; } else { continueLevel = dragballData.data.maxLevels; }; if (dragballData.data.numberBounces == undefined){ dragballData.data.numberBounces = 0; } else { numBounces = dragballData.data.numberBounces; }; if (dragballData.data.numberResets == undefined){ dragballData.data.numberResets = 0; } else { numResets = dragballData.data.numberResets; }; } public function changeTint(_arg1:uint):void{ TweenMax.to(cam, 3, {colorMatrixFilter:{colorize:_arg1, saturation:0.25}}); TweenMax.to(bg, 3, {colorMatrixFilter:{colorize:_arg1, saturation:0.75}}); } public function setRightClick():void{ var _local1:ContextMenu; _local1 = new ContextMenu(); _local1.hideBuiltInItems(); this.contextMenu = _local1; } public function fadeCircle():void{ TweenMax.to(maxCircle, 0.5, {alpha:0, onComplete:removeCircle}); } public function changeXY():void{ oldX = lowX; oldY = lowY; lowY = midY; lowX = midX; midY = mouseY; midX = mouseX; } public function showMainMenu():void{ if (mainMenuShown == false){ removeEventListener(Event.ENTER_FRAME, menuLoop); mainMenu.x = 350; mainMenu.y = 200; mainMenu.alpha = 0; addChild(mainMenu); mainMenu.checkSelected(); TweenMax.to(mainMenu, 1, {alpha:1, onComplete:mainMenuUp}); mainMenuShown = true; }; if ((((mainMenuShown == true)) && ((mainMenuDisplayed == true)))){ mainMenu.removeText(); removeMainMenu(); }; } function __setProp_submitScore_Scene1_objects_6(){ try { submitScore["componentInspectorSetting"] = true; } catch(e:Error) { }; submitScore.emphasized = false; submitScore.enabled = true; submitScore.label = "submit highscore"; submitScore.labelPlacement = "right"; submitScore.selected = false; submitScore.toggle = false; submitScore.visible = true; try { submitScore["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function backToMenuEnd(_arg1:MouseEvent):void{ dragballData.data.maxLevels = 1; dragballData.flush(); gotoAndStop("menu"); } public function showCredits():void{ removeEventListener(Event.ENTER_FRAME, menuLoop); credits.x = 350; credits.y = 200; credits.alpha = 0; addChild(credits); TweenMax.to(credits, 1, {alpha:1}); } public function removeLine():void{ if (lineAdded == true){ dragBall.removeChild(line); dragBall.lineBoolean = false; lineAdded = false; }; } public function fadeStuff():void{ TweenMax.to(newGameBall, 1, {alpha:0}); TweenMax.to(continueBall, 1, {alpha:0}); TweenMax.to(settingsBall, 1, {alpha:0}); TweenMax.to(creditsBall, 1, {alpha:0, onComplete:gotoGame}); TweenMax.to(musicChannel, 1, {volume:0}); } public function getBlur():void{ TweenMax.to(dragBall, 0, {blurFilter:{blurX:(Math.sqrt((vx * vx)) / 1.5), blurY:(Math.sqrt((vy * vy)) / 1.5)}}); } public function completeListener(_arg1:Event):void{ loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressListener); loaderInfo.removeEventListener(Event.COMPLETE, completeListener); gotoAndPlay("xepticdesigns"); } public function addBounceTekst():void{ if ((((currentLevel >= 6)) && ((bounceTextShown <= 3)))){ if (bouncePoint.x < 140){ bounceText.x = 140; } else { if (bouncePoint.x >= 560){ bounceText.x = 560; } else { bounceText.x = bouncePoint.x; }; }; if (bouncePoint.y <= 50){ bounceText.y = (bouncePoint.y + 25); } else { bounceText.y = (bouncePoint.y - 25); }; addChild(bounceText); bounceTextAdded = true; bounceTextShown++; }; } public function removeKids():void{ removeChild(newGameBall); removeChild(continueBall); removeChild(settingsBall); removeChild(creditsBall); } public function setStart():void{ startX = dragBall.x; startY = dragBall.y; graphicsContainer.graphics.moveTo(startX, startY); graphicsContainer.alpha = 0.3; } public function dragBallMovement():void{ dragBall.x = (dragBall.x + vx); dragBall.y = (dragBall.y + vy); } public function checkDistance():void{ var _local1:Number; var _local2:Number; _local1 = (maxCircle.x - dragBall.x); _local2 = (maxCircle.y - dragBall.y); if (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))) >= 150){ dragBallUpActions(); }; } public function gotoMainMenu():void{ gotoAndPlay("menu"); } public function init():void{ setValues(); stage.focus = stage; stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeysDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeysUp); addEventListener(Event.ENTER_FRAME, gameLoop); dragBall.addEventListener(MouseEvent.MOUSE_DOWN, onDragBallDown); checkLevel(); checkJustKilled(); setStart(); } public function stopMusicMenu():void{ musicChannel.stop(); muteMusic = true; } public function submitScoreMochi(_arg1:MouseEvent):void{ var o:Object; var boardID:String; var event = _arg1; o = {n:[13, 13, 3, 12, 7, 4, 6, 5, 4, 5, 7, 3, 0, 11, 12, 4], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); MochiScores.showLeaderboard({boardID:boardID, score:totalScore}); } public function reset():void{ var _local1:int; var _local2:int; if (bounceTextAdded == true){ bounceText.parent.removeChild(bounceText); bounceTextAdded = false; }; if (bounceSpotAdded == true){ bounceSpot.parent.removeChild(bounceSpot); bounceSpotAdded = false; }; removeChild(finish); if (dragBall != null){ dragBall.parent.removeChild(dragBall); }; _local1 = (checkPointArray.length - 1); while (_local1 >= 0) { checkPointArray[_local1].parent.removeChild(checkPointArray[_local1]); checkPointArray.splice(_local1, 1); _local1--; }; _local2 = (enemyArray.length - 1); while (_local2 >= 0) { enemyArray[_local2].parent.removeChild(enemyArray[_local2]); enemyArray.splice(_local2, 1); _local2--; }; } public function stopMusic():void{ musicChannel.stop(); muteMusic = true; } public function rotate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Boolean):Point{ var _local6:Point; _local6 = new Point(); if (_arg5){ _local6.x = ((_arg1 * _arg4) + (_arg2 * _arg3)); _local6.y = ((_arg2 * _arg4) - (_arg1 * _arg3)); } else { _local6.x = ((_arg1 * _arg4) - (_arg2 * _arg3)); _local6.y = ((_arg2 * _arg4) + (_arg1 * _arg3)); }; return (_local6); } public function soundHandler(_arg1:String):void{ var _local2:Pop; var _local3:Pop2; var _local4:Pop3; _local2 = new Pop(); _local3 = new Pop2(); _local4 = new Pop3(); if (muteSFX == false){ if (_arg1 == "hitEffect"){ _local2.play(); }; if (_arg1 == "finishEffect"){ _local3.play(); }; if (_arg1 == "deadEffect"){ _local4.play(); }; }; } public function removeMainMenu():void{ addEventListener(Event.ENTER_FRAME, menuLoop); removeChild(mainMenu); mainMenuShown = false; mainMenuDisplayed = false; stage.focus = stage; } public function animatieTimerComplete(_arg1:TimerEvent):void{ introPop.play(); xd.startAnimatie(); nextTimer.start(); } public function nextTimerComplete(_arg1:TimerEvent):void{ TweenMax.to(xd, 1, {alpha:0, onComplete:gotoMainMenu}); } public function mainMenuUp():void{ mainMenuDisplayed = true; } public function removeCredits():void{ addEventListener(Event.ENTER_FRAME, menuLoop); removeChild(credits); stage.focus = stage; } public function checkBoundaries():void{ if (dragBall.x <= 15){ dragBall.x = 15; }; if (dragBall.x >= 685){ dragBall.x = 685; }; if (dragBall.y <= 15){ dragBall.y = 15; }; if (dragBall.y >= 385){ dragBall.y = 385; }; } public function goToMenu():void{ var _local1:int; var _local2:int; removeChild(menu); dragballData.data.numberBounces = numBounces; dragballData.data.numberResets = numResets; dragballData.flush(); stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeysDown); stage.removeEventListener(KeyboardEvent.KEY_DOWN, secondKeyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeysUp); removeEventListener(Event.ENTER_FRAME, gameLoop); dragBall.removeEventListener(MouseEvent.MOUSE_DOWN, onDragBallDown); removeChild(finish); if (bounceTextAdded == true){ bounceText.parent.removeChild(bounceText); bounceTextAdded = false; }; if (bounceSpotAdded == true){ bounceSpot.parent.removeChild(bounceSpot); bounceSpotAdded = false; }; if (dragBall != null){ dragBall.parent.removeChild(dragBall); }; _local1 = (checkPointArray.length - 1); while (_local1 >= 0) { checkPointArray[_local1].parent.removeChild(checkPointArray[_local1]); checkPointArray.splice(_local1, 1); _local1--; }; _local2 = (enemyArray.length - 1); while (_local2 >= 0) { enemyArray[_local2].parent.removeChild(enemyArray[_local2]); enemyArray.splice(_local2, 1); _local2--; }; musicChannel.stop(); checkTeksten(); if (muteMusic == false){ musicChannel = song2.play(0, 9999); }; gotoAndStop("menu"); } public function checkCollisionMenu(_arg1:MenuBall, _arg2:MenuBall):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Point; var _local10:Point; var _local11:Point; var _local12:Point; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Object; var _local17:Object; var _local18:Object; var _local19:Object; _local3 = (_arg2.x - _arg1.x); _local4 = (_arg2.y - _arg1.y); _local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); if (_local5 < (_arg1.radius + _arg2.radius)){ particlesMenu(_arg2.x, _arg2.y, _arg1.x, _arg1.y); if (muteSFX == false){ thud.play(); }; _local6 = Math.atan2(_local4, _local3); _local7 = Math.sin(_local6); _local8 = Math.cos(_local6); _local9 = new Point(0, 0); _local10 = rotate(_local3, _local4, _local7, _local8, true); _local11 = rotate(_arg1.vx, _arg1.vy, _local7, _local8, true); _local12 = rotate(_arg2.vx, _arg2.vy, _local7, _local8, true); _local13 = (_local11.x - _local12.x); _local11.x = ((((_arg1.mass - _arg2.mass) * _local11.x) + ((2 * _arg2.mass) * _local12.x)) / (_arg1.mass + _arg2.mass)); _local12.x = (_local13 + _local11.x); _local14 = (Math.abs(_local11.x) + Math.abs(_local12.x)); _local15 = ((_arg1.radius + _arg2.radius) - Math.abs((_local9.x - _local10.x))); _local9.x = (_local9.x + ((_local11.x / _local14) * _local15)); _local10.x = (_local10.x + ((_local12.x / _local14) * _local15)); _local16 = rotate(_local9.x, _local9.y, _local7, _local8, false); _local17 = rotate(_local10.x, _local10.y, _local7, _local8, false); _arg2.x = (_arg1.x + _local17.x); _arg2.y = (_arg1.y + _local17.y); _arg1.x = (_arg1.x + _local16.x); _arg1.y = (_arg1.y + _local16.y); _local18 = rotate(_local11.x, _local11.y, _local7, _local8, false); _local19 = rotate(_local12.x, _local12.y, _local7, _local8, false); _arg1.vx = _local18.x; _arg1.vy = _local18.y; _arg2.vx = _local19.x; _arg2.vy = _local19.y; }; } public function playMusic():void{ musicChannel = song1.play(0, -1); muteMusic = false; } public function initiateMenu():void{ showMainMenu(); } public function onMouseClickMenu(_arg1:MouseEvent):void{ if (_arg1.target == settingsBall){ initiateMenu(); }; if (_arg1.target == creditsBall){ showCredits(); }; } public function checkLevel():void{ switch (currentLevel){ case 1: dragBall.x = 100; dragBall.y = 200; addChild(dragBall); addChild(tekst1); tekst1.x = 350; tekst1.y = 200; finish = new Finish(); finish.x = 600; finish.y = 200; addChild(finish); break; case 2: dragBall.x = 350; dragBall.y = 50; addChild(dragBall); addChild(tekst2); tekst2.x = 350; tekst2.y = 200; finish = new Finish(); finish.x = 350; finish.y = 350; addChild(finish); break; case 3: dragBall.x = 100; dragBall.y = 100; addChild(dragBall); addChild(tekst3); tekst3.x = 350; tekst3.y = 50; checkPoint = new CheckPoint(); checkPoint.x = 350; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 600; finish.y = 300; addChild(finish); break; case 4: dragBall.x = 100; dragBall.y = 200; addChild(dragBall); checkPoint = new CheckPoint(); checkPoint.x = 400; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 300; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 500; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 600; finish.y = 200; addChild(finish); addChild(tekst4); tekst4.x = 350; tekst4.y = 140; break; case 5: addChild(tekst5); tekst5.x = 350; tekst5.y = 140; dragBall.x = 600; dragBall.y = 200; addChild(dragBall); checkPoint = new CheckPoint(); checkPoint.x = 250; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 400; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 100; finish.y = 200; addChild(finish); break; case 6: finish = new Finish(); finish.x = 570; finish.y = 200; addChild(finish); dragBall.x = 275; dragBall.y = 200; addChild(dragBall); checkPoint = new CheckPoint(); checkPoint.x = 69; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); break; case 7: finish.x = 50; finish.y = 350; addChild(finish); dragBall.x = 650; dragBall.y = 50; addChild(dragBall); checkPoint = new CheckPoint(); checkPoint.x = 250; checkPoint.y = 250; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 450; checkPoint.y = 150; addChild(checkPoint); checkPointArray.push(checkPoint); break; case 8: dragBall.x = 100; dragBall.y = 200; addChild(dragBall); enemy = new Enemy(); enemy.x = 350; enemy.y = 200; addChild(enemy); enemyArray.push(enemy); finish = new Finish(); finish.x = 600; finish.y = 200; addChild(finish); break; case 9: dragBall.x = 652; dragBall.y = 47; addChild(dragBall); enemy = new Enemy(); enemy.x = 272.5; enemy.y = 289; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 148.5; checkPoint.y = 215.8; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 92; finish.y = 52; addChild(finish); break; case 10: dragBall.x = 650; dragBall.y = 50; addChild(dragBall); enemy = new Enemy(); enemy.x = 235; enemy.y = 0x0101; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 357; checkPoint.y = 197; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 50; finish.y = 350; addChild(finish); break; case 11: dragBall.x = 522; dragBall.y = 347; addChild(dragBall); enemy = new Enemy(); enemy.x = 303.5; enemy.y = 188.4; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 63; enemy.y = 302; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 357.4; checkPoint.y = 290.3; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 221.5; checkPoint.y = 102.2; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 374; finish.y = 50; addChild(finish); break; case 12: dragBall.x = 50.2; dragBall.y = 268; addChild(dragBall); enemy = new Enemy(); enemy.x = 254.9; enemy.y = 172.4; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 364.9; enemy.y = 243.9; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 616.2; checkPoint.y = 267.4; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 457.4; finish.y = 292.1; addChild(finish); break; case 16: dragBall.x = 38; dragBall.y = 229; addChild(dragBall); enemy = new Enemy(); enemy.x = 457; enemy.y = 221; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 517; checkPoint.y = 350; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 431; checkPoint.y = 284; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 196; checkPoint.y = 107; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 350; finish.y = 223; addChild(finish); break; case 14: dragBall.x = 348.5; dragBall.y = 34.8; addChild(dragBall); enemy = new Enemy(); enemy.x = 387; enemy.y = 204; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 126; enemy.y = 326; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 536.5; checkPoint.y = 114; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 161; checkPoint.y = 174; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 160; checkPoint.y = 220; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 531; checkPoint.y = 280; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 418; finish.y = 349; addChild(finish); break; case 15: dragBall.x = 299; dragBall.y = 238; addChild(dragBall); enemy = new Enemy(); enemy.x = 70; enemy.y = 189; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 564; enemy.y = 144; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 400; checkPoint.y = 50; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 510; checkPoint.y = 263; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 641; finish.y = 213; addChild(finish); break; case 19: dragBall.x = 665; dragBall.y = 200; addChild(dragBall); enemy = new Enemy(); enemy.x = 222.5; enemy.y = 200; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 338; enemy.y = 200; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 468; enemy.y = 200; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 163.2; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 279.2; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 402.2; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 528.8; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 40; finish.y = 200; addChild(finish); break; case 13: dragBall.x = 322; dragBall.y = 0xFF; addChild(dragBall); enemy = new Enemy(); enemy.x = 488; enemy.y = 272; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 85; enemy.y = 339; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 115; checkPoint.y = 141; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 77; checkPoint.y = 50; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 612; checkPoint.y = 275; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 477; finish.y = 340; addChild(finish); break; case 17: dragBall.x = 158; dragBall.y = 368; addChild(dragBall); enemy = new Enemy(); enemy.x = 149; enemy.y = 125; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 377; enemy.y = 203; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 149; checkPoint.y = 200; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 603; finish.y = 108; addChild(finish); break; case 23: dragBall.x = 350; dragBall.y = 200; addChild(dragBall); enemy = new Enemy(); enemy.x = 76; enemy.y = 322; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 329; enemy.y = 33; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 550; enemy.y = 136; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 516; checkPoint.y = 55; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 490; checkPoint.y = 296; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 364; checkPoint.y = 366; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 132; checkPoint.y = 163; addChild(checkPoint); checkPointArray.push(checkPoint); finish = new Finish(); finish.x = 185; finish.y = 115; addChild(finish); break; case 20: dragBall.x = 236; dragBall.y = 65; addChild(dragBall); finish = new Finish(); finish.x = 66; finish.y = 95; addChild(finish); enemy = new Enemy(); enemy.x = 363; enemy.y = 222; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 505; enemy.y = 265; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 190; enemy.y = 322; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 610; checkPoint.y = 336; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 353; checkPoint.y = 303; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 91; checkPoint.y = 168; addChild(checkPoint); checkPointArray.push(checkPoint); break; case 36: dragBall.x = 471; dragBall.y = 277; addChild(dragBall); finish = new Finish(); finish.x = 395; finish.y = 202; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 339; checkPoint.y = 148; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 237; checkPoint.y = 83; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 157; checkPoint.y = 61; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 85; checkPoint.y = 131; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 68; checkPoint.y = 250; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 144; checkPoint.y = 324; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 270; checkPoint.y = 324; addChild(checkPoint); checkPointArray.push(checkPoint); break; case 22: dragBall.x = 89; dragBall.y = 51; addChild(dragBall); finish = new Finish(); finish.x = 615; finish.y = 349; addChild(finish); enemy = new Enemy(); enemy.x = 354; enemy.y = 201; addChild(enemy); enemyArray.push(enemy); checkPoint = new CheckPoint(); checkPoint.x = 289; checkPoint.y = 164; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 449; checkPoint.y = 305; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 0x0202; checkPoint.y = 292; addChild(checkPoint); checkPointArray.push(checkPoint); break; case 18: dragBall.x = 54; dragBall.y = 230; addChild(dragBall); finish = new Finish(); finish.x = 586; finish.y = 230; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 427; checkPoint.y = 230; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 448; checkPoint.y = 230; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 544; checkPoint.y = 342; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 262; enemy.y = 230; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 511; enemy.y = 230; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 378; enemy.y = 348; addChild(enemy); enemyArray.push(enemy); break; case 24: dragBall.x = 248; dragBall.y = 107; addChild(dragBall); finish = new Finish(); finish.x = 467; finish.y = 97; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 48; checkPoint.y = 218; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 170; checkPoint.y = 370; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 89; enemy.y = 210; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 70; enemy.y = 351; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 404; enemy.y = 330; addChild(enemy); enemyArray.push(enemy); break; case 25: dragBall.x = 0xFF; dragBall.y = 241; addChild(dragBall); finish = new Finish(); finish.x = 85; finish.y = 139; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 390; checkPoint.y = 104; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 459; checkPoint.y = 80; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 519; checkPoint.y = 34; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 609; checkPoint.y = 71; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 622; checkPoint.y = 181; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 509; checkPoint.y = 271; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 431; enemy.y = 167; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 540; enemy.y = 96; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 528; enemy.y = 201; addChild(enemy); enemyArray.push(enemy); break; case 28: dragBall.x = 286; dragBall.y = 224; addChild(dragBall); finish = new Finish(); finish.x = 89; finish.y = 45; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 644; checkPoint.y = 61; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 346; enemy.y = 67; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 130; enemy.y = 105; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 595; enemy.y = 104; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 459; enemy.y = 258; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 599; enemy.y = 348; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 77; enemy.y = 351; addChild(enemy); enemyArray.push(enemy); break; case 27: dragBall.x = 414; dragBall.y = 103; addChild(dragBall); finish = new Finish(); finish.x = 186; finish.y = 41; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 349; checkPoint.y = 328; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 122; enemy.y = 284; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 175; enemy.y = 134; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 371; enemy.y = 272; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 630; enemy.y = 345; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 614; enemy.y = 98; addChild(enemy); enemyArray.push(enemy); break; case 26: dragBall.x = 80; dragBall.y = 54; addChild(dragBall); finish = new Finish(); finish.x = 86; finish.y = 304; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 594; checkPoint.y = 59; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 164; enemy.y = 297; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 261; enemy.y = 349; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 329; enemy.y = 69; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 475; enemy.y = 226; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 630; enemy.y = 345; addChild(enemy); enemyArray.push(enemy); break; case 29: dragBall.x = 204; dragBall.y = 258; addChild(dragBall); finish = new Finish(); finish.x = 589; finish.y = 224; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 254; checkPoint.y = 38; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 293; checkPoint.y = 38; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 53; enemy.y = 120; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 267; enemy.y = 81; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 378; enemy.y = 188; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 369; enemy.y = 349; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 567; enemy.y = 60; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 630; enemy.y = 134; addChild(enemy); enemyArray.push(enemy); break; case 30: dragBall.x = 492; dragBall.y = 315; addChild(dragBall); finish = new Finish(); finish.x = 181; finish.y = 292; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 205; checkPoint.y = 216; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 97; checkPoint.y = 296; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 120; enemy.y = 150; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 217; enemy.y = 363; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 271; enemy.y = 226; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 445; enemy.y = 109; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 630; enemy.y = 52; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 670; enemy.y = 249; addChild(enemy); enemyArray.push(enemy); break; case 31: dragBall.x = 231; dragBall.y = 189; addChild(dragBall); finish = new Finish(); finish.x = 474; finish.y = 362; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 453; checkPoint.y = 17; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 553; checkPoint.y = 91; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 358; enemy.y = 43; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 383; enemy.y = 311; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 409; enemy.y = 96; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 528; enemy.y = 119; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 579; enemy.y = 34; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 579; enemy.y = 231; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 633; enemy.y = 286; addChild(enemy); enemyArray.push(enemy); break; case 32: dragBall.x = 63; dragBall.y = 346; addChild(dragBall); finish = new Finish(); finish.x = 568; finish.y = 140; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 492; checkPoint.y = 184; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 142; enemy.y = 45; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 191; enemy.y = 195; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 296; enemy.y = 322; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 340; enemy.y = 148; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 370; enemy.y = 216; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 520; enemy.y = 357; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 487; enemy.y = 64; addChild(enemy); enemyArray.push(enemy); break; case 33: dragBall.x = 171; dragBall.y = 92; addChild(dragBall); finish = new Finish(); finish.x = 541; finish.y = 309; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 494; checkPoint.y = 49; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 31; enemy.y = 380; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 180; enemy.y = 162; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 337; enemy.y = 355; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 402; enemy.y = 224; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 396; enemy.y = 79; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 630; enemy.y = 327; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 641; enemy.y = 52; addChild(enemy); enemyArray.push(enemy); break; case 34: dragBall.x = 454; dragBall.y = 243; addChild(dragBall); finish = new Finish(); finish.x = 678; finish.y = 220; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 405; checkPoint.y = 15; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 31; enemy.y = 380; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 118; enemy.y = 98; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 212; enemy.y = 248; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 410; enemy.y = 70; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 525; enemy.y = 35; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 641; enemy.y = 52; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 630; enemy.y = 327; addChild(enemy); enemyArray.push(enemy); break; case 35: dragBall.x = 66; dragBall.y = 178; addChild(dragBall); finish = new Finish(); finish.x = 596; finish.y = 180; addChild(finish); enemy = new Enemy(); enemy.x = 238; enemy.y = 204; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 371; enemy.y = 350; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 342; enemy.y = 75; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 503; enemy.y = 148; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 503; enemy.y = 210; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 511; enemy.y = 302; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 641; enemy.y = 52; addChild(enemy); enemyArray.push(enemy); break; case 21: dragBall.x = 91; dragBall.y = 230; addChild(dragBall); finish = new Finish(); finish.x = 574; finish.y = 74; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 343; checkPoint.y = 104; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 557; checkPoint.y = 291; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 606; checkPoint.y = 129; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 142; enemy.y = 57; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 267; enemy.y = 140; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 305; enemy.y = 37; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 377; enemy.y = 339; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 545; enemy.y = 160; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 625; enemy.y = 47; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 380; enemy.y = 191; addChild(enemy); enemyArray.push(enemy); break; case 37: dragBall.x = 224; dragBall.y = 79; addChild(dragBall); finish = new Finish(); finish.x = 38; finish.y = 87; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 324; checkPoint.y = 349; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 516; checkPoint.y = 64; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 467; checkPoint.y = 306; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 40; enemy.y = 37; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 138; enemy.y = 280; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 401; enemy.y = 75; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 419; enemy.y = 0xFF; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 584; enemy.y = 117; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 559; enemy.y = 337; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 639; enemy.y = 219; addChild(enemy); enemyArray.push(enemy); break; case 38: dragBall.x = 96; dragBall.y = 209; addChild(dragBall); finish = new Finish(); finish.x = 35; finish.y = 23; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 303; checkPoint.y = 299; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 415; checkPoint.y = 134; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 461; checkPoint.y = 334; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 162; enemy.y = 41; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 274; enemy.y = 125; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 254; enemy.y = 362; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 391; enemy.y = 55; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 528; enemy.y = 175; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 584; enemy.y = 117; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 624; enemy.y = 283; addChild(enemy); enemyArray.push(enemy); break; case 39: dragBall.x = 86; dragBall.y = 204; addChild(dragBall); finish = new Finish(); finish.x = 375; finish.y = 375; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 214; checkPoint.y = 91; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 419; checkPoint.y = 197; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 581; checkPoint.y = 334; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 602; checkPoint.y = 344; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 221; enemy.y = 367; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 252; enemy.y = 200; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 248; enemy.y = 52; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 368; enemy.y = 291; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 451; enemy.y = 83; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 489; enemy.y = 291; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 645; enemy.y = 202; addChild(enemy); enemyArray.push(enemy); break; case 40: dragBall.x = 337; dragBall.y = 89; addChild(dragBall); finish = new Finish(); finish.x = 615; finish.y = 375; addChild(finish); checkPoint = new CheckPoint(); checkPoint.x = 59; checkPoint.y = 71; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 103; checkPoint.y = 291; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 187; checkPoint.y = 338; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 346; checkPoint.y = 335; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 521; checkPoint.y = 45; addChild(checkPoint); checkPointArray.push(checkPoint); checkPoint = new CheckPoint(); checkPoint.x = 641; checkPoint.y = 333; addChild(checkPoint); checkPointArray.push(checkPoint); enemy = new Enemy(); enemy.x = 56; enemy.y = 362; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 108; enemy.y = 186; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 170; enemy.y = 45; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 237; enemy.y = 357; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 300; enemy.y = 285; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 451; enemy.y = 357; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 0x0202; enemy.y = 209; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 573; enemy.y = 168; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 608; enemy.y = 36; addChild(enemy); enemyArray.push(enemy); enemy = new Enemy(); enemy.x = 578; enemy.y = 282; addChild(enemy); enemyArray.push(enemy); break; }; } public function checkEnemyCollision():void{ var _local1:Boolean; var _local2:int; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:int; var _local7:Point; var _local8:Number; var _local9:Number; var _local10:Number; _local1 = true; _local2 = (enemyArray.length - 1); while (_local2 >= 0) { _local3 = (enemyArray[_local2].x - dragBall.x); _local4 = (enemyArray[_local2].y - dragBall.y); _local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); if (_local5 <= 27.5){ onHitDragBall(); _local1 = false; } else { _local1 = true; }; _local2--; }; if (_local1 == true){ _local6 = (enemyArray.length - 1); while (_local6 >= 0) { _local7 = new Point(); _local7.x = (dragBall.x - ((dragBall.x - prevX) / 2)); _local7.y = (dragBall.y - ((dragBall.y - prevY) / 2)); _local8 = (enemyArray[_local6].x - _local7.x); _local9 = (enemyArray[_local6].y - _local7.y); _local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); if (_local10 <= 27.5){ onHitDragBall(); }; _local6--; }; }; } public function particlesMenu(_arg1, _arg2, _arg3, _arg4:Number):void{ var _local5:uint; var _local6:uint; var _local7:Number; var _local8:ImpactParticle; _local5 = ((20 + Math.round((Math.random() * 10))) * qualitySet); _local6 = (Math.random() * 0xFFFFFF); _local7 = _local5; while (_local7 > 0) { _local8 = new ImpactParticle((Math.random() * 3), (Math.random() * 3), _local6); _local8.x = ((_arg1 + _arg3) / 2); _local8.y = ((_arg2 + _arg4) / 2); stage.addChild(_local8); _local7--; }; } public function setPrev():void{ prevX = dragBall.x; prevY = dragBall.y; } public function checkFinish():void{ var _local1:Number; var _local2:Number; var _local3:Number; if (checkPointArray.length == 0){ _local1 = (finish.x - dragBall.x); _local2 = (finish.y - dragBall.y); _local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2))); if (_local3 <= 35){ soundHandler("finishEffect"); finish.hit(finishColour, qualitySet); justKilled = false; checkTeksten(); currentLevel++; dragballData.data.maxLevels = currentLevel; dragballData.flush(); if (currentLevel == 41){ goToEnd(); } else { reset(); init(); }; }; }; } public function checkJustKilled():void{ var _local1:int; if ((((((justKilled == true)) && ((enemyArray.length > 0)))) && ((currentLevel <= 12)))){ _local1 = (enemyArray.length - 1); while (_local1 >= 0) { TweenMax.to(enemyArray[_local1].warning, 2, {alpha:1}); _local1--; }; }; } public function checkWalls():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; if (beingDragged == false){ _local1 = 0; _local2 = stage.stageWidth; _local3 = 0; _local4 = stage.stageHeight; if ((dragBall.x + 15) >= _local2){ dragBall.x = (_local2 - (dragBall.hitCircle.width / 2)); vx = (vx * bounce); vy = (vy * -(bounce)); numBounces++; bounced = true; if (firstBounce == false){ bouncePoint.x = dragBall.x; bouncePoint.y = dragBall.y; firstBounce = true; }; } else { if ((dragBall.x - (dragBall.hitCircle.width / 2)) < _local1){ dragBall.x = (_local1 + (dragBall.hitCircle.width / 2)); vx = (vx * bounce); vy = (vy * -(bounce)); numBounces++; bounced = true; if (firstBounce == false){ bouncePoint.x = dragBall.x; bouncePoint.y = dragBall.y; firstBounce = true; }; }; }; if ((dragBall.y + (dragBall.hitCircle.width / 2)) > _local4){ dragBall.y = (_local4 - (dragBall.hitCircle.width / 2)); vx = (vx * -(bounce)); vy = (vy * bounce); numBounces++; bounced = true; if (firstBounce == false){ bouncePoint.x = dragBall.x; bouncePoint.y = dragBall.y; firstBounce = true; }; } else { if ((dragBall.y - (dragBall.hitCircle.width / 2)) < _local3){ dragBall.y = (_local3 + (dragBall.hitCircle.width / 2)); vx = (vx * -(bounce)); vy = (vy * bounce); numBounces++; bounced = true; if (firstBounce == false){ bouncePoint.x = dragBall.x; bouncePoint.y = dragBall.y; firstBounce = true; }; }; }; }; } public function checkTeksten():void{ if (currentLevel == 1){ removeChild(tekst1); }; if (currentLevel == 2){ removeChild(tekst2); }; if (currentLevel == 3){ removeChild(tekst3); }; if (currentLevel == 4){ removeChild(tekst4); }; if (currentLevel == 5){ removeChild(tekst5); }; } public function gameLoop(_arg1:Event):void{ if (afterDrag == true){ if (enemyArray.length != 0){ checkEnemyCollision(); }; checkFinish(); checkWalls(); dragBallMovement(); checkCollision(); }; if (beingDragged == true){ checkDistance(); checkBoundaries(); }; changeXY(); rotateLine(); setPrev(); setChildIndex(dragBall, (numChildren - 1)); } public function dragBallUpActions():void{ mouseDownBoolean = false; dragBall.stopDrag(); afterDrag = true; beingDragged = false; shot = true; fadeCircle(); setVxVy(); stage.removeEventListener(MouseEvent.MOUSE_UP, onDragBallUp); } public function resetGame():void{ removeEventListener(Event.ENTER_FRAME, gameLoop); numResets++; reset(); if (bounced == true){ bounceSpot = new BounceSpot(); bounceSpot.x = bouncePoint.x; bounceSpot.y = bouncePoint.y; addChild(bounceSpot); addBounceTekst(); bounceSpotAdded = true; } else { if (bounceTextAdded == true){ bounceText.parent.removeChild(bounceText); bounceTextAdded = false; }; }; init(); } public function onKeysDown(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case 16: shiftDown = true; break; case 37: if (mouseDownBoolean == false){ if (shot == false){ addLine(); keysDown = true; leftRotation = true; }; }; break; case 39: if (mouseDownBoolean == false){ if (shot == false){ addLine(); keysDown = true; rightRotation = true; }; }; break; case 38: if (mouseDownBoolean == false){ if (shot == false){ shoot(); }; }; break; case 32: if (mouseDownBoolean == false){ resetGame(); }; break; case 82: if (mouseDownBoolean == false){ resetGame(); }; break; case 13: shot = false; break; case 77: if (mouseDownBoolean == false){ showMenu(); }; break; }; } public function initEnd():void{ score_txt.text = (((("You finished the game with a total number of " + numResets) + " resets, and ") + numBounces) + " bounces."); totalScore_txt.text = ("Total score: " + totalScore); exitToMain.addEventListener(MouseEvent.CLICK, backToMenuEnd); submitScore.addEventListener(MouseEvent.CLICK, submitScoreMochi); } public function gotoGame():void{ removeKids(); removeEventListener(Event.ENTER_FRAME, menuLoop); musicChannel.stop(); gotoAndStop("game"); } public function rotateLine():void{ if ((((leftRotation == true)) || ((rightRotation == true)))){ line.alpha = 1; lineLeven = 0; vRotation = 2; if (shiftDown == true){ vRotation = (vRotation * 0.05); }; if (leftRotation == true){ vRotation = (vRotation * -1); }; if (rightRotation == true){ vRotation = (vRotation * 1); }; dragBall.rotation = (dragBall.rotation + vRotation); } else { if ((((keysDown == false)) && ((dragBall.lineBoolean == true)))){ dragBall.rotation = (dragBall.rotation + vRotation); vRotation = (vRotation * 0.9); }; }; if ((((((leftRotation == false)) && ((rightRotation == false)))) && ((keysDown == false)))){ lineLeven++; if ((((lineLeven >= 200)) && ((lineAdded == true)))){ line.alpha = (line.alpha - 0.01); if (line.alpha <= 0){ removeLine(); }; }; }; } } }//package dragBall2_fla
Section 2
//MuziekContainer_3 (dragBall2_fla.MuziekContainer_3) package dragBall2_fla { import flash.display.*; public dynamic class MuziekContainer_3 extends MovieClip { public function MuziekContainer_3(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package dragBall2_fla
Section 3
//VCam_AS3_Interactive_6 (dragBall2_fla.VCam_AS3_Interactive_6) package dragBall2_fla { import flash.display.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.errors.*; import flash.ui.*; import adobe.utils.*; import flash.accessibility.*; import flash.external.*; import flash.printing.*; import flash.xml.*; public dynamic class VCam_AS3_Interactive_6 extends MovieClip { public var sH:Number; public var rp:Point; public var sW:Number; public var bounds_obj:Object; public var camH:Number; public var camW:Number; public var oldScaleMode:String; public function VCam_AS3_Interactive_6(){ addFrameScript(0, frame1); } public function set scaleX2(_arg1:Number):void{ setProperty2("scaleX", _arg1); } function frame1(){ mouseEnabled = false; visible = false; oldScaleMode = stage.scaleMode; stage.scaleMode = "exactFit"; sW = stage.stageWidth; sH = stage.stageHeight; stage.scaleMode = oldScaleMode; bounds_obj = this.getBounds(this); camH = bounds_obj.height; camW = bounds_obj.width; rp = new Point(x, y); addEventListener(Event.ENTER_FRAME, camControl); addEventListener(Event.REMOVED_FROM_STAGE, reset); camControl(); } public function set x2(_arg1:Number):void{ var _local2:Point; _local2 = parent.parent.globalToLocal(parent.localToGlobal(rp)); parent.x = (parent.x + (_arg1 - _local2.x)); } public function get rotation2():Number{ return (parent.rotation); } public function camControl(... _args):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; rp.x = x; rp.y = y; _local2 = (camH * scaleY); _local3 = (camW * scaleX); _local4 = (sH / _local2); _local5 = (sW / _local3); x2 = ((_local3 / 2) * _local5); y2 = ((_local2 / 2) * _local4); scaleX2 = _local5; scaleY2 = _local4; rotation2 = -(rotation); parent.filters = this.filters; parent.transform.colorTransform = this.transform.colorTransform; } public function set scaleY2(_arg1:Number):void{ setProperty2("scaleY", _arg1); } public function get scaleX2():Number{ return (parent.scaleX); } public function get x2():Number{ var _local1:Point; _local1 = parent.parent.globalToLocal(parent.localToGlobal(rp)); return (_local1.x); } public function setProperty2(_arg1:String, _arg2:Number):void{ var _local3:Point; var _local4:Point; _local3 = parent.parent.globalToLocal(parent.localToGlobal(rp)); parent[_arg1] = _arg2; _local4 = parent.parent.globalToLocal(parent.localToGlobal(rp)); parent.x = (parent.x - (_local4.x - _local3.x)); parent.y = (parent.y - (_local4.y - _local3.y)); } public function set y2(_arg1:Number):void{ var _local2:Point; _local2 = parent.parent.globalToLocal(parent.localToGlobal(rp)); parent.y = (parent.y + (_arg1 - _local2.y)); } public function reset(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, camControl); removeEventListener(Event.REMOVED_FROM_STAGE, reset); parent.scaleX = 1; parent.scaleY = 1; parent.x = 0; parent.y = 0; parent.rotation = 0; parent.visible = true; } public function get scaleY2():Number{ return (parent.scaleY); } public function get y2():Number{ var _local1:Point; _local1 = parent.parent.globalToLocal(parent.localToGlobal(rp)); return (_local1.y); } public function set rotation2(_arg1:Number):void{ setProperty2("rotation", _arg1); } } }//package dragBall2_fla
Section 4
//XepticAnimatie_4 (dragBall2_fla.XepticAnimatie_4) package dragBall2_fla { import flash.display.*; public dynamic class XepticAnimatie_4 extends MovieClip { public function XepticAnimatie_4(){ addFrameScript(0, frame1); } function frame1(){ } public function startAnimatie():void{ var _local1:uint; var _local2:Number; var _local3:ImpactParticle2; _local1 = (30 + Math.round((Math.random() * 10))); _local2 = _local1; while (_local2 > 0) { _local3 = new ImpactParticle2(0, 0, 12780034); _local3.x = 515; _local3.y = 200; stage.addChild(_local3); _local2--; }; } } }//package dragBall2_fla
Section 5
//BaseButton (fl.controls.BaseButton) package fl.controls { import flash.display.*; import fl.core.*; import flash.events.*; import flash.utils.*; import fl.events.*; public class BaseButton extends UIComponent { protected var _selected:Boolean;// = false private var unlockedMouseState:String; protected var pressTimer:Timer; protected var mouseState:String; protected var background:DisplayObject; private var _mouseStateLocked:Boolean;// = false protected var _autoRepeat:Boolean;// = false private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35}; public function BaseButton(){ _selected = false; _autoRepeat = false; _mouseStateLocked = false; super(); buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true); } protected function endPress():void{ pressTimer.reset(); } public function set mouseStateLocked(_arg1:Boolean):void{ _mouseStateLocked = _arg1; if (_arg1 == false){ setMouseState(unlockedMouseState); } else { unlockedMouseState = mouseState; }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function get selected():Boolean{ return (_selected); } protected function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_DOWN){ setMouseState("down"); startPress(); } else { if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){ setMouseState("over"); endPress(); } else { if (_arg1.type == MouseEvent.ROLL_OUT){ setMouseState("up"); endPress(); }; }; }; } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } protected function buttonDown(_arg1:TimerEvent):void{ if (!_autoRepeat){ endPress(); return; }; if (pressTimer.currentCount == 1){ pressTimer.delay = Number(getStyleValue("repeatInterval")); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } public function set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function setupMouseEvents():void{ addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true); } protected function drawLayout():void{ background.width = width; background.height = height; } protected function drawBackground():void{ var _local1:String; var _local2:DisplayObject; _local1 = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); _local2 = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 6
//Button (fl.controls.Button) package fl.controls { import flash.display.*; import fl.core.*; import fl.managers.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var emphasizedBorder:DisplayObject; protected var _emphasized:Boolean;// = false private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function Button(){ _emphasized = false; super(); } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; var _local3:*; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("emphasizedPadding")); if ((((_local2 < 0)) || (!(_emphasized)))){ _local2 = 0; }; _local3 = getStyleValue("focusRectPadding"); _local3 = ((_local3)==null) ? 2 : _local3; _local3 = (_local3 + _local2); uiFocusRect.x = -(_local3); uiFocusRect.y = -(_local3); uiFocusRect.width = (width + (_local3 * 2)); uiFocusRect.height = (height + (_local3 * 2)); }; } public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local1:Object; var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; _local1 = getStyleValue("emphasizedSkin"); if (_local1 != null){ emphasizedBorder = getDisplayObjectInstance(_local1); }; if (emphasizedBorder != null){ addChildAt(emphasizedBorder, 0); _local2 = Number(getStyleValue("emphasizedPadding")); emphasizedBorder.x = (emphasizedBorder.y = -(_local2)); emphasizedBorder.width = (width + (_local2 * 2)); emphasizedBorder.height = (height + (_local2 * 2)); }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles)); } } }//package fl.controls
Section 7
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement) package fl.controls { public class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package fl.controls
Section 8
//CheckBox (fl.controls.CheckBox) package fl.controls { import flash.display.*; public class CheckBox extends LabelButton { private static var defaultStyles:Object = {icon:null, upIcon:"CheckBox_upIcon", downIcon:"CheckBox_downIcon", overIcon:"CheckBox_overIcon", disabledIcon:"CheckBox_disabledIcon", selectedDisabledIcon:"CheckBox_selectedDisabledIcon", focusRectSkin:null, focusRectPadding:null, selectedUpIcon:"CheckBox_selectedUpIcon", selectedDownIcon:"CheckBox_selectedDownIcon", selectedOverIcon:"CheckBox_selectedOverIcon", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5}; public static var createAccessibilityImplementation:Function; override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = (background.x - _local2); uiFocusRect.y = (background.y - _local2); uiFocusRect.width = (background.width + (_local2 << 1)); uiFocusRect.height = (background.height + (_local2 << 1)); }; } override public function get autoRepeat():Boolean{ return (false); } override public function set autoRepeat(_arg1:Boolean):void{ } override public function set toggle(_arg1:Boolean):void{ throw (new Error("Warning: You cannot change a CheckBox's toggle.")); } override public function get toggle():Boolean{ return (true); } override protected function configUI():void{ var _local1:Shape; var _local2:Graphics; super.configUI(); super.toggle = true; _local1 = new Shape(); _local2 = _local1.graphics; _local2.beginFill(0, 0); _local2.drawRect(0, 0, 100, 100); _local2.endFill(); background = (_local1 as DisplayObject); addChildAt(background, 0); } override protected function drawLayout():void{ var _local1:Number; super.drawLayout(); _local1 = Number(getStyleValue("textPadding")); switch (_labelPlacement){ case ButtonLabelPlacement.RIGHT: icon.x = _local1; textField.x = (icon.x + (icon.width + _local1)); background.width = ((textField.x + textField.width) + _local1); background.height = (Math.max(textField.height, icon.height) + (_local1 * 2)); break; case ButtonLabelPlacement.LEFT: icon.x = ((width - icon.width) - _local1); textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width); background.width = ((textField.width + icon.width) + (_local1 * 3)); background.height = (Math.max(textField.height, icon.height) + (_local1 * 2)); break; case ButtonLabelPlacement.TOP: case ButtonLabelPlacement.BOTTOM: background.width = (Math.max(textField.width, icon.width) + (_local1 * 2)); background.height = ((textField.height + icon.height) + (_local1 * 3)); break; }; background.x = Math.min((icon.x - _local1), (textField.x - _local1)); background.y = Math.min((icon.y - _local1), (textField.y - _local1)); } override protected function drawBackground():void{ } override protected function initializeAccessibility():void{ if (CheckBox.createAccessibilityImplementation != null){ CheckBox.createAccessibilityImplementation(this); }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 9
//LabelButton (fl.controls.LabelButton) package fl.controls { import flash.display.*; import fl.core.*; import flash.events.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.ui.*; public class LabelButton extends BaseButton implements IFocusManagerComponent { protected var _labelPlacement:String;// = "right" protected var _toggle:Boolean;// = false protected var icon:DisplayObject; protected var oldMouseState:String; protected var mode:String;// = "center" public var textField:TextField; protected var _label:String;// = "Label" private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function LabelButton(){ _labelPlacement = ButtonLabelPlacement.RIGHT; _toggle = false; _label = "Label"; mode = "center"; super(); } protected function toggleSelected(_arg1:MouseEvent):void{ selected = !(selected); dispatchEvent(new Event(Event.CHANGE, true)); } public function get labelPlacement():String{ return (_labelPlacement); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (oldMouseState == null){ oldMouseState = mouseState; }; setMouseState("down"); startPress(); }; } protected function setEmbedFont(){ var _local1:Object; _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ setMouseState(oldMouseState); oldMouseState = null; endPress(); dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } override public function get selected():Boolean{ return ((_toggle) ? _selected : false); } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidate(InvalidationType.SIZE); } public function set toggle(_arg1:Boolean):void{ if (((!(_arg1)) && (super.selected))){ selected = false; }; _toggle = _arg1; if (_toggle){ addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true); } else { removeEventListener(MouseEvent.CLICK, toggleSelected); }; invalidate(InvalidationType.STATE); } public function get label():String{ return (_label); } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_toggle){ invalidate(InvalidationType.STATE); }; } override protected function draw():void{ if (textField.text != _label){ label = _label; }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); drawIcon(); drawTextFormat(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } public function get toggle():Boolean{ return (_toggle); } override protected function configUI():void{ super.configUI(); textField = new TextField(); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; addChild(textField); } override protected function drawLayout():void{ var _local1:Number; var _local2:String; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local1 = Number(getStyleValue("textPadding")); _local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement; textField.height = (textField.textHeight + 4); _local3 = (textField.textWidth + 4); _local4 = (textField.textHeight + 4); _local5 = ((icon)==null) ? 0 : (icon.width + _local1); _local6 = ((icon)==null) ? 0 : (icon.height + _local1); textField.visible = (label.length > 0); if (icon != null){ icon.x = Math.round(((width - icon.width) / 2)); icon.y = Math.round(((height - icon.height) / 2)); }; if (textField.visible == false){ textField.width = 0; textField.height = 0; } else { if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){ _local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1)))); if ((height - 2) > _local4){ _local8 = _local4; } else { _local8 = (height - 2); }; _local3 = _local7; textField.width = _local3; _local4 = _local8; textField.height = _local4; textField.x = Math.round(((width - _local3) / 2)); textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0)); if (icon != null){ icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1)); }; } else { _local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1)))); _local3 = _local7; textField.width = _local3; textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0)); textField.y = Math.round(((height - textField.height) / 2)); if (icon != null){ icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1)); }; }; }; super.drawLayout(); } override protected function initializeAccessibility():void{ if (LabelButton.createAccessibilityImplementation != null){ LabelButton.createAccessibilityImplementation(this); }; } protected function drawIcon():void{ var _local1:DisplayObject; var _local2:String; var _local3:Object; _local1 = icon; _local2 = (enabled) ? mouseState : "disabled"; if (selected){ _local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1)); }; _local2 = (_local2 + "Icon"); _local3 = getStyleValue(_local2); if (_local3 == null){ _local3 = getStyleValue("icon"); }; if (_local3 != null){ icon = getDisplayObjectInstance(_local3); }; if (icon != null){ addChildAt(icon, 1); }; if (((!((_local1 == null))) && (!((_local1 == icon))))){ removeChild(_local1); }; } public function set label(_arg1:String):void{ _label = _arg1; if (textField.text != _label){ textField.text = _label; dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE)); }; invalidate(InvalidationType.SIZE); invalidate(InvalidationType.STYLES); } protected function drawTextFormat():void{ var _local1:Object; var _local2:TextFormat; var _local3:TextFormat; _local1 = UIComponent.getStyleDefinition(); _local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); _local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition())); } } }//package fl.controls
Section 10
//RadioButton (fl.controls.RadioButton) package fl.controls { import flash.display.*; import flash.events.*; import fl.managers.*; import flash.ui.*; public class RadioButton extends LabelButton implements IFocusManagerGroup { protected var _value:Object; protected var defaultGroupName:String;// = "RadioButtonGroup" protected var _group:RadioButtonGroup; private static var defaultStyles:Object = {icon:null, upIcon:"RadioButton_upIcon", downIcon:"RadioButton_downIcon", overIcon:"RadioButton_overIcon", disabledIcon:"RadioButton_disabledIcon", selectedDisabledIcon:"RadioButton_selectedDisabledIcon", selectedUpIcon:"RadioButton_selectedUpIcon", selectedDownIcon:"RadioButton_selectedDownIcon", selectedOverIcon:"RadioButton_selectedOverIcon", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5}; public static var createAccessibilityImplementation:Function; public function RadioButton(){ defaultGroupName = "RadioButtonGroup"; super(); mode = "border"; groupName = defaultGroupName; } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = (background.x - _local2); uiFocusRect.y = (background.y - _local2); uiFocusRect.width = (background.width + (_local2 * 2)); uiFocusRect.height = (background.height + (_local2 * 2)); }; } private function setThis():void{ var _local1:RadioButtonGroup; _local1 = _group; if (_local1 != null){ if (_local1.selection != this){ _local1.selection = this; }; } else { super.selected = true; }; } override public function get autoRepeat():Boolean{ return (false); } override public function set autoRepeat(_arg1:Boolean):void{ } protected function handleClick(_arg1:MouseEvent):void{ if (_group == null){ return; }; _group.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true)); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.DOWN: setNext(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.UP: setPrev(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.LEFT: setPrev(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.RIGHT: setNext(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.SPACE: setThis(); _toggle = false; default: super.keyDownHandler(_arg1); break; }; } private function setNext(_arg1:Boolean=true):void{ var _local2:RadioButtonGroup; var _local3:IFocusManager; var _local4:int; var _local5:Number; var _local6:int; var _local7:*; _local2 = _group; if (_local2 == null){ return; }; _local3 = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; _local4 = _local2.getRadioButtonIndex(this); _local5 = _local2.numRadioButtons; _local6 = _local4; if (_local4 != -1){ do { _local6++; _local6 = ((_local6)>(_local2.numRadioButtons - 1)) ? 0 : _local6; _local7 = _local2.getRadioButtonAt(_local6); if (((_local7) && (_local7.enabled))){ if (_arg1){ _local2.selection = _local7; }; _local7.setFocus(); return; }; if (((_arg1) && (!((_local2.getRadioButtonAt(_local6) == _local2.selection))))){ _local2.selection = this; }; this.drawFocus(true); } while (_local6 != _local4); }; } public function get group():RadioButtonGroup{ return (_group); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ super.keyUpHandler(_arg1); if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){ _toggle = true; }; } override public function get selected():Boolean{ return (super.selected); } override public function set toggle(_arg1:Boolean):void{ throw (new Error("Warning: You cannot change a RadioButtons toggle.")); } public function set value(_arg1:Object):void{ _value = _arg1; } public function set group(_arg1:RadioButtonGroup):void{ groupName = _arg1.name; } override public function set selected(_arg1:Boolean):void{ if ((((_arg1 == false)) || (selected))){ return; }; if (_group != null){ _group.selection = this; } else { super.selected = _arg1; }; } override protected function draw():void{ super.draw(); } override public function get toggle():Boolean{ return (true); } override protected function configUI():void{ var _local1:Shape; var _local2:Graphics; super.configUI(); super.toggle = true; _local1 = new Shape(); _local2 = _local1.graphics; _local2.beginFill(0, 0); _local2.drawRect(0, 0, 100, 100); _local2.endFill(); background = (_local1 as DisplayObject); addChildAt(background, 0); addEventListener(MouseEvent.CLICK, handleClick, false, 0, true); } public function set groupName(_arg1:String):void{ if (_group != null){ _group.removeRadioButton(this); _group.removeEventListener(Event.CHANGE, handleChange); }; _group = ((_arg1)==null) ? null : RadioButtonGroup.getGroup(_arg1); if (_group != null){ _group.addRadioButton(this); _group.addEventListener(Event.CHANGE, handleChange, false, 0, true); }; } public function get value():Object{ return (_value); } override protected function drawLayout():void{ var _local1:Number; super.drawLayout(); _local1 = Number(getStyleValue("textPadding")); switch (_labelPlacement){ case ButtonLabelPlacement.RIGHT: icon.x = _local1; textField.x = (icon.x + (icon.width + _local1)); background.width = ((textField.x + textField.width) + _local1); background.height = (Math.max(textField.height, icon.height) + (_local1 * 2)); break; case ButtonLabelPlacement.LEFT: icon.x = ((width - icon.width) - _local1); textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width); background.width = ((textField.width + icon.width) + (_local1 * 3)); background.height = (Math.max(textField.height, icon.height) + (_local1 * 2)); break; case ButtonLabelPlacement.TOP: case ButtonLabelPlacement.BOTTOM: background.width = (Math.max(textField.width, icon.width) + (_local1 * 2)); background.height = ((textField.height + icon.height) + (_local1 * 3)); break; }; background.x = Math.min((icon.x - _local1), (textField.x - _local1)); background.y = Math.min((icon.y - _local1), (textField.y - _local1)); } override protected function drawBackground():void{ } override protected function initializeAccessibility():void{ if (RadioButton.createAccessibilityImplementation != null){ RadioButton.createAccessibilityImplementation(this); }; } public function get groupName():String{ return (((_group)==null) ? null : _group.name); } private function setPrev(_arg1:Boolean=true):void{ var _local2:RadioButtonGroup; var _local3:IFocusManager; var _local4:int; var _local5:int; var _local6:*; _local2 = _group; if (_local2 == null){ return; }; _local3 = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; _local4 = _local2.getRadioButtonIndex(this); _local5 = _local4; if (_local4 != -1){ do { --_local5; _local5 = ((_local5)==-1) ? (_local2.numRadioButtons - 1) : _local5; _local6 = _local2.getRadioButtonAt(_local5); if (((_local6) && (_local6.enabled))){ if (_arg1){ _local2.selection = _local6; }; _local6.setFocus(); return; }; if (((_arg1) && (!((_local2.getRadioButtonAt(_local5) == _local2.selection))))){ _local2.selection = this; }; this.drawFocus(true); } while (_local5 != _local4); }; } protected function handleChange(_arg1:Event):void{ super.selected = (_group.selection == this); dispatchEvent(new Event(Event.CHANGE, true)); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 11
//RadioButtonGroup (fl.controls.RadioButtonGroup) package fl.controls { import flash.events.*; public class RadioButtonGroup extends EventDispatcher { protected var _selection:RadioButton; protected var radioButtons:Array; protected var _name:String; private static var groups:Object; private static var groupCount:uint = 0; public function RadioButtonGroup(_arg1:String){ _name = _arg1; radioButtons = []; registerGroup(this); } public function getRadioButtonIndex(_arg1:RadioButton):int{ var _local2:int; var _local3:RadioButton; _local2 = 0; while (_local2 < radioButtons.length) { _local3 = (radioButtons[_local2] as RadioButton); if (_local3 == _arg1){ return (_local2); }; _local2++; }; return (-1); } public function get numRadioButtons():int{ return (radioButtons.length); } public function get name():String{ return (_name); } public function get selection():RadioButton{ return (_selection); } public function set selection(_arg1:RadioButton):void{ if ((((((_selection == _arg1)) || ((_arg1 == null)))) || ((getRadioButtonIndex(_arg1) == -1)))){ return; }; _selection = _arg1; dispatchEvent(new Event(Event.CHANGE, true)); } public function set selectedData(_arg1:Object):void{ var _local2:int; var _local3:RadioButton; _local2 = 0; while (_local2 < radioButtons.length) { _local3 = (radioButtons[_local2] as RadioButton); if (_local3.value == _arg1){ selection = _local3; return; }; _local2++; }; } public function removeRadioButton(_arg1:RadioButton):void{ var _local2:int; _local2 = getRadioButtonIndex(_arg1); if (_local2 != -1){ radioButtons.splice(_local2, 1); }; if (_selection == _arg1){ _selection = null; }; } public function addRadioButton(_arg1:RadioButton):void{ if (_arg1.groupName != name){ _arg1.groupName = name; return; }; radioButtons.push(_arg1); if (_arg1.selected){ selection = _arg1; }; } public function getRadioButtonAt(_arg1:int):RadioButton{ return (RadioButton(radioButtons[_arg1])); } public function get selectedData():Object{ var _local1:RadioButton; _local1 = _selection; return (((_local1)==null) ? null : _local1.value); } public static function getGroup(_arg1:String):RadioButtonGroup{ var _local2:RadioButtonGroup; if (groups == null){ groups = {}; }; _local2 = (groups[_arg1] as RadioButtonGroup); if (_local2 == null){ _local2 = new RadioButtonGroup(_arg1); if ((++groupCount % 20) == 0){ cleanUpGroups(); }; }; return (_local2); } private static function registerGroup(_arg1:RadioButtonGroup):void{ if (groups == null){ groups = {}; }; groups[_arg1.name] = _arg1; } private static function cleanUpGroups():void{ var _local1:String; var _local2:RadioButtonGroup; for (_local1 in groups) { _local2 = (groups[_local1] as RadioButtonGroup); if (_local2.radioButtons.length == 0){ delete groups[_local1]; }; }; } } }//package fl.controls
Section 12
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 13
//InvalidationType (fl.core.InvalidationType) package fl.core { public class InvalidationType { public static const SIZE:String = "size"; public static const ALL:String = "all"; public static const DATA:String = "data"; public static const SCROLL:String = "scroll"; public static const STATE:String = "state"; public static const STYLES:String = "styles"; public static const SELECTED:String = "selected"; public static const RENDERER_STYLES:String = "rendererStyles"; } }//package fl.core
Section 14
//UIComponent (fl.core.UIComponent) package fl.core { import flash.display.*; import flash.events.*; import fl.managers.*; import flash.utils.*; import fl.events.*; import flash.text.*; import flash.system.*; public class UIComponent extends Sprite { protected var _enabled:Boolean;// = true private var _mouseFocusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var _oldIMEMode:String;// = null protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var uiFocusRect:DisplayObject; protected var _width:Number; public var version:String;// = "3.0.0.15" protected var isFocused:Boolean;// = false protected var callLaterMethods:Dictionary; private var _focusEnabled:Boolean;// = true private var tempText:TextField; protected var invalidateFlag:Boolean;// = false protected var _inspector:Boolean;// = false protected var sharedStyles:Object; protected var invalidHash:Object; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var instanceStyles:Object; protected var _x:Number; protected var _y:Number; public static var inCallLaterPhase:Boolean = false; private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)}; public static var createAccessibilityImplementation:Function; private static var focusManagers:Dictionary = new Dictionary(false); public function UIComponent(){ version = "3.0.0.15"; isLivePreview = false; invalidateFlag = false; _enabled = true; isFocused = false; _focusEnabled = true; _mouseFocusEnabled = true; _imeMode = null; _oldIMEMode = null; errorCaught = false; _inspector = false; super(); instanceStyles = {}; sharedStyles = {}; invalidHash = {}; callLaterMethods = new Dictionary(); StyleManager.registerInstance(this); configUI(); invalidate(InvalidationType.ALL); tabEnabled = (this is IFocusManagerComponent); focusRect = false; if (tabEnabled){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; initializeFocusManager(); addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true); } public function drawFocus(_arg1:Boolean):void{ var _local2:Number; isFocused = _arg1; if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){ removeChild(uiFocusRect); uiFocusRect = null; }; if (_arg1){ uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite); if (uiFocusRect == null){ return; }; _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = -(_local2); uiFocusRect.y = -(_local2); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); addChildAt(uiFocusRect, 0); }; } private function callLaterDispatcher(_arg1:Event):void{ var _local2:Dictionary; var _local3:Object; if (_arg1.type == Event.ADDED_TO_STAGE){ removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher); stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); return; }; _arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher); if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); return; }; inCallLaterPhase = true; _local2 = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } override public function get scaleX():Number{ return ((width / startWidth)); } override public function get scaleY():Number{ return ((height / startHeight)); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus((_arg1.target as DisplayObject))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); isFocused = true; }; }; } public function setStyle(_arg1:String, _arg2:Object):void{ if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; instanceStyles[_arg1] = _arg2; invalidate(InvalidationType.STYLES); } override public function get visible():Boolean{ return (super.visible); } public function get componentInspectorSetting():Boolean{ return (_inspector); } override public function get x():Number{ return ((isNaN(_x)) ? super.x : _x); } override public function get y():Number{ return ((isNaN(_y)) ? super.y : _y); } protected function setIMEMode(_arg1:Boolean){ var enabled = _arg1; if (_imeMode != null){ if (enabled){ IME.enabled = true; _oldIMEMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(("IME mode not supported: " + _imeMode))); }; } else { if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _oldIMEMode; }; IME.enabled = false; }; }; } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } public function setSharedStyle(_arg1:String, _arg2:Object):void{ if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; sharedStyles[_arg1] = _arg2; if (instanceStyles[_arg1] == null){ invalidate(InvalidationType.STYLES); }; } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } override public function set scaleX(_arg1:Number):void{ setSize((startWidth * _arg1), height); } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } override public function set scaleY(_arg1:Number):void{ setSize(width, (startHeight * _arg1)); } protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{ var classDef:Object; var skin = _arg1; classDef = null; if ((skin is Class)){ return ((new (skin) as DisplayObject)); }; if ((skin is DisplayObject)){ (skin as DisplayObject).x = 0; (skin as DisplayObject).y = 0; return ((skin as DisplayObject)); }; try { classDef = getDefinitionByName(skin.toString()); } catch(e:Error) { try { classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object); } catch(e:Error) { }; }; if (classDef == null){ return (null); }; return ((new (classDef) as DisplayObject)); } protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{ var _local3:String; for (_local3 in _arg2) { _arg1.setStyle(_local3, getStyleValue(_arg2[_local3])); }; } protected function beforeComponentParameters():void{ } protected function callLater(_arg1:Function):void{ if (inCallLaterPhase){ return; }; callLaterMethods[_arg1] = true; if (stage != null){ stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); } else { addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); }; } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } override public function set visible(_arg1:Boolean):void{ var _local2:String; if (super.visible == _arg1){ return; }; super.visible = _arg1; _local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } protected function hookAccessibility(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, hookAccessibility); initializeAccessibility(); } public function set componentInspectorSetting(_arg1:Boolean):void{ _inspector = _arg1; if (_inspector){ beforeComponentParameters(); } else { afterComponentParameters(); }; } override public function set x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } override public function set y(_arg1:Number):void{ move(_x, _arg1); } protected function checkLivePreview():Boolean{ var className:String; if (parent == null){ return (false); }; try { className = getQualifiedClassName(parent); } catch(e:Error) { }; return ((className == "fl.livepreview::LivePreviewParent")); } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus((_arg1.target as DisplayObject))){ drawFocus(false); isFocused = false; }; } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } public function getFocus():InteractiveObject{ if (stage){ return (stage.focus); }; return (null); } protected function validate():void{ invalidHash = {}; } override public function get height():Number{ return (_height); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } public function get enabled():Boolean{ return (_enabled); } protected function getScaleX():Number{ return (super.scaleX); } protected function getScaleY():Number{ return (super.scaleY); } public function get focusEnabled():Boolean{ return (_focusEnabled); } protected function afterComponentParameters():void{ } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } protected function configUI():void{ var _local1:Number; var _local2:Number; var _local3:Number; isLivePreview = checkLivePreview(); _local1 = rotation; rotation = 0; _local2 = super.width; _local3 = super.height; var _local4 = 1; super.scaleY = _local4; super.scaleX = _local4; setSize(_local2, _local3); move(super.x, super.y); rotation = _local1; startWidth = _local2; startHeight = _local3; if (numChildren > 0){ removeChildAt(0); }; } protected function setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } public function set focusManager(_arg1:IFocusManager):void{ UIComponent.focusManagers[this] = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } protected function isInvalid(_arg1:String, ... _args):Boolean{ if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){ return (true); }; while (_args.length > 0) { if (invalidHash[_args.pop()]){ return (true); }; }; return (false); } public function setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject; _local1 = this; while (_local1) { if (UIComponent.focusManagers[_local1] != null){ return (IFocusManager(UIComponent.focusManagers[_local1])); }; _local1 = _local1.parent; }; return (null); } override public function get width():Number{ return (_width); } public function move(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; super.x = Math.round(_arg1); super.y = Math.round(_arg2); dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); } public function validateNow():void{ invalidate(InvalidationType.ALL, false); draw(); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local2:Object; var _local3:uint; var _local4:uint; var _local5:Object; var _local6:String; _local2 = {}; _local3 = _args.length; _local4 = 0; while (_local4 < _local3) { _local5 = _args[_local4]; for (_local6 in _local5) { if (_local2[_local6] != null){ } else { _local2[_local6] = _args[_local4][_local6]; }; }; _local4++; }; return (_local2); } } }//package fl.core
Section 15
//ComponentEvent (fl.events.ComponentEvent) package fl.events { import flash.events.*; public class ComponentEvent extends Event { public static const HIDE:String = "hide"; public static const BUTTON_DOWN:String = "buttonDown"; public static const MOVE:String = "move"; public static const RESIZE:String = "resize"; public static const ENTER:String = "enter"; public static const LABEL_CHANGE:String = "labelChange"; public static const SHOW:String = "show"; public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("ComponentEvent", "type", "bubbles", "cancelable")); } override public function clone():Event{ return (new ComponentEvent(type, bubbles, cancelable)); } } }//package fl.events
Section 16
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.controls.*; import flash.display.*; import fl.core.*; import flash.events.*; import flash.utils.*; import flash.text.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ activated = false; calculateCandidates = true; _showFocusIndicator = true; _defaultButtonEnabled = true; super(); focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local5:int; var _local6:int; var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; _local5 = focusableCandidates.length; _local6 = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; _local2 = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject; _local2 = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } private function tabChildrenChangeHandler(_arg1:Event):void{ var _local2:DisplayObjectContainer; if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; _local2 = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } public function getFocus():InteractiveObject{ var _local1:InteractiveObject; _local1 = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; var _local3:TextField; var _local4:SimpleButton; _local2 = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } public function set defaultButton(_arg1:Button):void{ var _local2:Button; _local2 = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ var _local2:InteractiveObject; if (!hasFocusableObjects()){ return; }; _local2 = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int; var _local3:int; _local2 = focusableCandidates.length; _local3 = 0; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local3:DisplayObject; var _local4:InteractiveObject; _local3 = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local3:String; var _local4:String; var _local5:int; var _local6:String; var _local7:String; var _local8:String; var _local9:DisplayObject; var _local10:DisplayObject; _local3 = ""; _local4 = ""; _local8 = "0000"; _local9 = DisplayObject(_arg1); _local10 = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local2:DisplayObject; var _local3:String; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; _local2 = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; _local4 = getIndexOfFocusedObject(_local2); _local5 = false; _local6 = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; _local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:InteractiveObject; if (_arg1.isDefaultPrevented()){ return; }; _local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; _local2 = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; var _local3:Button; _local2 = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ var _local2:InteractiveObject; var _local3:Boolean; calculateCandidates = true; _local2 = InteractiveObject(_arg1.target); _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } } }//package fl.managers
Section 17
//IFocusManager (fl.managers.IFocusManager) package fl.managers { import fl.controls.*; import flash.display.*; public interface IFocusManager { function getFocus():InteractiveObject; function deactivate():void; function set defaultButton(_arg1:Button):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function get nextTabIndex():int; function get defaultButton():Button; function get showFocusIndicator():Boolean; function setFocus(_arg1:InteractiveObject):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function hideFocus():void; function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject; function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject; } }//package fl.managers
Section 18
//IFocusManagerComponent (fl.managers.IFocusManagerComponent) package fl.managers { public interface IFocusManagerComponent { function set focusEnabled(_arg1:Boolean):void; function drawFocus(_arg1:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package fl.managers
Section 19
//IFocusManagerGroup (fl.managers.IFocusManagerGroup) package fl.managers { public interface IFocusManagerGroup { function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; function get groupName():String; function get selected():Boolean; } }//package fl.managers
Section 20
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.utils.*; import flash.text.*; public class StyleManager { private var globalStyles:Object; private var classToDefaultStylesDict:Dictionary; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToInstancesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class; var _local5:Object; _local4 = getClassDef(_arg1); _local5 = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local2:StyleManager; var _local3:Class; var _local4:Object; var _local5:String; _local2 = getInstance(); _local3 = getClassDef(_arg1); _local4 = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local3:Dictionary; var _local4:Object; var _local5:UIComponent; _local3 = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local2:Dictionary; var _local3:Object; _local2 = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var inst:StyleManager; var classDef:Class; var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; inst = getInstance(); classDef = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; inst.classToStylesDict[classDef] = {}; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class; var _local4:StyleManager; var _local5:Object; _local3 = getClassDef(_arg1); _local4 = getInstance(); _local5 = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object; _local3 = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 21
//TweenEvent (gs.events.TweenEvent) package gs.events { import flash.events.*; public class TweenEvent extends Event { public var info:Object; public static const UPDATE:String = "update"; public static const START:String = "start"; public static const version:Number = 0.9; public static const COMPLETE:String = "complete"; public function TweenEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.info = _arg2; } override public function clone():Event{ return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable)); } } }//package gs.events
Section 22
//OverwriteManager (gs.OverwriteManager) package gs { import flash.utils.*; import flash.errors.*; public class OverwriteManager { public static const ALL:int = 1; public static const NONE:int = 0; public static const AUTO:int = 2; public static const CONCURRENT:int = 3; public static const version:Number = 1; public static var mode:int; public static var enabled:Boolean; public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array, _arg4:Array, _arg5:Array):void{ var _local6:int; var _local7:String; _local6 = (_arg4.length - 1); while (_local6 > -1) { if (_arg1[_arg4[_local6].name] != undefined){ _arg4.splice(_local6, 1); }; _local6--; }; _local6 = (_arg3.length - 1); while (_local6 > -1) { if (_arg1[_arg3[_local6][4]] != undefined){ _arg3.splice(_local6, 1); }; _local6--; }; _local6 = (_arg5.length - 1); while (_local6 > -1) { if (_arg1[_arg5[_local6].name] != undefined){ _arg5.splice(_local6, 1); }; _local6--; }; for (_local7 in _arg1) { delete _arg2[_local7]; }; } public static function manageOverwrites(_arg1:TweenLite, _arg2:Array):void{ var _local3:Object; var _local4:int; var _local5:Number; var _local6:Array; var _local7:int; var _local8:TweenLite; var _local9:Object; var _local10:String; _local3 = _arg1.vars; _local4 = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite); if ((((_local4 < 2)) || ((_arg2 == null)))){ return; }; _local5 = _arg1.startTime; _local6 = []; _local7 = (_arg2.length - 1); while (_local7 > -1) { _local8 = _arg2[_local7]; if (((((!((_local8 == _arg1))) && ((_local8.startTime <= _local5)))) && (((_local8.startTime + ((_local8.duration * 1000) / _local8.combinedTimeScale)) > _local5)))){ _local6[_local6.length] = _local8; }; _local7--; }; if (_local6.length == 0){ return; }; if (_local4 == AUTO){ if (_local3.isTV == true){ _local3 = _local3.exposedProps; }; _local9 = {}; for (_local10 in _local3) { if ((((((((((((((((((((((((((((((((((((((((((((_local10 == "ease")) || ((_local10 == "delay")))) || ((_local10 == "overwrite")))) || ((_local10 == "onComplete")))) || ((_local10 == "onCompleteParams")))) || ((_local10 == "runBackwards")))) || ((_local10 == "persist")))) || ((_local10 == "onUpdate")))) || ((_local10 == "onUpdateParams")))) || ((_local10 == "timeScale")))) || ((_local10 == "onStart")))) || ((_local10 == "onStartParams")))) || ((_local10 == "renderOnStart")))) || ((_local10 == "proxiedEase")))) || ((_local10 == "easeParams")))) || ((_local10 == "onCompleteAll")))) || ((_local10 == "onCompleteAllParams")))) || ((_local10 == "yoyo")))) || ((_local10 == "loop")))) || ((_local10 == "onCompleteListener")))) || ((_local10 == "onStartListener")))) || ((_local10 == "onUpdateListener")))){ } else { _local9[_local10] = 1; if (_local10 == "shortRotate"){ _local9.rotation = 1; } else { if (_local10 == "removeTint"){ _local9.tint = 1; } else { if (_local10 == "autoAlpha"){ _local9.alpha = 1; _local9.visible = 1; }; }; }; }; }; _local7 = (_local6.length - 1); while (_local7 > -1) { _local6[_local7].killVars(_local9); _local7--; }; } else { _local7 = (_local6.length - 1); while (_local7 > -1) { _local6[_local7].enabled = false; _local7--; }; }; } public static function init(_arg1:int=2):int{ if (TweenLite.version < 9.29){ trace("TweenLite warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."); }; TweenLite.overwriteManager = OverwriteManager; mode = _arg1; enabled = true; return (mode); } } }//package gs
Section 23
//TweenFilterLite (gs.TweenFilterLite) package gs { import flash.filters.*; import flash.utils.*; public class TweenFilterLite extends TweenLite { protected var _hf:Boolean;// = false protected var _endMatrix:Array; protected var _roundProps:Boolean; protected var _cmf:ColorMatrixFilter; protected var _filters:Array; protected var _clrsa:Array; protected var _matrix:Array; protected var _timeScale:Number; public static var removeTween:Function = TweenLite.removeTween; private static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; private static var _lumB:Number = 0.072169; public static var delayedCall:Function = TweenLite.delayedCall; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var version:Number = 9.3; private static var _lumG:Number = 0.71516; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _lumR:Number = 0.212671; protected static var _globalTimeScale:Number = 1; public function TweenFilterLite(_arg1:Object, _arg2:Number, _arg3:Object){ _hf = false; _filters = []; super(_arg1, _arg2, _arg3); if (((!((this.combinedTimeScale == 1))) && ((this.target is TweenFilterLite)))){ _timeScale = 1; this.combinedTimeScale = _globalTimeScale; } else { _timeScale = this.combinedTimeScale; this.combinedTimeScale = (this.combinedTimeScale * _globalTimeScale); }; if (((!((this.combinedTimeScale == 1))) && (!((this.delay == 0))))){ this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale))); }; if (TweenLite.version < 9.3){ trace("TweenFilterLite error! Please update your TweenLite class or try deleting your ASO files. TweenFilterLite requires a more recent version. Download updates at http://www.TweenLite.com."); }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (_arg1){ this.combinedTimeScale = (_timeScale * _globalTimeScale); }; } override public function render(_arg1:uint):void{ var _local2:Number; var _local3:Number; var _local4:Object; var _local5:int; var _local6:Number; var _local7:int; var _local8:Array; var _local9:int; _local2 = (((_arg1 - this.startTime) * 0.001) * this.combinedTimeScale); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; if (!_roundProps){ _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4[0][_local4[1]] = (_local4[2] + (_local3 * _local4[3])); _local5--; }; } else { _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; if (_local4[5]){ _local6 = (_local4[2] + (_local3 * _local4[3])); _local7 = ((_local6)<0) ? -1 : 1; _local4[0][_local4[1]] = ((((_local6 % 1) * _local7))>0.5) ? (int(_local6) + _local7) : int(_local6); } else { _local4[0][_local4[1]] = (_local4[2] + (_local3 * _local4[3])); }; _local5--; }; }; if (_hf){ _local5 = (_clrsa.length - 1); while (_local5 > -1) { _local4 = _clrsa[_local5]; _local4.f[_local4.p] = ((((_local4.sr + (_local3 * _local4.cr)) << 16) | ((_local4.sg + (_local3 * _local4.cg)) << 8)) | (_local4.sb + (_local3 * _local4.cb))); _local5--; }; if (_cmf != null){ ColorMatrixFilter(_cmf).matrix = _matrix; }; _local8 = this.target.filters; _local5 = 0; while (_local5 < _filters.length) { _local9 = (_local8.length - 1); while (_local9 > -1) { if ((_local8[_local9] is _filters[_local5].type)){ _local8.splice(_local9, 1, _filters[_local5].filter); break; }; _local9--; }; _local5++; }; this.target.filters = _local8; }; if (_hst){ _local5 = (_subTweens.length - 1); while (_local5 > -1) { _subTweens[_local5].proxy(_subTweens[_local5], _local2); _local5--; }; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } override public function killVars(_arg1:Object):void{ if (TweenLite.overwriteManager.enabled){ TweenLite.overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, ((_filters) || ([]))); }; } public function get timeScale():Number{ return (_timeScale); } public function set timeScale(_arg1:Number):void{ if (_arg1 < 1E-5){ _arg1 = (_timeScale = 1E-5); } else { _timeScale = _arg1; _arg1 = (_arg1 * _globalTimeScale); }; this.initTime = ((currentTime - ((((currentTime - this.initTime) - (this.delay * (1000 / this.combinedTimeScale))) * this.combinedTimeScale) * (1 / _arg1))) - (this.delay * (1000 / _arg1))); if (this.startTime != 999999999999999){ this.startTime = (this.initTime + (this.delay * (1000 / _arg1))); }; this.combinedTimeScale = _arg1; } override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{ var _local3:int; var _local4:Object; var _local5:Object; var _local6:Object; var _local7:int; var _local8:String; if (((!(_arg1)) && (TweenLite.overwriteManager.enabled))){ TweenLite.overwriteManager.manageOverwrites(this, masterList[this.target]); }; _clrsa = []; _filters = []; _matrix = _idMatrix.slice(); _arg2 = (_arg2 + " blurFilter glowFilter colorMatrixFilter dropShadowFilter bevelFilter roundProps timeScale "); if (((!((this.vars.timeScale == null))) && (this.target.hasOwnProperty("timeScale")))){ this.tweens[this.tweens.length] = [this.target, "timeScale", this.target.timeScale, (this.vars.timeScale - this.target.timeScale), "timeScale"]; }; _roundProps = Boolean((this.vars.roundProps is Array)); if (_isDisplayObject){ if (this.vars.blurFilter != null){ _local4 = this.vars.blurFilter; addFilter("blurFilter", _local4, BlurFilter, ["blurX", "blurY", "quality"], new BlurFilter(0, 0, ((_local4.quality) || (2)))); }; if (this.vars.glowFilter != null){ _local4 = this.vars.glowFilter; addFilter("glowFilter", _local4, GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new GlowFilter(0xFFFFFF, 0, 0, 0, ((_local4.strength) || (1)), ((_local4.quality) || (2)), _local4.inner, _local4.knockout)); }; if (this.vars.colorMatrixFilter != null){ _local4 = this.vars.colorMatrixFilter; _local5 = addFilter("colorMatrixFilter", _local4, ColorMatrixFilter, [], new ColorMatrixFilter(_matrix)); _cmf = _local5.filter; _matrix = ColorMatrixFilter(_cmf).matrix; if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){ _endMatrix = _local4.matrix; } else { if (_local4.relative == true){ _endMatrix = _matrix.slice(); } else { _endMatrix = _idMatrix.slice(); }; _endMatrix = setBrightness(_endMatrix, _local4.brightness); _endMatrix = setContrast(_endMatrix, _local4.contrast); _endMatrix = setHue(_endMatrix, _local4.hue); _endMatrix = setSaturation(_endMatrix, _local4.saturation); _endMatrix = setThreshold(_endMatrix, _local4.threshold); if (!isNaN(_local4.colorize)){ _endMatrix = colorize(_endMatrix, _local4.colorize, _local4.amount); } else { if (!isNaN(_local4.color)){ _endMatrix = colorize(_endMatrix, _local4.color, _local4.amount); }; }; }; _local3 = 0; while (_local3 < _endMatrix.length) { if (((!((_matrix[_local3] == _endMatrix[_local3]))) && (!((_matrix[_local3] == undefined))))){ this.tweens[this.tweens.length] = [_matrix, _local3.toString(), _matrix[_local3], (_endMatrix[_local3] - _matrix[_local3]), "colorMatrixFilter"]; }; _local3++; }; }; if (this.vars.dropShadowFilter != null){ _local4 = this.vars.dropShadowFilter; addFilter("dropShadowFilter", _local4, DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_local4.quality) || (2)), _local4.inner, _local4.knockout, _local4.hideObject)); }; if (this.vars.bevelFilter != null){ _local4 = this.vars.bevelFilter; addFilter("bevelFilter", _local4, BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_local4.quality) || (2)))); }; if (this.vars.runBackwards == true){ _local3 = (_clrsa.length - 1); while (_local3 > -1) { _local6 = _clrsa[_local3]; _clrsa[_local3].sr = (_local6.sr + _local6.cr); _local6.cr = (_local6.cr * -1); _local6.sg = (_local6.sg + _local6.cg); _local6.cg = (_local6.cg * -1); _local6.sb = (_local6.sb + _local6.cb); _local6.cb = (_local6.cb * -1); _local6.f[_local6.p] = (((_local6.sr << 16) | (_local6.sg << 8)) | _local6.sb); _local3--; }; }; super.initTweenVals(true, _arg2); } else { super.initTweenVals(_arg1, _arg2); }; if (_roundProps){ _local3 = (this.vars.roundProps.length - 1); while (_local3 > -1) { _local8 = this.vars.roundProps[_local3]; _local7 = (this.tweens.length - 1); while (_local7 > -1) { if ((((this.tweens[_local7][1] == _local8)) && ((this.tweens[_local7][0] == this.target)))){ this.tweens[_local7][5] = true; break; }; _local7--; }; _local3--; }; }; } private function addFilter(_arg1:String, _arg2:Object, _arg3:Class, _arg4:Array, _arg5:BitmapFilter):Object{ var _local6:Object; var _local7:Array; var _local8:int; var _local9:String; var _local10:Number; var _local11:Object; var _local12:Object; _local6 = {type:_arg3, name:_arg1}; _local7 = this.target.filters; _local8 = 0; while (_local8 < _local7.length) { if ((_local7[_local8] is _arg3)){ _local6.filter = _local7[_local8]; break; }; _local8++; }; if (_local6.filter == undefined){ _local6.filter = _arg5; _local7[_local7.length] = _local6.filter; this.target.filters = _local7; }; _local8 = 0; while (_local8 < _arg4.length) { _local9 = _arg4[_local8]; if (_arg2[_local9] != undefined){ if ((((((_local9 == "color")) || ((_local9 == "highlightColor")))) || ((_local9 == "shadowColor")))){ _local11 = HEXtoRGB(_local6.filter[_local9]); _local12 = HEXtoRGB(_arg2[_local9]); _clrsa[_clrsa.length] = {f:_local6.filter, p:_local9, sr:_local11.rb, cr:(_local12.rb - _local11.rb), sg:_local11.gb, cg:(_local12.gb - _local11.gb), sb:_local11.bb, cb:(_local12.bb - _local11.bb)}; } else { if ((((((((_local9 == "quality")) || ((_local9 == "inner")))) || ((_local9 == "knockout")))) || ((_local9 == "hideObject")))){ _local6.filter[_local9] = _arg2[_local9]; } else { if (typeof(_arg2[_local9]) == "number"){ _local10 = (_arg2[_local9] - _local6.filter[_local9]); } else { _local10 = Number(_arg2[_local9]); }; this.tweens[this.tweens.length] = [_local6.filter, _local9, _local6.filter[_local9], _local10, _arg1]; }; }; }; _local8++; }; _filters[_filters.length] = _local6; _hf = true; return (_local6); } public static function setHue(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Array; if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 * (Math.PI / 180)); _local3 = Math.cos(_arg2); _local4 = Math.sin(_arg2); _local5 = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; return (applyMatrix(_local5, _arg1)); } public static function setContrast(_arg1:Array, _arg2:Number):Array{ var _local3:Array; if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 + 0.01); _local3 = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function applyMatrix(_arg1:Array, _arg2:Array):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:int; var _local7:int; if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (_arg2); }; _local3 = []; _local4 = 0; _local5 = 0; _local6 = 0; while (_local6 < 4) { _local7 = 0; while (_local7 < 5) { if (_local7 == 4){ _local5 = _arg1[(_local4 + 4)]; } else { _local5 = 0; }; _local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5); _local7++; }; _local4 = (_local4 + 5); _local6++; }; return (_local3); } public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; if (isNaN(_arg2)){ return (_arg1); }; if (isNaN(_arg3)){ _arg3 = 1; }; _local4 = (((_arg2 >> 16) & 0xFF) / 0xFF); _local5 = (((_arg2 >> 8) & 0xFF) / 0xFF); _local6 = ((_arg2 & 0xFF) / 0xFF); _local7 = (1 - _arg3); _local8 = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local8, _arg1)); } public static function setBrightness(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = ((_arg2 * 100) - 100); return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1)); } public static function setSaturation(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Array; if (isNaN(_arg2)){ return (_arg1); }; _local3 = (1 - _arg2); _local4 = (_local3 * _lumR); _local5 = (_local3 * _lumG); _local6 = (_local3 * _lumB); _local7 = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local7, _arg1)); } public static function setGlobalTimeScale(_arg1:Number):void{ var _local2:Dictionary; var _local3:int; var _local4:Array; if (_arg1 < 1E-5){ _arg1 = 1E-5; }; _local2 = masterList; _globalTimeScale = _arg1; for each (_local4 in _local2) { _local3 = (_local4.length - 1); while (_local3 > -1) { if ((_local4[_local3] is TweenFilterLite)){ _local4[_local3].timeScale = (_local4[_local3].timeScale * 1); }; _local3--; }; }; } public static function get globalTimeScale():Number{ return (_globalTimeScale); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{ _arg3.runBackwards = true; return (new TweenFilterLite(_arg1, _arg2, _arg3)); } public static function set globalTimeScale(_arg1:Number):void{ setGlobalTimeScale(_arg1); } public static function HEXtoRGB(_arg1:Number):Object{ return ({rb:(_arg1 >> 16), gb:((_arg1 >> 8) & 0xFF), bb:(_arg1 & 0xFF)}); } public static function setThreshold(_arg1:Array, _arg2:Number):Array{ var _local3:Array; if (isNaN(_arg2)){ return (_arg1); }; _local3 = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{ return (new TweenFilterLite(_arg1, _arg2, _arg3)); } } }//package gs
Section 24
//TweenLite (gs.TweenLite) package gs { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.utils.*; public class TweenLite { public var delay:Number; protected var _hasUpdate:Boolean; public var started:Boolean; protected var _subTweens:Array; public var initted:Boolean; public var active:Boolean; public var startTime:Number; public var target:Object; public var duration:Number; protected var _hst:Boolean; protected var _isDisplayObject:Boolean; public var gc:Boolean; public var vars:Object; public var ease:Function; public var tweens:Array; protected var _specialVars:Object; public var combinedTimeScale:Number; public var initTime:Number; private static var _timer:Timer = new Timer(2000); private static var _classInitted:Boolean; public static var defaultEase:Function = TweenLite.easeOut; public static var version:Number = 9.3; public static var masterList:Dictionary = new Dictionary(false); public static var currentTime:uint; public static var overwriteManager:Object; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public static var timingSprite:Sprite = new Sprite(); public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ var _local4:int; super(); if (_arg1 == null){ return; }; if (!_classInitted){ currentTime = getTimer(); timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; _timer.addEventListener("timer", killGarbage, false, 0, true); _timer.start(); _classInitted = true; }; this.vars = _arg3; this.duration = ((_arg2) || (0.001)); this.delay = ((_arg3.delay) || (0)); this.combinedTimeScale = ((_arg3.timeScale) || (1)); this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0)))); this.target = _arg1; _isDisplayObject = Boolean((((_arg1 is DisplayObject)) || (_arg1.hasOwnProperty("isTweenProxy")))); if (!(this.vars.ease is Function)){ this.vars.ease = defaultEase; }; if (this.vars.easeParams != null){ this.vars.proxiedEase = this.vars.ease; this.vars.ease = easeProxy; }; this.ease = this.vars.ease; if (!isNaN(Number(this.vars.autoAlpha))){ this.vars.alpha = Number(this.vars.autoAlpha); this.vars.visible = Boolean((this.vars.alpha > 0)); }; _specialVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars; this.tweens = []; _subTweens = []; _hst = (this.initted = false); this.initTime = currentTime; this.startTime = (this.initTime + (this.delay * 1000)); _local4 = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); if ((((masterList[_arg1] == undefined)) || (((!((_arg1 == null))) && ((_local4 == 1)))))){ masterList[_arg1] = []; }; masterList[_arg1].push(this); if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){ initTweenVals(); if (this.active){ render((this.startTime + 1)); } else { render(this.startTime); }; if (((((!((_specialVars.visible == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){ this.target.visible = _specialVars.visible; }; }; } public function set enabled(_arg1:Boolean):void{ var _local2:Array; var _local3:Boolean; var _local4:int; if (_arg1){ if (masterList[this.target] == undefined){ masterList[this.target] = [this]; } else { _local2 = masterList[this.target]; _local4 = (_local2.length - 1); while (_local4 > -1) { if (_local2[_local4] == this){ _local3 = true; break; }; _local4--; }; if (!_local3){ masterList[this.target].push(this); }; }; }; this.gc = (_arg1) ? false : true; if (this.gc){ this.active = false; } else { this.active = this.started; }; } public function render(_arg1:uint):void{ var _local2:Number; var _local3:Number; var _local4:Object; var _local5:int; _local2 = ((_arg1 - this.startTime) * 0.001); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4[0][_local4[1]] = (_local4[2] + (_local3 * _local4[3])); _local5--; }; if (_hst){ _local5 = (_subTweens.length - 1); while (_local5 > -1) { _subTweens[_local5].proxy(_subTweens[_local5], _local2); _local5--; }; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } public function activate():void{ this.started = (this.active = true); if (!this.initted){ initTweenVals(); }; if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (this.duration == 0.001){ this.startTime = (this.startTime - 1); }; } public function clear():void{ this.tweens = []; _subTweens = []; this.vars = {}; _hst = (_hasUpdate = false); } protected function addSubTween(_arg1:String, _arg2:Function, _arg3:Object, _arg4:Object, _arg5:Object=null):void{ var _local6:String; _subTweens[_subTweens.length] = {name:_arg1, proxy:_arg2, target:_arg3, info:_arg5}; for (_local6 in _arg4) { if (typeof(_arg4[_local6]) == "number"){ this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], (_arg4[_local6] - _arg3[_local6]), _arg1]; } else { this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], Number(_arg4[_local6]), _arg1]; }; }; _hst = true; } public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{ var _local3:String; var _local4:int; var _local5:Array; var _local6:ColorTransform; var _local7:ColorTransform; var _local8:Object; if (((!(_arg1)) && (overwriteManager.enabled))){ overwriteManager.manageOverwrites(this, masterList[this.target]); }; if ((this.target is Array)){ _local5 = ((this.vars.endArray) || ([])); _local4 = 0; while (_local4 < _local5.length) { if (((!((this.target[_local4] == _local5[_local4]))) && (!((this.target[_local4] == undefined))))){ this.tweens[this.tweens.length] = [this.target, _local4.toString(), this.target[_local4], (_local5[_local4] - this.target[_local4]), _local4.toString()]; }; _local4++; }; } else { if (((((!((typeof(_specialVars.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (this.target.hasOwnProperty("transform")))){ _local6 = this.target.transform.colorTransform; _local7 = new ColorTransform(); if (_specialVars.alpha != undefined){ _local7.alphaMultiplier = _specialVars.alpha; delete _specialVars.alpha; } else { _local7.alphaMultiplier = this.target.alpha; }; if (((!((this.vars.removeTint == true))) && (((((!((_specialVars.tint == null))) && (!((_specialVars.tint == ""))))) || ((_specialVars.tint == 0)))))){ _local7.color = _specialVars.tint; }; addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local6, endColor:_local7}); }; if (((!((_specialVars.frame == null))) && (_isDisplayObject))){ addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:_specialVars.frame}, {target:this.target}); }; if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){ addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target}); }; if (((!((_specialVars.visible == null))) && (_isDisplayObject))){ addSubTween("visible", visibleProxy, {}, {}, {tween:this}); }; for (_local3 in _specialVars) { if ((((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "autoOverwrite")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){ } else { if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){ if (typeof(_specialVars[_local3]) == "number"){ this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], (_specialVars[_local3] - this.target[_local3]), _local3]; } else { this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], Number(_specialVars[_local3]), _local3]; }; }; }; }; }; if (this.vars.runBackwards == true){ _local4 = (this.tweens.length - 1); while (_local4 > -1) { _local8 = this.tweens[_local4]; _local8[2] = (_local8[2] + _local8[3]); _local8[3] = (_local8[3] * -1); _local4--; }; }; if (this.vars.onUpdate != null){ _hasUpdate = true; }; this.initted = true; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } public function killVars(_arg1:Object):void{ if (overwriteManager.enabled){ overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, []); }; } public function get enabled():Boolean{ return ((this.gc) ? false : true); } public function complete(_arg1:Boolean=false):void{ if (!_arg1){ if (!this.initted){ initTweenVals(); }; this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale)); render(currentTime); return; }; if (this.vars.persist != true){ this.enabled = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } public static function frameProxy(_arg1:Object, _arg2:Number=0):void{ _arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame)); } public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{ if (_arg1 != null){ if (_arg2){ _arg1.clear(); }; _arg1.enabled = false; }; } public static function visibleProxy(_arg1:Object, _arg2:Number):void{ var _local3:TweenLite; _local3 = _arg1.info.tween; if (_local3.duration == _arg2){ if (((!((_local3.vars.runBackwards == true))) && ((_local3.ease == _local3.vars.ease)))){ _local3.target.visible = _local3.vars.visible; }; } else { if (_local3.target.visible != true){ _local3.target.visible = true; }; }; } public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{ var _local3:Array; var _local4:int; var _local5:TweenLite; if (((!((_arg1 == null))) && (!((masterList[_arg1] == undefined))))){ _local3 = masterList[_arg1]; _local4 = (_local3.length - 1); while (_local4 > -1) { _local5 = _local3[_local4]; if (((_arg2) && (!(_local5.gc)))){ _local5.complete(false); }; _local5.clear(); _local4--; }; delete masterList[_arg1]; }; } public static function updateAll(_arg1:Event=null):void{ var _local2:uint; var _local3:Dictionary; var _local4:Array; var _local5:int; var _local6:TweenLite; _local2 = (currentTime = getTimer()); _local3 = masterList; for each (_local4 in _local3) { _local5 = (_local4.length - 1); while (_local5 > -1) { _local6 = _local4[_local5]; if (_local6 == null){ } else { if (_local6.active){ _local6.render(_local2); } else { if (_local6.gc){ _local4.splice(_local5, 1); } else { if (_local2 >= _local6.startTime){ _local6.activate(); _local6.render(_local2); }; }; }; }; _local5--; }; }; } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0})); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; return (new TweenLite(_arg1, _arg2, _arg3)); } public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function tintProxy(_arg1:Object, _arg2:Number=0):void{ var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; _local3 = _arg1.target.progress; _local4 = (1 - _local3); _local5 = _arg1.info.color; _local6 = _arg1.info.endColor; _arg1.info.target.transform.colorTransform = new ColorTransform(((_local5.redMultiplier * _local4) + (_local6.redMultiplier * _local3)), ((_local5.greenMultiplier * _local4) + (_local6.greenMultiplier * _local3)), ((_local5.blueMultiplier * _local4) + (_local6.blueMultiplier * _local3)), ((_local5.alphaMultiplier * _local4) + (_local6.alphaMultiplier * _local3)), ((_local5.redOffset * _local4) + (_local6.redOffset * _local3)), ((_local5.greenOffset * _local4) + (_local6.greenOffset * _local3)), ((_local5.blueOffset * _local4) + (_local6.blueOffset * _local3)), ((_local5.alphaOffset * _local4) + (_local6.alphaOffset * _local3))); } public static function volumeProxy(_arg1:Object, _arg2:Number=0):void{ _arg1.info.target.soundTransform = _arg1.target; } protected static function killGarbage(_arg1:TimerEvent):void{ var _local2:Dictionary; var _local3:Object; var _local4:Array; _local2 = masterList; for (_local3 in _local2) { if (_local2[_local3].length == 0){ delete _local2[_local3]; }; }; } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } } }//package gs
Section 25
//TweenMax (gs.TweenMax) package gs { import flash.events.*; import flash.utils.*; import gs.events.*; public class TweenMax extends TweenFilterLite implements IEventDispatcher { protected var _dispatcher:EventDispatcher; protected var _callbacks:Object; protected var _repeatCount:Number; public var pauseTime:Number; protected static const _RAD2DEG:Number = 57.2957795130823; public static var removeTween:Function = TweenLite.removeTween; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(); ; protected static var _pausedTweens:Dictionary = new Dictionary(false); public static var setGlobalTimeScale:Function = TweenFilterLite.setGlobalTimeScale; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var version:Number = 3.6; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){ super(_arg1, _arg2, _arg3); if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); if ((((_arg2 == 0)) && ((this.delay == 0)))){ onUpdateDispatcher(); onCompleteDispatcher(); }; }; _repeatCount = 0; if (((!(isNaN(this.vars.yoyo))) || (!(isNaN(this.vars.loop))))){ this.vars.persist = true; }; if (TweenFilterLite.version < 9.3){ trace("TweenMax error! Please update your TweenFilterLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com."); }; } public function restart(_arg1:Boolean=false):void{ if (_arg1){ this.initTime = currentTime; this.startTime = (currentTime + (this.delay * (1000 / this.combinedTimeScale))); } else { this.startTime = currentTime; this.initTime = (currentTime - (this.delay * (1000 / this.combinedTimeScale))); }; _repeatCount = 0; if (this.target != this.vars.onComplete){ render(this.startTime); }; this.pauseTime = NaN; _pausedTweens[this] = null; delete _pausedTweens[this]; this.enabled = true; } protected function adjustStartValues():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Object; var _local5:int; _local1 = this.progress; if (_local1 != 0){ _local2 = (1 / (1 - this.ease((_local1 * this.duration), 0, 1, this.duration))); _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local3 = (_local4[2] + _local4[3]); _local4[3] = ((_local3 - _local4[0][_local4[1]]) * _local2); _local4[2] = (_local3 - _local4[3]); _local5--; }; }; } public function resume():void{ this.enabled = true; if (!isNaN(this.pauseTime)){ this.initTime = (this.initTime + (currentTime - this.pauseTime)); this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale))); this.pauseTime = NaN; if (((!(this.started)) && ((currentTime >= this.startTime)))){ activate(); } else { this.active = this.started; }; _pausedTweens[this] = null; delete _pausedTweens[this]; }; } public function get paused():Boolean{ return (isNaN(this.pauseTime)); } public function killProperties(_arg1:Array):void{ var _local2:Object; var _local3:int; _local2 = {}; _local3 = (_arg1.length - 1); while (_local3 > -1) { if (this.vars[_arg1[_local3]] != null){ _local2[_arg1[_local3]] = 1; }; _local3--; }; killVars(_local2); } public function get progress():Number{ var _local1:Number; var _local2:Number; _local1 = (isNaN(this.pauseTime)) ? currentTime : this.pauseTime; _local2 = (((((_local1 - this.initTime) * 0.001) - (this.delay / this.combinedTimeScale)) / this.duration) * this.combinedTimeScale); if (_local2 > 1){ return (1); }; if (_local2 < 0){ return (0); }; return (_local2); } override public function complete(_arg1:Boolean=false):void{ if (((((!(isNaN(this.vars.yoyo))) && ((((_repeatCount < this.vars.yoyo)) || ((this.vars.yoyo == 0)))))) || (((!(isNaN(this.vars.loop))) && ((((_repeatCount < this.vars.loop)) || ((this.vars.loop == 0)))))))){ _repeatCount++; if (!isNaN(this.vars.yoyo)){ this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease; }; this.startTime = (_arg1) ? (this.startTime + (this.duration * (1000 / this.combinedTimeScale))) : currentTime; this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); } else { if (this.vars.persist == true){ super.complete(_arg1); pause(); return; }; }; super.complete(_arg1); } public function invalidate(_arg1:Boolean=true):void{ var _local2:Number; if (this.initted){ _local2 = this.progress; if (((!(_arg1)) && (!((_local2 == 0))))){ this.progress = 0; }; this.tweens = []; _subTweens = []; _specialVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars; initTweenVals(); _timeScale = ((this.vars.timeScale) || (1)); this.combinedTimeScale = (_timeScale * _globalTimeScale); this.delay = ((this.vars.delay) || (0)); if (isNaN(this.pauseTime)){ this.startTime = (this.initTime + ((this.delay * 1000) / this.combinedTimeScale)); }; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ if (_dispatcher != null){ this.vars.onStart = _callbacks.onStart; this.vars.onUpdate = _callbacks.onUpdate; this.vars.onComplete = _callbacks.onComplete; _dispatcher = null; }; initDispatcher(); }; if (_local2 != 0){ if (_arg1){ adjustStartValues(); } else { this.progress = _local2; }; }; }; } public function dispatchEvent(_arg1:Event):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.dispatchEvent(_arg1)); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher != null){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{ var _local4:Number; var _local5:Object; var _local6:int; var _local7:Object; var _local8:Array; var _local9:Array; _local4 = this.progress; if (((!((this.vars[_arg1] == undefined))) && (this.initted))){ if (((!(_arg3)) && (!((_local4 == 0))))){ _local6 = (this.tweens.length - 1); while (_local6 > -1) { if (this.tweens[_local6][4] == _arg1){ this.tweens[_local6][0][this.tweens[_local6][1]] = this.tweens[_local6][2]; }; _local6--; }; }; _local5 = {}; _local5[_arg1] = 1; killVars(_local5); }; this.vars[_arg1] = _arg2; if (this.initted){ _local7 = this.vars; _local8 = this.tweens; _local9 = _subTweens; this.vars = {}; this.tweens = []; _subTweens = []; this.vars[_arg1] = _arg2; initTweenVals(); if (((!((this.ease == reverseEase))) && ((_local7.ease is Function)))){ this.ease = _local7.ease; }; if (((_arg3) && (!((_local4 == 0))))){ adjustStartValues(); }; this.vars = _local7; this.tweens = _local8.concat(this.tweens); _subTweens = _local9.concat(_subTweens); }; } override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{ var _local3:String; var _local4:int; var _local5:Object; var _local6:Object; var _local7:Array; var _local8:Function; var _local9:Number; _arg2 = (_arg2 + " hexColors bezier bezierThrough shortRotation orientToBezier quaternions onCompleteAll onCompleteAllParams yoyo loop onCompleteListener onUpdateListener onStartListener "); if (((!(_arg1)) && (TweenLite.overwriteManager.enabled))){ TweenLite.overwriteManager.manageOverwrites(this, masterList[this.target]); }; _local8 = bezierProxy; if (this.vars.orientToBezier == true){ this.vars.orientToBezier = [["x", "y", "rotation", 0]]; _local8 = bezierProxy2; } else { if ((this.vars.orientToBezier is Array)){ _local8 = bezierProxy2; }; }; if (((!((this.vars.bezier == undefined))) && ((this.vars.bezier is Array)))){ _local6 = {}; _local7 = this.vars.bezier; _local4 = 0; while (_local4 < _local7.length) { for (_local3 in _local7[_local4]) { if (_local6[_local3] == undefined){ _local6[_local3] = [this.target[_local3]]; }; if (typeof(_local7[_local4][_local3]) == "number"){ _local6[_local3].push(_local7[_local4][_local3]); } else { _local6[_local3].push((this.target[_local3] + Number(_local7[_local4][_local3]))); }; }; _local4++; }; for (_local3 in _local6) { if (typeof(this.vars[_local3]) == "number"){ _local6[_local3].push(this.vars[_local3]); } else { _local6[_local3].push((this.target[_local3] + Number(this.vars[_local3]))); }; delete this.vars[_local3]; }; addSubTween("bezier", _local8, {t:0}, {t:1}, {props:parseBeziers(_local6, false), target:this.target, orientToBezier:this.vars.orientToBezier}); }; if (((!((this.vars.bezierThrough == undefined))) && ((this.vars.bezierThrough is Array)))){ _local6 = {}; _local7 = this.vars.bezierThrough; _local4 = 0; while (_local4 < _local7.length) { for (_local3 in _local7[_local4]) { if (_local6[_local3] == undefined){ _local6[_local3] = [this.target[_local3]]; }; if (typeof(_local7[_local4][_local3]) == "number"){ _local6[_local3].push(_local7[_local4][_local3]); } else { _local6[_local3].push((this.target[_local3] + Number(_local7[_local4][_local3]))); }; }; _local4++; }; for (_local3 in _local6) { if (typeof(this.vars[_local3]) == "number"){ _local6[_local3].push(this.vars[_local3]); } else { _local6[_local3].push((this.target[_local3] + Number(this.vars[_local3]))); }; delete this.vars[_local3]; }; addSubTween("bezierThrough", _local8, {t:0}, {t:1}, {props:parseBeziers(_local6, true), target:this.target, orientToBezier:this.vars.orientToBezier}); }; if (!isNaN(this.vars.shortRotation)){ _local9 = ((this.vars.shortRotation - this.target.rotation) % 360); if (((this.vars.shortRotation - this.target.rotation) % 360) != (_local9 % 180)){ _local9 = ((_local9)<0) ? (_local9 + 360) : (_local9 - 360); }; this.tweens[this.tweens.length] = [this.target, "rotation", this.target.rotation, _local9, "rotation"]; }; if (((!((this.vars.hexColors == undefined))) && ((typeof(this.vars.hexColors) == "object")))){ for (_local3 in this.vars.hexColors) { addSubTween("hexColors", hexColorsProxy, {r:(this.target[_local3] >> 16), g:((this.target[_local3] >> 8) & 0xFF), b:(this.target[_local3] & 0xFF)}, {r:(this.vars.hexColors[_local3] >> 16), g:((this.vars.hexColors[_local3] >> 8) & 0xFF), b:(this.vars.hexColors[_local3] & 0xFF)}, {prop:_local3, target:this.target}); }; }; super.initTweenVals(true, _arg2); } public function set progress(_arg1:Number):void{ this.startTime = (currentTime - ((this.duration * _arg1) * 1000)); this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); if (!this.started){ activate(); }; render(currentTime); if (!isNaN(this.pauseTime)){ this.pauseTime = currentTime; this.startTime = 999999999999999; this.active = false; }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if ((((_arg1 == TweenEvent.UPDATE)) && (!((this.vars.onUpdate == onUpdateDispatcher))))){ this.vars.onUpdate = onUpdateDispatcher; _hasUpdate = true; }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } protected function onUpdateDispatcher(... _args):void{ if (_callbacks.onUpdate != null){ _callbacks.onUpdate.apply(null, this.vars.onUpdateParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); } public function set paused(_arg1:Boolean):void{ if (_arg1){ pause(); } else { resume(); }; } override public function set enabled(_arg1:Boolean):void{ if (!_arg1){ _pausedTweens[this] = null; delete _pausedTweens[this]; }; super.enabled = _arg1; } public function willTrigger(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.willTrigger(_arg1)); } public function set reversed(_arg1:Boolean):void{ if (this.reversed != _arg1){ reverse(); }; } public function get reversed():Boolean{ return ((this.ease == reverseEase)); } protected function onStartDispatcher(... _args):void{ if (_callbacks.onStart != null){ _callbacks.onStart.apply(null, this.vars.onStartParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); } protected function initDispatcher():void{ var _local1:Object; var _local2:String; if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); _callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete}; if (this.vars.isTV == true){ this.vars = this.vars.clone(); } else { _local1 = {}; for (_local2 in this.vars) { _local1[_local2] = this.vars[_local2]; }; this.vars = _local1; }; this.vars.onStart = onStartDispatcher; this.vars.onComplete = onCompleteDispatcher; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); this.vars.onUpdate = onUpdateDispatcher; _hasUpdate = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; }; } public function reverse(_arg1:Boolean=true, _arg2:Boolean=true):void{ var _local3:Number; this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease; _local3 = this.progress; if (((_arg1) && ((_local3 > 0)))){ this.startTime = (currentTime - ((((1 - _local3) * this.duration) * 1000) / this.combinedTimeScale)); this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); }; if (_arg2 != false){ if (_local3 < 1){ resume(); } else { restart(); }; }; } public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.ease((_arg4 - _arg1), _arg2, _arg3, _arg4)); } public function hasEventListener(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.hasEventListener(_arg1)); } public function pause():void{ if (isNaN(this.pauseTime)){ this.pauseTime = currentTime; this.startTime = 999999999999999; this.enabled = false; _pausedTweens[this] = this; }; } protected function onCompleteDispatcher(... _args):void{ if (_callbacks.onComplete != null){ _callbacks.onComplete.apply(null, this.vars.onCompleteParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); } public static function sequence(_arg1:Object, _arg2:Array):Array{ var _local3:uint; _local3 = 0; while (_local3 < _arg2.length) { _arg2[_local3].target = _arg1; _local3++; }; return (multiSequence(_arg2)); } public static function bezierProxy(_arg1:Object, _arg2:Number=0):void{ var _local3:Number; var _local4:Object; var _local5:Object; var _local6:int; var _local7:String; var _local8:Object; var _local9:Number; var _local10:uint; _local3 = _arg1.target.t; _local4 = _arg1.info.props; _local5 = _arg1.info.target; if (_local3 == 1){ for (_local7 in _local4) { _local6 = (_local4[_local7].length - 1); _local5[_local7] = _local4[_local7][_local6][2]; }; } else { for (_local7 in _local4) { _local10 = _local4[_local7].length; if (_local3 < 0){ _local6 = 0; } else { if (_local3 >= 1){ _local6 = (_local10 - 1); } else { _local6 = int((_local10 * _local3)); }; }; _local9 = ((_local3 - (_local6 * (1 / _local10))) * _local10); _local8 = _local4[_local7][_local6]; _local5[_local7] = (_local8[0] + (_local9 * (((2 * (1 - _local9)) * (_local8[1] - _local8[0])) + (_local9 * (_local8[2] - _local8[0]))))); }; }; } public static function hexColorsProxy(_arg1:Object, _arg2:Number=0):void{ _arg1.info.target[_arg1.info.prop] = uint((((_arg1.target.r << 16) | (_arg1.target.g << 8)) | _arg1.target.b)); } public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{ var _local3:int; var _local4:Array; var _local5:Object; var _local6:String; var _local7:Object; _local7 = {}; if (_arg2){ for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 2){ _local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]]; _local3 = 1; while (_local3 < (_local4.length - 1)) { _local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]]; _local3++; }; } else { _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; } else { for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 3){ _local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)]; _local3 = 2; while (_local3 < (_local4.length - 2)) { _local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)]; _local3++; }; _local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]]; } else { if (_local4.length == 3){ _local5[_local5.length] = [_local4[0], _local4[1], _local4[2]]; } else { if (_local4.length == 2){ _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; }; }; }; return (_local7); } public static function bezierProxy2(_arg1:Object, _arg2:Number=0):void{ var _local3:Object; var _local4:Object; var _local5:Array; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Array; var _local10:Number; var _local11:uint; bezierProxy(_arg1, _arg2); _local3 = {}; _local4 = _arg1.info.target; _arg1.info.target = _local3; _arg1.target.t = (_arg1.target.t + 0.01); bezierProxy(_arg1); _local5 = _arg1.info.orientToBezier; _local11 = 0; while (_local11 < _local5.length) { _local9 = _local5[_local11]; _local10 = ((_local9[3]) || (0)); _local7 = (_local3[_local9[0]] - _local4[_local9[0]]); _local8 = (_local3[_local9[1]] - _local4[_local9[1]]); _local4[_local9[2]] = ((Math.atan2(_local8, _local7) * _RAD2DEG) + _local10); _local11++; }; _arg1.info.target = _local4; _arg1.target.t = (_arg1.target.t - 0.01); } public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(true, _arg1, _arg2); } public static function set globalTimeScale(_arg1:Number):void{ setGlobalTimeScale(_arg1); } public static function get globalTimeScale():Number{ return (_globalTimeScale); } public static function killAllDelayedCalls(_arg1:Boolean=false):void{ killAll(_arg1, false, true); } public static function multiSequence(_arg1:Array):Array{ var _local2:Dictionary; var _local3:Array; var _local4:int; var _local5:Number; var _local6:Object; var _local7:Object; var _local8:Number; var _local9:Number; var _local10:uint; var _local11:Object; var _local12:String; trace("WARNING: TweenMax.multiSequence() and TweenMax.sequence() have been deprecated in favor of the much more powerful and flexible TweenGroup class. See http://blog.greensock.com/tweengroup/ for more details. Future versions of TweenMax may not include sequence() and multiSequence() (to conserve file size)."); _local2 = new Dictionary(); _local3 = []; _local4 = TweenLite.overwriteManager.mode; _local5 = 0; _local10 = 0; while (_local10 < _arg1.length) { _local6 = _arg1[_local10]; _local9 = ((_local6.time) || (0)); _local11 = {}; for (_local12 in _local6) { _local11[_local12] = _local6[_local12]; }; delete _local11.time; _local8 = ((_local11.delay) || (0)); _local11.delay = (_local5 + _local8); _local7 = _local11.target; delete _local11.target; if (_local4 == 1){ if (_local2[_local7] == undefined){ _local2[_local7] = _local11; } else { _local11.overwrite = 2; }; }; _local3[_local3.length] = new TweenMax(_local7, _local9, _local11); _local5 = (_local5 + (_local9 + _local8)); _local10++; }; return (_local3); } public static function getTweensOf(_arg1:Object):Array{ var _local2:Array; var _local3:Array; var _local4:TweenLite; var _local5:int; _local2 = masterList[_arg1]; _local3 = []; if (_local2 != null){ _local5 = (_local2.length - 1); while (_local5 > -1) { if (!_local2[_local5].gc){ _local3[_local3.length] = _local2[_local5]; }; _local5--; }; }; for each (_local4 in _pausedTweens) { if (_local4.target == _arg1){ _local3[_local3.length] = _local4; }; }; return (_local3); } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{ return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, persist:_arg4, overwrite:0})); } public static function isTweening(_arg1:Object):Boolean{ var _local2:Array; var _local3:int; _local2 = getTweensOf(_arg1); _local3 = (_local2.length - 1); while (_local3 > -1) { if (((_local2[_local3].active) && (!(_local2[_local3].gc)))){ return (true); }; _local3--; }; return (false); } public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local4:Array; var _local5:Boolean; var _local6:int; _local4 = getAllTweens(); _local6 = (_local4.length - 1); while (_local6 > -1) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){ if (_arg1){ _local4[_local6].complete(false); _local4[_local6].clear(); } else { TweenLite.removeTween(_local4[_local6], true); }; }; _local6--; }; } public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{ var _local4:Array; var _local5:Boolean; var _local6:int; _local4 = getAllTweens(); _local6 = (_local4.length - 1); while (_local6 > -1) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local4[_local6] is TweenMax)) && ((((_local5 == _arg3)) || (!((_local5 == _arg2))))))){ _local4[_local6].paused = _arg1; }; _local6--; }; } public static function callbackProxy(_arg1:Array, _arg2:Array=null):void{ var _local3:uint; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3] != undefined){ _arg1[_local3].apply(null, _arg2[_local3]); }; _local3++; }; } public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object):Array{ _arg3.runBackwards = true; return (allTo(_arg1, _arg2, _arg3)); } public static function killAllTweens(_arg1:Boolean=false):void{ killAll(_arg1, true, false); } public static function getAllTweens():Array{ var _local1:Dictionary; var _local2:Array; var _local3:Array; var _local4:int; var _local5:TweenLite; _local1 = masterList; _local2 = []; for each (_local3 in _local1) { _local4 = (_local3.length - 1); while (_local4 > -1) { if (!_local3[_local4].gc){ _local2[_local2.length] = _local3[_local4]; }; _local4--; }; }; for each (_local5 in _pausedTweens) { _local2[_local2.length] = _local5; }; return (_local2); } public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(false, _arg1, _arg2); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ _arg3.runBackwards = true; return (new TweenMax(_arg1, _arg2, _arg3)); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ return (new TweenMax(_arg1, _arg2, _arg3)); } public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object):Array{ var _local4:int; var _local5:Object; var _local6:String; var _local7:Number; var _local8:Object; var _local9:Array; var _local10:Number; trace("WARNING: TweenMax.allTo() and TweenMax.allFrom() have been deprecated in favor of the much more powerful and flexible TweenGroup class. See http://blog.greensock.com/tweengroup/ for more details. Future versions of TweenMax may not include allTo() and allFrom() (to conserve file size)."); if (_arg1.length == 0){ return ([]); }; _local9 = []; _local10 = ((_arg3.delayIncrement) || (0)); delete _arg3.delayIncrement; if (_arg3.onCompleteAll == undefined){ _local8 = _arg3; } else { _local8 = {}; for (_local6 in _arg3) { _local8[_local6] = _arg3[_local6]; }; _local8.onCompleteParams = [[_arg3.onComplete, _arg3.onCompleteAll], [_arg3.onCompleteParams, _arg3.onCompleteAllParams]]; _local8.onComplete = TweenMax.callbackProxy; delete _arg3.onCompleteAll; }; delete _arg3.onCompleteAllParams; if (_local10 == 0){ _local4 = 0; while (_local4 < (_arg1.length - 1)) { _local5 = {}; for (_local6 in _arg3) { _local5[_local6] = _arg3[_local6]; }; _local9[_local9.length] = new TweenMax(_arg1[_local4], _arg2, _local5); _local4++; }; } else { _local7 = ((_arg3.delay) || (0)); _local4 = 0; while (_local4 < (_arg1.length - 1)) { _local5 = {}; for (_local6 in _arg3) { _local5[_local6] = _arg3[_local6]; }; _local5.delay = (_local7 + (_local4 * _local10)); _local9[_local9.length] = new TweenMax(_arg1[_local4], _arg2, _local5); _local4++; }; _local8.delay = (_local7 + ((_arg1.length - 1) * _local10)); }; _local9[_local9.length] = new TweenMax(_arg1[(_arg1.length - 1)], _arg2, _local8); if ((_arg3.onCompleteAllListener is Function)){ _local9[(_local9.length - 1)].addEventListener(TweenEvent.COMPLETE, _arg3.onCompleteAllListener); }; return (_local9); } } }//package gs
Section 26
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function set value(_arg1:Number):void{ setValue(_arg1); } public function reencode():void{ var _local1:uint; _local1 = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function toString():String{ var _local1:String; _local1 = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function get value():Number{ return (Number(this.toString())); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String; _local3 = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 27
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var n:Number; var options = _arg1; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'")); } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite")); } else { if (Math.floor(n) != n){ trace((("WARNING: Submitted score '" + options.score) + "' will be truncated")); }; options.score = n; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal"); MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; _local2 = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ _arg1 = Number(_arg1); if (isNaN(_arg1)){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(_arg1) != _arg1){ trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated")); }; _arg1 = Number(_arg1); }; }; MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 28
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__ms_"; private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; public static var netup:Boolean = true; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local3:Array; var _local4:int; var _local5:Array; var _local6:Array; var _local7:MovieClip; var _local8:LocalConnection; var _local9:String; var _local10:ByteArray; var _local11:ByteArray; var _local12:uint; var _local13:uint; var _local14:Loader; _local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; _local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; _local6 = [0, 64, 0, 0, 0]; _local7 = new MovieClip(); _local8 = new LocalConnection(); _local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime())); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); _local10 = new ByteArray(); _local11 = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); _local12 = ((_local3.length + _local11.length) + 4); _local13 = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var vars:Object; var avm1Click:DisplayObject; var s:String; var i:Number; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; vars = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); s = "?"; i = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ var _local2:Rectangle; if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); _local2 = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _listenChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.0"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } public static function get id():String{ return (_id); } private static function urlOptions(_arg1:Object):Object{ var _local2:Object; var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; _local2 = {}; _local3 = _arg1.loaderInfo.parameters.mochiad_options; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var methodName:String; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = this.client._callbacks[cb]; if (!cblst){ return; }; method = cblst.callbackMethod; methodName = ""; obj = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; trace("connected!"); _connecting = false; _connected = true; while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var clipname:String; var f:Function; var req:URLRequest; var vars:URLVariables; var id = _arg1; var clip = _arg2; clipname = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servicesURL != undefined){ _servicesURL = urlOptions(clip).servicesURL; }; MochiServices.allowDomains(_servicesURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); f = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999)))); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); req = new URLRequest(_servicesURL); vars = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; if (widget){ vars.widget = true; }; req.data = vars; listen(); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function get clip():Object{ return (_container); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var mc:MovieClip; var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; mc = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 29
//AimLine (AimLine) package { import flash.display.*; import gs.*; public class AimLine extends MovieClip { public function AimLine():void{ } public function fade():void{ TweenMax.to(this, 2, {alpha:0, onComplete:deleteThis}); } public function deleteThis():void{ this.parent.removeChild(this); } } }//package
Section 30
//BounceSpot (BounceSpot) package { import flash.display.*; public dynamic class BounceSpot extends MovieClip { } }//package
Section 31
//BounceTekst (BounceTekst) package { import flash.display.*; public dynamic class BounceTekst extends MovieClip { } }//package
Section 32
//Button_disabledSkin (Button_disabledSkin) package { import flash.display.*; public dynamic class Button_disabledSkin extends MovieClip { } }//package
Section 33
//Button_downSkin (Button_downSkin) package { import flash.display.*; public dynamic class Button_downSkin extends MovieClip { } }//package
Section 34
//Button_emphasizedSkin (Button_emphasizedSkin) package { import flash.display.*; public dynamic class Button_emphasizedSkin extends MovieClip { } }//package
Section 35
//Button_overSkin (Button_overSkin) package { import flash.display.*; public dynamic class Button_overSkin extends MovieClip { } }//package
Section 36
//Button_selectedDisabledSkin (Button_selectedDisabledSkin) package { import flash.display.*; public dynamic class Button_selectedDisabledSkin extends MovieClip { } }//package
Section 37
//Button_selectedDownSkin (Button_selectedDownSkin) package { import flash.display.*; public dynamic class Button_selectedDownSkin extends MovieClip { } }//package
Section 38
//Button_selectedOverSkin (Button_selectedOverSkin) package { import flash.display.*; public dynamic class Button_selectedOverSkin extends MovieClip { } }//package
Section 39
//Button_selectedUpSkin (Button_selectedUpSkin) package { import flash.display.*; public dynamic class Button_selectedUpSkin extends MovieClip { } }//package
Section 40
//Button_upSkin (Button_upSkin) package { import flash.display.*; public dynamic class Button_upSkin extends MovieClip { } }//package
Section 41
//CheckBox_disabledIcon (CheckBox_disabledIcon) package { import flash.display.*; public dynamic class CheckBox_disabledIcon extends MovieClip { } }//package
Section 42
//CheckBox_downIcon (CheckBox_downIcon) package { import flash.display.*; public dynamic class CheckBox_downIcon extends MovieClip { } }//package
Section 43
//CheckBox_overIcon (CheckBox_overIcon) package { import flash.display.*; public dynamic class CheckBox_overIcon extends MovieClip { } }//package
Section 44
//CheckBox_selectedDisabledIcon (CheckBox_selectedDisabledIcon) package { import flash.display.*; public dynamic class CheckBox_selectedDisabledIcon extends MovieClip { } }//package
Section 45
//CheckBox_selectedDownIcon (CheckBox_selectedDownIcon) package { import flash.display.*; public dynamic class CheckBox_selectedDownIcon extends MovieClip { } }//package
Section 46
//CheckBox_selectedOverIcon (CheckBox_selectedOverIcon) package { import flash.display.*; public dynamic class CheckBox_selectedOverIcon extends MovieClip { } }//package
Section 47
//CheckBox_selectedUpIcon (CheckBox_selectedUpIcon) package { import flash.display.*; public dynamic class CheckBox_selectedUpIcon extends MovieClip { } }//package
Section 48
//CheckBox_upIcon (CheckBox_upIcon) package { import flash.display.*; public dynamic class CheckBox_upIcon extends MovieClip { } }//package
Section 49
//CheckPoint (CheckPoint) package { import flash.display.*; public class CheckPoint extends MovieClip { private var color:uint;// = 0 private var numParticles:uint; public function CheckPoint():void{ numParticles = (20 + Math.round((Math.random() * 10))); color = 0; super(); } public function hit(_arg1:Number, _arg2:Number, _arg3:Number):void{ var _local4:Number; var _local5:ImpactParticle; numParticles = (numParticles * _arg3); color = (Math.random() * 0xFFFFFF); _local4 = numParticles; while (_local4 > 0) { _local5 = new ImpactParticle(_arg1, _arg2, color); _local5.x = this.x; _local5.y = this.y; stage.addChild(_local5); _local4--; }; } public function getColor():uint{ return (color); } } }//package
Section 50
//Credits (Credits) package { import fl.controls.*; import flash.display.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.errors.*; import flash.ui.*; import adobe.utils.*; import flash.accessibility.*; import flash.external.*; import flash.printing.*; import flash.xml.*; public dynamic class Credits extends MovieClip { public var back_b:Button; public function Credits(){ addFrameScript(0, frame1); __setProp_back_b_Credits_Base_1(); } function __setProp_back_b_Credits_Base_1(){ try { back_b["componentInspectorSetting"] = true; } catch(e:Error) { }; back_b.emphasized = false; back_b.enabled = true; back_b.label = "back"; back_b.labelPlacement = "right"; back_b.selected = false; back_b.toggle = false; back_b.visible = true; try { back_b["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function exitClick(_arg1:MouseEvent):void{ MovieClip(this.parent).removeCredits(); } function frame1(){ back_b.addEventListener(MouseEvent.CLICK, exitClick); } } }//package
Section 51
//DragBall (DragBall) package { import flash.display.*; public class DragBall extends MovieClip { public var hitCircle:MovieClip; public var lineBoolean;// = false private var numParticles:uint; public function DragBall():void{ numParticles = (40 + Math.round((Math.random() * 10))); lineBoolean = false; super(); } public function destroy():void{ } public function showAim():void{ } public function drag():void{ } public function hit(_arg1:Number):void{ var _local2:uint; var _local3:Number; var _local4:ImpactParticle; numParticles = (numParticles * _arg1); _local2 = (Math.random() * 0xFFFFFF); _local3 = numParticles; while (_local3 > 0) { _local4 = new ImpactParticle(0, 0, _local2); _local4.x = this.x; _local4.y = this.y; stage.addChild(_local4); _local3--; }; } } }//package
Section 52
//Enemy (Enemy) package { import flash.display.*; public dynamic class Enemy extends MovieClip { public var hitCircle:MovieClip; public var warning:MovieClip; } }//package
Section 53
//Finish (Finish) package { import flash.display.*; public class Finish extends MovieClip { private var color:uint; private var numParticles:uint; public function Finish():void{ numParticles = (40 + Math.round((Math.random() * 20))); color = (Math.random() * 0xFFFFFF); super(); } public function hit(_arg1:uint, _arg2:Number):void{ var _local3:Number; var _local4:ImpactParticle; numParticles = (numParticles * _arg2); _local3 = numParticles; while (_local3 > 0) { _local4 = new ImpactParticle(Math.random(), Math.random(), color); _local4.x = this.x; _local4.y = this.y; stage.addChild(_local4); if ((_local3 % 20) == 0){ color = (Math.random() * 0xFFFFFF); }; _local3--; }; } } }//package
Section 54
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 55
//FPSCounter (FPSCounter) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.text.*; public class FPSCounter extends Sprite { private var ticks:uint;// = 0 private var tf:TextField; private var last:uint; public function FPSCounter(_arg1:int=0, _arg2:int=0, _arg3:uint=0, _arg4:Boolean=false, _arg5:uint=0){ last = getTimer(); ticks = 0; super(); x = _arg1; y = _arg2; tf = new TextField(); tf.textColor = _arg3; tf.text = "----- fps"; tf.selectable = false; tf.background = _arg4; tf.backgroundColor = _arg5; tf.autoSize = TextFieldAutoSize.LEFT; addChild(tf); width = tf.textWidth; height = tf.textHeight; addEventListener(Event.ENTER_FRAME, tick); } public function tick(_arg1:Event):void{ var _local2:uint; var _local3:uint; var _local4:Number; ticks++; _local2 = getTimer(); _local3 = (_local2 - last); if (_local3 >= 1000){ _local4 = ((ticks / _local3) * 1000); tf.text = (_local4.toFixed(1) + " fps"); ticks = 0; last = _local2; }; } } }//package
Section 56
//HoekTest (HoekTest) package { import flash.display.*; public dynamic class HoekTest extends MovieClip { } }//package
Section 57
//ImpactParticle (ImpactParticle) package { import flash.display.*; import flash.events.*; import gs.*; public class ImpactParticle extends MovieClip { private var size:Number; private var count:Number; private var ay:Number; private var ax:Number; private var maxNum:int; private var grav:Number; private var radius:Number; private var vx:Number; private var vy:Number; public function ImpactParticle(_arg1:Number, _arg2:Number, _arg3:uint):void{ size = ((Math.random() * 4) + 2); maxNum = (150 - Math.round((Math.random() * 100))); super(); graphics.beginFill(_arg3); graphics.drawCircle(0, 0, size); graphics.endFill(); ay = ((Math.random() * 3) - (Math.random() * 3)); ax = ((Math.random() * 3) - (Math.random() * 3)); vx = ((_arg1 / 2) * Math.random()); vy = ((_arg2 / 2) * Math.random()); grav = 0.98; count = 0; this.alpha = (0.55 - (Math.random() / 2)); radius = (this.width / 2); addEventListener(Event.ENTER_FRAME, particleLoop); } private function particleLoop(_arg1:Event):void{ this.x = (this.x + ax); this.y = (this.y + ay); ax = (ax * grav); ay = (ay * grav); this.x = (this.x + vx); this.y = (this.y + vy); count++; if ((((((((((count == maxNum)) || (((this.x - radius) > 700)))) || (((this.x + radius) < 0)))) || (((this.y - radius) > 400)))) || (((this.y + radius) < 0)))){ fade(); }; } private function fade():void{ TweenMax.to(this, 1, {alpha:0, onComplete:remove}); } private function remove():void{ if (this.parent != null){ removeEventListener(Event.ENTER_FRAME, particleLoop); this.parent.removeChild(this); }; } } }//package
Section 58
//ImpactParticle2 (ImpactParticle2) package { import flash.display.*; import flash.events.*; import gs.*; public class ImpactParticle2 extends MovieClip { private var size:Number; private var count:Number; private var ay:Number; private var ax:Number; private var maxNum:int; private var grav:Number; private var radius:Number; private var vx:Number; private var vy:Number; public function ImpactParticle2(_arg1:Number, _arg2:Number, _arg3:uint):void{ size = ((Math.random() * 4) + 2); maxNum = (75 - Math.round((Math.random() * 50))); super(); graphics.beginFill(_arg3); graphics.drawCircle(0, 0, size); graphics.endFill(); ay = ((Math.random() * 3) - (Math.random() * 3)); ax = ((Math.random() * 3) - (Math.random() * 3)); vx = ((_arg1 / 2) * Math.random()); vy = ((_arg2 / 2) * Math.random()); grav = 0.98; count = 0; this.alpha = (0.55 - (Math.random() / 2)); radius = (this.width / 2); addEventListener(Event.ENTER_FRAME, particleLoop); } private function particleLoop(_arg1:Event):void{ this.x = (this.x + ax); this.y = (this.y + ay); ax = (ax * grav); ay = (ay * grav); this.x = (this.x + vx); this.y = (this.y + vy); count++; if ((((((((((count == maxNum)) || (((this.x - radius) > 700)))) || (((this.x + radius) < 0)))) || (((this.y - radius) > 400)))) || (((this.y + radius) < 0)))){ fade(); }; } private function fade():void{ TweenMax.to(this, 1, {alpha:0, onComplete:remove}); } private function remove():void{ if (this.parent != null){ removeEventListener(Event.ENTER_FRAME, particleLoop); this.parent.removeChild(this); }; } } }//package
Section 59
//MainMenuScreen (MainMenuScreen) package { import fl.controls.*; import flash.display.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.errors.*; import flash.ui.*; import adobe.utils.*; import flash.accessibility.*; import flash.external.*; import flash.printing.*; import flash.xml.*; public dynamic class MainMenuScreen extends MovieClip { public var menu_Lower:RadioButton; public var SFX_b:CheckBox; public var back_b:Button; public var sound_b:CheckBox; public var menu_Low:RadioButton; public var menuStatus_txt:TextField; public var menu_High:RadioButton; public var menu_Normal:RadioButton; public function MainMenuScreen(){ addFrameScript(0, frame1); __setProp_sound_b_MainMenuScreen_Base_1(); __setProp_SFX_b_MainMenuScreen_Base_1(); __setProp_menu_Lower_MainMenuScreen_Base_1(); __setProp_menu_High_MainMenuScreen_Base_1(); __setProp_menu_Normal_MainMenuScreen_Base_1(); __setProp_menu_Low_MainMenuScreen_Base_1(); __setProp_back_b_MainMenuScreen_Base_1(); } public function highClick(_arg1:MouseEvent):void{ MovieClip(this.parent).qualitySet = 2; } public function lowerClick(_arg1:MouseEvent):void{ MovieClip(this.parent).qualitySet = 0.5; } function __setProp_back_b_MainMenuScreen_Base_1(){ try { back_b["componentInspectorSetting"] = true; } catch(e:Error) { }; back_b.emphasized = false; back_b.enabled = true; back_b.label = "back"; back_b.labelPlacement = "right"; back_b.selected = false; back_b.toggle = false; back_b.visible = true; try { back_b["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function soundInGameMenu(_arg1:MouseEvent):void{ if (sound_b.selected == true){ MovieClip(this.parent).playMusicMenu(); } else { MovieClip(this.parent).stopMusicMenu(); }; } public function exitClick(_arg1:MouseEvent):void{ MovieClip(this.parent).removeMainMenu(); } public function onMouseOutInGameMenu(_arg1:MouseEvent):void{ menuStatus_txt.text = ""; } public function onMouseOverInGameMenu(_arg1:MouseEvent):void{ if (_arg1.target == menu_Low){ menuStatus_txt.text = "No particles (recommended for older computers)"; }; if (_arg1.target == menu_Lower){ menuStatus_txt.text = "Small amount of particles (recommended for older computers)"; }; if (_arg1.target == menu_Normal){ menuStatus_txt.text = "Normal amount of particles"; }; if (_arg1.target == menu_High){ menuStatus_txt.text = "Large amount of particles (cpu intensive)"; }; if (_arg1.target == SFX_b){ menuStatus_txt.text = "Toggles soundeffects"; }; if (_arg1.target == sound_b){ menuStatus_txt.text = "Toggles music"; }; } function __setProp_SFX_b_MainMenuScreen_Base_1(){ try { SFX_b["componentInspectorSetting"] = true; } catch(e:Error) { }; SFX_b.enabled = true; SFX_b.label = "soundeffects"; SFX_b.labelPlacement = "right"; SFX_b.selected = true; SFX_b.visible = true; try { SFX_b["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_menu_Low_MainMenuScreen_Base_1(){ try { menu_Low["componentInspectorSetting"] = true; } catch(e:Error) { }; menu_Low.enabled = true; menu_Low.groupName = "Kwaliteit"; menu_Low.label = "lowest"; menu_Low.labelPlacement = "right"; menu_Low.selected = false; menu_Low.value = ""; menu_Low.visible = true; try { menu_Low["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_menu_High_MainMenuScreen_Base_1(){ try { menu_High["componentInspectorSetting"] = true; } catch(e:Error) { }; menu_High.enabled = true; menu_High.groupName = "Kwaliteit"; menu_High.label = "high"; menu_High.labelPlacement = "right"; menu_High.selected = false; menu_High.value = ""; menu_High.visible = true; try { menu_High["componentInspectorSetting"] = false; } catch(e:Error) { }; } function frame1(){ menu_Low.addEventListener(MouseEvent.CLICK, lowClick); menu_Lower.addEventListener(MouseEvent.CLICK, lowerClick); menu_Normal.addEventListener(MouseEvent.CLICK, normalClick); menu_High.addEventListener(MouseEvent.CLICK, highClick); back_b.addEventListener(MouseEvent.CLICK, exitClick); addEventListener(MouseEvent.MOUSE_OVER, onMouseOverInGameMenu); addEventListener(MouseEvent.MOUSE_OUT, onMouseOutInGameMenu); SFX_b.addEventListener(MouseEvent.CLICK, muteInGameMenu); sound_b.addEventListener(MouseEvent.CLICK, soundInGameMenu); } function __setProp_sound_b_MainMenuScreen_Base_1(){ try { sound_b["componentInspectorSetting"] = true; } catch(e:Error) { }; sound_b.enabled = true; sound_b.label = "music"; sound_b.labelPlacement = "right"; sound_b.selected = true; sound_b.visible = true; try { sound_b["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function lowClick(_arg1:MouseEvent):void{ MovieClip(this.parent).qualitySet = 0; } public function muteInGameMenu(_arg1:MouseEvent):void{ if (SFX_b.selected == true){ MovieClip(this.parent).muteSFX = false; } else { MovieClip(this.parent).muteSFX = true; }; } function __setProp_menu_Normal_MainMenuScreen_Base_1(){ try { menu_Normal["componentInspectorSetting"] = true; } catch(e:Error) { }; menu_Normal.enabled = true; menu_Normal.groupName = "Kwaliteit"; menu_Normal.label = "normal"; menu_Normal.labelPlacement = "right"; menu_Normal.selected = false; menu_Normal.value = ""; menu_Normal.visible = true; try { menu_Normal["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function checkSelected():void{ if (MovieClip(this.parent).qualitySet == 0){ menu_Low.selected = true; } else { if (MovieClip(this.parent).qualitySet == 1){ menu_Normal.selected = true; } else { if (MovieClip(this.parent).qualitySet == 0.5){ menu_Lower.selected = true; } else { menu_High.selected = true; }; }; }; if (MovieClip(this.parent).muteSFX == true){ SFX_b.selected = false; } else { SFX_b.selected = true; }; if (MovieClip(this.parent).muteMusic == true){ sound_b.selected = false; } else { sound_b.selected = true; }; } public function removeText():void{ menuStatus_txt.text = ""; } function __setProp_menu_Lower_MainMenuScreen_Base_1(){ try { menu_Lower["componentInspectorSetting"] = true; } catch(e:Error) { }; menu_Lower.enabled = true; menu_Lower.groupName = "Kwaliteit"; menu_Lower.label = "lower"; menu_Lower.labelPlacement = "right"; menu_Lower.selected = false; menu_Lower.value = ""; menu_Lower.visible = true; try { menu_Lower["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function normalClick(_arg1:MouseEvent):void{ MovieClip(this.parent).qualitySet = 1; } } }//package
Section 60
//MaxCircle (MaxCircle) package { import flash.display.*; public class MaxCircle extends MovieClip { public function MaxCircle():void{ } } }//package
Section 61
//MenuBall (MenuBall) package { import flash.display.*; public class MenuBall extends MovieClip { public var mass:Number;// = 1 private var color:uint; public var radius:Number; public var vx:Number; public var vy:Number; public function MenuBall(_arg1:Number=25, _arg2:uint=0xFF0000){ mass = 1; super(); this.radius = _arg1; if ((((this.currentFrame == 4)) || ((this.currentFrame == 5)))){ this.radius = 25; }; this.color = _arg2; if (this.color == 0xFF0000){ }; vx = ((Math.random() * 2) - (Math.random() * 2)); vy = ((Math.random() * 2) - (Math.random() * 2)); init(); this.buttonMode = true; this.useHandCursor = true; } public function init():void{ } } }//package
Section 62
//MenuScreen (MenuScreen) package { import fl.controls.*; import flash.display.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.errors.*; import flash.ui.*; import adobe.utils.*; import flash.accessibility.*; import flash.external.*; import flash.printing.*; import flash.xml.*; public dynamic class MenuScreen extends MovieClip { public var menu_Lower:RadioButton; public var SFX_b:CheckBox; public var exitGame_b:Button; public var back_b:Button; public var sound_b:CheckBox; public var menu_Low:RadioButton; public var menuStatus_txt:TextField; public var resetsbounces_txt:TextField; public var menu_High:RadioButton; public var menu_Normal:RadioButton; public function MenuScreen(){ addFrameScript(0, frame1); __setProp_sound_b_MenuScreen_Base_1(); __setProp_SFX_b_MenuScreen_Base_1(); __setProp_menu_Lower_MenuScreen_Base_1(); __setProp_menu_Low_MenuScreen_Base_1(); __setProp_menu_High_MenuScreen_Base_1(); __setProp_menu_Normal_MenuScreen_Base_1(); __setProp_back_b_MenuScreen_Base_1(); __setProp_exitGame_b_MenuScreen_Base_1(); } public function highClick(_arg1:MouseEvent):void{ MovieClip(this.parent).qualitySet = 2; } public function lowerClick(_arg1:MouseEvent):void{ MovieClip(this.parent).qualitySet = 0.5; } public function soundInGameMenu(_arg1:MouseEvent):void{ if (sound_b.selected == true){ MovieClip(this.parent).playMusic(); } else { MovieClip(this.parent).stopMusic(); }; } public function exitClick(_arg1:MouseEvent):void{ MovieClip(this.parent).goToMenu(); } public function onMouseOutInGameMenu(_arg1:MouseEvent):void{ menuStatus_txt.text = ""; } function __setProp_menu_Normal_MenuScreen_Base_1(){ try { menu_Normal["componentInspectorSetting"] = true; } catch(e:Error) { }; menu_Normal.enabled = true; menu_Normal.groupName = "Kwaliteit"; menu_Normal.label = "normal"; menu_Normal.labelPlacement = "right"; menu_Normal.selected = false; menu_Normal.value = ""; menu_Normal.visible = true; try { menu_Normal["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function onMouseOverInGameMenu(_arg1:MouseEvent):void{ if (_arg1.target == menu_Low){ menuStatus_txt.text = "no particles (recommended for older computers)"; }; if (_arg1.target == menu_Lower){ menuStatus_txt.text = "Small amount of particles (recommended for older computers)"; }; if (_arg1.target == menu_Normal){ menuStatus_txt.text = "normal amount of particles"; }; if (_arg1.target == menu_High){ menuStatus_txt.text = "large amount of particles (cpu intensive)"; }; if (_arg1.target == SFX_b){ menuStatus_txt.text = "toggles soundeffects"; }; if (_arg1.target == sound_b){ menuStatus_txt.text = "toggles music"; }; } function __setProp_back_b_MenuScreen_Base_1(){ try { back_b["componentInspectorSetting"] = true; } catch(e:Error) { }; back_b.emphasized = false; back_b.enabled = true; back_b.label = "back to game"; back_b.labelPlacement = "right"; back_b.selected = false; back_b.toggle = false; back_b.visible = true; try { back_b["componentInspectorSetting"] = false; } catch(e:Error) { }; } function frame1(){ menu_Low.addEventListener(MouseEvent.CLICK, lowClick); menu_Lower.addEventListener(MouseEvent.CLICK, lowerClick); menu_Normal.addEventListener(MouseEvent.CLICK, normalClick); menu_High.addEventListener(MouseEvent.CLICK, highClick); exitGame_b.addEventListener(MouseEvent.CLICK, exitClick); addEventListener(MouseEvent.MOUSE_OVER, onMouseOverInGameMenu); addEventListener(MouseEvent.MOUSE_OUT, onMouseOutInGameMenu); back_b.addEventListener(MouseEvent.CLICK, onBackInGameMenu); SFX_b.addEventListener(MouseEvent.CLICK, muteInGameMenu); sound_b.addEventListener(MouseEvent.CLICK, soundInGameMenu); } function __setProp_menu_Lower_MenuScreen_Base_1(){ try { menu_Lower["componentInspectorSetting"] = true; } catch(e:Error) { }; menu_Lower.enabled = true; menu_Lower.groupName = "Kwaliteit"; menu_Lower.label = "lower"; menu_Lower.labelPlacement = "right"; menu_Lower.selected = false; menu_Lower.value = ""; menu_Lower.visible = true; try { menu_Lower["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_SFX_b_MenuScreen_Base_1(){ try { SFX_b["componentInspectorSetting"] = true; } catch(e:Error) { }; SFX_b.enabled = true; SFX_b.label = "soundeffects"; SFX_b.labelPlacement = "right"; SFX_b.selected = true; SFX_b.visible = true; try { SFX_b["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function lowClick(_arg1:MouseEvent):void{ MovieClip(this.parent).qualitySet = 0; } function __setProp_menu_Low_MenuScreen_Base_1(){ try { menu_Low["componentInspectorSetting"] = true; } catch(e:Error) { }; menu_Low.enabled = true; menu_Low.groupName = "Kwaliteit"; menu_Low.label = "lowest"; menu_Low.labelPlacement = "right"; menu_Low.selected = false; menu_Low.value = ""; menu_Low.visible = true; try { menu_Low["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function muteInGameMenu(_arg1:MouseEvent):void{ if (SFX_b.selected == true){ MovieClip(this.parent).muteSFX = false; } else { MovieClip(this.parent).muteSFX = true; }; } public function showStats():void{ resetsbounces_txt.text = ((((((("total bounces: " + MovieClip(this.parent).numBounces) + ", total resets: ") + MovieClip(this.parent).numResets) + ", total score: ") + ((MovieClip(this.parent).numResets * 10) + MovieClip(this.parent).numBounces)) + ", level: ") + MovieClip(this.parent).currentLevel); } function __setProp_exitGame_b_MenuScreen_Base_1(){ try { exitGame_b["componentInspectorSetting"] = true; } catch(e:Error) { }; exitGame_b.emphasized = false; exitGame_b.enabled = true; exitGame_b.label = "exit to main menu"; exitGame_b.labelPlacement = "right"; exitGame_b.selected = false; exitGame_b.toggle = false; exitGame_b.visible = true; try { exitGame_b["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function checkSelected():void{ if (MovieClip(this.parent).qualitySet == 0){ menu_Low.selected = true; } else { if (MovieClip(this.parent).qualitySet == 1){ menu_Normal.selected = true; } else { if (MovieClip(this.parent).qualitySet == 0.5){ menu_Lower.selected = true; } else { menu_High.selected = true; }; }; }; if (MovieClip(this.parent).muteSFX == true){ SFX_b.selected = false; } else { SFX_b.selected = true; }; if (MovieClip(this.parent).muteMusic == true){ sound_b.selected = false; } else { sound_b.selected = true; }; } function __setProp_menu_High_MenuScreen_Base_1(){ try { menu_High["componentInspectorSetting"] = true; } catch(e:Error) { }; menu_High.enabled = true; menu_High.groupName = "Kwaliteit"; menu_High.label = "high"; menu_High.labelPlacement = "right"; menu_High.selected = false; menu_High.value = ""; menu_High.visible = true; try { menu_High["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_sound_b_MenuScreen_Base_1(){ try { sound_b["componentInspectorSetting"] = true; } catch(e:Error) { }; sound_b.enabled = true; sound_b.label = "music"; sound_b.labelPlacement = "right"; sound_b.selected = true; sound_b.visible = true; try { sound_b["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function removeText():void{ menuStatus_txt.text = ""; resetsbounces_txt.text = ""; } public function onBackInGameMenu(_arg1:MouseEvent):void{ if ((((MovieClip(this.parent).menuShown == true)) && ((MovieClip(this.parent).menuDisplayed == true)))){ removeText(); MovieClip(this.parent).removeMenu(); }; } public function normalClick(_arg1:MouseEvent):void{ MovieClip(this.parent).qualitySet = 1; } } }//package
Section 63
//PlayBall (PlayBall) package { import flash.display.*; public dynamic class PlayBall extends MovieClip { } }//package
Section 64
//Pop (Pop) package { import flash.media.*; public dynamic class Pop extends Sound { } }//package
Section 65
//Pop2 (Pop2) package { import flash.media.*; public dynamic class Pop2 extends Sound { } }//package
Section 66
//Pop3 (Pop3) package { import flash.media.*; public dynamic class Pop3 extends Sound { } }//package
Section 67
//RadioButton_disabledIcon (RadioButton_disabledIcon) package { import flash.display.*; public dynamic class RadioButton_disabledIcon extends MovieClip { } }//package
Section 68
//RadioButton_downIcon (RadioButton_downIcon) package { import flash.display.*; public dynamic class RadioButton_downIcon extends MovieClip { } }//package
Section 69
//RadioButton_overIcon (RadioButton_overIcon) package { import flash.display.*; public dynamic class RadioButton_overIcon extends MovieClip { } }//package
Section 70
//RadioButton_selectedDisabledIcon (RadioButton_selectedDisabledIcon) package { import flash.display.*; public dynamic class RadioButton_selectedDisabledIcon extends MovieClip { } }//package
Section 71
//RadioButton_selectedDownIcon (RadioButton_selectedDownIcon) package { import flash.display.*; public dynamic class RadioButton_selectedDownIcon extends MovieClip { } }//package
Section 72
//RadioButton_selectedOverIcon (RadioButton_selectedOverIcon) package { import flash.display.*; public dynamic class RadioButton_selectedOverIcon extends MovieClip { } }//package
Section 73
//RadioButton_selectedUpIcon (RadioButton_selectedUpIcon) package { import flash.display.*; public dynamic class RadioButton_selectedUpIcon extends MovieClip { } }//package
Section 74
//RadioButton_upIcon (RadioButton_upIcon) package { import flash.display.*; public dynamic class RadioButton_upIcon extends MovieClip { } }//package
Section 75
//Song1 (Song1) package { import flash.media.*; public dynamic class Song1 extends Sound { } }//package
Section 76
//Song2 (Song2) package { import flash.media.*; public dynamic class Song2 extends Sound { } }//package
Section 77
//Tekst1 (Tekst1) package { import flash.display.*; public dynamic class Tekst1 extends MovieClip { } }//package
Section 78
//Tekst2 (Tekst2) package { import flash.display.*; public dynamic class Tekst2 extends MovieClip { } }//package
Section 79
//Tekst3 (Tekst3) package { import flash.display.*; public dynamic class Tekst3 extends MovieClip { } }//package
Section 80
//Tekst4 (Tekst4) package { import flash.display.*; public dynamic class Tekst4 extends MovieClip { } }//package
Section 81
//Tekst5 (Tekst5) package { import flash.display.*; public dynamic class Tekst5 extends MovieClip { } }//package
Section 82
//Thud (Thud) package { import flash.media.*; public dynamic class Thud extends Sound { } }//package

Library Items

Symbol 1 Sound {Song1}
Symbol 2 GraphicUsed by:5
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:5
Symbol 5 MovieClip {DragBall}Uses:2 4
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClip {AimLine}Uses:6
Symbol 8 GraphicUsed by:9 104
Symbol 9 MovieClip {CheckPoint}Uses:8
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClip {MaxCircle}Uses:10
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClip {Finish}Uses:12
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:14Used by:19
Symbol 16 FontUsed by:17 21 46 49 50 51 68 87 88 89 90 103 105 107 109 111 113 114 118 139 140 141
Symbol 17 TextUses:16Used by:18
Symbol 18 MovieClipUses:17Used by:19
Symbol 19 MovieClip {Enemy}Uses:15 18
Symbol 20 GraphicUsed by:47
Symbol 21 TextUses:16Used by:47
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:22Used by:45 67 84
Symbol 24 MovieClip {fl.core.ComponentShim}Used by:45 67 84
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClip {Button_disabledSkin}Uses:25Used by:45
Symbol 27 GraphicUsed by:28
Symbol 28 MovieClip {Button_downSkin}Uses:27Used by:45
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClip {Button_emphasizedSkin}Uses:29Used by:45
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClip {Button_overSkin}Uses:31Used by:45
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClip {Button_selectedDisabledSkin}Uses:33Used by:45
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClip {Button_selectedDownSkin}Uses:35Used by:45
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClip {Button_selectedOverSkin}Uses:37Used by:45
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClip {Button_selectedUpSkin}Uses:39Used by:45
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClip {Button_upSkin}Uses:41Used by:45
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClip {focusRectSkin}Uses:43Used by:45 67 84
Symbol 45 MovieClip {fl.controls.Button}Uses:23 24 26 28 30 32 34 36 38 40 42 44Used by:47 85 91  Timeline
Symbol 46 TextUses:16Used by:47
Symbol 47 MovieClip {Credits}Uses:20 21 45 46
Symbol 48 GraphicUsed by:85
Symbol 49 TextUses:16Used by:85
Symbol 50 TextUses:16Used by:85 91
Symbol 51 EditableTextUses:16Used by:85
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClip {RadioButton_upIcon}Uses:52Used by:67
Symbol 54 GraphicUsed by:55 64
Symbol 55 MovieClip {RadioButton_overIcon}Uses:54Used by:67
Symbol 56 GraphicUsed by:57 65
Symbol 57 MovieClip {RadioButton_downIcon}Uses:56Used by:67
Symbol 58 GraphicUsed by:59 66
Symbol 59 MovieClip {RadioButton_disabledIcon}Uses:58Used by:67
Symbol 60 GraphicUsed by:63
Symbol 61 GraphicUsed by:62
Symbol 62 MovieClipUses:61Used by:63 64 65 66
Symbol 63 MovieClip {RadioButton_selectedUpIcon}Uses:60 62Used by:67
Symbol 64 MovieClip {RadioButton_selectedOverIcon}Uses:54 62Used by:67
Symbol 65 MovieClip {RadioButton_selectedDownIcon}Uses:56 62Used by:67
Symbol 66 MovieClip {RadioButton_selectedDisabledIcon}Uses:58 62Used by:67
Symbol 67 MovieClip {fl.controls.RadioButton}Uses:23 24 53 55 57 59 63 64 65 66 44Used by:85 91
Symbol 68 TextUses:16Used by:85 91
Symbol 69 GraphicUsed by:70 79
Symbol 70 MovieClip {CheckBox_upIcon}Uses:69Used by:84
Symbol 71 GraphicUsed by:72 80
Symbol 72 MovieClip {CheckBox_overIcon}Uses:71Used by:84
Symbol 73 GraphicUsed by:74 81
Symbol 74 MovieClip {CheckBox_downIcon}Uses:73Used by:84
Symbol 75 GraphicUsed by:76
Symbol 76 MovieClip {CheckBox_disabledIcon}Uses:75Used by:84
Symbol 77 GraphicUsed by:78
Symbol 78 MovieClipUses:77Used by:79 80 81 83
Symbol 79 MovieClip {CheckBox_selectedUpIcon}Uses:69 78Used by:84
Symbol 80 MovieClip {CheckBox_selectedOverIcon}Uses:71 78Used by:84
Symbol 81 MovieClip {CheckBox_selectedDownIcon}Uses:73 78Used by:84
Symbol 82 GraphicUsed by:83
Symbol 83 MovieClip {CheckBox_selectedDisabledIcon}Uses:82 78Used by:84
Symbol 84 MovieClip {fl.controls.CheckBox}Uses:23 24 70 72 74 76 79 80 81 83 44Used by:85 91
Symbol 85 MovieClip {MainMenuScreen}Uses:48 49 50 51 45 67 68 84
Symbol 86 GraphicUsed by:91
Symbol 87 TextUses:16Used by:91
Symbol 88 EditableTextUses:16Used by:91
Symbol 89 EditableTextUses:16Used by:91
Symbol 90 TextUses:16Used by:91
Symbol 91 MovieClip {MenuScreen}Uses:86 87 50 88 89 45 67 68 84 90
Symbol 92 MovieClip {ImpactParticle2}
Symbol 93 MovieClip {ImpactParticle}
Symbol 94 GraphicUsed by:95
Symbol 95 MovieClip {HoekTest}Uses:94
Symbol 96 GraphicUsed by:102
Symbol 97 GraphicUsed by:102
Symbol 98 GraphicUsed by:102
Symbol 99 GraphicUsed by:102
Symbol 100 GraphicUsed by:102
Symbol 101 GraphicUsed by:102
Symbol 102 MovieClip {MenuBall}Uses:96 97 98 99 100 101
Symbol 103 TextUses:16Used by:104
Symbol 104 MovieClip {PlayBall}Uses:8 103
Symbol 105 TextUses:16Used by:106
Symbol 106 MovieClip {Tekst5}Uses:105
Symbol 107 TextUses:16Used by:108
Symbol 108 MovieClip {Tekst4}Uses:107
Symbol 109 TextUses:16Used by:110
Symbol 110 MovieClip {Tekst3}Uses:109
Symbol 111 TextUses:16Used by:112
Symbol 112 MovieClip {Tekst2}Uses:111
Symbol 113 TextUses:16Used by:115
Symbol 114 TextUses:16Used by:115
Symbol 115 MovieClip {Tekst1}Uses:113 114
Symbol 116 GraphicUsed by:117
Symbol 117 MovieClip {BounceSpot}Uses:116
Symbol 118 TextUses:16Used by:119
Symbol 119 MovieClip {BounceTekst}Uses:118
Symbol 120 GraphicUsed by:121
Symbol 121 MovieClipUses:120Used by:Timeline
Symbol 122 GraphicUsed by:123
Symbol 123 MovieClipUses:122Used by:Timeline
Symbol 124 Sound {Pop}Used by:129
Symbol 125 Sound {Pop2}Used by:129
Symbol 126 Sound {Thud}Used by:129
Symbol 127 Sound {Song2}Used by:129
Symbol 128 Sound {Pop3}Used by:129
Symbol 129 MovieClip {dragBall2_fla.MuziekContainer_3}Uses:124 125 126 127 128Used by:Timeline
Symbol 130 FontUsed by:131 133
Symbol 131 TextUses:130Used by:132
Symbol 132 MovieClip {dragBall2_fla.XepticAnimatie_4}Uses:131Used by:Timeline
Symbol 133 TextUses:130Used by:Timeline
Symbol 134 GraphicUsed by:135
Symbol 135 MovieClipUses:134Used by:Timeline
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClip {dragBall2_fla.VCam_AS3_Interactive_6}Uses:136Used by:Timeline
Symbol 138 GraphicUsed by:Timeline
Symbol 139 TextUses:16Used by:Timeline
Symbol 140 EditableTextUses:16Used by:Timeline
Symbol 141 EditableTextUses:16Used by:Timeline

Instance Names

"bgMenu"Frame 1Symbol 121 MovieClip
"loadingBar"Frame 1Symbol 123 MovieClip
"xd"Frame 2Symbol 132 MovieClip {dragBall2_fla.XepticAnimatie_4}
"bg"Frame 5Symbol 121 MovieClip
"container"Frame 5Symbol 135 MovieClip
"cam"Frame 5Symbol 137 MovieClip {dragBall2_fla.VCam_AS3_Interactive_6}
"bgMenu"Frame 6Symbol 121 MovieClip
"exitToMain"Frame 6Symbol 45 MovieClip {fl.controls.Button}
"submitScore"Frame 6Symbol 45 MovieClip {fl.controls.Button}
"score_txt"Frame 6Symbol 140 EditableText
"totalScore_txt"Frame 6Symbol 141 EditableText
"hitCircle"Symbol 5 MovieClip {DragBall} Frame 1Symbol 4 MovieClip
"hitCircle"Symbol 19 MovieClip {Enemy} Frame 1Symbol 15 MovieClip
"warning"Symbol 19 MovieClip {Enemy} Frame 1Symbol 18 MovieClip
"back_b"Symbol 47 MovieClip {Credits} Frame 1Symbol 45 MovieClip {fl.controls.Button}
"menuStatus_txt"Symbol 85 MovieClip {MainMenuScreen} Frame 1Symbol 51 EditableText
"back_b"Symbol 85 MovieClip {MainMenuScreen} Frame 1Symbol 45 MovieClip {fl.controls.Button}
"menu_Low"Symbol 85 MovieClip {MainMenuScreen} Frame 1Symbol 67 MovieClip {fl.controls.RadioButton}
"menu_Normal"Symbol 85 MovieClip {MainMenuScreen} Frame 1Symbol 67 MovieClip {fl.controls.RadioButton}
"menu_High"Symbol 85 MovieClip {MainMenuScreen} Frame 1Symbol 67 MovieClip {fl.controls.RadioButton}
"menu_Lower"Symbol 85 MovieClip {MainMenuScreen} Frame 1Symbol 67 MovieClip {fl.controls.RadioButton}
"SFX_b"Symbol 85 MovieClip {MainMenuScreen} Frame 1Symbol 84 MovieClip {fl.controls.CheckBox}
"sound_b"Symbol 85 MovieClip {MainMenuScreen} Frame 1Symbol 84 MovieClip {fl.controls.CheckBox}
"menuStatus_txt"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 88 EditableText
"resetsbounces_txt"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 89 EditableText
"exitGame_b"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 45 MovieClip {fl.controls.Button}
"back_b"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 45 MovieClip {fl.controls.Button}
"menu_Normal"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 67 MovieClip {fl.controls.RadioButton}
"menu_High"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 67 MovieClip {fl.controls.RadioButton}
"menu_Low"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 67 MovieClip {fl.controls.RadioButton}
"menu_Lower"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 67 MovieClip {fl.controls.RadioButton}
"SFX_b"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 84 MovieClip {fl.controls.CheckBox}
"sound_b"Symbol 91 MovieClip {MenuScreen} Frame 1Symbol 84 MovieClip {fl.controls.CheckBox}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.

Labels

"preloader"Frame 1
"xepticdesigns"Frame 2
"sponsor"Frame 3
"menu"Frame 4
"game"Frame 5
"end"Frame 6




http://swfchan.com/24/118551/info.shtml
Created: 7/3 -2019 04:01:05 Last modified: 7/3 -2019 04:01:05 Server time: 15/11 -2024 01:19:00