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

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

BridgeCraft.swf

This is the info page for
Flash #204688

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


Text
PicasoGames

next

next

skip

skip

yes

yes

no

no

<p align="justify"><font face="AvantGardEF-Medium" size="14" color="#000000" letterSpacing="0.000000" kerning="1">To install a piece of the bridge, click on the edge of the bank where you would like it to start and draw a line to where you want the piece to end.</font></p><p align="justify"><font face="AvantGardEF-Medium" size="14" color="#000000" letterSpacing="0.000000" kerning="1">Don’t forget - there is a size limit for each piece of bridge!</font></p>

play bonus levels

play bonus levels

Developed by PicasoGames

Producer

Game Designers

Programmer

Artists

User Interface by

Music and Sounds by

Andrey Andriyanov

Alex Veretennikov

Maxim Oblezin

Roman Evpakov

Mihail Poluhin

Alisa Anashkina

Dynamedion GbR

Candystand.com

Ivan Kuznetsov

Maxim Klokov

Story Editor

Paul Atkinson

Copyright 2009, PicasoGames. All Rights Reserved Worldwide

CREDITS

www.soundsnap.com

Level Editor by

Special thanks to David Fahrer and CandyStand’s QA team.

back

back

To build a piece of bridge,
click the green anchor point
you would like to start from,
and draw a line to where
you want the piece to end.
Don’t forget - there is a size
limit for each piece of
bridge!

Help the Euwins rebuild their city!
Construct bridges so they can cross safely
over the flood waters.

To remove a piece of
bridge, hover over it and
click the left mouse
button. To delete multiple
pieces, click the anchor
points connecting them.

The Euwins can walk on deck pieces.

Steel can strengthen a bridge and make it
more sturdy, but is expensive to purchase.

Rope is a weaker tool for strengthening a
bridge, but is inexpensive to purchase.

rope

deck

steel

bridge materials

Click and drag to scroll
around the level.

To zoom within the level,
use the "+" and "-" buttons:

Identifies which areas of your bridge may be
weak. A blue aura represents stretching of a
certain segment and a red aura represents
the pressure applied to it.

Cancels your last action.

Clears the screen and refunds your money.

show stress

undo

reset

stage options

Always be sure to keep track of your budget after buying
materials! If you run out of money, you won’t be able to build
all the bridges the Euwins need!

your budget

$30000

budget

GOOD LUCK!

<p align="center"><font face="AvantGardEF-Bold" size="16" color="#000000" letterSpacing="0.000000" kerning="1">00000</font></p>

start

start

edit

edit

$100

rope

$200

steel

deck

$300

<p align="center"><font face="AvantGardEF-Bold" size="22" color="#333333" letterSpacing="0.000000" kerning="1">Q &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p>

T

quit / submit

quit / submit

intro

intro

ending

ending

<p align="center"><font face="AvantGardEF-Medium" size="22" color="#000000" letterSpacing="0.000000" kerning="1">Total Score: 2833</font></p>

LEVEL SELECT

ok

ok

<p align="justify"><font face="AvantGardEF-Medium" size="14" color="#000000" letterSpacing="0.000000" kerning="1">To install a piece of the bridge, click on the edge of the bank where you would like it to start and draw a line to where you want the piece to end.</font></p><p align="justify"><font face="AvantGardEF-Medium" size="14" color="#000000" letterSpacing="0.000000" kerning="1">Don’t forget - there is a size limit for each piece of bridge!</font></p>

<p align="center"><font face="AvantGardEF-Bold" size="28" color="#000000" letterSpacing="0.000000" kerning="1">Player</font></p>

OK

Oh no! Your bridge collapsed!
Do you want to try again?

skip level

skip level

<p align="right"><font face="AvantGardEF-Medium" size="18" color="#000000" letterSpacing="0.000000" kerning="1">Difficulty:</font></p>

<p align="right"><font face="AvantGardEF-Medium" size="18" color="#000000" letterSpacing="0.000000" kerning="1">Budget:</font></p>

<p align="right"><font face="AvantGardEF-Bold" size="18" color="#000000" letterSpacing="0.000000" kerning="1">Your score:</font></p>

<p align="right"><font face="AvantGardEF-Bold" size="18" color="#000000" letterSpacing="0.000000" kerning="1">Your best score:</font></p>

retry

retry

map

map

<p align="left"><font face="AvantGardEF-Medium" size="20" color="#000000" letterSpacing="0.000000" kerning="1">000000</font></p>

<p align="left"><font face="AvantGardEF-Medium" size="20" color="#000000" letterSpacing="0.000000" kerning="1">000000</font></p>

<p align="left"><font face="AvantGardEF-Bold" size="20" color="#000000" letterSpacing="0.000000" kerning="1">000000</font></p>

<p align="left"><font face="AvantGardEF-Bold" size="20" color="#000000" letterSpacing="0.000000" kerning="1">000000</font></p>

<p align="center"><font face="AvantGardEF-Bold" size="18" color="#000000" letterSpacing="0.000000" kerning="1">1</font></p>

In a far away solar system, on a small planet much like our own, lived
the Euwins - kind little creatures who enjoyed a peaceful existence…

next

Then one day, out of nowhere, a massive tidal wave appeared
and nearly washed away their entire city!

In order to rebuild their city, the Euwins need your help!

Thanks to you, all the bridges have been rebuilt and the Euwins can
be safe and happy once again!
Feel free to return at any time to replace the bridges you originally
constructed with even better ones!

close

close

reset

reset

To reset the score and all stored data press the
"reset" button.

To close this window without any action press
the "close" button.

To pass the level instantly and go to the next
one press the "next" button.

contact us

contact us

OK

send

send

send

back

back

Add to my site/blog

Developer's website

Interested in licensing a game, or do you have a game development inquiry?
In need of game support? Please use the contact form to get in touch.

Contact us

Thank You!

quit/submit

quit/submit

<p align="center"><font face="AvantGardEF-Medium" size="20" color="#0000ff" letterSpacing="0.000000" kerning="1"> www.bridgecraftworld.com</font></p>

<p align="center"><font face="AvantGardEF-Bold" size="20" color="#000000" letterSpacing="0.000000" kerning="1">You did well, Player!</font></p>

The Euwins are together now, but there a lot more
bridges that must be rebuilded to return peace
into their world. Play 40 bonus levels on

<p align="center"><font face="AvantGardEF-Medium" size="20" color="#0000ff" letterSpacing="0.000000" kerning="1">www.candystand.com</font></p>

or

...

<p align="justify"><font face="AvantGardEF-Medium" size="14" color="#000000" letterSpacing="0.000000" kerning="1">To install a piece of the bridge, click on the edge of the bank where you would like it to start and draw a line to where you want the piece to end.</font></p><p align="justify"><font face="AvantGardEF-Medium" size="14" color="#000000" letterSpacing="0.000000" kerning="1">Don’t forget - there is a size limit for each piece of bridge!</font></p>

<p align="justify"><font face="AvantGardEF-Medium" size="14" color="#000000" letterSpacing="0.000000" kerning="1">To install a piece of the bridge, click on the edge of the bank where you would like it to start and draw a line to where you want the piece to end.</font></p><p align="justify"><font face="AvantGardEF-Medium" size="14" color="#000000" letterSpacing="0.000000" kerning="1">Don’t forget - there is a size limit for each piece of bridge!</font></p>

ActionScript [AS3]

Section 1
//wav (bird1.wav) package bird1 { import flash.media.*; public dynamic class wav extends Sound { } }//package bird1
Section 2
//wav (bird2.wav) package bird2 { import flash.media.*; public dynamic class wav extends Sound { } }//package bird2
Section 3
//wav (bird3.wav) package bird3 { import flash.media.*; public dynamic class wav extends Sound { } }//package bird3
Section 4
//wav (bird4.wav) package bird4 { import flash.media.*; public dynamic class wav extends Sound { } }//package bird4
Section 5
//BaloonFromLoader_703 (BridgeCraft_CS3_Viral_fla.BaloonFromLoader_703) package BridgeCraft_CS3_Viral_fla { import flash.display.*; public dynamic class BaloonFromLoader_703 extends MovieClip { public var maskMC:MovieClip; } }//package BridgeCraft_CS3_Viral_fla
Section 6
//cvetok_cvetok_prijok4_599 (BridgeCraft_CS3_Viral_fla.cvetok_cvetok_prijok4_599) package BridgeCraft_CS3_Viral_fla { import flash.display.*; public dynamic class cvetok_cvetok_prijok4_599 extends MovieClip { public function cvetok_cvetok_prijok4_599(){ addFrameScript(7, frame8); } function frame8(){ stop(); } } }//package BridgeCraft_CS3_Viral_fla
Section 7
//cvetok_cvetok_prijok44_604 (BridgeCraft_CS3_Viral_fla.cvetok_cvetok_prijok44_604) package BridgeCraft_CS3_Viral_fla { import flash.display.*; public dynamic class cvetok_cvetok_prijok44_604 extends MovieClip { public function cvetok_cvetok_prijok44_604(){ addFrameScript(15, frame16); } function frame16(){ stop(); } } }//package BridgeCraft_CS3_Viral_fla
Section 8
//cvetok_morgaet_461 (BridgeCraft_CS3_Viral_fla.cvetok_morgaet_461) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class cvetok_morgaet_461 extends MovieClip { public function cvetok_morgaet_461(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 9
//cvetok_morgaet2_475 (BridgeCraft_CS3_Viral_fla.cvetok_morgaet2_475) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class cvetok_morgaet2_475 extends MovieClip { public function cvetok_morgaet2_475(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 10
//glazan_morgaet_487 (BridgeCraft_CS3_Viral_fla.glazan_morgaet_487) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class glazan_morgaet_487 extends MovieClip { public function glazan_morgaet_487(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 11
//glazan_morgaet_morgaet_498 (BridgeCraft_CS3_Viral_fla.glazan_morgaet_morgaet_498) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class glazan_morgaet_morgaet_498 extends MovieClip { public function glazan_morgaet_morgaet_498(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 12
//larin_morgaet_2_521 (BridgeCraft_CS3_Viral_fla.larin_morgaet_2_521) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class larin_morgaet_2_521 extends MovieClip { public function larin_morgaet_2_521(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 13
//larin_morgaet_510 (BridgeCraft_CS3_Viral_fla.larin_morgaet_510) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class larin_morgaet_510 extends MovieClip { public function larin_morgaet_510(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 14
//logo_696 (BridgeCraft_CS3_Viral_fla.logo_696) package BridgeCraft_CS3_Viral_fla { import flash.display.*; public dynamic class logo_696 extends MovieClip { public var logobutton:SimpleButton; } }//package BridgeCraft_CS3_Viral_fla
Section 15
//MainTimeline (BridgeCraft_CS3_Viral_fla.MainTimeline) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; import flash.events.*; import flash.net.*; public dynamic class MainTimeline extends MovieClip { public var urlEnd:Number; public var urlStart:Number; public var domEnd:Number; public var _mochiads_game_id:String; public var stinger:BcwStinger; public var url:String; public var preLoaderBar:PreLoaderBar; public var LastDot:Number; public var whiteBorder:MovieClip; public var pauseCount:int; public var buttonUnderCS:SimpleButton; public var csStinger:ViralStinger; public var whiteRect:MovieClip; public var index:int; public var domain:String; public var tmpCounter:int; public var game:BridgeCraft; public function MainTimeline(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 4, frame5); } public function fadeOut(_arg1:Event):void{ if (whiteRect.alpha < 0.95){ whiteRect.alpha = (whiteRect.alpha + (Math.abs((whiteRect.alpha - 1)) / 2)); } else { whiteRect.alpha = 1; this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.play(); }; } function frame1(){ whiteRect.visible = true; whiteRect.alpha = 0; whiteRect.mouseEnabled = false; whiteRect.mouseChildren = false; this.stop(); tmpCounter = 0; (csStinger as ViralStinger).gotoAndPlay(1); (csStinger as ViralStinger).addEventListener(Event.ENTER_FRAME, onEnterFrameHandler, false, 0, true); (csStinger as ViralStinger).mouseEnabled = false; (csStinger as ViralStinger).mouseChildren = false; buttonUnderCS.addEventListener(MouseEvent.CLICK, clickOnStinger, false, 0, true); Config.VIRAL = true; _mochiads_game_id = "e32a30fd0af071a8"; url = this.loaderInfo.url; urlStart = (url.indexOf("://") + 3); urlEnd = url.indexOf("/", urlStart); domain = url.substring(urlStart, urlEnd); LastDot = (domain.lastIndexOf(".") - 1); domEnd = (domain.lastIndexOf(".", LastDot) + 1); domain = domain.substring(domEnd, domain.length); GAManager.account = "UA-4255442-1"; if (Config.VIRAL){ GAManager.prefixString = "/bridgecraft/viral"; MochiBot.track(this, "d40eb2da"); } else { GAManager.prefixString = "/bridgecraft/full"; }; GAManager.initTracker(this); GAManager.trackPage(("/game-start-loading-from-" + domain)); } function frame3(){ this.stop(); stinger = new BcwStinger(); stinger.x = 45; stinger.y = 40; stinger.addEventListener(BcwStinger.STINGER_COMPLETE, onStingerComplete); this.addChild(stinger); } function frame5(){ this.stop(); index = getChildIndex(whiteBorder); game = new BridgeCraft(); this.addChildAt(game, index); game.init(); GAManager.trackPage("/game-loaded"); } function frame2(){ this.stop(); whiteRect.visible = true; pauseCount = 30; preLoaderBar.addEventListener(PreLoaderBar.LOADED, onLoaded); preLoaderBar.init(); whiteRect.alpha = 1; this.addEventListener(Event.ENTER_FRAME, fadeIn); } public function fadeIn(_arg1:Event):void{ if (whiteRect.alpha > 0.05){ whiteRect.alpha = (whiteRect.alpha - (Math.abs(whiteRect.alpha) / 2)); } else { whiteRect.alpha = 0; this.removeEventListener(Event.ENTER_FRAME, fadeIn); }; } public function clickOnStinger(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(Config.CS_URL), "_blank"); } public function onStingerComplete(_arg1:Event):void{ stinger.removeEventListener(BcwStinger.STINGER_COMPLETE, onStingerComplete); this.play(); } public function pauseBeforeGo(_arg1:Event):void{ pauseCount--; if (pauseCount == 0){ this.removeEventListener(Event.ENTER_FRAME, pauseBeforeGo); if (this.hasEventListener(Event.ENTER_FRAME)){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); }; this.addEventListener(Event.ENTER_FRAME, fadeOut); }; } public function onLoaded(_arg1:Event):void{ preLoaderBar.removeEventListener(PreLoaderBar.LOADED, onLoaded); this.addEventListener(Event.ENTER_FRAME, pauseBeforeGo); } public function onEnterFrameHandler(_arg1:Event):void{ if ((csStinger as ViralStinger).currentFrame == (csStinger as ViralStinger).totalFrames){ if (tmpCounter > (this.stage.frameRate / 2)){ if (whiteRect.alpha < 0.95){ whiteRect.alpha = (whiteRect.alpha + (Math.abs((whiteRect.alpha - 1)) / 2)); } else { whiteRect.alpha = 1; (csStinger as ViralStinger).removeEventListener(Event.ENTER_FRAME, onEnterFrameHandler); buttonUnderCS.removeEventListener(MouseEvent.CLICK, clickOnStinger); this.play(); }; } else { tmpCounter++; }; }; } } }//package BridgeCraft_CS3_Viral_fla
Section 16
//pi_games_680 (BridgeCraft_CS3_Viral_fla.pi_games_680) package BridgeCraft_CS3_Viral_fla { import flash.display.*; public dynamic class pi_games_680 extends MovieClip { public function pi_games_680(){ addFrameScript(19, frame20); } function frame20(){ stop(); } } }//package BridgeCraft_CS3_Viral_fla
Section 17
//prezer_morgaet_2_542 (BridgeCraft_CS3_Viral_fla.prezer_morgaet_2_542) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class prezer_morgaet_2_542 extends MovieClip { public function prezer_morgaet_2_542(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 18
//prezer_morgaet_529 (BridgeCraft_CS3_Viral_fla.prezer_morgaet_529) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class prezer_morgaet_529 extends MovieClip { public function prezer_morgaet_529(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 19
//svet_morgaet_2_571 (BridgeCraft_CS3_Viral_fla.svet_morgaet_2_571) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class svet_morgaet_2_571 extends MovieClip { public function svet_morgaet_2_571(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 20
//svet_morgaet_554 (BridgeCraft_CS3_Viral_fla.svet_morgaet_554) package BridgeCraft_CS3_Viral_fla { import flash.display.*; import core.*; public dynamic class svet_morgaet_554 extends MovieClip { public function svet_morgaet_554(){ addFrameScript(0, frame1); } function frame1(){ if (Math.random() < Config.PROTAGONISTS_EYES_SPEED){ this.gotoAndStop(1); } else { this.play(); }; } } }//package BridgeCraft_CS3_Viral_fla
Section 21
//TextFromLoader_705 (BridgeCraft_CS3_Viral_fla.TextFromLoader_705) package BridgeCraft_CS3_Viral_fla { import flash.display.*; public dynamic class TextFromLoader_705 extends MovieClip { public var maskMC:MovieClip; } }//package BridgeCraft_CS3_Viral_fla
Section 22
//wrap_47 (BridgeCraft_CS3_Viral_fla.wrap_47) package BridgeCraft_CS3_Viral_fla { import flash.display.*; public dynamic class wrap_47 extends MovieClip { public function wrap_47(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BridgeCraft_CS3_Viral_fla
Section 23
//Cvetok (characters.Cvetok) package characters { public class Cvetok extends Protagonist { public function Cvetok(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package characters
Section 24
//Glazan (characters.Glazan) package characters { public class Glazan extends Protagonist { public function Glazan(_arg1:Number, _arg2:Number, _arg3:Boolean=true){ super(_arg1, _arg2, _arg3); } } }//package characters
Section 25
//Larin (characters.Larin) package characters { public class Larin extends Protagonist { public function Larin(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package characters
Section 26
//Prezer (characters.Prezer) package characters { public class Prezer extends Protagonist { public function Prezer(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package characters
Section 27
//Protagonist (characters.Protagonist) package characters { import flash.display.*; import core.*; import org.cove.ape.*; import flash.events.*; import sounds.*; public class Protagonist extends MovieClip { private var _currentAction:int; private var _alpha:Number; private var _bottom:Number; private var _hasParticle:Boolean; public var particle:WheelParticle; private var _paused;// = false private var _manualMode:Boolean;// = false private var _waitingForRun:Boolean; private var _idle:Boolean; private var _actions:Array; private var _sign:Number; private var _isSwimming:Boolean; private var _beta:Number; private var _finished:Boolean;// = false private var _fallingCounter:int;// = -1 public static const STAND:int = 1; public static const TURN_LEFT:int = 5; public static const TURN_FROM_RIGHT_TO_PLAYER:int = 9; public static const RUN_LEFT:int = 10; public static const EVENT_FINISH_ACTION:String = "finishAction"; public static const FALLING_LEFT:int = 12; public static const TURN_FROM_LEFT_TO_PLAYER:int = 6; public static const FALLING_RIGHT:int = 11; public static const RUN_RIGHT:int = 7; public static const JUMP:int = 3; public static const WAVE:int = 2; public static const TURN_RIGHT:int = 8; public static const SAD:int = 4; public function Protagonist(_arg1:Number, _arg2:Number, _arg3:Boolean=true){ _paused = false; _manualMode = false; _finished = false; _fallingCounter = -1; super(); this.stop(); this._actions = new Array(); this._idle = true; this._currentAction = 0; this._isSwimming = false; this._waitingForRun = false; this._hasParticle = _arg3; this.x = _arg1; this.y = _arg2; if (this._hasParticle){ this.particle = new WheelParticle(_arg1, _arg2, Config.PROTAGONIST_RADIOUS, false, Config.PROTAGONISTS_MASS, 0.3, 0, 0.5); this.particle.sprite.visible = false; this.particle.sprite.cacheAsBitmap = true; }; this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); this.addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); } public function set finished(_arg1:Boolean):void{ _finished = _arg1; } public function set manualMode(_arg1:Boolean):void{ _manualMode = _arg1; } private function enterFrameHandler(_arg1:Event):void{ var _local2:int; if (this._paused){ return; }; if (this._hasParticle){ this.x = this.particle.px; this.y = this.particle.py; }; if (((this._idle) && (!(this.manualMode)))){ if (this._actions.length > 0){ _local2 = this._actions.shift(); this.makeAction(_local2); }; }; } public function get currentAction():int{ return (this._currentAction); } public function turnAndRun(_arg1:int):void{ if (this._waitingForRun){ return; }; this.resetSpeed(); if (_arg1 == Protagonist.RUN_RIGHT){ this.turn(Protagonist.TURN_LEFT, true); this.run(Protagonist.RUN_RIGHT); } else { this.turn(Protagonist.TURN_RIGHT, true); this.run(Protagonist.RUN_LEFT); }; this._waitingForRun = true; } public function jump(_arg1:Boolean=false):void{ this.addAction(Protagonist.JUMP, _arg1); } public function get paused():Boolean{ return (this._paused); } private function addAction(_arg1:int, _arg2:Boolean=false):void{ if (_arg2){ this._waitingForRun = false; this._actions.splice(0); this.makeAction(_arg1); } else { this._actions.push(_arg1); }; } public function set paused(_arg1:Boolean):void{ var _local2:MovieClip; this._paused = _arg1; _local2 = (this.getChildAt((this.currentAction - 1)) as MovieClip); if (_arg1){ if ((((this.currentAction >= 1)) && ((this.currentAction <= 10)))){ _local2.stop(); }; } else { if ((((((this.currentAction >= 1)) && ((this.currentAction <= 10)))) && (!((this.currentAction == Protagonist.SAD))))){ _local2.play(); }; }; } public function get speed():Number{ if (this._hasParticle){ return (this.particle.angularVelocity); }; return (0); } private function finishActionHandler(_arg1:Event):void{ this._idle = true; } public function resetSpeed():void{ if (this._hasParticle){ this.particle.speed = 0; this.particle.angularVelocity = 0; this.particle.velocity = new Vector(); }; } public function rotateAndRun(_arg1:int):void{ if (this._waitingForRun){ return; }; this.resetSpeed(); if (_arg1 == Protagonist.RUN_RIGHT){ this.turn(Protagonist.TURN_FROM_RIGHT_TO_PLAYER, true); this.turn(Protagonist.TURN_LEFT); this.run(Protagonist.RUN_RIGHT); } else { this.turn(Protagonist.TURN_FROM_LEFT_TO_PLAYER, true); this.turn(Protagonist.TURN_RIGHT); this.run(Protagonist.RUN_LEFT); }; this._waitingForRun = true; } private function childEnterFrameHandler(_arg1:Event):void{ var _local2:MovieClip; _local2 = (_arg1.currentTarget as MovieClip); if (_local2.currentFrame == _local2.totalFrames){ _local2.removeEventListener(Event.ENTER_FRAME, childEnterFrameHandler); this._idle = true; if (((((((!((this.currentAction == Protagonist.RUN_LEFT))) && (!((this.currentAction == Protagonist.RUN_RIGHT))))) && (!((this.currentAction == Protagonist.FALLING_LEFT))))) && (!((this.currentAction == Protagonist.FALLING_RIGHT))))){ _local2.stop(); this.dispatchEvent(new Event(Protagonist.EVENT_FINISH_ACTION)); }; }; } public function turn(_arg1:int, _arg2:Boolean=false):void{ this.addAction(_arg1, _arg2); } public function get finished():Boolean{ return (_finished); } public function swim():void{ if (!this._isSwimming){ if ((((this.currentAction == Protagonist.RUN_RIGHT)) || ((this.currentAction == Protagonist.FALLING_RIGHT)))){ this.turn(Protagonist.TURN_FROM_LEFT_TO_PLAYER, true); } else { this.turn(Protagonist.TURN_FROM_RIGHT_TO_PLAYER, true); }; this.sad(); this._isSwimming = true; this.addEventListener(Event.ENTER_FRAME, swimming, false, 0, true); this._alpha = 0; this._beta = 0; this._bottom = this.y; this._sign = (((Math.random() * 10))>=5) ? 1 : -1; SoundData.WATER_SPLASH.play(); }; } public function get manualMode():Boolean{ return (_manualMode); } public function set speed(_arg1:Number):void{ if (this._hasParticle){ this.particle.angularVelocity = _arg1; }; } private function clickHandler(_arg1:MouseEvent):void{ if (this.currentAction != Protagonist.STAND){ return; }; this.jump(true); this.stand(); } public function resetParams():void{ if (this._isSwimming){ this.removeEventListener(Event.ENTER_FRAME, swimming); }; this._isSwimming = false; this._waitingForRun = false; this.rotation = 0; if (this._hasParticle){ this.particle.fixed = false; }; } private function makeAction(_arg1:int):void{ var _local2:int; var _local3:MovieClip; var _local4:MovieClip; if ((((this.currentAction >= 1)) && ((this.currentAction <= 10)))){ _local3 = (this.getChildAt((this.currentAction - 1)) as MovieClip); if (_local3.hasEventListener(Event.ENTER_FRAME)){ _local3.removeEventListener(Event.ENTER_FRAME, childEnterFrameHandler); }; }; this._idle = false; this._currentAction = _arg1; if (this.currentAction == Protagonist.RUN_RIGHT){ this._waitingForRun = false; if (this._hasParticle){ this.particle.angularVelocity = Config.PROTAGONISTS_SPEED; }; }; if (this.currentAction == Protagonist.RUN_LEFT){ this._waitingForRun = false; if (this._hasParticle){ this.particle.angularVelocity = -(Config.PROTAGONISTS_SPEED); }; }; _local2 = 0; while (_local2 < this.numChildren) { _local4 = (this.getChildAt(_local2) as MovieClip); if (_local2 == (_arg1 - 1)){ _local4.visible = true; _local4.addEventListener(Event.ENTER_FRAME, childEnterFrameHandler, false, 0, true); _local4.gotoAndPlay(1); } else { _local4.visible = false; _local4.gotoAndStop(1); }; _local2++; }; } public function stand(_arg1:Boolean=false):void{ this.addAction(Protagonist.STAND, _arg1); } public function sad(_arg1:Boolean=false):void{ this.addAction(Protagonist.SAD, _arg1); } public function run(_arg1:int, _arg2:Boolean=false):void{ this.addAction(_arg1, _arg2); } public function wave(_arg1:Boolean=false):void{ this.addAction(Protagonist.WAVE, _arg1); } public function get actions():Array{ return (this._actions); } private function swimming(_arg1:Event):void{ if (this.paused){ return; }; if (!this._hasParticle){ return; }; this.particle.py = (this._bottom - ((this._sign * 5) * Math.sin(this._beta))); this._beta = (this._beta + (Math.PI / 70)); if (this._beta > (2 * Math.PI)){ this._beta = 0; }; this.rotation = ((this._sign * 15) * Math.sin(this._alpha)); this._alpha = (this._alpha + (Math.PI / 100)); if (this._alpha > (2 * Math.PI)){ this._alpha = 0; }; } } }//package characters
Section 28
//Sinyak (characters.Sinyak) package characters { public class Sinyak extends Protagonist { public function Sinyak(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package characters
Section 29
//Base64 (com.candystand.ScoreSubmit.Base64) package com.candystand.ScoreSubmit { import flash.utils.*; import com.candystand.ScoreSubmit.*; class Base64 { public static function Decode64(_arg1){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; _local3 = new Array(); _local4 = new Array(); _local5 = new Array(); _local10 = new Array(); _local2 = ""; _local6 = 0; _local7 = 0; while (_local7 <= 0xFF) { _local4[_local7] = -1; _local7++; }; _local4.splice(43, 1, 62); _local4.splice(47, 11, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61); _local4.splice(61, 1, 64); _local4.splice(65, 26, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25); _local4.splice(97, 26, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51); _local8 = 0; while (_local8 < _arg1.length) { _local9 = _local4[_arg1.charCodeAt(_local8)]; if (_local9 >= 0){ _local3[_local6] = _local9; ++_local6; if (_local6 == 4){ _local11 = Decq(_local3); _local10.push(_local11[0]); _local10.push(_local11[1]); _local10.push(_local11[2]); if (_local3[3] == 64){ _local10.pop(); }; if (_local3[2] == 64){ _local10.pop(); }; _local6 = 0; }; }; _local8++; }; return (_local10); } public static function Encode64(_arg1){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; _local7 = []; _local10 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; _local3 = _arg1.length; _local4 = int((_local3 / 3)); _local2 = ""; _local5 = 0; while (_local5 < _local4) { _local6 = 0; while (_local6 <= 2) { if (typeof(_arg1) == "string"){ _local7[_local6] = _arg1.charCodeAt(((_local5 * 3) + _local6)); } else { _local7[_local6] = _arg1[((_local5 * 3) + _local6)]; }; _local6++; }; _local2 = (_local2 + Encq(_local7, _local10)); _local5++; }; _local8 = (_local3 % 3); if (_local8 == 1){ if (typeof(_arg1) == "string"){ _local7[0] = _arg1.charCodeAt((_local3 - 1)); _local7[1] = 0; _local7[2] = 0; } else { _local7[0] = _arg1[(_local3 - 1)]; _local7[1] = 0; _local7[2] = 0; }; _local9 = Encq(_local7, _local10); _local2 = ((_local2 + _local9.slice(0, 2)) + "=="); }; if (_local8 == 2){ if (typeof(_arg1) == "string"){ _local7[0] = _arg1.charCodeAt((_local3 - 2)); _local7[1] = _arg1.charCodeAt((_local3 - 1)); _local7[2] = 0; } else { _local7[0] = _arg1[(_local3 - 2)]; _local7[1] = _arg1[(_local3 - 1)]; _local7[2] = 0; }; _local9 = Encq(_local7, _local10); _local2 = ((_local2 + _local9.slice(0, 3)) + "="); }; return (_local2); } public static function Decq(_arg1){ var _local2:*; var _local3:*; var _local4:*; _local2 = new Array(); _local4 = ""; _local3 = ((_arg1[0] << 2) | ((_arg1[1] >> 4) & 3)); _local2[0] = _local3; _local3 = (((_arg1[1] & 15) << 4) | ((_arg1[2] >> 2) & 15)); _local2[1] = _local3; _local3 = (((_arg1[2] & 3) << 6) | _arg1[3]); _local2[2] = _local3; return (_local2); } public static function Encq(_arg1, _arg2){ var _local3:*; var _local4:*; _local3 = ""; _local4 = ((_arg1[0] >> 2) & 63); _local3 = (_local3 + _arg2.charAt(_local4)); _local4 = (((_arg1[0] & 3) << 4) | ((_arg1[1] >> 4) & 15)); _local3 = (_local3 + _arg2.charAt(_local4)); _local4 = (((_arg1[1] & 15) << 2) | ((_arg1[2] >> 6) & 3)); _local3 = (_local3 + _arg2.charAt(_local4)); _local4 = (_arg1[2] & 63); _local3 = (_local3 + _arg2.charAt(_local4)); return (_local3); } } }//package com.candystand.ScoreSubmit
Section 30
//Blowfish (com.candystand.ScoreSubmit.Blowfish) package com.candystand.ScoreSubmit { import flash.utils.*; public class Blowfish { private static var __blowfish:Object; public static function initialize(_arg1:String):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local12:*; _local2 = []; _local4 = _arg1.length; _local3 = 0; while (_local3 < _local4) { _local2[_local3] = _arg1.charCodeAt(_local3); _local3++; }; __blowfish = {}; __blowfish.blf_P = []; __blowfish.blf_S = []; __blowfish.blf_S[0] = []; __blowfish.blf_S[1] = []; __blowfish.blf_S[2] = []; __blowfish.blf_S[3] = []; _local8 = new Array(608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731); _local5 = 0; while (_local5 <= 17) { __blowfish.blf_P[_local5] = _local8[_local5]; _local5++; }; _local8 = new Array(3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[0][_local5] = _local8[_local5]; _local5++; }; _local8 = new Array(4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[0][(_local5 + 64)] = _local8[_local5]; _local5++; }; _local8 = new Array(3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[0][(_local5 + 128)] = _local8[_local5]; _local5++; }; _local8 = new Array(1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[0][(_local5 + 192)] = _local8[_local5]; _local5++; }; _local8 = new Array(1266315497, 3048417604, 3681880366, 3289982499, 2909710000, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[1][_local5] = _local8[_local5]; _local5++; }; _local8 = new Array(1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[1][(_local5 + 64)] = _local8[_local5]; _local5++; }; _local8 = new Array(1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[1][(_local5 + 128)] = _local8[_local5]; _local5++; }; _local8 = new Array(1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[1][(_local5 + 192)] = _local8[_local5]; _local5++; }; _local8 = new Array(3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[2][_local5] = _local8[_local5]; _local5++; }; _local8 = new Array(1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[2][(_local5 + 64)] = _local8[_local5]; _local5++; }; _local8 = new Array(1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[2][(_local5 + 128)] = _local8[_local5]; _local5++; }; _local8 = new Array(3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[2][(_local5 + 192)] = _local8[_local5]; _local5++; }; _local8 = new Array(976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[3][_local5] = _local8[_local5]; _local5++; }; _local8 = new Array(3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[3][(_local5 + 64)] = _local8[_local5]; _local5++; }; _local8 = new Array(3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409000, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[3][(_local5 + 128)] = _local8[_local5]; _local5++; }; _local8 = new Array(453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462); _local5 = 0; while (_local5 <= 63) { __blowfish.blf_S[3][(_local5 + 192)] = _local8[_local5]; _local5++; }; _local6 = 0; _local5 = 0; while (_local5 <= 17) { _local9 = 0; _local7 = 0; while (_local7 <= 3) { _local9 = ((_local9 << 8) | _local2[_local6]); _local6 = (_local6 + 1); if (_local6 >= _local4){ _local6 = 0; }; _local7++; }; __blowfish.blf_P[_local5] = (__blowfish.blf_P[_local5] ^ _local9); _local5++; }; _local10 = 0; _local11 = 0; _local5 = 0; while (_local5 <= 17) { _local12 = DoBlowEnc(_local10, _local11); __blowfish.blf_P[_local5] = _local12[0]; __blowfish.blf_P[(_local5 + 1)] = _local12[1]; _local10 = _local12[0]; _local11 = _local12[1]; _local5 = (_local5 + 2); }; _local5 = 0; while (_local5 <= 3) { _local6 = 0; while (_local6 <= 0xFF) { _local12 = DoBlowEnc(_local10, _local11); __blowfish.blf_S[_local5][_local6] = _local12[0]; __blowfish.blf_S[_local5][(_local6 + 1)] = _local12[1]; _local10 = _local12[0]; _local11 = _local12[1]; _local6 = (_local6 + 2); }; _local5++; }; } public static function dec64str(_arg1:String):String{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; var _local15:*; var _local16:*; var _local17:*; _local7 = []; _local8 = []; _local16 = Base64.Decode64(_arg1); _local3 = _local16.length; _local4 = int((_local3 / 8)); _local5 = 0; while (_local5 < _local4) { _local6 = 0; while (_local6 <= 3) { _local7[_local6] = _local16[((_local5 * 8) + _local6)]; _local6++; }; _local9 = ((((_local7[0] << 24) | (_local7[1] << 16)) | (_local7[2] << 8)) | _local7[3]); _local6 = 0; while (_local6 <= 3) { _local7[_local6] = _local16[(((_local5 * 8) + _local6) + 4)]; _local6++; }; _local10 = ((((_local7[0] << 24) | (_local7[1] << 16)) | (_local7[2] << 8)) | _local7[3]); _local8[(_local5 * 2)] = _local9; _local8[((_local5 * 2) + 1)] = _local10; _local5++; }; _local5 = 0; while (_local5 < (_local4 * 2)) { _local17 = DoBlowDec(_local8[_local5], _local8[(_local5 + 1)]); _local8[_local5] = _local17[0]; _local8[(_local5 + 1)] = _local17[1]; _local5 = (_local5 + 2); }; _local2 = ""; _local5 = 0; while (_local5 < _local4) { _local11 = ((_local8[(_local5 * 2)] & 4278190080) >>> 24); _local12 = ((_local8[(_local5 * 2)] & 0xFF0000) >>> 16); _local13 = ((_local8[(_local5 * 2)] & 0xFF00) >>> 8); _local14 = (_local8[(_local5 * 2)] & 0xFF); _local2 = (_local2 + String.fromCharCode(_local11, _local12, _local13, _local14)); _local11 = ((_local8[((_local5 * 2) + 1)] & 4278190080) >>> 24); _local12 = ((_local8[((_local5 * 2) + 1)] & 0xFF0000) >>> 16); _local13 = ((_local8[((_local5 * 2) + 1)] & 0xFF00) >>> 8); _local14 = (_local8[((_local5 * 2) + 1)] & 0xFF); _local2 = (_local2 + String.fromCharCode(_local11, _local12, _local13, _local14)); _local5++; }; _local15 = _local2.slice(-1).charCodeAt(0); if (_local15 > 8){ _local15 = 0; }; _local2 = _local2.substring(0, (_local2.length - _local15)); return (_local2); } private static function blf_F(_arg1):Number{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; _local2 = ((_arg1 & 4278190080) >>> 24); _local3 = ((_arg1 & 0xFF0000) >>> 16); _local4 = ((_arg1 & 0xFF00) >>> 8); _local5 = (_arg1 & 0xFF); _local6 = (__blowfish.blf_S[0][_local2] + __blowfish.blf_S[1][_local3]); _local6 = (_local6 ^ __blowfish.blf_S[2][_local4]); _local6 = (_local6 + __blowfish.blf_S[3][_local5]); return (_local6); } private static function DoBlowDec(_arg1, _arg2):Array{ var _local3:*; var _local4:*; var _local5:*; _local3 = []; _local4 = 17; while (_local4 >= 2) { _arg1 = (_arg1 ^ __blowfish.blf_P[_local4]); _arg2 = (_arg2 ^ blf_F(_arg1)); _local5 = _arg1; _arg1 = _arg2; _arg2 = _local5; _local4--; }; _local5 = _arg1; _arg1 = _arg2; _arg2 = _local5; _arg2 = (_arg2 ^ __blowfish.blf_P[1]); _arg1 = (_arg1 ^ __blowfish.blf_P[0]); _local3[0] = _arg1; _local3[1] = _arg2; return (_local3); } public static function enc64str(_arg1:String):String{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; var _local15:*; var _local16:*; var _local17:*; _local7 = []; _local8 = []; _local3 = _arg1.length; _local16 = (((int((_local3 / 8)) + 1) * 8) - _local3); _local15 = ""; _local5 = 0; while (_local5 <= _local16) { _local15 = (_local15 + String.fromCharCode(_local16)); _local5++; }; _arg1 = (_arg1 + _local15); _local3 = _arg1.length; _local4 = int((_local3 / 8)); _local5 = 0; while (_local5 < _local4) { _local6 = 0; while (_local6 <= 3) { _local7[_local6] = _arg1.charCodeAt(((_local5 * 8) + _local6)); _local6++; }; _local9 = ((((_local7[0] << 24) | (_local7[1] << 16)) | (_local7[2] << 8)) | _local7[3]); _local6 = 0; while (_local6 <= 3) { _local7[_local6] = _arg1.charCodeAt((((_local5 * 8) + _local6) + 4)); _local6++; }; _local10 = ((((_local7[0] << 24) | (_local7[1] << 16)) | (_local7[2] << 8)) | _local7[3]); _local8[(_local5 * 2)] = _local9; _local8[((_local5 * 2) + 1)] = _local10; _local5++; }; _local5 = 0; while (_local5 < (_local4 * 2)) { _local17 = DoBlowEnc(_local8[_local5], _local8[(_local5 + 1)]); _local8[_local5] = _local17[0]; _local8[(_local5 + 1)] = _local17[1]; _local5 = (_local5 + 2); }; _local2 = []; _local5 = 0; while (_local5 < _local4) { _local11 = ((_local8[(_local5 * 2)] & 4278190080) >>> 24); _local12 = ((_local8[(_local5 * 2)] & 0xFF0000) >>> 16); _local13 = ((_local8[(_local5 * 2)] & 0xFF00) >>> 8); _local14 = (_local8[(_local5 * 2)] & 0xFF); _local2.push(_local11, _local12, _local13, _local14); _local11 = ((_local8[((_local5 * 2) + 1)] & 4278190080) >>> 24); _local12 = ((_local8[((_local5 * 2) + 1)] & 0xFF0000) >>> 16); _local13 = ((_local8[((_local5 * 2) + 1)] & 0xFF00) >>> 8); _local14 = (_local8[((_local5 * 2) + 1)] & 0xFF); _local2.push(_local11, _local12, _local13, _local14); _local5++; }; return (Base64.Encode64(_local2)); } private static function DoBlowEnc(_arg1, _arg2):Array{ var _local3:*; var _local4:*; var _local5:*; _local5 = []; _local3 = 0; while (_local3 <= 15) { _arg1 = (_arg1 ^ __blowfish.blf_P[_local3]); _arg2 = (_arg2 ^ blf_F(_arg1)); _local4 = _arg1; _arg1 = _arg2; _arg2 = _local4; _local3++; }; _local4 = _arg1; _arg1 = _arg2; _arg2 = _local4; _arg2 = (_arg2 ^ __blowfish.blf_P[16]); _arg1 = (_arg1 ^ __blowfish.blf_P[17]); _local5[0] = _arg1; _local5[1] = _arg2; return (_local5); } } }//package com.candystand.ScoreSubmit
Section 31
//Constants (com.candystand.ScoreSubmit.Constants) package com.candystand.ScoreSubmit { import flash.display.*; import flash.utils.*; import flash.system.*; public class Constants { private static var __multiplayId:String; private static var __sessionId:String; private static var __scoreurl:String; private static var __main:DisplayObject; private static var __trackingurl:String; private static var __gameData:String; private static var __brandingPath:String; private static var __gameVersion:String; private static var __flashVersion:String; private static var __uniqueId:String; private static var __sendPlay:Boolean; private static var __multiplayurl:String; private static var __playerId:String; private static var __downloadTime:Number; private static var __sendQuit:Boolean; private static var __sendGameover:Boolean; private static var __quiturl:String; private static var __swlist:String; private static var __copyright:String; private static var __sendMethod:String; private static var __sendLoad:Boolean; private static var __initialized:Boolean = false; private static var __systemSpeed:Number; private static var __trackingParams:Object; public static function set brandingPath(_arg1:String):void{ if (__main.loaderInfo.parameters.sw9 == undefined){ __brandingPath = _arg1; }; } public static function getIdString():String{ return (((((__playerId + "") + __sessionId) + "") + __uniqueId)); } static function get systemSpeed():Number{ return (__systemSpeed); } public static function get gameVersion():String{ return (__gameVersion); } public static function get sendLoad():Boolean{ return (__sendLoad); } public static function get multiplayurl():String{ return (__multiplayurl); } private static function getSpeed():Number{ return (0); } public static function get stingerPath():String{ return (__swlist); } static function initialize(_arg1:DisplayObject, _arg2:String, _arg3:String, _arg4:Number){ var _local5:*; _local5 = new Object(); _local5.sw1 = "/wrapup.do?id=100"; _local5.sw2 = "CopyrightWrigley"; _local5.sw3 = "e02acde5-adcb-11dc-abad-001b78448e04"; _local5.sw4 = "%2Fsubmit-score.do%3Fgame_id%3D18252%26"; _local5.sw5 = ""; _local5.sw6 = "100"; _local5.sw7 = "method%3Dget%26events%3D1111%26url%3Dhttp%3A%2F%2Fdev.candystand.com%2Fgame-track.do%3Fuuid%3D4de04f30-db1e-11dc-b1b5-0002a58776b0%26"; _local5.sw8 = ""; _local5.sw9 = "./us"; _local5.swlist = "stinger.swf"; _local5.session_id = "-1"; if (__initialized){ return; }; __main = _arg1; __initialized = true; _arg2 = ((_arg2)==null) ? "" : _arg2; _arg3 = ((_arg3)==null) ? "" : _arg3; _arg4 = (_arg4) ? _arg4 : 0; __sessionId = ((((__main.loaderInfo.parameters.session_id == undefined)) || ((String(__main.loaderInfo.parameters.session_id).length == 0)))) ? _local5.session_id : __main.loaderInfo.parameters.session_id; __playerId = ((((__main.loaderInfo.parameters.sw3 == undefined)) || ((String(__main.loaderInfo.parameters.sw3).length == 0)))) ? _local5.sw3 : __main.loaderInfo.parameters.sw3; __uniqueId = ((__main.loaderInfo.parameters.sw6)==undefined) ? _local5.sw6 : __main.loaderInfo.parameters.sw6; __multiplayId = ""; __swlist = ((__main.loaderInfo.parameters.swlist)==undefined) ? _local5.swlist : __main.loaderInfo.parameters.swlist; __brandingPath = ((__main.loaderInfo.parameters.sw9)==undefined) ? _local5.sw9 : __main.loaderInfo.parameters.sw9; __copyright = ((__main.loaderInfo.parameters.sw2)==undefined) ? _local5.sw2 : __main.loaderInfo.parameters.sw2; __quiturl = ((__main.loaderInfo.parameters.sw1)==undefined) ? _local5.sw1 : __main.loaderInfo.parameters.sw1; __scoreurl = ((__main.loaderInfo.parameters.sw4)==undefined) ? _local5.sw4 : __main.loaderInfo.parameters.sw4; __multiplayurl = ((__main.loaderInfo.parameters.sw5)==undefined) ? _local5.sw5 : __main.loaderInfo.parameters.sw5; __trackingurl = ((__main.loaderInfo.parameters.sw7)==undefined) ? _local5.sw7 : ((((__main.loaderInfo.parameters.sw7 + "&events=") + __main.loaderInfo.parameters.events) + "&url=") + __main.loaderInfo.parameters.url); __flashVersion = Capabilities.version.split(" ")[1]; __gameData = _arg2; __gameVersion = _arg3; __downloadTime = _arg4; __systemSpeed = getSpeed(); parseUrl(); trace(("Constants.initialize() __quitUrl: " + __quiturl)); trace(("Constants.initialize() __scoreurl: " + __scoreurl)); trace(("Constants.initialize() __multiplayerurl: " + __multiplayurl)); trace(("Constants.initialize() __trackingurl: " + __trackingurl)); trace(("Constants.initialize() __swlist: " + __swlist)); } public static function get sendMethod():String{ return (__sendMethod); } public static function get sendGameover():Boolean{ return (__sendGameover); } public static function get scoreurl():String{ return (__scoreurl); } static function get trackingParams():Object{ return (__trackingParams); } public static function getTrackingParams():String{ var _local1:String; var _local2:String; _local1 = ""; for (_local2 in __trackingParams) { _local1 = (_local1 + ((("&" + _local2) + "=") + __trackingParams[_local2])); }; return (_local1); } public static function get flashVersion():String{ return (__flashVersion); } static function get gameData():String{ return (__gameData); } public static function get brandingPath():String{ return (__brandingPath); } public static function get sessionId():String{ return (__sessionId); } public static function get uniqueId():String{ return (__uniqueId); } private static function parseUrl(){ var _local1:String; var _local2:Array; var _local3:String; var _local4:Array; var _local5:Number; var _local6:String; __trackingParams = {}; _local2 = new Array(); __trackingurl = unescape(__trackingurl); if (__trackingurl.indexOf("url=") != -1){ _local2 = __trackingurl.split("url="); _local3 = String(_local2[0]); __trackingurl = String(_local2[1]); if (_local3.indexOf("&") != -1){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < 2) { _local6 = String(_local4[_local5]); if (_local6.indexOf("method") != -1){ __sendMethod = String(_local6.split("=")[1]).toUpperCase(); } else { _local1 = String(_local6.split("=")[1]); __sendLoad = Boolean(Number(_local1.charAt(0))); __sendPlay = Boolean(Number(_local1.charAt(1))); __sendGameover = Boolean(Number(_local1.charAt(2))); __sendQuit = Boolean(Number(_local1.charAt(3))); }; _local5++; }; } else { __sendMethod = ((_local3.indexOf("method"))==-1) ? "GET" : String(_local3.split("=")[1]).toUpperCase(); if (_local3.indexOf("events") != -1){ _local1 = String(_local3.split("=")[1]); __sendLoad = Boolean(Number(_local1.charAt(0))); __sendPlay = Boolean(Number(_local1.charAt(1))); __sendGameover = Boolean(Number(_local1.charAt(2))); __sendQuit = Boolean(Number(_local1.charAt(3))); } else { __sendLoad = (__sendPlay = (__sendGameover = (__sendQuit = true))); }; }; } else { __sendMethod = "GET"; __sendLoad = (__sendPlay = (__sendGameover = (__sendQuit = true))); }; } public static function get copyright():String{ return (__copyright); } public static function get trackingurl():String{ return (__trackingurl); } public static function get playerId():String{ return (__playerId); } public static function get sendPlay():Boolean{ return (__sendPlay); } public static function get quiturl():String{ return (__quiturl); } public static function get multiplayId():String{ return (__multiplayId); } static function get downloadTime():Number{ return (__downloadTime); } public static function getJavaTracking(_arg1:String, _arg2:Number, _arg3:String):String{ var _local4:String; _local4 = ""; _local4 = ((((((("action=" + _arg1) + "&userid=") + __playerId) + "&sid=") + __sessionId) + "&gameid=") + __uniqueId); _local4 = (_local4 + (((("&rn=" + _arg2) + getTrackingParams()) + "&cr=") + _arg3)); return (_local4); } public static function get sendQuit():Boolean{ return (__sendQuit); } } }//package com.candystand.ScoreSubmit
Section 32
//Game (com.candystand.ScoreSubmit.Game) package com.candystand.ScoreSubmit { import flash.utils.*; public class Game { private static var __playTime:Number; private static var __highscore:Number = 0; private static var __gamesPlayed:Number; private static var __cheated:Boolean; private static var __leaderboardId:Number = -1; private static var __scoreExtraParams:Object; private static var __playStart:Number; private static var __score:Number = 0; private static var __initialized:Boolean = false; private static var __gameResets:Number; private static var __numPlayers:Number; private static function getGameData():String{ return (((((((("&np=" + __numPlayers) + "&ng=") + __gamesPlayed) + "&nr=") + __gameResets) + "&tp=") + __playTime)); } public static function quit(){ var _local1:Number; var _local2:Number; _local1 = getTimer(); _local2 = (_local1 - __playStart); __playTime = (__playTime + Math.round((_local2 / 1000))); Messenger.quit(__playTime); __playTime = 0; __gameResets = 0; __gamesPlayed = 0; } public static function get score():Number{ return (__score); } public static function restart(){ var _local1:Number; var _local2:Number; _local1 = getTimer(); _local2 = (_local1 - __playStart); __playTime = (__playTime + Math.round((_local2 / 1000))); newGame(__numPlayers); } public static function get highScore():Number{ return (__highscore); } public static function submitScore(){ var _local1:Date; var _local2:Number; var _local3:String; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:String; var _local9:String; _local1 = new Date(); _local2 = _local1.getFullYear(); _local3 = ((((_local1.getMonth() + "/") + _local1.getDate()) + "/") + _local2); _local4 = ((_local1.getHours() * 60) * 60); _local5 = (_local1.getMinutes() * 60); _local6 = ((_local1.getSeconds() + _local5) + _local4); _local7 = Number(!(__cheated)); _local8 = ((((((("gamename=" + Constants.uniqueId) + "&score=") + __highscore) + "&pn=") + Constants.playerId) + "&sf=") + _local7); _local8 = (_local8 + ((((getGameData() + "&ms=") + Constants.systemSpeed) + "&mr=0&bd=0&pi=") + Constants.flashVersion)); _local8 = (_local8 + ((((("&ds=" + Constants.downloadTime) + "&dt=") + _local3) + "&ss=&sp=") + Constants.gameData)); _local8 = (_local8 + ((((((("&sn=" + Constants.multiplayId) + "&tt=") + _local6) + "&vr=") + Constants.gameVersion) + "&gid=") + Constants.uniqueId)); if (__leaderboardId != -1){ _local8 = (_local8 + ("&gamelevel=" + __leaderboardId)); }; for (_local9 in __scoreExtraParams) { _local8 = (_local8 + ((("&" + _local9) + "=") + String(__scoreExtraParams[_local9]))); }; trace((("preMD5: " + _local8) + "----")); Messenger.submitScore(_local8); } public static function reset(){ __gameResets++; __cheated = false; } public static function addScoreParam(_arg1:String, _arg2:String){ if (((_arg1) && (_arg2))){ __scoreExtraParams[_arg1] = _arg2; }; } public static function catchCheat(){ __cheated = true; } public static function endGame(){ var _local1:Number; var _local2:Number; _local1 = getTimer(); _local2 = (_local1 - __playStart); __playTime = (__playTime + Math.round((_local2 / 1000))); Messenger.sendAction("over", true); } public static function set leaderboardId(_arg1:Number){ if (!isNaN(_arg1)){ __leaderboardId = _arg1; }; } public static function get leaderboardId():Number{ return (__leaderboardId); } public static function newGame(_arg1:Number=1){ __numPlayers = _arg1; __playStart = getTimer(); __gamesPlayed++; __gameResets = 0; __score = 0; __cheated = false; Messenger.sendAction("play", true); } public static function set score(_arg1:Number){ if (!isNaN(_arg1)){ __score = _arg1; if (__score > __highscore){ __highscore = __score; }; }; } static function initialize(){ if (__initialized){ return; }; __initialized = true; __scoreExtraParams = {}; __gamesPlayed = 0; __playTime = 0; __gameResets = 0; __numPlayers = 0; __cheated = false; __score = 0; } public static function removeScoreParam(_arg1:String){ delete __scoreExtraParams[_arg1]; } } }//package com.candystand.ScoreSubmit
Section 33
//MD5 (com.candystand.ScoreSubmit.MD5) package com.candystand.ScoreSubmit { public class MD5 { private static var __b64pad = ""; private static var __hexcase = 0; private static var __chrsz = 8; private static function md5_gg(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } private static function md5_cmn(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ var _local7:*; _local7 = safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3); return (_local7); } private static function binl2str(_arg1){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local2 = ""; _local3 = ((1 << __chrsz) - 1); _local4 = (_arg1.length * 32); _local5 = 0; while (_local5 < _local4) { _local2 = (_local2 + String.fromCharCode(((_arg1[(_local5 >> 5)] >>> (_local5 & 31)) & _local3))); _local5 = (_local5 + __chrsz); }; return (_local2); } private static function core_hmac_md5(_arg1, _arg2){ var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; _local3 = str2binl(_arg1); if (_local3.length > 16){ _local3 = core_md5(_local3, (_arg1.length * __chrsz)); }; _local4 = new Array(16); _local5 = new Array(16); _local6 = 0; while (_local6 < 16) { _local4[_local6] = (_local3[_local6] ^ 909522486); _local5[_local6] = (_local3[_local6] ^ 1549556828); _local6++; }; _local7 = core_md5(_local4.concat(str2binl(_arg2)), (0x0200 + (_arg2.length * __chrsz))); return (core_md5(_local5.concat(_local7), (0x0200 + 128))); } private static function md5_ii(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } private static function hex_hmac_md5(_arg1, _arg2){ return (binl2hex(core_hmac_md5(_arg1, _arg2))); } private static function md5_vm_test(){ return ((hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72")); } public static function hex_md5(_arg1){ return (binl2hex(core_md5(str2binl(_arg1), (_arg1.length * __chrsz)))); } private static function bit_rol(_arg1, _arg2){ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } private static function core_md5(_arg1, _arg2){ var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; _arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 & 31))); _arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2; _local7 = 1732584193; _local8 = -271733879; _local9 = -1732584194; _local10 = 271733878; _local11 = _arg1.length; _local12 = 0; while (_local12 < _local11) { _local3 = _local7; _local4 = _local8; _local5 = _local9; _local6 = _local10; _local7 = md5_ff(_local7, _local8, _local9, _local10, _arg1[(_local12 + 0)], 7, -680876936); _local10 = md5_ff(_local10, _local7, _local8, _local9, _arg1[(_local12 + 1)], 12, -389564586); _local9 = md5_ff(_local9, _local10, _local7, _local8, _arg1[(_local12 + 2)], 17, 606105819); _local8 = md5_ff(_local8, _local9, _local10, _local7, _arg1[(_local12 + 3)], 22, -1044525330); _local7 = md5_ff(_local7, _local8, _local9, _local10, _arg1[(_local12 + 4)], 7, -176418897); _local10 = md5_ff(_local10, _local7, _local8, _local9, _arg1[(_local12 + 5)], 12, 1200080426); _local9 = md5_ff(_local9, _local10, _local7, _local8, _arg1[(_local12 + 6)], 17, -1473231341); _local8 = md5_ff(_local8, _local9, _local10, _local7, _arg1[(_local12 + 7)], 22, -45705983); _local7 = md5_ff(_local7, _local8, _local9, _local10, _arg1[(_local12 + 8)], 7, 1770035416); _local10 = md5_ff(_local10, _local7, _local8, _local9, _arg1[(_local12 + 9)], 12, -1958414417); _local9 = md5_ff(_local9, _local10, _local7, _local8, _arg1[(_local12 + 10)], 17, -42063); _local8 = md5_ff(_local8, _local9, _local10, _local7, _arg1[(_local12 + 11)], 22, -1990404162); _local7 = md5_ff(_local7, _local8, _local9, _local10, _arg1[(_local12 + 12)], 7, 1804603682); _local10 = md5_ff(_local10, _local7, _local8, _local9, _arg1[(_local12 + 13)], 12, -40341101); _local9 = md5_ff(_local9, _local10, _local7, _local8, _arg1[(_local12 + 14)], 17, -1502002290); _local8 = md5_ff(_local8, _local9, _local10, _local7, _arg1[(_local12 + 15)], 22, 1236535329); _local7 = md5_gg(_local7, _local8, _local9, _local10, _arg1[(_local12 + 1)], 5, -165796510); _local10 = md5_gg(_local10, _local7, _local8, _local9, _arg1[(_local12 + 6)], 9, -1069501632); _local9 = md5_gg(_local9, _local10, _local7, _local8, _arg1[(_local12 + 11)], 14, 643717713); _local8 = md5_gg(_local8, _local9, _local10, _local7, _arg1[(_local12 + 0)], 20, -373897302); _local7 = md5_gg(_local7, _local8, _local9, _local10, _arg1[(_local12 + 5)], 5, -701558691); _local10 = md5_gg(_local10, _local7, _local8, _local9, _arg1[(_local12 + 10)], 9, 38016083); _local9 = md5_gg(_local9, _local10, _local7, _local8, _arg1[(_local12 + 15)], 14, -660478335); _local8 = md5_gg(_local8, _local9, _local10, _local7, _arg1[(_local12 + 4)], 20, -405537848); _local7 = md5_gg(_local7, _local8, _local9, _local10, _arg1[(_local12 + 9)], 5, 568446438); _local10 = md5_gg(_local10, _local7, _local8, _local9, _arg1[(_local12 + 14)], 9, -1019803690); _local9 = md5_gg(_local9, _local10, _local7, _local8, _arg1[(_local12 + 3)], 14, -187363961); _local8 = md5_gg(_local8, _local9, _local10, _local7, _arg1[(_local12 + 8)], 20, 1163531501); _local7 = md5_gg(_local7, _local8, _local9, _local10, _arg1[(_local12 + 13)], 5, -1444681467); _local10 = md5_gg(_local10, _local7, _local8, _local9, _arg1[(_local12 + 2)], 9, -51403784); _local9 = md5_gg(_local9, _local10, _local7, _local8, _arg1[(_local12 + 7)], 14, 1735328473); _local8 = md5_gg(_local8, _local9, _local10, _local7, _arg1[(_local12 + 12)], 20, -1926607734); _local7 = md5_hh(_local7, _local8, _local9, _local10, _arg1[(_local12 + 5)], 4, -378558); _local10 = md5_hh(_local10, _local7, _local8, _local9, _arg1[(_local12 + 8)], 11, -2022574463); _local9 = md5_hh(_local9, _local10, _local7, _local8, _arg1[(_local12 + 11)], 16, 1839030562); _local8 = md5_hh(_local8, _local9, _local10, _local7, _arg1[(_local12 + 14)], 23, -35309556); _local7 = md5_hh(_local7, _local8, _local9, _local10, _arg1[(_local12 + 1)], 4, -1530992060); _local10 = md5_hh(_local10, _local7, _local8, _local9, _arg1[(_local12 + 4)], 11, 1272893353); _local9 = md5_hh(_local9, _local10, _local7, _local8, _arg1[(_local12 + 7)], 16, -155497632); _local8 = md5_hh(_local8, _local9, _local10, _local7, _arg1[(_local12 + 10)], 23, -1094730640); _local7 = md5_hh(_local7, _local8, _local9, _local10, _arg1[(_local12 + 13)], 4, 681279174); _local10 = md5_hh(_local10, _local7, _local8, _local9, _arg1[(_local12 + 0)], 11, -358537222); _local9 = md5_hh(_local9, _local10, _local7, _local8, _arg1[(_local12 + 3)], 16, -722521979); _local8 = md5_hh(_local8, _local9, _local10, _local7, _arg1[(_local12 + 6)], 23, 76029189); _local7 = md5_hh(_local7, _local8, _local9, _local10, _arg1[(_local12 + 9)], 4, -640364487); _local10 = md5_hh(_local10, _local7, _local8, _local9, _arg1[(_local12 + 12)], 11, -421815835); _local9 = md5_hh(_local9, _local10, _local7, _local8, _arg1[(_local12 + 15)], 16, 530742520); _local8 = md5_hh(_local8, _local9, _local10, _local7, _arg1[(_local12 + 2)], 23, -995338651); _local7 = md5_ii(_local7, _local8, _local9, _local10, _arg1[(_local12 + 0)], 6, -198630844); _local10 = md5_ii(_local10, _local7, _local8, _local9, _arg1[(_local12 + 7)], 10, 1126891415); _local9 = md5_ii(_local9, _local10, _local7, _local8, _arg1[(_local12 + 14)], 15, -1416354905); _local8 = md5_ii(_local8, _local9, _local10, _local7, _arg1[(_local12 + 5)], 21, -57434055); _local7 = md5_ii(_local7, _local8, _local9, _local10, _arg1[(_local12 + 12)], 6, 1700485571); _local10 = md5_ii(_local10, _local7, _local8, _local9, _arg1[(_local12 + 3)], 10, -1894986606); _local9 = md5_ii(_local9, _local10, _local7, _local8, _arg1[(_local12 + 10)], 15, -1051523); _local8 = md5_ii(_local8, _local9, _local10, _local7, _arg1[(_local12 + 1)], 21, -2054922799); _local7 = md5_ii(_local7, _local8, _local9, _local10, _arg1[(_local12 + 8)], 6, 1873313359); _local10 = md5_ii(_local10, _local7, _local8, _local9, _arg1[(_local12 + 15)], 10, -30611744); _local9 = md5_ii(_local9, _local10, _local7, _local8, _arg1[(_local12 + 6)], 15, -1560198380); _local8 = md5_ii(_local8, _local9, _local10, _local7, _arg1[(_local12 + 13)], 21, 1309151649); _local7 = md5_ii(_local7, _local8, _local9, _local10, _arg1[(_local12 + 4)], 6, -145523070); _local10 = md5_ii(_local10, _local7, _local8, _local9, _arg1[(_local12 + 11)], 10, -1120210379); _local9 = md5_ii(_local9, _local10, _local7, _local8, _arg1[(_local12 + 2)], 15, 718787259); _local8 = md5_ii(_local8, _local9, _local10, _local7, _arg1[(_local12 + 9)], 21, -343485551); _local7 = safe_add(_local7, _local3); _local8 = safe_add(_local8, _local4); _local9 = safe_add(_local9, _local5); _local10 = safe_add(_local10, _local6); _local12 = (_local12 + 16); }; _local13 = new Array(_local7, _local8, _local9, _local10); return (_local13); } public static function b64_md5(_arg1){ return (binl2b64(core_md5(str2binl(_arg1), (_arg1.length * __chrsz)))); } private static function md5_ff(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7)); } private static function b64_hmac_md5(_arg1, _arg2){ return (binl2b64(core_hmac_md5(_arg1, _arg2))); } private static function md5_hh(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7)); } private static function str2binl(_arg1){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local2 = new Array(); _local3 = ((1 << __chrsz) - 1); _local4 = (_arg1.length * __chrsz); _local5 = 0; while (_local5 < _local4) { _local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / __chrsz)) & _local3) << (_local5 & 31))); _local5 = (_local5 + __chrsz); }; return (_local2); } private static function binl2hex(_arg1){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local2 = (__hexcase) ? "0123456789ABCDEF" : "0123456789abcdef"; _local3 = ""; _local4 = (_arg1.length * 4); _local5 = 0; while (_local5 < _local4) { _local3 = (_local3 + (_local2.charAt(((_arg1[(_local5 >> 2)] >> (((_local5 & 3) * 8) + 4)) & 15)) + _local2.charAt(((_arg1[(_local5 >> 2)] >> ((_local5 & 3) * 8)) & 15)))); _local5++; }; return (_local3); } public static function str_md5(_arg1){ return (binl2str(core_md5(str2binl(_arg1), (_arg1.length * __chrsz)))); } private static function binl2b64(_arg1){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; _local3 = ""; _local4 = (_arg1.length * 4); _local5 = (4 * _local4); _local6 = 0; while (_local6 < _local4) { _local8 = (((((_arg1[(_local6 >> 2)] >> (8 * (_local6 & 3))) & 0xFF) << 16) | (((_arg1[((_local6 + 1) >> 2)] >> (8 * ((_local6 + 1) & 3))) & 0xFF) << 8)) | ((_arg1[((_local6 + 2) >> 2)] >> (8 * ((_local6 + 2) & 3))) & 0xFF)); _local6 = (_local6 + 3); }; _local7 = 0; while (_local7 < 4) { if (((_local6 * 8) + (_local7 * 6)) > _local5){ _local3 = (_local3 + __b64pad); } else { _local3 = (_local3 + _local2.charAt(((_local8 >> (6 * (3 - _local7))) & 63))); }; _local7++; }; return (_local3); } private static function safe_add(_arg1, _arg2){ var _local3:*; var _local4:*; _local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF)); _local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16)); return (((_local4 << 16) | (_local3 & 0xFFFF))); } private static function str_hmac_md5(_arg1, _arg2){ return (binl2str(core_hmac_md5(_arg1, _arg2))); } } }//package com.candystand.ScoreSubmit
Section 34
//Messenger (com.candystand.ScoreSubmit.Messenger) package com.candystand.ScoreSubmit { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; public class Messenger { private static var __md5Key:String; private static var __initialized:Boolean = false; private static var __blowfishKey:String; private static var __kaInterval:Number; private static var __timesExecuted:Number; private static function onIOError(_arg1:IOErrorEvent):void{ trace(_arg1.text); } private static function load(){ var _local1:Boolean; var _local2:Number; var _local3:String; var _local4:String; var _local5:URLRequest; var _local6:URLVariables; var _local7:URLRequest; var _local8:URLLoader; var _local9:String; if (!Constants.sendLoad){ return; }; _local1 = false; switch (Constants.sendMethod){ case "DISABLED": return; case "JAVASCRIPT": _local1 = true; case "GET": _local2 = getTimer(); _local3 = ((("load" + Constants.getIdString()) + "") + _local2); _local3 = (_local3 + __md5Key); _local4 = MD5.hex_md5(_local3); trace(("Messenger.load() preMD5: " + _local3)); trace(("Messenger.load() hash: " + _local4)); if (_local1){ _local5 = new URLRequest((("javascript: TrackingEvent( " + Constants.getJavaTracking("load", _local2, _local4)) + " );")); navigateToURL(_local5, "_self"); } else { _local6 = new URLVariables(); _local7 = new URLRequest(Constants.trackingurl); _local7.method = URLRequestMethod.GET; _local8 = new URLLoader(); _local8.dataFormat = URLLoaderDataFormat.VARIABLES; _local8.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local6.action = "load"; _local6.gameid = Constants.uniqueId; _local6.userid = Constants.playerId; _local6.sid = Constants.sessionId; _local6.d1 = Constants.downloadTime; _local6.rn = _local2; _local6.cr = _local4; for (_local9 in Constants.trackingParams) { _local6[_local9] = Constants.trackingParams[_local9]; }; _local7.data = _local6; _local8.load(_local7); }; break; }; } static function quit(_arg1:Number=0){ var _local2:URLRequest; var _local3:Boolean; var _local4:Number; var _local5:String; var _local6:String; var _local7:URLVariables; var _local8:URLRequest; var _local9:URLLoader; var _local10:String; clearInterval(__kaInterval); if (!Constants.sendQuit){ return; }; _local2 = null; _local3 = false; switch (Constants.sendMethod){ case "DISABLED": return; case "JAVASCRIPT": _local3 = true; case "GET": _local4 = getTimer(); _local5 = ((("quit" + Constants.getIdString()) + "") + _local4); _local5 = (_local5 + __md5Key); _local6 = MD5.hex_md5(_local5); trace(("Messenger.quit() preMD5: " + _local5)); trace(("Messenger.quit() hash: " + _local6)); if (_local3){ _local2 = new URLRequest((("javascript: TrackingEvent( " + Constants.getJavaTracking("load", _local4, _local6)) + " );")); navigateToURL(_local2, "_self"); } else { _local7 = new URLVariables(); _local8 = new URLRequest(Constants.trackingurl); _local8.method = URLRequestMethod.GET; _local9 = new URLLoader(); _local9.dataFormat = URLLoaderDataFormat.VARIABLES; _local9.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local7.action = "quit"; _local7.gameid = Constants.uniqueId; _local7.userid = Constants.playerId; _local7.sid = Constants.sessionId; _local7.d1 = _arg1; _local7.rn = _local4; _local7.cr = _local6; for (_local10 in Constants.trackingParams) { _local7[_local10] = Constants.trackingParams[_local10]; }; _local8.data = _local7; _local9.load(_local8); }; break; }; } private static function keepAlive(){ var _local1:Number; var _local2:Number; var _local3:String; var _local4:String; var _local5:URLVariables; var _local6:URLRequest; var _local7:URLLoader; var _local8:String; if (Constants.sendMethod == "DISABLED"){ return; }; __timesExecuted++; _local1 = __timesExecuted; _local2 = getTimer(); _local3 = ((("keepalive" + Constants.getIdString()) + "") + _local2); _local3 = (_local3 + __md5Key); _local4 = MD5.hex_md5(_local3); trace(("Messenger.keepAlive() preMD5: " + _local3)); trace(("Messenger.keepAlive() hash: " + _local4)); _local5 = new URLVariables(); _local6 = new URLRequest(Constants.trackingurl); _local6.method = URLRequestMethod.GET; _local7 = new URLLoader(); _local7.dataFormat = URLLoaderDataFormat.VARIABLES; _local7.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local5.action = "keepalive"; _local5.gameid = Constants.uniqueId; _local5.userid = Constants.playerId; _local5.sid = Constants.sessionId; _local5.d1 = _local1; _local5.rn = _local2; _local5.cr = _local4; for (_local8 in Constants.trackingParams) { _local5[_local8] = Constants.trackingParams[_local8]; }; _local6.data = _local5; _local7.load(_local6); } public static function initialize(_arg1:DisplayObject, _arg2:String, _arg3:String, _arg4:Number=0, _arg5:String="none", _arg6:String="0.0.0"){ var _local7:Number; if (__initialized){ return; }; __initialized = true; _local7 = Math.round((getTimer() / 1000)); Constants.initialize(_arg1, _arg5, _arg6, _local7); Game.initialize(); __md5Key = _arg2; __blowfishKey = _arg3; Blowfish.initialize(__blowfishKey); if (_arg4){ __timesExecuted = 0; __kaInterval = setInterval(Messenger.keepAlive, _arg4); }; load(); } static function submitScore(_arg1:String){ var _local2:String; var _local3:String; var _local4:String; var _local5:URLRequest; _local2 = MD5.hex_md5((_arg1 + __blowfishKey)); _local3 = Blowfish.enc64str(((_arg1 + "&cr=") + _local2)); trace(("Messenger.submitScore() preMD5: " + _arg1)); trace(("Messenger.submitScore() hash: " + _local2)); trace(("Messenger.submitScore() encoded: " + _local3)); _local4 = ((Constants.scoreurl.indexOf("?"))!=-1) ? "&" : "?"; quit(); _local5 = new URLRequest((((Constants.scoreurl + _local4) + "param=") + _local3)); navigateToURL(_local5, "_self"); } static function sendAction(_arg1:String, _arg2:Boolean){ var _local3:Boolean; var _local4:Number; var _local5:String; var _local6:String; var _local7:URLRequest; var _local8:URLVariables; var _local9:URLRequest; var _local10:URLLoader; var _local11:String; trace(("MESSENGER: SEND ACTION " + _arg1)); if ((((_arg1 == "play")) && (!(Constants.sendPlay)))){ return; }; if ((((_arg1 == "over")) && (!(Constants.sendGameover)))){ return; }; if (!_arg2){ if (_arg1 == "play"){ Game.newGame(); return; }; if (_arg1 == "over"){ Game.endGame(); return; }; }; _local3 = false; switch (Constants.sendMethod){ case "DISABLED": return; case "JAVASCRIPT": _local3 = true; case "GET": _local4 = getTimer(); _local5 = ((((_arg1 + "") + Constants.getIdString()) + "") + _local4); _local5 = (_local5 + __md5Key); _local6 = MD5.hex_md5(_local5); trace(("Messenger.sendAction() preMD5: " + _local5)); trace(("Messenger.sendAction() hash: " + _local6)); if (_local3){ _local7 = new URLRequest((("javascript: TrackingEvent( " + Constants.getJavaTracking(_arg1, _local4, _local6)) + " );")); navigateToURL(_local7, "_self"); } else { _local8 = new URLVariables(); _local9 = new URLRequest(Constants.trackingurl); _local9.method = URLRequestMethod.GET; _local10 = new URLLoader(); _local10.dataFormat = URLLoaderDataFormat.VARIABLES; _local10.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local8.action = _arg1; _local8.gameid = Constants.uniqueId; _local8.userid = Constants.playerId; _local8.sid = Constants.sessionId; _local8.rn = _local4; _local8.cr = _local6; for (_local11 in Constants.trackingParams) { _local8[_local11] = Constants.trackingParams[_local11]; }; _local9.data = _local8; _local10.load(_local9); }; break; }; } } }//package com.candystand.ScoreSubmit
Section 35
//CampaignInfo (com.google.analytics.campaign.CampaignInfo) package com.google.analytics.campaign { import com.google.analytics.utils.*; public class CampaignInfo { private var _new:Boolean; private var _empty:Boolean; public function CampaignInfo(_arg1:Boolean=true, _arg2:Boolean=false){ _empty = _arg1; _new = _arg2; } public function toURLString():String{ var _local1:Variables = toVariables(); return (_local1.toString()); } public function isNew():Boolean{ return (_new); } public function get utmcn():String{ return ("1"); } public function isEmpty():Boolean{ return (_empty); } public function toVariables():Variables{ var _local1:Variables = new Variables(); _local1.URIencode = true; if (((!(isEmpty())) && (isNew()))){ _local1.utmcn = utmcn; }; if (((!(isEmpty())) && (!(isNew())))){ _local1.utmcr = utmcr; }; return (_local1); } public function get utmcr():String{ return ("1"); } } }//package com.google.analytics.campaign
Section 36
//CampaignKey (com.google.analytics.campaign.CampaignKey) package com.google.analytics.campaign { public class CampaignKey { public var UCMD:String;// = "utm_medium" public var UCID:String;// = "utm_id" public var UCTR:String;// = "utm_term" public var UCSR:String;// = "utm_source" public var UCNO:String;// = "utm_nooverride" public var UCCN:String;// = "utm_campaign" public var UGCLID:String;// = "gclid" public var UCCT:String;// = "utm_content" } }//package com.google.analytics.campaign
Section 37
//CampaignManager (com.google.analytics.campaign.CampaignManager) package com.google.analytics.campaign { import com.google.analytics.core.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; public class CampaignManager { private var _config:Configuration; private var _domainHash:Number; private var _debug:DebugConfiguration; private var _timeStamp:Number; private var _referrer:String; private var _buffer:Buffer; public static const trackingDelimiter:String = "|"; public function CampaignManager(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Number, _arg5:String, _arg6:Number){ _config = _arg1; _debug = _arg2; _buffer = _arg3; _domainHash = _arg4; _referrer = _arg5; _timeStamp = _arg6; } public function getCampaignInformation(_arg1:String, _arg2:Boolean):CampaignInfo{ var _local4:CampaignTracker; var _local8:CampaignTracker; var _local9:int; var _local3:CampaignInfo = new CampaignInfo(); var _local5:Boolean; var _local6:Boolean; var _local7:int; if (((_config.allowLinker) && (_buffer.isGenuine()))){ if (!_buffer.hasUTMZ()){ return (_local3); }; }; _local4 = getTrackerFromSearchString(_arg1); if (isValid(_local4)){ _local6 = hasNoOverride(_arg1); if (((_local6) && (!(_buffer.hasUTMZ())))){ return (_local3); }; }; if (!isValid(_local4)){ _local4 = getOrganicCampaign(); if (((!(_buffer.hasUTMZ())) && (isIgnoredKeyword(_local4)))){ return (_local3); }; }; if (((!(isValid(_local4))) && (_arg2))){ _local4 = getReferrerCampaign(); if (((!(_buffer.hasUTMZ())) && (isIgnoredReferral(_local4)))){ return (_local3); }; }; if (!isValid(_local4)){ if (((!(_buffer.hasUTMZ())) && (_arg2))){ _local4 = getDirectCampaign(); }; }; if (!isValid(_local4)){ return (_local3); }; if (((_buffer.hasUTMZ()) && (!(_buffer.utmz.isEmpty())))){ _local8 = new CampaignTracker(); _local8.fromTrackerString(_buffer.utmz.campaignTracking); _local5 = (_local8.toTrackerString() == _local4.toTrackerString()); _local7 = _buffer.utmz.responseCount; }; if (((!(_local5)) || (_arg2))){ _local9 = _buffer.utma.sessionCount; _local7++; if (_local9 == 0){ _local9 = 1; }; _buffer.utmz.domainHash = _domainHash; _buffer.utmz.campaignCreation = _timeStamp; _buffer.utmz.campaignSessions = _local9; _buffer.utmz.responseCount = _local7; _buffer.utmz.campaignTracking = _local4.toTrackerString(); _debug.info(_buffer.utmz.toString(), VisualDebugMode.geek); _local3 = new CampaignInfo(false, true); } else { _local3 = new CampaignInfo(false, false); }; return (_local3); } public function hasNoOverride(_arg1:String):Boolean{ var _local2:CampaignKey = _config.campaignKey; if (_arg1 == ""){ return (false); }; var _local3:Variables = new Variables(_arg1); var _local4 = ""; if (_local3.hasOwnProperty(_local2.UCNO)){ _local4 = _local3[_local2.UCNO]; switch (_local4){ case "1": return (true); case "": case "0": default: return (false); }; }; return (false); } public function getTrackerFromSearchString(_arg1:String):CampaignTracker{ var _local2:CampaignTracker = getOrganicCampaign(); var _local3:CampaignTracker = new CampaignTracker(); var _local4:CampaignKey = _config.campaignKey; if (_arg1 == ""){ return (_local3); }; var _local5:Variables = new Variables(_arg1); if (_local5.hasOwnProperty(_local4.UCID)){ _local3.id = _local5[_local4.UCID]; }; if (_local5.hasOwnProperty(_local4.UCSR)){ _local3.source = _local5[_local4.UCSR]; }; if (_local5.hasOwnProperty(_local4.UGCLID)){ _local3.clickId = _local5[_local4.UGCLID]; }; if (_local5.hasOwnProperty(_local4.UCCN)){ _local3.name = _local5[_local4.UCCN]; } else { _local3.name = "(not set)"; }; if (_local5.hasOwnProperty(_local4.UCMD)){ _local3.medium = _local5[_local4.UCMD]; } else { _local3.medium = "(not set)"; }; if (_local5.hasOwnProperty(_local4.UCTR)){ _local3.term = _local5[_local4.UCTR]; } else { if (((_local2) && (!((_local2.term == ""))))){ _local3.term = _local2.term; }; }; if (_local5.hasOwnProperty(_local4.UCCT)){ _local3.content = _local5[_local4.UCCT]; }; return (_local3); } public function getOrganicCampaign():CampaignTracker{ var _local1:CampaignTracker; var _local4:Array; var _local5:OrganicReferrer; var _local6:String; if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){ return (_local1); }; var _local2:URL = new URL(_referrer); var _local3 = ""; if (_local2.hostName != ""){ if (_local2.hostName.indexOf(".") > -1){ _local4 = _local2.hostName.split("."); switch (_local4.length){ case 2: _local3 = _local4[0]; break; case 3: _local3 = _local4[1]; break; }; }; }; if (_config.organic.match(_local3)){ _local5 = _config.organic.getReferrerByName(_local3); _local6 = _config.organic.getKeywordValue(_local5, _local2.search); _local1 = new CampaignTracker(); _local1.source = _local5.engine; _local1.name = "(organic)"; _local1.medium = "organic"; _local1.term = _local6; }; return (_local1); } public function getDirectCampaign():CampaignTracker{ var _local1:CampaignTracker = new CampaignTracker(); _local1.source = "(direct)"; _local1.name = "(direct)"; _local1.medium = "(none)"; return (_local1); } public function isIgnoredKeyword(_arg1:CampaignTracker):Boolean{ if (((_arg1) && ((_arg1.medium == "organic")))){ return (_config.organic.isIgnoredKeyword(_arg1.term)); }; return (false); } public function isIgnoredReferral(_arg1:CampaignTracker):Boolean{ if (((_arg1) && ((_arg1.medium == "referral")))){ return (_config.organic.isIgnoredReferral(_arg1.source)); }; return (false); } public function isValid(_arg1:CampaignTracker):Boolean{ if (((_arg1) && (_arg1.isValid()))){ return (true); }; return (false); } public function getReferrerCampaign():CampaignTracker{ var _local1:CampaignTracker; if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){ return (_local1); }; var _local2:URL = new URL(_referrer); var _local3:String = _local2.hostName; var _local4:String = _local2.path; if (_local3.indexOf("www.") == 0){ _local3 = _local3.substr(4); }; _local1 = new CampaignTracker(); _local1.source = _local3; _local1.name = "(referral)"; _local1.medium = "referral"; _local1.content = _local4; return (_local1); } public static function isInvalidReferrer(_arg1:String):Boolean{ var _local2:URL; if ((((((_arg1 == "")) || ((_arg1 == "-")))) || ((_arg1 == "0")))){ return (true); }; if (_arg1.indexOf("://") > -1){ _local2 = new URL(_arg1); if ((((_local2.protocol == Protocols.file)) || ((_local2.protocol == Protocols.none)))){ return (true); }; }; return (false); } public static function isFromGoogleCSE(_arg1:String, _arg2:Configuration):Boolean{ var _local3:URL = new URL(_arg1); if (_local3.hostName.indexOf(_arg2.google) > -1){ if (_local3.search.indexOf((_arg2.googleSearchParam + "=")) > -1){ if (_local3.path == ("/" + _arg2.googleCsePath)){ return (true); }; }; }; return (false); } } }//package com.google.analytics.campaign
Section 38
//CampaignTracker (com.google.analytics.campaign.CampaignTracker) package com.google.analytics.campaign { import com.google.analytics.utils.*; public class CampaignTracker { public var content:String; public var source:String; public var clickId:String; public var name:String; public var term:String; public var medium:String; public var id:String; public function CampaignTracker(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:String="", _arg5:String="", _arg6:String="", _arg7:String=""){ this.id = _arg1; this.source = _arg2; this.clickId = _arg3; this.name = _arg4; this.medium = _arg5; this.term = _arg6; this.content = _arg7; } public function isValid():Boolean{ if (((((!((id == ""))) || (!((source == ""))))) || (!((clickId == ""))))){ return (true); }; return (false); } public function toTrackerString():String{ var _local1:Array = []; _addIfNotEmpty(_local1, "utmcsr=", source); _addIfNotEmpty(_local1, "utmccn=", name); _addIfNotEmpty(_local1, "utmcmd=", medium); _addIfNotEmpty(_local1, "utmctr=", term); _addIfNotEmpty(_local1, "utmcct=", content); _addIfNotEmpty(_local1, "utmcid=", id); _addIfNotEmpty(_local1, "utmgclid=", clickId); return (_local1.join(CampaignManager.trackingDelimiter)); } private function _addIfNotEmpty(_arg1:Array, _arg2:String, _arg3:String):void{ if (_arg3 != ""){ _arg3 = _arg3.split("+").join("%20"); _arg3 = _arg3.split(" ").join("%20"); _arg1.push((_arg2 + _arg3)); }; } public function fromTrackerString(_arg1:String):void{ var _local2:String = _arg1.split(CampaignManager.trackingDelimiter).join("&"); var _local3:Variables = new Variables(_local2); if (_local3.hasOwnProperty("utmcid")){ this.id = _local3["utmcid"]; }; if (_local3.hasOwnProperty("utmcsr")){ this.source = _local3["utmcsr"]; }; if (_local3.hasOwnProperty("utmccn")){ this.name = _local3["utmccn"]; }; if (_local3.hasOwnProperty("utmcmd")){ this.medium = _local3["utmcmd"]; }; if (_local3.hasOwnProperty("utmctr")){ this.term = _local3["utmctr"]; }; if (_local3.hasOwnProperty("utmcct")){ this.content = _local3["utmcct"]; }; if (_local3.hasOwnProperty("utmgclid")){ this.clickId = _local3["utmgclid"]; }; } } }//package com.google.analytics.campaign
Section 39
//BrowserInfo (com.google.analytics.core.BrowserInfo) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.utils.*; public class BrowserInfo { private var _config:Configuration; private var _info:Environment; public function BrowserInfo(_arg1:Configuration, _arg2:Environment){ _config = _arg1; _info = _arg2; } public function get utmul():String{ return (_info.language.toLowerCase()); } public function get utmje():String{ return ("0"); } public function toURLString():String{ var _local1:Variables = toVariables(); return (_local1.toString()); } public function get utmsr():String{ return (((_info.screenWidth + "x") + _info.screenHeight)); } public function get utmfl():String{ var _local1:Version; if (_config.detectFlash){ _local1 = _info.flashVersion; return (((((_local1.major + ".") + _local1.minor) + " r") + _local1.build)); }; return ("-"); } public function get utmcs():String{ return (_info.languageEncoding); } public function toVariables():Variables{ var _local1:Variables = new Variables(); _local1.URIencode = true; _local1.utmcs = utmcs; _local1.utmsr = utmsr; _local1.utmsc = utmsc; _local1.utmul = utmul; _local1.utmje = utmje; _local1.utmfl = utmfl; return (_local1); } public function get utmsc():String{ return ((_info.screenColorDepth + "-bit")); } } }//package com.google.analytics.core
Section 40
//Buffer (com.google.analytics.core.Buffer) package com.google.analytics.core { import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.net.*; import com.google.analytics.data.*; public dynamic class Buffer { private var _SO:SharedObject; private var _OBJ:Object; private var _utma:UTMA; private var _utmb:UTMB; private var _utmc:UTMC; private var _debug:DebugConfiguration; private var _utmk:UTMK; private var _config:Configuration; private var _utmv:UTMV; private var _utmz:UTMZ; private var _volatile:Boolean; public function Buffer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Boolean=false, _arg4:Object=null){ var _local5:Boolean; var _local6:String; super(); _config = _arg1; _debug = _arg2; UTMB.defaultTimespan = _config.sessionTimeout; UTMZ.defaultTimespan = _config.conversionTimeout; if (!_arg3){ _SO = SharedObject.getLocal(_config.cookieName, _config.cookiePath); _local5 = false; if (_SO.data.utma){ if (!hasUTMA()){ _createUMTA(); }; _utma.fromSharedObject(_SO.data.utma); if (_debug.verbose){ _debug.info(("found: " + _utma.toString(true)), VisualDebugMode.geek); }; if (_utma.isExpired()){ if (_debug.verbose){ _debug.warning("UTMA has expired", VisualDebugMode.advanced); }; _clearUTMA(); _local5 = true; }; }; if (_SO.data.utmb){ if (!hasUTMB()){ _createUMTB(); }; _utmb.fromSharedObject(_SO.data.utmb); if (_debug.verbose){ _debug.info(("found: " + _utmb.toString(true)), VisualDebugMode.geek); }; if (_utmb.isExpired()){ if (_debug.verbose){ _debug.warning("UTMB has expired", VisualDebugMode.advanced); }; _clearUTMB(); _local5 = true; }; }; if (_SO.data.utmc){ delete _SO.data.utmc; _local5 = true; }; if (_SO.data.utmk){ if (!hasUTMK()){ _createUMTK(); }; _utmk.fromSharedObject(_SO.data.utmk); if (_debug.verbose){ _debug.info(("found: " + _utmk.toString()), VisualDebugMode.geek); }; }; if (_SO.data.utmv){ if (!hasUTMV()){ _createUMTV(); }; _utmv.fromSharedObject(_SO.data.utmv); if (_debug.verbose){ _debug.info(("found: " + _utmv.toString(true)), VisualDebugMode.geek); }; if (_utmv.isExpired()){ if (_debug.verbose){ _debug.warning("UTMV has expired", VisualDebugMode.advanced); }; _clearUTMV(); _local5 = true; }; }; if (_SO.data.utmz){ if (!hasUTMZ()){ _createUMTZ(); }; _utmz.fromSharedObject(_SO.data.utmz); if (_debug.verbose){ _debug.info(("found: " + _utmz.toString(true)), VisualDebugMode.geek); }; if (_utmz.isExpired()){ if (_debug.verbose){ _debug.warning("UTMZ has expired", VisualDebugMode.advanced); }; _clearUTMZ(); _local5 = true; }; }; if (_local5){ save(); }; } else { _OBJ = new Object(); if (_arg4){ for (_local6 in _arg4) { _OBJ[_local6] = _arg4[_local6]; }; }; }; _volatile = _arg3; } public function clearCookies():void{ utma.reset(); utmb.reset(); utmc.reset(); utmz.reset(); utmv.reset(); utmk.reset(); } public function save():void{ var flushStatus:String; if (!isVolatile()){ flushStatus = null; try { flushStatus = _SO.flush(); } catch(e:Error) { _debug.warning("Error...Could not write SharedObject to disk"); }; switch (flushStatus){ case SharedObjectFlushStatus.PENDING: _debug.info("Requesting permission to save object..."); _SO.addEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus); break; case SharedObjectFlushStatus.FLUSHED: _debug.info("Value flushed to disk."); break; }; }; } public function get utmv():UTMV{ if (!hasUTMV()){ _createUMTV(); }; return (_utmv); } public function get utmz():UTMZ{ if (!hasUTMZ()){ _createUMTZ(); }; return (_utmz); } public function hasUTMA():Boolean{ if (_utma){ return (true); }; return (false); } public function hasUTMB():Boolean{ if (_utmb){ return (true); }; return (false); } public function hasUTMC():Boolean{ if (_utmc){ return (true); }; return (false); } public function isGenuine():Boolean{ if (!hasUTMK()){ return (true); }; return ((utmk.hash == generateCookiesHash())); } public function resetCurrentSession():void{ _clearUTMB(); _clearUTMC(); save(); } public function hasUTMK():Boolean{ if (_utmk){ return (true); }; return (false); } public function generateCookiesHash():Number{ var _local1 = ""; _local1 = (_local1 + utma.valueOf()); _local1 = (_local1 + utmb.valueOf()); _local1 = (_local1 + utmc.valueOf()); _local1 = (_local1 + utmz.valueOf()); _local1 = (_local1 + utmv.valueOf()); return (Utils.generateHash(_local1)); } private function _createUMTB():void{ _utmb = new UTMB(); _utmb.proxy = this; } private function _createUMTC():void{ _utmc = new UTMC(); } private function _createUMTA():void{ _utma = new UTMA(); _utma.proxy = this; } public function hasUTMV():Boolean{ if (_utmv){ return (true); }; return (false); } private function _createUMTK():void{ _utmk = new UTMK(); _utmk.proxy = this; } public function hasUTMZ():Boolean{ if (_utmz){ return (true); }; return (false); } private function _createUMTV():void{ _utmv = new UTMV(); _utmv.proxy = this; } private function _onFlushStatus(_arg1:NetStatusEvent):void{ _debug.info("User closed permission dialog..."); switch (_arg1.info.code){ case "SharedObject.Flush.Success": _debug.info("User granted permission -- value saved."); break; case "SharedObject.Flush.Failed": _debug.info("User denied permission -- value not saved."); break; }; _SO.removeEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus); } private function _createUMTZ():void{ _utmz = new UTMZ(); _utmz.proxy = this; } public function updateUTMA(_arg1:Number):void{ if (_debug.verbose){ _debug.info((("updateUTMA( " + _arg1) + " )"), VisualDebugMode.advanced); }; if (!utma.isEmpty()){ if (isNaN(utma.sessionCount)){ utma.sessionCount = 1; } else { utma.sessionCount = (utma.sessionCount + 1); }; utma.lastTime = utma.currentTime; utma.currentTime = _arg1; }; } private function _clearUTMA():void{ _utma = null; if (!isVolatile()){ _SO.data.utma = null; delete _SO.data.utma; }; } private function _clearUTMC():void{ _utmc = null; } private function _clearUTMB():void{ _utmb = null; if (!isVolatile()){ _SO.data.utmb = null; delete _SO.data.utmb; }; } public function update(_arg1:String, _arg2):void{ if (isVolatile()){ _OBJ[_arg1] = _arg2; } else { _SO.data[_arg1] = _arg2; }; } private function _clearUTMZ():void{ _utmz = null; if (!isVolatile()){ _SO.data.utmz = null; delete _SO.data.utmz; }; } private function _clearUTMV():void{ _utmv = null; if (!isVolatile()){ _SO.data.utmv = null; delete _SO.data.utmv; }; } public function isVolatile():Boolean{ return (_volatile); } public function get utma():UTMA{ if (!hasUTMA()){ _createUMTA(); }; return (_utma); } public function get utmb():UTMB{ if (!hasUTMB()){ _createUMTB(); }; return (_utmb); } public function get utmc():UTMC{ if (!hasUTMC()){ _createUMTC(); }; return (_utmc); } public function get utmk():UTMK{ if (!hasUTMK()){ _createUMTK(); }; return (_utmk); } } }//package com.google.analytics.core
Section 41
//DocumentInfo (com.google.analytics.core.DocumentInfo) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.utils.*; import com.google.analytics.external.*; public class DocumentInfo { private var _pageURL:String; private var _utmr:String; private var _config:Configuration; private var _adSense:AdSenseGlobals; private var _info:Environment; public function DocumentInfo(_arg1:Configuration, _arg2:Environment, _arg3:String, _arg4:String=null, _arg5:AdSenseGlobals=null){ _config = _arg1; _info = _arg2; _utmr = _arg3; _pageURL = _arg4; _adSense = _arg5; } public function get utmr():String{ if (!_utmr){ return ("-"); }; return (_utmr); } public function toURLString():String{ var _local1:Variables = toVariables(); return (_local1.toString()); } private function _renderPageURL(_arg1:String=""):String{ var _local2:String = _info.locationPath; var _local3:String = _info.locationSearch; if (((!(_arg1)) || ((_arg1 == "")))){ _arg1 = (_local2 + unescape(_local3)); }; return (_arg1); } public function get utmp():String{ return (_renderPageURL(_pageURL)); } public function get utmhid():String{ return (String(_generateHitId())); } private function _generateHitId():Number{ var _local1:Number; if (((_adSense.hid) && (!((_adSense.hid == ""))))){ _local1 = Number(_adSense.hid); } else { _local1 = Math.round((Math.random() * 2147483647)); _adSense.hid = String(_local1); }; return (_local1); } public function toVariables():Variables{ var _local1:Variables = new Variables(); _local1.URIencode = true; if (((_config.detectTitle) && (!((utmdt == ""))))){ _local1.utmdt = utmdt; }; _local1.utmhid = utmhid; _local1.utmr = utmr; _local1.utmp = utmp; return (_local1); } public function get utmdt():String{ return (_info.documentTitle); } } }//package com.google.analytics.core
Section 42
//Domain (com.google.analytics.core.Domain) package com.google.analytics.core { import com.google.analytics.debug.*; public class Domain { private var _mode:DomainNameMode; private var _debug:DebugConfiguration; private var _name:String; public function Domain(_arg1:DomainNameMode=null, _arg2:String="", _arg3:DebugConfiguration=null){ _debug = _arg3; if (_arg1 == null){ _arg1 = DomainNameMode.auto; }; _mode = _arg1; if (_arg1 == DomainNameMode.custom){ this.name = _arg2; } else { _name = _arg2; }; } public function get mode():DomainNameMode{ return (_mode); } public function set mode(_arg1:DomainNameMode):void{ _mode = _arg1; if (_mode == DomainNameMode.none){ _name = ""; }; } public function get name():String{ return (_name); } public function set name(_arg1:String):void{ if (((!((_arg1.charAt(0) == "."))) && (_debug))){ _debug.warning(("missing leading period \".\", cookie will only be accessible on " + _arg1), VisualDebugMode.geek); }; _name = _arg1; } } }//package com.google.analytics.core
Section 43
//DomainNameMode (com.google.analytics.core.DomainNameMode) package com.google.analytics.core { public class DomainNameMode { private var _value:int; private var _name:String; public static const custom:DomainNameMode = new DomainNameMode(2, "custom"); ; public static const none:DomainNameMode = new DomainNameMode(0, "none"); ; public static const auto:DomainNameMode = new DomainNameMode(1, "auto"); ; public function DomainNameMode(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.core
Section 44
//EventInfo (com.google.analytics.core.EventInfo) package com.google.analytics.core { import com.google.analytics.data.*; import com.google.analytics.utils.*; public class EventInfo { private var _ext10:X10; private var _isEventHit:Boolean; private var _x10:X10; public function EventInfo(_arg1:Boolean, _arg2:X10, _arg3:X10=null){ _isEventHit = _arg1; _x10 = _arg2; _ext10 = _arg3; } public function toURLString():String{ var _local1:Variables = toVariables(); return (_local1.toString()); } public function get utmt():String{ return ("event"); } public function get utme():String{ return (_x10.renderMergedUrlString(_ext10)); } public function toVariables():Variables{ var _local1:Variables = new Variables(); _local1.URIencode = true; if (_isEventHit){ _local1.utmt = utmt; }; _local1.utme = utme; return (_local1); } } }//package com.google.analytics.core
Section 45
//EventTracker (com.google.analytics.core.EventTracker) package com.google.analytics.core { import com.google.analytics.v4.*; public class EventTracker { private var _parent:GoogleAnalyticsAPI; public var name:String; public function EventTracker(_arg1:String, _arg2:GoogleAnalyticsAPI){ this.name = _arg1; _parent = _arg2; } public function trackEvent(_arg1:String, _arg2:String=null, _arg3:Number=NaN):Boolean{ return (_parent.trackEvent(name, _arg1, _arg2, _arg3)); } } }//package com.google.analytics.core
Section 46
//ga_internal (com.google.analytics.core.ga_internal) package com.google.analytics.core { public namespace ga_internal; }//package com.google.analytics.core
Section 47
//GIFRequest (com.google.analytics.core.GIFRequest) package com.google.analytics.core { import flash.display.*; import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.net.*; import com.google.analytics.utils.*; import flash.system.*; public class GIFRequest { private var _info:Environment; private var _count:int; private var _utmac:String; private var _alertcount:int; private var _debug:DebugConfiguration; private var _lastRequest:URLRequest; private var _buffer:Buffer; private var _config:Configuration; private var _requests:Array; public function GIFRequest(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Environment){ _config = _arg1; _debug = _arg2; _buffer = _arg3; _info = _arg4; _count = 0; _alertcount = 0; _requests = []; } public function get utmn():String{ return ((Utils.generate32bitRandom() as String)); } public function onIOError(_arg1:IOErrorEvent):void{ var _local2:String = _lastRequest.url; var _local3:String = String((_requests.length - 1)); var _local4 = (("Gif Request #" + _local3) + " failed"); if (_debug.GIFRequests){ if (!_debug.verbose){ if (_local2.indexOf("?") > -1){ _local2 = _local2.split("?")[0]; }; _local2 = _shortenURL(_local2); }; if (int(_debug.mode) > int(VisualDebugMode.basic)){ _local4 = (_local4 + ((" \"" + _local2) + "\" does not exists or is unreachable")); }; _debug.failure(_local4); } else { _debug.warning(_local4); }; _removeListeners(_arg1.target); } public function send(_arg1:String, _arg2:Variables=null, _arg3:Boolean=false, _arg4:Boolean=false):void{ var _local5:String; var _local6:URLRequest; var _local7:URLRequest; _utmac = _arg1; if (!_arg2){ _arg2 = new Variables(); }; _arg2.URIencode = false; _arg2.pre = ["utmwv", "utmn", "utmhn", "utmt", "utme", "utmcs", "utmsr", "utmsc", "utmul", "utmje", "utmfl", "utmdt", "utmhid", "utmr", "utmp"]; _arg2.post = ["utmcc"]; if (_debug.verbose){ _debug.info(((("tracking: " + _buffer.utmb.trackCount) + "/") + _config.trackingLimitPerSession), VisualDebugMode.geek); }; if ((((_buffer.utmb.trackCount < _config.trackingLimitPerSession)) || (_arg3))){ if (_arg4){ updateToken(); }; if (((((_arg3) || (!(_arg4)))) || ((_buffer.utmb.token >= 1)))){ if (((!(_arg3)) && (_arg4))){ _buffer.utmb.token = (_buffer.utmb.token - 1); }; _buffer.utmb.trackCount = (_buffer.utmb.trackCount + 1); if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); }; _arg2.utmwv = utmwv; _arg2.utmn = Utils.generate32bitRandom(); if (_info.domainName != ""){ _arg2.utmhn = _info.domainName; }; if (_config.sampleRate < 1){ _arg2.utmsp = (_config.sampleRate * 100); }; if ((((_config.serverMode == ServerOperationMode.local)) || ((_config.serverMode == ServerOperationMode.both)))){ _local5 = _info.locationSWFPath; if (_local5.lastIndexOf("/") > 0){ _local5 = _local5.substring(0, _local5.lastIndexOf("/")); }; _local6 = new URLRequest(); if (_config.localGIFpath.indexOf("http") == 0){ _local6.url = _config.localGIFpath; } else { _local6.url = (_local5 + _config.localGIFpath); }; _local6.url = (_local6.url + ("?" + _arg2.toString())); if (((_debug.active) && (_debug.GIFRequests))){ _debugSend(_local6); } else { sendRequest(_local6); }; }; if ((((_config.serverMode == ServerOperationMode.remote)) || ((_config.serverMode == ServerOperationMode.both)))){ _local7 = new URLRequest(); if (_info.protocol == Protocols.HTTPS){ _local7.url = _config.secureRemoteGIFpath; } else { if (_info.protocol == Protocols.HTTP){ _local7.url = _config.remoteGIFpath; } else { _local7.url = _config.remoteGIFpath; }; }; _arg2.utmac = utmac; _arg2.utmcc = encodeURIComponent(utmcc); _local7.url = (_local7.url + ("?" + _arg2.toString())); if (((_debug.active) && (_debug.GIFRequests))){ _debugSend(_local7); } else { sendRequest(_local7); }; }; }; }; } public function onSecurityError(_arg1:SecurityErrorEvent):void{ if (_debug.GIFRequests){ _debug.failure(_arg1.text); }; } public function get utmsp():String{ return (((_config.sampleRate * 100) as String)); } public function get utmcc():String{ var _local1:Array = []; if (_buffer.hasUTMA()){ _local1.push((_buffer.utma.toURLString() + ";")); }; if (_buffer.hasUTMZ()){ _local1.push((_buffer.utmz.toURLString() + ";")); }; if (_buffer.hasUTMV()){ _local1.push((_buffer.utmv.toURLString() + ";")); }; return (_local1.join("+")); } public function get utmac():String{ return (_utmac); } public function get utmwv():String{ return (_config.version); } public function sendRequest(_arg1:URLRequest):void{ var request = _arg1; var loader:Loader = new Loader(); loader.name = String(_count++); var context:LoaderContext = new LoaderContext(false); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); _lastRequest = request; _requests[loader.name] = new RequestObject(request); try { loader.load(request, context); } catch(e:Error) { _debug.failure("\"Loader.load()\" could not instanciate Gif Request"); }; } private function _removeListeners(_arg1:Object):void{ _arg1.removeEventListener(IOErrorEvent.IO_ERROR, onIOError); _arg1.removeEventListener(Event.COMPLETE, onComplete); } public function updateToken():void{ var _local2:Number; var _local1:Number = new Date().getTime(); _local2 = ((_local1 - _buffer.utmb.lastTime) * (_config.tokenRate / 1000)); if (_debug.verbose){ _debug.info(("tokenDelta: " + _local2), VisualDebugMode.geek); }; if (_local2 >= 1){ _buffer.utmb.token = Math.min(Math.floor((_buffer.utmb.token + _local2)), _config.bucketCapacity); _buffer.utmb.lastTime = _local1; if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); }; }; } public function get utmhn():String{ return (_info.domainName); } private function _shortenURL(_arg1:String):String{ var _local2:Array; if (_arg1.length > 60){ _local2 = _arg1.split("/"); while (_arg1.length > 60) { _local2.shift(); _arg1 = ("../" + _local2.join("/")); }; }; return (_arg1); } private function _debugSend(_arg1:URLRequest):void{ var _local3:String; var _local2 = ""; switch (_debug.mode){ case VisualDebugMode.geek: _local2 = ((("Gif Request #" + _alertcount) + ":\n") + _arg1.url); break; case VisualDebugMode.advanced: _local3 = _arg1.url; if (_local3.indexOf("?") > -1){ _local3 = _local3.split("?")[0]; }; _local3 = _shortenURL(_local3); _local2 = (((("Send Gif Request #" + _alertcount) + ":\n") + _local3) + " ?"); break; case VisualDebugMode.basic: default: _local2 = (((("Send " + _config.serverMode.toString()) + " Gif Request #") + _alertcount) + " ?"); }; _debug.alertGifRequest(_local2, _arg1, this); _alertcount++; } public function onComplete(_arg1:Event):void{ var _local2:String = _arg1.target.loader.name; _requests[_local2].complete(); var _local3 = (("Gif Request #" + _local2) + " sent"); var _local4:String = _requests[_local2].request.url; if (_debug.GIFRequests){ if (!_debug.verbose){ if (_local4.indexOf("?") > -1){ _local4 = _local4.split("?")[0]; }; _local4 = _shortenURL(_local4); }; if (int(_debug.mode) > int(VisualDebugMode.basic)){ _local3 = (_local3 + ((" to \"" + _local4) + "\"")); }; _debug.success(_local3); } else { _debug.info(_local3); }; _removeListeners(_arg1.target); } } }//package com.google.analytics.core
Section 48
//IdleTimer (com.google.analytics.core.IdleTimer) package com.google.analytics.core { import flash.display.*; import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.utils.*; public class IdleTimer { private var _stage:Stage; private var _loop:Timer; private var _lastMove:int; private var _inactivity:Number; private var _debug:DebugConfiguration; private var _session:Timer; private var _buffer:Buffer; public function IdleTimer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:DisplayObject, _arg4:Buffer){ var _local5:Number = _arg1.idleLoop; var _local6:Number = _arg1.idleTimeout; var _local7:Number = _arg1.sessionTimeout; _loop = new Timer((_local5 * 1000)); _session = new Timer((_local7 * 1000), 1); _debug = _arg2; _stage = _arg3.stage; _buffer = _arg4; _lastMove = getTimer(); _inactivity = (_local6 * 1000); _loop.addEventListener(TimerEvent.TIMER, checkForIdle); _session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession); _stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); _debug.info(((((("delay: " + _local5) + "sec , inactivity: ") + _local6) + "sec, sessionTimeout: ") + _local7), VisualDebugMode.geek); _loop.start(); } private function onMouseMove(_arg1:MouseEvent):void{ _lastMove = getTimer(); if (_session.running){ _debug.info("session timer reset", VisualDebugMode.geek); _session.reset(); }; } public function endSession(_arg1:TimerEvent):void{ _session.removeEventListener(TimerEvent.TIMER_COMPLETE, endSession); _debug.info("session timer end session", VisualDebugMode.geek); _session.reset(); _buffer.resetCurrentSession(); _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); _debug.info(_buffer.utmc.toString(), VisualDebugMode.geek); _session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession); } public function checkForIdle(_arg1:TimerEvent):void{ var _local2:int = getTimer(); if ((_local2 - _lastMove) >= _inactivity){ if (!_session.running){ _debug.info("session timer start", VisualDebugMode.geek); _session.start(); }; }; } } }//package com.google.analytics.core
Section 49
//Organic (com.google.analytics.core.Organic) package com.google.analytics.core { import com.google.analytics.utils.*; public class Organic { private var _sourcesCache:Array; private var _sourcesEngine:Array; private var _ignoredKeywords:Array; private var _ignoredReferralsCache:Object; private var _ignoredReferrals:Array; private var _ignoredKeywordsCache:Object; private var _sources:Array; public static var throwErrors:Boolean = false; public function Organic(){ _sources = []; _sourcesCache = []; _sourcesEngine = []; _ignoredReferrals = []; _ignoredReferralsCache = {}; _ignoredKeywords = []; _ignoredKeywordsCache = {}; } public function isIgnoredKeyword(_arg1:String):Boolean{ if (_ignoredKeywordsCache.hasOwnProperty(_arg1)){ return (true); }; return (false); } public function getKeywordValue(_arg1:OrganicReferrer, _arg2:String):String{ var _local3:String = _arg1.keyword; return (getKeywordValueFromPath(_local3, _arg2)); } public function isIgnoredReferral(_arg1:String):Boolean{ if (_ignoredReferralsCache.hasOwnProperty(_arg1)){ return (true); }; return (false); } public function clear():void{ clearEngines(); clearIgnoredReferrals(); clearIgnoredKeywords(); } public function get count():int{ return (_sources.length); } public function get ignoredKeywordsCount():int{ return (_ignoredKeywords.length); } public function match(_arg1:String):Boolean{ if (_arg1 == ""){ return (false); }; _arg1 = _arg1.toLowerCase(); if (_sourcesEngine[_arg1] != undefined){ return (true); }; return (false); } public function clearIgnoredKeywords():void{ _ignoredKeywords = []; _ignoredKeywordsCache = {}; } public function addSource(_arg1:String, _arg2:String):void{ var _local3:OrganicReferrer = new OrganicReferrer(_arg1, _arg2); if (_sourcesCache[_local3.toString()] == undefined){ _sources.push(_local3); _sourcesCache[_local3.toString()] = (_sources.length - 1); if (_sourcesEngine[_local3.engine] == undefined){ _sourcesEngine[_local3.engine] = [(_sources.length - 1)]; } else { _sourcesEngine[_local3.engine].push((_sources.length - 1)); }; } else { if (throwErrors){ throw (new Error((_local3.toString() + " already exists, we don't add it."))); }; }; } public function clearEngines():void{ _sources = []; _sourcesCache = []; _sourcesEngine = []; } public function get ignoredReferralsCount():int{ return (_ignoredReferrals.length); } public function addIgnoredReferral(_arg1:String):void{ if (_ignoredReferralsCache[_arg1] == undefined){ _ignoredReferrals.push(_arg1); _ignoredReferralsCache[_arg1] = (_ignoredReferrals.length - 1); } else { if (throwErrors){ throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it."))); }; }; } public function clearIgnoredReferrals():void{ _ignoredReferrals = []; _ignoredReferralsCache = {}; } public function getReferrerByName(_arg1:String):OrganicReferrer{ var _local2:int; if (match(_arg1)){ _local2 = _sourcesEngine[_arg1][0]; return (_sources[_local2]); }; return (null); } public function addIgnoredKeyword(_arg1:String):void{ if (_ignoredKeywordsCache[_arg1] == undefined){ _ignoredKeywords.push(_arg1); _ignoredKeywordsCache[_arg1] = (_ignoredKeywords.length - 1); } else { if (throwErrors){ throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it."))); }; }; } public function get sources():Array{ return (_sources); } public static function getKeywordValueFromPath(_arg1:String, _arg2:String):String{ var _local3:String; var _local4:Variables; if (_arg2.indexOf((_arg1 + "=")) > -1){ if (_arg2.charAt(0) == "?"){ _arg2 = _arg2.substr(1); }; _arg2 = _arg2.split("+").join("%20"); _local4 = new Variables(_arg2); _local3 = _local4[_arg1]; }; return (_local3); } } }//package com.google.analytics.core
Section 50
//OrganicReferrer (com.google.analytics.core.OrganicReferrer) package com.google.analytics.core { public class OrganicReferrer { private var _engine:String; private var _keyword:String; public function OrganicReferrer(_arg1:String, _arg2:String){ this.engine = _arg1; this.keyword = _arg2; } public function get keyword():String{ return (_keyword); } public function get engine():String{ return (_engine); } public function set engine(_arg1:String):void{ _engine = _arg1.toLowerCase(); } public function toString():String{ return (((engine + "?") + keyword)); } public function set keyword(_arg1:String):void{ _keyword = _arg1.toLowerCase(); } } }//package com.google.analytics.core
Section 51
//RequestObject (com.google.analytics.core.RequestObject) package com.google.analytics.core { import flash.net.*; import flash.utils.*; public class RequestObject { public var start:int; public var end:int; public var request:URLRequest; public function RequestObject(_arg1:URLRequest){ start = getTimer(); this.request = _arg1; } public function hasCompleted():Boolean{ return ((end > 0)); } public function toString():String{ var _local1:Array = []; _local1.push((("duration: " + duration) + "ms")); _local1.push(("url: " + request.url)); return ((("{ " + _local1.join(", ")) + " }")); } public function complete():void{ end = getTimer(); } public function get duration():int{ if (!hasCompleted()){ return (0); }; return ((end - start)); } } }//package com.google.analytics.core
Section 52
//ServerOperationMode (com.google.analytics.core.ServerOperationMode) package com.google.analytics.core { public class ServerOperationMode { private var _value:int; private var _name:String; public static const both:ServerOperationMode = new ServerOperationMode(2, "both"); ; public static const remote:ServerOperationMode = new ServerOperationMode(1, "remote"); ; public static const local:ServerOperationMode = new ServerOperationMode(0, "local"); ; public function ServerOperationMode(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.core
Section 53
//TrackerCache (com.google.analytics.core.TrackerCache) package com.google.analytics.core { import com.google.analytics.v4.*; import flash.errors.*; public class TrackerCache implements GoogleAnalyticsAPI { public var tracker:GoogleAnalyticsAPI; private var _ar:Array; public static var CACHE_THROW_ERROR:Boolean; public function TrackerCache(_arg1:GoogleAnalyticsAPI=null){ this.tracker = _arg1; _ar = []; } public function size():uint{ return (_ar.length); } public function flush():void{ var _local1:Object; var _local2:String; var _local3:Array; var _local4:int; var _local5:int; if (tracker == null){ return; }; if (size() > 0){ _local4 = _ar.length; while (_local5 < _local4) { _local1 = _ar.shift(); _local2 = (_local1.name as String); _local3 = (_local1.args as Array); if (((!((_local2 == null))) && ((_local2 in tracker)))){ (tracker[_local2] as Function).apply(tracker, _local3); }; _local5++; }; }; } public function enqueue(_arg1:String, ... _args):Boolean{ if (_arg1 == null){ return (false); }; _ar.push({name:_arg1, args:_args}); return (true); } public function link(_arg1:String, _arg2:Boolean=false):void{ enqueue("link", _arg1, _arg2); } public function addOrganic(_arg1:String, _arg2:String):void{ enqueue("addOrganic", _arg1, _arg2); } public function setAllowLinker(_arg1:Boolean):void{ enqueue("setAllowLinker", _arg1); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ enqueue("trackEvent", _arg1, _arg2, _arg3, _arg4); return (true); } public function getClientInfo():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getClientInfo' method for the moment.")); }; return (false); } public function trackTrans():void{ enqueue("trackTrans"); } public function trackPageview(_arg1:String=""):void{ enqueue("trackPageview", _arg1); } public function setClientInfo(_arg1:Boolean):void{ enqueue("setClientInfo", _arg1); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ enqueue("linkByPost", _arg1, _arg2); } public function setCookieTimeout(_arg1:int):void{ enqueue("setCookieTimeout", _arg1); } public function isEmpty():Boolean{ return ((_ar.length == 0)); } public function getDetectTitle():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectTitle' method for the moment.")); }; return (false); } public function resetSession():void{ enqueue("resetSession"); } public function setDetectFlash(_arg1:Boolean):void{ enqueue("setDetectFlash", _arg1); } public function clear():void{ _ar = []; } public function setCampNameKey(_arg1:String):void{ enqueue("setCampNameKey", _arg1); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ enqueue("addItem", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } public function createEventTracker(_arg1:String):EventTracker{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'createEventTracker' method for the moment.")); }; return (null); } public function setVar(_arg1:String):void{ enqueue("setVar", _arg1); } public function clearIgnoredOrganic():void{ enqueue("clearIgnoredOrganic"); } public function setDomainName(_arg1:String):void{ enqueue("setDomainName", _arg1); } public function setCampSourceKey(_arg1:String):void{ enqueue("setCampSourceKey", _arg1); } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'addTrans' method for the moment.")); }; return (null); } public function setCampContentKey(_arg1:String):void{ enqueue("setCampContentKey", _arg1); } public function setLocalServerMode():void{ enqueue("setLocalServerMode"); } public function getLocalGifPath():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLocalGifPath' method for the moment.")); }; return (""); } public function setAllowAnchor(_arg1:Boolean):void{ enqueue("setAllowAnchor", _arg1); } public function clearIgnoredRef():void{ enqueue("clearIgnoredRef"); } public function setLocalGifPath(_arg1:String):void{ enqueue("setLocalGifPath", _arg1); } public function getVersion():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getVersion' method for the moment.")); }; return (""); } public function setCookiePath(_arg1:String):void{ enqueue("setCookiePath", _arg1); } public function setSampleRate(_arg1:Number):void{ enqueue("setSampleRate", _arg1); } public function setDetectTitle(_arg1:Boolean):void{ enqueue("setDetectTitle", _arg1); } public function setAllowHash(_arg1:Boolean):void{ enqueue("setAllowHash", _arg1); } public function addIgnoredOrganic(_arg1:String):void{ enqueue("addIgnoredOrganic", _arg1); } public function setCampNOKey(_arg1:String):void{ enqueue("setCampNOKey", _arg1); } public function getServiceMode():ServerOperationMode{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getServiceMode' method for the moment.")); }; return (null); } public function setLocalRemoteServerMode():void{ enqueue("setLocalRemoteServerMode"); } public function cookiePathCopy(_arg1:String):void{ enqueue("cookiePathCopy", _arg1); } public function getDetectFlash():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectFlash' method for the moment.")); }; return (false); } public function setCampaignTrack(_arg1:Boolean):void{ enqueue("setCampaignTrack", _arg1); } public function clearOrganic():void{ enqueue("clearOrganic"); } public function setCampTermKey(_arg1:String):void{ enqueue("setCampTermKey", _arg1); } public function addIgnoredRef(_arg1:String):void{ enqueue("addIgnoredRef", _arg1); } public function setCampMediumKey(_arg1:String):void{ enqueue("setCampMediumKey", _arg1); } public function setSessionTimeout(_arg1:int):void{ enqueue("setSessionTimeout", _arg1); } public function setRemoteServerMode():void{ enqueue("setRemoteServerMode"); } public function element(){ return (_ar[0]); } public function getAccount():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getAccount' method for the moment.")); }; return (""); } } }//package com.google.analytics.core
Section 54
//TrackerMode (com.google.analytics.core.TrackerMode) package com.google.analytics.core { public class TrackerMode { public static const BRIDGE:String = "Bridge"; public static const AS3:String = "AS3"; } }//package com.google.analytics.core
Section 55
//Utils (com.google.analytics.core.Utils) package com.google.analytics.core { public class Utils { public static function trim(_arg1:String, _arg2:Boolean=false):String{ var _local5:int; var _local6:int; var _local7:int; if (_arg1 == ""){ return (""); }; var _local3:Array = [" ", "\n", "\r", "\t"]; var _local4:String = _arg1; if (_arg2){ _local5 = 0; while ((((_local5 < _local3.length)) && ((_local4.indexOf(_local3[_local5]) > -1)))) { _local4 = _local4.split(_local3[_local5]).join(""); _local5++; }; } else { _local6 = 0; while ((((_local6 < _local4.length)) && ((_local3.indexOf(_local4.charAt(_local6)) > -1)))) { _local6++; }; _local4 = _local4.substr(_local6); _local7 = (_local4.length - 1); while ((((_local7 >= 0)) && ((_local3.indexOf(_local4.charAt(_local7)) > -1)))) { _local7--; }; _local4 = _local4.substring(0, (_local7 + 1)); }; return (_local4); } public static function generateHash(_arg1:String):int{ var _local4:int; var _local5:int; var _local2 = 1; var _local3:int; if (((!((_arg1 == null))) && (!((_arg1 == ""))))){ _local2 = 0; _local4 = (_arg1.length - 1); while (_local4 >= 0) { _local5 = _arg1.charCodeAt(_local4); _local2 = ((((_local2 << 6) & 268435455) + _local5) + (_local5 << 14)); _local3 = (_local2 & 266338304); if (_local3 != 0){ _local2 = (_local2 ^ (_local3 >> 21)); }; _local4--; }; }; return (_local2); } public static function generate32bitRandom():int{ return (Math.round((Math.random() * 2147483647))); } public static function validateAccount(_arg1:String):Boolean{ var _local2:RegExp = /^UA-[0-9]*-[0-9]*$/; return (_local2.test(_arg1)); } } }//package com.google.analytics.core
Section 56
//Cookie (com.google.analytics.data.Cookie) package com.google.analytics.data { public interface Cookie { function fromSharedObject(_arg1:Object):void; function toURLString():String; function get creation():Date; function toSharedObject():Object; function isExpired():Boolean; function set creation(_arg1:Date):void; function set expiration(_arg1:Date):void; function get expiration():Date; } }//package com.google.analytics.data
Section 57
//UTMA (com.google.analytics.data.UTMA) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMA extends UTMCookie { private var _sessionId:Number; private var _domainHash:Number; private var _firstTime:Number; private var _currentTime:Number; private var _lastTime:Number; private var _sessionCount:Number; public function UTMA(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:Number=NaN, _arg6:Number=NaN){ super("utma", "__utma", ["domainHash", "sessionId", "firstTime", "lastTime", "currentTime", "sessionCount"], (Timespan.twoyears * 1000)); this.domainHash = _arg1; this.sessionId = _arg2; this.firstTime = _arg3; this.lastTime = _arg4; this.currentTime = _arg5; this.sessionCount = _arg6; } public function get lastTime():Number{ return (_lastTime); } public function set lastTime(_arg1:Number):void{ _lastTime = _arg1; update(); } public function set currentTime(_arg1:Number):void{ _currentTime = _arg1; update(); } public function get sessionId():Number{ return (_sessionId); } public function get sessionCount():Number{ return (_sessionCount); } public function get firstTime():Number{ return (_firstTime); } public function get currentTime():Number{ return (_currentTime); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function set sessionId(_arg1:Number):void{ _sessionId = _arg1; update(); } public function set sessionCount(_arg1:Number):void{ _sessionCount = _arg1; update(); } public function get domainHash():Number{ return (_domainHash); } public function set firstTime(_arg1:Number):void{ _firstTime = _arg1; update(); } } }//package com.google.analytics.data
Section 58
//UTMB (com.google.analytics.data.UTMB) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMB extends UTMCookie { private var _trackCount:Number; private var _lastTime:Number; private var _domainHash:Number; private var _token:Number; public static var defaultTimespan:Number = Timespan.thirtyminutes; public function UTMB(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN){ super("utmb", "__utmb", ["domainHash", "trackCount", "token", "lastTime"], (defaultTimespan * 1000)); this.domainHash = _arg1; this.trackCount = _arg2; this.token = _arg3; this.lastTime = _arg4; } public function set token(_arg1:Number):void{ _token = _arg1; update(); } public function set trackCount(_arg1:Number):void{ _trackCount = _arg1; update(); } public function get lastTime():Number{ return (_lastTime); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function set lastTime(_arg1:Number):void{ _lastTime = _arg1; update(); } public function get domainHash():Number{ return (_domainHash); } public function get token():Number{ return (_token); } public function get trackCount():Number{ return (_trackCount); } } }//package com.google.analytics.data
Section 59
//UTMC (com.google.analytics.data.UTMC) package com.google.analytics.data { public class UTMC extends UTMCookie { private var _domainHash:Number; public function UTMC(_arg1:Number=NaN){ super("utmc", "__utmc", ["domainHash"]); this.domainHash = _arg1; } public function get domainHash():Number{ return (_domainHash); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } } }//package com.google.analytics.data
Section 60
//UTMCookie (com.google.analytics.data.UTMCookie) package com.google.analytics.data { import com.google.analytics.core.*; public class UTMCookie implements Cookie { protected var inURL:String; protected var name:String; private var _creation:Date; private var _expiration:Date; public var proxy:Buffer; protected var fields:Array; private var _timespan:Number; public function UTMCookie(_arg1:String, _arg2:String, _arg3:Array, _arg4:Number=0){ this.name = _arg1; this.inURL = _arg2; this.fields = _arg3; _timestamp(_arg4); } public function isEmpty():Boolean{ var _local2:String; var _local1:int; var _local3:int; while (_local3 < fields.length) { _local2 = fields[_local3]; if ((((this[_local2] is Number)) && (isNaN(this[_local2])))){ _local1++; } else { if ((((this[_local2] is String)) && ((this[_local2] == "")))){ _local1++; }; }; _local3++; }; if (_local1 == fields.length){ return (true); }; return (false); } public function resetTimestamp(_arg1:Number=NaN):void{ if (!isNaN(_arg1)){ _timespan = _arg1; }; _creation = null; _expiration = null; _timestamp(_timespan); } protected function update():void{ resetTimestamp(); if (proxy){ proxy.update(name, toSharedObject()); }; } public function reset():void{ var _local1:String; var _local2:int; while (_local2 < fields.length) { _local1 = fields[_local2]; if ((this[_local1] is Number)){ this[_local1] = NaN; } else { if ((this[_local1] is String)){ this[_local1] = ""; }; }; _local2++; }; resetTimestamp(); update(); } public function fromSharedObject(_arg1:Object):void{ var _local2:String; var _local3:int = fields.length; var _local4:int; while (_local4 < _local3) { _local2 = fields[_local4]; if (_arg1[_local2]){ this[_local2] = _arg1[_local2]; }; _local4++; }; if (_arg1.creation){ this.creation = _arg1.creation; }; if (_arg1.expiration){ this.expiration = _arg1.expiration; }; } private function _timestamp(_arg1:Number):void{ creation = new Date(); _timespan = _arg1; if (_arg1 > 0){ expiration = new Date((creation.valueOf() + _arg1)); }; } public function isExpired():Boolean{ var _local1:Date = new Date(); var _local2:Number = (expiration.valueOf() - _local1.valueOf()); if (_local2 <= 0){ return (true); }; return (false); } public function set expiration(_arg1:Date):void{ _expiration = _arg1; } public function get creation():Date{ return (_creation); } public function valueOf():String{ var _local2:String; var _local3:*; var _local1:Array = []; var _local4:int; while (_local4 < fields.length) { _local2 = fields[_local4]; _local3 = this[_local2]; if ((_local3 is String)){ if (_local3 == ""){ _local3 = "-"; _local1.push(_local3); } else { _local1.push(_local3); }; } else { if ((_local3 is Number)){ if (_local3 == 0){ _local1.push(_local3); } else { if (isNaN(_local3)){ _local3 = "-"; _local1.push(_local3); } else { _local1.push(_local3); }; }; }; }; _local4++; }; return (("" + _local1.join("."))); } public function toURLString():String{ return (((inURL + "=") + valueOf())); } public function get expiration():Date{ if (_expiration){ return (_expiration); }; return (new Date((new Date().valueOf() + 1000))); } public function toSharedObject():Object{ var _local2:String; var _local3:*; var _local1:Object = {}; var _local4:int; for (;_local4 < fields.length;_local4++) { _local2 = fields[_local4]; _local3 = this[_local2]; if ((_local3 is String)){ _local1[_local2] = _local3; } else { if (_local3 == 0){ _local1[_local2] = _local3; } else { if (isNaN(_local3)){ continue; } else { _local1[_local2] = _local3; }; }; }; }; _local1.creation = creation; _local1.expiration = expiration; return (_local1); } public function toString(_arg1:Boolean=false):String{ var _local3:String; var _local4:*; var _local2:Array = []; var _local5:int = fields.length; var _local6:int; for (;_local6 < _local5;_local6++) { _local3 = fields[_local6]; _local4 = this[_local3]; if ((_local4 is String)){ _local2.push((((_local3 + ": \"") + _local4) + "\"")); } else { if (_local4 == 0){ _local2.push(((_local3 + ": ") + _local4)); } else { if (isNaN(_local4)){ continue; } else { _local2.push(((_local3 + ": ") + _local4)); }; }; }; }; var _local7 = (((name.toUpperCase() + " {") + _local2.join(", ")) + "}"); if (_arg1){ _local7 = (_local7 + (((" creation:" + creation) + ", expiration:") + expiration)); }; return (_local7); } public function set creation(_arg1:Date):void{ _creation = _arg1; } } }//package com.google.analytics.data
Section 61
//UTMK (com.google.analytics.data.UTMK) package com.google.analytics.data { public class UTMK extends UTMCookie { private var _hash:Number; public function UTMK(_arg1:Number=NaN){ super("utmk", "__utmk", ["hash"]); this.hash = _arg1; } public function set hash(_arg1:Number):void{ _hash = _arg1; update(); } public function get hash():Number{ return (_hash); } } }//package com.google.analytics.data
Section 62
//UTMV (com.google.analytics.data.UTMV) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMV extends UTMCookie { private var _domainHash:Number; private var _value:String; public function UTMV(_arg1:Number=NaN, _arg2:String=""){ super("utmv", "__utmv", ["domainHash", "value"], (Timespan.twoyears * 1000)); this.domainHash = _arg1; this.value = _arg2; } override public function toURLString():String{ return (((inURL + "=") + encodeURI(valueOf()))); } public function get value():String{ return (_value); } public function get domainHash():Number{ return (_domainHash); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function set value(_arg1:String):void{ _value = _arg1; update(); } } }//package com.google.analytics.data
Section 63
//UTMZ (com.google.analytics.data.UTMZ) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMZ extends UTMCookie { private var _campaignTracking:String; private var _campaignCreation:Number; private var _responseCount:Number; private var _domainHash:Number; private var _campaignSessions:Number; public static var defaultTimespan:Number = Timespan.sixmonths; public function UTMZ(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:String=""){ super("utmz", "__utmz", ["domainHash", "campaignCreation", "campaignSessions", "responseCount", "campaignTracking"], (defaultTimespan * 1000)); this.domainHash = _arg1; this.campaignCreation = _arg2; this.campaignSessions = _arg3; this.responseCount = _arg4; this.campaignTracking = _arg5; } public function set responseCount(_arg1:Number):void{ _responseCount = _arg1; update(); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function set campaignCreation(_arg1:Number):void{ _campaignCreation = _arg1; update(); } public function get campaignTracking():String{ return (_campaignTracking); } public function get campaignSessions():Number{ return (_campaignSessions); } public function get domainHash():Number{ return (_domainHash); } public function get responseCount():Number{ return (_responseCount); } public function get campaignCreation():Number{ return (_campaignCreation); } public function set campaignSessions(_arg1:Number):void{ _campaignSessions = _arg1; update(); } public function set campaignTracking(_arg1:String):void{ _campaignTracking = _arg1; update(); } } }//package com.google.analytics.data
Section 64
//X10 (com.google.analytics.data.X10) package com.google.analytics.data { public class X10 { private var _delimEnd:String;// = ")" private var _minimum:int; private var _delimSet:String;// = "*" private var _escapeChar:String;// = "'" private var _delimBegin:String;// = "(" private var _delimNumValue:String;// = "!" private var _key:String;// = "k" private var _set:Array; private var _hasData:int; private var _escapeCharMap:Object; private var _projectData:Object; private var _value:String;// = "v" public function X10(){ _set = [_key, _value]; super(); _projectData = {}; _escapeCharMap = {}; _escapeCharMap[_escapeChar] = "'0"; _escapeCharMap[_delimEnd] = "'1"; _escapeCharMap[_delimSet] = "'2"; _escapeCharMap[_delimNumValue] = "'3"; _minimum = 1; } private function _setInternal(_arg1:Number, _arg2:String, _arg3:Number, _arg4:String):void{ if (!hasProject(_arg1)){ _projectData[_arg1] = {}; }; if (_projectData[_arg1][_arg2] == undefined){ _projectData[_arg1][_arg2] = []; }; _projectData[_arg1][_arg2][_arg3] = _arg4; _hasData = (_hasData + 1); } private function _renderProject(_arg1:Object):String{ var _local4:int; var _local5:Array; var _local2 = ""; var _local3:Boolean; var _local6:int = _set.length; _local4 = 0; while (_local4 < _local6) { _local5 = _arg1[_set[_local4]]; if (_local5){ if (_local3){ _local2 = (_local2 + _set[_local4]); }; _local2 = (_local2 + _renderDataType(_local5)); _local3 = false; } else { _local3 = true; }; _local4++; }; return (_local2); } public function hasProject(_arg1:Number):Boolean{ return (_projectData[_arg1]); } public function clearKey(_arg1:Number):void{ _clearInternal(_arg1, _key); } private function _renderDataType(_arg1:Array):String{ var _local3:String; var _local4:int; var _local2:Array = []; _local4 = 0; while (_local4 < _arg1.length) { if (_arg1[_local4] != undefined){ _local3 = ""; if (((!((_local4 == _minimum))) && ((_arg1[(_local4 - 1)] == undefined)))){ _local3 = (_local3 + _local4.toString()); _local3 = (_local3 + _delimNumValue); }; _local3 = (_local3 + _escapeExtensibleValue(_arg1[_local4])); _local2.push(_local3); }; _local4++; }; return (((_delimBegin + _local2.join(_delimSet)) + _delimEnd)); } public function getKey(_arg1:Number, _arg2:Number):String{ return ((_getInternal(_arg1, _key, _arg2) as String)); } public function hasData():Boolean{ return ((_hasData > 0)); } public function renderMergedUrlString(_arg1:X10=null):String{ var _local3:String; if (!_arg1){ return (renderUrlString()); }; var _local2:Array = [_arg1.renderUrlString()]; for (_local3 in _projectData) { if (((hasProject(Number(_local3))) && (!(_arg1.hasProject(Number(_local3)))))){ _local2.push((_local3 + _renderProject(_projectData[_local3]))); }; }; return (_local2.join("")); } public function setValue(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ if (((((!((Math.round(_arg3) == _arg3))) || (isNaN(_arg3)))) || ((_arg3 == Infinity)))){ return (false); }; _setInternal(_arg1, _value, _arg2, _arg3.toString()); return (true); } public function renderUrlString():String{ var _local2:String; var _local1:Array = []; for (_local2 in _projectData) { if (hasProject(Number(_local2))){ _local1.push((_local2 + _renderProject(_projectData[_local2]))); }; }; return (_local1.join("")); } private function _getInternal(_arg1:Number, _arg2:String, _arg3:Number):Object{ if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){ return (_projectData[_arg1][_arg2][_arg3]); }; return (undefined); } public function setKey(_arg1:Number, _arg2:Number, _arg3:String):Boolean{ _setInternal(_arg1, _key, _arg2, _arg3); return (true); } public function clearValue(_arg1:Number):void{ _clearInternal(_arg1, _value); } private function _clearInternal(_arg1:Number, _arg2:String):void{ var _local3:Boolean; var _local4:int; var _local5:int; if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){ _projectData[_arg1][_arg2] = undefined; _local3 = true; _local5 = _set.length; _local4 = 0; while (_local4 < _local5) { if (_projectData[_arg1][_set[_local4]] != undefined){ _local3 = false; break; }; _local4++; }; if (_local3){ _projectData[_arg1] = undefined; _hasData = (_hasData - 1); }; }; } public function getValue(_arg1:Number, _arg2:Number){ var _local3:* = _getInternal(_arg1, _value, _arg2); if (_local3 == null){ return (null); }; return (Number(_local3)); } private function _escapeExtensibleValue(_arg1:String):String{ var _local3:int; var _local4:String; var _local5:String; var _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1.charAt(_local3); _local5 = _escapeCharMap[_local4]; if (_local5){ _local2 = (_local2 + _local5); } else { _local2 = (_local2 + _local4); }; _local3++; }; return (_local2); } } }//package com.google.analytics.data
Section 65
//_Style (com.google.analytics.debug._Style) package com.google.analytics.debug { import flash.net.*; import flash.text.*; public class _Style { public var failureColor:uint; public var borderColor:uint; public var backgroundColor:uint; private var _sheet:StyleSheet; public var roundedCorner:uint; public var warningColor:uint; public var infoColor:uint; public var alertColor:uint; public var successColor:uint; private var _loader:URLLoader; private var _defaultSheet:String; public function _Style(){ _sheet = new StyleSheet(); _loader = new URLLoader(); _init(); } private function _parseSheet(_arg1:String):void{ _sheet.parseCSS(_arg1); } public function get sheet():StyleSheet{ return (_sheet); } private function _init():void{ _defaultSheet = ""; _defaultSheet = (_defaultSheet + "a{text-decoration: underline;}\n"); _defaultSheet = (_defaultSheet + ".uiLabel{color: #000000;font-family: Arial;font-size: 12;margin-left: 2;margin-right: 2;}\n"); _defaultSheet = (_defaultSheet + ".uiWarning{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlert{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiInfo{color: #000000;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiSuccess{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiFailure{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlertAction{color: #ffffff;text-align: center;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlertTitle{color: #ffffff;font-family: Arial;font-size: 16;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + "\n"); roundedCorner = 6; backgroundColor = 0xCCCCCC; borderColor = 0x555555; infoColor = 16777113; alertColor = 0xFFCC00; warningColor = 0xCC0000; successColor = 0xFF00; failureColor = 0xFF0000; _parseSheet(_defaultSheet); } } }//package com.google.analytics.debug
Section 66
//Alert (com.google.analytics.debug.Alert) package com.google.analytics.debug { import flash.events.*; public class Alert extends Label { public var autoClose:Boolean;// = true public var actionOnNextLine:Boolean;// = true private var _actions:Array; public function Alert(_arg1:String, _arg2:Array, _arg3:String="uiAlert", _arg4:uint=0, _arg5:Align=null, _arg6:Boolean=false, _arg7:Boolean=true){ if (_arg4 == 0){ _arg4 = Style.alertColor; }; if (_arg5 == null){ _arg5 = Align.center; }; super(_arg1, _arg3, _arg4, _arg5, _arg6); this.selectable = true; super.mouseChildren = true; this.buttonMode = true; this.mouseEnabled = true; this.useHandCursor = true; this.actionOnNextLine = _arg7; _actions = []; var _local8:int; while (_local8 < _arg2.length) { _arg2[_local8].container = this; _actions.push(_arg2[_local8]); _local8++; }; } private function _defineActions():void{ var _local3:AlertAction; var _local1 = ""; if (actionOnNextLine){ _local1 = (_local1 + "\n"); } else { _local1 = (_local1 + " |"); }; _local1 = (_local1 + " "); var _local2:Array = []; var _local4:int; while (_local4 < _actions.length) { _local3 = _actions[_local4]; _local2.push((((("<a href=\"event:" + _local3.activator) + "\">") + _local3.name) + "</a>")); _local4++; }; _local1 = (_local1 + _local2.join(" | ")); appendText(_local1, "uiAlertAction"); } protected function isValidAction(_arg1:String):Boolean{ var _local2:int; while (_local2 < _actions.length) { if (_arg1 == _actions[_local2].activator){ return (true); }; _local2++; }; return (false); } override protected function layout():void{ super.layout(); _defineActions(); } protected function getAction(_arg1:String):AlertAction{ var _local2:int; while (_local2 < _actions.length) { if (_arg1 == _actions[_local2].activator){ return (_actions[_local2]); }; _local2++; }; return (null); } protected function spaces(_arg1:int):String{ var _local2 = ""; var _local3 = " "; var _local4:int; while (_local4 < (_arg1 + 1)) { _local2 = (_local2 + _local3); _local4++; }; return (_local2); } override public function onLink(_arg1:TextEvent):void{ var _local2:AlertAction; if (isValidAction(_arg1.text)){ _local2 = getAction(_arg1.text); if (_local2){ _local2.execute(); }; }; if (autoClose){ close(); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 67
//AlertAction (com.google.analytics.debug.AlertAction) package com.google.analytics.debug { public class AlertAction { public var container:Alert; private var _callback; public var activator:String; public var name:String; public function AlertAction(_arg1:String, _arg2:String, _arg3){ this.name = _arg1; this.activator = _arg2; _callback = _arg3; } public function execute():void{ if (_callback){ if ((_callback is Function)){ (_callback as Function)(); } else { if ((_callback is String)){ var _local1 = container; _local1[_callback](); }; }; }; } } }//package com.google.analytics.debug
Section 68
//Align (com.google.analytics.debug.Align) package com.google.analytics.debug { public class Align { private var _value:int; private var _name:String; public static const bottomRight:Align = new Align(18, "bottomRight"); ; public static const right:Align = new Align(16, "right"); ; public static const left:Align = new Align(32, "left"); ; public static const topRight:Align = new Align(17, "topRight"); ; public static const bottom:Align = new Align(2, "bottom"); ; public static const bottomLeft:Align = new Align(34, "bottomLeft"); ; public static const topLeft:Align = new Align(33, "topLeft"); ; public static const center:Align = new Align(0x0100, "center"); ; public static const none:Align = new Align(0, "none"); ; public static const top:Align = new Align(1, "top"); ; public function Align(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.debug
Section 69
//Background (com.google.analytics.debug.Background) package com.google.analytics.debug { import flash.display.*; public class Background { public static function drawRounded(_arg1, _arg2:Graphics, _arg3:uint=0, _arg4:uint=0):void{ var _local5:uint; var _local6:uint; var _local7:uint = Style.roundedCorner; if ((((_arg3 > 0)) && ((_arg4 > 0)))){ _local5 = _arg3; _local6 = _arg4; } else { _local5 = _arg1.width; _local6 = _arg1.height; }; if (((_arg1.stickToEdge) && (!((_arg1.alignement == Align.none))))){ switch (_arg1.alignement){ case Align.top: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, _local7); break; case Align.topLeft: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, 0, _local7); break; case Align.topRight: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, 0); break; case Align.bottom: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, _local7, 0, 0); break; case Align.bottomLeft: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, 0); break; case Align.bottomRight: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, 0, 0); break; case Align.left: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, _local7); break; case Align.right: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, _local7, 0); break; case Align.center: _arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7); break; }; } else { _arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7); }; } } }//package com.google.analytics.debug
Section 70
//Debug (com.google.analytics.debug.Debug) package com.google.analytics.debug { import flash.events.*; import flash.ui.*; public class Debug extends Label { private var _lines:Array; private var _preferredForcedWidth:uint;// = 540 private var _linediff:int;// = 0 public var maxLines:uint;// = 16 public static var count:uint = 0; public function Debug(_arg1:uint=0, _arg2:Align=null, _arg3:Boolean=false){ if (_arg2 == null){ _arg2 = Align.bottom; }; super("", "uiLabel", _arg1, _arg2, _arg3); this.name = ("Debug" + count++); _lines = []; selectable = true; addEventListener(KeyboardEvent.KEY_DOWN, onKey); } public function writeBold(_arg1:String):void{ write(_arg1, true); } private function _getLinesToDisplay(_arg1:int=0):Array{ var _local2:Array; var _local3:uint; var _local4:uint; if ((_lines.length - 1) > maxLines){ if ((_linediff <= 0)){ _linediff = (_linediff + _arg1); } else { if ((((_linediff > 0)) && ((_arg1 < 0)))){ _linediff = (_linediff + _arg1); }; }; _local3 = ((_lines.length - maxLines) + _linediff); _local4 = (_local3 + maxLines); _local2 = _lines.slice(_local3, _local4); } else { _local2 = _lines; }; return (_local2); } private function onKey(_arg1:KeyboardEvent=null):void{ var _local2:Array; switch (_arg1.keyCode){ case Keyboard.DOWN: _local2 = _getLinesToDisplay(1); break; case Keyboard.UP: _local2 = _getLinesToDisplay(-1); break; default: _local2 = null; }; if (_local2 == null){ return; }; text = _local2.join("\n"); } override public function get forcedWidth():uint{ if (this.parent){ if (UISprite(this.parent).forcedWidth > _preferredForcedWidth){ return (_preferredForcedWidth); }; return (UISprite(this.parent).forcedWidth); //unresolved jump }; return (super.forcedWidth); } public function write(_arg1:String, _arg2:Boolean=false):void{ var _local3:Array; if (_arg1.indexOf("") > -1){ _local3 = _arg1.split("\n"); } else { _local3 = [_arg1]; }; var _local4 = ""; var _local5 = ""; if (_arg2){ _local4 = "<b>"; _local5 = "</b>"; }; var _local6:int; while (_local6 < _local3.length) { _lines.push(((_local4 + _local3[_local6]) + _local5)); _local6++; }; var _local7:Array = _getLinesToDisplay(); text = _local7.join("\n"); } public function close():void{ dispose(); } override protected function dispose():void{ removeEventListener(KeyboardEvent.KEY_DOWN, onKey); super.dispose(); } } }//package com.google.analytics.debug
Section 71
//DebugConfiguration (com.google.analytics.debug.DebugConfiguration) package com.google.analytics.debug { import com.google.analytics.core.*; import flash.net.*; import flash.utils.*; import flash.ui.*; public class DebugConfiguration { public var showHideKey:Number; private var _mode:VisualDebugMode; private var _verbose:Boolean;// = false public var destroyKey:Number; public var GIFRequests:Boolean;// = false public var showInfos:Boolean;// = true public var infoTimeout:Number;// = 1000 public var minimizedOnStart:Boolean;// = false private var _active:Boolean;// = false public var traceOutput:Boolean;// = false public var layout:ILayout; public var warningTimeout:Number;// = 1500 public var javascript:Boolean;// = false public var showWarnings:Boolean;// = true private var _visualInitialized:Boolean;// = false public function DebugConfiguration(){ _mode = VisualDebugMode.basic; showHideKey = Keyboard.SPACE; destroyKey = Keyboard.BACKSPACE; super(); } public function get verbose():Boolean{ return (_verbose); } public function set verbose(_arg1:Boolean):void{ _verbose = _arg1; } public function set mode(_arg1):void{ if ((_arg1 is String)){ switch (_arg1){ case "geek": _arg1 = VisualDebugMode.geek; break; case "advanced": _arg1 = VisualDebugMode.advanced; break; case "basic": default: _arg1 = VisualDebugMode.basic; }; }; _mode = _arg1; } public function success(_arg1:String):void{ if (layout){ layout.createSuccessAlert(_arg1); }; if (traceOutput){ trace((("[+] " + _arg1) + " !!")); }; } public function get active():Boolean{ return (_active); } private function _initializeVisual():void{ if (layout){ layout.init(); _visualInitialized = true; }; } private function _destroyVisual():void{ if (((layout) && (_visualInitialized))){ layout.destroy(); }; } public function warning(_arg1:String, _arg2:VisualDebugMode=null):void{ if (_filter(_arg2)){ return; }; if (((layout) && (showWarnings))){ layout.createWarning(_arg1); }; if (traceOutput){ trace((("## " + _arg1) + " ##")); }; } private function _filter(_arg1:VisualDebugMode=null):Boolean{ return (((_arg1) && ((int(_arg1) >= int(this.mode))))); } public function failure(_arg1:String):void{ if (layout){ layout.createFailureAlert(_arg1); }; if (traceOutput){ trace((("[-] " + _arg1) + " !!")); }; } public function get mode(){ return (_mode); } public function set active(_arg1:Boolean):void{ _active = _arg1; if (_active){ _initializeVisual(); } else { _destroyVisual(); }; } protected function trace(_arg1:String):void{ var _local7:Array; var _local8:int; var _local2:Array = []; var _local3 = ""; var _local4 = ""; if (this.mode == VisualDebugMode.geek){ _local3 = (getTimer() + " - "); _local4 = (new Array(_local3.length).join(" ") + " "); }; if (_arg1.indexOf("\n") > -1){ _local7 = _arg1.split("\n"); _local8 = 0; while (_local8 < _local7.length) { if (_local7[_local8] == ""){ } else { if (_local8 == 0){ _local2.push((_local3 + _local7[_local8])); } else { _local2.push((_local4 + _local7[_local8])); }; }; _local8++; }; } else { _local2.push((_local3 + _arg1)); }; var _local5:int = _local2.length; var _local6:int; while (_local6 < _local5) { trace(_local2[_local6]); _local6++; }; } public function alert(_arg1:String):void{ if (layout){ layout.createAlert(_arg1); }; if (traceOutput){ trace((("!! " + _arg1) + " !!")); }; } public function info(_arg1:String, _arg2:VisualDebugMode=null):void{ if (_filter(_arg2)){ return; }; if (((layout) && (showInfos))){ layout.createInfo(_arg1); }; if (traceOutput){ trace(_arg1); }; } public function alertGifRequest(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void{ if (layout){ layout.createGIFRequestAlert(_arg1, _arg2, _arg3); }; if (traceOutput){ trace(((">> " + _arg1) + " <<")); }; } } }//package com.google.analytics.debug
Section 72
//FailureAlert (com.google.analytics.debug.FailureAlert) package com.google.analytics.debug { public class FailureAlert extends Alert { public function FailureAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){ var _local4:Align = Align.bottomLeft; var _local5:Boolean; var _local6:Boolean; if (_arg1.verbose){ _arg2 = ((("<u><span class=\"uiAlertTitle\">Failure</span>" + spaces(18)) + "</u>\n\n") + _arg2); _local4 = Align.center; _local5 = false; _local6 = true; }; super(_arg2, _arg3, "uiFailure", Style.failureColor, _local4, _local5, _local6); } } }//package com.google.analytics.debug
Section 73
//GIFRequestAlert (com.google.analytics.debug.GIFRequestAlert) package com.google.analytics.debug { public class GIFRequestAlert extends Alert { public function GIFRequestAlert(_arg1:String, _arg2:Array){ super(_arg1, _arg2); } } }//package com.google.analytics.debug
Section 74
//ILayout (com.google.analytics.debug.ILayout) package com.google.analytics.debug { import flash.display.*; import com.google.analytics.core.*; import flash.net.*; public interface ILayout { function createAlert(_arg1:String):void; function addToStage(_arg1:DisplayObject):void; function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void; function createWarning(_arg1:String):void; function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void; function createInfo(_arg1:String):void; function createFailureAlert(_arg1:String):void; function addToPanel(_arg1:String, _arg2:DisplayObject):void; function init():void; function createSuccessAlert(_arg1:String):void; function createVisualDebug():void; function destroy():void; function bringToFront(_arg1:DisplayObject):void; function isAvailable():Boolean; } }//package com.google.analytics.debug
Section 75
//Info (com.google.analytics.debug.Info) package com.google.analytics.debug { import flash.events.*; import flash.utils.*; public class Info extends Label { private var _timer:Timer; public function Info(_arg1:String="", _arg2:uint=3000){ super(_arg1, "uiInfo", Style.infoColor, Align.top, true); if (_arg2 > 0){ _timer = new Timer(_arg2, 1); _timer.start(); _timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } override public function onLink(_arg1:TextEvent):void{ switch (_arg1.text){ case "hide": close(); break; }; } public function onComplete(_arg1:TimerEvent):void{ close(); } } }//package com.google.analytics.debug
Section 76
//Label (com.google.analytics.debug.Label) package com.google.analytics.debug { import flash.display.*; import flash.events.*; import flash.text.*; public class Label extends UISprite { private var _color:uint; private var _background:Shape; private var _textField:TextField; public var stickToEdge:Boolean; private var _text:String; protected var selectable:Boolean; private var _tag:String; public static var count:uint = 0; public function Label(_arg1:String="", _arg2:String="uiLabel", _arg3:uint=0, _arg4:Align=null, _arg5:Boolean=false){ this.name = ("Label" + count++); selectable = false; _background = new Shape(); _textField = new TextField(); _text = _arg1; _tag = _arg2; if (_arg4 == null){ _arg4 = Align.none; }; this.alignement = _arg4; this.stickToEdge = _arg5; if (_arg3 == 0){ _arg3 = Style.backgroundColor; }; _color = _arg3; _textField.addEventListener(TextEvent.LINK, onLink); } public function get tag():String{ return (_tag); } private function _draw():void{ var _local1:Graphics = _background.graphics; _local1.clear(); _local1.beginFill(_color); var _local2:uint = _textField.width; var _local3:uint = _textField.height; if (forcedWidth > 0){ _local2 = forcedWidth; }; Background.drawRounded(this, _local1, _local2, _local3); _local1.endFill(); } public function get text():String{ return (_textField.text); } public function appendText(_arg1:String, _arg2:String=""):void{ if (_arg1 == ""){ return; }; if (_arg2 == ""){ _arg2 = tag; }; _textField.htmlText = (_textField.htmlText + (((("<span class=\"" + _arg2) + "\">") + _arg1) + "</span>")); _text = (_text + _arg1); _draw(); resize(); } public function set text(_arg1:String):void{ if (_arg1 == ""){ _arg1 = _text; }; _textField.htmlText = (((("<span class=\"" + tag) + "\">") + _arg1) + "</span>"); _text = _arg1; _draw(); resize(); } override protected function layout():void{ _textField.type = TextFieldType.DYNAMIC; _textField.autoSize = TextFieldAutoSize.LEFT; _textField.background = false; _textField.selectable = selectable; _textField.multiline = true; _textField.styleSheet = Style.sheet; this.text = _text; addChild(_background); addChild(_textField); } public function set tag(_arg1:String):void{ _tag = _arg1; text = ""; } public function onLink(_arg1:TextEvent):void{ } override protected function dispose():void{ _textField.removeEventListener(TextEvent.LINK, onLink); super.dispose(); } } }//package com.google.analytics.debug
Section 77
//Layout (com.google.analytics.debug.Layout) package com.google.analytics.debug { import flash.display.*; import flash.events.*; import com.google.analytics.core.*; import flash.net.*; import com.google.analytics.*; public class Layout implements ILayout { private var _display:DisplayObject; private var _infoQueue:Array; private var _maxCharPerLine:int;// = 85 private var _hasInfo:Boolean; private var _warningQueue:Array; private var _hasDebug:Boolean; private var _hasWarning:Boolean; private var _mainPanel:Panel; private var _GRAlertQueue:Array; private var _debug:DebugConfiguration; public var visualDebug:Debug; private var _hasGRAlert:Boolean; public function Layout(_arg1:DebugConfiguration, _arg2:DisplayObject){ _display = _arg2; _debug = _arg1; _hasWarning = false; _hasInfo = false; _hasDebug = false; _hasGRAlert = false; _warningQueue = []; _infoQueue = []; _GRAlertQueue = []; } private function onKey(_arg1:KeyboardEvent=null):void{ switch (_arg1.keyCode){ case _debug.showHideKey: _mainPanel.visible = !(_mainPanel.visible); break; case _debug.destroyKey: destroy(); break; }; } public function createWarning(_arg1:String):void{ if (((_hasWarning) || (!(isAvailable())))){ _warningQueue.push(_arg1); return; }; _arg1 = _filterMaxChars(_arg1); _hasWarning = true; var _local2:Warning = new Warning(_arg1, _debug.warningTimeout); addToPanel("analytics", _local2); _local2.addEventListener(Event.REMOVED_FROM_STAGE, _clearWarning, false, 0, true); if (_hasDebug){ visualDebug.writeBold(_arg1); }; } public function bringToFront(_arg1:DisplayObject):void{ _display.stage.setChildIndex(_arg1, (_display.stage.numChildren - 1)); } public function createFailureAlert(_arg1:String):void{ var _local2:AlertAction; if (_debug.verbose){ _arg1 = _filterMaxChars(_arg1); _local2 = new AlertAction("Close", "close", "close"); } else { _local2 = new AlertAction("X", "close", "close"); }; var _local3:Alert = new FailureAlert(_debug, _arg1, [_local2]); addToPanel("analytics", _local3); if (_hasDebug){ if (_debug.verbose){ _arg1 = _arg1.split("\n").join(""); _arg1 = _filterMaxChars(_arg1, 66); }; visualDebug.writeBold(_arg1); }; } public function init():void{ var _local1 = 10; var _local2:uint = (_display.stage.stageWidth - (_local1 * 2)); var _local3:uint = (_display.stage.stageHeight - (_local1 * 2)); var _local4:Panel = new Panel("analytics", _local2, _local3); _local4.alignement = Align.top; _local4.stickToEdge = false; _local4.title = ("Google Analytics v" + GATracker.version); _mainPanel = _local4; addToStage(_local4); bringToFront(_local4); if (_debug.minimizedOnStart){ _mainPanel.onToggle(); }; createVisualDebug(); _display.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey, false, 0, true); } public function addToPanel(_arg1:String, _arg2:DisplayObject):void{ var _local4:Panel; var _local3:DisplayObject = _display.stage.getChildByName(_arg1); if (_local3){ _local4 = (_local3 as Panel); _local4.addData(_arg2); } else { trace((("panel \"" + _arg1) + "\" not found")); }; } private function _clearInfo(_arg1:Event):void{ _hasInfo = false; if (_infoQueue.length > 0){ createInfo(_infoQueue.shift()); }; } private function _filterMaxChars(_arg1:String, _arg2:int=0):String{ var _local6:String; var _local3 = "\n"; var _local4:Array = []; var _local5:Array = _arg1.split(_local3); if (_arg2 == 0){ _arg2 = _maxCharPerLine; }; var _local7:int; while (_local7 < _local5.length) { _local6 = _local5[_local7]; while (_local6.length > _arg2) { _local4.push(_local6.substr(0, _arg2)); _local6 = _local6.substring(_arg2); }; _local4.push(_local6); _local7++; }; return (_local4.join(_local3)); } private function _clearGRAlert(_arg1:Event):void{ _hasGRAlert = false; if (_GRAlertQueue.length > 0){ createGIFRequestAlert.apply(this, _GRAlertQueue.shift()); }; } public function createSuccessAlert(_arg1:String):void{ var _local2:AlertAction; if (_debug.verbose){ _arg1 = _filterMaxChars(_arg1); _local2 = new AlertAction("Close", "close", "close"); } else { _local2 = new AlertAction("X", "close", "close"); }; var _local3:Alert = new SuccessAlert(_debug, _arg1, [_local2]); addToPanel("analytics", _local3); if (_hasDebug){ if (_debug.verbose){ _arg1 = _arg1.split("\n").join(""); _arg1 = _filterMaxChars(_arg1, 66); }; visualDebug.writeBold(_arg1); }; } public function isAvailable():Boolean{ return (!((_display.stage == null))); } public function createAlert(_arg1:String):void{ _arg1 = _filterMaxChars(_arg1); var _local2:Alert = new Alert(_arg1, [new AlertAction("Close", "close", "close")]); addToPanel("analytics", _local2); if (_hasDebug){ visualDebug.writeBold(_arg1); }; } public function createInfo(_arg1:String):void{ if (((_hasInfo) || (!(isAvailable())))){ _infoQueue.push(_arg1); return; }; _arg1 = _filterMaxChars(_arg1); _hasInfo = true; var _local2:Info = new Info(_arg1, _debug.infoTimeout); addToPanel("analytics", _local2); _local2.addEventListener(Event.REMOVED_FROM_STAGE, _clearInfo, false, 0, true); if (_hasDebug){ visualDebug.write(_arg1); }; } public function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void{ var message = _arg1; var request = _arg2; var ref = _arg3; if (_hasGRAlert){ _GRAlertQueue.push([message, request, ref]); return; }; _hasGRAlert = true; var f:Function = function ():void{ ref.sendRequest(request); }; message = _filterMaxChars(message); var gra:GIFRequestAlert = new GIFRequestAlert(message, [new AlertAction("OK", "ok", f), new AlertAction("Cancel", "cancel", "close")]); addToPanel("analytics", gra); gra.addEventListener(Event.REMOVED_FROM_STAGE, _clearGRAlert, false, 0, true); if (_hasDebug){ if (_debug.verbose){ message = message.split("\n").join(""); message = _filterMaxChars(message, 66); }; visualDebug.write(message); }; } public function createVisualDebug():void{ if (!visualDebug){ visualDebug = new Debug(); visualDebug.alignement = Align.bottom; visualDebug.stickToEdge = true; addToPanel("analytics", visualDebug); _hasDebug = true; }; } public function addToStage(_arg1:DisplayObject):void{ _display.stage.addChild(_arg1); } private function _clearWarning(_arg1:Event):void{ _hasWarning = false; if (_warningQueue.length > 0){ createWarning(_warningQueue.shift()); }; } public function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void{ var _local4:Panel = new Panel(_arg1, _arg2, _arg3); _local4.alignement = Align.center; _local4.stickToEdge = false; addToStage(_local4); bringToFront(_local4); } public function destroy():void{ _mainPanel.close(); _debug.layout = null; } } }//package com.google.analytics.debug
Section 78
//Margin (com.google.analytics.debug.Margin) package com.google.analytics.debug { public class Margin { public var top:int; public var left:int; public var bottom:int; public var right:int; public function Margin(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0){ this.top = _arg1; this.bottom = _arg2; this.left = _arg3; this.right = _arg4; } } }//package com.google.analytics.debug
Section 79
//Panel (com.google.analytics.debug.Panel) package com.google.analytics.debug { import flash.display.*; import flash.events.*; public class Panel extends UISprite { private var _savedH:uint; private var _data:UISprite; private var _mask:Sprite; private var _background:Shape; private var _savedW:uint; private var _stickToEdge:Boolean; private var _border:Shape; private var _borderColor:uint; protected var baseAlpha:Number; private var _backgroundColor:uint; private var _title:Label; private var _colapsed:Boolean; private var _name:String; public function Panel(_arg1:String, _arg2:uint, _arg3:uint, _arg4:uint=0, _arg5:uint=0, _arg6:Number=0.3, _arg7:Align=null, _arg8:Boolean=false){ _name = _arg1; this.name = _arg1; this.mouseEnabled = false; _colapsed = false; forcedWidth = _arg2; forcedHeight = _arg3; this.baseAlpha = _arg6; _background = new Shape(); _data = new UISprite(); _data.forcedWidth = _arg2; _data.forcedHeight = _arg3; _data.mouseEnabled = false; _title = new Label(_arg1, "uiLabel", 0xFFFFFF, Align.topLeft, _arg8); _title.buttonMode = true; _title.margin.top = 0.6; _title.margin.left = 0.6; _title.addEventListener(MouseEvent.CLICK, onToggle); _title.mouseChildren = false; _border = new Shape(); _mask = new Sprite(); _mask.useHandCursor = false; _mask.mouseEnabled = false; _mask.mouseChildren = false; if (_arg7 == null){ _arg7 = Align.none; }; this.alignement = _arg7; this.stickToEdge = _arg8; if (_arg4 == 0){ _arg4 = Style.backgroundColor; }; _backgroundColor = _arg4; if (_arg5 == 0){ _arg5 = Style.borderColor; }; _borderColor = _arg5; } public function get stickToEdge():Boolean{ return (_stickToEdge); } public function onToggle(_arg1:MouseEvent=null):void{ if (_colapsed){ _data.visible = true; } else { _data.visible = false; }; _colapsed = !(_colapsed); _update(); resize(); } public function set stickToEdge(_arg1:Boolean):void{ _stickToEdge = _arg1; _title.stickToEdge = _arg1; } override protected function dispose():void{ _title.removeEventListener(MouseEvent.CLICK, onToggle); super.dispose(); } private function _draw():void{ var _local1:uint; var _local2:uint; if (((_savedW) && (_savedH))){ forcedWidth = _savedW; forcedHeight = _savedH; }; if (!_colapsed){ _local1 = forcedWidth; _local2 = forcedHeight; } else { _local1 = _title.width; _local2 = _title.height; _savedW = forcedWidth; _savedH = forcedHeight; forcedWidth = _local1; forcedHeight = _local2; }; var _local3:Graphics = _background.graphics; _local3.clear(); _local3.beginFill(_backgroundColor); Background.drawRounded(this, _local3, _local1, _local2); _local3.endFill(); var _local4:Graphics = _data.graphics; _local4.clear(); _local4.beginFill(_backgroundColor, 0); Background.drawRounded(this, _local4, _local1, _local2); _local4.endFill(); var _local5:Graphics = _border.graphics; _local5.clear(); _local5.lineStyle(0.1, _borderColor); Background.drawRounded(this, _local5, _local1, _local2); _local5.endFill(); var _local6:Graphics = _mask.graphics; _local6.clear(); _local6.beginFill(_backgroundColor); Background.drawRounded(this, _local6, (_local1 + 1), (_local2 + 1)); _local6.endFill(); } public function get title():String{ return (_title.text); } private function _update():void{ _draw(); if (baseAlpha < 1){ _background.alpha = baseAlpha; _border.alpha = baseAlpha; }; } public function addData(_arg1:DisplayObject):void{ _data.addChild(_arg1); } override protected function layout():void{ _update(); addChild(_background); addChild(_data); addChild(_title); addChild(_border); addChild(_mask); mask = _mask; } public function set title(_arg1:String):void{ _title.text = _arg1; } public function close():void{ dispose(); if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 80
//Style (com.google.analytics.debug.Style) package com.google.analytics.debug { public const Style:_Style = new _Style(); }//package com.google.analytics.debug
Section 81
//SuccessAlert (com.google.analytics.debug.SuccessAlert) package com.google.analytics.debug { public class SuccessAlert extends Alert { public function SuccessAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){ var _local4:Align = Align.bottomLeft; var _local5:Boolean; var _local6:Boolean; if (_arg1.verbose){ _arg2 = ((("<u><span class=\"uiAlertTitle\">Success</span>" + spaces(18)) + "</u>\n\n") + _arg2); _local4 = Align.center; _local5 = false; _local6 = true; }; super(_arg2, _arg3, "uiSuccess", Style.successColor, _local4, _local5, _local6); } } }//package com.google.analytics.debug
Section 82
//UISprite (com.google.analytics.debug.UISprite) package com.google.analytics.debug { import flash.display.*; import flash.events.*; public class UISprite extends Sprite { private var _forcedWidth:uint; public var margin:Margin; protected var alignTarget:DisplayObject; protected var listenResize:Boolean; public var alignement:Align; private var _forcedHeight:uint; public function UISprite(_arg1:DisplayObject=null){ listenResize = false; alignement = Align.none; this.alignTarget = _arg1; margin = new Margin(); addEventListener(Event.ADDED_TO_STAGE, _onAddedToStage); addEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage); } public function get forcedHeight():uint{ if (_forcedHeight){ return (_forcedHeight); }; return (height); } private function _onAddedToStage(_arg1:Event):void{ layout(); resize(); } protected function dispose():void{ var _local1:DisplayObject; var _local2:int; while (_local2 < numChildren) { _local1 = getChildAt(_local2); if (_local1){ removeChild(_local1); }; _local2++; }; } public function set forcedHeight(_arg1:uint):void{ _forcedHeight = _arg1; } public function set forcedWidth(_arg1:uint):void{ _forcedWidth = _arg1; } protected function layout():void{ } public function get forcedWidth():uint{ if (_forcedWidth){ return (_forcedWidth); }; return (width); } public function alignTo(_arg1:Align, _arg2:DisplayObject=null):void{ var _local3:uint; var _local4:uint; var _local5:uint; var _local6:uint; var _local7:UISprite; if (_arg2 == null){ if ((parent is Stage)){ _arg2 = this.stage; } else { _arg2 = parent; }; }; if (_arg2 == this.stage){ if (this.stage == null){ return; }; _local3 = this.stage.stageHeight; _local4 = this.stage.stageWidth; _local5 = 0; _local6 = 0; } else { _local7 = (_arg2 as UISprite); if (_local7.forcedHeight){ _local3 = _local7.forcedHeight; } else { _local3 = _local7.height; }; if (_local7.forcedWidth){ _local4 = _local7.forcedWidth; } else { _local4 = _local7.width; }; _local5 = 0; _local6 = 0; }; switch (_arg1){ case Align.top: x = ((_local4 / 2) - (forcedWidth / 2)); y = (_local6 + margin.top); break; case Align.bottom: x = ((_local4 / 2) - (forcedWidth / 2)); y = (((_local6 + _local3) - forcedHeight) - margin.bottom); break; case Align.left: x = (_local5 + margin.left); y = ((_local3 / 2) - (forcedHeight / 2)); break; case Align.right: x = (((_local5 + _local4) - forcedWidth) - margin.right); y = ((_local3 / 2) - (forcedHeight / 2)); break; case Align.center: x = ((_local4 / 2) - (forcedWidth / 2)); y = ((_local3 / 2) - (forcedHeight / 2)); break; case Align.topLeft: x = (_local5 + margin.left); y = (_local6 + margin.top); break; case Align.topRight: x = (((_local5 + _local4) - forcedWidth) - margin.right); y = (_local6 + margin.top); break; case Align.bottomLeft: x = (_local5 + margin.left); y = (((_local6 + _local3) - forcedHeight) - margin.bottom); break; case Align.bottomRight: x = (((_local5 + _local4) - forcedWidth) - margin.right); y = (((_local6 + _local3) - forcedHeight) - margin.bottom); break; }; if (((!(listenResize)) && (!((_arg1 == Align.none))))){ _arg2.addEventListener(Event.RESIZE, onResize, false, 0, true); listenResize = true; }; this.alignement = _arg1; this.alignTarget = _arg2; } private function _onRemovedFromStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, _onAddedToStage); removeEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage); dispose(); } public function resize():void{ if (alignement != Align.none){ alignTo(alignement, alignTarget); }; } protected function onResize(_arg1:Event):void{ resize(); } } }//package com.google.analytics.debug
Section 83
//Warning (com.google.analytics.debug.Warning) package com.google.analytics.debug { import flash.events.*; import flash.utils.*; public class Warning extends Label { private var _timer:Timer; public function Warning(_arg1:String="", _arg2:uint=3000){ super(_arg1, "uiWarning", Style.warningColor, Align.top, false); margin.top = 32; if (_arg2 > 0){ _timer = new Timer(_arg2, 1); _timer.start(); _timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } override public function onLink(_arg1:TextEvent):void{ switch (_arg1.text){ case "hide": close(); break; }; } public function onComplete(_arg1:TimerEvent):void{ close(); } } }//package com.google.analytics.debug
Section 84
//VisualDebugMode (com.google.analytics.debug.VisualDebugMode) package com.google.analytics.debug { public class VisualDebugMode { private var _value:int; private var _name:String; public static const advanced:VisualDebugMode = new VisualDebugMode(1, "advanced"); ; public static const geek:VisualDebugMode = new VisualDebugMode(2, "geek"); ; public static const basic:VisualDebugMode = new VisualDebugMode(0, "basic"); ; public function VisualDebugMode(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.debug
Section 85
//AnalyticsEvent (com.google.analytics.events.AnalyticsEvent) package com.google.analytics.events { import flash.events.*; import com.google.analytics.*; public class AnalyticsEvent extends Event { public var tracker:AnalyticsTracker; public static const READY:String = "ready"; public function AnalyticsEvent(_arg1:String, _arg2:AnalyticsTracker, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.tracker = _arg2; } override public function clone():Event{ return (new AnalyticsEvent(type, tracker, bubbles, cancelable)); } } }//package com.google.analytics.events
Section 86
//AdSenseGlobals (com.google.analytics.external.AdSenseGlobals) package com.google.analytics.external { import com.google.analytics.debug.*; public class AdSenseGlobals extends JavascriptProxy { private var _gaGlobalVerified:Boolean;// = false public static var gaGlobal_js:XML = <script> <![CDATA[ function() { try { gaGlobal } catch(e) { gaGlobal = {} ; } } ]]> </script> ; public function AdSenseGlobals(_arg1:DebugConfiguration){ super(_arg1); } public function set vid(_arg1:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.vid", _arg1); } public function get hid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.hid")); } public function set hid(_arg1:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.hid", _arg1); } public function get dh():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.dh")); } public function get sid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.sid")); } public function get vid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.vid")); } private function _verify():void{ if (!_gaGlobalVerified){ executeBlock(gaGlobal_js); _gaGlobalVerified = true; }; } public function set sid(_arg1:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.sid", _arg1); } public function get gaGlobal():Object{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal")); } } }//package com.google.analytics.external
Section 87
//HTMLDOM (com.google.analytics.external.HTMLDOM) package com.google.analytics.external { import com.google.analytics.debug.*; public class HTMLDOM extends JavascriptProxy { private var _referrer:String; private var _language:String; private var _host:String; private var _pathname:String; private var _location:String; private var _search:String; private var _characterSet:String; private var _title:String; private var _protocol:String; private var _colorDepth:String; public static var cache_properties_js:XML = <script> <![CDATA[ function() { var obj = {}; obj.host = document.location.host; obj.language = navigator.language ? navigator.language : navigator.browserLanguage; obj.characterSet = document.characterSet ? document.characterSet : document.charset; obj.colorDepth = window.screen.colorDepth; obj.location = document.location.toString(); obj.pathname = document.location.pathname; obj.protocol = document.location.protocol; obj.search = document.location.search; obj.referrer = document.referrer; obj.title = document.title; return obj; } ]]> </script> ; public function HTMLDOM(_arg1:DebugConfiguration){ super(_arg1); } public function get search():String{ if (_search){ return (_search); }; if (!isAvailable()){ return (null); }; _search = getProperty("document.location.search"); return (_search); } public function get location():String{ if (_location){ return (_location); }; if (!isAvailable()){ return (null); }; _location = getPropertyString("document.location"); return (_location); } public function get pathname():String{ if (_pathname){ return (_pathname); }; if (!isAvailable()){ return (null); }; _pathname = getProperty("document.location.pathname"); return (_pathname); } public function cacheProperties():void{ if (!isAvailable()){ return; }; var _local1:Object = call(cache_properties_js); if (_local1){ _host = _local1.host; _language = _local1.language; _characterSet = _local1.characterSet; _colorDepth = _local1.colorDepth; _location = _local1.location; _pathname = _local1.pathname; _protocol = _local1.protocol; _search = _local1.search; _referrer = _local1.referrer; _title = _local1.title; }; } public function get language():String{ if (_language){ return (_language); }; if (!isAvailable()){ return (null); }; var _local1:String = getProperty("navigator.language"); if (_local1 == null){ _local1 = getProperty("navigator.browserLanguage"); }; _language = _local1; return (_language); } public function get colorDepth():String{ if (_colorDepth){ return (_colorDepth); }; if (!isAvailable()){ return (null); }; _colorDepth = getProperty("window.screen.colorDepth"); return (_colorDepth); } public function get referrer():String{ if (_referrer){ return (_referrer); }; if (!isAvailable()){ return (null); }; _referrer = getProperty("document.referrer"); return (_referrer); } public function get protocol():String{ if (_protocol){ return (_protocol); }; if (!isAvailable()){ return (null); }; _protocol = getProperty("document.location.protocol"); return (_protocol); } public function get host():String{ if (_host){ return (_host); }; if (!isAvailable()){ return (null); }; _host = getProperty("document.location.host"); return (_host); } public function get characterSet():String{ if (_characterSet){ return (_characterSet); }; if (!isAvailable()){ return (null); }; var _local1:String = getProperty("document.characterSet"); if (_local1 == null){ _local1 = getProperty("document.charset"); }; _characterSet = _local1; return (_characterSet); } public function get title():String{ if (_title){ return (_title); }; if (!isAvailable()){ return (null); }; _title = getProperty("document.title"); return (_title); } } }//package com.google.analytics.external
Section 88
//JavascriptProxy (com.google.analytics.external.JavascriptProxy) package com.google.analytics.external { import com.google.analytics.debug.*; import flash.external.*; import flash.system.*; public class JavascriptProxy { private var _notAvailableWarning:Boolean;// = true private var _debug:DebugConfiguration; public static var setProperty_js:XML = <script> <![CDATA[ function( path , value ) { var paths; var prop; if( path.indexOf(".") > 0 ) { paths = path.split("."); prop = paths.pop() ; } else { paths = []; prop = path; } var target = window ; var len = paths.length ; for( var i = 0 ; i < len ; i++ ) { target = target[ paths[i] ] ; } target[ prop ] = value ; } ]]> </script> ; public static var hasProperty_js:XML = <script> <![CDATA[ function( path ) { var paths; if( path.indexOf(".") > 0 ) { paths = path.split("."); } else { paths = [path]; } var target = window ; var len = paths.length ; for( var i = 0 ; i < len ; i++ ) { target = target[ paths[i] ] ; } if( target ) { return true; } else { return false; } } ]]> </script> ; public static var setPropertyRef_js:XML = <script> <![CDATA[ function( path , target ) { var paths; var prop; if( path.indexOf(".") > 0 ) { paths = path.split("."); prop = paths.pop() ; } else { paths = []; prop = path; } alert( "paths:"+paths.length+", prop:"+prop ); var targets; var name; if( target.indexOf(".") > 0 ) { targets = target.split("."); name = targets.pop(); } else { targets = []; name = target; } alert( "targets:"+targets.length+", name:"+name ); var root = window; var len = paths.length; for( var i = 0 ; i < len ; i++ ) { root = root[ paths[i] ] ; } var ref = window; var depth = targets.length; for( var j = 0 ; j < depth ; j++ ) { ref = ref[ targets[j] ] ; } root[ prop ] = ref[name] ; } ]]> </script> ; public function JavascriptProxy(_arg1:DebugConfiguration){ _debug = _arg1; } public function getProperty(_arg1:String){ return (call((_arg1 + ".valueOf"))); } public function hasProperty(_arg1:String):Boolean{ return (call(hasProperty_js, _arg1)); } public function setProperty(_arg1:String, _arg2):void{ call(setProperty_js, _arg1, _arg2); } public function executeBlock(_arg1:String):void{ var data = _arg1; if (isAvailable()){ try { ExternalInterface.call(data); } catch(e:SecurityError) { if (_debug.javascript){ _debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML."); }; } catch(e:Error) { if (_debug.javascript){ _debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message)); }; }; }; } public function getPropertyString(_arg1:String):String{ return (call((_arg1 + ".toString"))); } public function setPropertyByReference(_arg1:String, _arg2:String):void{ call(setPropertyRef_js, _arg1, _arg2); } public function call(_arg1:String, ... _args){ var output:String; var functionName = _arg1; var args = _args; if (isAvailable()){ try { if (((_debug.javascript) && (_debug.verbose))){ output = ""; output = ("Flash->JS: " + functionName); output = (output + "( "); if (args.length > 0){ output = (output + args.join(",")); }; output = (output + " )"); _debug.info(output); }; args.unshift(functionName); return (ExternalInterface.call.apply(ExternalInterface, args)); } catch(e:SecurityError) { if (_debug.javascript){ _debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML."); }; } catch(e:Error) { if (_debug.javascript){ _debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message)); }; }; }; return (null); } public function isAvailable():Boolean{ var _local1:Boolean = ExternalInterface.available; if (((_local1) && ((Capabilities.playerType == "External")))){ _local1 = false; }; if (((((!(_local1)) && (_debug.javascript))) && (_notAvailableWarning))){ _debug.warning("ExternalInterface is not available."); _notAvailableWarning = false; }; return (_local1); } } }//package com.google.analytics.external
Section 89
//Environment (com.google.analytics.utils.Environment) package com.google.analytics.utils { import com.google.analytics.debug.*; import com.google.analytics.external.*; import flash.system.*; public class Environment { private var _dom:HTMLDOM; private var _appName:String; private var _debug:DebugConfiguration; private var _appVersion:Version; private var _url:String; private var _protocol:Protocols; private var _userAgent:UserAgent; public function Environment(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:DebugConfiguration=null, _arg5:HTMLDOM=null){ var _local6:Version; super(); if (_arg2 == ""){ if (isAIR()){ _arg2 = "AIR"; } else { _arg2 = "Flash"; }; }; if (_arg3 == ""){ _local6 = flashVersion; } else { _local6 = Version.fromString(_arg3); }; _url = _arg1; _appName = _arg2; _appVersion = _local6; _debug = _arg4; _dom = _arg5; } public function isAIR():Boolean{ return ((((playerType == "Desktop")) && ((Security.sandboxType.toString() == "application")))); } public function get screenWidth():Number{ return (Capabilities.screenResolutionX); } public function get playerType():String{ return (Capabilities.playerType); } public function get locationSearch():String{ var _local1:String = _dom.search; if (_local1){ return (_local1); }; return (""); } public function get protocol():Protocols{ if (!_protocol){ _findProtocol(); }; return (_protocol); } public function get flashVersion():Version{ var _local1:Version = Version.fromString(Capabilities.version.split(" ")[1], ","); return (_local1); } public function get userAgent():UserAgent{ if (!_userAgent){ _userAgent = new UserAgent(this, appName, appVersion.toString(4)); }; return (_userAgent); } public function get languageEncoding():String{ var _local1:String; if (System.useCodePage){ _local1 = _dom.characterSet; if (_local1){ return (_local1); }; return ("-"); }; return ("UTF-8"); } public function get appName():String{ return (_appName); } public function get screenColorDepth():String{ var _local1:String; switch (Capabilities.screenColor){ case "bw": _local1 = "1"; break; case "gray": _local1 = "2"; break; case "color": default: _local1 = "24"; }; var _local2:String = _dom.colorDepth; if (_local2){ _local1 = _local2; }; return (_local1); } private function _findProtocol():void{ var _local4:String; var _local5:String; var _local1:Protocols = Protocols.none; if (_url != ""){ _local4 = _url.toLowerCase(); _local5 = _local4.substr(0, 5); switch (_local5){ case "file:": _local1 = Protocols.file; break; case "http:": _local1 = Protocols.HTTP; break; case "https": if (_local4.charAt(5) == ":"){ _local1 = Protocols.HTTPS; }; break; default: _protocol = Protocols.none; }; }; var _local2:String = _dom.protocol; var _local3:String = (_local1.toString() + ":").toLowerCase(); if (((((_local2) && (!((_local2 == _local3))))) && (_debug))){ _debug.warning(((("Protocol mismatch: SWF=" + _local3) + ", DOM=") + _local2)); }; _protocol = _local1; } public function get locationSWFPath():String{ return (_url); } public function get platform():String{ var _local1:String = Capabilities.manufacturer; return (_local1.split("Adobe ")[1]); } public function get operatingSystem():String{ return (Capabilities.os); } public function set appName(_arg1:String):void{ _appName = _arg1; userAgent.applicationProduct = _arg1; } function set url(_arg1:String):void{ _url = _arg1; } public function get referrer():String{ var _local1:String = _dom.referrer; if (_local1){ return (_local1); }; if (protocol == Protocols.file){ return ("localhost"); }; return (""); } public function isInHTML():Boolean{ return ((Capabilities.playerType == "PlugIn")); } public function get language():String{ var _local1:String = _dom.language; var _local2:String = Capabilities.language; if (_local1){ if ((((_local1.length > _local2.length)) && ((_local1.substr(0, _local2.length) == _local2)))){ _local2 = _local1; }; }; return (_local2); } public function get domainName():String{ var _local1:String; var _local2:String; var _local3:int; if ((((protocol == Protocols.HTTP)) || ((protocol == Protocols.HTTPS)))){ _local1 = _url.toLowerCase(); if (protocol == Protocols.HTTP){ _local2 = _local1.split("http://").join(""); } else { if (protocol == Protocols.HTTPS){ _local2 = _local1.split("https://").join(""); }; }; _local3 = _local2.indexOf("/"); if (_local3 > -1){ _local2 = _local2.substring(0, _local3); }; return (_local2); }; if (protocol == Protocols.file){ return ("localhost"); }; return (""); } public function set userAgent(_arg1:UserAgent):void{ _userAgent = _arg1; } public function set appVersion(_arg1:Version):void{ _appVersion = _arg1; userAgent.applicationVersion = _arg1.toString(4); } public function get screenHeight():Number{ return (Capabilities.screenResolutionY); } public function get locationPath():String{ var _local1:String = _dom.pathname; if (_local1){ return (_local1); }; return (""); } public function get documentTitle():String{ var _local1:String = _dom.title; if (_local1){ return (_local1); }; return (""); } public function get appVersion():Version{ return (_appVersion); } } }//package com.google.analytics.utils
Section 90
//Protocols (com.google.analytics.utils.Protocols) package com.google.analytics.utils { public class Protocols { private var _value:int; private var _name:String; public static const none:Protocols = new Protocols(0, "none"); ; public static const HTTPS:Protocols = new Protocols(3, "HTTPS"); ; public static const file:Protocols = new Protocols(1, "file"); ; public static const HTTP:Protocols = new Protocols(2, "HTTP"); ; public function Protocols(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.utils
Section 91
//Timespan (com.google.analytics.utils.Timespan) package com.google.analytics.utils { public class Timespan { public static var sixmonths:Number = 15768000; public static var twoyears:Number = 63072000; public static var thirtyminutes:Number = 1800; } }//package com.google.analytics.utils
Section 92
//URL (com.google.analytics.utils.URL) package com.google.analytics.utils { public class URL { private var _url:String; public function URL(_arg1:String=""){ _url = _arg1.toLowerCase(); } public function get domain():String{ var _local1:Array; if (((!((hostName == ""))) && ((hostName.indexOf(".") > -1)))){ _local1 = hostName.split("."); switch (_local1.length){ case 2: return (hostName); case 3: if (_local1[1] == "co"){ return (hostName); }; _local1.shift(); return (_local1.join(".")); case 4: _local1.shift(); return (_local1.join(".")); }; }; return (""); } public function get path():String{ var _local1:String = _url; if (_local1.indexOf("://") > -1){ _local1 = _local1.split("://")[1]; }; if (_local1.indexOf(hostName) == 0){ _local1 = _local1.substr(hostName.length); }; if (_local1.indexOf("?") > -1){ _local1 = _local1.split("?")[0]; }; if (_local1.charAt(0) != "/"){ _local1 = ("/" + _local1); }; return (_local1); } public function get protocol():Protocols{ var _local1:String = _url.split("://")[0]; switch (_local1){ case "file": return (Protocols.file); case "http": return (Protocols.HTTP); case "https": return (Protocols.HTTPS); default: return (Protocols.none); }; } public function get hostName():String{ var _local1:String = _url; if (_local1.indexOf("://") > -1){ _local1 = _local1.split("://")[1]; }; if (_local1.indexOf("/") > -1){ _local1 = _local1.split("/")[0]; }; if (_local1.indexOf("?") > -1){ _local1 = _local1.split("?")[0]; }; if ((((protocol == Protocols.file)) || ((protocol == Protocols.none)))){ return (""); }; return (_local1); } public function get subDomain():String{ if (((!((domain == ""))) && (!((domain == hostName))))){ return (hostName.split(("." + domain)).join("")); }; return (""); } public function get search():String{ var _local1:String = _url; if (_local1.indexOf("://") > -1){ _local1 = _local1.split("://")[1]; }; if (_local1.indexOf(hostName) == 0){ _local1 = _local1.substr(hostName.length); }; if (_local1.indexOf("?") > -1){ _local1 = _local1.split("?")[1]; } else { _local1 = ""; }; return (_local1); } } }//package com.google.analytics.utils
Section 93
//UserAgent (com.google.analytics.utils.UserAgent) package com.google.analytics.utils { import com.google.analytics.core.*; import flash.system.*; public class UserAgent { private var _localInfo:Environment; private var _applicationProduct:String; private var _version:Version; public static var minimal:Boolean = false; public function UserAgent(_arg1:Environment, _arg2:String="", _arg3:String=""){ _localInfo = _arg1; applicationProduct = _arg2; _version = Version.fromString(_arg3); } public function get tamarinProductToken():String{ if (UserAgent.minimal){ return (""); }; if (System.vmVersion){ return (("Tamarin/" + Utils.trim(System.vmVersion, true))); }; return (""); } public function get applicationVersion():String{ return (_version.toString(2)); } public function get vendorProductToken():String{ var _local1 = ""; if (_localInfo.isAIR()){ _local1 = (_local1 + "AIR"); } else { _local1 = (_local1 + "FlashPlayer"); }; _local1 = (_local1 + "/"); _local1 = (_local1 + _version.toString(3)); return (_local1); } public function toString():String{ var _local1 = ""; _local1 = (_local1 + applicationProductToken); if (applicationComment != ""){ _local1 = (_local1 + (" " + applicationComment)); }; if (tamarinProductToken != ""){ _local1 = (_local1 + (" " + tamarinProductToken)); }; if (vendorProductToken != ""){ _local1 = (_local1 + (" " + vendorProductToken)); }; return (_local1); } public function get applicationComment():String{ var _local1:Array = []; _local1.push(_localInfo.platform); _local1.push(_localInfo.playerType); if (!UserAgent.minimal){ _local1.push(_localInfo.operatingSystem); _local1.push(_localInfo.language); }; if (Capabilities.isDebugger){ _local1.push("DEBUG"); }; if (_local1.length > 0){ return ((("(" + _local1.join("; ")) + ")")); }; return (""); } public function set applicationVersion(_arg1:String):void{ _version = Version.fromString(_arg1); } public function get applicationProductToken():String{ var _local1:String = applicationProduct; if (applicationVersion != ""){ _local1 = (_local1 + ("/" + applicationVersion)); }; return (_local1); } public function set applicationProduct(_arg1:String):void{ _applicationProduct = _arg1; } public function get applicationProduct():String{ return (_applicationProduct); } } }//package com.google.analytics.utils
Section 94
//Variables (com.google.analytics.utils.Variables) package com.google.analytics.utils { import flash.net.*; public dynamic class Variables { public var post:Array; public var URIencode:Boolean; public var pre:Array; public var sort:Boolean;// = true public function Variables(_arg1:String=null, _arg2:Array=null, _arg3:Array=null){ pre = []; post = []; super(); if (_arg1){ decode(_arg1); }; if (_arg2){ this.pre = _arg2; }; if (_arg3){ this.post = _arg3; }; } private function _join(_arg1:Variables):void{ var _local2:String; if (!_arg1){ return; }; for (_local2 in _arg1) { this[_local2] = _arg1[_local2]; }; } public function join(... _args):void{ var _local2:int = _args.length; var _local3:int; while (_local3 < _local2) { if (!(_args[_local3] is Variables)){ } else { _join(_args[_local3]); }; _local3++; }; } public function toString():String{ var _local2:String; var _local3:String; var _local4:String; var _local5:int; var _local6:int; var _local7:String; var _local8:String; var _local1:Array = []; for (_local3 in this) { _local2 = this[_local3]; if (URIencode){ _local2 = encodeURI(_local2); }; _local1.push(((_local3 + "=") + _local2)); }; if (sort){ _local1.sort(); }; if (pre.length > 0){ pre.reverse(); _local5 = 0; while (_local5 < pre.length) { _local7 = pre[_local5]; _local6 = 0; while (_local6 < _local1.length) { _local4 = _local1[_local6]; if (_local4.indexOf(_local7) == 0){ _local1.unshift(_local1.splice(_local6, 1)[0]); }; _local6++; }; _local5++; }; pre.reverse(); }; if (post.length > 0){ _local5 = 0; while (_local5 < post.length) { _local8 = post[_local5]; _local6 = 0; while (_local6 < _local1.length) { _local4 = _local1[_local6]; if (_local4.indexOf(_local8) == 0){ _local1.push(_local1.splice(_local6, 1)[0]); }; _local6++; }; _local5++; }; }; return (_local1.join("&")); } public function decode(_arg1:String):void{ var _local2:Array; var _local3:String; var _local4:String; var _local5:String; var _local6:Array; if (_arg1 == ""){ return; }; if (_arg1.indexOf("&") > -1){ _local2 = _arg1.split("&"); } else { _local2 = [_arg1]; }; var _local7:int; while (_local7 < _local2.length) { _local3 = _local2[_local7]; if (_local3.indexOf("=") > -1){ _local6 = _local3.split("="); _local4 = _local6[0]; _local5 = decodeURI(_local6[1]); this[_local4] = _local5; }; _local7++; }; } public function toURLVariables():URLVariables{ var _local2:String; var _local1:URLVariables = new URLVariables(); for (_local2 in this) { _local1[_local2] = this[_local2]; }; return (_local1); } } }//package com.google.analytics.utils
Section 95
//Version (com.google.analytics.utils.Version) package com.google.analytics.utils { public class Version { private var _revision:uint; private var _maxBuild:uint;// = 0xFF private var _maxMinor:uint;// = 15 private var _maxMajor:uint;// = 15 private var _separator:String;// = "." private var _maxRevision:uint;// = 0xFFFF private var _build:uint; private var _major:uint; private var _minor:uint; public function Version(_arg1:uint=0, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0){ var _local5:Version; super(); if ((((((((_arg1 > _maxMajor)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){ _local5 = Version.fromNumber(_arg1); _arg1 = _local5.major; _arg2 = _local5.minor; _arg3 = _local5.build; _arg4 = _local5.revision; }; this.major = _arg1; this.minor = _arg2; this.build = _arg3; this.revision = _arg4; } public function toString(_arg1:int=0):String{ var _local2:Array; if ((((_arg1 <= 0)) || ((_arg1 > 4)))){ _arg1 = getFields(); }; switch (_arg1){ case 1: _local2 = [major]; break; case 2: _local2 = [major, minor]; break; case 3: _local2 = [major, minor, build]; break; case 4: default: _local2 = [major, minor, build, revision]; }; return (_local2.join(_separator)); } public function set revision(_arg1:uint):void{ _revision = Math.min(_arg1, _maxRevision); } public function get revision():uint{ return (_revision); } public function set build(_arg1:uint):void{ _build = Math.min(_arg1, _maxBuild); } public function set minor(_arg1:uint):void{ _minor = Math.min(_arg1, _maxMinor); } public function get build():uint{ return (_build); } public function set major(_arg1:uint):void{ _major = Math.min(_arg1, _maxMajor); } public function get minor():uint{ return (_minor); } private function getFields():int{ var _local1 = 4; if (revision == 0){ _local1--; }; if ((((_local1 == 3)) && ((build == 0)))){ _local1--; }; if ((((_local1 == 2)) && ((minor == 0)))){ _local1--; }; return (_local1); } public function valueOf():uint{ return (((((major << 28) | (minor << 24)) | (build << 16)) | revision)); } public function get major():uint{ return (_major); } public function equals(_arg1):Boolean{ if (!(_arg1 is Version)){ return (false); }; if ((((((((_arg1.major == major)) && ((_arg1.minor == minor)))) && ((_arg1.build == build)))) && ((_arg1.revision == revision)))){ return (true); }; return (false); } public static function fromString(_arg1:String="", _arg2:String="."):Version{ var _local4:Array; var _local3:Version = new (Version); if ((((_arg1 == "")) || ((_arg1 == null)))){ return (_local3); }; if (_arg1.indexOf(_arg2) > -1){ _local4 = _arg1.split(_arg2); _local3.major = parseInt(_local4[0]); _local3.minor = parseInt(_local4[1]); _local3.build = parseInt(_local4[2]); _local3.revision = parseInt(_local4[3]); } else { _local3.major = parseInt(_arg1); }; return (_local3); } public static function fromNumber(_arg1:Number=0):Version{ var _local2:Version = new (Version); if (((((((((((isNaN(_arg1)) || ((_arg1 == 0)))) || ((_arg1 < 0)))) || ((_arg1 == Number.MAX_VALUE)))) || ((_arg1 == Number.POSITIVE_INFINITY)))) || ((_arg1 == Number.NEGATIVE_INFINITY)))){ return (_local2); }; _local2.major = (_arg1 >>> 28); _local2.minor = ((_arg1 & 251658240) >>> 24); _local2.build = ((_arg1 & 0xFF0000) >>> 16); _local2.revision = (_arg1 & 0xFFFF); return (_local2); } } }//package com.google.analytics.utils
Section 96
//Bridge (com.google.analytics.v4.Bridge) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.external.*; public class Bridge implements GoogleAnalyticsAPI { private var _debug:DebugConfiguration; private var _proxy:JavascriptProxy; private var _jsContainer:String;// = "_GATracker" private var _hasGATracker:Boolean;// = false private var _account:String; private static var _linkTrackingObject_js:XML = <script> <![CDATA[ function( container , target ) { var targets ; var name ; if( target.indexOf(".") > 0 ) { targets = target.split("."); name = targets.pop(); } else { targets = []; name = target; } var ref = window; var depth = targets.length; for( var j = 0 ; j < depth ; j++ ) { ref = ref[ targets[j] ] ; } window[container][target] = ref[name] ; } ]]> </script> ; private static var _createTrackingObject_js:XML = <script> <![CDATA[ function( acct ) { _GATracker[acct] = _gat._getTracker(acct); } ]]> </script> ; private static var _injectTrackingObject_js:XML = <script> <![CDATA[ function() { try { _GATracker } catch(e) { _GATracker = {}; } } ]]> </script> ; private static var _checkGAJS_js:XML = <script> <![CDATA[ function() { if( _gat && _gat._getTracker ) { return true; } return false; } ]]> </script> ; private static var _checkValidTrackingObject_js:XML = <script> <![CDATA[ function(acct) { if( _GATracker[acct] && (_GATracker[acct]._getAccount) ) { return true ; } else { return false; } } ]]> </script> ; public function Bridge(_arg1:String, _arg2:DebugConfiguration, _arg3:JavascriptProxy){ var _local4:String; var _local5:String; var _local6:String; super(); _account = _arg1; _debug = _arg2; _proxy = _arg3; if (!_checkGAJS()){ _local4 = ""; _local4 = (_local4 + "ga.js not found, be sure to check if\n"); _local4 = (_local4 + "<script src=\"http://www.google-analytics.com/ga.js\"></script>\n"); _local4 = (_local4 + "is included in the HTML."); _debug.warning(_local4); throw (new Error(_local4)); }; if (!_hasGATracker){ if (((_debug.javascript) && (_debug.verbose))){ _local5 = ""; _local5 = (_local5 + "The Google Analytics tracking code was not found on the container page\n"); _local5 = (_local5 + "we create it"); _debug.info(_local5, VisualDebugMode.advanced); }; _injectTrackingObject(); }; if (Utils.validateAccount(_arg1)){ _createTrackingObject(_arg1); } else { if (_checkTrackingObject(_arg1)){ _linkTrackingObject(_arg1); } else { _local6 = ""; _local6 = (_local6 + (("JS Object \"" + _arg1) + "\" doesn't exist in DOM\n")); _local6 = (_local6 + "Bridge object not created."); _debug.warning(_local6); throw (new Error(_local6)); }; }; } public function link(_arg1:String, _arg2:Boolean=false):void{ _debug.info((((("link( " + _arg1) + ", ") + _arg2) + " )")); _call("_link", _arg1, _arg2); } public function addOrganic(_arg1:String, _arg2:String):void{ _debug.info((("addOrganic( " + [_arg1, _arg2].join(", ")) + " )")); _call("_addOrganic", _arg1); } public function setAllowLinker(_arg1:Boolean):void{ _debug.info((("setAllowLinker( " + _arg1) + " )")); _call("_setAllowLinker", _arg1); } private function _linkTrackingObject(_arg1:String):void{ _proxy.call(_linkTrackingObject_js, _jsContainer, _arg1); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ var _local5 = 2; if (((_arg3) && (!((_arg3 == ""))))){ _local5 = 3; }; if ((((_local5 == 3)) && (!(isNaN(_arg4))))){ _local5 = 4; }; switch (_local5){ case 4: _debug.info((("trackEvent( " + [_arg1, _arg2, _arg3, _arg4].join(", ")) + " )")); return (_call("_trackEvent", _arg1, _arg2, _arg3, _arg4)); case 3: _debug.info((("trackEvent( " + [_arg1, _arg2, _arg3].join(", ")) + " )")); return (_call("_trackEvent", _arg1, _arg2, _arg3)); case 2: default: _debug.info((("trackEvent( " + [_arg1, _arg2].join(", ")) + " )")); return (_call("_trackEvent", _arg1, _arg2)); }; } public function setClientInfo(_arg1:Boolean):void{ _debug.info((("setClientInfo( " + _arg1) + " )")); _call("_setClientInfo", _arg1); } public function trackTrans():void{ _debug.info("trackTrans()"); _call("_trackTrans"); } public function setCookieTimeout(_arg1:int):void{ _debug.info((("setCookieTimeout( " + _arg1) + " )")); _call("_setCookieTimeout", _arg1); } public function trackPageview(_arg1:String=""):void{ _debug.info((("trackPageview( " + _arg1) + " )")); _call("_trackPageview", _arg1); } public function getClientInfo():Boolean{ _debug.info("getClientInfo()"); return (_call("_getClientInfo")); } private function _checkValidTrackingObject(_arg1:String):Boolean{ return (_proxy.call(_checkValidTrackingObject_js, _arg1)); } private function _checkGAJS():Boolean{ return (_proxy.call(_checkGAJS_js)); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ _debug.warning((((("linkByPost( " + _arg1) + ", ") + _arg2) + " ) not implemented")); } private function _call(_arg1:String, ... _args){ _args.unshift(((((("window." + _jsContainer) + "[\"") + _account) + "\"].") + _arg1)); return (_proxy.call.apply(_proxy, _args)); } public function hasGAJS():Boolean{ return (_checkGAJS()); } private function _checkTrackingObject(_arg1:String):Boolean{ var _local2:Boolean = _proxy.hasProperty(_arg1); var _local3:Boolean = _proxy.hasProperty((_arg1 + "._getAccount")); return (((_local2) && (_local3))); } public function resetSession():void{ _debug.warning("resetSession() not implemented"); } public function getDetectTitle():Boolean{ _debug.info("getDetectTitle()"); return (_call("_getDetectTitle")); } public function setCampNameKey(_arg1:String):void{ _debug.info((("setCampNameKey( " + _arg1) + " )")); _call("_setCampNameKey", _arg1); } public function setDetectFlash(_arg1:Boolean):void{ _debug.info((("setDetectFlash( " + _arg1) + " )")); _call("_setDetectFlash", _arg1); } public function createEventTracker(_arg1:String):EventTracker{ _debug.info((("createEventTracker( " + _arg1) + " )")); return (new EventTracker(_arg1, this)); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ _debug.info((("addItem( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6].join(", ")) + " )")); _call("_addItem", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } public function clearIgnoredOrganic():void{ _debug.info("clearIgnoredOrganic()"); _call("_clearIgnoreOrganic"); } public function setVar(_arg1:String):void{ _debug.info((("setVar( " + _arg1) + " )")); _call("_setVar", _arg1); } public function setDomainName(_arg1:String):void{ _debug.info((("setDomainName( " + _arg1) + " )")); _call("_setDomainName", _arg1); } public function hasTrackingAccount(_arg1:String):Boolean{ if (Utils.validateAccount(_arg1)){ return (_checkValidTrackingObject(_arg1)); }; return (_checkTrackingObject(_arg1)); } public function setCampSourceKey(_arg1:String):void{ _debug.info((("setCampSourceKey( " + _arg1) + " )")); _call("_setCampSourceKey", _arg1); } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ _debug.info((("addTrans( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8].join(", ")) + " )")); _call("_addTrans", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); return (null); } public function setCampContentKey(_arg1:String):void{ _debug.info((("setCampContentKey( " + _arg1) + " )")); _call("_setCampContentKey", _arg1); } public function setLocalServerMode():void{ _debug.info("setLocalServerMode()"); _call("_setLocalServerMode"); } public function getLocalGifPath():String{ _debug.info("getLocalGifPath()"); return (_call("_getLocalGifPath")); } public function clearIgnoredRef():void{ _debug.info("clearIgnoredRef()"); _call("_clearIgnoreRef"); } public function setAllowAnchor(_arg1:Boolean):void{ _debug.info((("setAllowAnchor( " + _arg1) + " )")); _call("_setAllowAnchor", _arg1); } public function setLocalGifPath(_arg1:String):void{ _debug.info((("setLocalGifPath( " + _arg1) + " )")); _call("_setLocalGifPath", _arg1); } public function getVersion():String{ _debug.info("getVersion()"); return (_call("_getVersion")); } private function _injectTrackingObject():void{ _proxy.executeBlock(_injectTrackingObject_js); _hasGATracker = true; } public function setCookiePath(_arg1:String):void{ _debug.info((("setCookiePath( " + _arg1) + " )")); _call("_setCookiePath", _arg1); } public function setSampleRate(_arg1:Number):void{ _debug.info((("setSampleRate( " + _arg1) + " )")); _call("_setSampleRate", _arg1); } public function setAllowHash(_arg1:Boolean):void{ _debug.info((("setAllowHash( " + _arg1) + " )")); _call("_setAllowHash", _arg1); } public function addIgnoredOrganic(_arg1:String):void{ _debug.info((("addIgnoredOrganic( " + _arg1) + " )")); _call("_addIgnoredOrganic", _arg1); } public function setCampNOKey(_arg1:String):void{ _debug.info((("setCampNOKey( " + _arg1) + " )")); _call("_setCampNOKey", _arg1); } public function cookiePathCopy(_arg1:String):void{ _debug.info((("cookiePathCopy( " + _arg1) + " )")); _call("_cookiePathCopy", _arg1); } public function setLocalRemoteServerMode():void{ _debug.info("setLocalRemoteServerMode()"); _call("_setLocalRemoteServerMode"); } public function getServiceMode():ServerOperationMode{ _debug.info("getServiceMode()"); return (_call("_getServiceMode")); } public function setDetectTitle(_arg1:Boolean):void{ _debug.info((("setDetectTitle( " + _arg1) + " )")); _call("_setDetectTitle", _arg1); } private function _createTrackingObject(_arg1:String):void{ _proxy.call(_createTrackingObject_js, _arg1); } public function setCampaignTrack(_arg1:Boolean):void{ _debug.info((("setCampaignTrack( " + _arg1) + " )")); _call("_setCampaignTrack", _arg1); } public function clearOrganic():void{ _debug.info("clearOrganic()"); _call("_clearOrganic"); } public function setCampTermKey(_arg1:String):void{ _debug.info((("setCampTermKey( " + _arg1) + " )")); _call("_setCampTermKey", _arg1); } public function getDetectFlash():Boolean{ _debug.info("getDetectFlash()"); return (_call("_getDetectFlash")); } public function setCampMediumKey(_arg1:String):void{ _debug.info((("setCampMediumKey( " + _arg1) + " )")); _call("_setCampMediumKey", _arg1); } public function addIgnoredRef(_arg1:String):void{ _debug.info((("addIgnoredRef( " + _arg1) + " )")); _call("_addIgnoredRef", _arg1); } public function setSessionTimeout(_arg1:int):void{ _debug.info((("setSessionTimeout( " + _arg1) + " )")); _call("_setSessionTimeout", _arg1); } public function setRemoteServerMode():void{ _debug.info("setRemoteServerMode()"); _call("_setRemoteServerMode"); } public function getAccount():String{ _debug.info("getAccount()"); return (_call("_getAccount")); } } }//package com.google.analytics.v4
Section 97
//Configuration (com.google.analytics.v4.Configuration) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; import com.google.analytics.campaign.*; public class Configuration { public var serverMode:ServerOperationMode; public var detectFlash:Boolean;// = true public var hasSiteOverlay:Boolean;// = false public var allowLocalTracking:Boolean;// = true public var secureRemoteGIFpath:String;// = "https://ssl.google-analytics.com/__utm.gif" private var _version:String;// = "4.3as" public var allowDomainHash:Boolean;// = true public var detectClientInfo:Boolean;// = true public var idleLoop:Number;// = 30 public var isTrackOutboundSubdomains:Boolean;// = false public var cookiePath:String;// = "/" public var transactionFieldDelim:String;// = "|" private var _organic:Organic; private var _cookieName:String;// = "analytics" public var campaignKey:CampaignKey; public var google:String;// = "google" public var googleCsePath:String;// = "cse" public var bucketCapacity:Number;// = 10 private var _sampleRate:Number;// = 1 public var remoteGIFpath:String;// = "http://www.google-analytics.com/__utm.gif" public var googleSearchParam:String;// = "q" public var allowLinker:Boolean;// = false public var maxOutboundLinkExamined:Number;// = 1000 private var _debug:DebugConfiguration; public var allowAnchor:Boolean;// = false private var _domain:Domain; private var _trackingLimitPerSession:int;// = 500 public var tokenCliff:int;// = 10 public var sessionTimeout:Number; public var idleTimeout:Number;// = 60 public var campaignTracking:Boolean;// = true public var domainName:String;// = "" public var detectTitle:Boolean;// = true public var tokenRate:Number;// = 0.2 public var conversionTimeout:Number; public var localGIFpath:String;// = "/__utm.gif" public function Configuration(_arg1:DebugConfiguration=null){ _organic = new Organic(); conversionTimeout = Timespan.sixmonths; sessionTimeout = Timespan.thirtyminutes; campaignKey = new CampaignKey(); serverMode = ServerOperationMode.remote; super(); _debug = _arg1; _domain = new Domain(DomainNameMode.auto, "", _debug); serverMode = ServerOperationMode.remote; _initOrganicSources(); } public function get organic():Organic{ return (_organic); } public function get cookieName():String{ return (_cookieName); } public function get trackingLimitPerSession():int{ return (_trackingLimitPerSession); } private function _initOrganicSources():void{ addOrganicSource(google, googleSearchParam); addOrganicSource("yahoo", "p"); addOrganicSource("msn", "q"); addOrganicSource("aol", "query"); addOrganicSource("aol", "encquery"); addOrganicSource("lycos", "query"); addOrganicSource("ask", "q"); addOrganicSource("altavista", "q"); addOrganicSource("netscape", "query"); addOrganicSource("cnn", "query"); addOrganicSource("looksmart", "qt"); addOrganicSource("about", "terms"); addOrganicSource("mamma", "query"); addOrganicSource("alltheweb", "q"); addOrganicSource("gigablast", "q"); addOrganicSource("voila", "rdata"); addOrganicSource("virgilio", "qs"); addOrganicSource("live", "q"); addOrganicSource("baidu", "wd"); addOrganicSource("alice", "qs"); addOrganicSource("yandex", "text"); addOrganicSource("najdi", "q"); addOrganicSource("aol", "q"); addOrganicSource("club-internet", "q"); addOrganicSource("mama", "query"); addOrganicSource("seznam", "q"); addOrganicSource("search", "q"); addOrganicSource("wp", "szukaj"); addOrganicSource("onet", "qt"); addOrganicSource("netsprint", "q"); addOrganicSource("google.interia", "q"); addOrganicSource("szukacz", "q"); addOrganicSource("yam", "k"); addOrganicSource("pchome", "q"); addOrganicSource("kvasir", "searchExpr"); addOrganicSource("sesam", "q"); addOrganicSource("ozu", "q"); addOrganicSource("terra", "query"); addOrganicSource("nostrum", "query"); addOrganicSource("mynet", "q"); addOrganicSource("ekolay", "q"); addOrganicSource("search.ilse", "search_for"); } public function get sampleRate():Number{ return (_sampleRate); } public function addOrganicSource(_arg1:String, _arg2:String):void{ var engine = _arg1; var keyword = _arg2; try { _organic.addSource(engine, keyword); } catch(e:Error) { if (((_debug) && (_debug.active))){ _debug.warning(e.message); }; }; } public function get domain():Domain{ return (_domain); } public function set sampleRate(_arg1:Number):void{ if (_arg1 <= 0){ _arg1 = 0.1; }; if (_arg1 > 1){ _arg1 = 1; }; _arg1 = Number(_arg1.toFixed(2)); _sampleRate = _arg1; } public function get version():String{ return (_version); } } }//package com.google.analytics.v4
Section 98
//GoogleAnalyticsAPI (com.google.analytics.v4.GoogleAnalyticsAPI) package com.google.analytics.v4 { import com.google.analytics.core.*; public interface GoogleAnalyticsAPI { function setCampSourceKey(_arg1:String):void; function getServiceMode():ServerOperationMode; function resetSession():void; function setLocalServerMode():void; function setCampContentKey(_arg1:String):void; function addOrganic(_arg1:String, _arg2:String):void; function setDetectFlash(_arg1:Boolean):void; function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object; function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean; function setCampTermKey(_arg1:String):void; function setCampNameKey(_arg1:String):void; function addIgnoredOrganic(_arg1:String):void; function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void; function setAllowLinker(_arg1:Boolean):void; function getClientInfo():Boolean; function getDetectFlash():Boolean; function setCampaignTrack(_arg1:Boolean):void; function createEventTracker(_arg1:String):EventTracker; function setCookieTimeout(_arg1:int):void; function setAllowAnchor(_arg1:Boolean):void; function trackTrans():void; function clearOrganic():void; function trackPageview(_arg1:String=""):void; function setLocalGifPath(_arg1:String):void; function getVersion():String; function getLocalGifPath():String; function setVar(_arg1:String):void; function clearIgnoredOrganic():void; function setCampMediumKey(_arg1:String):void; function addIgnoredRef(_arg1:String):void; function setClientInfo(_arg1:Boolean):void; function setCookiePath(_arg1:String):void; function setSampleRate(_arg1:Number):void; function setSessionTimeout(_arg1:int):void; function setRemoteServerMode():void; function clearIgnoredRef():void; function setDomainName(_arg1:String):void; function setDetectTitle(_arg1:Boolean):void; function setAllowHash(_arg1:Boolean):void; function getAccount():String; function linkByPost(_arg1:Object, _arg2:Boolean=false):void; function link(_arg1:String, _arg2:Boolean=false):void; function setCampNOKey(_arg1:String):void; function setLocalRemoteServerMode():void; function cookiePathCopy(_arg1:String):void; function getDetectTitle():Boolean; } }//package com.google.analytics.v4
Section 99
//Tracker (com.google.analytics.v4.Tracker) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.data.*; import com.google.analytics.utils.*; import com.google.analytics.external.*; import com.google.analytics.campaign.*; public class Tracker implements GoogleAnalyticsAPI { private const EVENT_TRACKER_LABEL_KEY_NUM:int = 3; private const EVENT_TRACKER_VALUE_VALUE_NUM:int = 1; private const EVENT_TRACKER_PROJECT_ID:int = 5; private const EVENT_TRACKER_OBJECT_NAME_KEY_NUM:int = 1; private const EVENT_TRACKER_TYPE_KEY_NUM:int = 2; private var _adSense:AdSenseGlobals; private var _eventTracker:X10; private var _noSessionInformation:Boolean;// = false private var _browserInfo:BrowserInfo; private var _debug:DebugConfiguration; private var _isNewVisitor:Boolean;// = false private var _buffer:Buffer; private var _config:Configuration; private var _x10Module:X10; private var _campaign:CampaignManager; private var _formatedReferrer:String; private var _timeStamp:Number; private var _info:Environment; private var _domainHash:Number; private var _campaignInfo:CampaignInfo; private var _gifRequest:GIFRequest; private var _hasInitData:Boolean;// = false private var _account:String; public function Tracker(_arg1:String, _arg2:Configuration, _arg3:DebugConfiguration, _arg4:Environment, _arg5:Buffer, _arg6:GIFRequest, _arg7:AdSenseGlobals){ var _local8:String; super(); _account = _arg1; _config = _arg2; _debug = _arg3; _info = _arg4; _buffer = _arg5; _gifRequest = _arg6; _adSense = _arg7; if (!Utils.validateAccount(_arg1)){ _local8 = (("Account \"" + _arg1) + "\" is not valid."); _debug.warning(_local8); throw (new Error(_local8)); }; _initData(); } private function _doTracking():Boolean{ if (((((!((_info.protocol == Protocols.file))) && (!((_info.protocol == Protocols.none))))) && (_isNotGoogleSearch()))){ return (true); }; if (_config.allowLocalTracking){ return (true); }; return (false); } public function addOrganic(_arg1:String, _arg2:String):void{ _debug.info((("addOrganic( " + [_arg1, _arg2].join(", ")) + " )")); _config.organic.addSource(_arg1, _arg2); } public function setAllowLinker(_arg1:Boolean):void{ _config.allowLinker = _arg1; _debug.info((("setAllowLinker( " + _config.allowLinker) + " )")); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ var _local5:Boolean; var _local6 = 2; if (((!((_arg1 == ""))) && (!((_arg2 == ""))))){ _eventTracker.clearKey(EVENT_TRACKER_PROJECT_ID); _eventTracker.clearValue(EVENT_TRACKER_PROJECT_ID); _local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_OBJECT_NAME_KEY_NUM, _arg1); _local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_TYPE_KEY_NUM, _arg2); if (((_arg3) && (!((_arg3 == ""))))){ _local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_LABEL_KEY_NUM, _arg3); _local6 = 3; if (!isNaN(_arg4)){ _local5 = _eventTracker.setValue(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_VALUE_VALUE_NUM, _arg4); _local6 = 4; }; }; if (_local5){ _debug.info(((("valid event tracking call\ncategory: " + _arg1) + "\naction: ") + _arg2), VisualDebugMode.geek); _sendXEvent(_eventTracker); }; } else { _debug.warning(((("event tracking call is not valid, failed!\ncategory: " + _arg1) + "\naction: ") + _arg2), VisualDebugMode.geek); _local5 = false; }; switch (_local6){ case 4: _debug.info((("trackEvent( " + [_arg1, _arg2, _arg3, _arg4].join(", ")) + " )")); break; case 3: _debug.info((("trackEvent( " + [_arg1, _arg2, _arg3].join(", ")) + " )")); break; case 2: default: _debug.info((("trackEvent( " + [_arg1, _arg2].join(", ")) + " )")); }; return (_local5); } public function trackPageview(_arg1:String=""):void{ _debug.info((("trackPageview( " + _arg1) + " )")); if (_doTracking()){ _initData(); _trackMetrics(_arg1); _noSessionInformation = false; } else { _debug.warning((("trackPageview( " + _arg1) + " ) failed")); }; } public function setCookieTimeout(_arg1:int):void{ _config.conversionTimeout = _arg1; _debug.info((("setCookieTimeout( " + _config.conversionTimeout) + " )")); } public function trackTrans():void{ _debug.warning("trackTrans() not implemented"); } public function setClientInfo(_arg1:Boolean):void{ _config.detectClientInfo = _arg1; _debug.info((("setClientInfo( " + _config.detectClientInfo) + " )")); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ _debug.warning((("linkByPost( " + [_arg1, _arg2].join(", ")) + " ) not implemented")); } private function _initData():void{ var _local1:String; var _local2:String; if (!_hasInitData){ _updateDomainName(); _domainHash = _getDomainHash(); _timeStamp = Math.round((new Date().getTime() / 1000)); if (_debug.verbose){ _local1 = ""; _local1 = (_local1 + "_initData 0"); _local1 = (_local1 + ("\ndomain name: " + _config.domainName)); _local1 = (_local1 + ("\ndomain hash: " + _domainHash)); _local1 = (_local1 + (((("\ntimestamp: " + _timeStamp) + " (") + new Date((_timeStamp * 1000))) + ")")); _debug.info(_local1, VisualDebugMode.geek); }; }; if (_doTracking()){ _handleCookie(); }; if (!_hasInitData){ if (_doTracking()){ _formatedReferrer = _formatReferrer(); _browserInfo = new BrowserInfo(_config, _info); _debug.info(("browserInfo: " + _browserInfo.toURLString()), VisualDebugMode.advanced); if (_config.campaignTracking){ _campaign = new CampaignManager(_config, _debug, _buffer, _domainHash, _formatedReferrer, _timeStamp); _campaignInfo = _campaign.getCampaignInformation(_info.locationSearch, _noSessionInformation); _debug.info(("campaignInfo: " + _campaignInfo.toURLString()), VisualDebugMode.advanced); }; }; _x10Module = new X10(); _eventTracker = new X10(); _hasInitData = true; }; if (_config.hasSiteOverlay){ _debug.warning("Site Overlay is not supported"); }; if (_debug.verbose){ _local2 = ""; _local2 = (_local2 + "_initData (misc)"); _local2 = (_local2 + ("\nflash version: " + _info.flashVersion.toString(4))); _local2 = (_local2 + ("\nprotocol: " + _info.protocol)); _local2 = (_local2 + (("\ndefault domain name (auto): \"" + _info.domainName) + "\"")); _local2 = (_local2 + ("\nlanguage: " + _info.language)); _local2 = (_local2 + ("\ndomain hash: " + _getDomainHash())); _local2 = (_local2 + ("\nuser-agent: " + _info.userAgent)); _debug.info(_local2, VisualDebugMode.geek); }; } public function getDetectTitle():Boolean{ _debug.info("getDetectTitle()"); return (_config.detectTitle); } public function resetSession():void{ _debug.info("resetSession()"); _buffer.resetCurrentSession(); } public function getClientInfo():Boolean{ _debug.info("getClientInfo()"); return (_config.detectClientInfo); } private function _sendXEvent(_arg1:X10=null):void{ var _local2:Variables; var _local3:EventInfo; var _local4:Variables; var _local5:Variables; _initData(); if (_takeSample()){ _local2 = new Variables(); _local2.URIencode = true; _local3 = new EventInfo(true, _x10Module, _arg1); _local4 = _local3.toVariables(); _local5 = _renderMetricsSearchVariables(); _local2.join(_local4, _local5); _gifRequest.send(_account, _local2, false, true); }; } public function setDetectFlash(_arg1:Boolean):void{ _config.detectFlash = _arg1; _debug.info((("setDetectFlash( " + _config.detectFlash) + " )")); } public function setCampNameKey(_arg1:String):void{ _config.campaignKey.UCCN = _arg1; var _local2 = (("setCampNameKey( " + _config.campaignKey.UCCN) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCCN]")); } else { _debug.info(_local2); }; } private function _formatReferrer():String{ var _local2:String; var _local3:URL; var _local4:URL; var _local1:String = _info.referrer; if ((((_local1 == "")) || ((_local1 == "localhost")))){ _local1 = "-"; } else { _local2 = _info.domainName; _local3 = new URL(_local1); _local4 = new URL(("http://" + _local2)); if (_local3.hostName == _local2){ return ("-"); }; if (_local4.domain == _local3.domain){ if (_local4.subDomain != _local3.subDomain){ _local1 = "0"; }; }; if ((((_local1.charAt(0) == "[")) && (_local1.charAt((_local1.length - 1))))){ _local1 = "-"; }; }; _debug.info(("formated referrer: " + _local1), VisualDebugMode.advanced); return (_local1); } private function _visitCode():Number{ if (_debug.verbose){ _debug.info(("visitCode: " + _buffer.utma.sessionId), VisualDebugMode.geek); }; return (_buffer.utma.sessionId); } public function createEventTracker(_arg1:String):EventTracker{ _debug.info((("createEventTracker( " + _arg1) + " )")); return (new EventTracker(_arg1, this)); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ _debug.warning((("addItem( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6].join(", ")) + " ) not implemented")); } public function clearIgnoredOrganic():void{ _debug.info("clearIgnoredOrganic()"); _config.organic.clearIgnoredKeywords(); } public function setVar(_arg1:String):void{ var _local2:Variables; if (((!((_arg1 == ""))) && (_isNotGoogleSearch()))){ _initData(); _buffer.utmv.domainHash = _domainHash; _buffer.utmv.value = _arg1; if (_debug.verbose){ _debug.info(_buffer.utmv.toString(), VisualDebugMode.geek); }; _debug.info((("setVar( " + _arg1) + " )")); if (_takeSample()){ _local2 = new Variables(); _local2.utmt = "var"; _gifRequest.send(_account, _local2); }; } else { _debug.warning((("setVar \"" + _arg1) + "\" is ignored")); }; } public function setDomainName(_arg1:String):void{ if (_arg1 == "auto"){ _config.domain.mode = DomainNameMode.auto; } else { if (_arg1 == "none"){ _config.domain.mode = DomainNameMode.none; } else { _config.domain.mode = DomainNameMode.custom; _config.domain.name = _arg1; }; }; _updateDomainName(); _debug.info((("setDomainName( " + _config.domainName) + " )")); } private function _updateDomainName():void{ var _local1:String; if (_config.domain.mode == DomainNameMode.auto){ _local1 = _info.domainName; if (_local1.substring(0, 4) == "www."){ _local1 = _local1.substring(4); }; _config.domain.name = _local1; }; _config.domainName = _config.domain.name.toLowerCase(); _debug.info(("domain name: " + _config.domainName), VisualDebugMode.advanced); } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ _debug.warning((("addTrans( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8].join(", ")) + " ) not implemented")); return (null); } private function _renderMetricsSearchVariables(_arg1:String=""):Variables{ var _local4:Variables; var _local2:Variables = new Variables(); _local2.URIencode = true; var _local3:DocumentInfo = new DocumentInfo(_config, _info, _formatedReferrer, _arg1, _adSense); _debug.info(("docInfo: " + _local3.toURLString()), VisualDebugMode.geek); if (_config.campaignTracking){ _local4 = _campaignInfo.toVariables(); }; var _local5:Variables = _browserInfo.toVariables(); _local2.join(_local3.toVariables(), _local5, _local4); return (_local2); } public function setCampContentKey(_arg1:String):void{ _config.campaignKey.UCCT = _arg1; var _local2 = (("setCampContentKey( " + _config.campaignKey.UCCT) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCCT]")); } else { _debug.info(_local2); }; } private function _handleCookie():void{ var _local1:String; var _local2:String; var _local3:Array; var _local4:String; if (_config.allowLinker){ }; if (((_buffer.hasUTMA()) && (!(_buffer.utma.isEmpty())))){ if (((!(_buffer.hasUTMB())) || (!(_buffer.hasUTMC())))){ _buffer.updateUTMA(_timeStamp); _noSessionInformation = true; }; if (_debug.verbose){ _debug.info(("from cookie " + _buffer.utma.toString()), VisualDebugMode.geek); }; } else { _debug.info("create a new utma", VisualDebugMode.advanced); _buffer.utma.domainHash = _domainHash; _buffer.utma.sessionId = _getUniqueSessionId(); _buffer.utma.firstTime = _timeStamp; _buffer.utma.lastTime = _timeStamp; _buffer.utma.currentTime = _timeStamp; _buffer.utma.sessionCount = 1; if (_debug.verbose){ _debug.info(_buffer.utma.toString(), VisualDebugMode.geek); }; _noSessionInformation = true; _isNewVisitor = true; }; if (((_adSense.gaGlobal) && ((_adSense.dh == String(_domainHash))))){ if (_adSense.sid){ _buffer.utma.currentTime = Number(_adSense.sid); if (_debug.verbose){ _local1 = ""; _local1 = (_local1 + "AdSense sid found\n"); _local1 = (_local1 + (((("Override currentTime(" + _buffer.utma.currentTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")")); _debug.info(_local1, VisualDebugMode.geek); }; }; if (_isNewVisitor){ if (_adSense.sid){ _buffer.utma.lastTime = Number(_adSense.sid); if (_debug.verbose){ _local2 = ""; _local2 = (_local2 + "AdSense sid found (new visitor)\n"); _local2 = (_local2 + (((("Override lastTime(" + _buffer.utma.lastTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")")); _debug.info(_local2, VisualDebugMode.geek); }; }; if (_adSense.vid){ _local3 = _adSense.vid.split("."); _buffer.utma.sessionId = Number(_local3[0]); _buffer.utma.firstTime = Number(_local3[1]); if (_debug.verbose){ _local4 = ""; _local4 = (_local4 + "AdSense vid found (new visitor)\n"); _local4 = (_local4 + (((("Override sessionId(" + _buffer.utma.sessionId) + ") from AdSense vid(") + Number(_local3[0])) + ")\n")); _local4 = (_local4 + (((("Override firstTime(" + _buffer.utma.firstTime) + ") from AdSense vid(") + Number(_local3[1])) + ")")); _debug.info(_local4, VisualDebugMode.geek); }; }; if (_debug.verbose){ _debug.info(("AdSense modified : " + _buffer.utma.toString()), VisualDebugMode.geek); }; }; }; _buffer.utmb.domainHash = _domainHash; if (isNaN(_buffer.utmb.trackCount)){ _buffer.utmb.trackCount = 0; }; if (isNaN(_buffer.utmb.token)){ _buffer.utmb.token = _config.tokenCliff; }; if (isNaN(_buffer.utmb.lastTime)){ _buffer.utmb.lastTime = _buffer.utma.currentTime; }; _buffer.utmc.domainHash = _domainHash; if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.advanced); _debug.info(_buffer.utmc.toString(), VisualDebugMode.advanced); }; } public function setLocalServerMode():void{ _config.serverMode = ServerOperationMode.local; _debug.info("setLocalServerMode()"); } public function clearIgnoredRef():void{ _debug.info("clearIgnoredRef()"); _config.organic.clearIgnoredReferrals(); } public function setCampSourceKey(_arg1:String):void{ _config.campaignKey.UCSR = _arg1; var _local2 = (("setCampSourceKey( " + _config.campaignKey.UCSR) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCSR]")); } else { _debug.info(_local2); }; } public function getLocalGifPath():String{ _debug.info("getLocalGifPath()"); return (_config.localGIFpath); } public function setLocalGifPath(_arg1:String):void{ _config.localGIFpath = _arg1; _debug.info((("setLocalGifPath( " + _config.localGIFpath) + " )")); } public function getVersion():String{ _debug.info("getVersion()"); return (_config.version); } public function setAllowAnchor(_arg1:Boolean):void{ _config.allowAnchor = _arg1; _debug.info((("setAllowAnchor( " + _config.allowAnchor) + " )")); } private function _isNotGoogleSearch():Boolean{ var _local1:String = _config.domainName; var _local2 = (_local1.indexOf("www.google.") < 0); var _local3 = (_local1.indexOf(".google.") < 0); var _local4 = (_local1.indexOf("google.") < 0); var _local5 = (_local1.indexOf("google.org") > -1); return (((((((((_local2) || (_local3))) || (_local4))) || (!((_config.cookiePath == "/"))))) || (_local5))); } public function setSampleRate(_arg1:Number):void{ if (_arg1 < 0){ _debug.warning("sample rate can not be negative, ignoring value."); } else { _config.sampleRate = _arg1; }; _debug.info((("setSampleRate( " + _config.sampleRate) + " )")); } private function _takeSample():Boolean{ if (_debug.verbose){ _debug.info((((("takeSample: (" + (_visitCode() % 10000)) + ") < (") + (_config.sampleRate * 10000)) + ")"), VisualDebugMode.geek); }; return (((_visitCode() % 10000) < (_config.sampleRate * 10000))); } public function setCookiePath(_arg1:String):void{ _config.cookiePath = _arg1; _debug.info((("setCookiePath( " + _config.cookiePath) + " )")); } public function setAllowHash(_arg1:Boolean):void{ _config.allowDomainHash = _arg1; _debug.info((("setAllowHash( " + _config.allowDomainHash) + " )")); } private function _generateUserDataHash():Number{ var _local1 = ""; _local1 = (_local1 + _info.appName); _local1 = (_local1 + _info.appVersion); _local1 = (_local1 + _info.language); _local1 = (_local1 + _info.platform); _local1 = (_local1 + _info.userAgent.toString()); _local1 = (_local1 + (((_info.screenWidth + "x") + _info.screenHeight) + _info.screenColorDepth)); _local1 = (_local1 + _info.referrer); return (Utils.generateHash(_local1)); } public function setCampNOKey(_arg1:String):void{ _config.campaignKey.UCNO = _arg1; var _local2 = (("setCampNOKey( " + _config.campaignKey.UCNO) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCNO]")); } else { _debug.info(_local2); }; } public function addIgnoredOrganic(_arg1:String):void{ _debug.info((("addIgnoredOrganic( " + _arg1) + " )")); _config.organic.addIgnoredKeyword(_arg1); } public function setLocalRemoteServerMode():void{ _config.serverMode = ServerOperationMode.both; _debug.info("setLocalRemoteServerMode()"); } public function cookiePathCopy(_arg1:String):void{ _debug.warning((("cookiePathCopy( " + _arg1) + " ) not implemented")); } public function setDetectTitle(_arg1:Boolean):void{ _config.detectTitle = _arg1; _debug.info((("setDetectTitle( " + _config.detectTitle) + " )")); } public function setCampTermKey(_arg1:String):void{ _config.campaignKey.UCTR = _arg1; var _local2 = (("setCampTermKey( " + _config.campaignKey.UCTR) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCTR]")); } else { _debug.info(_local2); }; } public function getServiceMode():ServerOperationMode{ _debug.info("getServiceMode()"); return (_config.serverMode); } private function _trackMetrics(_arg1:String=""):void{ var _local2:Variables; var _local3:Variables; var _local4:Variables; var _local5:EventInfo; if (_takeSample()){ _local2 = new Variables(); _local2.URIencode = true; if (((_x10Module) && (_x10Module.hasData()))){ _local5 = new EventInfo(false, _x10Module); _local3 = _local5.toVariables(); }; _local4 = _renderMetricsSearchVariables(_arg1); _local2.join(_local3, _local4); _gifRequest.send(_account, _local2); }; } public function setCampaignTrack(_arg1:Boolean):void{ _config.campaignTracking = _arg1; _debug.info((("setCampaignTrack( " + _config.campaignTracking) + " )")); } public function addIgnoredRef(_arg1:String):void{ _debug.info((("addIgnoredRef( " + _arg1) + " )")); _config.organic.addIgnoredReferral(_arg1); } public function clearOrganic():void{ _debug.info("clearOrganic()"); _config.organic.clearEngines(); } public function getDetectFlash():Boolean{ _debug.info("getDetectFlash()"); return (_config.detectFlash); } public function setCampMediumKey(_arg1:String):void{ _config.campaignKey.UCMD = _arg1; var _local2 = (("setCampMediumKey( " + _config.campaignKey.UCMD) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCMD]")); } else { _debug.info(_local2); }; } private function _getUniqueSessionId():Number{ var _local1:Number = ((Utils.generate32bitRandom() ^ _generateUserDataHash()) * 2147483647); _debug.info(("Session ID: " + _local1), VisualDebugMode.geek); return (_local1); } private function _getDomainHash():Number{ if (((((!(_config.domainName)) || ((_config.domainName == "")))) || ((_config.domain.mode == DomainNameMode.none)))){ _config.domainName = ""; return (1); }; _updateDomainName(); if (_config.allowDomainHash){ return (Utils.generateHash(_config.domainName)); }; return (1); } public function setSessionTimeout(_arg1:int):void{ _config.sessionTimeout = _arg1; _debug.info((("setSessionTimeout( " + _config.sessionTimeout) + " )")); } public function getAccount():String{ _debug.info("getAccount()"); return (_account); } public function link(_arg1:String, _arg2:Boolean=false):void{ _debug.warning((("link( " + [_arg1, _arg2].join(", ")) + " ) not implemented")); } public function setRemoteServerMode():void{ _config.serverMode = ServerOperationMode.remote; _debug.info("setRemoteServerMode()"); } } }//package com.google.analytics.v4
Section 100
//AnalyticsTracker (com.google.analytics.AnalyticsTracker) package com.google.analytics { import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; public interface AnalyticsTracker extends GoogleAnalyticsAPI, IEventDispatcher { function set account(_arg1:String):void; function get config():Configuration; function get mode():String; function set config(_arg1:Configuration):void; function set mode(_arg1:String):void; function set debug(_arg1:DebugConfiguration):void; function get visualDebug():Boolean; function get account():String; function set visualDebug(_arg1:Boolean):void; function isReady():Boolean; function get debug():DebugConfiguration; } }//package com.google.analytics
Section 101
//API (com.google.analytics.API) package com.google.analytics { import com.google.analytics.utils.*; public class API { public static var version:Version = new Version(); version.major = 1; version.minor = 0; version.build = 1; version.revision = "$Rev: 319 $ ".split(" ")[1]; } }//package com.google.analytics
Section 102
//GATracker (com.google.analytics.GATracker) package com.google.analytics { import flash.display.*; import flash.events.*; import com.google.analytics.core.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; import com.google.analytics.external.*; import com.google.analytics.events.*; public class GATracker implements AnalyticsTracker { private var _adSense:AdSenseGlobals; private var _env:Environment; private var _visualDebug:Boolean; private var _idleTimer:IdleTimer; private var _debug:DebugConfiguration; private var _buffer:Buffer; private var _config:Configuration; private var _mode:String; private var _display:DisplayObject; private var _jsproxy:JavascriptProxy; private var _dom:HTMLDOM; private var _eventDispatcher:EventDispatcher; private var _ready:Boolean;// = false private var _gifRequest:GIFRequest; private var _account:String; private var _tracker:GoogleAnalyticsAPI; public static var version:Version = API.version; public static var autobuild:Boolean = true; public function GATracker(_arg1:DisplayObject, _arg2:String, _arg3:String="AS3", _arg4:Boolean=false, _arg5:Configuration=null, _arg6:DebugConfiguration=null){ _display = _arg1; _eventDispatcher = new EventDispatcher(this); _tracker = new TrackerCache(); this.account = _arg2; this.mode = _arg3; this.visualDebug = _arg4; if (!_arg6){ this.debug = new DebugConfiguration(); }; if (!_arg5){ this.config = new Configuration(_arg6); }; if (autobuild){ _factory(); }; } public function link(_arg1:String, _arg2:Boolean=false):void{ _tracker.link(_arg1, _arg2); } public function addOrganic(_arg1:String, _arg2:String):void{ _tracker.addOrganic(_arg1, _arg2); } public function setAllowLinker(_arg1:Boolean):void{ _tracker.setAllowLinker(_arg1); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ return (_tracker.trackEvent(_arg1, _arg2, _arg3, _arg4)); } public function setCookieTimeout(_arg1:int):void{ _tracker.setCookieTimeout(_arg1); } public function trackTrans():void{ _tracker.trackTrans(); } public function getClientInfo():Boolean{ return (_tracker.getClientInfo()); } public function trackPageview(_arg1:String=""):void{ _tracker.trackPageview(_arg1); } public function setClientInfo(_arg1:Boolean):void{ _tracker.setClientInfo(_arg1); } public function get account():String{ return (_account); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ _tracker.linkByPost(_arg1, _arg2); } public function getDetectTitle():Boolean{ return (_tracker.getDetectTitle()); } public function dispatchEvent(_arg1:Event):Boolean{ return (_eventDispatcher.dispatchEvent(_arg1)); } public function get config():Configuration{ return (_config); } public function set mode(_arg1:String):void{ _mode = _arg1; } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ _eventDispatcher.removeEventListener(_arg1, _arg2, _arg3); } public function setDetectFlash(_arg1:Boolean):void{ _tracker.setDetectFlash(_arg1); } public function resetSession():void{ _tracker.resetSession(); } public function setCampNameKey(_arg1:String):void{ _tracker.setCampNameKey(_arg1); } public function get debug():DebugConfiguration{ return (_debug); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ _tracker.addItem(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } private function _bridgeFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (Bridge) v" + version) + "\naccount: ") + account)); return (new Bridge(account, _debug, _jsproxy)); } public function clearIgnoredOrganic():void{ _tracker.clearIgnoredOrganic(); } public function set account(_arg1:String):void{ _account = _arg1; } public function setVar(_arg1:String):void{ _tracker.setVar(_arg1); } public function build():void{ if (!isReady()){ _factory(); }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ _eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function setDomainName(_arg1:String):void{ _tracker.setDomainName(_arg1); } public function createEventTracker(_arg1:String):EventTracker{ return (_tracker.createEventTracker(_arg1)); } public function setCampSourceKey(_arg1:String):void{ _tracker.setCampSourceKey(_arg1); } public function set config(_arg1:Configuration):void{ _config = _arg1; } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ return (_tracker.addTrans(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)); } public function setCampContentKey(_arg1:String):void{ _tracker.setCampContentKey(_arg1); } public function willTrigger(_arg1:String):Boolean{ return (_eventDispatcher.willTrigger(_arg1)); } public function setLocalServerMode():void{ _tracker.setLocalServerMode(); } public function getLocalGifPath():String{ return (_tracker.getLocalGifPath()); } public function setAllowAnchor(_arg1:Boolean):void{ _tracker.setAllowAnchor(_arg1); } public function clearIgnoredRef():void{ _tracker.clearIgnoredRef(); } public function isReady():Boolean{ return (_ready); } public function get mode():String{ return (_mode); } public function set debug(_arg1:DebugConfiguration):void{ _debug = _arg1; } public function setLocalGifPath(_arg1:String):void{ _tracker.setLocalGifPath(_arg1); } public function getVersion():String{ return (_tracker.getVersion()); } public function setSampleRate(_arg1:Number):void{ _tracker.setSampleRate(_arg1); } public function setCookiePath(_arg1:String):void{ _tracker.setCookiePath(_arg1); } public function setAllowHash(_arg1:Boolean):void{ _tracker.setAllowHash(_arg1); } public function addIgnoredOrganic(_arg1:String):void{ _tracker.addIgnoredOrganic(_arg1); } public function setLocalRemoteServerMode():void{ _tracker.setLocalRemoteServerMode(); } public function cookiePathCopy(_arg1:String):void{ _tracker.cookiePathCopy(_arg1); } private function _factory():void{ var _local1:GoogleAnalyticsAPI; _jsproxy = new JavascriptProxy(debug); if (visualDebug){ debug.layout = new Layout(debug, _display); debug.active = visualDebug; }; var _local2:TrackerCache = (_tracker as TrackerCache); switch (mode){ case TrackerMode.BRIDGE: _local1 = _bridgeFactory(); break; case TrackerMode.AS3: default: _local1 = _trackerFactory(); }; if (!_local2.isEmpty()){ _local2.tracker = _local1; _local2.flush(); }; _tracker = _local1; _ready = true; dispatchEvent(new AnalyticsEvent(AnalyticsEvent.READY, this)); } public function setCampTermKey(_arg1:String):void{ _tracker.setCampTermKey(_arg1); } private function _trackerFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (AS3) v" + version) + "\naccount: ") + account)); _adSense = new AdSenseGlobals(debug); _dom = new HTMLDOM(debug); _dom.cacheProperties(); _env = new Environment("", "", "", debug, _dom); _buffer = new Buffer(config, debug, false); _gifRequest = new GIFRequest(config, debug, _buffer, _env); _idleTimer = new IdleTimer(config, debug, _display, _buffer); _env.url = _display.stage.loaderInfo.url; return (new Tracker(account, config, debug, _env, _buffer, _gifRequest, _adSense)); } public function setCampNOKey(_arg1:String):void{ _tracker.setCampNOKey(_arg1); } public function setDetectTitle(_arg1:Boolean):void{ _tracker.setDetectTitle(_arg1); } public function getServiceMode():ServerOperationMode{ return (_tracker.getServiceMode()); } public function clearOrganic():void{ _tracker.clearOrganic(); } public function setCampaignTrack(_arg1:Boolean):void{ _tracker.setCampaignTrack(_arg1); } public function addIgnoredRef(_arg1:String):void{ _tracker.addIgnoredRef(_arg1); } public function set visualDebug(_arg1:Boolean):void{ _visualDebug = _arg1; } public function setCampMediumKey(_arg1:String):void{ _tracker.setCampMediumKey(_arg1); } public function getDetectFlash():Boolean{ return (_tracker.getDetectFlash()); } public function get visualDebug():Boolean{ return (_visualDebug); } public function hasEventListener(_arg1:String):Boolean{ return (_eventDispatcher.hasEventListener(_arg1)); } public function getAccount():String{ return (_tracker.getAccount()); } public function setSessionTimeout(_arg1:int):void{ _tracker.setSessionTimeout(_arg1); } public function setRemoteServerMode():void{ _tracker.setRemoteServerMode(); } } var _local1:* = ServerOperationMode; return (_local1); }//package com.google.analytics
Section 103
//Action (core.Action) package core { public class Action { public var string:String; public var params:Array; public function Action(_arg1:String, _arg2:Array){ this.string = _arg1; this.params = _arg2; } public function toString():String{ return (((string + "::") + params.toString())); } } }//package core
Section 104
//BcwStinger (core.BcwStinger) package core { import flash.display.*; import flash.events.*; import flash.net.*; import flash.system.*; public class BcwStinger extends Loader { public static const STINGER_COMPLETE:String = "bcwStingerCompletedPlayback"; public static var isComplete:Boolean = false; public function BcwStinger():void{ this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true); } private function onStingerLoadComplete(_arg1:Event):void{ this.addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true); } private function onStingerLoadProgrees(_arg1:ProgressEvent):void{ var _local2:String; _local2 = String(Math.floor(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100))); } private function onAddedToStage(_arg1:Event):void{ var _local2:String; var _local3:URLRequest; Security.allowDomain(Config.BCW_STINGER_URL); _local2 = Config.BCW_STINGER_URL; if (!_local2){ _local2 = "stinger.swf"; }; this.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onStingerLoadProgrees); this.contentLoaderInfo.addEventListener(Event.COMPLETE, onStingerLoadComplete); this.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus); this.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local3 = new URLRequest(_local2); this.load(_local3); } private function onEnterFrame(_arg1:Event):void{ var _local2:MovieClip; _local2 = MovieClip(this.content); if ((((((_local2.currentFrame > 1)) && ((_local2.currentFrame == _local2.scenes[(_local2.scenes.length - 1)].numFrames)))) && ((_local2.currentScene.name == _local2.scenes[(_local2.scenes.length - 1)].name)))){ BcwStinger.isComplete = true; this.dispatchEvent(new Event(BcwStinger.STINGER_COMPLETE)); this.destroy(); }; } private function onHTTPStatus(_arg1:HTTPStatusEvent):void{ trace(_arg1); } private function onIOError(_arg1:IOErrorEvent):void{ trace(_arg1); this.dispatchEvent(new Event(BcwStinger.STINGER_COMPLETE)); this.destroy(); } public function destroy():void{ this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); this.removeEventListener(Event.ENTER_FRAME, onEnterFrame); this.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onStingerLoadProgrees); this.contentLoaderInfo.removeEventListener(Event.COMPLETE, onStingerLoadComplete); this.contentLoaderInfo.removeEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus); this.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onIOError); this.parent.removeChild(this); } } }//package core
Section 105
//Boom (core.Boom) package core { import flash.display.*; import flash.geom.*; import flash.events.*; public class Boom extends Sprite { public var startX:Number; public var vector:Point; public var stopX:Number; public function init():void{ var _local1:int; var _local2:Dot; if (parent == null){ return; }; startX = 0; stopX = 30; _local1 = 30; while (_local1 > 0) { _local2 = new Dot(); _local2.scaleX = (Math.random() + 1); _local2.scaleY = (Math.random() + 1); _local2.startX = 0; _local2.stopX = (stopX * (Math.random() + 0.5)); _local2.rotation = (Math.random() * 360); addChild(_local2); _local1--; }; addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function enterFrameHandler(_arg1:Event):void{ var _local2:int; var _local3:Dot; var _local4:Number; if (numChildren == 0){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); parent.removeChild(this); }; _local2 = 0; while (_local2 < numChildren) { if (getChildAt(_local2).scaleX < 0.01){ removeChildAt(_local2); } else { _local3 = (getChildAt(_local2) as Dot); _local3.scaleX = (_local3.scaleX * 0.85); _local3.scaleY = (_local3.scaleY * 0.85); _local3.startX = (_local3.startX + ((_local3.stopX - _local3.startX) / 10)); _local4 = ((Math.PI * _local3.rotation) / 180); _local3.x = ((_local3.startX * Math.cos(_local4)) + 0); _local3.y = ((-(_local3.startX) * Math.sin(_local4)) + 0); _local2++; }; }; } } }//package core
Section 106
//BridgeCraft (core.BridgeCraft) package core { import flash.display.*; import levels.*; import flash.events.*; import flash.net.*; import picaso.*; import map.*; import utils.*; import flash.utils.*; import sounds.*; import com.candystand.ScoreSubmit.*; import vis.*; import hud.*; import menu.*; import flash.ui.*; import flash.system.*; public dynamic class BridgeCraft extends Sprite { private const HELP_SCREEN:int = 2; private const MENU_SCREEN:int = 1; private const CREDITS_SCREEN:int = 3; private var sharedObject:SharedObject; private var playedFirstTime:Boolean;// = true private var _openedStoryLevels:int;// = 0 private var currentDifficulty:int;// = 0 private var prevScreenType:int; private var _needHelp:Boolean;// = false private var loaderScreen:LoaderScreen; private var _showWin:Boolean;// = true private var _sounds:Boolean; private var fadingOut:Boolean;// = false private var loadingAdText:LoadingAdText; private var _whiteFader:Sprite; public var _cursor:Cursor; private var _fader:Fader; private var _currentScore:Number;// = 0 private var _newGame:Boolean;// = false private var _levels:Array; private var _counter:int;// = 0 private var _musicArray:Array; private var fadeDivider:Number;// = 3 private var _screenToFade; private var _storyLevels:Array; private var playerName:String;// = "Player" private var _music:Boolean; private var fadingIn:Boolean;// = false private var _playingStory:Boolean;// = false private var backGround; private var logoCS:TheirLogo; private var _contactUs:ContactUsButton; private var prevMouseTypes:Array; private var _currentLevel:Number;// = 0 private var _isLevelOpened:Array; private var _screen; private var returnToMap:Boolean;// = false private var _submitScore:Boolean;// = false private var currentPage:int;// = 0 private var logo:OurLogo; private var _soundsArray:Array; public var _soundPanel:SoundPanel; private var levelCounter:int;// = 0 private var _showIntro:Boolean;// = true public static const UNLOAD_COMPLETE:String = "screanUnloadComplete"; public static const LOAD_COMPLETE:String = "screanLoadComplete"; public function BridgeCraft(){ _currentLevel = 0; _currentScore = 0; _needHelp = false; _showWin = true; _playingStory = false; _showIntro = true; _openedStoryLevels = 0; playedFirstTime = true; playerName = "Player"; currentPage = 0; prevMouseTypes = []; fadeDivider = 3; fadingIn = false; fadingOut = false; _counter = 0; currentDifficulty = 0; _newGame = false; returnToMap = false; _submitScore = false; levelCounter = 0; super(); } private function mapLevelSelectHandler(_arg1:MapEvent):void{ this.afterMapCleanup(); _currentLevel = _arg1.level; currentPage = (_screen as MapClass).page; loadLevel(_currentLevel); } private function loadLevelZero():void{ this.logo.visible = false; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = false; }; this._soundPanel.visible = true; this.backGround.visible = false; this._contactUs.visible = false; clearScreen(); this.sharedObject.data.isLevelOpened[(_currentLevel - 1)] = true; this.sharedObject.flush(); _screen = new Level00(); (_screen as LevelManager).needHelp = _needHelp; (_screen as LevelManager).winBudget = _levels[(_currentLevel - 1)]; (_screen as LevelManager).levelDifficulty = this.currentDifficulty; (_screen as LevelManager).playerName = this.playerName.concat(); addChildAt(_screen, 1); _screen.init(_playingStory); addEventListener(Config.EVENT_LEVEL_CLOSE, levelCloseHandler, false, 0, true); addEventListener(Config.EVENT_LEVEL_CLOSE_TO_MENU, levelCloseToMenuHandler, false, 0, true); addEventListener(Config.EVENT_LEVEL_NEXT, nextLevel, false, 0, true); addEventListener(Config.EVENT_LEVEL_CLOSE_AND_QUIT, onQuitSubmitExit, false, 0, true); } private function helpCloseHandler(_arg1:Event):void{ this.removeEventListener(Config.EVENT_HELP_CLOSE, helpCloseHandler); loadMenu(); } private function mapSubmitHandler(_arg1:Event):void{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.afterMapCleanup(); this.quitSubmit(); }; if (Config.LANGUAGE == Config.LANGUAGE_RUS){ this.quitSubmit(); }; } private function onPlayHandler(_arg1:Event):void{ _newGame = true; _submitScore = false; GAManager.trackPage("/play-pressed"); } private function enterFrameHandler(_arg1:Event):void{ trace("total memory", System.totalMemory); } private function redrawCursor(_arg1:MouseEvent):void{ Mouse.hide(); _cursor.x = _arg1.stageX; _cursor.y = _arg1.stageY; } private function onFadeInCompleteHandler(_arg1:Event):void{ this._fader.removeEventListener(Fader.COMPLETE, onFadeInCompleteHandler); } private function loadLevel(_arg1:Number=1):void{ var _local2:String; var _local3:Class; if (this.playedFirstTime){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ Game.newGame(1); } else { if (Config.LANGUAGE == Config.LANGUAGE_RUS){ PlayItManager.initGame(); }; }; this.playedFirstTime = false; }; this.logo.visible = false; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = false; }; this._soundPanel.visible = true; this.backGround.visible = false; this._contactUs.visible = false; clearScreen(); _currentLevel = _arg1; this.sharedObject.data.isLevelOpened[(_currentLevel - 1)] = true; this.sharedObject.flush(); _local2 = ((_arg1)>=10) ? ("levels.Level" + _arg1.toString()) : ("levels.Level0" + _arg1.toString()); _local3 = (getDefinitionByName(_local2) as Class); _screen = (getWR(new (_local3)).object as _local3); _screen = new (_local3); (_screen as LevelManager).needHelp = _needHelp; (_screen as LevelManager).winBudget = _levels[(_currentLevel - 1)]; (_screen as LevelManager).levelDifficulty = this.currentDifficulty; (_screen as LevelManager).playerName = this.playerName.concat(); addChildAt(_screen, 1); _screen.init(_playingStory); Config.CURRENT_LEVEL = _currentLevel; addEventListener(Config.EVENT_LEVEL_CLOSE, levelCloseHandler, false, 0, true); addEventListener(Config.EVENT_LEVEL_CLOSE_TO_MENU, levelCloseToMenuHandler, false, 0, true); addEventListener(Config.EVENT_LEVEL_NEXT, nextLevel, false, 0, true); addEventListener(Config.EVENT_LEVEL_CLOSE_AND_QUIT, onQuitSubmitExit, false, 0, true); } private function nextLevel(_arg1:Event):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local2 = 0; _local3 = 0; _local4 = 0; while (_local4 < _levels.length) { if ((((_levels[_local4] == 0)) && (_isLevelOpened[_local4]))){ _local2++; }; if (_levels[_local4] > 0){ _local3++; }; _local4++; }; _local5 = (_currentLevel + 1); if ((((_local5 <= Config.LEVELS_TOTAL)) && (!(_isLevelOpened[(_local5 - 1)])))){ if (_local2 < Config.MAX_OPENED_LEVELS){ _isLevelOpened[(_local5 - 1)] = true; }; }; this.afterLevelCleanup(); this.afterLevelSaveData(); if (((((_showWin) && ((_local5 > Config.LEVELS_TOTAL)))) && ((_local3 == Config.LEVELS_TOTAL)))){ GAManager.trackPage("/game-completed"); if (Config.VIRAL){ this.loadOutroViral(); } else { this.loadOutro(); }; } else { if (_local5 <= Config.LEVELS_TOTAL){ if (_isLevelOpened[(_local5 - 1)]){ this.loadLevel(_local5); } else { this.loadMap(); }; } else { this.loadMap(); }; }; } private function showOutroHandler(_arg1:Event):void{ this.afterMapCleanup(); this.loadOutro(); } private function turnTutorialOff(_arg1:Event):void{ this.removeEventListener(Config.EVENT_DO_NOT_NEED_HELP, turnTutorialOff); _needHelp = false; } private function checkCursor(_arg1:Event):void{ var _local2:int; var _local3:int; _local2 = stage.getChildIndex(_cursor); if (_local2 != (stage.numChildren - 1)){ _local3 = _local2; while (_local3 < (stage.numChildren - 1)) { stage.swapChildrenAt(_local3, (_local3 + 1)); _local3++; }; }; } private function onHardHandler(_arg1:Event):void{ var _local2:int; this.afterMenuCleanup(); Config.setDifficulty(Config.DIFFICULTY_HARD); this.currentDifficulty = Config.DIFFICULTY_HARD; if (_newGame){ _levels = []; _isLevelOpened = []; _local2 = 0; while (_local2 < Config.LEVELS_TOTAL) { _levels.push(0); _isLevelOpened.push(false); _local2++; }; this.sharedObject.data.levels.hard = _levels; this.sharedObject.data.isLevelOpened.hard = _isLevelOpened; if (this.sharedObject.data.solutions){ this.sharedObject.data.solutions.hard = new Array(Config.LEVELS_TOTAL); }; this.sharedObject.flush(); } else { _levels = this.sharedObject.data.levels.hard; _isLevelOpened = this.sharedObject.data.isLevelOpened.hard; _local2 = 0; while (_local2 < Config.LEVELS_TOTAL) { if (_levels[_local2] > 0){ _isLevelOpened[_local2] = true; }; _local2++; }; this.sharedObject.data.isLevelOpened.hard = _isLevelOpened; this.sharedObject.flush(); }; this.sharedObject.data["hard"] = true; if (_newGame){ GAManager.trackPage("/play-hard-pressed"); _newGame = false; this.loadWhiteIntro(); } else { GAManager.trackPage("/continue-hard-pressed"); this.loadMap(); }; } private function afterLevelCleanup():void{ removeEventListener(Config.EVENT_LEVEL_CLOSE, levelCloseHandler); removeEventListener(Config.EVENT_LEVEL_CLOSE_TO_MENU, levelCloseToMenuHandler); removeEventListener(Config.EVENT_LEVEL_NEXT, nextLevel); removeEventListener(Config.EVENT_LEVEL_CLOSE_AND_QUIT, onQuitSubmitExit); } private function navigateToPicasogames(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://picasogames.com"), "_blank"); GAManager.trackPage("/go-to-picasogames-from-logo"); } private function loadMap():void{ this.logo.visible = true; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = true; }; this._soundPanel.visible = true; this.backGround.visible = true; this._contactUs.visible = false; clearScreen(); _screen = new MapClass(Config.LEVELS_TOTAL, _levels, _isLevelOpened, _showWin, currentPage); _screen.x = (Config.SCREEN_WIDTH / 2); _screen.y = (Config.SCREEN_HEIGHT / 2); this.addChildAt(_screen, 1); if (!SoundManager.isSoundPlaying(SoundData.MAIN_THEME)){ SoundData.MAIN_THEME.play(); }; this.addEventListener(Config.EVENT_MAP_LEVEL_SELECT, mapLevelSelectHandler, false, 0, true); this.addEventListener(Config.EVENT_MAP_CLOSE, mapCloseHandler, false, 0, true); this.addEventListener(Config.EVENT_MAP_SUBMIT, mapSubmitHandler, false, 0, true); this.addEventListener(Config.EVENT_SHOW_INTRO, showIntroHandler, false, 0, true); this.addEventListener(Config.EVENT_SHOW_OUTRO, showOutroHandler, false, 0, true); } public function get score():Number{ var _local1:Number; var _local2:int; _local1 = 0; _local2 = 0; while (_local2 < _levels.length) { _local1 = (_local1 + _levels[_local2]); _local2++; }; return (_local1); } private function mouseOutHandler(_arg1:Event):void{ if ((((_cursor.type == Config.MOUSE_TYPE_DRAG)) && ((prevMouseTypes.length > 0)))){ if ((((((((((((((((((((((((((((((_arg1.target is StartButton)) || ((_arg1.target is EditButton)))) || ((_arg1.target is DeckButton)))) || ((_arg1.target is SteelButton)))) || ((_arg1.target is RopeButton)))) || ((_arg1.target is StressButton)))) || ((_arg1.target is UndoButton)))) || ((_arg1.target is ResetButton)))) || ((_arg1.target is ZoomInButton)))) || ((_arg1.target is ZoomOutButton)))) || ((_arg1.target is MusicButton)))) || ((_arg1.target is SoundsButton)))) || ((_arg1.target is SoundPanel)))) || ((_arg1.target is TalkBaloon)))) || ((_arg1.target is HUD)))){ prevMouseTypes.pop(); } else { _cursor.type = prevMouseTypes.pop(); prevMouseTypes.splice(0); }; } else { _cursor.type = Config.MOUSE_TYPE_NORMAL; }; } private function afterMapCleanup():void{ removeEventListener(Config.EVENT_MAP_LEVEL_SELECT, mapCloseHandler); removeEventListener(Config.EVENT_MAP_CLOSE, mapCloseHandler); removeEventListener(Config.EVENT_MAP_SUBMIT, mapSubmitHandler); removeEventListener(Config.EVENT_SHOW_INTRO, showIntroHandler); removeEventListener(Config.EVENT_SHOW_OUTRO, showOutroHandler); } private function loadContactUs(_arg1:MouseEvent=null):void{ clearScreen(); this.logo.visible = false; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = false; }; this._soundPanel.visible = false; this.backGround.visible = true; this._contactUs.visible = false; _screen = new ContactUsScreen(); _screen.x = (Config.SCREEN_WIDTH / 2); _screen.y = (Config.SCREEN_HEIGHT / 2); _screen.addEventListener(ContactUsScreen.ON_BACK, closeContactUsScreen, false, 0, true); this.addChildAt(_screen, 1); _screen.addEventListener(Event.ENTER_FRAME, checkCursor, false, 0, true); } private function clickHandler(_arg1:MouseEvent):void{ Mouse.hide(); } private function resetStoredData(_arg1:Event):void{ var _local2:int; _showWin = true; _showIntro = true; _levels = []; _isLevelOpened = []; _local2 = 0; while (_local2 < Config.LEVELS_TOTAL) { _levels.push(0); _isLevelOpened.push(false); _local2++; }; this.sharedObject.data.levels = _levels; this.sharedObject.data.isLevelOpened = _isLevelOpened; this.sharedObject.data.name = Config.DEFAULT_PLAYER_NAME; this.sharedObject.data.intro = _showIntro; this.sharedObject.data.win = _showWin; this.sharedObject.data.passedTutorials = [false, false, false]; this.sharedObject.data.introducedHeroes = []; this.sharedObject.data.solutions = null; this.sharedObject.flush(); this.playerName = Config.DEFAULT_PLAYER_NAME; loadMenu(); } private function outroClose(_arg1:Event):void{ _screen.removeEventListener(Outro.ON_OK, outroClose); loadMap(); } private function getWR(_arg1):WeakReference{ return (new WeakReference(_arg1)); } private function onMochiEnds(_arg1:Event):void{ while (this.backGround.numChildren > 0) { this.backGround.removeChildAt(0); }; this.removeChild(this.backGround); this.backGround = new BlueSky(); this.backGround.scaleX = (Config.SCREEN_WIDTH / this.backGround.width); this.addChildAt(this.backGround, 0); this.backGround.visible = false; if (this.loadingAdText){ this.removeChild(this.loadingAdText); this.loadingAdText = null; }; if (this.hasEventListener(Config.EVENT_MOCHI_AD_LOADED)){ this.removeEventListener(Config.EVENT_MOCHI_AD_LOADED, onMochiLoaded); }; this.removeEventListener(Config.EVENT_MOCHI_AD_ENDS, onMochiEnds); this._soundPanel.visible = true; _screen.visible = true; } private function afterMenuCleanup():void{ this.logo.x = Config.SCREEN_WIDTH; this.logo.y = 0; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.x = 0; this.logoCS.y = 0; }; removeEventListener(Config.EVENT_ON_PLAY, onPlayHandler); removeEventListener(Config.EVENT_ON_HELP, onHelpHandler); removeEventListener(Config.EVENT_ON_CREDITS, onCreditsHandler); removeEventListener(Config.EVENT_ON_QUIT, onQuitSubmitScoreHandler); removeEventListener(Config.EVENT_PLAY_EASY, onEasyHandler); removeEventListener(Config.EVENT_PLAY_NORMAL, onNormalHandler); removeEventListener(Config.EVENT_PLAY_HARD, onHardHandler); } private function onNormalHandler(_arg1:Event):void{ var _local2:int; this.afterMenuCleanup(); Config.setDifficulty(Config.DIFFICULTY_NORMAL); this.currentDifficulty = Config.DIFFICULTY_NORMAL; if (_newGame){ _levels = []; _isLevelOpened = []; _local2 = 0; while (_local2 < Config.LEVELS_TOTAL) { _levels.push(0); _isLevelOpened.push(false); _local2++; }; this.sharedObject.data.levels.normal = _levels; this.sharedObject.data.isLevelOpened.normal = _isLevelOpened; if (this.sharedObject.data.solutions){ this.sharedObject.data.solutions.normal = new Array(Config.LEVELS_TOTAL); }; this.sharedObject.flush(); } else { _levels = this.sharedObject.data.levels.normal; _isLevelOpened = this.sharedObject.data.isLevelOpened.normal; _local2 = 0; while (_local2 < Config.LEVELS_TOTAL) { if (_levels[_local2] > 0){ _isLevelOpened[_local2] = true; }; _local2++; }; this.sharedObject.data.isLevelOpened.normal = _isLevelOpened; this.sharedObject.flush(); }; this.sharedObject.data["normal"] = true; if (_newGame){ GAManager.trackPage("/play-normal-pressed"); _newGame = false; if (_showIntro){ this.loadWhiteIntro(); } else { this.loadLevel(); }; } else { if (_submitScore){ _submitScore = false; this.quitSubmit(); } else { GAManager.trackPage("/continue-normal-pressed"); this.loadMap(); }; }; } private function loadOutro():void{ this.logo.visible = false; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = false; }; this._soundPanel.visible = true; this.backGround.visible = true; this._contactUs.visible = false; clearScreen(); _showWin = false; this.sharedObject.data.win = _showWin; this.sharedObject.flush(); _screen = new Outro(); _screen.x = (Config.SCREEN_WIDTH / 2); _screen.y = (Config.SCREEN_HEIGHT / 2); addChildAt(_screen, 1); SoundData.STORY_WIN.play(); _screen.addEventListener(Outro.ON_OK, outroClose, false, 0, true); _screen.init(true); } private function introCloseHandler(_arg1:Event):void{ removeEventListener(Config.EVENT_INTRO_CLOSE, introCloseHandler); loadMenu(); } private function completeGame(_arg1:Event):void{ this.removeEventListener(Config.EVENT_COMPLETE_GAME_POPUP, completeGame); _showWin = true; } private function showIntroHandler(_arg1:Event):void{ this.afterMapCleanup(); this.loadWhiteIntro(true); } private function loadOutroViral():void{ this.logo.visible = false; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = false; }; this._soundPanel.visible = true; this.backGround.visible = true; this._contactUs.visible = false; clearScreen(); _showWin = false; this.sharedObject.data.win = _showWin; this.sharedObject.flush(); _screen = new OutroViral(this.playerName); _screen.x = (Config.SCREEN_WIDTH / 2); _screen.y = (Config.SCREEN_HEIGHT / 2); addChildAt(_screen, 1); SoundData.MAIN_THEME.play(); _screen.addEventListener(OutroViral.ON_OK, outroClose, false, 0, true); } private function testerPopUpDetected(_arg1:Event):void{ if ((((_screen is LevelManager)) && (!(_screen.paused)))){ _screen.pause(); }; if (_fader != null){ return; }; this._fader = new Fader(); this.addChildAt(this._fader, 2); this._fader.addEventListener(Fader.COMPLETE, onFadeInCompleteHandler, false, 0, true); this._fader.fadeIn(); } private function onQuitSubmitExit(_arg1:Event):void{ var _local2:String; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.afterLevelCleanup(); this.afterLevelSaveData(); _local2 = (_screen as LevelManager).levelWeather.concat(); (_screen as LevelManager).levelWeather = null; this.quitSubmit(_local2); }; if (Config.LANGUAGE == Config.LANGUAGE_RUS){ _local2 = (_screen as LevelManager).levelWeather.concat(); (_screen as LevelManager).levelWeather = null; this.quitSubmit(_local2); }; } private function picasoLogoCompleteHandler(_arg1:Event):void{ _screen.removeEventListener(PicasoLogoLite.ON_COMPLETE, picasoLogoCompleteHandler); loadMenu(); _whiteFader = new Sprite(); _whiteFader.graphics.beginFill(0xFFFFFF, 1); _whiteFader.graphics.drawRect(0, 0, Config.SCREEN_WIDTH, Config.SCREEN_HEIGHT); _whiteFader.graphics.endFill(); _whiteFader.mouseEnabled = false; _whiteFader.mouseChildren = false; this.addChild(_whiteFader); this.addEventListener(Event.ENTER_FRAME, whiteFaderHandler, false, 0, true); } private function loadCredits():void{ this.logo.visible = true; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = true; }; this._soundPanel.visible = true; this.backGround.visible = true; this._contactUs.visible = true; clearScreen(); _screen = new CreditsClass(); _screen.x = (Config.SCREEN_WIDTH / 2); _screen.y = (Config.SCREEN_HEIGHT / 2); addChildAt(_screen, 1); this.prevScreenType = CREDITS_SCREEN; this.addEventListener(Config.EVENT_CREDITS_CLOSE, helpCloseHandler); } private function onIntroWhiteEnd(_arg1:Event):void{ removeEventListener(IntroWhite.INTRO_COMPLETE, onIntroWhiteEnd); if (this.returnToMap){ this.loadMap(); } else { this.loadLevel(); }; } private function levelCloseToMenuHandler(_arg1:Event):void{ this.afterLevelCleanup(); this.afterLevelSaveData(); loadMenu(); } private function onFadeOutCompleteHandler(_arg1:Event):void{ this._fader.removeEventListener(Fader.COMPLETE, onFadeOutCompleteHandler); this.removeChild(this._fader); this._fader = null; } public function init():void{ var _local1:String; var _local2:Number; var _local3:Number; var _local4:String; var _local5:Number; var _local6:Number; var _local7:int; var _local8:Object; var _local9:Array; var _local10:Array; _local1 = this.loaderInfo.url; _local2 = (_local1.indexOf("://") + 3); _local3 = _local1.indexOf("/", _local2); _local4 = _local1.substring(_local2, _local3); _local5 = (_local4.lastIndexOf(".") - 1); _local6 = (_local4.lastIndexOf(".", _local5) + 1); _local4 = _local4.substring(_local6, _local4.length); stage.frameRate = Config.ENGINE_FRAMERATE; _levels = []; _isLevelOpened = []; _local7 = 0; while (_local7 < Config.LEVELS_TOTAL) { _levels.push(0); _isLevelOpened.push(false); _local7++; }; this.sharedObject = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (this.sharedObject.size == 0){ this.sharedObject.data.levels = {easy:_levels.slice(), normal:_levels.slice(), hard:_levels.slice()}; this.sharedObject.data.isLevelOpened = {easy:_isLevelOpened.slice(), normal:_isLevelOpened.slice(), hard:_isLevelOpened.slice()}; this.sharedObject.data.name = Config.DEFAULT_PLAYER_NAME; this.sharedObject.data.intro = _showIntro; this.sharedObject.data.win = _showWin; this.sharedObject.data.passedTutorials = [false, false, false, false, false]; this.sharedObject.data.introducedHeroes = []; this.sharedObject.data.easy = false; this.sharedObject.data.normal = false; this.sharedObject.data.hard = false; this.sharedObject.data.nameIsEntered = false; Config.easyLevels = this.sharedObject.data.levels.easy; Config.normalLevels = this.sharedObject.data.levels.normal; } else { if (((this.sharedObject.data.levels) && ((this.sharedObject.data.levels is Array)))){ this.sharedObject.data.levels = {easy:_levels.slice(), normal:this.sharedObject.data.levels, hard:_levels.slice()}; this.sharedObject.data.nameIsEntered = true; _local8 = this.sharedObject.data.solutions[0]; if (_local8){ _local9 = _local8["particles"]; if (_local9){ _local7 = 0; while (_local7 < _local9.length) { _local9[_local7].py = (_local9[_local7].py + Config.GRID_HEIGHT); _local7++; }; _local9 = null; }; _local8 = null; }; _local8 = this.sharedObject.data.solutions[2]; if (_local8){ _local9 = _local8["particles"]; if (_local9){ _local7 = 0; while (_local7 < _local9.length) { _local9[_local7].py = (_local9[_local7].py + (2 * Config.GRID_HEIGHT)); _local7++; }; _local9 = null; }; _local8 = null; }; if (((this.sharedObject.data.passedTutorials) && ((this.sharedObject.data.passedTutorials is Array)))){ this.sharedObject.data.passedTutorials.push(false); this.sharedObject.data.passedTutorials.push(false); }; }; if (((this.sharedObject.data.isLevelOpened) && ((this.sharedObject.data.isLevelOpened is Array)))){ this.sharedObject.data.isLevelOpened = {easy:_isLevelOpened.slice(), normal:this.sharedObject.data.isLevelOpened, hard:_isLevelOpened.slice()}; }; if ((((this.sharedObject.data.name == null)) || (!((this.sharedObject.data.name is String))))){ this.sharedObject.data.name = Config.DEFAULT_PLAYER_NAME; } else { if ((this.sharedObject.data.name is String)){ this.playerName = this.sharedObject.data.name; }; }; if ((((this.sharedObject.data.intro == null)) || (!((this.sharedObject.data.intro is Boolean))))){ this.sharedObject.data.intro = _showIntro; } else { (this.sharedObject.data.intro is Boolean); }; _showIntro = this.sharedObject.data.intro; if ((((this.sharedObject.data.win == null)) || (!((this.sharedObject.data.win is Boolean))))){ this.sharedObject.data.win = _showWin; } else { (this.sharedObject.data.win is Boolean); }; _showWin = this.sharedObject.data.win; if ((((this.sharedObject.data.passedTutorials == null)) || (!((this.sharedObject.data.passedTutorials is Array))))){ this.sharedObject.data.passedTutorials = [false, false, false, false, false]; }; if (this.sharedObject.data.introducedHeroes == null){ this.sharedObject.data.introducedHeroes = []; }; if (!this.sharedObject.data.easy){ this.sharedObject.data.easy = false; }; if (!this.sharedObject.data.normal){ this.sharedObject.data.normal = false; }; if (!this.sharedObject.data.hard){ this.sharedObject.data.hard = false; }; if (((this.sharedObject.data.solutions) && ((this.sharedObject.data.solutions is Array)))){ _local10 = this.sharedObject.data.solutions; this.sharedObject.data.solutions = {easy:[], normal:_local10, hard:[]}; this.sharedObject.data.normal = true; }; Config.easyLevels = this.sharedObject.data.levels.easy; Config.normalLevels = this.sharedObject.data.levels.normal; }; this.sharedObject.flush(); _sounds = true; _music = true; _soundPanel = new SoundPanel(); _soundPanel.x = Config.SCREEN_WIDTH; _soundPanel.y = Config.SCREEN_HEIGHT; addChildAt(_soundPanel, 0); _soundPanel.qualityButton.setLetter(); this.addEventListener(Config.EVENT_SOUNDS, soundsHandler, false, 0, true); this.addEventListener(Config.EVENT_MUSIC, musicHandler, false, 0, true); _contactUs = new ContactUsButton(); _contactUs.x = 46.7; _contactUs.y = 445.4; this.addChildAt(_contactUs, 0); _contactUs.addEventListener(MouseEvent.CLICK, loadContactUs, false, 0, true); _contactUs.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); _contactUs.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.logo = new OurLogo(); this.logo.x = Config.SCREEN_WIDTH; this.logo.y = 0; this.addChild(this.logo); if (Config.VIRAL){ this.logo.addEventListener(MouseEvent.CLICK, navigateToPicasogames, false, 0, true); this.logo.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.logo.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS = new TheirLogo(); this.logoCS.x = 0; this.logoCS.y = 0; this.addChild(this.logoCS); if (Config.VIRAL){ this.logoCS.addEventListener(MouseEvent.CLICK, navigateToCS, false, 0, true); this.logoCS.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.logoCS.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; }; _cursor = new Cursor(); _cursor.mouseEnabled = false; stage.addChild(_cursor); Mouse.hide(); _cursor.x = this.mouseX; _cursor.y = this.mouseY; stage.addEventListener(MouseEvent.MOUSE_MOVE, redrawCursor, false, 0, true); addEventListener(Config.EVENT_MOUSE_OVER, mouseOverHandler, false, 0, true); addEventListener(Config.EVENT_MOUSE_OUT, mouseOutHandler, false, 0, true); addEventListener(Config.EVENT_MOUSE_DRAG, mouseDragHandler, false, 0, true); addEventListener(Config.EVENT_MOUSE_HIDE, mouseHideHandler, false, 0, true); addEventListener(Config.EVENT_MOUSE_SHOW, mouseShowHandler, false, 0, true); addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); this.backGround = new BlueSky(); this.backGround.scaleX = (Config.SCREEN_WIDTH / this.backGround.width); this.addChildAt(this.backGround, 0); this.addEventListener(Config.EVENT_LEVEL_START_LOADING, onLevelStartLoading, false, 0, true); this.addEventListener(Config.EVENT_LEVEL_LOADED, onLevelLoaded, false, 0, true); loadMenu(); } private function onMochiLoaded(_arg1:Event):void{ this.removeEventListener(Config.EVENT_MOCHI_AD_LOADED, onMochiLoaded); this.removeChild(this.loadingAdText); this.loadingAdText = null; } private function testerPopUpClosed(_arg1:Event):void{ if ((_screen is MapClass)){ _screen.putLevelsButtons(); }; if ((((_screen is LevelManager)) && (_screen.paused))){ _screen.pause(); }; if (_fader == null){ return; }; this._fader.addEventListener(Fader.COMPLETE, onFadeOutCompleteHandler, false, 0, true); this._fader.fadeOut(); } private function onCreditsHandler(_arg1:Event):void{ this.afterMenuCleanup(); loadCredits(); GAManager.trackPage("/credits-pressed"); } private function clearScreen():void{ if (_screen == null){ return; }; _cursor.type = Config.MOUSE_TYPE_NORMAL; _screen.cleanup(); removeChild(_screen); _screen = null; } private function loadIntro():void{ clearScreen(); this._soundPanel.visible = true; _screen = new IntroClass(); addChildAt(_screen, 1); addEventListener(Config.EVENT_INTRO_CLOSE, introCloseHandler); } private function navigateToCS(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(Config.CS_URL), "_blank"); GAManager.trackPage("/go-to-candystand-from-logo"); } private function quitSubmit(_arg1:String="weatherday"):void{ var _local2:String; var _local3:String; var _local4:String; var _local5:URLVariables; var _local6:URLRequest; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.clearScreen(); this.logo.visible = false; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = false; }; this._soundPanel.visible = false; this.backGround.visible = false; this._contactUs.visible = false; _screen = new LoaderScreen(_arg1, LoaderScreen.TYPE_REDIRECTING); this.addChildAt(_screen, 1); GAManager.trackPage("/quit-submit-pressed"); if (!Config.VIRAL){ Game.endGame(); Game.score = this.score; Game.submitScore(); } else { _local2 = ((("name=" + this.playerName) + "&score=") + this.score); _local3 = MD5.hex_md5((_local2 + Config.SECRET_WORD)); _local4 = ((("hash=" + _local3) + "&") + _local2); _local5 = new URLVariables(_local4); _local6 = new URLRequest(Config.LEADERBOARD_URL); _local6.method = URLRequestMethod.POST; _local6.data = _local5; navigateToURL(_local6, "_self"); }; }; if (Config.LANGUAGE == Config.LANGUAGE_RUS){ GAManager.trackPage("/quit-submit-pressed"); if (!Config.VIRAL){ PlayItManager.submitScore(this.score); }; }; } private function loadWhiteIntro(_arg1:Boolean=false):void{ this.logo.visible = false; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = false; }; this._soundPanel.visible = true; this.backGround.visible = true; this._contactUs.visible = false; clearScreen(); _showIntro = false; this.sharedObject.data.intro = _showIntro; this.sharedObject.flush(); this.returnToMap = _arg1; _screen = new IntroWhite(); (_screen as IntroWhite).x = (Config.SCREEN_WIDTH / 2); (_screen as IntroWhite).y = (Config.SCREEN_HEIGHT / 2); addChildAt(_screen, 1); addEventListener(IntroWhite.INTRO_COMPLETE, onIntroWhiteEnd); } private function onLevelLoaded(_arg1:Event):void{ _soundPanel.visible = true; } private function loadMenu():void{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logo.visible = true; this.logo.x = 535; this.logo.y = 38.2; } else { this.logo.visible = true; this.logo.x = 415; this.logo.y = 20.4; }; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = true; this.logoCS.x = 81.2; this.logoCS.y = 37.5; }; this._soundPanel.visible = true; this.backGround.visible = true; this._contactUs.visible = true; clearScreen(); _screen = new MenuClass(); addChildAt(_screen, 1); this.prevScreenType = MENU_SCREEN; if (!SoundManager.isSoundPlaying(SoundData.MAIN_THEME)){ SoundData.MAIN_THEME.play(); }; addEventListener(Config.EVENT_ON_PLAY, onPlayHandler, false, 0, true); addEventListener(Config.EVENT_ON_HELP, onHelpHandler, false, 0, true); addEventListener(Config.EVENT_ON_CREDITS, onCreditsHandler, false, 0, true); addEventListener(Config.EVENT_ON_QUIT, onQuitSubmitScoreHandler, false, 0, true); addEventListener(Config.EVENT_PLAY_EASY, onEasyHandler, false, 0, true); addEventListener(Config.EVENT_PLAY_NORMAL, onNormalHandler, false, 0, true); addEventListener(Config.EVENT_PLAY_HARD, onHardHandler, false, 0, true); } private function soundsHandler(_arg1:Event):void{ if (_sounds){ SoundManager.mute(SoundData.SOUND_CHANNELS); _sounds = false; GAManager.trackPage("/sounds-muted"); } else { SoundManager.unmute(SoundData.SOUND_CHANNELS); _sounds = true; GAManager.trackPage("/sounds-unmuted"); }; } private function loadHelp():void{ this.logo.visible = true; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = true; }; this._soundPanel.visible = true; this._contactUs.visible = true; clearScreen(); _screen = new HelpClass(); _screen.x = (Config.SCREEN_WIDTH / 2); _screen.y = (Config.SCREEN_HEIGHT / 2); addChildAt(_screen, 1); this.prevScreenType = HELP_SCREEN; this.addEventListener(Config.EVENT_HELP_CLOSE, helpCloseHandler); } private function onHelpHandler(_arg1:Event):void{ this.afterMenuCleanup(); loadHelp(); GAManager.trackPage("/help-pressed"); } private function musicHandler(_arg1:Event):void{ if (_music){ SoundManager.mute(SoundData.MUSIC_CHANNELS); _music = false; GAManager.trackPage("/music-muted"); } else { SoundManager.unmute(SoundData.MUSIC_CHANNELS); _music = true; GAManager.trackPage("/music-unmuted"); }; } private function onEasyHandler(_arg1:Event):void{ var _local2:int; this.afterMenuCleanup(); Config.setDifficulty(Config.DIFFICULTY_EASY); this.currentDifficulty = Config.DIFFICULTY_EASY; if (_newGame){ _levels = []; _isLevelOpened = []; _local2 = 0; while (_local2 < Config.LEVELS_TOTAL) { _levels.push(0); _isLevelOpened.push(false); _local2++; }; this.sharedObject.data.levels.easy = _levels; this.sharedObject.data.isLevelOpened.easy = _isLevelOpened; if (this.sharedObject.data.solutions){ this.sharedObject.data.solutions.easy = new Array(Config.LEVELS_TOTAL); }; this.sharedObject.flush(); } else { _levels = this.sharedObject.data.levels.easy; _isLevelOpened = this.sharedObject.data.isLevelOpened.easy; _local2 = 0; while (_local2 < Config.LEVELS_TOTAL) { if (_levels[_local2] > 0){ _isLevelOpened[_local2] = true; }; _local2++; }; this.sharedObject.data.isLevelOpened.easy = _isLevelOpened; this.sharedObject.flush(); }; this.sharedObject.data["easy"] = true; if (_newGame){ GAManager.trackPage("/play-easy-pressed"); _newGame = false; if (_showIntro){ this.loadWhiteIntro(); } else { this.loadLevel(); }; } else { if (_submitScore){ _submitScore = false; this.quitSubmit(); } else { GAManager.trackPage("/continue-easy-pressed"); this.loadMap(); }; }; } private function mouseDragHandler(_arg1:Event):void{ _cursor.type = Config.MOUSE_TYPE_DRAG; } private function mapCloseHandler(_arg1:Event):void{ this.afterMapCleanup(); currentPage = (_screen as MapClass).page; loadMenu(); } private function mouseShowHandler(_arg1:Event):void{ _cursor.visible = true; } private function loadSplashScreen():void{ clearScreen(); this.logo.visible = false; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.logoCS.visible = false; }; this._soundPanel.visible = false; this.backGround.visible = false; this._contactUs.visible = false; _screen = new PicasoLogoLite(); _screen.x = (Config.SCREEN_WIDTH / 2); _screen.y = (Config.SCREEN_HEIGHT / 2); _screen.addEventListener(PicasoLogoLite.ON_COMPLETE, picasoLogoCompleteHandler, false, 0, true); this.addChildAt(_screen, 1); _screen.init(); } private function whiteFaderHandler(_arg1:Event):void{ if (_whiteFader != null){ if (_whiteFader.alpha > 0.01){ _whiteFader.alpha = (_whiteFader.alpha - (_whiteFader.alpha / 10)); } else { this.removeEventListener(Event.ENTER_FRAME, whiteFaderHandler); this.removeChild(_whiteFader); _whiteFader = null; }; }; } private function mouseHideHandler(_arg1:Event):void{ _cursor.visible = false; } private function closeContactUsScreen(_arg1:Event):void{ _screen.removeEventListener(ContactUsScreen.ON_BACK, closeContactUsScreen); _screen.removeEventListener(Event.ENTER_FRAME, checkCursor); if (this.prevScreenType == CREDITS_SCREEN){ loadCredits(); } else { if (this.prevScreenType == HELP_SCREEN){ loadHelp(); } else { loadMenu(); }; }; } private function levelCloseHandler(_arg1:Event):void{ this.afterLevelCleanup(); this.afterLevelSaveData(); this.loadMap(); } private function afterLevelSaveData():void{ var _local1:Number; this.playerName = (_screen as LevelManager).playerName.concat(); (_screen as LevelManager).playerName = null; _local1 = (_screen as LevelManager).winBudget; if (_levels[(_currentLevel - 1)] < _local1){ _levels[(_currentLevel - 1)] = _local1; }; _isLevelOpened[(_currentLevel - 1)] = true; _screen.saveLevelSolution(); this.sharedObject.data.name = this.playerName; if (this.currentDifficulty == Config.DIFFICULTY_EASY){ this.sharedObject.data.levels.easy = _levels; this.sharedObject.data.isLevelOpened.easy[(_currentLevel - 1)] = true; Config.easyLevels = _levels; }; if (this.currentDifficulty == Config.DIFFICULTY_NORMAL){ this.sharedObject.data.levels.normal = _levels; this.sharedObject.data.isLevelOpened.normal[(_currentLevel - 1)] = true; Config.normalLevels = _levels; }; if (this.currentDifficulty == Config.DIFFICULTY_HARD){ this.sharedObject.data.levels.hard = _levels; this.sharedObject.data.isLevelOpened.hard[(_currentLevel - 1)] = true; }; this.sharedObject.flush(); } private function mouseOverHandler(_arg1:Event):void{ if (_cursor.type == Config.MOUSE_TYPE_DRAG){ prevMouseTypes.push(Config.MOUSE_TYPE_HAND); } else { _cursor.type = Config.MOUSE_TYPE_HAND; }; } private function creditsCloseHandler(_arg1:Event):void{ this.removeEventListener(Config.EVENT_CREDITS_CLOSE, helpCloseHandler); loadMenu(); } private function outroViralClose(_arg1:Event):void{ _screen.removeEventListener(OutroViral.ON_OK, outroClose); loadMap(); } private function onQuitSubmitScoreHandler(_arg1:Event):void{ _newGame = false; _submitScore = true; } private function onLevelStartLoading(_arg1:Event):void{ _soundPanel.visible = false; } } }//package core
Section 107
//Config (core.Config) package core { import flash.net.*; public class Config { public static const EVENT_MUSIC:String = "music"; public static const MATERIAL_STEEL_COST:Number = 200; public static const MATERIAL_ROPE_BLOCK_LENGTH:Number = 30; public static const MATERIAL_DECK_LINE_THICKNESS:Number = 1; public static const PROTAGONIST_BLINK_NAME:String = "BLINK"; public static const PROTAGONIST_JUMP3_FRAME:Number = 9; public static const SCREEN_WIDTH:Number = 640; public static const PROTAGONIST_SAD_NAME:String = "SAD"; public static const MATERIAL_ROPE_RECT_HEIGHT:Number = 5; public static const ENGINE_CONSTRAINT_CYCLES:Number = 0; public static const EVENT_SOUNDS_STEEL_CREAK:String = "playsteelcreak"; public static const HUD_DECK_COST:String = "$400"; public static const GRID_HEIGHT:Number = 20; public static const WATER3_SPEED:Number = 0.5; public static const PROTAGONIST_TURN_TO_RIGHT_FRAME:Number = 4; public static const PROTAGONIST_BLINK_FRAME:Number = 2; public static const EVENT_ZOOM_IN:String = "zoomIn"; public static const PROTAGONIST_TURN_TO_RIGHT_NAME:String = "TURN_TO_RIGHT"; public static const EVENT_BALOON_TEXT_COMPLETE:String = "baloonTextComplete"; public static const MODE_NONE:Number = 0; public static const SCREEN_HEIGHT:Number = 480; public static const POINT_MASS:Number = 0.1; public static const PROTAGONIST_JUMP5_NAME:String = "JUMP5"; public static const LEVELS_STORY_TOTAL:int = 20; public static const EVENT_POPUPBUTTON_MAP:String = "popupbuttonmap"; public static const EVENT_WIN:String = "win"; public static const EVENT_BALOON_RESPONSE_NEXT:String = "baloonResponseNext"; public static const MATERIAL_DECK_MAX_LENGTH:Number = 120; public static const PROTAGONIST_BLINK_SAD_FRAME:Number = 13; public static const EVENT_SOUNDS_WATER_SPLASH:String = "playwatersplash"; public static const EVENT_BALOON_RESPONSE_NO:String = "baloonResponseNo"; public static const MATERIAL_DECK_COST:Number = 300; public static const EVENT_SCROLL_DOWN:String = "scrolldown"; public static const MATERIAL_STEEL:Number = 2; public static const MATERIAL_ROPE_MAX_LENGTH:Number = 120; public static const MATERIAL_ROPE_LINE_THICKNESS:Number = 5; public static const PROTAGONIST_TURN_TO_NORMAL_FRAME:Number = 6; public static const EVENT_SOUNDS_DECK_CREAK:String = "playwoodcreak"; public static const EVENT_BALOON_RESPONSE_YES:String = "baloonResponseYes"; public static const PROTAGONIST_BECOME_SAD_FRAME:Number = 12; public static const EVENT_EDIT:String = "building"; public static const MATERIAL_STEEL_FILL_COLOR:uint = 0x888888; public static const EVENT_SOUNDS_STEEL_BREAK:String = "playsteelbreak"; public static const MODE_LINKING_STRING:String = "Linking..."; public static const PROTAGONIST_STATE_SWIMMING:Number = 5; public static const EVENT_CREDITS_CLOSE:String = "closeCredits"; public static const EVENT_ON_PLAY:String = "onPlay"; public static const MATERIAL_DECK:Number = 1; public static const PROTAGONIST_JUMP2_FRAME:Number = 8; public static const MOUSE_TYPE_NORMAL:int = 1; public static const SCROLLING_ITERATION:Number = 10; public static const PROTAGONIST_STATE_FINISHED_SAD:Number = 4; public static const MATERIAL_FIXED_END_LIMIT:Number = 0.05; public static const EVENT_TIP_STRESS:String = "eventTipStress"; public static const BC_ON_CS_URL:String = "http://www.candystand.com/play/bridgecraft?utm_source=Bridgecraft&utm_medium=link&utm_campaign=bridgecraft-vrl"; public static const EVENT_LEVEL_WIN:String = "levelwin"; public static const EVENT_TIP_RESET:String = "eventTipReset"; public static const EVENT_ZOOM_OUT:String = "zoomOut"; public static const EVENT_ON_HELP:String = "onHelp"; public static const MATERIAL_ROPE_STRING:String = "Rope"; public static const EVENT_MOUSE_OUT:String = "mouseoutbutton"; public static const EVENT_MOCHI_AD_ENDS:String = "mochiAdEnds"; public static const PROTAGONISTS_EYES_SPEED:Number = 0.7; public static const EVENT_SOUNDS_MUSIC:String = "playmusic"; public static const MESSAGE_URL:String = "http://www.bridgecraftworld.com/send-message/"; public static const PROTAGONIST_BLINK_SAD_NAME:String = "BLINK_SAD"; public static const EVENT_ON_CREDITS:String = "oncredits"; public static const CS_URL:String = "http://www.candystand.com"; public static const WATER2_SPEED:Number = 1; public static const LANGUAGE_RUS:int = 1; public static const EVENT_SHOW_OUTRO:String = "show_outro"; public static const ZOOM_IN_ITERATION:Number = 1.1; public static const MATERIAL_ROPE:Number = 3; public static const PROTAGONIST_SAD_FRAME:Number = 14; public static const GA_ACCOUNT_VIRAL:String = ""; public static const EVENT_SOUNDS_DECK_BREAK:String = "playdeckbreak"; public static const HUD_MODE_X:Number = 550; public static const EVENT_BALOON_SHOWED_UP:String = "baloonShowedUp"; public static const MATERIAL_DECK_COLLIDABLE:Boolean = true; public static const EVENT_DO_NOT_NEED_HELP:String = "dontshowmehelpagain"; public static const PROTAGONIST_RADIOUS:Number = 18; public static const BCW_STINGER_URL:String = "http://www.bridgecraftworld.com/stinger.swf"; public static const MATERIAL_ROPE_COLLIDABLE:Boolean = false; public static const HUD_MODE_Y:Number = 460; public static const EVENT_LEVEL_CLOSE_AND_QUIT:String = "levelcloseandquitthen"; public static const PROTAGONIST_STAND_FRAME:Number = 1; public static const MATERIAL_DECK_RECT_SCALE:Number = 0.97; public static const MATERIAL_DECK_STRING:String = "Deck"; public static const MATERIAL_STEEL_STRING:String = "Steel"; public static const EVENT_MOUSE_SHOW:String = "mouseshow"; public static const MODE_BUILDING_STRING:String = "Building"; public static const MODE_EMULATION:Number = 2; public static const EVENT_TIP_STEEL:String = "eventTipSteel"; public static const MATERIAL_DECK_RECT_HEIGHT:Number = 15; public static const MATERIAL_ROPE_RECT_SCALE:Number = 1; public static const EVENT_SOUNDS_DECK_CRUNCH:String = "playdeckcrunch"; public static const EVENT_SHOW_INTRO:String = "show_intro"; public static const HUD_STRESS_TEXT:String = "Stress"; public static const LEADERBOARD_URL:String = "http://www.bridgecraftworld.com/send-score/"; public static const MATERIAL_DECK_LINE_COLOR:uint = 0; public static const MOUSE_TYPE_TARGET:int = 2; public static const MATERIAL_STEEL_MAX_LENGTH:Number = 120; public static const POPUP_WIN:Number = 1; public static const EVENT_INPUT_NAME_ENTERED_NAME:String = "enteredName"; public static const EVENT_MAP_CLOSE:String = "on_close_map"; public static const TIP_TIMER_COUNT:int = 70; public static const HUD_ROPE_COST:String = "$200"; public static const EVENT_TIP_PAUSE:String = "eventTipPause"; public static const PROTAGONIST_WAVE_NAME:String = "WAVE"; public static const HUD_DECK_TEXT:String = "Deck"; public static const PROTAGONIST_JUMP1_FRAME:Number = 7; public static const MATERIAL_ROPE_LINE_COLOR:uint = 0; public static const PROTAGONIST_NAME:String = "chubrik"; public static const WATER1_SPEED:Number = 1.5; public static const EVENT_FOUND_PIN_POINT:String = "foundPinPoint"; public static const BCW_URL:String = "http://bridgecraftworld.com"; public static const EVENT_SCROLL_UP:String = "scrollup"; public static const EVENT_LEVEL_NEXT:String = "levelwinnextGO"; public static const PROTAGONIST_STATE_RUNNING:Number = 2; public static const MODE_BUILDING:Number = 1; public static const PROTAGONIST_TURN_TO_NORMAL_NAME:String = "TURN_TO_NORMAL"; public static const HUD_STOP_TEXT:String = "Stop"; public static const MATERIAL_ROPE_COST:Number = 100; public static const DIFFICULTY_NORMAL:int = 1; public static const PROTAGONIST_JUMP1_NAME:String = "JUMP1"; public static const MATERIAL_STEEL_LINE_THICKNESS:Number = 15; public static const EVENT_SOUNDS_MUTE:String = "soundsmute"; public static const SCROLLING_BORDER_WIDTH:Number = 20; public static const DIFFICULTY_EASY:int = 0; public static const EVENT_PLAY_NORMAL:String = "eventPlayNormal"; public static const EVENT_TIP_DECK:String = "eventTipDeck"; public static const MATERIAL_STEEL_COLLIDABLE:Boolean = false; public static const PROTAGONIST_STATE_BLOCKING:Number = 6; public static const EVENT_SOUNDS_ROPE_CREAK:String = "playropecreak"; private static const _LEVELS_TOTAL:int = 70; public static const ENGINE_FRAMERATE:Number = 35; public static const MATERIAL_STEEL_RECT_SCALE:Number = 0.97; public static const EVENT_START:String = "emulation"; public static const EVENT_HELP_CLOSE:String = "helpClosed"; public static const HUD_UNDO_TEXT:String = "Undo"; public static const POINT_RADIUS:Number = 7; public static const HUD_STEEL_COST:String = "$300"; public static const EVENT_TIP_UNDO:String = "eventTipUndo"; public static const MATERIAL_STEEL_RECT_HEIGHT:Number = 10; public static const EVENT_POPUP_BUTTON_OK:String = "popUpOnOk"; public static const EVENT_TIP_ROPE:String = "eventTipRope"; public static const EVENT_LEVEL_CLOSE_TO_MENU:String = "levelclosetomenu"; public static const EVENT_FINISH_ACTION:String = "finishaction"; public static const MAX_OPENED_LEVELS:int = 5; public static const EVENT_CONNECT_POINTS:String = "onConnectPoints"; public static const PROTAGONIST_STATE_WAITING:Number = 1; public static const MATERIAL_STEEL_LINE_COLOR:uint = 0; public static const EVENT_TIP_BUDGET:String = "eventTipBudget"; public static const MATERIAL_ROPE_POINT_ELASTICITY:Number = 0.5; public static const HUD_BUDGET_TEXT:String = "Budget"; public static const PROTAGONIST_RUN_NAME:String = "RUN"; public static const PROTAGONIST_JUMP2_NAME:String = "JUMP2"; public static const EVENT_READY_TO_RUN:String = "readytorun"; public static const ZOOM_DIVIDER:Number = 30; public static const SCROLLING_DIVIDER:Number = 5; public static const PROTAGONIST_JUMP5_FRAME:Number = 11; public static const MODE_EMULATION_STRING:String = "Emulation"; public static const EVENT_ON_STORY:String = "onStory"; public static const EVENT_SOUNDS_STEP:String = "playstep"; public static const HUD_RESET_TEXT:String = "Reset"; public static const EVENT_PLAY_EASY:String = "eventPlayEasy"; public static const EVENT_SOUNDS:String = "sounds"; public static const ACTION_REMOVE:String = "remove"; public static const MATERIAL_ROPE_POINT_MASS:Number = 0.01; public static const SHARED_OBJECT_TITLE:String = "bridgecraft_v1"; public static const MATERIAL_ROPE_LENGTH_MODIFIER:Number = 0.8; public static const EVENT_ON_QUIT_NORMAL:String = "onQuitNormal"; public static const EVENT_MOCHI_AD_SKIPPED:String = "mochiAdSkipped"; public static const EVENT_SOUNDS_PROTAGONIST_SAD:String = "playprotagonistsad"; public static const EVENT_LEVEL_LOADED:String = "eventLevelLoaded"; public static const POPUP_LOSE:Number = 2; public static const MODE_LINKING:Number = 3; public static const DIFFICULTY_HARD:int = 2; public static const HUD_ROPE_TEXT:String = "Rope"; public static const PROTAGONIST_WAVE_FRAME:Number = 3; public static const EVENT_MUSIC_MUTE:String = "musicmute"; public static const EVENT_POPUPBUTTON_NEXT:String = "popupbuttonnext"; public static const EVENT_LEVEL_CLOSE:String = "levelclose"; public static const ACTION_ADD:String = "add"; public static const EVENT_STRESS:String = "stress"; public static const EVENT_RESET:String = "reset"; public static const PROTAGONIST_BECOME_SAD_NAME:String = "BECOME_SAD"; public static const EVENT_SOUNDS_START:String = "playstart"; public static const MOUSE_TYPE_HAND:int = 3; public static const EVENT_MOUSE_OVER:String = "mouseoverbutton"; public static const PROTAGONIST_JUMP3_NAME:String = "JUMP3"; public static const EVENT_ON_QUIT_EASY:String = "onQuitEasy"; public static const SECRET_WORD:String = "xz34hhd84"; public static const PROTAGONISTS_NUMBER:Number = 1; public static const EVENT_LEVEL_START_LOADING:String = "eventLevelStartLoading"; public static const LEVEL_RUNNING_ZONE:Number = 2; public static const EVENT_POPUPBUTTON_RETRY:String = "popupbuttonretry"; public static const EVENT_DECK:String = "deck"; public static const BC_ON_PLAYIT_URL:String = "http://playit.ru/rus/flash/single/35"; public static const PROTAGONIST_JUMP4_FRAME:Number = 10; public static const MATERIAL_ROPE_POINT_RADIUS:Number = 2; public static const EVENT_MAP_SUBMIT:String = "on_submit_map"; public static const PROTAGONIST_STATE_FINISHED_HAPPY:Number = 3; public static const LANGUAGE_ENG:int = 0; public static const GRID_WIDTH:Number = 20; public static const HUD_START_TEXT:String = "Start"; public static const EVENT_TIP_EDIT:String = "eventTipEdit"; private static const _LEVELS_TOTAL_VIRAL:int = 30; public static const LEVEL_WAITING_ZONE:Number = 1; public static const LEVEL_FINISH_ZONE:Number = 3; public static const EVENT_MAP_LEVEL_SELECT:String = "on_level_select"; public static const EVENT_COMPLETE_GAME_POPUP:String = "showingCompleteGamePopUp"; public static const EVENT_HOME:String = "home"; public static const WATER4_SPEED:Number = 0.2; public static const EVENT_MOCHI_AD_LOADED:String = "mochiAdLoaded"; public static const ZOOM_OUT_ITERATION:Number = 0.9; public static const EVENT_UNDO:String = "undo"; public static const EVENT_PLAY_HARD:String = "eventPlayHard"; public static const EVENT_MOUSE_DRAG:String = "mousedrag"; public static const EVENT_ROPE:String = "rope"; public static const MODE_RESET:Number = -1; public static const EVENT_MOUSE_HIDE:String = "mousehide"; public static const EVENT_STEEL:String = "steel"; public static const GA_ACCOUNT:String = "UA-4255440-1"; public static const HUD_STEEL_TEXT:String = "Steel"; public static const EVENT_SCROLL_RIGHT:String = "scrollright"; public static const EVENT_SOUNDS_PROTAGONIST_HAPPY:String = "playchubrickshappy"; public static const ENGINE_DT:Number = 0.25; public static const EVENT_MOCHI_AD_FAILED:String = "mochiAdFailed"; public static const HUD_MATERIAL_Y:Number = 460; public static const ENGINE_CONSTRAINT_COLLISION_CYCLES:Number = 2; public static const PROTAGONIST_JUMP4_NAME:String = "JUMP4"; public static const EVENT_MOCHI_AD_STARTS:String = "mochiAdStarts"; public static const MATERIAL_DECK_FILL_COLOR:uint = 1052752; public static const PROTAGONIST_STAND_NAME:String = "STAND"; public static const MATERIAL_ROPE_FILL_COLOR:uint = 170; public static const MOUSE_TYPE_DRAG:int = 4; public static const EVENT_INTRO_CLOSE:String = "on_skip_or_end_intro"; public static const HUD_MATERIAL_X:Number = 5; public static const ENGINE_DAMPING:Number = 0.97; public static const EVENT_ON_QUIT:String = "onQuit"; public static const POINT_ELASTICITY:Number = 0.3; public static const EVENT_SOUNDS_BUTTON_CLICK:String = "playclick"; public static const EVENT_SCROLL_LEFT:String = "scrollleft"; public static const PROTAGONIST_RUN_FRAME:Number = 5; public static const EVENT_TIP_START:String = "eventTipStart"; public static var easyLevels:Array; private static var loader:URLLoader; private static var gameCurrentDifficulty:int; private static var _LANGUAGE:int = 0; private static var _MATERIAL_OVERLOAD_CHECKS:int = 3; private static var _WALKTHROUGH_URL:String = "http://www.candystand.com/play/bridgecraft?utm_source=Bridgecraft&utm_medium=link&utm_campaign=bridgecraft-walkthrough"; public static var normalLevels:Array; private static var _DEFAULT_PLAYER_NAME:String; private static var _MATERIAL_STEEL_MULTIPLIER:Number = 0.03; private static var _PROTAGONISTS_SPEED:Number = 0.07; private static var _MATERIAL_STEEL_STIFFNESS:Number = 0.75; private static var _MATERIAL_DECK_STIFFNESS:Number = 0.97; private static var _MATERIAL_ROPE_STIFFNESS:Number = 0.75; private static var _PROTAGONISTS_MASS:Number = 1; private static var _CURRENT_LEVEL:int = -1; private static var _MATERIAL_DECK_MULTIPLIER:Number = 0.02; private static var _VIRAL:Boolean = false; private static var _MATERIAL_ROPE_MULTIPLIER:Number = 0.5; private static var _currentDifficulty:int = -1; public static function get DEFAULT_PLAYER_NAME():String{ var _local1:String; if (Config.LANGUAGE == Config.LANGUAGE_RUS){ _local1 = "Игрок"; } else { _local1 = "Player"; }; return (_local1); } public static function get MATERIAL_ROPE_MULTIPLIER():Number{ return (_MATERIAL_ROPE_MULTIPLIER); } public static function set MATERIAL_ROPE_MULTIPLIER(_arg1:Number):void{ _MATERIAL_ROPE_MULTIPLIER = _arg1; } public static function set MATERIAL_ROPE_STIFFNESS(_arg1:Number):void{ _MATERIAL_ROPE_STIFFNESS = _arg1; } public static function get VIRAL():Boolean{ return (_VIRAL); } public static function get LEVELS_TOTAL():int{ return ((VIRAL) ? _LEVELS_TOTAL_VIRAL : _LEVELS_TOTAL); } public static function set CURRENT_DIFFICULTY(_arg1:int):void{ _currentDifficulty = _arg1; } public static function set MATERIAL_STEEL_STIFFNESS(_arg1:Number):void{ _MATERIAL_STEEL_STIFFNESS = _arg1; } public static function get MATERIAL_STEEL_MULTIPLIER():Number{ return (_MATERIAL_STEEL_MULTIPLIER); } public static function set VIRAL(_arg1:Boolean):void{ _VIRAL = _arg1; } public static function get CURRENT_LEVEL():int{ return (_CURRENT_LEVEL); } public static function get MATERIAL_DECK_STIFFNESS():Number{ return (_MATERIAL_DECK_STIFFNESS); } public static function get PROTAGONISTS_MASS():Number{ return (_PROTAGONISTS_MASS); } public static function get MATERIAL_OVERLOAD_CHECKS():int{ return (_MATERIAL_OVERLOAD_CHECKS); } public static function setDifficulty(_arg1:int=0):void{ if (_arg1 == DIFFICULTY_EASY){ PROTAGONISTS_MASS = 0.9; PROTAGONISTS_SPEED = 0.08; MATERIAL_OVERLOAD_CHECKS = 5; MATERIAL_DECK_MULTIPLIER = 0.05; MATERIAL_DECK_STIFFNESS = 0.95; MATERIAL_STEEL_MULTIPLIER = 0.3; MATERIAL_STEEL_STIFFNESS = 0.75; MATERIAL_ROPE_MULTIPLIER = 0.5; MATERIAL_ROPE_STIFFNESS = 0.75; CURRENT_DIFFICULTY = DIFFICULTY_EASY; }; if (_arg1 == DIFFICULTY_NORMAL){ PROTAGONISTS_MASS = 1; PROTAGONISTS_SPEED = 0.08; MATERIAL_OVERLOAD_CHECKS = 5; MATERIAL_DECK_MULTIPLIER = 0.02; MATERIAL_DECK_STIFFNESS = 0.97; MATERIAL_STEEL_MULTIPLIER = 0.3; MATERIAL_STEEL_STIFFNESS = 0.75; MATERIAL_ROPE_MULTIPLIER = 0.5; MATERIAL_ROPE_STIFFNESS = 0.75; CURRENT_DIFFICULTY = DIFFICULTY_NORMAL; }; } public static function set MATERIAL_STEEL_MULTIPLIER(_arg1:Number):void{ _MATERIAL_STEEL_MULTIPLIER = _arg1; } public static function set PROTAGONISTS_SPEED(_arg1:Number):void{ _PROTAGONISTS_SPEED = _arg1; } public static function set CURRENT_LEVEL(_arg1:int):void{ _CURRENT_LEVEL = _arg1; } public static function get MATERIAL_ROPE_STIFFNESS():Number{ return (_MATERIAL_ROPE_STIFFNESS); } public static function set MATERIAL_DECK_STIFFNESS(_arg1:Number):void{ _MATERIAL_DECK_STIFFNESS = _arg1; } public static function get CURRENT_DIFFICULTY():int{ return (_currentDifficulty); } public static function get MATERIAL_STEEL_STIFFNESS():Number{ return (_MATERIAL_STEEL_STIFFNESS); } public static function set LANGUAGE(_arg1:int):void{ if ((((_arg1 == LANGUAGE_RUS)) || ((_arg1 == LANGUAGE_ENG)))){ _LANGUAGE = _arg1; }; } public static function set PROTAGONISTS_MASS(_arg1:Number):void{ _PROTAGONISTS_MASS = _arg1; } public static function set MATERIAL_OVERLOAD_CHECKS(_arg1:int):void{ _MATERIAL_OVERLOAD_CHECKS = _arg1; } public static function get PROTAGONISTS_SPEED():Number{ return (_PROTAGONISTS_SPEED); } public static function get WALKTHROUGH_URL():String{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ return (_WALKTHROUGH_URL); }; return ("http://picasogames.com/games/bridgecraft/walkthrough"); } public static function get LANGUAGE():int{ return (_LANGUAGE); } public static function set MATERIAL_DECK_MULTIPLIER(_arg1:Number):void{ _MATERIAL_DECK_MULTIPLIER = _arg1; } public static function get MATERIAL_DECK_MULTIPLIER():Number{ return (_MATERIAL_DECK_MULTIPLIER); } } }//package core
Section 108
//ContactUsButton (core.ContactUsButton) package core { import flash.display.*; public class ContactUsButton extends SimpleButton { public function ContactUsButton():void{ } } }//package core
Section 109
//ContactUsScreen (core.ContactUsScreen) package core { import fl.controls.*; import flash.display.*; import flash.geom.*; import flash.events.*; import flash.net.*; import flash.ui.*; public dynamic class ContactUsScreen extends MovieClip { public var backBtn:SimpleButton; public var emailTI:TextInput; private var okButton:SimpleButton; private var button1:SimpleButton; public var btn2:SimpleButton; private var nameTextInput:TextInput; public var nameTI:TextInput; private var emailTextInput:TextInput; private var messageTextArea:TextArea; private var _overScrollBar:Boolean;// = false public var btn1:SimpleButton; public var sendBtn:SimpleButton; public var messageTA:TextArea; public var topicCB:ComboBox; private var button2:SimpleButton; private var topicComboBox:ComboBox; private var sendButton:SimpleButton; public var okBtn:SimpleButton; private var backButton:SimpleButton; public static const ON_SEND:String = "sendPressedInContactUsScreen"; public static const ON_BACK:String = "backPressedInContactUsScreen"; public function ContactUsScreen():void{ _overScrollBar = false; super(); this.stop(); this.nameTextInput = this["nameTI"]; this.nameTextInput.text = DEF_NAME; this.nameTextInput.maxChars = 50; this.nameTextInput.addEventListener(MouseEvent.CLICK, onNameActivated, false, 0, true); this.nameTextInput.addEventListener(MouseEvent.MOUSE_OVER, overName, false, 0, true); this.nameTextInput.addEventListener(MouseEvent.MOUSE_OUT, outName, false, 0, true); this.emailTextInput = this["emailTI"]; this.emailTextInput.text = DEF_EMAIL; this.emailTextInput.maxChars = 50; this.emailTextInput.addEventListener(MouseEvent.CLICK, onEmailActivated, false, 0, true); this.emailTextInput.addEventListener(MouseEvent.MOUSE_OVER, overEmail, false, 0, true); this.emailTextInput.addEventListener(MouseEvent.MOUSE_OUT, outEmail, false, 0, true); this.topicComboBox = this["topicCB"]; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.topicComboBox.addItem({label:"General Comments", value:1}); this.topicComboBox.addItem({label:"Game Support", value:2}); this.topicComboBox.addItem({label:"Development Inquiry", value:3}); this.topicComboBox.addItem({label:"Licensing Inquiry", value:4}); this.topicComboBox.addItem({label:"Other Business Opportunity", value:5}); } else { this.topicComboBox.addItem({label:"Ошибка в игре", value:1}); this.topicComboBox.addItem({label:"Техническая поддержка", value:2}); this.topicComboBox.addItem({label:"Идеи", value:3}); this.topicComboBox.addItem({label:"Сотрудничество", value:4}); this.topicComboBox.addItem({label:"Другое", value:5}); }; this.topicComboBox.addEventListener(MouseEvent.CLICK, onTopic, false, 0, true); this.messageTextArea = this["messageTA"]; this.messageTextArea.text = DEF_MSG; this.messageTextArea.maxChars = 1000; this.messageTextArea.addEventListener(MouseEvent.CLICK, onMessageActivated, false, 0, true); this.messageTextArea.addEventListener(MouseEvent.MOUSE_OVER, overMessage, false, 0, true); this.messageTextArea.addEventListener(MouseEvent.MOUSE_OUT, outMessage, false, 0, true); this.backButton = this["backBtn"]; this.backButton.addEventListener(MouseEvent.CLICK, onBackHandler, false, 0, true); this.backButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.backButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.sendButton = this["sendBtn"]; this.sendButton.transform.colorTransform = new ColorTransform(0.51, 0.51, 0.51, 1, 125, 125, 125); this.sendButton.enabled = false; this.okButton = this["okBtn"]; this.okButton.addEventListener(MouseEvent.CLICK, onBackHandler, false, 0, true); this.okButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.okButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.okButton.visible = false; this.button1 = this["btn1"]; this.button1.addEventListener(MouseEvent.CLICK, onButton1, false, 0, true); this.button1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.button1.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.button2 = this["btn2"]; this.button2.addEventListener(MouseEvent.CLICK, onButton2, false, 0, true); this.button2.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.button2.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); this.nameTextInput.tabEnabled = false; this.emailTextInput.tabEnabled = false; this.messageTextArea.tabEnabled = false; this.topicComboBox.tabEnabled = false; this.backButton.tabEnabled = false; this.sendButton.tabEnabled = false; this.okButton.tabEnabled = false; } private function outName(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); } private function onNameDeactivated(_arg1:MouseEvent=null):void{ if (this.nameTextInput.text.length == 0){ this.nameTextInput.text = DEF_NAME; }; } private function onBackHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(ON_BACK)); } public function get DEF_MSG():String{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ return ("Your message*"); }; if (Config.LANGUAGE == Config.LANGUAGE_RUS){ return ("Ваше сообщение*"); }; return ("No message"); } private function enterFrameHandler(_arg1:Event):void{ var _local2:Boolean; var _local3:Boolean; var _local4:Boolean; _local2 = (((this.nameTextInput.text.length > 0)) && (!((this.nameTextInput.text == DEF_NAME)))); _local3 = (((this.emailTextInput.text.length > 0)) && (!((this.emailTextInput.text == DEF_EMAIL)))); _local4 = (((this.messageTextArea.text.length > 0)) && (!((this.messageTextArea.text == DEF_MSG)))); if (((((((_local2) && (_local3))) && (_local4))) && (!(this.sendButton.enabled)))){ this.sendButton.addEventListener(MouseEvent.CLICK, onSendHandler, false, 0, true); this.sendButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.sendButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.sendButton.transform.colorTransform = new ColorTransform(); this.sendButton.enabled = true; } else { if (((!(((((_local2) && (_local3))) && (_local4)))) && (this.sendButton.enabled))){ this.sendButton.removeEventListener(MouseEvent.CLICK, onSendHandler); this.sendButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.sendButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.sendButton.transform.colorTransform = new ColorTransform(0.51, 0.51, 0.51, 1, 125, 125, 125); this.sendButton.enabled = false; }; }; if (((((this.messageTextArea.verticalScrollBar) && (this.messageTextArea.verticalScrollBar.visible))) && (this.messageTextArea.verticalScrollBar.getBounds(this).contains(this.mouseX, this.mouseY)))){ this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); _overScrollBar = true; } else { _overScrollBar = false; }; } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function onSendHandler(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLVariables; var _local4:URLRequest; this.dispatchEvent(new Event(ON_SEND)); _local2 = (((((((((("name=" + this.nameTextInput.text) + "&") + "email=") + this.emailTextInput.text) + "&") + "topic_id=") + this.topicComboBox.selectedItem.value) + "&") + "msg=") + this.messageTextArea.text); _local3 = new URLVariables(_local2); _local4 = new URLRequest(Config.MESSAGE_URL); _local4.method = URLRequestMethod.POST; _local4.data = _local3; sendToURL(_local4); this.backButton.visible = false; this.sendButton.visible = false; this.button1.visible = false; this.button2.visible = false; this.okButton.visible = true; this.gotoAndStop(2); } private function onEmailActivated(_arg1:MouseEvent):void{ if (this.emailTextInput.text == DEF_EMAIL){ this.emailTextInput.text = ""; }; this.onNameDeactivated(); this.onMessageDeactivated(); } private function overEmail(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_HIDE, true)); } private function overName(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_HIDE, true)); } private function onButton2(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://picasogames.com/"), "_blank"); } private function onTopic(_arg1:MouseEvent):void{ this.onNameDeactivated(); this.onEmailDeactivated(); this.onMessageDeactivated(); } private function onButton1(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://picasogames.com/games/bridgecraft/viral-pack"), "_blank"); } private function onMessageActivated(_arg1:MouseEvent):void{ if (this.messageTextArea.text == DEF_MSG){ this.messageTextArea.text = ""; }; this.onNameDeactivated(); this.onEmailDeactivated(); } private function onEmailDeactivated(_arg1:MouseEvent=null):void{ if (this.emailTextInput.text.length == 0){ this.emailTextInput.text = DEF_EMAIL; }; } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function overMessage(_arg1:MouseEvent):void{ if (!_overScrollBar){ this.dispatchEvent(new Event(Config.EVENT_MOUSE_HIDE, true)); }; } private function outTopic(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); Mouse.hide(); } public function get DEF_NAME():String{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ return ("Your name*"); }; if (Config.LANGUAGE == Config.LANGUAGE_RUS){ return ("Ваше имя*"); }; return ("Nobody"); } private function overTopic(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_HIDE, true)); Mouse.show(); } private function onMessageDeactivated(_arg1:MouseEvent=null):void{ if (this.messageTextArea.text.length == 0){ this.messageTextArea.text = DEF_MSG; }; } public function get DEF_EMAIL():String{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ return ("Your email address*"); }; if (Config.LANGUAGE == Config.LANGUAGE_RUS){ return ("Адрес вашей электронной почты*"); }; return ("no@mail.com"); } public function cleanup():void{ } private function outMessage(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); } private function outEmail(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); } private function onNameActivated(_arg1:MouseEvent):void{ if (this.nameTextInput.text == DEF_NAME){ this.nameTextInput.text = ""; }; this.onEmailDeactivated(); this.onMessageDeactivated(); } } }//package core
Section 110
//Cursor (core.Cursor) package core { import flash.display.*; public class Cursor extends MovieClip { private var _previousType:Number; public function Cursor():void{ stop(); this.mouseEnabled = false; this.mouseChildren = false; } public function set type(_arg1:int):void{ if (_arg1 == Config.MOUSE_TYPE_NORMAL){ _previousType = type; gotoAndStop(_arg1); } else { if (_arg1 == Config.MOUSE_TYPE_TARGET){ _previousType = type; gotoAndStop(_arg1); } else { if (_arg1 == Config.MOUSE_TYPE_HAND){ _previousType = type; gotoAndStop(_arg1); } else { if (_arg1 == Config.MOUSE_TYPE_DRAG){ _previousType = type; gotoAndStop(_arg1); }; }; }; }; } public function get type():int{ return (currentFrame); } } }//package core
Section 111
//DeckLastSegment (core.DeckLastSegment) package core { import flash.display.*; public class DeckLastSegment extends MovieClip { public function DeckLastSegment(_arg1:Boolean=false){ if (_arg1){ scaleX = -1; }; } } }//package core
Section 112
//DeckPole (core.DeckPole) package core { import flash.display.*; public class DeckPole extends MovieClip { } }//package core
Section 113
//DeckSegment (core.DeckSegment) package core { import flash.display.*; public class DeckSegment extends MovieClip { } }//package core
Section 114
//Digit (core.Digit) package core { import flash.display.*; public class Digit extends MovieClip { public function Digit(_arg1:int=0){ if (((((!((_arg1 is int))) || ((_arg1 < 0)))) || ((_arg1 > 9)))){ _arg1 = 0; }; this.gotoAndStop(((_arg1)==0) ? 10 : _arg1); this.cacheAsBitmap = true; } } }//package core
Section 115
//Dot (core.Dot) package core { import flash.display.*; public class Dot extends MovieClip { public var startX:Number; public var stopX:Number; } }//package core
Section 116
//GAManager (core.GAManager) package core { import flash.display.*; import com.google.analytics.*; public class GAManager { public static const MODE_BRIDGE:String = "Bridge"; public static const MODE_AS3:String = "AS3"; private static var _mode:String = "AS3"; private static var _account:String = "UA-4255442-1"; private static var inited:Boolean = false; private static var tracker:GATracker; private static var _prefixString:String = ""; public function GAManager():void{ } public static function trackPage(_arg1:String):void{ if (!inited){ return; }; tracker.trackPageview((prefixString + _arg1)); } public static function get mode():String{ return (_mode); } public static function set mode(_arg1:String):void{ _mode = _arg1; } public static function initTracker(_arg1:DisplayObject, _arg2:Boolean=false):void{ if (inited){ return; }; tracker = new GATracker(_arg1, account, mode, _arg2); inited = true; } public static function get account():String{ return (_account); } public static function set account(_arg1:String):void{ _account = _arg1; } public static function set prefixString(_arg1:String):void{ _prefixString = _arg1; } public static function get prefixString():String{ return (_prefixString); } } }//package core
Section 117
//Grid (core.Grid) package core { import flash.display.*; public class Grid extends Sprite { public function Grid(_arg1:LevelBorders, _arg2:uint=0xFF, _arg3:Number=0.15){ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; super(); if (_arg1 == null){ return; }; graphics.beginFill(0, 1); graphics.lineStyle(2, _arg2, _arg3); _local4 = _arg1.upperBorderY; _local5 = _arg1.bottomBorderY; _local6 = _arg1.leftBorderX; _local7 = _arg1.rightBorderX; if ((((_local6 < 0)) && ((_local7 > 0)))){ _local8 = 0; while (_local8 >= _local6) { graphics.moveTo(_local8, _local4); graphics.lineTo(_local8, _local5); _local8 = (_local8 - Config.GRID_WIDTH); }; _local8 = Config.GRID_WIDTH; while (_local8 <= _local7) { graphics.moveTo(_local8, _local4); graphics.lineTo(_local8, _local5); _local8 = (_local8 + Config.GRID_WIDTH); }; } else { if (_local6 >= 0){ _local8 = 0; while (_local8 <= _local7) { if (_local8 >= _local6){ graphics.moveTo(_local8, _local4); graphics.lineTo(_local8, _local5); }; _local8 = (_local8 + Config.GRID_WIDTH); }; } else { _local8 = 0; while (_local8 >= _local6) { if (_local8 <= _local7){ graphics.moveTo(_local8, _local4); graphics.lineTo(_local8, _local5); }; _local8 = (_local8 - Config.GRID_WIDTH); }; }; }; if ((((_local4 < 0)) && ((_local5 > 0)))){ _local8 = 0; while (_local8 >= _local4) { graphics.moveTo(_local6, _local8); graphics.lineTo(_local7, _local8); _local8 = (_local8 - Config.GRID_HEIGHT); }; _local8 = Config.GRID_HEIGHT; while (_local8 <= _local5) { graphics.moveTo(_local6, _local8); graphics.lineTo(_local7, _local8); _local8 = (_local8 + Config.GRID_HEIGHT); }; } else { if (_local4 >= 0){ _local8 = 0; while (_local8 <= _local5) { if (_local8 >= _local4){ graphics.moveTo(_local6, _local8); graphics.lineTo(_local7, _local8); }; _local8 = (_local8 + Config.GRID_HEIGHT); }; } else { _local8 = 0; while (_local8 >= _local4) { if (_local8 <= _local5){ graphics.moveTo(_local6, _local8); graphics.lineTo(_local7, _local8); }; _local8 = (_local8 - Config.GRID_HEIGHT); }; }; }; graphics.endFill(); this.x = 0; this.y = 0; cacheAsBitmap = true; mouseEnabled = false; mouseChildren = false; } } }//package core
Section 118
//HelpClass (core.HelpClass) package core { import flash.display.*; import flash.geom.*; import flash.events.*; import vis.*; import help.*; public dynamic class HelpClass extends MovieClip { public var nextButton:SimpleButton; private var greyColorTransform:ColorTransform; public var menuButton:SimpleButton; private var deleteClip:DeleteClip; private var scrollClip:ScrollClip; private var buildClip:BuildClip; private var defaultColorTransform:ColorTransform; public var backButton:SimpleButton; public function HelpClass(_arg1:Boolean=true){ var _local2:BlueSky; super(); if (_arg1){ _local2 = new BlueSky(); _local2.scaleX = (Config.SCREEN_WIDTH / _local2.width); _local2.x = (_local2.x - (Config.SCREEN_WIDTH / 2)); _local2.y = (_local2.y - (Config.SCREEN_HEIGHT / 2)); addChildAt(_local2, 0); }; stop(); this.buildClip = new BuildClip(); this.buildClip.x = -90; this.buildClip.y = 35; this.addChild(this.buildClip); this.buildClip.stop(); this.buildClip.visible = false; this.deleteClip = new DeleteClip(); this.deleteClip.x = -90; this.deleteClip.y = 35; this.addChild(this.deleteClip); this.deleteClip.stop(); this.deleteClip.visible = false; this.scrollClip = new ScrollClip(); this.scrollClip.x = -90; this.scrollClip.y = 35; this.addChild(this.scrollClip); this.scrollClip.stop(); this.scrollClip.visible = false; defaultColorTransform = this.backButton.transform.colorTransform; greyColorTransform = new ColorTransform(0.55, 0.55, 0.55, 1, 68, 68, 68, 0); this.backButton.visible = false; this.backButton.scaleX = 0.1; this.backButton.scaleY = this.backButton.scaleX; this.backButton.addEventListener(MouseEvent.CLICK, clickOnBack, false, 0, true); this.menuButton.addEventListener(MouseEvent.CLICK, clickOnMenu, false, 0, true); this.nextButton.addEventListener(MouseEvent.CLICK, clickOnNext, false, 0, true); this.backButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.menuButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.backButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.menuButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function clickOnBack(_arg1:MouseEvent):void{ var _local2:int; _local2 = (currentFrame - 1); if (_local2 <= 0){ _local2 = totalFrames; }; gotoAndStop(_local2); } private function clickOnNext(_arg1:MouseEvent):void{ var _local2:int; _local2 = (currentFrame + 1); if (_local2 > totalFrames){ _local2 = 1; }; gotoAndStop(_local2); } private function enterFrameHandler(_arg1:Event):void{ if (currentFrame == 1){ if (!this.buildClip.visible){ this.buildClip.visible = true; this.buildClip.gotoAndPlay(1); }; if (this.deleteClip.visible){ this.deleteClip.stop(); this.deleteClip.visible = false; }; if (this.scrollClip.visible){ this.scrollClip.stop(); this.scrollClip.visible = false; }; } else { if (currentFrame == 2){ if (this.buildClip.visible){ this.buildClip.stop(); this.buildClip.visible = false; }; if (!this.deleteClip.visible){ this.deleteClip.visible = true; this.deleteClip.gotoAndPlay(1); }; if (this.scrollClip.visible){ this.scrollClip.stop(); this.scrollClip.visible = false; }; } else { if (currentFrame == 4){ if (this.buildClip.visible){ this.buildClip.stop(); this.buildClip.visible = false; }; if (this.deleteClip.visible){ this.deleteClip.stop(); this.deleteClip.visible = false; }; if (!this.scrollClip.visible){ this.scrollClip.visible = true; this.scrollClip.gotoAndPlay(1); }; } else { if (this.buildClip.visible){ this.buildClip.stop(); this.buildClip.visible = false; }; if (this.deleteClip.visible){ this.deleteClip.stop(); this.deleteClip.visible = false; }; if (this.scrollClip.visible){ this.scrollClip.stop(); this.scrollClip.visible = false; }; }; }; }; if (currentFrame == 1){ if (this.backButton.visible){ this.backButton.scaleX = (this.backButton.scaleX * 0.6); this.backButton.scaleY = this.backButton.scaleX; if (this.backButton.scaleX < 0.1){ this.backButton.visible = false; }; }; this.nextButton.scaleX = 1; this.nextButton.scaleY = 1; this.nextButton.visible = true; } else { if (currentFrame == totalFrames){ this.backButton.scaleX = 1; this.backButton.scaleY = 1; this.backButton.visible = true; if (this.nextButton.visible){ this.nextButton.scaleX = (this.nextButton.scaleX * 0.6); this.nextButton.scaleY = this.nextButton.scaleX; if (this.nextButton.scaleX < 0.1){ this.nextButton.visible = false; }; }; } else { this.backButton.visible = true; if (this.backButton.scaleX != 1){ this.backButton.scaleX = (this.backButton.scaleX / 0.6); this.backButton.scaleY = this.backButton.scaleX; if (this.backButton.scaleX > 0.9){ this.backButton.scaleX = 1; this.backButton.scaleY = 1; }; }; this.nextButton.visible = true; if (this.nextButton.scaleX != 1){ this.nextButton.scaleX = (this.nextButton.scaleX / 0.6); this.nextButton.scaleY = this.nextButton.scaleX; if (this.nextButton.scaleX > 0.9){ this.nextButton.scaleX = 1; this.nextButton.scaleY = 1; }; }; }; }; } private function clickOnMenu(_arg1:MouseEvent):void{ cleanup(); dispatchEvent(new Event(Config.EVENT_HELP_CLOSE, true)); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function cleanup():void{ if (this.backButton.hasEventListener(MouseEvent.CLICK)){ this.backButton.removeEventListener(MouseEvent.CLICK, clickOnBack); }; if (this.menuButton.hasEventListener(MouseEvent.CLICK)){ this.menuButton.removeEventListener(MouseEvent.CLICK, clickOnMenu); }; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, clickOnNext); }; if (this.backButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.backButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.menuButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.menuButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.backButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.backButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.menuButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.menuButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.hasEventListener(Event.ENTER_FRAME)){ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } } }//package core
Section 119
//IntroWhite (core.IntroWhite) package core { import flash.display.*; import flash.events.*; import picaso.*; import sounds.*; import vis.*; public dynamic class IntroWhite extends MovieClip { public var nextButton:SimpleButton; private var _musicForSlide2WasPlayed:Boolean;// = false private var skip:Boolean;// = false public var skipButton:SimpleButton; public static const INTRO_COMPLETE:String = "introWhiteComplete"; public function IntroWhite(){ var _local1:BlueSky; _musicForSlide2WasPlayed = false; skip = false; super(); _local1 = new BlueSky(); _local1.scaleX = (Config.SCREEN_WIDTH / _local1.width); _local1.x = (_local1.x - (Config.SCREEN_WIDTH / 2)); _local1.y = (_local1.y - (Config.SCREEN_HEIGHT / 2)); addChildAt(_local1, 0); addEventListener(Event.ENTER_FRAME, enterFrameHandler); (this.skipButton as SimpleButton).visible = true; (this.skipButton as SimpleButton).addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); (this.skipButton as SimpleButton).addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); (this.skipButton as SimpleButton).addEventListener(MouseEvent.CLICK, skipClickHandler); (this.nextButton as SimpleButton).visible = true; (this.nextButton as SimpleButton).addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); (this.nextButton as SimpleButton).addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); (this.nextButton as SimpleButton).addEventListener(MouseEvent.CLICK, nextClickHandler); GAManager.trackPage("/intro-loaded"); } private function enterFrameHandler(_arg1:Event):void{ if (currentFrame == 5){ if (!SoundManager.isSoundPlaying(SoundData.MAIN_THEME)){ SoundData.MAIN_THEME.play(); }; stop(); }; if (currentFrame == 6){ if (((!(_musicForSlide2WasPlayed)) && (!(SoundManager.isSoundPlaying(SoundData.INTRO_SLIDE_2))))){ SoundData.INTRO_SLIDE_2.play(); _musicForSlide2WasPlayed = true; }; } else { if (currentFrame == 15){ stop(); } else { if (currentFrame == 25){ if (!SoundManager.isSoundPlaying(SoundData.INTRO_SLIDE_3)){ SoundData.INTRO_SLIDE_3.play(); }; (this.skipButton as SimpleButton).visible = false; if (Math.abs((this.nextButton as SimpleButton).x) > 0.5){ (this.nextButton as SimpleButton).x = ((this.nextButton as SimpleButton).x / 3); } else { (this.nextButton as SimpleButton).x = 0; }; stop(); } else { if (currentFrame == totalFrames){ dispatchEvent(new Event(IntroWhite.INTRO_COMPLETE, true)); }; }; }; }; } private function nextClickHandler(_arg1:MouseEvent):void{ play(); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function cleanup():void{ if (hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; if ((this.skipButton as SimpleButton).hasEventListener(MouseEvent.MOUSE_OVER)){ (this.skipButton as SimpleButton).removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if ((this.skipButton as SimpleButton).hasEventListener(MouseEvent.MOUSE_OUT)){ (this.skipButton as SimpleButton).removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if ((this.skipButton as SimpleButton).hasEventListener(MouseEvent.CLICK)){ (this.skipButton as SimpleButton).removeEventListener(MouseEvent.CLICK, skipClickHandler); }; if ((this.nextButton as SimpleButton).hasEventListener(MouseEvent.MOUSE_OVER)){ (this.nextButton as SimpleButton).removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if ((this.nextButton as SimpleButton).hasEventListener(MouseEvent.MOUSE_OUT)){ (this.nextButton as SimpleButton).removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if ((this.nextButton as SimpleButton).hasEventListener(MouseEvent.CLICK)){ (this.nextButton as SimpleButton).removeEventListener(MouseEvent.CLICK, nextClickHandler); }; } private function skipClickHandler(_arg1:MouseEvent):void{ GAManager.trackPage("/intro-skipped"); dispatchEvent(new Event(IntroWhite.INTRO_COMPLETE, true)); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package core
Section 120
//LevelBorders (core.LevelBorders) package core { public class LevelBorders { public var bottomBorderY:Number; public var leftBorderX:Number; public var upperBorderY:Number; public var waterLineY:Number; public var rightBorderX:Number; public function LevelBorders(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){ this.upperBorderY = _arg1; this.leftBorderX = _arg2; this.rightBorderX = _arg3; this.bottomBorderY = _arg4; this.waterLineY = _arg5; } public function get width():Number{ return (Math.abs((rightBorderX - leftBorderX))); } public function get height():Number{ return (Math.abs((bottomBorderY - upperBorderY))); } } }//package core
Section 121
//LinkElement (core.LinkElement) package core { import flash.display.*; public class LinkElement extends MovieClip { public function LinkElement(_arg1:Boolean=false, _arg2:Number=1.5, _arg3:Number=0, _arg4:Number=0){ this.stop(); this.name = "link"; this.scaleX = _arg2; this.scaleY = _arg2; this.x = _arg3; this.y = _arg4; this.cacheAsBitmap = true; if (_arg1){ this.gotoAndStop(2); }; } } }//package core
Section 122
//LinkToCS (core.LinkToCS) package core { import flash.display.*; import flash.events.*; import flash.net.*; public class LinkToCS extends SimpleButton { public function LinkToCS():void{ if (Config.VIRAL){ this.addEventListener(MouseEvent.CLICK, navigate, false, 0, true); this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; } private function navigate(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://candystand.com"), "_blank"); GAManager.trackPage("/go-to-candystand-from-map"); } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package core
Section 123
//OurLogo (core.OurLogo) package core { import flash.display.*; public class OurLogo extends MovieClip { public function OurLogo():void{ } } }//package core
Section 124
//Outro (core.Outro) package core { import flash.display.*; import flash.events.*; import vis.*; import popup.*; public dynamic class Outro extends MovieClip { private var buttonNext:SimpleButton; public var btnOk:PopUpButtonOk; private var fader:Sprite; private var buttonOk:SimpleButton; public static const ON_OK:String = "outroOnOk"; public function Outro(){ var _local1:BlueSky; super(); _local1 = new BlueSky(); _local1.scaleX = (Config.SCREEN_WIDTH / _local1.width); _local1.x = (_local1.x - (Config.SCREEN_WIDTH / 2)); _local1.y = (_local1.y - (Config.SCREEN_HEIGHT / 2)); addChildAt(_local1, 0); this.visible = false; this.stop(); this.buttonOk = this["btnOk"]; this.buttonOk.addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); this.buttonOk.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.buttonOk.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.buttonOk.visible = false; this.buttonNext = this["btnNext"]; this.buttonNext.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); this.buttonNext.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.buttonNext.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } public function init(_arg1:Boolean=true):void{ this.visible = true; if (_arg1){ this.setAlpha(0); this.addEventListener(Event.ENTER_FRAME, fadeIn, false, 0, true); } else { this.setAlpha(1); }; } private function setAlpha(_arg1:Number):void{ var _local2:int; _local2 = 1; while (_local2 < this.numChildren) { this.getChildAt(_local2).alpha = _arg1; _local2++; }; } private function fadeOut(_arg1:Event):void{ var _local2:Number; _local2 = this.getAlpha(); if (_local2 > 0.05){ _local2 = (_local2 - (Math.abs(_local2) / 3)); this.setAlpha(_local2); } else { this.setAlpha(0); this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.dispatchEvent(new Event(Outro.ON_OK)); }; } private function onNext(_arg1:MouseEvent):void{ this.gotoAndStop(2); this.buttonOk.visible = true; this.buttonNext.visible = false; this.buttonNext.enabled = false; this.buttonNext.removeEventListener(MouseEvent.CLICK, onNext); this.buttonNext.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.buttonNext.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function getAlpha():Number{ if (this.numChildren > 1){ return (this.getChildAt(1).alpha); }; return (0); } private function clickHandler(_arg1:MouseEvent):void{ if (this.hasEventListener(Event.ENTER_FRAME)){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); }; this.addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true); } public function cleanup():void{ if (this.buttonOk.hasEventListener(MouseEvent.CLICK)){ this.buttonOk.removeEventListener(MouseEvent.CLICK, clickHandler); }; if (this.buttonOk.hasEventListener(MouseEvent.MOUSE_OVER)){ this.buttonOk.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.buttonOk.hasEventListener(MouseEvent.MOUSE_OUT)){ this.buttonOk.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } private function fadeIn(_arg1:Event):void{ var _local2:Number; _local2 = this.getAlpha(); if (_local2 < 0.95){ _local2 = (_local2 + (Math.abs((1 - _local2)) / 5)); this.setAlpha(_local2); } else { this.setAlpha(1); this.removeEventListener(Event.ENTER_FRAME, fadeIn); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package core
Section 125
//OutroViral (core.OutroViral) package core { import flash.display.*; import flash.events.*; import flash.net.*; import flash.text.*; import hud.*; public dynamic class OutroViral extends MovieClip { private var bcwLinkTextField:TextField; public var btnOk:HomeButton; public var playBonusLevelsBtn:LinkToCS; private var csLinkTextField:TextField; private var titleTextField:TextField; public var bcwLink:TextField; private var quitSubmitButton:SimpleButton; private var fader:Sprite; private var playBonusLevelsButton:SimpleButton; public var csLink:TextField; public var quitSubmitBtn:SimpleButton; private var buttonOk:SimpleButton; public var titleTF:TextField; public static const ON_OK:String = "outroOnOk"; public static const ON_SUBMIT:String = "outroOnSubmit"; public function OutroViral(_arg1:String="Player"){ this.titleTextField = this["titleTF"]; this.titleTextField.text = this.titleTextField.text.replace("Player", _arg1); this.csLinkTextField = this["csLink"]; this.csLinkTextField.addEventListener(MouseEvent.CLICK, onCsLink, false, 0, true); this.csLinkTextField.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.csLinkTextField.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.bcwLinkTextField = this["bcwLink"]; this.bcwLinkTextField.addEventListener(MouseEvent.CLICK, onBcwLink, false, 0, true); this.bcwLinkTextField.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.bcwLinkTextField.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.buttonOk = this["btnOk"]; this.buttonOk.addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); this.buttonOk.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.buttonOk.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.playBonusLevelsButton = this["playBonusLevelsBtn"]; this.playBonusLevelsButton.addEventListener(MouseEvent.CLICK, clickPlayBonusLevelsHandler, false, 0, true); this.playBonusLevelsButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.playBonusLevelsButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.playBonusLevelsButton = this["quitSubmitBtn"]; this.playBonusLevelsButton.addEventListener(MouseEvent.CLICK, clickQuitSubmitHandler, false, 0, true); this.playBonusLevelsButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.playBonusLevelsButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } private function mouseOverLinkHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_HIDE, true)); } private function onCsLink(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(Config.BC_ON_CS_URL), "_blank"); } private function clickQuitSubmitHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(ON_SUBMIT, true)); } private function onBcwLink(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(Config.BCW_URL), "_blank"); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(OutroViral.ON_OK)); } public function cleanup():void{ if (this.buttonOk.hasEventListener(MouseEvent.CLICK)){ this.buttonOk.removeEventListener(MouseEvent.CLICK, clickHandler); }; if (this.buttonOk.hasEventListener(MouseEvent.MOUSE_OVER)){ this.buttonOk.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.buttonOk.hasEventListener(MouseEvent.MOUSE_OUT)){ this.buttonOk.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } private function mouseOutLinkHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function clickPlayBonusLevelsHandler(_arg1:MouseEvent):void{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ navigateToURL(new URLRequest(Config.BC_ON_CS_URL), "_blank"); } else { if (Config.LANGUAGE == Config.LANGUAGE_RUS){ navigateToURL(new URLRequest(Config.BC_ON_PLAYIT_URL), "_blank"); }; }; } } }//package core
Section 126
//PicasoLogo (core.PicasoLogo) package core { import flash.display.*; import flash.events.*; import flash.net.*; public class PicasoLogo extends MovieClip { public static const ON_COMPLETE:String = "finishedPlaying"; public function PicasoLogo(){ addFrameScript(164, frame165); stop(); } public function init():void{ if (this.parent == null){ return; }; this.stage.frameRate = 21; this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); this.gotoAndPlay(1); } private function enterFrameHandler(_arg1:Event):void{ if (currentFrame == totalFrames){ stop(); cleanup(); this.stage.frameRate = Config.ENGINE_FRAMERATE; this.dispatchEvent(new Event(_slot1.ON_COMPLETE)); }; } function frame165(){ stop(); } private function navigate(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://picasogames.com"), "_blank"); } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function cleanup():void{ if (hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package core
Section 127
//PicasoLogoLite (core.PicasoLogoLite) package core { import flash.display.*; import flash.events.*; import flash.net.*; public class PicasoLogoLite extends MovieClip { public var logobutton:SimpleButton; public static const ON_COMPLETE:String = "finishedPlaying"; public function PicasoLogoLite(){ stop(); } public function init():void{ if (this.parent == null){ return; }; this.stage.frameRate = Config.ENGINE_FRAMERATE; if (Config.VIRAL){ this.addEventListener(MouseEvent.CLICK, navigate, false, 0, true); this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); this.gotoAndPlay(1); } private function enterFrameHandler(_arg1:Event):void{ if (currentFrame == totalFrames){ stop(); cleanup(); if (Config.VIRAL){ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; this.stage.frameRate = Config.ENGINE_FRAMERATE; this.dispatchEvent(new Event(PicasoLogoLite.ON_COMPLETE)); }; } private function navigate(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://picasogames.com"), "_blank"); } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function cleanup():void{ if (Config.VIRAL){ if (hasEventListener(MouseEvent.CLICK)){ removeEventListener(MouseEvent.CLICK, navigate); }; if (hasEventListener(MouseEvent.MOUSE_OVER)){ removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (hasEventListener(MouseEvent.MOUSE_OUT)){ removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; }; if (hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package core
Section 128
//PlayItManager (core.PlayItManager) package core { import flash.display.*; import flash.events.*; import flash.net.*; public class PlayItManager { private static var _mask:String = ""; private static var _inited:Boolean = false; private static var _reqURL:String; private static var _state:int = 0; private static var _user_id:String = ""; private static var _ssid:String; private static var _domain:String; private static var _id:String; public function PlayItManager():void{ } public static function set reqURL(_arg1:String):void{ _reqURL = _arg1; } private static function XORStrings(_arg1:String, _arg2:String):String{ var _local3:int; var _local4:int; var _local5:int; var _local6:String; var _local7:int; _local3 = _arg1.length; _local4 = _arg2.length; _local5 = 0; _local6 = ""; _local7 = 0; while (_local7 < _local3) { if (_local5 >= _local4){ _local5 = 0; }; _local6 = (_local6 + String((_arg2.charCodeAt(_local5) ^ _arg1.charCodeAt(_local5)))); _local5++; _local7++; }; return (_local6); } private static function onSgscLoaded(_arg1:Event):void{ var _local2:URLLoader; var _local3:URLVariables; _local2 = URLLoader(_arg1.target); _local3 = new URLVariables(_local2.data); state = int(_local3.state); if (state == 0){ }; _local2.removeEventListener(Event.COMPLETE, onSgscLoaded); _local2 = null; _local3 = null; } public static function set state(_arg1:int):void{ _state = _arg1; } public static function get state():int{ return (_state); } public static function get domain():String{ return (_domain); } public static function set mask(_arg1:String):void{ _mask = _arg1; } public static function get id():String{ return (_id); } public static function traceToBCW(_arg1:String=""):void{ } private static function onCrgLoaded(_arg1:Event):void{ var _local2:URLLoader; var _local3:URLVariables; var _local4:String; _local2 = URLLoader(_arg1.target); _local3 = new URLVariables(_local2.data); state = int(_local3.state); if (state == 0){ user_id = _local3.p1; mask = _local3.p2; _local4 = _local3.p3; }; if (ssid == _local4){ }; _local2.removeEventListener(Event.COMPLETE, onCrgLoaded); _local2 = null; _local3 = null; } public static function init(_arg1:DisplayObject):void{ var _local2:Object; var _local3:String; var _local4:Number; var _local5:Number; var _local6:String; if (inited){ return; }; if (!_arg1.root){ return; }; _local2 = _arg1.root.loaderInfo.parameters; if (_local2["ssid"]){ ssid = String(_local2["ssid"]); }; if (_local2["id"]){ id = String(_local2["id"]); }; if (_local2["reqURL"]){ reqURL = String(_local2["reqURL"]); }; _local3 = _arg1.loaderInfo.url; _local4 = (_local3.indexOf("://") + 3); _local5 = _local3.indexOf("/", _local4); _local6 = _local3.substring(_local4, _local5); domain = _local6; inited = ((((Boolean(ssid)) && (Boolean(id)))) && (Boolean(domain))); } public static function submitScore(_arg1:Number):void{ var _local2:String; var _local3:String; var _local4:String; var _local5:String; var _local6:String; var _local7:URLVariables; var _local8:URLRequest; var _local9:URLLoader; if (!inited){ return; }; _local2 = XORStrings(user_id, mask); _local3 = XORStrings(_arg1.toString(), mask); _local4 = _arg1.toString(); _local5 = id; _local6 = ((((((((("ssid=" + ssid) + "&r1=") + _local2) + "&r2=") + _local3) + "&r3=") + _local4) + "&r4=") + _local5); _local7 = new URLVariables(_local6); _local8 = new URLRequest((("http://" + domain) + "/sgsc.php")); _local8.method = URLRequestMethod.GET; _local8.data = _local7; _local9 = new URLLoader(); _local9.addEventListener(Event.COMPLETE, onSgscLoaded); _local9.load(_local8); } public static function set user_id(_arg1:String):void{ _user_id = _arg1; } public static function initGame():void{ var _local1:URLRequest; var _local2:String; var _local3:URLVariables; var _local4:URLLoader; if (!inited){ return; }; _local1 = new URLRequest((("http://" + domain) + "/crg.php")); _local2 = ((("ssid=" + ssid) + "&id=") + id); _local3 = new URLVariables(_local2); _local1.method = URLRequestMethod.GET; _local1.data = _local3; _local4 = new URLLoader(); _local4.addEventListener(Event.COMPLETE, onCrgLoaded); _local4.load(_local1); } public static function set domain(_arg1:String):void{ _domain = _arg1; } public static function get mask():String{ return (_mask); } public static function set inited(_arg1:Boolean):void{ _inited = _arg1; } public static function get inited():Boolean{ return (_inited); } public static function get reqURL():String{ return (_reqURL); } public static function set ssid(_arg1:String):void{ _ssid = _arg1; } public static function get ssid():String{ return (_ssid); } public static function get user_id():String{ return (_user_id); } public static function set id(_arg1:String):void{ _id = _arg1; } } }//package core
Section 129
//Pointer (core.Pointer) package core { import flash.display.*; import flash.filters.*; public class Pointer extends Sprite { public function Pointer(){ graphics.beginFill(0, 1); graphics.drawCircle(0, 0, 5); graphics.endFill(); filters = new Array(new GlowFilter(0)); cacheAsBitmap = true; mouseEnabled = false; mouseChildren = false; } } }//package core
Section 130
//PreLoaderBar (core.PreLoaderBar) package core { import flash.display.*; import flash.events.*; public class PreLoaderBar extends MovieClip { public var progressLine:MovieClip; public static const LOADED:String = "loaded100"; public function PreLoaderBar(){ this["progressLine"].x = 0; } public function init():void{ this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); } private function enterFrameHandler(_arg1:Event):void{ var _local2:Number; _local2 = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal); this["progressLine"].x = (400 * _local2); if (stage.loaderInfo.bytesLoaded == stage.loaderInfo.bytesTotal){ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); this.dispatchEvent(new Event(PreLoaderBar.LOADED)); }; } public function setPercentage(_arg1:Number):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 1){ _arg1 = 1; }; this["progressLine"].x = (400 * _arg1); } } }//package core
Section 131
//ScrollZone (core.ScrollZone) package core { import flash.display.*; import flash.events.*; public class ScrollZone extends MovieClip { private var _invertedX:Boolean; private var _invertedY:Boolean; private var _horizontal:Boolean; public function ScrollZone(_arg1:Boolean=false, _arg2:Boolean=false, _arg3:Boolean=false){ if (_arg1){ scaleX = -1; }; if (_arg3){ scaleY = -1; }; if (_arg2){ rotation = 90; }; _invertedX = _arg1; _invertedY = _arg3; _horizontal = _arg2; gotoAndStop(1); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); } private function enterFrameHandler(_arg1:Event):void{ if (_horizontal){ if (_invertedX){ dispatchEvent(new Event(Config.EVENT_SCROLL_DOWN, true)); } else { dispatchEvent(new Event(Config.EVENT_SCROLL_UP, true)); }; } else { if (_invertedX){ dispatchEvent(new Event(Config.EVENT_SCROLL_RIGHT, true)); } else { dispatchEvent(new Event(Config.EVENT_SCROLL_LEFT, true)); }; }; } private function mouseOutHandler(_arg1:MouseEvent):void{ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function mouseOverHandler(_arg1:MouseEvent):void{ addEventListener(Event.ENTER_FRAME, enterFrameHandler); } } }//package core
Section 132
//SteelLastSegment (core.SteelLastSegment) package core { import flash.display.*; public class SteelLastSegment extends MovieClip { public function SteelLastSegment(_arg1:Boolean=false){ if (_arg1){ scaleX = -1; }; } } }//package core
Section 133
//SteelSegment (core.SteelSegment) package core { import flash.display.*; public class SteelSegment extends MovieClip { } }//package core
Section 134
//TestersPopUp (core.TestersPopUp) package core { import flash.display.*; import flash.events.*; public dynamic class TestersPopUp extends MovieClip { private var nextButton:SimpleButton; public var nextBtn:SimpleButton; private var resetButton:SimpleButton; public var resetBtn:SimpleButton; public var saveAndCloseBtn:SimpleButton; private var saveAndCloseButton:SimpleButton; public static const RESET_ALL:String = "resetAllStoredData"; public static const ON_READY:String = "testersPopUpReady"; public static const TUTORIALS_RESET:String = "tutorialsChecked"; public static const INTRO_OUTRO_RESET:String = "introOutroChecked"; public static const ON_CLOSED:String = "testersPopUpClosed"; public static const ON_RESET:String = "introOutroReset"; public static const SCORES_RESET:String = "scoresChecked"; public static const ON_OK:String = "testersPopUpOk"; public function TestersPopUp():void{ this.saveAndCloseButton = this["saveAndCloseBtn"]; this.saveAndCloseButton.addEventListener(MouseEvent.CLICK, onSaveAndClose, false, 0, true); this.saveAndCloseButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.saveAndCloseButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.resetButton = this["resetBtn"]; this.resetButton.addEventListener(MouseEvent.CLICK, onReset, false, 0, true); this.resetButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.resetButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.nextButton = this["nextBtn"]; this.nextButton.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } private function onSaveAndClose(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(ON_OK)); } private function onNext(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_LEVEL_NEXT, true)); this.dispatchEvent(new Event(ON_OK)); } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function onReset(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(ON_RESET)); } public function cleanup():void{ this.saveAndCloseButton.removeEventListener(MouseEvent.CLICK, onSaveAndClose); this.saveAndCloseButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.saveAndCloseButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.resetButton.removeEventListener(MouseEvent.CLICK, onReset); this.resetButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.resetButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package core
Section 135
//TheirLogo (core.TheirLogo) package core { import flash.display.*; public class TheirLogo extends MovieClip { public function ThierLogo():void{ } } }//package core
Section 136
//wav (deck_break.wav) package deck_break { import flash.media.*; public dynamic class wav extends Sound { } }//package deck_break
Section 137
//wav (deck_connect.wav) package deck_connect { import flash.media.*; public dynamic class wav extends Sound { } }//package deck_connect
Section 138
//mp3 (emulation.mp3) package emulation { import flash.media.*; public dynamic class mp3 extends Sound { } }//package emulation
Section 139
//BaseScrollPane (fl.containers.BaseScrollPane) package fl.containers { import fl.core.*; import fl.controls.*; import flash.display.*; import flash.geom.*; import flash.events.*; import fl.events.*; public class BaseScrollPane extends UIComponent { protected var contentHeight:Number;// = 0 protected var _horizontalScrollBar:ScrollBar; protected var _horizontalPageScrollSize:Number;// = 0 protected var _verticalPageScrollSize:Number;// = 0 protected var _maxHorizontalScrollPosition:Number;// = 0 protected var defaultLineScrollSize:Number;// = 4 protected var vOffset:Number;// = 0 protected var contentScrollRect:Rectangle; protected var background:DisplayObject; protected var _verticalScrollBar:ScrollBar; protected var disabledOverlay:Shape; protected var vScrollBar:Boolean; protected var _horizontalScrollPolicy:String; protected var useFixedHorizontalScrolling:Boolean;// = false protected var contentWidth:Number;// = 0 protected var availableHeight:Number; protected var _verticalScrollPolicy:String; protected var contentPadding:Number;// = 0 protected var _useBitmpScrolling:Boolean;// = false protected var availableWidth:Number; protected var hScrollBar:Boolean; protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5}; override public function set enabled(_arg1:Boolean):void{ if (enabled == _arg1){ return; }; _verticalScrollBar.enabled = _arg1; _horizontalScrollBar.enabled = _arg1; super.enabled = _arg1; } public function set useBitmapScrolling(_arg1:Boolean):void{ _useBitmpScrolling = _arg1; invalidate(InvalidationType.STATE); } public function set horizontalLineScrollSize(_arg1:Number):void{ _horizontalScrollBar.lineScrollSize = _arg1; } protected function drawLayout():void{ calculateAvailableSize(); calculateContentWidth(); background.width = width; background.height = height; if (vScrollBar){ _verticalScrollBar.visible = true; _verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding); _verticalScrollBar.y = contentPadding; _verticalScrollBar.height = availableHeight; } else { _verticalScrollBar.visible = false; }; _verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize); setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false); if (hScrollBar){ _horizontalScrollBar.visible = true; _horizontalScrollBar.x = contentPadding; _horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding); _horizontalScrollBar.width = availableWidth; } else { _horizontalScrollBar.visible = false; }; _horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize); setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false); drawDisabledOverlay(); } protected function handleWheel(_arg1:MouseEvent):void{ if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){ return; }; _verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize)); setVerticalScrollPosition(_verticalScrollBar.scrollPosition); dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition)); } protected function handleScroll(_arg1:ScrollEvent):void{ if (_arg1.target == _verticalScrollBar){ setVerticalScrollPosition(_arg1.position); } else { setHorizontalScrollPosition(_arg1.position); }; } public function get verticalLineScrollSize():Number{ return (_verticalScrollBar.lineScrollSize); } protected function drawBackground():void{ var _local1:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue("skin")); background.width = width; background.height = height; addChildAt(background, 0); if (((!((_local1 == null))) && (!((_local1 == background))))){ removeChild(_local1); }; } protected function calculateAvailableSize():void{ var _local1:Number = ScrollBar.WIDTH; var _local2:Number = (contentPadding = Number(getStyleValue("contentPadding"))); var _local3:Number = ((height - (2 * _local2)) - vOffset); vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3))))); var _local4:Number = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2)); var _local5:Number = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4); hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0))))); if (hScrollBar){ _local3 = (_local3 - _local1); }; if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){ vScrollBar = true; _local4 = (_local4 - _local1); }; availableHeight = (_local3 + vOffset); availableWidth = _local4; } public function get verticalScrollPosition():Number{ return (_verticalScrollBar.scrollPosition); } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ } public function get horizontalPageScrollSize():Number{ if (isNaN(availableWidth)){ drawNow(); }; return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize); } public function set horizontalScrollPosition(_arg1:Number):void{ drawNow(); _horizontalScrollBar.scrollPosition = _arg1; setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false); } public function set verticalLineScrollSize(_arg1:Number):void{ _verticalScrollBar.lineScrollSize = _arg1; } public function get maxVerticalScrollPosition():Number{ drawNow(); return (Math.max(0, (contentHeight - availableHeight))); } public function set horizontalPageScrollSize(_arg1:Number):void{ _horizontalPageScrollSize = _arg1; invalidate(InvalidationType.SIZE); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES)){ setStyles(); drawBackground(); if (contentPadding != getStyleValue("contentPadding")){ invalidate(InvalidationType.SIZE, false); }; }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){ drawLayout(); }; updateChildren(); super.draw(); } public function get horizontalScrollBar():ScrollBar{ return (_horizontalScrollBar); } protected function calculateContentWidth():void{ } public function set horizontalScrollPolicy(_arg1:String):void{ _horizontalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } override protected function configUI():void{ super.configUI(); contentScrollRect = new Rectangle(0, 0, 85, 85); _verticalScrollBar = new ScrollBar(); _verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); _verticalScrollBar.visible = false; _verticalScrollBar.lineScrollSize = defaultLineScrollSize; addChild(_verticalScrollBar); copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); _horizontalScrollBar = new ScrollBar(); _horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL; _horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); _horizontalScrollBar.visible = false; _horizontalScrollBar.lineScrollSize = defaultLineScrollSize; addChild(_horizontalScrollBar); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); disabledOverlay = new Shape(); var _local1:Graphics = disabledOverlay.graphics; _local1.beginFill(0xFFFFFF); _local1.drawRect(0, 0, width, height); _local1.endFill(); addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true); } protected function drawDisabledOverlay():void{ if (enabled){ if (contains(disabledOverlay)){ removeChild(disabledOverlay); }; } else { disabledOverlay.x = (disabledOverlay.y = contentPadding); disabledOverlay.width = availableWidth; disabledOverlay.height = availableHeight; disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number); addChild(disabledOverlay); }; } public function get horizontalScrollPosition():Number{ return (_horizontalScrollBar.scrollPosition); } public function get verticalScrollBar():ScrollBar{ return (_verticalScrollBar); } public function get horizontalLineScrollSize():Number{ return (_horizontalScrollBar.lineScrollSize); } public function set verticalScrollPosition(_arg1:Number):void{ drawNow(); _verticalScrollBar.scrollPosition = _arg1; setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false); } protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ } protected function setStyles():void{ copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); } public function set verticalPageScrollSize(_arg1:Number):void{ _verticalPageScrollSize = _arg1; invalidate(InvalidationType.SIZE); } protected function setContentSize(_arg1:Number, _arg2:Number):void{ if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){ return; }; contentWidth = _arg1; contentHeight = _arg2; invalidate(InvalidationType.SIZE); } public function set verticalScrollPolicy(_arg1:String):void{ _verticalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } public function get maxHorizontalScrollPosition():Number{ drawNow(); return (Math.max(0, (contentWidth - availableWidth))); } protected function updateChildren():void{ _verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled); _verticalScrollBar.drawNow(); _horizontalScrollBar.drawNow(); } public function get verticalPageScrollSize():Number{ if (isNaN(availableHeight)){ drawNow(); }; return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize); } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } public function get useBitmapScrolling():Boolean{ return (_useBitmpScrolling); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.containers
Section 140
//CellRenderer (fl.controls.listClasses.CellRenderer) package fl.controls.listClasses { import fl.controls.*; import flash.events.*; public class CellRenderer extends LabelButton implements ICellRenderer { protected var _listData:ListData; protected var _data:Object; private static var defaultStyles:Object = {upSkin:"CellRenderer_upSkin", downSkin:"CellRenderer_downSkin", overSkin:"CellRenderer_overSkin", disabledSkin:"CellRenderer_disabledSkin", selectedDisabledSkin:"CellRenderer_selectedDisabledSkin", selectedUpSkin:"CellRenderer_selectedUpSkin", selectedDownSkin:"CellRenderer_selectedDownSkin", selectedOverSkin:"CellRenderer_selectedOverSkin", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5}; public function CellRenderer():void{ toggle = true; focusEnabled = false; } override public function set selected(_arg1:Boolean):void{ super.selected = _arg1; } override protected function drawLayout():void{ var _local3:Number; var _local1:Number = Number(getStyleValue("textPadding")); var _local2:Number = 0; if (icon != null){ icon.x = _local1; icon.y = Math.round(((height - icon.height) >> 1)); _local2 = (icon.width + _local1); }; if (label.length > 0){ textField.visible = true; _local3 = Math.max(0, ((width - _local2) - (_local1 * 2))); textField.width = _local3; textField.height = (textField.textHeight + 4); textField.x = (_local2 + _local1); textField.y = Math.round(((height - textField.height) >> 1)); } else { textField.visible = false; }; background.width = width; background.height = height; } public function get listData():ListData{ return (_listData); } override public function setSize(_arg1:Number, _arg2:Number):void{ super.setSize(_arg1, _arg2); } public function get data():Object{ return (_data); } public function set data(_arg1:Object):void{ _data = _arg1; } public function set listData(_arg1:ListData):void{ _listData = _arg1; label = _listData.label; setStyle("icon", _listData.icon); } override public function get selected():Boolean{ return (super.selected); } override protected function toggleSelected(_arg1:MouseEvent):void{ } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls.listClasses
Section 141
//ICellRenderer (fl.controls.listClasses.ICellRenderer) package fl.controls.listClasses { public interface ICellRenderer { function set x(_arg1:Number):void; function set y(_arg1:Number):void; function setSize(_arg1:Number, _arg2:Number):void; function set data(_arg1:Object):void; function set selected(_arg1:Boolean):void; function set listData(_arg1:ListData):void; function get listData():ListData; function get data():Object; function get selected():Boolean; function setMouseState(_arg1:String):void; } }//package fl.controls.listClasses
Section 142
//ListData (fl.controls.listClasses.ListData) package fl.controls.listClasses { import fl.core.*; public class ListData { protected var _index:uint; protected var _owner:UIComponent; protected var _label:String; protected var _icon:Object;// = null protected var _row:uint; protected var _column:uint; public function ListData(_arg1:String, _arg2:Object, _arg3:UIComponent, _arg4:uint, _arg5:uint, _arg6:uint=0){ _label = _arg1; _icon = _arg2; _owner = _arg3; _index = _arg4; _row = _arg5; _column = _arg6; } public function get row():uint{ return (_row); } public function get owner():UIComponent{ return (_owner); } public function get label():String{ return (_label); } public function get index():uint{ return (_index); } public function get icon():Object{ return (_icon); } public function get column():uint{ return (_column); } } }//package fl.controls.listClasses
Section 143
//BaseButton (fl.controls.BaseButton) package fl.controls { import fl.core.*; import flash.display.*; import flash.events.*; import fl.events.*; import flash.utils.*; public class BaseButton extends UIComponent { protected var pressTimer:Timer; protected var _autoRepeat:Boolean;// = false protected var _selected:Boolean;// = false protected var background:DisplayObject; private var unlockedMouseState:String; protected var mouseState:String; private var _mouseStateLocked:Boolean;// = false private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35}; public function BaseButton(){ buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true); } override public function get enabled():Boolean{ return (super.enabled); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function drawLayout():void{ background.width = width; background.height = height; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } protected function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_DOWN){ setMouseState("down"); startPress(); } else { if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){ setMouseState("over"); endPress(); } else { if (_arg1.type == MouseEvent.ROLL_OUT){ setMouseState("up"); endPress(); }; }; }; } protected function drawBackground():void{ var _local1:String = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); var _local2:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public function get selected():Boolean{ return (_selected); } protected function setupMouseEvents():void{ addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true); } protected function endPress():void{ pressTimer.reset(); } public function set mouseStateLocked(_arg1:Boolean):void{ _mouseStateLocked = _arg1; if (_arg1 == false){ setMouseState(unlockedMouseState); } else { unlockedMouseState = mouseState; }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } protected function buttonDown(_arg1:TimerEvent):void{ if (!_autoRepeat){ endPress(); return; }; if (pressTimer.currentCount == 1){ pressTimer.delay = Number(getStyleValue("repeatInterval")); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 144
//Button (fl.controls.Button) package fl.controls { import fl.core.*; import flash.display.*; import fl.managers.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var _emphasized:Boolean;// = false protected var emphasizedBorder:DisplayObject; private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; var _local1:Object = getStyleValue("emphasizedSkin"); if (_local1 != null){ emphasizedBorder = getDisplayObjectInstance(_local1); }; if (emphasizedBorder != null){ addChildAt(emphasizedBorder, 0); _local2 = Number(getStyleValue("emphasizedPadding")); emphasizedBorder.x = (emphasizedBorder.y = -(_local2)); emphasizedBorder.width = (width + (_local2 * 2)); emphasizedBorder.height = (height + (_local2 * 2)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; var _local3:*; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("emphasizedPadding")); if ((((_local2 < 0)) || (!(_emphasized)))){ _local2 = 0; }; _local3 = getStyleValue("focusRectPadding"); _local3 = ((_local3)==null) ? 2 : _local3; _local3 = (_local3 + _local2); uiFocusRect.x = -(_local3); uiFocusRect.y = -(_local3); uiFocusRect.width = (width + (_local3 * 2)); uiFocusRect.height = (height + (_local3 * 2)); }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles)); } } }//package fl.controls
Section 145
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement) package fl.controls { public class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package fl.controls
Section 146
//ComboBox (fl.controls.ComboBox) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.display.*; import flash.geom.*; import flash.events.*; import flash.text.*; import fl.data.*; import fl.managers.*; import fl.events.*; import flash.ui.*; public class ComboBox extends UIComponent implements IFocusManagerComponent { protected var isKeyDown:Boolean;// = false protected var _labels:Array; protected var background:BaseButton; protected var _dropdownWidth:Number; protected var inputField:TextInput; protected var highlightedCell:int;// = -1 protected var listOverIndex:uint; protected var editableValue:String; protected var _prompt:String; protected var isOpen:Boolean;// = false protected var list:List; protected var _rowCount:uint;// = 5 protected var _editable:Boolean;// = false private var collectionItemImport:SimpleCollectionItem; protected var currentIndex:int; protected static const BACKGROUND_STYLES:Object = {overSkin:"overSkin", downSkin:"downSkin", upSkin:"upSkin", disabledSkin:"disabledSkin", repeatInterval:"repeatInterval"}; protected static const LIST_STYLES:Object = {upSkin:"comboListUpSkin", overSkin:"comboListOverSkin", downSkin:"comobListDownSkin", disabledSkin:"comboListDisabledSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval", textFormat:"textFormat", disabledAlpha:"disabledAlpha", skin:"listSkin"}; private static var defaultStyles:Object = {upSkin:"ComboBox_upSkin", downSkin:"ComboBox_downSkin", overSkin:"ComboBox_overSkin", disabledSkin:"ComboBox_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, buttonWidth:24, disabledAlpha:null, listSkin:null}; public static var createAccessibilityImplementation:Function; protected function drawList():void{ list.rowCount = Math.max(0, Math.min(_rowCount, list.dataProvider.length)); } public function get imeMode():String{ return (inputField.imeMode); } protected function onInputFieldFocusOut(_arg1:FocusEvent):void{ inputField.removeEventListener(ComponentEvent.ENTER, onEnter); selectedIndex = selectedIndex; } public function set imeMode(_arg1:String):void{ inputField.imeMode = _arg1; } protected function passEvent(_arg1:Event):void{ dispatchEvent(_arg1); } protected function calculateAvailableHeight():Number{ var _local1:Number = Number(getStyleValue("contentPadding")); return ((list.height - (_local1 * 2))); } public function get dropdown():List{ return (list); } override protected function focusOutHandler(_arg1:FocusEvent):void{ isKeyDown = false; if (isOpen){ if (((!(_arg1.relatedObject)) || (!(list.contains(_arg1.relatedObject))))){ if (((!((highlightedCell == -1))) && (!((highlightedCell == selectedIndex))))){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); }; }; super.focusOutHandler(_arg1); } public function get selectedLabel():String{ if (editableValue != null){ return (editableValue); }; if (selectedIndex == -1){ return (null); }; return (itemToLabel(selectedItem)); } protected function onListChange(_arg1:Event):void{ editableValue = null; dispatchEvent(_arg1); invalidate(InvalidationType.SELECTED); if (isKeyDown){ return; }; close(); } public function get text():String{ return (inputField.text); } protected function onEnter(_arg1:ComponentEvent):void{ _arg1.stopPropagation(); } public function sortItemsOn(_arg1:String, _arg2:Object=null){ return (list.sortItemsOn(_arg1, _arg2)); } protected function handleDataChange(_arg1:DataChangeEvent):void{ invalidate(InvalidationType.DATA); } protected function onToggleListVisibility(_arg1:MouseEvent):void{ _arg1.stopPropagation(); dispatchEvent(_arg1); if (isOpen){ close(); } else { open(); stage.addEventListener(MouseEvent.MOUSE_UP, onListItemUp, false, 0, true); }; } public function get dropdownWidth():Number{ return (list.width); } protected function highlightCell(_arg1:int=-1):void{ var _local2:ICellRenderer; if (highlightedCell > -1){ _local2 = list.itemToCellRenderer(getItemAt(highlightedCell)); if (_local2 != null){ _local2.setMouseState("up"); }; }; if (_arg1 == -1){ return; }; list.scrollToIndex(_arg1); list.drawNow(); _local2 = list.itemToCellRenderer(getItemAt(_arg1)); if (_local2 != null){ _local2.setMouseState("over"); highlightedCell = _arg1; }; } public function removeItemAt(_arg1:uint):void{ list.removeItemAt(_arg1); invalidate(InvalidationType.DATA); } override protected function draw():void{ var _local1:* = selectedIndex; if ((((_local1 == -1)) && (((((!((prompt == null))) || (editable))) || ((length == 0)))))){ _local1 = Math.max(-1, Math.min(_local1, (length - 1))); } else { editableValue = null; _local1 = Math.max(0, Math.min(_local1, (length - 1))); }; if (list.selectedIndex != _local1){ list.selectedIndex = _local1; invalidate(InvalidationType.SELECTED, false); }; if (isInvalid(InvalidationType.STYLES)){ setStyles(); setEmbedFonts(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.STATE)){ drawTextFormat(); drawLayout(); invalidate(InvalidationType.DATA); }; if (isInvalid(InvalidationType.DATA)){ drawList(); invalidate(InvalidationType.SELECTED, true); }; if (isInvalid(InvalidationType.SELECTED)){ if ((((_local1 == -1)) && (!((editableValue == null))))){ inputField.text = editableValue; } else { if (_local1 > -1){ if (length > 0){ inputField.horizontalScrollPosition = 0; inputField.text = itemToLabel(list.selectedItem); }; } else { if ((((_local1 == -1)) && (!((_prompt == null))))){ showPrompt(); } else { inputField.text = ""; }; }; }; if (((((editable) && ((selectedIndex > -1)))) && ((stage.focus == inputField.textField)))){ inputField.setSelection(0, inputField.length); }; }; drawTextField(); super.draw(); } public function get selectedItem():Object{ return (list.selectedItem); } public function open():void{ currentIndex = selectedIndex; if (((isOpen) || ((length == 0)))){ return; }; dispatchEvent(new Event(Event.OPEN)); isOpen = true; addEventListener(Event.ENTER_FRAME, addCloseListener, false, 0, true); positionList(); list.scrollToSelected(); stage.addChild(list); } override protected function configUI():void{ super.configUI(); background = new BaseButton(); background.focusEnabled = false; copyStylesToChild(background, BACKGROUND_STYLES); background.addEventListener(MouseEvent.MOUSE_DOWN, onToggleListVisibility, false, 0, true); addChild(background); inputField = new TextInput(); inputField.focusTarget = (this as IFocusManagerComponent); inputField.focusEnabled = false; inputField.addEventListener(Event.CHANGE, onTextInput, false, 0, true); addChild(inputField); list = new List(); list.focusEnabled = false; copyStylesToChild(list, LIST_STYLES); list.addEventListener(Event.CHANGE, onListChange, false, 0, true); list.addEventListener(ListEvent.ITEM_CLICK, onListChange, false, 0, true); list.addEventListener(ListEvent.ITEM_ROLL_OUT, passEvent, false, 0, true); list.addEventListener(ListEvent.ITEM_ROLL_OVER, passEvent, false, 0, true); list.verticalScrollBar.addEventListener(Event.SCROLL, passEvent, false, 0, true); } public function set text(_arg1:String):void{ if (!editable){ return; }; inputField.text = _arg1; } public function addItem(_arg1:Object):void{ list.addItem(_arg1); invalidate(InvalidationType.DATA); } public function get editable():Boolean{ return (_editable); } public function get labelField():String{ return (list.labelField); } protected function positionList():void{ var _local1:Point = localToGlobal(new Point(0, 0)); list.x = _local1.x; if (((_local1.y + height) + list.height) > stage.stageHeight){ list.y = (_local1.y - list.height); } else { list.y = (_local1.y + height); }; } protected function onStageClick(_arg1:MouseEvent):void{ if (!isOpen){ return; }; if (((!(contains((_arg1.target as DisplayObject)))) && (!(list.contains((_arg1.target as DisplayObject)))))){ if (highlightedCell != -1){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); }; } public function set dropdownWidth(_arg1:Number):void{ _dropdownWidth = _arg1; invalidate(InvalidationType.SIZE); } public function get prompt():String{ return (_prompt); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ isKeyDown = true; if (_arg1.ctrlKey){ switch (_arg1.keyCode){ case Keyboard.UP: if (highlightedCell > -1){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); break; case Keyboard.DOWN: open(); break; }; return; }; _arg1.stopPropagation(); var _local2:int = Math.max(((calculateAvailableHeight() / list.rowHeight) << 0), 1); var _local3:uint = selectedIndex; var _local4:Number = ((highlightedCell)==-1) ? selectedIndex : highlightedCell; var _local5 = -1; switch (_arg1.keyCode){ case Keyboard.SPACE: if (isOpen){ close(); } else { open(); }; return; case Keyboard.ESCAPE: if (isOpen){ if (highlightedCell > -1){ selectedIndex = selectedIndex; }; close(); }; return; case Keyboard.UP: _local5 = Math.max(0, (_local4 - 1)); break; case Keyboard.DOWN: _local5 = Math.min((length - 1), (_local4 + 1)); break; case Keyboard.PAGE_UP: _local5 = Math.max((_local4 - _local2), 0); break; case Keyboard.PAGE_DOWN: _local5 = Math.min((_local4 + _local2), (length - 1)); break; case Keyboard.HOME: _local5 = 0; break; case Keyboard.END: _local5 = (length - 1); break; case Keyboard.ENTER: if (((_editable) && ((highlightedCell == -1)))){ editableValue = inputField.text; selectedIndex = -1; } else { if (((isOpen) && ((highlightedCell > -1)))){ editableValue = null; selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; }; dispatchEvent(new ComponentEvent(ComponentEvent.ENTER)); close(); return; default: if (editable){ break; }; _local5 = list.getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), _local4); break; }; if (_local5 > -1){ if (isOpen){ highlightCell(_local5); inputField.text = list.itemToLabel(getItemAt(_local5)); } else { highlightCell(); selectedIndex = _local5; dispatchEvent(new Event(Event.CHANGE)); }; }; } public function get value():String{ var _local1:Object; if (editableValue != null){ return (editableValue); }; _local1 = selectedItem; if (((!(_editable)) && (!((_local1.data == null))))){ return (_local1.data); }; return (itemToLabel(_local1)); } override protected function focusInHandler(_arg1:FocusEvent):void{ super.focusInHandler(_arg1); if (editable){ stage.focus = inputField.textField; }; } public function set dataProvider(_arg1:DataProvider):void{ _arg1.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true); list.dataProvider = _arg1; invalidate(InvalidationType.DATA); } public function get rowCount():uint{ return (_rowCount); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; if (!_editable){ return; }; inputField.restrict = _arg1; } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ return (list.replaceItemAt(_arg1, _arg2)); } public function removeAll():void{ list.removeAll(); inputField.text = ""; invalidate(InvalidationType.DATA); } protected function onTextInput(_arg1:Event):void{ _arg1.stopPropagation(); if (!_editable){ return; }; editableValue = inputField.text; selectedIndex = -1; dispatchEvent(new Event(Event.CHANGE)); } protected function onInputFieldFocus(_arg1:FocusEvent):void{ inputField.addEventListener(ComponentEvent.ENTER, onEnter, false, 0, true); close(); } protected function onListItemUp(_arg1:MouseEvent):void{ stage.removeEventListener(MouseEvent.MOUSE_UP, onListItemUp); if (((!((_arg1.target is ICellRenderer))) || (!(list.contains((_arg1.target as DisplayObject)))))){ return; }; editableValue = null; var _local2:* = selectedIndex; selectedIndex = _arg1.target.listData.index; if (_local2 != selectedIndex){ dispatchEvent(new Event(Event.CHANGE)); }; close(); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ isKeyDown = false; } protected function drawLayout():void{ var _local1:Number = (getStyleValue("buttonWidth") as Number); var _local2:Number = (getStyleValue("textPadding") as Number); background.setSize(width, height); inputField.x = (inputField.y = _local2); inputField.setSize(((width - _local1) - _local2), (height - _local2)); list.width = (isNaN(_dropdownWidth)) ? width : _dropdownWidth; background.enabled = enabled; background.drawNow(); } public function set selectedItem(_arg1:Object):void{ list.selectedItem = _arg1; invalidate(InvalidationType.SELECTED); } public function getItemAt(_arg1:uint):Object{ return (list.getItemAt(_arg1)); } override protected function initializeAccessibility():void{ if (ComboBox.createAccessibilityImplementation != null){ ComboBox.createAccessibilityImplementation(this); }; } public function itemToLabel(_arg1:Object):String{ if (_arg1 == null){ return (""); }; return (list.itemToLabel(_arg1)); } public function addItemAt(_arg1:Object, _arg2:uint):void{ list.addItemAt(_arg1, _arg2); invalidate(InvalidationType.DATA); } private function addCloseListener(_arg1:Event){ removeEventListener(Event.ENTER_FRAME, addCloseListener); if (!isOpen){ return; }; stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageClick, false, 0, true); } protected function setEmbedFonts():void{ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ inputField.textField.embedFonts = _local1; }; } public function set rowCount(_arg1:uint):void{ _rowCount = _arg1; invalidate(InvalidationType.SIZE); } public function removeItem(_arg1:Object):Object{ return (list.removeItem(_arg1)); } public function get dataProvider():DataProvider{ return (list.dataProvider); } public function get restrict():String{ return (inputField.restrict); } protected function showPrompt():void{ inputField.text = _prompt; } public function sortItems(... _args){ return (list.sortItems.apply(list, _args)); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; drawTextField(); } public function set labelField(_arg1:String):void{ list.labelField = _arg1; invalidate(InvalidationType.DATA); } public function get textField():TextInput{ return (inputField); } public function set prompt(_arg1:String):void{ if (_arg1 == ""){ _prompt = null; } else { _prompt = _arg1; }; invalidate(InvalidationType.STATE); } public function set labelFunction(_arg1:Function):void{ list.labelFunction = _arg1; invalidate(InvalidationType.DATA); } protected function setStyles():void{ copyStylesToChild(background, BACKGROUND_STYLES); copyStylesToChild(list, LIST_STYLES); } public function get length():int{ return (list.length); } protected function drawTextFormat():void{ var _local1:TextFormat = (getStyleValue((_enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local1 == null){ _local1 = new TextFormat(); }; inputField.textField.defaultTextFormat = _local1; inputField.textField.setTextFormat(_local1); setEmbedFonts(); } protected function drawTextField():void{ inputField.setStyle("upSkin", ""); inputField.setStyle("disabledSkin", ""); inputField.enabled = enabled; inputField.editable = _editable; inputField.textField.selectable = ((enabled) && (_editable)); inputField.mouseEnabled = (inputField.mouseChildren = ((enabled) && (_editable))); inputField.focusEnabled = false; if (_editable){ inputField.addEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus, false, 0, true); inputField.addEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut, false, 0, true); } else { inputField.removeEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus); inputField.removeEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut); }; } public function get labelFunction():Function{ return (list.labelFunction); } public function set selectedIndex(_arg1:int):void{ list.selectedIndex = _arg1; highlightCell(); invalidate(InvalidationType.SELECTED); } public function get selectedIndex():int{ return (list.selectedIndex); } public function close():void{ highlightCell(); highlightedCell = -1; if (!isOpen){ return; }; dispatchEvent(new Event(Event.CLOSE)); stage.removeEventListener(MouseEvent.MOUSE_DOWN, onStageClick); isOpen = false; stage.removeChild(list); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, List.getStyleDefinition())); } } }//package fl.controls
Section 147
//LabelButton (fl.controls.LabelButton) package fl.controls { import fl.core.*; import flash.display.*; import flash.events.*; import flash.text.*; import fl.managers.*; import fl.events.*; import flash.ui.*; public class LabelButton extends BaseButton implements IFocusManagerComponent { protected var _toggle:Boolean;// = false public var textField:TextField; protected var mode:String;// = "center" protected var _labelPlacement:String;// = "right" protected var oldMouseState:String; protected var _label:String;// = "Label" protected var icon:DisplayObject; private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false}; public static var createAccessibilityImplementation:Function; override protected function draw():void{ if (textField.text != _label){ label = _label; }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); drawIcon(); drawTextFormat(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } override protected function drawLayout():void{ var _local7:Number; var _local8:Number; var _local1:Number = Number(getStyleValue("textPadding")); var _local2:String = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement; textField.height = (textField.textHeight + 4); var _local3:Number = (textField.textWidth + 4); var _local4:Number = (textField.textHeight + 4); var _local5:Number = ((icon)==null) ? 0 : (icon.width + _local1); var _local6:Number = ((icon)==null) ? 0 : (icon.height + _local1); textField.visible = (label.length > 0); if (icon != null){ icon.x = Math.round(((width - icon.width) / 2)); icon.y = Math.round(((height - icon.height) / 2)); }; if (textField.visible == false){ textField.width = 0; textField.height = 0; } else { if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){ _local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1)))); if ((height - 2) > _local4){ _local8 = _local4; } else { _local8 = (height - 2); }; _local3 = _local7; textField.width = _local3; _local4 = _local8; textField.height = _local4; textField.x = Math.round(((width - _local3) / 2)); textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0)); if (icon != null){ icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1)); }; } else { _local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1)))); _local3 = _local7; textField.width = _local3; textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0)); textField.y = Math.round(((height - textField.height) / 2)); if (icon != null){ icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1)); }; }; }; super.drawLayout(); } protected function toggleSelected(_arg1:MouseEvent):void{ selected = !(selected); dispatchEvent(new Event(Event.CHANGE, true)); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ setMouseState(oldMouseState); oldMouseState = null; endPress(); dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } public function get labelPlacement():String{ return (_labelPlacement); } public function get toggle():Boolean{ return (_toggle); } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } override public function get selected():Boolean{ return ((_toggle) ? _selected : false); } override protected function configUI():void{ super.configUI(); textField = new TextField(); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; addChild(textField); } override protected function initializeAccessibility():void{ if (LabelButton.createAccessibilityImplementation != null){ LabelButton.createAccessibilityImplementation(this); }; } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidate(InvalidationType.SIZE); } protected function drawIcon():void{ var _local1:DisplayObject = icon; var _local2:String = (enabled) ? mouseState : "disabled"; if (selected){ _local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1)); }; _local2 = (_local2 + "Icon"); var _local3:Object = getStyleValue(_local2); if (_local3 == null){ _local3 = getStyleValue("icon"); }; if (_local3 != null){ icon = getDisplayObjectInstance(_local3); }; if (icon != null){ addChildAt(icon, 1); }; if (((!((_local1 == null))) && (!((_local1 == icon))))){ removeChild(_local1); }; } public function set label(_arg1:String):void{ _label = _arg1; if (textField.text != _label){ textField.text = _label; dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE)); }; invalidate(InvalidationType.SIZE); invalidate(InvalidationType.STYLES); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (oldMouseState == null){ oldMouseState = mouseState; }; setMouseState("down"); startPress(); }; } public function set toggle(_arg1:Boolean):void{ if (((!(_arg1)) && (super.selected))){ selected = false; }; _toggle = _arg1; if (_toggle){ addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true); } else { removeEventListener(MouseEvent.CLICK, toggleSelected); }; invalidate(InvalidationType.STATE); } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_toggle){ invalidate(InvalidationType.STATE); }; } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); } public function get label():String{ return (_label); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition())); } } }//package fl.controls
Section 148
//List (fl.controls.List) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.display.*; import flash.geom.*; import flash.events.*; import fl.managers.*; import flash.utils.*; import flash.ui.*; public class List extends SelectableList implements IFocusManagerComponent { protected var _iconField:String;// = "icon" protected var _labelField:String;// = "label" protected var _iconFunction:Function; protected var _rowHeight:Number;// = 20 protected var _cellRenderer:Object; protected var _labelFunction:Function; private static var defaultStyles:Object = {focusRectSkin:null, focusRectPadding:null}; public static var createAccessibilityImplementation:Function; public function get iconField():String{ return (_iconField); } public function set iconField(_arg1:String):void{ if (_arg1 == _iconField){ return; }; _iconField = _arg1; invalidate(InvalidationType.DATA); } public function set labelField(_arg1:String):void{ if (_arg1 == _labelField){ return; }; _labelField = _arg1; invalidate(InvalidationType.DATA); } public function set rowHeight(_arg1:Number):void{ _rowHeight = _arg1; invalidate(InvalidationType.SIZE); } override protected function draw():void{ var _local1 = !((contentHeight == (rowHeight * length))); contentHeight = (rowHeight * length); if (isInvalid(InvalidationType.STYLES)){ setStyles(); drawBackground(); if (contentPadding != getStyleValue("contentPadding")){ invalidate(InvalidationType.SIZE, false); }; if (_cellRenderer != getStyleValue("cellRenderer")){ _invalidateList(); _cellRenderer = getStyleValue("cellRenderer"); }; }; if (((isInvalid(InvalidationType.SIZE, InvalidationType.STATE)) || (_local1))){ drawLayout(); }; if (isInvalid(InvalidationType.RENDERER_STYLES)){ updateRendererStyles(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.SCROLL, InvalidationType.SELECTED)){ drawList(); }; updateChildren(); validate(); } override public function get rowCount():uint{ return (Math.ceil((calculateAvailableHeight() / rowHeight))); } override protected function configUI():void{ useFixedHorizontalScrolling = true; _horizontalScrollPolicy = ScrollPolicy.AUTO; _verticalScrollPolicy = ScrollPolicy.AUTO; super.configUI(); } public function set labelFunction(_arg1:Function):void{ if (_labelFunction == _arg1){ return; }; _labelFunction = _arg1; invalidate(InvalidationType.DATA); } override public function scrollToIndex(_arg1:int):void{ drawNow(); var _local2:uint = (Math.floor(((_verticalScrollPosition + availableHeight) / rowHeight)) - 1); var _local3:uint = Math.ceil((_verticalScrollPosition / rowHeight)); if (_arg1 < _local3){ verticalScrollPosition = (_arg1 * rowHeight); } else { if (_arg1 > _local2){ verticalScrollPosition = (((_arg1 + 1) * rowHeight) - availableHeight); }; }; } override protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ list.x = -(_arg1); super.setHorizontalScrollPosition(_arg1, true); } override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ var _local4:int = Math.max(Math.floor((calculateAvailableHeight() / rowHeight)), 1); var _local5 = -1; var _local6:int; switch (_arg1){ case Keyboard.UP: if (caretIndex > 0){ _local5 = (caretIndex - 1); }; break; case Keyboard.DOWN: if (caretIndex < (length - 1)){ _local5 = (caretIndex + 1); }; break; case Keyboard.PAGE_UP: if (caretIndex > 0){ _local5 = Math.max((caretIndex - _local4), 0); }; break; case Keyboard.PAGE_DOWN: if (caretIndex < (length - 1)){ _local5 = Math.min((caretIndex + _local4), (length - 1)); }; break; case Keyboard.HOME: if (caretIndex > 0){ _local5 = 0; }; break; case Keyboard.END: if (caretIndex < (length - 1)){ _local5 = (length - 1); }; break; }; if (_local5 >= 0){ doKeySelection(_local5, _arg2, _arg3); scrollToSelected(); }; } protected function doKeySelection(_arg1:int, _arg2:Boolean, _arg3:Boolean):void{ var _local5:int; var _local6:Array; var _local7:int; var _local8:int; var _local4:Boolean; if (_arg2){ _local6 = []; _local7 = lastCaretIndex; _local8 = _arg1; if (_local7 == -1){ _local7 = ((caretIndex)!=-1) ? caretIndex : _arg1; }; if (_local7 > _local8){ _local8 = _local7; _local7 = _arg1; }; _local5 = _local7; while (_local5 <= _local8) { _local6.push(_local5); _local5++; }; selectedIndices = _local6; caretIndex = _arg1; _local4 = true; } else { selectedIndex = _arg1; caretIndex = (lastCaretIndex = _arg1); _local4 = true; }; if (_local4){ dispatchEvent(new Event(Event.CHANGE)); }; invalidate(InvalidationType.DATA); } public function get rowHeight():Number{ return (_rowHeight); } override protected function initializeAccessibility():void{ if (List.createAccessibilityImplementation != null){ List.createAccessibilityImplementation(this); }; } public function get labelField():String{ return (_labelField); } public function set iconFunction(_arg1:Function):void{ if (_iconFunction == _arg1){ return; }; _iconFunction = _arg1; invalidate(InvalidationType.DATA); } public function set rowCount(_arg1:uint):void{ var _local2:Number = Number(getStyleValue("contentPadding")); var _local3:Number = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0; height = (((rowHeight * _arg1) + (2 * _local2)) + _local3); } public function get labelFunction():Function{ return (_labelFunction); } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ invalidate(InvalidationType.SCROLL); super.setVerticalScrollPosition(_arg1, true); } override protected function drawList():void{ var _local4:uint; var _local5:Object; var _local6:ICellRenderer; var _local9:Boolean; var _local10:String; var _local11:Object; var _local12:Sprite; var _local13:String; listHolder.x = (listHolder.y = contentPadding); var _local1:Rectangle = listHolder.scrollRect; _local1.x = _horizontalScrollPosition; _local1.y = (Math.floor(_verticalScrollPosition) % rowHeight); listHolder.scrollRect = _local1; listHolder.cacheAsBitmap = useBitmapScrolling; var _local2:uint = Math.floor((_verticalScrollPosition / rowHeight)); var _local3:uint = Math.min(length, ((_local2 + rowCount) + 1)); var _local7:Dictionary = (renderedItems = new Dictionary(true)); _local4 = _local2; while (_local4 < _local3) { _local7[_dataProvider.getItemAt(_local4)] = true; _local4++; }; var _local8:Dictionary = new Dictionary(true); while (activeCellRenderers.length > 0) { _local6 = (activeCellRenderers.pop() as ICellRenderer); _local5 = _local6.data; if ((((_local7[_local5] == null)) || ((invalidItems[_local5] == true)))){ availableCellRenderers.push(_local6); } else { _local8[_local5] = _local6; invalidItems[_local5] = true; }; list.removeChild((_local6 as DisplayObject)); }; invalidItems = new Dictionary(true); _local4 = _local2; while (_local4 < _local3) { _local9 = false; _local5 = _dataProvider.getItemAt(_local4); if (_local8[_local5] != null){ _local9 = true; _local6 = _local8[_local5]; delete _local8[_local5]; } else { if (availableCellRenderers.length > 0){ _local6 = (availableCellRenderers.pop() as ICellRenderer); } else { _local6 = (getDisplayObjectInstance(getStyleValue("cellRenderer")) as ICellRenderer); _local12 = (_local6 as Sprite); if (_local12 != null){ _local12.addEventListener(MouseEvent.CLICK, handleCellRendererClick, false, 0, true); _local12.addEventListener(MouseEvent.ROLL_OVER, handleCellRendererMouseEvent, false, 0, true); _local12.addEventListener(MouseEvent.ROLL_OUT, handleCellRendererMouseEvent, false, 0, true); _local12.addEventListener(Event.CHANGE, handleCellRendererChange, false, 0, true); _local12.doubleClickEnabled = true; _local12.addEventListener(MouseEvent.DOUBLE_CLICK, handleCellRendererDoubleClick, false, 0, true); if (_local12.hasOwnProperty("setStyle")){ for (_local13 in rendererStyles) { var _local16 = _local12; _local16["setStyle"](_local13, rendererStyles[_local13]); }; }; }; }; }; list.addChild((_local6 as Sprite)); activeCellRenderers.push(_local6); _local6.y = (rowHeight * (_local4 - _local2)); _local6.setSize((availableWidth + _maxHorizontalScrollPosition), rowHeight); _local10 = itemToLabel(_local5); _local11 = null; if (_iconFunction != null){ _local11 = _iconFunction(_local5); } else { if (_iconField != null){ _local11 = _local5[_iconField]; }; }; if (!_local9){ _local6.data = _local5; }; _local6.listData = new ListData(_local10, _local11, this, _local4, _local4, 0); _local6.selected = !((_selectedIndices.indexOf(_local4) == -1)); if ((_local6 is UIComponent)){ (_local6 as UIComponent).drawNow(); }; _local4++; }; } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int; if (!selectable){ return; }; switch (_arg1.keyCode){ case Keyboard.UP: case Keyboard.DOWN: case Keyboard.END: case Keyboard.HOME: case Keyboard.PAGE_UP: case Keyboard.PAGE_DOWN: moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); break; case Keyboard.LEFT: case Keyboard.RIGHT: moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); break; case Keyboard.SPACE: if (caretIndex == -1){ caretIndex = 0; }; doKeySelection(caretIndex, _arg1.shiftKey, _arg1.ctrlKey); scrollToSelected(); break; default: _local2 = getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), selectedIndex); if (_local2 > -1){ selectedIndex = _local2; scrollToSelected(); }; break; }; _arg1.stopPropagation(); } public function get iconFunction():Function{ return (_iconFunction); } override public function itemToLabel(_arg1:Object):String{ if (_labelFunction != null){ return (String(_labelFunction(_arg1))); }; return (((_arg1[_labelField])!=null) ? String(_arg1[_labelField]) : ""); } protected function calculateAvailableHeight():Number{ var _local1:Number = Number(getStyleValue("contentPadding")); return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0)); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition())); } } }//package fl.controls
Section 149
//ScrollBar (fl.controls.ScrollBar) package fl.controls { import fl.core.*; import flash.events.*; import fl.events.*; public class ScrollBar extends UIComponent { private var _direction:String;// = "vertical" private var _minScrollPosition:Number;// = 0 private var _pageSize:Number;// = 10 private var _maxScrollPosition:Number;// = 0 protected var downArrow:BaseButton; private var _lineScrollSize:Number;// = 1 protected var upArrow:BaseButton; private var _scrollPosition:Number;// = 0 private var thumbScrollOffset:Number; protected var track:BaseButton; protected var thumb:LabelButton; protected var inDrag:Boolean;// = false private var _pageScrollSize:Number;// = 0 protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0}; public static const WIDTH:Number = 15; protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35}; public function ScrollBar(){ setStyles(); focusEnabled = false; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition)))))); updateThumb(); } override public function setSize(_arg1:Number, _arg2:Number):void{ if (_direction == ScrollBarDirection.HORIZONTAL){ super.setSize(_arg2, _arg1); } else { super.setSize(_arg1, _arg2); }; } public function set lineScrollSize(_arg1:Number):void{ if (_arg1 > 0){ _lineScrollSize = _arg1; }; } public function get minScrollPosition():Number{ return (_minScrollPosition); } protected function updateThumb():void{ var _local1:Number = ((_maxScrollPosition - _minScrollPosition) + _pageSize); if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){ thumb.height = 12; thumb.visible = false; } else { thumb.height = Math.max(13, ((_pageSize / _local1) * track.height)); thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition)))); thumb.visible = enabled; }; } public function set minScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _arg1, _maxScrollPosition); } public function get lineScrollSize():Number{ return (_lineScrollSize); } public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ var _local3:Number = scrollPosition; _scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1)); if (_local3 == _scrollPosition){ return; }; if (_arg2){ dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition)); }; updateThumb(); } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } public function get scrollPosition():Number{ return (_scrollPosition); } override public function get height():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height); } public function get pageSize():Number{ return (_pageSize); } public function set maxScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _minScrollPosition, _arg1); } protected function thumbReleaseHandler(_arg1:MouseEvent):void{ inDrag = false; mouseChildren = true; thumb.mouseStateLocked = false; stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler); } public function set pageScrollSize(_arg1:Number):void{ if (_arg1 >= 0){ _pageScrollSize = _arg1; }; } public function set scrollPosition(_arg1:Number):void{ setScrollPosition(_arg1, true); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ var _local1:Number; if (isInvalid(InvalidationType.SIZE)){ _local1 = super.height; downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height))); track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height)))); updateThumb(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ setStyles(); }; downArrow.drawNow(); upArrow.drawNow(); track.drawNow(); thumb.drawNow(); validate(); } override public function get width():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width); } override protected function configUI():void{ super.configUI(); track = new BaseButton(); track.move(0, 14); track.useHandCursor = false; track.autoRepeat = true; track.focusEnabled = false; addChild(track); thumb = new LabelButton(); thumb.label = ""; thumb.setSize(WIDTH, 15); thumb.move(0, 15); thumb.focusEnabled = false; addChild(thumb); downArrow = new BaseButton(); downArrow.setSize(WIDTH, 14); downArrow.autoRepeat = true; downArrow.focusEnabled = false; addChild(downArrow); upArrow = new BaseButton(); upArrow.setSize(WIDTH, 14); upArrow.move(0, 0); upArrow.autoRepeat = true; upArrow.focusEnabled = false; addChild(upArrow); upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true); enabled = false; } public function set pageSize(_arg1:Number):void{ if (_arg1 > 0){ _pageSize = _arg1; }; } public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ this.pageSize = _arg1; _minScrollPosition = _arg2; _maxScrollPosition = _arg3; if (_arg4 >= 0){ _pageScrollSize = _arg4; }; enabled = (_maxScrollPosition > _minScrollPosition); setScrollPosition(_scrollPosition, false); updateThumb(); } public function get pageScrollSize():Number{ return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize); } protected function handleThumbDrag(_arg1:MouseEvent):void{ var _local2:Number = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset))); setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition)); } protected function setStyles():void{ copyStylesToChild(downArrow, DOWN_ARROW_STYLES); copyStylesToChild(thumb, THUMB_STYLES); copyStylesToChild(track, TRACK_STYLES); copyStylesToChild(upArrow, UP_ARROW_STYLES); } protected function scrollPressHandler(_arg1:ComponentEvent):void{ var _local2:Number; var _local3:Number; _arg1.stopImmediatePropagation(); if (_arg1.currentTarget == upArrow){ setScrollPosition((_scrollPosition - _lineScrollSize)); } else { if (_arg1.currentTarget == downArrow){ setScrollPosition((_scrollPosition + _lineScrollSize)); } else { _local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition); _local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize; if (_scrollPosition < _local2){ setScrollPosition(Math.min(_local2, (_scrollPosition + _local3))); } else { if (_scrollPosition > _local2){ setScrollPosition(Math.max(_local2, (_scrollPosition - _local3))); }; }; }; }; } protected function thumbPressHandler(_arg1:MouseEvent):void{ inDrag = true; thumbScrollOffset = (mouseY - thumb.y); thumb.mouseStateLocked = true; mouseChildren = false; stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true); } public function set direction(_arg1:String):void{ if (_direction == _arg1){ return; }; _direction = _arg1; if (isLivePreview){ return; }; setScaleY(1); var _local2 = (_direction == ScrollBarDirection.HORIZONTAL); if (((_local2) && (componentInspectorSetting))){ if (rotation == 90){ return; }; setScaleX(-1); rotation = -90; }; if (!componentInspectorSetting){ if (((_local2) && ((rotation == 0)))){ rotation = -90; setScaleX(-1); } else { if (((!(_local2)) && ((rotation == -90)))){ rotation = 0; setScaleX(1); }; }; }; invalidate(InvalidationType.SIZE); } public function get direction():String{ return (_direction); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 150
//ScrollBarDirection (fl.controls.ScrollBarDirection) package fl.controls { public class ScrollBarDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; } }//package fl.controls
Section 151
//ScrollPolicy (fl.controls.ScrollPolicy) package fl.controls { public class ScrollPolicy { public static const OFF:String = "off"; public static const ON:String = "on"; public static const AUTO:String = "auto"; } }//package fl.controls
Section 152
//SelectableList (fl.controls.SelectableList) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.display.*; import flash.events.*; import fl.data.*; import fl.managers.*; import fl.events.*; import flash.utils.*; import fl.containers.*; import flash.ui.*; public class SelectableList extends BaseScrollPane implements IFocusManagerComponent { protected var invalidItems:Dictionary; protected var renderedItems:Dictionary; protected var caretIndex:int;// = -1 protected var updatedRendererStyles:Object; protected var _allowMultipleSelection:Boolean;// = false protected var lastCaretIndex:int;// = -1 protected var _verticalScrollPosition:Number; protected var _selectedIndices:Array; protected var preChangeItems:Array; protected var activeCellRenderers:Array; protected var availableCellRenderers:Array; protected var rendererStyles:Object; protected var list:Sprite; protected var _dataProvider:DataProvider; protected var _horizontalScrollPosition:Number; private var collectionItemImport:SimpleCollectionItem; protected var listHolder:Sprite; protected var _selectable:Boolean;// = true private static var defaultStyles:Object = {skin:"List_skin", cellRenderer:CellRenderer, contentPadding:null, disabledAlpha:null}; public static var createAccessibilityImplementation:Function; public function SelectableList(){ activeCellRenderers = []; availableCellRenderers = []; invalidItems = new Dictionary(true); renderedItems = new Dictionary(true); _selectedIndices = []; if (dataProvider == null){ dataProvider = new DataProvider(); }; verticalScrollPolicy = ScrollPolicy.AUTO; rendererStyles = {}; updatedRendererStyles = {}; } protected function drawList():void{ } protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } public function get allowMultipleSelection():Boolean{ return (_allowMultipleSelection); } protected function onPreChange(_arg1:DataChangeEvent):void{ switch (_arg1.changeType){ case DataChangeType.REMOVE: case DataChangeType.ADD: case DataChangeType.INVALIDATE: case DataChangeType.REMOVE_ALL: case DataChangeType.REPLACE: case DataChangeType.INVALIDATE_ALL: break; default: preChangeItems = selectedItems; break; }; } public function set selectedIndices(_arg1:Array):void{ if (!_selectable){ return; }; _selectedIndices = ((_arg1)==null) ? [] : _arg1.concat(); invalidate(InvalidationType.SELECTED); } public function isItemSelected(_arg1:Object):Boolean{ return ((selectedItems.indexOf(_arg1) > -1)); } public function set allowMultipleSelection(_arg1:Boolean):void{ if (_arg1 == _allowMultipleSelection){ return; }; _allowMultipleSelection = _arg1; if (((!(_arg1)) && ((_selectedIndices.length > 1)))){ _selectedIndices = [_selectedIndices.pop()]; invalidate(InvalidationType.DATA); }; } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ if (_arg1 == _verticalScrollPosition){ return; }; var _local3:Number = (_arg1 - _verticalScrollPosition); _verticalScrollPosition = _arg1; if (_arg2){ dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _local3, _arg1)); }; } public function sortItemsOn(_arg1:String, _arg2:Object=null){ return (_dataProvider.sortOn(_arg1, _arg2)); } public function getNextIndexAtLetter(_arg1:String, _arg2:int=-1):int{ var _local5:Number; var _local6:Object; var _local7:String; if (length == 0){ return (-1); }; _arg1 = _arg1.toUpperCase(); var _local3:int = (length - 1); var _local4:Number = 0; while (_local4 < _local3) { _local5 = ((_arg2 + 1) + _local4); if (_local5 > (length - 1)){ _local5 = (_local5 - length); }; _local6 = getItemAt(_local5); if (_local6 == null){ break; }; _local7 = itemToLabel(_local6); if (_local7 == null){ } else { if (_local7.charAt(0).toUpperCase() == _arg1){ return (_local5); }; }; _local4++; }; return (-1); } override protected function draw():void{ super.draw(); } public function removeItemAt(_arg1:uint):Object{ return (_dataProvider.removeItemAt(_arg1)); } public function get selectedItem():Object{ return (((_selectedIndices.length)==0) ? null : _dataProvider.getItemAt(selectedIndex)); } protected function handleDataChange(_arg1:DataChangeEvent):void{ var _local5:uint; var _local2:int = _arg1.startIndex; var _local3:int = _arg1.endIndex; var _local4:String = _arg1.changeType; if (_local4 == DataChangeType.INVALIDATE_ALL){ clearSelection(); invalidateList(); } else { if (_local4 == DataChangeType.INVALIDATE){ _local5 = 0; while (_local5 < _arg1.items.length) { invalidateItem(_arg1.items[_local5]); _local5++; }; } else { if (_local4 == DataChangeType.ADD){ _local5 = 0; while (_local5 < _selectedIndices.length) { if (_selectedIndices[_local5] >= _local2){ _selectedIndices[_local5] = (_selectedIndices[_local5] + (_local2 - _local3)); }; _local5++; }; } else { if (_local4 == DataChangeType.REMOVE){ _local5 = 0; while (_local5 < _selectedIndices.length) { if (_selectedIndices[_local5] >= _local2){ if (_selectedIndices[_local5] <= _local3){ delete _selectedIndices[_local5]; } else { _selectedIndices[_local5] = (_selectedIndices[_local5] - ((_local2 - _local3) + 1)); }; }; _local5++; }; } else { if (_local4 == DataChangeType.REMOVE_ALL){ clearSelection(); } else { if (_local4 == DataChangeType.REPLACE){ } else { selectedItems = preChangeItems; preChangeItems = null; }; }; }; }; }; }; invalidate(InvalidationType.DATA); } public function itemToCellRenderer(_arg1:Object):ICellRenderer{ var _local2:*; var _local3:ICellRenderer; if (_arg1 != null){ for (_local2 in activeCellRenderers) { _local3 = (activeCellRenderers[_local2] as ICellRenderer); if (_local3.data == _arg1){ return (_local3); }; }; }; return (null); } public function addItem(_arg1:Object):void{ _dataProvider.addItem(_arg1); invalidateList(); } public function get rowCount():uint{ return (0); } override protected function configUI():void{ super.configUI(); listHolder = new Sprite(); addChild(listHolder); listHolder.scrollRect = contentScrollRect; list = new Sprite(); listHolder.addChild(list); } public function get selectable():Boolean{ return (_selectable); } public function clearRendererStyle(_arg1:String, _arg2:int=-1):void{ delete rendererStyles[_arg1]; updatedRendererStyles[_arg1] = null; invalidate(InvalidationType.RENDERER_STYLES); } protected function handleCellRendererMouseEvent(_arg1:MouseEvent):void{ var _local2:ICellRenderer = (_arg1.target as ICellRenderer); var _local3:String = ((_arg1.type)==MouseEvent.ROLL_OVER) ? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT; dispatchEvent(new ListEvent(_local3, false, false, _local2.listData.column, _local2.listData.row, _local2.listData.index, _local2.data)); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!selectable){ return; }; switch (_arg1.keyCode){ case Keyboard.UP: case Keyboard.DOWN: case Keyboard.END: case Keyboard.HOME: case Keyboard.PAGE_UP: case Keyboard.PAGE_DOWN: moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); _arg1.stopPropagation(); break; case Keyboard.LEFT: case Keyboard.RIGHT: moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); _arg1.stopPropagation(); break; }; } protected function handleCellRendererDoubleClick(_arg1:MouseEvent):void{ if (!_enabled){ return; }; var _local2:ICellRenderer = (_arg1.currentTarget as ICellRenderer); var _local3:uint = _local2.listData.index; dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)); } public function setRendererStyle(_arg1:String, _arg2:Object, _arg3:uint=0):void{ if (rendererStyles[_arg1] == _arg2){ return; }; updatedRendererStyles[_arg1] = _arg2; rendererStyles[_arg1] = _arg2; invalidate(InvalidationType.RENDERER_STYLES); } public function set dataProvider(_arg1:DataProvider):void{ if (_dataProvider != null){ _dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange); _dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange); }; _dataProvider = _arg1; _dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true); _dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange, false, 0, true); clearSelection(); invalidateList(); } public function invalidateList():void{ _invalidateList(); invalidate(InvalidationType.DATA); } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ return (_dataProvider.replaceItemAt(_arg1, _arg2)); } public function removeAll():void{ _dataProvider.removeAll(); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; list.mouseChildren = _enabled; } public function scrollToIndex(_arg1:int):void{ } public function get selectedIndices():Array{ return (_selectedIndices.concat()); } override protected function drawLayout():void{ super.drawLayout(); contentScrollRect = listHolder.scrollRect; contentScrollRect.width = availableWidth; contentScrollRect.height = availableHeight; listHolder.scrollRect = contentScrollRect; } protected function _invalidateList():void{ availableCellRenderers = []; while (activeCellRenderers.length > 0) { list.removeChild((activeCellRenderers.pop() as DisplayObject)); }; } public function set selectedItem(_arg1:Object):void{ var _local2:int = _dataProvider.getItemIndex(_arg1); selectedIndex = _local2; } public function getItemAt(_arg1:uint):Object{ return (_dataProvider.getItemAt(_arg1)); } protected function handleCellRendererChange(_arg1:Event):void{ var _local2:ICellRenderer = (_arg1.currentTarget as ICellRenderer); var _local3:uint = _local2.listData.index; _dataProvider.invalidateItemAt(_local3); } protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } public function itemToLabel(_arg1:Object):String{ return (_arg1["label"]); } public function addItemAt(_arg1:Object, _arg2:uint):void{ _dataProvider.addItemAt(_arg1, _arg2); invalidateList(); } override protected function initializeAccessibility():void{ if (SelectableList.createAccessibilityImplementation != null){ SelectableList.createAccessibilityImplementation(this); }; } protected function updateRendererStyles():void{ var _local4:String; var _local1:Array = availableCellRenderers.concat(activeCellRenderers); var _local2:uint = _local1.length; var _local3:uint; while (_local3 < _local2) { if (_local1[_local3].setStyle == null){ } else { for (_local4 in updatedRendererStyles) { _local1[_local3].setStyle(_local4, updatedRendererStyles[_local4]); }; _local1[_local3].drawNow(); }; _local3++; }; updatedRendererStyles = {}; } public function set selectable(_arg1:Boolean):void{ if (_arg1 == _selectable){ return; }; if (!_arg1){ selectedIndices = []; }; _selectable = _arg1; } public function removeItem(_arg1:Object):Object{ return (_dataProvider.removeItem(_arg1)); } public function get dataProvider():DataProvider{ return (_dataProvider); } public function set maxHorizontalScrollPosition(_arg1:Number):void{ _maxHorizontalScrollPosition = _arg1; invalidate(InvalidationType.SIZE); } public function clearSelection():void{ selectedIndex = -1; } public function invalidateItemAt(_arg1:uint):void{ var _local2:Object = _dataProvider.getItemAt(_arg1); if (_local2 != null){ invalidateItem(_local2); }; } public function sortItems(... _args){ return (_dataProvider.sort.apply(_dataProvider, _args)); } public function set selectedItems(_arg1:Array):void{ var _local4:int; if (_arg1 == null){ selectedIndices = null; return; }; var _local2:Array = []; var _local3:uint; while (_local3 < _arg1.length) { _local4 = _dataProvider.getItemIndex(_arg1[_local3]); if (_local4 != -1){ _local2.push(_local4); }; _local3++; }; selectedIndices = _local2; } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ if (_arg1 == _horizontalScrollPosition){ return; }; var _local3:Number = (_arg1 - _horizontalScrollPosition); _horizontalScrollPosition = _arg1; if (_arg2){ dispatchEvent(new ScrollEvent(ScrollBarDirection.HORIZONTAL, _local3, _arg1)); }; } override public function get maxHorizontalScrollPosition():Number{ return (_maxHorizontalScrollPosition); } public function scrollToSelected():void{ scrollToIndex(selectedIndex); } public function get selectedItems():Array{ var _local1:Array = []; var _local2:uint; while (_local2 < _selectedIndices.length) { _local1.push(_dataProvider.getItemAt(_selectedIndices[_local2])); _local2++; }; return (_local1); } public function get length():uint{ return (_dataProvider.length); } public function invalidateItem(_arg1:Object):void{ if (renderedItems[_arg1] == null){ return; }; invalidItems[_arg1] = true; invalidate(InvalidationType.DATA); } public function set selectedIndex(_arg1:int):void{ selectedIndices = ((_arg1)==-1) ? null : [_arg1]; } public function get selectedIndex():int{ return (((_selectedIndices.length)==0) ? -1 : _selectedIndices[(_selectedIndices.length - 1)]); } public function getRendererStyle(_arg1:String, _arg2:int=-1):Object{ return (rendererStyles[_arg1]); } protected function handleCellRendererClick(_arg1:MouseEvent):void{ var _local5:int; var _local6:uint; if (!_enabled){ return; }; var _local2:ICellRenderer = (_arg1.currentTarget as ICellRenderer); var _local3:uint = _local2.listData.index; if (((!(dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)))) || (!(_selectable)))){ return; }; var _local4:int = selectedIndices.indexOf(_local3); if (!_allowMultipleSelection){ if (_local4 != -1){ return; }; _local2.selected = true; _selectedIndices = [_local3]; lastCaretIndex = (caretIndex = _local3); } else { if (_arg1.shiftKey){ _local6 = ((_selectedIndices.length)>0) ? _selectedIndices[0] : _local3; _selectedIndices = []; if (_local6 > _local3){ _local5 = _local6; while (_local5 >= _local3) { _selectedIndices.push(_local5); _local5--; }; } else { _local5 = _local6; while (_local5 <= _local3) { _selectedIndices.push(_local5); _local5++; }; }; caretIndex = _local3; } else { if (_arg1.ctrlKey){ if (_local4 != -1){ _local2.selected = false; _selectedIndices.splice(_local4, 1); } else { _local2.selected = true; _selectedIndices.push(_local3); }; caretIndex = _local3; } else { _selectedIndices = [_local3]; lastCaretIndex = (caretIndex = _local3); }; }; }; dispatchEvent(new Event(Event.CHANGE)); invalidate(InvalidationType.DATA); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition())); } } }//package fl.controls
Section 153
//TextArea (fl.controls.TextArea) package fl.controls { import fl.core.*; import flash.display.*; import flash.events.*; import flash.text.*; import fl.managers.*; import fl.events.*; import flash.ui.*; import flash.system.*; public class TextArea extends UIComponent implements IFocusManagerComponent { protected var _horizontalScrollBar:UIScrollBar; protected var _html:Boolean;// = false protected var background:DisplayObject; protected var _verticalScrollBar:UIScrollBar; protected var _savedHTML:String; protected var _horizontalScrollPolicy:String;// = "auto" protected var _editable:Boolean;// = true protected var textHasChanged:Boolean;// = false public var textField:TextField; protected var _wordWrap:Boolean;// = true protected var _verticalScrollPolicy:String;// = "auto" protected static const SCROLL_BAR_STYLES:Object = {downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {upSkin:"TextArea_upSkin", disabledSkin:"TextArea_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function set alwaysShowSelection(_arg1:Boolean):void{ textField.alwaysShowSelection = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseChildren = enabled; invalidate(InvalidationType.STATE); } override protected function focusInHandler(_arg1:FocusEvent):void{ setIMEMode(true); if (_arg1.target == this){ stage.focus = textField; }; var _local2:IFocusManager = focusManager; if (_local2){ if (editable){ _local2.showFocusIndicator = true; }; _local2.defaultButtonEnabled = false; }; super.focusInHandler(_arg1); if (editable){ setIMEMode(true); }; } protected function handleChange(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new Event(Event.CHANGE, true)); invalidate(InvalidationType.DATA); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } public function get imeMode():String{ return (IME.conversionMode); } override public function drawFocus(_arg1:Boolean):void{ if (focusTarget != null){ focusTarget.drawFocus(_arg1); return; }; super.drawFocus(_arg1); } protected function handleWheel(_arg1:MouseEvent):void{ if (((!(enabled)) || (!(_verticalScrollBar.visible)))){ return; }; _verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * _verticalScrollBar.lineScrollSize)); dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, (_arg1.delta * _verticalScrollBar.lineScrollSize), _verticalScrollBar.scrollPosition)); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; invalidate(InvalidationType.DATA); } public function get textWidth():Number{ drawNow(); return (textField.textWidth); } override protected function focusOutHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager = focusManager; if (_local2){ _local2.defaultButtonEnabled = true; }; setSelection(0, 0); super.focusOutHandler(_arg1); if (editable){ setIMEMode(false); }; } protected function handleScroll(_arg1:ScrollEvent):void{ dispatchEvent(_arg1); } protected function drawLayout():void{ var _local1:Number = Number(getStyleValue("textPadding")); textField.x = (textField.y = _local1); background.width = width; background.height = height; var _local2:Number = height; var _local3:Boolean = needVScroll(); var _local4:Number = (width - (_local3) ? _verticalScrollBar.width : 0); var _local5:Boolean = needHScroll(); if (_local5){ _local2 = (_local2 - _horizontalScrollBar.height); }; setTextSize(_local4, _local2, _local1); if (((((_local5) && (!(_local3)))) && (needVScroll()))){ _local3 = true; _local4 = (_local4 - _verticalScrollBar.width); setTextSize(_local4, _local2, _local1); }; if (_local3){ _verticalScrollBar.visible = true; _verticalScrollBar.x = (width - _verticalScrollBar.width); _verticalScrollBar.height = _local2; _verticalScrollBar.visible = true; _verticalScrollBar.enabled = enabled; } else { _verticalScrollBar.visible = false; }; if (_local5){ _horizontalScrollBar.visible = true; _horizontalScrollBar.y = (height - _horizontalScrollBar.height); _horizontalScrollBar.width = _local4; _horizontalScrollBar.visible = true; _horizontalScrollBar.enabled = enabled; } else { _horizontalScrollBar.visible = false; }; updateScrollBars(); addEventListener(Event.ENTER_FRAME, delayedLayoutUpdate, false, 0, true); } public function set displayAsPassword(_arg1:Boolean):void{ textField.displayAsPassword = _arg1; } protected function drawBackground():void{ var _local1:DisplayObject = background; var _local2:String = (enabled) ? "upSkin" : "disabledSkin"; background = getDisplayObjectInstance(getStyleValue(_local2)); if (background != null){ addChildAt(background, 0); }; if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){ removeChild(_local1); }; } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } protected function delayedLayoutUpdate(_arg1:Event):void{ if (textHasChanged){ textHasChanged = false; drawLayout(); return; }; removeEventListener(Event.ENTER_FRAME, delayedLayoutUpdate); } public function get verticalScrollPosition():Number{ return (textField.scrollV); } public function get text():String{ return (textField.text); } public function get verticalScrollBar():UIScrollBar{ return (_verticalScrollBar); } public function set maxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function get textHeight():Number{ drawNow(); return (textField.textHeight); } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } public function get maxVerticalScrollPosition():int{ return (textField.maxScrollV); } public function set horizontalScrollPosition(_arg1:Number):void{ drawNow(); textField.scrollH = _arg1; } public function get restrict():String{ return (textField.restrict); } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } public function get alwaysShowSelection():Boolean{ return (textField.alwaysShowSelection); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STATE)){ updateTextFieldType(); }; if (isInvalid(InvalidationType.STYLES)){ setStyles(); setEmbedFont(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA)){ drawLayout(); }; super.draw(); } public function set horizontalScrollPolicy(_arg1:String):void{ _horizontalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; invalidate(InvalidationType.STATE); } public function setSelection(_arg1:int, _arg2:int):void{ textField.setSelection(_arg1, _arg2); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } public function get displayAsPassword():Boolean{ return (textField.displayAsPassword); } protected function setTextSize(_arg1:Number, _arg2:Number, _arg3:Number):void{ var _local4:Number = (_arg1 - (_arg3 * 2)); var _local5:Number = (_arg2 - (_arg3 * 2)); if (_local4 != textField.width){ textField.width = _local4; }; if (_local5 != textField.height){ textField.height = _local5; }; } public function get horizontalScrollBar():UIScrollBar{ return (_horizontalScrollBar); } public function get selectionBeginIndex():int{ return (textField.selectionBeginIndex); } override protected function configUI():void{ super.configUI(); tabChildren = true; textField = new TextField(); addChild(textField); updateTextFieldType(); _verticalScrollBar = new UIScrollBar(); _verticalScrollBar.name = "V"; _verticalScrollBar.visible = false; _verticalScrollBar.focusEnabled = false; copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); _verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); addChild(_verticalScrollBar); _horizontalScrollBar = new UIScrollBar(); _horizontalScrollBar.name = "H"; _horizontalScrollBar.visible = false; _horizontalScrollBar.focusEnabled = false; _horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL; copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); _horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); addChild(_horizontalScrollBar); textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true); textField.addEventListener(Event.CHANGE, handleChange, false, 0, true); textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true); _horizontalScrollBar.scrollTarget = textField; _verticalScrollBar.scrollTarget = textField; addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true); } public function set verticalScrollPosition(_arg1:Number):void{ drawNow(); textField.scrollV = _arg1; } public function get maxChars():int{ return (textField.maxChars); } public function set text(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ return; }; textField.text = _arg1; _html = false; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); textHasChanged = true; } protected function updateScrollBars(){ _horizontalScrollBar.update(); _verticalScrollBar.update(); _verticalScrollBar.enabled = enabled; _horizontalScrollBar.enabled = enabled; _horizontalScrollBar.drawNow(); _verticalScrollBar.drawNow(); } public function get maxHorizontalScrollPosition():int{ return (textField.maxScrollH); } protected function needHScroll():Boolean{ if (_horizontalScrollPolicy == ScrollPolicy.OFF){ return (false); }; if (_horizontalScrollPolicy == ScrollPolicy.ON){ return (true); }; return ((textField.maxScrollH > 0)); } protected function handleKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true)); }; } public function get horizontalScrollPosition():Number{ return (textField.scrollH); } public function get selectionEndIndex():int{ return (textField.selectionEndIndex); } public function get editable():Boolean{ return (_editable); } protected function updateTextFieldType():void{ textField.type = (((enabled) && (_editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; textField.wordWrap = _wordWrap; textField.multiline = true; } public function appendText(_arg1:String):void{ textField.appendText(_arg1); invalidate(InvalidationType.DATA); } public function set wordWrap(_arg1:Boolean):void{ _wordWrap = _arg1; invalidate(InvalidationType.STATE); } public function set verticalScrollPolicy(_arg1:String):void{ _verticalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } protected function setStyles():void{ copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); } public function get length():Number{ return (textField.text.length); } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); if (_html){ textField.htmlText = _savedHTML; }; } public function set htmlText(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ return; }; if (_arg1 == ""){ text = ""; return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); textHasChanged = true; } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } protected function handleTextInput(_arg1:TextEvent):void{ _arg1.stopPropagation(); dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text)); } public function get htmlText():String{ return (textField.htmlText); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return (textField.getLineMetrics(_arg1)); } public function get wordWrap():Boolean{ return (_wordWrap); } protected function needVScroll():Boolean{ if (_verticalScrollPolicy == ScrollPolicy.OFF){ return (false); }; if (_verticalScrollPolicy == ScrollPolicy.ON){ return (true); }; return ((textField.maxScrollV > 1)); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; textField.restrict = _arg1; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.controls
Section 154
//TextInput (fl.controls.TextInput) package fl.controls { import fl.core.*; import flash.display.*; import flash.events.*; import flash.text.*; import fl.managers.*; import fl.events.*; import flash.ui.*; public class TextInput extends UIComponent implements IFocusManagerComponent { protected var _html:Boolean;// = false protected var background:DisplayObject; protected var _savedHTML:String; protected var _editable:Boolean;// = true public var textField:TextField; private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function set alwaysShowSelection(_arg1:Boolean):void{ textField.alwaysShowSelection = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; updateTextFieldType(); } public function get imeMode():String{ return (_imeMode); } protected function handleChange(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new Event(Event.CHANGE, true)); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } protected function drawLayout():void{ var _local1:Number = Number(getStyleValue("textPadding")); if (background != null){ background.width = width; background.height = height; }; textField.width = (width - (2 * _local1)); textField.height = (height - (2 * _local1)); textField.x = (textField.y = _local1); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; } public function get textWidth():Number{ return (textField.textWidth); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (editable){ setIMEMode(false); }; } override public function setFocus():void{ stage.focus = textField; } public function set displayAsPassword(_arg1:Boolean):void{ textField.displayAsPassword = _arg1; } protected function drawBackground():void{ var _local1:DisplayObject = background; var _local2:String = (enabled) ? "upSkin" : "disabledSkin"; background = getDisplayObjectInstance(getStyleValue(_local2)); if (background == null){ return; }; addChildAt(background, 0); if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){ removeChild(_local1); }; } public function get text():String{ return (textField.text); } public function set maxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function set horizontalScrollPosition(_arg1:int):void{ textField.scrollH = _arg1; } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } public function get textHeight():Number{ return (textField.textHeight); } public function get restrict():String{ return (textField.restrict); } public function get alwaysShowSelection():Boolean{ return (textField.alwaysShowSelection); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ var _local1:Object; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); drawBackground(); _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; updateTextFieldType(); } public function setSelection(_arg1:int, _arg2:int):void{ textField.setSelection(_arg1, _arg2); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } public function get displayAsPassword():Boolean{ return (textField.displayAsPassword); } public function get selectionBeginIndex():int{ return (textField.selectionBeginIndex); } override protected function configUI():void{ super.configUI(); tabChildren = true; textField = new TextField(); addChild(textField); updateTextFieldType(); textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true); textField.addEventListener(Event.CHANGE, handleChange, false, 0, true); textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true); } public function get maxChars():int{ return (textField.maxChars); } public function set text(_arg1:String):void{ textField.text = _arg1; _html = false; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } protected function updateTextFieldType():void{ textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; } protected function handleKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true)); }; } public function get horizontalScrollPosition():int{ return (textField.scrollH); } public function get selectionEndIndex():int{ return (textField.selectionEndIndex); } public function get editable():Boolean{ return (_editable); } public function get maxHorizontalScrollPosition():int{ return (textField.maxScrollH); } public function appendText(_arg1:String):void{ textField.appendText(_arg1); } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); if (_html){ textField.htmlText = _savedHTML; }; } public function get length():int{ return (textField.length); } public function set htmlText(_arg1:String):void{ if (_arg1 == ""){ text = ""; return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } protected function handleTextInput(_arg1:TextEvent):void{ _arg1.stopPropagation(); dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text)); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; textField.restrict = _arg1; } public function getLineMetrics(_arg1:int):TextLineMetrics{ return (textField.getLineMetrics(_arg1)); } override public function drawFocus(_arg1:Boolean):void{ if (focusTarget != null){ focusTarget.drawFocus(_arg1); return; }; super.drawFocus(_arg1); } override protected function focusInHandler(_arg1:FocusEvent):void{ if (_arg1.target == this){ stage.focus = textField; }; var _local2:IFocusManager = focusManager; if (((editable) && (_local2))){ _local2.showFocusIndicator = true; if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){ setSelection(0, textField.length); }; }; super.focusInHandler(_arg1); if (editable){ setIMEMode(true); }; } public function get htmlText():String{ return (textField.htmlText); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 155
//UIScrollBar (fl.controls.UIScrollBar) package fl.controls { import fl.core.*; import flash.events.*; import flash.text.*; import fl.events.*; public class UIScrollBar extends ScrollBar { protected var inEdit:Boolean;// = false protected var inScroll:Boolean;// = false protected var _scrollTarget:TextField; private static var defaultStyles:Object = {}; protected function updateScrollTargetProperties():void{ var _local1:Boolean; var _local2:Number; if (_scrollTarget == null){ setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, pageScrollSize); scrollPosition = 0; } else { _local1 = (direction == ScrollBarDirection.HORIZONTAL); _local2 = (_local1) ? _scrollTarget.width : 10; setScrollProperties(_local2, (_local1) ? 0 : 1, (_local1) ? _scrollTarget.maxScrollH : _scrollTarget.maxScrollV, pageScrollSize); scrollPosition = (_local1) ? _scrollTarget.scrollH : _scrollTarget.scrollV; }; } override public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ var _local5:Number = _arg3; var _local6:Number = ((_arg2)<0) ? 0 : _arg2; if (_scrollTarget != null){ if (direction == ScrollBarDirection.HORIZONTAL){ _local5 = ((_arg3)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local5; } else { _local5 = ((_arg3)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local5; }; }; super.setScrollProperties(_arg1, _local6, _local5, _arg4); } protected function handleTargetScroll(_arg1:Event):void{ if (inDrag){ return; }; if (!enabled){ return; }; inEdit = true; updateScrollTargetProperties(); scrollPosition = ((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV; inEdit = false; } override public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ super.setScrollPosition(_arg1, _arg2); if (!_scrollTarget){ inScroll = false; return; }; updateTargetScroll(); } public function get scrollTargetName():String{ return (_scrollTarget.name); } override protected function draw():void{ if (isInvalid(InvalidationType.DATA)){ updateScrollTargetProperties(); }; super.draw(); } override public function set direction(_arg1:String):void{ if (isLivePreview){ return; }; super.direction = _arg1; updateScrollTargetProperties(); } protected function updateTargetScroll(_arg1:ScrollEvent=null):void{ if (inEdit){ return; }; if (direction == ScrollBarDirection.HORIZONTAL){ _scrollTarget.scrollH = scrollPosition; } else { _scrollTarget.scrollV = scrollPosition; }; } override public function set minScrollPosition(_arg1:Number):void{ super.minScrollPosition = ((_arg1)<0) ? 0 : _arg1; } override public function set maxScrollPosition(_arg1:Number):void{ var _local2:Number = _arg1; if (_scrollTarget != null){ if (direction == ScrollBarDirection.HORIZONTAL){ _local2 = ((_local2)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local2; } else { _local2 = ((_local2)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local2; }; }; super.maxScrollPosition = _local2; } protected function handleTargetChange(_arg1:Event):void{ inEdit = true; setScrollPosition(((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV, true); updateScrollTargetProperties(); inEdit = false; } public function update():void{ inEdit = true; updateScrollTargetProperties(); inEdit = false; } public function set scrollTargetName(_arg1:String):void{ var target = _arg1; try { scrollTarget = (parent.getChildByName(target) as TextField); } catch(error:Error) { throw (new Error("ScrollTarget not found, or is not a TextField")); }; } public function set scrollTarget(_arg1:TextField):void{ if (_scrollTarget != null){ _scrollTarget.removeEventListener(Event.CHANGE, handleTargetChange, false); _scrollTarget.removeEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false); _scrollTarget.removeEventListener(Event.SCROLL, handleTargetScroll, false); removeEventListener(ScrollEvent.SCROLL, updateTargetScroll, false); }; _scrollTarget = _arg1; if (_scrollTarget != null){ _scrollTarget.addEventListener(Event.CHANGE, handleTargetChange, false, 0, true); _scrollTarget.addEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false, 0, true); _scrollTarget.addEventListener(Event.SCROLL, handleTargetScroll, false, 0, true); addEventListener(ScrollEvent.SCROLL, updateTargetScroll, false, 0, true); }; invalidate(InvalidationType.DATA); } public function get scrollTarget():TextField{ return (_scrollTarget); } override public function get direction():String{ return (super.direction); } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.controls
Section 156
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 157
//InvalidationType (fl.core.InvalidationType) package fl.core { public class InvalidationType { public static const SIZE:String = "size"; public static const ALL:String = "all"; public static const DATA:String = "data"; public static const SCROLL:String = "scroll"; public static const STATE:String = "state"; public static const STYLES:String = "styles"; public static const SELECTED:String = "selected"; public static const RENDERER_STYLES:String = "rendererStyles"; } }//package fl.core
Section 158
//UIComponent (fl.core.UIComponent) package fl.core { import flash.display.*; import flash.events.*; import flash.text.*; import fl.managers.*; import fl.events.*; import flash.utils.*; import flash.system.*; public class UIComponent extends Sprite { protected var _x:Number; protected var _enabled:Boolean;// = true protected var callLaterMethods:Dictionary; private var _mouseFocusEnabled:Boolean;// = true private var tempText:TextField; private var _focusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var invalidateFlag:Boolean;// = false protected var _oldIMEMode:String;// = null protected var _inspector:Boolean;// = false protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var invalidHash:Object; protected var sharedStyles:Object; protected var uiFocusRect:DisplayObject; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var _width:Number; protected var instanceStyles:Object; public var version:String;// = "3.0.0.16" protected var isFocused:Boolean;// = false protected var _y:Number; public static var inCallLaterPhase:Boolean = false; private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)}; public static var createAccessibilityImplementation:Function; private static var focusManagers:Dictionary = new Dictionary(false); public function UIComponent(){ instanceStyles = {}; sharedStyles = {}; invalidHash = {}; callLaterMethods = new Dictionary(); StyleManager.registerInstance(this); configUI(); invalidate(InvalidationType.ALL); tabEnabled = (this is IFocusManagerComponent); focusRect = false; if (tabEnabled){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; initializeFocusManager(); addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } protected function checkLivePreview():Boolean{ var className:String; if (parent == null){ return (false); }; try { className = getQualifiedClassName(parent); } catch(e:Error) { }; return ((className == "fl.livepreview::LivePreviewParent")); } private function callLaterDispatcher(_arg1:Event):void{ var _local3:Object; if (_arg1.type == Event.ADDED_TO_STAGE){ removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher); stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); return; }; _arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher); if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); return; }; inCallLaterPhase = true; var _local2:Dictionary = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } protected function validate():void{ invalidHash = {}; } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus((_arg1.target as DisplayObject))){ drawFocus(false); isFocused = false; }; } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } public function getFocus():InteractiveObject{ if (stage){ return (stage.focus); }; return (null); } override public function get height():Number{ return (_height); } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function get enabled():Boolean{ return (_enabled); } protected function getScaleX():Number{ return (super.scaleX); } protected function getScaleY():Number{ return (super.scaleY); } public function get focusEnabled():Boolean{ return (_focusEnabled); } protected function afterComponentParameters():void{ } override public function get scaleY():Number{ return ((height / startHeight)); } protected function setIMEMode(_arg1:Boolean){ var enabled = _arg1; if (_imeMode != null){ if (enabled){ IME.enabled = true; _oldIMEMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(("IME mode not supported: " + _imeMode))); }; } else { if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _oldIMEMode; }; IME.enabled = false; }; }; } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function configUI():void{ isLivePreview = checkLivePreview(); var _local1:Number = rotation; rotation = 0; var _local2:Number = super.width; var _local3:Number = super.height; var _local4 = 1; super.scaleY = _local4; super.scaleX = _local4; setSize(_local2, _local3); move(super.x, super.y); rotation = _local1; startWidth = _local2; startHeight = _local3; if (numChildren > 0){ removeChildAt(0); }; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } override public function get scaleX():Number{ return ((width / startWidth)); } protected function setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } public function set focusManager(_arg1:IFocusManager):void{ UIComponent.focusManagers[this] = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } protected function isInvalid(_arg1:String, ... _args):Boolean{ if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){ return (true); }; while (_args.length > 0) { if (invalidHash[_args.pop()]){ return (true); }; }; return (false); } public function setStyle(_arg1:String, _arg2:Object):void{ if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; instanceStyles[_arg1] = _arg2; invalidate(InvalidationType.STYLES); } override public function get visible():Boolean{ return (super.visible); } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus((_arg1.target as DisplayObject))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); isFocused = true; }; }; } public function get componentInspectorSetting():Boolean{ return (_inspector); } override public function get x():Number{ return ((isNaN(_x)) ? super.x : _x); } override public function get y():Number{ return ((isNaN(_y)) ? super.y : _y); } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } public function setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function setSharedStyle(_arg1:String, _arg2:Object):void{ if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; sharedStyles[_arg1] = _arg2; if (instanceStyles[_arg1] == null){ invalidate(InvalidationType.STYLES); }; } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } override public function set scaleX(_arg1:Number):void{ setSize((startWidth * _arg1), height); } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } override public function set scaleY(_arg1:Number):void{ setSize(width, (startHeight * _arg1)); } protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{ var skin = _arg1; var classDef:Object; if ((skin is Class)){ return ((new (skin) as DisplayObject)); }; if ((skin is DisplayObject)){ (skin as DisplayObject).x = 0; (skin as DisplayObject).y = 0; return ((skin as DisplayObject)); }; try { classDef = getDefinitionByName(skin.toString()); } catch(e:Error) { try { classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object); } catch(e:Error) { }; }; if (classDef == null){ return (null); }; return ((new (classDef) as DisplayObject)); } protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{ var _local3:String; for (_local3 in _arg2) { _arg1.setStyle(_local3, getStyleValue(_arg2[_local3])); }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject = this; while (_local1) { if (UIComponent.focusManagers[_local1] != null){ return (IFocusManager(UIComponent.focusManagers[_local1])); }; _local1 = _local1.parent; }; return (null); } override public function get width():Number{ return (_width); } protected function beforeComponentParameters():void{ } protected function callLater(_arg1:Function):void{ if (inCallLaterPhase){ return; }; callLaterMethods[_arg1] = true; if (stage != null){ stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); } else { addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); }; } public function move(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; super.x = Math.round(_arg1); super.y = Math.round(_arg2); dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); } public function validateNow():void{ invalidate(InvalidationType.ALL, false); draw(); } override public function set visible(_arg1:Boolean):void{ if (super.visible == _arg1){ return; }; super.visible = _arg1; var _local2:String = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } protected function hookAccessibility(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, hookAccessibility); initializeAccessibility(); } public function set componentInspectorSetting(_arg1:Boolean):void{ _inspector = _arg1; if (_inspector){ beforeComponentParameters(); } else { afterComponentParameters(); }; } override public function set y(_arg1:Number):void{ move(_x, _arg1); } public function drawFocus(_arg1:Boolean):void{ var _local2:Number; isFocused = _arg1; if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){ removeChild(uiFocusRect); uiFocusRect = null; }; if (_arg1){ uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite); if (uiFocusRect == null){ return; }; _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = -(_local2); uiFocusRect.y = -(_local2); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); addChildAt(uiFocusRect, 0); }; } override public function set x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local5:Object; var _local6:String; var _local2:Object = {}; var _local3:uint = _args.length; var _local4:uint; while (_local4 < _local3) { _local5 = _args[_local4]; for (_local6 in _local5) { if (_local2[_local6] != null){ } else { _local2[_local6] = _args[_local4][_local6]; }; }; _local4++; }; return (_local2); } } }//package fl.core
Section 159
//DataProvider (fl.data.DataProvider) package fl.data { import flash.events.*; import fl.events.*; public class DataProvider extends EventDispatcher { protected var data:Array; public function DataProvider(_arg1:Object=null){ if (_arg1 == null){ data = []; } else { data = getDataFromObject(_arg1); }; } public function invalidateItemAt(_arg1:int):void{ checkIndex(_arg1, (data.length - 1)); dispatchChangeEvent(DataChangeType.INVALIDATE, [data[_arg1]], _arg1, _arg1); } protected function dispatchPreChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.PRE_DATA_CHANGE, _arg1, _arg2, _arg3, _arg4)); } public function getItemIndex(_arg1:Object):int{ return (data.indexOf(_arg1)); } public function removeItemAt(_arg1:uint):Object{ checkIndex(_arg1, (data.length - 1)); dispatchPreChangeEvent(DataChangeType.REMOVE, data.slice(_arg1, (_arg1 + 1)), _arg1, _arg1); var _local2:Array = data.splice(_arg1, 1); dispatchChangeEvent(DataChangeType.REMOVE, _local2, _arg1, _arg1); return (_local2[0]); } protected function getDataFromObject(_arg1:Object):Array{ var _local2:Array; var _local3:Array; var _local4:uint; var _local5:Object; var _local6:XML; var _local7:XMLList; var _local8:XML; var _local9:XMLList; var _local10:XML; var _local11:XMLList; var _local12:XML; if ((_arg1 is Array)){ _local3 = (_arg1 as Array); if (_local3.length > 0){ if ((((_local3[0] is String)) || ((_local3[0] is Number)))){ _local2 = []; _local4 = 0; while (_local4 < _local3.length) { _local5 = {label:String(_local3[_local4]), data:_local3[_local4]}; _local2.push(_local5); _local4++; }; return (_local2); }; }; return (_arg1.concat()); //unresolved jump }; if ((_arg1 is DataProvider)){ return (_arg1.toArray()); }; if ((_arg1 is XML)){ _local6 = (_arg1 as XML); _local2 = []; _local7 = _local6.*; for each (_local8 in _local7) { _arg1 = {}; _local9 = _local8.attributes(); for each (_local10 in _local9) { _arg1[_local10.localName()] = _local10.toString(); }; _local11 = _local8.*; for each (_local12 in _local11) { if (_local12.hasSimpleContent()){ _arg1[_local12.localName()] = _local12.toString(); }; }; _local2.push(_arg1); }; return (_local2); //unresolved jump }; throw (new TypeError((("Error: Type Coercion failed: cannot convert " + _arg1) + " to Array or DataProvider."))); } public function addItem(_arg1:Object):void{ dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1)); data.push(_arg1); dispatchChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1)); } public function concat(_arg1:Object):void{ addItems(_arg1); } public function getItemAt(_arg1:uint):Object{ checkIndex(_arg1, (data.length - 1)); return (data[_arg1]); } public function sortOn(_arg1:Object, _arg2:Object=null){ dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); var _local3:Array = data.sortOn(_arg1, _arg2); dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); return (_local3); } public function toArray():Array{ return (data.concat()); } public function addItems(_arg1:Object):void{ addItemsAt(_arg1, data.length); } public function clone():DataProvider{ return (new DataProvider(data)); } public function sort(... _args){ dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); var _local2:Array = data.sort.apply(data, _args); dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); return (_local2); } public function get length():uint{ return (data.length); } public function addItemAt(_arg1:Object, _arg2:uint):void{ checkIndex(_arg2, data.length); dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2); data.splice(_arg2, 0, _arg1); dispatchChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2); } override public function toString():String{ return ((("DataProvider [" + data.join(" , ")) + "]")); } public function invalidateItem(_arg1:Object):void{ var _local2:uint = getItemIndex(_arg1); if (_local2 == -1){ return; }; invalidateItemAt(_local2); } protected function dispatchChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, _arg1, _arg2, _arg3, _arg4)); } protected function checkIndex(_arg1:int, _arg2:int):void{ if ((((_arg1 > _arg2)) || ((_arg1 < 0)))){ throw (new RangeError((((("DataProvider index (" + _arg1) + ") is not in acceptable range (0 - ") + _arg2) + ")"))); }; } public function addItemsAt(_arg1:Object, _arg2:uint):void{ checkIndex(_arg2, data.length); var _local3:Array = getDataFromObject(_arg1); dispatchPreChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1)); data.splice.apply(data, [_arg2, 0].concat(_local3)); dispatchChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1)); } public function replaceItem(_arg1:Object, _arg2:Object):Object{ var _local3:int = getItemIndex(_arg2); if (_local3 != -1){ return (replaceItemAt(_arg1, _local3)); }; return (null); } public function removeItem(_arg1:Object):Object{ var _local2:int = getItemIndex(_arg1); if (_local2 != -1){ return (removeItemAt(_local2)); }; return (null); } public function merge(_arg1:Object):void{ var _local6:Object; var _local2:Array = getDataFromObject(_arg1); var _local3:uint = _local2.length; var _local4:uint = data.length; dispatchPreChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1)); var _local5:uint; while (_local5 < _local3) { _local6 = _local2[_local5]; if (getItemIndex(_local6) == -1){ data.push(_local6); }; _local5++; }; if (data.length > _local4){ dispatchChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1)); } else { dispatchChangeEvent(DataChangeType.ADD, [], -1, -1); }; } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ checkIndex(_arg2, (data.length - 1)); var _local3:Array = [data[_arg2]]; dispatchPreChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2); data[_arg2] = _arg1; dispatchChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2); return (_local3[0]); } public function invalidate():void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, DataChangeType.INVALIDATE_ALL, data.concat(), 0, data.length)); } public function removeAll():void{ var _local1:Array = data.concat(); dispatchPreChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length); data = []; dispatchChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length); } } }//package fl.data
Section 160
//SimpleCollectionItem (fl.data.SimpleCollectionItem) package fl.data { public dynamic class SimpleCollectionItem { public var data:String; public var label:String; public function toString():String{ return ((((("[SimpleCollectionItem: " + label) + ",") + data) + "]")); } } }//package fl.data
Section 161
//ComponentEvent (fl.events.ComponentEvent) package fl.events { import flash.events.*; public class ComponentEvent extends Event { public static const HIDE:String = "hide"; public static const BUTTON_DOWN:String = "buttonDown"; public static const MOVE:String = "move"; public static const RESIZE:String = "resize"; public static const ENTER:String = "enter"; public static const LABEL_CHANGE:String = "labelChange"; public static const SHOW:String = "show"; public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("ComponentEvent", "type", "bubbles", "cancelable")); } override public function clone():Event{ return (new ComponentEvent(type, bubbles, cancelable)); } } }//package fl.events
Section 162
//DataChangeEvent (fl.events.DataChangeEvent) package fl.events { import flash.events.*; public class DataChangeEvent extends Event { protected var _items:Array; protected var _changeType:String; protected var _startIndex:uint; protected var _endIndex:uint; public static const PRE_DATA_CHANGE:String = "preDataChange"; public static const DATA_CHANGE:String = "dataChange"; public function DataChangeEvent(_arg1:String, _arg2:String, _arg3:Array, _arg4:int=-1, _arg5:int=-1):void{ super(_arg1); _changeType = _arg2; _startIndex = _arg4; _items = _arg3; _endIndex = ((_arg5)==-1) ? _startIndex : _arg5; } public function get items():Array{ return (_items); } public function get changeType():String{ return (_changeType); } public function get startIndex():uint{ return (_startIndex); } public function get endIndex():uint{ return (_endIndex); } override public function toString():String{ return (formatToString("DataChangeEvent", "type", "changeType", "startIndex", "endIndex", "bubbles", "cancelable")); } override public function clone():Event{ return (new DataChangeEvent(type, _changeType, _items, _startIndex, _endIndex)); } } }//package fl.events
Section 163
//DataChangeType (fl.events.DataChangeType) package fl.events { public class DataChangeType { public static const ADD:String = "add"; public static const REMOVE:String = "remove"; public static const REMOVE_ALL:String = "removeAll"; public static const CHANGE:String = "change"; public static const REPLACE:String = "replace"; public static const INVALIDATE:String = "invalidate"; public static const INVALIDATE_ALL:String = "invalidateAll"; public static const SORT:String = "sort"; } }//package fl.events
Section 164
//ListEvent (fl.events.ListEvent) package fl.events { import flash.events.*; public class ListEvent extends Event { protected var _item:Object; protected var _index:int; protected var _rowIndex:int; protected var _columnIndex:int; public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick"; public static const ITEM_ROLL_OUT:String = "itemRollOut"; public static const ITEM_ROLL_OVER:String = "itemRollOver"; public static const ITEM_CLICK:String = "itemClick"; public function ListEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:Object=null){ super(_arg1, _arg2, _arg3); _rowIndex = _arg5; _columnIndex = _arg4; _index = _arg6; _item = _arg7; } public function get item():Object{ return (_item); } override public function toString():String{ return (formatToString("ListEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "index", "item")); } override public function clone():Event{ return (new ListEvent(type, bubbles, cancelable, _columnIndex, _rowIndex)); } public function get rowIndex():Object{ return (_rowIndex); } public function get index():int{ return (_index); } public function get columnIndex():int{ return (_columnIndex); } } }//package fl.events
Section 165
//ScrollEvent (fl.events.ScrollEvent) package fl.events { import flash.events.*; public class ScrollEvent extends Event { private var _direction:String; private var _position:Number; private var _delta:Number; public static const SCROLL:String = "scroll"; public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){ super(ScrollEvent.SCROLL, false, false); _direction = _arg1; _delta = _arg2; _position = _arg3; } public function get position():Number{ return (_position); } public function get direction():String{ return (_direction); } public function get delta():Number{ return (_delta); } override public function toString():String{ return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position")); } override public function clone():Event{ return (new ScrollEvent(_direction, _delta, _position)); } } }//package fl.events
Section 166
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.core.*; import fl.controls.*; import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; var _local5:int = focusableCandidates.length; var _local6:int = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } private function setFocusToNextObject(_arg1:FocusEvent):void{ if (!hasFocusableObjects()){ return; }; var _local2:InteractiveObject = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local3:TextField; var _local4:SimpleButton; var _local2:DisplayObjectContainer = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } private function tabChildrenChangeHandler(_arg1:Event):void{ if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } public function getFocus():InteractiveObject{ var _local1:InteractiveObject = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } public function set defaultButton(_arg1:Button):void{ var _local2:Button = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int = focusableCandidates.length; var _local3:int; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local4:InteractiveObject; var _local3:DisplayObject = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local5:int; var _local6:String; var _local7:String; var _local3 = ""; var _local4 = ""; var _local8 = "0000"; var _local9:DisplayObject = DisplayObject(_arg1); var _local10:DisplayObject = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; var _local2:DisplayObject = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); var _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; var _local4:int = getIndexOfFocusedObject(_local2); var _local5:Boolean; var _local6:int = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; var _local7:int = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ if (_arg1.isDefaultPrevented()){ return; }; var _local2:InteractiveObject = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local3:Button; var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ calculateCandidates = true; var _local2:InteractiveObject = InteractiveObject(_arg1.target); var _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } } }//package fl.managers
Section 167
//IFocusManager (fl.managers.IFocusManager) package fl.managers { import fl.controls.*; import flash.display.*; public interface IFocusManager { function getFocus():InteractiveObject; function deactivate():void; function set defaultButton(_arg1:Button):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject; function get nextTabIndex():int; function get defaultButton():Button; function get showFocusIndicator():Boolean; function hideFocus():void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function setFocus(_arg1:InteractiveObject):void; function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject; } }//package fl.managers
Section 168
//IFocusManagerComponent (fl.managers.IFocusManagerComponent) package fl.managers { public interface IFocusManagerComponent { function set focusEnabled(_arg1:Boolean):void; function drawFocus(_arg1:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package fl.managers
Section 169
//IFocusManagerGroup (fl.managers.IFocusManagerGroup) package fl.managers { public interface IFocusManagerGroup { function get groupName():String; function get selected():Boolean; function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; } }//package fl.managers
Section 170
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.text.*; import flash.utils.*; public class StyleManager { private var classToInstancesDict:Dictionary; private var globalStyles:Object; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToDefaultStylesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class = getClassDef(_arg1); var _local4:Object = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class = getClassDef(_arg1); var _local5:Object = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local5:String; var _local2:StyleManager = getInstance(); var _local3:Class = getClassDef(_arg1); var _local4:Object = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class = getClassDef(_arg1); var _local4:Object = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local4:Object; var _local5:UIComponent; var _local3:Dictionary = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local3:Object; var _local2:Dictionary = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; var inst:StyleManager = getInstance(); var classDef:Class = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; if (inst.classToStylesDict[classDef] == null){ inst.classToStylesDict[classDef] = {}; }; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class = getClassDef(_arg1); var _local4:StyleManager = getInstance(); var _local5:Object = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 171
//wav (frogs.wav) package frogs { import flash.media.*; public dynamic class wav extends Sound { } }//package frogs
Section 172
//BuildClip (help.BuildClip) package help { import flash.display.*; import flash.events.*; public class BuildClip extends MovieClip { public var timer:int; public function BuildClip(){ addFrameScript(0, frame1); } public function enterFrameHandler(_arg1:Event):void{ timer++; if (timer == 2){ play(); timer = 0; } else { stop(); }; } function frame1(){ timer = 0; this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); } } }//package help
Section 173
//DeleteClip (help.DeleteClip) package help { import flash.display.*; public class DeleteClip extends MovieClip { public function DeleteClip(){ addFrameScript(0, frame1, 145, frame146); } function frame1(){ gotoAndPlay(95); } function frame146(){ gotoAndPlay(95); } } }//package help
Section 174
//ScrollClip (help.ScrollClip) package help { import flash.display.*; public class ScrollClip extends MovieClip { public function ScrollClip(){ addFrameScript(92, frame93); } function frame93(){ this.gotoAndPlay(2); } } }//package help
Section 175
//House01 (houses.House01) package houses { import flash.display.*; public class House01 extends MovieClip { public function House01(){ cacheAsBitmap = true; } } }//package houses
Section 176
//House02 (houses.House02) package houses { import flash.display.*; public class House02 extends MovieClip { } }//package houses
Section 177
//House03 (houses.House03) package houses { import flash.display.*; public class House03 extends MovieClip { } }//package houses
Section 178
//House04 (houses.House04) package houses { import flash.display.*; public class House04 extends MovieClip { } }//package houses
Section 179
//House05 (houses.House05) package houses { import flash.display.*; public class House05 extends MovieClip { } }//package houses
Section 180
//House06 (houses.House06) package houses { import flash.display.*; public class House06 extends MovieClip { } }//package houses
Section 181
//House07 (houses.House07) package houses { import flash.display.*; public class House07 extends MovieClip { } }//package houses
Section 182
//House08 (houses.House08) package houses { import flash.display.*; public class House08 extends MovieClip { } }//package houses
Section 183
//House09 (houses.House09) package houses { import flash.display.*; public class House09 extends MovieClip { } }//package houses
Section 184
//House10 (houses.House10) package houses { import flash.display.*; public class House10 extends MovieClip { } }//package houses
Section 185
//House11 (houses.House11) package houses { import flash.display.*; public class House11 extends MovieClip { } }//package houses
Section 186
//House12 (houses.House12) package houses { import flash.display.*; public class House12 extends MovieClip { } }//package houses
Section 187
//House13 (houses.House13) package houses { import flash.display.*; public class House13 extends MovieClip { } }//package houses
Section 188
//House14 (houses.House14) package houses { import flash.display.*; public class House14 extends MovieClip { } }//package houses
Section 189
//House15 (houses.House15) package houses { import flash.display.*; public class House15 extends MovieClip { } }//package houses
Section 190
//House16 (houses.House16) package houses { import flash.display.*; public class House16 extends MovieClip { } }//package houses
Section 191
//House17 (houses.House17) package houses { import flash.display.*; public class House17 extends MovieClip { } }//package houses
Section 192
//SpriteInfo (houses.SpriteInfo) package houses { import flash.geom.*; public class SpriteInfo { private var _matrix:Matrix; private var _layer:int; private var _type:int; public function SpriteInfo(_arg1:Number=0, _arg2:Number=0, _arg3:int=0, _arg4:int=0, _arg5:Matrix=null){ this.type = _arg3; this.layer = _arg4; if (_arg5){ this.matrix = _arg5; } else { this.matrix = new Matrix(); this.x = _arg1; this.y = _arg2; }; } public function set layer(_arg1:int):void{ _layer = _arg1; } public function get matrix():Matrix{ return (_matrix); } public function get y():Number{ return (_matrix.ty); } public function set matrix(_arg1:Matrix):void{ _matrix = _arg1; } public function get calculateTransformMatrix():Matrix{ return (new Matrix()); } public function set x(_arg1:Number):void{ _matrix.tx = _arg1; } public function get layer():int{ return (_layer); } public function set type(_arg1:int):void{ _type = _arg1; } public function get x():Number{ return (_matrix.tx); } public function get type():int{ return (_type); } public function set y(_arg1:Number):void{ _matrix.ty = _arg1; } } }//package houses
Section 193
//DeckButton (hud.DeckButton) package hud { import core.*; public class DeckButton extends MaterialButton { public function DeckButton(){ super(Config.EVENT_DECK); } } }//package hud
Section 194
//EditButton (hud.EditButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class EditButton extends SimpleButton { private var timerActivated:Boolean; private var timerCount:int; public function EditButton(){ reset(); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); } private function startTimer():void{ if (this.timerActivated){ return; }; this.timerCount = 0; this.timerActivated = true; this.addEventListener(Event.ENTER_FRAME, timerCounter, false, 0, true); } public function reset():void{ if (visible){ alpha = 1; } else { visible = true; }; enabled = true; if (!hasEventListener(MouseEvent.CLICK)){ addEventListener(MouseEvent.CLICK, clickHandler); }; } private function stopTimer():void{ if (!this.timerActivated){ return; }; this.removeEventListener(Event.ENTER_FRAME, timerCounter); this.timerActivated = false; } public function hide(_arg1:Boolean=true):void{ if (hasEventListener(MouseEvent.CLICK)){ removeEventListener(MouseEvent.CLICK, clickHandler); }; enabled = false; if (!_arg1){ alpha = 0.3; } else { visible = false; }; } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.stopTimer(); } private function clickHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_EDIT, true)); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); this.startTimer(); } private function timerCounter(_arg1:Event):void{ if (!this.timerActivated){ return; }; this.timerCount++; if (this.timerCount >= Config.TIP_TIMER_COUNT){ this.stopTimer(); this.dispatchEvent(new Event(Config.EVENT_TIP_EDIT, true)); }; } } }//package hud
Section 195
//HomeButton (hud.HomeButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class HomeButton extends SimpleButton { public function HomeButton(){ addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_HOME, true)); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package hud
Section 196
//HUD (hud.HUD) package hud { import flash.display.*; import core.*; import flash.events.*; import flash.text.*; public dynamic class HUD extends Sprite { public var stressButton:StressButton; public var budgetText:TextField; private var _currentBudget:Number; public var zoomOutButtonObject:ZoomOutButton; public var startButton:StartButton; public var undoButton:UndoButton; public var deckButton:DeckButton; private var _signalling:Boolean; private var timerActivated:Boolean; private var budgetBarArea:MovieClip; public var budgetRedBG:MovieClip; private var currentTarget:Object; private var _budget:Number; public var resetButton:ResetButton; private var _prevMaterial:Number; private var _mode:Number; public var zoomInButtonObject:ZoomInButton; public var budgetBar:MovieClip; public var pauseBtn:SimpleButton; public var zoomOutButton:ZoomOutButton; public var zoomInButton:ZoomInButton; private var _material:Number; private var _signalCount:Number; private var _counter:Number; private var timerCount:int; private var pauseButton:SimpleButton; public var ropeButton:RopeButton; public var steelButton:SteelButton; public var editButton:EditButton; public function HUD(){ _currentBudget = 0; _budget = 0; material = -1; _prevMaterial = -1; mode = -1; (budgetText as TextField).mouseEnabled = false; _signalling = false; this["budgetRedBG"].visible = false; zoomInButton = this["zoomInButtonObject"]; zoomOutButton = this["zoomOutButtonObject"]; this.pauseButton = this["pauseBtn"]; this.pauseButton.addEventListener(MouseEvent.CLICK, onPauseHandler, false, 0, true); this.pauseButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.pauseButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function onDeckHandler(_arg1:Event):void{ this.steelButton.reset(); this.ropeButton.reset(); } private function onStartHandler(_arg1:Event):void{ mode = Config.MODE_EMULATION; } private function startTimer():void{ if (this.timerActivated){ return; }; this.timerCount = 0; this.timerActivated = true; this.addEventListener(Event.ENTER_FRAME, timerCounter, false, 0, true); } private function enterFrameHandler(_arg1:Event):void{ if (_currentBudget != _budget){ _budget = (_budget + ((_currentBudget - _budget) / 3)); budgetText.text = Math.round(_budget).toString(); }; if (_signalling){ if (_counter == 0){ if (_signalCount == 0){ this["budgetRedBG"].visible = false; _signalling = false; } else { if (!this["budgetRedBG"].visible){ this["budgetRedBG"].visible = true; _signalCount--; } else { this["budgetRedBG"].visible = false; }; }; }; _counter++; if (_counter == 7){ _counter = 0; }; }; } private function onMusicHandler(_arg1:MouseEvent):void{ } public function get material():Number{ return (_material); } public function get budget():Number{ return (_currentBudget); } private function onStressHandler(_arg1:MouseEvent):void{ } private function stopTimer():void{ if (!this.timerActivated){ return; }; this.removeEventListener(Event.ENTER_FRAME, timerCounter); this.timerActivated = false; } public function set material(_arg1:Number):void{ if (_arg1 == Config.MATERIAL_DECK){ if (!this.steelButton.hidden){ this.steelButton.reset(); }; if (!this.ropeButton.hidden){ this.ropeButton.reset(); }; if (!this.deckButton.hidden){ this.deckButton.select(); }; } else { if (_arg1 == Config.MATERIAL_STEEL){ if (!this.deckButton.hidden){ this.deckButton.reset(); }; if (!this.ropeButton.hidden){ this.ropeButton.reset(); }; if (!this.steelButton.hidden){ this.steelButton.select(); }; } else { if (_arg1 == Config.MATERIAL_ROPE){ if (!this.deckButton.hidden){ this.deckButton.reset(); }; if (!this.steelButton.hidden){ this.steelButton.reset(); }; if (!this.ropeButton.hidden){ this.ropeButton.select(); }; } else { if (_arg1 == -1){ this.deckButton.hide(); this.steelButton.hide(); this.ropeButton.hide(); } else { return; }; }; }; }; _prevMaterial = _material; _material = _arg1; } private function onUndoHandler(_arg1:MouseEvent):void{ } public function set mode(_arg1:Number):void{ if (_mode == _arg1){ return; }; if (_arg1 == Config.MODE_BUILDING){ this.startButton.reset(); this.editButton.hide(); this.deckButton.reset(); this.steelButton.reset(); this.ropeButton.reset(); if (!hasEventListener(Config.EVENT_START)){ addEventListener(Config.EVENT_START, onStartHandler); }; if (hasEventListener(Config.EVENT_EDIT)){ removeEventListener(Config.EVENT_START, onEditHandler); }; if (!hasEventListener(Config.EVENT_DECK)){ addEventListener(Config.EVENT_DECK, onDeckHandler); }; if (!hasEventListener(Config.EVENT_STEEL)){ addEventListener(Config.EVENT_STEEL, onSteelHandler); }; if (!hasEventListener(Config.EVENT_ROPE)){ addEventListener(Config.EVENT_ROPE, onRopeHandler); }; this.undoButton.reset(); if (_prevMaterial == -1){ material = Config.MATERIAL_DECK; } else { material = _prevMaterial; }; } else { if (_arg1 == Config.MODE_EMULATION){ this.startButton.hide(); this.editButton.reset(); this.stressButton.show(); if (hasEventListener(Config.EVENT_START)){ removeEventListener(Config.EVENT_START, onStartHandler); }; if (!hasEventListener(Config.EVENT_EDIT)){ addEventListener(Config.EVENT_EDIT, onEditHandler); }; if (hasEventListener(Config.EVENT_DECK)){ removeEventListener(Config.EVENT_DECK, onDeckHandler); }; if (hasEventListener(Config.EVENT_STEEL)){ removeEventListener(Config.EVENT_STEEL, onSteelHandler); }; if (hasEventListener(Config.EVENT_ROPE)){ removeEventListener(Config.EVENT_ROPE, onRopeHandler); }; this.undoButton.hide(); material = -1; this.deckButton.hide(); this.steelButton.hide(); this.ropeButton.hide(); } else { if (_arg1 == -1){ if (_mode == Config.MODE_BUILDING){ this.startButton.hide(false); this.editButton.hide(true); } else { if (_mode == Config.MODE_EMULATION){ this.startButton.hide(true); this.editButton.hide(false); }; }; this.deckButton.hide(); this.steelButton.hide(); this.ropeButton.hide(); if (hasEventListener(Config.EVENT_START)){ removeEventListener(Config.EVENT_START, onStartHandler); }; if (hasEventListener(Config.EVENT_EDIT)){ removeEventListener(Config.EVENT_START, onStartHandler); }; if (!hasEventListener(Config.EVENT_DECK)){ addEventListener(Config.EVENT_DECK, onDeckHandler); }; if (!hasEventListener(Config.EVENT_STEEL)){ addEventListener(Config.EVENT_STEEL, onSteelHandler); }; if (!hasEventListener(Config.EVENT_ROPE)){ addEventListener(Config.EVENT_ROPE, onRopeHandler); }; } else { return; }; }; }; _mode = _arg1; } public function set budget(_arg1:Number):void{ _currentBudget = _arg1; } private function onSteelHandler(_arg1:Event):void{ this.deckButton.reset(); this.ropeButton.reset(); } private function onEditHandler(_arg1:Event):void{ mode = Config.MODE_BUILDING; } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); stopTimer(); this.currentTarget = null; } public function cleanup():void{ if (hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; if (hasEventListener(Config.EVENT_DECK)){ removeEventListener(Config.EVENT_DECK, onDeckHandler); }; if (hasEventListener(Config.EVENT_STEEL)){ removeEventListener(Config.EVENT_STEEL, onSteelHandler); }; if (hasEventListener(Config.EVENT_ROPE)){ removeEventListener(Config.EVENT_ROPE, onRopeHandler); }; if (hasEventListener(Config.EVENT_START)){ removeEventListener(Config.EVENT_START, onStartHandler); }; if (hasEventListener(Config.EVENT_EDIT)){ removeEventListener(Config.EVENT_START, onStartHandler); }; this.pauseButton.removeEventListener(MouseEvent.CLICK, onPauseHandler); this.pauseButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.pauseButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); stopTimer(); } private function onRopeHandler(_arg1:Event):void{ this.deckButton.reset(); this.steelButton.reset(); } public function budgetSignalling():void{ _signalling = true; _signalCount = 2; _counter = 0; } private function onSoundsHandler(_arg1:MouseEvent):void{ } private function onResetHandler(_arg1:MouseEvent):void{ } private function mouseOverHandler(_arg1:MouseEvent):void{ if (_arg1.target != this.budgetBarArea){ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); }; if ((((_arg1.target == this.pauseButton)) || ((_arg1.target == this.budgetBarArea)))){ this.currentTarget = _arg1.target; this.startTimer(); }; } private function timerCounter(_arg1:Event):void{ if (!this.timerActivated){ return; }; this.timerCount++; if (this.timerCount >= Config.TIP_TIMER_COUNT){ this.stopTimer(); if (this.currentTarget == this.pauseButton){ this.dispatchEvent(new Event(Config.EVENT_TIP_PAUSE, true)); }; if (this.currentTarget == this.budgetBarArea){ this.dispatchEvent(new Event(Config.EVENT_TIP_BUDGET, true)); }; }; } private function onPauseHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_HOME, true)); _arg1.stopPropagation(); } } }//package hud
Section 197
//MaterialButton (hud.MaterialButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class MaterialButton extends MovieClip { private var _selected:Boolean; private var timerActivated:Boolean; private var _backward:Boolean; private var _eventString:String; private var _hidden:Boolean; private var timerCount:int; public function MaterialButton(_arg1:String=""){ stop(); buttonMode = true; useHandCursor = true; _selected = false; _backward = false; _hidden = false; _eventString = _arg1; if (!hasEventListener(MouseEvent.MOUSE_OVER)){ addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!hasEventListener(MouseEvent.MOUSE_OUT)){ addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ if (((!(_selected)) && (!(_hidden)))){ gotoAndStop(2); dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); }; } private function timerCounter(_arg1:Event):void{ if (!this.timerActivated){ return; }; this.timerCount++; if (this.timerCount >= Config.TIP_TIMER_COUNT){ this.stopTimer(); if (_eventString == Config.EVENT_DECK){ this.dispatchEvent(new Event(Config.EVENT_TIP_DECK, true)); }; if (_eventString == Config.EVENT_STEEL){ this.dispatchEvent(new Event(Config.EVENT_TIP_STEEL, true)); }; if (_eventString == Config.EVENT_ROPE){ this.dispatchEvent(new Event(Config.EVENT_TIP_ROPE, true)); }; }; } public function select(_arg1:Boolean=true):void{ if (hasEventListener(MouseEvent.CLICK)){ removeEventListener(MouseEvent.CLICK, clickHandler); }; _selected = true; this.gotoAndStop(3); } private function startTimer():void{ if (this.timerActivated){ return; }; this.timerCount = 0; this.timerActivated = true; this.addEventListener(Event.ENTER_FRAME, timerCounter, false, 0, true); } private function enterFrameHandler(_arg1:Event):void{ if (_backward){ if (currentFrame == 3){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; gotoAndStop((currentFrame - 1)); } else { if (currentFrame == totalFrames){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; gotoAndStop((currentFrame + 1)); }; } private function playBackward():void{ gotoAndStop(totalFrames); _backward = true; addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function stopTimer():void{ if (!this.timerActivated){ return; }; this.removeEventListener(Event.ENTER_FRAME, timerCounter); this.timerActivated = false; } public function reset():void{ if (hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; if (!hasEventListener(MouseEvent.CLICK)){ addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); }; alpha = 1; _selected = false; _hidden = false; gotoAndStop(1); } private function mouseOutHandler(_arg1:MouseEvent):void{ if (((!(_selected)) && (!(_hidden)))){ gotoAndStop(1); dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; } private function clickHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(_eventString, true)); select(); _arg1.stopPropagation(); dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function get hidden():Boolean{ return (_hidden); } public function hide():void{ if (hasEventListener(MouseEvent.CLICK)){ removeEventListener(MouseEvent.CLICK, clickHandler); }; alpha = 0.3; _hidden = true; this.gotoAndStop(1); } private function playForward():void{ gotoAndStop(3); _backward = false; addEventListener(Event.ENTER_FRAME, enterFrameHandler); } } }//package hud
Section 198
//MusicButton (hud.MusicButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class MusicButton extends MovieClip { private var _switched:Boolean; public function MusicButton(){ buttonMode = true; useHandCursor = true; switchOn(); addEventListener(MouseEvent.CLICK, clickHandler); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); } public function switchOn(_arg1:Boolean=false):void{ if (_arg1){ gotoAndStop(2); } else { gotoAndStop(1); }; _switched = true; } private function mouseOutHandler(_arg1:MouseEvent):void{ if (_switched){ gotoAndStop(1); } else { gotoAndStop(3); }; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickHandler(_arg1:MouseEvent):void{ if (_switched){ switchOff(true); } else { switchOn(true); }; dispatchEvent(new Event(Config.EVENT_MUSIC, true)); _arg1.stopPropagation(); } public function switchOff(_arg1:Boolean=false):void{ if (_arg1){ gotoAndStop(4); } else { gotoAndStop(3); }; _switched = false; } private function mouseOverHandler(_arg1:MouseEvent):void{ if (_switched){ gotoAndStop(2); } else { gotoAndStop(4); }; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package hud
Section 199
//QualityButton (hud.QualityButton) package hud { import flash.display.*; import core.*; import flash.events.*; import flash.text.*; public dynamic class QualityButton extends MovieClip { public var letterTF:TextField; private var letterTextField:TextField; public function QualityButton(){ this.stop(); this.letterTextField = this["letterTF"]; this.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, false, 0, true); this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true); this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } private function mouseUpHandler(_arg1:MouseEvent):void{ this.gotoAndStop(1); } private function mouseDownHandler(_arg1:MouseEvent):void{ this.gotoAndStop(3); } public function setLetter():void{ if (this.stage == null){ return; }; if (this.letterTextField == null){ return; }; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ if (this.stage.quality == "BEST"){ this.letterTextField.text = "B"; }; if (this.stage.quality == "HIGH"){ this.letterTextField.text = "H"; }; if (this.stage.quality == "MEDIUM"){ this.letterTextField.text = "M"; }; if (this.stage.quality == "LOW"){ this.letterTextField.text = "L"; }; } else { if (this.stage.quality == "BEST"){ this.letterTextField.text = "B"; }; if (this.stage.quality == "HIGH"){ this.letterTextField.text = "B"; }; if (this.stage.quality == "MEDIUM"){ this.letterTextField.text = "C"; }; if (this.stage.quality == "LOW"){ this.letterTextField.text = "H"; }; }; } private function mouseOutHandler(_arg1:MouseEvent):void{ this.gotoAndStop(1); } private function mouseOverHandler(_arg1:MouseEvent):void{ this.gotoAndStop(2); } } }//package hud
Section 200
//ResetButton (hud.ResetButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class ResetButton extends SimpleButton { private var timerActivated:Boolean; private var _hidden:Boolean; private var timerCount:int; public function ResetButton(){ reset(); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } private function startTimer():void{ if (this.timerActivated){ return; }; this.timerCount = 0; this.timerActivated = true; this.addEventListener(Event.ENTER_FRAME, timerCounter, false, 0, true); } public function reset():void{ alpha = 1; enabled = true; _hidden = false; addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); } private function stopTimer():void{ if (!this.timerActivated){ return; }; this.removeEventListener(Event.ENTER_FRAME, timerCounter); this.timerActivated = false; } public function hide():void{ _hidden = true; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); alpha = 0.3; enabled = false; removeEventListener(MouseEvent.CLICK, clickHandler); } private function mouseOutHandler(_arg1:MouseEvent):void{ if (!_hidden){ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; this.stopTimer(); } private function clickHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_RESET, true)); _arg1.stopPropagation(); } private function mouseOverHandler(_arg1:MouseEvent):void{ if (!_hidden){ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); }; this.startTimer(); } private function timerCounter(_arg1:Event):void{ if (!this.timerActivated){ return; }; this.timerCount++; if (this.timerCount >= Config.TIP_TIMER_COUNT){ this.stopTimer(); this.dispatchEvent(new Event(Config.EVENT_TIP_RESET, true)); }; } } }//package hud
Section 201
//RopeButton (hud.RopeButton) package hud { import core.*; public class RopeButton extends MaterialButton { public function RopeButton(){ super(Config.EVENT_ROPE); } } }//package hud
Section 202
//SoundPanel (hud.SoundPanel) package hud { import flash.display.*; import core.*; import flash.events.*; import picaso.*; import sounds.*; import picaso.templates.*; public dynamic class SoundPanel extends SpriteAdvanced { private var _musicBar:VolumeBar; public var qualityButton:QualityButton; public var testersBtn:SimpleButton; private var _mouseDown:Boolean;// = false public var soundsBtn:SoundsButton; private var testersPopUp:TestersPopUp; private var currentQuality:int;// = -1 private var _soundsBar:VolumeBar; public var qualityBtn:QualityButton; private var testersButton:SimpleButton; public var musicBtn:MusicButton; public function SoundPanel(){ _mouseDown = false; currentQuality = -1; super(); this["musicBtn"].addEventListener(MouseEvent.MOUSE_OVER, musicBtn_mouseOverHandler, false, 0, true); this["soundsBtn"].addEventListener(MouseEvent.MOUSE_OVER, soundsBtn_mouseOverHandler, false, 0, true); _musicBar = new VolumeBar("VolumeBarGFX"); _musicBar.alpha = 0; _musicBar.x = this["musicBtn"].x; _musicBar.y = (this["musicBtn"].y - 19); _musicBar.rotation = -90; _musicBar.volume = 0.75; _soundsBar = new VolumeBar("VolumeBarGFX"); _soundsBar.alpha = 0; _soundsBar.x = this["soundsBtn"].x; _soundsBar.y = (this["soundsBtn"].y - 19); _soundsBar.rotation = -90; _soundsBar.volume = 0.75; this.addChildAt(_musicBar, 0); this.addChildAt(_soundsBar, 0); _musicBar.visible = false; _soundsBar.visible = false; this.qualityButton = this["qualityBtn"]; this.qualityButton.addEventListener(MouseEvent.CLICK, onQuality, false, 0, true); this.qualityButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.qualityButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.testersButton = this["testersBtn"]; this.testersButton.visible = false; } private function soundsBtn_mouseOverHandler(_arg1:MouseEvent):void{ _soundsBar.visible = true; this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener, false, 0, true); } private function enterFrameHandler(_arg1:Event):void{ var _local2:Boolean; var _local3:Boolean; if (!_mouseDown){ if (_musicBar.visible){ _local2 = _musicBar.getBounds(this).contains(this.mouseX, this.mouseY); _local3 = this["musicBtn"].getBounds(this).contains(this.mouseX, this.mouseY); if (((!(_local2)) && (!(_local3)))){ if (_musicBar.alpha > 0.1){ _musicBar.alpha = (_musicBar.alpha - 0.1); } else { _musicBar.visible = false; }; } else { if (_musicBar.alpha < 1){ _musicBar.alpha = (_musicBar.alpha + 0.1); }; }; }; if (_soundsBar.visible){ _local2 = _soundsBar.getBounds(this).contains(this.mouseX, this.mouseY); _local3 = this["soundsBtn"].getBounds(this).contains(this.mouseX, this.mouseY); if (((!(_local2)) && (!(_local3)))){ if (_soundsBar.alpha > 0.1){ _soundsBar.alpha = (_soundsBar.alpha - 0.1); } else { _soundsBar.visible = false; }; } else { if (_soundsBar.alpha < 1){ _soundsBar.alpha = (_soundsBar.alpha + 0.1); }; }; }; if (((!(_musicBar.visible)) && (!(_soundsBar.visible)))){ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); this.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener); }; }; SoundManager.setChannelVolume(SoundData.MUSIC_CHANNELS, _musicBar.volume); SoundManager.setChannelVolume(SoundData.SOUND_CHANNELS, _soundsBar.volume); } private function onQuality(_arg1:MouseEvent):void{ if (this.stage == null){ return; }; if (this.currentQuality == -1){ if (this.stage.quality == "BEST"){ this.currentQuality = 0; } else { if (this.stage.quality == "HIGH"){ this.currentQuality = 1; } else { if (this.stage.quality == "MEDIUM"){ this.currentQuality = 2; } else { this.currentQuality = 3; }; }; }; }; this.currentQuality++; if (this.currentQuality == 4){ this.currentQuality = 1; }; if (this.currentQuality == 0){ this.stage.quality = "BEST"; } else { if (this.currentQuality == 1){ this.stage.quality = "HIGH"; } else { if (this.currentQuality == 2){ this.stage.quality = "MEDIUM"; } else { this.stage.quality = "LOW"; }; }; }; this.qualityButton.setLetter(); GAManager.trackPage(("/quality-changed-to-" + this.stage.quality)); } private function musicBtn_mouseOverHandler(_arg1:MouseEvent):void{ _musicBar.visible = true; this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener, false, 0, true); } private function onTestersButton(_arg1:MouseEvent):void{ if (this.testersPopUp != null){ return; }; this.testersPopUp = new TestersPopUp(); this.testersPopUp.x = (-(Config.SCREEN_WIDTH) / 2); this.testersPopUp.y = (-(Config.SCREEN_HEIGHT) / 2); this.testersPopUp.addEventListener(TestersPopUp.ON_OK, onCloseTestersPopUp, false, 0, true); this.testersPopUp.addEventListener(TestersPopUp.ON_RESET, onTestersPopUpReset, false, 0, true); this.addChild(testersPopUp); this.dispatchEvent(new Event(TestersPopUp.ON_READY, true)); } private function stage_mouseUpHandler(_arg1:MouseEvent):void{ _mouseDown = false; stage.removeEventListener(MouseEvent.MOUSE_UP, stage_mouseUpHandler); } private function onTestersPopUpReset(_arg1:Event):void{ if (this.testersPopUp == null){ return; }; this.testersPopUp.removeEventListener(TestersPopUp.ON_OK, onCloseTestersPopUp); this.testersPopUp.removeEventListener(TestersPopUp.ON_RESET, onTestersPopUpReset); this.removeChild(this.testersPopUp); this.testersPopUp.cleanup(); this.testersPopUp = null; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.dispatchEvent(new Event(TestersPopUp.ON_CLOSED, true)); this.dispatchEvent(new Event(TestersPopUp.RESET_ALL, true)); } private function onCloseTestersPopUp(_arg1:Event):void{ this.testersPopUp.removeEventListener(TestersPopUp.ON_OK, onCloseTestersPopUp); this.testersPopUp.removeEventListener(TestersPopUp.ON_RESET, onTestersPopUpReset); this.removeChild(this.testersPopUp); this.testersPopUp.cleanup(); this.testersPopUp = null; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.dispatchEvent(new Event(TestersPopUp.ON_CLOSED, true)); } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function mouseDownListener(_arg1:MouseEvent):void{ _mouseDown = true; stage.addEventListener(MouseEvent.MOUSE_UP, stage_mouseUpHandler, false, 0, true); } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package hud
Section 203
//SoundsButton (hud.SoundsButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class SoundsButton extends MovieClip { private var _switched:Boolean; public function SoundsButton(){ buttonMode = true; useHandCursor = true; switchOn(); addEventListener(MouseEvent.CLICK, clickHandler); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); } public function switchOn(_arg1:Boolean=false):void{ if (_arg1){ gotoAndStop(2); } else { gotoAndStop(1); }; _switched = true; } private function mouseOutHandler(_arg1:MouseEvent):void{ if (_switched){ gotoAndStop(1); } else { gotoAndStop(3); }; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickHandler(_arg1:MouseEvent):void{ if (_switched){ switchOff(true); } else { switchOn(true); }; dispatchEvent(new Event(Config.EVENT_SOUNDS, true)); } public function switchOff(_arg1:Boolean=false):void{ if (_arg1){ gotoAndStop(4); } else { gotoAndStop(3); }; _switched = false; } private function mouseOverHandler(_arg1:MouseEvent):void{ if (_switched){ gotoAndStop(2); } else { gotoAndStop(4); }; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package hud
Section 204
//StartButton (hud.StartButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class StartButton extends SimpleButton { private var timerActivated:Boolean; private var _hidden:Boolean; private var timerCount:int; public function StartButton(){ reset(); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); } private function startTimer():void{ if (this.timerActivated){ return; }; this.timerCount = 0; this.timerActivated = true; this.addEventListener(Event.ENTER_FRAME, timerCounter, false, 0, true); } public function reset():void{ if (visible){ alpha = 1; } else { visible = true; }; enabled = true; if (!hasEventListener(MouseEvent.CLICK)){ addEventListener(MouseEvent.CLICK, clickHandler); }; } private function stopTimer():void{ if (!this.timerActivated){ return; }; this.removeEventListener(Event.ENTER_FRAME, timerCounter); this.timerActivated = false; } public function hide(_arg1:Boolean=true):void{ if (hasEventListener(MouseEvent.CLICK)){ removeEventListener(MouseEvent.CLICK, clickHandler); }; enabled = false; if (!_arg1){ alpha = 0.3; } else { visible = false; }; } private function mouseOutHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.stopTimer(); } private function clickHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_START, true)); } private function mouseOverHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); this.startTimer(); } private function timerCounter(_arg1:Event):void{ if (!this.timerActivated){ return; }; this.timerCount++; if (this.timerCount >= Config.TIP_TIMER_COUNT){ this.stopTimer(); this.dispatchEvent(new Event(Config.EVENT_TIP_START, true)); }; } } }//package hud
Section 205
//SteelButton (hud.SteelButton) package hud { import core.*; public class SteelButton extends MaterialButton { public function SteelButton(){ super(Config.EVENT_STEEL); } } }//package hud
Section 206
//StressButton (hud.StressButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class StressButton extends MovieClip { private var timerActivated:Boolean; private var _switched:Boolean; private var timerCount:int; public function StressButton(){ buttonMode = true; useHandCursor = true; _switched = false; reset(); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } private function timerCounter(_arg1:Event):void{ if (!this.timerActivated){ return; }; this.timerCount++; if (this.timerCount >= Config.TIP_TIMER_COUNT){ this.stopTimer(); this.dispatchEvent(new Event(Config.EVENT_TIP_STRESS, true)); }; } private function startTimer():void{ if (this.timerActivated){ return; }; this.timerCount = 0; this.timerActivated = true; this.addEventListener(Event.ENTER_FRAME, timerCounter, false, 0, true); } private function stopTimer():void{ if (!this.timerActivated){ return; }; this.removeEventListener(Event.ENTER_FRAME, timerCounter); this.timerActivated = false; } public function reset():void{ if (_switched){ switchOn(); } else { switchOff(); }; alpha = 1; if (!hasEventListener(MouseEvent.CLICK)){ addEventListener(MouseEvent.CLICK, clickHanlder, false, 0, true); }; } public function hide():void{ alpha = 0.3; if (hasEventListener(MouseEvent.CLICK)){ removeEventListener(MouseEvent.CLICK, clickHanlder); }; } public function switchOn():void{ gotoAndStop(2); _switched = true; } private function clickHanlder(_arg1:MouseEvent):void{ if (_switched){ switchOff(); } else { switchOn(); }; if (this.alpha == 1){ dispatchEvent(new Event(Config.EVENT_STRESS, true)); }; } private function mouseOutHandler(_arg1:MouseEvent):void{ if (this.alpha == 1){ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; this.stopTimer(); } public function switchOff():void{ gotoAndStop(1); _switched = false; } private function mouseOverHandler(_arg1:MouseEvent):void{ if (this.alpha == 1){ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); }; this.startTimer(); } public function show():void{ alpha = 1; if (!hasEventListener(MouseEvent.CLICK)){ addEventListener(MouseEvent.CLICK, clickHanlder, false, 0, true); }; } } }//package hud
Section 207
//UndoButton (hud.UndoButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class UndoButton extends SimpleButton { private var timerActivated:Boolean; private var _hidden:Boolean; private var timerCount:int; public function UndoButton(){ reset(); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } private function startTimer():void{ if (this.timerActivated){ return; }; this.timerCount = 0; this.timerActivated = true; this.addEventListener(Event.ENTER_FRAME, timerCounter, false, 0, true); } public function reset():void{ alpha = 1; enabled = true; _hidden = false; addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); } private function stopTimer():void{ if (!this.timerActivated){ return; }; this.removeEventListener(Event.ENTER_FRAME, timerCounter); this.timerActivated = false; } public function hide():void{ _hidden = true; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); alpha = 0.3; enabled = false; removeEventListener(MouseEvent.CLICK, clickHandler); } private function mouseOutHandler(_arg1:MouseEvent):void{ if (!_hidden){ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; this.stopTimer(); } private function clickHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_UNDO, true)); } private function mouseOverHandler(_arg1:MouseEvent):void{ if (!_hidden){ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); }; this.startTimer(); } private function timerCounter(_arg1:Event):void{ if (!this.timerActivated){ return; }; this.timerCount++; if (this.timerCount >= Config.TIP_TIMER_COUNT){ this.stopTimer(); this.dispatchEvent(new Event(Config.EVENT_TIP_UNDO, true)); }; } } }//package hud
Section 208
//ZoomInButton (hud.ZoomInButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class ZoomInButton extends SimpleButton { public function ZoomInButton(){ setListeners(); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; } public function set active(_arg1:Boolean):void{ if (_arg1 == this.enabled){ return; }; if (_arg1){ this.alpha = 1; setListeners(); } else { this.alpha = 0.7; cleanup(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; this.enabled = _arg1; } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_ZOOM_IN, true)); _arg1.stopPropagation(); } public function cleanup():void{ if (this.hasEventListener(MouseEvent.CLICK)){ this.removeEventListener(MouseEvent.CLICK, clickHandler); }; if (this.hasEventListener(MouseEvent.MOUSE_OVER)){ this.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.hasEventListener(MouseEvent.MOUSE_OUT)){ this.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } public function get active():Boolean{ return (this.enabled); } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function setListeners():void{ if (!this.hasEventListener(MouseEvent.CLICK)){ this.addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); }; if (!this.hasEventListener(MouseEvent.MOUSE_OVER)){ this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.hasEventListener(MouseEvent.MOUSE_OUT)){ this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; } } }//package hud
Section 209
//ZoomOutButton (hud.ZoomOutButton) package hud { import flash.display.*; import core.*; import flash.events.*; public class ZoomOutButton extends SimpleButton { public function ZoomOutButton(){ setListeners(); } public function set active(_arg1:Boolean):void{ if (_arg1 == this.enabled){ return; }; if (_arg1){ this.alpha = 1; setListeners(); } else { this.alpha = 0.7; cleanup(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; this.enabled = _arg1; } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_ZOOM_OUT, true)); _arg1.stopPropagation(); } public function cleanup():void{ if (this.hasEventListener(MouseEvent.CLICK)){ this.removeEventListener(MouseEvent.CLICK, clickHandler); }; if (this.hasEventListener(MouseEvent.MOUSE_OVER)){ this.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.hasEventListener(MouseEvent.MOUSE_OUT)){ this.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } public function get active():Boolean{ return (this.enabled); } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function setListeners():void{ if (!this.hasEventListener(MouseEvent.CLICK)){ this.addEventListener(MouseEvent.CLICK, clickHandler, false, 0, true); }; if (!this.hasEventListener(MouseEvent.MOUSE_OVER)){ this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.hasEventListener(MouseEvent.MOUSE_OUT)){ this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; } } }//package hud
Section 210
//wav (intro_slide1.wav) package intro_slide1 { import flash.media.*; public dynamic class wav extends Sound { } }//package intro_slide1
Section 211
//wav (intro_slide2.wav) package intro_slide2 { import flash.media.*; public dynamic class wav extends Sound { } }//package intro_slide2
Section 212
//wav (intro_slide3.wav) package intro_slide3 { import flash.media.*; public dynamic class wav extends Sound { } }//package intro_slide3
Section 213
//Level00 (levels.Level00) package levels { import flash.events.*; import flash.net.*; public class Level00 extends LevelManager { private var loader:URLLoader; private var xml:XML; private var request:URLRequest; private var level:int; public function init(_arg1:int):void{ var str:String; var levelNumber = _arg1; str = "Level.xml"; this.loader = new URLLoader(); this.request = new URLRequest(str); this.level = levelNumber; try { this.loader.load(this.request); this.loader.addEventListener(Event.COMPLETE, onCompleteHandler); } catch(error:Error) { trace("Unable to load requested document", str); }; } private function onCompleteHandler(_arg1:Event):void{ var _local2:URLLoader; var _local3:LevelData; this.loader.removeEventListener(Event.COMPLETE, onCompleteHandler); _local2 = (_arg1.target as URLLoader); if (_local2 != null){ this.xml = new XML(_local2.data); _local2.close(); _local3 = new LevelData(new XMLList(this.xml)); _local3.index = 0; super.initLevel(_local3); } else { trace("Error while loading XML document"); }; } } }//package levels
Section 214
//Level01 (levels.Level01) package levels { import flash.display.*; import flash.geom.*; import core.*; import flash.events.*; import flash.net.*; import vis.*; import popup.*; import characters.*; public class Level01 extends LevelManager { private var dotsBaloon:DotsBaloon; private var so:SharedObject; private var inputNamePopUp:BigPopUpInputName; private var deckSamplesFound:Array; private var tutorialDeckSprite:Sprite; private var deckDirection:int;// = 0 private var timer:int; private var tutorialArrow:TutorialArrow; private var startEvent:Boolean;// = false private var dotsDelay:int;// = -1 private var currentPhase:String; private var solution:Object; private var sampleMaterials:Array; private var chudik:Protagonist; public function Level01(){ deckDirection = 0; dotsDelay = -1; startEvent = false; super(); } private function phase1(_arg1:Event):void{ this.chudik.removeEventListener(Protagonist.EVENT_FINISH_ACTION, phase1); this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; _layerEngine.addChild(this.phraseBaloon); this.phraseBaloon.type = TalkBaloon.TYPE_NEXT; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "My home sweet home is so far away! I’ll need to get to the other land bank! The water is so cold and I'm afraid of drowning. Maybe it would be possible to build a bridge?"; } else { this.phraseBaloon.text = "Дом, как же далеко ты от меня! Ох, мне нужно как-то перебраться на другую сторону! Но вода такая холодная, я боюсь утонуть. Возможно, если получится построить мост..."; }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase3, false, 0, true); this.phraseBaloon.show(); } private function phase4(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase4); this.chudik.addEventListener(Protagonist.EVENT_FINISH_ACTION, phase5, false, 0, true); this.chudik.turn(Protagonist.TURN_FROM_LEFT_TO_PLAYER, true); } private function introduction():void{ this.setTutorialMode(); if (this.islandText){ this.addEventListener(Event.ENTER_FRAME, waitToIslandText, false, 0, true); return; }; this.chudik.manualMode = true; this.chudik.addEventListener(Protagonist.EVENT_FINISH_ACTION, phase1, false, 0, true); this.chudik.turn(Protagonist.TURN_LEFT, true); } private function phase7(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase7); this.inputNamePopUp = new BigPopUpInputName(); this.inputNamePopUp.x = (Config.SCREEN_WIDTH / 2); this.inputNamePopUp.y = (Config.SCREEN_HEIGHT / 2); this.inputNamePopUp.inputName.text = this.playerName; this.addChild(this.inputNamePopUp); this.inputNamePopUp.addEventListener(BigPopUpInputName.EVENT_OK, phase8, false, 0, true); this.inputNamePopUp.show(); } private function phase8(_arg1:Event):void{ this.inputNamePopUp.removeEventListener(BigPopUpInputName.EVENT_OK, phase8); if (this.inputNamePopUp.inputName.text.length > 0){ this.playerName = this.inputNamePopUp.inputName.text; }; this.inputNamePopUp.addEventListener(BigPopUpInputName.EVENT_HIDDEN, phase9, false, 0, true); this.inputNamePopUp.hide(); so = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (so.size != 0){ so.data.nameIsEntered = true; }; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function phase9(_arg1:Event):void{ this.inputNamePopUp.addEventListener(BigPopUpInputName.EVENT_HIDDEN, phase9); this.inputNamePopUp.cleanup(); this.removeChild(this.inputNamePopUp); this.inputNamePopUp = null; this.phraseBaloon.show(); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = (("Nice to meet you, " + this.playerName) + "! I'm Crabi. Can you help me get home? I can't build a bridge for myself so I’ll need your help."); } else { this.phraseBaloon.text = (("Приятно познакомиться, " + this.playerName) + "! Меня зовут Краби. Вы поможете мне добраться домой? Я не могу построить мост своими силами, поэтому мне нужна ваша помощь."); }; if (so.data.introducedHeroes.indexOf("Glazan") == -1){ so.data.introducedHeroes.push("Glazan"); so.flush(); }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase10, false, 0, true); } private function phase6(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase6); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase7, false, 0, true); this.phraseBaloon.hide(); } private function phase3(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase3); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase4, false, 0, true); this.phraseBaloon.hide(); } private function phase5(_arg1:Event):void{ this.chudik.removeEventListener(Protagonist.EVENT_FINISH_ACTION, phase5); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Oh, who are you?"; } else { this.phraseBaloon.text = "Ой, кто вы?"; }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase6, false, 0, true); this.phraseBaloon.show(); } private function overDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function outDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function phase20a(_arg1:Event):void{ this.removeEventListener(Config.EVENT_START, phase20a); if (this.dotsBaloon.hasEventListener(DotsBaloon.EVENT_SHOWED)){ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); }; if (this.dotsBaloon.hasEventListener(MouseEvent.CLICK)){ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OVER)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OUT)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); }; this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21a, false, 0, true); this.dotsBaloon.hide(); } private function phase18aa(_arg1:Event):void{ var _local2:Boolean; var _local3:int; if (!this.dotsBaloon){ return; }; if (!_protagonists){ if (this.dotsBaloon){ this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); }; return; }; _local2 = false; _local3 = 0; while (_local3 < _protagonists.length) { if ((_protagonists[_local3] as Protagonist).currentAction == Protagonist.JUMP){ _local2 = true; break; }; _local3++; }; if (_local2){ this.dotsBaloon.hide(); } else { this.dotsBaloon.show(); }; } private function phase21a(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21a); this.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.phase18a(); } private function phase10(_arg1:Event=null):void{ if (_arg1){ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase10); this.chudik.manualMode = false; }; if (!this.tutorialMode){ this.setTutorialMode(); }; if (!this.phraseBaloon){ this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; _layerEngine.addChild(this.phraseBaloon); this.phraseBaloon.show(); }; this.phraseBaloon.type = TalkBaloon.TYPE_YES_NO; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "My friends and I can tell you how to build bridges. Do you want me to help you?"; } else { this.phraseBaloon.text = "Рассказать вам, как правильно строить мосты?"; }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_YES, phase11a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NO, phase11b, false, 0, true); } private function phase13(_arg1:MouseEvent):void{ this.currentPhase = "13"; this.blockConnect = true; this.blockDelete = true; if (((!((_pointer.x == 160))) || (!((_pointer.y == 300))))){ return; }; if (this.tutorialArrow){ this.tutorialArrow.x = 280; }; } private function phase14(_arg1:Event):void{ this.currentPhase = "14"; if (((!((_pointer.x == 280))) || (!((_pointer.y == 300))))){ this.tutorialArrow.x = 180; return; }; this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase13); this.removeEventListener(MouseEvent.MOUSE_UP, phase14); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "And now another one..."; } else { this.phraseBaloon.text = "А теперь - еще один, чтобы получился мост."; }; this.tutorialDeckSprite.x = (this.tutorialDeckSprite.x + 120); tutorialDeckSprite.alpha = 0.5; if (this.tutorialArrow){ tutorialArrow.x = (tutorialArrow.x + 60); }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase15, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase16, false, 0, true); } private function phase15(_arg1:MouseEvent):void{ this.currentPhase = "15"; this.blockConnect = true; this.blockDelete = true; if ((((_pointer.x == 280)) && ((_pointer.y == 300)))){ deckDirection = 1; } else { if ((((_pointer.x == 400)) && ((_pointer.y == 300)))){ deckDirection = -1; } else { return; }; }; } private function phase16(_arg1:MouseEvent):void{ this.currentPhase = "16"; if (deckDirection == 1){ if (((!((_pointer.x == 400))) || (!((_pointer.y == 300))))){ return; }; } else { if (deckDirection == -1){ if (((!((_pointer.x == 280))) || (!((_pointer.y == 300))))){ return; }; } else { return; }; }; this.addEventListener(Config.EVENT_CONNECT_POINTS, phase16a, false, 0, true); this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase15); this.removeEventListener(MouseEvent.MOUSE_UP, phase16); this._layerEngine.removeChild(this.tutorialDeckSprite); this.tutorialDeckSprite = null; } private function phase17(_arg1:Event):void{ var _local2:SharedObject; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase17); if (this.currentPhase == "11a"){ this._hud.deckButton.removeEventListener(MouseEvent.CLICK, phase12); } else { if ((((this.currentPhase == "12a")) || ((this.currentPhase == "14")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase13); this.removeEventListener(MouseEvent.MOUSE_UP, phase14); } else { if ((((((this.currentPhase == "14")) || ((this.currentPhase == "15")))) || ((this.currentPhase == "16")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase15); this.removeEventListener(MouseEvent.MOUSE_UP, phase16); } else { if (this.currentPhase == "16b"){ _hud.startButton.removeEventListener(Config.EVENT_START, phase17a); }; }; }; }; if (this.tutorialDeckSprite){ this._layerEngine.removeChild(this.tutorialDeckSprite); this.tutorialDeckSprite = null; }; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase18, false, 0, true); this.phraseBaloon.hide(); } private function phase11a(_arg1:Event):void{ this.currentPhase = "11a"; this.blockDelete = false; this.reset(); this.blockDelete = true; _hud.undoButton.hide(); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_YES, phase11a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NO, phase11b); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Let's start. First of all choose the deck material, I can walk on this."; } else { this.phraseBaloon.text = "Хорошо, начнем. Прежде всего, вам нужно выбрать деревянную балку. Это единственный материал, по которому можно ходить."; }; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SKIP, phase17, false, 0, true); this._hud.deckButton.reset(); this._hud.deckButton.addEventListener(MouseEvent.CLICK, phase12, false, 0, true); tutorialArrow = new TutorialArrow(); tutorialArrow.x = 250; tutorialArrow.y = 70; tutorialArrow.rotation = -30; this.addChild(tutorialArrow); } private function phase11b(_arg1:Event):void{ var _local2:SharedObject; this.currentPhase = "11b"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_YES, phase11a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NO, phase11b); _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase11c, false, 0, true); this.phraseBaloon.hide(); } private function phase19(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); this.dotsBaloon.addEventListener(MouseEvent.CLICK, phase20, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon, false, 0, true); } private function phase12(_arg1:MouseEvent):void{ this.currentPhase = "12"; this._hud.deckButton.removeEventListener(MouseEvent.CLICK, phase12); _arg1.stopPropagation(); _hud.steelButton.hide(); _hud.ropeButton.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase12a, false, 0, true); this.phraseBaloon.hide(); } private function phase11c(_arg1:Event):void{ this.currentPhase = "11c"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase11c); _layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon = null; this.unsetTutorialMode(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function phase18(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase18); _layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.unsetTutorialMode(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function phase21(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21); this.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.phase10(); } private function phase20(_arg1:MouseEvent):void{ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); this.removeEventListener(Config.EVENT_START, phase20a); this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21, false, 0, true); this.dotsBaloon.hide(); } private function phase17ba(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase17ba); this.phraseBaloon.type = TalkBaloon.TYPE_OK; this.phraseBaloon.text = "Все мосты сохраняются автоматически, и вы всегда можете вернуться и улучшить уже построенный мост!"; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_OK, phase17c, false, 0, true); } public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; var _local5:Boolean; _local2 = <level><surfaces> <surface> <point x="160" y="300" pin="true"/> <point x="-20" y="300" pin="false"/> <point x="-20" y="500" pin="false"/> <point x="160" y="500" pin="false"/> </surface> <surface> <point x="400" y="300" pin="true"/> <point x="640" y="300" pin="false"/> <point x="640" y="520" pin="false"/> <point x="400" y="520" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="20" y="260" width="80" height="40"/> <zone type="finishzone" x="460" y="260" width="80" height="40"/> </zones> <grass> </grass> <heroes> <hero type="Glazan" x="60" y="275"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="206" ty="-21" type="1" layer="1"/> </sprites> <borders waterLineY="420" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="800"/> <weather value=""/> <difficulty value="1"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 1; _local5 = true; so = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (so.size != 0){ if ((((so.data.passedTutorials is Array)) && ((so.data.passedTutorials.length > 0)))){ _local5 = !(so.data.passedTutorials[0]); }; }; this.initLevel(_local4, _local5); this.chudik = this._protagonists[0]; if (_local5){ this.introduction(); } else { this.phase18a(); }; } private function phase12a(_arg1:Event):void{ var _local2:LinkElement; this.currentPhase = "12a"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase12a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase17); _layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon = null; this.phraseBaloon = new TalkBaloonAlt(); this.phraseBaloon.x = 60; this.phraseBaloon.y = (Config.SCREEN_HEIGHT - 300); _layerEngine.addChild(this.phraseBaloon); this.phraseBaloon.show(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SKIP, phase17, false, 0, true); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "To build a piece of bridge, left click on a green anchor point and draw a line where you want it to start & end. Remember, a bridge piece’s length is limited. For now please build the deck piece shown in the sample."; } else { this.phraseBaloon.text = "Чтобы построить сегмент моста, наведите курсор на зеленую точку-якорь и зажмите левую кнопку мыши и потяните курсор в нужную сторону. Однако следует помнить, что длина сегмента ограничена. Пожалуйста, постройте деревянный сегмент, как показано на примере."; }; tutorialArrow.x = 180; tutorialArrow.y = 320; tutorialArrow.rotation = -45; this._grid.visible = true; this.tutorialDeckSprite = makeDeckSprite(new Point(160, 300), new Point(280, 300)); this.tutorialDeckSprite.x = (160 + 60); this.tutorialDeckSprite.y = 300; this.tutorialDeckSprite.scaleY = (this.tutorialDeckSprite.scaleY * -1); this.tutorialDeckSprite.alpha = 0.5; _local2 = new LinkElement(); _local2.x = 60; _local2.y = 0; _local2.scaleY = (_local2.scaleY / this.tutorialDeckSprite.scaleY); this.tutorialDeckSprite.addChild(_local2); this._layerEngine.addChild(this.tutorialDeckSprite); this.addEventListener(MouseEvent.MOUSE_DOWN, phase13, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase14, false, 0, true); } private function phase16a(_arg1:Event):void{ this.currentPhase = "16a"; this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase16a); this.blockDelete = true; this.blockConnect = true; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase16b, false, 0, true); this.phraseBaloon.hide(); } private function phase16b(_arg1:Event):void{ this.currentPhase = "16b"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_OK, phase17c); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase16b); _layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon = null; this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; _layerEngine.addChild(this.phraseBaloon); this.phraseBaloon.show(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SKIP, phase17, false, 0, true); _hud.startButton.reset(); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Great! Now just click on the big green button in the upper left corner of the screen."; } else { this.phraseBaloon.text = "Отлично! Теперь, когда мост построен, вы должны сообщить об этом. Для этого нажмите на большую зеленую кнопку в левом верхнем углу."; }; startEvent = true; _hud.startButton.addEventListener(Config.EVENT_START, phase17a, false, 0, true); this.currMaterial = -1; this.tutorialArrow.x = 70; this.tutorialArrow.y = 75; this.tutorialArrow.rotation = -45; this.tutorialArrow.visible = true; this.chudik.manualMode = false; } private function phase17b(_arg1:Event):void{ this.currentPhase = "17b"; _hud.editButton.hide(false); if (_winTemp){ this.removeEventListener(Event.ENTER_FRAME, phase17b); this.phraseBaloon.scaleX = (this.phraseBaloon.scaleX * -1); this.phraseBaloon.textField.scaleX = (this.phraseBaloon.textField.scaleX * -1); this.phraseBaloon.textField.x = (this.phraseBaloon.textField.x - 25); this.phraseBaloon["okBtn"].scaleX = (this.phraseBaloon["okBtn"].scaleX * -1); this.phraseBaloon["nextBtn"].scaleX = (this.phraseBaloon["nextBtn"].scaleX * -1); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.type = TalkBaloon.TYPE_OK; this.phraseBaloon.text = "Hurray! Thank you! Remember, all these bridges will be saved for later, you can always return to past bridges to adjust them and make them even better!"; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_OK, phase17c, false, 0, true); } else { this.phraseBaloon.type = TalkBaloon.TYPE_NEXT; this.phraseBaloon.text = "Ура! Получилось! Спасибо вам!\nЗапомните, мосты, которые Вы построили, помогут другим Ёвинам передвигаться между островами."; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase17ba, false, 0, true); }; this.phraseBaloon.show(); }; } private function phase17a(_arg1:Event):void{ this.currentPhase = "17a"; _hud.startButton.removeEventListener(Config.EVENT_START, phase17a); this.phraseBaloon.hide(); this.removeChild(this.tutorialArrow); this.tutorialArrow = null; this.addEventListener(Event.ENTER_FRAME, phase17b, false, 0, true); } private function phase17c(_arg1:Event):void{ this.currentPhase = "17c"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_OK, phase17c); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase17d, false, 0, true); this.phraseBaloon.hide(); } private function setTutorialMode():void{ this.chudik = this._protagonists[0]; this.tutorialMode = true; this.startEvent = false; this.currMaterial = -1; _grid.visible = false; _hud.deckButton.hide(); _hud.steelButton.hide(); _hud.ropeButton.hide(); _hud.startButton.hide(false); _hud.editButton.hide(); _hud.stressButton.hide(); _hud.undoButton.hide(); _hud.resetButton.hide(); this.blockConnect = true; this.blockDelete = true; deckSamplesFound = [false, false]; } private function phase17d(_arg1:Event):void{ var _local2:SharedObject; this.currentPhase = "17d"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase17); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase16b); _layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon = null; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local2.data.passedTutorials){ _local2.data.passedTutorials[0] = true; } else { _local2.data.passedTutorials = [true, false, false, false, false]; }; _local2.flush(); this.unsetTutorialMode(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.addPopUp(Config.POPUP_WIN); } private function phase18b(_arg1:Event):void{ if (((((((((((!(this.phraseBaloon)) && ((this.currMode == Config.MODE_BUILDING)))) && (!(this.paused)))) && (!(this.tutorialMode)))) && (!(this.loaderScreen)))) && (!(this.islandText)))){ this.removeEventListener(Event.ENTER_FRAME, phase18b); this.phase18a(); }; } private function phase18a():void{ if (((((((((((this.phraseBaloon) || (!((this.currMode == Config.MODE_BUILDING))))) || (this.paused))) || (this.tutorialMode))) || (this.loaderScreen))) || (this.islandText))){ this.addEventListener(Event.ENTER_FRAME, phase18b, false, 0, true); return; }; this.dotsBaloon = new DotsBaloon(); this.dotsBaloon.x = this.chudik.particle.x; this.dotsBaloon.y = this.chudik.particle.y; this.addChild(this.dotsBaloon); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_SHOWED, phase19, false, 0, true); this.addEventListener(Config.EVENT_START, phase20a, false, 0, true); this.dotsBaloon.show(); this.dotsBaloon.addEventListener(Event.ENTER_FRAME, phase18aa, false, 0, true); } private function waitToIslandText(_arg1:Event):void{ if (!this.islandText){ this.removeEventListener(Event.ENTER_FRAME, waitToIslandText); this.introduction(); }; } private function unsetTutorialMode():void{ var _local1:int; this.tutorialMode = false; this.startEvent = false; if (this.currMode == Config.MODE_BUILDING){ _grid.visible = true; _hud.deckButton.reset(); _hud.steelButton.reset(); _hud.ropeButton.reset(); _hud.startButton.reset(); _hud.editButton.reset(); _hud.editButton.hide(true); _hud.stressButton.reset(); _hud.undoButton.reset(); _hud.resetButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; } else { _hud.editButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; }; this.chudik.manualMode = false; if (((sampleMaterials) && ((sampleMaterials.length > 0)))){ _local1 = 0; while (_local1 < sampleMaterials.length) { _layerEngine.removeChild(sampleMaterials[_local1]); _local1++; }; sampleMaterials = null; }; if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; this.phase18a(); } } }//package levels
Section 215
//Level02 (levels.Level02) package levels { import flash.display.*; import flash.geom.*; import core.*; import flash.events.*; import flash.net.*; import vis.*; import characters.*; public class Level02 extends LevelManager { private var dotsBaloon:DotsBaloon; private var so:SharedObject; private var deckSamplesFound:Array; private var ropeSamplesFound:Array; private var timer:int;// = 0 private var tutorialArrow:TutorialArrow; private var phase:int;// = 0 private var currentPhase:String; private var sampleMaterials:Array; private var p1:Point; private var p2:Point; private var chudik:Protagonist; public function Level02(){ timer = 0; phase = 0; super(); } private function phase4ad(_arg1:MouseEvent):void{ this.currentPhase = "4ad"; p1 = new Point(_pointer.x, _pointer.y); this.blockConnect = true; } private function phase9a(_arg1:Event):void{ var _local2:SharedObject; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase9a); if (_hud.startButton.hasEventListener(Config.EVENT_START)){ _hud.startButton.removeEventListener(Config.EVENT_START, phase8a); }; if (this.currentPhase){ if ((((this.currentPhase == "1aa")) || ((this.currentPhase == "2ad")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase2ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase2au); } else { if ((((this.currentPhase == "2au")) || ((this.currentPhase == "3d")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase3d); this.removeEventListener(MouseEvent.MOUSE_UP, phase3u); } else { if ((((this.currentPhase == "3u")) || ((this.currentPhase == "4ad")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase4ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase4au); } else { if (this.currentPhase == "4au"){ this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase4b); } else { if ((((this.currentPhase == "5")) || ((this.currentPhase == "6d")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase6d); this.removeEventListener(MouseEvent.MOUSE_UP, phase6u); } else { if ((((this.currentPhase == "6u")) || ((this.currentPhase == "7ad")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase7ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase7au); } else { if (this.currentPhase == "7au"){ this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase7b); } else { if (this.currentPhase == "7c"){ _hud.startButton.removeEventListener(Config.EVENT_START, phase8a); }; }; }; }; }; }; }; }; }; if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase8b, false, 0, true); } private function phase4au(_arg1:MouseEvent):void{ var _local2:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local2 = false; if ((((((((((p1.x == 140)) && ((p1.y == 280)))) && ((p2.x == 260)))) && ((p2.y == 280)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p2.x == 140)) && ((p2.y == 280)))) && ((p1.x == 260)))) && ((p1.y == 280)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p1.x == 260)) && ((p1.y == 280)))) && ((p2.x == 380)))) && ((p2.y == 280)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if ((((((((((p2.x == 260)) && ((p2.y == 280)))) && ((p1.x == 380)))) && ((p1.y == 280)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if ((((((((((p1.x == 380)) && ((p1.y == 280)))) && ((p2.x == 500)))) && ((p2.y == 280)))) && (!(deckSamplesFound[2])))){ deckSamplesFound[2] = true; _local2 = true; }; if ((((((((((p2.x == 380)) && ((p2.y == 280)))) && ((p1.x == 500)))) && ((p1.y == 280)))) && (!(deckSamplesFound[2])))){ deckSamplesFound[2] = true; _local2 = true; }; if (!_local2){ return; }; } else { return; }; this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase4ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase4au); this.currentPhase = "4au"; this.addEventListener(Config.EVENT_CONNECT_POINTS, phase4b, false, 0, true); } private function phase5(_arg1:Event):void{ var _local2:Sprite; this.currentPhase = "5"; this.phraseBaloon.removeEventListener(TalkBaloonAltInv.EVENT_NEXT, phase5); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Well, we are going to use the rope material to strengthen the bridge. Let’s connect the junctions of the bridge with the hook as it’s displayed on the sample."; } else { this.phraseBaloon.text = "Чтобы укрепить мост, воспользуемся веревкой. Соедините узлы моста с крюком, как показано на примере."; }; _grid.visible = true; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.lineStyle(Config.MATERIAL_ROPE_LINE_THICKNESS, Config.MATERIAL_ROPE_LINE_COLOR, 1); _local2.graphics.moveTo(260, 280); _local2.graphics.lineTo(320, 140); _local2.graphics.endFill(); _local2.alpha = 0.5; sampleMaterials.push(_local2); this._layerEngine.addChild(_local2); _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.lineStyle(Config.MATERIAL_ROPE_LINE_THICKNESS, Config.MATERIAL_ROPE_LINE_COLOR, 1); _local2.graphics.moveTo(380, 280); _local2.graphics.lineTo(320, 140); _local2.graphics.endFill(); _local2.alpha = 0.5; sampleMaterials.push(_local2); this._layerEngine.addChild(_local2); _hud.deckButton.hide(); _hud.ropeButton.reset(); this.currMaterial = Config.MATERIAL_ROPE; this.tutorialArrow.visible = false; this.addEventListener(MouseEvent.MOUSE_DOWN, phase6d, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase6u, false, 0, true); } private function phase4ba(_arg1:Event):void{ this.currentPhase = "4ba"; this.phraseBaloon.removeEventListener(TalkBaloonAltInv.EVENT_NEXT, phase4ba); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "See that hook over there? It’s a piece of an old building that was here before the storm, It looks pretty solid."; } else { this.phraseBaloon.text = "Видите тот крюк сверху? Это остатки старых конструкций. Они настолько крепкие, что никакой шторм им не помеха!"; }; tutorialArrow = new TutorialArrow(); tutorialArrow.x = 300; tutorialArrow.y = 160; tutorialArrow.rotation = 30; this.addChild(tutorialArrow); this.phraseBaloon.addEventListener(TalkBaloonAltInv.EVENT_NEXT, phase4c, false, 0, true); } private function overDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function outDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function phase20a(_arg1:Event):void{ this.removeEventListener(Config.EVENT_START, phase20a); if (this.dotsBaloon.hasEventListener(DotsBaloon.EVENT_SHOWED)){ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); }; if (this.dotsBaloon.hasEventListener(MouseEvent.CLICK)){ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OVER)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OUT)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); }; this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21a, false, 0, true); this.dotsBaloon.hide(); } private function phase2au(_arg1:Event):void{ var _local2:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local2 = false; if ((((((((((p1.x == 140)) && ((p1.y == 280)))) && ((p2.x == 260)))) && ((p2.y == 280)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p2.x == 140)) && ((p2.y == 280)))) && ((p1.x == 260)))) && ((p1.y == 280)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p1.x == 260)) && ((p1.y == 280)))) && ((p2.x == 380)))) && ((p2.y == 280)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if ((((((((((p2.x == 260)) && ((p2.y == 280)))) && ((p1.x == 380)))) && ((p1.y == 280)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if ((((((((((p1.x == 380)) && ((p1.y == 280)))) && ((p2.x == 500)))) && ((p2.y == 280)))) && (!(deckSamplesFound[2])))){ deckSamplesFound[2] = true; _local2 = true; }; if ((((((((((p2.x == 380)) && ((p2.y == 280)))) && ((p1.x == 500)))) && ((p1.y == 280)))) && (!(deckSamplesFound[2])))){ deckSamplesFound[2] = true; _local2 = true; }; if (!_local2){ return; }; } else { return; }; this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase2ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase2au); this.currentPhase = "2au"; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Good! Two pieces left..."; } else { this.phraseBaloon.text = "Отлично! А теперь еще один сегмент..."; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase3d, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase3u, false, 0, true); } private function phase18aa(_arg1:Event):void{ var _local2:Boolean; var _local3:int; if (!this.dotsBaloon){ return; }; if (!_protagonists){ if (this.dotsBaloon){ this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); }; return; }; _local2 = false; _local3 = 0; while (_local3 < _protagonists.length) { if ((_protagonists[_local3] as Protagonist).currentAction == Protagonist.JUMP){ _local2 = true; break; }; _local3++; }; if (_local2){ this.dotsBaloon.hide(); } else { this.dotsBaloon.show(); }; } private function phase2ad(_arg1:Event):void{ this.currentPhase = "2ad"; p1 = new Point(_pointer.x, _pointer.y); } private function phase1aa(_arg1:Event):void{ var _local2:int; this.currentPhase = "1aa"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase1aa); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon = new TalkBaloonAltInv(); this.phraseBaloon.x = 0; this.phraseBaloon.y = (Config.SCREEN_HEIGHT - 40); this.addChild(this.phraseBaloon); this.phraseBaloon.show(); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Ok! Let’s start with a building of three deck pieces like it’s shown on the sample!"; } else { this.phraseBaloon.text = "Для начала, давайте построим 3 деревянных сегмента, как показано на примере. Чтобы получился мост."; }; _grid.visible = true; _hud.deckButton.reset(); this.currMaterial = Config.MATERIAL_DECK; sampleMaterials = []; sampleMaterials.push(this.makeDeckSprite(new Point(140, 280), new Point(260, 280))); sampleMaterials[(sampleMaterials.length - 1)].x = ((140 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 280; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(this.makeDeckSprite(new Point(260, 280), new Point(380, 280))); sampleMaterials[(sampleMaterials.length - 1)].x = ((260 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 280; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(this.makeDeckSprite(new Point(380, 280), new Point(500, 280))); sampleMaterials[(sampleMaterials.length - 1)].x = ((380 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 280; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(new LinkElement(false, 1.5, 260, 280)); sampleMaterials.push(new LinkElement(false, 1.5, 380, 280)); _local2 = 0; while (_local2 < sampleMaterials.length) { sampleMaterials[_local2].alpha = 0.5; this._layerEngine.addChild(sampleMaterials[_local2]); _local2++; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase2ad, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase2au, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloonAltInv.EVENT_SKIP, phase9a, false, 0, true); } private function phase21a(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21a); this.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.phase18a(); } private function phase19(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); this.dotsBaloon.addEventListener(MouseEvent.CLICK, phase20, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon, false, 0, true); } private function phase21(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21); this.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.beginTutorial(); } private function phase20(_arg1:MouseEvent):void{ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); this.removeEventListener(Config.EVENT_START, phase20a); this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21, false, 0, true); this.dotsBaloon.hide(); } public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; var _local5:Boolean; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="140" y="280" pin="true"/> <point x="140" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="320" y="140" pin="true" hook="true" onlysteel="false" hookdirectionx="1" hookdirectiony="1" hookrotation="0"/> </surface> <surface> <point x="500" y="280" pin="true"/> <point x="640" y="280" pin="false"/> <point x="640" y="500" pin="false"/> <point x="500" y="500" pin="false"/> </surface> </surfaces> <zones> <zone type="finishzone" x="540" y="240" width="60" height="40"/> <zone type="rightzone" x="20" y="240" width="60" height="40"/> </zones> <grass> </grass> <heroes> <hero type="Cvetok" x="40" y="255"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="317" ty="13" type="2" layer="1"/> <!-- 167 x 13 --> </sprites> <borders waterLineY="360" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="2500"/> <weather value=""/> <difficulty value="1"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 2; _local5 = true; so = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (so.size != 0){ if ((((so.data.passedTutorials is Array)) && ((so.data.passedTutorials.length > 1)))){ _local5 = !(so.data.passedTutorials[1]); }; }; this.initLevel(_local4, _local5); this.chudik = this._protagonists[0]; if (_local5){ this.beginTutorial(); } else { this.phase18a(); }; } private function phase1a(_arg1:Event):void{ this.currentPhase = "1a"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_YES, phase1a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NO, phase1b); this.blockDelete = false; this.reset(); this.blockDelete = true; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase1aa, false, 0, true); this.phraseBaloon.hide(); } private function phase1b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_YES, phase1a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NO, phase1b); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase2b, false, 0, true); } private function phase2b(_arg1:Event):void{ var _local2:SharedObject; this.phraseBaloon.removeEventListener(TalkBaloonAltInv.EVENT_HIDDEN, phase2b); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.unsetTutorialMode(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function beginTutorial():void{ this.setTutorialMode(); if (this.islandText){ this.addEventListener(Event.ENTER_FRAME, waitToIslandText, false, 0, true); return; }; this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; this.addChild(this.phraseBaloon); this.phraseBaloon.text = ""; if (so.data.introducedHeroes.indexOf("Cvetok") == -1){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.textField.appendText((("Hello, " + this.playerName) + "! I'm Ohani! Crabi told me about you. Thank you very much for helping us. ")); } else { this.phraseBaloon.textField.appendText((("Привет, " + this.playerName) + "! Я Охани! Краби рассказал мне о вас. Большое спасибо, что помогаете нам.\n")); }; so.data.introducedHeroes.push("Cvetok"); so.flush(); }; this.phraseBaloon.type = TalkBaloon.TYPE_YES_NO; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.textField.appendText("This time the task is not so easy. But I’m sure you can do it! Do you want me to help?"); } else { this.phraseBaloon.textField.appendText("Ох, в этот раз задача сложнее, но я уверена, что у вас все получится! Хотите, я помогу?"); }; this.phraseBaloon.show(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_YES, phase1a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NO, phase1b, false, 0, true); } private function phase7ad(_arg1:MouseEvent):void{ this.currentPhase = "7ad"; p1 = new Point(_pointer.x, _pointer.y); this.blockConnect = true; } private function phase7au(_arg1:MouseEvent):void{ var _local2:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local2 = false; if ((((((((((p1.x == 260)) && ((p1.y == 280)))) && ((p2.x == 320)))) && ((p2.y == 140)))) && (!(ropeSamplesFound[0])))){ ropeSamplesFound[0] = true; _local2 = true; }; if ((((((((((p2.x == 260)) && ((p2.y == 280)))) && ((p1.x == 320)))) && ((p1.y == 140)))) && (!(ropeSamplesFound[0])))){ ropeSamplesFound[0] = true; _local2 = true; }; if ((((((((((p1.x == 380)) && ((p1.y == 280)))) && ((p2.x == 320)))) && ((p2.y == 140)))) && (!(ropeSamplesFound[1])))){ ropeSamplesFound[1] = true; _local2 = true; }; if ((((((((((p2.x == 380)) && ((p2.y == 280)))) && ((p1.x == 320)))) && ((p1.y == 140)))) && (!(ropeSamplesFound[1])))){ ropeSamplesFound[1] = true; _local2 = true; }; if (!_local2){ return; }; } else { return; }; this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase7ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase7au); this.currentPhase = "7au"; this.addEventListener(Config.EVENT_CONNECT_POINTS, phase7b, false, 0, true); } private function phase3d(_arg1:MouseEvent):void{ this.currentPhase = "3d"; p1 = new Point(_pointer.x, _pointer.y); this.blockConnect = true; } private function phase3u(_arg1:MouseEvent):void{ var _local2:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local2 = false; if ((((((((((p1.x == 140)) && ((p1.y == 280)))) && ((p2.x == 260)))) && ((p2.y == 280)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p2.x == 140)) && ((p2.y == 280)))) && ((p1.x == 260)))) && ((p1.y == 280)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p1.x == 260)) && ((p1.y == 280)))) && ((p2.x == 380)))) && ((p2.y == 280)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if ((((((((((p2.x == 260)) && ((p2.y == 280)))) && ((p1.x == 380)))) && ((p1.y == 280)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if ((((((((((p1.x == 380)) && ((p1.y == 280)))) && ((p2.x == 500)))) && ((p2.y == 280)))) && (!(deckSamplesFound[2])))){ deckSamplesFound[2] = true; _local2 = true; }; if ((((((((((p2.x == 380)) && ((p2.y == 280)))) && ((p1.x == 500)))) && ((p1.y == 280)))) && (!(deckSamplesFound[2])))){ deckSamplesFound[2] = true; _local2 = true; }; if (!_local2){ return; }; } else { return; }; this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase3d); this.removeEventListener(MouseEvent.MOUSE_UP, phase3u); this.currentPhase = "3u"; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "And the last one!"; } else { this.phraseBaloon.text = "И еще один!"; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase4ad, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase4au, false, 0, true); } private function phase4b(_arg1:Event):void{ this.currentPhase = "4b"; this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase4b); this.blockConnect = true; _grid.visible = false; _hud.deckButton.hide(); this.phraseBaloon.type = TalkBaloonAltInv.TYPE_SKIP_NEXT; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Great! We have a bridge now! But I’m afraid it’s not going to last for long... We have to strengthen it!"; } else { this.phraseBaloon.text = "Замечательно! У нас есть мост! Только, боюсь, такой мост долго не продержится. Нам нужно его укрепить!"; }; this.phraseBaloon.addEventListener(TalkBaloonAltInv.EVENT_NEXT, phase4ba, false, 0, true); } private function phase4c(_arg1:Event):void{ this.currentPhase = "4c"; this.phraseBaloon.removeEventListener(TalkBaloonAltInv.EVENT_NEXT, phase4c); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Anyway, if it could withstand the storm, I’m sure it can support our bridge, so let’s use it!"; } else { this.phraseBaloon.text = "Давайте воспользуемся этой конструкцией и укрепим наш мост."; }; this.phraseBaloon.addEventListener(TalkBaloonAltInv.EVENT_NEXT, phase5, false, 0, true); } private function phase6d(_arg1:MouseEvent):void{ this.currentPhase = "6d"; p1 = new Point(_pointer.x, _pointer.y); } private function setTutorialMode():void{ this.chudik = this._protagonists[0]; this.tutorialMode = true; this.currMaterial = -1; _grid.visible = false; _hud.deckButton.hide(); _hud.steelButton.hide(); _hud.ropeButton.hide(); _hud.startButton.hide(false); _hud.editButton.hide(); _hud.stressButton.hide(); _hud.undoButton.hide(); _hud.resetButton.hide(); this.blockConnect = true; this.blockDelete = true; deckSamplesFound = [false, false, false]; ropeSamplesFound = [false, false]; } private function phase6u(_arg1:MouseEvent):void{ var _local2:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local2 = false; if ((((((((((p1.x == 260)) && ((p1.y == 280)))) && ((p2.x == 320)))) && ((p2.y == 140)))) && (!(ropeSamplesFound[0])))){ ropeSamplesFound[0] = true; _local2 = true; }; if ((((((((((p2.x == 260)) && ((p2.y == 280)))) && ((p1.x == 320)))) && ((p1.y == 140)))) && (!(ropeSamplesFound[0])))){ ropeSamplesFound[0] = true; _local2 = true; }; if ((((((((((p1.x == 380)) && ((p1.y == 280)))) && ((p2.x == 320)))) && ((p2.y == 140)))) && (!(ropeSamplesFound[1])))){ ropeSamplesFound[1] = true; _local2 = true; }; if ((((((((((p2.x == 380)) && ((p2.y == 280)))) && ((p1.x == 320)))) && ((p1.y == 140)))) && (!(ropeSamplesFound[1])))){ ropeSamplesFound[1] = true; _local2 = true; }; if (!_local2){ return; }; } else { return; }; this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase6d); this.removeEventListener(MouseEvent.MOUSE_UP, phase6u); this.currentPhase = "6u"; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "That’s it! One more rope segment and we are done."; } else { this.phraseBaloon.text = "Вот так! И еще одну веревку!"; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase7ad, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase7au, false, 0, true); } private function phase18b(_arg1:Event):void{ if (((((((((((!(this.phraseBaloon)) && ((this.currMode == Config.MODE_BUILDING)))) && (!(this.paused)))) && (!(this.tutorialMode)))) && (!(this.loaderScreen)))) && (!(this.islandText)))){ this.removeEventListener(Event.ENTER_FRAME, phase18b); this.phase18a(); }; } private function phase7c(_arg1:Event):void{ this.currentPhase = "7c"; this.phraseBaloon.removeEventListener(TalkBaloonAltInv.EVENT_HIDDEN, phase7c); this.phraseBaloon.removeEventListener(TalkBaloonAltInv.EVENT_SKIP, phase9a); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; this.addChild(this.phraseBaloon); this.phraseBaloon.show(); this.blockConnect = true; _grid.visible = false; this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Good work! The bridge is ready! And since we’ve used ropes (the cheapest material we have) we saved a lot of money! And now please click on the big green Start button!"; } else { this.phraseBaloon.text = "Отлично! Мост построен, и при этом, благодаря веревке, мы сохранили кучу денег! Пожалуйста, нажмите на большую зеленую кнопку в левом верхнем углу."; }; this.tutorialArrow.x = 45; this.tutorialArrow.y = 75; this.tutorialArrow.rotation = 0; this.tutorialArrow.visible = true; _hud.startButton.reset(); _hud.startButton.addEventListener(Config.EVENT_START, phase8a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SKIP, phase9a, false, 0, true); } private function phase7b(_arg1:Event):void{ this.currentPhase = "7b"; this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase7b); this.blockConnect = true; this.phraseBaloon.addEventListener(TalkBaloonAltInv.EVENT_HIDDEN, phase7c, false, 0, true); this.phraseBaloon.hide(); } private function phase18a():void{ if (((((((((((this.phraseBaloon) || (!((this.currMode == Config.MODE_BUILDING))))) || (this.paused))) || (this.tutorialMode))) || (this.loaderScreen))) || (this.islandText))){ this.addEventListener(Event.ENTER_FRAME, phase18b, false, 0, true); return; }; this.dotsBaloon = new DotsBaloon(); this.dotsBaloon.x = this.chudik.particle.x; this.dotsBaloon.y = this.chudik.particle.y; this.addChild(this.dotsBaloon); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_SHOWED, phase19, false, 0, true); this.addEventListener(Config.EVENT_START, phase20a, false, 0, true); this.dotsBaloon.show(); this.dotsBaloon.addEventListener(Event.ENTER_FRAME, phase18aa, false, 0, true); } private function waitToIslandText(_arg1:Event):void{ if (!this.islandText){ this.removeEventListener(Event.ENTER_FRAME, waitToIslandText); this.beginTutorial(); }; } private function phase8a(_arg1:Event):void{ var _local2:SharedObject; _hud.startButton.removeEventListener(Config.EVENT_START, phase8a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase9a); if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local2.data.passedTutorials){ _local2.data.passedTutorials[1] = true; } else { _local2.data.passedTutorials = [true, true, false, false, false]; }; _local2.flush(); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase8b, false, 0, true); } private function phase8b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase8b); this.removeChild(this.phraseBaloon); this.phraseBaloon = null; this.unsetTutorialMode(); } private function unsetTutorialMode():void{ var _local1:int; this.tutorialMode = false; if (this.currMode == Config.MODE_BUILDING){ _grid.visible = true; _hud.deckButton.reset(); _hud.steelButton.reset(); _hud.ropeButton.reset(); _hud.startButton.reset(); _hud.editButton.reset(); _hud.editButton.hide(true); _hud.stressButton.reset(); _hud.undoButton.reset(); _hud.resetButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; } else { _hud.editButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; }; this.chudik.manualMode = false; if (((sampleMaterials) && ((sampleMaterials.length > 0)))){ _local1 = 0; while (_local1 < sampleMaterials.length) { _layerEngine.removeChild(sampleMaterials[_local1]); _local1++; }; sampleMaterials = null; }; if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; this.phase18a(); } } }//package levels
Section 216
//Level03 (levels.Level03) package levels { import core.*; import flash.events.*; import flash.net.*; import vis.*; import characters.*; public class Level03 extends LevelManager { private var dotsBaloon:DotsBaloon; private var so:SharedObject; private var tutorialArrow:TutorialArrow; private var chudik:Protagonist; private function phase9a(_arg1:Event):void{ var _local2:SharedObject; this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_OK, phase9a); this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_SKIP, phase10a); _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local2.data.passedTutorials){ _local2.data.passedTutorials[2] = true; } else { _local2.data.passedTutorials = [true, true, true, false, false]; }; _local2.flush(); this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_HIDDEN, phase9b, false, 0, true); this.phraseBaloon.hide(); } private function phase9b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_HIDDEN, phase9b); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.unsetTutorialMode(); } private function phase5(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase5); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "The Undo button cancels your last action."; } else { this.phraseBaloon.text = "Кнопка Отмена позволяет отменить любое ваше последнее действие, будь то построение или удаление."; }; this.tutorialArrow.x = 520; this.tutorialArrow.y = 75; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase6, false, 0, true); } private function phase7(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase7); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "This button calls for a menu where you can look at the help section, return to the level selection screen or quit the game with submitting your current score."; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase8, false, 0, true); } else { this.phraseBaloon.text = "Это кнопка вызывает меню, где вы можете просмотреть раздел помощи, выйти в окно выбора уровня или в главное меню."; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase7a, false, 0, true); }; this.tutorialArrow.x = 603; this.tutorialArrow.y = 75; this.tutorialArrow.rotation = 0; } private function phase8(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase8); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon.type = TalkBaloonInv.TYPE_OK; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "It’s all for now. As always, please tell me when the bridge is ready by clicking on the Start button!"; } else { this.phraseBaloon.text = "На этом все. Как обычно, сообщите мне, когда мост будет готов!"; }; this.tutorialArrow.visible = false; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_OK, phase9a, false, 0, true); } private function phase6(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase6); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "The Reset button clears the screen and refunds your money. If you clicked on the button by accident, use the Undo button to restore your last creation."; } else { this.phraseBaloon.text = "Кнопка Сброс служит для удаления всех построенных сегментов. Если вы нажали на эту кнопку случайно — воспользуйтесь Отменой. Она восстановит все удаленные сегменты."; }; this.tutorialArrow.x = 560; this.tutorialArrow.y = 75; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase7, false, 0, true); } private function phase3(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase3); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "You’ll have to keep track of it and try to use cheaper materials in your buildings."; } else { this.phraseBaloon.text = "Используйте имеющиеся материалы и ресурсы аккуратно."; }; this.tutorialArrow.x = 320; this.tutorialArrow.y = 75; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase4a, false, 0, true); } private function overDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function outDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function phase20a(_arg1:Event):void{ this.removeEventListener(Config.EVENT_START, phase20a); if (this.dotsBaloon.hasEventListener(DotsBaloon.EVENT_SHOWED)){ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); }; if (this.dotsBaloon.hasEventListener(MouseEvent.CLICK)){ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OVER)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OUT)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); }; this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21a, false, 0, true); this.dotsBaloon.hide(); } private function phase18aa(_arg1:Event):void{ var _local2:Boolean; var _local3:int; if (!this.dotsBaloon){ return; }; if (!_protagonists){ if (this.dotsBaloon){ this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); }; return; }; _local2 = false; _local3 = 0; while (_local3 < _protagonists.length) { if ((_protagonists[_local3] as Protagonist).currentAction == Protagonist.JUMP){ _local2 = true; break; }; _local3++; }; if (_local2){ this.dotsBaloon.hide(); } else { this.dotsBaloon.show(); }; } private function phase21a(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21a); this.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.phase18a(); } private function phase10a(_arg1:Event):void{ var _local2:SharedObject; this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_SKIP, phase10a); _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_HIDDEN, phase10b, false, 0, true); this.phraseBaloon.hide(); } private function phase10b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_HIDDEN, phase10b); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.unsetTutorialMode(); } private function phase19(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); this.dotsBaloon.addEventListener(MouseEvent.CLICK, phase20, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon, false, 0, true); } private function phase21(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21); this.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.beginTutorial(); } private function phase20(_arg1:MouseEvent):void{ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); this.removeEventListener(Config.EVENT_START, phase20a); this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21, false, 0, true); this.dotsBaloon.hide(); } private function phase1a(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_YES, phase1a); this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NO, phase1b); this.phraseBaloon.type = TalkBaloonInv.TYPE_SKIP_NEXT; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "You already know that that the START button above is used to inform us that the bridge is ready."; } else { this.phraseBaloon.text = "Вы уже знаете, что кнопка Старт используется для того, чтобы сообщить нам, что мост готов и можно смело двигаться вперед."; }; tutorialArrow = new TutorialArrow(); this.tutorialArrow.x = 50; this.tutorialArrow.y = 75; this.tutorialArrow.rotation = -30; this.addChild(tutorialArrow); this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase2a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_SKIP, phase10a, false, 0, true); } public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; var _local5:Boolean; _local2 = <level><surfaces> <surface> <point x="-20" y="160" pin="false"/> <point x="0" y="180" pin="false"/> <point x="220" y="180" pin="false"/> <point x="220" y="360" pin="true"/> <point x="220" y="580" pin="false"/> <point x="-20" y="580" pin="false"/> </surface> <surface> <point x="460" y="360" pin="true"/> <point x="460" y="520" pin="false"/> <point x="660" y="540" pin="false"/> <point x="700" y="400" pin="false"/> <point x="640" y="360" pin="false"/> </surface> </surfaces> <zones> <zone type="finishzone" x="540" y="200" width="40" height="160"/> <zone type="rightzone" x="80" y="140" width="40" height="40"/> </zones> <grass> <line><point x="0" y="180"/><point x="220" y="180"/></line> <line><point x="460" y="360"/><point x="660" y="360"/></line> </grass> <heroes> <hero type="Sinyak" x="100" y="155"/> </heroes> <sprites> </sprites> <borders waterLineY="440" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="3000"/> <weather value="weathernight"/> <difficulty value="1"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 3; _local5 = true; so = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (so.size != 0){ if ((((so.data.passedTutorials is Array)) && ((so.data.passedTutorials.length > 2)))){ _local5 = !(so.data.passedTutorials[2]); }; }; this.initLevel(_local4, _local5); this.chudik = this._protagonists[0]; if (_local5){ this.beginTutorial(); } else { this.phase18a(); }; } private function phase1b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_YES, phase1a); this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NO, phase1b); this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_HIDDEN, phase2b, false, 0, true); this.phraseBaloon.hide(); } private function phase2a(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase2a); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "You also know that while unfortunate our budget is also severely limited."; } else { this.phraseBaloon.text = "Наверное, вы знаете, что наш бюджет на постройку моста ограничен..."; }; this.tutorialArrow.x = 150; this.tutorialArrow.y = 75; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase3, false, 0, true); } private function phase2b(_arg1:Event):void{ var _local2:SharedObject; this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_HIDDEN, phase2b); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.unsetTutorialMode(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function beginTutorial():void{ this.setTutorialMode(); if (this.islandText){ this.addEventListener(Event.ENTER_FRAME, waitToIslandText, false, 0, true); return; }; this.phraseBaloon = new TalkBaloonInv(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; this.addChild(this.phraseBaloon); this.phraseBaloon.text = ""; if (so.data.introducedHeroes.indexOf("Sinyak") == -1){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.textField.appendText((("Hello, " + this.playerName) + "! I'm Simbi! ")); } else { this.phraseBaloon.textField.appendText((("Привет, " + this.playerName) + "! Я Симби! ")); }; so.data.introducedHeroes.push("Sinyak"); so.flush(); }; this.phraseBaloon.type = TalkBaloonInv.TYPE_YES_NO; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.textField.appendText("Do you want me to tell you about additional control elements?"); } else { this.phraseBaloon.textField.appendText("Хотите, я расскажу вам про дополнительные элементы управления?"); }; this.phraseBaloon.show(); this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_YES, phase1a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NO, phase1b, false, 0, true); } private function phase4b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase4b); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "If the segment is too blue or too red it might just break! So please be careful! We would rather not go swimming in that cold, cold water..."; } else { this.phraseBaloon.text = "Любая чрезмерная нагрузка приведет к поломке сегмента, а, следовательно, и всего моста! Поэтому будьте осторожны! Мне бы не хотелось упасть в эту холодную воду..."; }; this.tutorialArrow.x = 470; this.tutorialArrow.y = 75; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase5, false, 0, true); } private function phase4a(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase4a); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "The button Show Stress button identifies which segments of your bridge may be weak. A blue aura represents stretching of a certain segment and a red aura represents the pressure applied to it."; } else { this.phraseBaloon.text = "Кнопка Стресс помогает проследить нагрузку на каждый из сегментов моста. Синий цвет говорит о чрезмерном растяжении сегмента, красный — о чрезмерном сжатии."; }; this.tutorialArrow.x = 470; this.tutorialArrow.y = 75; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase4b, false, 0, true); } private function setTutorialMode():void{ this.chudik = this._protagonists[0]; this.tutorialMode = true; this.currMaterial = -1; _grid.visible = false; _hud.deckButton.hide(); _hud.steelButton.hide(); _hud.ropeButton.hide(); _hud.startButton.hide(false); _hud.editButton.hide(); _hud.stressButton.hide(); _hud.undoButton.hide(); _hud.resetButton.hide(); this.blockConnect = true; this.blockDelete = true; } private function phase18b(_arg1:Event):void{ if (((((((((((!(this.phraseBaloon)) && ((this.currMode == Config.MODE_BUILDING)))) && (!(this.paused)))) && (!(this.tutorialMode)))) && (!(this.loaderScreen)))) && (!(this.islandText)))){ this.removeEventListener(Event.ENTER_FRAME, phase18b); this.phase18a(); }; } private function phase7a(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonInv.EVENT_NEXT, phase7a); this.phraseBaloon.text = " Отсюда же вы можете отправить ваш текущий результат и перейти на таблицу с рейтингом."; this.phraseBaloon.addEventListener(TalkBaloonInv.EVENT_NEXT, phase8, false, 0, true); } private function phase18a():void{ if (((((((((((this.phraseBaloon) || (!((this.currMode == Config.MODE_BUILDING))))) || (this.paused))) || (this.tutorialMode))) || (this.loaderScreen))) || (this.islandText))){ this.addEventListener(Event.ENTER_FRAME, phase18b, false, 0, true); return; }; this.dotsBaloon = new DotsBaloon(); this.dotsBaloon.x = this.chudik.particle.x; this.dotsBaloon.y = this.chudik.particle.y; this.addChild(this.dotsBaloon); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_SHOWED, phase19, false, 0, true); this.addEventListener(Config.EVENT_START, phase20a, false, 0, true); this.dotsBaloon.show(); this.dotsBaloon.addEventListener(Event.ENTER_FRAME, phase18aa, false, 0, true); } private function waitToIslandText(_arg1:Event):void{ if (!this.islandText){ this.removeEventListener(Event.ENTER_FRAME, waitToIslandText); this.beginTutorial(); }; } private function unsetTutorialMode():void{ this.tutorialMode = false; _grid.visible = true; _hud.deckButton.reset(); _hud.steelButton.reset(); _hud.ropeButton.reset(); _hud.startButton.reset(); _hud.editButton.reset(); _hud.editButton.hide(); _hud.stressButton.reset(); _hud.undoButton.reset(); _hud.resetButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; this.phase18a(); } } }//package levels
Section 217
//Level04 (levels.Level04) package levels { import flash.geom.*; import core.*; import flash.events.*; import flash.net.*; import vis.*; import characters.*; public class Level04 extends LevelManager { private var dotsBaloon:DotsBaloon; private var so:SharedObject; private var steelSamplesFound:Array; private var deckSamplesFound:Array; private var timer:int;// = 0 private var tutorialArrow:TutorialArrow; private var phase:int;// = 0 private var currentPhase:String; private var sampleMaterials:Array; private var p1:Point; private var p2:Point; private var chudik:Protagonist; public function Level04(){ timer = 0; phase = 0; super(); } private function phase9a(_arg1:Event):void{ var _local2:SharedObject; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase9a); if (_hud.startButton.hasEventListener(Config.EVENT_START)){ _hud.startButton.removeEventListener(Config.EVENT_START, phase8a); }; if (this.currentPhase){ if ((((this.currentPhase == "1aa")) || ((this.currentPhase == "2ad")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase2ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase2au); } else { if ((((this.currentPhase == "2au")) || ((this.currentPhase == "3d")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase3d); this.removeEventListener(MouseEvent.MOUSE_UP, phase3u); } else { if (this.currentPhase == "3u"){ this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase4b); } else { if ((((this.currentPhase == "4b")) || ((this.currentPhase == "6d")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase6d); this.removeEventListener(MouseEvent.MOUSE_UP, phase6u); } else { if (this.currentPhase == "6u"){ this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase7b); } else { if (this.currentPhase == "7c"){ _hud.startButton.removeEventListener(Config.EVENT_START, phase8a); }; }; }; }; }; }; }; if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase8b, false, 0, true); } private function overDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function outDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function phase20a(_arg1:Event):void{ this.removeEventListener(Config.EVENT_START, phase20a); if (this.dotsBaloon.hasEventListener(DotsBaloon.EVENT_SHOWED)){ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); }; if (this.dotsBaloon.hasEventListener(MouseEvent.CLICK)){ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OVER)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OUT)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); }; this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21a, false, 0, true); this.dotsBaloon.hide(); } private function phase2au(_arg1:Event):void{ var _local2:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local2 = false; if ((((((((((p1.x == 200)) && ((p1.y == 380)))) && ((p2.x == 320)))) && ((p2.y == 380)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p2.x == 200)) && ((p2.y == 380)))) && ((p1.x == 320)))) && ((p1.y == 380)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p1.x == 320)) && ((p1.y == 380)))) && ((p2.x == 440)))) && ((p2.y == 380)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if ((((((((((p2.x == 320)) && ((p2.y == 380)))) && ((p1.x == 440)))) && ((p1.y == 380)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if (!_local2){ return; }; } else { return; }; this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase2ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase2au); this.currentPhase = "2au"; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Good. One more deck segment..."; } else { this.phraseBaloon.text = "А теперь еще один сегмент."; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase3d, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase3u, false, 0, true); } private function phase18aa(_arg1:Event):void{ var _local2:Boolean; var _local3:int; if (!this.dotsBaloon){ return; }; if (!_protagonists){ if (this.dotsBaloon){ this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); }; return; }; _local2 = false; _local3 = 0; while (_local3 < _protagonists.length) { if ((_protagonists[_local3] as Protagonist).currentAction == Protagonist.JUMP){ _local2 = true; break; }; _local3++; }; if (_local2){ this.dotsBaloon.hide(); } else { this.dotsBaloon.show(); }; } private function phase2ad(_arg1:Event):void{ this.currentPhase = "2ad"; p1 = new Point(_pointer.x, _pointer.y); } private function phase1ab(_arg1:Event):void{ this.currentPhase = "1ab"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase1ab); this.blockDelete = false; this.reset(); this.blockDelete = true; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase1aa, false, 0, true); this.phraseBaloon.hide(); } private function phase1aa(_arg1:Event):void{ var _local2:int; this.currentPhase = "1aa"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase9a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase1aa); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon = new TalkBaloonAlt(); this.phraseBaloon.x = 60; this.phraseBaloon.y = (Config.SCREEN_HEIGHT - 300); this.addChild(this.phraseBaloon); this.phraseBaloon.show(); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Okay, it seems we need to start with a simple two bridge decks, like in the sample."; } else { this.phraseBaloon.text = "Для начала, давайте, построим обычный деревянный мост, состоящий из двух сегментов, как показано на примере."; }; _grid.visible = true; _hud.deckButton.reset(); this.currMaterial = Config.MATERIAL_DECK; sampleMaterials = []; sampleMaterials.push(this.makeDeckSprite(new Point(200, 380), new Point(320, 380))); sampleMaterials[(sampleMaterials.length - 1)].x = ((200 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 380; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(this.makeDeckSprite(new Point(320, 380), new Point(440, 380))); sampleMaterials[(sampleMaterials.length - 1)].x = ((320 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 380; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(new LinkElement(false, 1.5, 320, 380)); _local2 = 0; while (_local2 < sampleMaterials.length) { sampleMaterials[_local2].alpha = 0.5; this._layerEngine.addChild(sampleMaterials[_local2]); _local2++; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase2ad, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase2au, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloonAlt.EVENT_SKIP, phase9a, false, 0, true); } private function phase21a(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21a); this.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.phase18a(); } private function phase19(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); this.dotsBaloon.addEventListener(MouseEvent.CLICK, phase20, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon, false, 0, true); } private function phase21(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21); this.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.beginTutorial(); } private function phase20(_arg1:MouseEvent):void{ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); this.removeEventListener(Config.EVENT_START, phase20a); this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21, false, 0, true); this.dotsBaloon.hide(); } private function phase1a(_arg1:Event):void{ this.currentPhase = "1a"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_YES, phase1a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NO, phase1b); this.blockDelete = false; this.reset(); this.blockDelete = true; this.phraseBaloon.type = TalkBaloon.TYPE_SKIP_NEXT; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "The waterline is too high in this area, that’s why this bridge must be really sturdy! It can’t bend at all! Well, let’s see what we can do here..."; } else { this.phraseBaloon.text = "Уровень воды здесь очень высок, поэтому мост должен быть максимально прочным. Настолько прочным, чтобы совсем не прогибаться! Давайте посмотрим, что мы можем здесь сделать..."; }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase1ab, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SKIP, phase9a, false, 0, true); } public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; var _local5:Boolean; _local2 = <level><surfaces> <surface> <point x="-20" y="380" pin="false"/> <point x="200" y="380" pin="true"/> <point x="200" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="440" y="380" pin="true"/> <point x="440" y="500" pin="false"/> <point x="660" y="500" pin="false"/> <point x="660" y="380" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="60" y="340" width="40" height="40"/> <zone type="finishzone" x="520" y="320" width="40" height="60"/> </zones> <grass> <line><point x="440" y="380"/><point x="660" y="380"/></line> </grass> <heroes> <hero type="Cvetok" x="80" y="355"/> </heroes> <sprites> </sprites> <borders waterLineY="360" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="1700"/> <weather value=""/> <difficulty value="1"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 4; _local5 = true; so = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (so.size != 0){ if ((((so.data.passedTutorials is Array)) && ((so.data.passedTutorials.length > 3)))){ _local5 = !(so.data.passedTutorials[3]); }; }; this.initLevel(_local4, _local5); this.chudik = this._protagonists[0]; if (_local5){ this.beginTutorial(); } else { this.phase18a(); }; } private function phase1b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_YES, phase1a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NO, phase1b); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase2b, false, 0, true); } private function phase2b(_arg1:Event):void{ var _local2:SharedObject; this.currentPhase = "2b"; this.phraseBaloon.removeEventListener(TalkBaloonAlt.EVENT_HIDDEN, phase2b); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.unsetTutorialMode(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function beginTutorial():void{ this.setTutorialMode(); if (this.islandText){ this.addEventListener(Event.ENTER_FRAME, waitToIslandText, false, 0, true); return; }; this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; this.addChild(this.phraseBaloon); this.phraseBaloon.text = ""; if (so.data.introducedHeroes.indexOf("Cvetok") == -1){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.textField.appendText((("Hello, " + this.playerName) + "! I'm Ohani! ")); } else { this.phraseBaloon.textField.appendText((("Привет, " + this.playerName) + "! Я Охани! ")); }; so.data.introducedHeroes.push("Cvetok"); so.flush(); }; this.phraseBaloon.type = TalkBaloon.TYPE_YES_NO; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.textField.appendText("Oh! It’s so insidious! Do you need help?"); } else { this.phraseBaloon.textField.appendText("Ох, это очень коварное место. Хотите, чтобы я вам помогла?"); }; this.phraseBaloon.show(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_YES, phase1a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NO, phase1b, false, 0, true); } private function phase3d(_arg1:MouseEvent):void{ this.currentPhase = "3d"; p1 = new Point(_pointer.x, _pointer.y); this.blockConnect = true; } private function phase3u(_arg1:MouseEvent):void{ var _local2:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local2 = false; if ((((((((((p1.x == 200)) && ((p1.y == 380)))) && ((p2.x == 320)))) && ((p2.y == 380)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p2.x == 200)) && ((p2.y == 380)))) && ((p1.x == 320)))) && ((p1.y == 380)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local2 = true; }; if ((((((((((p1.x == 320)) && ((p1.y == 380)))) && ((p2.x == 440)))) && ((p2.y == 380)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if ((((((((((p2.x == 320)) && ((p2.y == 380)))) && ((p1.x == 440)))) && ((p1.y == 380)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local2 = true; }; if (!_local2){ return; }; } else { return; }; this.blockConnect = false; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase3d); this.removeEventListener(MouseEvent.MOUSE_UP, phase3u); this.currentPhase = "3u"; this.addEventListener(Config.EVENT_CONNECT_POINTS, phase4b, false, 0, true); } private function phase4b(_arg1:Event):void{ this.currentPhase = "4b"; this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase4b); this.blockConnect = true; this.phraseBaloon.type = TalkBaloonAlt.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "That’s it. Now we need to use steel segments to strengthen the bridge. Don’t forget! Build steel segments as long as possible so it can give better support! Just to follow the sample."; this.prepareToBuildIt(); } else { this.phraseBaloon.type = TalkBaloonAlt.TYPE_SKIP_NEXT; this.phraseBaloon.text = "Теперь, чтобы максимально укрепить мост, построим максимально длинные железные укрепления!"; this.phraseBaloon.addEventListener(TalkBaloonAlt.EVENT_NEXT, phase4c, false, 0, true); }; } private function phase4c(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloonAlt.EVENT_NEXT, phase4c); this.phraseBaloon.type = TalkBaloonAlt.TYPE_SKIP; this.phraseBaloon.text = "Чем длиннее будут железные сегменты, тем лучше они будут держать форму моста. Прошу вас, постройте укрепления, показанные на примере."; this.prepareToBuildIt(); } private function phase6d(_arg1:MouseEvent):void{ this.currentPhase = "6d"; p1 = new Point(_pointer.x, _pointer.y); this.blockConnect = true; } private function setTutorialMode():void{ this.chudik = this._protagonists[0]; this.tutorialMode = true; this.currMaterial = -1; _grid.visible = false; _hud.deckButton.hide(); _hud.steelButton.hide(); _hud.ropeButton.hide(); _hud.startButton.hide(false); _hud.editButton.hide(); _hud.stressButton.hide(); _hud.undoButton.hide(); _hud.resetButton.hide(); this.blockConnect = true; this.blockDelete = true; deckSamplesFound = [false, false]; steelSamplesFound = [false, false, false, false, false]; } private function phase6u(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local4 = false; if ((((((((((p1.x == 200)) && ((p1.y == 380)))) && ((p2.x == 260)))) && ((p2.y == 280)))) && (!(steelSamplesFound[0])))){ steelSamplesFound[0] = true; _local4 = true; }; if ((((((((((p2.x == 200)) && ((p2.y == 380)))) && ((p1.x == 260)))) && ((p1.y == 280)))) && (!(steelSamplesFound[0])))){ steelSamplesFound[0] = true; _local4 = true; }; if ((((((((((p1.x == 260)) && ((p1.y == 280)))) && ((p2.x == 320)))) && ((p2.y == 380)))) && (!(steelSamplesFound[1])))){ steelSamplesFound[1] = true; _local4 = true; }; if ((((((((((p2.x == 260)) && ((p2.y == 280)))) && ((p1.x == 320)))) && ((p1.y == 380)))) && (!(steelSamplesFound[1])))){ steelSamplesFound[1] = true; _local4 = true; }; if ((((((((((p1.x == 320)) && ((p1.y == 380)))) && ((p2.x == 380)))) && ((p2.y == 280)))) && (!(steelSamplesFound[2])))){ steelSamplesFound[2] = true; _local4 = true; }; if ((((((((((p2.x == 320)) && ((p2.y == 380)))) && ((p1.x == 380)))) && ((p1.y == 280)))) && (!(steelSamplesFound[2])))){ steelSamplesFound[2] = true; _local4 = true; }; if ((((((((((p1.x == 380)) && ((p1.y == 280)))) && ((p2.x == 440)))) && ((p2.y == 380)))) && (!(steelSamplesFound[3])))){ steelSamplesFound[3] = true; _local4 = true; }; if ((((((((((p2.x == 380)) && ((p2.y == 280)))) && ((p1.x == 440)))) && ((p1.y == 380)))) && (!(steelSamplesFound[3])))){ steelSamplesFound[3] = true; _local4 = true; }; if ((((((((((p1.x == 260)) && ((p1.y == 280)))) && ((p2.x == 380)))) && ((p2.y == 280)))) && (!(steelSamplesFound[4])))){ steelSamplesFound[4] = true; _local4 = true; }; if ((((((((((p2.x == 260)) && ((p2.y == 280)))) && ((p1.x == 380)))) && ((p1.y == 280)))) && (!(steelSamplesFound[4])))){ steelSamplesFound[4] = true; _local4 = true; }; if (!_local4){ return; }; } else { return; }; this.blockConnect = false; _local2 = 0; _local3 = 0; while (_local3 < steelSamplesFound.length) { if (steelSamplesFound[_local3]){ _local2++; }; _local3++; }; if (_local2 == 4){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "One more segment..."; } else { this.phraseBaloon.text = "А теперь еще сегмент..."; }; return; }; if (_local2 == 5){ this.currentPhase = "6u"; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase6d); this.removeEventListener(MouseEvent.MOUSE_UP, phase6u); this.addEventListener(Config.EVENT_CONNECT_POINTS, phase7b, false, 0, true); }; } private function phase18b(_arg1:Event):void{ if (((((((((((!(this.phraseBaloon)) && ((this.currMode == Config.MODE_BUILDING)))) && (!(this.paused)))) && (!(this.tutorialMode)))) && (!(this.loaderScreen)))) && (!(this.islandText)))){ this.removeEventListener(Event.ENTER_FRAME, phase18b); this.phase18a(); }; } private function phase7c(_arg1:Event):void{ this.currentPhase = "7c"; this.phraseBaloon.removeEventListener(TalkBaloonAlt.EVENT_HIDDEN, phase7c); this.phraseBaloon.removeEventListener(TalkBaloonAlt.EVENT_SKIP, phase9a); this.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; this.addChild(this.phraseBaloon); this.phraseBaloon.show(); this.blockConnect = true; _grid.visible = false; this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Great! This bridge is definitely not going to bend. Let’s try it out!"; } else { this.phraseBaloon.text = "Отлично! Этот мост точно не прогнется. Давайте это проверим!"; }; this.tutorialArrow = new TutorialArrow(); this.tutorialArrow.x = 45; this.tutorialArrow.y = 75; this.tutorialArrow.rotation = 0; this.tutorialArrow.visible = true; this.addChild(this.tutorialArrow); _hud.startButton.reset(); _hud.startButton.addEventListener(Config.EVENT_START, phase8a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SKIP, phase9a, false, 0, true); } private function phase7b(_arg1:Event):void{ this.currentPhase = "7b"; this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase7b); this.blockConnect = true; this.phraseBaloon.addEventListener(TalkBaloonAlt.EVENT_HIDDEN, phase7c, false, 0, true); this.phraseBaloon.hide(); } private function phase18a():void{ if (((((((((((this.phraseBaloon) || (!((this.currMode == Config.MODE_BUILDING))))) || (this.paused))) || (this.tutorialMode))) || (this.loaderScreen))) || (this.islandText))){ this.addEventListener(Event.ENTER_FRAME, phase18b, false, 0, true); return; }; this.dotsBaloon = new DotsBaloon(); this.dotsBaloon.x = this.chudik.particle.x; this.dotsBaloon.y = this.chudik.particle.y; this.addChild(this.dotsBaloon); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_SHOWED, phase19, false, 0, true); this.addEventListener(Config.EVENT_START, phase20a, false, 0, true); this.dotsBaloon.show(); this.dotsBaloon.addEventListener(Event.ENTER_FRAME, phase18aa, false, 0, true); } private function waitToIslandText(_arg1:Event):void{ if (!this.islandText){ this.removeEventListener(Event.ENTER_FRAME, waitToIslandText); this.beginTutorial(); }; } private function phase8a(_arg1:Event):void{ var _local2:SharedObject; _hud.startButton.removeEventListener(Config.EVENT_START, phase8a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase9a); if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local2.data.passedTutorials){ _local2.data.passedTutorials[3] = true; } else { _local2.data.passedTutorials = [true, true, true, true, false]; }; _local2.flush(); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase8b, false, 0, true); } private function phase8b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase8b); this.removeChild(this.phraseBaloon); this.phraseBaloon = null; this.unsetTutorialMode(); } private function unsetTutorialMode():void{ var _local1:int; this.tutorialMode = false; if (this.currMode == Config.MODE_BUILDING){ _grid.visible = true; _hud.deckButton.reset(); _hud.steelButton.reset(); _hud.ropeButton.reset(); _hud.startButton.reset(); _hud.editButton.reset(); _hud.editButton.hide(true); _hud.stressButton.reset(); _hud.undoButton.reset(); _hud.resetButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; } else { _hud.editButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; }; this.chudik.manualMode = false; if (((sampleMaterials) && ((sampleMaterials.length > 0)))){ _local1 = 0; while (_local1 < sampleMaterials.length) { _layerEngine.removeChild(sampleMaterials[_local1]); _local1++; }; sampleMaterials = null; }; if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; this.phase18a(); } private function prepareToBuildIt():void{ var _local1:int; _grid.visible = true; _hud.deckButton.hide(); _hud.steelButton.reset(); this.currMaterial = Config.MATERIAL_STEEL; if (((sampleMaterials) && ((sampleMaterials.length > 0)))){ _local1 = 0; while (_local1 < sampleMaterials.length) { _layerEngine.removeChild(sampleMaterials[_local1]); _local1++; }; }; sampleMaterials = []; sampleMaterials.push(this.makeSteelSprite(new Point(200, 380), new Point(260, 280))); sampleMaterials[(sampleMaterials.length - 1)].rotation = -60; sampleMaterials[(sampleMaterials.length - 1)].x = (200 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = (380 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(260, 280), new Point(320, 380))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 60; sampleMaterials[(sampleMaterials.length - 1)].x = ((260 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 5); sampleMaterials[(sampleMaterials.length - 1)].y = (380 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(320, 380), new Point(380, 280))); sampleMaterials[(sampleMaterials.length - 1)].rotation = -60; sampleMaterials[(sampleMaterials.length - 1)].x = (320 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = (380 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(380, 280), new Point(440, 380))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 60; sampleMaterials[(sampleMaterials.length - 1)].x = (380 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = (280 + (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(260, 280), new Point(380, 280))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 0; sampleMaterials[(sampleMaterials.length - 1)].x = (260 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = ((280 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)) + 2); sampleMaterials.push(new LinkElement(false, 1.5, 260, 280)); sampleMaterials.push(new LinkElement(false, 1.5, 320, 380)); sampleMaterials.push(new LinkElement(false, 1.5, 380, 280)); _local1 = 0; while (_local1 < sampleMaterials.length) { sampleMaterials[_local1].alpha = 0.5; this._layerEngine.addChild(sampleMaterials[_local1]); _local1++; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase6d, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase6u, false, 0, true); } } }//package levels
Section 218
//Level05 (levels.Level05) package levels { import flash.geom.*; import core.*; import flash.events.*; import flash.net.*; import vis.*; import characters.*; public class Level05 extends LevelManager { private var dotsBaloon:DotsBaloon; private var so:SharedObject; private var steelSamplesFound:Array; private var deckSamplesFound:Array; private var timer:int;// = 0 private var tutorialArrow:TutorialArrow; private var phase:int;// = 0 private var currentPhase:String; private var sampleMaterials:Array; private var p1:Point; private var p2:Point; private var chudik:Protagonist; public function Level05(){ timer = 0; phase = 0; super(); } private function phase9a(_arg1:Event):void{ var _local2:SharedObject; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase9a); if (this.currentPhase){ if ((((this.currentPhase == "1aa")) || ((this.currentPhase == "2ad")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase2ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase2au); } else { if (this.currentPhase == "2au"){ this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase4b); } else { if ((((this.currentPhase == "5")) || ((this.currentPhase == "6d")))){ this.removeEventListener(MouseEvent.MOUSE_DOWN, phase6d); this.removeEventListener(MouseEvent.MOUSE_UP, phase6u); } else { if (this.currentPhase == "6u"){ this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase7b); } else { if (this.currentPhase == "7e"){ _hud.startButton.removeEventListener(Config.EVENT_START, phase8a); }; }; }; }; }; }; if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase8b, false, 0, true); } private function phase5(_arg1:Event):void{ var _local2:int; this.currentPhase = "5"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase5); this.phraseBaloon.type = TalkBaloonAlt.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Oh, wait. I’m afraid without unlimited funds we’ll just have to settle for a bridge that’s strong enough to walk on. I think this sample is the best we can do."; } else { this.phraseBaloon.text = "Думаю, вот так вполне подойдет."; }; _grid.visible = true; _hud.deckButton.hide(); _hud.steelButton.reset(); this.currMaterial = Config.MATERIAL_STEEL; if (((sampleMaterials) && ((sampleMaterials.length > 0)))){ _local2 = 0; while (_local2 < sampleMaterials.length) { _layerEngine.removeChild(sampleMaterials[_local2]); _local2++; }; }; sampleMaterials = []; sampleMaterials.push(this.makeSteelSprite(new Point(160, 320), new Point(220, 220))); sampleMaterials[(sampleMaterials.length - 1)].rotation = -60; sampleMaterials[(sampleMaterials.length - 1)].x = (160 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = (320 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(220, 220), new Point(280, 320))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 60; sampleMaterials[(sampleMaterials.length - 1)].x = ((220 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 5); sampleMaterials[(sampleMaterials.length - 1)].y = (320 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(280, 320), new Point(340, 220))); sampleMaterials[(sampleMaterials.length - 1)].rotation = -60; sampleMaterials[(sampleMaterials.length - 1)].x = (280 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = (320 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(340, 220), new Point(400, 320))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 60; sampleMaterials[(sampleMaterials.length - 1)].x = ((340 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 5); sampleMaterials[(sampleMaterials.length - 1)].y = (320 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(400, 320), new Point(460, 220))); sampleMaterials[(sampleMaterials.length - 1)].rotation = -60; sampleMaterials[(sampleMaterials.length - 1)].x = (400 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = (320 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(460, 220), new Point(520, 320))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 60; sampleMaterials[(sampleMaterials.length - 1)].x = ((460 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 5); sampleMaterials[(sampleMaterials.length - 1)].y = (320 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(520, 320), new Point(580, 220))); sampleMaterials[(sampleMaterials.length - 1)].rotation = -60; sampleMaterials[(sampleMaterials.length - 1)].x = (520 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = (320 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)); sampleMaterials.push(this.makeSteelSprite(new Point(580, 220), new Point(620, 320))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 68; sampleMaterials[(sampleMaterials.length - 1)].x = ((580 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 5); sampleMaterials[(sampleMaterials.length - 1)].y = ((220 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)) + 100); sampleMaterials.push(this.makeSteelSprite(new Point(220, 220), new Point(340, 220))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 0; sampleMaterials[(sampleMaterials.length - 1)].x = (220 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = ((220 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)) + 2); sampleMaterials.push(this.makeSteelSprite(new Point(340, 220), new Point(460, 220))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 0; sampleMaterials[(sampleMaterials.length - 1)].x = (340 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = ((220 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)) + 2); sampleMaterials.push(this.makeSteelSprite(new Point(460, 220), new Point(580, 220))); sampleMaterials[(sampleMaterials.length - 1)].rotation = 0; sampleMaterials[(sampleMaterials.length - 1)].x = (460 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)); sampleMaterials[(sampleMaterials.length - 1)].y = ((220 - (sampleMaterials[(sampleMaterials.length - 1)].height / 2)) + 2); sampleMaterials.push(new LinkElement(false, 1.5, 280, 320)); sampleMaterials.push(new LinkElement(false, 1.5, 400, 320)); sampleMaterials.push(new LinkElement(false, 1.5, 520, 320)); sampleMaterials.push(new LinkElement(false, 1.5, 220, 220)); sampleMaterials.push(new LinkElement(false, 1.5, 340, 220)); sampleMaterials.push(new LinkElement(false, 1.5, 460, 220)); sampleMaterials.push(new LinkElement(false, 1.5, 580, 220)); _local2 = 0; while (_local2 < sampleMaterials.length) { sampleMaterials[_local2].alpha = 0.5; this._layerEngine.addChild(sampleMaterials[_local2]); _local2++; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase6d, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase6u, false, 0, true); } private function overDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function outDotsBaloon(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function phase20a(_arg1:Event):void{ this.removeEventListener(Config.EVENT_START, phase20a); if (this.dotsBaloon.hasEventListener(DotsBaloon.EVENT_SHOWED)){ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); }; if (this.dotsBaloon.hasEventListener(MouseEvent.CLICK)){ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OVER)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); }; if (this.dotsBaloon.hasEventListener(MouseEvent.MOUSE_OUT)){ this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); }; this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21a, false, 0, true); this.dotsBaloon.hide(); } private function phase2au(_arg1:Event):void{ var _local2:int; var _local3:int; var _local4:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local4 = false; if ((((((((((p1.x == 160)) && ((p1.y == 320)))) && ((p2.x == 280)))) && ((p2.y == 320)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local4 = true; }; if ((((((((((p2.x == 160)) && ((p2.y == 320)))) && ((p1.x == 280)))) && ((p1.y == 320)))) && (!(deckSamplesFound[0])))){ deckSamplesFound[0] = true; _local4 = true; }; if ((((((((((p1.x == 280)) && ((p1.y == 320)))) && ((p2.x == 400)))) && ((p2.y == 320)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local4 = true; }; if ((((((((((p2.x == 280)) && ((p2.y == 320)))) && ((p1.x == 400)))) && ((p1.y == 320)))) && (!(deckSamplesFound[1])))){ deckSamplesFound[1] = true; _local4 = true; }; if ((((((((((p1.x == 400)) && ((p1.y == 320)))) && ((p2.x == 520)))) && ((p2.y == 320)))) && (!(deckSamplesFound[2])))){ deckSamplesFound[2] = true; _local4 = true; }; if ((((((((((p2.x == 400)) && ((p2.y == 320)))) && ((p1.x == 520)))) && ((p1.y == 320)))) && (!(deckSamplesFound[2])))){ deckSamplesFound[2] = true; _local4 = true; }; if ((((((((((p1.x == 520)) && ((p1.y == 320)))) && ((p2.x == 620)))) && ((p2.y == 320)))) && (!(deckSamplesFound[3])))){ deckSamplesFound[3] = true; _local4 = true; }; if ((((((((((p2.x == 520)) && ((p2.y == 320)))) && ((p1.x == 620)))) && ((p1.y == 320)))) && (!(deckSamplesFound[3])))){ deckSamplesFound[3] = true; _local4 = true; }; if (!_local4){ return; }; } else { return; }; this.blockConnect = false; _local2 = 0; _local3 = 0; while (_local3 < deckSamplesFound.length) { if (deckSamplesFound[_local3]){ _local2++; }; _local3++; }; if (_local2 == (deckSamplesFound.length - 1)){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Good. One more deck segment..."; } else { this.phraseBaloon.text = "Еще один сегмент..."; }; return; }; if (_local2 == deckSamplesFound.length){ this.currentPhase = "2au"; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase2ad); this.removeEventListener(MouseEvent.MOUSE_UP, phase2au); this.addEventListener(Config.EVENT_CONNECT_POINTS, phase4b, false, 0, true); }; } private function phase18aa(_arg1:Event):void{ var _local2:Boolean; var _local3:int; if (!this.dotsBaloon){ return; }; if (!_protagonists){ if (this.dotsBaloon){ this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); }; return; }; _local2 = false; _local3 = 0; while (_local3 < _protagonists.length) { if ((_protagonists[_local3] as Protagonist).currentAction == Protagonist.JUMP){ _local2 = true; break; }; _local3++; }; if (_local2){ this.dotsBaloon.hide(); } else { this.dotsBaloon.show(); }; } private function phase2ad(_arg1:Event):void{ this.currentPhase = "2ad"; p1 = new Point(_pointer.x, _pointer.y); this.blockConnect = true; } private function phase1ab(_arg1:Event):void{ this.currentPhase = "1ab"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase1ab); this.blockDelete = false; this.reset(); this.blockDelete = true; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "As you can see, the gap between the banks is just too long. If you want to see the whole level you’ll need to scroll. Just click on any empty space and drag!"; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase1ac, false, 0, true); } else { this.phraseBaloon.text = "Как видите, расстояние между берегами здесь очень велико."; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase1aba, false, 0, true); }; } private function phase1ad(_arg1:Event):void{ this.currentPhase = "1ad"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase1ad); this.tutorialArrow.visible = false; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase1aa, false, 0, true); this.phraseBaloon.hide(); } private function phase1aa(_arg1:Event):void{ var _local2:int; this.currentPhase = "1aa"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase9a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase1aa); this._layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon = new TalkBaloonAlt(); this.phraseBaloon.x = 60; this.phraseBaloon.y = (Config.SCREEN_HEIGHT - 300); this._layerEngine.addChild(this.phraseBaloon); this.phraseBaloon.show(); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Now it’s time to build a bridge! Just follow the sample. Once you do that I’ll tell you how you can strengthen such a long bridge."; } else { this.phraseBaloon.text = "Ну а теперь займемся мостом. Воспользуемся примером."; }; _grid.visible = true; _hud.deckButton.reset(); this.currMaterial = Config.MATERIAL_DECK; sampleMaterials = []; sampleMaterials.push(this.makeDeckSprite(new Point(160, 320), new Point(280, 320))); sampleMaterials[(sampleMaterials.length - 1)].x = ((160 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 320; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(this.makeDeckSprite(new Point(280, 320), new Point(400, 320))); sampleMaterials[(sampleMaterials.length - 1)].x = ((280 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 320; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(this.makeDeckSprite(new Point(400, 320), new Point(520, 320))); sampleMaterials[(sampleMaterials.length - 1)].x = ((400 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 320; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(this.makeDeckSprite(new Point(520, 320), new Point(620, 320))); sampleMaterials[(sampleMaterials.length - 1)].x = ((520 + (sampleMaterials[(sampleMaterials.length - 1)].width / 2)) - 3); sampleMaterials[(sampleMaterials.length - 1)].y = 320; sampleMaterials[(sampleMaterials.length - 1)].scaleY = -1.6; sampleMaterials.push(new LinkElement(false, 1.5, 280, 320)); sampleMaterials.push(new LinkElement(false, 1.5, 400, 320)); sampleMaterials.push(new LinkElement(false, 1.5, 520, 320)); _local2 = 0; while (_local2 < sampleMaterials.length) { sampleMaterials[_local2].alpha = 0.5; this._layerEngine.addChild(sampleMaterials[_local2]); _local2++; }; this.addEventListener(MouseEvent.MOUSE_DOWN, phase2ad, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, phase2au, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloonAlt.EVENT_SKIP, phase9a, false, 0, true); } private function phase1ac(_arg1:Event):void{ this.currentPhase = "1ac"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase1ac); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Oh! I almost forgot! You can use the + and – buttons to zoom within the level!"; } else { this.phraseBaloon.text = "А еще вы можете воспользоваться кнопками приближения и удаления!"; }; tutorialArrow = new TutorialArrow(); tutorialArrow.x = 70; tutorialArrow.y = 420; tutorialArrow.rotation = -90; this.addChild(tutorialArrow); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase1ad, false, 0, true); } private function phase1aba(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase1aba); this.phraseBaloon.text = "Чтобы вы могли осмотреть весь уровень, наведите курсор на пустое место, зажмите левую кнопку мыши и двигайте в нужном вам направлении!"; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase1ac, false, 0, true); } private function phase21a(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21a); _layerEngine.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.phase18a(); } private function phase19(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_SHOWED, phase19); this.dotsBaloon.addEventListener(MouseEvent.CLICK, phase20, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon, false, 0, true); this.dotsBaloon.addEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon, false, 0, true); } private function phase21(_arg1:Event):void{ this.dotsBaloon.removeEventListener(DotsBaloon.EVENT_HIDDEN, phase21); _layerEngine.removeChild(this.dotsBaloon); this.dotsBaloon = null; this.beginTutorial(); } private function phase20(_arg1:MouseEvent):void{ this.dotsBaloon.removeEventListener(MouseEvent.CLICK, phase20); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OVER, overDotsBaloon); this.dotsBaloon.removeEventListener(MouseEvent.MOUSE_OUT, outDotsBaloon); this.removeEventListener(Config.EVENT_START, phase20a); this.dotsBaloon.removeEventListener(Event.ENTER_FRAME, phase18aa); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_HIDDEN, phase21, false, 0, true); this.dotsBaloon.hide(); } private function phase1a(_arg1:Event):void{ this.currentPhase = "1a"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_YES, phase1a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NO, phase1b); this.blockDelete = false; this.reset(); this.blockDelete = true; this.phraseBaloon.type = TalkBaloon.TYPE_SKIP_NEXT; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "First of all I can tell you about map scrolling system and several additional control elements."; } else { this.phraseBaloon.text = "Прежде всего, я хочу рассказать вам про новые элементы управления!"; }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase1ab, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SKIP, phase9a, false, 0, true); } public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; var _local5:Boolean; _local2 = <level><surfaces> <surface> <point x="160" y="320" pin="true"/> <point x="160" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> <point x="-20" y="320" pin="false"/> </surface> <surface> <point x="620" y="320" pin="true"/> <point x="620" y="500" pin="false"/> <point x="860" y="500" pin="false"/> <point x="860" y="320" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="20" y="280" width="80" height="40"/> <zone type="finishzone" x="700" y="240" width="40" height="80"/> </zones> <grass> <line><point x="-20" y="320"/><point x="160" y="320"/></line> <line><point x="620" y="320"/><point x="860" y="320"/></line> </grass> <heroes> <hero type="Prezer" x="60" y="295"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="233" ty="-84" type="3" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="-105" leftBorderX="0" rightBorderX="780" bottomBorderY="480"/> <budget value="3700"/> <weather value="weatherday"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 5; _local5 = true; so = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (so.size != 0){ if ((((so.data.passedTutorials is Array)) && ((so.data.passedTutorials.length > 4)))){ _local5 = !(so.data.passedTutorials[4]); }; }; this.initLevel(_local4, _local5); this.chudik = this._protagonists[0]; if (_local5){ this.beginTutorial(); } else { this.phase18a(); }; } private function phase1b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_YES, phase1a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NO, phase1b); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase2b, false, 0, true); } private function phase2b(_arg1:Event):void{ var _local2:SharedObject; this.currentPhase = "2b"; this.phraseBaloon.removeEventListener(TalkBaloonAlt.EVENT_HIDDEN, phase2b); this._layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); _local2.data.passedTutorials = [true, true, true, true, true]; GAManager.trackPage((("/tutorial-" + this.levelNumber.toString()) + "-skipped")); _local2.flush(); this.unsetTutorialMode(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function beginTutorial():void{ var _local1:Boolean; this.setTutorialMode(); if (this.islandText){ this.addEventListener(Event.ENTER_FRAME, waitToIslandText, false, 0, true); return; }; this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; this._layerEngine.addChild(this.phraseBaloon); this.phraseBaloon.text = ""; _local1 = false; if (so.data.introducedHeroes.indexOf("Prezer") == -1){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ _local1 = true; } else { this.phraseBaloon.textField.appendText("Я Грини! Спасибо, что помогаете нам! "); }; so.data.introducedHeroes.push("Prezer"); so.flush(); }; this.phraseBaloon.type = TalkBaloon.TYPE_YES_NO; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ if (_local1){ this.phraseBaloon.textField.appendText("So close, yet so far... Oh, hello there! My name is Greeni. Can I help you?"); } else { this.phraseBaloon.textField.appendText("So close, yet so far... Oh, hello there! Can I help you?"); }; } else { this.phraseBaloon.textField.appendText("Как близко, казалось бы, и вместе с тем так далеко противоположный берег...\nОй. Нужна помощь?"); }; this.phraseBaloon.show(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_YES, phase1a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NO, phase1b, false, 0, true); } private function phase4b(_arg1:Event):void{ this.currentPhase = "4b"; this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase4b); this.blockConnect = true; this.phraseBaloon.type = TalkBaloonAlt.TYPE_SKIP_NEXT; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Wonderful! And now, with the help of the steel material, we are going to build the strongest bridge ever!"; } else { this.phraseBaloon.text = "Отлично! А теперь укрепим наш мост с помощью железных балок! "; }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase5, false, 0, true); } private function phase6d(_arg1:MouseEvent):void{ this.currentPhase = "6d"; p1 = new Point(_pointer.x, _pointer.y); this.blockConnect = true; } private function setTutorialMode():void{ this.chudik = this._protagonists[0]; this.tutorialMode = true; this.currMaterial = -1; _grid.visible = false; _hud.deckButton.hide(); _hud.steelButton.hide(); _hud.ropeButton.hide(); _hud.startButton.hide(false); _hud.editButton.hide(); _hud.stressButton.hide(); _hud.undoButton.hide(); _hud.resetButton.hide(); this.blockConnect = true; this.blockDelete = true; deckSamplesFound = [false, false, false, false]; steelSamplesFound = [false, false, false, false, false, false, false, false, false, false, false]; } private function phase6u(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:Boolean; p2 = new Point(_pointer.x, _pointer.y); if (((_points) && ((_points.length > 0)))){ _local4 = false; if ((((((((((p1.x == 160)) && ((p1.y == 320)))) && ((p2.x == 220)))) && ((p2.y == 220)))) && (!(steelSamplesFound[0])))){ steelSamplesFound[0] = true; _local4 = true; }; if ((((((((((p2.x == 160)) && ((p2.y == 320)))) && ((p1.x == 220)))) && ((p1.y == 220)))) && (!(steelSamplesFound[0])))){ steelSamplesFound[0] = true; _local4 = true; }; if ((((((((((p1.x == 220)) && ((p1.y == 220)))) && ((p2.x == 280)))) && ((p2.y == 320)))) && (!(steelSamplesFound[1])))){ steelSamplesFound[1] = true; _local4 = true; }; if ((((((((((p2.x == 220)) && ((p2.y == 220)))) && ((p1.x == 280)))) && ((p1.y == 320)))) && (!(steelSamplesFound[1])))){ steelSamplesFound[1] = true; _local4 = true; }; if ((((((((((p1.x == 280)) && ((p1.y == 320)))) && ((p2.x == 340)))) && ((p2.y == 220)))) && (!(steelSamplesFound[2])))){ steelSamplesFound[2] = true; _local4 = true; }; if ((((((((((p2.x == 280)) && ((p2.y == 320)))) && ((p1.x == 340)))) && ((p1.y == 220)))) && (!(steelSamplesFound[2])))){ steelSamplesFound[2] = true; _local4 = true; }; if ((((((((((p1.x == 340)) && ((p1.y == 220)))) && ((p2.x == 400)))) && ((p2.y == 320)))) && (!(steelSamplesFound[3])))){ steelSamplesFound[3] = true; _local4 = true; }; if ((((((((((p2.x == 340)) && ((p2.y == 220)))) && ((p1.x == 400)))) && ((p1.y == 320)))) && (!(steelSamplesFound[3])))){ steelSamplesFound[3] = true; _local4 = true; }; if ((((((((((p1.x == 400)) && ((p1.y == 320)))) && ((p2.x == 460)))) && ((p2.y == 220)))) && (!(steelSamplesFound[4])))){ steelSamplesFound[4] = true; _local4 = true; }; if ((((((((((p2.x == 400)) && ((p2.y == 320)))) && ((p1.x == 460)))) && ((p1.y == 220)))) && (!(steelSamplesFound[4])))){ steelSamplesFound[4] = true; _local4 = true; }; if ((((((((((p1.x == 460)) && ((p1.y == 220)))) && ((p2.x == 520)))) && ((p2.y == 320)))) && (!(steelSamplesFound[5])))){ steelSamplesFound[5] = true; _local4 = true; }; if ((((((((((p2.x == 460)) && ((p2.y == 220)))) && ((p1.x == 520)))) && ((p1.y == 320)))) && (!(steelSamplesFound[5])))){ steelSamplesFound[5] = true; _local4 = true; }; if ((((((((((p1.x == 520)) && ((p1.y == 320)))) && ((p2.x == 580)))) && ((p2.y == 220)))) && (!(steelSamplesFound[6])))){ steelSamplesFound[6] = true; _local4 = true; }; if ((((((((((p2.x == 520)) && ((p2.y == 320)))) && ((p1.x == 580)))) && ((p1.y == 220)))) && (!(steelSamplesFound[6])))){ steelSamplesFound[6] = true; _local4 = true; }; if ((((((((((p1.x == 580)) && ((p1.y == 220)))) && ((p2.x == 620)))) && ((p2.y == 320)))) && (!(steelSamplesFound[7])))){ steelSamplesFound[7] = true; _local4 = true; }; if ((((((((((p2.x == 580)) && ((p2.y == 220)))) && ((p1.x == 620)))) && ((p1.y == 320)))) && (!(steelSamplesFound[7])))){ steelSamplesFound[7] = true; _local4 = true; }; if ((((((((((p1.x == 220)) && ((p1.y == 220)))) && ((p2.x == 340)))) && ((p2.y == 220)))) && (!(steelSamplesFound[8])))){ steelSamplesFound[8] = true; _local4 = true; }; if ((((((((((p2.x == 220)) && ((p2.y == 220)))) && ((p1.x == 340)))) && ((p1.y == 220)))) && (!(steelSamplesFound[8])))){ steelSamplesFound[8] = true; _local4 = true; }; if ((((((((((p1.x == 340)) && ((p1.y == 220)))) && ((p2.x == 460)))) && ((p2.y == 220)))) && (!(steelSamplesFound[9])))){ steelSamplesFound[9] = true; _local4 = true; }; if ((((((((((p2.x == 340)) && ((p2.y == 220)))) && ((p1.x == 460)))) && ((p1.y == 220)))) && (!(steelSamplesFound[9])))){ steelSamplesFound[9] = true; _local4 = true; }; if ((((((((((p1.x == 460)) && ((p1.y == 220)))) && ((p2.x == 580)))) && ((p2.y == 220)))) && (!(steelSamplesFound[10])))){ steelSamplesFound[10] = true; _local4 = true; }; if ((((((((((p2.x == 460)) && ((p2.y == 220)))) && ((p1.x == 580)))) && ((p1.y == 220)))) && (!(steelSamplesFound[10])))){ steelSamplesFound[10] = true; _local4 = true; }; if (!_local4){ return; }; } else { return; }; this.blockConnect = false; _local2 = 0; _local3 = 0; while (_local3 < steelSamplesFound.length) { if (steelSamplesFound[_local3]){ _local2++; }; _local3++; }; if (_local2 == (steelSamplesFound.length - 1)){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "And the last one..."; } else { this.phraseBaloon.text = "И последний..."; }; return; }; if (_local2 == steelSamplesFound.length){ this.currentPhase = "6u"; this.removeEventListener(MouseEvent.MOUSE_DOWN, phase6d); this.removeEventListener(MouseEvent.MOUSE_UP, phase6u); this.addEventListener(Config.EVENT_CONNECT_POINTS, phase7b, false, 0, true); }; } private function phase18b(_arg1:Event):void{ if (((((((((((!(this.phraseBaloon)) && ((this.currMode == Config.MODE_BUILDING)))) && (!(this.paused)))) && (!(this.tutorialMode)))) && (!(this.loaderScreen)))) && (!(this.islandText)))){ this.removeEventListener(Event.ENTER_FRAME, phase18b); this.phase18a(); }; } private function phase7c(_arg1:Event):void{ this.currentPhase = "7c"; this.phraseBaloon.removeEventListener(TalkBaloonAlt.EVENT_HIDDEN, phase7c); this.phraseBaloon.removeEventListener(TalkBaloonAlt.EVENT_SKIP, phase9a); this._layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon.cleanup(); this.phraseBaloon = null; this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.x = this.chudik.x; this.phraseBaloon.y = this.chudik.y; this._layerEngine.addChild(this.phraseBaloon); this.phraseBaloon.show(); this.blockConnect = true; _grid.visible = false; this.phraseBaloon.type = TalkBaloon.TYPE_SKIP_NEXT; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = (("That’s it! Now I can cross this gap safely! Thank you very much, " + this.playerName) + "!"); } else { this.phraseBaloon.text = (("Вот и все! Теперь я смогу перебраться на противоположную сторону! Большое спасибо вам, " + this.playerName) + "!"); }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SKIP, phase9a, false, 0, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase7d, false, 0, true); } private function phase7d(_arg1:Event):void{ this.currentPhase = "7d"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase7d); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP_NEXT; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "And it seems, my friend and I have told you everything we know, but if you need something you can always check the Help section from the menu. Thanks so much for helping us!"; } else { this.phraseBaloon.text = "Я и мои друзья рассказали вам, все, что мы знаем. Но если вам что-то понадобится, вы всегда можете посмотреть раздел помощи!"; }; this.phraseBaloon.addEventListener(TalkBaloon.EVENT_NEXT, phase7e, false, 0, true); } private function phase7e(_arg1:Event):void{ this.currentPhase = "7e"; this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_NEXT, phase7e); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); this.phraseBaloon.type = TalkBaloon.TYPE_SKIP; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Oh. One more request if you don’t mind. Please, click on the Start button! ^_^"; } else { this.phraseBaloon.text = "Ой, еще одна просьба... Нажмите, пожалуйста, на большую зеленую кнопку."; }; this.tutorialArrow = new TutorialArrow(); this.tutorialArrow.x = 45; this.tutorialArrow.y = 75; this.tutorialArrow.rotation = 0; this.tutorialArrow.visible = true; this.addChild(this.tutorialArrow); _hud.startButton.reset(); _hud.startButton.addEventListener(Config.EVENT_START, phase8a, false, 0, true); } private function phase7b(_arg1:Event):void{ this.currentPhase = "7b"; this.removeEventListener(Config.EVENT_CONNECT_POINTS, phase7b); this.blockConnect = true; this.phraseBaloon.addEventListener(TalkBaloonAlt.EVENT_HIDDEN, phase7c, false, 0, true); this.phraseBaloon.hide(); } private function phase18a():void{ if (((((((((((this.phraseBaloon) || (!((this.currMode == Config.MODE_BUILDING))))) || (this.paused))) || (this.tutorialMode))) || (this.loaderScreen))) || (this.islandText))){ this.addEventListener(Event.ENTER_FRAME, phase18b, false, 0, true); return; }; this.dotsBaloon = new DotsBaloon(); this.dotsBaloon.x = this.chudik.particle.x; this.dotsBaloon.y = this.chudik.particle.y; _layerEngine.addChild(this.dotsBaloon); this.dotsBaloon.addEventListener(DotsBaloon.EVENT_SHOWED, phase19, false, 0, true); this.addEventListener(Config.EVENT_START, phase20a, false, 0, true); this.dotsBaloon.show(); this.dotsBaloon.addEventListener(Event.ENTER_FRAME, phase18aa, false, 0, true); } private function waitToIslandText(_arg1:Event):void{ if (!this.islandText){ this.removeEventListener(Event.ENTER_FRAME, waitToIslandText); this.beginTutorial(); }; } private function phase8a(_arg1:Event):void{ var _local2:SharedObject; _hud.startButton.removeEventListener(Config.EVENT_START, phase8a); this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SKIP, phase9a); if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; _local2 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local2.data.passedTutorials){ _local2.data.passedTutorials[4] = true; } else { _local2.data.passedTutorials = [true, true, true, true, true]; }; _local2.flush(); this.phraseBaloon.hide(); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, phase8b, false, 0, true); } private function phase8b(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, phase8b); this._layerEngine.removeChild(this.phraseBaloon); this.phraseBaloon = null; this.unsetTutorialMode(); } private function unsetTutorialMode():void{ var _local1:int; this.tutorialMode = false; if (this.currMode == Config.MODE_BUILDING){ _grid.visible = true; _hud.deckButton.reset(); _hud.steelButton.reset(); _hud.ropeButton.reset(); _hud.startButton.reset(); _hud.editButton.reset(); _hud.editButton.hide(true); _hud.stressButton.reset(); _hud.undoButton.reset(); _hud.resetButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; } else { _hud.editButton.reset(); this.currMaterial = 1; this.blockConnect = false; this.blockDelete = false; }; this.chudik.manualMode = false; if (((sampleMaterials) && ((sampleMaterials.length > 0)))){ _local1 = 0; while (_local1 < sampleMaterials.length) { _layerEngine.removeChild(sampleMaterials[_local1]); _local1++; }; sampleMaterials = null; }; if (this.tutorialArrow){ this.removeChild(this.tutorialArrow); this.tutorialArrow = null; }; this.phase18a(); } } }//package levels
Section 219
//Level06 (levels.Level06) package levels { public class Level06 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="400" pin="false"/> <point x="40" y="320" pin="false"/> <point x="100" y="280" pin="false"/> <point x="140" y="220" pin="false"/> <point x="240" y="220" pin="true"/> <point x="240" y="300" pin="true"/> <point x="220" y="320" pin="false"/> <point x="180" y="340" pin="false"/> <point x="140" y="400" pin="false"/> <point x="80" y="460" pin="false"/> <point x="60" y="500" pin="false"/> <point x="-40" y="520" pin="false"/> </surface> <surface> <point x="500" y="220" pin="true"/> <point x="460" y="300" pin="true"/> <point x="420" y="360" pin="false"/> <point x="300" y="440" pin="false"/> <point x="260" y="500" pin="false"/> <point x="420" y="500" pin="false"/> <point x="520" y="440" pin="false"/> <point x="540" y="360" pin="false"/> <point x="580" y="320" pin="false"/> <point x="660" y="280" pin="false"/> <point x="660" y="220" pin="false"/> </surface> </surfaces> <zones> <zone type="finishzone" x="520" y="180" width="80" height="40"/> <zone type="rightzone" x="160" y="160" width="80" height="60"/> </zones> <grass> <line> <point x="-20" y="400" pin="false"/> <point x="40" y="320" pin="false"/> </line> <line> <point x="40" y="320" pin="false"/> <point x="100" y="280" pin="false"/> </line> <line> <point x="100" y="280" pin="false"/> <point x="140" y="220" pin="false"/> </line> <line> <point x="140" y="220" pin="false"/> <point x="240" y="220" pin="true"/> </line> <line> <point x="260" y="500" pin="false"/> <point x="300" y="440" pin="true"/> </line> <line> <point x="300" y="440" pin="true"/> <point x="420" y="360" pin="true"/> </line> <line> <point x="420" y="360" pin="true"/> <point x="460" y="300" pin="true"/> </line> <line> <point x="460" y="300" pin="true"/> <point x="500" y="220" pin="true"/> </line> <line> <point x="500" y="220" pin="true"/> <point x="660" y="220" pin="false"/> </line> </grass> <heroes> <hero type="Sinyak" x="200" y="195"/> </heroes> <sprites> <sprite a="0.5" b="0" c="0" d="0.5" tx="150" ty="100" type="8" layer="3"/> </sprites> <borders waterLineY="380" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="1500"/> <weather value="weatherday"/> <difficulty value="1"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 6; this.initLevel(_local4, _arg1); } } }//package levels
Section 220
//Level07 (levels.Level07) package levels { public class Level07 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="180" pin="false"/> <point x="100" y="180" pin="false"/> <point x="620" y="340" pin="true"/> <point x="620" y="380" pin="true"/> <point x="620" y="460" pin="false"/> <point x="620" y="540" pin="false"/> <point x="-20" y="700" pin="false"/> </surface> <surface> <point x="800" y="400" pin="false"/> <point x="820" y="620" pin="false"/> <point x="1000" y="620" pin="false"/> <point x="1000" y="400" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="20" y="140" width="40" height="40"/> <zone type="finishzone" x="880" y="260" width="40" height="140"/> </zones> <grass> <line><point x="100" y="180"/><point x="620" y="340"/></line> <line><point x="800" y="400"/><point x="1000" y="400"/></line> </grass> <heroes> <hero type="Glazan" x="40" y="155"/> </heroes> <sprites> </sprites> <borders waterLineY="460" upperBorderY="-135" leftBorderX="0" rightBorderX="980" bottomBorderY="600"/> <budget value="500"/> <weather value=""/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 7; this.initLevel(_local4, _arg1); } } }//package levels
Section 221
//Level08 (levels.Level08) package levels { public class Level08 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="100" y="240" pin="false"/> <point x="180" y="140" pin="false"/> <point x="300" y="140" pin="true"/> <point x="300" y="240" pin="false"/> </surface> <surface> <point x="20" y="0" pin="false"/> <point x="-20" y="0" pin="false"/> <point x="-20" y="500" pin="false"/> <point x="40" y="500" pin="false"/> <point x="220" y="500" pin="false"/> <point x="200" y="340" pin="true"/> <point x="20" y="300" pin="false"/> </surface> <surface> <point x="480" y="300" pin="true"/> <point x="500" y="320" pin="false"/> <point x="480" y="360" pin="false"/> <point x="460" y="400" pin="false"/> <point x="480" y="420" pin="false"/> <point x="500" y="440" pin="false"/> <point x="480" y="460" pin="false"/> <point x="460" y="480" pin="false"/> <point x="460" y="500" pin="false"/> <point x="520" y="500" pin="false"/> <point x="680" y="500" pin="false"/> <point x="680" y="300" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="120" y="120" width="40" height="90"/> <zone type="finishzone" x="560" y="220" width="40" height="80"/> </zones> <grass> <line><point x="100" y="240"/><point x="180" y="140"/></line> <line><point x="20" y="300"/><point x="200" y="340"/></line> <line><point x="480" y="300"/><point x="680" y="300"/></line> </grass> <heroes> <hero type="Sinyak" x="140" y="140"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="-15" leftBorderX="0" rightBorderX="660" bottomBorderY="480"/> <budget value="1500"/> <weather value=""/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 8; this.initLevel(_local4, _arg1); } } }//package levels
Section 222
//Level09 (levels.Level09) package levels { public class Level09 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="260" pin="false"/> <point x="140" y="260" pin="false"/> <point x="240" y="280" pin="true"/> <point x="240" y="340" pin="true"/> <point x="220" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="720" y="280" pin="true"/> <point x="700" y="340" pin="false"/> <point x="720" y="460" pin="false"/> <point x="740" y="500" pin="false"/> <point x="1040" y="500" pin="false"/> <point x="1040" y="280" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="60" y="220" width="40" height="40"/> <zone type="finishzone" x="780" y="220" width="40" height="60"/> </zones> <grass> <line><point x="140" y="260"/><point x="240" y="280"/></line> <line><point x="720" y="280"/><point x="1040" y="280"/></line> </grass> <heroes> <hero type="Glazan" x="80" y="235"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="331" ty="121" type="11" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="-225" leftBorderX="0" rightBorderX="940" bottomBorderY="480"/> <budget value="3500"/> <weather value="weatherday"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 9; this.initLevel(_local4, _arg1); } } }//package levels
Section 223
//Level10 (levels.Level10) package levels { public class Level10 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="200" pin="false"/> <point x="160" y="200" pin="false"/> <point x="160" y="220" pin="false"/> <point x="120" y="240" pin="true"/> <point x="60" y="260" pin="false"/> <point x="40" y="340" pin="false"/> <point x="-20" y="420" pin="false"/> </surface> <surface> <point x="160" y="540" pin="true" hook="true" onlysteel="true" hookdirectionx="1" hookdirectiony="-1" hookrotation="0"/> </surface> <surface> <point x="520" y="540" pin="true"/> <point x="520" y="560" pin="false"/> <point x="560" y="600" pin="false"/> <point x="560" y="660" pin="false"/> <point x="580" y="740" pin="false"/> <point x="800" y="740" pin="false"/> <point x="800" y="540" pin="false"/> </surface> </surfaces> <zones> <zone type="finishzone" x="660" y="460" width="40" height="80"/> <zone type="rightzone" x="40" y="160" width="40" height="40"/> </zones> <grass> <line><point x="520" y="540"/><point x="800" y="540"/></line> </grass> <heroes> <hero type="Glazan" x="60" y="175"/> </heroes> <sprites> </sprites> <borders waterLineY="640" upperBorderY="0" leftBorderX="0" rightBorderX="740" bottomBorderY="700"/> <budget value="3000"/> <weather value=""/> <difficulty value="3"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 10; this.initLevel(_local4, _arg1); } } }//package levels
Section 224
//Level11 (levels.Level11) package levels { public class Level11 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="200" y="280" pin="false"/> <point x="200" y="300" pin="false"/> <point x="180" y="300" pin="false"/> <point x="180" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="340" y="320" pin="false"/> <point x="340" y="500" pin="false"/> <point x="680" y="500" pin="false"/> <point x="680" y="320" pin="false"/> </surface> <surface> <point x="260" y="200" pin="true" hook="true" onlysteel="false" hookdirectionx="1" hookdirectiony="1" hookrotation="0"/> </surface> </surfaces> <zones> <zone type="finishzone" x="460" y="280" width="40" height="40"/> <zone type="rightzone" x="60" y="240" width="40" height="40"/> </zones> <grass> <line><point x="340" y="320"/><point x="680" y="320"/></line> </grass> <heroes> <hero type="Prezer" x="80" y="255"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="1100"/> <weather value="weatherday"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 11; this.initLevel(_local4, _arg1); } } }//package levels
Section 225
//Level12 (levels.Level12) package levels { public class Level12 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-40" y="180" pin="false"/> <point x="180" y="180" pin="true"/> <point x="180" y="500" pin="false"/> <point x="-40" y="500" pin="false"/> </surface> <surface> <point x="360" y="-160" pin="false"/> <point x="740" y="-160" pin="false"/> <point x="740" y="100" pin="false"/> <point x="520" y="120" pin="true"/> <point x="360" y="40" pin="true"/> </surface> <surface> <point x="580" y="500" pin="false"/> <point x="580" y="400" pin="false"/> <point x="740" y="400" pin="false"/> <point x="740" y="500" pin="false"/> </surface> </surfaces> <zones> <zone type="finishzone" x="600" y="340" width="100" height="60"/> <zone type="rightzone" x="40" y="80" width="140" height="100"/> </zones> <grass> </grass> <heroes> <hero type="Sinyak" x="100" y="155"/> </heroes> <sprites> </sprites> <borders waterLineY="420" upperBorderY="-120" leftBorderX="-40" rightBorderX="740" bottomBorderY="460"/> <budget value="1700"/> <weather value="weatherday"/> <difficulty value="1"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 12; this.initLevel(_local4, _arg1); } } }//package levels
Section 226
//Level13 (levels.Level13) package levels { public class Level13 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="100" y="280" pin="false"/> <point x="200" y="260" pin="true"/> <point x="260" y="320" pin="false"/> <point x="300" y="260" pin="false"/> <point x="320" y="420" pin="false"/> <point x="260" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="500" y="220" pin="false"/> <point x="520" y="300" pin="false"/> <point x="480" y="380" pin="false"/> <point x="500" y="480" pin="false"/> <point x="520" y="500" pin="false"/> <point x="540" y="500" pin="false"/> <point x="660" y="500" pin="false"/> <point x="660" y="220" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="40" y="240" width="40" height="40"/> <zone type="finishzone" x="580" y="180" width="40" height="40"/> </zones> <grass> <line><point x="-20" y="280"/><point x="100" y="280"/></line> <line><point x="100" y="280"/><point x="200" y="260"/></line> <line><point x="200" y="260"/><point x="250" y="310"/></line> <line><point x="270" y="310"/><point x="300" y="260"/></line> <line><point x="500" y="220"/><point x="660" y="220"/></line> </grass> <heroes> <hero type="Cvetok" x="60" y="255"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="2000"/> <weather value="weatherday"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 13; this.initLevel(_local4, _arg1); } } }//package levels
Section 227
//Level14 (levels.Level14) package levels { public class Level14 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="220" pin="false"/> <point x="160" y="220" pin="false"/> <point x="160" y="260" pin="false"/> <point x="120" y="260" pin="false"/> <point x="100" y="300" pin="true"/> <point x="120" y="340" pin="false"/> <point x="160" y="340" pin="false"/> <point x="160" y="560" pin="false"/> <point x="-20" y="560" pin="false"/> </surface> <surface> <point x="520" y="220" pin="true"/> <point x="520" y="500" pin="false"/> <point x="680" y="500" pin="false"/> <point x="680" y="220" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="40" y="180" width="40" height="40"/> <zone type="finishzone" x="560" y="180" width="40" height="40"/> </zones> <grass> <line><point x="520" y="220"/><point x="680" y="220"/></line> </grass> <heroes> <hero type="Glazan" x="60" y="195"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="302" ty="7" type="15" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="3500"/> <weather value="weatherday"/> <difficulty value="3"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 14; this.initLevel(_local4, _arg1); } } }//package levels
Section 228
//Level15 (levels.Level15) package levels { public class Level15 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="320" pin="false"/> <point x="180" y="320" pin="false"/> <point x="180" y="340" pin="true"/> <point x="180" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="480" y="320" pin="false"/> <point x="660" y="320" pin="false"/> <point x="660" y="500" pin="false"/> <point x="480" y="500" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="20" y="280" width="80" height="40"/> <zone type="finishzone" x="560" y="240" width="40" height="80"/> </zones> <grass> </grass> <heroes> <hero type="Sinyak" x="60" y="295"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="71" ty="-326" type="10" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="3000"/> <weather value="weathernight"/> <difficulty value="3"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 15; this.initLevel(_local4, _arg1); } } }//package levels
Section 229
//Level16 (levels.Level16) package levels { public class Level16 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="160" y="280" pin="true"/> <point x="160" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="500" y="240" pin="false"/> <point x="500" y="500" pin="false"/> <point x="660" y="500" pin="false"/> <point x="660" y="240" pin="false"/> </surface> <surface> <point x="260" y="260" pin="true" hook="true" onlysteel="true" hookdirectionx="1" hookdirectiony="-1" hookrotation="0"/> </surface> </surfaces> <zones> <zone type="finishzone" x="560" y="160" width="40" height="80"/> <zone type="rightzone" x="40" y="240" width="40" height="40"/> </zones> <grass> <line><point x="500" y="240"/><point x="660" y="240"/></line> </grass> <heroes> <hero type="Glazan" x="60" y="255"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="172" ty="-50" type="5" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="3000"/> <weather value=""/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 16; this.initLevel(_local4, _arg1); } } }//package levels
Section 230
//Level17 (levels.Level17) package levels { public class Level17 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="160" y="280" pin="true"/> <point x="160" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="460" y="220" pin="false"/> <point x="460" y="280" pin="true"/> <point x="460" y="500" pin="false"/> <point x="640" y="500" pin="false"/> <point x="640" y="220" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="60" y="240" width="40" height="40"/> <zone type="finishzone" x="560" y="180" width="40" height="40"/> </zones> <grass> <line><point x="460" y="220"/><point x="640" y="220"/></line> </grass> <heroes> <hero type="Sinyak" x="80" y="255"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="4000"/> <weather value="weatherday"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 17; this.initLevel(_local4, _arg1); } } }//package levels
Section 231
//Level18 (levels.Level18) package levels { public class Level18 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="260" pin="false"/> <point x="100" y="260" pin="false"/> <point x="200" y="340" pin="true"/> <point x="420" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="440" y="340" pin="false"/> <point x="440" y="480" pin="false"/> <point x="760" y="480" pin="false"/> <point x="760" y="340" pin="false"/> </surface> <surface> <point x="340" y="160" pin="true"/> <point x="760" y="160" pin="false"/> <point x="760" y="-20" pin="false"/> <point x="760" y="-40" pin="false"/> <point x="760" y="-60" pin="false"/> <point x="760" y="-80" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="40" y="220" width="40" height="40"/> <zone type="finishzone" x="580" y="300" width="40" height="40"/> </zones> <grass> <line><point x="100" y="260"/><point x="420" y="500"/></line> <line><point x="440" y="340"/><point x="760" y="340"/></line> <line><point x="340" y="160"/><point x="760" y="-80"/></line> </grass> <heroes> <hero type="Sinyak" x="60" y="235"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="33" ty="-91" type="5" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="720" bottomBorderY="480"/> <budget value="2000"/> <weather value="weatherday"/> <difficulty value="1"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 18; this.initLevel(_local4, _arg1); } } }//package levels
Section 232
//Level19 (levels.Level19) package levels { public class Level19 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-80" y="140" pin="false"/> <point x="120" y="140" pin="true"/> <point x="120" y="240" pin="false"/> <point x="100" y="300" pin="false"/> <point x="80" y="380" pin="false"/> <point x="80" y="440" pin="false"/> <point x="80" y="500" pin="false"/> <point x="-40" y="500" pin="false"/> </surface> <surface> <point x="240" y="300" pin="true"/> <point x="200" y="340" pin="false"/> <point x="180" y="460" pin="false"/> <point x="180" y="500" pin="false"/> <point x="340" y="500" pin="false"/> <point x="340" y="300" pin="true"/> </surface> <surface> <point x="520" y="260" pin="true"/> <point x="520" y="320" pin="false"/> <point x="540" y="380" pin="false"/> <point x="540" y="460" pin="false"/> <point x="540" y="500" pin="false"/> <point x="660" y="500" pin="false"/> <point x="660" y="240" pin="false"/> <point x="660" y="-140" pin="false"/> <point x="580" y="100" pin="false"/> <point x="580" y="160" pin="false"/> <point x="620" y="200" pin="false"/> <point x="640" y="260" pin="false"/> </surface> </surfaces> <zones> <zone type="finishzone" x="540" y="200" width="40" height="60"/> <zone type="rightzone" x="40" y="100" width="80" height="40"/> </zones> <grass> <line><point x="200" y="340"/><point x="240" y="300"/></line> <line><point x="240" y="300"/><point x="340" y="300"/></line> <line><point x="520" y="260"/><point x="640" y="260"/></line> </grass> <heroes> <hero type="Prezer" x="80" y="115"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="3000"/> <weather value="weathercloudy"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 19; this.initLevel(_local4, _arg1); } } }//package levels
Section 233
//Level20 (levels.Level20) package levels { public class Level20 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="140" y="280" pin="false"/> <point x="140" y="300" pin="false"/> <point x="160" y="300" pin="false"/> <point x="200" y="340" pin="true"/> <point x="240" y="380" pin="false"/> <point x="260" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="500" y="280" pin="true"/> <point x="500" y="500" pin="false"/> <point x="680" y="500" pin="false"/> <point x="680" y="320" pin="false"/> <point x="680" y="280" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="60" y="240" width="40" height="40"/> <zone type="finishzone" x="560" y="240" width="40" height="40"/> </zones> <grass> <line><point x="140" y="300"/><point x="160" y="300"/></line> <line><point x="160" y="300"/><point x="240" y="380"/></line> <line><point x="500" y="280"/><point x="680" y="280"/></line> </grass> <heroes> <hero type="Sinyak" x="80" y="255"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="1900"/> <weather value="weatherday"/> <difficulty value="3"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 20; this.initLevel(_local4, _arg1); } } }//package levels
Section 234
//Level21 (levels.Level21) package levels { public class Level21 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="180" y="280" pin="true"/> <point x="180" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="940" y="280" pin="true"/> <point x="940" y="500" pin="false"/> <point x="1140" y="500" pin="false"/> <point x="1140" y="280" pin="false"/> </surface> <surface> <point x="760" y="380" pin="true" hook="true" onlysteel="true" hookdirectionx="-1" hookdirectiony="-1" hookrotation="0"/> </surface> <surface> <point x="360" y="380" pin="true" hook="true" onlysteel="true" hookdirectionx="1" hookdirectiony="-1" hookrotation="0"/> </surface> </surfaces> <zones> <zone type="rightzone" x="40" y="240" width="80" height="40"/> <zone type="finishzone" x="1040" y="160" width="40" height="120"/> </zones> <grass> <line><point x="940" y="280"/><point x="1140" y="280"/></line> </grass> <heroes> <hero type="Glazan" x="80" y="255"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="158" ty="-101" type="5" layer="2"/> <sprite a="1" b="0" c="0" d="1" tx="486" ty="138" type="7" layer="3"/> </sprites> <borders waterLineY="400" upperBorderY="-345" leftBorderX="0" rightBorderX="1100" bottomBorderY="480"/> <budget value="6100"/> <weather value="weathernight"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 21; this.initLevel(_local4, _arg1); } } }//package levels
Section 235
//Level22 (levels.Level22) package levels { public class Level22 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-40" y="140" pin="false"/> <point x="80" y="300" pin="false"/> <point x="180" y="300" pin="true"/> <point x="80" y="380" pin="false"/> <point x="20" y="460" pin="false"/> <point x="20" y="500" pin="false"/> <point x="-80" y="500" pin="false"/> </surface> <surface> <point x="460" y="380" pin="false"/> <point x="500" y="420" pin="false"/> <point x="520" y="500" pin="false"/> <point x="660" y="500" pin="false"/> <point x="660" y="120" pin="false"/> <point x="600" y="200" pin="false"/> <point x="580" y="280" pin="false"/> <point x="560" y="300" pin="false"/> <point x="440" y="300" pin="true"/> </surface> </surfaces> <zones> <zone type="rightzone" x="80" y="240" width="100" height="60"/> <zone type="finishzone" x="460" y="260" width="100" height="40"/> </zones> <grass> <line><point x="-40" y="140"/><point x="80" y="300"/></line> <line><point x="80" y="300"/><point x="180" y="300"/></line> <line><point x="440" y="300"/><point x="560" y="300"/></line> <line><point x="560" y="300"/><point x="580" y="280"/></line> <line><point x="580" y="280"/><point x="600" y="200"/></line> <line><point x="600" y="200"/><point x="660" y="120"/></line> </grass> <heroes> <hero type="Larin" x="120" y="275"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="158" ty="-8" type="3" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="1700"/> <weather value=""/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 22; this.initLevel(_local4, _arg1); } } }//package levels
Section 236
//Level23 (levels.Level23) package levels { public class Level23 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="200" pin="false"/> <point x="180" y="200" pin="true"/> <point x="180" y="240" pin="false"/> <point x="120" y="280" pin="false"/> <point x="20" y="320" pin="false"/> <point x="-20" y="320" pin="false"/> </surface> <surface> <point x="540" y="860" pin="false"/> <point x="540" y="1060" pin="false"/> <point x="700" y="1060" pin="false"/> <point x="700" y="0" pin="false"/> <point x="680" y="0" pin="false"/> <point x="680" y="860" pin="false"/> </surface> <surface> <point x="520" y="120" pin="true" hook="true" onlysteel="false" hookdirectionx="-1" hookdirectiony="1" hookrotation="0"/> </surface> </surfaces> <zones> <zone type="finishzone" x="580" y="820" width="120" height="40"/> <zone type="rightzone" x="60" y="140" width="40" height="60"/> </zones> <grass> <line><point x="540" y="860"/><point x="660" y="860"/></line> </grass> <heroes> <hero type="Glazan" x="80" y="175"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="113" ty="211" type="10" layer="2"/> </sprites> <borders waterLineY="940" upperBorderY="-80" leftBorderX="0" rightBorderX="660" bottomBorderY="1020"/> <budget value="2500"/> <weather value=""/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 23; this.initLevel(_local4, _arg1); } } }//package levels
Section 237
//Level24 (levels.Level24) package levels { public class Level24 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="200" y="280" pin="true"/> <point x="180" y="520" pin="false"/> <point x="-20" y="520" pin="false"/> </surface> <surface> <point x="580" y="240" pin="false"/> <point x="820" y="200" pin="false"/> <point x="700" y="500" pin="false"/> <point x="540" y="500" pin="false"/> <point x="420" y="240" pin="false"/> </surface> <surface> <point x="420" y="20" pin="false"/> <point x="260" y="100" pin="true"/> <point x="160" y="100" pin="false"/> <point x="80" y="-40" pin="false"/> <point x="340" y="-100" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="80" y="240" width="40" height="40"/> <zone type="finishzone" x="540" y="180" width="40" height="60"/> </zones> <grass> <line><point x="420" y="240"/><point x="580" y="240"/></line> <line><point x="580" y="240"/><point x="800" y="200"/></line> </grass> <heroes> <hero type="Sinyak" x="100" y="255"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="1500"/> <weather value="weatherday"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 24; this.initLevel(_local4, _arg1); } } }//package levels
Section 238
//Level25 (levels.Level25) package levels { public class Level25 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="220" y="280" pin="false"/> <point x="220" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="460" y="280" pin="false"/> <point x="460" y="500" pin="false"/> <point x="680" y="500" pin="false"/> <point x="680" y="280" pin="false"/> </surface> <surface> <point x="40" y="240" pin="true" hook="true" onlysteel="true" hookdirectionx="-1" hookdirectiony="-1" hookrotation="+20"/> </surface> </surfaces> <zones> <zone type="rightzone" x="100" y="240" width="40" height="40"/> <zone type="finishzone" x="560" y="220" width="40" height="60"/> </zones> <grass> <line><point x="460" y="280"/><point x="680" y="280"/></line> </grass> <heroes> <hero type="Sinyak" x="120" y="255"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="196" ty="131" type="11" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="5000"/> <weather value="weatherday"/> <difficulty value="3"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 25; this.initLevel(_local4, _arg1); } } }//package levels
Section 239
//Level26 (levels.Level26) package levels { public class Level26 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="160" y="280" pin="true"/> <point x="160" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="520" y="280" pin="false"/> <point x="520" y="500" pin="false"/> <point x="720" y="500" pin="false"/> <point x="720" y="280" pin="false"/> </surface> </surfaces> <zones> <zone type="finishzone" x="620" y="200" width="40" height="80"/> <zone type="rightzone" x="20" y="240" width="140" height="40"/> </zones> <grass> <line><point x="520" y="280"/><point x="720" y="280"/></line> </grass> <heroes> <hero type="Cvetok" x="40" y="255"/> <hero type="Glazan" x="80" y="255"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="189" ty="123" type="7" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="-45" leftBorderX="0" rightBorderX="700" bottomBorderY="480"/> <budget value="4500"/> <weather value=""/> <difficulty value="3"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 26; this.initLevel(_local4, _arg1); } } }//package levels
Section 240
//Level27 (levels.Level27) package levels { public class Level27 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="400" y="400" pin="false"/> <point x="660" y="400" pin="false"/> <point x="660" y="780" pin="false"/> <point x="540" y="760" pin="false"/> <point x="480" y="660" pin="false"/> <point x="420" y="480" pin="false"/> </surface> <surface> <point x="120" y="340" pin="false"/> <point x="20" y="340" pin="false"/> <point x="20" y="380" pin="false"/> <point x="120" y="380" pin="false"/> </surface> <surface> <point x="780" y="120" pin="true" hook="true" onlysteel="false" hookdirectionx="-1" hookdirectiony="1" hookrotation="30"/> </surface> <surface> <point x="780" y="-160" pin="true" hook="true" onlysteel="false" hookdirectionx="-1" hookdirectiony="1" hookrotation="0"/> </surface> </surfaces> <zones> <zone type="finishzone" x="440" y="320" width="100" height="80"/> <zone type="rightzone" x="20" y="140" width="100" height="200"/> </zones> <grass> </grass> <heroes> <hero type="Larin" x="100" y="200"/> </heroes> <sprites> </sprites> <borders waterLineY="500" upperBorderY="-240" leftBorderX="0" rightBorderX="860" bottomBorderY="480"/> <budget value="3800"/> <weather value="weatherday"/> <difficulty value="1"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 27; this.initLevel(_local4, _arg1); } } }//package levels
Section 241
//Level28 (levels.Level28) package levels { public class Level28 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="40" pin="false"/> <point x="20" y="80" pin="false"/> <point x="40" y="140" pin="false"/> <point x="60" y="220" pin="false"/> <point x="80" y="260" pin="false"/> <point x="180" y="260" pin="true"/> <point x="200" y="340" pin="false"/> <point x="200" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="480" y="500" pin="false"/> <point x="480" y="260" pin="true"/> <point x="500" y="220" pin="false"/> <point x="660" y="220" pin="false"/> <point x="660" y="500" pin="false"/> </surface> <surface> <point x="660" y="80" pin="false"/> <point x="580" y="80" pin="true"/> <point x="520" y="40" pin="false"/> <point x="500" y="-20" pin="false"/> <point x="660" y="-20" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="80" y="220" width="100" height="40"/> <zone type="finishzone" x="520" y="160" width="50" height="60"/> </zones> <grass> <line><point x="-20" y="40"/><point x="20" y="80"/></line> <line><point x="20" y="80"/><point x="40" y="140"/></line> <line><point x="40" y="140"/><point x="60" y="220"/></line> <line><point x="60" y="220"/><point x="80" y="260"/></line> <line><point x="80" y="260"/><point x="180" y="260"/></line> <line><point x="180" y="260"/><point x="200" y="340"/></line> <line><point x="480" y="260"/><point x="500" y="220"/></line> </grass> <heroes> <hero type="Cvetok" x="120" y="235"/> </heroes> <sprites> <sprite a="1" b="0" c="0" d="1" tx="44" ty="-141" type="4" layer="2"/> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="3100"/> <weather value="weathernight"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 28; this.initLevel(_local4, _arg1); } } }//package levels
Section 242
//Level29 (levels.Level29) package levels { public class Level29 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="260" y="320" pin="true"/> <point x="260" y="500" pin="false"/> <point x="680" y="500" pin="false"/> <point x="680" y="320" pin="false"/> <point x="340" y="320" pin="true"/> </surface> <surface> <point x="-20" y="140" pin="false"/> <point x="160" y="140" pin="false"/> <point x="140" y="160" pin="false"/> <point x="-20" y="160" pin="false"/> </surface> </surfaces> <zones> <zone type="finishzone" x="340" y="240" width="40" height="80"/> <zone type="rightzone" x="40" y="100" width="40" height="40"/> </zones> <grass> <line><point x="260" y="320"/><point x="340" y="320"/></line> </grass> <heroes> <hero type="Larin" x="60" y="115"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="1300"/> <weather value="weathernight"/> <difficulty value="3"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 29; this.initLevel(_local4, _arg1); } } }//package levels
Section 243
//Level30 (levels.Level30) package levels { public class Level30 extends LevelManager { public function init(_arg1:Boolean=false):void{ var _local2:XML; var _local3:XMLList; var _local4:LevelData; _local2 = <level><surfaces> <surface> <point x="-20" y="280" pin="false"/> <point x="80" y="280" pin="false"/> <point x="80" y="300" pin="false"/> <point x="180" y="300" pin="false"/> <point x="200" y="300" pin="false"/> <point x="260" y="260" pin="true"/> <point x="320" y="340" pin="true"/> <point x="320" y="500" pin="false"/> <point x="-20" y="500" pin="false"/> </surface> <surface> <point x="440" y="280" pin="false"/> <point x="440" y="500" pin="false"/> <point x="680" y="500" pin="false"/> <point x="680" y="280" pin="false"/> </surface> </surfaces> <zones> <zone type="rightzone" x="20" y="240" width="40" height="40"/> <zone type="finishzone" x="520" y="220" width="40" height="60"/> </zones> <grass> <line><point x="-20" y="280"/><point x="80" y="280"/></line> <line><point x="80" y="300"/><point x="200" y="300"/></line> <line><point x="200" y="300"/><point x="260" y="260"/></line> <line><point x="260" y="260"/><point x="320" y="340"/></line> <line><point x="440" y="280"/><point x="680" y="280"/></line> </grass> <heroes> <hero type="Prezer" x="40" y="255"/> </heroes> <sprites> </sprites> <borders waterLineY="400" upperBorderY="0" leftBorderX="0" rightBorderX="640" bottomBorderY="480"/> <budget value="1200"/> <weather value="weatherday"/> <difficulty value="2"/> </level> ; _local3 = new XMLList(_local2); _local4 = new LevelData(_local3); _local4.index = 30; this.initLevel(_local4, _arg1); } } }//package levels
Section 244
//LevelData (levels.LevelData) package levels { import houses.*; import flash.geom.*; import core.*; public class LevelData { private var _borders:LevelBorders; private var _sprites:Array; private var _weather:String; private var _grass:Array; private var _surfaces:Array; private var _zones:Array; private var _index:uint; private var _xml:XMLList; private var _difficulty:int; private var _budget:Number; private var _protagonists:Array; public static const WEATHER_DAY:String = "weatherday"; public static const WEATHER_NIGHT:String = "weathernight"; public static const WEATHER_CLOUDY:String = "weathercloudy"; public function LevelData(_arg1:XMLList=null){ _xml = _arg1; initialize(); if (_xml){ parseLevel(); }; } public function set zones(_arg1:Array):void{ _zones = _arg1; } private function parseLevel():void{ var _local1:*; var _local2:Object; var _local3:int; var _local4:*; for each (_local1 in _xml.surfaces.surface) { _surfaces.push(parseSurface(_local1)); }; for each (_local1 in _xml.zones.zone) { _zones.push(parseZone(_local1)); }; for each (_local1 in _xml.grass.line) { _local2 = new Object(); _local3 = 1; for each (_local4 in _local1.point) { _local2[("p" + _local3)] = parsePoint(_local4); _local3++; }; _grass.push(_local2); }; for each (_local1 in _xml.heroes.hero) { _protagonists.push(parseHero(_local1)); }; for each (_local1 in _xml.sprites.sprite) { _sprites.push(parseSprites(_local1)); }; this.borders = this.parseBorders(_xml.borders); this.budget = Number(_xml.budget.@value); this.difficulty = Number(_xml.difficulty.@value); this.weather = _xml.weather.@value; } private function parseBorders(_arg1):LevelBorders{ return (new LevelBorders(_arg1.@upperBorderY, _arg1.@leftBorderX, _arg1.@rightBorderX, _arg1.@bottomBorderY, _arg1.@waterLineY)); } public function get protagonists():Array{ return (_protagonists); } public function set budget(_arg1:Number):void{ _budget = _arg1; } private function parseSprites(_arg1):SpriteInfo{ var _local2:SpriteInfo; _local2 = new SpriteInfo(); _local2.matrix = new Matrix(_arg1.@a, _arg1.@b, _arg1.@c, _arg1.@d, _arg1.@tx, _arg1.@ty); _local2.layer = _arg1.@layer; _local2.type = _arg1.@type; return (_local2); } public function set sprites(_arg1:Array):void{ _sprites = _arg1; } private function parsePoint(_arg1):Point{ return (new Point(_arg1.@x, _arg1.@y)); } private function initialize():void{ _surfaces = new Array(); _zones = new Array(); _grass = new Array(); _protagonists = new Array(); _sprites = new Array(); } public function set index(_arg1:uint):void{ _index = _arg1; } public function set borders(_arg1:LevelBorders):void{ _borders = _arg1; } public function set protagonists(_arg1:Array):void{ _protagonists = _arg1; } public function get grass():Array{ return ((_grass as Array)); } public function get difficulty():Number{ return (_difficulty); } public function get zones():Array{ return (_zones); } public function set surfaces(_arg1:Array):void{ _surfaces = _arg1; } private function parseHero(_arg1):Object{ return ({x:_arg1.@x, y:_arg1.@y, type:_arg1.@type}); } public function get sprites():Array{ return (_sprites); } public function get index():uint{ return (_index); } public function get budget():Number{ return (_budget); } public function get borders():LevelBorders{ return (_borders); } public function get surfaces():Array{ return (_surfaces); } public function set grass(_arg1:Array):void{ _grass = _arg1; } public function set weather(_arg1:String):void{ _weather = _arg1; } public function set difficulty(_arg1:Number):void{ _difficulty = _arg1; } private function parseSurface(_arg1):Array{ var _local2:Array; var _local3:*; _local2 = new Array(); for each (_local3 in _arg1.point) { _local2.push(new SurfacePoint(_local3.@x, _local3.@y, ((_local3.@pin)=="true") ? true : false, ((_local3.@hook)=="true") ? true : false, ((_local3.@onlysteel)=="true") ? true : false, Number(_local3.@hookrotation), int(_local3.@hookdirectionx), int(_local3.@hookdirectiony))); }; return (_local2); } public function get weather():String{ return (_weather); } private function parseZone(_arg1):LevelZone{ return (new LevelZone(_arg1.@x, _arg1.@y, _arg1.@width, _arg1.@height, _arg1.@type)); } public static function decode(_arg1:XMLList):LevelData{ return (new LevelData(_arg1)); } public static function encode(_arg1:LevelData):XMLList{ return (new XMLList("")); } } }//package levels
Section 245
//LevelManager (levels.LevelManager) package levels { import flash.display.*; import houses.*; import flash.geom.*; import core.*; import org.cove.ape.*; import flash.events.*; import flash.net.*; import picaso.*; import flash.utils.*; import sounds.*; import vis.*; import hud.*; import menu.*; import popup.*; import water.*; import characters.*; import flash.filters.*; import flash.ui.*; public class LevelManager extends Sprite { protected var _grid:Grid; protected var _hud:HUD; private var storyMode:Boolean;// = false private var _scale:Number; private var _currMode:Number; private var _scrollLeftZone:ScrollZone; private var _budget:Number; private var _scrolling:Boolean; private var _fader:Fader; protected var _winTemp:Boolean;// = false private var currRopeBlock:int;// = 0 private var _counter:int;// = 0 private var _winBudget:Number; private var _processingRope:Boolean;// = false private var birdsSounds:Array; private var _line:Sprite; private var solutionObj:Object; protected var islandText:Sprite; public var levelObjects:Object; protected var _pointer:Pointer; public var needHelp:Boolean; private var _physicsOn:Boolean; public var levelSurfaces:Array; public var levelZones:Array; private var _mouseXY:Point; private var _sets:Array; private var loseTimes:int;// = 0 protected var _layerEngine:Sprite; private var _groupProtagonists:Group; public var levelFinish:Array; public var levelProtagonists:Array; private var numRopeBlocks:int;// = 0 public var levelData:LevelData; private var _scrollRightZone:ScrollZone; private var _layerStatic:Sprite; protected var _protagonists:Array; private var _blockConnect:Boolean;// = false private var natureSoundsLaunched:Boolean;// = false private var _layerFirst:Sprite; public var levelFinishZone:Rectangle; protected var _group:Group; private var _bird:Bird; private var _highlignting:Boolean; private var _scrollThroughDragging:Boolean; public var levelBorders:LevelBorders; private var _swimmers:Number; private var ropes:Array; private var _fadeIn:Boolean; private var _scrollX:Number; private var _scrollY:Number; private var _zooming:Boolean; private var _fadeOut:Boolean; public var levelHouses:Array; protected var _points:Array; private var _clouds:Array; private var _undoMode:Boolean; private var _oldBlockDelete:Boolean;// = false protected var tutorialMode:Boolean; private var _paused:Boolean; private var sprites:Array; public var levelDifficulty:int; protected var loaderScreen:LoaderScreen; private var _inGameMenu:InGameMenu; protected var _flagArrow:TutorialArrow; protected var _groupMaterials:Group; private var _playerName:String;// = "Player" private var _dragging:Boolean; private var overloadingLimit:int;// = 3 private var _stress:Boolean; private var _blockDelete:Boolean;// = false private var numSlnConstraints:int;// = 0 private var constraintsCounter:int;// = 0 protected var _win:Boolean;// = false private var _currMaterial:Number; private var _waters:Array; private var _instantScrolling:Boolean; private var _enableBuilding:Boolean; private var _scrollDownZone:ScrollZone; private var _PHRASES:Array; protected var phraseBaloon; protected var _showedFlag:Boolean; private var _layerDynamic:Sprite; private var phraseBaloonDelayCounter:int; private var _actions:Array; private var _popUp; public var levelWeather:String; private var _soundPanel:SoundPanel; private var currSlnConstraint:int;// = 0 private var fadeCounter:int;// = 0 public var levelBudget:Number; public var levelNumber:int; private var _scrollUpZone:ScrollZone; private var _numProtagonists:Number; public function LevelManager(){ _PHRASES = []; _win = false; _winTemp = false; storyMode = false; _playerName = "Player"; _blockConnect = false; _blockDelete = false; natureSoundsLaunched = false; birdsSounds = [SoundData.BIRD1, SoundData.BIRD2, SoundData.BIRD3, SoundData.BIRD4]; ropes = []; currSlnConstraint = 0; _counter = 0; numSlnConstraints = 0; _processingRope = false; constraintsCounter = 0; numRopeBlocks = 0; currRopeBlock = 0; _oldBlockDelete = false; overloadingLimit = 3; loseTimes = 0; sprites = []; fadeCounter = 0; super(); levelBudget = 0; levelDifficulty = 1; _stress = false; _dragging = false; _highlignting = false; _physicsOn = false; _enableBuilding = true; _scrollThroughDragging = false; _showedFlag = false; _scrollX = 0; _scrollY = 0; _scale = 1; _zooming = true; _scrolling = false; _swimmers = 0; _currMaterial = 0; _currMode = 0; _budget = 0; _numProtagonists = 0; _win = false; _winBudget = 0; _actions = new Array(); _undoMode = true; _points = new Array(); _sets = new Array(); _instantScrolling = false; needHelp = true; } private function processRope(_arg1:Event):void{ var _local2:CircleParticle; var _local3:CircleParticle; var _local4:Point; var _local5:Number; var _local6:Number; var _local7:SpringConstraint; var _local8:CircleParticle; if (this.currRopeBlock == this.numRopeBlocks){ this.removeEventListener(Event.ENTER_FRAME, processRope); _processingRope = false; this.ropes.push({setId:_groupMaterials.numSets, p1:_points[0], p2:_points[(_points.length - 1)]}); _sets.push(new Point(_groupMaterials.numSets, Config.MATERIAL_ROPE)); _groupMaterials.numSets++; indexesCorrection(); _points.splice(0); dispatchEvent(new Event(Config.EVENT_CONNECT_POINTS, true)); APEngine.paint(); return; }; _local2 = _points[0]; _local3 = _points.pop(); _local4 = new Point((_local3.px - _local2.px), (_local3.py - _local2.py)); _local5 = (_local4.x / this.numRopeBlocks); _local6 = (_local4.y / this.numRopeBlocks); if (this.currRopeBlock == 0){ _local2.addSet(_groupMaterials.numSets); }; if (this.currRopeBlock != (this.numRopeBlocks - 1)){ _local8 = new CircleParticle((_local2.px + ((this.currRopeBlock + 1) * _local5)), (_local2.py + ((this.currRopeBlock + 1) * _local6)), Config.MATERIAL_ROPE_POINT_RADIUS, false, Config.MATERIAL_ROPE_POINT_MASS, Config.MATERIAL_ROPE_POINT_ELASTICITY, 0); _local8.setFill(0); _local8.collidable = false; _local8.subParticle = true; _points.push(_local8); _groupMaterials.addParticle(_local8, _groupMaterials.numSets); } else { _local3.addSet(_groupMaterials.numSets); _points.push(_local3); }; _local7 = new SpringConstraint(_points[this.currRopeBlock], _points[(this.currRopeBlock + 1)], Config.MATERIAL_ROPE_STIFFNESS, Config.MATERIAL_ROPE_COLLIDABLE, Config.MATERIAL_ROPE_RECT_HEIGHT, Config.MATERIAL_ROPE_RECT_SCALE, true); _local7.setStyle(Config.MATERIAL_ROPE_LINE_THICKNESS, Config.MATERIAL_ROPE_LINE_COLOR, 1, Config.MATERIAL_ROPE_FILL_COLOR); _local7.materialMultiplier = Config.MATERIAL_ROPE_MULTIPLIER; _local7.material = Config.MATERIAL_ROPE; _local7.restLength = (_local7.restLength * Config.MATERIAL_ROPE_LENGTH_MODIFIER); _groupMaterials.addConstraint(_local7, _groupMaterials.numSets); if (((_points[this.currRopeBlock].fixed) || (_points[(this.currRopeBlock + 1)].fixed))){ _local7.fixedEndLimit = Config.MATERIAL_FIXED_END_LIMIT; }; if (_points[(_points.length - 1)] != _local3){ _points.push(_local3); }; this.currRopeBlock++; this.constraintsCounter++; } private function onStartHandler(_arg1:Event):void{ currMode = Config.MODE_EMULATION; } private function addChildIntoLayer(_arg1:DisplayObject, _arg2:int, _arg3:Boolean=false){ var _local4:Sprite; if (this._layerDynamic == null){ return; }; if (this._layerDynamic.numChildren < 7){ return; }; if ((((_arg2 < 1)) || ((_arg2 > 7)))){ return; }; _local4 = (this._layerDynamic.getChildAt((7 - _arg2)) as Sprite); if (!_arg3){ _local4.addChildAt(_arg1, 0); } else { _local4.addChild(_arg1); }; } private function enterFrameHandler(_arg1:Event):void{ var _local2:int; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Thunder; var _local10:Point; var _local11:Number; var _local12:Number; var _local13:Point; var _local14:Point; var _local15:Point; var _local16:Number; var _local17:SpringConstraint; var _local18:Boolean; var _local19:Number; var _local20:Number; var _local21:int; var _local22:*; var _local23:int; var _local24:LevelZone; var _local25:Point; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Point; var _local30:Point; var _local31:Sprite; var _local32:Point; var _local33:Number; var _local34:Point; var _local35:Point; var _local36:Point; var _local37:Point; var _local38:Point; var _local39:Point; var _local40:Point; var _local41:Point; var _local42:Point; var _local43:Point; var _local44:Number; var _local45:Number; var _local46:Number; var _local47:Number; var _local48:Number; var _local49:Number; var _local50:Number; var _local51:Number; var _local52:Array; var _local53:Boolean; var _local54:Point; var _local55:Array; if (this.loaderScreen){ return; }; if (this.levelWeather == LevelData.WEATHER_DAY){ if (Math.random() > 0.996){ _local8 = Math.floor((Math.random() * 4)); this.birdsSounds[_local8].play(); }; }; if (this._paused){ return; }; if (levelWeather == LevelData.WEATHER_CLOUDY){ if (Math.random() > 0.998){ _local9 = new Thunder(); _local9.x = (Math.random() * Config.SCREEN_WIDTH); this.addChildIntoLayer(_local9, (Math.round((Math.random() * 5)) + 1)); }; }; _local3 = 80; _local4 = (Config.SCREEN_HEIGHT - 60); _local5 = 60; _local6 = (Config.SCREEN_WIDTH - 60); _local7 = (this.tutorialMode) ? 1 : 0.8; if (((!((this.phraseBaloon == null))) && (!(this.tutorialMode)))){ _local10 = new Point(_protagonists[0].x, _protagonists[0].y); _local10 = _layerEngine.localToGlobal(_local10); _local11 = 260; _local12 = 140; if ((((((_local10.x < _local5)) && ((_local10.y > _local3)))) && ((_local10.y < _local4)))){ _local13 = _layerEngine.globalToLocal(new Point(_local5, _local10.y)); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; this.phraseBaloon.scaleX = _local7; this.phraseBaloon.textField.scaleX = 1; this.phraseBaloon.textField.x = 69; if ((_local10.y - _local12) < _local3){ this.phraseBaloon.scaleY = -(_local7); this.phraseBaloon.textField.scaleY = -1; this.phraseBaloon.textField.y = -15; } else { this.phraseBaloon.scaleY = _local7; this.phraseBaloon.textField.scaleY = 1; this.phraseBaloon.textField.y = -156; }; } else { if ((((((_local10.x > _local5)) && ((_local10.x < _local6)))) && ((_local10.y < _local3)))){ _local13 = _layerEngine.globalToLocal(new Point(_local10.x, _local3)); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; if ((_local10.x + _local11) > _local6){ this.phraseBaloon.scaleX = -(_local7); this.phraseBaloon.textField.scaleX = -1; this.phraseBaloon.textField.x = 300; } else { this.phraseBaloon.scaleX = _local7; this.phraseBaloon.textField.scaleX = 1; this.phraseBaloon.textField.x = 69; }; this.phraseBaloon.scaleY = -(_local7); this.phraseBaloon.textField.scaleY = -1; this.phraseBaloon.textField.y = -15; } else { if ((((((_local10.x > _local6)) && ((_local10.y > _local3)))) && ((_local10.y < _local4)))){ _local13 = _layerEngine.globalToLocal(new Point(_local6, _local10.y)); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; this.phraseBaloon.scaleX = -(_local7); this.phraseBaloon.textField.scaleX = -1; this.phraseBaloon.textField.x = 300; if ((_local10.y - _local12) < _local3){ this.phraseBaloon.scaleY = -(_local7); this.phraseBaloon.textField.scaleY = -1; this.phraseBaloon.textField.y = -15; } else { this.phraseBaloon.scaleY = _local7; this.phraseBaloon.textField.scaleY = 1; this.phraseBaloon.textField.y = -156; }; } else { if ((((((_local10.x > _local5)) && ((_local10.x < _local6)))) && ((_local10.y > _local4)))){ _local13 = _layerEngine.globalToLocal(new Point(_local10.x, _local4)); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; if ((_local10.x + _local11) > _local6){ this.phraseBaloon.scaleX = -(_local7); this.phraseBaloon.textField.scaleX = -1; this.phraseBaloon.textField.x = 300; } else { this.phraseBaloon.scaleX = _local7; this.phraseBaloon.textField.scaleX = 1; this.phraseBaloon.textField.x = 69; }; this.phraseBaloon.scaleY = _local7; this.phraseBaloon.textField.scaleY = 1; this.phraseBaloon.textField.y = -156; } else { if ((((_local10.x < _local5)) && ((_local10.y < _local3)))){ _local13 = _layerEngine.globalToLocal(new Point(_local5, _local3)); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; this.phraseBaloon.scaleX = _local7; this.phraseBaloon.textField.scaleX = 1; this.phraseBaloon.textField.x = 69; this.phraseBaloon.scaleY = -(_local7); this.phraseBaloon.textField.scaleY = -1; this.phraseBaloon.textField.y = -15; } else { if ((((_local10.x > _local6)) && ((_local10.y < _local3)))){ _local13 = _layerEngine.globalToLocal(new Point(_local6, _local3)); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; this.phraseBaloon.scaleX = -(_local7); this.phraseBaloon.textField.scaleX = -1; this.phraseBaloon.textField.x = 300; this.phraseBaloon.scaleY = -(_local7); this.phraseBaloon.textField.scaleY = -1; this.phraseBaloon.textField.y = -15; } else { if ((((_local10.x > _local6)) && ((_local10.y > _local4)))){ _local13 = _layerEngine.globalToLocal(new Point(_local6, _local4)); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; this.phraseBaloon.scaleX = -(_local7); this.phraseBaloon.textField.scaleX = -1; this.phraseBaloon.textField.x = 300; this.phraseBaloon.scaleY = _local7; this.phraseBaloon.textField.scaleY = 1; this.phraseBaloon.textField.y = -156; } else { if ((((_local10.x < _local5)) && ((_local10.y > _local4)))){ _local13 = _layerEngine.globalToLocal(new Point(_local5, _local4)); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; this.phraseBaloon.scaleX = _local7; this.phraseBaloon.textField.scaleX = 1; this.phraseBaloon.textField.x = 69; this.phraseBaloon.scaleY = _local7; this.phraseBaloon.textField.scaleY = 1; this.phraseBaloon.textField.y = -156; } else { _local13 = _layerEngine.globalToLocal(_local10); this.phraseBaloon.x = _local13.x; this.phraseBaloon.y = _local13.y; if ((_local10.x + _local11) > _local6){ this.phraseBaloon.scaleX = -(_local7); this.phraseBaloon.textField.scaleX = -1; this.phraseBaloon.textField.x = 300; } else { this.phraseBaloon.scaleX = _local7; this.phraseBaloon.textField.scaleX = 1; this.phraseBaloon.textField.x = 69; }; if ((_local10.y - _local12) < _local3){ this.phraseBaloon.scaleY = -(_local7); this.phraseBaloon.textField.scaleY = -1; this.phraseBaloon.textField.y = -15; } else { this.phraseBaloon.scaleY = _local7; this.phraseBaloon.textField.scaleY = 1; this.phraseBaloon.textField.y = -156; }; }; }; }; }; }; }; }; }; }; _local3 = 80; _local4 = (Config.SCREEN_HEIGHT - 80); _local5 = 80; _local6 = (Config.SCREEN_WIDTH - 60); if (((!(this._showedFlag)) && (this.levelFinishZone))){ _local14 = this._layerFirst.localToGlobal(new Point((this.levelFinishZone.left + (this.levelFinishZone.width / 2)), (this.levelFinishZone.bottom - 40))); if ((((((((_local14.x >= 0)) && ((_local14.x < Config.SCREEN_WIDTH)))) && ((_local14.y >= 0)))) && ((_local14.y < Config.SCREEN_HEIGHT)))){ this._showedFlag = true; if (_flagArrow){ this.removeChild(this._flagArrow); this._flagArrow = null; }; } else { if (this._flagArrow == null){ this._flagArrow = new TutorialArrow(); this.addChild(this._flagArrow); }; if ((((((_local14.x < _local5)) && ((_local14.y > _local3)))) && ((_local14.y < _local4)))){ _flagArrow.rotation = -90; _flagArrow.x = _local5; _flagArrow.y = _local14.y; } else { if ((((((_local14.x > _local5)) && ((_local14.x < _local6)))) && ((_local14.y < _local3)))){ _flagArrow.rotation = 0; _flagArrow.x = _local14.x; _flagArrow.y = _local3; } else { if ((((((_local14.x > _local6)) && ((_local14.y > _local3)))) && ((_local14.y < _local4)))){ _flagArrow.rotation = 90; _flagArrow.x = _local6; _flagArrow.y = _local14.y; } else { if ((((((_local14.x > _local5)) && ((_local14.x < _local6)))) && ((_local14.y > _local4)))){ _flagArrow.rotation = 180; _flagArrow.x = _local14.x; _flagArrow.y = _local4; } else { if ((((_local14.x < _local5)) && ((_local14.y < _local3)))){ _local15 = new Point((_local14.x - _local5), (_local14.y - _local3)); _local16 = ((Math.asin((_local15.y / _local15.length)) * 180) / Math.PI); _flagArrow.rotation = (90 + _local16); _flagArrow.x = _local5; _flagArrow.y = _local3; } else { if ((((_local14.x > _local6)) && ((_local14.y < _local3)))){ _local15 = new Point((_local14.x - _local6), (_local14.y - _local3)); _local16 = ((Math.asin((_local15.y / _local15.length)) * 180) / Math.PI); _flagArrow.rotation = (90 + _local16); _flagArrow.x = _local6; _flagArrow.y = _local3; } else { if ((((_local14.x > _local6)) && ((_local14.y > _local4)))){ _local15 = new Point((_local14.x - _local6), (_local14.y - _local4)); _local16 = ((Math.asin((_local15.y / _local15.length)) * 180) / Math.PI); _flagArrow.rotation = (90 + _local16); _flagArrow.x = _local6; _flagArrow.y = _local4; } else { if ((((_local14.x < _local5)) && ((_local14.y > _local4)))){ _local15 = new Point((_local14.x - _local5), (_local14.y - _local4)); _local16 = ((Math.asin((_local15.y / _local15.length)) * 180) / Math.PI); _flagArrow.rotation = (90 + _local16); _flagArrow.x = _local5; _flagArrow.y = _local4; }; }; }; }; }; }; }; }; }; }; if (((_stress) && ((_currMode == Config.MODE_EMULATION)))){ this._groupMaterials.currStress(); }; if (((_stress) && ((_currMode == Config.MODE_BUILDING)))){ _groupMaterials.hideStress(); }; if (_scrollThroughDragging){ if (_popUp){ _scrollThroughDragging = false; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } else { this.scrollUpdate(); }; }; if (_zooming){ this.zoomUpdate(); } else { _hud.zoomInButton.active = false; _hud.zoomOutButton.active = false; }; if (((!(_hud.zoomInButton.active)) && (!(_hud.zoomOutButton.active)))){ _hud.zoomInButton.visible = false; _hud.zoomOutButton.visible = false; _zooming = false; }; if (currMode == Config.MODE_EMULATION){ if (_physicsOn){ _local2 = 0; while (_local2 < _protagonists.length) { _protagonists[_local2].particle.collisionDetected = false; _local2++; }; APEngine.step(); APEngine.paint(); } else { return; }; _local2 = 0; while (_local2 < _groupMaterials.constraints.length) { _local17 = _groupMaterials.constraints[_local2]; _local18 = false; if ((_local17.currLength - _local17.restLength) > (_local17.restLength * _local17.materialMultiplier)){ _local18 = true; }; if ((_local17.currLength - _local17.restLength) < (-(_local17.restLength) * _local17.materialMultiplier)){ _local18 = true; }; if (_local18){ _local17.overloadingCounter++; if (_local17.overloadingCounter >= Config.MATERIAL_OVERLOAD_CHECKS){ _local17.overloadingCounter = 0; deleteOverloadedConstraint(_local17); }; }; _local2++; }; if (this._protagonists.length > 0){ _local19 = _protagonists[0].x; _local20 = _protagonists[0].y; _swimmers = 0; _local21 = 0; _local2 = 0; while (_local2 < _protagonists.length) { _local22 = _protagonists[_local2]; if ((_local22 as Protagonist).finished){ _local21++; if (Math.random() > 0.99){ _local22.jump(); _local22.stand(); }; } else { if (_local22.y > levelBorders.waterLineY){ _local22.swim(); _swimmers++; }; if (levelZones != null){ _local23 = 0; while (_local23 < levelZones.length) { _local24 = (levelZones[_local23] as LevelZone); if (_local24.type == LevelZone.FINISH){ if (_local24.containsPoint(new Point(_protagonists[_local2].x, _protagonists[_local2].y))){ if (_local22.currentAction == Protagonist.RUN_RIGHT){ _local22.resetSpeed(); _local22.turn(Protagonist.TURN_FROM_LEFT_TO_PLAYER, true); _local22.stand(); } else { if (_local22.currentAction == Protagonist.RUN_LEFT){ _local22.resetSpeed(); _local22.turn(Protagonist.TURN_FROM_RIGHT_TO_PLAYER, true); _local22.stand(); }; }; if (Math.random() > 0.99){ _local22.jump(); _local22.stand(); }; (_local22 as Protagonist).finished = true; }; } else { if (_local24.type == LevelZone.RIGHT){ if (_local24.containsPoint(new Point(_protagonists[_local2].x, _protagonists[_local2].y))){ if (_local22.particle.angularVelocity <= 0){ if (_local22.particle.angularVelocity < 0){ _local22.rotateAndRun(Protagonist.RUN_RIGHT); } else { if (_local22.particle.angularVelocity == 0){ _local22.turnAndRun(Protagonist.RUN_RIGHT); }; }; }; }; } else { if (_local24.type == LevelZone.LEFT){ if (_local24.containsPoint(new Point(_protagonists[_local2].x, _protagonists[_local2].y))){ if (_local22.particle.angularVelocity >= 0){ if (_local22.particle.angularVelocity > 0){ _local22.rotateAndRun(Protagonist.RUN_LEFT); } else { if (_local22.particle.angularVelocity == 0){ _local22.turnAndRun(Protagonist.RUN_LEFT); }; }; }; }; }; }; }; _local23++; }; }; }; _local2++; }; }; if (_swimmers > 0){ addPopUp(Config.POPUP_LOSE); GAManager.trackPage((("/level-" + this.levelNumber.toString()) + "-lost")); }; if (_local21 == _numProtagonists){ _win = true; _winTemp = true; if (!this.tutorialMode){ addPopUp(Config.POPUP_WIN); }; GAManager.trackPage((("/level-" + this.levelNumber.toString()) + "-passed")); }; } else { if (currMode == Config.MODE_BUILDING){ if (!_zooming){ _scale = _layerDynamic.scaleX; }; _local2 = 0; while (_local2 < this._protagonists.length) { if (this._protagonists[_local2].actions.length == 0){ if (Math.random() > 0.99){ this._protagonists[_local2].wave(); this._protagonists[_local2].stand(); }; }; _local2++; }; _local25 = this._layerFirst.globalToLocal(new Point(mouseX, mouseY)); _local26 = (Math.round((_local25.x / Config.GRID_WIDTH)) * Config.GRID_WIDTH); _local27 = (Math.round((_local25.y / Config.GRID_HEIGHT)) * Config.GRID_HEIGHT); if (_dragging){ _local28 = 0; if (currMaterial == Config.MATERIAL_DECK){ _local28 = Config.MATERIAL_DECK_MAX_LENGTH; } else { if (currMaterial == Config.MATERIAL_STEEL){ _local28 = Config.MATERIAL_STEEL_MAX_LENGTH; }; }; _local29 = new Point(_points[0].px, _points[0].py); _local30 = new Point(_local26, _local27); _local15 = _local30.subtract(_local29); if (((!((_local28 == 0))) && ((_local15.length > _local28)))){ _local34 = new Point(); _local15 = _local30.subtract(_local29); _local34.x = (_local29.x + ((_local28 * _local15.x) / _local15.length)); _local34.y = (_local29.y + ((_local28 * _local15.y) / _local15.length)); _local35 = new Point(); _local35.x = (Math.floor((_local34.x / Config.GRID_WIDTH)) * Config.GRID_WIDTH); _local35.y = (Math.floor((_local34.y / Config.GRID_HEIGHT)) * Config.GRID_HEIGHT); if (_local35.x < 0){ _local35.x = (_local35.x - Config.GRID_WIDTH); }; if (_local35.y < 0){ _local35.y = (_local35.y - Config.GRID_HEIGHT); }; _local36 = _local35.clone(); _local37 = new Point(_local35.x, (_local35.y + Config.GRID_HEIGHT)); _local38 = new Point((_local35.x + Config.GRID_WIDTH), (_local35.y + Config.GRID_HEIGHT)); _local39 = new Point((_local35.x + Config.GRID_WIDTH), _local35.y); _local40 = _local36.subtract(_local29); _local41 = _local37.subtract(_local29); _local42 = _local38.subtract(_local29); _local43 = _local39.subtract(_local29); _local44 = (((_local15.x * _local40.x) + (_local15.y * _local40.y)) / (_local15.length * _local40.length)); _local45 = (((_local15.x * _local41.x) + (_local15.y * _local41.y)) / (_local15.length * _local41.length)); _local46 = (((_local15.x * _local42.x) + (_local15.y * _local42.y)) / (_local15.length * _local42.length)); _local47 = (((_local15.x * _local43.x) + (_local15.y * _local43.y)) / (_local15.length * _local43.length)); if (_local44 > 1){ _local44 = 1; }; if (_local44 < -1){ _local44 = -1; }; if (_local45 > 1){ _local45 = 1; }; if (_local45 < -1){ _local45 = -1; }; if (_local46 > 1){ _local46 = 1; }; if (_local46 < -1){ _local46 = -1; }; if (_local47 > 1){ _local47 = 1; }; if (_local47 < -1){ _local47 = -1; }; _local48 = Math.acos(_local44); _local49 = Math.acos(_local45); _local50 = Math.acos(_local46); _local51 = Math.acos(_local47); _local52 = []; _local52.push({point:_local36, angelDiff:_local48, distToPoint:-(_local40.length)}); _local52.push({point:_local37, angelDiff:_local49, distToPoint:-(_local41.length)}); _local52.push({point:_local38, angelDiff:_local50, distToPoint:-(_local42.length)}); _local52.push({point:_local39, angelDiff:_local51, distToPoint:-(_local43.length)}); _local52.sortOn(["angelDiff", "distToPoint"], Array.NUMERIC); _local53 = false; _local2 = 0; while (_local2 < _local52.length) { if (Math.abs(_local52[_local2].distToPoint) <= _local28){ _local54 = _local52[_local2].point; _local26 = _local54.x; _local27 = _local54.y; _local53 = true; break; }; _local2++; }; if (!_local53){ _local26 = _pointer.x; _local27 = _pointer.y; }; }; while (_line.numChildren > 0) { _line.removeChildAt(0); }; _line.graphics.clear(); _local30.x = _local26; _local30.y = _local27; _local32 = _local29.subtract(_local30); _local33 = Math.atan2(_local32.y, _local32.x); if (currMaterial == Config.MATERIAL_DECK){ if (_local32.length > 0){ _local31 = this.makeDeckSprite(_local29, _local30); _local31.x = (_local29.x + ((_local30.x - _local29.x) / 2)); _local31.y = (_local29.y + ((_local30.y - _local29.y) / 2)); _local31.rotation = ((_local33 * 180) / Math.PI); _line.addChild(_local31); _line.addChild(new LinkElement(false, 1.5, _local30.x, _local30.y)); }; } else { if (currMaterial == Config.MATERIAL_STEEL){ if (_local32.length > 0){ _local31 = this.makeSteelSprite(_local29, _local30); _local31.x = (_local29.x + ((_local30.x - _local29.x) / 2)); _local31.y = (_local29.y + ((_local30.y - _local29.y) / 2)); _local31.rotation = ((_local33 * 180) / Math.PI); _line.addChild(_local31); _line.addChild(new LinkElement(false, 1.5, _local30.x, _local30.y)); }; } else { _line.graphics.lineStyle(5, 0, 1); _line.graphics.moveTo((_points[0].px + _layerEngine.x), (_points[0].py + _layerEngine.y)); _line.graphics.lineTo((_local26 + _layerEngine.x), (_local27 + _layerEngine.y)); _line.graphics.endFill(); _line.addChild(new LinkElement(false, 1.5, _local30.x, _local30.y)); }; }; }; _pointer.x = _local26; _pointer.y = _local27; if (_highlignting){ _groupMaterials.selectOffAll(); if (_dragging){ _local55 = _groupMaterials.getObjectsUnderPoint(_pointer.x, _pointer.y, true, true, 0, true); if (_points.length > 0){ _points[0].select(0xFF); }; if (_local55.length > 0){ _local55[0].select(0xFF); }; } else { _local55 = _groupMaterials.getObjectsUnderPoint(mouseX, mouseY, false); if (_local55.length > 0){ if ((((((_local55[0] is AbstractParticle)) && ((_local55[0] as AbstractParticle).fixed))) && (!((currMaterial == -1))))){ if (((((!(this.blockDelete)) && (!(_soundPanel.hitTestPoint(mouseX, mouseY, true))))) && (!(_hud.hitTestPoint(mouseX, mouseY, true))))){ _groupMaterials.selectSets(_local55[0].getSets(0)); }; _local55[0].select(0xFF); } else { if (((((!(this.blockDelete)) && (!(_soundPanel.hitTestPoint(mouseX, mouseY, true))))) && (!(_hud.hitTestPoint(mouseX, mouseY, true))))){ _groupMaterials.selectSets(_groupMaterials.getSetsUnderPoint(mouseX, mouseY)); }; }; }; }; }; }; }; } private function waitBeforeBuilding(_arg1:Event):void{ if (_counter <= 0){ _undoMode = false; this.removeEventListener(Event.ENTER_FRAME, waitBeforeBuilding); this.addEventListener(Event.ENTER_FRAME, lowCostBuilding, false, 0, true); } else { _counter--; }; } private function onFadeInCompleteHandler(_arg1:Event):void{ this._fader.removeEventListener(Fader.COMPLETE, onFadeInCompleteHandler); } private function addInGameMenuWithFading():void{ if (this._fader != null){ return; }; this._fader = new Fader(); this.addChild(this._fader); this._fader.addEventListener(Fader.COMPLETE, onFadeInCompleteHandler, false, 0, true); this._fader.fadeIn(); this.addInGameMenu(); } private function addInGameMenu():void{ if (this._inGameMenu != null){ return; }; this.pause(); this._inGameMenu = new InGameMenu(this.levelNumber); this._inGameMenu.x = (Config.SCREEN_WIDTH / 2); this._inGameMenu.y = (Config.SCREEN_HEIGHT / 2); this.addChild(this._inGameMenu); this._inGameMenu.addEventListener(InGameMenu.ON_RESUME, onResumeHandler, false, 0, true); this._inGameMenu.addEventListener(InGameMenu.ON_HELP, onHelpHandler, false, 0, true); this._inGameMenu.addEventListener(InGameMenu.ON_MAP, onMapHandler, false, 0, true); this._inGameMenu.addEventListener(InGameMenu.ON_MENU, onMenuHandler, false, 0, true); this._inGameMenu.addEventListener(InGameMenu.ON_QUIT_SUBMIT, onQuitSubmitHandler, false, 0, true); } private function scrollLeftHandler(_arg1:Event):void{ scrollLeft(); } public function zoomIn():void{ var _local1:*; var _local2:Point; if (_popUp){ return; }; if (!_zooming){ return; }; _zooming = false; _local1 = _scale; _scale = (_scale * Config.ZOOM_IN_ITERATION); if (_scale > 1){ _scale = 1; }; _zooming = true; _local2 = new Point(((Config.SCREEN_WIDTH * (_local1 - _scale)) / 2), ((Config.SCREEN_HEIGHT * (_local1 - _scale)) / 2)); this.scrollUpdate(false, _local2); } private function removeInGameMenu():void{ if (this._inGameMenu == null){ return; }; this.pause(); this._inGameMenu.removeEventListener(InGameMenu.ON_RESUME, onResumeHandler); this._inGameMenu.removeEventListener(InGameMenu.ON_HELP, onHelpHandler); this._inGameMenu.removeEventListener(InGameMenu.ON_MAP, onMapHandler); this._inGameMenu.removeEventListener(InGameMenu.ON_QUIT_SUBMIT, onQuitSubmitHandler); this.removeChild(this._inGameMenu); this._inGameMenu.cleanup(); this._inGameMenu = null; } public function initLevel(_arg1:LevelData, _arg2:Boolean=false):void{ var _local3:*; var _local4:Sprite; var _local5:int; var _local6:int; var _local7:String; var _local8:Boolean; var _local9:SharedObject; var _local10:Digit; var _local11:String; var _local12:int; var _local13:String; if (_arg1 == null){ return; }; if (_arg1.borders == null){ return; }; this.levelData = _arg1; this.levelBorders = _arg1.borders; this.levelBudget = (_arg1.budget) ? _arg1.budget : 10000000; this.levelNumber = _arg1.index; this.levelObjects = _arg1.sprites; this.levelProtagonists = _arg1.protagonists; this.levelSurfaces = _arg1.surfaces; this.levelWeather = (((!((_arg1.weather == null))) && (!((_arg1.weather.length == 0))))) ? _arg1.weather : LevelData.WEATHER_DAY; this.levelZones = _arg1.zones; this._layerEngine = new Sprite(); this._layerDynamic = new Sprite(); this._layerStatic = new Sprite(); this._layerFirst = this._layerDynamic; this.addChild(this._layerDynamic); this.addChild(this._layerStatic); if (stage == null){ return; }; stage.frameRate = Config.ENGINE_FRAMERATE; APEngine.init(Config.ENGINE_DT); APEngine.damping = Config.ENGINE_DAMPING; APEngine.constraintCycles = Config.ENGINE_CONSTRAINT_CYCLES; APEngine.constraintCollisionCycles = Config.ENGINE_CONSTRAINT_COLLISION_CYCLES; APEngine.addMasslessForce(new Vector(0, 2)); APEngine.container = this._layerEngine; _group = new Group(false); _groupMaterials = new Group(false); _groupProtagonists = new Group(true); _groupMaterials.addCollidable(_group); _groupProtagonists.addCollidableList([_group, _groupMaterials]); APEngine.addGroup(_group); APEngine.addGroup(_groupMaterials); APEngine.addGroup(_groupProtagonists); this.setUpWeather(_arg1.weather); this.setUpWaters(_arg1.borders); this.setUpClouds(_arg1.weather, _arg1.borders); this.setUpSurfaces(_arg1.surfaces); this.addChildIntoLayer(this._layerEngine, 1); this.setUpZones(_arg1.zones); this.setUpProtagonists(_arg1.protagonists); this.setUpGrass(_arg1.grass); this.setUpSprites(_arg1.sprites); this._bird = new Bird(true); this.addChildIntoLayer(this._bird, 1); this._grid = new Grid(_arg1.borders); this._layerEngine.addChild(this._grid); this._pointer = new Pointer(); this._layerEngine.addChild(this._pointer); this._pointer.visible = false; this._soundPanel = (this.parent as BridgeCraft)._soundPanel; this._line = new Sprite(); this._line.name = "line"; this._layerEngine.addChild(this._line); this._hud = new HUD(); this._layerStatic.addChild(this._hud); stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler, false, 0, true); addEventListener(Config.EVENT_RESET, onResetHandler, false, 0, true); addEventListener(Config.EVENT_STRESS, onStressHandler, false, 0, true); addEventListener(Config.EVENT_HOME, onHomeHandler, false, 0, true); addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); this.islandText = new Sprite(); _local3 = new IslandTextWS(); if (Config.LANGUAGE == Config.LANGUAGE_ENG){ _local3.x = (_local3.x - 20); } else { if (Config.LANGUAGE == Config.LANGUAGE_RUS){ _local3.x = (_local3.x - 40); }; }; this.islandText.addChild(_local3); _local4 = new Sprite(); _local5 = 0; _local6 = this.levelNumber; while (_local6 > 0) { _local10 = new Digit(((_local6 % 10) as int)); _local10.x = (_local5 - (_local10.width / 2)); _local10.y = 0; _local4.addChild(_local10); _local6 = (_local6 / 10); _local5 = (_local5 - (_local10.width + 5)); }; _local4.x = ((_local3.width / 2) + _local4.width); _local4.y = 0; this.islandText.addChild(_local4); this.islandText.x = (Config.SCREEN_WIDTH / 2); this.islandText.y = (Config.SCREEN_HEIGHT / 2); _layerStatic.addChild(this.islandText); this.addEventListener(Event.ENTER_FRAME, islandTextFading, false, 0, true); if (((((levelBorders.width * _scale) <= Config.SCREEN_WIDTH)) || (((levelBorders.height * _scale) <= Config.SCREEN_HEIGHT)))){ _hud.zoomOutButton.active = false; } else { _hud.zoomOutButton.active = true; }; if (_scale == 1){ _hud.zoomInButton.active = false; } else { _hud.zoomInButton.active = true; }; if (((_hud.zoomInButton.active) || (_hud.zoomOutButton.active))){ this._zooming = true; } else { _zooming = false; _hud.zoomInButton.visible = false; _hud.zoomOutButton.visible = false; }; if (_zooming){ this.addEventListener(Config.EVENT_ZOOM_IN, zoomInHandler, false, 0, true); this.addEventListener(Config.EVENT_ZOOM_OUT, zoomOutHandler, false, 0, true); }; this.currMaterial = Config.MATERIAL_DECK; this.currMode = Config.MODE_BUILDING; this.budget = levelBudget; this.indexesCorrection(); if ((((levelBorders.width == Config.SCREEN_WIDTH)) && ((levelBorders.height == Config.SCREEN_HEIGHT)))){ scrolling = false; } else { scrolling = true; }; this.loadLevelSolution(); GAManager.trackPage((("/level-" + this.levelNumber.toString()) + "-loaded")); if (_arg2){ return; }; _local7 = this.levelProtagonists[0].type; _local8 = false; _local9 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local9.size == 0){ _local8 = true; }; if (((((!((_local9.data.introducedHeroes == null))) && ((_local9.data.introducedHeroes is Array)))) && ((_local9.data.introducedHeroes.indexOf(_local7) == -1)))){ _local8 = true; }; if (_local8){ _local11 = ""; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ if (_local7 == "Cvetok"){ _local11 = "Ohani"; }; if (_local7 == "Glazan"){ _local11 = "Crabi"; }; if (_local7 == "Larin"){ _local11 = "Pokki"; }; if (_local7 == "Prezer"){ _local11 = "Greeni"; }; if (_local7 == "Sinyak"){ _local11 = "Simbi"; }; } else { if (_local7 == "Cvetok"){ _local11 = "Охани"; }; if (_local7 == "Glazan"){ _local11 = "Краби"; }; if (_local7 == "Larin"){ _local11 = "Покки"; }; if (_local7 == "Prezer"){ _local11 = "Грини"; }; if (_local7 == "Sinyak"){ _local11 = "Симби"; }; }; this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.scaleX = 0.8; this.phraseBaloon.scaleY = 0.8; this.phraseBaloon.x = _protagonists[0].x; this.phraseBaloon.y = _protagonists[0].y; this.phraseBaloon.type = TalkBaloon.TYPE_BLANK; this.phraseBaloon.fontSize = 18; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = (((("Hello, " + this.playerName) + "! I'm ") + _local11) + "!"); } else { this.phraseBaloon.text = (((("Привет, " + this.playerName) + "! Я ") + _local11) + "!"); }; this.addChildIntoLayer(this.phraseBaloon, 1, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SHOWED, onPhraseBaloonShowed, false, 0, true); _local9.data.introducedHeroes.push(_local7); _local9.flush(); return; }; if (this.levelNumber == 50){ this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.scaleX = 0.8; this.phraseBaloon.scaleY = 0.8; this.phraseBaloon.x = _protagonists[0].x; this.phraseBaloon.y = _protagonists[0].y; this.phraseBaloon.type = TalkBaloon.TYPE_BLANK; this.phraseBaloon.fontSize = 18; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "I'll be able to turn around near that wall ahead, I just need to get there first."; } else { this.phraseBaloon.text = "Я буду следовать направлениям на знаках."; }; this.addChildIntoLayer(this.phraseBaloon, 1, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SHOWED, onPhraseBaloonShowed, false, 0, true); } else { if (this.levelNumber == 44){ this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.scaleX = 0.8; this.phraseBaloon.scaleY = 0.8; this.phraseBaloon.x = _protagonists[0].x; this.phraseBaloon.y = _protagonists[0].y; this.phraseBaloon.type = TalkBaloon.TYPE_BLANK; this.phraseBaloon.fontSize = 18; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = "Hmm, this a bit complicated… Oh I know, you could use decks to lean on that tiny island."; } else { this.phraseBaloon.text = "Хммм... Выглядит сложно. Но я знаю решение: деревянные балки могут опираться на тот маленький островок."; }; this.addChildIntoLayer(this.phraseBaloon, 1, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SHOWED, onPhraseBaloonShowed, false, 0, true); } else { if (Math.random() >= 0.5){ this.phraseBaloon = new TalkBaloon(); this.phraseBaloon.scaleX = 0.8; this.phraseBaloon.scaleY = 0.8; this.phraseBaloon.x = _protagonists[0].x; this.phraseBaloon.y = _protagonists[0].y; this.phraseBaloon.type = TalkBaloon.TYPE_BLANK; _local12 = Math.floor(((Math.random() * PHRASES.length) + 1)); _local13 = ""; if (_local12 == PHRASES.length){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ if (this.levelWeather == LevelData.WEATHER_DAY){ _local13 = "Ahh, what beautiful weather."; }; if (this.levelWeather == LevelData.WEATHER_NIGHT){ _local13 = "I love quiet nights."; }; if (this.levelWeather == LevelData.WEATHER_CLOUDY){ _local13 = "Raining again. Ugh."; }; } else { if (this.levelWeather == LevelData.WEATHER_DAY){ _local13 = "Ах, что за прекрасная погода сегодня."; }; if (this.levelWeather == LevelData.WEATHER_NIGHT){ _local13 = "Мне так нравятся тихие ночи."; }; if (this.levelWeather == LevelData.WEATHER_CLOUDY){ _local13 = "И опять дождь. Ррр."; }; }; } else { _local13 = PHRASES[_local12]; }; this.phraseBaloon.fontSize = 18; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.phraseBaloon.text = _local13.replace("Player", this.playerName); } else { this.phraseBaloon.text = _local13.replace("Игрок", this.playerName); }; this.addChildIntoLayer(this.phraseBaloon, 1, true); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_SHOWED, onPhraseBaloonShowed, false, 0, true); }; }; }; } private function zoomOutHandler(_arg1:Event):void{ zoomOut(); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (this.paused){ return; }; if (this._fader != null){ return; }; if ((((((_arg1.keyCode == 49)) && (!(this.tutorialMode)))) && (!(dragging)))){ dispatchEvent(new Event(Config.EVENT_DECK)); }; if ((((((_arg1.keyCode == 50)) && (!(this.tutorialMode)))) && (!(dragging)))){ dispatchEvent(new Event(Config.EVENT_STEEL)); }; if ((((((_arg1.keyCode == 51)) && (!(this.tutorialMode)))) && (!(dragging)))){ dispatchEvent(new Event(Config.EVENT_ROPE)); }; if ((((((_arg1.keyCode == Keyboard.SPACE)) && (!(this.tutorialMode)))) && (!(dragging)))){ if (currMode == Config.MODE_EMULATION){ _hud.dispatchEvent(new Event(Config.EVENT_EDIT, true)); } else { _hud.dispatchEvent(new Event(Config.EVENT_START, true)); }; }; if ((((_arg1.keyCode == Keyboard.ESCAPE)) && (!(dragging)))){ this.addInGameMenuWithFading(); }; if ((((_arg1.keyCode == 90)) && (!(dragging)))){ if (_arg1.ctrlKey){ undo(); }; }; } public function scrollLeft(_arg1:Number=0):void{ if (!_scrolling){ return; }; if (_arg1 > 0){ _scrollX = (_scrollX + _arg1); } else { _scrollX = (_scrollX + Config.SCROLLING_ITERATION); }; if ((_scrollX + (levelBorders.leftBorderX * _scale)) >= 0){ _scrollX = (-(levelBorders.leftBorderX) * _scale); }; } public function set winBudget(_arg1:Number):void{ if (_arg1 > _winBudget){ _winBudget = _arg1; }; } private function keyUpHandler(_arg1:KeyboardEvent):void{ } public function get blockDelete():Boolean{ return (_blockDelete); } private function removeInGameMenuWithFading():void{ if (_fader == null){ return; }; if (this._inGameMenu != null){ this.removeInGameMenu(); this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; this._fader.addEventListener(Fader.COMPLETE, onFadeOutCompleteHandler, false, 0, true); this._fader.fadeOut(); } private function indexesCorrection():void{ var _local1:int; var _local2:int; _local1 = (_layerEngine.numChildren - 1); while (_local1 >= 0) { if (_layerEngine.getChildAt(_local1).name == "line"){ _local2 = (_local1 + 1); while (_local2 < _layerEngine.numChildren) { _layerEngine.swapChildrenAt((_local2 - 1), _local2); _local2++; }; }; _local1--; }; _local1 = (_layerEngine.numChildren - 1); while (_local1 >= 0) { if (_layerEngine.getChildAt(_local1).name == "link"){ _local2 = (_local1 + 1); while ((((_local2 < _layerEngine.numChildren)) && (!((_layerEngine.getChildAt(_local2).name == "link"))))) { _layerEngine.swapChildrenAt((_local2 - 1), _local2); _local2++; }; }; _local1--; }; } private function onPhraseBaloonShowed(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SHOWED, onPhraseBaloonShowed); this.phraseBaloonDelayCounter = 0; this.phraseBaloon.addEventListener(Event.ENTER_FRAME, phraseBaloonDelay, false, 0, true); } public function addPopUp(_arg1:int):void{ var _local2:Number; var _local3:Number; var _local4:int; var _local5:int; var _local6:int; var _local7:Boolean; var _local8:SharedObject; var _local9:EditButton; if (_popUp == null){ this.addEventListener(Config.EVENT_POPUPBUTTON_NEXT, popupButtonNextHandler, false, 0, true); this.addEventListener(Config.EVENT_POPUPBUTTON_MAP, popupButtonMapHandler, false, 0, true); this.addEventListener(Config.EVENT_POPUPBUTTON_RETRY, popupButtonRetryHandler, false, 0, true); if (this._fader == null){ this._fader = new Fader(); this._fader.addEventListener(Fader.COMPLETE, onFadeInCompleteHandler, false, 0, true); this.addChild(this._fader); this._fader.fadeIn(); }; if (_arg1 == Config.POPUP_WIN){ _local2 = Math.round(this.budget); _local3 = 0; if (this.levelDifficulty == Config.DIFFICULTY_EASY){ if (this.levelNumber <= 11){ _local3 = 100; } else { if ((((this.levelNumber >= 12)) && ((this.levelNumber <= 17)))){ _local3 = 200; } else { if ((((this.levelNumber >= 18)) && ((this.levelNumber <= 27)))){ _local3 = 3000; } else { if ((((this.levelNumber >= 28)) && ((this.levelNumber <= 33)))){ _local3 = 400; } else { if ((((this.levelNumber >= 34)) && ((this.levelNumber <= 43)))){ _local3 = 500; } else { if ((((this.levelNumber >= 44)) && ((this.levelNumber <= 49)))){ _local3 = 600; } else { if ((((this.levelNumber >= 50)) && ((this.levelNumber <= 57)))){ _local3 = 700; } else { if ((((this.levelNumber >= 58)) && ((this.levelNumber <= 63)))){ _local3 = 800; } else { if ((((this.levelNumber >= 64)) && ((this.levelNumber <= 66)))){ _local3 = 900; } else { if (this.levelNumber >= 67){ _local3 = 1000; }; }; }; }; }; }; }; }; }; }; }; if (this.levelDifficulty == Config.DIFFICULTY_NORMAL){ if (this.levelNumber <= 11){ _local3 = 1000; } else { if ((((this.levelNumber >= 12)) && ((this.levelNumber <= 17)))){ _local3 = 2000; } else { if ((((this.levelNumber >= 18)) && ((this.levelNumber <= 27)))){ _local3 = 3000; } else { if ((((this.levelNumber >= 28)) && ((this.levelNumber <= 33)))){ _local3 = 4000; } else { if ((((this.levelNumber >= 34)) && ((this.levelNumber <= 43)))){ _local3 = 5000; } else { if ((((this.levelNumber >= 44)) && ((this.levelNumber <= 49)))){ _local3 = 6000; } else { if ((((this.levelNumber >= 50)) && ((this.levelNumber <= 57)))){ _local3 = 7000; } else { if ((((this.levelNumber >= 58)) && ((this.levelNumber <= 63)))){ _local3 = 8000; } else { if ((((this.levelNumber >= 64)) && ((this.levelNumber <= 66)))){ _local3 = 9000; } else { if (this.levelNumber >= 67){ _local3 = 10000; }; }; }; }; }; }; }; }; }; }; }; if (this.levelDifficulty == Config.DIFFICULTY_HARD){ if (this.levelNumber <= 11){ _local3 = 1000; } else { if ((((this.levelNumber >= 12)) && ((this.levelNumber <= 17)))){ _local3 = 2000; } else { if ((((this.levelNumber >= 18)) && ((this.levelNumber <= 27)))){ _local3 = 3000; } else { if ((((this.levelNumber >= 28)) && ((this.levelNumber <= 33)))){ _local3 = 4000; } else { if ((((this.levelNumber >= 34)) && ((this.levelNumber <= 43)))){ _local3 = 5000; } else { if ((((this.levelNumber >= 44)) && ((this.levelNumber <= 49)))){ _local3 = 6000; } else { if ((((this.levelNumber >= 50)) && ((this.levelNumber <= 57)))){ _local3 = 7000; } else { if ((((this.levelNumber >= 58)) && ((this.levelNumber <= 63)))){ _local3 = 8000; } else { if ((((this.levelNumber >= 64)) && ((this.levelNumber <= 66)))){ _local3 = 9000; } else { if (this.levelNumber >= 67){ _local3 = 10000; }; }; }; }; }; }; }; }; }; }; }; _local2 = (_local2 + _local3); this.winBudget = _local2; _local4 = BigPopUpWin.TYPE_RETRY_MAP_NEXT; _local5 = 0; if (this.levelDifficulty == Config.DIFFICULTY_EASY){ _local6 = 0; while (_local6 < Config.easyLevels.length) { if (((!((_local6 == (this.levelNumber - 1)))) && ((Config.easyLevels[_local6] > 0)))){ _local5++; }; _local6++; }; }; if (this.levelDifficulty == Config.DIFFICULTY_NORMAL){ _local6 = 0; while (_local6 < Config.normalLevels.length) { if (((!((_local6 == (this.levelNumber - 1)))) && ((Config.normalLevels[_local6] > 0)))){ _local5++; }; _local6++; }; }; if (_local5 == (Config.LEVELS_TOTAL - 1)){ _local7 = true; _local8 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local8.size > 0){ if (_local8.data.win != null){ _local7 = _local8.data.win; }; }; if (_local7){ _local4 = BigPopUpWin.TYPE_NEXT; } else { _local4 = BigPopUpWin.TYPE_RETRY_MAP; }; }; _popUp = new BigPopUpWin(_local2, this.winBudget, _local3, _local4); _popUp.x = (Config.SCREEN_WIDTH / 2); _popUp.y = (Config.SCREEN_HEIGHT / 2); addChild(_popUp); } else { if (_arg1 == Config.POPUP_LOSE){ _arg1 = BigPopUpLose.TYPE_YES_NO; if (this.loseTimes > 5){ _arg1 = BigPopUpLose.TYPE_YES_NO_SKIP; }; _popUp = new BigPopUpLose(_arg1); _popUp.x = (Config.SCREEN_WIDTH / 2); _popUp.y = (Config.SCREEN_HEIGHT / 2); _local9 = new EditButton(); _local9.x = ((-(Config.SCREEN_WIDTH) / 2) + 46.6); _local9.y = ((-(Config.SCREEN_HEIGHT) / 2) + 36); _local9.addEventListener(MouseEvent.CLICK, onEditButton, false, 0, true); _local9.addEventListener(MouseEvent.MOUSE_OVER, overEditButton, false, 0, true); _local9.addEventListener(MouseEvent.MOUSE_OUT, outEditButton, false, 0, true); _popUp.addChild(_local9); addChild(_popUp); }; }; }; } private function mouseWheelHandler(_arg1:MouseEvent):void{ if (_arg1.delta > 0){ zoomIn(); } else { zoomOut(); }; } public function get PHRASES():Array{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ _PHRASES = ["Oh... still so far from home.", "Thanks for your help, Player", "This one sure is tough.", "You’ve done well so far, but there are still more islands to cross!", "I really miss my friends.", "I think I can see home from here, we‘re getting closer!", "Hey everybody, I'm on my way and I’m bringing help!", "You seem tired, do you need a rest?", "I feel that together we can do this.", "One more leap!", "Here we go, Player!", "Oh, we’re still not there yet...", "We're heading in the right direction, Player!", "We still have more work to do.", "The water sure is cold these days.", "There is no such thing as \"Do not try\". Do, or do not. Those are your options.", "There must be a solution... You’ll get it, I'm sure!", "Do your best, Player.", "I wonder how my friends are.", "Back to work...", "I'm sure that there was a bridge here before.", "This bridge was broken too, let's rebuild it!", "I wish this was just a dream.", "I sure hope this ends soon.", "I wish this never happened.", "That storm came out of nowhere.", "Let's rebuild this bridge too!"]; } else { _PHRASES = ["Ох, я все еще так далеко от дома...", "Спасибо за помощь, Игрок.", "В этот раз все не так просто, как кажется.", "Все это время вы продвигались очень хорошо, но впереди нас ждут еще большие испытания!", "Я так скучаю по моим друзьям.", "Мне кажется, я уже вижу мой дом! Мы подбираемся все ближе и ближе!", "Друзья, мы идем к вам на помощь!", "Вы выглядите усталым, не хотите отдохнуть?", "Вместе мы справимся!", "Еще чуть-чуть!", "А вот и мы!", "Ох, мы все еще не на месте...", "Мы двигаемся в правильном направлении, Игрок!", "У нас еще столько работы...", "А вода сейчас холодная, бррр.", "Забудьте про слово «в другой раз», просто берите и делайте!", "Должно же быть здесь хоть какое-то решение. Я верю в вас, вы справитесь!", "Игрок, покажите, на что вы способны!", "Интересно как там мои друзья.", "Возвращаемся к работе...", "Я помню это место, здесь стоял красивый и крепкий мост.", "Волна разрушила и этот мост тоже. Давайте построим новый!", "Так хочется верить, что все, что с нами случилось, - всего лишь страшный сон.", "Я надеюсь, это скоро закончится.", "Как бы хотелось, чтобы этого никогда не случалось.", "Эта волна появилась словно ниоткуда!", "Давайте перестроим и этот мост тоже!"]; }; return (_PHRASES); } private function deleteSets(_arg1:Array):void{ var _local2:Number; var _local3:Number; var _local4:Boolean; var _local5:Array; var _local6:Number; var _local7:Array; var _local8:Number; var _local9:Number; _groupMaterials.removeSetById(_arg1); _local2 = 0; while (_local2 < this.ropes.length) { if (_arg1.indexOf(this.ropes[_local2].setId) == -1){ _local2++; } else { this.ropes.splice(_local2, 1); }; }; while (_local2 < _sets.length) { if (_arg1.indexOf(_sets[_local2].x) != -1){ _sets.splice(_local2, 1); } else { _local2++; }; }; _local2 = 0; while (_local2 < _groupMaterials.particles.length) { if (!_groupMaterials.particles[_local2].collidable){ } else { if (_groupMaterials.particles[_local2].fixed){ _groupMaterials.particles[_local2].collidable = true; } else { _local4 = false; _local5 = _groupMaterials.particles[_local2].getSets(); _local6 = 0; while (_local6 < _sets.length) { if (_local5.indexOf(_sets[_local6].x) != -1){ if (_sets[_local6].y == Config.MATERIAL_DECK){ _local4 = true; break; }; }; _local6++; }; _groupMaterials.particles[_local2].collidable = _local4; }; }; _local2++; }; _local3 = 0; _local2 = 0; while (_local2 < _groupMaterials.constraints.length) { _local7 = (_groupMaterials.constraints[_local2] as SpringConstraint).getSets(); _local8 = 0; if (_local7.length != 0){ _local9 = _local7[0]; _local8 = getMaterialBySet(_local9); }; _local3 = (_local3 + calcCost((_groupMaterials.constraints[_local2] as SpringConstraint).particleA, (_groupMaterials.constraints[_local2] as SpringConstraint).particleB, _local8)); _local2++; }; budget = (levelBudget - _local3); } private function undo():void{ var _local1:Number; var _local2:Point; var _local3:Point; var _local4:Number; var _local5:Array; if (currMode == Config.MODE_EMULATION){ return; }; if (_actions.length == 0){ return; }; _undoMode = false; _local1 = 0; while (_local1 < _actions.length) { if ((_actions[_local1] as Action).string == Config.ACTION_ADD){ deleteSets((_actions[_local1] as Action).params); } else { if ((_actions[_local1] as Action).string == Config.ACTION_REMOVE){ _local2 = (_actions[_local1] as Action).params[0]; _local3 = (_actions[_local1] as Action).params[1]; _local4 = (_actions[_local1] as Action).params[2]; if (_points.length > 0){ _points.splice(0); }; _local5 = _groupMaterials.getObjectsUnderPoint(_local2.x, _local2.y, true, true, 0, true); if (_local5.length > 0){ _points.push(_local5[0]); } else { _points.push(_local2); }; _local5 = _groupMaterials.getObjectsUnderPoint(_local3.x, _local3.y, true, true, 0, true); if (_local5.length > 0){ _points.push(_local5[0]); } else { _points.push(_local3); }; connectPoints(_local4); }; }; _local1++; }; _actions.splice(0); _hud.undoButton.hide(); _undoMode = true; } private function setUpSprites(_arg1:Array):void{ var _local2:int; var _local3:SpriteInfo; var _local4:String; var _local5:Class; var _local6:*; if (this._layerDynamic == null){ return; }; if (_arg1 == null){ return; }; _local2 = 0; while (_local2 < _arg1.length) { if ((_arg1[_local2] is SpriteInfo)){ _local3 = _arg1[_local2]; _local4 = ("sprite_" + _local3.type.toString()); _local5 = (getDefinitionByName(_local4) as Class); _local6 = new (_local5); _local6.x = _local3.x; _local6.y = _local3.y; _local6.transform.matrix = _local3.matrix; _local6.cacheAsBitmap = true; this.addChildIntoLayer(_local6, ((_local3.layer)==1) ? 2 : _local3.layer); }; _local2++; }; } private function scrollRightHandler(_arg1:Event):void{ scrollRight(); } public function scrollDown(_arg1:Number=0):void{ if (!_scrolling){ return; }; if (_arg1 > 0){ _scrollY = (_scrollY - _arg1); } else { _scrollY = (_scrollY - Config.SCROLLING_ITERATION); }; if ((_scrollY + (levelBorders.bottomBorderY * _scale)) <= Config.SCREEN_HEIGHT){ _scrollY = (Config.SCREEN_HEIGHT - (levelBorders.bottomBorderY * _scale)); }; } private function mouseUpHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Array; var _local4:*; var _local5:Point; if (this._fader){ return; }; if (_scrollThroughDragging){ _scrollThroughDragging = false; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; if (_currMode == Config.MODE_EMULATION){ return; }; if (!enableBuilding){ return; }; if (_currMode == Config.MODE_BUILDING){ if (_dragging){ _local2 = new Point((_points[(_points.length - 1)] as AbstractParticle).px, (_points[(_points.length - 1)] as AbstractParticle).py); _local3 = _groupMaterials.getObjectsUnderPoint(_pointer.x, _pointer.y, true, true, 0, true); if ((((_pointer.x == _local2.x)) && ((_pointer.y == _local2.y)))){ _points.splice(0); _local5 = new Point(_arg1.stageX, _arg1.stageY); deleteSetUnderPoint(_local5.x, _local5.y); } else { if (_local3.length > 0){ _points.push(_local3[0]); } else { _local4 = new Point(_pointer.x, _pointer.y); _points.push(_local4); }; connectPoints(); }; dragging = false; _line.visible = false; } else { if (((!(_soundPanel.hitTestPoint(mouseX, mouseY, true))) && (!(_hud.hitTestPoint(mouseX, mouseY, true))))){ deleteSetUnderPoint(_arg1.stageX, _arg1.stageY); }; }; }; } public function get playerName():String{ return (_playerName); } private function setUpGrass(_arg1:Array=null):void{ var _local2:Array; var _local3:int; var _local4:Array; var _local5:Point; var _local6:Point; var _local7:int; var _local8:*; var _local9:Boolean; var _local10:int; var _local11:DisplayObject; var _local12:Point; var _local13:Object; var _local14:Number; var _local15:Sprite; var _local16:Class; var _local17:Number; var _local18:String; var _local19:*; if (this._layerEngine == null){ return; }; if (_arg1 != null){ _local2 = _arg1; } else { _local2 = new Array(); }; _local3 = 0; while (_local3 < this.levelSurfaces.length) { if (this.levelSurfaces[_local3].length > 1){ _local4 = this.levelSurfaces[_local3]; _local7 = 0; for (;_local7 < _local4.length;_local7++) { if (_local7 == 0){ _local6 = new Point(_local4[_local7].x, _local4[_local7].y); continue; } else { _local5 = _local6; _local6 = new Point(_local4[_local7].x, _local4[_local7].y); }; if (_local5.y == _local6.y){ _local8 = (_local5.x + ((_local6.x - _local5.x) / 2)); _local9 = false; _local10 = 0; while (_local10 < _layerEngine.numChildren) { _local11 = _layerEngine.getChildAt(_local10); if (_local11.name == "texture"){ _local12 = _layerEngine.localToGlobal(new Point(_local8, (_local5.y - 20))); if (_local11.hitTestPoint(_local12.x, _local12.y)){ _local9 = true; break; }; }; _local10++; }; if (!_local9){ _local2.push({p1:_local5, p2:_local6}); }; }; }; }; _local3++; }; _local3 = 0; while (_local3 < _local2.length) { _local13 = _local2[_local3]; _local14 = Math.sqrt((((_local13.p1.x - _local13.p2.x) * (_local13.p1.x - _local13.p2.x)) + ((_local13.p1.y - _local13.p2.y) * (_local13.p1.y - _local13.p2.y)))); _local15 = new Sprite(); _local17 = 0; while (_local17 <= _local14) { _local18 = ("vis.Grass0" + Math.floor(((Math.random() * 8) + 1)).toString()); _local16 = (getDefinitionByName(_local18) as Class); _local19 = new (_local16); _local19.scaleX = 1.3; _local19.scaleY = 1.3; if (_local17 == 0){ _local17 = (_local17 + (_local19.width / 2)); }; _local19.x = _local17; _local19.y = -5; _local19.cacheAsBitmap = true; _local15.addChild(_local19); _local17 = (_local17 + (_local19.width / 2)); }; _local15.rotation = ((Math.asin(((_local13.p2.y - _local13.p1.y) / _local14)) * 180) / Math.PI); _local15.x = ((_local13.p1.x)<=_local13.p2.x) ? _local13.p1.x : _local13.p2.x; _local15.y = _local13.p1.y; this._layerEngine.addChild(_local15); _local3++; }; } private function onEditButton(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_EDIT, true)); } private function startBuilding():void{ var _local1:int; var _local2:int; this.loseTimes++; if (hasEventListener(Config.EVENT_EDIT)){ removeEventListener(Config.EVENT_EDIT, onEditHandler); }; addEventListener(Config.EVENT_START, onStartHandler, false, 0, true); addEventListener(Config.EVENT_DECK, onDeckHandler, false, 0, true); addEventListener(Config.EVENT_STEEL, onSteelHandler, false, 0, true); addEventListener(Config.EVENT_ROPE, onRopeHandler, false, 0, true); addEventListener(Config.EVENT_UNDO, onUndoHandler, false, 0, true); _local1 = 0; while (_local1 < _layerDynamic.numChildren) { if (_local1 != (_layerDynamic.numChildren - 1)){ _layerDynamic.getChildAt(_local1).transform.colorTransform = new ColorTransform(0.57, 0.57, 0.57, 1, 80, 95, 101, 0); }; _local1++; }; _local2 = 0; while (_local2 < this.sprites.length) { trace(this.sprites[_local1]); _local2++; }; _grid.visible = true; _groupMaterials.restoreDeletedParticles(); _groupMaterials.restoreDeletedConstraints(); _groupMaterials.resetCoordinates(); APEngine.paint(); protagonistsReset(); if (_currMaterial == 0){ currMaterial = Config.MATERIAL_DECK; }; removePopUp(); scrollReset(); highlignting = true; _hud.mode = Config.MODE_BUILDING; if ((((_actions == null)) || ((_actions.length == 0)))){ _hud.undoButton.hide(); } else { _hud.undoButton.reset(); }; _local1 = 0; while (_local1 < _protagonists.length) { _protagonists[_local1].particle.collisionDetected = false; _local1++; }; } private function waitAfterBuilding(_arg1:Event):void{ if (_counter <= 0){ this.removeEventListener(Event.ENTER_FRAME, waitAfterBuilding); this.removeChild(this.loaderScreen); this.loaderScreen = null; this.dispatchEvent(new Event(Config.EVENT_LEVEL_LOADED, true)); _hud.undoButton.hide(); _undoMode = true; } else { _counter--; }; } public function get paused():Boolean{ return (this._paused); } public function set blockDelete(_arg1:Boolean):void{ _blockDelete = _arg1; } protected function reset():void{ var _local1:Array; var _local2:int; var _local3:Array; var _local4:int; scrollReset(); if (_currMode == Config.MODE_EMULATION){ removePopUp(); _groupMaterials.restoreDeletedParticles(); _groupMaterials.restoreDeletedConstraints(); _groupMaterials.resetConstraintOverloading(); _groupMaterials.resetCoordinates(); protagonistsReset(); protagonistsRun(); } else { if (_currMode == Config.MODE_BUILDING){ _local1 = []; _local2 = 0; while (_local2 < _groupMaterials.constraints.length) { if ((_groupMaterials.constraints[_local2] as SpringConstraint).numSets() > 0){ _local3 = (_groupMaterials.constraints[_local2] as SpringConstraint).getSets(0); _local4 = 0; while (_local4 < _local3.length) { if (_local1.indexOf(_local3[_local4]) == -1){ _local1.push(_local3[_local4]); }; _local4++; }; }; _local2++; }; this.deleteSetUnderPoint(0, 0, _local1); }; }; } protected function get enableBuilding():Boolean{ return (_enableBuilding); } private function onHelpHandler(_arg1:Event):void{ } protected function makeDeckSprite(_arg1, _arg2):Sprite{ var _local3:Point; var _local4:Point; var _local5:Number; var _local6:Number; var _local7:Sprite; var _local8:Sprite; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:DeckLastSegment; var _local14:DeckLastSegment; var _local15:DeckSegment; var _local16:DeckPole; if ((((_arg1 == null)) || ((_arg2 == null)))){ return (null); }; if ((_arg1 is AbstractParticle)){ _local3 = new Point(); _local3.x = _arg1.px; _local3.y = _arg1.py; } else { if ((_arg1 is Point)){ _local3 = _arg1; } else { return (null); }; }; if ((_arg2 is AbstractParticle)){ _local4 = new Point(); _local4.x = _arg2.px; _local4.y = _arg2.py; } else { if ((_arg2 is Point)){ _local4 = _arg2; } else { return (null); }; }; _local5 = Math.sqrt((((_local4.x - _local3.x) * (_local4.x - _local3.x)) + ((_local4.y - _local3.y) * (_local4.y - _local3.y)))); _local6 = (-(_local5) / 2); _local7 = new Sprite(); _local8 = new Sprite(); _local9 = (Math.floor((_local5 / Config.GRID_WIDTH)) - 1); _local10 = (_local9 + 1); _local11 = 0; _local12 = (_local5 / _local10); while (_local10 > 0) { _local15 = new DeckSegment(); _local15.scaleX = (_local12 / _local15.width); _local15.x = _local11; _local8.addChild(_local15); _local11 = (_local11 + _local12); _local10--; }; _local12 = (_local5 / (_local9 + 1)); _local11 = _local12; while (_local9 > 0) { _local16 = new DeckPole(); _local16.x = _local11; _local8.addChild(_local16); _local11 = (_local11 + _local12); _local9--; }; _local7.addChild(_local8); _local8.x = _local6; _local8.scaleY = -1; _local13 = new DeckLastSegment(true); _local7.addChild(_local13); _local13.x = _local6; _local13.scaleY = -1; _local14 = new DeckLastSegment(); _local7.addChild(_local14); _local14.x = (_local5 + _local6); _local14.scaleY = -1; if (_local3.x < _local4.x){ _local7.scaleY = 1.6; } else { if (_local3.x > _local4.x){ _local7.scaleY = -1.6; } else { if (_local3.y > _local4.y){ _local7.scaleY = 1.6; } else { _local7.scaleY = 1.6; }; }; }; _local7.name = "deck"; _local7.cacheAsBitmap = true; return (_local7); } public function getLevelSolution():Object{ var _local1:Boolean; var _local2:Object; var _local3:Array; var _local4:Array; var _local5:*; var _local6:int; var _local7:Array; var _local8:Array; var _local9:CircleParticle; var _local10:SpringConstraint; var _local11:Number; var _local12:Object; _local1 = _physicsOn; _physicsOn = false; _groupMaterials.restoreDeletedParticles(); _groupMaterials.restoreDeletedConstraints(); _groupMaterials.resetCoordinates(); _local2 = {}; _local3 = []; _local4 = new Array(_groupMaterials.particles.length); _local5 = 0; _local6 = 0; while (_local6 < _groupMaterials.particles.length) { _local9 = _groupMaterials.particles[_local6]; if (_local9.subParticle){ } else { _local3.push({px:Math.floor(_local9.px), py:Math.floor(_local9.py)}); var _temp1 = _local5; _local5 = (_local5 + 1); _local4[_local6] = _temp1; }; _local6++; }; _local7 = []; _local8 = []; _local6 = 0; for (;_local6 < _groupMaterials.constraints.length;_local6++) { _local10 = _groupMaterials.constraints[_local6]; if (_local10.material == Config.MATERIAL_ROPE){ _local11 = _local10.getSets()[0]; if (_local7.indexOf(_local11) >= 0){ continue; }; for each (_local12 in this.ropes) { if (_local12.setId == _local11){ _local8.push({material:_local10.material, particleA:_local4[_groupMaterials.particles.indexOf(_local12.p1)], particleB:_local4[_groupMaterials.particles.indexOf(_local12.p2)]}); break; }; }; _local7.push(_local11); } else { _local8.push({material:_local10.material, particleA:_local4[_groupMaterials.particles.indexOf(_local10.particleA)], particleB:_local4[_groupMaterials.particles.indexOf(_local10.particleB)]}); }; }; _local2["particles"] = _local3; _local2["constraints"] = _local8; _physicsOn = _local1; return (_local2); } public function get dragging():Boolean{ return (_dragging); } protected function get currMaterial():Number{ return (_currMaterial); } private function onMapHandler(_arg1:Event):void{ this.dispatchEvent(new Event(Config.EVENT_LEVEL_CLOSE, true)); } private function onMenuHandler(_arg1:Event):void{ this.dispatchEvent(new Event(Config.EVENT_LEVEL_CLOSE_TO_MENU, true)); } private function popupButtonRetryHandler(_arg1:Event):void{ removePopUp(); currMode = Config.MODE_BUILDING; } protected function makeSteelSprite(_arg1, _arg2):Sprite{ var _local3:Point; var _local4:Point; var _local5:Number; var _local6:Number; var _local7:Sprite; var _local8:Sprite; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:SteelLastSegment; var _local13:SteelLastSegment; var _local14:SteelSegment; if ((((_arg1 == null)) || ((_arg2 == null)))){ return (null); }; if ((_arg1 is AbstractParticle)){ _local3 = new Point(); _local3.x = _arg1.px; _local3.y = _arg1.py; } else { if ((_arg1 is Point)){ _local3 = _arg1; } else { return (null); }; }; if ((_arg2 is AbstractParticle)){ _local4 = new Point(); _local4.x = _arg2.px; _local4.y = _arg2.py; } else { if ((_arg2 is Point)){ _local4 = _arg2; } else { return (null); }; }; _local5 = Math.sqrt((((_local4.x - _local3.x) * (_local4.x - _local3.x)) + ((_local4.y - _local3.y) * (_local4.y - _local3.y)))); _local6 = (-(_local5) / 2); _local7 = new Sprite(); _local8 = new Sprite(); _local9 = Math.floor((_local5 / Config.GRID_WIDTH)); _local10 = 0; _local11 = (_local5 / _local9); while (_local9 > 0) { _local14 = new SteelSegment(); _local14.scaleX = (_local11 / _local14.width); _local14.x = _local10; _local8.addChild(_local14); _local10 = (_local10 + _local11); _local9--; }; _local7.addChild(_local8); _local8.x = (0 + _local6); _local8.scaleY = -1; _local12 = new SteelLastSegment(true); _local7.addChild(_local12); _local12.x = (0 + _local6); _local12.scaleY = -1; _local13 = new SteelLastSegment(); _local7.addChild(_local13); _local13.x = (_local5 + _local6); _local13.scaleY = -1; _local7.name = "steel"; _local7.cacheAsBitmap = true; return (_local7); } private function setUpZones(_arg1:Array):void{ var _local2:int; var _local3:LevelZone; var _local4:Flag; var _local5:RoadSign; if (_arg1 == null){ return; }; if (this._layerFirst == null){ return; }; _local2 = 0; while (_local2 < _arg1.length) { if (_arg1[_local2].type == LevelZone.FINISH){ this.levelFinishZone = this.levelZones[_local2]; }; _local2++; }; _local2 = 0; while (_local2 < _arg1.length) { _local3 = (_arg1[_local2] as LevelZone); if (_local3.type == LevelZone.FINISH){ _local4 = new Flag(); _local4.x = (_local3.x + (_local3.width / 2)); _local4.y = _local3.bottom; _local4.scaleX = 0.4; _local4.scaleY = 0.4; this._layerEngine.addChild(_local4); } else { if (_local3.type == LevelZone.LEFT){ _local5 = new RoadSign(RoadSign.SIGN_LEFT); _local5.x = _local3.right; _local5.y = _local3.bottom; this._layerEngine.addChild(_local5); if (this.levelNumber == 60){ _local5.rotation = (_local5.rotation - 40); }; } else { if (_local3.type == LevelZone.RIGHT){ _local5 = new RoadSign(RoadSign.SIGN_RIGHT); _local5.x = _local3.left; _local5.y = _local3.bottom; this._layerEngine.addChild(_local5); }; }; }; _local2++; }; } private function get stress():Boolean{ return (_stress); } private function overEditButton(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } public function loadLevelSolution():void{ var _local1:SharedObject; _local1 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local1.size != 0){ if (_local1.data.solutions){ if ((((this.levelDifficulty == Config.DIFFICULTY_EASY)) && (_local1.data.solutions.easy))){ this.setLevelSolution(_local1.data.solutions.easy[(this.levelNumber - 1)]); }; if ((((this.levelDifficulty == Config.DIFFICULTY_NORMAL)) && (_local1.data.solutions.normal))){ this.setLevelSolution(_local1.data.solutions.normal[(this.levelNumber - 1)]); }; if ((((this.levelDifficulty == Config.DIFFICULTY_HARD)) && (_local1.data.solutions.hard))){ this.setLevelSolution(_local1.data.solutions.hard[(this.levelNumber - 1)]); }; }; }; } private function setUpClouds(_arg1:String, _arg2:LevelBorders=null):void{ var _local3:*; var _local4:int; var _local5:int; if (this._clouds == null){ this._clouds = new Array(); }; if (_arg1 == LevelData.WEATHER_CLOUDY){ _local4 = 0; while (_local4 < 10) { _local3 = new NastyCloud(); if (_arg2 != null){ (_local3 as NastyCloud).leftBorder = _arg2.leftBorderX; (_local3 as NastyCloud).rightBorder = _arg2.rightBorderX; }; _local3.x = ((Math.random() * Math.abs((_arg2.rightBorderX - _arg2.leftBorderX))) + _arg2.leftBorderX); this.addChildIntoLayer(_local3, (Math.round(((Math.random() * 5) + 2)) as int)); this._clouds.push(_local3); _local4++; }; } else { if (_arg1 == LevelData.WEATHER_NIGHT){ _local4 = 0; while (_local4 < 3) { _local3 = new NightCloud(); if (_arg2 != null){ (_local3 as NightCloud).leftBorder = _arg2.leftBorderX; (_local3 as NightCloud).rightBorder = _arg2.rightBorderX; }; _local3.x = ((Math.random() * Math.abs((_arg2.rightBorderX - _arg2.leftBorderX))) + _arg2.leftBorderX); this.addChildIntoLayer(_local3, (Math.round(((Math.random() * 5) + 2)) as int)); this._clouds.push(_local3); _local4++; }; } else { _local4 = 0; while (_local4 < 3) { _local3 = new Clouds(); if (_arg2 != null){ (_local3 as Clouds).leftBorder = _arg2.leftBorderX; (_local3 as Clouds).rightBorder = _arg2.rightBorderX; }; _local3.x = ((Math.random() * Math.abs((_arg2.rightBorderX - _arg2.leftBorderX))) + _arg2.leftBorderX); _local5 = (Math.round(((Math.random() * 5) + 2)) as int); this.addChildIntoLayer(_local3, _local5); this._clouds.push(_local3); _local4++; }; }; }; } private function onQuitSubmitHandler(_arg1:Event):void{ this.dispatchEvent(new Event(Config.EVENT_LEVEL_CLOSE_AND_QUIT, true)); } protected function set currMode(_arg1:Number):void{ if (_arg1 == _currMode){ return; }; _winTemp = false; if (_arg1 == Config.MODE_RESET){ reset(); return; }; if (_arg1 == Config.MODE_EMULATION){ startEmulation(); SoundData.RUN.play(); } else { if (_arg1 == Config.MODE_BUILDING){ startBuilding(); SoundManager.clearChannel(SoundData.MAIN_THEME.channel); if (!natureSoundsLaunched){ if (this.levelWeather == LevelData.WEATHER_NIGHT){ SoundData.FROGS.play(); natureSoundsLaunched = true; } else { if (this.levelWeather == LevelData.WEATHER_CLOUDY){ SoundData.THUNDER.play(); natureSoundsLaunched = true; } else { natureSoundsLaunched = true; }; }; }; } else { return; }; }; _swimmers = 0; _currMode = _arg1; } private function mouseOverHandler(_arg1:Event):void{ _oldBlockDelete = this.blockDelete; this.blockDelete = true; } private function get scrolling():Boolean{ return (_scrolling); } public function pause():void{ if (this.paused){ this.paused = false; } else { this.paused = true; }; } private function scrollUpdate(_arg1:Boolean=true, _arg2:Point=null):void{ var _local3:Point; var _local4:int; var _local5:Point; _local3 = new Point(); if (_arg1){ _local5 = this._layerFirst.globalToLocal(new Point(this.mouseX, this.mouseY)); _local3.x = (_local5.x - _mouseXY.x); _local3.y = (_local5.y - _mouseXY.y); } else { if (_arg2 != null){ _local3 = _arg2; }; }; if (((this._layerFirst.x + (this.levelBorders.leftBorderX * _scale)) + _local3.x) > 0){ _local3.x = ((-(this.levelBorders.leftBorderX) * _scale) - this._layerFirst.x); }; if (((this._layerFirst.x + _local3.x) + (levelBorders.rightBorderX * _scale)) < Config.SCREEN_WIDTH){ _local3.x = ((Config.SCREEN_WIDTH - this._layerFirst.x) - (levelBorders.rightBorderX * _scale)); }; if (((this._layerFirst.y + _local3.y) + (levelBorders.upperBorderY * _scale)) > 0){ _local3.y = (-(this._layerFirst.y) - (levelBorders.upperBorderY * _scale)); }; if (((this._layerFirst.y + _local3.y) + (levelBorders.bottomBorderY * _scale)) < Config.SCREEN_HEIGHT){ _local3.y = ((Config.SCREEN_HEIGHT - this._layerFirst.y) - (levelBorders.bottomBorderY * _scale)); }; _local4 = 0; while (_local4 < this._layerDynamic.numChildren) { this._layerDynamic.getChildAt(_local4).x = (this._layerDynamic.getChildAt(_local4).x + (_local3.x / (7 - _local4))); this._layerDynamic.getChildAt(_local4).y = (this._layerDynamic.getChildAt(_local4).y + (_local3.y / (1 + ((6 - _local4) * 0.1)))); _local4++; }; if (_arg1){ this._mouseXY = this._layerFirst.globalToLocal(new Point(this.mouseX, this.mouseY)); }; } private function onPhraseBaloonHidden(_arg1:Event):void{ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_HIDDEN, onPhraseBaloonHidden); this.phraseBaloon.parent.removeChild(this.phraseBaloon); this.phraseBaloon = null; } private function onHomeHandler(_arg1:Event):void{ this.addInGameMenuWithFading(); } public function set playerName(_arg1:String):void{ _playerName = _arg1; } private function phraseBaloonDelay(_arg1:Event):void{ this.phraseBaloonDelayCounter++; if (this.phraseBaloonDelayCounter >= (Config.ENGINE_FRAMERATE * 5)){ this.phraseBaloon.removeEventListener(Event.ENTER_FRAME, phraseBaloonDelay); this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, onPhraseBaloonHidden, false, 0, true); this.phraseBaloon.hide(); }; } public function get winBudget():Number{ return (_winBudget); } public function scrollUp(_arg1:Number=0):void{ if (!_scrolling){ return; }; if (_arg1 > 0){ _scrollY = (_scrollY + _arg1); } else { _scrollY = (_scrollY + Config.SCROLLING_ITERATION); }; if ((_scrollY + (levelBorders.upperBorderY * _scale)) >= 0){ _scrollY = (-(levelBorders.upperBorderY) * _scale); }; } public function set paused(_arg1:Boolean):void{ var _local2:int; if (_arg1){ this._paused = true; this._bird.paused = true; _local2 = 0; while (_local2 < this._clouds.length) { this._clouds[_local2].paused = true; _local2++; }; _local2 = 0; while (_local2 < this._protagonists.length) { if (!_protagonists[_local2].manualMode){ this._protagonists[_local2].paused = true; }; _local2++; }; _local2 = 0; while (_local2 < this._waters.length) { this._waters[_local2].paused = true; _local2++; }; if (this._flagArrow != null){ this._flagArrow.paused = true; }; } else { this._paused = false; this._bird.paused = false; _local2 = 0; while (_local2 < this._clouds.length) { this._clouds[_local2].paused = false; _local2++; }; _local2 = 0; while (_local2 < this._protagonists.length) { if (!_protagonists[_local2].manualMode){ this._protagonists[_local2].paused = false; }; _local2++; }; _local2 = 0; while (_local2 < this._waters.length) { this._waters[_local2].paused = false; _local2++; }; if (this._flagArrow != null){ this._flagArrow.paused = false; }; }; } private function onUndoHandler(_arg1:Event):void{ undo(); } protected function connectPoints(_arg1:Number=-1, _arg2:Boolean=false, _arg3:Boolean=true):void{ var _local4:Point; var _local5:Point; var _local6:int; var _local7:Number; var _local8:Sprite; var _local9:SpringConstraint; var _local10:CircleParticle; var _local11:Boolean; var _local12:Number; var _local13:DisplayObject; var _local14:Point; var _local15:int; var _local16:Point; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:*; var _local23:Array; if (((this.blockConnect) && (!(_arg2)))){ return; }; if (_currMode == Config.MODE_EMULATION){ return; }; if (_points.length < 2){ return; }; if (_arg1 == -1){ _arg1 = currMaterial; }; if ((_points[1] is Point)){ _local4 = _points[1].clone(); } else { _local4 = new Point(_points[1].px, _points[1].py); }; if ((_points[0] is Point)){ _local5 = _points[0].clone(); } else { _local5 = new Point(_points[0].px, _points[0].py); }; _local6 = 0; while (_local6 < _layerEngine.numChildren) { _local13 = _layerEngine.getChildAt(_local6); if (_local13.name == "texture"){ _local14 = _layerEngine.localToGlobal(_local5); if (((!((_points[0] is CircleParticle))) && (_local13.hitTestPoint(_local14.x, _local14.y, true)))){ _points.splice(0); return; }; _local14 = _layerEngine.localToGlobal(_local4); if (((!((_points[1] is CircleParticle))) && (_local13.hitTestPoint(_local14.x, _local14.y, true)))){ _points.splice(0); return; }; }; _local6++; }; _local7 = calcCost(_local5, _local4, _arg1); if (_local7 > budget){ _points.splice(0); _hud.budgetSignalling(); return; }; budget = (budget - _local7); _local11 = false; _local12 = _groupMaterials.numSets; if (_arg1 == Config.MATERIAL_DECK){ _local11 = true; _local15 = 0; while (_local15 < _points.length) { if ((_points[_local15] is Point)){ if (_layerEngine != null){ _local8 = new Sprite(); _local8.addChild(new LinkElement()); _local8.name = "link"; _layerEngine.addChild(_local8); }; _local10 = new CircleParticle(_points[_local15].x, _points[_local15].y, Config.POINT_RADIUS, false, Config.POINT_MASS, Config.POINT_ELASTICITY, 0, _local8); _points[_local15] = _local10; _groupMaterials.addParticle(_points[_local15]); }; _points[_local15].addSet(_local12); _points[_local15].deselect(); _points[_local15].collidable = true; if (_local15 > 0){ if (_layerEngine != null){ _local8 = makeDeckSprite(_points[(_local15 - 1)], _points[_local15]); _layerEngine.addChild(_local8); }; _local9 = new SpringConstraint(_points[(_local15 - 1)], _points[_local15], Config.MATERIAL_DECK_STIFFNESS, Config.MATERIAL_DECK_COLLIDABLE, Config.MATERIAL_DECK_RECT_HEIGHT, Config.MATERIAL_DECK_RECT_SCALE, true, _local8); _local9.setStyle(Config.MATERIAL_DECK_LINE_THICKNESS, Config.MATERIAL_DECK_LINE_COLOR, 1, Config.MATERIAL_DECK_FILL_COLOR); _local9.materialMultiplier = Config.MATERIAL_DECK_MULTIPLIER; _local9.material = _arg1; _groupMaterials.addConstraint(_local9, _local12); if (_arg3){ SoundData.DECK_CONNECT.play(); }; if (((_points[(_local15 - 1)].fixed) || (_points[_local15].fixed))){ _local9.fixedEndLimit = Config.MATERIAL_FIXED_END_LIMIT; }; }; _local15++; }; } else { if (_arg1 == Config.MATERIAL_STEEL){ _local11 = true; _local15 = 0; while (_local15 < _points.length) { if ((_points[_local15] is Point)){ if (_layerEngine != null){ _local8 = new Sprite(); _local8.addChild(new LinkElement()); _local8.name = "link"; _layerEngine.addChild(_local8); }; _local10 = new CircleParticle(_points[_local15].x, _points[_local15].y, Config.POINT_RADIUS, false, Config.POINT_MASS, Config.POINT_ELASTICITY, 0, _local8); _points[_local15] = _local10; _groupMaterials.addParticle(_points[_local15]); }; _points[_local15].addSet(_local12); _points[_local15].deselect(); if (_points[_local15].numSets() == 1){ _points[_local15].collidable = false; }; if (_local15 > 0){ if (_layerEngine != null){ _local8 = makeSteelSprite(_points[(_local15 - 1)], _points[_local15]); _layerEngine.addChild(_local8); }; _local9 = new SpringConstraint(_points[(_local15 - 1)], _points[_local15], Config.MATERIAL_STEEL_STIFFNESS, Config.MATERIAL_STEEL_COLLIDABLE, Config.MATERIAL_STEEL_RECT_HEIGHT, Config.MATERIAL_STEEL_RECT_SCALE, true, _local8); _local9.setStyle(Config.MATERIAL_STEEL_LINE_THICKNESS, Config.MATERIAL_STEEL_LINE_COLOR, 1, Config.MATERIAL_STEEL_FILL_COLOR); _local9.materialMultiplier = Config.MATERIAL_STEEL_MULTIPLIER; _local9.material = _arg1; _groupMaterials.addConstraint(_local9, _local12); if (_arg3){ SoundData.STEEL_CONNECT.play(); }; if (((_points[(_local15 - 1)].fixed) || (_points[_local15].fixed))){ _local9.fixedEndLimit = Config.MATERIAL_FIXED_END_LIMIT; }; }; _local15++; }; } else { if (_arg1 == Config.MATERIAL_ROPE){ _local11 = true; _local16 = new Point((_local4.x - _local5.x), (_local4.y - _local5.y)); _local17 = Config.MATERIAL_ROPE_BLOCK_LENGTH; _local18 = Math.floor((_local16.length / _local17)); if (_local18 == 0){ _local18 = 1; }; if (this.loaderScreen){ _processingRope = true; this.numRopeBlocks = _local18; this.currRopeBlock = 0; this.addEventListener(Event.ENTER_FRAME, processRope, false, 0, true); return; }; _local19 = Config.MATERIAL_ROPE_LENGTH_MODIFIER; _local20 = (_local16.x / _local18); _local21 = (_local16.y / _local18); if ((_points[0] is Point)){ if (_layerEngine != null){ _local8 = new Sprite(); _local8.addChild(new LinkElement()); _local8.name = "link"; _layerEngine.addChild(_local8); }; _local10 = new CircleParticle(_points[0].x, _points[0].y, Config.POINT_RADIUS, false, Config.POINT_MASS, Config.POINT_ELASTICITY, 0, _local8); _points[0] = _local10; _groupMaterials.addParticle(_points[0]); }; _points[0].addSet(_local12); _points[0].deselect(); if (_points[0].numSets() == 1){ _points[0].collidable = false; }; if ((_points[1] is Point)){ if (_layerEngine != null){ _local8 = new Sprite(); _local8.addChild(new LinkElement()); _local8.name = "link"; _layerEngine.addChild(_local8); }; _local10 = new CircleParticle(_points[1].x, _points[1].y, Config.POINT_RADIUS, false, Config.POINT_MASS, Config.POINT_ELASTICITY, 0, _local8); _points[1] = _local10; _groupMaterials.addParticle(_points[1]); }; _points[1].addSet(_local12); _points[1].deselect(); if (_points[1].numSets() == 1){ _points[1].collidable = false; }; _local22 = _points.pop(); _local15 = 1; while (_local15 <= _local18) { if (_local15 == _local18){ _points.push(_local22); } else { _local10 = new CircleParticle((_local5.x + (_local15 * _local20)), (_local5.y + (_local15 * _local21)), Config.MATERIAL_ROPE_POINT_RADIUS, false, Config.MATERIAL_ROPE_POINT_MASS, Config.MATERIAL_ROPE_POINT_ELASTICITY, 0); _local10.setFill(0); _local10.collidable = false; _local10.subParticle = true; _points.push(_local10); _groupMaterials.addParticle(_local10, _local12); }; _local9 = new SpringConstraint(_points[(_local15 - 1)], _points[_local15], Config.MATERIAL_ROPE_STIFFNESS, Config.MATERIAL_ROPE_COLLIDABLE, Config.MATERIAL_ROPE_RECT_HEIGHT, Config.MATERIAL_ROPE_RECT_SCALE, true); _local9.setStyle(Config.MATERIAL_ROPE_LINE_THICKNESS, Config.MATERIAL_ROPE_LINE_COLOR, 1, Config.MATERIAL_ROPE_FILL_COLOR); _local9.materialMultiplier = Config.MATERIAL_ROPE_MULTIPLIER; _local9.material = _arg1; _local9.restLength = (_local9.restLength * _local19); _groupMaterials.addConstraint(_local9, _local12); if (_arg3){ SoundData.ROPE_CONNECT.play(); }; if (((_points[(_local15 - 1)].fixed) || (_points[_local15].fixed))){ _local9.fixedEndLimit = Config.MATERIAL_FIXED_END_LIMIT; }; _local15++; }; this.ropes.push({setId:_local12, p1:_points[0], p2:_local22}); APEngine.paint(); }; }; }; if (_local11){ _sets.push(new Point(_local12, _arg1)); _groupMaterials.numSets++; indexesCorrection(); _points.splice(0); dispatchEvent(new Event(Config.EVENT_CONNECT_POINTS, true)); if (((_undoMode) && (!(this.tutorialMode)))){ if (_actions.length > 0){ _actions.splice(0); }; _local23 = [_local12]; _actions.push(new Action(Config.ACTION_ADD, _local23)); _hud.undoButton.reset(); }; }; } private function onResetHandler(_arg1:Event):void{ currMode = Config.MODE_RESET; } public function zoomOut():void{ var _local1:*; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Point; if (_popUp){ return; }; if (!_zooming){ return; }; _zooming = false; _local1 = _scale; _scale = (_scale * Config.ZOOM_OUT_ITERATION); _local2 = (levelBorders.width * _scale); _local3 = (levelBorders.height * _scale); _local4 = (_local3 * (Math.abs(levelBorders.bottomBorderY) / levelBorders.height)); _local5 = (_local3 - _local4); if (_local2 < Config.SCREEN_WIDTH){ _scale = (Config.SCREEN_WIDTH / levelBorders.width); _local2 = (levelBorders.width * _scale); _local3 = (levelBorders.height * _scale); _local4 = (_local3 * (Math.abs(levelBorders.bottomBorderY) / levelBorders.height)); _local5 = (_local3 - _local4); }; if (_local3 < Config.SCREEN_HEIGHT){ _scale = (Config.SCREEN_HEIGHT / levelBorders.height); _local2 = (levelBorders.width * _scale); _local3 = (levelBorders.height * _scale); _local4 = (_local3 * (Math.abs(levelBorders.bottomBorderY) / levelBorders.height)); _local5 = (_local3 - _local4); }; _local6 = new Point(((Config.SCREEN_WIDTH * (_local1 - _scale)) / 2), ((Config.SCREEN_HEIGHT * (_local1 - _scale)) / 2)); this.scrollUpdate(false, _local6); _zooming = true; } private function onEditHandler(_arg1:Event):void{ if (_popUp){ this.removePopUp(); }; currMode = Config.MODE_BUILDING; } public function scrollReset():void{ if (!scrolling){ return; }; if (_scrollX > 0){ scrollLeft(_scrollX); } else { if (_scrollX < 0){ scrollRight(-(_scrollX)); }; }; if (_scrollY > 0){ scrollDown(_scrollY); } else { if (_scrollY < 0){ scrollUp(-(_scrollY)); }; }; } private function zoomUpdate():void{ var _local1:int; if (_popUp){ return; }; _hud.zoomInButton.visible = true; _hud.zoomInButton.visible = true; if (((((levelBorders.width * _scale) <= Config.SCREEN_WIDTH)) || (((levelBorders.height * _scale) <= Config.SCREEN_HEIGHT)))){ _hud.zoomOutButton.active = false; } else { _hud.zoomOutButton.active = true; }; if (_scale == 1){ _hud.zoomInButton.active = false; } else { _hud.zoomInButton.active = true; }; if (_scale != this._layerFirst.scaleX){ _local1 = 0; while (_local1 < this._layerDynamic.numChildren) { this._layerDynamic.getChildAt(_local1).scaleX = this._scale; this._layerDynamic.getChildAt(_local1).scaleY = this._scale; _local1++; }; }; } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:Array; if (this._fader){ return; }; if (((!((this.phraseBaloon == null))) && (!(this.tutorialMode)))){ if (this.phraseBaloon.hasEventListener(TalkBaloon.EVENT_SHOWED)){ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SHOWED, onPhraseBaloonShowed); }; if (this.phraseBaloon.hasEventListener(Event.ENTER_FRAME)){ this.phraseBaloon.removeEventListener(Event.ENTER_FRAME, phraseBaloonDelay); }; if (!this.phraseBaloon.hasEventListener(TalkBaloon.EVENT_HIDDEN)){ this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, onPhraseBaloonHidden, false, 0, true); this.phraseBaloon.hide(); }; }; if (_currMode == Config.MODE_EMULATION){ if (((((this.scrolling) && ((_popUp == null)))) && (!(this.paused)))){ if (((((!(_hud.hitTestPoint(mouseX, mouseY, true))) && (!(_soundPanel.hitTestPoint(mouseX, mouseY, true))))) && (!(this._bird.hitTestPoint(mouseX, mouseY))))){ _scrollThroughDragging = true; _mouseXY = this._layerFirst.globalToLocal(new Point(this.mouseX, this.mouseY)); this.dispatchEvent(new Event(Config.EVENT_MOUSE_DRAG, true)); }; }; } else { if (!enableBuilding){ return; }; _local2 = []; if (currMaterial != -1){ _local2 = _groupMaterials.getObjectsUnderPoint(_pointer.x, _pointer.y, true, true, 0, true); }; if (_local2.length > 0){ _points.splice(0); _points.push(_local2[0]); dragging = true; this.dispatchEvent(new Event(Config.EVENT_FOUND_PIN_POINT)); _line.visible = true; } else { if (((this.scrolling) && (!(this.paused)))){ if (((((((((((!(_hud.hitTestPoint(mouseX, mouseY, true))) && ((_groupMaterials.getObjectsUnderPoint(mouseX, mouseY, false).length == 0)))) && (_soundPanel))) && (!(_soundPanel.hitTestPoint(mouseX, mouseY, true))))) && (!(this._bird.hitTestPoint(mouseX, mouseY))))) && (!(protagonistClickTest())))){ if (((!((this.phraseBaloon == null))) && (this.phraseBaloon.hitTestPoint(mouseX, mouseY)))){ return; }; _scrollThroughDragging = true; _mouseXY = this._layerFirst.globalToLocal(new Point(this.mouseX, this.mouseY)); this.dispatchEvent(new Event(Config.EVENT_MOUSE_DRAG, true)); }; }; }; }; } public function set budget(_arg1:Number):void{ _budget = _arg1; _hud.budget = _arg1; } private function onSteelHandler(_arg1:Event):void{ currMaterial = Config.MATERIAL_STEEL; } private function turnPhysicsOn(_arg1:Event):void{ _physicsOn = true; } private function setUpWeather(_arg1:String):void{ var _local2:NastySky; var _local3:Moon; var _local4:int; var _local5:NightSky; var _local6:Star; var _local7:Sun; var _local8:BlueSky; if (_arg1 == LevelData.WEATHER_CLOUDY){ _local2 = new NastySky(); if (_local2.width != 0){ _local2.scaleX = (Config.SCREEN_WIDTH / _local2.width); }; this.addChildAt(_local2, 0); } else { if (_arg1 == LevelData.WEATHER_NIGHT){ _local3 = new Moon(); _local3.x = 160; _local3.y = 125; this.addChildAt(_local3, 0); _local4 = 0; while (_local4 < 40) { _local6 = new Star(); _local6.x = (Math.random() * Config.SCREEN_WIDTH); _local6.y = (Math.random() * Config.SCREEN_HEIGHT); this.addChildAt(_local6, 0); _local4++; }; _local5 = new NightSky(); if (_local5.width != 0){ _local5.scaleX = (Config.SCREEN_WIDTH / _local5.width); }; this.addChildAt(_local5, 0); } else { _local7 = new Sun(); _local7.x = 160; _local7.y = 125; this.addChildAt(_local7, 0); _local8 = new BlueSky(); _local8.scaleX = (Config.SCREEN_WIDTH / _local8.width); this.addChildAt(_local8, 0); }; }; } private function onRopeHandler(_arg1:Event):void{ currMaterial = Config.MATERIAL_ROPE; } public function set dragging(_arg1:Boolean):void{ _dragging = _arg1; } public function saveLevelSolution():void{ var _local1:SharedObject; var _local2:Object; var _local3:Array; var _local4:Array; var _local5:Array; _local1 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local1.size != 0){ if (!_local1.data.solutions){ _local3 = new Array(Config.LEVELS_TOTAL); _local4 = new Array(Config.LEVELS_TOTAL); _local5 = new Array(Config.LEVELS_TOTAL); _local1.data.solutions = {easy:_local3, normal:_local4, hard:_local5}; }; _local2 = this.getLevelSolution(); if (this.levelDifficulty == Config.DIFFICULTY_EASY){ _local1.data.solutions.easy[(this.levelNumber - 1)] = _local2; } else { if (this.levelDifficulty == Config.DIFFICULTY_NORMAL){ _local1.data.solutions.normal[(this.levelNumber - 1)] = _local2; } else { if (this.levelDifficulty == Config.DIFFICULTY_HARD){ _local1.data.solutions.hard[(this.levelNumber - 1)] = _local2; }; }; }; _local1.flush(); }; } private function mouseOutHandler(_arg1:Event):void{ this.blockDelete = _oldBlockDelete; } public function cleanup():void{ _hud.cleanup(); _hud = null; stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandler); removeEventListener(Config.EVENT_RESET, onResetHandler); removeEventListener(Config.EVENT_STRESS, onStressHandler); removeEventListener(Config.EVENT_HOME, onHomeHandler); removeEventListener(Event.ENTER_FRAME, enterFrameHandler); if (hasEventListener(Config.EVENT_EDIT)){ removeEventListener(Config.EVENT_EDIT, onEditHandler); }; if (hasEventListener(Config.EVENT_START)){ removeEventListener(Config.EVENT_START, onStartHandler); }; if (hasEventListener(Config.EVENT_DECK)){ removeEventListener(Config.EVENT_DECK, onDeckHandler); }; if (hasEventListener(Config.EVENT_STEEL)){ removeEventListener(Config.EVENT_STEEL, onSteelHandler); }; if (hasEventListener(Config.EVENT_ROPE)){ removeEventListener(Config.EVENT_ROPE, onRopeHandler); }; if (hasEventListener(Config.EVENT_UNDO)){ removeEventListener(Config.EVENT_UNDO, onUndoHandler); }; if (this.islandText){ this.removeEventListener(Event.ENTER_FRAME, islandTextFading); _layerStatic.removeChild(this.islandText); this.islandText = null; }; if (_zooming){ this.removeEventListener(Config.EVENT_ZOOM_IN, zoomInHandler); this.removeEventListener(Config.EVENT_ZOOM_OUT, zoomOutHandler); }; SoundManager.clearChannel(SoundData.THUNDER.channel); while (_layerDynamic.numChildren > 0) { _layerDynamic.removeChildAt(0); }; while (this.numChildren > 0) { this.removeChildAt(0); }; APEngine.container = null; APEngine.removeGroup(_group); APEngine.removeGroup(_groupMaterials); APEngine.removeGroup(_groupProtagonists); _group = null; _groupMaterials = null; _groupProtagonists = null; _layerDynamic = null; _layerEngine = null; _layerFirst = null; _layerStatic = null; this.levelData = null; this.levelBorders = null; this.levelObjects = null; this.levelProtagonists = null; this.levelSurfaces = null; this.levelWeather = null; this.levelZones = null; _playerName = null; _clouds = null; _bird = null; _fader = null; _flagArrow = null; _grid = null; _inGameMenu = null; _line = null; _pointer = null; _points = null; _popUp = null; _protagonists = null; _sets = null; _soundPanel = null; _waters = null; _actions = null; _sets = null; _mouseXY = null; this.phraseBaloon = null; this.loaderScreen = null; this.birdsSounds = null; this.solutionObj = null; this.ropes = null; this.sprites = null; } public function removePopUp():void{ if (_popUp != null){ if (this._fader != null){ this._fader.addEventListener(Fader.COMPLETE, onFadeOutCompleteHandler, false, 0, true); this._fader.fadeOut(); }; this.removeEventListener(Config.EVENT_POPUPBUTTON_NEXT, popupButtonNextHandler); this.removeEventListener(Config.EVENT_POPUPBUTTON_MAP, popupButtonMapHandler); this.removeEventListener(Config.EVENT_POPUPBUTTON_RETRY, popupButtonRetryHandler); _popUp.cleanup(); removeChild(_popUp); _popUp = null; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); }; } protected function set enableBuilding(_arg1:Boolean):void{ _enableBuilding = _arg1; } private function protagonistsReset():void{ var _local1:int; var _local2:*; _local1 = 0; while (_local1 < _protagonists.length) { _local2 = _protagonists[_local1]; _local2.resetSpeed(); _local2.resetParams(); _local2.stand(true); _local2.particle.px = this.levelProtagonists[_local1].x; _local2.particle.py = this.levelProtagonists[_local1].y; _local1++; }; } private function protagonistsRun():void{ } private function onResumeHandler(_arg1:Event):void{ this.removeInGameMenuWithFading(); } private function setUpProtagonists(_arg1:Array):void{ var _local2:int; var _local3:String; var _local4:Class; var _local5:*; if (this._layerEngine == null){ return; }; if (_arg1 == null){ return; }; if (this._groupProtagonists == null){ this._groupProtagonists = new Group(true); }; if (this._protagonists == null){ this._protagonists = new Array(); }; this._numProtagonists = _arg1.length; _local2 = 0; while (_local2 < this._numProtagonists) { _local3 = ("characters." + _arg1[_local2].type); _local4 = (getDefinitionByName(_local3) as Class); _local5 = new _local4(_arg1[_local2].x, _arg1[_local2].y); this._protagonists.push(_local5); this._groupProtagonists.addParticle(_local5.particle); this._layerEngine.addChild(_local5); _local2++; }; } private function startEmulation():void{ var _local1:int; var _local2:SpringConstraint; if (((!(tutorialMode)) && (this.phraseBaloon))){ if (this.phraseBaloon.hasEventListener(TalkBaloon.EVENT_SHOWED)){ this.phraseBaloon.removeEventListener(TalkBaloon.EVENT_SHOWED, onPhraseBaloonShowed); }; if (this.phraseBaloon.hasEventListener(Event.ENTER_FRAME)){ this.phraseBaloon.removeEventListener(Event.ENTER_FRAME, phraseBaloonDelay); }; if (!this.phraseBaloon.hasEventListener(TalkBaloon.EVENT_HIDDEN)){ this.phraseBaloon.addEventListener(TalkBaloon.EVENT_HIDDEN, onPhraseBaloonHidden, false, 0, true); }; this.phraseBaloon.hide(); }; addEventListener(Config.EVENT_EDIT, onEditHandler, false, 0, true); removeEventListener(Config.EVENT_START, onStartHandler); removeEventListener(Config.EVENT_DECK, onDeckHandler); removeEventListener(Config.EVENT_STEEL, onSteelHandler); removeEventListener(Config.EVENT_ROPE, onRopeHandler); removeEventListener(Config.EVENT_UNDO, onUndoHandler); _local1 = 0; while (_local1 < _layerDynamic.numChildren) { _layerDynamic.getChildAt(_local1).transform.colorTransform = new ColorTransform(); _local1++; }; _grid.visible = false; _local1 = 0; while (_local1 < _protagonists.length) { _protagonists[_local1].finished = false; _local1++; }; scrollReset(); highlignting = false; _physicsOn = true; _hud.mode = Config.MODE_EMULATION; _local1 = 0; while (_local1 < _groupMaterials.constraints.length) { _local2 = _groupMaterials.constraints[_local1]; if (_local2.material == Config.MATERIAL_DECK){ _local2.stiffness = Config.MATERIAL_DECK_STIFFNESS; _local2.materialMultiplier = Config.MATERIAL_DECK_MULTIPLIER; }; if (_local2.material == Config.MATERIAL_STEEL){ _local2.stiffness = Config.MATERIAL_STEEL_STIFFNESS; _local2.materialMultiplier = Config.MATERIAL_STEEL_MULTIPLIER; }; if (_local2.material == Config.MATERIAL_ROPE){ _local2.stiffness = Config.MATERIAL_ROPE_STIFFNESS; _local2.materialMultiplier = Config.MATERIAL_ROPE_MULTIPLIER; }; _local2.overloadingCounter = 0; _local1++; }; } private function deleteOverloadedConstraint(_arg1:AbstractConstraint):void{ var _local2:CircleParticle; var _local3:CircleParticle; var _local4:Point; var _local5:Point; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Boom; _physicsOn = false; _local2 = ((_arg1 as SpringConstraint).particleA as CircleParticle); _local3 = ((_arg1 as SpringConstraint).particleB as CircleParticle); _local4 = new Point(_local2.px, _local2.py); _local5 = new Point(_local3.px, _local3.py); _local6 = (_arg1 as SpringConstraint).material; _groupMaterials.removeConstraintWithBackup(_arg1); _local7 = Math.sqrt((((_local5.x - _local4.x) * (_local5.x - _local4.x)) + ((_local5.y - _local4.y) * (_local5.y - _local4.y)))); _local8 = (-((_local5.y - _local4.y)) / _local7); _local9 = ((_local5.x - _local4.x) / _local7); _local10 = 0; _local11 = _local7; _local12 = (Math.floor((_local7 / 20)) + 1); while (_local12 > 0) { _local13 = (_local10 * _local9); _local14 = (-(_local10) * _local8); _local15 = new Boom(); _layerEngine.addChild(_local15); _local15.x = (_local13 + _local4.x); _local15.y = (_local14 + _local4.y); if (_local6 == Config.MATERIAL_STEEL){ _local15.transform.colorTransform = new ColorTransform(0.1, 0.1, 0.1, 1, 138, 138, 138); } else { if (_local6 == Config.MATERIAL_ROPE){ _local15.transform.colorTransform = new ColorTransform(0.1, 0.1, 0.1, 1, 0, 0, 0); }; }; _local15.init(); _local10 = (_local10 + 20); _local12--; }; if (_local6 == Config.MATERIAL_DECK){ SoundData.DECK_BREAK.play(); }; if (_local6 == Config.MATERIAL_STEEL){ SoundData.STEEL_BREAK.play(); }; if (_local6 == Config.MATERIAL_ROPE){ SoundData.ROPE_BREAK.play(); }; if (((!(_local2.isInSet(0))) && (!(_groupMaterials.haveConstraintConnectedTo(_local2))))){ _groupMaterials.removeParticleWithBackup(_local2); }; if (((!(_local3.isInSet(0))) && (!(_groupMaterials.haveConstraintConnectedTo(_local3))))){ _groupMaterials.removeParticleWithBackup(_local3); }; _physicsOn = true; } protected function set currMaterial(_arg1:Number):void{ if (_currMaterial == _arg1){ return; }; _currMaterial = _arg1; _hud.material = _arg1; } protected function get currMode():Number{ return (_currMode); } private function popupButtonNextHandler(_arg1:Event):void{ this.removeChild(this._fader); this._fader = null; removePopUp(); dispatchEvent(new Event(Config.EVENT_LEVEL_NEXT, true)); } private function onDeckHandler(_arg1:Event):void{ currMaterial = Config.MATERIAL_DECK; } private function onFadeOutCompleteHandler(_arg1:Event):void{ this._fader.removeEventListener(Fader.COMPLETE, onFadeOutCompleteHandler); this.removeChild(this._fader); this._fader = null; } private function lowCostBuilding(_arg1:Event):void{ var _local2:Object; this.loaderScreen.setPercentage((this.constraintsCounter / this.numSlnConstraints)); if (_processingRope){ return; }; if (this.constraintsCounter == this.numSlnConstraints){ this.removeEventListener(Event.ENTER_FRAME, lowCostBuilding); _counter = int((Config.ENGINE_FRAMERATE / 2)); this.addEventListener(Event.ENTER_FRAME, waitAfterBuilding, false, 0, true); return; }; _local2 = this.solutionObj["constraints"][this.currSlnConstraint++]; _points.splice(0); _points.push(solutionObj["particles"][_local2.particleA]); _points.push(solutionObj["particles"][_local2.particleB]); this.connectPoints(_local2.material, false, false); if (_local2.material != Config.MATERIAL_ROPE){ this.constraintsCounter++; }; } private function setUpSurfaces(_arg1:Array):void{ var _local2:Array; var _local3:int; var _local4:Array; var _local5:CircleParticle; var _local6:CircleParticle; var _local7:CircleParticle; var _local8:int; var _local9:Sprite; var _local10:SurfacePoint; var _local11:Sprite; var _local12:LinkElement; var _local13:Hook; var _local14:SpringConstraint; if (this._layerEngine == null){ return; }; if (_arg1 == null){ return; }; if (this._group == null){ this._group = new Group(true); }; _local2 = new Array(); _local3 = 0; while (_local3 < _arg1.length) { _local4 = (_arg1[_local3] as Array); if (_local4.length > 1){ _local9 = new Sprite(); _local9.graphics.clear(); _local9.graphics.lineStyle(2); _local9.graphics.beginBitmapFill(new GroundTexture(), null, true); }; _local8 = 0; while (_local8 < _local4.length) { _local10 = (_local4[_local8] as SurfacePoint); if (_local10.pin){ _local11 = new Sprite(); _local12 = new LinkElement(true); _local11.addChild(_local12); if ((((this.levelWeather == LevelData.WEATHER_NIGHT)) || ((this.levelWeather == LevelData.WEATHER_CLOUDY)))){ _local11.filters = [new GlowFilter(0xFF00, 1, 6, 6)]; }; _local11.name = "link"; if (_local10.hook){ _local13 = new Hook(_local10.hookRotation, _local10.hookDirectionX, _local10.hookDirectionY); _local13.x = _local10.x; _local13.y = _local10.y; if (_local10.onlySteel){ _local13.hookMC.visible = false; _local13.x = (_local13.x - 2); _local13.y = (_local13.y + 10); }; _layerEngine.addChildAt(_local13, 0); }; _layerEngine.addChild(_local11); if (_local8 > 0){ _local5 = _local7; }; _local7 = new CircleParticle(_local10.x, _local10.y, 8, true, 1, 0.3, 0, _local11); _local7.setFill(0xFFFFFF); _group.addParticle(_local7, 0); _groupMaterials.addParticle(_local7, 0); } else { if (_local8 > 0){ _local5 = _local7; }; _local7 = new CircleParticle(_local10.x, _local10.y, 8, true); _local7.setFill(0); _group.addParticle(_local7); }; if (_local4.length > 1){ if (_local8 == 0){ _local6 = _local7; _local9.graphics.moveTo(_local10.x, _local10.y); }; if (_local8 > 0){ _local14 = new SpringConstraint(_local5, _local7, 1, true, 16); _local14.setFill(0); _group.addConstraint(_local14); _local9.graphics.lineTo(_local10.x, _local10.y); }; }; _local8++; }; if (_local4.length > 1){ _local14 = new SpringConstraint(_local6, _local7, 1, true, 16); _local14.setFill(0); _group.addConstraint(_local14); _local9.graphics.lineTo(_local4[0].x, _local4[0].y); _local9.graphics.endFill(); _local9.cacheAsBitmap = true; _local9.name = "texture"; _local2.push(_local9); }; _local3++; }; _groupMaterials.numSets++; _local3 = 0; while (_local3 < _local2.length) { _layerEngine.addChild(_local2[_local3]); _local3++; }; } private function setUpWaters(_arg1:LevelBorders):void{ var _local2:Number; var _local3:Sprite; var _local4:Water; var _local5:Water; var _local6:Water; var _local7:Water; var _local8:Water; var _local9:Water; var _local10:Water; if (this._layerDynamic == null){ return; }; if (_arg1 == null){ return; }; if (this._waters == null){ this._waters = new Array(); }; _local2 = _arg1.waterLineY; _local3 = new Sprite(); _local4 = new Water(1, _arg1.width); _local4.x = _arg1.leftBorderX; _local4.y = (_local2 - 55); _local3.addChild(_local4); _local4.launch(2, 0, 100); this._layerDynamic.addChild(_local3); this._waters.push(_local4); _local3 = new Sprite(); _local5 = new Water(2, _arg1.width); _local5.x = _arg1.leftBorderX; _local5.y = (_local2 - 50); _local3.addChild(_local5); _local5.launch(2, (Math.PI / 50), 80); this._layerDynamic.addChild(_local3); this._waters.push(_local5); _local3 = new Sprite(); _local6 = new Water(3, _arg1.width); _local6.x = _arg1.leftBorderX; _local6.y = (_local2 - 45); _local3.addChild(_local6); _local6.launch(2, (Math.PI / 25), 70); this._layerDynamic.addChild(_local3); this._waters.push(_local6); _local3 = new Sprite(); _local7 = new Water(4, _arg1.width); _local7.x = _arg1.leftBorderX; _local7.y = (_local2 - 40); _local3.addChild(_local7); _local7.launch(3, (Math.PI / 10), 60); this._layerDynamic.addChild(_local3); this._waters.push(_local7); _local3 = new Sprite(); _local8 = new Water(5, _arg1.width); _local8.x = _arg1.leftBorderX; _local8.y = (_local2 - 35); _local3.addChild(_local8); _local8.launch(4, (Math.PI / 4), 50); this._layerDynamic.addChild(_local3); this._waters.push(_local8); _local3 = new Sprite(); _local9 = new Water(6, _arg1.width); _local9.x = _arg1.leftBorderX; _local9.y = (_local2 - 20); _local3.addChild(_local9); _local9.launch(5, (Math.PI / 2), 50); this._layerDynamic.addChild(_local3); this._waters.push(_local9); _local3 = new Sprite(); _local10 = new Water(7, _arg1.width); _local10.x = _arg1.leftBorderX; _local10.y = _local2; _local3.addChild(_local10); _local10.launch(5, Math.PI, 50); this._layerDynamic.addChild(_local3); this._layerFirst = _local3; this._waters.push(_local10); } public function set blockConnect(_arg1:Boolean):void{ _blockConnect = _arg1; } private function scrollDownHandler(_arg1:Event):void{ scrollDown(); } private function protagonistClickTest():Boolean{ var _local1:int; _local1 = 0; while (_local1 < this._protagonists.length) { if ((this._protagonists[_local1] as MovieClip).hitTestPoint(mouseX, mouseY, true)){ return (true); }; _local1++; }; return (false); } public function get budget():Number{ return (_budget); } public function scrollRight(_arg1:Number=0):void{ if (!_scrolling){ return; }; if (_arg1 > 0){ _scrollX = (_scrollX - _arg1); } else { _scrollX = (_scrollX - Config.SCROLLING_ITERATION); }; if ((_scrollX + ((levelBorders.leftBorderX + levelBorders.width) * _scale)) <= Config.SCREEN_WIDTH){ _scrollX = (Config.SCREEN_WIDTH - ((levelBorders.leftBorderX + levelBorders.width) * _scale)); }; } private function onStressHandler(_arg1:Event):void{ if (_stress){ stress = false; } else { stress = true; }; } private function set stress(_arg1:Boolean):void{ if (((!(_arg1)) && (_stress))){ _groupMaterials.hideStress(); }; _stress = _arg1; } public function set highlignting(_arg1:Boolean):void{ if (_arg1){ if (_highlignting){ return; }; _highlignting = true; } else { if (!_highlignting){ return; }; _highlignting = false; _groupMaterials.selectOffAll(); }; } public function get blockConnect():Boolean{ return (_blockConnect); } private function deleteSetUnderPoint(_arg1:Number, _arg2:Number, _arg3:Array=null):void{ var _local4:Array; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Array; var _local9:Point; var _local10:Point; var _local11:int; if (this.blockDelete){ return; }; if (_currMode == Config.MODE_EMULATION){ return; }; if (_arg3 != null){ _local4 = _arg3; } else { _local4 = _groupMaterials.getSetsUnderPoint(_arg1, _arg2); }; if (_local4.length == 0){ return; }; if (((_undoMode) && (!(this.tutorialMode)))){ if (_actions.length > 0){ _actions.splice(0); }; _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5]; _local7 = getMaterialBySet(_local6); _local8 = new Array(); _local9 = null; _local10 = null; _local11 = 0; while (_local11 < _groupMaterials.constraints.length) { if ((_groupMaterials.constraints[_local11] as SpringConstraint).isInSet(_local6)){ if (_local7 == Config.MATERIAL_ROPE){ if (!((_groupMaterials.constraints[_local11] as SpringConstraint).particleA as CircleParticle).subParticle){ if (_local9 == null){ _local9 = new Point((_groupMaterials.constraints[_local11] as SpringConstraint).particleA.px, (_groupMaterials.constraints[_local11] as SpringConstraint).particleA.py); } else { if (_local10 == null){ _local10 = new Point((_groupMaterials.constraints[_local11] as SpringConstraint).particleA.px, (_groupMaterials.constraints[_local11] as SpringConstraint).particleA.py); break; }; }; }; if (!((_groupMaterials.constraints[_local11] as SpringConstraint).particleB as CircleParticle).subParticle){ if (_local9 == null){ _local9 = new Point((_groupMaterials.constraints[_local11] as SpringConstraint).particleB.px, (_groupMaterials.constraints[_local11] as SpringConstraint).particleB.py); } else { if (_local10 == null){ _local10 = new Point((_groupMaterials.constraints[_local11] as SpringConstraint).particleB.px, (_groupMaterials.constraints[_local11] as SpringConstraint).particleB.py); break; }; }; }; } else { _local9 = new Point((_groupMaterials.constraints[_local11] as SpringConstraint).particleA.px, (_groupMaterials.constraints[_local11] as SpringConstraint).particleA.py); _local10 = new Point((_groupMaterials.constraints[_local11] as SpringConstraint).particleB.px, (_groupMaterials.constraints[_local11] as SpringConstraint).particleB.py); }; }; _local11++; }; if ((((_local9 == null)) || ((_local10 == null)))){ _local9 = null; _local10 = null; } else { _local8.push(_local9); _local8.push(_local10); _local8.push(_local7); _actions.push(new Action(Config.ACTION_REMOVE, _local8)); }; _local5++; }; _hud.undoButton.reset(); }; deleteSets(_local4); } public function get highlignting():Boolean{ return (_highlignting); } private function islandTextFading(_arg1:Event):void{ if (this.islandText){ if (this.loaderScreen){ return; }; if (this.fadeCounter >= 0){ this.fadeCounter++; if (this.fadeCounter > this.stage.frameRate){ this.fadeCounter = -1; }; return; }; this.islandText.alpha = (this.islandText.alpha - (this.islandText.alpha / 5)); if (Math.abs(this.islandText.alpha) < 0.001){ _layerStatic.removeChild(this.islandText); this.islandText = null; this.removeEventListener(Event.ENTER_FRAME, islandTextFading); if (this.phraseBaloon){ this.phraseBaloon.show(); }; }; } else { this.removeEventListener(Event.ENTER_FRAME, islandTextFading); }; } private function calcCost(_arg1, _arg2, _arg3:Number):Number{ var _local4:Number; var _local5:Point; var _local6:Point; var _local7:Point; var _local8:Number; if (_arg3 == 0){ return (0); }; _local4 = 0; if ((_arg1 is Point)){ _local5 = _arg1; } else { if ((_arg1 is AbstractParticle)){ _local5 = new Point(_arg1.px, _arg1.py); } else { return (0); }; }; if ((_arg2 is Point)){ _local6 = _arg2; } else { if ((_arg2 is AbstractParticle)){ _local6 = new Point(_arg2.px, _arg2.py); } else { return (0); }; }; _local7 = _local6.subtract(_local5); _local8 = _local7.length; if (_arg3 == Config.MATERIAL_DECK){ _local4 = (Config.MATERIAL_DECK_COST / Config.MATERIAL_DECK_MAX_LENGTH); } else { if (_arg3 == Config.MATERIAL_STEEL){ _local4 = (Config.MATERIAL_STEEL_COST / Config.MATERIAL_STEEL_MAX_LENGTH); } else { if (_arg3 == Config.MATERIAL_ROPE){ _local4 = (Config.MATERIAL_ROPE_COST / Config.MATERIAL_ROPE_MAX_LENGTH); }; }; }; _local4 = (_local4 * _local8); return (_local4); } private function outEditButton(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function zoomInHandler(_arg1:Event):void{ zoomIn(); } public function setLevelSolution(_arg1:Object):void{ var _local2:Array; var _local3:int; var _local4:Array; var _local5:int; var _local6:Array; var _local7:int; var _local8:CircleParticle; var _local9:Object; var _local10:Array; var _local11:Sprite; var _local12:*; var _local13:Point; if (!_arg1){ return; }; if (((!(_arg1["particles"])) || (!(_arg1["constraints"])))){ return; }; if ((((_arg1["particles"].length == 0)) || ((_arg1["constraints"].length == 0)))){ return; }; _local2 = []; _local3 = 0; while (_local3 < _groupMaterials.constraints.length) { if ((_groupMaterials.constraints[_local3] as SpringConstraint).numSets() > 0){ _local6 = (_groupMaterials.constraints[_local3] as SpringConstraint).getSets(0); _local7 = 0; while (_local7 < _local6.length) { if (_local2.indexOf(_local6[_local7]) == -1){ _local2.push(_local6[_local7]); }; _local7++; }; }; _local3++; }; this.deleteSetUnderPoint(0, 0, _local2); _local4 = _arg1["particles"]; _local5 = _local4.length; _local3 = 0; while (_local3 < _local5) { _local9 = _local4[_local3]; _local10 = _groupMaterials.getObjectsUnderPoint(_local9.px, _local9.py); if (_local10.length > 0){ _local8 = _local10[0]; } else { if (_layerEngine != null){ _local11 = new Sprite(); _local11.addChild(new LinkElement()); _local11.name = "link"; _layerEngine.addChild(_local11); }; _local8 = new CircleParticle(_local9.px, _local9.py, Config.POINT_RADIUS, false, Config.POINT_MASS, Config.POINT_ELASTICITY, 0, _local11); _local8.collidable = false; _groupMaterials.addParticle(_local8); }; _local4[_local3] = _local8; _local3++; }; this.solutionObj = _arg1; this.currSlnConstraint = 0; this.constraintsCounter = 0; this.numSlnConstraints = 0; _local3 = 0; while (_local3 < _arg1["constraints"].length) { if (_arg1["constraints"][_local3]["material"] == Config.MATERIAL_ROPE){ _local12 = _arg1["constraints"][_local3]; _local13 = new Point((_local4[_local12.particleB].px - _local4[_local12.particleA].px), (_local4[_local12.particleB].py - _local4[_local12.particleA].py)); if (_local13.length < Config.MATERIAL_ROPE_BLOCK_LENGTH){ this.numSlnConstraints = (this.numSlnConstraints + 1); } else { this.numSlnConstraints = (this.numSlnConstraints + Math.floor((_local13.length / Config.MATERIAL_ROPE_BLOCK_LENGTH))); }; } else { this.numSlnConstraints++; }; _local3++; }; this.loaderScreen = new LoaderScreen(this.levelWeather); this.addChild(this.loaderScreen); this.dispatchEvent(new Event(Config.EVENT_LEVEL_START_LOADING, true)); _counter = 0; this.addEventListener(Event.ENTER_FRAME, waitBeforeBuilding, false, 0, true); } private function scrollUpHandler(_arg1:Event):void{ scrollUp(); } private function set scrolling(_arg1:Boolean):void{ _scrolling = _arg1; } private function popupButtonMapHandler(_arg1:Event):void{ this.removeChild(this._fader); this._fader = null; removePopUp(); dispatchEvent(new Event(Config.EVENT_LEVEL_CLOSE, true)); } private function getMaterialBySet(_arg1:Number):Number{ var _local2:Number; var _local3:int; _local2 = 0; _local3 = 0; while (_local3 < _sets.length) { if (_sets[_local3].x == _arg1){ _local2 = _sets[_local3].y; break; }; _local3++; }; return (_local2); } } }//package levels
Section 246
//LevelZone (levels.LevelZone) package levels { import picaso.geom.*; public class LevelZone extends RectangleAdvanced { private var _type:String; public static const FINISH:String = "finishzone"; public static const LEFT:String = "leftzone"; public static const RIGHT:String = "rightzone"; public function LevelZone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String){ super(_arg1, _arg2, _arg3, _arg4); _type = _arg5; } public function get type():String{ return (_type); } public function set type(_arg1:String):void{ _type = _arg1; } } }//package levels
Section 247
//SurfacePoint (levels.SurfacePoint) package levels { import flash.geom.*; public class SurfacePoint extends Point { private var _onlySteel:Boolean;// = false private var _hookDirectionX:int;// = 1 private var _hookDirectionY:int;// = 1 private var _pin:Boolean;// = false private var _hookRotation:Number;// = 0 private var _needHook:Boolean;// = false public static const HOOK_DIRECTION_INVERT:int = -1; public static const HOOK_DIRECTION_NORMAL:int = 1; public function SurfacePoint(_arg1:Number=0, _arg2:Number=0, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Number=0, _arg7:int=1, _arg8:int=1){ _pin = false; _needHook = false; _onlySteel = false; _hookRotation = 0; _hookDirectionX = SurfacePoint.HOOK_DIRECTION_NORMAL; _hookDirectionY = SurfacePoint.HOOK_DIRECTION_NORMAL; if (_arg3){ _pin = _arg3; }; super(_arg1, _arg2); _needHook = _arg4; _onlySteel = _arg5; _hookRotation = _arg6; _hookDirectionX = _arg7; _hookDirectionY = _arg8; } public function set hookRotation(_arg1:Number):void{ _hookRotation = _arg1; } public function get hookRotation():Number{ return (_hookRotation); } public function set hookDirectionY(_arg1:int):void{ _hookDirectionY = _arg1; } public function get pin():Boolean{ return (_pin); } public function get onlySteel():Boolean{ return (_onlySteel); } public function set hookDirectionX(_arg1:int):void{ _hookDirectionX = _arg1; } public function set hook(_arg1:Boolean):void{ _needHook = _arg1; } public function get hook():Boolean{ return (_needHook); } public function set pin(_arg1:Boolean):void{ _pin = _arg1; } public function get hookDirectionX():int{ return (_hookDirectionX); } public function get hookDirectionY():int{ return (_hookDirectionY); } public function set onlySteel(_arg1:Boolean):void{ _onlySteel = _arg1; } } }//package levels
Section 248
//wav (lose.wav) package lose { import flash.media.*; public dynamic class wav extends Sound { } }//package lose
Section 249
//wav (main_theme.wav) package main_theme { import flash.media.*; public dynamic class wav extends Sound { } }//package main_theme
Section 250
//LevelSelectButton (map.LevelSelectButton) package map { import flash.display.*; import flash.text.*; public dynamic class LevelSelectButton extends MovieClip { private var _levelId:int; public var levelId:TextField; private var _levelTextField:TextField; public static const OPENED:int = 1; public static const SCORED:int = 3; public static const CLOSED:int = 2; public function LevelSelectButton(){ this._levelTextField = this["levelId"]; this._levelId = 0; this._levelTextField.text = this._levelId.toString(); this.active = false; } public function set level(_arg1:int):void{ this._levelId = _arg1; this._levelTextField.text = _arg1.toString(); } public function set state(_arg1:int):void{ if (_arg1 == LevelSelectButton.CLOSED){ this.gotoAndStop(3); } else { if (_arg1 == LevelSelectButton.OPENED){ this.gotoAndStop(2); } else { if (_arg1 == LevelSelectButton.SCORED){ this.gotoAndStop(1); }; }; }; } public function get level():int{ return (this._levelId); } public function get state():int{ return (this.currentFrame); } } }//package map
Section 251
//MapClass (map.MapClass) package map { import flash.display.*; import core.*; import flash.events.*; import flash.net.*; import flash.text.*; import vis.*; import popup.*; public dynamic class MapClass extends Sprite { public var nextButton:SimpleButton; private var _openedLevels:Array; private var _totalLevels:int; private var outroButton:SimpleButton; private var scores:Number; public var prevButton:SimpleButton; public var introBtn:SimpleButton; public var playBonusLevelsBtn:LinkToCS; public var outroBtn:SimpleButton; private var _page:int; private var quitSubmitButton:SimpleButton; public var closeButton:SimpleButton; private var playBonusLevelsButton:SimpleButton; public var scoreTF:TextField; public var quitSubmitBtn:SimpleButton; private var _closeButton:SimpleButton; private var _numOpenedLevels:int;// = 0 private var _levelsScore:Array; private var _winPopUp:BigPopUpCompleteGame; private var _levelSelected:Number; private var introButton:SimpleButton; private var _nextButton:SimpleButton; private var _lastOpenedLevel:int; private var _prevButton:SimpleButton; public function MapClass(_arg1:int, _arg2:Array=null, _arg3:Array=null, _arg4:Boolean=false, _arg5:int=0){ var _local6:int; var _local7:BlueSky; var _local8:SharedObject; _numOpenedLevels = 0; super(); this._totalLevels = _arg1; this._levelsScore = _arg2; if (this._levelsScore == null){ this._levelsScore = new Array(); }; scores = 0; _local6 = 0; while (_local6 < this._totalLevels) { if (this._levelsScore.length == _local6){ this._levelsScore.push(0); }; scores = (scores + this._levelsScore[_local6]); _local6++; }; _openedLevels = _arg3; if (_openedLevels == null){ _openedLevels = []; }; _local6 = 0; while (_local6 < _totalLevels) { if (_openedLevels.length == _local6){ _openedLevels.push(false); }; _local6++; }; _numOpenedLevels = 0; _local6 = 0; while (_local6 < _openedLevels.length) { if (_openedLevels[_local6]){ _numOpenedLevels++; }; _local6++; }; this._lastOpenedLevel = -1; _local6 = 0; while (_local6 < this._totalLevels) { if (_levelsScore[_local6] > 0){ _lastOpenedLevel++; } else { break; }; _local6++; }; this["scoreTF"].embedFonts = true; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this["scoreTF"].text = ("Total Score: " + scores.toString()); } else { this["scoreTF"].text = ("Ваш результат: " + scores.toString()); }; _local7 = new BlueSky(); _local7.scaleX = (Config.SCREEN_WIDTH / _local7.width); _local7.x = (_local7.x - (Config.SCREEN_WIDTH / 2)); _local7.y = (_local7.y - (Config.SCREEN_HEIGHT / 2)); this.addChildAt(_local7, 0); this._closeButton = this["closeButton"]; this._closeButton.addEventListener(MouseEvent.CLICK, clickCloseHandler, false, 0, true); this._closeButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._closeButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this._nextButton = this["nextButton"]; this._nextButton.addEventListener(MouseEvent.CLICK, clickNextHandler, false, 0, true); this._nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this._prevButton = this["prevButton"]; this._prevButton.addEventListener(MouseEvent.CLICK, clickPrevHandler, false, 0, true); this._prevButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._prevButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.quitSubmitButton = this["quitSubmitBtn"]; this.quitSubmitButton.addEventListener(MouseEvent.CLICK, clickSubmitHandler, false, 0, true); this.quitSubmitButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.quitSubmitButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.introButton = this["introBtn"]; this.introButton.addEventListener(MouseEvent.CLICK, clickIntroHandler, false, 0, true); this.introButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.introButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.introButton.visible = false; this.outroButton = this["outroBtn"]; this.outroButton.addEventListener(MouseEvent.CLICK, clickOutroHandler, false, 0, true); this.outroButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.outroButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.outroButton.visible = false; this.playBonusLevelsButton = this["playBonusLevelsBtn"]; this.playBonusLevelsButton.addEventListener(MouseEvent.CLICK, clickPlayBonusLevelsHandler, false, 0, true); this.playBonusLevelsButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.playBonusLevelsButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); if (Config.VIRAL){ this.playBonusLevelsButton.visible = true; } else { this.playBonusLevelsButton.visible = false; }; this.page = _arg5; if (_arg1 <= 30){ this._nextButton.visible = false; this._prevButton.visible = false; }; putLevelsButtons(); _local8 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local8.size == 0){ return; }; if (((!((_local8.data.intro == null))) && (!(_local8.data.intro)))){ this.introButton.visible = true; }; if (((!((_local8.data.win == null))) && (!(_local8.data.win)))){ if (!Config.VIRAL){ this.outroButton.visible = true; } else { this.playBonusLevelsButton.visible = true; }; }; } public function set page(_arg1:int):void{ this._nextButton.visible = true; this._prevButton.visible = true; if (_arg1 <= 0){ _arg1 = 0; this._prevButton.visible = false; }; if (((_arg1 * 30) + 30) > this._totalLevels){ _arg1 = Math.floor((this._totalLevels / 30)); if ((this._totalLevels % 30) == 0){ _arg1--; }; this._nextButton.visible = false; }; this._page = _arg1; this.putLevelsButtons(); } private function clickNextHandler(_arg1:MouseEvent):void{ this.page++; putLevelsButtons(); } public function putLevelsButtons():void{ var _local1:int; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:LevelSelectButton; _local1 = 0; while (_local1 < this.numChildren) { if ((this.getChildAt(_local1) is LevelSelectButton)){ this.removeChildAt(_local1); } else { _local1++; }; }; _local2 = -170; _local3 = _local2; _local4 = -30; _local5 = (this.page * 30); _local6 = (((_local5 + 30))>this._totalLevels) ? this._totalLevels : (_local5 + 30); _local1 = _local5; while (_local1 < _local6) { _local7 = new LevelSelectButton(); _local7.level = (_local1 + 1); _local7.x = _local3; _local7.y = _local4; if (_openedLevels[_local1]){ if (_levelsScore[_local1] > 0){ _local7.state = LevelSelectButton.SCORED; _local7.addEventListener(MouseEvent.CLICK, clickLevelHandler, false, 0, true); _local7.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); _local7.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } else { _local7.state = LevelSelectButton.OPENED; _local7.addEventListener(MouseEvent.CLICK, clickLevelHandler, false, 0, true); _local7.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); _local7.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; } else { if ((((_local1 == (this._lastOpenedLevel + 1))) && ((_numOpenedLevels < Config.MAX_OPENED_LEVELS)))){ _local7.state = LevelSelectButton.OPENED; _local7.addEventListener(MouseEvent.CLICK, clickLevelHandler, false, 0, true); _local7.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); _local7.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); } else { _local7.state = LevelSelectButton.CLOSED; }; }; this.addChild(_local7); _local3 = (_local3 + _local7.width); if (((_local1 + 1) % 10) == 0){ _local4 = (_local4 + _local7.height); _local3 = _local2; }; _local1++; }; } private function clickOutroHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_SHOW_OUTRO, true)); } private function clickSubmitHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MAP_SUBMIT, true)); } public function get page():int{ return (this._page); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickLevelHandler(_arg1:MouseEvent):void{ var _local2:LevelSelectButton; _local2 = (_arg1.currentTarget as LevelSelectButton); this.dispatchEvent(new MapEvent(_local2.level)); } private function clickCloseHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MAP_CLOSE, true)); } public function cleanup():void{ var _local1:int; var _local2:LevelSelectButton; this._closeButton.removeEventListener(MouseEvent.CLICK, clickCloseHandler); this._closeButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this._closeButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this._nextButton.removeEventListener(MouseEvent.CLICK, clickNextHandler); this._nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this._nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this._prevButton.removeEventListener(MouseEvent.CLICK, clickPrevHandler); this._prevButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this._prevButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.quitSubmitButton.removeEventListener(MouseEvent.CLICK, clickSubmitHandler); this.quitSubmitButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.quitSubmitButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.introButton.removeEventListener(MouseEvent.CLICK, clickIntroHandler); this.introButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.introButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.outroButton.removeEventListener(MouseEvent.CLICK, clickOutroHandler); this.outroButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.outroButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.playBonusLevelsButton.removeEventListener(MouseEvent.CLICK, clickPlayBonusLevelsHandler); this.playBonusLevelsButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.playBonusLevelsButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); _levelsScore = null; _openedLevels = null; _local1 = 0; while (_local1 < this.numChildren) { if ((this.getChildAt(_local1) is LevelSelectButton)){ _local2 = (this.getChildAt(_local1) as LevelSelectButton); _local2.removeEventListener(MouseEvent.CLICK, clickLevelHandler); _local2.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); _local2.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.removeChildAt(_local1); } else { _local1++; }; }; } private function clickIntroHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_SHOW_INTRO, true)); } private function clickPrevHandler(_arg1:MouseEvent):void{ this.page--; putLevelsButtons(); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function clickPlayBonusLevelsHandler(_arg1:MouseEvent):void{ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ navigateToURL(new URLRequest(Config.BC_ON_CS_URL), "_blank"); } else { if (Config.LANGUAGE == Config.LANGUAGE_RUS){ navigateToURL(new URLRequest(Config.BC_ON_PLAYIT_URL), "_blank"); }; }; } } }//package map
Section 252
//MapEvent (map.MapEvent) package map { import core.*; import flash.events.*; public class MapEvent extends Event { public var level:Number; public function MapEvent(_arg1:Number){ var _local2:String; var _local3:Boolean; var _local4:Boolean; this.level = _arg1; _local2 = Config.EVENT_MAP_LEVEL_SELECT; _local3 = true; _local4 = false; super(_local2, _local3, _local4); } } }//package map
Section 253
//CreditsButton (menu.CreditsButton) package menu { import flash.display.*; public class CreditsButton extends SimpleButton { } }//package menu
Section 254
//CreditsClass (menu.CreditsClass) package menu { import flash.display.*; import core.*; import flash.events.*; import vis.*; import hud.*; public dynamic class CreditsClass extends MovieClip { public var closeButton:HomeButton; private var _closeButton:SimpleButton; public function CreditsClass(){ var _local1:BlueSky; super(); _local1 = new BlueSky(); _local1.scaleX = (Config.SCREEN_WIDTH / _local1.width); _local1.x = (_local1.x - (Config.SCREEN_WIDTH / 2)); _local1.y = (_local1.y - (Config.SCREEN_HEIGHT / 2)); addChildAt(_local1, 0); _closeButton = this["closeButton"]; _closeButton.addEventListener(MouseEvent.CLICK, clickHandler); _closeButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); _closeButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickHandler(_arg1:MouseEvent):void{ cleanup(); this.dispatchEvent(new Event(Config.EVENT_CREDITS_CLOSE, true)); } public function cleanup():void{ if (_closeButton.hasEventListener(MouseEvent.CLICK)){ _closeButton.removeEventListener(MouseEvent.CLICK, clickHandler); }; if (_closeButton.hasEventListener(MouseEvent.MOUSE_OVER)){ _closeButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (_closeButton.hasEventListener(MouseEvent.MOUSE_OUT)){ _closeButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package menu
Section 255
//HelpButton (menu.HelpButton) package menu { import flash.display.*; public class HelpButton extends SimpleButton { } }//package menu
Section 256
//InGameMenu (menu.InGameMenu) package menu { import flash.display.*; import core.*; import flash.events.*; public dynamic class InGameMenu extends MovieClip { private var _menuButton:SimpleButton; private var levelIndexSprite:Sprite; public var line:MovieClip; private var _mapButton:SimpleButton; public var resume:SimpleButton; public var help:HelpButton; public var menu:SimpleButton; public var map:SimpleButton; public var islandMC:IslandTextWS; private var _helpButton:SimpleButton; public var quitSubmitBtn:SimpleButton; private var _helpScreen:HelpClass; private var _resumeButton:SimpleButton; private var _helpIsOnScreen:Boolean;// = false private var _quitSubmitButton:SimpleButton; public static const ON_HELP:String = "onHelpFromPause"; public static const ON_QUIT_SUBMIT:String = "onQuitSubmitFromPause"; public static const ON_MAP:String = "onMapFromPause"; public static const ON_RESUME:String = "onResumeFromPause"; public static const ON_MENU:String = "onMenuFromPause"; public function InGameMenu(_arg1:int=0){ _helpIsOnScreen = false; super(); this.init(_arg1); } public function init(_arg1:int=0){ var _local2:int; var _local3:Digit; this.levelIndexSprite = new Sprite(); _local2 = 0; while (_arg1 > 0) { _local3 = new Digit(((_arg1 % 10) as int)); _local3.x = (_local2 - (_local3.width / 2)); _local3.y = 0; this.levelIndexSprite.addChild(_local3); _arg1 = (_arg1 / 10); _local2 = (_local2 - (_local3.width + 5)); }; this.levelIndexSprite.x = this.levelIndexSprite.width; if (Config.LANGUAGE == Config.LANGUAGE_RUS){ this.levelIndexSprite.x = (this.levelIndexSprite.x + 30); }; this.levelIndexSprite.y = -148; this.addChild(levelIndexSprite); this._resumeButton = this["resume"]; this._resumeButton.addEventListener(MouseEvent.CLICK, onResumeHandler, false, 0, true); this._resumeButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._resumeButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this._helpButton = this["help"]; this._helpButton.addEventListener(MouseEvent.CLICK, onHelpHandler, false, 0, true); this._helpButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._helpButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this._mapButton = this["map"]; this._mapButton.addEventListener(MouseEvent.CLICK, onMapHandler, false, 0, true); this._mapButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._mapButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this._menuButton = this["menu"]; this._menuButton.addEventListener(MouseEvent.CLICK, onMenuHandler, false, 0, true); this._menuButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._menuButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); _quitSubmitButton = this["quitSubmitBtn"]; this._quitSubmitButton.addEventListener(MouseEvent.CLICK, onQuitSubmitHandler, false, 0, true); this._quitSubmitButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._quitSubmitButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); if (this._helpIsOnScreen){ this.hideHelp(); }; } private function onQuitSubmitHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(ON_QUIT_SUBMIT, true)); } private function helpFadeIn(_arg1:Event):void{ if (Math.abs((1 - _helpScreen.alpha)) > 0.01){ _helpScreen.alpha = (_helpScreen.alpha + (Math.abs((1 - _helpScreen.alpha)) / 2)); } else { _helpScreen.alpha = 1; _helpScreen.removeEventListener(Event.ENTER_FRAME, helpFadeIn); }; } private function onHelpHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(InGameMenu.ON_HELP, true)); this.showHelp(); GAManager.trackPage("/help-pressed"); } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function onMapHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(InGameMenu.ON_MAP, true)); } private function helpFadeOut(_arg1:Event):void{ if (_helpScreen.alpha > 0.01){ _helpScreen.alpha = (_helpScreen.alpha - (Math.abs(_helpScreen.alpha) / 2)); } else { _helpScreen.removeEventListener(Event.ENTER_FRAME, helpFadeOut); this.removeChild(this._helpScreen); this._helpScreen.cleanup(); this._helpScreen = null; this._helpIsOnScreen = false; }; } public function cleanup():void{ if (this._resumeButton.hasEventListener(MouseEvent.CLICK)){ this._resumeButton.removeEventListener(MouseEvent.CLICK, onResumeHandler); }; if (this._resumeButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this._resumeButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this._resumeButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this._resumeButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this._helpButton.hasEventListener(MouseEvent.CLICK)){ this._helpButton.removeEventListener(MouseEvent.CLICK, onHelpHandler); }; if (this._helpButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this._helpButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this._helpButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this._helpButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this._mapButton.hasEventListener(MouseEvent.CLICK)){ this._mapButton.removeEventListener(MouseEvent.CLICK, onMapHandler); }; if (this._mapButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this._mapButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this._mapButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this._mapButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this._menuButton.hasEventListener(MouseEvent.CLICK)){ this._menuButton.removeEventListener(MouseEvent.CLICK, onMenuHandler); }; if (this._menuButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this._menuButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this._menuButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this._menuButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this._quitSubmitButton.hasEventListener(MouseEvent.CLICK)){ this._quitSubmitButton.removeEventListener(MouseEvent.CLICK, onQuitSubmitHandler); }; if (this._quitSubmitButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this._quitSubmitButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this._quitSubmitButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this._quitSubmitButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this._helpScreen != null){ if (this._helpScreen.hasEventListener(Config.EVENT_HELP_CLOSE)){ this._helpScreen.removeEventListener(Config.EVENT_HELP_CLOSE, hideHelp); }; }; } private function onMenuHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(InGameMenu.ON_MENU, true)); } private function hideHelp(_arg1:Event=null):void{ if (!this._helpIsOnScreen){ return; }; if (_arg1 != null){ if (_arg1.cancelable){ _arg1.stopPropagation(); }; }; if (this._helpScreen.hasEventListener(Config.EVENT_HELP_CLOSE)){ this._helpScreen.removeEventListener(Config.EVENT_HELP_CLOSE, hideHelp); }; this._resumeButton.visible = true; this._helpButton.visible = true; this._mapButton.visible = true; this._menuButton.visible = true; _quitSubmitButton.visible = true; this.levelIndexSprite.visible = true; this["line"].visible = true; this["islandMC"].visible = true; this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); if (_helpScreen.hasEventListener(Event.ENTER_FRAME)){ _helpScreen.removeEventListener(Event.ENTER_FRAME, helpFadeIn); }; _helpScreen.addEventListener(Event.ENTER_FRAME, helpFadeOut, false, 0, true); } private function onResumeHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(InGameMenu.ON_RESUME, true)); } private function showHelp():void{ if (this._helpIsOnScreen){ return; }; this._resumeButton.visible = false; this._helpButton.visible = false; this._mapButton.visible = false; this._menuButton.visible = false; _quitSubmitButton.visible = false; levelIndexSprite.visible = false; this["line"].visible = false; this["islandMC"].visible = false; this._helpScreen = new HelpClass(false); _helpScreen.alpha = 0; this.addChild(this._helpScreen); this._helpIsOnScreen = true; _helpScreen.alpha = 0; _helpScreen.addEventListener(Event.ENTER_FRAME, helpFadeIn, false, 0, true); this._helpScreen.addEventListener(Config.EVENT_HELP_CLOSE, hideHelp, false, 0, true); } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package menu
Section 257
//IntroClass (menu.IntroClass) package menu { import flash.display.*; import core.*; import flash.events.*; import picaso.*; import sounds.*; import vis.*; public dynamic class IntroClass extends MovieClip { private var fade:Boolean; private var _musicFroSlide2WasPlayed:Boolean; public function IntroClass(){ var _local1:BlueSky; super(); fade = SoundManager.fade; SoundManager.fade = true; x = (Config.SCREEN_WIDTH / 2); y = (Config.SCREEN_HEIGHT / 2); addEventListener(Event.ENTER_FRAME, enterFrameHandler); this.skipButton.addEventListener(MouseEvent.CLICK, onSkipHandler); this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.nextButton.addEventListener(MouseEvent.CLICK, onNextHandler); this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); _local1 = new BlueSky(); _local1.scaleX = (Config.SCREEN_WIDTH / _local1.width); _local1.x = (-(Config.SCREEN_WIDTH) / 2); _local1.y = (-(Config.SCREEN_HEIGHT) / 2); addChildAt(_local1, 0); _musicFroSlide2WasPlayed = false; } private function enterFrameHandler(_arg1:Event):void{ if (currentFrame == 5){ stop(); if (!SoundManager.isSoundPlaying(SoundData.MAIN_THEME)){ SoundData.MAIN_THEME.play(); }; }; if (currentFrame == 6){ if (((!(_musicFroSlide2WasPlayed)) && (!(SoundManager.isSoundPlaying(SoundData.INTRO_SLIDE_2))))){ SoundData.INTRO_SLIDE_2.play(); _musicFroSlide2WasPlayed = true; }; }; if (currentFrame == 15){ stop(); }; if (currentFrame == 25){ stop(); if (!SoundManager.isSoundPlaying(SoundData.INTRO_SLIDE_3)){ SoundData.INTRO_SLIDE_3.play(); }; this.skipButton.visible = false; this.nextButton.x = 0; }; if (currentFrame == totalFrames){ dispatchEvent(new Event(Config.EVENT_INTRO_CLOSE, true)); }; } private function onSkipHandler(_arg1:MouseEvent):void{ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); GAManager.trackPage("/intro-skipped"); this.skipButton.removeEventListener(MouseEvent.CLICK, onSkipHandler); this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this.nextButton.removeEventListener(MouseEvent.CLICK, onNextHandler); this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); dispatchEvent(new Event(Config.EVENT_INTRO_CLOSE, true)); } private function onNextHandler(_arg1:MouseEvent):void{ play(); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function cleanup():void{ if (this.hasEventListener(Event.ENTER_FRAME)){ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkipHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNextHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; while (numChildren > 0) { removeChildAt(0); }; SoundManager.fade = this.fade; } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package menu
Section 258
//MenuClass (menu.MenuClass) package menu { import flash.display.*; import core.*; import flash.events.*; import flash.net.*; import flash.text.*; import vis.*; import water.*; import characters.*; public dynamic class MenuClass extends MovieClip { private var easy:Boolean; private var scoreNormal:Number;// = 0 private var bubbleOption:Boolean;// = true public var helpButtonObj:HelpButton; public var wtBtn:SimpleButton; public var quitButton:SimpleButton; private var fadingOut:Boolean;// = false public var creditsButton:CreditsButton; public var easyButtonObj:SimpleButton; private var continueButton:SimpleButton; public var quitButtonObj:SimpleButton; private var _chubrik:Glazan; private var normal:Boolean; public var creditsButtonObj:CreditsButton; private var startNewGame:Boolean;// = false private var hard:Boolean; private var fadeDivider:Number;// = 3 private var normalButton:SimpleButton; private var talkBaloon:TalkBaloon; private var walkthroughButton:SimpleButton; public var normalButtonObj:SimpleButton; private var fadingIn:Boolean;// = false private var eventString:String;// = "" private var submitScore:Boolean;// = false public var continueButtonObj:SimpleButton; public var playButtonObj:SimpleButton; public var playButton:SimpleButton; private var scoreEasy:Number;// = 0 public var helpButton:HelpButton; private var easyButton:SimpleButton; private var counter:int;// = 0 private var firstText:Boolean;// = false public function MenuClass(){ var _local1:Number; var _local2:Water; var _local3:Water; var _local4:Water; var _local5:Water; var _local6:Water; var _local7:Water; var _local8:Water; var _local9:Clouds; var _local10:int; var _local11:SharedObject; var _local12:Glazan; var _local13:TextFormat; var _local14:String; var _local15:int; fadeDivider = 3; fadingIn = false; fadingOut = false; eventString = ""; bubbleOption = true; counter = 0; startNewGame = false; submitScore = false; scoreEasy = 0; scoreNormal = 0; firstText = false; super(); _local1 = 450; _local2 = new Water(7, 640); _local2.y = _local1; this.addChild(_local2); _local2.launch(5, Math.PI, 50); _local3 = new Water(6, 640); _local3.y = (_local1 - 20); this.addChildAt(_local3, 4); _local3.launch(5, (Math.PI / 2), 50); _local4 = new Water(5, 640); _local4.y = (_local1 - 35); this.addChildAt(_local4, 3); _local4.launch(4, (Math.PI / 4), 50); _local5 = new Water(4, 640); _local5.y = (_local1 - 40); this.addChildAt(_local5, 3); _local5.launch(3, (Math.PI / 10), 60); _local6 = new Water(3, 640); _local6.y = (_local1 - 45); this.addChildAt(_local6, 2); _local6.launch(2, (Math.PI / 25), 70); _local7 = new Water(2, 640); _local7.y = (_local1 - 50); this.addChildAt(_local7, 2); _local7.launch(2, (Math.PI / 50), 80); _local8 = new Water(1, 640); _local8.y = (_local1 - 55); this.addChildAt(_local8, 1); _local8.launch(2, 0, 100); _local10 = 0; while (_local10 < 3) { _local9 = new Clouds(); _local9.x = (Math.random() * Config.SCREEN_WIDTH); this.addChildAt(_local9, Math.round(((Math.random() * 5) + 1))); _local10++; }; playButton = this["playButtonObj"]; playButton.addEventListener(MouseEvent.CLICK, onPlay, false, 0, true); playButton.addEventListener(MouseEvent.MOUSE_OVER, overPlay, false, 0, true); playButton.addEventListener(MouseEvent.MOUSE_OUT, outPlay, false, 0, true); helpButton = this["helpButtonObj"]; helpButton.addEventListener(MouseEvent.CLICK, onHelp, false, 0, true); helpButton.addEventListener(MouseEvent.MOUSE_OVER, overHelp, false, 0, true); helpButton.addEventListener(MouseEvent.MOUSE_OUT, outHelp, false, 0, true); creditsButton = this["creditsButtonObj"]; creditsButton.addEventListener(MouseEvent.CLICK, onCredits, false, 0, true); creditsButton.addEventListener(MouseEvent.MOUSE_OVER, overCredits, false, 0, true); creditsButton.addEventListener(MouseEvent.MOUSE_OUT, outCredits, false, 0, true); quitButton = this["quitButtonObj"]; quitButton.addEventListener(MouseEvent.CLICK, onQuit, false, 0, true); quitButton.addEventListener(MouseEvent.MOUSE_OVER, overQuit, false, 0, true); quitButton.addEventListener(MouseEvent.MOUSE_OUT, outQuit, false, 0, true); continueButton = this["continueButtonObj"]; continueButton.addEventListener(MouseEvent.CLICK, onContinue, false, 0, true); continueButton.addEventListener(MouseEvent.MOUSE_OVER, overContinue, false, 0, true); continueButton.addEventListener(MouseEvent.MOUSE_OUT, outContinue, false, 0, true); easyButton = this["easyButtonObj"]; easyButton.addEventListener(MouseEvent.CLICK, onEasy, false, 0, true); easyButton.addEventListener(MouseEvent.MOUSE_OVER, overEasy, false, 0, true); easyButton.addEventListener(MouseEvent.MOUSE_OUT, outEasy, false, 0, true); normalButton = this["normalButtonObj"]; normalButton.addEventListener(MouseEvent.CLICK, onNormal, false, 0, true); normalButton.addEventListener(MouseEvent.MOUSE_OVER, overNormal, false, 0, true); normalButton.addEventListener(MouseEvent.MOUSE_OUT, outNormal, false, 0, true); walkthroughButton = this["wtBtn"]; walkthroughButton.addEventListener(MouseEvent.CLICK, onWalkthrough, false, 0, true); walkthroughButton.addEventListener(MouseEvent.MOUSE_OVER, overWalkthrough, false, 0, true); walkthroughButton.addEventListener(MouseEvent.MOUSE_OUT, outWalkthrough, false, 0, true); this.easyButton.visible = false; this.normalButton.visible = false; this.continueButton.visible = false; _local11 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local11.size > 0){ this.easy = Boolean(_local11.data["easy"]); this.normal = Boolean(_local11.data["normal"]); this.hard = false; this.continueButton.visible = Boolean(((((this.easy) || (this.normal))) || (this.hard))); }; _local12 = new Glazan(0, 0, false); _local12.x = (558 + 30); _local12.y = 332; _local12.stand(); this.addChildAt(_local12, 14); this._chubrik = _local12; this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); this.talkBaloon = new TalkBaloon(); this.talkBaloon.x = _local12.x; this.talkBaloon.y = (_local12.y - 30); this.talkBaloon.scaleX = -0.6; this.talkBaloon.scaleY = 0.6; this.talkBaloon.fontSize = 24; this.talkBaloon.textField.scaleX = -1; this.talkBaloon.textField.x = (this.talkBaloon.textField.x - 26); this.talkBaloon.textFieldY = (this.talkBaloon.textFieldY + 5); this.addChild(this.talkBaloon); this.talkBaloon.centeredText = true; this.talkBaloon.show(); _local13 = this.talkBaloon.textField.defaultTextFormat; _local13.size = 24; _local13.align = "center"; this.talkBaloon.textField.defaultTextFormat = _local13; if (_local11.size > 0){ if (_local11.data.nameIsEntered){ _local14 = _local11.data.name; }; }; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ if (_local14){ this.talkBaloon.text = (("Hello, " + _local14) + "!"); } else { this.talkBaloon.text = "Hello!"; }; } else { if (_local14){ this.talkBaloon.text = (("Привет, " + _local14) + "!"); } else { this.talkBaloon.text = "Привет!"; }; }; firstText = true; scoreEasy = 0; if (Config.easyLevels){ _local15 = 0; while (_local15 < Config.easyLevels.length) { scoreEasy = (scoreEasy + Config.easyLevels[_local15]); _local15++; }; }; scoreNormal = 0; if (Config.normalLevels){ _local15 = 0; while (_local15 < Config.normalLevels.length) { scoreNormal = (scoreNormal + Config.normalLevels[_local15]); _local15++; }; }; this.counter = 0; } private function enterFrameHandler(_arg1:Event):void{ var _local2:Number; if (this.counter >= 0){ this.counter++; }; _local2 = (firstText) ? (this.stage.frameRate * 2) : (this.stage.frameRate / 2); if (((this.stage) && ((this.counter >= _local2)))){ this.counter = -1; this.talkBaloon.hide(); firstText = false; }; if (this._chubrik.actions.length == 0){ if (Math.random() > 0.99){ this._chubrik.wave(); this._chubrik.stand(); }; }; } private function overPlay(_arg1:MouseEvent):void{ this.counter = -1; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = "Start a new game!"; } else { this.talkBaloon.text = "Хотите начать новую игру? Нажмите на эту кнопку!"; }; this.talkBaloon.show(); firstText = false; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function outContinue(_arg1:MouseEvent):void{ this.counter = 0; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function overHelp(_arg1:MouseEvent):void{ this.counter = -1; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = "Help section! You’ll need this info!"; } else { this.talkBaloon.text = "Не знаете, что делать в игре? Тогда загляните сюда."; }; this.talkBaloon.show(); firstText = false; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } public function onStory(_arg1:MouseEvent){ dispatchEvent(new Event(Config.EVENT_ON_STORY, true)); } private function outEasy(_arg1:MouseEvent):void{ this.counter = 0; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function onEasy(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_PLAY_EASY, true)); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function cleanup():void{ if (playButton.hasEventListener(MouseEvent.CLICK)){ playButton.removeEventListener(MouseEvent.CLICK, onPlay); }; if (playButton.hasEventListener(MouseEvent.MOUSE_OVER)){ playButton.removeEventListener(MouseEvent.MOUSE_OVER, overPlay); }; if (playButton.hasEventListener(MouseEvent.MOUSE_OUT)){ playButton.removeEventListener(MouseEvent.MOUSE_OUT, outPlay); }; if (helpButton.hasEventListener(MouseEvent.CLICK)){ helpButton.removeEventListener(MouseEvent.CLICK, onHelp); }; if (helpButton.hasEventListener(MouseEvent.MOUSE_OVER)){ helpButton.removeEventListener(MouseEvent.MOUSE_OVER, overHelp); }; if (helpButton.hasEventListener(MouseEvent.MOUSE_OUT)){ helpButton.removeEventListener(MouseEvent.MOUSE_OUT, outHelp); }; if (creditsButton.hasEventListener(MouseEvent.CLICK)){ creditsButton.removeEventListener(MouseEvent.CLICK, onCredits); }; if (creditsButton.hasEventListener(MouseEvent.MOUSE_OVER)){ creditsButton.removeEventListener(MouseEvent.MOUSE_OVER, overCredits); }; if (creditsButton.hasEventListener(MouseEvent.MOUSE_OUT)){ creditsButton.removeEventListener(MouseEvent.MOUSE_OUT, outCredits); }; if (quitButton.hasEventListener(MouseEvent.CLICK)){ quitButton.removeEventListener(MouseEvent.CLICK, onQuit); }; if (quitButton.hasEventListener(MouseEvent.MOUSE_OVER)){ quitButton.removeEventListener(MouseEvent.MOUSE_OVER, overQuit); }; if (quitButton.hasEventListener(MouseEvent.MOUSE_OUT)){ quitButton.removeEventListener(MouseEvent.MOUSE_OUT, outQuit); }; if (continueButton.hasEventListener(MouseEvent.CLICK)){ continueButton.removeEventListener(MouseEvent.CLICK, onContinue); }; if (continueButton.hasEventListener(MouseEvent.MOUSE_OVER)){ continueButton.removeEventListener(MouseEvent.MOUSE_OVER, overContinue); }; if (continueButton.hasEventListener(MouseEvent.MOUSE_OUT)){ continueButton.removeEventListener(MouseEvent.MOUSE_OUT, outContinue); }; if (easyButton.hasEventListener(MouseEvent.CLICK)){ easyButton.removeEventListener(MouseEvent.CLICK, onEasy); }; if (easyButton.hasEventListener(MouseEvent.MOUSE_OVER)){ easyButton.removeEventListener(MouseEvent.MOUSE_OVER, overEasy); }; if (easyButton.hasEventListener(MouseEvent.MOUSE_OUT)){ easyButton.removeEventListener(MouseEvent.MOUSE_OUT, outEasy); }; if (normalButton.hasEventListener(MouseEvent.CLICK)){ normalButton.removeEventListener(MouseEvent.CLICK, onNormal); }; if (normalButton.hasEventListener(MouseEvent.MOUSE_OVER)){ normalButton.removeEventListener(MouseEvent.MOUSE_OVER, overNormal); }; if (normalButton.hasEventListener(MouseEvent.MOUSE_OUT)){ normalButton.removeEventListener(MouseEvent.MOUSE_OUT, outNormal); }; if (walkthroughButton.hasEventListener(MouseEvent.CLICK)){ walkthroughButton.removeEventListener(MouseEvent.CLICK, onWalkthrough); }; if (walkthroughButton.hasEventListener(MouseEvent.MOUSE_OVER)){ walkthroughButton.removeEventListener(MouseEvent.MOUSE_OVER, overWalkthrough); }; if (walkthroughButton.hasEventListener(MouseEvent.MOUSE_OUT)){ walkthroughButton.removeEventListener(MouseEvent.MOUSE_OUT, outWalkthrough); }; if (this.hasEventListener(Event.ENTER_FRAME)){ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; this.talkBaloon.cleanup(); this.talkBaloon = null; while (numChildren > 0) { removeChildAt(0); }; } private function outWalkthrough(_arg1:MouseEvent):void{ this.counter = 0; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function outQuit(_arg1:MouseEvent):void{ this.counter = 0; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function onQuit(_arg1:MouseEvent){ if ((((scoreEasy == 0)) && ((scoreNormal == 0)))){ return; }; this.dispatchEvent(new Event(Config.EVENT_ON_QUIT, true)); this.playButton.visible = false; this.helpButton.visible = false; this.quitButton.visible = false; this.creditsButton.visible = false; this.continueButton.visible = false; this.walkthroughButton.visible = false; this.easyButton.visible = ((this.easy) && (!((scoreEasy == 0)))); this.normalButton.visible = ((this.normal) && (!((scoreNormal == 0)))); if (((this.easyButton.visible) && (!(this.normalButton.visible)))){ this.dispatchEvent(new Event(Config.EVENT_PLAY_EASY, true)); this.resetMenu(); }; if (((!(this.easyButton.visible)) && (this.normalButton.visible))){ this.dispatchEvent(new Event(Config.EVENT_PLAY_NORMAL, true)); this.resetMenu(); }; if (((!(this.easyButton.visible)) && (this.normalButton.visible))){ this.normalButton.y = 280; }; this.startNewGame = false; this.submitScore = true; } private function overNormal(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; _local2 = 0; if (Config.normalLevels){ _local3 = 0; while (_local3 < Config.normalLevels.length) { if (Config.normalLevels[_local3] > 0){ _local2++; }; _local3++; }; }; this.counter = -1; if (this.startNewGame){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = "Start normal mode!"; } else { this.talkBaloon.text = "Выбирайте этот режим, если вам нравится решать сложные задачи."; }; this.talkBaloon.show(); } else { if (this.submitScore){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = (("Submit your normal mode score! (" + scoreNormal.toString()) + ")"); } else { if ((((_local2 == 0)) || ((_local2 >= 5)))){ this.talkBaloon.text = (((((("Вы набрали " + scoreNormal.toString()) + " очков. Пройдено ") + _local2.toString()) + " уровней из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { if (_local2 == 1){ this.talkBaloon.text = (((((("Вы набрали " + scoreNormal.toString()) + " очков. Пройден ") + _local2.toString()) + " уровень из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { this.talkBaloon.text = (((((("Вы набрали " + scoreNormal.toString()) + " очков. Пройдено ") + _local2.toString()) + " уровня из ") + Config.LEVELS_TOTAL.toString()) + "."); }; }; }; this.talkBaloon.show(); } else { if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = (((("Continue normal mode with " + _local2.toString()) + "/") + Config.LEVELS_TOTAL.toString()) + " levels completed."); this.talkBaloon.show(); } else { if ((((_local2 == 0)) || ((_local2 >= 5)))){ this.talkBaloon.text = (((("Пройдено " + _local2.toString()) + " уровней из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { if (_local2 == 1){ this.talkBaloon.text = (((("Пройден " + _local2.toString()) + " уровень из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { this.talkBaloon.text = (((("Пройдено " + _local2.toString()) + " уровня из ") + Config.LEVELS_TOTAL.toString()) + "."); }; }; this.talkBaloon.show(); }; }; }; firstText = false; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function overEasy(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; _local2 = 0; if (Config.easyLevels){ _local3 = 0; while (_local3 < Config.easyLevels.length) { if (Config.easyLevels[_local3] > 0){ _local2++; }; _local3++; }; }; this.counter = -1; if (this.startNewGame){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = "Start easy mode!"; } else { this.talkBaloon.text = "Выбирайте этот режим, если вы играете в первый раз."; }; this.talkBaloon.show(); } else { if (this.submitScore){ if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = (("Submit your easy mode score! (" + scoreEasy.toString()) + ")"); } else { if ((((_local2 == 0)) || ((_local2 >= 5)))){ this.talkBaloon.text = (((((("Вы набрали " + scoreEasy.toString()) + " очков. Пройдено ") + _local2.toString()) + " уровней из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { if (_local2 == 1){ this.talkBaloon.text = (((((("Вы набрали " + scoreEasy.toString()) + " очков. Пройден ") + _local2.toString()) + " уровень из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { this.talkBaloon.text = (((((("Вы набрали " + scoreEasy.toString()) + " очков. Пройдено ") + _local2.toString()) + " уровня из ") + Config.LEVELS_TOTAL.toString()) + "."); }; }; }; this.talkBaloon.show(); } else { if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = (((("Continue on easy mode with " + _local2.toString()) + "/") + Config.LEVELS_TOTAL.toString()) + " levels completed."); this.talkBaloon.show(); } else { if ((((_local2 == 0)) || ((_local2 >= 5)))){ this.talkBaloon.text = (((("Пройдено " + _local2.toString()) + " уровней из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { if (_local2 == 1){ this.talkBaloon.text = (((("Пройден " + _local2.toString()) + " уровень из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { this.talkBaloon.text = (((("Пройдено " + _local2.toString()) + " уровня из ") + Config.LEVELS_TOTAL.toString()) + "."); }; }; this.talkBaloon.show(); }; }; }; firstText = false; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function overCredits(_arg1:MouseEvent):void{ this.counter = -1; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = "Credits section!"; } else { this.talkBaloon.text = "Узнайте, кто создал эту замечательную игру."; }; this.talkBaloon.show(); firstText = false; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function overQuit(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; this.counter = -1; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ if ((((scoreEasy == 0)) && ((scoreNormal == 0)))){ this.talkBaloon.text = "No score achieved yet!"; } else { if ((((scoreEasy > 0)) && ((scoreNormal == 0)))){ this.talkBaloon.text = (("Submit your easy mode score! (" + scoreEasy.toString()) + ")"); } else { if ((((scoreEasy == 0)) && ((scoreNormal > 0)))){ this.talkBaloon.text = (("Submit your normal mode score! (" + scoreNormal.toString()) + ")"); } else { this.talkBaloon.text = "Submit your score!"; }; }; }; } else { if ((((scoreEasy == 0)) && ((scoreNormal == 0)))){ this.talkBaloon.text = "Ёвины очень расстроились, что вы не построили ни одного моста."; } else { if ((((scoreEasy > 0)) && ((scoreNormal == 0)))){ _local2 = 0; if (Config.easyLevels){ _local3 = 0; while (_local3 < Config.easyLevels.length) { if (Config.easyLevels[_local3] > 0){ _local2++; }; _local3++; }; }; if ((((_local2 == 0)) || ((_local2 >= 5)))){ this.talkBaloon.text = (((((("Вы набрали " + scoreEasy.toString()) + " очков. Пройдено ") + _local2.toString()) + " уровней из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { if (_local2 == 1){ this.talkBaloon.text = (((((("Вы набрали " + scoreEasy.toString()) + " очков. Пройден ") + _local2.toString()) + " уровень из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { this.talkBaloon.text = (((((("Вы набрали " + scoreEasy.toString()) + " очков. Пройдено ") + _local2.toString()) + " уровня из ") + Config.LEVELS_TOTAL.toString()) + "."); }; }; } else { if ((((scoreEasy == 0)) && ((scoreNormal > 0)))){ _local2 = 0; if (Config.easyLevels){ _local3 = 0; while (_local3 < Config.normalLevels.length) { if (Config.normalLevels[_local3] > 0){ _local2++; }; _local3++; }; }; if ((((_local2 == 0)) || ((_local2 >= 5)))){ this.talkBaloon.text = (((((("Вы набрали " + scoreNormal.toString()) + " очков. Пройдено ") + _local2.toString()) + " уровней из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { if (_local2 == 1){ this.talkBaloon.text = (((((("Вы набрали " + scoreNormal.toString()) + " очков. Пройден ") + _local2.toString()) + " уровень из ") + Config.LEVELS_TOTAL.toString()) + "."); } else { this.talkBaloon.text = (((((("Вы набрали " + scoreNormal.toString()) + " очков. Пройдено ") + _local2.toString()) + " уровня из ") + Config.LEVELS_TOTAL.toString()) + "."); }; }; } else { this.talkBaloon.text = "Нажмите, чтобы отправить ваш результат."; }; }; }; }; this.talkBaloon.show(); firstText = false; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function resetMenu():void{ this.continueButton.visible = Boolean(((((this.easy) || (this.normal))) || (this.hard))); this.playButton.visible = true; this.helpButton.visible = true; this.walkthroughButton.visible = true; this.creditsButton.visible = true; this.quitButton.visible = true; this.easyButton.visible = false; this.normalButton.visible = false; this.startNewGame = false; this.submitScore = false; this.easyButton.y = 293.2; this.normalButton.y = 340.3; } private function onHard(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_PLAY_HARD, true)); } private function outCredits(_arg1:MouseEvent):void{ this.counter = 0; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function overWalkthrough(_arg1:MouseEvent):void{ this.counter = -1; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ this.talkBaloon.text = "Stuck on a level? Check out walkthrough videos!"; } else { this.talkBaloon.text = "Не знаете как пройти уровень? Нажмите на эту кнопку!"; }; this.talkBaloon.show(); firstText = false; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function onWalkthrough(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(Config.WALKTHROUGH_URL), "_blank"); } private function overContinue(_arg1:MouseEvent):void{ this.counter = -1; if (Config.LANGUAGE == Config.LANGUAGE_ENG){ if (((this.easy) && (!(this.normal)))){ this.talkBaloon.text = "Continue your previous game on easy mode!"; } else { if (((!(this.easy)) && (this.normal))){ this.talkBaloon.text = "Continue your previous game on normal mode!"; } else { this.talkBaloon.text = "Continue your previous game!"; }; }; } else { if (((this.easy) && (!(this.normal)))){ this.talkBaloon.text = "Продолжить игру (легкий режим)."; } else { if (((!(this.easy)) && (this.normal))){ this.talkBaloon.text = "Продолжить игру (нормальный режим)."; } else { this.talkBaloon.text = "Продолжить игру."; }; }; }; this.talkBaloon.show(); firstText = false; dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function outPlay(_arg1:MouseEvent):void{ this.counter = 0; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function onContinue(_arg1:MouseEvent):void{ this.playButton.visible = false; this.helpButton.visible = false; this.quitButton.visible = false; this.creditsButton.visible = false; this.continueButton.visible = false; this.walkthroughButton.visible = false; this.easyButton.visible = this.easy; this.normalButton.visible = this.normal; this.startNewGame = false; this.submitScore = false; if (((this.easyButton.visible) && (!(this.normalButton.visible)))){ this.dispatchEvent(new Event(Config.EVENT_PLAY_EASY, true)); }; if (((!(this.easyButton.visible)) && (this.normalButton.visible))){ this.dispatchEvent(new Event(Config.EVENT_PLAY_NORMAL, true)); }; if (!this.easyButton.visible){ this.normalButton.y = 280; }; } private function outHelp(_arg1:MouseEvent):void{ this.counter = 0; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function onPlay(_arg1:MouseEvent){ dispatchEvent(new Event(Config.EVENT_ON_PLAY, true)); this.playButton.visible = false; this.helpButton.visible = false; this.quitButton.visible = false; this.creditsButton.visible = false; this.continueButton.visible = false; this.walkthroughButton.visible = false; this.easyButton.visible = true; this.normalButton.visible = true; this.startNewGame = true; this.submitScore = false; } private function onNormal(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_PLAY_NORMAL, true)); } public function onCredits(_arg1:MouseEvent){ dispatchEvent(new Event(Config.EVENT_ON_CREDITS, true)); } public function onHelp(_arg1:MouseEvent){ dispatchEvent(new Event(Config.EVENT_ON_HELP, true)); } private function outNormal(_arg1:MouseEvent):void{ this.counter = 0; dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package menu
Section 259
//AbstractCollection (org.cove.ape.AbstractCollection) package org.cove.ape { import flash.display.*; import flash.utils.*; public class AbstractCollection { private var _particles:Array; private var _isParented:Boolean; private var _stress:Boolean; private var _deletedObjects:Array; private var _sprite:Sprite; private var _constraints:Array; public var numSets:Number; public function AbstractCollection(){ if (getQualifiedClassName(this) == "org.cove.ape::AbstractCollection"){ throw (new ArgumentError("AbstractCollection can't be instantiated directly")); }; _isParented = false; _particles = new Array(); _constraints = new Array(); numSets = 0; _deletedObjects = new Array(); _stress = false; } function checkCollisionsVsCollection(_arg1:AbstractCollection):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:AbstractParticle; var _local6:int; var _local7:int; var _local8:int; var _local9:AbstractParticle; var _local10:SpringConstraint; var _local11:SpringConstraint; var _local12:int; _local2 = _particles.length; _local3 = 0; while (_local3 < _local2) { _local5 = _particles[_local3]; if (!_local5.collidable){ } else { _local6 = _arg1.particles.length; _local7 = 0; while (_local7 < _local6) { _local9 = _arg1.particles[_local7]; if (_local9.collidable){ CollisionDetector.test(_local5, _local9); }; _local7++; }; _local8 = _arg1.constraints.length; _local7 = 0; while (_local7 < _local8) { _local10 = _arg1.constraints[_local7]; if (((_local10.collidable) && (!(_local10.isConnectedTo(_local5))))){ _local10.scp.updatePosition(); CollisionDetector.test(_local5, _local10.scp); }; _local7++; }; }; _local3++; }; _local4 = _constraints.length; _local3 = 0; while (_local3 < _local4) { _local11 = _constraints[_local3]; if (!_local11.collidable){ } else { _local6 = _arg1.particles.length; _local12 = 0; while (_local12 < _local6) { _local9 = _arg1.particles[_local12]; if (((_local9.collidable) && (!(_local11.isConnectedTo(_local9))))){ _local11.scp.updatePosition(); CollisionDetector.test(_local9, _local11.scp); }; _local12++; }; }; _local3++; }; } public function currStress():void{ var _local1:Number; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].currStress(); _local1++; }; _stress = true; } public function removeConstraint(_arg1:AbstractConstraint, _arg2:Boolean=true):void{ var _local3:int; _local3 = constraints.indexOf(_arg1); if (_local3 == -1){ return; }; constraints.splice(_local3, 1); _arg1.cleanup(_arg2); } public function removeConstraintWithBackup(_arg1:AbstractConstraint):void{ if (_deletedObjects == null){ _deletedObjects = new Array(); }; if (_arg1.graphicsLayer != null){ _arg1.graphicsLayer.visible = false; }; _deletedObjects.push(_arg1); removeConstraint(_arg1, false); } public function restoreDeletedConstraints():void{ var _local1:Number; if (_deletedObjects == null){ return; }; if (_deletedObjects.length == 0){ return; }; _local1 = 0; while (_local1 < _deletedObjects.length) { if ((_deletedObjects[_local1] is AbstractConstraint)){ addConstraint(_deletedObjects[_local1]); if (_deletedObjects[_local1].graphicsLayer != null){ _deletedObjects[_local1].graphicsLayer.visible = true; }; _deletedObjects.splice(_local1, 1); } else { _local1++; }; }; } public function haveParticle(_arg1:AbstractParticle):Boolean{ if (particles.indexOf(_arg1) >= 0){ return (true); }; return (false); } public function init():void{ var _local1:int; _local1 = 0; while (_local1 < particles.length) { particles[_local1].init(); _local1++; }; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].init(); _local1++; }; } function get isParented():Boolean{ return (_isParented); } public function getObjectsUnderPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=true, _arg4:Boolean=true, _arg5:Number=0, _arg6:Boolean=false):Array{ var _local7:Array; var _local8:Number; _local7 = new Array(); _local8 = 0; while (_local8 < particles.length) { if (((((_arg3) && ((particles[_local8] is CircleParticle)))) && ((particles[_local8].subParticle == true)))){ } else { if ((particles[_local8] as AbstractParticle).numSets() == 0){ } else { if (_arg6){ if ((((Math.abs((particles[_local8].px - _arg1)) < 0.001)) && ((Math.abs((particles[_local8].py - _arg2)) < 0.001)))){ _local7.push(particles[_local8]); }; } else { if (particles[_local8].sprite.hitTestPoint(_arg1, _arg2, true)){ _local7.push(particles[_local8]); }; }; }; }; _local8++; }; if (!_arg3){ _local8 = 0; while (_local8 < constraints.length) { if (constraints[_local8].sprite.hitTestPoint(_arg1, _arg2, true)){ _local7.push(constraints[_local8]); }; _local8++; }; }; if (_arg4){ _local7.sortOn("childIndex", Array.DESCENDING); }; if ((((_arg5 > 0)) && ((_arg5 < _local7.length)))){ _local7.splice(_arg5); }; return (_local7); } public function hideStress():void{ var _local1:Number; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].hideStress(); _local1++; }; _stress = false; } public function cleanup():void{ var _local1:int; _local1 = 0; while (_local1 < particles.length) { particles[_local1].cleanup(); _local1++; }; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].cleanup(); _local1++; }; } function set isParented(_arg1:Boolean):void{ _isParented = _arg1; } public function removeParticle(_arg1:AbstractParticle, _arg2:Boolean=true):void{ var _local3:int; _local3 = particles.indexOf(_arg1); if (_local3 == -1){ return; }; particles.splice(_local3, 1); _arg1.cleanup(_arg2); } public function resetCoordinates():void{ var _local1:Number; _local1 = 0; while (_local1 < particles.length) { (particles[_local1] as AbstractParticle).restoreStartCoordinates(); _local1++; }; } public function removeSetById(_arg1:Array):void{ var _local2:Number; var _local3:Number; if (_arg1 == null){ return; }; _local2 = 0; while (_local2 < _arg1.length) { _local3 = 0; while (_local3 < constraints.length) { if (!constraints[_local3].isInSet(_arg1[_local2])){ _local3++; } else { removeConstraint(constraints[_local3]); }; }; _local3 = 0; while (_local3 < particles.length) { if (!particles[_local3].isInSet(_arg1[_local2])){ _local3++; } else { if (particles[_local3].numSets() > 1){ particles[_local3].removeSet(_arg1[_local2]); _local3++; } else { if (particles[_local3].fixed){ _local3++; } else { removeParticle(particles[_local3]); }; }; }; }; _local2++; }; } function integrate(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:AbstractParticle; _local2 = _particles.length; _local3 = 0; while (_local3 < _local2) { _local4 = _particles[_local3]; _local4.update(_arg1); _local3++; }; } public function get particles():Array{ return (_particles); } public function get constraints():Array{ return (_constraints); } public function resetConstraintOverloading():void{ var _local1:int; _local1 = 0; while (_local1 < this.constraints.length) { if ((constraints[_local1] is SpringConstraint)){ (constraints[_local1] as SpringConstraint).overloadingCounter = 0; }; _local1++; }; } public function getSetsUnderPoint(_arg1:Number, _arg2:Number):Array{ var _local3:Array; var _local4:Array; var _local5:int; var _local6:Array; var _local7:int; _local3 = getObjectsUnderPoint(_arg1, _arg2, false, false); if (_local3.length == 0){ return (new Array()); }; _local4 = new Array(); _local5 = 0; while (_local5 < _local3.length) { _local6 = _local3[_local5].getSets(0); _local7 = 0; while (_local7 < _local6.length) { if (_local4.indexOf(_local6[_local7]) == -1){ _local4.push(_local6[_local7]); }; _local7++; }; _local5++; }; return (_local4); } public function restoreDeletedParticles():void{ var _local1:Number; if (_deletedObjects == null){ return; }; if (_deletedObjects.length == 0){ return; }; _local1 = 0; while (_local1 < _deletedObjects.length) { if ((_deletedObjects[_local1] is AbstractParticle)){ addParticle(_deletedObjects[_local1]); if (_deletedObjects[_local1].graphicsLayer != null){ _deletedObjects[_local1].graphicsLayer.visible = true; }; _deletedObjects.splice(_local1, 1); } else { _local1++; }; }; } public function get sprite():Sprite{ if (_sprite != null){ return (_sprite); }; if (APEngine.container == null){ throw (new Error("The container property of the APEngine class has not been set")); }; _sprite = new Sprite(); APEngine.container.addChild(_sprite); return (_sprite); } function checkInternalCollisions():void{ var _local1:int; var _local2:int; var _local3:AbstractParticle; var _local4:int; var _local5:int; var _local6:int; var _local7:AbstractParticle; var _local8:SpringConstraint; _local1 = _particles.length; _local2 = 0; while (_local2 < _local1) { _local3 = _particles[_local2]; if (!_local3.collidable){ } else { _local4 = (_local2 + 1); while (_local4 < _local1) { _local7 = _particles[_local4]; if (_local7.collidable){ CollisionDetector.test(_local3, _local7); }; _local4++; }; _local5 = _constraints.length; _local6 = 0; while (_local6 < _local5) { _local8 = _constraints[_local6]; if (((_local8.collidable) && (!(_local8.isConnectedTo(_local3))))){ _local8.scp.updatePosition(); CollisionDetector.test(_local3, _local8.scp); }; _local6++; }; }; _local2++; }; } public function addParticle(_arg1:AbstractParticle, _arg2:Number=-1):void{ particles.push(_arg1); if (isParented){ _arg1.init(); }; _arg1.setStartCoordinates(_arg1.px, _arg1.py); if (_arg2 != -1){ _arg1.addSet(_arg2); }; this.particles.sortOn(["px", "py"], Array.NUMERIC, Array.NUMERIC); } public function haveConstraintConnectedTo(_arg1:AbstractParticle, _arg2:AbstractParticle=null):Boolean{ var _local3:Number; _local3 = 0; while (_local3 < constraints.length) { if (_arg2 == null){ if (constraints[_local3].isConnectedTo(_arg1)){ return (true); }; } else { if (((constraints[_local3].isConnectedTo(_arg1)) && (constraints[_local3].isConnectedTo(_arg2)))){ return (true); }; }; _local3++; }; return (false); } function satisfyConstraints(_arg1:Boolean=false):void{ var _local2:int; var _local3:int; var _local4:AbstractConstraint; _local2 = _constraints.length; _local3 = 0; while (_local3 < _local2) { _local4 = _constraints[_local3]; _local4.resolve(); _local3++; }; } public function selectOffAll():void{ var _local1:Number; _local1 = 0; while (_local1 < particles.length) { particles[_local1].deselect(); _local1++; }; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].deselect(); _local1++; }; } public function haveObjectUnderPoint(_arg1:Number, _arg2:Number):Boolean{ var _local3:Number; var _local4:Number; _local3 = 0; while (_local3 < particles.length) { if (particles[_local3].sprite.hitTestPoint(_arg1, _arg2, true)){ return (true); }; _local3++; }; _local4 = 0; while (_local4 < constraints.length) { if (constraints[_local4].sprite.hitTestPoint(_arg1, _arg2, true)){ return (true); }; _local4++; }; return (false); } public function addConstraint(_arg1:AbstractConstraint, _arg2:Number=-1):void{ constraints.push(_arg1); if (isParented){ _arg1.init(); }; if (_arg2 != -1){ _arg1.addSet(_arg2); }; constraints.sort(constraintSpecialSort); } public function paint():void{ var _local1:AbstractParticle; var _local2:int; var _local3:int; var _local4:SpringConstraint; _local2 = _particles.length; _local3 = 0; while (_local3 < _local2) { _local1 = _particles[_local3]; if (((!(_local1.fixed)) || (_local1.alwaysRepaint))){ _local1.paint(); }; _local3++; }; _local2 = _constraints.length; _local3 = 0; while (_local3 < _local2) { _local4 = _constraints[_local3]; if (((!(_local4.fixed)) || (_local4.alwaysRepaint))){ _local4.paint(); }; _local3++; }; } private function constraintSpecialSort(_arg1:SpringConstraint, _arg2:SpringConstraint):Number{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; _local4 = particles.indexOf(_arg1.particleA); _local5 = particles.indexOf(_arg1.particleB); if (_local4 > _local5){ _local3 = _local4; _local4 = _local5; _local5 = _local3; }; _local6 = particles.indexOf(_arg2.particleA); _local7 = particles.indexOf(_arg2.particleB); if (_local6 > _local7){ _local3 = _local6; _local6 = _local7; _local7 = _local3; }; if (_local4 < _local6){ return (-1); }; if (_local4 > _local6){ return (1); }; if (_local5 < _local7){ return (-1); }; if (_local5 > _local7){ return (1); }; return (0); } public function selectSets(_arg1:Array):void{ var _local2:Number; var _local3:Number; if (_arg1 == null){ return; }; _local2 = 0; while (_local2 < particles.length) { _local3 = 0; while (_local3 < _arg1.length) { if (particles[_local2].isInSet(_arg1[_local3])){ particles[_local2].select(); break; }; _local3++; }; _local2++; }; _local2 = 0; while (_local2 < constraints.length) { _local3 = 0; while (_local3 < _arg1.length) { if (constraints[_local2].isInSet(_arg1[_local3])){ constraints[_local2].select(); break; }; _local3++; }; _local2++; }; } public function clearDeletedConstraintsArray():void{ var _local1:Number; if (_deletedObjects == null){ return; }; if (_deletedObjects.length == 0){ return; }; _local1 = 0; while (_local1 < _deletedObjects.length) { _deletedObjects[_local1].cleanup(); _local1++; }; _deletedObjects.splice(0); } public function removeParticleWithBackup(_arg1:AbstractParticle):void{ var _local2:int; if (_deletedObjects == null){ _deletedObjects = new Array(); }; _local2 = particles.indexOf(_arg1); if (_local2 == -1){ return; }; (particles[_local2] as AbstractParticle).restoreStartCoordinates(); if (_arg1.graphicsLayer != null){ _arg1.graphicsLayer.visible = false; }; _deletedObjects.push(_arg1); removeParticle(_arg1, false); } public function removeSetUnderPoint(_arg1:Number, _arg2:Number):Array{ var _local3:Array; var _local4:Number; var _local5:Number; _local3 = getSetsUnderPoint(_arg1, _arg2); _local4 = 0; while (_local4 < _local3.length) { _local5 = 0; while (_local5 < constraints.length) { if (!constraints[_local5].isInSet(_local3[_local4])){ _local5++; } else { removeConstraint(constraints[_local5]); }; }; _local5 = 0; while (_local5 < particles.length) { if (!particles[_local5].isInSet(_local3[_local4])){ _local5++; } else { if (particles[_local5].numSets() > 1){ particles[_local5].removeSet(_local3[_local4]); _local5++; } else { if (particles[_local5].fixed){ _local5++; } else { removeParticle(particles[_local5]); }; }; }; }; _local4++; }; return (_local3); } public function getAll():Array{ return (particles.concat(constraints)); } } }//package org.cove.ape
Section 260
//AbstractConstraint (org.cove.ape.AbstractConstraint) package org.cove.ape { import flash.utils.*; public class AbstractConstraint extends AbstractItem { private var _stiffness:Number; public function AbstractConstraint(_arg1:Number){ if (getQualifiedClassName(this) == "org.cove.ape::AbstractConstraint"){ throw (new ArgumentError("AbstractConstraint can't be instantiated directly")); }; this.stiffness = _arg1; setStyle(); } public function set stiffness(_arg1:Number):void{ _stiffness = _arg1; } public function get stiffness():Number{ return (_stiffness); } function resolve():void{ } } }//package org.cove.ape
Section 261
//AbstractItem (org.cove.ape.AbstractItem) package org.cove.ape { import flash.display.*; import flash.filters.*; public class AbstractItem { public var graphicsLayer:Sprite; var fillAlpha:Number; var fillColor:uint; var displayObject:DisplayObject; var displayObjectOffset:Vector; private var _sets:Array; private var _visible:Boolean; var displayObjectRotation:Number; var lineAlpha:Number; var lineColor:uint; private var oldFilters:Array; var lineThickness:Number; private var _sprite:Sprite; private var _selected:Boolean; private var _alwaysRepaint:Boolean; public function AbstractItem(){ _visible = true; _alwaysRepaint = false; _selected = false; } final public function get alwaysRepaint():Boolean{ return (_alwaysRepaint); } public function setFill(_arg1:uint=0xFFFFFF, _arg2:Number=1):void{ fillColor = _arg1; fillAlpha = _arg2; } public function addSet(_arg1:Number):void{ if (_arg1 == -1){ return; }; if (_sets == null){ _sets = new Array(); }; if (_sets.indexOf(_arg1) == -1){ _sets.push(_arg1); }; } public function init():void{ } public function get childIndex():Number{ var _local1:Number; var _local2:int; if (_sets == null){ return (0); }; _local1 = 0; _local2 = 0; while (_local2 < _sets.length) { if (_local1 < _sets[_local2]){ _local1 = _sets[_local2]; }; _local2++; }; return (_local1); } public function cleanup(_arg1:Boolean=true):void{ var _local2:int; var _local3:DisplayObjectContainer; sprite.graphics.clear(); _local2 = 0; while (_local2 < sprite.numChildren) { sprite.removeChildAt(_local2); _local2++; }; if (((_arg1) && (!((graphicsLayer == null))))){ _local3 = graphicsLayer.parent; if (_local3 != null){ _local3.removeChild(graphicsLayer); }; graphicsLayer = null; }; } public function deselect():void{ if (!_selected){ return; }; if (graphicsLayer != null){ graphicsLayer.filters = this.oldFilters; } else { sprite.filters = this.oldFilters; }; _selected = false; } public function removeSet(_arg1:Number=-1):void{ var _local2:Number; if (_sets == null){ return; }; if (_arg1 == -1){ _sets.splice(0); }; _local2 = _sets.indexOf(_arg1); if (_local2 == -1){ return; }; _sets.splice(_local2, 1); } public function get sprite():Sprite{ if (_sprite != null){ return (_sprite); }; if (APEngine.container == null){ throw (new Error("The container property of the APEngine class has not been set")); }; _sprite = new Sprite(); APEngine.container.addChild(_sprite); return (_sprite); } public function getSets(_arg1:Number=-1):Array{ var _local2:Array; var _local3:Number; if (_sets == null){ return (new Array()); }; if ((((_arg1 == -1)) || (((!((_arg1 == -1))) && ((_sets.indexOf(_arg1) == -1)))))){ return (_sets); }; _local2 = new Array(); _local3 = 0; while (_local3 < _sets.length) { if (_sets[_local3] != _arg1){ _local2.push(_sets[_local3]); }; _local3++; }; return (_local2); } public function paint():void{ } public function set visible(_arg1:Boolean):void{ _visible = _arg1; sprite.visible = _arg1; } public function setStyle(_arg1:Number=0, _arg2:uint=0, _arg3:Number=1, _arg4:uint=0xFFFFFF, _arg5:Number=1):void{ setLine(_arg1, _arg2, _arg3); setFill(_arg4, _arg5); } public function get visible():Boolean{ return (_visible); } public function isInSet(_arg1):Boolean{ if (_sets == null){ return (false); }; if (_sets.indexOf(_arg1) != -1){ return (true); }; return (false); } public function setLine(_arg1:Number=0, _arg2:uint=0, _arg3:Number=1):void{ lineThickness = _arg1; lineColor = _arg2; lineAlpha = _arg3; } public function numSets():Number{ if (_sets == null){ return (0); }; return (_sets.length); } final public function set alwaysRepaint(_arg1:Boolean):void{ _alwaysRepaint = _arg1; } public function select(_arg1:uint=0xFF0000, _arg2:Number=6, _arg3:Number=2):void{ var _local4:Array; if (_selected){ return; }; if (graphicsLayer != null){ this.oldFilters = graphicsLayer.filters; } else { this.oldFilters = sprite.filters; }; _local4 = new Array(new GlowFilter(_arg1, 1, _arg2, _arg2, _arg3)); if (graphicsLayer != null){ graphicsLayer.filters = _local4; } else { sprite.filters = _local4; }; _selected = true; } } }//package org.cove.ape
Section 262
//AbstractParticle (org.cove.ape.AbstractParticle) package org.cove.ape { import flash.display.*; import flash.utils.*; public class AbstractParticle extends AbstractItem { private var forces:Vector; private var _y:Number;// = 0 var curr:Vector; var prev:Vector; private var collision:Collision; private var _invMass:Number; private var _collisionDetected:Boolean;// = false private var _friction:Number; private var _multisample:int; var samp:Vector; private var _fixed:Boolean; private var _center:Vector; private var _collidable:Boolean; private var _kfr:Number; var interval:Interval; private var _mass:Number; private var temp:Vector; private var _x:Number;// = 0 public function AbstractParticle(_arg1:Number, _arg2:Number, _arg3:Boolean, _arg4:Number, _arg5:Number, _arg6:Number){ _x = 0; _y = 0; _collisionDetected = false; super(); if (getQualifiedClassName(this) == "org.cove.ape::AbstractParticle"){ throw (new ArgumentError("AbstractParticle can't be instantiated directly")); }; interval = new Interval(0, 0); curr = new Vector(_arg1, _arg2); prev = new Vector(_arg1, _arg2); samp = new Vector(); temp = new Vector(); fixed = _arg3; forces = new Vector(); collision = new Collision(new Vector(), new Vector()); collidable = true; this.mass = _arg4; this.elasticity = _arg5; this.friction = _arg6; setStyle(); _center = new Vector(); _multisample = 0; } public function get px():Number{ return (curr.x); } public function get py():Number{ return (curr.y); } public function set py(_arg1:Number):void{ curr.y = _arg1; prev.y = _arg1; } function getComponents(_arg1:Vector):Collision{ var _local2:Vector; var _local3:Number; _local2 = velocity; _local3 = _arg1.dot(_local2); collision.vn = _arg1.mult(_local3); collision.vt = _local2.minus(collision.vn); return (collision); } public function set px(_arg1:Number):void{ curr.x = _arg1; prev.x = _arg1; } public function setDisplay(_arg1:DisplayObject, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0):void{ displayObject = _arg1; displayObjectRotation = _arg4; displayObjectOffset = new Vector(_arg2, _arg3); } public function get multisample():int{ return (_multisample); } public function get position():Vector{ return (new Vector(curr.x, curr.y)); } public function addMasslessForce(_arg1:Vector):void{ forces.plusEquals(_arg1); } public function set multisample(_arg1:int):void{ _multisample = _arg1; } public function set position(_arg1:Vector):void{ curr.copy(_arg1); prev.copy(_arg1); } public function get center():Vector{ _center.setTo(px, py); return (_center); } public function set elasticity(_arg1:Number):void{ _kfr = _arg1; } public function get fixed():Boolean{ return (_fixed); } public function get x():Number{ return (_x); } function get invMass():Number{ return ((fixed) ? 0 : _invMass); } public function get y():Number{ return (_y); } function initDisplay():void{ displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; sprite.addChild(displayObject); } function resolveCollision(_arg1:Vector, _arg2:Vector, _arg3:Vector, _arg4:Number, _arg5:int, _arg6:AbstractParticle):void{ curr.plusEquals(_arg1); velocity = _arg2; this.collisionDetected = true; } public function set collisionDetected(_arg1:Boolean):void{ _collisionDetected = _arg1; } public function get elasticity():Number{ return (_kfr); } public function set velocity(_arg1:Vector):void{ prev = curr.minus(_arg1); } public function setStartCoordinates(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; } public function set collidable(_arg1:Boolean):void{ _collidable = _arg1; } public function update(_arg1:Number):void{ var _local2:Vector; if (fixed){ return; }; addForce(APEngine.force); addMasslessForce(APEngine.masslessForce); temp.copy(curr); _local2 = velocity.plus(forces.multEquals(_arg1)); curr.plusEquals(_local2.multEquals(APEngine.damping)); prev.copy(temp); forces.setTo(0, 0); } public function addForce(_arg1:Vector):void{ forces.plusEquals(_arg1.mult(invMass)); } public function get collisionDetected():Boolean{ return (_collisionDetected); } public function get velocity():Vector{ return (curr.minus(prev)); } public function get collidable():Boolean{ return (_collidable); } public function restoreStartCoordinates():void{ this.px = _x; this.py = _y; } public function set mass(_arg1:Number):void{ if (_arg1 <= 0){ throw (new ArgumentError("mass may not be set <= 0")); }; _mass = _arg1; _invMass = (1 / _mass); } public function get mass():Number{ return (_mass); } public function set fixed(_arg1:Boolean):void{ _fixed = _arg1; } public function get friction():Number{ return (_friction); } public function set friction(_arg1:Number):void{ if ((((_arg1 < 0)) || ((_arg1 > 1)))){ throw (new ArgumentError("Legal friction must be >= 0 and <=1")); }; _friction = _arg1; } } }//package org.cove.ape
Section 263
//APEngine (org.cove.ape.APEngine) package org.cove.ape { import flash.display.*; import flash.filters.*; public final class APEngine { private static var _container:DisplayObjectContainer; private static var _damping:Number; private static var _constraintCollisionCycles:int; private static var groups:Array; static var masslessForce:Vector; private static var _constraintCycles:int; static var force:Vector; private static var timeStep:Number; private static var numGroups:int; public static function get container():DisplayObjectContainer{ return (_container); } public static function get constraintCollisionCycles():int{ return (_constraintCollisionCycles); } public static function set damping(_arg1:Number):void{ _damping = _arg1; } public static function step():void{ var _local1:int; var _local2:int; integrate(); _local1 = 0; while (_local1 < _constraintCycles) { satisfyConstraints(); _local1++; }; _local2 = 0; while (_local2 < _constraintCollisionCycles) { satisfyConstraints(); checkCollisions(); _local2++; }; } public static function init(_arg1:Number=0.25):void{ timeStep = (_arg1 * _arg1); numGroups = 0; groups = new Array(); force = new Vector(0, 0); masslessForce = new Vector(0, 0); damping = 1; _constraintCycles = 0; _constraintCollisionCycles = 1; } public static function get constraintCycles():int{ return (_constraintCycles); } public static function set constraintCollisionCycles(_arg1:int):void{ _constraintCollisionCycles = _arg1; } public static function set constraintCycles(_arg1:int):void{ _constraintCycles = _arg1; } public static function resetSelection(){ var _local1:Number; var _local2:Number; _local1 = 0; while (_local1 < groups.length) { _local2 = 0; while (_local2 < (groups[_local1] as Group).particles.length) { ((groups[_local1] as Group).particles[_local2] as AbstractParticle).sprite.filters = new Array(); _local2++; }; _local2 = 0; while (_local2 < (groups[_local1] as Group).constraints.length) { ((groups[_local1] as Group).constraints[_local2] as AbstractConstraint).sprite.filters = new Array(); _local2++; }; _local1++; }; } public static function addForce(_arg1:Vector):void{ force.plusEquals(_arg1); } public static function get damping():Number{ return (_damping); } public static function removeGroupExtended(_arg1:Group):void{ var _local2:int; var _local3:Array; var _local4:Number; _local2 = groups.indexOf(_arg1); if (_local2 == -1){ return; }; groups.splice(_local2, 1); _arg1.isParented = false; numGroups--; while (_arg1.constraints.length > 0) { _arg1.removeConstraint(_arg1.constraints[0]); }; _local3 = new Array(); _local4 = 0; while (_local4 < _arg1.particles.length) { if (getGroupsByParticle(_arg1.particles[_local4], _arg1).length == 0){ _local3.push(_arg1.particles[_local4]); }; _local4++; }; _local4 = 0; while (_local4 < _local3.length) { _arg1.removeParticle(_local3[_local4]); _local4++; }; } public static function set container(_arg1:DisplayObjectContainer):void{ _container = _arg1; } public static function addGroup(_arg1:Group):void{ groups.push(_arg1); _arg1.isParented = true; numGroups++; _arg1.init(); } public static function getGroupsByParticle(_arg1:AbstractParticle, _arg2:Group=null):Array{ var _local3:Array; var _local4:Number; var _local5:Number; _local3 = new Array(); _local4 = 0; while (_local4 < numGroups) { _local5 = 0; for (;_local5 < (groups[_local4] as Group).particles.length;_local5++) { if ((groups[_local4] as Group).particles[_local5] == _arg1){ if ((((_local3.indexOf(groups[_local4]) == -1)) && (!((groups[_local4] == _arg2))))){ _local3.push(groups[_local4]); continue; }; }; }; _local4++; }; return (_local3); } public static function removeGroup(_arg1:Group):void{ var _local2:int; _local2 = groups.indexOf(_arg1); if (_local2 == -1){ return; }; groups.splice(_local2, 1); _arg1.isParented = false; numGroups--; _arg1.cleanup(); } public static function setSelection(_arg1:Array):void{ var _local2:Number; resetSelection(); _local2 = 0; while (_local2 < _arg1.length) { (_arg1[_local2] as AbstractItem).sprite.filters = new Array(new GlowFilter()); _local2++; }; } public static function paint():void{ var _local1:int; var _local2:Group; _local1 = 0; while (_local1 < numGroups) { _local2 = groups[_local1]; _local2.paint(); _local1++; }; } public static function getParticlesUnderPoint(_arg1:Number, _arg2:Number, _arg3=0, _arg4:Boolean=false, _arg5:Boolean=false):Array{ var _local6:Array; var _local7:Number; var _local8:Number; _local6 = new Array(); _local7 = 0; while (_local7 < numGroups) { _local8 = 0; while (_local8 < (groups[_local7] as Group).particles.length) { if (((groups[_local7] as Group).particles[_local8].sprite as Sprite).hitTestPoint(_arg1, _arg2, true)){ if (((((_arg5) && (((groups[_local7] as Group).particles[_local8] is CircleParticle)))) || (!(_arg5)))){ _local6.push((groups[_local7] as Group).particles[_local8]); }; }; _local8++; }; if (!_arg4){ _local8 = 0; while (_local8 < (groups[_local7] as Group).constraints.length) { if (((groups[_local7] as Group).constraints[_local8] as AbstractConstraint).sprite.hitTestPoint(_arg1, _arg2, true)){ _local6.push((groups[_local7] as Group).constraints[_local8]); }; _local8++; }; }; _local7++; }; if (_local6.length > 0){ _local6.sortOn("childIndex", Array.DESCENDING); if (_arg3 != 0){ if (_arg3 < _local6.length){ _local6.splice(_arg3); }; }; }; return (_local6); } private static function checkCollisions():void{ var _local1:int; var _local2:Group; _local1 = 0; while (_local1 < numGroups) { _local2 = groups[_local1]; _local2.checkCollisions(); _local1++; }; } private static function integrate():void{ var _local1:int; var _local2:Group; _local1 = 0; while (_local1 < numGroups) { _local2 = groups[_local1]; _local2.integrate(timeStep); _local1++; }; } private static function satisfyConstraints():void{ var _local1:int; var _local2:Group; _local1 = 0; while (_local1 < numGroups) { _local2 = groups[_local1]; _local2.satisfyConstraints(true); _local1++; }; } public static function getGroupsUnderPoint(_arg1:Number, _arg2:Number):Array{ var _local3:Array; var _local4:Number; var _local5:Number; _local3 = new Array(); _local4 = 0; while (_local4 < numGroups) { _local5 = 0; for (;_local5 < (groups[_local4] as Group).particles.length;_local5++) { if (((groups[_local4] as Group).particles[_local5].sprite as Sprite).hitTestPoint(_arg1, _arg2, true)){ if (_local3.indexOf(groups[_local4]) == -1){ _local3.push(groups[_local4]); continue; }; }; }; _local5 = 0; for (;_local5 < (groups[_local4] as Group).constraints.length;_local5++) { if (((groups[_local4] as Group).constraints[_local5] as AbstractConstraint).sprite.hitTestPoint(_arg1, _arg2, true)){ if (_local3.indexOf(groups[_local4]) == -1){ _local3.push(groups[_local4]); continue; }; }; }; _local4++; }; return (_local3); } public static function addMasslessForce(_arg1:Vector):void{ masslessForce.plusEquals(_arg1); } } }//package org.cove.ape
Section 264
//CircleParticle (org.cove.ape.CircleParticle) package org.cove.ape { import flash.display.*; public class CircleParticle extends AbstractParticle { private var _radius:Number; public var subParticle:Boolean; public function CircleParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Number=1, _arg6:Number=0.3, _arg7:Number=0, _arg8:Sprite=null){ this.graphicsLayer = _arg8; super(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7); _radius = _arg3; subParticle = false; if (_arg8 != null){ sprite.visible = false; this.graphicsLayer.x = _arg1; this.graphicsLayer.y = _arg2; }; } function getIntervalY():Interval{ interval.min = (curr.y - _radius); interval.max = (curr.y + _radius); return (interval); } override public function init():void{ cleanup(false); if (displayObject != null){ initDisplay(); } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.beginFill(fillColor, fillAlpha); sprite.graphics.drawCircle(0, 0, radius); sprite.graphics.endFill(); }; paint(); } public function get radius():Number{ return (_radius); } public function set radius(_arg1:Number):void{ _radius = _arg1; } function getProjection(_arg1:Vector):Interval{ var _local2:Number; _local2 = samp.dot(_arg1); interval.min = (_local2 - _radius); interval.max = (_local2 + _radius); return (interval); } override public function paint():void{ sprite.x = curr.x; sprite.y = curr.y; if (graphicsLayer != null){ graphicsLayer.x = curr.x; graphicsLayer.y = curr.y; }; } function getIntervalX():Interval{ interval.min = (curr.x - _radius); interval.max = (curr.x + _radius); return (interval); } } }//package org.cove.ape
Section 265
//Collision (org.cove.ape.Collision) package org.cove.ape { import org.cove.ape.*; final class Collision { var vn:Vector; var vt:Vector; function Collision(_arg1:Vector, _arg2:Vector){ this.vn = _arg1; this.vt = _arg2; } } }//package org.cove.ape
Section 266
//CollisionDetector (org.cove.ape.CollisionDetector) package org.cove.ape { import org.cove.ape.*; final class CollisionDetector { private static function testOBBvsCircle(_arg1:RectangleParticle, _arg2:CircleParticle):Boolean{ var _local3:Vector; var _local4:Number; var _local5:Array; var _local6:int; var _local7:Number; var _local8:Vector; var _local9:Number; var _local10:Vector; var _local11:Number; _local4 = Number.POSITIVE_INFINITY; _local5 = new Array(2); _local6 = 0; while (_local6 < 2) { _local8 = _arg1.axes[_local6]; _local9 = testIntervals(_arg1.getProjection(_local8), _arg2.getProjection(_local8)); if (_local9 == 0){ return (false); }; if (Math.abs(_local9) < Math.abs(_local4)){ _local3 = _local8; _local4 = _local9; }; _local5[_local6] = _local9; _local6++; }; _local7 = _arg2.radius; if ((((Math.abs(_local5[0]) < _local7)) && ((Math.abs(_local5[1]) < _local7)))){ _local10 = closestVertexOnOBB(_arg2.samp, _arg1); _local3 = _local10.minus(_arg2.samp); _local11 = _local3.magnitude(); _local4 = (_local7 - _local11); if (_local4 > 0){ _local3.divEquals(_local11); } else { return (false); }; }; CollisionResolver.resolveParticleParticle(_arg1, _arg2, _local3, _local4); return (true); } static function test(_arg1:AbstractParticle, _arg2:AbstractParticle):void{ if (((_arg1.fixed) && (_arg2.fixed))){ return; }; if ((((_arg1.multisample == 0)) && ((_arg2.multisample == 0)))){ normVsNorm(_arg1, _arg2); } else { if ((((_arg1.multisample > 0)) && ((_arg2.multisample == 0)))){ sampVsNorm(_arg1, _arg2); } else { if ((((_arg2.multisample > 0)) && ((_arg1.multisample == 0)))){ sampVsNorm(_arg2, _arg1); } else { if (_arg1.multisample == _arg2.multisample){ sampVsSamp(_arg1, _arg2); } else { normVsNorm(_arg1, _arg2); }; }; }; }; } private static function testIntervals(_arg1:Interval, _arg2:Interval):Number{ var _local3:Number; var _local4:Number; if (_arg1.max < _arg2.min){ return (0); }; if (_arg2.max < _arg1.min){ return (0); }; _local3 = (_arg2.max - _arg1.min); _local4 = (_arg2.min - _arg1.max); return (((Math.abs(_local3))<Math.abs(_local4)) ? _local3 : _local4); } private static function normVsNorm(_arg1:AbstractParticle, _arg2:AbstractParticle):void{ _arg1.samp.copy(_arg1.curr); _arg2.samp.copy(_arg2.curr); testTypes(_arg1, _arg2); } private static function testCirclevsCircle(_arg1:CircleParticle, _arg2:CircleParticle):Boolean{ var _local3:Number; var _local4:Number; var _local5:Vector; var _local6:Number; var _local7:Number; _local3 = testIntervals(_arg1.getIntervalX(), _arg2.getIntervalX()); if (_local3 == 0){ return (false); }; _local4 = testIntervals(_arg1.getIntervalY(), _arg2.getIntervalY()); if (_local4 == 0){ return (false); }; _local5 = _arg1.samp.minus(_arg2.samp); _local6 = _local5.magnitude(); _local7 = ((_arg1.radius + _arg2.radius) - _local6); if (_local7 > 0){ _local5.divEquals(_local6); CollisionResolver.resolveParticleParticle(_arg1, _arg2, _local5, _local7); return (true); }; return (false); } private static function testTypes(_arg1:AbstractParticle, _arg2:AbstractParticle):Boolean{ if ((((_arg1 is RectangleParticle)) && ((_arg2 is RectangleParticle)))){ return (testOBBvsOBB((_arg1 as RectangleParticle), (_arg2 as RectangleParticle))); }; if ((((_arg1 is CircleParticle)) && ((_arg2 is CircleParticle)))){ return (testCirclevsCircle((_arg1 as CircleParticle), (_arg2 as CircleParticle))); }; if ((((_arg1 is RectangleParticle)) && ((_arg2 is CircleParticle)))){ return (testOBBvsCircle((_arg1 as RectangleParticle), (_arg2 as CircleParticle))); }; if ((((_arg1 is CircleParticle)) && ((_arg2 is RectangleParticle)))){ return (testOBBvsCircle((_arg2 as RectangleParticle), (_arg1 as CircleParticle))); }; return (false); } private static function sampVsNorm(_arg1:AbstractParticle, _arg2:AbstractParticle):void{ var _local3:Number; var _local4:Number; var _local5:int; _local3 = (1 / (_arg1.multisample + 1)); _local4 = _local3; _arg2.samp.copy(_arg2.curr); _local5 = 0; while (_local5 <= _arg1.multisample) { _arg1.samp.setTo((_arg1.prev.x + (_local4 * (_arg1.curr.x - _arg1.prev.x))), (_arg1.prev.y + (_local4 * (_arg1.curr.y - _arg1.prev.y)))); if (testTypes(_arg1, _arg2)){ return; }; _local4 = (_local4 + _local3); _local5++; }; } private static function closestVertexOnOBB(_arg1:Vector, _arg2:RectangleParticle):Vector{ var _local3:Vector; var _local4:Vector; var _local5:int; var _local6:Number; _local3 = _arg1.minus(_arg2.samp); _local4 = new Vector(_arg2.samp.x, _arg2.samp.y); _local5 = 0; while (_local5 < 2) { _local6 = _local3.dot(_arg2.axes[_local5]); if (_local6 >= 0){ _local6 = _arg2.extents[_local5]; } else { if (_local6 < 0){ _local6 = -(_arg2.extents[_local5]); }; }; _local4.plusEquals(_arg2.axes[_local5].mult(_local6)); _local5++; }; return (_local4); } private static function testOBBvsOBB(_arg1:RectangleParticle, _arg2:RectangleParticle):Boolean{ var _local3:Vector; var _local4:Number; var _local5:int; var _local6:Vector; var _local7:Number; var _local8:Vector; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Boolean; _local4 = Number.POSITIVE_INFINITY; _local5 = 0; while (_local5 < 2) { _local6 = _arg1.axes[_local5]; _local7 = testIntervals(_arg1.getProjection(_local6), _arg2.getProjection(_local6)); if (_local7 == 0){ return (false); }; _local8 = _arg2.axes[_local5]; _local9 = testIntervals(_arg1.getProjection(_local8), _arg2.getProjection(_local8)); if (_local9 == 0){ return (false); }; _local10 = Math.abs(_local7); _local11 = Math.abs(_local9); if ((((_local10 < Math.abs(_local4))) || ((_local11 < Math.abs(_local4))))){ _local12 = (_local10 < _local11); _local3 = (_local12) ? _local6 : _local8; _local4 = (_local12) ? _local7 : _local9; }; _local5++; }; CollisionResolver.resolveParticleParticle(_arg1, _arg2, _local3, _local4); return (true); } private static function sampVsSamp(_arg1:AbstractParticle, _arg2:AbstractParticle):void{ var _local3:Number; var _local4:Number; var _local5:int; _local3 = (1 / (_arg1.multisample + 1)); _local4 = _local3; _local5 = 0; while (_local5 <= _arg1.multisample) { _arg1.samp.setTo((_arg1.prev.x + (_local4 * (_arg1.curr.x - _arg1.prev.x))), (_arg1.prev.y + (_local4 * (_arg1.curr.y - _arg1.prev.y)))); _arg2.samp.setTo((_arg2.prev.x + (_local4 * (_arg2.curr.x - _arg2.prev.x))), (_arg2.prev.y + (_local4 * (_arg2.curr.y - _arg2.prev.y)))); if (testTypes(_arg1, _arg2)){ return; }; _local4 = (_local4 + _local3); _local5++; }; } } }//package org.cove.ape
Section 267
//CollisionResolver (org.cove.ape.CollisionResolver) package org.cove.ape { import org.cove.ape.*; final class CollisionResolver { static function resolveParticleParticle(_arg1:AbstractParticle, _arg2:AbstractParticle, _arg3:Vector, _arg4:Number):void{ var _local5:Vector; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Collision; var _local10:Collision; var _local11:Vector; var _local12:Vector; var _local13:Vector; var _local14:Vector; _arg1.curr.copy(_arg1.samp); _arg2.curr.copy(_arg2.samp); _local5 = _arg3.mult(_arg4); _local6 = (_arg1.elasticity + _arg2.elasticity); _local7 = (_arg1.invMass + _arg2.invMass); _local8 = clamp((1 - (_arg1.friction + _arg2.friction)), 0, 1); _local9 = _arg1.getComponents(_arg3); _local10 = _arg2.getComponents(_arg3); _local11 = _local10.vn.mult(((_local6 + 1) * _arg1.invMass)).plus(_local9.vn.mult((_arg2.invMass - (_local6 * _arg1.invMass)))).divEquals(_local7); _local12 = _local9.vn.mult(((_local6 + 1) * _arg2.invMass)).plus(_local10.vn.mult((_arg1.invMass - (_local6 * _arg2.invMass)))).divEquals(_local7); _local9.vt.multEquals(_local8); _local10.vt.multEquals(_local8); _local13 = _local5.mult((_arg1.invMass / _local7)); _local14 = _local5.mult((-(_arg2.invMass) / _local7)); _local11.plusEquals(_local9.vt); _local12.plusEquals(_local10.vt); if (!_arg1.fixed){ _arg1.resolveCollision(_local13, _local11, _arg3, _arg4, -1, _arg2); }; if (!_arg2.fixed){ _arg2.resolveCollision(_local14, _local12, _arg3, _arg4, 1, _arg1); }; } static function clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ if (_arg1 > _arg3){ return (_arg3); }; if (_arg1 < _arg2){ return (_arg2); }; return (_arg1); } } }//package org.cove.ape
Section 268
//Composite (org.cove.ape.Composite) package org.cove.ape { public class Composite extends AbstractCollection { private var delta:Vector; public function Composite(){ delta = new Vector(); } public function set fixed(_arg1:Boolean):void{ var _local2:int; _local2 = 0; while (_local2 < particles.length) { particles[_local2].fixed = _arg1; _local2++; }; } private function getRelativeAngle(_arg1:Vector, _arg2:Vector):Number{ delta.setTo((_arg2.x - _arg1.x), (_arg2.y - _arg1.y)); return (Math.atan2(delta.y, delta.x)); } public function rotateByRadian(_arg1:Number, _arg2:Vector):void{ var _local3:AbstractParticle; var _local4:Array; var _local5:int; var _local6:int; var _local7:Number; var _local8:Number; _local4 = particles; _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local3 = _local4[_local6]; _local7 = _local3.center.distance(_arg2); _local8 = (getRelativeAngle(_arg2, _local3.center) + _arg1); _local3.px = ((Math.cos(_local8) * _local7) + _arg2.x); _local3.py = ((Math.sin(_local8) * _local7) + _arg2.y); _local6++; }; } public function rotateByAngle(_arg1:Number, _arg2:Vector):void{ var _local3:Number; _local3 = (_arg1 * MathUtil.PI_OVER_ONE_EIGHTY); rotateByRadian(_local3, _arg2); } public function get fixed():Boolean{ var _local1:int; _local1 = 0; while (_local1 < particles.length) { if (!particles[_local1].fixed){ return (false); }; _local1++; }; return (true); } } }//package org.cove.ape
Section 269
//Group (org.cove.ape.Group) package org.cove.ape { public class Group extends AbstractCollection { private var _type:Number; private var _collideInternal:Boolean; private var _collisionList:Array; private var _composites:Array; public function Group(_arg1:Boolean=false){ _composites = new Array(); _collisionList = new Array(); this.collideInternal = _arg1; _type = 0; } public function removeCollidable(_arg1:Group):void{ var _local2:int; _local2 = collisionList.indexOf(_arg1); if (_local2 == -1){ return; }; collisionList.splice(_local2, 1); } override public function init():void{ var _local1:int; super.init(); _local1 = 0; while (_local1 < composites.length) { composites[_local1].init(); _local1++; }; } public function get collideInternal():Boolean{ return (_collideInternal); } public function addCollidableList(_arg1:Array):void{ var _local2:int; var _local3:Group; _local2 = 0; while (_local2 < _arg1.length) { _local3 = _arg1[_local2]; collisionList.push(_local3); _local2++; }; } override public function cleanup():void{ var _local1:int; super.cleanup(); _local1 = 0; while (_local1 < composites.length) { composites[_local1].cleanup(); _local1++; }; } function checkCollisions():void{ var _local1:int; var _local2:int; var _local3:Group; if (collideInternal){ checkCollisionGroupInternal(); }; _local1 = collisionList.length; _local2 = 0; while (_local2 < _local1) { _local3 = collisionList[_local2]; checkCollisionVsGroup(_local3); _local2++; }; } override public function resetCoordinates():void{ var _local1:Number; super.resetCoordinates(); _local1 = 0; while (_local1 < composites.length) { composites[_local1].resetCoordinates(); _local1++; }; } override function integrate(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Composite; super.integrate(_arg1); _local2 = _composites.length; _local3 = 0; while (_local3 < _local2) { _local4 = _composites[_local3]; _local4.integrate(_arg1); _local3++; }; } public function get type():Number{ return (_type); } public function set collideInternal(_arg1:Boolean):void{ _collideInternal = _arg1; } public function removeCompositeExtended(_arg1:Composite):void{ var _local2:int; var _local3:Array; var _local4:Number; _local2 = composites.indexOf(_arg1); if (_local2 == -1){ return; }; composites.splice(_local2, 1); _arg1.isParented = false; while (_arg1.constraints.length > 0) { _arg1.removeConstraint(_arg1.constraints[0]); }; _local3 = new Array(); _local4 = 0; while (_local4 < _arg1.particles.length) { if (((!(_arg1.particles[_local4].fixed)) && ((getCompositesByParticle(_arg1.particles[_local4], _arg1).length == 0)))){ _local3.push(_arg1.particles[_local4]); }; _local4++; }; _local4 = 0; while (_local4 < _local3.length) { _arg1.removeParticle(_local3[_local4]); _local4++; }; } public function get composites():Array{ return (_composites); } override function satisfyConstraints(_arg1:Boolean=false):void{ var _local2:int; var _local3:int; var _local4:Composite; super.satisfyConstraints(_arg1); _local2 = _composites.length; _local3 = 0; while (_local3 < _local2) { _local4 = _composites[_local3]; _local4.satisfyConstraints(_arg1); _local3++; }; } private function checkCollisionVsGroup(_arg1:Group):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:Composite; var _local6:int; var _local7:Composite; checkCollisionsVsCollection(_arg1); _local2 = _composites.length; _local3 = _arg1.composites.length; _local4 = 0; while (_local4 < _local2) { _local5 = _composites[_local4]; _local5.checkCollisionsVsCollection(_arg1); _local6 = 0; while (_local6 < _local3) { _local7 = _arg1.composites[_local6]; _local5.checkCollisionsVsCollection(_local7); _local6++; }; _local4++; }; _local6 = 0; while (_local6 < _local3) { _local7 = _arg1.composites[_local6]; checkCollisionsVsCollection(_local7); _local6++; }; } public function removeCompositeUnderPoint(_arg1:Number, _arg2:Number):void{ var _local3:Number; _local3 = 0; while (_local3 < composites.length) { if (composites[_local3].haveObjectUnderPoint(_arg1, _arg2)){ removeCompositeExtended(composites[_local3]); }; _local3++; }; } public function getCompositesByParticle(_arg1:AbstractParticle, _arg2:Composite):Array{ var _local3:Array; var _local4:Number; _local3 = new Array(); _local4 = 0; while (_local4 < composites.length) { if (((!((composites[_local4] == _arg2))) && (composites[_local4].haveParticle(_arg1)))){ _local3.push(composites[_local4]); }; _local4++; }; return (_local3); } public function removeComposite(_arg1:Composite):void{ var _local2:int; _local2 = composites.indexOf(_arg1); if (_local2 == -1){ return; }; composites.splice(_local2, 1); _arg1.isParented = false; _arg1.cleanup(); } override public function paint():void{ var _local1:int; var _local2:int; var _local3:Composite; super.paint(); _local1 = _composites.length; _local2 = 0; while (_local2 < _local1) { _local3 = _composites[_local2]; _local3.paint(); _local2++; }; } public function addComposite(_arg1:Composite):void{ composites.push(_arg1); _arg1.isParented = true; if (isParented){ _arg1.init(); }; } public function addCollidable(_arg1:Group):void{ collisionList.push(_arg1); } override public function getAll():Array{ return (particles.concat(constraints).concat(composites)); } public function get collisionList():Array{ return (_collisionList); } public function set type(_arg1:Number):void{ _type = _arg1; } private function checkCollisionGroupInternal():void{ var _local1:int; var _local2:int; var _local3:Composite; var _local4:int; var _local5:Composite; checkInternalCollisions(); _local1 = _composites.length; _local2 = 0; while (_local2 < _local1) { _local3 = _composites[_local2]; _local3.checkCollisionsVsCollection(this); _local4 = (_local2 + 1); while (_local4 < _local1) { _local5 = _composites[_local4]; _local3.checkCollisionsVsCollection(_local5); _local4++; }; _local2++; }; } } }//package org.cove.ape
Section 270
//Interval (org.cove.ape.Interval) package org.cove.ape { final class Interval { var min:Number; var max:Number; function Interval(_arg1:Number, _arg2:Number){ this.min = _arg1; this.max = _arg2; } function toString():String{ return (((min + " : ") + max)); } } }//package org.cove.ape
Section 271
//MathUtil (org.cove.ape.MathUtil) package org.cove.ape { final class MathUtil { static var ONE_EIGHTY_OVER_PI:Number = 57.2957795130823; static var PI_OVER_ONE_EIGHTY:Number = 0.0174532925199433; static function clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ if (_arg1 < _arg2){ return (_arg2); }; if (_arg1 > _arg3){ return (_arg3); }; return (_arg1); } static function sign(_arg1:Number):int{ if (_arg1 < 0){ return (-1); }; return (1); } } }//package org.cove.ape
Section 272
//RectangleParticle (org.cove.ape.RectangleParticle) package org.cove.ape { import vis.*; public class RectangleParticle extends AbstractParticle { private var _axes:Array; private var _radian:Number; private var _extents:Array; public function RectangleParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Boolean=false, _arg7:Number=1, _arg8:Number=0.3, _arg9:Number=0){ super(_arg1, _arg2, _arg6, _arg7, _arg8, _arg9); _extents = new Array((_arg3 / 2), (_arg4 / 2)); _axes = new Array(new Vector(0, 0), new Vector(0, 0)); radian = _arg5; } override public function init():void{ var _local1:Number; var _local2:Number; cleanup(); if (displayObject != null){ initDisplay(); } else { _local1 = (extents[0] * 2); _local2 = (extents[1] * 2); sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.beginBitmapFill(new GroundTexture(), null, true); sprite.graphics.drawRect((-(_local1) / 2), (-(_local2) / 2), _local1, _local2); sprite.graphics.endFill(); }; paint(); } function get axes():Array{ return (_axes); } public function get height():Number{ return ((_extents[1] * 2)); } function get extents():Array{ return (_extents); } public function set angle(_arg1:Number):void{ radian = (_arg1 * MathUtil.PI_OVER_ONE_EIGHTY); } public function set width(_arg1:Number):void{ _extents[0] = (_arg1 / 2); } function getProjection(_arg1:Vector):Interval{ var _local2:Number; var _local3:Number; _local2 = ((extents[0] * Math.abs(_arg1.dot(axes[0]))) + (extents[1] * Math.abs(_arg1.dot(axes[1])))); _local3 = samp.dot(_arg1); interval.min = (_local3 - _local2); interval.max = (_local3 + _local2); return (interval); } public function get radian():Number{ return (_radian); } public function get width():Number{ return ((_extents[0] * 2)); } public function get angle():Number{ return ((radian * MathUtil.ONE_EIGHTY_OVER_PI)); } public function set radian(_arg1:Number):void{ _radian = _arg1; setAxes(_arg1); } override public function paint():void{ sprite.x = curr.x; sprite.y = curr.y; sprite.rotation = angle; } private function setAxes(_arg1:Number):void{ var _local2:Number; var _local3:Number; _local2 = Math.sin(_arg1); _local3 = Math.cos(_arg1); axes[0].x = _local3; axes[0].y = _local2; axes[1].x = -(_local2); axes[1].y = _local3; } public function set height(_arg1:Number):void{ _extents[1] = (_arg1 / 2); } } }//package org.cove.ape
Section 273
//RimParticle (org.cove.ape.RimParticle) package org.cove.ape { import org.cove.ape.*; class RimParticle { private var maxTorque:Number; var curr:Vector; var prev:Vector; private var av:Number; private var wr:Number; private var sp:Number; function RimParticle(_arg1:Number, _arg2:Number){ curr = new Vector(_arg1, 0); prev = new Vector(0, 0); sp = 0; av = 0; maxTorque = _arg2; wr = _arg1; } function update(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; sp = Math.max(-(maxTorque), Math.min(maxTorque, (sp + av))); _local2 = -(curr.y); _local3 = curr.x; _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); _local2 = (_local2 / _local4); _local3 = (_local3 / _local4); curr.x = (curr.x + (sp * _local2)); curr.y = (curr.y + (sp * _local3)); _local5 = prev.x; _local6 = prev.y; _local7 = (prev.x = curr.x); _local8 = (prev.y = curr.y); curr.x = (curr.x + (APEngine.damping * (_local7 - _local5))); curr.y = (curr.y + (APEngine.damping * (_local8 - _local6))); _local9 = Math.sqrt(((curr.x * curr.x) + (curr.y * curr.y))); _local10 = ((_local9 - wr) / _local9); curr.x = (curr.x - (curr.x * _local10)); curr.y = (curr.y - (curr.y * _local10)); } function set speed(_arg1:Number):void{ sp = _arg1; } function get angularVelocity():Number{ return (av); } function set angularVelocity(_arg1:Number):void{ av = _arg1; } function get speed():Number{ return (sp); } } }//package org.cove.ape
Section 274
//SpringConstraint (org.cove.ape.SpringConstraint) package org.cove.ape { import flash.display.*; import flash.geom.*; import flash.events.*; public class SpringConstraint extends AbstractConstraint { private var _restLength:Number; private var _collidable:Boolean; private var _tearable:Boolean; public var material:Number;// = 0 private var p1:AbstractParticle; public var materialMultiplier:Number;// = 1 private var p2:AbstractParticle; private var _stress:Boolean; private var _scp:SpringConstraintParticle; public var overloadingCounter:int;// = 0 public function SpringConstraint(_arg1:AbstractParticle, _arg2:AbstractParticle, _arg3:Number=0.5, _arg4:Boolean=false, _arg5:Number=1, _arg6:Number=1, _arg7:Boolean=false, _arg8:Sprite=null){ materialMultiplier = 1; material = 0; overloadingCounter = 0; super(_arg3); this.graphicsLayer = _arg8; if (_arg8 != null){ sprite.visible = false; }; this.p1 = _arg1; this.p2 = _arg2; checkParticlesLocation(); _restLength = currLength; setCollidable(_arg4, _arg5, _arg6, _arg7); materialMultiplier = 1; tearable = false; stress = false; } public function set fixedEndLimit(_arg1:Number):void{ if (scp == null){ return; }; scp.fixedEndLimit = _arg1; } public function get particleB():AbstractParticle{ return (p2); } override public function init():void{ cleanup(false); if (collidable){ scp.init(); } else { if (displayObject != null){ initDisplay(); }; }; paint(); } function initDisplay():void{ if (collidable){ scp.initDisplay(); } else { displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; sprite.addChild(displayObject); if (graphicsLayer != null){ graphicsLayer.x = displayObjectOffset.x; graphicsLayer.y = displayObjectOffset.y; graphicsLayer.rotation = displayObjectRotation; }; }; } public function set rectScale(_arg1:Number):void{ if (scp == null){ return; }; scp.rectScale = _arg1; } public function set stress(_arg1:Boolean):void{ if (_arg1){ if (_stress){ return; }; _stress = true; if (!sprite.hasEventListener(Event.ENTER_FRAME)){ sprite.addEventListener(Event.ENTER_FRAME, currStress); }; } else { if (!_stress){ return; }; _stress = false; if (sprite.hasEventListener(Event.ENTER_FRAME)){ sprite.removeEventListener(Event.ENTER_FRAME, currStress); }; hideStress(); }; } public function get particleA():AbstractParticle{ return (p1); } public function hideStress():void{ if (!graphicsLayer){ sprite.transform.colorTransform = new ColorTransform(); } else { graphicsLayer.transform.colorTransform = new ColorTransform(); }; } public function get rectHeight():Number{ return (scp.rectHeight); } private function checkParticlesLocation():void{ if ((((p1.curr.x == p2.curr.x)) && ((p1.curr.y == p2.curr.y)))){ p2.curr.x = (p2.curr.x + 0.0001); }; } public function setDisplay(_arg1:DisplayObject, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0):void{ if (collidable){ scp.setDisplay(_arg1, _arg2, _arg3, _arg4); } else { displayObject = _arg1; displayObjectRotation = _arg4; displayObjectOffset = new Vector(_arg2, _arg3); }; } public function isConnectedTo(_arg1:AbstractParticle):Boolean{ return ((((_arg1 == p1)) || ((_arg1 == p2)))); } function get scp():SpringConstraintParticle{ return (_scp); } public function get radian():Number{ var _local1:Vector; _local1 = delta; return (Math.atan2(_local1.y, _local1.x)); } public function set restLength(_arg1:Number):void{ if (_arg1 <= 0){ throw (new ArgumentError("restLength must be greater than 0")); }; _restLength = _arg1; } public function get currLength():Number{ return (p1.curr.distance(p2.curr)); } public function get fixedEndLimit():Number{ return (scp.fixedEndLimit); } public function get tearable():Boolean{ return (_tearable); } public function get stress():Boolean{ return (_stress); } public function currStress(_arg1:Event=null):void{ var _local2:Number; var _local3:ColorTransform; var _local4:Number; var _local5:Number; _local2 = (currLength / restLength); if (_local2 > 1){ _local4 = (Math.abs((_local2 - 1)) / materialMultiplier); _local5 = (1 - _local4); _local3 = new ColorTransform(_local5, _local5, _local5, 1, 0, 0, (_local4 * 0xFF), 0); }; if (_local2 < 1){ _local4 = (Math.abs((1 - _local2)) / materialMultiplier); _local5 = (1 - _local4); _local3 = new ColorTransform(_local5, _local5, _local5, 1, (_local4 * 0xFF), 0, 0, 0); }; if (_local3){ if (!graphicsLayer){ sprite.transform.colorTransform = _local3; } else { graphicsLayer.transform.colorTransform = _local3; }; }; } public function get rectScale():Number{ return (scp.rectScale); } function get delta():Vector{ return (p1.curr.minus(p2.curr)); } public function get center():Vector{ return (p1.curr.plus(p2.curr).divEquals(2)); } public function get angle():Number{ return ((radian * MathUtil.ONE_EIGHTY_OVER_PI)); } public function set rectHeight(_arg1:Number):void{ if (scp == null){ return; }; scp.rectHeight = _arg1; } override public function paint():void{ var _local1:Vector; var _local2:Number; var _local3:Number; if (collidable){ scp.paint(); } else { if (displayObject != null){ _local1 = center; sprite.x = _local1.x; sprite.y = _local1.y; sprite.rotation = angle; if (graphicsLayer != null){ graphicsLayer.x = _local1.x; graphicsLayer.y = _local1.y; graphicsLayer.rotation = angle; }; } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.moveTo(p1.px, p1.py); sprite.graphics.lineTo(p2.px, p2.py); if (graphicsLayer != null){ _local2 = ((p1.px + p2.px) / 2); _local3 = ((p1.py + p2.py) / 2); graphicsLayer.x = _local2; graphicsLayer.y = _local3; graphicsLayer.rotation = angle; }; }; }; } public function setCollidable(_arg1:Boolean, _arg2:Number, _arg3:Number, _arg4:Boolean=false):void{ _collidable = _arg1; _scp = null; if (_collidable){ _scp = new SpringConstraintParticle(p1, p2, this, _arg2, _arg3, _arg4); }; } public function get restLength():Number{ return (_restLength); } override function resolve():void{ var _local1:Number; var _local2:Number; var _local3:Vector; if (((p1.fixed) && (p2.fixed))){ return; }; _local1 = currLength; _local2 = ((_local1 - restLength) / (_local1 * (p1.invMass + p2.invMass))); _local3 = delta.mult((_local2 * stiffness)); p1.curr.minusEquals(_local3.mult(p1.invMass)); p2.curr.plusEquals(_local3.mult(p2.invMass)); } public function get collidable():Boolean{ return (_collidable); } public function get fixed():Boolean{ return (((p1.fixed) && (p2.fixed))); } public function set tearable(_arg1:Boolean):void{ _tearable = _arg1; } } }//package org.cove.ape
Section 275
//SpringConstraintParticle (org.cove.ape.SpringConstraintParticle) package org.cove.ape { import flash.display.*; import org.cove.ape.*; class SpringConstraintParticle extends RectangleParticle { private var _fixedEndLimit:Number; private var _rectScale:Number; private var rca:Vector; private var rcb:Vector; private var s:Number; private var parent:SpringConstraint; private var scaleToLength:Boolean; private var p1:AbstractParticle; private var p2:AbstractParticle; private var lambda:Vector; private var avgVelocity:Vector; private var _rectHeight:Number; function SpringConstraintParticle(_arg1:AbstractParticle, _arg2:AbstractParticle, _arg3:SpringConstraint, _arg4:Number, _arg5:Number, _arg6:Boolean){ super(0, 0, 0, 0, 0, false); this.p1 = _arg1; this.p2 = _arg2; lambda = new Vector(0, 0); avgVelocity = new Vector(0, 0); parent = _arg3; this.rectScale = _arg5; this.rectHeight = _arg4; this.scaleToLength = _arg6; fixedEndLimit = 0; rca = new Vector(); rcb = new Vector(); graphicsLayer = parent.graphicsLayer; } private function setCorners(_arg1:RectangleParticle, _arg2:int):void{ var _local3:Number; var _local4:Number; var _local5:Array; var _local6:Array; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local3 = _arg1.curr.x; _local4 = _arg1.curr.y; _local5 = _arg1.axes; _local6 = _arg1.extents; _local7 = (_local5[0].x * _local6[0]); _local8 = (_local5[0].y * _local6[0]); _local9 = (_local5[1].x * _local6[1]); _local10 = (_local5[1].y * _local6[1]); _local11 = (_local7 - _local9); _local12 = (_local8 - _local10); _local13 = (_local7 + _local9); _local14 = (_local8 + _local10); if (_arg2 == 0){ rca.x = (_local3 - _local13); rca.y = (_local4 - _local14); rcb.x = (_local3 + _local11); rcb.y = (_local4 + _local12); } else { if (_arg2 == 1){ rca.x = (_local3 + _local11); rca.y = (_local4 + _local12); rcb.x = (_local3 + _local13); rcb.y = (_local4 + _local14); } else { if (_arg2 == 2){ rca.x = (_local3 + _local13); rca.y = (_local4 + _local14); rcb.x = (_local3 - _local11); rcb.y = (_local4 - _local12); } else { if (_arg2 == 3){ rca.x = (_local3 - _local11); rca.y = (_local4 - _local12); rcb.x = (_local3 - _local13); rcb.y = (_local4 - _local14); }; }; }; }; } override public function init():void{ var _local1:Sprite; var _local2:Number; var _local3:Number; if (displayObject != null){ initDisplay(); } else { _local1 = new Sprite(); parent.sprite.addChild(_local1); _local1.name = "inner"; _local2 = (parent.currLength * rectScale); _local3 = rectHeight; _local1.graphics.clear(); _local1.graphics.lineStyle(parent.lineThickness, parent.lineColor, parent.lineAlpha); _local1.graphics.beginFill(parent.fillColor, parent.fillAlpha); _local1.graphics.drawRect((-(_local2) / 2), (-(_local3) / 2), _local2, _local3); _local1.graphics.endFill(); }; paint(); } function updatePosition():void{ var _local1:Vector; _local1 = parent.center; curr.setTo(_local1.x, _local1.y); width = (scaleToLength) ? (parent.currLength * rectScale) : (parent.restLength * rectScale); height = rectHeight; radian = parent.radian; } private function closestPtSegmentSegment():Number{ var _local1:Vector; var _local2:Vector; var _local3:Vector; var _local4:Vector; var _local5:Vector; var _local6:Vector; var _local7:Vector; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Vector; var _local16:Vector; var _local17:Vector; _local1 = p1.curr; _local2 = p2.curr; _local3 = rca; _local4 = rcb; _local5 = _local2.minus(_local1); _local6 = _local4.minus(_local3); _local7 = _local1.minus(_local3); _local9 = _local5.dot(_local5); _local10 = _local6.dot(_local6); _local11 = _local6.dot(_local7); _local12 = _local5.dot(_local7); _local13 = _local5.dot(_local6); _local14 = ((_local9 * _local10) - (_local13 * _local13)); if (_local14 != 0){ s = MathUtil.clamp((((_local13 * _local11) - (_local12 * _local10)) / _local14), 0, 1); } else { s = 0.5; }; _local8 = (((_local13 * s) + _local11) / _local10); if (_local8 < 0){ _local8 = 0; s = MathUtil.clamp((-(_local12) / _local9), 0, 1); } else { if (_local8 > 0){ _local8 = 1; s = MathUtil.clamp(((_local13 - _local12) / _local9), 0, 1); }; }; _local15 = _local1.plus(_local5.mult(s)); _local16 = _local3.plus(_local6.mult(_local8)); _local17 = _local15.minus(_local16); return (_local15.minus(_local16).dot(_local17)); } function get rectHeight():Number{ return (_rectHeight); } function get fixedEndLimit():Number{ return (_fixedEndLimit); } private function closestParamPoint(_arg1:Vector):Number{ var _local2:Vector; var _local3:Number; _local2 = p2.curr.minus(p1.curr); _local3 = (_local2.dot(_arg1.minus(p1.curr)) / _local2.dot(_local2)); return (MathUtil.clamp(_local3, 0, 1)); } function set rectHeight(_arg1:Number):void{ _rectHeight = _arg1; } override public function paint():void{ var _local1:Vector; var _local2:Sprite; _local1 = parent.center; _local2 = parent.sprite; if (scaleToLength){ _local2.getChildByName("inner").width = (parent.currLength * rectScale); } else { if (displayObject != null){ _local2.getChildByName("inner").width = (parent.restLength * rectScale); }; }; _local2.x = _local1.x; _local2.y = _local1.y; _local2.rotation = parent.angle; if (graphicsLayer != null){ graphicsLayer.x = _local1.x; graphicsLayer.y = _local1.y; graphicsLayer.rotation = parent.angle; }; } private function getContactPointParam(_arg1:AbstractParticle):Number{ var _local2:Number; var _local3:Number; var _local4:Array; var _local5:Number; var _local6:int; var _local7:Number; if ((_arg1 is CircleParticle)){ _local2 = closestParamPoint(_arg1.curr); } else { if ((_arg1 is RectangleParticle)){ _local4 = new Array(4); _local5 = Number.POSITIVE_INFINITY; _local6 = 0; while (_local6 < 4) { setCorners((_arg1 as RectangleParticle), _local6); _local7 = closestPtSegmentSegment(); if (_local7 < _local5){ _local5 = _local7; _local3 = _local6; _local4[_local6] = s; }; _local6++; }; _local2 = _local4[_local3]; }; }; return (_local2); } function set fixedEndLimit(_arg1:Number):void{ _fixedEndLimit = _arg1; } override function get invMass():Number{ if (((p1.fixed) && (p2.fixed))){ return (0); }; return ((1 / ((p1.mass + p2.mass) / 2))); } override function initDisplay():void{ var _local1:Sprite; displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; _local1 = new Sprite(); _local1.name = "inner"; _local1.addChild(displayObject); parent.sprite.addChild(_local1); if (graphicsLayer != null){ graphicsLayer.x = displayObjectOffset.x; graphicsLayer.y = displayObjectOffset.y; graphicsLayer.rotation = displayObjectRotation; }; } function set rectScale(_arg1:Number):void{ _rectScale = _arg1; } override function resolveCollision(_arg1:Vector, _arg2:Vector, _arg3:Vector, _arg4:Number, _arg5:int, _arg6:AbstractParticle):void{ var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:AbstractParticle; _local7 = getContactPointParam(_arg6); _local8 = (1 - _local7); _local9 = _local7; if (p1.fixed){ if (_local9 <= fixedEndLimit){ return; }; lambda.setTo((_arg1.x / _local9), (_arg1.y / _local9)); p2.curr.plusEquals(lambda); p2.velocity = _arg2; } else { if (p2.fixed){ if (_local8 <= fixedEndLimit){ return; }; lambda.setTo((_arg1.x / _local8), (_arg1.y / _local8)); p1.curr.plusEquals(lambda); p1.velocity = _arg2; } else { _local10 = ((_local8 * _local8) + (_local9 * _local9)); if (_local10 == 0){ return; }; lambda.setTo((_arg1.x / _local10), (_arg1.y / _local10)); p1.curr.plusEquals(lambda.mult(_local8)); p2.curr.plusEquals(lambda.mult(_local9)); if (_local7 == 0.5){ p1.velocity = _arg2; p2.velocity = _arg2; } else { _local11 = ((_local7)<0.5) ? p1 : p2; _local11.velocity = _arg2; }; }; }; } override public function get elasticity():Number{ return (((p1.elasticity + p2.elasticity) / 2)); } function get rectScale():Number{ return (_rectScale); } override public function get velocity():Vector{ var _local1:Vector; var _local2:Vector; _local1 = p1.velocity; _local2 = p2.velocity; avgVelocity.setTo(((_local1.x + _local2.x) / 2), ((_local1.y + _local2.y) / 2)); return (avgVelocity); } override public function get mass():Number{ return (((p1.mass + p2.mass) / 2)); } override public function get friction():Number{ return (((p1.friction + p2.friction) / 2)); } } }//package org.cove.ape
Section 276
//Vector (org.cove.ape.Vector) package org.cove.ape { public class Vector { public var x:Number; public var y:Number; public function Vector(_arg1:Number=0, _arg2:Number=0){ x = _arg1; y = _arg2; } public function cross(_arg1:Vector):Number{ return (((x * _arg1.y) - (y * _arg1.x))); } public function magnitude():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function divEquals(_arg1:Number):Vector{ if (_arg1 == 0){ _arg1 = 0.0001; }; x = (x / _arg1); y = (y / _arg1); return (this); } public function times(_arg1:Vector):Vector{ return (new Vector((x * _arg1.x), (y * _arg1.y))); } public function plusEquals(_arg1:Vector):Vector{ x = (x + _arg1.x); y = (y + _arg1.y); return (this); } public function dot(_arg1:Vector):Number{ return (((x * _arg1.x) + (y * _arg1.y))); } public function toString():String{ return (((x + " : ") + y)); } public function normalize():Vector{ var _local1:Number; _local1 = magnitude(); if (_local1 == 0){ _local1 = 0.0001; }; return (mult((1 / _local1))); } public function copy(_arg1:Vector):void{ x = _arg1.x; y = _arg1.y; } public function minusEquals(_arg1:Vector):Vector{ x = (x - _arg1.x); y = (y - _arg1.y); return (this); } public function minus(_arg1:Vector):Vector{ return (new Vector((x - _arg1.x), (y - _arg1.y))); } public function plus(_arg1:Vector):Vector{ return (new Vector((x + _arg1.x), (y + _arg1.y))); } public function distance(_arg1:Vector):Number{ var _local2:Vector; _local2 = this.minus(_arg1); return (_local2.magnitude()); } public function setTo(_arg1:Number, _arg2:Number):void{ x = _arg1; y = _arg2; } public function multEquals(_arg1:Number):Vector{ x = (x * _arg1); y = (y * _arg1); return (this); } public function mult(_arg1:Number):Vector{ return (new Vector((x * _arg1), (y * _arg1))); } } }//package org.cove.ape
Section 277
//WheelParticle (org.cove.ape.WheelParticle) package org.cove.ape { import flash.display.*; public class WheelParticle extends CircleParticle { private var normSlip:Vector; private var rp:RimParticle; private var _traction:Number; private var tan:Vector; private var orientation:Vector; public function WheelParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Number=1, _arg6:Number=0.3, _arg7:Number=0, _arg8:Number=1, _arg9:Sprite=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); tan = new Vector(0, 0); normSlip = new Vector(0, 0); rp = new RimParticle(_arg3, 2); this.traction = _arg8; orientation = new Vector(); } override public function init():void{ cleanup(); if (displayObject != null){ initDisplay(); } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.beginFill(fillColor, fillAlpha); sprite.graphics.drawCircle(0, 0, radius); sprite.graphics.endFill(); sprite.graphics.moveTo(-(radius), 0); sprite.graphics.lineTo(radius, 0); sprite.graphics.moveTo(0, -(radius)); sprite.graphics.lineTo(0, radius); }; paint(); } public function get radian():Number{ orientation.setTo(rp.curr.x, rp.curr.y); return ((Math.atan2(orientation.y, orientation.x) + Math.PI)); } public function get traction():Number{ return ((1 - _traction)); } public function get speed():Number{ return (rp.speed); } override public function paint():void{ sprite.x = curr.x; sprite.y = curr.y; sprite.rotation = angle; } public function set traction(_arg1:Number):void{ _traction = (1 - _arg1); } public function set speed(_arg1:Number):void{ rp.speed = _arg1; } override function resolveCollision(_arg1:Vector, _arg2:Vector, _arg3:Vector, _arg4:Number, _arg5:int, _arg6:AbstractParticle):void{ super.resolveCollision(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); resolve(_arg3.mult(MathUtil.sign((_arg4 * _arg5)))); } public function set angularVelocity(_arg1:Number):void{ rp.angularVelocity = _arg1; } override public function update(_arg1:Number):void{ super.update(_arg1); rp.update(_arg1); } public function get angle():Number{ return ((radian * MathUtil.ONE_EIGHTY_OVER_PI)); } public function get angularVelocity():Number{ return (rp.angularVelocity); } private function resolve(_arg1:Vector):void{ var _local2:Vector; var _local3:Vector; var _local4:Number; var _local5:Number; tan.setTo(-(rp.curr.y), rp.curr.x); tan = tan.normalize(); _local2 = tan.mult(rp.speed); _local3 = velocity.plusEquals(_local2); _local4 = _local3.cross(_arg1); tan.multEquals(_local4); rp.prev.copy(rp.curr.minus(tan)); _local5 = ((1 - _traction) * rp.speed); normSlip.setTo((_local5 * _arg1.y), (_local5 * _arg1.x)); curr.plusEquals(normSlip); rp.speed = (rp.speed * _traction); } } }//package org.cove.ape
Section 278
//RectangleAdvanced (picaso.geom.RectangleAdvanced) package picaso.geom { import flash.geom.*; public class RectangleAdvanced extends Rectangle { public function RectangleAdvanced(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ super(_arg1, _arg2, _arg3, _arg4); } public function get topRight():Point{ return (new Point((x + width), y)); } public function get bottomLeft():Point{ return (new Point(x, (y + height))); } } }//package picaso.geom
Section 279
//SkinElementContainer (picaso.mlui.SkinElementContainer) package picaso.mlui { import flash.display.*; import picaso.*; import flash.utils.*; public class SkinElementContainer extends SpriteAdvanced implements IMemorySafe { private var _baseName:String; private var _cacheAsBitmap:Boolean;// = false public function SkinElementContainer(_arg1:String=null){ _cacheAsBitmap = false; super(); this.baseName = _arg1; } public function get baseName():String{ return (_baseName); } override public function set cacheAsBitmap(_arg1:Boolean):void{ _cacheAsBitmap = _arg1; this.getChildAt(0).cacheAsBitmap = _arg1; } override public function get cacheAsBitmap():Boolean{ return (_cacheAsBitmap); } public function set baseName(_arg1:String):void{ var obj:DisplayObject; var v = _arg1; _baseName = v; if (this.numChildren > 0){ this.removeChildAt(0); }; try { obj = DisplayObject(new ((getDefinitionByName(_baseName) as Class))); } catch(err:Error) { trace(("[SkinElementHolder] Can't find definition for: " + _baseName)); obj = DisplayObject(new ((getDefinitionByName("MISSING_GFX") as Class))); }; this.addChild(obj); if ((obj is InteractiveObject)){ (obj as InteractiveObject).mouseEnabled = false; }; if ((obj is DisplayObjectContainer)){ (obj as DisplayObjectContainer).mouseChildren = false; }; obj.cacheAsBitmap = cacheAsBitmap; } } }//package picaso.mlui
Section 280
//VolumeBar (picaso.templates.VolumeBar) package picaso.templates { import flash.display.*; import flash.events.*; import picaso.*; import picaso.mlui.*; public class VolumeBar extends SkinElementContainer implements IMemorySafe { private var _slider:InteractiveObject; private var _volume:Number; private var _barBG:InteractiveObject; private var _barGFX:DisplayObjectContainer; private var _draging:Boolean;// = false public static const CHANGE_VOLUME:String = "changeVolume"; public function VolumeBar(_arg1:String){ _draging = false; super(_arg1); this.volume = 0.75; } public function get volume():Number{ return (_volume); } function doStuff(_arg1:Event):void{ var _local2:Number; if (_draging){ _local2 = MathUtils.bounds(_barGFX.mouseX, (_slider.width / 2), (_barBG.width - (_slider.width / 2))); this.volume = (0.01 * Math.round(((100 * (_local2 - (_slider.width / 2))) / (_barBG.width - _slider.width)))); }; } public function set volume(_arg1:Number):void{ _arg1 = MathUtils.bounds(_arg1, 0, 1); if (_arg1 != _volume){ _volume = _arg1; _slider.x = ((_slider.width / 2) + (_volume * (_barBG.width - _slider.width))); dispatchEvent(new Event(CHANGE_VOLUME)); }; } private function barBG_MouseDownHandler(_arg1:MouseEvent):void{ var _local2:Number; _local2 = MathUtils.bounds(_barGFX.mouseX, (_slider.width / 2), (_barBG.width - (_slider.width / 2))); this.volume = (0.01 * Math.round(((100 * (_local2 - (_slider.width / 2))) / (_barBG.width - _slider.width)))); beginDrag(_arg1); } function beginDrag(_arg1:MouseEvent):void{ _draging = true; stage.addEventListener(MouseEvent.MOUSE_UP, endDrag, false, 0, true); } function endDrag(_arg1:MouseEvent):void{ _draging = false; stage.removeEventListener(MouseEvent.MOUSE_UP, endDrag); } override public function destroy():void{ _barBG = null; _slider = null; _barGFX = null; super.destroy(); } override public function set baseName(_arg1:String):void{ var _local2:Error; super.baseName = _arg1; _barGFX = DisplayObjectContainer(this.getChildAt(0)); _barGFX.mouseEnabled = true; _barGFX.mouseChildren = true; if (_barGFX["bg"]){ _barBG = _barGFX["bg"]; } else { _local2 = new Error(("[VolumeBar] no 'bg' in graphics: " + _arg1)); throw (_local2); }; if (_barGFX["slider"]){ _slider = _barGFX["slider"]; } else { _local2 = new Error(("[VolumeBar] no 'slider' in graphics: " + _arg1)); throw (_local2); }; _barGFX.addEventListener(Event.ENTER_FRAME, doStuff, false, 0, true); _slider.addEventListener(MouseEvent.MOUSE_DOWN, beginDrag, false, 0, true); _barBG.addEventListener(MouseEvent.MOUSE_DOWN, barBG_MouseDownHandler, false, 0, true); } } }//package picaso.templates
Section 281
//EventDispatcherAdvaned (picaso.EventDispatcherAdvaned) package picaso { import flash.events.*; import flash.utils.*; public class EventDispatcherAdvaned extends EventDispatcher implements IMemorySafe { private var _listeners:Array; private var _externalObjects:Dictionary; public function EventDispatcherAdvaned(_arg1:IEventDispatcher=null){ super(_arg1); _listeners = new Array(); _externalObjects = new Dictionary(true); } public function getExtObject(_arg1:String){ var _local2:*; for (_local2 in _externalObjects) { if (_externalObjects[_local2] == _arg1){ return (_local2); }; }; } public function destroy():void{ var _local1:int; if (_listeners != null){ _local1 = 0; while (_local1 < _listeners.length) { super.removeEventListener(_listeners[_local1].type, _listeners[_local1].listener); _local1++; }; _listeners = null; }; _local1 = 0; while (_local1 < _externalObjects.length) { super.removeEventListener(_listeners[_local1].type, _listeners[_local1].listener); _local1++; }; _listeners = null; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=true):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); _listeners.push({type:_arg1, listener:_arg2}); } public function registerExtObject(_arg1, _arg2:String):void{ _externalObjects[_arg1] = _arg2; } } }//package picaso
Section 282
//IMemorySafe (picaso.IMemorySafe) package picaso { public interface IMemorySafe { function destroy():void; } }//package picaso
Section 283
//MathUtils (picaso.MathUtils) package picaso { import flash.display.*; import flash.geom.*; public class MathUtils { public static function degreesToGrad(_arg1:Number):Number{ _arg1 = MathUtils.normalizeAngle(_arg1); return (((_arg1 * Math.PI) / 180)); } public static function localToLocal(_arg1:Point, _arg2:DisplayObject, _arg3:DisplayObject):Point{ _arg1 = _arg2.localToGlobal(_arg1); _arg1 = _arg3.globalToLocal(_arg1); return (_arg1); } public static function distance(_arg1:Point, _arg2:Point):Number{ return (Math.sqrt((Math.pow((_arg2.x - _arg1.x), 2) + Math.pow((_arg2.y - _arg1.y), 2)))); } public static function normalizeAngle(_arg1:Number):Number{ return ((((_arg1 % 360) + 360) % 360)); } public static function selectNearest(_arg1:Number, _arg2:Array):Number{ var _local3:Number; var _local4:uint; var _local5:Number; var _local6:Number; _local3 = Math.abs((_arg1 - _arg2[0])); _local4 = 0; _local5 = 1; while (_local5 < _arg2.length) { _local6 = Math.abs((_arg1 - _arg2[_local5])); if (_local6 < _local3){ _local3 = _local6; _local4 = _local5; }; _local5++; }; return (_arg2[_local4]); } public static function findAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = Math.round(((Math.atan2(_arg2, _arg1) * 180) / Math.PI)); return (_local3); } public static function bounds(_arg1:Number, _arg2:Number, _arg3:Number):Number{ var _local4:Number; if (_arg2 > _arg3){ _arg2 = (_arg3 + _arg2); _arg3 = (_arg2 - _arg3); _arg2 = (_arg2 - _arg3); } else { if (_arg2 == _arg3){ return (_arg2); }; }; _local4 = Math.max(_arg2, Math.min(_arg1, _arg3)); return (_local4); } public static function gradToDegrees(_arg1:Number):Number{ return (MathUtils.normalizeAngle(((_arg1 * 180) / Math.PI))); } } }//package picaso
Section 284
//SoundInfo (picaso.SoundInfo) package picaso { import flash.events.*; import flash.media.*; import flash.utils.*; public class SoundInfo extends EventDispatcherAdvaned { private var _loop:Boolean;// = false private var _sound:Sound; private var _privilleged:Boolean;// = false private var _fadeTargetVolume:Number;// = 0 private var _currFadeVolume:Number;// = 0 private var _fadeTimer:Timer; private var _volume:Number;// = 1 private var _fadeDivider:Number;// = 10 private var _channel:String;// = "1" private var _loopPosition:Number;// = 0 private var _soundChannel:SoundChannel; private var _stop:Boolean;// = false private var _random:Boolean;// = false private var _name:String; private var _probability:Number;// = 0.005 private var _fade:Boolean;// = false private var _channelVolume:Number;// = 1 public function SoundInfo(_arg1:Object){ var i:String; var obj = _arg1; _privilleged = false; _random = false; _loop = false; _loopPosition = 0; _channel = "1"; _fade = false; _fadeDivider = 10; _volume = 1; _probability = 0.005; _currFadeVolume = 0; _fadeTargetVolume = 0; _channelVolume = 1; _stop = false; super(); _fadeTimer = new Timer(30); for (i in obj) { this[i] = obj[i]; }; try { _sound = new ((getDefinitionByName(_name) as Class)); } catch(error:Error) { _sound = new Sound(); trace(("[SoundInfo] Wrong SoundInfo.name: " + _name)); }; } public function stop():void{ _fadeTargetVolume = 0; _stop = true; startFading(0); if (_random){ dispatchEvent(new Event("RandomSoundComplete")); }; } public function get channelVolume():Number{ return (_channelVolume); } public function get channel():String{ return (_channel); } public function get privilleged():Boolean{ return (_privilleged); } public function set name(_arg1:String):void{ _name = _arg1; } public function get volume():Number{ return (_volume); } public function get fadeDivider():Number{ return (_fadeDivider); } private function dispatchStop(_arg1:Event):void{ deleteSoundChannel(); dispatchEvent(_arg1); } private function doFading(_arg1:TimerEvent=null):void{ if ((((Math.abs((_fadeTargetVolume - _currFadeVolume)) > 0.01)) && (_soundChannel))){ _currFadeVolume = (_currFadeVolume + ((_fadeTargetVolume - _currFadeVolume) / _fadeDivider)); _soundChannel.soundTransform = new SoundTransform(_currFadeVolume); } else { _currFadeVolume = _fadeTargetVolume; if (_soundChannel){ _soundChannel.soundTransform = new SoundTransform(_currFadeVolume); }; if (_stop){ dispatchStop(new Event(Event.SOUND_COMPLETE)); }; _fadeTimer.stop(); _fadeTimer.removeEventListener(TimerEvent.TIMER, doFading); }; } public function set channel(_arg1:String):void{ _channel = _arg1; } public function get fade():Boolean{ return (_fade); } public function get loop():Boolean{ return (_loop); } public function get name():String{ return (_name); } public function play(_arg1:Number=0, _arg2:int=0):SoundChannel{ if (!_random){ if (!_soundChannel){ _stop = false; if (_arg2 > 0){ this.loop = false; this.loopPosition = 0; }; deleteSoundChannel(); _soundChannel = _sound.play(_arg1, _arg2); if (_soundChannel){ if (loop){ _soundChannel.addEventListener(Event.SOUND_COMPLETE, loopMe, false, 0, true); } else { _soundChannel.addEventListener(Event.SOUND_COMPLETE, dispatchStop, false, 0, true); }; _currFadeVolume = 0; startFading((_volume * _channelVolume)); SoundManager.playSound(this); return (_soundChannel); } else { trace("You have no sound card or you run out of available sound channels. The maximum number of sound channels available at once is 32."); }; } else { return (new SoundInfo({channel:this.channel, loop:this.loop, name:this.name, loopPosition:this.loopPosition, random:this.random, privilleged:this.privilleged, channelVolume:this.channelVolume, fade:this.fade, fadeDivider:this.fadeDivider}).play(_arg1, _arg2)); }; } else { SoundManager.playSound(this); }; return (null); } public function get probability():Number{ return (_probability); } public function set channelVolume(_arg1:Number):void{ _channelVolume = MathUtils.bounds(_arg1, 0, 1); this.volume = volume; } private function startFading(_arg1:Number):void{ if (!_stop){ _fadeTargetVolume = _arg1; }; if (_fade){ _fadeTimer.addEventListener(TimerEvent.TIMER, doFading, false, 0, true); _fadeTimer.start(); doFading(); } else { _currFadeVolume = _arg1; if (_soundChannel){ _soundChannel.soundTransform = new SoundTransform(_arg1); }; if (_stop){ dispatchStop(new Event(Event.SOUND_COMPLETE)); }; }; } public function set privilleged(_arg1:Boolean):void{ _privilleged = _arg1; } private function deleteSoundChannel():void{ if (_soundChannel){ if (_loop){ _soundChannel.removeEventListener(Event.SOUND_COMPLETE, loopMe); } else { _soundChannel.removeEventListener(Event.SOUND_COMPLETE, dispatchStop); }; _soundChannel.stop(); _soundChannel = null; }; } public function set volume(_arg1:Number):void{ _volume = Math.round(_arg1); startFading((_volume * _channelVolume)); } public function set loop(_arg1:Boolean):void{ _loop = _arg1; } public function youAreChoosen():void{ if (_random){ deleteSoundChannel(); _soundChannel = _sound.play(); _soundChannel.addEventListener(Event.SOUND_COMPLETE, dispatchStop, false, 0, true); this.volume = _volume; }; } public function get random():Boolean{ return (_random); } public function set loopPosition(_arg1:Number):void{ _loopPosition = _arg1; } private function loopMe(_arg1:Event):void{ dispatchStop(new Event(Event.SOUND_COMPLETE)); if (!_stop){ play(); }; } public function set random(_arg1:Boolean):void{ _random = _arg1; } public function get loopPosition():Number{ return (_loopPosition); } public function set probability(_arg1:Number):void{ _probability = MathUtils.bounds(_arg1, 0, 1); } public function set fade(_arg1:Boolean):void{ _fade = _arg1; } public function set fadeDivider(_arg1:Number):void{ _fadeDivider = Math.max(2, _arg1); } } }//package picaso
Section 285
//SoundManager (picaso.SoundManager) package picaso { import flash.display.*; import flash.events.*; import flash.media.*; import flash.utils.*; public class SoundManager extends EventDispatcherAdvaned { public static const MUTE:String = "mute"; public static const UNMUTE:String = "unmute"; private static var _timer:Timer; private static var _randomTracks:Array = new Array(); private static var _inited:Boolean = false; private static var _fadeTarger:Number = 0.75; private static var _muted:Boolean = false; private static var _channels:Object = new Object(); private static var _fade:Boolean = true; private static var _channelVolumes:Object = new Object(); private static var _volume:Number = 0.75; private static var _channelsMuted:Object = new Object(); private static var _stage:Stage; public function SoundManager(_arg1:Stage){ stage = _arg1; } override public function destroy():void{ var _local1:String; while (_randomTracks.length > 0) { _randomTracks.pop(); }; for (_local1 in _channels) { _channels[_local1] = null; }; _randomTracks = null; _channels = null; _timer = null; _timer.removeEventListener(TimerEvent.TIMER, takeAction); _stage.removeEventListener(SoundManager.MUTE, mute); _stage.removeEventListener(SoundManager.UNMUTE, unmute); _stage = null; super.destroy(); } public static function playASound(_arg1:SoundInfo):void{ init(); if ((((_channelVolumes[_arg1.channel] > -1)) || (_channelsMuted[_arg1.channel]))){ _channelVolumes[_arg1.channel] = ((_channelVolumes[_arg1.channel])>-1) ? _channelVolumes[_arg1.channel] : 1; _arg1.channelVolume = (_channelVolumes[_arg1.channel] * int(!(_channelsMuted[_arg1.channel]))); }; if (!_arg1.random){ playInChannel(_arg1); } else { _arg1.addEventListener("RandomSoundComplete", removeFromRandom); _randomTracks.push(_arg1); }; } public static function set stage(_arg1:Stage):void{ init(); _stage = _arg1; _arg1.addEventListener(SoundManager.MUTE, stage_muteListener); _arg1.addEventListener(SoundManager.UNMUTE, stage_unmuteListener); } public static function set pause(_arg1:Boolean):void{ if (_arg1){ _fadeTarger = 0; } else { if (!_muted){ _fadeTarger = _volume; }; }; } public static function set fade(_arg1:Boolean):void{ _fade = _arg1; } public static function get fade():Boolean{ return (_fade); } private static function init():void{ if (!_inited){ _inited = true; SoundMixer.soundTransform = new SoundTransform(1); _timer = new Timer(30); _timer.addEventListener(TimerEvent.TIMER, takeAction); _timer.start(); }; } public static function setChannelVolume(_arg1, _arg2:Number):void{ var _local3:Number; init(); if ((_arg1 is String)){ _channelVolumes[_arg1] = MathUtils.bounds(_arg2, 0, 1); if (_channels[_arg1] != null){ _channelVolumes[_arg1] = ((_channelVolumes[_arg1])>-1) ? _channelVolumes[_arg1] : 1; SoundInfo(_channels[_arg1]).channelVolume = (_channelVolumes[_arg1] * int(!(_channelsMuted[_arg1]))); }; } else { if ((_arg1 is Array)){ _local3 = 0; while (_local3 < _arg1.length) { _channelVolumes[_arg1[_local3]] = MathUtils.bounds(_arg2, 0, 1); if (_channels[_arg1[_local3]] != null){ _channelVolumes[_arg1[_local3]] = ((_channelVolumes[_arg1[_local3]])>-1) ? _channelVolumes[_arg1[_local3]] : 1; SoundInfo(_channels[_arg1[_local3]]).channelVolume = (_channelVolumes[_arg1[_local3]] * int(!(_channelsMuted[_arg1[_local3]]))); }; _local3++; }; }; }; } private static function stage_muteListener(_arg1:Event=null):void{ mute(); } private static function playRandom():void{ var _local1:Number; var _local2:SoundInfo; var _local3:Number; _local1 = 0; while (_local1 < _randomTracks.length) { _local2 = (_randomTracks[_local1] as SoundInfo); _local3 = Math.random(); if (_local3 <= _local2.probability){ _channelVolumes[_local2.channel] = ((_channelVolumes[_local2.channel])>-1) ? _channelVolumes[_local2.channel] : 1; _local2.channelVolume = (_channelVolumes[_local2.channel] * int(!(_channelsMuted[_local2.channel]))); _local2.youAreChoosen(); playInChannel(_local2); }; _local1++; }; } private static function clrChannel(_arg1:Event):void{ _channels[(_arg1.target as SoundInfo).channel] = null; } private static function takeAction(_arg1:Event):void{ doFade(); playRandom(); } public static function unmute(_arg1=null):void{ var _local2:Number; if (!_arg1){ _fadeTarger = _volume; _muted = false; } else { if ((_arg1 is String)){ _channelsMuted[_arg1] = false; setChannelVolume(_arg1, _channelVolumes[_arg1]); } else { if ((_arg1 is Array)){ _local2 = 0; while (_local2 < _arg1.length) { _channelsMuted[_arg1[_local2]] = false; setChannelVolume(_arg1[_local2], _channelVolumes[_arg1[_local2]]); _local2++; }; }; }; }; } public static function mute(_arg1=null):void{ var _local2:Number; if (!_arg1){ _fadeTarger = 0; _muted = true; } else { if ((_arg1 is String)){ _channelsMuted[_arg1] = true; setChannelVolume(_arg1, _channelVolumes[_arg1]); } else { if ((_arg1 is Array)){ _local2 = 0; while (_local2 < _arg1.length) { _channelsMuted[_arg1[_local2]] = true; setChannelVolume(_arg1[_local2], _channelVolumes[_arg1[_local2]]); _local2++; }; }; }; }; } public static function get volume():Number{ return (_volume); } private static function doFade():void{ if (SoundMixer.soundTransform.volume != _fadeTarger){ if (((_fade) && ((Math.abs((SoundMixer.soundTransform.volume - _fadeTarger)) > 0.03)))){ SoundMixer.soundTransform = new SoundTransform((SoundMixer.soundTransform.volume + ((_fadeTarger - SoundMixer.soundTransform.volume) / 20))); } else { SoundMixer.soundTransform = new SoundTransform(_fadeTarger); }; }; } public static function isSoundPlaying(_arg1:SoundInfo):Boolean{ if (!_channels[_arg1.channel]){ return (false); }; if (SoundInfo(_channels[_arg1.channel]).name == _arg1.name){ return (true); }; return (false); } private static function stage_unmuteListener(_arg1:Event=null):void{ unmute(); } public static function clearRandom():void{ while (_randomTracks.length > 0) { (_randomTracks.pop() as SoundInfo).stop(); }; } private static function removeFromRandom(_arg1:Event):void{ _randomTracks.splice(_randomTracks.indexOf(_arg1.target), 1); } public static function set volume(_arg1:Number):void{ _volume = MathUtils.bounds(_arg1, 0, 1); if (!_muted){ _fadeTarger = _volume; }; } private static function playInChannel(_arg1:SoundInfo):void{ if (_channels[_arg1.channel]){ if (_arg1.privilleged){ _channels[_arg1.channel].removeEventListener(Event.SOUND_COMPLETE, clrChannel); _channels[_arg1.channel].stop(); _channels[_arg1.channel] = _arg1; _arg1.addEventListener(Event.SOUND_COMPLETE, clrChannel); } else { _arg1.stop(); }; } else { _channels[_arg1.channel] = _arg1; _arg1.addEventListener(Event.SOUND_COMPLETE, clrChannel); }; } public static function playSound(_arg1:SoundInfo):void{ init(); playASound(_arg1); } public static function clearChannel(_arg1:String):void{ var _local2:Number; if (_channels[_arg1] != null){ (_channels[_arg1] as SoundInfo).stop(); }; _local2 = 0; while (_local2 < _randomTracks.length) { if (_randomTracks[_local2].channel == _arg1){ _randomTracks[_local2].stop(); _randomTracks.splice(_local2, 1); _local2--; }; _local2++; }; } } }//package picaso
Section 286
//SpriteAdvanced (picaso.SpriteAdvanced) package picaso { import flash.display.*; public class SpriteAdvanced extends Sprite implements IMemorySafe { private var _listeners:Array; public function SpriteAdvanced(){ _listeners = new Array(); } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); _listeners.push({type:_arg1, listener:_arg2}); } public function destroy():void{ var _local1:Number; if (_listeners != null){ _local1 = 0; while (_local1 < _listeners.length) { super.removeEventListener(_listeners[_local1].type, _listeners[_local1].listener); _local1++; }; _listeners = null; }; while (this.numChildren > 0) { if ((this.getChildAt(0) is IMemorySafe)){ (this.getChildAt(0) as IMemorySafe).destroy(); }; this.removeChildAt(0); }; } } }//package picaso
Section 287
//BigPopUpCompleteGame (popup.BigPopUpCompleteGame) package popup { import flash.display.*; import flash.events.*; import flash.text.*; public dynamic class BigPopUpCompleteGame extends MovieClip { public var scoreTextField:TextField; public function BigPopUpCompleteGame(_arg1:Number=0){ addEventListener(Event.ENTER_FRAME, enterFrameHandler); scoreTextField = this.scoreText; trace(scoreTextField); scoreTextField.visible = false; scoreTextField.text = _arg1.toString(); } private function enterFrameHandler(_arg1:Event):void{ if (currentFrame == totalFrames){ stop(); removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } public function cleanup():void{ var _local1:Number; if (hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; _local1 = 1; while (_local1 < numChildren) { _local1++; }; } } }//package popup
Section 288
//BigPopUpInputName (popup.BigPopUpInputName) package popup { import flash.display.*; import core.*; import flash.events.*; import flash.text.*; public dynamic class BigPopUpInputName extends MovieClip { private const divider:Number = 5; private var defPlayerName:String; private var fadingIn:Boolean;// = false private var fadingOut:Boolean;// = false public var inputName:TextField; public var inputOk:PopUpButtonOk; public static const EVENT_SHOWED:String = "showed"; public static const EVENT_OK:String = "onPressedOkButton"; public static const EVENT_HIDDEN:String = "hidden"; public function BigPopUpInputName(){ fadingIn = false; fadingOut = false; super(); (this.inputOk as SimpleButton).addEventListener(MouseEvent.CLICK, onOk, false, 0, true); (this.inputOk as SimpleButton).addEventListener(MouseEvent.MOUSE_OVER, overOk, false, 0, true); (this.inputOk as SimpleButton).addEventListener(MouseEvent.MOUSE_OUT, outOk, false, 0, true); (this.inputName as TextField).maxChars = 17; (this.inputName as TextField).addEventListener(MouseEvent.MOUSE_OVER, overInput, false, 0, true); (this.inputName as TextField).addEventListener(MouseEvent.MOUSE_OUT, outInput, false, 0, true); (this.inputName as TextField).addEventListener(MouseEvent.CLICK, onInput, false, 0, true); (this.inputName as TextField).addEventListener(FocusEvent.FOCUS_OUT, unfocusInput, false, 0, true); this.defPlayerName = Config.DEFAULT_PLAYER_NAME; (this.inputName as TextField).text = Config.DEFAULT_PLAYER_NAME; this.alpha = 0; } private function onOk(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(BigPopUpInputName.EVENT_OK)); } private function outInput(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); } private function unfocusInput(_arg1:FocusEvent):void{ if ((this.inputName as TextField).text.length == 0){ (this.inputName as TextField).text = Config.DEFAULT_PLAYER_NAME; }; } private function onInput(_arg1:MouseEvent):void{ if ((this.inputName as TextField).text == Config.DEFAULT_PLAYER_NAME){ (this.inputName as TextField).text = ""; }; } private function overInput(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_HIDE, true)); } private function fadeOut(_arg1:Event):void{ if (this.alpha > 0.05){ this.alpha = (this.alpha - (Math.abs(this.alpha) / this.divider)); } else { this.alpha = 0; this.fadingOut = false; this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.dispatchEvent(new Event(BigPopUpInputName.EVENT_HIDDEN)); }; } public function hide():void{ if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; this.fadingOut = true; this.addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true); (this.inputName as TextField).selectable = false; (this.inputName as TextField).removeEventListener(MouseEvent.MOUSE_OVER, overInput); (this.inputName as TextField).removeEventListener(MouseEvent.MOUSE_OUT, outInput); (this.inputName as TextField).removeEventListener(MouseEvent.CLICK, onInput); (this.inputName as TextField).removeEventListener(FocusEvent.FOCUS_OUT, unfocusInput); this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); } public function cleanup():void{ if ((this.inputOk as SimpleButton).hasEventListener(MouseEvent.CLICK)){ (this.inputOk as SimpleButton).removeEventListener(MouseEvent.CLICK, onOk); }; if ((this.inputOk as SimpleButton).hasEventListener(MouseEvent.MOUSE_OVER)){ (this.inputOk as SimpleButton).removeEventListener(MouseEvent.MOUSE_OVER, overOk); }; if ((this.inputOk as SimpleButton).hasEventListener(MouseEvent.MOUSE_OUT)){ (this.inputOk as SimpleButton).removeEventListener(MouseEvent.MOUSE_OUT, outOk); }; if ((this.inputName as TextField).hasEventListener(MouseEvent.MOUSE_OVER)){ (this.inputName as TextField).removeEventListener(MouseEvent.MOUSE_OVER, overInput); }; if ((this.inputName as TextField).hasEventListener(MouseEvent.MOUSE_OUT)){ (this.inputName as TextField).removeEventListener(MouseEvent.MOUSE_OUT, outInput); }; if ((this.inputName as TextField).hasEventListener(MouseEvent.CLICK)){ (this.inputName as TextField).removeEventListener(MouseEvent.CLICK, onInput); }; if ((this.inputName as TextField).hasEventListener(FocusEvent.FOCUS_OUT)){ (this.inputName as TextField).removeEventListener(FocusEvent.FOCUS_OUT, unfocusInput); }; this.visible = false; this.dispatchEvent(new Event(Config.EVENT_MOUSE_SHOW, true)); } private function fadeIn(_arg1:Event):void{ if (this.alpha < 0.95){ this.alpha = (this.alpha + (Math.abs((this.alpha - 1)) / this.divider)); } else { this.alpha = 1; this.fadingIn = false; this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.dispatchEvent(new Event(BigPopUpInputName.EVENT_SHOWED)); }; } private function outOk(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function overOk(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } public function show():void{ if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; this.fadingIn = true; this.addEventListener(Event.ENTER_FRAME, fadeIn, false, 0, true); } } }//package popup
Section 289
//BigPopUpLose (popup.BigPopUpLose) package popup { import flash.display.*; import flash.geom.*; import core.*; import flash.events.*; import flash.net.*; import sounds.*; public dynamic class BigPopUpLose extends MovieClip { public var btnYes:SimpleButton; public var btnNo:SimpleButton; private var _buttonSkip:SimpleButton; public var btnSkip:SimpleButton; private var _buttonYes:SimpleButton; private var _buttonNo:SimpleButton; public static const TYPE_YES_NO_SKIP:int = 1; public static const TYPE_YES_NO:int = 0; public function BigPopUpLose(_arg1:int=0){ var _local2:int; var _local3:Array; var _local4:Array; var _local5:SharedObject; var _local6:Boolean; var _local7:int; super(); SoundData.LOSE.play(); this._buttonNo = this["btnNo"]; this._buttonNo.addEventListener(MouseEvent.CLICK, onNoHandler, false, 0, true); this._buttonNo.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._buttonNo.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this._buttonYes = this["btnYes"]; this._buttonYes.addEventListener(MouseEvent.CLICK, onYesHandler, false, 0, true); this._buttonYes.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._buttonYes.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this._buttonSkip = this["btnSkip"]; _local2 = Config.MAX_OPENED_LEVELS; _local5 = SharedObject.getLocal(Config.SHARED_OBJECT_TITLE); if (_local5.size > 0){ if (Config.CURRENT_DIFFICULTY == Config.DIFFICULTY_EASY){ _local3 = _local5.data.isLevelOpened.easy; _local4 = _local5.data.levels.easy; }; if (Config.CURRENT_DIFFICULTY == Config.DIFFICULTY_NORMAL){ _local3 = _local5.data.isLevelOpened.normal; _local4 = _local5.data.levels.normal; }; }; _local6 = false; if (((_local3) && (_local4))){ _local7 = 0; while (_local7 < _local3.length) { if (((_local3[_local7]) && ((_local4[_local7] == 0)))){ _local2--; }; if (((_local3[_local7]) && ((_local7 > (Config.CURRENT_LEVEL - 1))))){ _local6 = true; }; _local7++; }; }; if (_local2 < 0){ _local2 = 0; }; if (_arg1 == TYPE_YES_NO){ _buttonYes.x = (_buttonYes.x + 48); _buttonNo.x = (_buttonNo.x + 48); _buttonSkip.visible = false; }; if (((!(_local6)) && ((_local2 == 0)))){ _buttonSkip.enabled = false; _buttonSkip.transform.colorTransform = new ColorTransform(0.51, 0.51, 0.51, 1, 125, 125, 125); } else { this._buttonSkip.addEventListener(MouseEvent.CLICK, onSkipHandler, false, 0, true); this._buttonSkip.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this._buttonSkip.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; _local3 = null; _local4 = null; _local5 = null; } private function onNoHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_POPUPBUTTON_MAP, true)); } private function onSkipHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_LEVEL_NEXT, true)); } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function onYesHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_POPUPBUTTON_RETRY, true)); } public function cleanup():void{ this._buttonNo.removeEventListener(MouseEvent.CLICK, onNoHandler); this._buttonNo.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this._buttonNo.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); this._buttonYes.removeEventListener(MouseEvent.CLICK, onYesHandler); this._buttonYes.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); this._buttonYes.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); if (_buttonSkip.hasEventListener(MouseEvent.CLICK)){ this._buttonSkip.removeEventListener(MouseEvent.CLICK, onSkipHandler); }; if (_buttonSkip.hasEventListener(MouseEvent.MOUSE_OVER)){ this._buttonSkip.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (_buttonSkip.hasEventListener(MouseEvent.MOUSE_OUT)){ this._buttonSkip.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package popup
Section 290
//BigPopUpWin (popup.BigPopUpWin) package popup { import flash.display.*; import flash.geom.*; import core.*; import flash.events.*; import flash.text.*; import sounds.*; public dynamic class BigPopUpWin extends MovieClip { private var retryButton:SimpleButton; private var nextButton:SimpleButton; private var bestScore:Number; public var budgetText:TextField; public var altScoreText:TextField; public var budget:TextField; private var timer:int; public var scoreBG:MovieClip; private var _scoreCurrent:Number;// = 0 public var altScore:TextField; private var _budget:Number;// = 0 public var difficultyBG:MovieClip; public var nextBtn:SimpleButton; public var altScoreBG:MovieClip; public var budgetBG:MovieClip; private var _budgetCurrent:Number;// = 0 public var difficultyText:TextField; public var score:TextField; private var _score:Number;// = 0 public var mapBtn:SimpleButton; private var currentScore:Number; public var difficulty:TextField; private var mapButton:SimpleButton; public var retryBtn:SimpleButton; private var _difficulty:Number;// = 0 private var _difficultyCurrent:Number;// = 0 private var _altScore:Number;// = 0 public var scoreText:TextField; public static const TYPE_RETRY_MAP:int = 2; public static const TYPE_RETRY_MAP_NEXT:int = 0; public static const TYPE_NEXT:int = 3; public static const TYPE_RETRY_NEXT:int = 1; public function BigPopUpWin(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:int=0){ _score = 0; _scoreCurrent = 0; _altScore = 0; _difficulty = 0; _difficultyCurrent = 0; _budget = 0; _budgetCurrent = 0; super(); stop(); _score = _arg1; _altScore = _arg2; _difficulty = _arg3; _budget = (_arg1 - _arg3); this.nextButton = this["nextBtn"]; this.mapButton = this["mapBtn"]; this.retryButton = this["retryBtn"]; if (_arg4 == TYPE_RETRY_NEXT){ this.mapButton.transform.colorTransform = new ColorTransform(0.51, 0.51, 0.51, 1, 125, 125, 125); this.mapButton.enabled = false; this.nextButton.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.retryButton.addEventListener(MouseEvent.CLICK, onRetry, false, 0, true); this.retryButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.retryButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; if (_arg4 == TYPE_RETRY_MAP){ this.nextButton.transform.colorTransform = new ColorTransform(0.51, 0.51, 0.51, 1, 125, 125, 125); this.nextButton.enabled = false; this.mapButton.addEventListener(MouseEvent.CLICK, onMap, false, 0, true); this.mapButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.mapButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.retryButton.addEventListener(MouseEvent.CLICK, onRetry, false, 0, true); this.retryButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.retryButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; if (_arg4 == TYPE_NEXT){ this.mapButton.transform.colorTransform = new ColorTransform(0.51, 0.51, 0.51, 1, 125, 125, 125); this.mapButton.enabled = false; this.retryButton.transform.colorTransform = new ColorTransform(0.51, 0.51, 0.51, 1, 125, 125, 125); this.retryButton.enabled = false; this.nextButton.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; if (_arg4 == TYPE_RETRY_MAP_NEXT){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.mapButton.addEventListener(MouseEvent.CLICK, onMap, false, 0, true); this.mapButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.mapButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); this.retryButton.addEventListener(MouseEvent.CLICK, onRetry, false, 0, true); this.retryButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); this.retryButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; SoundData.WIN.play(); if (_arg1 != _arg2){ } else { this["difficulty"].y = (this["difficulty"].y + 15); this["difficultyText"].y = (this["difficultyText"].y + 15); this["difficultyBG"].y = (this["difficultyBG"].y + 15); this["budget"].y = (this["budget"].y + 15); this["budgetText"].y = (this["budgetText"].y + 15); this["budgetBG"].y = (this["budgetBG"].y + 15); this["score"].y = (this["score"].y + 15); this["scoreText"].y = (this["scoreText"].y + 15); this["scoreBG"].y = (this["scoreBG"].y + 15); this["altScore"].visible = false; this["altScoreText"].visible = false; this["altScoreBG"].visible = false; }; this["difficulty"].text = _arg3.toString(); this["budget"].text = (_arg1 - _arg3).toString(); this["score"].text = _arg1.toString(); this["altScore"].text = _arg2.toString(); } private function mouseOverHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function enterFrameHandler(_arg1:Event):void{ var _local2:Boolean; var _local3:Boolean; var _local4:Boolean; _local2 = false; _local3 = false; _local4 = false; if (Math.abs((_difficulty - _difficultyCurrent)) > 0.001){ _difficultyCurrent = (_difficultyCurrent + ((_difficulty - _difficultyCurrent) / 3)); this["difficulty"].text = Math.round(_difficultyCurrent).toString(); } else { _difficultyCurrent = _difficulty; this["difficulty"].text = Math.round(_difficulty).toString(); _local2 = true; }; if (Math.abs((_budget - _budgetCurrent)) > 0.001){ _budgetCurrent = (_budgetCurrent + ((_budget - _budgetCurrent) / 3)); this["budget"].text = Math.round(_budgetCurrent).toString(); } else { _budgetCurrent = _budget; this["budget"].text = _budget.toString(); _local3 = true; }; if (Math.abs((_score - _scoreCurrent)) > 0.001){ _scoreCurrent = (_scoreCurrent + ((_score - _scoreCurrent) / 3)); this["score"].text = Math.round(_scoreCurrent).toString(); } else { _scoreCurrent = _score; this["score"].text = _score.toString(); _local4 = true; }; if (((((_local2) && (_local3))) && (_local4))){ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } private function onRetry(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_POPUPBUTTON_RETRY, true)); } private function onNext(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_POPUPBUTTON_NEXT, true)); } private function mouseOutHandler(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function cleanup():void{ if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.mapButton.hasEventListener(MouseEvent.CLICK)){ this.mapButton.removeEventListener(MouseEvent.CLICK, onMap); }; if (this.mapButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.mapButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.mapButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.mapButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.retryButton.hasEventListener(MouseEvent.CLICK)){ this.retryButton.removeEventListener(MouseEvent.CLICK, onRetry); }; if (this.retryButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.retryButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.retryButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.retryButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.hasEventListener(Event.ENTER_FRAME)){ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } private function onMap(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(Config.EVENT_POPUPBUTTON_MAP, true)); } } }//package popup
Section 291
//PopUpButtonOk (popup.PopUpButtonOk) package popup { import flash.display.*; import core.*; import flash.events.*; public class PopUpButtonOk extends SimpleButton { private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } private function clickHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_POPUP_BUTTON_OK, true)); } public function cleanup():void{ if (hasEventListener(MouseEvent.CLICK)){ removeEventListener(MouseEvent.CLICK, clickHandler); }; if (hasEventListener(MouseEvent.MOUSE_OVER)){ removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (hasEventListener(MouseEvent.MOUSE_OUT)){ removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } } }//package popup
Section 292
//wav (rope_break.wav) package rope_break { import flash.media.*; public dynamic class wav extends Sound { } }//package rope_break
Section 293
//wav (rope_connect.wav) package rope_connect { import flash.media.*; public dynamic class wav extends Sound { } }//package rope_connect
Section 294
//SoundData (sounds.SoundData) package sounds { import picaso.*; public class SoundData { public static var THUNDER:SoundInfo = new SoundInfo({name:"thunder.wav", random:false, channel:"nature", loop:true, privilleged:true}); public static var DECK_BREAK:SoundInfo = new SoundInfo({name:"deck_break.wav", random:false, channel:"materials_sounds"}); public static var MUSIC_CHANNELS:Array = [MAIN_THEME.channel]; public static var STEEL_BREAK:SoundInfo = new SoundInfo({name:"steel_break.wav", random:false, channel:"materials_sounds"}); public static var ROPE_CONNECT:SoundInfo = new SoundInfo({name:"rope_connect.wav", random:false, channel:"materials_sounds"}); public static var INTRO_SLIDE_1:SoundInfo = new SoundInfo({name:"intro_slide1.wav", random:false, channel:"music", loop:true, privilleged:true, fade:true}); public static var INTRO_SLIDE_2:SoundInfo = new SoundInfo({name:"intro_slide2.wav", random:false, channel:"music", loop:false, privilleged:true, fade:true}); public static var STORY_WIN:SoundInfo = new SoundInfo({name:"story_victory.wav", random:false, channel:"music", loop:true, privilleged:true}); public static var LOSE:SoundInfo = new SoundInfo({name:"lose.wav", random:false, channel:"music", loop:false, privilleged:true}); public static var BIRD1:SoundInfo = new SoundInfo({name:"bird1.wav", random:false, channel:"nature", loop:false}); public static var BIRD2:SoundInfo = new SoundInfo({name:"bird2.wav", random:false, channel:"nature", loop:false}); public static var BIRD3:SoundInfo = new SoundInfo({name:"bird3.wav", random:false, channel:"nature", loop:false}); public static var BIRD4:SoundInfo = new SoundInfo({name:"bird4.wav", random:false, channel:"nature", loop:false}); public static var INTRO_SLIDE_3:SoundInfo = new SoundInfo({name:"intro_slide3.wav", random:false, channel:"music", loop:true, privilleged:true, fade:true}); public static var MAIN_THEME:SoundInfo = new SoundInfo({name:"main_theme.wav", random:false, channel:"music", loop:true, privilleged:true}); public static var ROPE_BREAK:SoundInfo = new SoundInfo({name:"rope_break.wav", random:false, channel:"materials_sounds"}); public static var SOUND_CHANNELS:Array = [DECK_CONNECT.channel, WATER_SPLASH.channel, THUNDER.channel]; public static var RUN:SoundInfo = new SoundInfo({name:"emulation.mp3", random:false, channel:"music", loop:true, privilleged:true}); public static var FROGS:SoundInfo = new SoundInfo({name:"frogs.wav", random:false, channel:"nature", loop:true, privilleged:true}); public static var DECK_CONNECT:SoundInfo = new SoundInfo({name:"deck_connect.wav", random:false, channel:"materials_sounds"}); public static var WIN:SoundInfo = new SoundInfo({name:"victory.wav", random:false, channel:"music", loop:false, privilleged:true}); public static var STEEL_CONNECT:SoundInfo = new SoundInfo({name:"steel_connect.wav", random:false, channel:"materials_sounds"}); public static var WATER_SPLASH:SoundInfo = new SoundInfo({name:"water_splash.wav", random:false, channel:"environment"}); } }//package sounds
Section 295
//wav (steel_break.wav) package steel_break { import flash.media.*; public dynamic class wav extends Sound { } }//package steel_break
Section 296
//wav (steel_connect.wav) package steel_connect { import flash.media.*; public dynamic class wav extends Sound { } }//package steel_connect
Section 297
//wav (story_victory.wav) package story_victory { import flash.media.*; public dynamic class wav extends Sound { } }//package story_victory
Section 298
//wav (thunder.wav) package thunder { import flash.media.*; public dynamic class wav extends Sound { } }//package thunder
Section 299
//WeakReference (utils.WeakReference) package utils { import flash.utils.*; public class WeakReference { private var dictionary:Dictionary; public function WeakReference(_arg1:Object){ dictionary = new Dictionary(true); dictionary[_arg1] = null; } public function get object():Object{ var _local1:Object; for (_local1 in dictionary) { return (_local1); }; return (null); } } }//package utils
Section 300
//Water (water.Water) package water { import flash.display.*; import flash.events.*; import flash.utils.*; public class Water extends Sprite { private var _amplitude:Number; private var _initWidth:Number; private var _speed:Number; private var _alpha:Number; private var _paused:Boolean; private var _initHeight:Number; public function Water(_arg1:Number, _arg2:Number){ var _local3:String; var _local4:Class; var _local5:*; var _local6:Number; super(); name = ("water" + _arg1.toString); _local3 = ((_arg1)>=10) ? ("water.Water" + _arg1.toString()) : ("water.Water0" + _arg1.toString()); _local4 = (getDefinitionByName(_local3) as Class); _local6 = 0; while (_local6 < _arg2) { _local5 = new (_local4); if ((_local5 as MovieClip).width == 0){ return; }; (_local5 as MovieClip).x = _local6; this.addChild(_local5); _local6 = (_local6 + (_local5 as MovieClip).width); }; this.cacheAsBitmap = true; } private function enterFrameHandler(_arg1:Event):void{ if (this.paused){ return; }; y = (_initHeight + (_amplitude * Math.sin(_alpha))); _alpha = (_alpha + (Math.PI / _speed)); if (_alpha > (Math.PI * 2)){ _alpha = 0; }; } public function get paused():Boolean{ return (this._paused); } public function set paused(_arg1:Boolean):void{ this._paused = _arg1; } public function cleanup():void{ if (hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } public function launch(_arg1:Number, _arg2:Number, _arg3:Number):void{ if (_speed == 0){ return; }; _amplitude = _arg1; _alpha = _arg2; _speed = _arg3; _initWidth = x; _initHeight = y; addEventListener(Event.ENTER_FRAME, enterFrameHandler); } } }//package water
Section 301
//Water01 (water.Water01) package water { import flash.display.*; public class Water01 extends MovieClip { } }//package water
Section 302
//Water02 (water.Water02) package water { import flash.display.*; public class Water02 extends MovieClip { } }//package water
Section 303
//Water03 (water.Water03) package water { import flash.display.*; public class Water03 extends MovieClip { } }//package water
Section 304
//Water04 (water.Water04) package water { import flash.display.*; public class Water04 extends MovieClip { } }//package water
Section 305
//Water05 (water.Water05) package water { import flash.display.*; public class Water05 extends MovieClip { } }//package water
Section 306
//Water06 (water.Water06) package water { import flash.display.*; public class Water06 extends MovieClip { } }//package water
Section 307
//Water07 (water.Water07) package water { import flash.display.*; public class Water07 extends MovieClip { } }//package water
Section 308
//wav (water_splash.wav) package water_splash { import flash.media.*; public dynamic class wav extends Sound { } }//package water_splash
Section 309
//wav (victory.wav) package victory { import flash.media.*; public dynamic class wav extends Sound { } }//package victory
Section 310
//Bird (vis.Bird) package vis { import flash.display.*; import core.*; import flash.events.*; public class Bird extends MovieClip { private var _paused:Boolean;// = false private var _sign:Number; public function Bird(_arg1:Boolean=false){ _paused = false; super(); if (_arg1){ init(); addEventListener(MouseEvent.CLICK, clickHandler); }; } private function init():void{ _sign = (((Math.random() - 0.5))>=0) ? 1 : -1; scaleX = (_sign * 0.3); scaleY = 0.3; x = ((_sign * Config.SCREEN_WIDTH) * 3); y = ((Math.random() * 80) + 100); if (!hasEventListener(Event.ENTER_FRAME)){ addEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } private function enterFrameHandler(_arg1:Event):void{ if (this.paused){ return; }; x = (x - _sign); if ((((((_sign > 0)) && ((x <= (-(Config.SCREEN_WIDTH) * 3))))) || ((((_sign < 0)) && ((x >= (Config.SCREEN_WIDTH * 3))))))){ init(); }; } public function get paused():Boolean{ return (this._paused); } public function set paused(_arg1:Boolean):void{ if (_arg1){ this.stop(); } else { this.play(); }; this._paused = _arg1; } private function clickHandler(_arg1:MouseEvent):void{ reverse(); } private function reverse():void{ _sign = (_sign * -1); scaleX = (scaleX * -1); } } }//package vis
Section 311
//BlueSky (vis.BlueSky) package vis { import flash.display.*; public class BlueSky extends MovieClip { } }//package vis
Section 312
//Clouds (vis.Clouds) package vis { import flash.display.*; import flash.events.*; public class Clouds extends MovieClip { private var _count:Number; private var _speed:Number; private var _paused:Boolean;// = false private var _rightBorder:Number;// = 0 private var _leftBorder:Number;// = 0 public function Clouds(){ _paused = false; _leftBorder = 0; _rightBorder = 0; super(); _count = 0; _speed = (Math.random() + 0.5); chooseCloud(); chooseCoordinates(); addEventListener(Event.ENTER_FRAME, enterFrameHandler); } public function get leftBorder():Number{ return (_leftBorder); } private function enterFrameHandler(_arg1:Event):void{ if (this.paused){ return; }; x = (x - _speed); if (((((this.rightBorder - this.leftBorder) > 0)) && ((this.x < (this.leftBorder - (2 * this.width)))))){ chooseCloud(); chooseCoordinates(); } else { if (((((this.rightBorder - this.leftBorder) == 0)) && ((x < -(this.width))))){ chooseCloud(); chooseCoordinates(); }; }; } public function set leftBorder(_arg1:Number):void{ _leftBorder = _arg1; } public function get paused():Boolean{ return (this._paused); } public function set paused(_arg1:Boolean):void{ this._paused = _arg1; } public function chooseCloud():void{ var _local1:int; var _local2:Number; var _local3:Number; _local1 = Math.floor(((Math.random() * totalFrames) + 1)); gotoAndStop(_local1); _local2 = ((Math.random() * 0.3) + 0.3); _local3 = 1; scaleX = (_local2 * _local3); scaleY = _local2; this.cacheAsBitmap = true; } public function get rightBorder():Number{ return (_rightBorder); } public function chooseCoordinates():void{ if ((this.rightBorder - this.leftBorder) > 0){ x = (this.rightBorder + (2 * this.width)); } else { x = (3000 + this.width); }; y = ((Math.random() * 100) + 50); } public function set rightBorder(_arg1:Number):void{ _rightBorder = _arg1; } } }//package vis
Section 313
//DayCloud (vis.DayCloud) package vis { public class DayCloud extends Clouds { } }//package vis
Section 314
//DotsBaloon (vis.DotsBaloon) package vis { import flash.display.*; import flash.events.*; public class DotsBaloon extends MovieClip { private const divider:Number = 3; private var fadingIn:Boolean;// = false private var fadingOut:Boolean;// = false public static const EVENT_SHOWED:String = "showed"; public static const EVENT_HIDDEN:String = "hidden"; public function DotsBaloon():void{ fadingOut = false; fadingIn = false; super(); this.alpha = 0; } private function fadeOut(_arg1:Event):void{ if (this.alpha > 0.05){ this.alpha = (this.alpha - (Math.abs(this.alpha) / this.divider)); } else { this.alpha = 0; this.fadingOut = false; this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.dispatchEvent(new Event(EVENT_HIDDEN)); }; } public function hide():void{ if (this.fadingOut){ return; }; if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; this.fadingOut = true; this.addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true); } public function cleanup():void{ if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; } private function fadeIn(_arg1:Event):void{ if (this.alpha < 0.95){ this.alpha = (this.alpha + (Math.abs((this.alpha - 1)) / this.divider)); } else { this.alpha = 1; this.fadingIn = false; this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.dispatchEvent(new Event(EVENT_SHOWED)); }; } public function show():void{ if (this.fadingIn){ return; }; if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; this.fadingIn = true; this.addEventListener(Event.ENTER_FRAME, fadeIn, false, 0, true); } } }//package vis
Section 315
//Fader (vis.Fader) package vis { import flash.display.*; import flash.events.*; public class Fader extends MovieClip { private const alphaMax:Number = 0.7; private var _fadeOut:Boolean;// = false private var _fadeIn:Boolean;// = false public static const COMPLETE:String = "complete"; public function Fader(){ _fadeIn = false; _fadeOut = false; super(); this.alpha = 0; } private function enterFrameHandler(_arg1:Event):void{ if (this._fadeIn){ if (Math.abs((this.alpha - this.alphaMax)) > 0.01){ this.alpha = (this.alpha + ((this.alphaMax - this.alpha) / 3)); } else { this.alpha = this.alphaMax; this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); this.dispatchEvent(new Event(Fader.COMPLETE, true)); }; } else { if (this._fadeOut){ if (Math.abs(this.alpha) > 0.01){ this.alpha = (this.alpha - (this.alpha / 2)); } else { this.alpha = 0; this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); this.dispatchEvent(new Event(Fader.COMPLETE, true)); }; }; }; } public function fadeOut():void{ if (this._fadeOut){ return; }; this.alpha = this.alphaMax; this._fadeIn = false; this._fadeOut = true; if (!this.hasEventListener(Event.ENTER_FRAME)){ this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); }; } public function get fadingIn():Boolean{ return (this._fadeIn); } public function get fadingOut():Boolean{ return (this._fadeOut); } public function fadeIn():void{ if (this._fadeIn){ return; }; this.alpha = 0; this._fadeIn = true; this._fadeOut = false; if (!this.hasEventListener(Event.ENTER_FRAME)){ this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); }; } } }//package vis
Section 316
//Grass01 (vis.Grass01) package vis { import flash.display.*; public class Grass01 extends MovieClip { } }//package vis
Section 317
//Grass02 (vis.Grass02) package vis { import flash.display.*; public class Grass02 extends MovieClip { } }//package vis
Section 318
//Grass03 (vis.Grass03) package vis { import flash.display.*; public class Grass03 extends MovieClip { } }//package vis
Section 319
//Grass04 (vis.Grass04) package vis { import flash.display.*; public class Grass04 extends MovieClip { } }//package vis
Section 320
//Grass05 (vis.Grass05) package vis { import flash.display.*; public class Grass05 extends MovieClip { } }//package vis
Section 321
//Grass06 (vis.Grass06) package vis { import flash.display.*; public class Grass06 extends MovieClip { } }//package vis
Section 322
//Grass07 (vis.Grass07) package vis { import flash.display.*; public class Grass07 extends MovieClip { } }//package vis
Section 323
//Grass08 (vis.Grass08) package vis { import flash.display.*; public class Grass08 extends MovieClip { } }//package vis
Section 324
//GroundTexture (vis.GroundTexture) package vis { import flash.display.*; public class GroundTexture extends BitmapData { public function GroundTexture(){ super(128, 107); } } }//package vis
Section 325
//Hook (vis.Hook) package vis { import flash.display.*; public dynamic class Hook extends MovieClip { public var steelConstractionMC:MovieClip; public var hookMC:MovieClip; public function Hook(_arg1:Number=0, _arg2:Number=1, _arg3:Number=1):void{ this["steelConstractionMC"].scaleX = _arg2; this["steelConstractionMC"].scaleY = _arg3; this["steelConstractionMC"].rotation = _arg1; this.cacheAsBitmap = true; } } }//package vis
Section 326
//LoaderScreen (vis.LoaderScreen) package vis { import flash.display.*; import levels.*; import core.*; public class LoaderScreen extends MovieClip { private var baloonStartX:Number; private var loadingStartX:Number; public var baloonMC:MovieClip; public var redirectingMC:MovieClip; public var loadingMC:MovieClip; public static const TYPE_REDIRECTING:int = 1; public static const TYPE_LOADING:int = 0; public function LoaderScreen(_arg1:String="weatherday", _arg2:int=0):void{ var _local3:BlueSky; var _local4:int; var _local5:NightSky; var _local6:Star; var _local7:NastySky; super(); if (_arg2 == TYPE_LOADING){ this["redirectingMC"].visible = false; } else { this["loadingMC"].visible = false; }; if (_arg1 == LevelData.WEATHER_DAY){ _local3 = new BlueSky(); _local3.scaleX = (Config.SCREEN_WIDTH / _local3.width); this.addChildAt(_local3, 0); } else { if (_arg1 == LevelData.WEATHER_NIGHT){ _local4 = 0; while (_local4 < 40) { _local6 = new Star(); _local6.x = (Math.random() * Config.SCREEN_WIDTH); _local6.y = (Math.random() * Config.SCREEN_HEIGHT); this.addChildAt(_local6, 0); _local4++; }; _local5 = new NightSky(); if (_local5.width != 0){ _local5.scaleX = (Config.SCREEN_WIDTH / _local5.width); }; this.addChildAt(_local5, 0); } else { if (_arg1 == LevelData.WEATHER_CLOUDY){ _local7 = new NastySky(); if (_local7.width != 0){ _local7.scaleX = (Config.SCREEN_WIDTH / _local7.width); }; this.addChildAt(_local7, 0); }; }; }; baloonStartX = this["baloonMC"]["maskMC"].x; loadingStartX = this["loadingMC"]["maskMC"].x; } public function setPercentage(_arg1:Number):void{ var _local2:Number; if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 1){ _arg1 = 1; }; _local2 = (_arg1 * 223); this["baloonMC"]["maskMC"].x = (this.baloonStartX + _local2); this["loadingMC"]["maskMC"].x = (this.loadingStartX + _local2); } } }//package vis
Section 327
//LoadingAdText (vis.LoadingAdText) package vis { import flash.display.*; import flash.events.*; public class LoadingAdText extends MovieClip { private var direction:int;// = 0 private var iteration:Number;// = 0.05 public function LoadingAdText(){ direction = 0; iteration = 0.05; super(); this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true); } private function onRemovedFromStage(_arg1:Event):void{ this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage); this.removeEventListener(Event.ENTER_FRAME, onEnterFrameHandler); } private function onAddedToStage(_arg1:Event):void{ this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); this.alpha = 1; this.direction = -1; this.addEventListener(Event.ENTER_FRAME, onEnterFrameHandler, false, 0, true); this.addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage, false, 0, true); } private function onEnterFrameHandler(_arg1:Event):void{ if (this.direction > 0){ this.alpha = (this.alpha + this.iteration); if (this.alpha >= 1){ this.direction = -1; return; }; }; if (direction < 0){ this.alpha = (this.alpha - this.iteration); if (this.alpha <= 0){ this.direction = 1; return; }; }; } } }//package vis
Section 328
//Moon (vis.Moon) package vis { import flash.display.*; import flash.events.*; public class Moon extends MovieClip { public function Moon(){ this.addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true); } private function enterFrameHandler(_arg1:Event):void{ if (this.currentFrame == this.totalFrames){ stop(); }; if ((((this.currentFrame == this.totalFrames)) && (((Math.random() * 500) > 498)))){ this.gotoAndPlay(1); }; } } }//package vis
Section 329
//NastyCloud (vis.NastyCloud) package vis { public class NastyCloud extends Clouds { } }//package vis
Section 330
//NastySky (vis.NastySky) package vis { import flash.display.*; public class NastySky extends MovieClip { } }//package vis
Section 331
//NightCloud (vis.NightCloud) package vis { public class NightCloud extends Clouds { } }//package vis
Section 332
//NightSky (vis.NightSky) package vis { import flash.display.*; public class NightSky extends MovieClip { } }//package vis
Section 333
//Rain (vis.Rain) package vis { import flash.display.*; public class Rain extends MovieClip { public function Rain(){ cacheAsBitmap = true; } } }//package vis
Section 334
//RoadSign (vis.RoadSign) package vis { import flash.display.*; public class RoadSign extends MovieClip { public static const SIGN_LEFT:String = "signLeft"; public static const SIGN_RIGHT:String = "signRight"; public function RoadSign(_arg1:String="signLeft"){ if (_arg1 == SIGN_RIGHT){ this.scaleX = -1; }; this.cacheAsBitmap = true; } } }//package vis
Section 335
//Star (vis.Star) package vis { import flash.display.*; public class Star extends MovieClip { } }//package vis
Section 336
//Sun (vis.Sun) package vis { import flash.display.*; public class Sun extends MovieClip { } }//package vis
Section 337
//TalkBaloon (vis.TalkBaloon) package vis { import flash.display.*; import core.*; import flash.events.*; import flash.text.*; public class TalkBaloon extends MovieClip { private const divider:Number = 3; private var yesButton:SimpleButton; public var yesBtn:SimpleButton; private var nextButton:SimpleButton; private var _text:String; public var textFieldY:Number; private var okButton:SimpleButton; private var _type:int; private var textProcessing:Boolean; private var fadingIn:Boolean; public var skipBtn:SimpleButton; private var _textField:TextField; public var nextBtn:SimpleButton; private var noButton:SimpleButton; private var fadingOut:Boolean; private var skipButton:SimpleButton; private var textMask:Sprite; public var noBtn:SimpleButton; public var okBtn:SimpleButton; public var textfield:TextField; private var _centeredText:Boolean;// = false public static const TYPE_OK:int = 5; public static const EVENT_TEXT_COMPLETE:String = "textComplete"; public static const EVENT_SHOWED:String = "showed"; public static const EVENT_YES:String = "onYES"; public static const EVENT_HIDDEN:String = "hidden"; public static const TYPE_NEXT:int = 1; public static const EVENT_OK:String = "onOk"; public static const TYPE_YES_NO:int = 0; public static const EVENT_NEXT:String = "onNext"; public static const TYPE_SKIP:int = 4; public static const EVENT_NO:String = "onNo"; public static const EVENT_SKIP:String = "onSkip"; public static const TYPE_SKIP_NEXT:int = 3; public static const TYPE_BLANK:int = 2; public function TalkBaloon(){ _centeredText = false; super(); this.textField = this["textfield"]; this.textField.text = ""; this.textField.embedFonts = true; this.nextButton = this["nextBtn"]; this.yesButton = this["yesBtn"]; this.noButton = this["noBtn"]; this.skipButton = this["skipBtn"]; this.okButton = this["okBtn"]; this.text = ""; this.type = TalkBaloon.TYPE_BLANK; this.fadingIn = false; this.fadingOut = false; this.textProcessing = false; this.textFieldY = this.textField.y; this.alpha = 0; } public function get centeredText():Boolean{ return (_centeredText); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function onSkip(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloon.EVENT_SKIP)); } public function pause():void{ } private function fadeOut(_arg1:Event):void{ if (this.alpha > 0.05){ this.alpha = (this.alpha - (Math.abs(this.alpha) / this.divider)); } else { this.alpha = 0; this.visible = false; this.fadingOut = false; this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.dispatchEvent(new Event(TalkBaloon.EVENT_HIDDEN)); }; } private function onNo(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloon.EVENT_NO)); } public function get text():String{ return (_text); } public function set fontSize(_arg1:Object):void{ var _local2:TextFormat; _local2 = this.textField.defaultTextFormat; _local2.size = _arg1; this.textField.defaultTextFormat = _local2; } private function onOk(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloon.EVENT_OK)); } public function set centeredText(_arg1:Boolean):void{ _centeredText = _arg1; } public function hide():void{ if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; this.fadingOut = true; this.addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true); } public function set type(_arg1:int):void{ if (_arg1 == TalkBaloon.TYPE_YES_NO){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = true; if (!this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.addEventListener(MouseEvent.CLICK, onYes, false, 0, true); }; if (!this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.noButton.visible = true; if (!this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.addEventListener(MouseEvent.CLICK, onNo, false, 0, true); }; if (!this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloon.TYPE_NEXT){ this.nextButton.visible = true; this.nextButton.x = 188.8; if (!this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TYPE_SKIP_NEXT){ this.nextButton.visible = true; this.nextButton.x = 224.1; if (!this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.skipButton.visible = true; if (!this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.addEventListener(MouseEvent.CLICK, onSkip, false, 0, true); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloon.TYPE_SKIP){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = true; this.skipButton.x = 188.8; if (!this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.addEventListener(MouseEvent.CLICK, onSkip, false, 0, true); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloon.TYPE_OK){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = true; if (!this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.addEventListener(MouseEvent.CLICK, onOk, false, 0, true); }; if (!this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; } else { this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; }; }; }; }; }; _type = _arg1; } public function set text(_arg1:String):void{ if (_arg1 == _text){ return; }; _text = _arg1; this.textField.text = _text; if (this.centeredText){ this.textField.y = (this.textFieldY + ((this.textField.height - this.textField.textHeight) / 2)); }; } private function onYes(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloon.EVENT_YES)); } private function textProcessingManager(_arg1:Event):void{ if (!this.textProcessing){ return; }; if (this.textField.text.length == this.text.length){ this.removeEventListener(Event.ENTER_FRAME, textProcessingManager); this.textProcessing = false; this.dispatchEvent(new Event(TalkBaloon.EVENT_TEXT_COMPLETE)); return; }; this.textField.appendText(this.text.charAt(this.textField.length)); } public function get type():int{ return (_type); } private function onNext(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloon.EVENT_NEXT)); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function set textField(_arg1:TextField):void{ _textField = _arg1; } private function fadeIn(_arg1:Event):void{ if (this.alpha < 0.95){ this.alpha = (this.alpha + (Math.abs((this.alpha - 1)) / this.divider)); } else { this.alpha = 1; this.fadingIn = false; this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.dispatchEvent(new Event(TalkBaloon.EVENT_SHOWED)); }; } public function get textField():TextField{ return (_textField); } public function cleanup():void{ if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; if (textProcessing){ this.removeEventListener(Event.ENTER_FRAME, textProcessingManager); this.textProcessing = false; }; } public function show():void{ if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; this.fadingIn = true; this.visible = true; this.addEventListener(Event.ENTER_FRAME, fadeIn, false, 0, true); } public function get fontSize():Object{ return (textField.defaultTextFormat.size); } } }//package vis
Section 338
//TalkBaloonAlt (vis.TalkBaloonAlt) package vis { import flash.display.*; import core.*; import flash.events.*; import flash.text.*; public class TalkBaloonAlt extends MovieClip { private const divider:Number = 3; public var yesBtn:SimpleButton; private var nextButton:SimpleButton; private var _text:String; private var _type:int; private var textProcessing:Boolean; private var fadingIn:Boolean; public var skipBtn:SimpleButton; private var _textField:TextField; public var nextBtn:SimpleButton; private var noButton:SimpleButton; private var fadingOut:Boolean; private var skipButton:SimpleButton; private var textMask:Sprite; public var noBtn:SimpleButton; public var textfield:TextField; private var yesButton:SimpleButton; public static const EVENT_SHOWED:String = "showed"; public static const TYPE_SKIP:int = 4; public static const TYPE_YES_NO:int = 0; public static const EVENT_TEXT_COMPLETE:String = "textComplete"; public static const EVENT_SKIP:String = "onSkip"; public static const TYPE_SKIP_NEXT:int = 3; public static const TYPE_BLANK:int = 2; public static const EVENT_YES:String = "onYES"; public static const EVENT_NO:String = "onNo"; public static const EVENT_HIDDEN:String = "hidden"; public static const TYPE_NEXT:int = 1; public static const EVENT_NEXT:String = "onNext"; public function TalkBaloonAlt(){ this.textField = this["textfield"]; this.textField.text = ""; this.textField.embedFonts = true; this.nextButton = this["nextBtn"]; this.yesButton = this["yesBtn"]; this.noButton = this["noBtn"]; this.skipButton = this["skipBtn"]; this.text = ""; this.type = TalkBaloonAlt.TYPE_BLANK; this.fadingIn = false; this.fadingOut = false; this.textProcessing = false; this.alpha = 0; } private function onNo(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonAlt.EVENT_NO)); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function onSkip(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonAlt.EVENT_SKIP)); } public function pause():void{ } public function get text():String{ return (_text); } public function hide():void{ if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; this.fadingOut = true; this.addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true); } public function set type(_arg1:int):void{ if (_arg1 == TalkBaloonAlt.TYPE_YES_NO){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = true; if (!this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.addEventListener(MouseEvent.CLICK, onYes); }; if (!this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = true; if (!this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.addEventListener(MouseEvent.CLICK, onNo); }; if (!this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloonAlt.TYPE_NEXT){ this.nextButton.visible = true; this.nextButton.x = this.skipButton.x; this.nextButton.y = this.skipButton.y; if (!this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TYPE_SKIP_NEXT){ this.nextButton.visible = true; this.nextButton.x = 439.3; if (!this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = true; this.skipButton.x = 365.3; if (!this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.addEventListener(MouseEvent.CLICK, onSkip); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloonAlt.TYPE_SKIP){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = true; this.skipButton.x = 439.3; if (!this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.addEventListener(MouseEvent.CLICK, onSkip); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; }; }; }; }; _type = _arg1; } public function set text(_arg1:String):void{ if (_arg1 == _text){ return; }; _text = _arg1; this.textField.text = _text; } private function fadeOut(_arg1:Event):void{ if (this.alpha > 0.05){ this.alpha = (this.alpha - (Math.abs(this.alpha) / this.divider)); } else { this.alpha = 0; this.visible = false; this.fadingOut = false; this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.dispatchEvent(new Event(TalkBaloonAlt.EVENT_HIDDEN)); }; } private function onYes(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonAlt.EVENT_YES)); } private function textProcessingManager(_arg1:Event):void{ if (!this.textProcessing){ return; }; if (this.textField.text.length == this.text.length){ this.removeEventListener(Event.ENTER_FRAME, textProcessingManager); this.textProcessing = false; this.dispatchEvent(new Event(TalkBaloonAlt.EVENT_TEXT_COMPLETE)); return; }; this.textField.appendText(this.text.charAt(this.textField.length)); } public function get type():int{ return (_type); } private function onNext(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonAlt.EVENT_NEXT)); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function set textField(_arg1:TextField):void{ _textField = _arg1; } private function fadeIn(_arg1:Event):void{ if (this.alpha < 0.95){ this.alpha = (this.alpha + (Math.abs((this.alpha - 1)) / this.divider)); } else { this.alpha = 1; this.fadingIn = false; this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.dispatchEvent(new Event(TalkBaloonAlt.EVENT_SHOWED)); }; } public function get textField():TextField{ return (_textField); } public function cleanup():void{ if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; if (textProcessing){ this.removeEventListener(Event.ENTER_FRAME, textProcessingManager); this.textProcessing = false; }; } public function set fontSize(_arg1:Object):void{ var _local2:TextFormat; _local2 = this.textField.defaultTextFormat; _local2.size = _arg1; this.textField.defaultTextFormat = _local2; } public function show():void{ if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; this.fadingIn = true; this.visible = true; this.addEventListener(Event.ENTER_FRAME, fadeIn, false, 0, true); } public function get fontSize():Object{ return (textField.defaultTextFormat.size); } } }//package vis
Section 339
//TalkBaloonAltInv (vis.TalkBaloonAltInv) package vis { import flash.display.*; import core.*; import flash.events.*; import flash.text.*; public class TalkBaloonAltInv extends MovieClip { private const divider:Number = 3; public var yesBtn:SimpleButton; private var nextButton:SimpleButton; private var _text:String; private var _type:int; private var textProcessing:Boolean; private var fadingIn:Boolean; public var skipBtn:SimpleButton; private var _textField:TextField; public var nextBtn:SimpleButton; private var noButton:SimpleButton; private var fadingOut:Boolean; private var skipButton:SimpleButton; private var textMask:Sprite; public var noBtn:SimpleButton; public var textfield:TextField; private var yesButton:SimpleButton; public static const EVENT_SHOWED:String = "showed"; public static const TYPE_SKIP:int = 4; public static const TYPE_YES_NO:int = 0; public static const EVENT_TEXT_COMPLETE:String = "textComplete"; public static const EVENT_SKIP:String = "onSkip"; public static const TYPE_SKIP_NEXT:int = 3; public static const TYPE_BLANK:int = 2; public static const EVENT_YES:String = "onYES"; public static const EVENT_NO:String = "onNo"; public static const EVENT_HIDDEN:String = "hidden"; public static const TYPE_NEXT:int = 1; public static const EVENT_NEXT:String = "onNext"; public function TalkBaloonAltInv(){ this.textField = this["textfield"]; this.textField.text = ""; this.textField.embedFonts = true; this.nextButton = this["nextBtn"]; this.yesButton = this["yesBtn"]; this.noButton = this["noBtn"]; this.skipButton = this["skipBtn"]; this.text = ""; this.type = TalkBaloonAltInv.TYPE_BLANK; this.fadingIn = false; this.fadingOut = false; this.textProcessing = false; this.alpha = 0; } private function onNo(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonAltInv.EVENT_NO)); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function onSkip(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonAltInv.EVENT_SKIP)); } public function pause():void{ } public function get text():String{ return (_text); } public function hide():void{ if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; this.fadingOut = true; this.addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true); } public function set type(_arg1:int):void{ if (_arg1 == TalkBaloonAltInv.TYPE_YES_NO){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = true; if (!this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.addEventListener(MouseEvent.CLICK, onYes); }; if (!this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = true; if (!this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.addEventListener(MouseEvent.CLICK, onNo); }; if (!this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloonAltInv.TYPE_NEXT){ this.nextButton.visible = true; this.nextButton.x = this.skipButton.x; this.nextButton.y = this.skipButton.y; if (!this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TYPE_SKIP_NEXT){ this.nextButton.visible = true; this.nextButton.x = 439.3; this.nextButton.y = -29.7; if (!this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = true; this.skipButton.x = 365.3; this.skipButton.y = -31.7; if (!this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.addEventListener(MouseEvent.CLICK, onSkip); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloonAltInv.TYPE_SKIP){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = true; this.skipButton.x = 439.3; this.skipButton.y = -31.7; if (!this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.addEventListener(MouseEvent.CLICK, onSkip); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; }; }; }; }; _type = _arg1; } public function set text(_arg1:String):void{ if (_arg1 == _text){ return; }; _text = _arg1; this.textField.text = _text; } private function fadeOut(_arg1:Event):void{ if (this.alpha > 0.05){ this.alpha = (this.alpha - (Math.abs(this.alpha) / this.divider)); } else { this.alpha = 0; this.visible = false; this.fadingOut = false; this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.dispatchEvent(new Event(TalkBaloonAltInv.EVENT_HIDDEN)); }; } private function onYes(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonAltInv.EVENT_YES)); } private function textProcessingManager(_arg1:Event):void{ if (!this.textProcessing){ return; }; if (this.textField.text.length == this.text.length){ this.removeEventListener(Event.ENTER_FRAME, textProcessingManager); this.textProcessing = false; this.dispatchEvent(new Event(TalkBaloonAltInv.EVENT_TEXT_COMPLETE)); return; }; this.textField.appendText(this.text.charAt(this.textField.length)); } public function get type():int{ return (_type); } private function onNext(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonAltInv.EVENT_NEXT)); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function set textField(_arg1:TextField):void{ _textField = _arg1; } private function fadeIn(_arg1:Event):void{ if (this.alpha < 0.95){ this.alpha = (this.alpha + (Math.abs((this.alpha - 1)) / this.divider)); } else { this.alpha = 1; this.fadingIn = false; this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.dispatchEvent(new Event(TalkBaloonAltInv.EVENT_SHOWED)); }; } public function get textField():TextField{ return (_textField); } public function cleanup():void{ if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; if (textProcessing){ this.removeEventListener(Event.ENTER_FRAME, textProcessingManager); this.textProcessing = false; }; } public function set fontSize(_arg1:Object):void{ var _local2:TextFormat; _local2 = this.textField.defaultTextFormat; _local2.size = _arg1; this.textField.defaultTextFormat = _local2; } public function show():void{ if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; this.visible = true; this.fadingIn = true; this.addEventListener(Event.ENTER_FRAME, fadeIn, false, 0, true); } public function get fontSize():Object{ return (textField.defaultTextFormat.size); } } }//package vis
Section 340
//TalkBaloonInv (vis.TalkBaloonInv) package vis { import flash.display.*; import core.*; import flash.events.*; import flash.text.*; public class TalkBaloonInv extends MovieClip { private const divider:Number = 3; public var yesBtn:SimpleButton; private var nextButton:SimpleButton; private var _text:String; private var okButton:SimpleButton; private var _type:int; private var textProcessing:Boolean; private var fadingIn:Boolean; public var skipBtn:SimpleButton; private var _textField:TextField; public var nextBtn:SimpleButton; private var noButton:SimpleButton; private var fadingOut:Boolean; private var skipButton:SimpleButton; private var textMask:Sprite; public var noBtn:SimpleButton; public var okBtn:SimpleButton; public var textfield:TextField; private var yesButton:SimpleButton; public static const TYPE_OK:int = 5; public static const EVENT_TEXT_COMPLETE:String = "textComplete"; public static const EVENT_SHOWED:String = "showed"; public static const EVENT_YES:String = "onYES"; public static const EVENT_HIDDEN:String = "hidden"; public static const TYPE_NEXT:int = 1; public static const EVENT_OK:String = "onOk"; public static const TYPE_YES_NO:int = 0; public static const EVENT_NEXT:String = "onNext"; public static const TYPE_SKIP:int = 4; public static const EVENT_NO:String = "onNo"; public static const EVENT_SKIP:String = "onSkip"; public static const TYPE_SKIP_NEXT:int = 3; public static const TYPE_BLANK:int = 2; public function TalkBaloonInv(){ this.textField = this["textfield"]; this.textField.text = ""; this.textField.embedFonts = true; this.nextButton = this["nextBtn"]; this.yesButton = this["yesBtn"]; this.noButton = this["noBtn"]; this.skipButton = this["skipBtn"]; this.okButton = this["okBtn"]; this.text = ""; this.type = TalkBaloonInv.TYPE_BLANK; this.fadingIn = false; this.fadingOut = false; this.textProcessing = false; this.alpha = 0; } private function onNo(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonInv.EVENT_NO)); } private function mouseOverHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OVER, true)); } private function onSkip(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonInv.EVENT_SKIP)); } public function pause():void{ } public function get text():String{ return (_text); } private function onOk(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonInv.EVENT_OK)); } public function hide():void{ if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; this.fadingOut = true; this.addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true); } public function set type(_arg1:int):void{ if (_arg1 == TalkBaloonInv.TYPE_YES_NO){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = true; if (!this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.addEventListener(MouseEvent.CLICK, onYes, false, 0, true); }; if (!this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.noButton.visible = true; if (!this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.addEventListener(MouseEvent.CLICK, onNo, false, 0, true); }; if (!this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloonInv.TYPE_NEXT){ this.nextButton.visible = true; this.nextButton.x = 172.6; if (!this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TYPE_SKIP_NEXT){ this.nextButton.visible = true; this.nextButton.x = 208.8; if (!this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.addEventListener(MouseEvent.CLICK, onNext, false, 0, true); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.skipButton.visible = true; this.skipButton.x = 135.7; if (!this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.addEventListener(MouseEvent.CLICK, onSkip, false, 0, true); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloonInv.TYPE_SKIP){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = true; this.skipButton.x = 172.6; if (!this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.addEventListener(MouseEvent.CLICK, onSkip, false, 0, true); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; } else { if (_arg1 == TalkBaloonInv.TYPE_OK){ this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = true; if (!this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.addEventListener(MouseEvent.CLICK, onOk, false, 0, true); }; if (!this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler, false, 0, true); }; if (!this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, false, 0, true); }; } else { this.nextButton.visible = false; if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.skipButton.visible = false; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.yesButton.visible = false; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.noButton.visible = false; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; this.okButton.visible = false; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; }; }; }; }; }; _type = _arg1; } public function set text(_arg1:String):void{ if (_arg1 == _text){ return; }; _text = _arg1; this.textField.text = _text; } private function fadeOut(_arg1:Event):void{ if (this.alpha > 0.05){ this.alpha = (this.alpha - (Math.abs(this.alpha) / this.divider)); } else { this.alpha = 0; this.visible = false; this.fadingOut = false; this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.dispatchEvent(new Event(TalkBaloonInv.EVENT_HIDDEN)); }; } private function onYes(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonInv.EVENT_YES)); } private function textProcessingManager(_arg1:Event):void{ if (!this.textProcessing){ return; }; if (this.textField.text.length == this.text.length){ this.removeEventListener(Event.ENTER_FRAME, textProcessingManager); this.textProcessing = false; this.dispatchEvent(new Event(TalkBaloonInv.EVENT_TEXT_COMPLETE)); return; }; this.textField.appendText(this.text.charAt(this.textField.length)); } public function get type():int{ return (_type); } private function onNext(_arg1:MouseEvent):void{ this.dispatchEvent(new Event(TalkBaloonInv.EVENT_NEXT)); } private function mouseOutHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event(Config.EVENT_MOUSE_OUT, true)); } public function set textField(_arg1:TextField):void{ _textField = _arg1; } private function fadeIn(_arg1:Event):void{ if (this.alpha < 0.95){ this.alpha = (this.alpha + (Math.abs((this.alpha - 1)) / this.divider)); } else { this.alpha = 1; this.fadingIn = false; this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.dispatchEvent(new Event(TalkBaloonInv.EVENT_SHOWED)); }; } public function get textField():TextField{ return (_textField); } public function cleanup():void{ if (this.nextButton.hasEventListener(MouseEvent.CLICK)){ this.nextButton.removeEventListener(MouseEvent.CLICK, onNext); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.nextButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.nextButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.skipButton.hasEventListener(MouseEvent.CLICK)){ this.skipButton.removeEventListener(MouseEvent.CLICK, onSkip); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.skipButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.skipButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.yesButton.hasEventListener(MouseEvent.CLICK)){ this.yesButton.removeEventListener(MouseEvent.CLICK, onYes); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.yesButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.yesButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.noButton.hasEventListener(MouseEvent.CLICK)){ this.noButton.removeEventListener(MouseEvent.CLICK, onNo); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.noButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.noButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.okButton.hasEventListener(MouseEvent.CLICK)){ this.okButton.removeEventListener(MouseEvent.CLICK, onOk); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OVER)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); }; if (this.okButton.hasEventListener(MouseEvent.MOUSE_OUT)){ this.okButton.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); }; if (this.fadingIn){ this.removeEventListener(Event.ENTER_FRAME, fadeIn); this.fadingIn = false; }; if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; if (textProcessing){ this.removeEventListener(Event.ENTER_FRAME, textProcessingManager); this.textProcessing = false; }; } public function set fontSize(_arg1:Object):void{ var _local2:TextFormat; _local2 = this.textField.defaultTextFormat; _local2.size = _arg1; this.textField.defaultTextFormat = _local2; } public function show():void{ if (this.fadingOut){ this.removeEventListener(Event.ENTER_FRAME, fadeOut); this.fadingOut = false; }; this.fadingIn = true; this.visible = true; this.addEventListener(Event.ENTER_FRAME, fadeIn, false, 0, true); } public function get fontSize():Object{ return (textField.defaultTextFormat.size); } } }//package vis
Section 341
//Thunder (vis.Thunder) package vis { import flash.display.*; import flash.events.*; public class Thunder extends MovieClip { public function Thunder(){ this.addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function enterFrameHandler(_arg1:Event):void{ if (this.currentFrame == this.totalFrames){ stop(); this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); if (this.parent != null){ this.parent.removeChild(this); }; }; } } }//package vis
Section 342
//TutorialArrow (vis.TutorialArrow) package vis { import flash.display.*; import flash.events.*; public dynamic class TutorialArrow extends MovieClip { private var _totalTicks:int; private var startX:Number; private var startY:Number; public var clip:MovieClip; private var speed:Number; private var _timer:int; private var delay:int; private var _paused:Boolean;// = false private var _ident:Number; public function TutorialArrow(){ _paused = false; super(); } private function enterFrameHandler(_arg1:Event):void{ _timer++; if (_timer == 20){ this.visible = !(this.visible); _timer = 0; }; } public function get paused():Boolean{ return (this._paused); } public function set paused(_arg1:Boolean):void{ this._paused = _arg1; if (_arg1){ (this.getChildAt(0) as MovieClip).stop(); } else { (this.getChildAt(0) as MovieClip).play(); }; } private function buildMagicHandler(_arg1:Event):void{ _timer++; if (_timer >= _totalTicks){ _timer = 0; this["clip"].gotoAndStop(1); this.x = this.startX; this.y = this.startY; }; if (_timer <= delay){ return; }; if (_timer >= (_totalTicks - delay)){ return; }; if ((((_timer <= (delay + 7))) || ((_timer >= (_totalTicks - (delay + 7)))))){ this["clip"].nextFrame(); } else { this.x = (this.x + _ident); }; } public function stopBuildAnimation():void{ if (this.hasEventListener(Event.ENTER_FRAME)){ this.removeEventListener(Event.ENTER_FRAME, buildMagicHandler); this.x = this.startX; this.y = this.startY; this["clip"].gotoAndPlay(1); }; } public function cleanup():void{ if (this.hasEventListener(Event.ENTER_FRAME)){ this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); }; } public function startBuildAnimation(_arg1:Number):void{ if (!this.stage){ return; }; if (this.hasEventListener(Event.ENTER_FRAME)){ this.stopBuildAnimation(); }; this["clip"].gotoAndStop(1); this.startX = this.x; this.startY = this.y; delay = 20; speed = 70; _timer = 0; _totalTicks = ((((7 + 7) + Math.round(((this.stage.frameRate * _arg1) / speed))) + delay) + delay); _ident = (speed / this.stage.frameRate); this.addEventListener(Event.ENTER_FRAME, buildMagicHandler, false, 0, true); } } }//package vis
Section 343
//CellRenderer_disabledSkin (CellRenderer_disabledSkin) package { import flash.display.*; public dynamic class CellRenderer_disabledSkin extends MovieClip { } }//package
Section 344
//CellRenderer_downSkin (CellRenderer_downSkin) package { import flash.display.*; public dynamic class CellRenderer_downSkin extends MovieClip { } }//package
Section 345
//CellRenderer_overSkin (CellRenderer_overSkin) package { import flash.display.*; public dynamic class CellRenderer_overSkin extends MovieClip { } }//package
Section 346
//CellRenderer_selectedDisabledSkin (CellRenderer_selectedDisabledSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip { } }//package
Section 347
//CellRenderer_selectedDownSkin (CellRenderer_selectedDownSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedDownSkin extends MovieClip { } }//package
Section 348
//CellRenderer_selectedOverSkin (CellRenderer_selectedOverSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedOverSkin extends MovieClip { } }//package
Section 349
//CellRenderer_selectedUpSkin (CellRenderer_selectedUpSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedUpSkin extends MovieClip { } }//package
Section 350
//CellRenderer_upSkin (CellRenderer_upSkin) package { import flash.display.*; public dynamic class CellRenderer_upSkin extends MovieClip { } }//package
Section 351
//ComboBox_disabledSkin (ComboBox_disabledSkin) package { import flash.display.*; public dynamic class ComboBox_disabledSkin extends MovieClip { } }//package
Section 352
//ComboBox_downSkin (ComboBox_downSkin) package { import flash.display.*; public dynamic class ComboBox_downSkin extends MovieClip { } }//package
Section 353
//ComboBox_overSkin (ComboBox_overSkin) package { import flash.display.*; public dynamic class ComboBox_overSkin extends MovieClip { } }//package
Section 354
//ComboBox_upSkin (ComboBox_upSkin) package { import flash.display.*; public dynamic class ComboBox_upSkin extends MovieClip { } }//package
Section 355
//Flag (Flag) package { import flash.display.*; public dynamic class Flag extends MovieClip { } }//package
Section 356
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 357
//IslandTextWS (IslandTextWS) package { import flash.display.*; public dynamic class IslandTextWS extends MovieClip { public var islandMC:MovieClip; } }//package
Section 358
//List_skin (List_skin) package { import flash.display.*; public dynamic class List_skin extends MovieClip { } }//package
Section 359
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 360
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_disabledSkin extends MovieClip { } }//package
Section 361
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_downSkin extends MovieClip { } }//package
Section 362
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_overSkin extends MovieClip { } }//package
Section 363
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_upSkin extends MovieClip { } }//package
Section 364
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_disabledSkin extends MovieClip { } }//package
Section 365
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_downSkin extends MovieClip { } }//package
Section 366
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_overSkin extends MovieClip { } }//package
Section 367
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_upSkin extends MovieClip { } }//package
Section 368
//ScrollBar_thumbIcon (ScrollBar_thumbIcon) package { import flash.display.*; public dynamic class ScrollBar_thumbIcon extends MovieClip { } }//package
Section 369
//ScrollThumb_downSkin (ScrollThumb_downSkin) package { import flash.display.*; public dynamic class ScrollThumb_downSkin extends MovieClip { } }//package
Section 370
//ScrollThumb_overSkin (ScrollThumb_overSkin) package { import flash.display.*; public dynamic class ScrollThumb_overSkin extends MovieClip { } }//package
Section 371
//ScrollThumb_upSkin (ScrollThumb_upSkin) package { import flash.display.*; public dynamic class ScrollThumb_upSkin extends MovieClip { } }//package
Section 372
//ScrollTrack_skin (ScrollTrack_skin) package { import flash.display.*; public dynamic class ScrollTrack_skin extends MovieClip { } }//package
Section 373
//sprite_1 (sprite_1) package { import flash.display.*; public dynamic class sprite_1 extends MovieClip { } }//package
Section 374
//sprite_10 (sprite_10) package { import flash.display.*; public dynamic class sprite_10 extends MovieClip { } }//package
Section 375
//sprite_11 (sprite_11) package { import flash.display.*; public dynamic class sprite_11 extends MovieClip { } }//package
Section 376
//sprite_12 (sprite_12) package { import flash.display.*; public dynamic class sprite_12 extends MovieClip { } }//package
Section 377
//sprite_13 (sprite_13) package { import flash.display.*; public dynamic class sprite_13 extends MovieClip { } }//package
Section 378
//sprite_14 (sprite_14) package { import flash.display.*; public dynamic class sprite_14 extends MovieClip { } }//package
Section 379
//sprite_15 (sprite_15) package { import flash.display.*; public dynamic class sprite_15 extends MovieClip { } }//package
Section 380
//sprite_16 (sprite_16) package { import flash.display.*; public dynamic class sprite_16 extends MovieClip { } }//package
Section 381
//sprite_17 (sprite_17) package { import flash.display.*; public dynamic class sprite_17 extends MovieClip { } }//package
Section 382
//sprite_2 (sprite_2) package { import flash.display.*; public dynamic class sprite_2 extends MovieClip { } }//package
Section 383
//sprite_3 (sprite_3) package { import flash.display.*; public dynamic class sprite_3 extends MovieClip { } }//package
Section 384
//sprite_4 (sprite_4) package { import flash.display.*; public dynamic class sprite_4 extends MovieClip { } }//package
Section 385
//sprite_5 (sprite_5) package { import flash.display.*; public dynamic class sprite_5 extends MovieClip { } }//package
Section 386
//sprite_6 (sprite_6) package { import flash.display.*; public dynamic class sprite_6 extends MovieClip { } }//package
Section 387
//sprite_7 (sprite_7) package { import flash.display.*; public dynamic class sprite_7 extends MovieClip { } }//package
Section 388
//sprite_8 (sprite_8) package { import flash.display.*; public dynamic class sprite_8 extends MovieClip { } }//package
Section 389
//sprite_9 (sprite_9) package { import flash.display.*; public dynamic class sprite_9 extends MovieClip { } }//package
Section 390
//TextArea_disabledSkin (TextArea_disabledSkin) package { import flash.display.*; public dynamic class TextArea_disabledSkin extends MovieClip { } }//package
Section 391
//TextArea_upSkin (TextArea_upSkin) package { import flash.display.*; public dynamic class TextArea_upSkin extends MovieClip { } }//package
Section 392
//TextInput_disabledSkin (TextInput_disabledSkin) package { import flash.display.*; public dynamic class TextInput_disabledSkin extends MovieClip { } }//package
Section 393
//TextInput_upSkin (TextInput_upSkin) package { import flash.display.*; public dynamic class TextInput_upSkin extends MovieClip { } }//package
Section 394
//ViralStinger (ViralStinger) package { import flash.display.*; public dynamic class ViralStinger extends MovieClip { public function ViralStinger(){ addFrameScript(191, frame192); } function frame192(){ stop(); } } }//package
Section 395
//VolumeBarGFX (VolumeBarGFX) package { import flash.display.*; public dynamic class VolumeBarGFX extends Sprite { public var bg:MovieClip; public var slider:MovieClip; } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClipUses:1Used by:5
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:5 8
Symbol 5 MovieClipUses:2 4Used by:9
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClipUses:6Used by:8
Symbol 8 MovieClipUses:7 4Used by:9
Symbol 9 MovieClip {vis.Hook}Uses:5 8Used by:2503
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClipUses:10Used by:43 48 69 72 81
Symbol 12 MovieClip {fl.core.ComponentShim}Used by:43 48 67 68 69 72 81
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClip {focusRectSkin}Uses:13Used by:43 48 68 69 72 81
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClip {ScrollTrack_skin}Uses:15Used by:43 68
Symbol 17 GraphicUsed by:20
Symbol 18 GraphicUsed by:19 22 26 36
Symbol 19 MovieClipUses:18Used by:20 30 32
Symbol 20 MovieClip {ScrollArrowUp_downSkin}Uses:17 19Used by:43 68
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {ScrollArrowDown_downSkin}Uses:21 18Used by:43 68
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClip {ScrollThumb_downSkin}Uses:23Used by:43 68
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClip {ScrollArrowDown_overSkin}Uses:25 18Used by:43 68
Symbol 27 GraphicUsed by:28
Symbol 28 MovieClip {ScrollThumb_overSkin}Uses:27Used by:43 68
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClip {ScrollArrowUp_overSkin}Uses:29 19Used by:43 68
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClip {ScrollArrowUp_upSkin}Uses:31 19Used by:43 68
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClip {ScrollThumb_upSkin}Uses:33Used by:43 68
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClip {ScrollArrowDown_upSkin}Uses:35 18Used by:43 68
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClip {ScrollArrowDown_disabledSkin}Uses:37Used by:43 68
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClip {ScrollArrowUp_disabledSkin}Uses:39Used by:43 68
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClip {ScrollBar_thumbIcon}Uses:41Used by:43 68
Symbol 43 MovieClip {fl.controls.UIScrollBar}Uses:11 12 14 16 20 22 24 26 28 30 32 34 36 38 40 42Used by:48
Symbol 44 GraphicUsed by:45 70
Symbol 45 MovieClip {TextArea_disabledSkin}Uses:44Used by:48
Symbol 46 GraphicUsed by:47 71
Symbol 47 MovieClip {TextArea_upSkin}Uses:46Used by:48
Symbol 48 MovieClip {fl.controls.TextArea}Uses:11 12 45 47 14 43Used by:2479
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClip {List_skin}Uses:49Used by:69
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClip {CellRenderer_upSkin}Uses:51Used by:67
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClip {CellRenderer_disabledSkin}Uses:53Used by:67
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClip {CellRenderer_downSkin}Uses:55Used by:67
Symbol 57 GraphicUsed by:58
Symbol 58 MovieClip {CellRenderer_overSkin}Uses:57Used by:67
Symbol 59 GraphicUsed by:60
Symbol 60 MovieClip {CellRenderer_selectedDisabledSkin}Uses:59Used by:67
Symbol 61 GraphicUsed by:62
Symbol 62 MovieClip {CellRenderer_selectedDownSkin}Uses:61Used by:67
Symbol 63 GraphicUsed by:64
Symbol 64 MovieClip {CellRenderer_selectedOverSkin}Uses:63Used by:67
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClip {CellRenderer_selectedUpSkin}Uses:65Used by:67
Symbol 67 MovieClip {fl.controls.listClasses.CellRenderer}Uses:52 12 54 56 58 60 62 64 66Used by:69
Symbol 68 MovieClip {fl.controls.ScrollBar}Uses:16 12 14 20 22 24 26 28 30 32 34 36 38 40 42Used by:69
Symbol 69 MovieClip {fl.controls.List}Uses:11 12 50 67 14 68Used by:81
Symbol 70 MovieClip {TextInput_disabledSkin}Uses:44Used by:72
Symbol 71 MovieClip {TextInput_upSkin}Uses:46Used by:72
Symbol 72 MovieClip {fl.controls.TextInput}Uses:11 12 70 71 14Used by:81 2479
Symbol 73 GraphicUsed by:74
Symbol 74 MovieClip {ComboBox_upSkin}Uses:73Used by:81
Symbol 75 GraphicUsed by:76
Symbol 76 MovieClip {ComboBox_disabledSkin}Uses:75Used by:81
Symbol 77 GraphicUsed by:78
Symbol 78 MovieClip {ComboBox_overSkin}Uses:77Used by:81
Symbol 79 GraphicUsed by:80
Symbol 80 MovieClip {ComboBox_downSkin}Uses:79Used by:81
Symbol 81 MovieClip {fl.controls.ComboBox}Uses:11 12 14 74 76 78 80 72 69Used by:2479
Symbol 82 GraphicUsed by:86
Symbol 83 GraphicUsed by:84 88
Symbol 84 MovieClipUses:83Used by:86
Symbol 85 GraphicUsed by:86
Symbol 86 MovieClip {BridgeCraft_CS3_Viral_fla.BaloonFromLoader_703}Uses:82 84 85Used by:105 2479
Symbol 87 GraphicUsed by:90
Symbol 88 MovieClipUses:83Used by:90
Symbol 89 GraphicUsed by:90
Symbol 90 MovieClip {BridgeCraft_CS3_Viral_fla.TextFromLoader_705}Uses:87 88 89Used by:105
Symbol 91 GraphicUsed by:92
Symbol 92 MovieClipUses:91Used by:105
Symbol 93 GraphicUsed by:104
Symbol 94 GraphicUsed by:104
Symbol 95 GraphicUsed by:104
Symbol 96 GraphicUsed by:104
Symbol 97 GraphicUsed by:104
Symbol 98 GraphicUsed by:104
Symbol 99 GraphicUsed by:104
Symbol 100 GraphicUsed by:104
Symbol 101 GraphicUsed by:104
Symbol 102 GraphicUsed by:104
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClip {vis.Bird}Uses:93 94 95 96 97 98 99 100 101 102 103Used by:105 2503
Symbol 105 MovieClip {vis.LoaderScreen}Uses:86 90 92 104Used by:2503
Symbol 106 GraphicUsed by:188
Symbol 107 BitmapUsed by:108 177
Symbol 108 GraphicUses:107Used by:109
Symbol 109 MovieClipUses:108Used by:111
Symbol 110 GraphicUsed by:111
Symbol 111 MovieClipUses:109 110Used by:140 188
Symbol 112 GraphicUsed by:113 468 1549 2256
Symbol 113 MovieClipUses:112Used by:137 165 175 183
Symbol 114 GraphicUsed by:137
Symbol 115 GraphicUsed by:116
Symbol 116 MovieClipUses:115Used by:137
Symbol 117 GraphicUsed by:118 1606
Symbol 118 MovieClipUses:117Used by:137
Symbol 119 GraphicUsed by:137
Symbol 120 GraphicUsed by:121 442 452 464 471 1372 1552 1683 1808 1999 2022 2223 2259 2273 2289 2310
Symbol 121 MovieClipUses:120Used by:137 165 175 183
Symbol 122 GraphicUsed by:137
Symbol 123 GraphicUsed by:137
Symbol 124 GraphicUsed by:137
Symbol 125 GraphicUsed by:137
Symbol 126 GraphicUsed by:137
Symbol 127 GraphicUsed by:137
Symbol 128 GraphicUsed by:137
Symbol 129 GraphicUsed by:137
Symbol 130 GraphicUsed by:137
Symbol 131 GraphicUsed by:137
Symbol 132 GraphicUsed by:137
Symbol 133 GraphicUsed by:137
Symbol 134 GraphicUsed by:137
Symbol 135 GraphicUsed by:137
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClipUses:113 114 116 118 119 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136Used by:139
Symbol 138 GraphicUsed by:139
Symbol 139 MovieClipUses:137 138Used by:140
Symbol 140 MovieClipUses:111 139Used by:188
Symbol 141 GraphicUsed by:142 467 1548 2255
Symbol 142 MovieClipUses:141Used by:165 175 183
Symbol 143 GraphicUsed by:165
Symbol 144 GraphicUsed by:165
Symbol 145 GraphicUsed by:165
Symbol 146 GraphicUsed by:165
Symbol 147 GraphicUsed by:165 1592 1602
Symbol 148 GraphicUsed by:165
Symbol 149 GraphicUsed by:165
Symbol 150 GraphicUsed by:165
Symbol 151 GraphicUsed by:165
Symbol 152 GraphicUsed by:165
Symbol 153 GraphicUsed by:165
Symbol 154 GraphicUsed by:165
Symbol 155 GraphicUsed by:165
Symbol 156 GraphicUsed by:165
Symbol 157 GraphicUsed by:165
Symbol 158 GraphicUsed by:165
Symbol 159 GraphicUsed by:165
Symbol 160 GraphicUsed by:161 466 1547 2254
Symbol 161 MovieClipUses:160Used by:165 175 183
Symbol 162 GraphicUsed by:163 469 1550 2257
Symbol 163 MovieClipUses:162Used by:165 175 183
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClipUses:142 113 143 121 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 161 163 164Used by:167
Symbol 166 GraphicUsed by:167 176
Symbol 167 MovieClipUses:165 166Used by:188
Symbol 168 GraphicUsed by:175
Symbol 169 GraphicUsed by:175
Symbol 170 GraphicUsed by:175
Symbol 171 GraphicUsed by:175
Symbol 172 GraphicUsed by:175
Symbol 173 GraphicUsed by:175
Symbol 174 GraphicUsed by:175
Symbol 175 MovieClipUses:161 142 113 163 168 121 169 170 171 172 173 174Used by:176
Symbol 176 MovieClipUses:175 166Used by:188
Symbol 177 GraphicUses:107Used by:188
Symbol 178 GraphicUsed by:181
Symbol 179 FontUsed by:180 214 476 496 497 498 499 500 501 502 503 504 505 507 508 510 512 540 542 543 544 545 548 552 556 560 567 568 569 570 574 576 578 581 588 1011 1012 1018 1019 1024 1025 1082 1270 1296 1297 1306 1307 2198 2204 2208 2218 2444 2445 2446 2474 2475 2478 2485 2487 2488 2489 2497 2501
Symbol 180 TextUses:179Used by:181
Symbol 181 MovieClip {BridgeCraft_CS3_Viral_fla.pi_games_680}Uses:178 180Used by:188
Symbol 182 GraphicUsed by:183
Symbol 183 MovieClipUses:161 142 113 163 182 121Used by:185
Symbol 184 GraphicUsed by:185
Symbol 185 MovieClipUses:183 184Used by:188
Symbol 186 ShapeTweeningUsed by:188
Symbol 187 GraphicUsed by:188 418  Timeline
Symbol 188 MovieClip {core.PicasoLogo}Uses:106 140 111 167 176 177 181 185 186 187Used by:2503
Symbol 189 GraphicUsed by:190
Symbol 190 MovieClipUses:189Used by:215
Symbol 191 GraphicUsed by:192 199 208 534 993 998 1265 1269 1279 2203 2440 2456 2459 2463
Symbol 192 MovieClipUses:191Used by:199 208 534 2203 2463
Symbol 193 FontUsed by:194 196 202 203 206 207 210 211 218 219 490 491 492 493 494 495 506 509 511 536 537 541 559 580 583 587 589 992 994 996 1001 1003 1060 1063 1071 1072 1076 1077 1079 1080 1084 1267 1268 1277 1278 1283 1286 1287 1298 1299 1300 1301 1303 1304 1308 1309 1365 2202 2437 2439 2441 2442 2450 2451 2457 2460 2461 2462 2464 2465 2482 2483 2486 2493
Symbol 194 TextUses:193Used by:195 199 534 1087 1091 1092
Symbol 195 MovieClipUses:194Used by:199 534
Symbol 196 TextUses:193Used by:199 534 1092
Symbol 197 GraphicUsed by:198 199 204 205 208 212 213 534 538 539 997 998 1004 1005 1078 1081 1097 1098 1269 1279 1302 1305 2203 2440 2443 2459 2463 2466
Symbol 198 MovieClipUses:197Used by:199 208 534 1269 1279 2440 2459
Symbol 199 ButtonUses:192 195 196 198 191 194 197Used by:215 1271 2498 2502
Symbol 200 GraphicUsed by:201 205 209 213 535 539 1078 1081 1302 1305 2443 2466
Symbol 201 MovieClipUses:200Used by:205 2466
Symbol 202 TextUses:193Used by:205
Symbol 203 TextUses:193Used by:205
Symbol 204 MovieClipUses:197Used by:205 2203 2463 2466
Symbol 205 ButtonUses:201 202 203 204 200 197Used by:215 1271 2212 2498 2502
Symbol 206 TextUses:193Used by:208
Symbol 207 TextUses:193Used by:208
Symbol 208 ButtonUses:192 206 207 198 191 197Used by:215 1271 1291 2498 2502
Symbol 209 MovieClipUses:200Used by:213 1302 1305 2443
Symbol 210 TextUses:193Used by:213
Symbol 211 TextUses:193Used by:213
Symbol 212 MovieClipUses:197Used by:213 1302 1305 2443
Symbol 213 ButtonUses:209 210 211 212 200 197Used by:215 1271 1291 2498 2502
Symbol 214 EditableTextUses:179Used by:215
Symbol 215 MovieClip {vis.TalkBaloonAlt}Uses:190 199 205 208 213 214Used by:2503
Symbol 216 GraphicUsed by:217 221
Symbol 217 MovieClipUses:216Used by:221
Symbol 218 TextUses:193Used by:221
Symbol 219 TextUses:193Used by:221
Symbol 220 GraphicUsed by:221 2484
Symbol 221 Button {core.LinkToCS}Uses:217 218 219 220 216Used by:1099 2490 2503
Symbol 222 GraphicUsed by:269
Symbol 223 GraphicUsed by:224
Symbol 224 MovieClipUses:223Used by:269 620 980
Symbol 225 GraphicUsed by:226
Symbol 226 MovieClipUses:225Used by:269 974 980
Symbol 227 GraphicUsed by:228
Symbol 228 MovieClipUses:227Used by:269 746 897 966 988
Symbol 229 GraphicUsed by:269
Symbol 230 GraphicUsed by:231
Symbol 231 MovieClipUses:230Used by:269
Symbol 232 GraphicUsed by:269
Symbol 233 GraphicUsed by:234
Symbol 234 MovieClipUses:233Used by:237 609
Symbol 235 GraphicUsed by:236
Symbol 236 MovieClipUses:235Used by:237
Symbol 237 MovieClipUses:234 236Used by:269 628 722 980
Symbol 238 GraphicUsed by:239
Symbol 239 MovieClipUses:238Used by:241
Symbol 240 GraphicUsed by:241
Symbol 241 MovieClipUses:239 240Used by:269 620 628 801 929 988
Symbol 242 GraphicUsed by:243 650
Symbol 243 MovieClipUses:242Used by:269
Symbol 244 GraphicUsed by:245 651
Symbol 245 MovieClipUses:244Used by:269
Symbol 246 GraphicUsed by:247
Symbol 247 MovieClipUses:246Used by:256 269
Symbol 248 GraphicUsed by:249
Symbol 249 MovieClipUses:248Used by:256 269
Symbol 250 GraphicUsed by:251 656
Symbol 251 MovieClipUses:250Used by:254 269
Symbol 252 GraphicUsed by:253 256
Symbol 253 MovieClipUses:252Used by:269
Symbol 254 MovieClipUses:251Used by:269
Symbol 255 GraphicUsed by:256
Symbol 256 MovieClipUses:252 247 249 255Used by:269
Symbol 257 GraphicUsed by:258
Symbol 258 MovieClipUses:257Used by:269
Symbol 259 GraphicUsed by:260
Symbol 260 MovieClipUses:259Used by:269
Symbol 261 GraphicUsed by:264
Symbol 262 GraphicUsed by:263
Symbol 263 MovieClipUses:262Used by:264
Symbol 264 MovieClipUses:261 263Used by:269
Symbol 265 GraphicUsed by:266
Symbol 266 MovieClipUses:265Used by:269
Symbol 267 GraphicUsed by:268
Symbol 268 MovieClipUses:267Used by:269 823
Symbol 269 MovieClip {sprite_1}Uses:222 224 226 228 229 231 232 237 241 243 245 247 249 251 253 254 256 258 260 264 266 268Used by:1235 2503
Symbol 270 GraphicUsed by:276
Symbol 271 GraphicUsed by:276
Symbol 272 GraphicUsed by:276
Symbol 273 GraphicUsed by:274
Symbol 274 MovieClipUses:273Used by:276
Symbol 275 GraphicUsed by:276
Symbol 276 MovieClip {core.PreLoaderBar}Uses:270 271 272 274 275Used by:Timeline
Symbol 277 GraphicUsed by:414
Symbol 278 GraphicUsed by:414
Symbol 279 GraphicUsed by:280
Symbol 280 MovieClipUses:279Used by:414
Symbol 281 GraphicUsed by:414
Symbol 282 SoundUsed by:414
Symbol 283 GraphicUsed by:284
Symbol 284 MovieClipUses:283Used by:414
Symbol 285 SoundUsed by:414
Symbol 286 GraphicUsed by:414
Symbol 287 SoundUsed by:414
Symbol 288 SoundUsed by:414
Symbol 289 GraphicUsed by:414
Symbol 290 GraphicUsed by:414
Symbol 291 GraphicUsed by:414
Symbol 292 GraphicUsed by:414
Symbol 293 GraphicUsed by:414
Symbol 294 GraphicUsed by:295
Symbol 295 MovieClipUses:294Used by:414
Symbol 296 GraphicUsed by:414
Symbol 297 GraphicUsed by:414
Symbol 298 GraphicUsed by:414
Symbol 299 GraphicUsed by:414
Symbol 300 GraphicUsed by:414
Symbol 301 GraphicUsed by:414
Symbol 302 GraphicUsed by:414
Symbol 303 GraphicUsed by:304
Symbol 304 MovieClipUses:303Used by:414
Symbol 305 GraphicUsed by:414
Symbol 306 GraphicUsed by:414
Symbol 307 GraphicUsed by:414
Symbol 308 GraphicUsed by:414
Symbol 309 GraphicUsed by:414
Symbol 310 GraphicUsed by:414
Symbol 311 GraphicUsed by:357 414
Symbol 312 GraphicUsed by:414
Symbol 313 GraphicUsed by:414
Symbol 314 GraphicUsed by:414
Symbol 315 GraphicUsed by:414
Symbol 316 GraphicUsed by:414
Symbol 317 GraphicUsed by:318
Symbol 318 MovieClipUses:317Used by:414
Symbol 319 GraphicUsed by:414
Symbol 320 GraphicUsed by:414
Symbol 321 GraphicUsed by:322
Symbol 322 MovieClipUses:321Used by:414
Symbol 323 GraphicUsed by:414
Symbol 324 GraphicUsed by:414
Symbol 325 GraphicUsed by:414
Symbol 326 GraphicUsed by:414
Symbol 327 GraphicUsed by:414
Symbol 328 GraphicUsed by:414
Symbol 329 GraphicUsed by:414
Symbol 330 GraphicUsed by:414
Symbol 331 GraphicUsed by:414
Symbol 332 GraphicUsed by:414
Symbol 333 GraphicUsed by:414
Symbol 334 GraphicUsed by:414
Symbol 335 GraphicUsed by:414
Symbol 336 GraphicUsed by:414
Symbol 337 GraphicUsed by:414
Symbol 338 GraphicUsed by:414
Symbol 339 GraphicUsed by:414
Symbol 340 GraphicUsed by:414
Symbol 341 GraphicUsed by:414
Symbol 342 GraphicUsed by:414
Symbol 343 GraphicUsed by:414
Symbol 344 GraphicUsed by:414
Symbol 345 GraphicUsed by:414
Symbol 346 GraphicUsed by:414
Symbol 347 GraphicUsed by:414
Symbol 348 GraphicUsed by:349
Symbol 349 MovieClipUses:348Used by:414
Symbol 350 GraphicUsed by:414
Symbol 351 SoundUsed by:414
Symbol 352 GraphicUsed by:414
Symbol 353 GraphicUsed by:414
Symbol 354 GraphicUsed by:414
Symbol 355 GraphicUsed by:414
Symbol 356 GraphicUsed by:357
Symbol 357 MovieClipUses:356 311Used by:414
Symbol 358 GraphicUsed by:414
Symbol 359 GraphicUsed by:414
Symbol 360 GraphicUsed by:414
Symbol 361 GraphicUsed by:414
Symbol 362 GraphicUsed by:414
Symbol 363 GraphicUsed by:414
Symbol 364 GraphicUsed by:414
Symbol 365 GraphicUsed by:414
Symbol 366 GraphicUsed by:414
Symbol 367 GraphicUsed by:414
Symbol 368 GraphicUsed by:414
Symbol 369 GraphicUsed by:414
Symbol 370 GraphicUsed by:414
Symbol 371 GraphicUsed by:414
Symbol 372 SoundUsed by:414
Symbol 373 GraphicUsed by:414
Symbol 374 GraphicUsed by:375
Symbol 375 MovieClipUses:374Used by:414
Symbol 376 GraphicUsed by:414
Symbol 377 GraphicUsed by:414
Symbol 378 GraphicUsed by:414
Symbol 379 GraphicUsed by:414
Symbol 380 GraphicUsed by:414
Symbol 381 GraphicUsed by:414
Symbol 382 GraphicUsed by:414
Symbol 383 GraphicUsed by:414
Symbol 384 GraphicUsed by:414
Symbol 385 GraphicUsed by:414
Symbol 386 GraphicUsed by:414
Symbol 387 SoundUsed by:414
Symbol 388 GraphicUsed by:414
Symbol 389 GraphicUsed by:414
Symbol 390 GraphicUsed by:414
Symbol 391 GraphicUsed by:414
Symbol 392 SoundUsed by:414
Symbol 393 GraphicUsed by:414
Symbol 394 GraphicUsed by:414
Symbol 395 GraphicUsed by:414
Symbol 396 GraphicUsed by:414
Symbol 397 GraphicUsed by:414
Symbol 398 GraphicUsed by:414
Symbol 399 GraphicUsed by:414
Symbol 400 GraphicUsed by:414
Symbol 401 GraphicUsed by:414
Symbol 402 GraphicUsed by:414
Symbol 403 SoundUsed by:414
Symbol 404 GraphicUsed by:414
Symbol 405 GraphicUsed by:414
Symbol 406 GraphicUsed by:414
Symbol 407 GraphicUsed by:414
Symbol 408 GraphicUsed by:414
Symbol 409 GraphicUsed by:414
Symbol 410 GraphicUsed by:414
Symbol 411 SoundUsed by:414
Symbol 412 GraphicUsed by:413
Symbol 413 MovieClipUses:412Used by:414
Symbol 414 MovieClip {ViralStinger}Uses:277 278 280 281 282 284 285 286 287 288 289 290 291 292 293 295 296 297 298 299 300 301 302 304 305 306 307 308 309 310 311 312 313 314 315 316 318 319 320 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 349 350 351 352 353 354 355 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 413Used by:Timeline
Symbol 415 GraphicUsed by:417
Symbol 416 GraphicUsed by:417
Symbol 417 ButtonUses:415 416Used by:Timeline
Symbol 418 MovieClipUses:187Used by:Timeline
Symbol 419 GraphicUsed by:420
Symbol 420 MovieClipUses:419Used by:Timeline
Symbol 421 GraphicUsed by:422
Symbol 422 MovieClipUses:421Used by:435
Symbol 423 GraphicUsed by:424
Symbol 424 MovieClipUses:423Used by:435
Symbol 425 GraphicUsed by:426 1676 2265
Symbol 426 MovieClipUses:425Used by:435
Symbol 427 GraphicUsed by:428 1677
Symbol 428 MovieClipUses:427Used by:435
Symbol 429 GraphicUsed by:430 1370 1546 1675 1806 1991 2011 2296
Symbol 430 MovieClipUses:429Used by:434
Symbol 431 GraphicUsed by:434
Symbol 432 GraphicUsed by:433
Symbol 433 MovieClipUses:432Used by:434
Symbol 434 MovieClipUses:430 431 433Used by:435
Symbol 435 MovieClipUses:422 424 426 428 434Used by:475
Symbol 436 GraphicUsed by:447 1406
Symbol 437 GraphicUsed by:438 1384 2224
Symbol 438 MovieClipUses:437Used by:447
Symbol 439 GraphicUsed by:440 1385 2225
Symbol 440 MovieClipUses:439Used by:447
Symbol 441 GraphicUsed by:447
Symbol 442 MovieClipUses:120Used by:447
Symbol 443 GraphicUsed by:444
Symbol 444 MovieClipUses:443Used by:447
Symbol 445 GraphicUsed by:446
Symbol 446 MovieClipUses:445Used by:447
Symbol 447 MovieClipUses:436 438 440 441 442 444 446Used by:475
Symbol 448 GraphicUsed by:453
Symbol 449 GraphicUsed by:450 1821
Symbol 450 MovieClipUses:449Used by:453
Symbol 451 GraphicUsed by:453
Symbol 452 MovieClipUses:120Used by:453
Symbol 453 MovieClipUses:448 450 451 452Used by:475
Symbol 454 GraphicUsed by:465 2010
Symbol 455 GraphicUsed by:456 1993
Symbol 456 MovieClipUses:455Used by:465
Symbol 457 GraphicUsed by:458
Symbol 458 MovieClipUses:457Used by:465
Symbol 459 GraphicUsed by:460 1997
Symbol 460 MovieClipUses:459Used by:465
Symbol 461 GraphicUsed by:462 1994
Symbol 462 MovieClipUses:461Used by:465
Symbol 463 GraphicUsed by:465 2010
Symbol 464 MovieClipUses:120Used by:465
Symbol 465 MovieClipUses:454 456 458 460 462 463 464Used by:475
Symbol 466 MovieClipUses:160Used by:473
Symbol 467 MovieClipUses:141Used by:473
Symbol 468 MovieClipUses:112Used by:473
Symbol 469 MovieClipUses:162Used by:473
Symbol 470 GraphicUsed by:473
Symbol 471 MovieClipUses:120Used by:473
Symbol 472 GraphicUsed by:473
Symbol 473 MovieClipUses:466 467 468 469 470 471 472Used by:475
Symbol 474 GraphicUsed by:475
Symbol 475 MovieClipUses:435 447 453 465 473 474Used by:Timeline
Symbol 476 TextUses:179Used by:Timeline
Symbol 477 GraphicUsed by:478
Symbol 478 MovieClipUses:477Used by:513 2212 2324 2490
Symbol 479 GraphicUsed by:480 488 530 533 1050 1064
Symbol 480 MovieClipUses:479Used by:488 1050 1061 1064
Symbol 481 GraphicUsed by:482 488 531 533
Symbol 482 MovieClipUses:481Used by:488
Symbol 483 GraphicUsed by:484 488 532 533
Symbol 484 MovieClipUses:483Used by:488
Symbol 485 GraphicUsed by:488 533
Symbol 486 GraphicUsed by:487 488 533 1050 1064
Symbol 487 MovieClipUses:486Used by:488 533 1050 1061 1064
Symbol 488 Button {hud.HomeButton}Uses:480 482 484 485 487 479 481 483 486Used by:513 2490
Symbol 489 GraphicUsed by:513
Symbol 490 TextUses:193Used by:513
Symbol 491 TextUses:193Used by:513
Symbol 492 TextUses:193Used by:513
Symbol 493 TextUses:193Used by:513
Symbol 494 TextUses:193Used by:513
Symbol 495 TextUses:193Used by:513
Symbol 496 TextUses:179Used by:513
Symbol 497 TextUses:179Used by:513
Symbol 498 TextUses:179Used by:513
Symbol 499 TextUses:179Used by:513
Symbol 500 TextUses:179Used by:513
Symbol 501 TextUses:179Used by:513
Symbol 502 TextUses:179Used by:513
Symbol 503 TextUses:179Used by:513
Symbol 504 TextUses:179Used by:513
Symbol 505 TextUses:179Used by:513
Symbol 506 TextUses:193Used by:513
Symbol 507 TextUses:179Used by:513
Symbol 508 TextUses:179Used by:513
Symbol 509 TextUses:193Used by:513
Symbol 510 TextUses:179Used by:513
Symbol 511 TextUses:193Used by:513
Symbol 512 TextUses:179Used by:513
Symbol 513 MovieClip {menu.CreditsClass}Uses:478 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512Used by:2503
Symbol 514 GraphicUsed by:515
Symbol 515 MovieClipUses:514Used by:516
Symbol 516 MovieClipUses:515Used by:521
Symbol 517 GraphicUsed by:518
Symbol 518 MovieClipUses:517Used by:521
Symbol 519 GraphicUsed by:520
Symbol 520 MovieClipUses:519Used by:521
Symbol 521 MovieClip {core.Cursor}Uses:516 518 520Used by:2503
Symbol 522 GraphicUsed by:523
Symbol 523 MovieClip {core.DeckLastSegment}Uses:522Used by:2503
Symbol 524 GraphicUsed by:525
Symbol 525 MovieClip {core.DeckPole}Uses:524Used by:2503
Symbol 526 GraphicUsed by:527
Symbol 527 MovieClip {core.DeckSegment}Uses:526Used by:2503
Symbol 528 GraphicUsed by:529
Symbol 529 MovieClipUses:528Used by:590
Symbol 530 MovieClipUses:479Used by:533
Symbol 531 MovieClipUses:481Used by:533
Symbol 532 MovieClipUses:483Used by:533
Symbol 533 ButtonUses:530 531 532 485 487 479 481 483 486Used by:590 1099
Symbol 534 ButtonUses:192 195 196 198 191 194 197Used by:590
Symbol 535 MovieClipUses:200Used by:539 1078 1081
Symbol 536 TextUses:193Used by:539 1095 1098
Symbol 537 TextUses:193Used by:539 1098
Symbol 538 MovieClipUses:197Used by:539 1078 1081
Symbol 539 ButtonUses:535 536 537 538 200 197Used by:590
Symbol 540 TextUses:179Used by:590
Symbol 541 TextUses:193Used by:590
Symbol 542 TextUses:179Used by:590
Symbol 543 TextUses:179Used by:590
Symbol 544 TextUses:179Used by:590
Symbol 545 TextUses:179Used by:590
Symbol 546 GraphicUsed by:547 551 555 571 572 573
Symbol 547 MovieClipUses:546Used by:590
Symbol 548 TextUses:179Used by:590
Symbol 549 BitmapUsed by:550
Symbol 550 GraphicUses:549Used by:590
Symbol 551 MovieClipUses:546Used by:590
Symbol 552 TextUses:179Used by:590
Symbol 553 BitmapUsed by:554
Symbol 554 GraphicUses:553Used by:590
Symbol 555 MovieClipUses:546Used by:590
Symbol 556 TextUses:179Used by:590
Symbol 557 BitmapUsed by:558
Symbol 558 GraphicUses:557Used by:590
Symbol 559 TextUses:193Used by:590
Symbol 560 TextUses:179Used by:590
Symbol 561 GraphicUsed by:562 1006 1007
Symbol 562 MovieClipUses:561Used by:590 1006 1007
Symbol 563 GraphicUsed by:564 1006
Symbol 564 MovieClipUses:563Used by:590 1006
Symbol 565 GraphicUsed by:566 1007
Symbol 566 MovieClipUses:565Used by:590 1007
Symbol 567 TextUses:179Used by:590
Symbol 568 TextUses:179Used by:590
Symbol 569 TextUses:179Used by:590
Symbol 570 TextUses:179Used by:590
Symbol 571 MovieClipUses:546Used by:590
Symbol 572 MovieClipUses:546Used by:590
Symbol 573 MovieClipUses:546Used by:590
Symbol 574 TextUses:179Used by:590 1045
Symbol 575 GraphicUsed by:590 1045
Symbol 576 TextUses:179Used by:590 1042
Symbol 577 GraphicUsed by:590 1042
Symbol 578 TextUses:179Used by:590 1039
Symbol 579 GraphicUsed by:590 1039
Symbol 580 TextUses:193Used by:590
Symbol 581 TextUses:179Used by:590
Symbol 582 GraphicUsed by:590
Symbol 583 TextUses:193Used by:590
Symbol 584 GraphicUsed by:590
Symbol 585 GraphicUsed by:586 989
Symbol 586 MovieClipUses:585Used by:590
Symbol 587 TextUses:193Used by:590
Symbol 588 TextUses:179Used by:590 1051
Symbol 589 TextUses:193Used by:590
Symbol 590 MovieClip {core.HelpClass}Uses:529 533 534 539 540 541 542 543 544 545 547 548 550 551 552 554 555 556 558 559 560 562 564 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 586 587 588 589Used by:2503
Symbol 591 GraphicUsed by:609
Symbol 592 GraphicUsed by:593
Symbol 593 MovieClipUses:592Used by:609
Symbol 594 GraphicUsed by:595 642
Symbol 595 MovieClipUses:594Used by:597
Symbol 596 GraphicUsed by:597
Symbol 597 MovieClipUses:595 596Used by:609 988
Symbol 598 GraphicUsed by:599
Symbol 599 MovieClipUses:598Used by:609 620 980
Symbol 600 GraphicUsed by:601
Symbol 601 MovieClipUses:600Used by:609 988
Symbol 602 GraphicUsed by:609
Symbol 603 GraphicUsed by:609 746 888 891 895
Symbol 604 GraphicUsed by:608
Symbol 605 GraphicUsed by:606
Symbol 606 MovieClipUses:605Used by:608
Symbol 607 GraphicUsed by:608
Symbol 608 MovieClipUses:604 606 607Used by:609
Symbol 609 MovieClip {sprite_2}Uses:591 593 597 599 601 602 603 608 234Used by:2503
Symbol 610 GraphicUsed by:620
Symbol 611 GraphicUsed by:612
Symbol 612 MovieClipUses:611Used by:613
Symbol 613 MovieClipUses:612Used by:620 823
Symbol 614 GraphicUsed by:620
Symbol 615 GraphicUsed by:616
Symbol 616 MovieClipUses:615Used by:620 980
Symbol 617 GraphicUsed by:618
Symbol 618 MovieClipUses:617Used by:620
Symbol 619 GraphicUsed by:620
Symbol 620 MovieClip {sprite_3}Uses:610 613 614 224 599 616 618 619 241Used by:2503
Symbol 621 GraphicUsed by:629
Symbol 622 GraphicUsed by:623
Symbol 623 MovieClipUses:622Used by:629 665 722 746 897 929 965 966 988
Symbol 624 GraphicUsed by:625
Symbol 625 MovieClipUses:624Used by:629 966
Symbol 626 GraphicUsed by:629
Symbol 627 GraphicUsed by:628
Symbol 628 MovieClipUses:627 241 237Used by:629
Symbol 629 MovieClip {sprite_4}Uses:621 623 625 626 628Used by:2503
Symbol 630 GraphicUsed by:665
Symbol 631 GraphicUsed by:632
Symbol 632 MovieClipUses:631Used by:665
Symbol 633 GraphicUsed by:665
Symbol 634 GraphicUsed by:635
Symbol 635 MovieClipUses:634Used by:665
Symbol 636 GraphicUsed by:637
Symbol 637 MovieClipUses:636Used by:665
Symbol 638 GraphicUsed by:639
Symbol 639 MovieClipUses:638Used by:665
Symbol 640 GraphicUsed by:641
Symbol 641 MovieClipUses:640Used by:665
Symbol 642 MovieClipUses:594Used by:644
Symbol 643 GraphicUsed by:644
Symbol 644 MovieClipUses:642 643Used by:665
Symbol 645 GraphicUsed by:665
Symbol 646 GraphicUsed by:647
Symbol 647 MovieClipUses:646Used by:665
Symbol 648 GraphicUsed by:649
Symbol 649 MovieClipUses:648Used by:665
Symbol 650 MovieClipUses:242Used by:665
Symbol 651 MovieClipUses:244Used by:665
Symbol 652 GraphicUsed by:653
Symbol 653 MovieClipUses:652Used by:659 665
Symbol 654 GraphicUsed by:655
Symbol 655 MovieClipUses:654Used by:659 665
Symbol 656 MovieClipUses:250Used by:665
Symbol 657 GraphicUsed by:659
Symbol 658 GraphicUsed by:659
Symbol 659 MovieClipUses:657 653 655 658Used by:665
Symbol 660 GraphicUsed by:665
Symbol 661 GraphicUsed by:662
Symbol 662 MovieClipUses:661Used by:665
Symbol 663 GraphicUsed by:664
Symbol 664 MovieClipUses:663Used by:665
Symbol 665 MovieClip {sprite_5}Uses:630 632 633 635 637 639 641 644 645 647 623 649 650 651 653 655 656 659 660 662 664Used by:2503
Symbol 666 GraphicUsed by:687
Symbol 667 GraphicUsed by:668
Symbol 668 MovieClipUses:667Used by:687
Symbol 669 GraphicUsed by:670
Symbol 670 MovieClipUses:669Used by:687
Symbol 671 GraphicUsed by:672
Symbol 672 MovieClipUses:671Used by:687
Symbol 673 GraphicUsed by:674
Symbol 674 MovieClipUses:673Used by:687
Symbol 675 GraphicUsed by:676
Symbol 676 MovieClipUses:675Used by:687
Symbol 677 GraphicUsed by:678
Symbol 678 MovieClipUses:677Used by:687
Symbol 679 GraphicUsed by:680
Symbol 680 MovieClipUses:679Used by:687
Symbol 681 GraphicUsed by:686
Symbol 682 GraphicUsed by:683
Symbol 683 MovieClipUses:682Used by:686
Symbol 684 GraphicUsed by:685
Symbol 685 MovieClipUses:684Used by:686
Symbol 686 MovieClipUses:681 683 685Used by:687
Symbol 687 MovieClip {sprite_6}Uses:666 668 670 672 674 676 678 680 686Used by:2503
Symbol 688 GraphicUsed by:689
Symbol 689 MovieClipUses:688Used by:693
Symbol 690 GraphicUsed by:691
Symbol 691 MovieClipUses:690Used by:693
Symbol 692 GraphicUsed by:693
Symbol 693 MovieClipUses:689 691 692Used by:709
Symbol 694 GraphicUsed by:709
Symbol 695 GraphicUsed by:696
Symbol 696 MovieClipUses:695Used by:709
Symbol 697 GraphicUsed by:698
Symbol 698 MovieClipUses:697Used by:709
Symbol 699 GraphicUsed by:700
Symbol 700 MovieClipUses:699Used by:709
Symbol 701 GraphicUsed by:709
Symbol 702 GraphicUsed by:703
Symbol 703 MovieClipUses:702Used by:709
Symbol 704 GraphicUsed by:705
Symbol 705 MovieClipUses:704Used by:709
Symbol 706 GraphicUsed by:707
Symbol 707 MovieClipUses:706Used by:709
Symbol 708 GraphicUsed by:709
Symbol 709 MovieClip {sprite_7}Uses:693 694 696 698 700 701 703 705 707 708Used by:2503
Symbol 710 GraphicUsed by:714
Symbol 711 GraphicUsed by:712
Symbol 712 MovieClipUses:711Used by:714
Symbol 713 GraphicUsed by:714
Symbol 714 MovieClipUses:710 712 713Used by:722
Symbol 715 GraphicUsed by:722
Symbol 716 GraphicUsed by:717
Symbol 717 MovieClipUses:716Used by:722
Symbol 718 GraphicUsed by:719
Symbol 719 MovieClipUses:718Used by:722
Symbol 720 GraphicUsed by:721
Symbol 721 MovieClipUses:720Used by:722
Symbol 722 MovieClip {sprite_8}Uses:714 715 717 623 719 721 237Used by:1235 2503
Symbol 723 GraphicUsed by:746
Symbol 724 GraphicUsed by:746 897
Symbol 725 GraphicUsed by:726
Symbol 726 MovieClipUses:725Used by:746 897
Symbol 727 GraphicUsed by:728
Symbol 728 MovieClipUses:727Used by:746 897
Symbol 729 GraphicUsed by:746
Symbol 730 GraphicUsed by:731
Symbol 731 MovieClipUses:730Used by:746 897
Symbol 732 GraphicUsed by:733
Symbol 733 MovieClipUses:732Used by:746 897
Symbol 734 GraphicUsed by:746
Symbol 735 GraphicUsed by:736
Symbol 736 MovieClipUses:735Used by:746 897
Symbol 737 GraphicUsed by:746
Symbol 738 GraphicUsed by:746
Symbol 739 GraphicUsed by:746
Symbol 740 GraphicUsed by:746
Symbol 741 GraphicUsed by:746
Symbol 742 GraphicUsed by:746
Symbol 743 GraphicUsed by:746
Symbol 744 GraphicUsed by:746
Symbol 745 GraphicUsed by:746
Symbol 746 MovieClip {sprite_9}Uses:723 724 726 728 729 731 733 734 736 228 623 737 738 739 740 603 741 742 743 744 745Used by:2503
Symbol 747 GraphicUsed by:823
Symbol 748 GraphicUsed by:749
Symbol 749 MovieClipUses:748Used by:823
Symbol 750 GraphicUsed by:751
Symbol 751 MovieClipUses:750Used by:823
Symbol 752 GraphicUsed by:753
Symbol 753 MovieClipUses:752Used by:823
Symbol 754 GraphicUsed by:755
Symbol 755 MovieClipUses:754Used by:823
Symbol 756 GraphicUsed by:757
Symbol 757 MovieClipUses:756Used by:823
Symbol 758 GraphicUsed by:759
Symbol 759 MovieClipUses:758Used by:823
Symbol 760 GraphicUsed by:761
Symbol 761 MovieClipUses:760Used by:823
Symbol 762 GraphicUsed by:763
Symbol 763 MovieClipUses:762Used by:823
Symbol 764 GraphicUsed by:765
Symbol 765 MovieClipUses:764Used by:823
Symbol 766 GraphicUsed by:767
Symbol 767 MovieClipUses:766Used by:823
Symbol 768 GraphicUsed by:823
Symbol 769 GraphicUsed by:770
Symbol 770 MovieClipUses:769Used by:823
Symbol 771 GraphicUsed by:823
Symbol 772 GraphicUsed by:773
Symbol 773 MovieClipUses:772Used by:823
Symbol 774 GraphicUsed by:775
Symbol 775 MovieClipUses:774Used by:823
Symbol 776 GraphicUsed by:777
Symbol 777 MovieClipUses:776Used by:823
Symbol 778 GraphicUsed by:779
Symbol 779 MovieClipUses:778Used by:823
Symbol 780 GraphicUsed by:823
Symbol 781 GraphicUsed by:782
Symbol 782 MovieClipUses:781Used by:823
Symbol 783 GraphicUsed by:784
Symbol 784 MovieClipUses:783Used by:823
Symbol 785 GraphicUsed by:786
Symbol 786 MovieClipUses:785Used by:823
Symbol 787 GraphicUsed by:788
Symbol 788 MovieClipUses:787Used by:823
Symbol 789 GraphicUsed by:794
Symbol 790 GraphicUsed by:791
Symbol 791 MovieClipUses:790Used by:794 804 888
Symbol 792 GraphicUsed by:794
Symbol 793 GraphicUsed by:794
Symbol 794 MovieClipUses:789 791 792 793Used by:823
Symbol 795 GraphicUsed by:796
Symbol 796 MovieClipUses:795Used by:804
Symbol 797 GraphicUsed by:804
Symbol 798 GraphicUsed by:799
Symbol 799 MovieClipUses:798Used by:801
Symbol 800 GraphicUsed by:801
Symbol 801 MovieClipUses:799 800 241Used by:804 815
Symbol 802 GraphicUsed by:804
Symbol 803 GraphicUsed by:804
Symbol 804 MovieClipUses:796 797 801 802 791 803Used by:823
Symbol 805 GraphicUsed by:809
Symbol 806 GraphicUsed by:807
Symbol 807 MovieClipUses:806Used by:809
Symbol 808 GraphicUsed by:809
Symbol 809 MovieClipUses:805 807 808Used by:823
Symbol 810 GraphicUsed by:815
Symbol 811 GraphicUsed by:815
Symbol 812 GraphicUsed by:813 945
Symbol 813 MovieClipUses:812Used by:815 888
Symbol 814 GraphicUsed by:815
Symbol 815 MovieClipUses:810 801 811 813 814Used by:823
Symbol 816 GraphicUsed by:817
Symbol 817 MovieClipUses:816Used by:823
Symbol 818 GraphicUsed by:822
Symbol 819 GraphicUsed by:820
Symbol 820 MovieClipUses:819Used by:822
Symbol 821 GraphicUsed by:822
Symbol 822 MovieClipUses:818 820 821Used by:823
Symbol 823 MovieClip {sprite_10}Uses:747 749 751 753 755 757 759 761 763 765 767 768 770 771 773 775 777 779 780 782 784 786 613 788 794 804 809 815 817 822 268Used by:2503
Symbol 824 GraphicUsed by:873
Symbol 825 GraphicUsed by:826
Symbol 826 MovieClipUses:825Used by:873
Symbol 827 GraphicUsed by:873
Symbol 828 GraphicUsed by:831
Symbol 829 GraphicUsed by:830
Symbol 830 MovieClipUses:829Used by:831 843 865
Symbol 831 MovieClipUses:828 830Used by:873
Symbol 832 GraphicUsed by:833
Symbol 833 MovieClipUses:832Used by:873
Symbol 834 GraphicUsed by:835
Symbol 835 MovieClipUses:834Used by:873
Symbol 836 GraphicUsed by:873
Symbol 837 GraphicUsed by:838 909
Symbol 838 MovieClipUses:837Used by:873
Symbol 839 GraphicUsed by:840
Symbol 840 MovieClipUses:839Used by:873
Symbol 841 GraphicUsed by:873
Symbol 842 GraphicUsed by:843
Symbol 843 MovieClipUses:842 830Used by:873
Symbol 844 GraphicUsed by:860
Symbol 845 GraphicUsed by:846
Symbol 846 MovieClipUses:845Used by:848
Symbol 847 GraphicUsed by:848
Symbol 848 MovieClipUses:846 847Used by:860
Symbol 849 GraphicUsed by:850
Symbol 850 MovieClipUses:849Used by:860
Symbol 851 GraphicUsed by:852
Symbol 852 MovieClipUses:851Used by:860
Symbol 853 GraphicUsed by:854
Symbol 854 MovieClipUses:853Used by:860
Symbol 855 GraphicUsed by:860
Symbol 856 GraphicUsed by:857
Symbol 857 MovieClipUses:856Used by:860
Symbol 858 GraphicUsed by:859
Symbol 859 MovieClipUses:858Used by:860
Symbol 860 MovieClipUses:844 848 850 852 854 855 857 859Used by:873
Symbol 861 GraphicUsed by:872
Symbol 862 GraphicUsed by:865
Symbol 863 GraphicUsed by:864
Symbol 864 MovieClipUses:863Used by:865
Symbol 865 MovieClipUses:862 864 830Used by:872
Symbol 866 GraphicUsed by:872
Symbol 867 GraphicUsed by:868
Symbol 868 MovieClipUses:867Used by:872
Symbol 869 GraphicUsed by:872
Symbol 870 GraphicUsed by:871
Symbol 871 MovieClipUses:870Used by:872
Symbol 872 MovieClipUses:861 865 866 868 869 871Used by:873
Symbol 873 MovieClip {sprite_11}Uses:824 826 827 831 833 835 836 838 840 841 843 860 872Used by:2503
Symbol 874 GraphicUsed by:897
Symbol 875 GraphicUsed by:876
Symbol 876 MovieClipUses:875Used by:897
Symbol 877 GraphicUsed by:878
Symbol 878 MovieClipUses:877Used by:897
Symbol 879 GraphicUsed by:880
Symbol 880 MovieClipUses:879Used by:897
Symbol 881 GraphicUsed by:897
Symbol 882 GraphicUsed by:888
Symbol 883 GraphicUsed by:884
Symbol 884 MovieClipUses:883Used by:888
Symbol 885 GraphicUsed by:888
Symbol 886 GraphicUsed by:888
Symbol 887 GraphicUsed by:888
Symbol 888 MovieClipUses:882 791 884 885 603 886 887 813Used by:897
Symbol 889 GraphicUsed by:891
Symbol 890 GraphicUsed by:891
Symbol 891 MovieClipUses:889 603 890Used by:897
Symbol 892 GraphicUsed by:895
Symbol 893 GraphicUsed by:895
Symbol 894 GraphicUsed by:895
Symbol 895 MovieClipUses:892 603 893 894Used by:897
Symbol 896 GraphicUsed by:897
Symbol 897 MovieClip {sprite_12}Uses:874 724 876 736 228 623 878 880 881 726 728 731 733 888 891 895 896Used by:2503
Symbol 898 GraphicUsed by:910
Symbol 899 GraphicUsed by:900
Symbol 900 MovieClipUses:899Used by:910
Symbol 901 GraphicUsed by:910
Symbol 902 GraphicUsed by:903
Symbol 903 MovieClipUses:902Used by:910
Symbol 904 GraphicUsed by:905
Symbol 905 MovieClipUses:904Used by:910
Symbol 906 GraphicUsed by:907
Symbol 907 MovieClipUses:906Used by:910
Symbol 908 GraphicUsed by:910
Symbol 909 MovieClipUses:837Used by:910
Symbol 910 MovieClip {sprite_13}Uses:898 900 901 903 905 907 908 909Used by:2503
Symbol 911 GraphicUsed by:929
Symbol 912 GraphicUsed by:913
Symbol 913 MovieClipUses:912Used by:929
Symbol 914 GraphicUsed by:929
Symbol 915 GraphicUsed by:916
Symbol 916 MovieClipUses:915Used by:917
Symbol 917 MovieClipUses:916Used by:929
Symbol 918 GraphicUsed by:919
Symbol 919 MovieClipUses:918Used by:920
Symbol 920 MovieClipUses:919Used by:929
Symbol 921 GraphicUsed by:922
Symbol 922 MovieClipUses:921Used by:929
Symbol 923 GraphicUsed by:928
Symbol 924 GraphicUsed by:927
Symbol 925 GraphicUsed by:926
Symbol 926 MovieClipUses:925Used by:927
Symbol 927 MovieClipUses:924 926Used by:928
Symbol 928 MovieClipUses:923 927Used by:929
Symbol 929 MovieClip {sprite_14}Uses:911 913 914 917 920 623 922 928 241Used by:1235 2503
Symbol 930 GraphicUsed by:966
Symbol 931 GraphicUsed by:932
Symbol 932 MovieClipUses:931Used by:966
Symbol 933 GraphicUsed by:966
Symbol 934 GraphicUsed by:935
Symbol 935 MovieClipUses:934Used by:965 966
Symbol 936 GraphicUsed by:937
Symbol 937 MovieClipUses:936Used by:966
Symbol 938 GraphicUsed by:939
Symbol 939 MovieClipUses:938Used by:966
Symbol 940 GraphicUsed by:941
Symbol 941 MovieClipUses:940Used by:943
Symbol 942 GraphicUsed by:943
Symbol 943 MovieClipUses:941 942Used by:946 965
Symbol 944 GraphicUsed by:946
Symbol 945 MovieClipUses:812Used by:946 948 951 960
Symbol 946 MovieClipUses:943 944 945Used by:966
Symbol 947 GraphicUsed by:948
Symbol 948 MovieClipUses:947 945Used by:966
Symbol 949 GraphicUsed by:951
Symbol 950 GraphicUsed by:951
Symbol 951 MovieClipUses:949 945 950Used by:966
Symbol 952 GraphicUsed by:956
Symbol 953 GraphicUsed by:954
Symbol 954 MovieClipUses:953Used by:956
Symbol 955 GraphicUsed by:956
Symbol 956 MovieClipUses:952 954 955Used by:966
Symbol 957 GraphicUsed by:958
Symbol 958 MovieClipUses:957Used by:959
Symbol 959 MovieClipUses:958Used by:960
Symbol 960 MovieClipUses:959 945Used by:962
Symbol 961 GraphicUsed by:962
Symbol 962 MovieClipUses:960 961Used by:966
Symbol 963 GraphicUsed by:965
Symbol 964 GraphicUsed by:965
Symbol 965 MovieClipUses:935 623 963 943 964Used by:966
Symbol 966 MovieClip {sprite_15}Uses:930 932 933 228 623 935 937 625 939 946 948 951 956 962 965Used by:2503
Symbol 967 GraphicUsed by:980
Symbol 968 GraphicUsed by:969
Symbol 969 MovieClipUses:968Used by:980
Symbol 970 GraphicUsed by:980
Symbol 971 GraphicUsed by:972
Symbol 972 MovieClipUses:971Used by:980
Symbol 973 GraphicUsed by:974
Symbol 974 MovieClipUses:226 973Used by:980
Symbol 975 GraphicUsed by:976
Symbol 976 MovieClipUses:975Used by:979
Symbol 977 GraphicUsed by:978
Symbol 978 MovieClipUses:977Used by:979
Symbol 979 MovieClipUses:976 978Used by:980
Symbol 980 MovieClip {sprite_16}Uses:967 969 970 226 224 599 616 972 974 979 237Used by:2503
Symbol 981 GraphicUsed by:988
Symbol 982 GraphicUsed by:983
Symbol 983 MovieClipUses:982Used by:988
Symbol 984 GraphicUsed by:988
Symbol 985 GraphicUsed by:986
Symbol 986 MovieClipUses:985Used by:988
Symbol 987 GraphicUsed by:988
Symbol 988 MovieClip {sprite_17}Uses:981 983 601 228 623 984 986 987 597 241Used by:2503
Symbol 989 MovieClipUses:585Used by:1051
Symbol 990 GraphicUsed by:991
Symbol 991 MovieClipUses:990Used by:1051
Symbol 992 EditableTextUses:193Used by:1051
Symbol 993 MovieClipUses:191Used by:998
Symbol 994 TextUses:193Used by:995 998
Symbol 995 MovieClipUses:994Used by:998
Symbol 996 TextUses:193Used by:998
Symbol 997 MovieClipUses:197Used by:998
Symbol 998 Button {hud.StartButton}Uses:993 995 996 997 191 994 197Used by:1051
Symbol 999 GraphicUsed by:1000 1005
Symbol 1000 MovieClipUses:999Used by:1005
Symbol 1001 TextUses:193Used by:1002 1005
Symbol 1002 MovieClipUses:1001Used by:1005
Symbol 1003 TextUses:193Used by:1005
Symbol 1004 MovieClipUses:197Used by:1005
Symbol 1005 Button {hud.EditButton}Uses:1000 1002 1003 1004 999 197 1001Used by:1051
Symbol 1006 Button {hud.ZoomInButton}Uses:562 564 561 563Used by:1051
Symbol 1007 Button {hud.ZoomOutButton}Uses:562 566 561 565Used by:1051
Symbol 1008 GraphicUsed by:1009
Symbol 1009 MovieClipUses:1008Used by:1051
Symbol 1010 GraphicUsed by:1016
Symbol 1011 TextUses:179Used by:1016
Symbol 1012 TextUses:179Used by:1016
Symbol 1013 GraphicUsed by:1014
Symbol 1014 MovieClipUses:1013Used by:1016
Symbol 1015 GraphicUsed by:1016
Symbol 1016 MovieClip {hud.RopeButton}Uses:1010 1011 1012 1014 1015Used by:1051
Symbol 1017 GraphicUsed by:1022
Symbol 1018 TextUses:179Used by:1022
Symbol 1019 TextUses:179Used by:1022
Symbol 1020 GraphicUsed by:1022 1136
Symbol 1021 GraphicUsed by:1022
Symbol 1022 MovieClip {hud.SteelButton}Uses:1017 1018 1019 1020 1021Used by:1051
Symbol 1023 GraphicUsed by:1030
Symbol 1024 TextUses:179Used by:1030
Symbol 1025 TextUses:179Used by:1030
Symbol 1026 GraphicUsed by:1030 1136
Symbol 1027 GraphicUsed by:1028
Symbol 1028 MovieClipUses:1027Used by:1030
Symbol 1029 GraphicUsed by:1030
Symbol 1030 MovieClip {hud.DeckButton}Uses:1023 1024 1025 1026 1028 1029Used by:1051
Symbol 1031 GraphicUsed by:1032 1033 1047 1048
Symbol 1032 MovieClipUses:1031Used by:1051
Symbol 1033 MovieClipUses:1031Used by:1051 1099
Symbol 1034 GraphicUsed by:1051
Symbol 1035 GraphicUsed by:1036
Symbol 1036 MovieClipUses:1035Used by:1051
Symbol 1037 GraphicUsed by:1039
Symbol 1038 GraphicUsed by:1039
Symbol 1039 Button {hud.ResetButton}Uses:1037 578 579 1038Used by:1051
Symbol 1040 GraphicUsed by:1042
Symbol 1041 GraphicUsed by:1042
Symbol 1042 Button {hud.UndoButton}Uses:1040 576 577 1041Used by:1051
Symbol 1043 GraphicUsed by:1045
Symbol 1044 GraphicUsed by:1045
Symbol 1045 MovieClip {hud.StressButton}Uses:1043 574 575 1044Used by:1051
Symbol 1046 GraphicUsed by:1051
Symbol 1047 MovieClipUses:1031Used by:1051
Symbol 1048 MovieClipUses:1031Used by:1051
Symbol 1049 GraphicUsed by:1050
Symbol 1050 ButtonUses:480 1049 487 479 486Used by:1051
Symbol 1051 MovieClip {hud.HUD}Uses:989 991 992 998 1005 1006 1007 588 1009 1016 1022 1030 1032 1033 1034 1036 1039 1042 1045 1046 1047 1048 1050Used by:2503
Symbol 1052 GraphicUsed by:1053
Symbol 1053 MovieClipUses:1052Used by:1056
Symbol 1054 GraphicUsed by:1055
Symbol 1055 MovieClipUses:1054Used by:1056 1059
Symbol 1056 MovieClip {hud.MusicButton}Uses:1053 1055Used by:1065
Symbol 1057 GraphicUsed by:1058
Symbol 1058 MovieClipUses:1057Used by:1059
Symbol 1059 MovieClip {hud.SoundsButton}Uses:1058 1055Used by:1065
Symbol 1060 EditableTextUses:193Used by:1061
Symbol 1061 MovieClip {hud.QualityButton}Uses:480 1060 487Used by:1065
Symbol 1062 GraphicUsed by:1064
Symbol 1063 TextUses:193Used by:1064
Symbol 1064 ButtonUses:480 1062 1063 487 479 486Used by:1065
Symbol 1065 MovieClip {hud.SoundPanel}Uses:1056 1059 1061 1064Used by:2503
Symbol 1066 GraphicUsed by:1067
Symbol 1067 MovieClipUses:1066Used by:1099
Symbol 1068 GraphicUsed by:1069
Symbol 1069 MovieClipUses:1068Used by:1099 1294
Symbol 1070 GraphicUsed by:1074 1319
Symbol 1071 TextUses:193Used by:1074
Symbol 1072 TextUses:193Used by:1074
Symbol 1073 GraphicUsed by:1074
Symbol 1074 ButtonUses:1070 1071 1072 1073Used by:1099
Symbol 1075 GraphicUsed by:1099
Symbol 1076 TextUses:193Used by:1078
Symbol 1077 TextUses:193Used by:1078
Symbol 1078 ButtonUses:535 1076 1077 538 200 197Used by:1099
Symbol 1079 TextUses:193Used by:1081
Symbol 1080 TextUses:193Used by:1081
Symbol 1081 ButtonUses:535 1079 1080 538 200 197Used by:1099
Symbol 1082 EditableTextUses:179Used by:1099
Symbol 1083 GraphicUsed by:1099
Symbol 1084 TextUses:193Used by:1099
Symbol 1085 GraphicUsed by:1086 1088 1092
Symbol 1086 MovieClipUses:1085Used by:1092
Symbol 1087 MovieClipUses:194Used by:1092
Symbol 1088 MovieClipUses:1085Used by:1092
Symbol 1089 GraphicUsed by:1090 1092
Symbol 1090 MovieClipUses:1089Used by:1092
Symbol 1091 MovieClipUses:194Used by:1092
Symbol 1092 ButtonUses:1086 1087 196 1088 1090 1091 1085 1089 194Used by:1099 1310
Symbol 1093 GraphicUsed by:1094 1096 1098
Symbol 1094 MovieClipUses:1093Used by:1098
Symbol 1095 MovieClipUses:536Used by:1098
Symbol 1096 MovieClipUses:1093Used by:1098
Symbol 1097 MovieClipUses:197Used by:1098
Symbol 1098 ButtonUses:1094 1095 537 1096 1097 1093 197 536Used by:1099
Symbol 1099 MovieClip {map.MapClass}Uses:1067 1069 1074 1033 1075 1078 1081 221 1082 1083 1084 1092 1098 533Used by:2503
Symbol 1100 GraphicUsed by:1101
Symbol 1101 MovieClipUses:1100Used by:1112
Symbol 1102 GraphicUsed by:1112
Symbol 1103 GraphicUsed by:1104
Symbol 1104 MovieClipUses:1103Used by:1112
Symbol 1105 GraphicUsed by:1111
Symbol 1106 GraphicUsed by:1111
Symbol 1107 GraphicUsed by:1111
Symbol 1108 GraphicUsed by:1111
Symbol 1109 GraphicUsed by:1111
Symbol 1110 GraphicUsed by:1111
Symbol 1111 MovieClipUses:1105 1106 1107 1108 1109 1110Used by:1112
Symbol 1112 MovieClipUses:1101 1102 1104 1111Used by:1113
Symbol 1113 MovieClip {vis.Sun}Uses:1112Used by:1235 2503
Symbol 1114 Bitmap {vis.GroundTexture}Used by:1115 2503
Symbol 1115 GraphicUses:1114Used by:1116
Symbol 1116 MovieClipUses:1115Used by:1235
Symbol 1117 GraphicUsed by:1118
Symbol 1118 MovieClip {vis.Grass01}Uses:1117Used by:1235 2503
Symbol 1119 GraphicUsed by:1120
Symbol 1120 MovieClip {vis.Grass02}Uses:1119Used by:1235 2503
Symbol 1121 GraphicUsed by:1122
Symbol 1122 MovieClip {vis.Grass03}Uses:1121Used by:1235 2503
Symbol 1123 GraphicUsed by:1124
Symbol 1124 MovieClip {vis.Grass04}Uses:1123Used by:1235 2503
Symbol 1125 GraphicUsed by:1126
Symbol 1126 MovieClip {vis.Grass05}Uses:1125Used by:1235 2503
Symbol 1127 GraphicUsed by:1128
Symbol 1128 MovieClip {vis.Grass06}Uses:1127Used by:1235 2503
Symbol 1129 GraphicUsed by:1130
Symbol 1130 MovieClip {vis.Grass07}Uses:1129Used by:1235 2503
Symbol 1131 GraphicUsed by:1132
Symbol 1132 MovieClip {vis.Grass08}Uses:1131Used by:1235 2503
Symbol 1133 GraphicUsed by:1134 1258
Symbol 1134 MovieClipUses:1133Used by:1136
Symbol 1135 GraphicUsed by:1136
Symbol 1136 MovieClipUses:1020 1026 1134 1135Used by:1235
Symbol 1137 GraphicUsed by:1141
Symbol 1138 GraphicUsed by:1141
Symbol 1139 GraphicUsed by:1141
Symbol 1140 GraphicUsed by:1141
Symbol 1141 Button {menu.HelpButton}Uses:1137 1138 1139 1140Used by:1235 2196
Symbol 1142 GraphicUsed by:1146 1167
Symbol 1143 GraphicUsed by:1146
Symbol 1144 GraphicUsed by:1146
Symbol 1145 GraphicUsed by:1146
Symbol 1146 Button {menu.CreditsButton}Uses:1142 1143 1144 1145Used by:1235
Symbol 1147 GraphicUsed by:1151
Symbol 1148 GraphicUsed by:1151
Symbol 1149 GraphicUsed by:1151
Symbol 1150 GraphicUsed by:1151
Symbol 1151 ButtonUses:1147 1148 1149 1150Used by:1235 2196
Symbol 1152 GraphicUsed by:1155
Symbol 1153 GraphicUsed by:1155
Symbol 1154 GraphicUsed by:1155
Symbol 1155 ButtonUses:1152 1153 1154Used by:1235
Symbol 1156 GraphicUsed by:1160 1164
Symbol 1157 GraphicUsed by:1160
Symbol 1158 GraphicUsed by:1160
Symbol 1159 GraphicUsed by:1160
Symbol 1160 ButtonUses:1156 1157 1158 1159Used by:1235
Symbol 1161 GraphicUsed by:1164
Symbol 1162 GraphicUsed by:1164
Symbol 1163 GraphicUsed by:1164
Symbol 1164 ButtonUses:1156 1161 1162 1163Used by:1235
Symbol 1165 GraphicUsed by:1167
Symbol 1166 GraphicUsed by:1167
Symbol 1167 ButtonUses:1142 1165 1166Used by:1235
Symbol 1168 GraphicUsed by:1169
Symbol 1169 MovieClipUses:1168Used by:1235
Symbol 1170 GraphicUsed by:1171
Symbol 1171 MovieClipUses:1170Used by:1235
Symbol 1172 GraphicUsed by:1235
Symbol 1173 GraphicUsed by:1174
Symbol 1174 MovieClipUses:1173Used by:1235
Symbol 1175 GraphicUsed by:1176
Symbol 1176 MovieClipUses:1175Used by:1235
Symbol 1177 GraphicUsed by:1235
Symbol 1178 GraphicUsed by:1179
Symbol 1179 MovieClipUses:1178Used by:1235
Symbol 1180 GraphicUsed by:1181
Symbol 1181 MovieClipUses:1180Used by:1235
Symbol 1182 GraphicUsed by:1235
Symbol 1183 GraphicUsed by:1184
Symbol 1184 MovieClipUses:1183Used by:1235
Symbol 1185 GraphicUsed by:1186
Symbol 1186 MovieClipUses:1185Used by:1235
Symbol 1187 GraphicUsed by:1235
Symbol 1188 GraphicUsed by:1189
Symbol 1189 MovieClipUses:1188Used by:1235
Symbol 1190 GraphicUsed by:1191
Symbol 1191 MovieClipUses:1190Used by:1235
Symbol 1192 GraphicUsed by:1235
Symbol 1193 GraphicUsed by:1194
Symbol 1194 MovieClipUses:1193Used by:1235
Symbol 1195 GraphicUsed by:1196
Symbol 1196 MovieClipUses:1195Used by:1235
Symbol 1197 GraphicUsed by:1235
Symbol 1198 GraphicUsed by:1199
Symbol 1199 MovieClipUses:1198Used by:1235
Symbol 1200 GraphicUsed by:1201
Symbol 1201 MovieClipUses:1200Used by:1235
Symbol 1202 GraphicUsed by:1235
Symbol 1203 GraphicUsed by:1204
Symbol 1204 MovieClipUses:1203Used by:1235
Symbol 1205 GraphicUsed by:1206
Symbol 1206 MovieClipUses:1205Used by:1235
Symbol 1207 GraphicUsed by:1235
Symbol 1208 GraphicUsed by:1209
Symbol 1209 MovieClipUses:1208Used by:1235
Symbol 1210 GraphicUsed by:1211
Symbol 1211 MovieClipUses:1210Used by:1235
Symbol 1212 GraphicUsed by:1235
Symbol 1213 GraphicUsed by:1214
Symbol 1214 MovieClipUses:1213Used by:1235
Symbol 1215 GraphicUsed by:1216
Symbol 1216 MovieClipUses:1215Used by:1235
Symbol 1217 GraphicUsed by:1235
Symbol 1218 GraphicUsed by:1219
Symbol 1219 MovieClipUses:1218Used by:1235
Symbol 1220 GraphicUsed by:1221
Symbol 1221 MovieClipUses:1220Used by:1235
Symbol 1222 GraphicUsed by:1235
Symbol 1223 GraphicUsed by:1224
Symbol 1224 MovieClipUses:1223Used by:1235
Symbol 1225 GraphicUsed by:1226
Symbol 1226 MovieClipUses:1225Used by:1235
Symbol 1227 GraphicUsed by:1235
Symbol 1228 GraphicUsed by:1229
Symbol 1229 MovieClipUses:1228Used by:1235
Symbol 1230 GraphicUsed by:1234
Symbol 1231 GraphicUsed by:1234
Symbol 1232 GraphicUsed by:1234
Symbol 1233 GraphicUsed by:1234
Symbol 1234 ButtonUses:1230 1231 1232 1233Used by:1235
Symbol 1235 MovieClip {menu.MenuClass}Uses:1113 722 929 269 1116 1118 1120 1122 1124 1126 1128 1130 1132 1136 1141 1146 1151 1155 1160 1164 1167 1169 1171 1172 1174 1176 1177 1179 1181 1182 1184 1186 1187 1189 1191 1192 1194 1196 1197 1199 1201 1202 1204 1206 1207 1209 1211 1212 1214 1216 1217 1219 1221 1222 1224 1226 1227 1229 1234Used by:2503
Symbol 1236 GraphicUsed by:1237
Symbol 1237 MovieClip {vis.DayCloud}Uses:1236Used by:1244 2503
Symbol 1238 GraphicUsed by:1239
Symbol 1239 MovieClipUses:1238Used by:1244
Symbol 1240 GraphicUsed by:1241
Symbol 1241 MovieClipUses:1240Used by:1244
Symbol 1242 GraphicUsed by:1243
Symbol 1243 MovieClipUses:1242Used by:1244
Symbol 1244 MovieClip {vis.Clouds}Uses:1237 1239 1241 1243Used by:2503
Symbol 1245 GraphicUsed by:1246
Symbol 1246 MovieClip {core.Dot}Uses:1245Used by:2503
Symbol 1247 GraphicUsed by:1254
Symbol 1248 GraphicUsed by:1253
Symbol 1249 GraphicUsed by:1253
Symbol 1250 GraphicUsed by:1253
Symbol 1251 GraphicUsed by:1253
Symbol 1252 GraphicUsed by:1253
Symbol 1253 MovieClipUses:1248 1249 1250 1251 1252Used by:1254
Symbol 1254 MovieClip {Flag}Uses:1247 1253Used by:2503
Symbol 1255 GraphicUsed by:1258
Symbol 1256 GraphicUsed by:1257
Symbol 1257 MovieClipUses:1256Used by:1258 2503
Symbol 1258 MovieClip {core.LinkElement}Uses:1133 1255 1257Used by:2503
Symbol 1259 GraphicUsed by:1260
Symbol 1260 MovieClipUses:1259Used by:1261
Symbol 1261 MovieClipUses:1260Used by:1262
Symbol 1262 MovieClip {vis.TutorialArrow}Uses:1261Used by:2503
Symbol 1263 GraphicUsed by:1264
Symbol 1264 MovieClipUses:1263Used by:1271
Symbol 1265 MovieClipUses:191Used by:1269 1279 2440 2459
Symbol 1266 MovieClipUsed by:1269 1279
Symbol 1267 TextUses:193Used by:1269
Symbol 1268 TextUses:193Used by:1269
Symbol 1269 ButtonUses:1265 1266 1267 1268 198 191 197Used by:1271 2502
Symbol 1270 EditableTextUses:179Used by:1271
Symbol 1271 MovieClip {vis.TalkBaloonInv}Uses:1264 199 205 1269 208 213 1270Used by:2503
Symbol 1272 GraphicUsed by:1273
Symbol 1273 MovieClipUses:1272Used by:1280 2447
Symbol 1274 GraphicUsed by:1280
Symbol 1275 GraphicUsed by:1276
Symbol 1276 MovieClipUses:1275Used by:1280
Symbol 1277 EditableTextUses:193Used by:1280
Symbol 1278 TextUses:193Used by:1279 2459
Symbol 1279 Button {popup.PopUpButtonOk}Uses:1265 1266 1278 198 191 197Used by:1280 2324
Symbol 1280 MovieClip {popup.BigPopUpInputName}Uses:1273 1274 1276 1277 1279Used by:2503
Symbol 1281 GraphicUsed by:1282
Symbol 1282 MovieClipUses:1281Used by:1291
Symbol 1283 TextUses:193Used by:1291
Symbol 1284 GraphicUsed by:1285 1290
Symbol 1285 MovieClipUses:1284Used by:1290
Symbol 1286 TextUses:193Used by:1290
Symbol 1287 TextUses:193Used by:1290
Symbol 1288 GraphicUsed by:1289 1290 2452 2453
Symbol 1289 MovieClipUses:1288Used by:1290
Symbol 1290 ButtonUses:1285 1286 1287 1289 1284 1288Used by:1291
Symbol 1291 MovieClip {popup.BigPopUpLose}Uses:1282 1283 213 208 1290Used by:2503
Symbol 1292 GraphicUsed by:1293
Symbol 1293 MovieClipUses:1292Used by:1310
Symbol 1294 MovieClipUses:1069Used by:1310
Symbol 1295 GraphicUsed by:1310
Symbol 1296 EditableTextUses:179Used by:1310
Symbol 1297 EditableTextUses:179Used by:1310
Symbol 1298 EditableTextUses:193Used by:1310
Symbol 1299 EditableTextUses:193Used by:1310
Symbol 1300 TextUses:193Used by:1302
Symbol 1301 TextUses:193Used by:1302
Symbol 1302 ButtonUses:209 1300 1301 212 200 197Used by:1310
Symbol 1303 TextUses:193Used by:1305
Symbol 1304 TextUses:193Used by:1305
Symbol 1305 ButtonUses:209 1303 1304 212 200 197Used by:1310
Symbol 1306 EditableTextUses:179Used by:1310
Symbol 1307 EditableTextUses:179Used by:1310
Symbol 1308 EditableTextUses:193Used by:1310
Symbol 1309 EditableTextUses:193Used by:1310
Symbol 1310 MovieClip {popup.BigPopUpWin}Uses:1293 1294 1295 1296 1297 1298 1299 1302 1305 1092 1306 1307 1308 1309Used by:2503
Symbol 1311 GraphicUsed by:1312
Symbol 1312 MovieClip {vis.BlueSky}Uses:1311Used by:2503
Symbol 1313 GraphicUsed by:1314
Symbol 1314 MovieClip {core.SteelLastSegment}Uses:1313Used by:2503
Symbol 1315 GraphicUsed by:1316
Symbol 1316 MovieClip {core.SteelSegment}Uses:1315Used by:2503
Symbol 1317 GraphicUsed by:1318
Symbol 1318 MovieClipUses:1317Used by:1322
Symbol 1319 MovieClipUses:1070Used by:1322
Symbol 1320 GraphicUsed by:1321
Symbol 1321 MovieClipUses:1320Used by:1322
Symbol 1322 MovieClip {VolumeBarGFX}Uses:1318 1319 1321Used by:2503
Symbol 1323 GraphicUsed by:1324
Symbol 1324 MovieClip {water.Water01}Uses:1323Used by:2503
Symbol 1325 GraphicUsed by:1326
Symbol 1326 MovieClip {water.Water02}Uses:1325Used by:2503
Symbol 1327 GraphicUsed by:1328
Symbol 1328 MovieClip {water.Water03}Uses:1327Used by:2503
Symbol 1329 GraphicUsed by:1330
Symbol 1330 MovieClip {water.Water04}Uses:1329Used by:2503
Symbol 1331 GraphicUsed by:1332
Symbol 1332 MovieClip {water.Water05}Uses:1331Used by:2503
Symbol 1333 GraphicUsed by:1334
Symbol 1334 MovieClip {water.Water06}Uses:1333Used by:2503
Symbol 1335 GraphicUsed by:1336
Symbol 1336 MovieClip {water.Water07}Uses:1335Used by:2503
Symbol 1337 GraphicUsed by:1338
Symbol 1338 MovieClip {vis.NastySky}Uses:1337Used by:2503
Symbol 1339 GraphicUsed by:1340
Symbol 1340 MovieClip {vis.NightSky}Uses:1339Used by:2503
Symbol 1341 GraphicUsed by:1342
Symbol 1342 MovieClip {vis.NastyCloud}Uses:1341Used by:2503
Symbol 1343 GraphicUsed by:1344
Symbol 1344 MovieClip {vis.NightCloud}Uses:1343Used by:2503
Symbol 1345 GraphicUsed by:1346
Symbol 1346 MovieClip {vis.Star}Uses:1345Used by:2503
Symbol 1347 GraphicUsed by:1356
Symbol 1348 GraphicUsed by:1356
Symbol 1349 GraphicUsed by:1356
Symbol 1350 GraphicUsed by:1356
Symbol 1351 GraphicUsed by:1356
Symbol 1352 GraphicUsed by:1356
Symbol 1353 GraphicUsed by:1356
Symbol 1354 GraphicUsed by:1356
Symbol 1355 GraphicUsed by:1356
Symbol 1356 MovieClip {vis.Moon}Uses:1347 1348 1349 1350 1351 1352 1353 1354 1355Used by:2503
Symbol 1357 GraphicUsed by:1358
Symbol 1358 MovieClipUses:1357Used by:1361 2503
Symbol 1359 GraphicUsed by:1360
Symbol 1360 MovieClipUses:1359Used by:1361 2503
Symbol 1361 MovieClip {vis.Thunder}Uses:1358 1360Used by:2503
Symbol 1362 GraphicUsed by:1363
Symbol 1363 MovieClip {vis.Rain}Uses:1362Used by:2503
Symbol 1364 GraphicUsed by:1369
Symbol 1365 EditableTextUses:193Used by:1369
Symbol 1366 GraphicUsed by:1369
Symbol 1367 GraphicUsed by:1368
Symbol 1368 MovieClipUses:1367Used by:1369
Symbol 1369 MovieClip {map.LevelSelectButton}Uses:1364 1365 1366 1368Used by:2503
Symbol 1370 MovieClipUses:429Used by:1381 1406 1424 1436 1461 1474 1476 1508 1520
Symbol 1371 GraphicUsed by:1381
Symbol 1372 MovieClipUses:120Used by:1380 1381 1406 1424 1436 1461 1474 1486 1508 1520 1530
Symbol 1373 GraphicUsed by:1380 2236
Symbol 1374 GraphicUsed by:1380 2236
Symbol 1375 GraphicUsed by:1380
Symbol 1376 GraphicUsed by:1380 2236
Symbol 1377 GraphicUsed by:1380 2236
Symbol 1378 GraphicUsed by:1380
Symbol 1379 GraphicUsed by:1380
Symbol 1380 MovieClip {BridgeCraft_CS3_Viral_fla.cvetok_morgaet_461}Uses:1373 1372 1374 1375 1376 1377 1378 1379Used by:1381 1406 1436
Symbol 1381 MovieClipUses:1370 1371 1372 1380Used by:1531
Symbol 1382 GraphicUsed by:1406
Symbol 1383 GraphicUsed by:1406
Symbol 1384 MovieClipUses:437Used by:1406 1424 1436 1461 1474 1486 1508 1520 1530
Symbol 1385 MovieClipUses:439Used by:1406 1424 1436 1461 1474 1508 1520
Symbol 1386 GraphicUsed by:1406
Symbol 1387 GraphicUsed by:1388
Symbol 1388 MovieClipUses:1387Used by:1406 1436 1461 1474 1486 1508 1520 1530
Symbol 1389 GraphicUsed by:1390 2234
Symbol 1390 MovieClipUses:1389Used by:1406 1436 1461 1474 1486 1508 1520 1530
Symbol 1391 GraphicUsed by:1406
Symbol 1392 GraphicUsed by:1406
Symbol 1393 GraphicUsed by:1406
Symbol 1394 GraphicUsed by:1406
Symbol 1395 GraphicUsed by:1406
Symbol 1396 GraphicUsed by:1406
Symbol 1397 GraphicUsed by:1406
Symbol 1398 GraphicUsed by:1399
Symbol 1399 MovieClipUses:1398Used by:1406
Symbol 1400 GraphicUsed by:1406
Symbol 1401 GraphicUsed by:1406
Symbol 1402 GraphicUsed by:1406
Symbol 1403 GraphicUsed by:1406
Symbol 1404 GraphicUsed by:1406
Symbol 1405 GraphicUsed by:1406
Symbol 1406 MovieClipUses:1370 1382 1372 1383 1384 1385 1386 1388 1390 1391 1392 436 1393 1394 1395 1396 1397 1380 1399 1400 1401 1402 1403 1404 1405Used by:1531
Symbol 1407 GraphicUsed by:1424
Symbol 1408 GraphicUsed by:1424 1436 2253
Symbol 1409 GraphicUsed by:1424
Symbol 1410 GraphicUsed by:1424
Symbol 1411 GraphicUsed by:1424
Symbol 1412 GraphicUsed by:1424
Symbol 1413 GraphicUsed by:1424
Symbol 1414 GraphicUsed by:1424
Symbol 1415 GraphicUsed by:1424
Symbol 1416 GraphicUsed by:1424
Symbol 1417 GraphicUsed by:1424
Symbol 1418 GraphicUsed by:1424
Symbol 1419 GraphicUsed by:1424
Symbol 1420 GraphicUsed by:1424
Symbol 1421 GraphicUsed by:1424
Symbol 1422 GraphicUsed by:1424
Symbol 1423 GraphicUsed by:1424
Symbol 1424 MovieClipUses:1370 1407 1372 1408 1384 1385 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423Used by:1531
Symbol 1425 GraphicUsed by:1436 1461 1474 1508 1520
Symbol 1426 GraphicUsed by:1436 1461 1474 1508 1520
Symbol 1427 GraphicUsed by:1436
Symbol 1428 GraphicUsed by:1436
Symbol 1429 GraphicUsed by:1436
Symbol 1430 GraphicUsed by:1436
Symbol 1431 GraphicUsed by:1436
Symbol 1432 GraphicUsed by:1436
Symbol 1433 GraphicUsed by:1436
Symbol 1434 GraphicUsed by:1436
Symbol 1435 GraphicUsed by:1436
Symbol 1436 MovieClipUses:1370 1408 1384 1385 1425 1388 1390 1426 1372 1380 1427 1428 1429 1430 1431 1432 1433 1434 1435Used by:1531
Symbol 1437 GraphicUsed by:1461 1474 1508 1520
Symbol 1438 GraphicUsed by:1461 1474
Symbol 1439 GraphicUsed by:1461 1474
Symbol 1440 GraphicUsed by:1461
Symbol 1441 GraphicUsed by:1442
Symbol 1442 MovieClipUses:1441Used by:1461 1474 1486 1508 1520 1530
Symbol 1443 GraphicUsed by:1461
Symbol 1444 GraphicUsed by:1461
Symbol 1445 GraphicUsed by:1461 1474
Symbol 1446 GraphicUsed by:1461
Symbol 1447 GraphicUsed by:1461
Symbol 1448 GraphicUsed by:1461 1474
Symbol 1449 GraphicUsed by:1461
Symbol 1450 GraphicUsed by:1461
Symbol 1451 GraphicUsed by:1461 1474
Symbol 1452 GraphicUsed by:1461
Symbol 1453 GraphicUsed by:1461
Symbol 1454 GraphicUsed by:1461 1474
Symbol 1455 GraphicUsed by:1461
Symbol 1456 GraphicUsed by:1461 1474
Symbol 1457 GraphicUsed by:1461
Symbol 1458 GraphicUsed by:1461 1474
Symbol 1459 GraphicUsed by:1461
Symbol 1460 GraphicUsed by:1461 1474 1486
Symbol 1461 MovieClipUses:1370 1437 1384 1385 1425 1388 1390 1426 1372 1438 1439 1440 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460Used by:1531
Symbol 1462 GraphicUsed by:1474
Symbol 1463 GraphicUsed by:1474
Symbol 1464 GraphicUsed by:1474
Symbol 1465 GraphicUsed by:1474
Symbol 1466 GraphicUsed by:1474
Symbol 1467 GraphicUsed by:1474
Symbol 1468 GraphicUsed by:1474
Symbol 1469 GraphicUsed by:1474
Symbol 1470 GraphicUsed by:1474
Symbol 1471 GraphicUsed by:1474
Symbol 1472 GraphicUsed by:1474
Symbol 1473 GraphicUsed by:1474
Symbol 1474 MovieClipUses:1370 1462 1384 1388 1463 1390 1442 1460 1372 1456 1464 1458 1438 1465 1466 1454 1467 1468 1451 1469 1470 1448 1471 1472 1445 1439 1473 1426 1437 1385 1425Used by:1531
Symbol 1475 GraphicUsed by:1476
Symbol 1476 MovieClipUses:1370 1475Used by:1486 1530
Symbol 1477 GraphicUsed by:1486
Symbol 1478 GraphicUsed by:1483
Symbol 1479 GraphicUsed by:1483
Symbol 1480 GraphicUsed by:1483
Symbol 1481 GraphicUsed by:1483
Symbol 1482 GraphicUsed by:1483
Symbol 1483 MovieClip {BridgeCraft_CS3_Viral_fla.cvetok_morgaet2_475}Uses:1478 1479 1480 1481 1482Used by:1486 1530
Symbol 1484 GraphicUsed by:1486
Symbol 1485 GraphicUsed by:1486
Symbol 1486 MovieClipUses:1476 1388 1384 1477 1442 1390 1460 1372 1483 1484 1485Used by:1531
Symbol 1487 GraphicUsed by:1508 1520
Symbol 1488 GraphicUsed by:1508 1520
Symbol 1489 GraphicUsed by:1508
Symbol 1490 GraphicUsed by:1508 1520
Symbol 1491 GraphicUsed by:1508
Symbol 1492 GraphicUsed by:1508
Symbol 1493 GraphicUsed by:1508 1520
Symbol 1494 GraphicUsed by:1508
Symbol 1495 GraphicUsed by:1508
Symbol 1496 GraphicUsed by:1508 1520
Symbol 1497 GraphicUsed by:1508
Symbol 1498 GraphicUsed by:1508
Symbol 1499 GraphicUsed by:1508 1520
Symbol 1500 GraphicUsed by:1508
Symbol 1501 GraphicUsed by:1508 1520
Symbol 1502 GraphicUsed by:1508 1520
Symbol 1503 GraphicUsed by:1508
Symbol 1504 GraphicUsed by:1508 1520
Symbol 1505 GraphicUsed by:1508 1520
Symbol 1506 GraphicUsed by:1508
Symbol 1507 GraphicUsed by:1508 1520 1530
Symbol 1508 MovieClipUses:1370 1437 1384 1385 1425 1388 1390 1426 1372 1487 1488 1489 1442 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507Used by:1531
Symbol 1509 GraphicUsed by:1520
Symbol 1510 GraphicUsed by:1520
Symbol 1511 GraphicUsed by:1520
Symbol 1512 GraphicUsed by:1520
Symbol 1513 GraphicUsed by:1520
Symbol 1514 GraphicUsed by:1520
Symbol 1515 GraphicUsed by:1520
Symbol 1516 GraphicUsed by:1520
Symbol 1517 GraphicUsed by:1520
Symbol 1518 GraphicUsed by:1520
Symbol 1519 GraphicUsed by:1520
Symbol 1520 MovieClipUses:1370 1509 1384 1388 1510 1390 1442 1507 1372 1504 1511 1505 1487 1512 1501 1502 1513 1514 1499 1515 1516 1496 1517 1518 1493 1488 1519 1490 1437 1385 1425 1426Used by:1531
Symbol 1521 GraphicUsed by:1530
Symbol 1522 GraphicUsed by:1530
Symbol 1523 GraphicUsed by:1530
Symbol 1524 GraphicUsed by:1530
Symbol 1525 GraphicUsed by:1530
Symbol 1526 GraphicUsed by:1530
Symbol 1527 GraphicUsed by:1530
Symbol 1528 GraphicUsed by:1530
Symbol 1529 GraphicUsed by:1530
Symbol 1530 MovieClipUses:1476 1388 1384 1521 1442 1390 1507 1372 1483 1522 1523 1524 1525 1526 1527 1528 1529Used by:1531
Symbol 1531 MovieClip {characters.Cvetok}Uses:1381 1406 1424 1436 1461 1474 1486 1508 1520 1530Used by:2503
Symbol 1532 Sound {deck_break.wav}Used by:2503
Symbol 1533 Sound {deck_connect.wav}Used by:2503
Symbol 1534 Sound {emulation.mp3}Used by:2503
Symbol 1535 Sound {intro_slide1.wav}Used by:2503
Symbol 1536 Sound {intro_slide2.wav}Used by:2503
Symbol 1537 Sound {intro_slide3.wav}Used by:2503
Symbol 1538 Sound {lose.wav}Used by:2503
Symbol 1539 Sound {main_theme.wav}Used by:2503
Symbol 1540 Sound {rope_break.wav}Used by:2503
Symbol 1541 Sound {rope_connect.wav}Used by:2503
Symbol 1542 Sound {steel_break.wav}Used by:2503
Symbol 1543 Sound {steel_connect.wav}Used by:2503
Symbol 1544 Sound {victory.wav}Used by:2503
Symbol 1545 Sound {water_splash.wav}Used by:2503
Symbol 1546 MovieClipUses:429Used by:1559 1567 1570 1572 1583 1592 1602 1634 1645 1655 1673 2477
Symbol 1547 MovieClipUses:160Used by:1559 1567 1571 1572 1583 1592 1602 1645 1655 2477
Symbol 1548 MovieClipUses:141Used by:1559 1567 1571 1572 1583 1592 1602 1645 1655 2477
Symbol 1549 MovieClipUses:112Used by:1559 1567 1571 1572 1583 1592 1602 1634 1645 1655 1673 2477
Symbol 1550 MovieClipUses:162Used by:1559 1567 1571 1572 1583 1592 1602 1645 1655 2477
Symbol 1551 GraphicUsed by:1559
Symbol 1552 MovieClipUses:120Used by:1558 1559 1567 1570 1572 1583 1592 1602 1618 1634 1645 1655 1673 2477
Symbol 1553 GraphicUsed by:1558 2261
Symbol 1554 GraphicUsed by:1558 2261
Symbol 1555 GraphicUsed by:1558 2261
Symbol 1556 GraphicUsed by:1558 2261
Symbol 1557 GraphicUsed by:1558 2261
Symbol 1558 MovieClip {BridgeCraft_CS3_Viral_fla.glazan_morgaet_487}Uses:1553 1552 1554 1555 1556 1557Used by:1559 1567 1570 1583
Symbol 1559 MovieClipUses:1546 1547 1548 1549 1550 1551 1552 1558Used by:1674
Symbol 1560 GraphicUsed by:1567
Symbol 1561 GraphicUsed by:1567
Symbol 1562 GraphicUsed by:1567
Symbol 1563 GraphicUsed by:1567
Symbol 1564 GraphicUsed by:1567
Symbol 1565 GraphicUsed by:1567
Symbol 1566 GraphicUsed by:1567
Symbol 1567 MovieClipUses:1546 1547 1548 1549 1550 1560 1552 1561 1562 1563 1558 1564 1565 1566Used by:1674
Symbol 1568 GraphicUsed by:1572
Symbol 1569 GraphicUsed by:1570
Symbol 1570 MovieClipUses:1546 1569 1552 1558Used by:1571 1572
Symbol 1571 MovieClipUses:1547 1548 1549 1550 1570Used by:1572
Symbol 1572 MovieClipUses:1546 1547 1548 1549 1550 1568 1552 1570 1571Used by:1674
Symbol 1573 GraphicUsed by:1583
Symbol 1574 GraphicUsed by:1583
Symbol 1575 GraphicUsed by:1583
Symbol 1576 GraphicUsed by:1583
Symbol 1577 GraphicUsed by:1583
Symbol 1578 GraphicUsed by:1583
Symbol 1579 GraphicUsed by:1583
Symbol 1580 GraphicUsed by:1583
Symbol 1581 GraphicUsed by:1583
Symbol 1582 GraphicUsed by:1583
Symbol 1583 MovieClipUses:1546 1547 1548 1549 1550 1573 1574 1552 1558 1575 1576 1577 1578 1579 1580 1581 1582Used by:1674
Symbol 1584 GraphicUsed by:1592
Symbol 1585 GraphicUsed by:1592
Symbol 1586 GraphicUsed by:1592
Symbol 1587 GraphicUsed by:1592
Symbol 1588 GraphicUsed by:1592
Symbol 1589 GraphicUsed by:1592
Symbol 1590 GraphicUsed by:1592
Symbol 1591 GraphicUsed by:1592
Symbol 1592 MovieClipUses:1546 1547 1548 1549 1550 1584 1552 1585 1586 1587 147 1588 1589 1590 1591Used by:1674
Symbol 1593 GraphicUsed by:1602
Symbol 1594 GraphicUsed by:1602
Symbol 1595 GraphicUsed by:1602
Symbol 1596 GraphicUsed by:1602
Symbol 1597 GraphicUsed by:1602
Symbol 1598 GraphicUsed by:1602
Symbol 1599 GraphicUsed by:1602
Symbol 1600 GraphicUsed by:1602
Symbol 1601 GraphicUsed by:1602
Symbol 1602 MovieClipUses:1546 1548 1549 1593 1552 147 1594 1595 1596 1597 1598 1599 1600 1547 1550 1601Used by:1674
Symbol 1603 GraphicUsed by:1634
Symbol 1604 GraphicUsed by:1605
Symbol 1605 MovieClipUses:1604Used by:1634 1673
Symbol 1606 MovieClipUses:117Used by:1634 1673
Symbol 1607 GraphicUsed by:1634
Symbol 1608 GraphicUsed by:1618
Symbol 1609 GraphicUsed by:1618
Symbol 1610 GraphicUsed by:1618
Symbol 1611 GraphicUsed by:1618
Symbol 1612 GraphicUsed by:1618
Symbol 1613 GraphicUsed by:1618
Symbol 1614 GraphicUsed by:1618
Symbol 1615 GraphicUsed by:1618
Symbol 1616 GraphicUsed by:1618
Symbol 1617 GraphicUsed by:1618
Symbol 1618 MovieClip {BridgeCraft_CS3_Viral_fla.glazan_morgaet_morgaet_498}Uses:1608 1552 1609 1610 1611 1612 1613 1614 1615 1616 1617Used by:1634 1673
Symbol 1619 GraphicUsed by:1634
Symbol 1620 GraphicUsed by:1634
Symbol 1621 GraphicUsed by:1634
Symbol 1622 GraphicUsed by:1634
Symbol 1623 GraphicUsed by:1634
Symbol 1624 GraphicUsed by:1634
Symbol 1625 GraphicUsed by:1634
Symbol 1626 GraphicUsed by:1634
Symbol 1627 GraphicUsed by:1634
Symbol 1628 GraphicUsed by:1634
Symbol 1629 GraphicUsed by:1634
Symbol 1630 GraphicUsed by:1634
Symbol 1631 GraphicUsed by:1634
Symbol 1632 GraphicUsed by:1634
Symbol 1633 GraphicUsed by:1634
Symbol 1634 MovieClipUses:1546 1549 1603 1605 1606 1607 1552 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633Used by:1674
Symbol 1635 GraphicUsed by:1645
Symbol 1636 GraphicUsed by:1645
Symbol 1637 GraphicUsed by:1645
Symbol 1638 GraphicUsed by:1645
Symbol 1639 GraphicUsed by:1645
Symbol 1640 GraphicUsed by:1645
Symbol 1641 GraphicUsed by:1645 1655
Symbol 1642 GraphicUsed by:1645
Symbol 1643 GraphicUsed by:1645
Symbol 1644 GraphicUsed by:1645
Symbol 1645 MovieClipUses:1546 1547 1548 1549 1550 1635 1552 1636 1637 1638 1639 1640 1641 1642 1643 1644Used by:1674
Symbol 1646 GraphicUsed by:1655
Symbol 1647 GraphicUsed by:1655
Symbol 1648 GraphicUsed by:1655
Symbol 1649 GraphicUsed by:1655
Symbol 1650 GraphicUsed by:1655
Symbol 1651 GraphicUsed by:1655
Symbol 1652 GraphicUsed by:1655
Symbol 1653 GraphicUsed by:1655
Symbol 1654 GraphicUsed by:1655
Symbol 1655 MovieClipUses:1546 1548 1549 1646 1552 1641 1647 1648 1649 1650 1651 1652 1653 1547 1550 1654Used by:1674
Symbol 1656 GraphicUsed by:1673
Symbol 1657 GraphicUsed by:1673
Symbol 1658 GraphicUsed by:1673
Symbol 1659 GraphicUsed by:1673
Symbol 1660 GraphicUsed by:1673
Symbol 1661 GraphicUsed by:1673
Symbol 1662 GraphicUsed by:1673
Symbol 1663 GraphicUsed by:1673
Symbol 1664 GraphicUsed by:1673
Symbol 1665 GraphicUsed by:1673
Symbol 1666 GraphicUsed by:1673
Symbol 1667 GraphicUsed by:1673
Symbol 1668 GraphicUsed by:1673
Symbol 1669 GraphicUsed by:1673
Symbol 1670 GraphicUsed by:1673
Symbol 1671 GraphicUsed by:1673
Symbol 1672 GraphicUsed by:1673
Symbol 1673 MovieClipUses:1546 1549 1656 1605 1606 1657 1552 1618 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672Used by:1674
Symbol 1674 MovieClip {characters.Glazan}Uses:1559 1567 1572 1583 1592 1602 1634 1645 1655 1673Used by:2503
Symbol 1675 MovieClipUses:429Used by:1690 1693 1694 1702 1709 1717 1730 1739 1766 1779 1788 1804
Symbol 1676 MovieClipUses:425Used by:1690 1694 1702 1709 1717 1730 1739 1779 1788
Symbol 1677 MovieClipUses:427Used by:1690 1694 1702 1709 1717 1730 1739 1779 1788
Symbol 1678 GraphicUsed by:1679
Symbol 1679 MovieClipUses:1678Used by:1690 1694 1702 1709 1717 1730 1739 1779 1788
Symbol 1680 GraphicUsed by:1681
Symbol 1681 MovieClipUses:1680Used by:1690 1694 1702 1709 1717 1730 1739 1766 1779 1788 1804
Symbol 1682 GraphicUsed by:1690
Symbol 1683 MovieClipUses:120Used by:1689 1690 1694 1702 1709 1717 1730 1739 1751 1766 1779 1788 1804
Symbol 1684 GraphicUsed by:1689 2280
Symbol 1685 GraphicUsed by:1689 2280
Symbol 1686 GraphicUsed by:1689 2280
Symbol 1687 GraphicUsed by:1689 2280
Symbol 1688 GraphicUsed by:1689
Symbol 1689 MovieClip {BridgeCraft_CS3_Viral_fla.larin_morgaet_510}Uses:1684 1683 1685 1686 1687 1688Used by:1690 1693 1702 1717
Symbol 1690 MovieClipUses:1675 1676 1677 1679 1681 1682 1683 1689Used by:1805
Symbol 1691 GraphicUsed by:1694
Symbol 1692 GraphicUsed by:1693
Symbol 1693 MovieClipUses:1675 1692 1689Used by:1694
Symbol 1694 MovieClipUses:1675 1676 1677 1679 1681 1691 1683 1693Used by:1805
Symbol 1695 GraphicUsed by:1709
Symbol 1696 GraphicUsed by:1709
Symbol 1697 GraphicUsed by:1709
Symbol 1698 GraphicUsed by:1709
Symbol 1699 GraphicUsed by:1709
Symbol 1700 GraphicUsed by:1709
Symbol 1701 GraphicUsed by:1702
Symbol 1702 MovieClipUses:1676 1677 1679 1681 1675 1701 1683 1689Used by:1709
Symbol 1703 GraphicUsed by:1709
Symbol 1704 GraphicUsed by:1709
Symbol 1705 GraphicUsed by:1709
Symbol 1706 GraphicUsed by:1709
Symbol 1707 GraphicUsed by:1709
Symbol 1708 GraphicUsed by:1709
Symbol 1709 MovieClipUses:1675 1676 1677 1679 1681 1695 1683 1696 1697 1698 1699 1700 1702 1703 1704 1705 1706 1707 1708Used by:1805
Symbol 1710 GraphicUsed by:1717
Symbol 1711 GraphicUsed by:1717
Symbol 1712 GraphicUsed by:1717
Symbol 1713 GraphicUsed by:1717
Symbol 1714 GraphicUsed by:1717
Symbol 1715 GraphicUsed by:1717
Symbol 1716 GraphicUsed by:1717
Symbol 1717 MovieClipUses:1675 1710 1711 1712 1683 1689 1676 1677 1679 1681 1713 1714 1715 1716Used by:1805
Symbol 1718 GraphicUsed by:1730
Symbol 1719 GraphicUsed by:1730
Symbol 1720 GraphicUsed by:1730
Symbol 1721 GraphicUsed by:1730
Symbol 1722 GraphicUsed by:1730
Symbol 1723 GraphicUsed by:1730
Symbol 1724 GraphicUsed by:1730 1739 1766
Symbol 1725 GraphicUsed by:1730 1739
Symbol 1726 GraphicUsed by:1730
Symbol 1727 GraphicUsed by:1730 1739
Symbol 1728 GraphicUsed by:1730
Symbol 1729 GraphicUsed by:1730 1739
Symbol 1730 MovieClipUses:1675 1676 1677 1679 1681 1718 1683 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729Used by:1805
Symbol 1731 GraphicUsed by:1739
Symbol 1732 GraphicUsed by:1739
Symbol 1733 GraphicUsed by:1739
Symbol 1734 GraphicUsed by:1739
Symbol 1735 GraphicUsed by:1739
Symbol 1736 GraphicUsed by:1739
Symbol 1737 GraphicUsed by:1739
Symbol 1738 GraphicUsed by:1739
Symbol 1739 MovieClipUses:1675 1676 1681 1731 1724 1729 1683 1732 1727 1733 1725 1734 1735 1736 1737 1677 1679 1738Used by:1805
Symbol 1740 GraphicUsed by:1766
Symbol 1741 GraphicUsed by:1742
Symbol 1742 MovieClipUses:1741Used by:1766 1804
Symbol 1743 GraphicUsed by:1744
Symbol 1744 MovieClipUses:1743Used by:1766 1804
Symbol 1745 GraphicUsed by:1766
Symbol 1746 GraphicUsed by:1751
Symbol 1747 GraphicUsed by:1751
Symbol 1748 GraphicUsed by:1751
Symbol 1749 GraphicUsed by:1751
Symbol 1750 GraphicUsed by:1751
Symbol 1751 MovieClip {BridgeCraft_CS3_Viral_fla.larin_morgaet_2_521}Uses:1746 1683 1747 1748 1749 1750Used by:1766 1804
Symbol 1752 GraphicUsed by:1766
Symbol 1753 GraphicUsed by:1766
Symbol 1754 GraphicUsed by:1766
Symbol 1755 GraphicUsed by:1766
Symbol 1756 GraphicUsed by:1766
Symbol 1757 GraphicUsed by:1766
Symbol 1758 GraphicUsed by:1766
Symbol 1759 GraphicUsed by:1766
Symbol 1760 GraphicUsed by:1766
Symbol 1761 GraphicUsed by:1766
Symbol 1762 GraphicUsed by:1766
Symbol 1763 GraphicUsed by:1766
Symbol 1764 GraphicUsed by:1766
Symbol 1765 GraphicUsed by:1766
Symbol 1766 MovieClipUses:1675 1681 1740 1742 1744 1724 1745 1683 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765Used by:1805
Symbol 1767 GraphicUsed by:1779
Symbol 1768 GraphicUsed by:1779
Symbol 1769 GraphicUsed by:1779
Symbol 1770 GraphicUsed by:1779
Symbol 1771 GraphicUsed by:1779
Symbol 1772 GraphicUsed by:1779
Symbol 1773 GraphicUsed by:1779 1788 1804
Symbol 1774 GraphicUsed by:1779 1788
Symbol 1775 GraphicUsed by:1779
Symbol 1776 GraphicUsed by:1779 1788
Symbol 1777 GraphicUsed by:1779
Symbol 1778 GraphicUsed by:1779 1788
Symbol 1779 MovieClipUses:1675 1676 1677 1679 1681 1767 1683 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778Used by:1805
Symbol 1780 GraphicUsed by:1788
Symbol 1781 GraphicUsed by:1788
Symbol 1782 GraphicUsed by:1788
Symbol 1783 GraphicUsed by:1788
Symbol 1784 GraphicUsed by:1788
Symbol 1785 GraphicUsed by:1788
Symbol 1786 GraphicUsed by:1788
Symbol 1787 GraphicUsed by:1788
Symbol 1788 MovieClipUses:1675 1676 1681 1780 1773 1778 1683 1781 1776 1782 1774 1783 1784 1785 1786 1677 1679 1787Used by:1805
Symbol 1789 GraphicUsed by:1804
Symbol 1790 GraphicUsed by:1804
Symbol 1791 GraphicUsed by:1804
Symbol 1792 GraphicUsed by:1804
Symbol 1793 GraphicUsed by:1804
Symbol 1794 GraphicUsed by:1804
Symbol 1795 GraphicUsed by:1804
Symbol 1796 GraphicUsed by:1804
Symbol 1797 GraphicUsed by:1804
Symbol 1798 GraphicUsed by:1804
Symbol 1799 GraphicUsed by:1804
Symbol 1800 GraphicUsed by:1804
Symbol 1801 GraphicUsed by:1804
Symbol 1802 GraphicUsed by:1804
Symbol 1803 GraphicUsed by:1804
Symbol 1804 MovieClipUses:1675 1681 1789 1742 1744 1773 1790 1683 1751 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803Used by:1805
Symbol 1805 MovieClip {characters.Larin}Uses:1690 1694 1709 1717 1730 1739 1766 1779 1788 1804Used by:2503
Symbol 1806 MovieClipUses:429Used by:1815 1827 1848 1853 1862 1894 1906 1933 1957 1970 1989
Symbol 1807 GraphicUsed by:1815
Symbol 1808 MovieClipUses:120Used by:1814 1815 1827 1848 1853 1862 1894 1906 1915 1933 1957 1970 1989
Symbol 1809 GraphicUsed by:1814
Symbol 1810 GraphicUsed by:1814
Symbol 1811 GraphicUsed by:1814
Symbol 1812 GraphicUsed by:1814
Symbol 1813 GraphicUsed by:1814
Symbol 1814 MovieClip {BridgeCraft_CS3_Viral_fla.prezer_morgaet_529}Uses:1809 1808 1810 1811 1812 1813Used by:1815 1827 1862
Symbol 1815 MovieClipUses:1806 1807 1808 1814Used by:1990
Symbol 1816 GraphicUsed by:1827
Symbol 1817 GraphicUsed by:1827
Symbol 1818 GraphicUsed by:1827
Symbol 1819 GraphicUsed by:1827
Symbol 1820 GraphicUsed by:1827
Symbol 1821 MovieClipUses:449Used by:1827
Symbol 1822 GraphicUsed by:1827
Symbol 1823 GraphicUsed by:1827
Symbol 1824 GraphicUsed by:1827
Symbol 1825 GraphicUsed by:1827
Symbol 1826 GraphicUsed by:1827
Symbol 1827 MovieClipUses:1806 1816 1808 1817 1818 1819 1820 1821 1822 1814 1823 1824 1825 1826Used by:1990
Symbol 1828 GraphicUsed by:1853
Symbol 1829 GraphicUsed by:1853
Symbol 1830 GraphicUsed by:1853
Symbol 1831 GraphicUsed by:1853
Symbol 1832 GraphicUsed by:1848
Symbol 1833 GraphicUsed by:1848 2298
Symbol 1834 GraphicUsed by:1848 2298
Symbol 1835 GraphicUsed by:1848
Symbol 1836 GraphicUsed by:1848 2298
Symbol 1837 GraphicUsed by:1848 2298
Symbol 1838 GraphicUsed by:1848
Symbol 1839 GraphicUsed by:1848 2298
Symbol 1840 GraphicUsed by:1848 2298
Symbol 1841 GraphicUsed by:1848 2298
Symbol 1842 GraphicUsed by:1848 2298
Symbol 1843 GraphicUsed by:1848 2298
Symbol 1844 GraphicUsed by:1848 2298
Symbol 1845 GraphicUsed by:1848 2298
Symbol 1846 GraphicUsed by:1848 2298
Symbol 1847 GraphicUsed by:1848
Symbol 1848 MovieClipUses:1806 1832 1808 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847Used by:1853
Symbol 1849 GraphicUsed by:1853
Symbol 1850 GraphicUsed by:1853
Symbol 1851 GraphicUsed by:1853
Symbol 1852 GraphicUsed by:1853
Symbol 1853 MovieClipUses:1806 1828 1808 1829 1830 1831 1848 1849 1850 1851 1852Used by:1990
Symbol 1854 GraphicUsed by:1862
Symbol 1855 GraphicUsed by:1862
Symbol 1856 GraphicUsed by:1862
Symbol 1857 GraphicUsed by:1862
Symbol 1858 GraphicUsed by:1862
Symbol 1859 GraphicUsed by:1862
Symbol 1860 GraphicUsed by:1862
Symbol 1861 GraphicUsed by:1862
Symbol 1862 MovieClipUses:1806 1854 1808 1814 1855 1856 1857 1858 1859 1860 1861Used by:1990
Symbol 1863 GraphicUsed by:1894
Symbol 1864 GraphicUsed by:1894 1906
Symbol 1865 GraphicUsed by:1866
Symbol 1866 MovieClipUses:1865Used by:1894 1906 1957 1970
Symbol 1867 GraphicUsed by:1894
Symbol 1868 GraphicUsed by:1869
Symbol 1869 MovieClipUses:1868Used by:1894 1906 1933 1957 1970 1989
Symbol 1870 GraphicUsed by:1894 1906
Symbol 1871 GraphicUsed by:1894
Symbol 1872 GraphicUsed by:1894
Symbol 1873 GraphicUsed by:1894 1906
Symbol 1874 GraphicUsed by:1894
Symbol 1875 GraphicUsed by:1894
Symbol 1876 GraphicUsed by:1894 1906
Symbol 1877 GraphicUsed by:1894
Symbol 1878 GraphicUsed by:1894 1906
Symbol 1879 GraphicUsed by:1894
Symbol 1880 GraphicUsed by:1894 1906
Symbol 1881 GraphicUsed by:1894 1906
Symbol 1882 GraphicUsed by:1894
Symbol 1883 GraphicUsed by:1894 1906
Symbol 1884 GraphicUsed by:1894 1906
Symbol 1885 GraphicUsed by:1886
Symbol 1886 MovieClipUses:1885Used by:1894 1906 1933 1957 1970 1989
Symbol 1887 GraphicUsed by:1894
Symbol 1888 GraphicUsed by:1889
Symbol 1889 MovieClipUses:1888Used by:1894 1906 1933 1957 1970 1989
Symbol 1890 GraphicUsed by:1894 1906
Symbol 1891 GraphicUsed by:1894 1906 1933
Symbol 1892 GraphicUsed by:1894 1906
Symbol 1893 GraphicUsed by:1894
Symbol 1894 MovieClipUses:1806 1863 1808 1864 1866 1867 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1886 1887 1889 1890 1891 1892 1893Used by:1990
Symbol 1895 GraphicUsed by:1906
Symbol 1896 GraphicUsed by:1906
Symbol 1897 GraphicUsed by:1906
Symbol 1898 GraphicUsed by:1906
Symbol 1899 GraphicUsed by:1906
Symbol 1900 GraphicUsed by:1906
Symbol 1901 GraphicUsed by:1906
Symbol 1902 GraphicUsed by:1906
Symbol 1903 GraphicUsed by:1906
Symbol 1904 GraphicUsed by:1906
Symbol 1905 GraphicUsed by:1906
Symbol 1906 MovieClipUses:1806 1895 1892 1886 1896 1889 1890 1869 1891 1808 1884 1866 1897 1881 1898 1883 1878 1899 1880 1900 1901 1876 1902 1903 1873 1864 1904 1870 1905Used by:1990
Symbol 1907 GraphicUsed by:1933
Symbol 1908 GraphicUsed by:1933
Symbol 1909 GraphicUsed by:1933
Symbol 1910 GraphicUsed by:1915
Symbol 1911 GraphicUsed by:1915
Symbol 1912 GraphicUsed by:1915
Symbol 1913 GraphicUsed by:1915
Symbol 1914 GraphicUsed by:1915
Symbol 1915 MovieClip {BridgeCraft_CS3_Viral_fla.prezer_morgaet_2_542}Uses:1910 1808 1911 1912 1913 1914Used by:1933 1989
Symbol 1916 GraphicUsed by:1933
Symbol 1917 GraphicUsed by:1933
Symbol 1918 GraphicUsed by:1933
Symbol 1919 GraphicUsed by:1933
Symbol 1920 GraphicUsed by:1933
Symbol 1921 GraphicUsed by:1933
Symbol 1922 GraphicUsed by:1933
Symbol 1923 GraphicUsed by:1933
Symbol 1924 GraphicUsed by:1933
Symbol 1925 GraphicUsed by:1933
Symbol 1926 GraphicUsed by:1933
Symbol 1927 GraphicUsed by:1933
Symbol 1928 GraphicUsed by:1933
Symbol 1929 GraphicUsed by:1933
Symbol 1930 GraphicUsed by:1933
Symbol 1931 GraphicUsed by:1933
Symbol 1932 GraphicUsed by:1933
Symbol 1933 MovieClipUses:1806 1907 1886 1908 1889 1909 1869 1891 1808 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932Used by:1990
Symbol 1934 GraphicUsed by:1957
Symbol 1935 GraphicUsed by:1957
Symbol 1936 GraphicUsed by:1957
Symbol 1937 GraphicUsed by:1957 1970
Symbol 1938 GraphicUsed by:1957
Symbol 1939 GraphicUsed by:1957
Symbol 1940 GraphicUsed by:1957 1970
Symbol 1941 GraphicUsed by:1957
Symbol 1942 GraphicUsed by:1957
Symbol 1943 GraphicUsed by:1957 1970
Symbol 1944 GraphicUsed by:1957
Symbol 1945 GraphicUsed by:1957 1970
Symbol 1946 GraphicUsed by:1957
Symbol 1947 GraphicUsed by:1957 1970
Symbol 1948 GraphicUsed by:1957 1970
Symbol 1949 GraphicUsed by:1957
Symbol 1950 GraphicUsed by:1957 1970
Symbol 1951 GraphicUsed by:1957 1970
Symbol 1952 GraphicUsed by:1957
Symbol 1953 GraphicUsed by:1957 1970
Symbol 1954 GraphicUsed by:1957 1970 1989
Symbol 1955 GraphicUsed by:1957 1970
Symbol 1956 GraphicUsed by:1957
Symbol 1957 MovieClipUses:1806 1934 1808 1935 1866 1936 1869 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1886 1952 1889 1953 1954 1955 1956Used by:1990
Symbol 1958 GraphicUsed by:1970
Symbol 1959 GraphicUsed by:1970
Symbol 1960 GraphicUsed by:1970
Symbol 1961 GraphicUsed by:1970
Symbol 1962 GraphicUsed by:1970
Symbol 1963 GraphicUsed by:1970
Symbol 1964 GraphicUsed by:1970
Symbol 1965 GraphicUsed by:1970
Symbol 1966 GraphicUsed by:1970
Symbol 1967 GraphicUsed by:1970
Symbol 1968 GraphicUsed by:1970
Symbol 1969 GraphicUsed by:1970
Symbol 1970 MovieClipUses:1806 1958 1955 1886 1959 1889 1953 1869 1954 1808 1951 1866 1960 1948 1961 1950 1945 1962 1947 1963 1964 1943 1965 1966 1940 1967 1968 1937 1969Used by:1990
Symbol 1971 GraphicUsed by:1989
Symbol 1972 GraphicUsed by:1989
Symbol 1973 GraphicUsed by:1989
Symbol 1974 GraphicUsed by:1989
Symbol 1975 GraphicUsed by:1989
Symbol 1976 GraphicUsed by:1989
Symbol 1977 GraphicUsed by:1989
Symbol 1978 GraphicUsed by:1989
Symbol 1979 GraphicUsed by:1989
Symbol 1980 GraphicUsed by:1989
Symbol 1981 GraphicUsed by:1989
Symbol 1982 GraphicUsed by:1989
Symbol 1983 GraphicUsed by:1989
Symbol 1984 GraphicUsed by:1989
Symbol 1985 GraphicUsed by:1989
Symbol 1986 GraphicUsed by:1989
Symbol 1987 GraphicUsed by:1989
Symbol 1988 GraphicUsed by:1989
Symbol 1989 MovieClipUses:1806 1971 1886 1972 1889 1973 1869 1954 1808 1915 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988Used by:1990
Symbol 1990 MovieClip {characters.Prezer}Uses:1815 1827 1853 1862 1894 1906 1933 1957 1970 1989Used by:2503
Symbol 1991 MovieClipUses:429Used by:2006 2010 2047
Symbol 1992 GraphicUsed by:2006 2010 2047
Symbol 1993 MovieClipUses:455Used by:2006 2010 2047
Symbol 1994 MovieClipUses:461Used by:2006 2010 2047
Symbol 1995 GraphicUsed by:1996
Symbol 1996 MovieClipUses:1995Used by:2006 2010 2047
Symbol 1997 MovieClipUses:459Used by:2006 2010 2047
Symbol 1998 GraphicUsed by:2006 2010
Symbol 1999 MovieClipUses:120Used by:2006 2010 2047
Symbol 2000 GraphicUsed by:2005 2315
Symbol 2001 GraphicUsed by:2005 2315
Symbol 2002 GraphicUsed by:2005 2315
Symbol 2003 GraphicUsed by:2005 2315
Symbol 2004 GraphicUsed by:2005 2315
Symbol 2005 MovieClip {BridgeCraft_CS3_Viral_fla.svet_morgaet_554}Uses:2000 2001 2002 2003 2004Used by:2006 2010 2030 2047
Symbol 2006 MovieClipUses:1991 1992 1993 1994 1996 1997 1998 1999 2005Used by:2174
Symbol 2007 GraphicUsed by:2010
Symbol 2008 GraphicUsed by:2010
Symbol 2009 GraphicUsed by:2010 2047
Symbol 2010 MovieClipUses:1991 1992 1993 1994 1996 1997 1998 1999 454 2007 2008 2005 463 2009Used by:2174
Symbol 2011 MovieClipUses:429Used by:2030 2036 2074 2084 2118 2138 2148 2173
Symbol 2012 GraphicUsed by:2036
Symbol 2013 GraphicUsed by:2014 2305
Symbol 2014 MovieClipUses:2013Used by:2030 2036 2074 2084 2118 2138 2148 2173
Symbol 2015 GraphicUsed by:2016 2306
Symbol 2016 MovieClipUses:2015Used by:2030 2036 2074 2084 2138 2148
Symbol 2017 GraphicUsed by:2018
Symbol 2018 MovieClipUses:2017Used by:2030 2036 2074 2084 2138 2148
Symbol 2019 GraphicUsed by:2020 2309
Symbol 2020 MovieClipUses:2019Used by:2030 2036 2074 2084 2138 2148
Symbol 2021 GraphicUsed by:2036 2138 2148 2322
Symbol 2022 MovieClipUses:120Used by:2030 2036 2074 2084 2118 2138 2148 2173
Symbol 2023 GraphicUsed by:2036
Symbol 2024 GraphicUsed by:2036
Symbol 2025 GraphicUsed by:2036
Symbol 2026 GraphicUsed by:2036 2322
Symbol 2027 GraphicUsed by:2036
Symbol 2028 GraphicUsed by:2030 2316
Symbol 2029 GraphicUsed by:2030 2316
Symbol 2030 MovieClipUses:2011 2014 2016 2018 2020 2028 2022 2029 2005Used by:2036
Symbol 2031 GraphicUsed by:2036
Symbol 2032 GraphicUsed by:2036
Symbol 2033 GraphicUsed by:2036
Symbol 2034 GraphicUsed by:2036
Symbol 2035 GraphicUsed by:2036
Symbol 2036 MovieClipUses:2011 2012 2014 2016 2018 2020 2021 2022 2023 2024 2025 2026 2027 2030 2031 2032 2033 2034 2035Used by:2174
Symbol 2037 GraphicUsed by:2047
Symbol 2038 GraphicUsed by:2047
Symbol 2039 GraphicUsed by:2047
Symbol 2040 GraphicUsed by:2047
Symbol 2041 GraphicUsed by:2047
Symbol 2042 GraphicUsed by:2047
Symbol 2043 GraphicUsed by:2047
Symbol 2044 GraphicUsed by:2047
Symbol 2045 GraphicUsed by:2047
Symbol 2046 GraphicUsed by:2047
Symbol 2047 MovieClipUses:1991 1992 1993 1994 1996 1997 2009 1999 2005 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046Used by:2174
Symbol 2048 GraphicUsed by:2074
Symbol 2049 GraphicUsed by:2074 2084
Symbol 2050 GraphicUsed by:2074 2084
Symbol 2051 GraphicUsed by:2074
Symbol 2052 GraphicUsed by:2053
Symbol 2053 MovieClipUses:2052Used by:2074 2084 2138 2148
Symbol 2054 GraphicUsed by:2074 2084
Symbol 2055 GraphicUsed by:2074 2084
Symbol 2056 GraphicUsed by:2074 2084
Symbol 2057 GraphicUsed by:2058
Symbol 2058 MovieClipUses:2057Used by:2074 2084 2118 2138 2148 2173
Symbol 2059 GraphicUsed by:2074 2084
Symbol 2060 GraphicUsed by:2074
Symbol 2061 GraphicUsed by:2074
Symbol 2062 GraphicUsed by:2063
Symbol 2063 MovieClipUses:2062Used by:2074 2084 2118 2138 2148 2173
Symbol 2064 GraphicUsed by:2074 2084
Symbol 2065 GraphicUsed by:2074 2084
Symbol 2066 GraphicUsed by:2074
Symbol 2067 GraphicUsed by:2074 2084
Symbol 2068 GraphicUsed by:2074
Symbol 2069 GraphicUsed by:2074
Symbol 2070 GraphicUsed by:2074 2084
Symbol 2071 GraphicUsed by:2074
Symbol 2072 GraphicUsed by:2074
Symbol 2073 GraphicUsed by:2074 2084
Symbol 2074 MovieClipUses:2011 2048 2014 2016 2018 2020 2049 2022 2050 2051 2053 2054 2055 2056 2058 2059 2060 2061 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073Used by:2174
Symbol 2075 GraphicUsed by:2084
Symbol 2076 GraphicUsed by:2084
Symbol 2077 GraphicUsed by:2084
Symbol 2078 GraphicUsed by:2084
Symbol 2079 GraphicUsed by:2084
Symbol 2080 GraphicUsed by:2084
Symbol 2081 GraphicUsed by:2084
Symbol 2082 GraphicUsed by:2084
Symbol 2083 GraphicUsed by:2084
Symbol 2084 MovieClipUses:2011 2075 2014 2020 2022 2076 2058 2063 2073 2077 2078 2070 2065 2079 2067 2080 2081 2064 2055 2056 2053 2059 2050 2018 2082 2054 2083 2016 2049Used by:2174
Symbol 2085 GraphicUsed by:2118
Symbol 2086 GraphicUsed by:2118
Symbol 2087 GraphicUsed by:2118
Symbol 2088 GraphicUsed by:2093
Symbol 2089 GraphicUsed by:2093
Symbol 2090 GraphicUsed by:2093
Symbol 2091 GraphicUsed by:2093
Symbol 2092 GraphicUsed by:2093
Symbol 2093 MovieClip {BridgeCraft_CS3_Viral_fla.svet_morgaet_2_571}Uses:2088 2089 2090 2091 2092Used by:2118 2173
Symbol 2094 GraphicUsed by:2118
Symbol 2095 GraphicUsed by:2118
Symbol 2096 GraphicUsed by:2118
Symbol 2097 GraphicUsed by:2118
Symbol 2098 GraphicUsed by:2118
Symbol 2099 GraphicUsed by:2118
Symbol 2100 GraphicUsed by:2118
Symbol 2101 GraphicUsed by:2118
Symbol 2102 GraphicUsed by:2118
Symbol 2103 GraphicUsed by:2118
Symbol 2104 GraphicUsed by:2118
Symbol 2105 GraphicUsed by:2118
Symbol 2106 GraphicUsed by:2118
Symbol 2107 GraphicUsed by:2118
Symbol 2108 GraphicUsed by:2118
Symbol 2109 GraphicUsed by:2118
Symbol 2110 GraphicUsed by:2118
Symbol 2111 GraphicUsed by:2118
Symbol 2112 GraphicUsed by:2118
Symbol 2113 GraphicUsed by:2118
Symbol 2114 GraphicUsed by:2118
Symbol 2115 GraphicUsed by:2118
Symbol 2116 GraphicUsed by:2118
Symbol 2117 GraphicUsed by:2118
Symbol 2118 MovieClipUses:2011 2085 2014 2022 2058 2086 2063 2087 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117Used by:2174
Symbol 2119 GraphicUsed by:2138
Symbol 2120 GraphicUsed by:2138
Symbol 2121 GraphicUsed by:2138 2148
Symbol 2122 GraphicUsed by:2138 2148
Symbol 2123 GraphicUsed by:2138 2148
Symbol 2124 GraphicUsed by:2138
Symbol 2125 GraphicUsed by:2138 2148
Symbol 2126 GraphicUsed by:2138 2148
Symbol 2127 GraphicUsed by:2138
Symbol 2128 GraphicUsed by:2138 2148
Symbol 2129 GraphicUsed by:2138 2148
Symbol 2130 GraphicUsed by:2138
Symbol 2131 GraphicUsed by:2138 2148
Symbol 2132 GraphicUsed by:2138
Symbol 2133 GraphicUsed by:2138
Symbol 2134 GraphicUsed by:2138 2148
Symbol 2135 GraphicUsed by:2138
Symbol 2136 GraphicUsed by:2138
Symbol 2137 GraphicUsed by:2138 2148
Symbol 2138 MovieClipUses:2011 2119 2014 2016 2018 2020 2021 2022 2120 2121 2053 2122 2123 2124 2058 2125 2126 2127 2063 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137Used by:2174
Symbol 2139 GraphicUsed by:2148
Symbol 2140 GraphicUsed by:2148
Symbol 2141 GraphicUsed by:2148
Symbol 2142 GraphicUsed by:2148
Symbol 2143 GraphicUsed by:2148
Symbol 2144 GraphicUsed by:2148
Symbol 2145 GraphicUsed by:2148
Symbol 2146 GraphicUsed by:2148
Symbol 2147 GraphicUsed by:2148
Symbol 2148 MovieClipUses:2011 2139 2014 2020 2022 2140 2058 2063 2137 2141 2142 2134 2129 2143 2131 2126 2144 2128 2123 2145 2053 2125 2146 2018 2121 2122 2147 2016 2021Used by:2174
Symbol 2149 GraphicUsed by:2173
Symbol 2150 GraphicUsed by:2173
Symbol 2151 GraphicUsed by:2173
Symbol 2152 GraphicUsed by:2173
Symbol 2153 GraphicUsed by:2173
Symbol 2154 GraphicUsed by:2173
Symbol 2155 GraphicUsed by:2173
Symbol 2156 GraphicUsed by:2173
Symbol 2157 GraphicUsed by:2173
Symbol 2158 GraphicUsed by:2173
Symbol 2159 GraphicUsed by:2173
Symbol 2160 GraphicUsed by:2173
Symbol 2161 GraphicUsed by:2173
Symbol 2162 GraphicUsed by:2173
Symbol 2163 GraphicUsed by:2173
Symbol 2164 GraphicUsed by:2173
Symbol 2165 GraphicUsed by:2173
Symbol 2166 GraphicUsed by:2173
Symbol 2167 GraphicUsed by:2173
Symbol 2168 GraphicUsed by:2173
Symbol 2169 GraphicUsed by:2173
Symbol 2170 GraphicUsed by:2173
Symbol 2171 GraphicUsed by:2173
Symbol 2172 GraphicUsed by:2173
Symbol 2173 MovieClipUses:2011 2149 2014 2022 2058 2150 2063 2151 2093 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172Used by:2174
Symbol 2174 MovieClip {characters.Sinyak}Uses:2006 2010 2036 2047 2074 2084 2118 2138 2148 2173Used by:2503
Symbol 2175 GraphicUsed by:2176
Symbol 2176 MovieClip {vis.Fader}Uses:2175Used by:2503
Symbol 2177 GraphicUsed by:2181 2185
Symbol 2178 GraphicUsed by:2181
Symbol 2179 GraphicUsed by:2181
Symbol 2180 GraphicUsed by:2181
Symbol 2181 ButtonUses:2177 2178 2179 2180Used by:2196
Symbol 2182 GraphicUsed by:2185
Symbol 2183 GraphicUsed by:2185
Symbol 2184 GraphicUsed by:2185
Symbol 2185 ButtonUses:2177 2182 2183 2184Used by:2196
Symbol 2186 GraphicUsed by:2187
Symbol 2187 MovieClipUses:2186Used by:2196
Symbol 2188 GraphicUsed by:2192
Symbol 2189 GraphicUsed by:2192
Symbol 2190 GraphicUsed by:2192
Symbol 2191 GraphicUsed by:2192
Symbol 2192 ButtonUses:2188 2189 2190 2191Used by:2196
Symbol 2193 GraphicUsed by:2194
Symbol 2194 MovieClipUses:2193Used by:2195
Symbol 2195 MovieClip {IslandTextWS}Uses:2194Used by:2196
Symbol 2196 MovieClip {menu.InGameMenu}Uses:1141 2181 2185 2187 2192 1151 2195Used by:2503
Symbol 2197 GraphicUsed by:2212
Symbol 2198 TextUses:179Used by:2201
Symbol 2199 BitmapUsed by:2200
Symbol 2200 GraphicUses:2199Used by:2201
Symbol 2201 MovieClipUses:2198 2200Used by:2212
Symbol 2202 TextUses:193Used by:2203
Symbol 2203 ButtonUses:192 2202 204 191 197Used by:2212 2447
Symbol 2204 TextUses:179Used by:2207
Symbol 2205 BitmapUsed by:2206
Symbol 2206 GraphicUses:2205Used by:2207
Symbol 2207 MovieClipUses:2204 2206Used by:2212
Symbol 2208 TextUses:179Used by:2211
Symbol 2209 BitmapUsed by:2210
Symbol 2210 GraphicUses:2209Used by:2211
Symbol 2211 MovieClipUses:2208 2210Used by:2212
Symbol 2212 MovieClip {core.IntroWhite}Uses:478 2197 2201 2203 205 2207 2211Used by:2503
Symbol 2213 VideoUsed by:2214 2215
Symbol 2214 MovieClip {help.BuildClip}Uses:2213Used by:2503
Symbol 2215 MovieClip {help.DeleteClip}Uses:2213Used by:2503
Symbol 2216 VideoUsed by:2217
Symbol 2217 MovieClip {help.ScrollClip}Uses:2216 SS1Used by:2503
Symbol 2218 TextUses:179Used by:2324
Symbol 2219 GraphicUsed by:2324
Symbol 2220 BitmapUsed by:2221
Symbol 2221 GraphicUses:2220Used by:2323
Symbol 2222 GraphicUsed by:2253
Symbol 2223 MovieClipUses:120Used by:2236 2242 2246 2253
Symbol 2224 MovieClipUses:437Used by:2242 2246 2253
Symbol 2225 MovieClipUses:439Used by:2242 2246 2253
Symbol 2226 GraphicUsed by:2253
Symbol 2227 GraphicUsed by:2253
Symbol 2228 GraphicUsed by:2253
Symbol 2229 GraphicUsed by:2253
Symbol 2230 GraphicUsed by:2253
Symbol 2231 GraphicUsed by:2242
Symbol 2232 GraphicUsed by:2233
Symbol 2233 MovieClipUses:2232Used by:2242 2246
Symbol 2234 MovieClipUses:1389Used by:2242 2246
Symbol 2235 GraphicUsed by:2236
Symbol 2236 MovieClipUses:1373 2223 1374 2235 1376 1377Used by:2242
Symbol 2237 GraphicUsed by:2238
Symbol 2238 MovieClipUses:2237Used by:2242 2246
Symbol 2239 GraphicUsed by:2242 2246
Symbol 2240 GraphicUsed by:2242 2246
Symbol 2241 GraphicUsed by:2242 2246
Symbol 2242 MovieClip {BridgeCraft_CS3_Viral_fla.cvetok_cvetok_prijok4_599}Uses:2224 2225 2231 2223 2233 2234 2236 2238 2239 2240 2241Used by:2253
Symbol 2243 GraphicUsed by:2246
Symbol 2244 GraphicUsed by:2246
Symbol 2245 GraphicUsed by:2246
Symbol 2246 MovieClip {BridgeCraft_CS3_Viral_fla.cvetok_cvetok_prijok44_604}Uses:2224 2225 2241 2223 2233 2234 2238 2243 2240 2244 2245 2239Used by:2253
Symbol 2247 GraphicUsed by:2253
Symbol 2248 GraphicUsed by:2253
Symbol 2249 GraphicUsed by:2253
Symbol 2250 GraphicUsed by:2253
Symbol 2251 GraphicUsed by:2253
Symbol 2252 GraphicUsed by:2253
Symbol 2253 MovieClipUses:2222 2223 1408 2224 2225 2226 2227 2228 2229 2230 2242 2246 2247 2248 2249 2250 2251 2252Used by:2323
Symbol 2254 MovieClipUses:160Used by:2263 2264
Symbol 2255 MovieClipUses:141Used by:2263 2264
Symbol 2256 MovieClipUses:112Used by:2263 2264
Symbol 2257 MovieClipUses:162Used by:2263 2264
Symbol 2258 GraphicUsed by:2264
Symbol 2259 MovieClipUses:120Used by:2261 2262 2264
Symbol 2260 GraphicUsed by:2262
Symbol 2261 MovieClipUses:1553 2259 1554 1555 1556 1557Used by:2262
Symbol 2262 MovieClipUses:2260 2259 2261Used by:2263 2264
Symbol 2263 MovieClipUses:2254 2255 2256 2257 2262Used by:2264
Symbol 2264 MovieClipUses:2254 2255 2256 2257 2258 2259 2262 2263Used by:2323
Symbol 2265 MovieClipUses:425Used by:2281 2287
Symbol 2266 GraphicUsed by:2267
Symbol 2267 MovieClipUses:2266Used by:2281 2287
Symbol 2268 GraphicUsed by:2269
Symbol 2269 MovieClipUses:2268Used by:2281 2287
Symbol 2270 GraphicUsed by:2271
Symbol 2271 MovieClipUses:2270Used by:2281 2287
Symbol 2272 GraphicUsed by:2287
Symbol 2273 MovieClipUses:120Used by:2280 2281 2287
Symbol 2274 GraphicUsed by:2287
Symbol 2275 GraphicUsed by:2287
Symbol 2276 GraphicUsed by:2287
Symbol 2277 GraphicUsed by:2287
Symbol 2278 GraphicUsed by:2281
Symbol 2279 GraphicUsed by:2280
Symbol 2280 MovieClipUses:1684 2273 1685 1686 1687 2279Used by:2281
Symbol 2281 MovieClipUses:2265 2267 2269 2271 2278 2273 2280Used by:2287
Symbol 2282 GraphicUsed by:2287
Symbol 2283 GraphicUsed by:2287
Symbol 2284 GraphicUsed by:2287
Symbol 2285 GraphicUsed by:2287
Symbol 2286 GraphicUsed by:2287
Symbol 2287 MovieClipUses:2265 2267 2269 2271 2272 2273 2274 2275 2276 2277 2281 2282 2283 2284 2285 2286Used by:2323
Symbol 2288 GraphicUsed by:2303
Symbol 2289 MovieClipUses:120Used by:2298 2303
Symbol 2290 GraphicUsed by:2303
Symbol 2291 GraphicUsed by:2303
Symbol 2292 GraphicUsed by:2303
Symbol 2293 GraphicUsed by:2298
Symbol 2294 GraphicUsed by:2298
Symbol 2295 GraphicUsed by:2298
Symbol 2296 MovieClipUses:429Used by:2298
Symbol 2297 GraphicUsed by:2298
Symbol 2298 MovieClipUses:2293 2289 1833 1834 2294 1836 1837 2295 1839 2296 1840 1841 1842 1843 1844 1845 1846 2297Used by:2303
Symbol 2299 GraphicUsed by:2303
Symbol 2300 GraphicUsed by:2303
Symbol 2301 GraphicUsed by:2303
Symbol 2302 GraphicUsed by:2303
Symbol 2303 MovieClipUses:2288 2289 2290 2291 2292 2298 2299 2300 2301 2302Used by:2323
Symbol 2304 GraphicUsed by:2322
Symbol 2305 MovieClipUses:2013Used by:2316 2322
Symbol 2306 MovieClipUses:2015Used by:2316 2322
Symbol 2307 GraphicUsed by:2308
Symbol 2308 MovieClipUses:2307Used by:2316 2322
Symbol 2309 MovieClipUses:2019Used by:2316 2322
Symbol 2310 MovieClipUses:120Used by:2316 2322
Symbol 2311 GraphicUsed by:2322
Symbol 2312 GraphicUsed by:2322
Symbol 2313 GraphicUsed by:2322
Symbol 2314 GraphicUsed by:2322
Symbol 2315 MovieClipUses:2000 2001 2002 2003 2004Used by:2316
Symbol 2316 MovieClipUses:2305 2306 2308 2309 2028 2310 2029 2315Used by:2322
Symbol 2317 GraphicUsed by:2322
Symbol 2318 GraphicUsed by:2322
Symbol 2319 GraphicUsed by:2322
Symbol 2320 GraphicUsed by:2322
Symbol 2321 GraphicUsed by:2322
Symbol 2322 MovieClipUses:2304 2305 2306 2308 2309 2021 2310 2311 2312 2313 2026 2314 2316 2317 2318 2319 2320 2321Used by:2323
Symbol 2323 MovieClipUses:2221 2253 2264 2287 2303 2322Used by:2324
Symbol 2324 MovieClip {core.Outro}Uses:478 2218 2219 2323 1279Used by:2503
Symbol 2325 GraphicUsed by:2358 2400
Symbol 2326 GraphicUsed by:2357
Symbol 2327 GraphicUsed by:2328
Symbol 2328 MovieClipUses:2327Used by:2357
Symbol 2329 GraphicUsed by:2357
Symbol 2330 GraphicUsed by:2331
Symbol 2331 MovieClipUses:2330Used by:2357
Symbol 2332 GraphicUsed by:2357
Symbol 2333 GraphicUsed by:2334
Symbol 2334 MovieClipUses:2333Used by:2357
Symbol 2335 GraphicUsed by:2357
Symbol 2336 GraphicUsed by:2337
Symbol 2337 MovieClipUses:2336Used by:2357
Symbol 2338 GraphicUsed by:2357
Symbol 2339 GraphicUsed by:2340
Symbol 2340 MovieClipUses:2339Used by:2357
Symbol 2341 GraphicUsed by:2342
Symbol 2342 MovieClipUses:2341Used by:2357
Symbol 2343 GraphicUsed by:2357
Symbol 2344 GraphicUsed by:2345
Symbol 2345 MovieClipUses:2344Used by:2357
Symbol 2346 GraphicUsed by:2347
Symbol 2347 MovieClipUses:2346Used by:2357
Symbol 2348 GraphicUsed by:2357
Symbol 2349 GraphicUsed by:2350
Symbol 2350 MovieClipUses:2349Used by:2357
Symbol 2351 GraphicUsed by:2357
Symbol 2352 GraphicUsed by:2353
Symbol 2353 MovieClipUses:2352Used by:2357
Symbol 2354 GraphicUsed by:2357
Symbol 2355 GraphicUsed by:2356
Symbol 2356 MovieClipUses:2355Used by:2357
Symbol 2357 MovieClipUses:2326 2328 2329 2331 2332 2334 2335 2337 2338 2340 2342 2343 2345 2347 2348 2350 2351 2353 2354 2356Used by:2358
Symbol 2358 MovieClip {core.OurLogo}Uses:2325 2357Used by:2503
Symbol 2359 GraphicUsed by:2399
Symbol 2360 GraphicUsed by:2361
Symbol 2361 MovieClipUses:2360Used by:2399
Symbol 2362 GraphicUsed by:2399
Symbol 2363 GraphicUsed by:2364
Symbol 2364 MovieClipUses:2363Used by:2399
Symbol 2365 GraphicUsed by:2399
Symbol 2366 GraphicUsed by:2367
Symbol 2367 MovieClipUses:2366Used by:2399
Symbol 2368 GraphicUsed by:2399
Symbol 2369 GraphicUsed by:2370
Symbol 2370 MovieClipUses:2369Used by:2399
Symbol 2371 GraphicUsed by:2399
Symbol 2372 GraphicUsed by:2373
Symbol 2373 MovieClipUses:2372Used by:2399
Symbol 2374 GraphicUsed by:2399
Symbol 2375 GraphicUsed by:2376
Symbol 2376 MovieClipUses:2375Used by:2399
Symbol 2377 GraphicUsed by:2399
Symbol 2378 GraphicUsed by:2379
Symbol 2379 MovieClipUses:2378Used by:2399
Symbol 2380 GraphicUsed by:2399
Symbol 2381 GraphicUsed by:2382
Symbol 2382 MovieClipUses:2381Used by:2399
Symbol 2383 GraphicUsed by:2399
Symbol 2384 GraphicUsed by:2385
Symbol 2385 MovieClipUses:2384Used by:2399
Symbol 2386 GraphicUsed by:2399
Symbol 2387 GraphicUsed by:2388
Symbol 2388 MovieClipUses:2387Used by:2399
Symbol 2389 GraphicUsed by:2390
Symbol 2390 MovieClipUses:2389Used by:2399
Symbol 2391 GraphicUsed by:2399
Symbol 2392 GraphicUsed by:2393
Symbol 2393 MovieClipUses:2392Used by:2399
Symbol 2394 GraphicUsed by:2395
Symbol 2395 MovieClipUses:2394Used by:2399
Symbol 2396 GraphicUsed by:2399
Symbol 2397 GraphicUsed by:2398
Symbol 2398 MovieClipUses:2397Used by:2399
Symbol 2399 MovieClipUses:2359 2361 2362 2364 2365 2367 2368 2370 2371 2373 2374 2376 2377 2379 2380 2382 2383 2385 2386 2388 2390 2391 2393 2395 2396 2398Used by:2400
Symbol 2400 MovieClip {core.TheirLogo}Uses:2325 2399Used by:2503
Symbol 2401 Sound {frogs.wav}Used by:2503
Symbol 2402 Sound {thunder.wav}Used by:2503
Symbol 2403 GraphicUsed by:2404
Symbol 2404 MovieClipUses:2403Used by:2423
Symbol 2405 GraphicUsed by:2406
Symbol 2406 MovieClipUses:2405Used by:2423
Symbol 2407 GraphicUsed by:2408
Symbol 2408 MovieClipUses:2407Used by:2423
Symbol 2409 GraphicUsed by:2410
Symbol 2410 MovieClipUses:2409Used by:2423
Symbol 2411 GraphicUsed by:2412
Symbol 2412 MovieClipUses:2411Used by:2423
Symbol 2413 GraphicUsed by:2414
Symbol 2414 MovieClipUses:2413Used by:2423
Symbol 2415 GraphicUsed by:2416
Symbol 2416 MovieClipUses:2415Used by:2423
Symbol 2417 GraphicUsed by:2418
Symbol 2418 MovieClipUses:2417Used by:2423
Symbol 2419 GraphicUsed by:2420
Symbol 2420 MovieClipUses:2419Used by:2423
Symbol 2421 GraphicUsed by:2422
Symbol 2422 MovieClipUses:2421Used by:2423
Symbol 2423 MovieClip {core.Digit}Uses:2404 2406 2408 2410 2412 2414 2416 2418 2420 2422Used by:2503
Symbol 2424 GraphicUsed by:2428 2429
Symbol 2425 BitmapUsed by:2426
Symbol 2426 GraphicUses:2425Used by:2427
Symbol 2427 ButtonUses:2426Used by:2428 2429
Symbol 2428 MovieClip {BridgeCraft_CS3_Viral_fla.logo_696}Uses:2424 2427Used by:2429
Symbol 2429 MovieClip {core.PicasoLogoLite}Uses:2424 2427 2428Used by:2503
Symbol 2430 GraphicUsed by:2431
Symbol 2431 MovieClip {vis.RoadSign}Uses:2430Used by:2503
Symbol 2432 Sound {bird1.wav}Used by:2503
Symbol 2433 Sound {bird2.wav}Used by:2503
Symbol 2434 Sound {bird3.wav}Used by:2503
Symbol 2435 Sound {bird4.wav}Used by:2503
Symbol 2436 Sound {story_victory.wav}Used by:2503
Symbol 2437 TextUses:193Used by:2438 2440
Symbol 2438 MovieClipUses:2437Used by:2440
Symbol 2439 TextUses:193Used by:2440
Symbol 2440 ButtonUses:1265 2438 2439 198 191 197 2437Used by:2447
Symbol 2441 TextUses:193Used by:2443
Symbol 2442 TextUses:193Used by:2443
Symbol 2443 ButtonUses:209 2441 2442 212 200 197Used by:2447
Symbol 2444 TextUses:179Used by:2447
Symbol 2445 TextUses:179Used by:2447
Symbol 2446 TextUses:179Used by:2447
Symbol 2447 MovieClip {core.TestersPopUp}Uses:1273 2440 2443 2203 2444 2445 2446Used by:2503
Symbol 2448 GraphicUsed by:2449 2453
Symbol 2449 MovieClipUses:2448Used by:2453
Symbol 2450 TextUses:193Used by:2453
Symbol 2451 TextUses:193Used by:2453
Symbol 2452 MovieClipUses:1288Used by:2453
Symbol 2453 Button {core.ContactUsButton}Uses:2449 2450 2451 2452 2448 1288Used by:2503
Symbol 2454 GraphicUsed by:2455
Symbol 2455 MovieClipUses:2454Used by:2479
Symbol 2456 MovieClipUses:191Used by:2459
Symbol 2457 TextUses:193Used by:2458 2459
Symbol 2458 MovieClipUses:2457Used by:2459
Symbol 2459 ButtonUses:2456 2458 1278 1265 198 191 2457 197Used by:2479
Symbol 2460 TextUses:193Used by:2463
Symbol 2461 TextUses:193Used by:2463
Symbol 2462 TextUses:193Used by:2463
Symbol 2463 ButtonUses:192 2460 2461 204 2462 191 197Used by:2479
Symbol 2464 TextUses:193Used by:2466
Symbol 2465 TextUses:193Used by:2466
Symbol 2466 ButtonUses:201 2464 2465 204 200 197Used by:2479
Symbol 2467 GraphicUsed by:2470
Symbol 2468 FontUsed by:2469 2472
Symbol 2469 TextUses:2468Used by:2470
Symbol 2470 ButtonUses:2467 2469Used by:2479
Symbol 2471 GraphicUsed by:2473
Symbol 2472 TextUses:2468Used by:2473
Symbol 2473 ButtonUses:2471 2472Used by:2479
Symbol 2474 TextUses:179Used by:2479
Symbol 2475 TextUses:179Used by:2479
Symbol 2476 GraphicUsed by:2477
Symbol 2477 MovieClipUses:1546 1547 1548 1549 1550 2476 1552Used by:2479
Symbol 2478 TextUses:179Used by:2479
Symbol 2479 MovieClip {core.ContactUsScreen}Uses:2455 2459 2463 2466 2470 2473 81 72 48 2474 2475 2477 86 2478Used by:2503
Symbol 2480 GraphicUsed by:2481 2484
Symbol 2481 MovieClipUses:2480Used by:2484
Symbol 2482 TextUses:193Used by:2484
Symbol 2483 TextUses:193Used by:2484
Symbol 2484 ButtonUses:2481 2482 2483 220 2480Used by:2490
Symbol 2485 EditableTextUses:179Used by:2490
Symbol 2486 EditableTextUses:193Used by:2490
Symbol 2487 TextUses:179Used by:2490
Symbol 2488 EditableTextUses:179Used by:2490
Symbol 2489 TextUses:179Used by:2490
Symbol 2490 MovieClip {core.OutroViral}Uses:478 488 2484 221 2485 2486 2487 2488 2489Used by:2503
Symbol 2491 GraphicUsed by:2492
Symbol 2492 MovieClipUses:2491Used by:2494
Symbol 2493 TextUses:193Used by:2494
Symbol 2494 MovieClip {vis.DotsBaloon}Uses:2492 2493Used by:2503
Symbol 2495 GraphicUsed by:2496
Symbol 2496 MovieClipUses:2495Used by:2498
Symbol 2497 EditableTextUses:179Used by:2498
Symbol 2498 MovieClip {vis.TalkBaloonAltInv}Uses:2496 199 205 208 213 2497Used by:2503
Symbol 2499 GraphicUsed by:2500
Symbol 2500 MovieClipUses:2499Used by:2502
Symbol 2501 EditableTextUses:179Used by:2502
Symbol 2502 MovieClip {vis.TalkBaloon}Uses:2500 199 205 1269 213 208 2501Used by:2503
Symbol 2503 MovieClip {BridgeCraft_CS3_Viral_fla.wrap_47}Uses:513 521 523 525 527 590 269 609 620 629 665 687 709 722 746 823 873 897 910 929 966 980 988 1051 1065 1099 1235 1244 1246 1254 1258 1262 1271 1280 1291 1310 1113 1312 1314 1316 104 1114 1120 1122 1124 1128 1130 1132 1322 1324 1326 1328 1330 1332 1334 1336 1118 1126 1338 1340 1237 1342 1344 1346 1356 1358 1360 1361 1363 1369 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1674 1805 1990 2174 215 2176 2196 2212 2214 2215 2217 2324 2358 2400 188 2401 2402 2423 2429 2431 2432 2433 2434 2435 2436 2447 105 221 2453 2479 2490 1257 9 2494 2498 2502Used by:Timeline
Streaming Sound 1Used by:Symbol 2217 MovieClip {help.ScrollClip}

Instance Names

"buttonUnderCS"Frame 1Symbol 417 Button
"csStinger"Frame 1Symbol 414 MovieClip {ViralStinger}
"whiteRect"Frame 1Symbol 418 MovieClip
"whiteBorder"Frame 1Symbol 420 MovieClip
"preLoaderBar"Frame 2Symbol 276 MovieClip {core.PreLoaderBar}
"steelConstractionMC"Symbol 9 MovieClip {vis.Hook} Frame 1Symbol 5 MovieClip
"hookMC"Symbol 9 MovieClip {vis.Hook} Frame 1Symbol 8 MovieClip
"maskMC"Symbol 86 MovieClip {BridgeCraft_CS3_Viral_fla.BaloonFromLoader_703} Frame 1Symbol 84 MovieClip
"maskMC"Symbol 90 MovieClip {BridgeCraft_CS3_Viral_fla.TextFromLoader_705} Frame 1Symbol 88 MovieClip
"baloonMC"Symbol 105 MovieClip {vis.LoaderScreen} Frame 1Symbol 86 MovieClip {BridgeCraft_CS3_Viral_fla.BaloonFromLoader_703}
"loadingMC"Symbol 105 MovieClip {vis.LoaderScreen} Frame 1Symbol 90 MovieClip {BridgeCraft_CS3_Viral_fla.TextFromLoader_705}
"redirectingMC"Symbol 105 MovieClip {vis.LoaderScreen} Frame 1Symbol 92 MovieClip
"nextBtn"Symbol 215 MovieClip {vis.TalkBaloonAlt} Frame 1Symbol 199 Button
"skipBtn"Symbol 215 MovieClip {vis.TalkBaloonAlt} Frame 1Symbol 205 Button
"yesBtn"Symbol 215 MovieClip {vis.TalkBaloonAlt} Frame 1Symbol 208 Button
"noBtn"Symbol 215 MovieClip {vis.TalkBaloonAlt} Frame 1Symbol 213 Button
"textfield"Symbol 215 MovieClip {vis.TalkBaloonAlt} Frame 1Symbol 214 EditableText
"progressLine"Symbol 276 MovieClip {core.PreLoaderBar} Frame 1Symbol 274 MovieClip
"closeButton"Symbol 513 MovieClip {menu.CreditsClass} Frame 1Symbol 488 Button {hud.HomeButton}
"menuButton"Symbol 590 MovieClip {core.HelpClass} Frame 1Symbol 533 Button
"nextButton"Symbol 590 MovieClip {core.HelpClass} Frame 1Symbol 534 Button
"backButton"Symbol 590 MovieClip {core.HelpClass} Frame 1Symbol 539 Button
"budgetBar"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 989 MovieClip
"budgetRedBG"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 991 MovieClip
"budgetText"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 992 EditableText
"startButton"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 998 Button {hud.StartButton}
"editButton"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1005 Button {hud.EditButton}
"zoomInButtonObject"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1006 Button {hud.ZoomInButton}
"zoomOutButtonObject"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1007 Button {hud.ZoomOutButton}
"ropeButton"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1016 MovieClip {hud.RopeButton}
"steelButton"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1022 MovieClip {hud.SteelButton}
"deckButton"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1030 MovieClip {hud.DeckButton}
"resetButton"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1039 Button {hud.ResetButton}
"undoButton"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1042 Button {hud.UndoButton}
"stressButton"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1045 MovieClip {hud.StressButton}
"pauseBtn"Symbol 1051 MovieClip {hud.HUD} Frame 1Symbol 1050 Button
"letterTF"Symbol 1061 MovieClip {hud.QualityButton} Frame 1Symbol 1060 EditableText
"musicBtn"Symbol 1065 MovieClip {hud.SoundPanel} Frame 1Symbol 1056 MovieClip {hud.MusicButton}
"soundsBtn"Symbol 1065 MovieClip {hud.SoundPanel} Frame 1Symbol 1059 MovieClip {hud.SoundsButton}
"qualityBtn"Symbol 1065 MovieClip {hud.SoundPanel} Frame 1Symbol 1061 MovieClip {hud.QualityButton}
"testersBtn"Symbol 1065 MovieClip {hud.SoundPanel} Frame 1Symbol 1064 Button
"quitSubmitBtn"Symbol 1099 MovieClip {map.MapClass} Frame 1Symbol 1074 Button
"introBtn"Symbol 1099 MovieClip {map.MapClass} Frame 1Symbol 1078 Button
"outroBtn"Symbol 1099 MovieClip {map.MapClass} Frame 1Symbol 1081 Button
"playBonusLevelsBtn"Symbol 1099 MovieClip {map.MapClass} Frame 1Symbol 221 Button {core.LinkToCS}
"scoreTF"Symbol 1099 MovieClip {map.MapClass} Frame 1Symbol 1082 EditableText
"nextButton"Symbol 1099 MovieClip {map.MapClass} Frame 1Symbol 1092 Button
"prevButton"Symbol 1099 MovieClip {map.MapClass} Frame 1Symbol 1098 Button
"closeButton"Symbol 1099 MovieClip {map.MapClass} Frame 1Symbol 533 Button
"helpButtonObj"Symbol 1235 MovieClip {menu.MenuClass} Frame 1Symbol 1141 Button {menu.HelpButton}
"creditsButtonObj"Symbol 1235 MovieClip {menu.MenuClass} Frame 1Symbol 1146 Button {menu.CreditsButton}
"quitButtonObj"Symbol 1235 MovieClip {menu.MenuClass} Frame 1Symbol 1151 Button
"playButtonObj"Symbol 1235 MovieClip {menu.MenuClass} Frame 1Symbol 1155 Button
"continueButtonObj"Symbol 1235 MovieClip {menu.MenuClass} Frame 1Symbol 1160 Button
"easyButtonObj"Symbol 1235 MovieClip {menu.MenuClass} Frame 1Symbol 1164 Button
"normalButtonObj"Symbol 1235 MovieClip {menu.MenuClass} Frame 1Symbol 1167 Button
"wtBtn"Symbol 1235 MovieClip {menu.MenuClass} Frame 1Symbol 1234 Button
"clip"Symbol 1262 MovieClip {vis.TutorialArrow} Frame 1Symbol 1261 MovieClip
"nextBtn"Symbol 1271 MovieClip {vis.TalkBaloonInv} Frame 1Symbol 199 Button
"skipBtn"Symbol 1271 MovieClip {vis.TalkBaloonInv} Frame 1Symbol 205 Button
"okBtn"Symbol 1271 MovieClip {vis.TalkBaloonInv} Frame 1Symbol 1269 Button
"yesBtn"Symbol 1271 MovieClip {vis.TalkBaloonInv} Frame 1Symbol 208 Button
"noBtn"Symbol 1271 MovieClip {vis.TalkBaloonInv} Frame 1Symbol 213 Button
"textfield"Symbol 1271 MovieClip {vis.TalkBaloonInv} Frame 1Symbol 1270 EditableText
"inputName"Symbol 1280 MovieClip {popup.BigPopUpInputName} Frame 1Symbol 1277 EditableText
"inputOk"Symbol 1280 MovieClip {popup.BigPopUpInputName} Frame 1Symbol 1279 Button {popup.PopUpButtonOk}
"btnNo"Symbol 1291 MovieClip {popup.BigPopUpLose} Frame 1Symbol 213 Button
"btnYes"Symbol 1291 MovieClip {popup.BigPopUpLose} Frame 1Symbol 208 Button
"btnSkip"Symbol 1291 MovieClip {popup.BigPopUpLose} Frame 1Symbol 1290 Button
"difficultyBG"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1294 MovieClip
"budgetBG"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1294 MovieClip
"scoreBG"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1294 MovieClip
"altScoreBG"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1294 MovieClip
"difficultyText"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1296 EditableText
"budgetText"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1297 EditableText
"scoreText"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1298 EditableText
"altScoreText"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1299 EditableText
"retryBtn"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1302 Button
"mapBtn"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1305 Button
"nextBtn"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1092 Button
"difficulty"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1306 EditableText
"budget"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1307 EditableText
"score"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1308 EditableText
"altScore"Symbol 1310 MovieClip {popup.BigPopUpWin} Frame 1Symbol 1309 EditableText
"bg"Symbol 1322 MovieClip {VolumeBarGFX} Frame 1Symbol 1319 MovieClip
"slider"Symbol 1322 MovieClip {VolumeBarGFX} Frame 1Symbol 1321 MovieClip
"levelId"Symbol 1369 MovieClip {map.LevelSelectButton} Frame 1Symbol 1365 EditableText
"islandMC"Symbol 2195 MovieClip {IslandTextWS} Frame 1Symbol 2194 MovieClip
"help"Symbol 2196 MovieClip {menu.InGameMenu} Frame 1Symbol 1141 Button {menu.HelpButton}
"resume"Symbol 2196 MovieClip {menu.InGameMenu} Frame 1Symbol 2181 Button
"map"Symbol 2196 MovieClip {menu.InGameMenu} Frame 1Symbol 2185 Button
"line"Symbol 2196 MovieClip {menu.InGameMenu} Frame 1Symbol 2187 MovieClip
"menu"Symbol 2196 MovieClip {menu.InGameMenu} Frame 1Symbol 2192 Button
"quitSubmitBtn"Symbol 2196 MovieClip {menu.InGameMenu} Frame 1Symbol 1151 Button
"islandMC"Symbol 2196 MovieClip {menu.InGameMenu} Frame 1Symbol 2195 MovieClip {IslandTextWS}
"nextButton"Symbol 2212 MovieClip {core.IntroWhite} Frame 1Symbol 2203 Button
"skipButton"Symbol 2212 MovieClip {core.IntroWhite} Frame 1Symbol 205 Button
"btnOk"Symbol 2324 MovieClip {core.Outro} Frame 1Symbol 1279 Button {popup.PopUpButtonOk}
"logobutton"Symbol 2428 MovieClip {BridgeCraft_CS3_Viral_fla.logo_696} Frame 1Symbol 2427 Button
"logobutton"Symbol 2429 MovieClip {core.PicasoLogoLite} Frame 1Symbol 2427 Button
"logobutton"Symbol 2429 MovieClip {core.PicasoLogoLite} Frame 21Symbol 2427 Button
"saveAndCloseBtn"Symbol 2447 MovieClip {core.TestersPopUp} Frame 1Symbol 2440 Button
"resetBtn"Symbol 2447 MovieClip {core.TestersPopUp} Frame 1Symbol 2443 Button
"nextBtn"Symbol 2447 MovieClip {core.TestersPopUp} Frame 1Symbol 2203 Button
"okBtn"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 2459 Button
"sendBtn"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 2463 Button
"backBtn"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 2466 Button
"btn1"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 2470 Button
"btn2"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 2473 Button
"topicCB"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 81 MovieClip {fl.controls.ComboBox}
"nameTI"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 72 MovieClip {fl.controls.TextInput}
"messageTA"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 48 MovieClip {fl.controls.TextArea}
"emailTI"Symbol 2479 MovieClip {core.ContactUsScreen} Frame 1Symbol 72 MovieClip {fl.controls.TextInput}
"btnOk"Symbol 2490 MovieClip {core.OutroViral} Frame 1Symbol 488 Button {hud.HomeButton}
"quitSubmitBtn"Symbol 2490 MovieClip {core.OutroViral} Frame 1Symbol 2484 Button
"playBonusLevelsBtn"Symbol 2490 MovieClip {core.OutroViral} Frame 1Symbol 221 Button {core.LinkToCS}
"bcwLink"Symbol 2490 MovieClip {core.OutroViral} Frame 1Symbol 2485 EditableText
"titleTF"Symbol 2490 MovieClip {core.OutroViral} Frame 1Symbol 2486 EditableText
"csLink"Symbol 2490 MovieClip {core.OutroViral} Frame 1Symbol 2488 EditableText
"nextBtn"Symbol 2498 MovieClip {vis.TalkBaloonAltInv} Frame 1Symbol 199 Button
"skipBtn"Symbol 2498 MovieClip {vis.TalkBaloonAltInv} Frame 1Symbol 205 Button
"yesBtn"Symbol 2498 MovieClip {vis.TalkBaloonAltInv} Frame 1Symbol 208 Button
"noBtn"Symbol 2498 MovieClip {vis.TalkBaloonAltInv} Frame 1Symbol 213 Button
"textfield"Symbol 2498 MovieClip {vis.TalkBaloonAltInv} Frame 1Symbol 2497 EditableText
"nextBtn"Symbol 2502 MovieClip {vis.TalkBaloon} Frame 1Symbol 199 Button
"skipBtn"Symbol 2502 MovieClip {vis.TalkBaloon} Frame 1Symbol 205 Button
"okBtn"Symbol 2502 MovieClip {vis.TalkBaloon} Frame 1Symbol 1269 Button
"noBtn"Symbol 2502 MovieClip {vis.TalkBaloon} Frame 1Symbol 213 Button
"yesBtn"Symbol 2502 MovieClip {vis.TalkBaloon} Frame 1Symbol 208 Button
"textfield"Symbol 2502 MovieClip {vis.TalkBaloon} Frame 1Symbol 2501 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.
Protect (24)Timeline Frame 131 bytes "..$1$4Z$yWUMhdYI7/a8QgxCLeZih0."




http://swfchan.com/41/204688/info.shtml
Created: 10/10 -2018 15:19:45 Last modified: 10/10 -2018 15:19:45 Server time: 15/11 -2024 15:03:44