Section 1
//brickcontainer_3 (brickBreaker_fla.brickcontainer_3)
package brickBreaker_fla {
import flash.display.*;
public dynamic class brickcontainer_3 extends MovieClip {
public function brickcontainer_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package brickBreaker_fla
Section 2
//countdown_mc_81 (brickBreaker_fla.countdown_mc_81)
package brickBreaker_fla {
import flash.display.*;
public dynamic class countdown_mc_81 extends MovieClip {
public var paddle_mc:MovieClip;
public var ball_mc:MovieClip;
public function countdown_mc_81(){
addFrameScript(117, frame118);
}
function frame118(){
gotoAndStop(1);
}
}
}//package brickBreaker_fla
Section 3
//exlposion_42 (brickBreaker_fla.exlposion_42)
package brickBreaker_fla {
import flash.display.*;
public dynamic class exlposion_42 extends MovieClip {
public function exlposion_42(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
}
}//package brickBreaker_fla
Section 4
//FSD_Error_BG_94 (brickBreaker_fla.FSD_Error_BG_94)
package brickBreaker_fla {
import flash.display.*;
public dynamic class FSD_Error_BG_94 extends MovieClip {
public var playBTN_mc:playBTN;
}
}//package brickBreaker_fla
Section 5
//introScreen_50 (brickBreaker_fla.introScreen_50)
package brickBreaker_fla {
import flash.display.*;
public dynamic class introScreen_50 extends MovieClip {
public var startBTN_mc:MovieClip;
public var instructionBg_mc:MovieClip;
public var intro_bg:MovieClip;
public function introScreen_50(){
addFrameScript(24, frame25, 44, frame45);
}
function frame25(){
stop();
}
function frame45(){
stop();
}
}
}//package brickBreaker_fla
Section 6
//lives_mc_46 (brickBreaker_fla.lives_mc_46)
package brickBreaker_fla {
import flash.display.*;
public dynamic class lives_mc_46 extends MovieClip {
public var life1:Life1;
public var life3:Life3;
public var life2:Life2;
}
}//package brickBreaker_fla
Section 7
//pauseScreen_mc_56 (brickBreaker_fla.pauseScreen_mc_56)
package brickBreaker_fla {
import flash.display.*;
public dynamic class pauseScreen_mc_56 extends MovieClip {
public var pauseScreenBg_mc:MovieClip;
}
}//package brickBreaker_fla
Section 8
//Timer_85 (brickBreaker_fla.Timer_85)
package brickBreaker_fla {
import flash.text.*;
import flash.display.*;
public dynamic class Timer_85 extends MovieClip {
public var timer:TextField;
public var currLevelTxt:TextField;
}
}//package brickBreaker_fla
Section 9
//value100_59 (brickBreaker_fla.value100_59)
package brickBreaker_fla {
import flash.display.*;
public dynamic class value100_59 extends MovieClip {
public function value100_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package brickBreaker_fla
Section 10
//value1500_63 (brickBreaker_fla.value1500_63)
package brickBreaker_fla {
import flash.display.*;
public dynamic class value1500_63 extends MovieClip {
public function value1500_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package brickBreaker_fla
Section 11
//value2000_65 (brickBreaker_fla.value2000_65)
package brickBreaker_fla {
import flash.display.*;
public dynamic class value2000_65 extends MovieClip {
public function value2000_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package brickBreaker_fla
Section 12
//value2500_67 (brickBreaker_fla.value2500_67)
package brickBreaker_fla {
import flash.display.*;
public dynamic class value2500_67 extends MovieClip {
public function value2500_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package brickBreaker_fla
Section 13
//value3000_69 (brickBreaker_fla.value3000_69)
package brickBreaker_fla {
import flash.display.*;
public dynamic class value3000_69 extends MovieClip {
public function value3000_69(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package brickBreaker_fla
Section 14
//win_mc_58 (brickBreaker_fla.win_mc_58)
package brickBreaker_fla {
import flash.text.*;
import flash.display.*;
public dynamic class win_mc_58 extends MovieClip {
public var levelTxt:TextField;
public var pauseScreenBg_mc:MovieClip;
}
}//package brickBreaker_fla
Section 15
//ButtonElement (com.disneyxd.display.ButtonElement)
package com.disneyxd.display {
import flash.display.*;
import flash.events.*;
public class ButtonElement extends Element {
private var active:Boolean;
public var group:String;
private var _target:IEventDispatcher;
public static const CLICK:String = "click";
private static const DOWN:String = "down";
private static const UP:String = "up";
private static const OUT:String = "out";
public static const MOUSE_CLICK:String = "mouseClick";
private static const OVER:String = "over";
private static const UNCLICK:String = "unclick";
private static var groups:Object = new Object();
public function ButtonElement(){
useHandCursor = true;
buttonMode = true;
active = false;
listen();
show();
disable();
}
public function activate():void{
active = true;
gotoAndPlay(DOWN);
}
protected function handleMouseClick(_arg1:MouseEvent):void{
var _local2:Array;
var _local3:FrameLabel;
if (group){
unclickGroup();
groups[group] = this;
disable();
};
_local2 = this.currentLabels;
for each (_local3 in _local2) {
if (_local3.name == CLICK){
gotoAndPlay(CLICK);
return;
};
};
}
private function unclickGroup():void{
var _local1:ButtonElement;
_local1 = groups[group];
if (_local1){
_local1.unclick();
};
}
public function kill():void{
destroy();
}
public function deactivate():void{
active = false;
gotoAndPlay(UP);
}
public function enable():void{
_target.addEventListener(MouseEvent.MOUSE_OUT, handleMouseOut);
mouseEnabled = true;
mouseChildren = true;
}
public function get target():IEventDispatcher{
return (_target);
}
public function unclick():void{
gotoAndPlay(UNCLICK);
enable();
}
protected function handleMouseOut(_arg1:MouseEvent):void{
gotoAndPlay(OUT);
}
protected function listen():void{
_target = getChildByName("hit");
if (_target == null){
_target = this;
};
_target.addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver);
_target.addEventListener(MouseEvent.MOUSE_OUT, handleMouseOut);
_target.addEventListener(MouseEvent.CLICK, handleMouseClick);
}
protected function handleMouseOver(_arg1:MouseEvent):void{
gotoAndPlay(OVER);
}
public function disable():void{
_target.removeEventListener(MouseEvent.MOUSE_OUT, handleMouseOut);
mouseEnabled = false;
mouseChildren = false;
}
override protected function destroy():void{
_target.removeEventListener(MouseEvent.MOUSE_OVER, handleMouseOver);
_target.removeEventListener(MouseEvent.MOUSE_OUT, handleMouseOver);
_target.removeEventListener(MouseEvent.CLICK, handleMouseClick);
}
}
}//package com.disneyxd.display
Section 16
//Element (com.disneyxd.display.Element)
package com.disneyxd.display {
import flash.display.*;
import flash.events.*;
public class Element extends MovieClip {
private var fromFrame:Number;
private static const TRANSITION_OUT:String = "transitionOut";
private static const CONTENT:String = "content";
private static const TRANSITION_IN:String = "transitionIn";
public function Element(){
stop();
}
protected function destroy():void{
}
protected function prepare():void{
}
protected function transitionIn():void{
addEventListener(Event.COMPLETE, handleTransitionInComplete);
if (fromFrame == 0){
gotoAndPlay(TRANSITION_IN);
} else {
gotoAndPlay(fromFrame);
};
}
public function reset():void{
}
public function hide():void{
destroy();
transitionOut();
}
private function handleTransitionInComplete(_arg1:Event):void{
(_arg1.target as IEventDispatcher).removeEventListener(_arg1.type, handleTransitionInComplete);
gotoAndStop(CONTENT);
run();
}
protected function run():void{
}
protected function transitionOut():void{
gotoAndPlay(TRANSITION_OUT);
}
protected function ready():void{
stop();
dispatchEvent(new Event(Event.COMPLETE));
}
public function show(_arg1:Number=0):void{
this.fromFrame = _arg1;
prepare();
transitionIn();
}
}
}//package com.disneyxd.display
Section 17
//TransitionalElement (com.disneyxd.display.TransitionalElement)
package com.disneyxd.display {
import flash.display.*;
import flash.events.*;
public class TransitionalElement extends Element {
public var error_bg:MovieClip;
public var loadingCircle:MovieClip;
private var _transitionCount:uint;// = 0
public var loadingText:MovieClip;
public var submitBTN_mc:submitScoreBTN_mc;
public var playBTN_mc:playBTN;
public var game_bg:MovieClip;
public var instructionBg_mc:MovieClip;
public static const TRANSITION_IN_COMPLETE:String = "transitionInComplete";
public static const TRANSITION_OUT_COMPLETE:String = "transitionOutComplete";
public function TransitionalElement(){
_transitionCount = 0;
super();
}
override protected function ready():void{
super.ready();
if (this._transitionCount == 1){
this.dispatchEvent(new Event(TransitionalElement.TRANSITION_OUT_COMPLETE));
_transitionCount = 0;
return;
};
this.dispatchEvent(new Event(TransitionalElement.TRANSITION_IN_COMPLETE));
this._transitionCount++;
}
}
}//package com.disneyxd.display
Section 18
//BrickBreakerGame (com.disneyxd.games.BrickBreakerGame)
package com.disneyxd.games {
import flash.text.*;
import flash.display.*;
import flash.events.*;
import com.disneyxd.utils.*;
import flash.media.*;
import com.xtools.base.sfx.*;
import com.disneyxd.display.*;
public class BrickBreakerGame extends MovieClip {
public var value3000:MovieClip;
var brick1:Brick1;
var brick4:Brick4;
var brick7:Brick7;
var brick8:Brick8;
var brick2:Brick2;
var myFont;// = "Arial"
var brick3:Brick3;
var winLoose:Number;// = 0
var brick5:Brick5;
public var value1500:MovieClip;
public var bonus:Bonus;
var brick9:Brick9;
var bricksArray3:Array;
var brick14:Brick14;
var brick15:Brick15;
var brick16:Brick16;
var ax:Number;
var ay:Number;
var brick13:Brick13;
var brick17:Brick17;
var brick11:Brick11;
var brick26:Brick26;
public var bonusInidcatorLevel4_mc:MovieClip;
var brick20:Brick20;
var brick10:Brick10;
var brick6:Brick6;
var gravity:Number;
var brick18:Brick18;
var brick19:Brick19;
var brick24:Brick24;
var brick12:Brick12;
public var countdown_mc:MovieClip;
var brick21:Brick21;
var brick23:Brick23;
var brick27:Brick27;
public var value2500:MovieClip;
var t:DisplayObject;
var brick25:Brick25;
var gameOver_mc;
var brick22:Brick22;
var radius:Number;
public var paddle_mc:MovieClip;
private var brickHitSound:EmbeddedSound;
private var loose:EmbeddedSound;
var score:Number;
public var bonusInidcatorLevel5_mc:MovieClip;
var life1:Life1;
var life3:Life3;
var life2:Life2;
var time:Number;
var moveBonus:Number;// = 0
public var win_mc:MovieClip;
public var scoreText:TextField;
public var value100:MovieClip;
var speedX:Number;
public var speedY:Number;
public var pauseScreen_mc:MovieClip;
private var bonusHit:EmbeddedSound;
var isPaused;// = 0
public var explosion_mc:MovieClip;
public var livesLostPoints1_mc:MovieClip;
public var restartPrompt_mc:MovieClip;
var frameNum:Number;// = 0
public var bonusInidcatorLevel6_mc:MovieClip;
var friction:Number;
var gameWidth:Number;// = 750
public var bonusInidcatorLevel1_mc:MovieClip;
var bricksArray:Array;
private var _viewLeaderBoard:Boolean;// = false
private var hitSound:EmbeddedSound;
public var introScreen_mc:MovieClip;
public var timerLevel:MovieClip;
public var brick_container_mc:MovieClip;
public var livesLostPoints2_mc:MovieClip;
public var bonusInidcatorLevel7_mc:MovieClip;
var textFormat:TextFormat;
private var hitSide:EmbeddedSound;
var level:Number;// = 1
var bonusTime;
public var bonusInidcatorLevel2_mc:MovieClip;
public var value2000:MovieClip;
public var livesLostPoints3_mc:MovieClip;
private var bonusDrop:EmbeddedSound;
var gameHeight:Number;// = 500
var livesLeft:Number;
private var _leaderboard:Leaderboard;
private var soundtrack:EmbeddedSound;
public var lives_mc:MovieClip;
var isBonusOn:Number;// = 0
public var ball_mc:MovieClip;
public var value500:Value500;
public var bonusInidcatorLevel3_mc:MovieClip;
var bricksArray2:Array;
private static var TITLE:String = "DXD Teaser - Brick Breaker";
private static var GAME_NAME:String = "brickBreaker";
private static var GAME_ID:String = "dxd_brickBreaker";
public function BrickBreakerGame(){
gameOver_mc = new GameOver_mc();
myFont = "Arial";
level = 1;
winLoose = 0;
brick1 = new Brick1();
brick2 = new Brick2();
brick3 = new Brick3();
brick4 = new Brick4();
brick5 = new Brick5();
brick6 = new Brick6();
brick7 = new Brick7();
brick8 = new Brick8();
brick9 = new Brick9();
brick10 = new Brick10();
brick11 = new Brick11();
brick12 = new Brick12();
brick13 = new Brick13();
brick14 = new Brick14();
brick15 = new Brick15();
brick16 = new Brick16();
brick17 = new Brick17();
brick18 = new Brick18();
brick19 = new Brick19();
brick20 = new Brick20();
brick21 = new Brick21();
brick22 = new Brick22();
brick23 = new Brick23();
brick24 = new Brick24();
brick25 = new Brick25();
brick26 = new Brick26();
brick27 = new Brick27();
gameWidth = 750;
gameHeight = 500;
isBonusOn = 0;
moveBonus = 0;
isPaused = 0;
frameNum = 0;
_viewLeaderBoard = false;
super();
addFrameScript(0, frame1, 124, frame125);
gameInit();
}
function restart(_arg1:MouseEvent):void{
soundtrack._play(0.3, false, 999);
restartPrompt_mc.buttonMode = false;
restartPrompt_mc.removeEventListener(MouseEvent.CLICK, restart);
addEventListener(Event.ENTER_FRAME, render);
if (level == 1){
speedY = 10;
} else {
if (level == 2){
speedY = 15;
} else {
if (level == 3){
speedY = 20;
};
};
};
speedX = 0;
restartPrompt_mc.x = 1000;
}
function checkLife():void{
var _local1:int;
_local1 = 0;
while (_local1 < lives_mc.numChildren) {
livesLeft = lives_mc.numChildren;
if (livesLeft > 1){
lives_mc.removeChildAt(_local1);
return;
};
if (livesLeft == 1){
removeChild(brick_container_mc);
ball_mc.x = 1000;
paddle_mc.x = 1000;
lives_mc.removeChildAt(_local1);
winLoose = 0;
level = 1;
fullRestart();
};
_local1++;
};
}
function randomNumber(_arg1:Number=NaN, _arg2:Number=NaN):Number{
return ((Math.floor((Math.random() * (_arg2 - _arg1))) + _arg1));
}
function nextLevel(_arg1:MouseEvent):void{
win_mc.removeEventListener(MouseEvent.CLICK, nextLevel);
win_mc.buttonMode = false;
level++;
fullRestart(_arg1);
timerLevel.currLevelTxt.text = (level + "/3");
if (((!((level == 1))) && (!((winLoose == 1))))){
level = 1;
};
}
function checkHitStage():void{
if ((ball_mc.y + radius) > gameHeight){
loose._play(0.8, true, 0);
soundtrack._stop();
bonus.y = 2000;
ball_mc.y = (gameHeight + 100);
checkLife();
ball_mc.x = (gameWidth / 2);
ball_mc.y = ((gameHeight / 2) + 20);
paddle_mc.x = (gameWidth / 2);
if (livesLeft > 1){
restartPrompt_mc.x = paddle_mc.x;
restartPrompt_mc.y = (paddle_mc.y - 50);
};
removeEventListener(Event.ENTER_FRAME, render);
restartPrompt_mc.buttonMode = true;
restartPrompt_mc.addEventListener(MouseEvent.CLICK, restart);
} else {
if ((ball_mc.y + radius) < 0){
ball_mc.y = radius;
speedY = (speedY * -1);
hitSide._play(1, false, 0);
};
};
if ((ball_mc.x + radius) > 750){
ball_mc.x = (750 - radius);
speedX = (speedX * -1);
hitSide._play(1, false, 0);
} else {
if ((ball_mc.x + radius) < 0){
speedX = (speedX * -1);
ball_mc.x = 10;
hitSide._play(1, false, 0);
};
};
}
function gameInit():void{
hitSound = (new Ball_Contact() as EmbeddedSound);
brickHitSound = (new BrickHit() as EmbeddedSound);
soundtrack = (new Soundtrack() as EmbeddedSound);
bonusHit = (new BonusHit() as EmbeddedSound);
bonusDrop = (new BonusDrop() as EmbeddedSound);
hitSide = (new HitSide() as EmbeddedSound);
loose = (new Loose() as EmbeddedSound);
introScreen_mc.x = 0;
introScreen_mc.y = 0;
introScreen_mc.startBTN_mc.addEventListener(MouseEvent.CLICK, introOff);
introScreen_mc.startBTN_mc.buttonMode = true;
time = 0;
bricksArray = new Array(brick1, brick2, brick3, brick4, brick5, brick6, brick7, brick8, brick9, brick10, brick11, brick12, brick13, brick14, brick15, brick16, brick17, brick18, brick19, brick20, brick21, brick22, brick23, brick24, brick25, brick26, brick27);
bricksArray2 = new Array(brick1, brick2, brick3, brick4, brick5, brick6, brick7, brick8, brick9, brick10, brick11, brick12, brick13, brick14, brick15, brick16, brick17, brick18, brick19, brick20, brick21, brick22, brick23, brick24, brick25, brick26, brick27);
bricksArray3 = new Array(brick1, brick2, brick3, brick4, brick5, brick6, brick7, brick8, brick9, brick10, brick11, brick12, brick13, brick14, brick15, brick16, brick17, brick18, brick19, brick20, brick21, brick22, brick23, brick24, brick25, brick26, brick27);
}
function dropBonus():void{
if (isBonusOn == 0){
if (randomNumber(1, 130) == 5){
bonusDrop._play(1, false, 0);
bonus.x = randomNumber(20, 730);
bonus.y = 0;
isBonusOn = 1;
moveBonus = 1;
};
};
if (moveBonus == 1){
bonus.y = (bonus.y + ((level * 10) / 1.5));
};
if (bonus.y > gameHeight){
bonus.y = -100;
isBonusOn = 0;
moveBonus = 0;
};
}
function findLivesLeftValue():void{
var _local1:int;
_local1 = 0;
while (_local1 < lives_mc.numChildren) {
livesLeft = lives_mc.numChildren;
_local1++;
};
if (livesLeft > 0){
switch (livesLeft){
case 3:
if (brick_container_mc.numChildren == 0){
score = (score + 30000);
scoreText.text = String(score);
if (level != 3){
livesLostPoints1_mc.x = (gameWidth / 2);
livesLostPoints1_mc.y = ((gameHeight / 2) + 110);
} else {
livesLostPoints1_mc.x = (gameWidth / 2);
livesLostPoints1_mc.y = ((gameHeight / 2) + 170);
};
};
break;
case 2:
if (brick_container_mc.numChildren == 0){
score = (score + 20000);
scoreText.text = String(score);
if (level != 3){
livesLostPoints2_mc.x = (gameWidth / 2);
livesLostPoints2_mc.y = ((gameHeight / 2) + 110);
} else {
livesLostPoints2_mc.x = (gameWidth / 2);
livesLostPoints2_mc.y = ((gameHeight / 2) + 170);
};
};
break;
case 1:
if (brick_container_mc.numChildren == 0){
score = (score + 10000);
scoreText.text = String(score);
if (level != 3){
livesLostPoints3_mc.x = (gameWidth / 2);
livesLostPoints3_mc.y = ((gameHeight / 2) + 110);
} else {
livesLostPoints3_mc.x = (gameWidth / 2);
livesLostPoints3_mc.y = ((gameHeight / 2) + 170);
};
};
break;
};
};
}
function showValue(_arg1:MovieClip, _arg2:Number):void{
if (brick_container_mc.numChildren > 0){
_arg1.x = (t.x + 375);
_arg1.y = (t.y + 145);
_arg1.gotoAndPlay(2);
score = (score + _arg2);
scoreText.text = String(score);
} else {
if (brick_container_mc.numChildren == 0){
switch (level){
case 1:
if (time <= 45){
score = (score + (10000 + _arg2));
bonusInidcatorLevel1_mc.x = (gameWidth / 2);
bonusInidcatorLevel1_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 45)) && ((time <= 48)))){
score = (score + (4000 + _arg2));
bonusInidcatorLevel2_mc.x = (gameWidth / 2);
bonusInidcatorLevel2_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 48)) && ((time <= 50)))){
score = (score + (2000 + _arg2));
bonusInidcatorLevel3_mc.x = (gameWidth / 2);
bonusInidcatorLevel3_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 50)) && ((time <= 53)))){
score = (score + (1000 + _arg2));
bonusInidcatorLevel4_mc.x = (gameWidth / 2);
bonusInidcatorLevel4_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 53)) && ((time <= 56)))){
score = (score + (500 + _arg2));
bonusInidcatorLevel5_mc.x = (gameWidth / 2);
bonusInidcatorLevel5_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 56)) && ((time <= 60)))){
score = (score + (200 + _arg2));
bonusInidcatorLevel6_mc.x = (gameWidth / 2);
bonusInidcatorLevel6_mc.y = ((gameHeight / 2) + 60);
} else {
if (time > 60){
score = (score + (0 + _arg2));
bonusInidcatorLevel7_mc.x = (gameWidth / 2);
bonusInidcatorLevel7_mc.y = ((gameHeight / 2) + 60);
};
};
};
};
};
};
};
break;
case 2:
if (time <= 34){
score = (score + (10000 + _arg2));
bonusInidcatorLevel1_mc.x = (gameWidth / 2);
bonusInidcatorLevel1_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 34)) && ((time <= 38)))){
score = (score + (4000 + _arg2));
bonusInidcatorLevel2_mc.x = (gameWidth / 2);
bonusInidcatorLevel2_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 38)) && ((time <= 41)))){
score = (score + (2000 + _arg2));
bonusInidcatorLevel3_mc.x = (gameWidth / 2);
bonusInidcatorLevel3_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 41)) && ((time <= 45)))){
score = (score + (1000 + _arg2));
bonusInidcatorLevel4_mc.x = (gameWidth / 2);
bonusInidcatorLevel4_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 45)) && ((time <= 48)))){
score = (score + (500 + _arg2));
bonusInidcatorLevel5_mc.x = (gameWidth / 2);
bonusInidcatorLevel5_mc.y = ((gameHeight / 2) + 60);
} else {
if ((((time > 48)) && ((time <= 55)))){
score = (score + (200 + _arg2));
bonusInidcatorLevel6_mc.x = (gameWidth / 2);
bonusInidcatorLevel6_mc.y = ((gameHeight / 2) + 60);
} else {
if (time > 55){
score = (score + (0 + _arg2));
bonusInidcatorLevel7_mc.x = (gameWidth / 2);
bonusInidcatorLevel7_mc.y = ((gameHeight / 2) + 60);
};
};
};
};
};
};
};
break;
case 3:
if (time <= 46){
score = (score + (10000 + _arg2));
bonusInidcatorLevel1_mc.x = (gameWidth / 2);
bonusInidcatorLevel1_mc.y = ((gameHeight / 2) + 120);
} else {
if ((((time > 46)) && ((time <= 50)))){
score = (score + (4000 + _arg2));
bonusInidcatorLevel2_mc.x = (gameWidth / 2);
bonusInidcatorLevel2_mc.y = ((gameHeight / 2) + 120);
} else {
if ((((time > 50)) && ((time <= 54)))){
score = (score + (2000 + _arg2));
bonusInidcatorLevel3_mc.x = (gameWidth / 2);
bonusInidcatorLevel3_mc.y = ((gameHeight / 2) + 120);
} else {
if ((((time > 54)) && ((time <= 59)))){
score = (score + (1000 + _arg2));
bonusInidcatorLevel4_mc.x = (gameWidth / 2);
bonusInidcatorLevel4_mc.y = ((gameHeight / 2) + 120);
} else {
if ((((time > 59)) && ((time <= 63)))){
score = (score + (500 + _arg2));
bonusInidcatorLevel5_mc.x = (gameWidth / 2);
bonusInidcatorLevel5_mc.y = ((gameHeight / 2) + 120);
} else {
if ((((time > 63)) && ((time <= 67)))){
score = (score + (200 + _arg2));
bonusInidcatorLevel6_mc.x = (gameWidth / 2);
bonusInidcatorLevel6_mc.y = ((gameHeight / 2) + 120);
} else {
if (time > 67){
score = (score + (0 + _arg2));
bonusInidcatorLevel7_mc.x = (gameWidth / 2);
bonusInidcatorLevel7_mc.y = ((gameHeight / 2) + 120);
};
};
};
};
};
};
};
break;
};
_arg1.x = (t.x + 375);
_arg1.y = (t.y + 145);
_arg1.gotoAndPlay(2);
score = (score + _arg2);
scoreText.text = String(score);
};
};
}
function fullRestart(_arg1:MouseEvent=null):void{
var _local2:int;
soundtrack._play(0.3, false, 999);
time = 0;
bonusInidcatorLevel1_mc.y = 2000;
bonusInidcatorLevel2_mc.y = 2000;
bonusInidcatorLevel3_mc.y = 2000;
bonusInidcatorLevel4_mc.y = 2000;
bonusInidcatorLevel5_mc.y = 2000;
bonusInidcatorLevel6_mc.y = 2000;
bonusInidcatorLevel7_mc.y = 2000;
livesLostPoints1_mc.y = 2000;
livesLostPoints2_mc.y = 2000;
livesLostPoints3_mc.y = 2000;
addEventListener(Event.ENTER_FRAME, render);
restartPrompt_mc.x = 1000;
ball_mc.x = (gameWidth / 2);
ball_mc.y = ((gameHeight / 2) + 20);
paddle_mc.x = (gameWidth / 2);
addChild(brick_container_mc);
brick_container_mc.x = (gameWidth / 2);
brick_container_mc.y = ((gameHeight / 2) - 100);
_local2 = (brick_container_mc.numChildren - 1);
while (_local2 >= 0) {
brick_container_mc.removeChild(brick_container_mc.getChildAt(_local2));
_local2--;
};
if ((((level == 1)) || ((((level == 2)) && ((winLoose == 0)))))){
score = 0;
scoreText.text = String(score);
_local2 = 0;
while (_local2 < bricksArray.length) {
brick_container_mc.addChild(bricksArray[_local2]);
setChildIndex(brick_container_mc, 1);
switch (_local2){
case 0:
bricksArray[0].x = -234.1;
bricksArray[0].y = 81.2;
break;
case 1:
bricksArray[1].x = -156.2;
bricksArray[1].y = 81.2;
break;
case 2:
bricksArray[2].x = -78.2;
bricksArray[2].y = 81.2;
break;
case 3:
bricksArray[3].x = 0.1;
bricksArray[3].y = 81.2;
break;
case 4:
bricksArray[4].x = 77.7;
bricksArray[4].y = 81.2;
break;
case 5:
bricksArray[5].x = 155.8;
bricksArray[5].y = 81.2;
break;
case 6:
bricksArray[6].x = 233.8;
bricksArray[6].y = 81.2;
break;
case 7:
bricksArray[7].x = -198.1;
bricksArray[7].y = 41;
break;
case 8:
bricksArray[8].x = -119.2;
bricksArray[8].y = 41;
break;
case 9:
bricksArray[9].x = -40.1;
bricksArray[9].y = 41;
break;
case 10:
bricksArray[10].x = 39.1;
bricksArray[10].y = 41;
break;
case 11:
bricksArray[11].x = 118.7;
bricksArray[11].y = 41;
break;
case 12:
bricksArray[12].x = 197.7;
bricksArray[12].y = 41;
break;
case 13:
bricksArray[13].x = -158.4;
bricksArray[13].y = 0.8;
break;
case 14:
bricksArray[14].x = -79.1;
bricksArray[14].y = 0.8;
break;
case 15:
bricksArray[15].x = -0.3;
bricksArray[15].y = 0.8;
break;
case 16:
bricksArray[16].x = 78.6;
bricksArray[16].y = 0.8;
break;
case 17:
bricksArray[17].x = 157.5;
bricksArray[17].y = 0.8;
break;
case 18:
bricksArray[18].x = -118.8;
bricksArray[18].y = -39;
break;
case 19:
bricksArray[19].x = -39.6;
bricksArray[19].y = -39;
break;
case 20:
bricksArray[20].x = 39.3;
bricksArray[20].y = -39;
break;
case 21:
bricksArray[21].x = 118.7;
bricksArray[21].y = -39;
break;
case 22:
bricksArray[22].x = -78.4;
bricksArray[22].y = -79;
break;
case 23:
bricksArray[23].x = 0.6;
bricksArray[23].y = -79;
break;
case 24:
bricksArray[24].x = 79.6;
bricksArray[24].y = -79;
break;
case 25:
bricksArray[25].x = -39.6;
bricksArray[25].y = -118.8;
break;
case 26:
bricksArray[26].x = 39.2;
bricksArray[26].y = -118.8;
break;
};
removeLives();
_local2++;
};
} else {
if (level == 2){
_local2 = 0;
while (_local2 < bricksArray2.length) {
brick_container_mc.addChild(bricksArray2[_local2]);
setChildIndex(brick_container_mc, 1);
switch (_local2){
case 0:
bricksArray2[0].x = 223.7;
bricksArray2[0].y = 143;
break;
case 1:
bricksArray2[1].x = -46.8;
bricksArray2[1].y = 143;
break;
case 2:
bricksArray2[2].x = 64.6;
bricksArray2[2].y = 143;
break;
case 3:
bricksArray2[3].x = -212.6;
bricksArray2[3].y = -120;
break;
case 4:
bricksArray2[4].x = -212.6;
bricksArray2[4].y = 143;
break;
case 5:
bricksArray2[5].x = 223.8;
bricksArray2[5].y = -120;
break;
case 6:
bricksArray2[6].x = -46.8;
bricksArray2[6].y = -46;
break;
case 7:
bricksArray2[7].x = -46.8;
bricksArray2[7].y = 64;
break;
case 8:
bricksArray2[8].x = 64.6;
bricksArray2[8].y = 64;
break;
case 9:
bricksArray2[9].x = -259.6;
bricksArray2[9].y = 34;
break;
case 10:
bricksArray2[10].x = 266.1;
bricksArray2[10].y = 34;
break;
case 11:
bricksArray2[11].x = -298.7;
bricksArray2[11].y = -11;
break;
case 12:
bricksArray2[12].x = 307.1;
bricksArray2[12].y = -11;
break;
case 13:
bricksArray2[13].x = -112.9;
bricksArray2[13].y = 106;
break;
case 14:
bricksArray2[14].x = -184.6;
bricksArray2[14].y = -46;
break;
case 15:
bricksArray2[15].x = 199.2;
bricksArray2[15].y = -46;
break;
case 16:
bricksArray2[16].x = 6.5;
bricksArray2[16].y = 10;
break;
case 17:
bricksArray2[17].x = 130.4;
bricksArray2[17].y = 106;
break;
case 18:
bricksArray2[18].x = 130.4;
bricksArray2[18].y = -81;
break;
case 19:
bricksArray2[19].x = -46.8;
bricksArray2[19].y = -120;
break;
case 20:
bricksArray2[20].x = -114.3;
bricksArray2[20].y = -81;
break;
case 21:
bricksArray2[21].x = 64;
bricksArray2[21].y = -120;
break;
case 22:
bricksArray2[22].x = -112.4;
bricksArray2[22].y = 10;
break;
case 23:
bricksArray2[23].x = 64.6;
bricksArray2[23].y = -45.8;
break;
case 24:
bricksArray2[24].x = 133.7;
bricksArray2[24].y = 10;
break;
case 25:
bricksArray2[25].x = -185.6;
bricksArray2[25].y = 71;
break;
case 26:
bricksArray2[26].x = 199.2;
bricksArray2[26].y = 71;
break;
};
_local2++;
};
} else {
if (level == 3){
_local2 = 0;
while (_local2 < bricksArray3.length) {
brick_container_mc.addChild(bricksArray3[_local2]);
setChildIndex(brick_container_mc, 1);
switch (_local2){
case 0:
bricksArray3[0].x = -155.4;
bricksArray3[0].y = 94;
break;
case 1:
bricksArray3[1].x = -235.4;
bricksArray3[1].y = 94;
break;
case 2:
bricksArray3[2].x = -75.3;
bricksArray3[2].y = 94;
break;
case 3:
bricksArray3[3].x = 82.8;
bricksArray3[3].y = 94;
break;
case 4:
bricksArray3[4].x = -315.4;
bricksArray3[4].y = 94;
break;
case 5:
bricksArray3[5].x = 4.8;
bricksArray3[5].y = -24.7;
break;
case 6:
bricksArray3[6].x = 320.2;
bricksArray3[6].y = 94;
break;
case 7:
bricksArray3[7].x = 320.2;
bricksArray3[7].y = 12;
break;
case 8:
bricksArray3[8].x = -315.4;
bricksArray3[8].y = 12;
break;
case 9:
bricksArray3[9].x = 320.2;
bricksArray3[9].y = 51;
break;
case 10:
bricksArray3[10].x = 320.2;
bricksArray3[10].y = -35;
break;
case 11:
bricksArray3[11].x = -315.4;
bricksArray3[11].y = 51;
break;
case 12:
bricksArray3[12].x = -315.4;
bricksArray3[12].y = -35;
break;
case 13:
bricksArray3[13].x = 197.1;
bricksArray3[13].y = 51;
break;
case 14:
bricksArray3[14].x = -190.6;
bricksArray3[14].y = 48;
break;
case 15:
bricksArray3[15].x = 158.2;
bricksArray3[15].y = 8.4;
break;
case 16:
bricksArray3[16].x = -158.5;
bricksArray3[16].y = 8.4;
break;
case 17:
bricksArray3[17].x = 3.4;
bricksArray3[17].y = 48;
break;
case 18:
bricksArray3[18].x = 129.4;
bricksArray3[18].y = -24.7;
break;
case 19:
bricksArray3[19].x = 93.2;
bricksArray3[19].y = -61;
break;
case 20:
bricksArray3[20].x = -74.3;
bricksArray3[20].y = -61;
break;
case 21:
bricksArray3[21].x = -115;
bricksArray3[21].y = -24.7;
break;
case 22:
bricksArray3[22].x = 220.2;
bricksArray3[22].y = -78;
break;
case 23:
bricksArray3[23].x = -215.4;
bricksArray3[23].y = -78;
break;
case 24:
bricksArray3[24].x = 5.7;
bricksArray3[24].y = -100;
break;
case 25:
bricksArray3[25].x = 161.9;
bricksArray3[25].y = 94;
break;
case 26:
bricksArray3[26].x = 241.1;
bricksArray3[26].y = 94;
break;
};
_local2++;
};
};
};
};
if (winLoose == 0){
addChild(lives_mc);
life1 = new Life1();
life2 = new Life2();
life3 = new Life3();
lives_mc.addChild(life1);
lives_mc.addChild(life2);
lives_mc.addChild(life3);
life1.x = -33.2;
life2.x = -6.2;
life3.x = 20.9;
life1.y = 0.2;
life2.y = 0.2;
life3.y = 0.2;
score = 0;
} else {
win_mc.x = 2000;
};
if (level == 1){
speedY = 10;
speedX = 0;
} else {
if (level == 2){
speedY = 15;
speedX = 0;
} else {
if (level == 3){
speedY = 20;
speedX = 0;
};
};
};
}
function run():void{
soundtrack._play(0.3, true, 999);
score = 0;
livesLeft = 0;
setChildIndex(bonus, 10);
setChildIndex(scoreText, 5);
scoreText.text = String(score);
bonusTime = time.toFixed(2);
timerLevel.timer.text = bonusTime;
ball_mc.x = (gameWidth / 2);
ball_mc.y = ((gameHeight / 2) + 140);
setChildIndex(ball_mc, 14);
paddle_mc.x = (gameWidth / 2);
paddle_mc.y = (gameHeight - 60);
brick_container_mc.x = (gameWidth / 2);
brick_container_mc.y = 150;
speedY = 10;
speedX = 1;
radius = (ball_mc.height / 2);
friction = 1;
ax = 0;
ay = 0;
gravity = 0;
addEventListener(Event.ENTER_FRAME, render);
this.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
timerLevel.currLevelTxt.text = (level + "/3");
setChildIndex(timerLevel, 5);
}
function frame1(){
stop();
}
private function loadLeaderboard():void{
this._leaderboard = new Leaderboard();
this._leaderboard.x = 0;
this._leaderboard.y = 0;
addChild(_leaderboard);
this._leaderboard.addEventListener(Leaderboard.DESTROYED, leaderboardDestroyed);
this._leaderboard.game = _slot1.GAME_NAME;
this._leaderboard.gameID = _slot1.GAME_ID;
this._leaderboard.title = _slot1.TITLE;
this._leaderboard.score = this.score;
this._leaderboard.showLoader();
}
function checkHitPaddle():void{
if (ball_mc.hitTestObject(paddle_mc)){
hitSound._play(1, false, 0);
ball_mc.y = (ball_mc.y - 10);
speedY = (speedY * -1);
if ((ball_mc.x - paddle_mc.x) >= 0){
speedX = (speedX - ((ball_mc.x - (paddle_mc.x + 1000)) * 0.005));
} else {
speedX = (speedX + ((ball_mc.x - (paddle_mc.x + 1000)) * 0.005));
};
};
if (bonus.hitTestObject(paddle_mc)){
bonusHit._play(1, false, 0);
bonus.y = 2000;
isBonusOn = 0;
moveBonus = 0;
score = (score + 1000);
value1500.x = bonus.x;
value1500.y = (paddle_mc.y - 30);
value1500.play();
scoreText.text = String(score);
};
}
function unPause(_arg1:KeyboardEvent):void{
this.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
addEventListener(Event.ENTER_FRAME, render);
pauseScreen_mc.x = -800;
restartPrompt_mc.x = 1000;
isPaused = 0;
soundtrack._play(0.3, false, 999);
}
function removeLives():void{
var _local1:int;
_local1 = 0;
while (_local1 < lives_mc.numChildren) {
lives_mc.removeChildAt(_local1);
return;
_local1++;
};
}
private function leaderboardDestroyed(_arg1:Event):void{
this._leaderboard.removeEventListener(Leaderboard.DESTROYED, leaderboardDestroyed);
this.removeChild(this._leaderboard);
this._leaderboard = null;
fullRestart();
}
function findValue():void{
if (level == 1){
switch (t.y){
case 81.2:
showValue(value100, 100);
break;
case 41:
showValue(value500, 500);
break;
case 0.8:
showValue(value1500, 1500);
break;
case -39:
showValue(value2000, 2000);
break;
case -79:
showValue(value2500, 2500);
break;
case -118.8:
showValue(value3000, 3000);
break;
};
return;
} else {
if (level == 2){
switch (t.y){
case 143:
showValue(value100, 100);
break;
case 106:
showValue(value500, 500);
break;
case 10:
showValue(value1500, 1500);
break;
case 34:
showValue(value1500, 1500);
break;
case -46:
showValue(value2500, 2500);
break;
case 71:
showValue(value100, 100);
break;
case 64:
showValue(value100, 100);
break;
case -11:
showValue(value2500, 2500);
break;
case -81:
showValue(value2500, 2500);
break;
case -120:
showValue(value3000, 3000);
break;
};
return;
} else {
if (level == 3){
switch (t.y){
case 94:
showValue(value100, 100);
break;
case 51:
showValue(value500, 500);
break;
case 48:
showValue(value500, 500);
break;
case 28.4:
showValue(value1500, 1500);
break;
case 6:
showValue(value2500, 2500);
break;
case -24.7:
showValue(value3000, 3000);
break;
case -35:
showValue(value3000, 3000);
break;
case -61:
showValue(value2500, 2500);
break;
case -78:
showValue(value2500, 2500);
break;
case 111:
showValue(value100, 100);
break;
case 104:
showValue(value100, 100);
break;
case 31:
showValue(value2500, 2500);
break;
case 12:
showValue(value2500, 2500);
break;
case -41:
showValue(value2500, 2500);
break;
case -80:
showValue(value3000, 3000);
break;
case -100:
showValue(value3000, 3000);
break;
};
return;
};
};
};
}
function keyDownListener(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 80){
if (isPaused == 0){
removeEventListener(Event.ENTER_FRAME, render);
pauseScreen_mc.buttonMode = true;
pauseScreen_mc.x = 0;
pauseScreen_mc.y = 0;
setChildIndex(pauseScreen_mc, 28);
isPaused = 1;
soundtrack._stop();
} else {
if (isPaused == 1){
unPause(_arg1);
};
};
};
}
function introOff(_arg1:Event):void{
introScreen_mc.startBTN_mc.removeEventListener(MouseEvent.CLICK, introOff);
introScreen_mc.startBTN_mc.buttonMode = false;
gotoAndPlay(2);
introScreen_mc.play();
}
private function addGameOverClip():void{
addChild(gameOver_mc);
setChildIndex(gameOver_mc, 15);
gameOver_mc.x = 375;
gameOver_mc.y = 250;
gameOver_mc.playBTN_mc.addEventListener(MouseEvent.CLICK, this.transtionOutGameOver);
gameOver_mc.submitBTN_mc.addEventListener(MouseEvent.CLICK, this.transtionOutGameOver);
(this.gameOver_mc as TransitionalElement).addEventListener(TransitionalElement.TRANSITION_IN_COMPLETE, gameOverTransitionInComplete);
(this.gameOver_mc as TransitionalElement).addEventListener(TransitionalElement.TRANSITION_OUT_COMPLETE, gameOverTransitionOutComplete);
(this.gameOver_mc as TransitionalElement).show();
}
function render(_arg1:Event):void{
time = (time + 0.05);
bonusTime = time.toFixed(2);
timerLevel.timer.text = String(bonusTime);
speedY = (speedY + gravity);
speedY = (speedY + ay);
speedX = (speedX + ax);
speedY = (speedY * friction);
speedX = (speedX * friction);
ball_mc.y = (ball_mc.y + speedY);
ball_mc.x = (ball_mc.x + speedX);
paddle_mc.x = mouseX;
checkHitStage();
checkHitPaddle();
checkHitBrick();
frameNum++;
dropBonus();
}
function frame125(){
stop();
run();
}
function checkHitBrick():void{
var _local1:int;
_local1 = 0;
while (_local1 < brick_container_mc.numChildren) {
t = brick_container_mc.getChildAt(_local1);
if (ball_mc.hitTestObject(t)){
brickHitSound._play(3, false, 0);
speedY = (speedY * -1);
brick_container_mc.removeChildAt(_local1);
brick_container_mc.t = null;
explosion_mc.x = (t.x + 375);
explosion_mc.y = (t.y + 145);
explosion_mc.gotoAndPlay(2);
findValue();
findLivesLeftValue();
if (level == 1){
};
if (level == 2){
};
if (brick_container_mc.numChildren == 0){
soundtrack._stop();
bonus.y = 2000;
moveBonus = 0;
removeEventListener(Event.ENTER_FRAME, render);
removeChild(brick_container_mc);
ball_mc.x = 1000;
paddle_mc.x = 1000;
if (level != 3){
win_mc.x = (gameWidth / 2);
win_mc.y = (gameHeight / 2);
win_mc.levelTxt.text = (("LEVEL " + level.toString()) + " COMPLETE!");
TextFieldUtils.addTracking(win_mc.levelTxt, -1);
setChildIndex(win_mc, 15);
win_mc.addEventListener(MouseEvent.CLICK, nextLevel);
win_mc.buttonMode = true;
winLoose = 1;
};
if (level == 3){
ball_mc.x = 1000;
paddle_mc.x = 1000;
this.addGameOverClip();
winLoose = 0;
level = 1;
timerLevel.currLevelTxt.text = (level + "/3");
};
};
return;
};
_local1++;
};
}
private function gameOverTransitionOutComplete(_arg1:Event):void{
(this.gameOver_mc as TransitionalElement).removeEventListener(TransitionalElement.TRANSITION_OUT_COMPLETE, gameOverTransitionOutComplete);
if (this._viewLeaderBoard){
this._viewLeaderBoard = false;
loadLeaderboard();
} else {
fullRestart();
};
removeChild(this.gameOver_mc);
}
private function gameOverTransitionInComplete(_arg1:Event):void{
(_arg1.target as TransitionalElement).removeEventListener(TransitionalElement.TRANSITION_IN_COMPLETE, gameOverTransitionInComplete);
(gameOver_mc.submitBTN_mc as ButtonElement).enable();
(gameOver_mc.playBTN_mc as ButtonElement).enable();
}
private function transtionOutGameOver(_arg1:MouseEvent):void{
time = 0;
bonusInidcatorLevel1_mc.y = 2000;
bonusInidcatorLevel2_mc.y = 2000;
bonusInidcatorLevel3_mc.y = 2000;
bonusInidcatorLevel4_mc.y = 2000;
bonusInidcatorLevel5_mc.y = 2000;
bonusInidcatorLevel6_mc.y = 2000;
bonusInidcatorLevel7_mc.y = 2000;
if ((_arg1.currentTarget as DisplayObject).name == "submitBTN_mc"){
this._viewLeaderBoard = true;
};
gameOver_mc.playBTN_mc.removeEventListener(MouseEvent.CLICK, this.transtionOutGameOver);
gameOver_mc.submitBTN_mc.removeEventListener(MouseEvent.CLICK, this.transtionOutGameOver);
(gameOver_mc.submitBTN_mc as ButtonElement).disable();
(gameOver_mc.playBTN_mc as ButtonElement).disable();
(this.gameOver_mc as TransitionalElement).hide();
}
public function destroy():void{
if (this.hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, render);
};
if (this.hasEventListener(KeyboardEvent.KEY_DOWN)){
this.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
};
brick1 = null;
brick2 = null;
brick3 = null;
brick4 = null;
brick5 = null;
brick6 = null;
brick7 = null;
brick8 = null;
brick9 = null;
brick10 = null;
brick11 = null;
brick12 = null;
brick13 = null;
brick14 = null;
brick15 = null;
brick16 = null;
brick17 = null;
brick18 = null;
brick19 = null;
brick21 = null;
brick22 = null;
brick23 = null;
brick24 = null;
brick25 = null;
brick26 = null;
brick27 = null;
if (life1 != null){
life1 = null;
};
if (life2 != null){
life2 = null;
};
if (life3 != null){
life3 = null;
};
hitSound.destroy();
brickHitSound.destroy();
soundtrack.destroy();
bonusHit.destroy();
if (gameOver_mc != null){
gameOver_mc = null;
};
if (_leaderboard != null){
_leaderboard.destroyME();
_leaderboard = null;
this._leaderboard.removeEventListener(Leaderboard.DESTROYED, leaderboardDestroyed);
};
}
}
}//package com.disneyxd.games
Section 19
//Leaderboard (com.disneyxd.games.Leaderboard)
package com.disneyxd.games {
import flash.display.*;
import gs.*;
import flash.events.*;
import com.disneyxd.utils.*;
import gs.easing.*;
import flash.net.*;
import com.disneyxd.display.*;
import Leaderboard.*;
import flash.system.*;
public class Leaderboard extends Element {
private var _fromApp:LocalConnection;
public var loaderClip:LoadingClip;
private var loader:Loader;
private var _xml:XMLList;
private var _name:String;
private var _config:Config;
private var _title:String;
private var _fsd:MovieClip;
private var toApp:LocalConnection;
private var _toApp:String;
private var _gameID:String;
private var _transitioncount:uint;// = 0
private var _score:uint;
private var _game:String;
public var instructionBg_mc:MovieClip;
private static const STAGE_WIDTH:uint = 750;
private static const STAGE_HEIGHT:uint = 500;
private static const FROM_APP:String = "_fsdFromApp";
private static const MAGIC_KEY:String = "FSD_T!nk3r";
public static const DESTROYED:String = "destroyed";
private static const TO_APP:String = "_fsdToApp";
public function Leaderboard(){
_transitioncount = 0;
super();
addFrameScript(0, frame1, 11, frame12, 31, frame32);
Securities(Security);
_config = Config.getInstance();
this.initLeaderboard();
}
public function set userName(_arg1:String):void{
_name = _arg1;
}
private function xmlLoaded(_arg1:Event=null):void{
if (_arg1){
(_arg1.target as IEventDispatcher).removeEventListener(Event.COMPLETE, this.xmlLoaded);
};
_xml = _config.getGameXML();
loadLeaderboard();
}
public function fsdIrrecoverable(_arg1:String):void{
var szerror = _arg1;
try {
TweenMax.to(loaderClip.loadingText, 0.5, {alpha:0, ease:Quad.easeOut});
TweenMax.to(loaderClip.loadingCircle, 0.5, {alpha:0, ease:Quad.easeOut});
TweenMax.to(loaderClip.error_bg, 0.5, {alpha:1, ease:Quad.easeOut, delay:0.5, onComplete:showingError});
} catch(error:Error) {
};
}
public function fsdPlayAgain():void{
this.hide();
}
public function set score(_arg1:uint):void{
_score = _arg1;
}
public function set gameID(_arg1:String):void{
_gameID = _arg1;
}
private function initLeaderboard():void{
_toApp = Leaderboard.TO_APP;
if (toApp){
toApp.close();
toApp = null;
};
toApp = new LocalConnection();
toApp.connect(_toApp);
Securities(toApp);
toApp.client = this;
}
public function set game(_arg1:String):void{
_game = _arg1;
}
final private function loadComplete(_arg1:Event):void{
var _local2:LoaderInfo;
var _local3:Object;
_fsd = (loader.content as MovieClip);
_fsd.x = (Leaderboard.STAGE_WIDTH / 2);
_fsd.y = (Leaderboard.STAGE_HEIGHT / 2);
_fsd.alpha = 0;
loaderClip.visible = false;
_local2 = (_arg1.target as LoaderInfo);
_local2.removeEventListener(Event.COMPLETE, loadComplete);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
_fromApp = new LocalConnection();
Securities(_fromApp);
_fromApp.addEventListener(StatusEvent.STATUS, LCStatus);
_local3 = {toApp:_toApp, magic:Leaderboard.MAGIC_KEY, gameID:_gameID, title:_title, score:_score, name:_name, URLSkin:String(_xml.settings.URLSkin).toString()};
_fromApp.send(Leaderboard.FROM_APP, "fsdReportScore", _local3);
}
override public function hide():void{
TweenMax.to(this, 0.5, {alpha:0, ease:Quad.easeOut, onComplete:ready});
}
private function showingError():void{
(loaderClip.error_bg.playBTN_mc as ButtonElement).enable();
loaderClip.error_bg.playBTN_mc.addEventListener(MouseEvent.CLICK, errorRestart);
}
private function LCStatus(_arg1:StatusEvent):void{
if (_arg1.level == "error"){
fsdIrrecoverable(("Error sending score to FSD:" + _arg1.toString()));
};
}
public function destroyME():void{
try {
loader.close();
loader.unload();
loader = null;
} catch(error:Error) {
};
if (null != toApp){
toApp.close();
toApp = null;
};
if (null != toApp){
this._fromApp.close();
this._fromApp = null;
};
this.dispatchEvent(new Event(Leaderboard.DESTROYED));
}
function frame1(){
stop();
}
public function showLoader():void{
(loaderClip as IEventDispatcher).addEventListener(TransitionalElement.TRANSITION_IN_COMPLETE, loadXML);
(loaderClip as TransitionalElement).show();
}
function frame12(){
stop();
}
private function loadXML(_arg1:Event):void{
var _local2:IEventDispatcher;
if (!_config.xmlLoaded){
(loaderClip as IEventDispatcher).removeEventListener(TransitionalElement.TRANSITION_IN_COMPLETE, loadXML);
_local2 = _config.load();
_local2.addEventListener(Event.COMPLETE, xmlLoaded);
} else {
xmlLoaded();
loadLeaderboard();
};
}
function frame32(){
ready();
}
override protected function ready():void{
if (this._transitioncount == 1){
this.destroyME();
this._transitioncount = 0;
return;
};
this._transitioncount++;
}
public function loadLeaderboard():void{
var dispatcher:LoaderInfo;
try {
loader = new Loader();
addChild(loader);
loader.load(new URLRequest(_xml.settings.fsdURL));
dispatcher = loader.contentLoaderInfo;
dispatcher.addEventListener(Event.COMPLETE, loadComplete);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, loadError);
} catch(error:Error) {
fsdIrrecoverable(error.toString());
};
}
final private function loadError(_arg1:Event):void{
fsdIrrecoverable(("Error loading FSD:" + _arg1.toString()));
}
public function fsdReady():void{
(loaderClip as IEventDispatcher).addEventListener(TransitionalElement.TRANSITION_OUT_COMPLETE, this.show);
(loaderClip as TransitionalElement).hide();
_fromApp.removeEventListener(StatusEvent.STATUS, LCStatus);
}
public function set title(_arg1:String):void{
_title = _arg1;
}
private function errorRestart(_arg1:MouseEvent):void{
(loaderClip.error_bg.playBTN_mc as ButtonElement).kill();
loaderClip.error_bg.playBTN_mc.removeEventListener(MouseEvent.CLICK, errorRestart);
TweenMax.to(loaderClip.error_bg, 0.5, {alpha:0, ease:Quad.easeOut, onComplete:destroyME});
}
override public function show(_arg1:Number=0):void{
this.stop();
TweenMax.to(_fsd, 0.5, {alpha:1, ease:Quad.easeOut, onComplete:ready});
}
public static function Securities(_arg1):void{
_arg1.allowDomain("www.disney.go.com");
_arg1.allowDomain("disney.go.com");
_arg1.allowDomain("psc.disney.go.com");
_arg1.allowDomain("apsc.disney.go.com");
_arg1.allowDomain("tv.disney.go.com");
_arg1.allowDomain("atv.disney.go.com");
_arg1.allowDomain("scores.disney.go.com");
_arg1.allowDomain("dcapps.disney.go.com");
_arg1.allowDomain("studio.disney.go.com");
}
}
}//package com.disneyxd.games
Section 20
//Config (com.disneyxd.utils.Config)
package com.disneyxd.utils {
import flash.events.*;
import flash.net.*;
public class Config extends EventDispatcher {
private var settings:XML;
private var _xmlLoaded:Boolean;// = false
private static const DISNEY_CONFIG_URL:String = "xml/config.xml";
private static var creatable:Boolean = false;
private static var instance:Config;
public function Config(){
_xmlLoaded = false;
super();
if (!creatable){
throw (new Error("use Config.getInstance()"));
};
}
public function getGameXML():XMLList{
return (settings.gamesLeaderboard);
}
public function get isReady():Boolean{
return (!((settings == null)));
}
public function getSetting(_arg1:String):String{
var name = _arg1;
return (settings..setting.(@name == name).text());
}
private function handleConfigFile(_arg1:Event):void{
_xmlLoaded = true;
_arg1.target.removeEventListener(_arg1.type, handleConfigFile);
settings = new XML(_arg1.target.data);
dispatchEvent(new Event(Event.COMPLETE));
}
public function getTrackingXML():XMLList{
return (settings.tracking);
}
public function load():IEventDispatcher{
var _local1:URLLoader;
_local1 = new URLLoader();
_local1.addEventListener(Event.COMPLETE, handleConfigFile);
_local1.load(new URLRequest(DISNEY_CONFIG_URL));
return (_local1);
}
public function get xmlLoaded():Boolean{
return (_xmlLoaded);
}
public static function getInstance():Config{
if (!instance){
creatable = true;
instance = new (Config);
creatable = false;
};
return (instance);
}
}
}//package com.disneyxd.utils
Section 21
//TextFieldUtils (com.disneyxd.utils.TextFieldUtils)
package com.disneyxd.utils {
import flash.text.*;
import flash.display.*;
import flash.geom.*;
public class TextFieldUtils {
public static function highlightLine(_arg1:TextField, _arg2:int=0, _arg3:uint=0xFFFFFF, _arg4:Number=1):Sprite{
var _local5:int;
var _local6:Rectangle;
var _local7:TextLineMetrics;
var _local8:Sprite;
_local5 = _arg1.getLineOffset(_arg2);
_local6 = _arg1.getCharBoundaries(_local5);
_local7 = _arg1.getLineMetrics(_arg2);
_local8 = new Sprite();
_local8.x = _local7.x;
_local8.y = _arg1.y;
_local8.graphics.beginFill(_arg3, _arg4);
_local8.graphics.drawRect(_local6.x, _local6.y, _local7.width, _local7.height);
_local8.graphics.endFill();
return (_local8);
}
public static function highlightParagraph(_arg1:TextField, _arg2:int=0, _arg3:uint=0xFFFFFF, _arg4:Number=1, _arg5:Boolean=false):Array{
var _local6:Array;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:Sprite;
_local6 = new Array();
_local7 = _arg1.getFirstCharInParagraph(_arg2);
_local8 = _arg1.getParagraphLength(_arg2);
_local9 = _arg1.getLineIndexOfChar(_local7);
_local10 = _arg1.getLineIndexOfChar((_local8 - 1));
_local11 = _local9;
while (_local11 <= _local10) {
_local12 = TextFieldUtils.highlightLine(_arg1, _local11, _arg3, _arg4);
_local6.push(_local12);
_local11++;
};
return (_local6);
}
public static function addLeading(_arg1:TextField, _arg2:Number):void{
var _local3:TextFormat;
_local3 = new TextFormat();
_local3.leading = _arg2;
_arg1.setTextFormat(_local3);
}
public static function autoSize(_arg1:TextField, _arg2:String="left"):void{
var _local3:String;
switch (_arg2){
case "left":
_local3 = TextFieldAutoSize.LEFT;
break;
case "right":
_local3 = TextFieldAutoSize.RIGHT;
break;
case "center":
_local3 = TextFieldAutoSize.CENTER;
break;
case "none":
_local3 = TextFieldAutoSize.NONE;
break;
};
_arg1.autoSize = _local3;
}
public static function addTracking(_arg1:TextField, _arg2:Number):void{
var _local3:TextFormat;
_local3 = new TextFormat();
_local3.letterSpacing = _arg2;
_arg1.setTextFormat(_local3);
}
}
}//package com.disneyxd.utils
Section 22
//EmbeddedSound (com.xtools.base.sfx.EmbeddedSound)
package com.xtools.base.sfx {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
public class EmbeddedSound extends Sound {
private var listeners:Array;
private var _numLoop:Number;// = 1
private var sc:SoundChannel;
private var _numCurVol:Number;
private var st:SoundTransform;
private var _numLockVol:Number;
private var _source:URLRequest;// = null
public static const SOUND_COMPLETE:String = new String("soundComplete");
private static var LOCKMUTE:Boolean = false;
private static var __updater:Sprite;
private static var SOUNDS:Array;
private static var __me:EmbeddedSound;
public function EmbeddedSound(_arg1:String=null):void{
_numLoop = 1;
_source = null;
listeners = new Array();
if (_arg1){
this._source = new URLRequest(_arg1);
};
super(this._source);
}
public function destroy():void{
var _local1:Array;
var _local2:uint;
_local1 = new Array();
_stop();
_source = null;
st = null;
sc = null;
removeAllListeners();
_local2 = 0;
while (_local2 < SOUNDS.length) {
if (EmbeddedSound(SOUNDS[_local2]) != this){
_local1.push(SOUNDS[_local2]);
};
_local2++;
};
SOUNDS = _local1;
}
public function _play(_arg1:Number=1, _arg2:Boolean=false, _arg3:Number=1):SoundChannel{
_numLockVol = _arg1;
_numLoop = _arg3;
_numCurVol = (LOCKMUTE) ? 0 : _arg1;
sc = this.play(0, _numLoop);
st = sc.soundTransform;
st.volume = (((_arg2) || (LOCKMUTE))) ? 0 : _arg1;
sc.soundTransform = st;
sc.addEventListener(Event.SOUND_COMPLETE, soundComplete, false, 0, true);
__updater.addEventListener(Event.ENTER_FRAME, update);
return (sc);
}
public function setVolume(_arg1:Number){
if (((st) && (sc))){
if (_arg1 > 1){
_numLockVol = (_numCurVol = _arg1);
} else {
_numCurVol = ((_arg1)<0) ? _numLockVol : _arg1;
};
st.volume = _numCurVol;
sc.soundTransform = st;
};
}
protected function getExistingSound(_arg1:EmbeddedSound):EmbeddedSound{
var _local2:uint;
_local2 = 0;
while (_local2 < SOUNDS.length) {
if (SOUNDS[_local2] == _arg1){
return (_arg1);
};
_local2++;
};
return (null);
}
public function removeListener(_arg1:String, _arg2:Function):void{
if (![_arg1]){
throw (new Error((("Error: No type [" + _arg1) + "]")));
};
this.removeEventListener(_arg1, _arg2, false);
}
private function init():void{
__me = (__me) ? __me : this;
if (!__updater){
__updater = new Sprite();
};
if (!SOUNDS){
SOUNDS = new Array();
};
if (!getExistingSound(this)){
SOUNDS.push(this);
};
}
public function removeAllListeners(){
var _local1:*;
for (_local1 in this.listeners) {
this.removeListener(_local1, this.listeners[_local1]);
};
this.listeners = new Array();
}
protected function fadeSounds(_arg1:Boolean):void{
_numCurVol = (_arg1) ? 0 : _numLockVol;
}
private function update(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = Math.round((st.volume * 100));
_local3 = Math.round((_numCurVol * 100));
if (_local2 != _local3){
st.volume = (st.volume + ((_numCurVol - st.volume) * 0.05));
sc.soundTransform = st;
};
}
public function _stop(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (!_arg2){
_numLockVol = 0;
};
if (sc){
sc.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
__updater.removeEventListener(Event.ENTER_FRAME, update);
if (_arg1){
_numCurVol = 0;
__updater.addEventListener(Event.ENTER_FRAME, update);
} else {
st.volume = 0;
sc.soundTransform = st;
sc.stop();
};
};
}
private function quit(_arg1:Event=null):void{
this._stop();
}
override public function play(_arg1:Number=0, _arg2:int=0, _arg3:SoundTransform=null):SoundChannel{
init();
return (super.play(_arg1, _arg2, _arg3));
}
public function addListener(_arg1:String, _arg2:Function):void{
if (![_arg1]){
throw (new Error((("Error: No type [" + _arg1) + "]")));
};
this.listeners[_arg1] = _arg2;
this.addEventListener(_arg1, _arg2, false, 0, true);
}
private function soundComplete(_arg1:Event):void{
dispatchEvent(new Event(SOUND_COMPLETE));
if (sc){
sc.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
};
if (__updater){
__updater.removeEventListener(Event.ENTER_FRAME, update);
};
}
public static function isMuted():Boolean{
return (LOCKMUTE);
}
public static function _lockMute(_arg1:Boolean=true, _arg2:Boolean=false):void{
var _local3:uint;
LOCKMUTE = _arg1;
if (!SOUNDS){
return;
};
_local3 = 0;
while (_local3 < SOUNDS.length) {
if (_arg2){
EmbeddedSound(SOUNDS[_local3]).fadeSounds(LOCKMUTE);
} else {
EmbeddedSound(SOUNDS[_local3]).setVolume((LOCKMUTE) ? 0 : -1);
};
_local3++;
};
}
}
}//package com.xtools.base.sfx
Section 23
//Quad (gs.easing.Quad)
package gs.easing {
public class Quad {
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 easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package gs.easing
Section 24
//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 25
//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 = 0.992;
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 == "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.21){
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
}
}//package gs
Section 26
//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.24;
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.24){
};
}
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) / 1000) * 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 ");
_roundProps = (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 27
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
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 startTime:Number;
public var forceActive:Boolean;
public var duration:Number;
protected var _specialVars:Object;
public var target:Object;
protected var _hst:Boolean;
public var gc:Boolean;
protected var _isDisplayObject:Boolean;
public var vars:Object;
public var ease:Function;
public var tweens:Array;
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.25;
public static var masterList:Dictionary = new Dictionary(false);
private static var _sprite:Sprite = new Sprite();
public static var currentTime:uint;
public static var overwriteManager:Object;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:int;
super();
if (_arg1 == null){
return;
};
if (!_classInitted){
currentTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage);
_timer.start();
_classInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.forceActive = (((_arg2 == 0)) && ((this.delay == 0)));
this.target = _arg1;
_isDisplayObject = (_arg1 is DisplayObject);
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 = (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.forceActive))){
initTweenVals();
if (this.forceActive){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((_specialVars.visible == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){
this.target.visible = _specialVars.visible;
};
};
}
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 get active():Boolean{
if (this.forceActive){
return (true);
};
if (this.gc){
return (false);
};
if (currentTime >= this.startTime){
this.started = (this.forceActive = 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);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:int;
_local2 = ((_arg1 - this.startTime) / 1000);
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);
};
}
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 clear():void{
this.tweens = [];
_subTweens = [];
this.vars = {};
_hst = (_hasUpdate = false);
}
public function get enabled():Boolean{
return (!(this.gc));
}
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)))) && (_isDisplayObject))){
_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 == "timeScale")) && (!((this.target is TweenLite))))))) || ((_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;
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, []);
};
}
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 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);
};
};
} else {
if ((this.target is DisplayObject)){
};
};
this.gc = !(_arg1);
if (this.gc){
this.forceActive = false;
} else {
this.forceActive = this.started;
};
}
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 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 executeAll(_arg1:Event=null):void{
var _local2:uint;
var _local3:Dictionary;
var _local4:Array;
var _local5:int;
_local2 = (currentTime = getTimer());
_local3 = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
if (((!((_local4[_local5] == null))) && (_local4[_local5].active))){
_local4[_local5].render(_local2);
};
_local5--;
};
};
}
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 volumeProxy(_arg1:Object, _arg2:Number=0):void{
_arg1.info.target.soundTransform = _arg1.target;
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local2:Dictionary;
var _local3:Object;
var _local4:Array;
var _local5:int;
_local2 = masterList;
for (_local3 in _local2) {
_local4 = _local2[_local3];
_local5 = (_local4.length - 1);
while (_local5 > -1) {
if (_local4[_local5].gc){
_local4.splice(_local5, 1);
};
_local5--;
};
if (_local4.length == 0){
delete _local2[_local3];
};
};
}
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 to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 28
//TweenMax (gs.TweenMax)
package gs {
import flash.events.*;
import gs.events.*;
import flash.utils.*;
public class TweenMax extends TweenFilterLite implements IEventDispatcher {
protected var _dispatcher:EventDispatcher;
protected var _callbacks:Object;
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.36;
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();
};
};
if ((((this.vars.yoyo == true)) || ((this.vars.loop == true)))){
this.vars.persist = true;
};
if (TweenFilterLite.version < 9.24){
};
}
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)));
};
if (this.target != this.vars.onComplete){
render(this.startTime);
};
this.pauseTime = NaN;
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{
var _local1:Number;
var _local2:Boolean;
this.enabled = true;
if (!isNaN(this.pauseTime)){
_local1 = (this.delay * (1000 / this.combinedTimeScale));
_local2 = (this.pauseTime > (this.initTime + _local1));
this.initTime = (this.initTime + (currentTime - this.pauseTime));
this.startTime = (this.initTime + _local1);
this.pauseTime = NaN;
if (((!(_local2)) && ((currentTime >= this.startTime)))){
_local2 = this.active;
} else {
this.forceActive = _local2;
};
_pausedTweens[this] = null;
delete _pausedTweens[this];
};
}
public function get paused():Boolean{
return ((this.startTime == 999999999999999));
}
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) / 1000) - (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 ((((this.vars.yoyo == true)) || ((this.vars.loop == true)))){
if (this.vars.yoyo == true){
this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease;
};
this.startTime = currentTime;
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
} else {
if (this.vars.persist == true){
pause();
};
};
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;
_arg2 = (_arg2 + " hexColors bezier bezierThrough 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 (((!((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{
var _local2:Boolean;
var _local3:Boolean;
this.startTime = (currentTime - ((this.duration * _arg1) * 1000));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
_local2 = this.gc;
this.gc = false;
_local3 = this.active;
this.gc = _local2;
render(currentTime);
if (!isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.forceActive = 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();
};
}
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};
_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].e;
};
} 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.s + (_local9 * (((2 * (1 - _local9)) * (_local8.cp - _local8.s)) + (_local9 * (_local8.e - _local8.s)))));
};
};
}
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] = {s:_local4[0], cp:(_local4[1] - ((_local4[2] - _local4[0]) / 4)), e:_local4[1]};
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = {s:_local4[_local3], cp:(_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)].cp)), e:_local4[(_local3 + 1)]};
_local3++;
};
} else {
_local5[_local5.length] = {s:_local4[0], cp:((_local4[0] + _local4[1]) / 2), e:_local4[1]};
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = {s:_local4[0], cp:_local4[1], e:((_local4[1] + _local4[2]) / 2)};
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = {s:_local5[(_local3 - 2)].e, cp:_local4[_local3], e:((_local4[_local3] + _local4[(_local3 + 1)]) / 2)};
_local3++;
};
_local5[_local5.length] = {s:_local5[(_local5.length - 1)].e, cp:_local4[(_local4.length - 2)], e:_local4[(_local4.length - 1)]};
} else {
if (_local4.length == 3){
_local5[_local5.length] = {s:_local4[0], cp:_local4[1], e:_local4[2]};
} else {
if (_local4.length == 2){
_local5[_local5.length] = {s:_local4[0], cp:((_local4[0] + _local4[1]) / 2), e:_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;
_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:int;
_local2 = masterList[_arg1];
_local3 = [];
if (_local2 != null){
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (!_local2[_local4].gc){
_local3[_local3.length] = _local2[_local4];
};
_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;
_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--;
};
};
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;
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 29
//LoadingClip (Leaderboard.LoadingClip)
package Leaderboard {
import com.disneyxd.display.*;
public dynamic class LoadingClip extends TransitionalElement {
public function LoadingClip(){
addFrameScript(11, frame12, 31, frame32);
}
function frame12(){
stop();
ready();
}
function frame32(){
ready();
}
}
}//package Leaderboard
Section 30
//Ball_Contact (Ball_Contact)
package {
import com.xtools.base.sfx.*;
public dynamic class Ball_Contact extends EmbeddedSound {
}
}//package
Section 31
//Bonus (Bonus)
package {
import flash.display.*;
public dynamic class Bonus extends MovieClip {
}
}//package
Section 32
//BonusDrop (BonusDrop)
package {
import com.xtools.base.sfx.*;
public dynamic class BonusDrop extends EmbeddedSound {
}
}//package
Section 33
//BonusHit (BonusHit)
package {
import com.xtools.base.sfx.*;
public dynamic class BonusHit extends EmbeddedSound {
}
}//package
Section 34
//Brick (Brick)
package {
import flash.display.*;
public dynamic class Brick extends MovieClip {
public function Brick(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 35
//Brick1 (Brick1)
package {
import flash.display.*;
public dynamic class Brick1 extends MovieClip {
}
}//package
Section 36
//Brick10 (Brick10)
package {
import flash.display.*;
public dynamic class Brick10 extends MovieClip {
}
}//package
Section 37
//Brick11 (Brick11)
package {
import flash.display.*;
public dynamic class Brick11 extends MovieClip {
}
}//package
Section 38
//Brick12 (Brick12)
package {
import flash.display.*;
public dynamic class Brick12 extends MovieClip {
}
}//package
Section 39
//Brick13 (Brick13)
package {
import flash.display.*;
public dynamic class Brick13 extends MovieClip {
}
}//package
Section 40
//Brick14 (Brick14)
package {
import flash.display.*;
public dynamic class Brick14 extends MovieClip {
}
}//package
Section 41
//Brick15 (Brick15)
package {
import flash.display.*;
public dynamic class Brick15 extends MovieClip {
}
}//package
Section 42
//Brick16 (Brick16)
package {
import flash.display.*;
public dynamic class Brick16 extends MovieClip {
}
}//package
Section 43
//Brick17 (Brick17)
package {
import flash.display.*;
public dynamic class Brick17 extends MovieClip {
}
}//package
Section 44
//Brick18 (Brick18)
package {
import flash.display.*;
public dynamic class Brick18 extends MovieClip {
}
}//package
Section 45
//Brick19 (Brick19)
package {
import flash.display.*;
public dynamic class Brick19 extends MovieClip {
}
}//package
Section 46
//Brick2 (Brick2)
package {
import flash.display.*;
public dynamic class Brick2 extends MovieClip {
}
}//package
Section 47
//Brick20 (Brick20)
package {
import flash.display.*;
public dynamic class Brick20 extends MovieClip {
}
}//package
Section 48
//Brick21 (Brick21)
package {
import flash.display.*;
public dynamic class Brick21 extends MovieClip {
}
}//package
Section 49
//Brick22 (Brick22)
package {
import flash.display.*;
public dynamic class Brick22 extends MovieClip {
}
}//package
Section 50
//Brick23 (Brick23)
package {
import flash.display.*;
public dynamic class Brick23 extends MovieClip {
}
}//package
Section 51
//Brick24 (Brick24)
package {
import flash.display.*;
public dynamic class Brick24 extends MovieClip {
}
}//package
Section 52
//Brick25 (Brick25)
package {
import flash.display.*;
public dynamic class Brick25 extends MovieClip {
}
}//package
Section 53
//Brick26 (Brick26)
package {
import flash.display.*;
public dynamic class Brick26 extends MovieClip {
}
}//package
Section 54
//Brick27 (Brick27)
package {
import flash.display.*;
public dynamic class Brick27 extends MovieClip {
}
}//package
Section 55
//Brick3 (Brick3)
package {
import flash.display.*;
public dynamic class Brick3 extends MovieClip {
}
}//package
Section 56
//Brick4 (Brick4)
package {
import flash.display.*;
public dynamic class Brick4 extends MovieClip {
}
}//package
Section 57
//Brick5 (Brick5)
package {
import flash.display.*;
public dynamic class Brick5 extends MovieClip {
}
}//package
Section 58
//Brick6 (Brick6)
package {
import flash.display.*;
public dynamic class Brick6 extends MovieClip {
}
}//package
Section 59
//Brick7 (Brick7)
package {
import flash.display.*;
public dynamic class Brick7 extends MovieClip {
}
}//package
Section 60
//Brick8 (Brick8)
package {
import flash.display.*;
public dynamic class Brick8 extends MovieClip {
}
}//package
Section 61
//Brick9 (Brick9)
package {
import flash.display.*;
public dynamic class Brick9 extends MovieClip {
}
}//package
Section 62
//BrickHit (BrickHit)
package {
import com.xtools.base.sfx.*;
public dynamic class BrickHit extends EmbeddedSound {
}
}//package
Section 63
//GameOver_mc (GameOver_mc)
package {
import com.disneyxd.display.*;
public dynamic class GameOver_mc extends TransitionalElement {
public function GameOver_mc(){
addFrameScript(10, frame11, 29, frame30);
}
function frame30(){
ready();
}
function frame11(){
stop();
ready();
}
}
}//package
Section 64
//HitSide (HitSide)
package {
import com.xtools.base.sfx.*;
public dynamic class HitSide extends EmbeddedSound {
}
}//package
Section 65
//Life1 (Life1)
package {
import flash.display.*;
public dynamic class Life1 extends MovieClip {
}
}//package
Section 66
//Life2 (Life2)
package {
import flash.display.*;
public dynamic class Life2 extends MovieClip {
}
}//package
Section 67
//Life3 (Life3)
package {
import flash.display.*;
public dynamic class Life3 extends MovieClip {
}
}//package
Section 68
//Loose (Loose)
package {
import com.xtools.base.sfx.*;
public dynamic class Loose extends EmbeddedSound {
}
}//package
Section 69
//MyFont (MyFont)
package {
import flash.text.*;
public dynamic class MyFont extends Font {
}
}//package
Section 70
//playBTN (playBTN)
package {
import com.disneyxd.display.*;
public dynamic class playBTN extends ButtonElement {
}
}//package
Section 71
//Soundtrack (Soundtrack)
package {
import com.xtools.base.sfx.*;
public dynamic class Soundtrack extends EmbeddedSound {
}
}//package
Section 72
//submitScoreBTN_mc (submitScoreBTN_mc)
package {
import com.disneyxd.display.*;
public dynamic class submitScoreBTN_mc extends ButtonElement {
}
}//package
Section 73
//Value500 (Value500)
package {
import flash.display.*;
public dynamic class Value500 extends MovieClip {
public function Value500(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package