Section 1
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var priority:int;
public var start:Number;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var name:String;
public var property:String;
public var nextNode:PropTween;
public var isPlugin:Boolean;
public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
if (_arg7){
_arg7.prevNode = this;
this.nextNode = _arg7;
};
this.priority = _arg8;
}
}
}//package com.greensock.core
Section 2
//SimpleTimeline (com.greensock.core.SimpleTimeline)
package com.greensock.core {
public class SimpleTimeline extends TweenCore {
public var autoRemoveChildren:Boolean;
protected var _lastChild:TweenCore;
protected var _firstChild:TweenCore;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local5:Number;
var _local6:TweenCore;
var _local4:TweenCore = _firstChild;
this.cachedTotalTime = _arg1;
this.cachedTime = _arg1;
while (_local4) {
_local6 = _local4.nextNode;
if (((_local4.active) || ((((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))) && (!(_local4.gc)))))){
if (!_local4.cachedReversed){
_local4.renderTime(((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local4.cacheIsDirty) ? _local4.totalDuration : _local4.cachedTotalDuration;
_local4.renderTime((_local5 - ((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale)), _arg2, false);
};
};
_local4 = _local6;
};
}
public function addChild(_arg1:TweenCore):void{
if (((!(_arg1.gc)) && (_arg1.timeline))){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
if (_firstChild){
_firstChild.prevNode = _arg1;
};
_arg1.nextNode = _firstChild;
_firstChild = _arg1;
_arg1.prevNode = null;
}
public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (((!(_arg1.gc)) && (!(_arg2)))){
_arg1.setEnabled(false, true);
};
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_lastChild == _arg1){
_lastChild = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_firstChild == _arg1){
_firstChild = _arg1.nextNode;
};
};
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
}
}//package com.greensock.core
Section 3
//TweenCore (com.greensock.core.TweenCore)
package com.greensock.core {
import com.greensock.*;
public class TweenCore {
public var initted:Boolean;
protected var _hasUpdate:Boolean;
public var active:Boolean;
protected var _delay:Number;
public var cachedTime:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
protected var _rawPrevTime:Number;// = -1
public var vars:Object;
public var cachedTotalTime:Number;
public var timeline:SimpleTimeline;
public var data;
public var cachedStartTime:Number;
public var prevNode:TweenCore;
public var cachedDuration:Number;
public var gc:Boolean;
protected var _pauseTime:Number;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var cachedTimeScale:Number;
public var cachedTotalDuration:Number;
public static const version:Number = 1.11;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
this.vars = ((_arg2) || ({}));
this.cachedDuration = (this.cachedTotalDuration = ((_arg1) || (0)));
_delay = ((this.vars.delay) || (0));
this.cachedTimeScale = ((this.vars.timeScale) || (1));
this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false)))));
this.cachedTotalTime = (this.cachedTime = 0);
this.data = this.vars.data;
if (!_classInitted){
if (isNaN(TweenLite.rootFrame)){
TweenLite.initClass();
_classInitted = true;
} else {
return;
};
};
var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline;
this.cachedStartTime = (_local3.cachedTotalTime + _delay);
_local3.addChild(this);
if (this.vars.reversed){
this.cachedReversed = true;
};
if (this.vars.paused){
this.paused = true;
};
}
public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function get delay():Number{
return (_delay);
}
public function get duration():Number{
return (this.cachedDuration);
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
public function set startTime(_arg1:Number):void{
var _local2:Boolean = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc)))));
this.cachedStartTime = _arg1;
if (_local2){
this.timeline.addChild(this);
};
}
public function set delay(_arg1:Number):void{
this.startTime = (this.startTime + (_arg1 - _delay));
_delay = _arg1;
}
public function resume():void{
this.paused = false;
}
public function get paused():Boolean{
return (this.cachedPaused);
}
public function play():void{
this.reversed = false;
this.paused = false;
}
public function set duration(_arg1:Number):void{
this.cachedDuration = (this.cachedTotalDuration = _arg1);
setDirtyCache(false);
}
public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (!_arg1){
renderTime(this.cachedTotalDuration, _arg2, false);
return;
};
if (this.timeline.autoRemoveChildren){
this.setEnabled(false, false);
} else {
this.active = false;
};
if (!_arg2){
if (((((this.vars.onComplete) && ((this.cachedTotalTime == this.cachedTotalDuration)))) && (!(this.cachedReversed)))){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
} else {
if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){
this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams);
};
};
};
}
public function invalidate():void{
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
public function get reversed():Boolean{
return (this.cachedReversed);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
public function reverse(_arg1:Boolean=true):void{
this.reversed = true;
if (_arg1){
this.paused = false;
} else {
if (this.gc){
this.setEnabled(true, false);
};
};
}
public function set paused(_arg1:Boolean):void{
if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){
if (_arg1){
_pauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime));
_pauseTime = NaN;
setDirtyCache(false);
};
this.cachedPaused = _arg1;
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
};
if (((!(_arg1)) && (this.gc))){
this.setTotalTime(this.cachedTotalTime, false);
this.setEnabled(true, false);
};
}
public function kill():void{
setEnabled(false, false);
}
public function set totalTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get currentTime():Number{
return (this.cachedTime);
}
protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
if (this.timeline){
_local3 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
if (this.cachedReversed){
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale));
} else {
this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale));
};
if (!this.timeline.cacheIsDirty){
setDirtyCache(false);
};
if (this.cachedTotalTime != _arg1){
renderTime(_arg1, _arg2, false);
};
};
}
public function pause():void{
this.paused = true;
}
public function set totalDuration(_arg1:Number):void{
this.duration = _arg1;
}
public function get totalDuration():Number{
return (this.cachedTotalDuration);
}
public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
if (_arg1 == this.gc){
if (_arg1){
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (!_arg2){
this.timeline.addChild(this);
};
} else {
this.active = false;
if (!_arg2){
this.timeline.remove(this, true);
};
};
this.gc = !(_arg1);
};
return (false);
}
}
}//package com.greensock.core
Section 4
//Back (com.greensock.easing.Back)
package com.greensock.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 * 0.5) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package com.greensock.easing
Section 5
//Elastic (com.greensock.easing.Elastic)
package com.greensock.easing {
public class Elastic {
private static const _2PI:Number = 6.28318530717959;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((((!(_arg5)) || ((((_arg3 > 0)) && ((_arg5 < _arg3)))))) || ((((_arg3 < 0)) && ((_arg5 < -(_arg3))))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((((!(_arg5)) || ((((_arg3 > 0)) && ((_arg5 < _arg3)))))) || ((((_arg3 < 0)) && ((_arg5 < -(_arg3))))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((((!(_arg5)) || ((((_arg3 > 0)) && ((_arg5 < _arg3)))))) || ((((_arg3 < 0)) && ((_arg5 < -(_arg3))))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) + _arg3) + _arg2));
}
}
}//package com.greensock.easing
Section 6
//TweenEvent (com.greensock.events.TweenEvent)
package com.greensock.events {
import flash.events.*;
public class TweenEvent extends Event {
public static const COMPLETE:String = "complete";
public static const START:String = "init";
public static const UPDATE:String = "change";
public static const REVERSE_COMPLETE:String = "reverseComplete";
public static const VERSION:Number = 1;
public static const REPEAT:String = "repeat";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new TweenEvent(this.type, this.bubbles, this.cancelable));
}
}
}//package com.greensock.events
Section 7
//AutoAlphaPlugin (com.greensock.plugins.AutoAlphaPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _target:Object;
protected var _ignoreVisible:Boolean;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_ignoreVisible = Boolean(("visible" in _arg1));
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (!_ignoreVisible){
_target.visible = Boolean(!((_target.alpha == 0)));
};
}
}
}//package com.greensock.plugins
Section 8
//BevelFilterPlugin (com.greensock.plugins.BevelFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.filters.*;
import com.greensock.*;
public class BevelFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["distance", "angle", "highlightColor", "highlightAlpha", "shadowColor", "shadowAlpha", "blurX", "blurY", "strength", "quality"];
public function BevelFilterPlugin(){
this.propName = "bevelFilter";
this.overwriteProps = ["bevelFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = BevelFilter;
initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2))), _propNames);
return (true);
}
}
}//package com.greensock.plugins
Section 9
//BezierPlugin (com.greensock.plugins.BezierPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.greensock.core.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orient:Boolean;
protected var _orientData:Array;
protected var _target:Object;
protected var _beziers:Object;
public static const API:Number = 1;
protected static const _RAD2DEG:Number = 57.2957795130823;
public function BezierPlugin(){
_future = {};
super();
this.propName = "bezier";
this.overwriteProps = [];
}
override public function killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local6:int;
var _local7:String;
var _local8:Object;
_target = _arg1.target;
var _local4:Object = ((_arg1.vars.isTV)==true) ? _arg1.vars.exposedVars : _arg1.vars;
if (_local4.orientToBezier == true){
_orientData = [["x", "y", "rotation", 0, 0.01]];
_orient = true;
} else {
if ((_local4.orientToBezier is Array)){
_orientData = _local4.orientToBezier;
_orient = true;
};
};
var _local5:Object = {};
_local6 = 0;
while (_local6 < _arg2.length) {
for (_local7 in _arg2[_local6]) {
if (_local5[_local7] == undefined){
_local5[_local7] = [_arg1.target[_local7]];
};
if (typeof(_arg2[_local6][_local7]) == "number"){
_local5[_local7].push(_arg2[_local6][_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_arg2[_local6][_local7])));
};
};
_local6++;
};
for (_local7 in _local5) {
this.overwriteProps[this.overwriteProps.length] = _local7;
if (_local4[_local7] != undefined){
if (typeof(_local4[_local7]) == "number"){
_local5[_local7].push(_local4[_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_local4[_local7])));
};
_local8 = {};
_local8[_local7] = true;
_arg1.killVars(_local8, false);
delete _local4[_local7];
};
};
_beziers = parseBeziers(_local5, _arg3);
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:String;
var _local4:Object;
var _local5:Number;
var _local6:uint;
var _local7:Number;
var _local8:Object;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
var _local13:Object;
var _local14:Boolean;
if (_arg1 == 1){
for (_local3 in _beziers) {
_local2 = (_beziers[_local3].length - 1);
_target[_local3] = _beziers[_local3][_local2][2];
};
} else {
for (_local3 in _beziers) {
_local6 = _beziers[_local3].length;
if (_arg1 < 0){
_local2 = 0;
} else {
if (_arg1 >= 1){
_local2 = (_local6 - 1);
} else {
_local2 = int((_local6 * _arg1));
};
};
_local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6);
_local4 = _beziers[_local3][_local2];
if (this.round){
_local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
_target[_local3] = ((_local7)>0) ? int((_local7 + 0.5)) : int((_local7 - 0.5));
} else {
_target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
};
};
};
if (_orient){
_local2 = _orientData.length;
_local8 = {};
while (_local2--) {
_local11 = _orientData[_local2];
_local8[_local11[0]] = _target[_local11[0]];
_local8[_local11[1]] = _target[_local11[1]];
};
_local13 = _target;
_local14 = this.round;
_target = _future;
this.round = false;
_orient = false;
_local2 = _orientData.length;
while (_local2--) {
_local11 = _orientData[_local2];
this.changeFactor = (_arg1 + ((_local11[4]) || (0.01)));
_local12 = ((_local11[3]) || (0));
_local9 = (_future[_local11[0]] - _local8[_local11[0]]);
_local10 = (_future[_local11[1]] - _local8[_local11[1]]);
_local13[_local11[2]] = ((Math.atan2(_local10, _local9) * _RAD2DEG) + _local12);
};
_target = _local13;
this.round = _local14;
_orient = true;
};
}
public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:int;
var _local4:Array;
var _local5:Object;
var _local6:String;
var _local7:Object = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]];
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]];
_local3++;
};
} else {
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)];
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)];
_local3++;
};
_local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]];
} else {
if (_local4.length == 3){
_local5[_local5.length] = [_local4[0], _local4[1], _local4[2]];
} else {
if (_local4.length == 2){
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
};
};
};
return (_local7);
}
}
}//package com.greensock.plugins
Section 10
//BezierThroughPlugin (com.greensock.plugins.BezierThroughPlugin)
package com.greensock.plugins {
import com.greensock.*;
public class BezierThroughPlugin extends BezierPlugin {
public static const API:Number = 1;
public function BezierThroughPlugin(){
this.propName = "bezierThrough";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), true);
return (true);
}
}
}//package com.greensock.plugins
Section 11
//BlurFilterPlugin (com.greensock.plugins.BlurFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.filters.*;
import com.greensock.*;
public class BlurFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["blurX", "blurY", "quality"];
public function BlurFilterPlugin(){
this.propName = "blurFilter";
this.overwriteProps = ["blurFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = BlurFilter;
initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2))), _propNames);
return (true);
}
}
}//package com.greensock.plugins
Section 12
//ColorMatrixFilterPlugin (com.greensock.plugins.ColorMatrixFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.filters.*;
import com.greensock.*;
public class ColorMatrixFilterPlugin extends FilterPlugin {
protected var _matrix:Array;
protected var _matrixTween:EndArrayPlugin;
public static const API:Number = 1;
private static var _propNames:Array = [];
protected static var _lumG:Number = 0.71516;
protected static var _lumR:Number = 0.212671;
protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
protected static var _lumB:Number = 0.072169;
public function ColorMatrixFilterPlugin(){
this.propName = "colorMatrixFilter";
this.overwriteProps = ["colorMatrixFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = ColorMatrixFilter;
var _local4:Object = _arg2;
initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice()), _propNames);
_matrix = ColorMatrixFilter(_filter).matrix;
var _local5:Array = [];
if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){
_local5 = _local4.matrix;
} else {
if (_local4.relative == true){
_local5 = _matrix.slice();
} else {
_local5 = _idMatrix.slice();
};
_local5 = setBrightness(_local5, _local4.brightness);
_local5 = setContrast(_local5, _local4.contrast);
_local5 = setHue(_local5, _local4.hue);
_local5 = setSaturation(_local5, _local4.saturation);
_local5 = setThreshold(_local5, _local4.threshold);
if (!isNaN(_local4.colorize)){
_local5 = colorize(_local5, _local4.colorize, _local4.amount);
};
};
_matrixTween = new EndArrayPlugin();
_matrixTween.init(_matrix, _local5);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Number = (1 - _arg2);
var _local4:Number = (_local3 * _lumR);
var _local5:Number = (_local3 * _lumG);
var _local6:Number = (_local3 * _lumB);
var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
var _local3:Number = Math.cos(_arg2);
var _local4:Number = Math.sin(_arg2);
var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
var _local3:Array = [];
var _local4:int;
var _local5:int;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF);
var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF);
var _local6:Number = ((_arg2 & 0xFF) / 0xFF);
var _local7:Number = (1 - _arg3);
var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
}
}//package com.greensock.plugins
Section 13
//ColorTransformPlugin (com.greensock.plugins.ColorTransformPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.geom.*;
public class ColorTransformPlugin extends TintPlugin {
public static const API:Number = 1;
public function ColorTransformPlugin(){
this.propName = "colorTransform";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local5:String;
var _local6:Number;
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = _arg1.transform.colorTransform;
for (_local5 in _arg2) {
if ((((_local5 == "tint")) || ((_local5 == "color")))){
if (_arg2[_local5] != null){
_local4.color = int(_arg2[_local5]);
};
} else {
if ((((((_local5 == "tintAmount")) || ((_local5 == "exposure")))) || ((_local5 == "brightness")))){
} else {
_local4[_local5] = _arg2[_local5];
};
};
};
if (!isNaN(_arg2.tintAmount)){
_local6 = (_arg2.tintAmount / (1 - (((_local4.redMultiplier + _local4.greenMultiplier) + _local4.blueMultiplier) / 3)));
_local4.redOffset = (_local4.redOffset * _local6);
_local4.greenOffset = (_local4.greenOffset * _local6);
_local4.blueOffset = (_local4.blueOffset * _local6);
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - _arg2.tintAmount)));
} else {
if (!isNaN(_arg2.exposure)){
_local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = (0xFF * (_arg2.exposure - 1))));
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = 1));
} else {
if (!isNaN(_arg2.brightness)){
_local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = Math.max(0, ((_arg2.brightness - 1) * 0xFF))));
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - Math.abs((_arg2.brightness - 1)))));
};
};
};
_ignoreAlpha = Boolean(((!((_arg3.vars.alpha == undefined))) && ((_arg2.alphaMultiplier == undefined))));
init((_arg1 as DisplayObject), _local4);
return (true);
}
}
}//package com.greensock.plugins
Section 14
//DropShadowFilterPlugin (com.greensock.plugins.DropShadowFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.filters.*;
import com.greensock.*;
public class DropShadowFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["distance", "angle", "color", "alpha", "blurX", "blurY", "strength", "quality", "inner", "knockout", "hideObject"];
public function DropShadowFilterPlugin(){
this.propName = "dropShadowFilter";
this.overwriteProps = ["dropShadowFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = DropShadowFilter;
initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject), _propNames);
return (true);
}
}
}//package com.greensock.plugins
Section 15
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _a:Array;
protected var _info:Array;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
public function init(_arg1:Array, _arg2:Array):void{
_a = _arg1;
var _local3:int = _arg2.length;
while (_local3--) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local2:int = _info.length;
if (this.round){
while (_local2--) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_a[_local3.index] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
};
};
}
}
}//package com.greensock.plugins
class ArrayTweenInfo {
public var change:Number;
public var start:Number;
public var index:uint;
private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
Section 16
//FilterPlugin (com.greensock.plugins.FilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.filters.*;
import com.greensock.*;
import com.greensock.core.*;
public class FilterPlugin extends TweenPlugin {
protected var _remove:Boolean;
protected var _target:Object;
protected var _index:int;
protected var _filter:BitmapFilter;
protected var _type:Class;
public static const VERSION:Number = 2.03;
public static const API:Number = 1;
public function onCompleteTween():void{
var _local1:Array;
var _local2:int;
if (_remove){
_local1 = _target.filters;
if (!(_local1[_index] is _type)){
_local2 = _local1.length;
while (_local2--) {
if ((_local1[_local2] is _type)){
_local1.splice(_local2, 1);
break;
};
};
} else {
_local1.splice(_index, 1);
};
_target.filters = _local1;
};
}
protected function initFilter(_arg1:Object, _arg2:BitmapFilter, _arg3:Array):void{
var _local5:String;
var _local6:int;
var _local7:HexColorsPlugin;
var _local4:Array = _target.filters;
var _local8:Object = ((_arg1 is BitmapFilter)) ? {} : _arg1;
_index = -1;
if (_local8.index != null){
_index = _local8.index;
} else {
_local6 = _local4.length;
while (_local6--) {
if ((_local4[_local6] is _type)){
_index = _local6;
break;
};
};
};
if ((((((_index == -1)) || ((_local4[_index] == null)))) || ((_local8.addFilter == true)))){
_index = ((_local8.index)!=null) ? _local8.index : _local4.length;
_local4[_index] = _arg2;
_target.filters = _local4;
};
_filter = _local4[_index];
if (_local8.remove == true){
_remove = true;
this.onComplete = onCompleteTween;
};
_local6 = _arg3.length;
while (_local6--) {
_local5 = _arg3[_local6];
if ((((_local5 in _arg1)) && (!((_filter[_local5] == _arg1[_local5]))))){
if ((((((_local5 == "color")) || ((_local5 == "highlightColor")))) || ((_local5 == "shadowColor")))){
_local7 = new HexColorsPlugin();
_local7.initColor(_filter, _local5, _filter[_local5], _arg1[_local5]);
_tweens[_tweens.length] = new PropTween(_local7, "changeFactor", 0, 1, _local5, false);
} else {
if ((((((((_local5 == "quality")) || ((_local5 == "inner")))) || ((_local5 == "knockout")))) || ((_local5 == "hideObject")))){
_filter[_local5] = _arg1[_local5];
} else {
addTween(_filter, _local5, _filter[_local5], _arg1[_local5], _local5);
};
};
};
};
}
override public function set changeFactor(_arg1:Number):void{
var _local3:PropTween;
var _local2:int = _tweens.length;
var _local4:Array = _target.filters;
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
if (!(_local4[_index] is _type)){
_local2 = (_index = _local4.length);
while (_local2--) {
if ((_local4[_local2] is _type)){
_index = _local2;
break;
};
};
};
_local4[_index] = _filter;
_target.filters = _local4;
}
}
}//package com.greensock.plugins
Section 17
//FrameLabelPlugin (com.greensock.plugins.FrameLabelPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class FrameLabelPlugin extends FramePlugin {
public static const API:Number = 1;
public function FrameLabelPlugin(){
this.propName = "frameLabel";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if ((!(_arg3.target) is MovieClip)){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
var _local4:Array = _target.currentLabels;
var _local5:String = _arg2;
var _local6:int = _target.currentFrame;
var _local7:int = _local4.length;
while (_local7--) {
if (_local4[_local7].name == _local5){
_local6 = _local4[_local7].frame;
break;
};
};
if (this.frame != _local6){
addTween(this, "frame", this.frame, _local6, "frame");
};
return (true);
}
}
}//package com.greensock.plugins
Section 18
//FramePlugin (com.greensock.plugins.FramePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class FramePlugin extends TweenPlugin {
protected var _target:MovieClip;
public var frame:int;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame", "frameLabel"];
this.round = true;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
}
}//package com.greensock.plugins
Section 19
//GlowFilterPlugin (com.greensock.plugins.GlowFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.filters.*;
import com.greensock.*;
public class GlowFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["color", "alpha", "blurX", "blurY", "strength", "quality", "inner", "knockout"];
public function GlowFilterPlugin(){
this.propName = "glowFilter";
this.overwriteProps = ["glowFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = GlowFilter;
initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout), _propNames);
return (true);
}
}
}//package com.greensock.plugins
Section 20
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class HexColorsPlugin extends TweenPlugin {
protected var _colors:Array;
public static const API:Number = 1;
public function HexColorsPlugin(){
this.propName = "hexColors";
this.overwriteProps = [];
_colors = [];
}
override public function killProps(_arg1:Object):void{
var _local2:int = (_colors.length - 1);
while (_local2 > -1) {
if (_arg1[_colors[_local2][1]] != undefined){
_colors.splice(_local2, 1);
};
_local2--;
};
super.killProps(_arg1);
}
public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_arg3 != _arg4){
_local5 = (_arg3 >> 16);
_local6 = ((_arg3 >> 8) & 0xFF);
_local7 = (_arg3 & 0xFF);
_colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)];
this.overwriteProps[this.overwriteProps.length] = _arg2;
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:Array;
_local2 = (_colors.length - 1);
while (_local2 > -1) {
_local3 = _colors[_local2];
_local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7])));
_local2--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
for (_local4 in _arg2) {
initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4]));
};
return (true);
}
}
}//package com.greensock.plugins
Section 21
//RemoveTintPlugin (com.greensock.plugins.RemoveTintPlugin)
package com.greensock.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package com.greensock.plugins
Section 22
//RoundPropsPlugin (com.greensock.plugins.RoundPropsPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class RoundPropsPlugin extends TweenPlugin {
public static const API:Number = 1;
public function RoundPropsPlugin(){
this.propName = "roundProps";
this.overwriteProps = [];
this.round = true;
}
public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package com.greensock.plugins
Section 23
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class ShortRotationPlugin extends TweenPlugin {
public static const API:Number = 1;
public function ShortRotationPlugin(){
this.propName = "shortRotation";
this.overwriteProps = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
if (typeof(_arg2) == "number"){
return (false);
};
for (_local4 in _arg2) {
initRotation(_arg1, _local4, _arg1[_local4], _arg2[_local4]);
};
return (true);
}
public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local5:Number = ((_arg4 - _arg3) % 360);
if (((_arg4 - _arg3) % 360) != (_local5 % 180)){
_local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360);
};
addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package com.greensock.plugins
Section 24
//TintPlugin (com.greensock.plugins.TintPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import com.greensock.core.*;
import flash.geom.*;
public class TintPlugin extends TweenPlugin {
protected var _ct:ColorTransform;
protected var _transform:Transform;
protected var _ignoreAlpha:Boolean;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.vars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_transform.colorTransform = _ct;
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local4:String;
_transform = _arg1.transform;
_ct = _transform.colorTransform;
var _local3:int = _props.length;
while (_local3--) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new PropTween(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
};
}
}
}//package com.greensock.plugins
Section 25
//TweenPlugin (com.greensock.plugins.TweenPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.greensock.core.*;
public class TweenPlugin {
public var activeDisable:Boolean;
protected var _changeFactor:Number;// = 0
protected var _tweens:Array;
public var onDisable:Function;
public var propName:String;
public var round:Boolean;
public var onEnable:Function;
public var priority:int;// = 0
public var overwriteProps:Array;
public var onComplete:Function;
public static const VERSION:Number = 1.31;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
protected function updateTweens(_arg1:Number):void{
var _local3:PropTween;
var _local4:Number;
var _local2:int = _tweens.length;
if (this.round){
while (_local2--) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local3.target[_local3.property] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
};
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (Number(_arg4) - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new PropTween(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
public function get changeFactor():Number{
return (_changeFactor);
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function killProps(_arg1:Object):void{
var _local2:int = this.overwriteProps.length;
while (_local2--) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
};
_local2 = _tweens.length;
while (_local2--) {
if ((PropTween(_tweens[_local2]).name in _arg1)){
_tweens.splice(_local2, 1);
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
public static function activate(_arg1:Array):Boolean{
var _local3:Object;
TweenLite.onPluginEvent = TweenPlugin.onTweenEvent;
var _local2:int = _arg1.length;
while (_local2--) {
if (_arg1[_local2].hasOwnProperty("API")){
_local3 = new ((_arg1[_local2] as Class));
TweenLite.plugins[_local3.propName] = _arg1[_local2];
};
};
return (true);
}
private static function onTweenEvent(_arg1:String, _arg2:TweenLite):Boolean{
var _local4:Boolean;
var _local5:Array;
var _local6:int;
var _local3:PropTween = _arg2.cachedPT1;
if (_arg1 == "onInit"){
_local5 = [];
while (_local3) {
_local5[_local5.length] = _local3;
_local3 = _local3.nextNode;
};
_local5.sortOn("priority", (Array.NUMERIC | Array.DESCENDING));
_local6 = _local5.length;
while (_local6--) {
PropTween(_local5[_local6]).nextNode = _local5[(_local6 + 1)];
PropTween(_local5[_local6]).prevNode = _local5[(_local6 - 1)];
};
_arg2.cachedPT1 = _local5[0];
} else {
while (_local3) {
if (((_local3.isPlugin) && (_local3.target[_arg1]))){
if (_local3.target.activeDisable){
_local4 = true;
};
var _local7 = _local3.target;
_local7[_arg1]();
};
_local3 = _local3.nextNode;
};
};
return (_local4);
}
}
}//package com.greensock.plugins
Section 26
//VisiblePlugin (com.greensock.plugins.VisiblePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class VisiblePlugin extends TweenPlugin {
protected var _target:Object;
protected var _initVal:Boolean;
protected var _visible:Boolean;
protected var _tween:TweenLite;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_initVal = _target.visible;
_visible = Boolean(_arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
if ((((_arg1 == 1)) && ((((_tween.cachedDuration == _tween.cachedTime)) || ((_tween.cachedTime == 0)))))){
_target.visible = _visible;
} else {
_target.visible = _initVal;
};
}
}
}//package com.greensock.plugins
Section 27
//VolumePlugin (com.greensock.plugins.VolumePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _target:Object;
protected var _st:SoundTransform;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
}
}//package com.greensock.plugins
Section 28
//OverwriteManager (com.greensock.OverwriteManager)
package com.greensock {
import com.greensock.core.*;
import flash.utils.*;
import flash.errors.*;
public class OverwriteManager {
public static const ALL_ONSTART:int = 4;
public static const CONCURRENT:int = 3;
public static const ALL_IMMEDIATE:int = 1;
public static const PREEXISTING:int = 5;
public static const AUTO:int = 2;
public static const version:Number = 6;
public static const NONE:int = 0;
public static var enabled:Boolean;
public static var mode:int;
public static function getGlobalPaused(_arg1:TweenCore):Boolean{
while (_arg1) {
if (_arg1.cachedPaused){
return (true);
};
_arg1 = _arg1.timeline;
};
return (false);
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 11.099994){
throw (new Error("Warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."));
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Object, _arg3:Array, _arg4:uint):Boolean{
var _local5:int;
var _local6:Boolean;
var _local7:TweenLite;
var _local13:uint;
var _local14:Number;
var _local15:Number;
var _local16:TweenCore;
var _local17:Number;
var _local18:SimpleTimeline;
if (_arg4 >= 4){
_local13 = _arg3.length;
_local5 = 0;
while (_local5 < _local13) {
_local7 = _arg3[_local5];
if (_local7 != _arg1){
if (_local7.setEnabled(false, false)){
_local6 = true;
};
} else {
if (_arg4 == 5){
break;
};
};
_local5++;
};
return (_local6);
};
var _local8:Number = _arg1.startTime;
var _local9:Array = [];
var _local10:Array = [];
var _local11:uint;
var _local12:uint;
_local5 = _arg3.length;
while (_local5--) {
_local7 = _arg3[_local5];
if ((((_local7 == _arg1)) || (_local7.gc))){
} else {
if (_local7.timeline != _arg1.timeline){
if (!getGlobalPaused(_local7)){
var _temp1 = _local11;
_local11 = (_local11 + 1);
var _local19 = _temp1;
_local10[_local19] = _local7;
};
} else {
if ((((((_local7.startTime <= _local8)) && (((_local7.startTime + _local7.totalDuration) > _local8)))) && (!(getGlobalPaused(_local7))))){
var _temp2 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp2;
_local9[_local19] = _local7;
};
};
};
};
if (_local11 != 0){
_local14 = _arg1.cachedTimeScale;
_local15 = _local8;
_local18 = _arg1.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.startTime);
_local18 = _local18.timeline;
};
_local8 = (_local14 * _local15);
_local5 = _local11;
while (_local5--) {
_local16 = _local10[_local5];
_local14 = _local16.cachedTimeScale;
_local15 = _local16.startTime;
_local18 = _local16.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.startTime);
_local18 = _local18.timeline;
};
_local17 = (_local14 * _local15);
if ((((_local17 <= _local8)) && (((((_local17 + (_local16.totalDuration * _local14)) > _local8)) || ((_local16.cachedDuration == 0)))))){
var _temp3 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp3;
_local9[_local19] = _local16;
};
};
};
if (_local12 == 0){
return (_local6);
};
_local5 = _local12;
if (_arg4 == 2){
while (_local5--) {
_local7 = _local9[_local5];
if (_local7.killVars(_arg2)){
_local6 = true;
};
if ((((_local7.cachedPT1 == null)) && (_local7.initted))){
_local7.setEnabled(false, false);
};
};
} else {
while (_local5--) {
if (TweenLite(_local9[_local5]).setEnabled(false, false)){
_local6 = true;
};
};
};
return (_local6);
}
}
}//package com.greensock
Section 29
//TimelineLite (com.greensock.TimelineLite)
package com.greensock {
import com.greensock.core.*;
import flash.utils.*;
public class TimelineLite extends SimpleTimeline {
protected var _endCaps:Array;
protected var _labels:Object;
public static const version:Number = 1.12;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
;
public function TimelineLite(_arg1:Object=null){
super(_arg1);
_endCaps = [];
_labels = {};
this.autoRemoveChildren = Boolean((this.vars.autoRemoveChildren == true));
_hasUpdate = Boolean((typeof(this.vars.onUpdate) == "function"));
if ((this.vars.tweens is Array)){
this.insertMultiple(this.vars.tweens, 0, ((this.vars.align) || ("normal")), ((this.vars.stagger) || (0)));
};
}
public function set timeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
var _local2:Number = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
public function stop():void{
this.paused = true;
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local7:TweenCore;
var _local8:Boolean;
var _local9:Boolean;
var _local10:TweenCore;
var _local11:Number;
if (this.gc){
this.setEnabled(true, false);
} else {
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
};
var _local4:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
var _local5:Number = this.cachedTime;
var _local6:Number = this.cachedStartTime;
if (_arg1 >= _local4){
if ((((_rawPrevTime <= _local4)) && (!((_rawPrevTime == _arg1))))){
this.cachedTotalTime = (this.cachedTime = _local4);
forceChildrenToEnd(_local4, _arg2);
_local8 = !(this.hasPausedChild());
_local9 = true;
if ((((((this.cachedDuration == 0)) && (_local8))) && ((((_arg1 == 0)) || ((_rawPrevTime < 0)))))){
_arg3 = true;
};
};
} else {
if (_arg1 <= 0){
if (_arg1 < 0){
this.active = false;
if ((((this.cachedDuration == 0)) && ((_rawPrevTime > 0)))){
_arg3 = true;
_local8 = true;
};
};
if ((((_rawPrevTime >= 0)) && (!((_rawPrevTime == _arg1))))){
forceChildrenToBeginning(0, _arg2);
this.cachedTotalTime = 0;
this.cachedTime = 0;
_local9 = true;
if (this.cachedReversed){
_local8 = true;
};
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
};
};
_rawPrevTime = _arg1;
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
this.initted = true;
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (_local9){
} else {
if ((this.cachedTime - _local5) > 0){
_local7 = _firstChild;
while (_local7) {
_local10 = _local7.nextNode;
if (((_local7.active) || (((((!(_local7.cachedPaused)) && ((_local7.cachedStartTime <= this.cachedTime)))) && (!(_local7.gc)))))){
if (!_local7.cachedReversed){
_local7.renderTime(((this.cachedTime - _local7.cachedStartTime) * _local7.cachedTimeScale), _arg2, false);
} else {
_local11 = (_local7.cacheIsDirty) ? _local7.totalDuration : _local7.cachedTotalDuration;
_local7.renderTime((_local11 - ((this.cachedTime - _local7.cachedStartTime) * _local7.cachedTimeScale)), _arg2, false);
};
};
_local7 = _local10;
};
} else {
_local7 = _lastChild;
while (_local7) {
_local10 = _local7.prevNode;
if (((_local7.active) || (((((!(_local7.cachedPaused)) && ((_local7.cachedStartTime <= _local5)))) && (!(_local7.gc)))))){
if (!_local7.cachedReversed){
_local7.renderTime(((this.cachedTime - _local7.cachedStartTime) * _local7.cachedTimeScale), _arg2, false);
} else {
_local11 = (_local7.cacheIsDirty) ? _local7.totalDuration : _local7.cachedTotalDuration;
_local7.renderTime((_local11 - ((this.cachedTime - _local7.cachedStartTime) * _local7.cachedTimeScale)), _arg2, false);
};
};
_local7 = _local10;
};
};
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_local8) && ((_local6 == this.cachedStartTime)))){
complete(true, _arg2);
};
}
override public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (((!(_arg1.gc)) && (!(_arg2)))){
_arg1.setEnabled(false, true);
};
var _local3:TweenCore = ((_firstChild) || (_endCaps[0]));
var _local4:TweenCore = ((_lastChild) || (_endCaps[1]));
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_local4 == _arg1){
_local4 = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_local3 == _arg1){
_local3 = _arg1.nextNode;
};
};
if (this.gc){
_endCaps[0] = _local3;
_endCaps[1] = _local4;
} else {
_firstChild = _local3;
_lastChild = _local4;
};
setDirtyCache(true);
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
override public function get totalDuration():Number{
var _local1:Number;
var _local2:Number;
var _local3:TweenCore;
var _local4:Number;
var _local5:TweenCore;
if (this.cacheIsDirty){
_local1 = 0;
_local3 = ((_firstChild) || (_endCaps[0]));
_local4 = -(Infinity);
while (_local3) {
_local5 = _local3.nextNode;
if (_local3.cachedStartTime < _local4){
this.addChild(_local3);
_local4 = _local3.prevNode.cachedStartTime;
} else {
_local4 = _local3.cachedStartTime;
};
if (_local3.cachedStartTime < 0){
_local1 = (_local1 - _local3.cachedStartTime);
this.shiftChildren(-(_local3.cachedStartTime), false, -9999999999);
};
_local2 = (_local3.cachedStartTime + (_local3.totalDuration / _local3.cachedTimeScale));
if (_local2 > _local1){
_local1 = _local2;
};
_local3 = _local5;
};
this.cachedDuration = (this.cachedTotalDuration = _local1);
this.cacheIsDirty = false;
};
return (this.cachedTotalDuration);
}
public function gotoAndPlay(_arg1, _arg2:Boolean=true):void{
goto(_arg1, _arg2);
play();
}
public function appendMultiple(_arg1:Array, _arg2:Number=0, _arg3:String="normal", _arg4:Number=0):void{
insertMultiple(_arg1, (this.duration + _arg2), _arg3, _arg4);
}
public function set currentProgress(_arg1:Number):void{
setTotalTime((this.duration * _arg1), false);
}
public function clear(_arg1:Array=null):void{
if (_arg1 == null){
_arg1 = getChildren(false, true, true);
};
var _local2:int = _arg1.length;
while (_local2--) {
TweenCore(_arg1[_local2]).setEnabled(false, false);
};
}
public function prepend(_arg1:TweenCore, _arg2:Boolean=false):void{
shiftChildren(((_arg1.totalDuration / _arg1.cachedTimeScale) + _arg1.delay), _arg2, 0);
insert(_arg1, 0);
}
public function addLabel(_arg1:String, _arg2:Number):void{
_labels[_arg1] = _arg2;
}
public function hasPausedChild():Boolean{
var _local1:TweenCore = ((_firstChild) || (_endCaps[0]));
while (_local1) {
if (((_local1.cachedPaused) || ((((_local1 is TimelineLite)) && ((_local1 as TimelineLite).hasPausedChild()))))){
return (true);
};
_local1 = _local1.nextNode;
};
return (false);
}
public function getTweensOf(_arg1:Object, _arg2:Boolean=true):Array{
var _local5:int;
var _local3:Array = getChildren(_arg2, true, false);
var _local4:Array = [];
var _local6:uint = _local3.length;
_local5 = 0;
while (_local5 < _local6) {
if (TweenLite(_local3[_local5]).target == _arg1){
_local4[_local4.length] = _local3[_local5];
};
_local5++;
};
return (_local4);
}
public function gotoAndStop(_arg1, _arg2:Boolean=true):void{
goto(_arg1, _arg2);
this.paused = true;
}
public function append(_arg1:TweenCore, _arg2:Number=0):void{
insert(_arg1, (this.duration + _arg2));
}
override public function get duration():Number{
var _local1:Number;
if (this.cacheIsDirty){
_local1 = this.totalDuration;
};
return (this.cachedDuration);
}
public function get useFrames():Boolean{
var _local1:SimpleTimeline = this.timeline;
while (_local1.timeline) {
_local1 = _local1.timeline;
};
return (Boolean((_local1 == TweenLite.rootFramesTimeline)));
}
public function shiftChildren(_arg1:Number, _arg2:Boolean=false, _arg3:Number=0):void{
var _local5:String;
var _local4:TweenCore = ((_firstChild) || (_endCaps[0]));
while (_local4) {
if (_local4.cachedStartTime >= _arg3){
_local4.cachedStartTime = (_local4.cachedStartTime + _arg1);
};
_local4 = _local4.nextNode;
};
if (_arg2){
for (_local5 in _labels) {
if (_labels[_local5] >= _arg3){
_labels[_local5] = (_labels[_local5] + _arg1);
};
};
};
this.setDirtyCache(true);
}
public function goto(_arg1, _arg2:Boolean=true):void{
if (typeof(_arg1) == "string"){
if ((_arg1 in _labels)){
setTotalTime(Number(_labels[_arg1]), _arg2);
};
} else {
setTotalTime(Number(_arg1), _arg2);
};
}
public function killTweensOf(_arg1:Object, _arg2:Boolean=true):Boolean{
var _local3:Array = getTweensOf(_arg1, _arg2);
var _local4:int = _local3.length;
while (_local4--) {
TweenLite(_local3[_local4]).setEnabled(false, false);
};
return (Boolean((_local3.length > 0)));
}
override public function invalidate():void{
var _local1:TweenCore = ((_firstChild) || (_endCaps[0]));
while (_local1) {
_local1.invalidate();
_local1 = _local1.nextNode;
};
}
public function insertMultiple(_arg1:Array, _arg2=0, _arg3:String="normal", _arg4:Number=0):void{
var _local5:int;
var _local6:TweenCore;
var _local7:Number = ((Number(_arg2)) || (0));
var _local8:uint = _arg1.length;
if (typeof(_arg2) == "string"){
if (!(_arg2 in _labels)){
addLabel(_arg2, this.duration);
};
_local7 = _labels[_arg2];
};
_local5 = 0;
while (_local5 < _local8) {
_local6 = (_arg1[_local5] as TweenCore);
insert(_local6, _local7);
if (_arg3 == "sequence"){
_local7 = (_local6.cachedStartTime + (_local6.totalDuration / _local6.cachedTimeScale));
} else {
if (_arg3 == "start"){
_local6.cachedStartTime = (_local6.cachedStartTime - _local6.delay);
};
};
_local7 = (_local7 + _arg4);
_local5++;
};
}
public function getLabelTime(_arg1:String):Number{
return (((_arg1 in _labels)) ? Number(_labels[_arg1]) : -1);
}
override public function get rawTime():Number{
if (((!((this.cachedTotalTime == 0))) && (!((this.cachedTotalTime == this.cachedTotalDuration))))){
return (this.cachedTotalTime);
};
return (((this.timeline.rawTime - this.cachedStartTime) * this.cachedTimeScale));
}
override public function set duration(_arg1:Number):void{
if (((!((this.duration == 0))) && (!((_arg1 == 0))))){
this.timeScale = (this.duration / _arg1);
};
}
override public function set totalDuration(_arg1:Number):void{
if (((!((this.totalDuration == 0))) && (!((_arg1 == 0))))){
this.timeScale = (this.totalDuration / _arg1);
};
}
public function getChildren(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:Number=-9999999999):Array{
var _local5:Array = [];
var _local6:TweenCore = ((_firstChild) || (_endCaps[0]));
var _local7:uint;
while (_local6) {
if (_local6.cachedStartTime < _arg4){
} else {
if ((_local6 is TweenLite)){
if (_arg2){
var _temp1 = _local7;
_local7 = (_local7 + 1);
var _local8 = _temp1;
_local5[_local8] = _local6;
};
} else {
if (_arg3){
var _temp2 = _local7;
_local7 = (_local7 + 1);
_local8 = _temp2;
_local5[_local8] = _local6;
};
if (_arg1){
_local5 = _local5.concat(TimelineLite(_local6).getChildren(true, _arg2, _arg3));
};
};
};
_local6 = _local6.nextNode;
};
return (_local5);
}
protected function forceChildrenToEnd(_arg1:Number, _arg2:Boolean=false):Number{
var _local4:TweenCore;
var _local5:Number;
var _local3:TweenCore = _firstChild;
while (_local3) {
_local4 = _local3.nextNode;
if (((_local3.active) || (((((!(_local3.cachedPaused)) && (!(_local3.gc)))) && (((!((_local3.cachedTotalTime == _local3.cachedTotalDuration))) || ((_local3.cachedDuration == 0)))))))){
if ((((_arg1 == this.cachedDuration)) && (((!((_local3.cachedDuration == 0))) || ((_local3.cachedStartTime == this.cachedDuration)))))){
_local3.renderTime((_local3.cachedReversed) ? 0 : _local3.cachedTotalDuration, _arg2, false);
} else {
if (!_local3.cachedReversed){
_local3.renderTime(((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local3.cacheIsDirty) ? _local3.totalDuration : _local3.cachedTotalDuration;
_local3.renderTime((_local5 - ((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale)), _arg2, false);
};
};
};
_local3 = _local4;
};
return (_arg1);
}
protected function forceChildrenToBeginning(_arg1:Number, _arg2:Boolean=false):Number{
var _local4:TweenCore;
var _local5:Number;
var _local3:TweenCore = _lastChild;
while (_local3) {
_local4 = _local3.prevNode;
if (((_local3.active) || (((((!(_local3.cachedPaused)) && (!(_local3.gc)))) && (((!((_local3.cachedTotalTime == 0))) || ((_local3.cachedDuration == 0)))))))){
if ((((_arg1 == 0)) && (((!((_local3.cachedDuration == 0))) || ((_local3.cachedStartTime == 0)))))){
_local3.renderTime((_local3.cachedReversed) ? _local3.cachedTotalDuration : 0, _arg2, false);
} else {
if (!_local3.cachedReversed){
_local3.renderTime(((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local3.cacheIsDirty) ? _local3.totalDuration : _local3.cachedTotalDuration;
_local3.renderTime((_local5 - ((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale)), _arg2, false);
};
};
};
_local3 = _local4;
};
return (_arg1);
}
public function insert(_arg1:TweenCore, _arg2=0):void{
if (typeof(_arg2) == "string"){
if (!(_arg2 in _labels)){
addLabel(_arg2, this.duration);
};
_arg2 = Number(_labels[_arg2]);
};
_arg1.cachedStartTime = (Number(_arg2) + _arg1.delay);
addChild(_arg1);
}
override public function addChild(_arg1:TweenCore):void{
var _local4:TweenCore;
var _local5:Number;
if (((!(_arg1.gc)) && (_arg1.timeline))){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
setDirtyCache(true);
var _local2:TweenCore = ((_firstChild) || (_endCaps[0]));
var _local3:TweenCore = ((_lastChild) || (_endCaps[1]));
if (_local3 == null){
_local3 = _arg1;
_local2 = _local3;
_arg1.nextNode = (_arg1.prevNode = null);
} else {
_local4 = _local3;
_local5 = _arg1.cachedStartTime;
while (((!((_local4 == null))) && ((_local5 <= _local4.cachedStartTime)))) {
_local4 = _local4.prevNode;
};
if (_local4 == null){
_local2.prevNode = _arg1;
_arg1.nextNode = _local2;
_arg1.prevNode = null;
_local2 = _arg1;
} else {
if (_local4.nextNode){
_local4.nextNode.prevNode = _arg1;
} else {
if (_local4 == _local3){
_local3 = _arg1;
};
};
_arg1.prevNode = _local4;
_arg1.nextNode = _local4.nextNode;
_local4.nextNode = _arg1;
};
};
if (this.gc){
_endCaps[0] = _local2;
_endCaps[1] = _local3;
} else {
_firstChild = _local2;
_lastChild = _local3;
};
}
public function get timeScale():Number{
return (this.cachedTimeScale);
}
public function prependMultiple(_arg1:Array, _arg2:String="normal", _arg3:Number=0, _arg4:Boolean=false):void{
var _local5:TimelineLite = new TimelineLite({tweens:_arg1, align:_arg2, stagger:_arg3});
shiftChildren(_local5.duration, _arg4, 0);
insertMultiple(_arg1, 0, _arg2, _arg3);
_local5.kill();
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:TweenCore;
var _local4:TweenCore;
if (_arg1 == this.gc){
if (_arg1){
_local3 = _endCaps[0];
_firstChild = _local3;
_lastChild = _endCaps[1];
} else {
_local3 = _firstChild;
_endCaps = [_firstChild, _lastChild];
_firstChild = (_lastChild = null);
};
while (_local3) {
_local3.setEnabled(_arg1, true);
_local3 = _local3.nextNode;
};
return (super.setEnabled(_arg1, _arg2));
};
return (false);
}
}
}//package com.greensock
Section 30
//TimelineMax (com.greensock.TimelineMax)
package com.greensock {
import com.greensock.core.*;
import flash.events.*;
import flash.utils.*;
import com.greensock.events.*;
public class TimelineMax extends TimelineLite implements IEventDispatcher {
protected var _cyclesComplete:uint;
protected var _dispatcher:EventDispatcher;
protected var _hasUpdateListener:Boolean;
public var yoyo:Boolean;
protected var _repeatDelay:Number;
protected var _repeat:int;
public static const version:Number = 1.12;
public function TimelineMax(_arg1:Object=null){
super(_arg1);
_repeat = ((this.vars.repeat) || (0));
_repeatDelay = ((this.vars.repeatDelay) || (0));
_cyclesComplete = 0;
this.yoyo = ((this.vars.yoyo) || (false));
this.cacheIsDirty = true;
if (((((((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))) || (!((this.vars.onRepeatListener == null))))) || (!((this.vars.onReverseCompleteListener == null))))){
initDispatcher();
};
}
public function dispatchEvent(_arg1:Event):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1));
}
public function get currentLabel():String{
return (getLabelBefore((this.cachedTime + 1E-8)));
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local7:TweenCore;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:TweenCore;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Boolean;
var _local16:Boolean;
var _local17:Boolean;
if (this.gc){
this.setEnabled(true, false);
} else {
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
};
var _local4:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
var _local5:Number = this.cachedTime;
var _local6:Number = this.cachedStartTime;
if (_arg1 >= _local4){
if ((((_rawPrevTime <= _local4)) && (!((_rawPrevTime == _arg1))))){
if (((((!(this.cachedReversed)) && (this.yoyo))) && (!(((_repeat % 2) == 0))))){
forceChildrenToBeginning(0, _arg2);
this.cachedTime = 0;
} else {
forceChildrenToEnd(this.cachedDuration, _arg2);
this.cachedTime = this.cachedDuration;
};
this.cachedTotalTime = _local4;
_local8 = !(this.hasPausedChild());
_local9 = true;
if ((((((this.cachedDuration == 0)) && (_local8))) && ((((_arg1 == 0)) || ((_rawPrevTime < 0)))))){
_arg3 = true;
};
};
} else {
if (_arg1 <= 0){
if (_arg1 < 0){
this.active = false;
if ((((this.cachedDuration == 0)) && ((_rawPrevTime > 0)))){
_arg3 = true;
_local8 = true;
};
};
if ((((_rawPrevTime >= 0)) && (!((_rawPrevTime == _arg1))))){
this.cachedTotalTime = 0;
if (((((!(this.cachedReversed)) && (this.yoyo))) && (!(((_repeat % 2) == 0))))){
forceChildrenToEnd(this.cachedDuration, _arg2);
this.cachedTime = this.cachedDuration;
} else {
forceChildrenToBeginning(0, _arg2);
this.cachedTime = 0;
};
_local9 = true;
if (this.cachedReversed){
_local8 = true;
};
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
};
};
_rawPrevTime = _arg1;
if (_repeat != 0){
_local13 = (this.cachedDuration + _repeatDelay);
if (_local8){
if (((this.yoyo) && ((_repeat % 2)))){
this.cachedTime = 0;
};
} else {
if (_arg1 > 0){
_local14 = _cyclesComplete;
if (_cyclesComplete != (_cyclesComplete = int((this.cachedTotalTime / _local13)))){
_local10 = true;
};
this.cachedTime = (((this.cachedTotalTime / _local13) - _cyclesComplete) * _local13);
if (((this.yoyo) && ((_cyclesComplete % 2)))){
this.cachedTime = (this.cachedDuration - this.cachedTime);
} else {
if (this.cachedTime >= this.cachedDuration){
this.cachedTime = this.cachedDuration;
};
};
if (this.cachedTime < 0){
this.cachedTime = 0;
};
};
};
if (((((_local10) && (!(_local8)))) && (((!((this.cachedTime == _local5))) || (_arg3))))){
_local15 = Boolean(((!(this.yoyo)) || (((_cyclesComplete % 2) == 0))));
_local16 = Boolean(((!(this.yoyo)) || (((_local14 % 2) == 0))));
_local17 = Boolean((_local15 == _local16));
if (_local14 > _cyclesComplete){
_local16 = !(_local16);
};
if (_local16){
_local5 = forceChildrenToEnd(this.cachedDuration, _arg2);
if (_local17){
_local5 = forceChildrenToBeginning(0, true);
};
} else {
_local5 = forceChildrenToBeginning(0, _arg2);
if (_local17){
_local5 = forceChildrenToEnd(this.cachedDuration, true);
};
};
_local9 = false;
};
};
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
this.initted = true;
};
if ((((((_local5 == 0)) && (!((this.cachedTotalTime == 0))))) && (!(_arg2)))){
if (this.vars.onStart){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
};
};
if (_local9){
} else {
if ((this.cachedTime - _local5) > 0){
_local7 = _firstChild;
while (_local7) {
_local11 = _local7.nextNode;
if (((_local7.active) || (((((!(_local7.cachedPaused)) && ((_local7.cachedStartTime <= this.cachedTime)))) && (!(_local7.gc)))))){
if (!_local7.cachedReversed){
_local7.renderTime(((this.cachedTime - _local7.cachedStartTime) * _local7.cachedTimeScale), _arg2, false);
} else {
_local12 = (_local7.cacheIsDirty) ? _local7.totalDuration : _local7.cachedTotalDuration;
_local7.renderTime((_local12 - ((this.cachedTime - _local7.cachedStartTime) * _local7.cachedTimeScale)), _arg2, false);
};
};
_local7 = _local11;
};
} else {
_local7 = _lastChild;
while (_local7) {
_local11 = _local7.prevNode;
if (((_local7.active) || (((((!(_local7.cachedPaused)) && ((_local7.cachedStartTime <= _local5)))) && (!(_local7.gc)))))){
if (!_local7.cachedReversed){
_local7.renderTime(((this.cachedTime - _local7.cachedStartTime) * _local7.cachedTimeScale), _arg2, false);
} else {
_local12 = (_local7.cacheIsDirty) ? _local7.totalDuration : _local7.cachedTotalDuration;
_local7.renderTime((_local12 - ((this.cachedTime - _local7.cachedStartTime) * _local7.cachedTimeScale)), _arg2, false);
};
};
_local7 = _local11;
};
};
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_hasUpdateListener) && (!(_arg2)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
};
if (((_local8) && ((_local6 == this.cachedStartTime)))){
complete(true, _arg2);
} else {
if (((_local10) && (!(_arg2)))){
if (this.vars.onRepeat){
this.vars.onRepeat.apply(null, this.vars.onRepeatParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT));
};
};
};
}
public function addCallback(_arg1:Function, _arg2, _arg3:Array=null):TweenLite{
var _local4:TweenLite = new TweenLite(_arg1, 0, {onComplete:_arg1, onCompleteParams:_arg3, overwrite:0, immediateRender:false});
insert(_local4, _arg2);
return (_local4);
}
public function set repeatDelay(_arg1:Number):void{
_repeatDelay = _arg1;
setDirtyCache(true);
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher != null){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
override public function set currentTime(_arg1:Number):void{
if (_cyclesComplete == 0){
setTotalTime(_arg1, false);
} else {
if (((this.yoyo) && (((_cyclesComplete % 2) == 1)))){
setTotalTime(((this.duration - _arg1) + (_cyclesComplete * (this.cachedDuration + _repeatDelay))), false);
} else {
setTotalTime((_arg1 + (_cyclesComplete * (this.duration + _repeatDelay))), false);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_dispatcher == null){
initDispatcher();
};
if (_arg1 == TweenEvent.UPDATE){
_hasUpdateListener = true;
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function tweenTo(_arg1, _arg2:Object=null):TweenLite{
var _local4:String;
var _local3:Object = {ease:easeNone, overwrite:2, useFrames:this.useFrames};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (typeof(_arg1) == "string"){
if (!(_arg1 in _labels)){
return (null);
};
_local3.currentTime = getLabelTime(String(_arg1));
} else {
_local3.currentTime = Number(_arg1);
};
this.paused = true;
return (new TweenLite(this, Math.abs((Number(_local3.currentTime) - this.cachedTime)), _local3));
}
public function hasEventListener(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1));
}
protected function initDispatcher():void{
if (_dispatcher == null){
_dispatcher = new EventDispatcher(this);
if ((this.vars.onStartListener is Function)){
_dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true);
};
if ((this.vars.onUpdateListener is Function)){
_dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true);
_hasUpdateListener = true;
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
if ((this.vars.onRepeatListener is Function)){
_dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true);
};
if ((this.vars.onReverseCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true);
};
};
}
public function get repeat():int{
return (_repeat);
}
public function getLabelBefore(_arg1:Number=NaN):String{
if (((!(_arg1)) && (!((_arg1 == 0))))){
_arg1 = this.cachedTime;
};
var _local2:Array = getLabelsArray();
var _local3:int = _local2.length;
while (_local3--) {
if (_local2[_local3].time < _arg1){
return (_local2[_local3].name);
};
};
return (null);
}
public function willTrigger(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1));
}
public function get totalProgress():Number{
return ((this.cachedTotalTime / this.totalDuration));
}
public function set totalProgress(_arg1:Number):void{
setTotalTime((this.totalDuration * _arg1), false);
}
protected function getLabelsArray():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _labels) {
_local1[_local1.length] = {time:_labels[_local2], name:_local2};
};
_local1.sortOn("time", Array.NUMERIC);
return (_local1);
}
public function removeCallback(_arg1:Function, _arg2=null):Boolean{
var _local3:Array;
var _local4:Boolean;
var _local5:int;
if (_arg2 == null){
return (killTweensOf(_arg1, false));
};
if (typeof(_arg2) == "string"){
if (!(_arg2 in _labels)){
return (false);
};
_arg2 = _labels[_arg2];
};
_local3 = getTweensOf(_arg1, false);
_local5 = _local3.length;
while (_local5--) {
if (_local3[_local5].cachedStartTime == _arg2){
remove((_local3[_local5] as TweenCore));
_local4 = true;
};
};
return (_local4);
}
public function get repeatDelay():Number{
return (_repeatDelay);
}
public function set repeat(_arg1:int):void{
_repeat = _arg1;
setDirtyCache(true);
}
override public function get totalDuration():Number{
var _local1:Number;
if (this.cacheIsDirty){
_local1 = super.totalDuration;
this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat));
};
return (this.cachedTotalDuration);
}
override public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
super.complete(_arg1, _arg2);
if (((_dispatcher) && (!(_arg2)))){
if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (!((this.cachedDuration == 0))))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE));
} else {
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
};
};
}
override public function invalidate():void{
_repeat = ((this.vars.repeat) || (0));
_repeatDelay = ((this.vars.repeatDelay) || (0));
this.yoyo = ((this.vars.yoyo) || (false));
_hasUpdateListener = false;
if (((((((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))) || (!((this.vars.onRepeatListener == null))))) || (!((this.vars.onReverseCompleteListener == null))))){
initDispatcher();
};
setDirtyCache(true);
super.invalidate();
}
public function getActive(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=false):Array{
var _local6:int;
var _local4:Array = [];
var _local5:Array = getChildren(_arg1, _arg2, _arg3);
var _local7:uint = _local5.length;
_local6 = 0;
while (_local6 < _local7) {
if (TweenCore(_local5[_local6]).active){
_local4[_local4.length] = _local5[_local6];
};
_local6++;
};
return (_local4);
}
public function getLabelAfter(_arg1:Number=NaN):String{
if (((!(_arg1)) && (!((_arg1 == 0))))){
_arg1 = this.cachedTime;
};
var _local2:Array = getLabelsArray();
var _local3:uint = _local2.length;
var _local4:int;
while (_local4 < _local3) {
if (_local2[_local4].time > _arg1){
return (_local2[_local4].name);
};
_local4++;
};
return (null);
}
private static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((_arg1 / _arg4));
}
}
}//package com.greensock
Section 31
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.display.*;
import com.greensock.core.*;
import flash.events.*;
import flash.utils.*;
import com.greensock.plugins.*;
public class TweenLite extends TweenCore {
protected var _hasPlugins:Boolean;
public var propTweenLookup:Object;
public var cachedPT1:PropTween;
protected var _overwrite:uint;
protected var _ease:Function;
public var target:Object;
public var ratio:Number;// = 0
protected var _overwrittenProps:Object;
protected var _notifyPluginsOfEnabled:Boolean;
public static const version:Number = 11.12;
public static var rootTimeline:SimpleTimeline;
public static var fastEaseLookup:Dictionary = new Dictionary(false);
public static var onPluginEvent:Function;
public static var rootFramesTimeline:SimpleTimeline;
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var masterList:Dictionary = new Dictionary(false);
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _shape:Shape = new Shape();
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local5:TweenLite;
super(_arg2, _arg3);
this.target = _arg1;
if ((((this.target is TweenCore)) && (("timeScale" in this.vars)))){
this.cachedTimeScale = 1;
};
propTweenLookup = {};
_ease = defaultEase;
_overwrite = (((!(("overwrite" in _arg3))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
var _local4:Array = masterList[_arg1];
if (!_local4){
masterList[_arg1] = [this];
} else {
if (_overwrite == 1){
for each (_local5 in _local4) {
if (!_local5.gc){
_local5.setEnabled(false, false);
};
};
masterList[_arg1] = [this];
} else {
_local4[_local4.length] = this;
};
};
if (((this.active) || (this.vars.immediateRender))){
renderTime(0, false, true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number = this.cachedTime;
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
if (_arg1 >= this.cachedDuration){
this.cachedTotalTime = (this.cachedTime = this.cachedDuration);
this.ratio = 1;
_local4 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime > 0){
_arg3 = true;
_local4 = true;
};
_rawPrevTime = _arg1;
};
};
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local4 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
this.ratio = _ease(_arg1, 0, 1, this.cachedDuration);
};
};
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
if (((!(_local4)) && (this.cachedTime))){
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
var _local6:PropTween = this.cachedPT1;
while (_local6) {
_local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change));
_local6 = _local6.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local4){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:Array;
if (_arg1 == this.gc){
if (_arg1){
_local3 = TweenLite.masterList[this.target];
if (!_local3){
TweenLite.masterList[this.target] = [this];
} else {
_local3[_local3.length] = this;
};
};
super.setEnabled(_arg1, _arg2);
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this));
};
};
return (false);
}
protected function init():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:Boolean;
var _local5:Array;
var _local6:PropTween;
if (typeof(this.vars.ease) == "function"){
_ease = this.vars.ease;
};
if (this.vars.easeParams){
this.vars.proxiedEase = _ease;
_ease = easeProxy;
};
this.cachedPT1 = null;
this.propTweenLookup = {};
for (_local1 in this.vars) {
if ((((_local1 in _reservedProps)) && (!((((_local1 == "timeScale")) && ((this.target is TweenCore))))))){
} else {
if ((((_local1 in plugins)) && (new ((plugins[_local1] as Class)).onInitTween(this.target, this.vars[_local1], this)))){
this.cachedPT1 = new PropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
if (this.cachedPT1.name == "_MULTIPLE_"){
_local2 = _local3.overwriteProps.length;
while (_local2--) {
this.propTweenLookup[_local3.overwriteProps[_local2]] = this.cachedPT1;
};
} else {
this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1;
};
if (_local3.priority){
this.cachedPT1.priority = _local3.priority;
_local4 = true;
};
if (((_local3.onDisable) || (_local3.onEnable))){
_notifyPluginsOfEnabled = true;
};
_hasPlugins = true;
} else {
this.cachedPT1 = new PropTween(this.target, _local1, Number(this.target[_local1]), ((typeof(this.vars[_local1]))=="number") ? (Number(this.vars[_local1]) - this.target[_local1]) : Number(this.vars[_local1]), _local1, false, this.cachedPT1);
this.propTweenLookup[_local1] = this.cachedPT1;
};
};
};
if (_local4){
onPluginEvent("onInit", this);
};
if (this.vars.runBackwards){
_local6 = this.cachedPT1;
while (_local6) {
_local6.start = (_local6.start + _local6.change);
_local6.change = -(_local6.change);
_local6 = _local6.nextNode;
};
};
_hasUpdate = Boolean(!((this.vars.onUpdate == null)));
if (_overwrittenProps){
killVars(_overwrittenProps);
if (this.cachedPT1 == null){
this.setEnabled(false, false);
};
};
if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){
if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){
init();
};
};
this.initted = true;
}
public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{
var _local3:String;
var _local4:PropTween;
var _local5:Boolean;
if (_overwrittenProps == null){
_overwrittenProps = {};
};
for (_local3 in _arg1) {
if ((_local3 in propTweenLookup)){
_local4 = propTweenLookup[_local3];
if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){
_local4.target.killProps(_arg1);
if (_local4.target.overwriteProps.length == 0){
_local4.name = "";
};
};
if (_local4.name != "_MULTIPLE_"){
if (_local4.nextNode){
_local4.nextNode.prevNode = _local4.prevNode;
};
if (_local4.prevNode){
_local4.prevNode.nextNode = _local4.nextNode;
} else {
if (this.cachedPT1 == _local4){
this.cachedPT1 = _local4.nextNode;
};
};
if (((_local4.isPlugin) && (_local4.target.onDisable))){
_local4.target.onDisable();
if (_local4.target.activeDisable){
_local5 = true;
};
};
delete propTweenLookup[_local3];
};
};
if (_arg2){
_overwrittenProps[_local3] = 1;
};
};
return (_local5);
}
override public function invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
public static function initClass():void{
rootFrame = 0;
rootTimeline = new SimpleTimeline(null);
rootFramesTimeline = new SimpleTimeline(null);
rootTimeline.cachedStartTime = (getTimer() * 0.001);
rootFramesTimeline.cachedStartTime = rootFrame;
rootTimeline.autoRemoveChildren = true;
rootFramesTimeline.autoRemoveChildren = true;
_shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
}
public static function killTweensOf(_arg1:Object, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
if ((_arg1 in masterList)){
_local3 = masterList[_arg1];
_local4 = _local3.length;
while (_local4--) {
if (!TweenLite(_local3[_local4]).gc){
if (_arg2){
TweenLite(_local3[_local4]).complete(false, false);
} else {
TweenLite(_local3[_local4]).setEnabled(false, false);
};
};
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenLite(_arg1, _arg2, _arg3));
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (1 - (_arg1 / _arg4));
return ((1 - (_arg1 * _arg1)));
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
protected static function updateAll(_arg1:Event=null):void{
var _local2:Dictionary;
var _local3:Object;
var _local4:Array;
var _local5:int;
rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false);
rootFrame++;
rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false);
if (!(rootFrame % 60)){
_local2 = masterList;
for (_local3 in _local2) {
_local4 = _local2[_local3];
_local5 = _local4.length;
while (_local5--) {
if (TweenLite(_local4[_local5]).gc){
_local4.splice(_local5, 1);
};
};
if (_local4.length == 0){
delete _local2[_local3];
};
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package com.greensock
Section 32
//TweenMax (com.greensock.TweenMax)
package com.greensock {
import flash.display.*;
import com.greensock.core.*;
import flash.events.*;
import flash.utils.*;
import com.greensock.plugins.*;
import com.greensock.events.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _easeType:uint;
public var yoyo:Boolean;
protected var _easePower:uint;
protected var _repeat:int;// = 0
protected var _cyclesComplete:uint;// = 0
protected var _dispatcher:EventDispatcher;
protected var _hasUpdateListener:Boolean;
protected var _repeatDelay:Number;// = 0
public static const version:Number = 11.12;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
if (TweenLite.version < 11.1){
throw (new Error("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com."));
};
this.yoyo = Boolean(this.vars.yoyo);
_repeat = ((this.vars.repeat) || (0));
_repeatDelay = ((this.vars.repeatDelay) || (0));
this.cacheIsDirty = true;
if (((((((((this.vars.onCompleteListener) || (this.vars.onUpdateListener))) || (this.vars.onStartListener))) || (this.vars.onRepeatListener))) || (this.vars.onReverseCompleteListener))){
initDispatcher();
if ((((_arg2 == 0)) && ((_delay == 0)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
};
};
if (((("timeScale" in this.vars)) && (!((this.target is TweenCore))))){
this.cachedTimeScale = this.vars.timeScale;
};
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local10:Number;
var _local11:uint;
var _local12:Number;
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
var _local4:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
var _local5:Number = this.cachedTime;
if (_arg1 >= _local4){
this.cachedTotalTime = _local4;
this.cachedTime = this.cachedDuration;
this.ratio = 1;
_local6 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime > 0){
_arg3 = true;
_local6 = true;
};
_rawPrevTime = _arg1;
};
};
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local6 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
_local8 = true;
};
};
if (_repeat != 0){
_local10 = (this.cachedDuration + _repeatDelay);
if (_local6){
if (((this.yoyo) && ((_repeat % 2)))){
this.cachedTime = (this.ratio = 0);
};
} else {
if (_arg1 > 0){
if (_cyclesComplete != (_cyclesComplete = int((this.cachedTotalTime / _local10)))){
_local7 = true;
};
this.cachedTime = (((this.cachedTotalTime / _local10) - _cyclesComplete) * _local10);
if (((this.yoyo) && ((_cyclesComplete % 2)))){
this.cachedTime = (this.cachedDuration - this.cachedTime);
} else {
if (this.cachedTime >= this.cachedDuration){
this.cachedTime = this.cachedDuration;
this.ratio = 1;
_local8 = false;
};
};
if (this.cachedTime <= 0){
this.cachedTime = (this.ratio = 0);
_local8 = false;
};
};
};
};
if ((((_local5 == this.cachedTime)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
};
if (_local8){
if (_easeType){
_local11 = _easePower;
_local12 = (this.cachedTime / this.cachedDuration);
if (_easeType == 2){
_local12 = (1 - _local12);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (1 - this.ratio);
} else {
if (_easeType == 1){
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
} else {
if (_local12 < 0.5){
_local12 = (_local12 * 2);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (this.ratio * 0.5);
} else {
_local12 = ((1 - _local12) * 2);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (1 - (0.5 * this.ratio));
};
};
};
} else {
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if ((((((_local5 == 0)) && (!((this.cachedTotalTime == 0))))) && (!(_arg2)))){
if (this.vars.onStart){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
};
};
var _local9:PropTween = this.cachedPT1;
while (_local9) {
_local9.target[_local9.property] = (_local9.start + (this.ratio * _local9.change));
_local9 = _local9.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_hasUpdateListener) && (!(_arg2)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
};
if (_local6){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
} else {
if (((_local7) && (!(_arg2)))){
if (this.vars.onRepeat){
this.vars.onRepeat.apply(null, this.vars.onRepeatParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT));
};
};
};
}
public function willTrigger(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1));
}
protected function insertPropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String, _arg6:Boolean, _arg7:PropTween):PropTween{
var _local9:Array;
var _local10:int;
var _local8:PropTween = new PropTween(_arg1, _arg2, _arg3, ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4), _arg5, _arg6, _arg7);
if (((_arg6) && ((_arg5 == "_MULTIPLE_")))){
_local9 = _arg1.overwriteProps;
_local10 = _local9.length;
while (_local10--) {
this.propTweenLookup[_local9[_local10]] = _local8;
};
} else {
this.propTweenLookup[_arg5] = _local8;
};
return (_local8);
}
override protected function init():void{
var _local1:TweenMax;
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Object;
var _local7:PropTween;
var _local8:PropTween;
var _local9:int;
if (this.vars.startAt){
this.vars.startAt.overwrite = 0;
this.vars.startAt.immediateRender = true;
_local1 = new TweenMax(this.target, 0, this.vars.startAt);
};
super.init();
if ((_ease in fastEaseLookup)){
_easeType = fastEaseLookup[_ease][0];
_easePower = fastEaseLookup[_ease][1];
};
if (((!((this.vars.roundProps == null))) && (("roundProps" in TweenLite.plugins)))){
_local5 = this.vars.roundProps;
_local9 = _local5.length;
while (_local9--) {
_local3 = _local5[_local9];
_local8 = this.cachedPT1;
while (_local8) {
if (_local8.name == _local3){
if (_local8.isPlugin){
_local8.target.round = true;
} else {
if (_local6 == null){
_local6 = new TweenLite.plugins.roundProps();
_local6.add(_local8.target, _local3, _local8.start, _local8.change);
_hasPlugins = true;
_local7 = insertPropTween(_local6, "changeFactor", 0, 1, "_MULTIPLE_", true, this.cachedPT1);
this.cachedPT1 = _local7;
} else {
_local6.add(_local8.target, _local3, _local8.start, _local8.change);
};
this.removePropTween(_local8);
this.propTweenLookup[_local3] = _local7;
};
} else {
if (((((_local8.isPlugin) && ((_local8.name == "_MULTIPLE_")))) && (!(_local8.target.round)))){
_local4 = ((" " + _local8.target.overwriteProps.join(" ")) + " ");
if (_local4.indexOf(((" " + _local3) + " ")) != -1){
_local8.target.round = true;
};
};
};
_local8 = _local8.nextNode;
};
};
};
}
public function get totalProgress():Number{
return ((this.cachedTotalTime / this.totalDuration));
}
public function set currentProgress(_arg1:Number):void{
if (_cyclesComplete == 0){
setTotalTime((this.duration * _arg1), false);
} else {
setTotalTime(((this.duration * _arg1) + (_cyclesComplete * this.cachedDuration)), false);
};
}
protected function adjustStartValues():void{
var _local1:Number;
var _local2:PropTween;
var _local3:Number;
if (this.cachedTime != 0){
_local1 = (1 / (1 - this.ratio));
_local2 = this.cachedPT1;
while (_local2) {
if (!_local2.isPlugin){
_local3 = (_local2.start + _local2.change);
_local2.change = ((_local3 - _local2.target[_local2.property]) * _local1);
_local2.start = (_local3 - _local2.change);
_local2 = _local2.nextNode;
};
};
};
}
public function get repeat():int{
return (_repeat);
}
public function set totalProgress(_arg1:Number):void{
setTotalTime((this.totalDuration * _arg1), false);
}
protected function removePropTween(_arg1:PropTween):Boolean{
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (this.cachedPT1 == _arg1){
this.cachedPT1 = _arg1.nextNode;
};
};
if (((_arg1.isPlugin) && (_arg1.target.onDisable))){
_arg1.target.onDisable();
if (_arg1.target.activeDisable){
return (true);
};
};
return (false);
}
public function get repeatDelay():Number{
return (_repeatDelay);
}
protected function updateTo(_arg1:Object, _arg2:Boolean=true):void{
var _local5:String;
var _local6:Object;
var _local7:Boolean;
var _local8:Object;
var _local9:int;
var _local3:PropTween = this.cachedPT1;
var _local4:Number = this.cachedTotalTime;
if (this.initted){
if (!_arg2){
this.totalTime = 0;
};
killVars(_arg1, false);
for (_local5 in _arg1) {
if ((_local5 in _reservedProps)){
} else {
if ((((_local5 in plugins)) && (new ((plugins[_local5] as Class)).onInitTween(this.target, _arg1[_local5], this)))){
_local8 = {};
_local9 = _local6.overwriteProps.length;
while (_local9--) {
_local8[_local6.overwriteProps[_local9]] = true;
};
killVars(_local8, false);
this.cachedPT1 = insertPropTween(_local6, "changeFactor", 0, 1, ((_local6.overwriteProps.length)==1) ? _local6.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
_hasPlugins = true;
if (_local6.priority){
this.cachedPT1.priority = _local6.priority;
_local7 = true;
};
} else {
this.cachedPT1 = insertPropTween(this.target, _local5, this.target[_local5], _arg1[_local5], _local5, false, this.cachedPT1);
};
};
this.vars[_local5] = _arg1[_local5];
};
if (_local7){
onPluginEvent("onInit", this);
};
if (((_arg2) && (this.cachedTotalTime))){
adjustStartValues();
};
} else {
for (_local5 in _arg1) {
this.vars[_local5] = _arg1[_local5];
};
};
}
public function killProperties(_arg1:Array):void{
var _local2:Object = {};
var _local3:int = _arg1.length;
while (_local3--) {
_local2[_arg1[_local3]] = true;
};
killVars(_local2);
}
public function set repeat(_arg1:int):void{
_repeat = _arg1;
setDirtyCache(true);
}
override public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
super.complete(_arg1, _arg2);
if (((!(_arg2)) && (_dispatcher))){
if ((((this.cachedTotalTime == this.cachedTotalDuration)) && (!(this.cachedReversed)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
} else {
if (((this.cachedReversed) && ((this.cachedTotalTime == 0)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE));
};
};
};
}
override public function invalidate():void{
this.yoyo = Boolean((this.vars.yoyo == true));
_repeat = ((this.vars.repeat) || (0));
_repeatDelay = ((this.vars.repeatDelay) || (0));
_hasUpdateListener = false;
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
initDispatcher();
};
setDirtyCache(true);
super.invalidate();
}
public function dispatchEvent(_arg1:Event):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1));
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{
var _local4:Object = {};
_local4[_arg1] = _arg2;
updateTo(_local4, _arg3);
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_dispatcher == null){
initDispatcher();
};
if (_arg1 == TweenEvent.UPDATE){
_hasUpdateListener = true;
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function set repeatDelay(_arg1:Number):void{
_repeatDelay = _arg1;
setDirtyCache(true);
}
override public function set currentTime(_arg1:Number):void{
if (_cyclesComplete == 0){
} else {
if (((this.yoyo) && (((_cyclesComplete % 2) == 1)))){
_arg1 = ((this.duration - _arg1) + (_cyclesComplete * (this.cachedDuration + _repeatDelay)));
} else {
_arg1 = (_arg1 + (_cyclesComplete * (this.duration + _repeatDelay)));
};
};
setTotalTime(_arg1, false);
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
protected function initDispatcher():void{
if (_dispatcher == null){
_dispatcher = new EventDispatcher(this);
};
if ((this.vars.onStartListener is Function)){
_dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true);
};
if ((this.vars.onUpdateListener is Function)){
_dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true);
_hasUpdateListener = true;
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
if ((this.vars.onRepeatListener is Function)){
_dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true);
};
if ((this.vars.onReverseCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true);
};
}
override public function set totalDuration(_arg1:Number):void{
if (_repeat == -1){
return;
};
this.duration = ((_arg1 - (_repeat * _repeatDelay)) / (_repeat + 1));
}
public function hasEventListener(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1));
}
override public function get totalDuration():Number{
if (this.cacheIsDirty){
this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat));
this.cacheIsDirty = false;
};
return (this.cachedTotalDuration);
}
public function set timeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
var _local2:Number = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
public function get timeScale():Number{
return (this.cachedTimeScale);
}
public static function set globalTimeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
if (TweenLite.rootTimeline == null){
TweenLite.to({}, 0, {});
};
var _local2:SimpleTimeline = TweenLite.rootTimeline;
var _local3:Number = (getTimer() * 0.001);
_local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1));
_local2 = TweenLite.rootFramesTimeline;
_local3 = TweenLite.rootFrame;
_local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1));
TweenLite.rootFramesTimeline.cachedTimeScale = (TweenLite.rootTimeline.cachedTimeScale = _arg1);
}
public static function fromTo(_arg1:Object, _arg2:Number, _arg3:Object, _arg4:Object):TweenMax{
_arg4.startAt = _arg3;
if (_arg3.immediateRender){
_arg4.immediateRender = true;
};
return (new TweenMax(_arg1, _arg2, _arg4));
}
public static function allFromTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Object, _arg5:Number=0, _arg6:Function=null, _arg7:Array=null):Array{
_arg4.startAt = _arg3;
if (_arg3.immediateRender){
_arg4.immediateRender = true;
};
return (allTo(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7));
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(true, _arg1, _arg2);
}
public static function getTweensOf(_arg1:Object):Array{
var _local4:int;
var _local2:Array = masterList[_arg1];
var _local3:Array = [];
if (_local2){
_local4 = _local2.length;
while (_local4--) {
if (!_local2[_local4].gc){
_local3[_local3.length] = _local2[_local4];
};
};
};
return (_local3);
}
public static function get globalTimeScale():Number{
return (((TweenLite.rootTimeline)==null) ? 1 : TweenLite.rootTimeline.cachedTimeScale);
}
public static function killChildTweensOf(_arg1:DisplayObjectContainer, _arg2:Boolean=false):void{
var _local4:Object;
var _local5:DisplayObjectContainer;
var _local3:Array = getAllTweens();
var _local6:int = _local3.length;
while (_local6--) {
_local4 = _local3[_local6].target;
if ((_local4 is DisplayObject)){
_local5 = _local4.parent;
while (_local5) {
if (_local5 == _arg1){
if (_arg2){
_local3[_local6].complete(false);
} else {
_local3[_local6].setEnabled(false, false);
};
};
_local5 = _local5.parent;
};
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{
return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
public static function isTweening(_arg1:Object):Boolean{
var _local4:TweenLite;
var _local2:Array = getTweensOf(_arg1);
var _local3:int = _local2.length;
while (_local3--) {
_local4 = _local2[_local3];
if (((_local4.active) || ((((_local4.cachedStartTime == _local4.timeline.cachedTime)) && (_local4.timeline.active))))){
return (true);
};
};
return (false);
}
public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local5:Boolean;
var _local4:Array = getAllTweens();
var _local6:int = _local4.length;
while (_local6--) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
if (_arg1){
_local4[_local6].complete(false);
} else {
_local4[_local6].setEnabled(false, false);
};
};
};
}
private static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local5:Boolean;
var _local4:Array = getAllTweens();
var _local6:int = _local4.length;
while (_local6--) {
_local5 = (TweenLite(_local4[_local6]).target == TweenLite(_local4[_local6]).vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
TweenCore(_local4[_local6]).paused = _arg1;
};
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (allTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
public static function getAllTweens():Array{
var _local4:Array;
var _local5:int;
var _local1:Dictionary = masterList;
var _local2:uint;
var _local3:Array = [];
for each (_local4 in _local1) {
_local5 = _local4.length;
while (_local5--) {
if (!TweenLite(_local4[_local5]).gc){
var _temp1 = _local2;
_local2 = (_local2 + 1);
var _local8 = _temp1;
_local3[_local8] = _local4[_local5];
};
};
};
return (_local3);
}
public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(false, _arg1, _arg2);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{
var i:int;
var varsDup:Object;
var p:String;
var onCompleteProxy:Function;
var onCompleteParamsProxy:Array;
var targets = _arg1;
var duration = _arg2;
var vars = _arg3;
var stagger = _arg4;
var onCompleteAll = _arg5;
var onCompleteAllParams = _arg6;
var l:uint = targets.length;
var a:Array = [];
var curDelay:Number = ((vars.delay) || (0));
onCompleteProxy = vars.onComplete;
onCompleteParamsProxy = vars.onCompleteParams;
var lastIndex:int = ((stagger)<=0) ? 0 : (l - 1);
i = 0;
while (i < l) {
varsDup = {};
for (p in vars) {
varsDup[p] = vars[p];
};
varsDup.delay = curDelay;
if ((((i == lastIndex)) && (!((onCompleteAll == null))))){
varsDup.onComplete = function ():void{
if (onCompleteProxy != null){
onCompleteProxy.apply(null, onCompleteParamsProxy);
};
onCompleteAll.apply(null, onCompleteAllParams);
};
};
a[a.length] = new TweenMax(targets[i], duration, varsDup);
curDelay = (curDelay + stagger);
i = (i + 1);
};
return (a);
}
TweenPlugin.activate([AutoAlphaPlugin, EndArrayPlugin, FramePlugin, RemoveTintPlugin, TintPlugin, VisiblePlugin, VolumePlugin, BevelFilterPlugin, BezierPlugin, BezierThroughPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, ColorTransformPlugin, DropShadowFilterPlugin, FrameLabelPlugin, GlowFilterPlugin, HexColorsPlugin, RoundPropsPlugin, ShortRotationPlugin, {}]);
}
}//package com.greensock
Section 33
//IndeterminateBar (fl.controls.progressBarClasses.IndeterminateBar)
package fl.controls.progressBarClasses {
import flash.display.*;
import fl.core.*;
import flash.events.*;
public class IndeterminateBar extends UIComponent {
protected var animationCount:uint;// = 0
protected var patternBmp:BitmapData;
protected var bar:Sprite;
protected var barMask:Sprite;
private static var defaultStyles:Object = {indeterminateSkin:"ProgressBar_indeterminateSkin"};
public function IndeterminateBar(){
setSize(0, 0);
startAnimation();
}
protected function startAnimation():void{
addEventListener(Event.ENTER_FRAME, handleEnterFrame, false, 0, true);
}
override public function set visible(_arg1:Boolean):void{
if (_arg1){
startAnimation();
} else {
stopAnimation();
};
super.visible = _arg1;
}
override protected function configUI():void{
bar = new Sprite();
addChild(bar);
barMask = new Sprite();
addChild(barMask);
bar.mask = barMask;
}
protected function stopAnimation():void{
removeEventListener(Event.ENTER_FRAME, handleEnterFrame);
}
protected function drawPattern():void{
var _local1:DisplayObject = getDisplayObjectInstance(getStyleValue("indeterminateSkin"));
if (patternBmp){
patternBmp.dispose();
};
patternBmp = new BitmapData((_local1.width << 0), (_local1.height << 0), true, 0);
patternBmp.draw(_local1);
}
protected function drawBar():void{
if (patternBmp == null){
return;
};
var _local1:Graphics = bar.graphics;
_local1.clear();
_local1.beginBitmapFill(patternBmp);
_local1.drawRect(0, 0, (_width + patternBmp.width), _height);
_local1.endFill();
}
protected function drawMask():void{
var _local1:Graphics = barMask.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, _width, _height);
_local1.endFill();
}
override public function get visible():Boolean{
return (super.visible);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawPattern();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawBar();
drawMask();
};
super.draw();
}
protected function handleEnterFrame(_arg1:Event):void{
if (patternBmp == null){
return;
};
animationCount = ((animationCount + 2) % patternBmp.width);
bar.x = -(animationCount);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.progressBarClasses
Section 34
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var 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 35
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var _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 36
//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 37
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
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 38
//ProgressBar (fl.controls.ProgressBar)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.controls.progressBarClasses.*;
public class ProgressBar extends UIComponent {
protected var _direction:String;// = "right"
protected var _mode:String;// = "event"
protected var _loaded:Number;
protected var _source:Object;
protected var _indeterminate:Boolean;// = true
protected var track:DisplayObject;
protected var _minimum:Number;// = 0
protected var indeterminateBar:UIComponent;
protected var _maximum:Number;// = 0
protected var _value:Number;// = 0
protected var determinateBar:DisplayObject;
private static var defaultStyles:Object = {trackSkin:"ProgressBar_trackSkin", barSkin:"ProgressBar_barSkin", indeterminateSkin:"ProgressBar_indeterminateSkin", indeterminateBar:IndeterminateBar, barPadding:0};
protected function handleComplete(_arg1:Event):void{
_setProgress(_maximum, _maximum, true);
dispatchEvent(_arg1);
}
public function set sourceName(_arg1:String):void{
if (!componentInspectorSetting){
return;
};
if (_arg1 == ""){
return;
};
var _local2:DisplayObject = (parent.getChildByName(_arg1) as DisplayObject);
if (_local2 == null){
throw (new Error((("Source clip '" + _arg1) + "' not found on parent.")));
};
source = _local2;
}
public function get minimum():Number{
return (_minimum);
}
protected function drawLayout():void{
var _local1:Number = Number(getStyleValue("barPadding"));
track.width = width;
track.height = height;
indeterminateBar.setSize((width - (_local1 * 2)), (height - (_local1 * 2)));
indeterminateBar.move(_local1, _local1);
indeterminateBar.drawNow();
determinateBar.height = (height - (_local1 * 2));
determinateBar.y = _local1;
}
public function get source():Object{
return (_source);
}
protected function resetProgress():void{
if ((((_mode == ProgressBarMode.EVENT)) && (!((_source == null))))){
cleanupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
removeEventListener(Event.ENTER_FRAME, pollSource);
} else {
if (_source != null){
_source = null;
};
};
};
_minimum = (_maximum = (_value = 0));
}
public function get maximum():Number{
return (_maximum);
}
public function set minimum(_arg1:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_minimum = _arg1;
invalidate(InvalidationType.DATA);
}
public function get percentComplete():Number{
return (((((_maximum <= _minimum)) || ((_value <= _minimum)))) ? 0 : Math.max(0, Math.min(100, (((_value - _minimum) / (_maximum - _minimum)) * 100))));
}
public function get mode():String{
return (_mode);
}
protected function drawBars():void{
var _local1:DisplayObject = determinateBar;
var _local2:DisplayObject = indeterminateBar;
determinateBar = getDisplayObjectInstance(getStyleValue("barSkin"));
addChild(determinateBar);
indeterminateBar = (getDisplayObjectInstance(getStyleValue("indeterminateBar")) as UIComponent);
indeterminateBar.setStyle("indeterminateSkin", getStyleValue("indeterminateSkin"));
addChild(indeterminateBar);
if (((!((_local1 == null))) && (!((_local1 == determinateBar))))){
removeChild(_local1);
};
if (((!((_local2 == null))) && (!((_local2 == determinateBar))))){
removeChild(_local2);
};
}
public function setProgress(_arg1:Number, _arg2:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_setProgress(_arg1, _arg2);
}
protected function setupSourceEvents():void{
_source.addEventListener(ProgressEvent.PROGRESS, handleProgress, false, 0, true);
_source.addEventListener(Event.COMPLETE, handleComplete, false, 0, true);
}
public function set source(_arg1:Object):void{
if (_source == _arg1){
return;
};
if (_mode != ProgressBarMode.MANUAL){
resetProgress();
};
_source = _arg1;
if (_source == null){
return;
};
if (_mode == ProgressBarMode.EVENT){
setupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
}
public function get indeterminate():Boolean{
return (_indeterminate);
}
public function set maximum(_arg1:Number):void{
setProgress(_value, _arg1);
}
protected function pollSource(_arg1:Event):void{
if (_source == null){
return;
};
_setProgress(_source.bytesLoaded, _source.bytesTotal, true);
if ((((_maximum > 0)) && ((_maximum == _value)))){
removeEventListener(Event.ENTER_FRAME, pollSource);
dispatchEvent(new Event(Event.COMPLETE));
};
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawTrack();
drawBars();
invalidate(InvalidationType.STATE, false);
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.STATE)){
indeterminateBar.visible = _indeterminate;
determinateBar.visible = !(_indeterminate);
invalidate(InvalidationType.DATA, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
invalidate(InvalidationType.DATA, false);
};
if (((isInvalid(InvalidationType.DATA)) && (!(_indeterminate)))){
drawDeterminateBar();
};
super.draw();
}
public function set mode(_arg1:String):void{
if (_mode == _arg1){
return;
};
resetProgress();
_mode = _arg1;
if ((((_arg1 == ProgressBarMode.EVENT)) && (!((_source == null))))){
setupSourceEvents();
} else {
if (_arg1 == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
setIndeterminate(!((_mode == ProgressBarMode.MANUAL)));
}
public function reset():void{
_setProgress(0, 0);
var _local1:Object = _source;
_source = null;
source = _local1;
}
protected function drawDeterminateBar():void{
var _local1:Number = (percentComplete / 100);
var _local2:Number = Number(getStyleValue("barPadding"));
determinateBar.width = Math.round(((width - (_local2 * 2)) * _local1));
determinateBar.x = ((_direction)==ProgressBarDirection.LEFT) ? ((width - _local2) - determinateBar.width) : _local2;
}
override protected function configUI():void{
super.configUI();
}
protected function cleanupSourceEvents():void{
_source.removeEventListener(ProgressEvent.PROGRESS, handleProgress);
_source.removeEventListener(Event.COMPLETE, handleComplete);
}
public function set value(_arg1:Number):void{
setProgress(_arg1, _maximum);
}
protected function drawTrack():void{
var _local1:DisplayObject = track;
track = getDisplayObjectInstance(getStyleValue("trackSkin"));
addChildAt(track, 0);
if (((!((_local1 == null))) && (!((_local1 == track))))){
removeChild(_local1);
};
}
protected function _setProgress(_arg1:Number, _arg2:Number, _arg3:Boolean=false):void{
if ((((_arg1 == _value)) && ((_arg2 == _maximum)))){
return;
};
_value = _arg1;
_maximum = _arg2;
if (((!((_value == _loaded))) && (_arg3))){
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _value, _maximum));
_loaded = _value;
};
if (_mode != ProgressBarMode.MANUAL){
setIndeterminate((_arg2 == 0));
};
invalidate(InvalidationType.DATA);
}
public function get value():Number{
return (_value);
}
protected function handleProgress(_arg1:ProgressEvent):void{
_setProgress(_arg1.bytesLoaded, _arg1.bytesTotal, true);
}
public function set indeterminate(_arg1:Boolean):void{
if (((!((_mode == ProgressBarMode.MANUAL))) || ((_indeterminate == _arg1)))){
return;
};
setIndeterminate(_arg1);
}
protected function setIndeterminate(_arg1:Boolean):void{
if (_indeterminate == _arg1){
return;
};
_indeterminate = _arg1;
invalidate(InvalidationType.STATE);
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidate(InvalidationType.DATA);
}
public function get direction():String{
return (_direction);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 39
//ProgressBarDirection (fl.controls.ProgressBarDirection)
package fl.controls {
public class ProgressBarDirection {
public static const RIGHT:String = "right";
public static const LEFT:String = "left";
}
}//package fl.controls
Section 40
//ProgressBarMode (fl.controls.ProgressBarMode)
package fl.controls {
public class ProgressBarMode {
public static const MANUAL:String = "manual";
public static const EVENT:String = "event";
public static const POLLED:String = "polled";
}
}//package fl.controls
Section 41
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 42
//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 43
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
import flash.utils.*;
import fl.events.*;
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 44
//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 45
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
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 46
//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 47
//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 48
//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 49
//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 50
//Pg4_Text_96 (MatchPlaySimulator_fla.Pg4_Text_96)
package MatchPlaySimulator_fla {
import flash.display.*;
public dynamic class Pg4_Text_96 extends MovieClip {
public var mcTen:MovieClip;
public function Pg4_Text_96(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package MatchPlaySimulator_fla
Section 51
//Preloader_1 (MatchPlaySimulator_fla.Preloader_1)
package MatchPlaySimulator_fla {
import fl.controls.*;
import flash.display.*;
import flash.filters.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.errors.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Preloader_1 extends MovieClip {
public var pbProgress:ProgressBar;
public function Preloader_1(){
__setProp_pbProgress_Preloader_Layer1_0();
}
function __setProp_pbProgress_Preloader_Layer1_0(){
try {
pbProgress["componentInspectorSetting"] = true;
} catch(e:Error) {
};
pbProgress.direction = "right";
pbProgress.enabled = true;
pbProgress.mode = "manual";
pbProgress.sourceName = "";
pbProgress.visible = true;
try {
pbProgress["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package MatchPlaySimulator_fla
Section 52
//BackButton (BackButton)
package {
import flash.display.*;
public dynamic class BackButton extends MovieClip {
}
}//package
Section 53
//Ball (Ball)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class Ball extends MovieClip {
public var friction:Number;// = 0.9
private var lastY:Number;// = -9999
private var dragging:Boolean;// = false
private var radius:Number;
public var gravity:Number;// = 1
public var rotOff:int;// = 0
public var txtNumber:TextField;
private var pos:Object;
public var vel:Object;
private var old:Object;
public var restitution:Number;// = 0.6
private var movie:Object;
public var maxY:Number;
public var maxX:Number;
public function Ball():void{
vel = {x:0, y:0};
pos = {};
old = {};
movie = {width:400, height:300};
super();
this.addEventListener(Event.ADDED, onAdded);
this.mouseChildren = false;
}
private function onBallMouseUp(_arg1:MouseEvent):void{
dragging = false;
_arg1.target.stopDrag();
}
private function onBallMouseDown(_arg1:MouseEvent):void{
dragging = true;
_arg1.target.startDrag(true);
}
private function onAdded(_arg1:Event):void{
pos = {x:this.x, y:this.y};
radius = (this.width / 2);
this.addEventListener(Event.ENTER_FRAME, onFrameEnter);
}
private function onFrameEnter(_arg1:Event):void{
if (!dragging){
this.rotation = (this.x + rotOff);
vel.y = (vel.y + gravity);
pos.x = (pos.x + vel.x);
pos.y = (pos.y + vel.y);
if ((pos.y + radius) > maxY){
pos.y = (maxY - radius);
vel.y = (vel.y * -(restitution));
vel.x = (vel.x * friction);
if (lastY != pos.y){
this.dispatchEvent(new Event("SoundBall", true, false));
};
};
if ((pos.x + radius) > maxX){
pos.x = (maxX - radius);
vel.x = (vel.x * -(restitution));
};
if (pos.x < radius){
pos.x = radius;
vel.x = (vel.x * -(restitution));
};
lastY = pos.y;
this.x = pos.x;
this.y = pos.y;
} else {
old.x = pos.x;
old.y = pos.y;
pos.x = x;
pos.y = y;
vel.x = ((pos.x - old.x) / 2);
vel.y = ((pos.y - old.y) / 2);
};
}
}
}//package
Section 54
//BasePage (BasePage)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
import flash.media.*;
public class BasePage extends MovieClip {
private var glowTime:TimelineMax;
private var _BackEnabled:Boolean;// = false
private var mcDisclaimer:MovieClip;
private var btnMute:MovieClip;
private var btnBack:MovieClip;
private var muted:Boolean;// = false
var btnNext:MovieClip;
private var _NextEnabled:Boolean;// = false
public function BasePage():void{
TweenPlugin.activate([GlowFilterPlugin]);
btnNext = new NextButton();
btnNext.x = (707 + 14);
btnNext.y = (463 + 21);
this.addChild(btnNext);
btnNext.addEventListener(MouseEvent.CLICK, onNextClick);
btnNext.buttonMode = true;
btnBack = new BackButton();
btnBack.x = (677 + 14);
btnBack.y = (463 + 21);
this.addChild(btnBack);
btnBack.addEventListener(MouseEvent.CLICK, onBackClick);
btnBack.buttonMode = true;
btnMute = new MuteButton();
btnMute.x = (647 + 14);
btnMute.y = (463 + 21);
this.addChild(btnMute);
btnMute.addEventListener(MouseEvent.CLICK, onMuteClick);
btnMute.buttonMode = true;
mcDisclaimer = new Disclaimer();
mcDisclaimer.y = 488;
mcDisclaimer.x = (380 - (mcDisclaimer.width / 2));
this.addChild(mcDisclaimer);
if (!_BackEnabled){
btnBack.alpha = 0.2;
btnBack.removeEventListener(MouseEvent.CLICK, onBackClick);
btnBack.buttonMode = false;
};
if (!_NextEnabled){
btnNext.alpha = 0.2;
btnNext.removeEventListener(MouseEvent.CLICK, onNextClick);
btnNext.buttonMode = false;
};
var _local1:SoundTransform = SoundMixer.soundTransform;
if (_local1.volume == 0){
btnMute.gotoAndStop(1);
muted = true;
} else {
btnMute.gotoAndStop(2);
};
this.addEventListener(Event.REMOVED, onRemoved);
}
private function onRemoved(_arg1:Event):void{
}
private function onBackClick(_arg1:MouseEvent):void{
this.dispatchEvent(new Event("BackClick", true, false));
this.dispatchEvent(new Event("SoundWhoosh", true));
}
function addNextListener():void{
btnNext.addEventListener(MouseEvent.CLICK, onNextClick);
}
private function animateNextOn():void{
var _local1:TimelineLite = new TimelineLite();
_local1.append(new TweenLite(btnNext, 0.5, {alpha:1, scaleX:1.2, scaleY:1.2, easing:Elastic.easeOut}));
_local1.append(new TweenLite(btnNext, 0.5, {scaleX:1, scaleY:1, easing:Elastic.easeOut}));
glowTime = new TimelineMax({delay:4, repeat:-1});
glowTime.append(new TweenMax(btnNext, 2, {scaleX:1.1, scaleY:1.1, glowFilter:{color:0xFFFFFF, alpha:1, blurX:10, blurY:10, strength:1.5}}));
glowTime.append(new TweenMax(btnNext, 2, {scaleX:1, scaleY:1, glowFilter:{color:0xFFFFFF, alpha:0, blurX:0, blurY:0}}));
btnNext.addEventListener(MouseEvent.CLICK, onNextClick);
btnNext.buttonMode = true;
}
private function onMuteClick(_arg1:MouseEvent):void{
muted = !(muted);
var _local2:SoundTransform = new SoundTransform();
if (muted){
_local2.volume = 0;
btnMute.gotoAndStop(1);
} else {
_local2.volume = 1;
btnMute.gotoAndStop(2);
};
SoundMixer.soundTransform = _local2;
this.dispatchEvent(new Event("MuteClick", true, false));
}
public function showControls(_arg1:Number, _arg2:Number=0, _arg3:Function=null):void{
var _local4:TimelineMax = new TimelineMax({onComplete:_arg3});
_local4.insertMultiple(TweenMax.allTo([btnMute, btnBack, btnNext], _arg1, {y:484}, _arg2), 0);
}
public function hideControls(_arg1:Number, _arg2:Number=0, _arg3:Function=null):void{
var _local4:TimelineMax = new TimelineMax({onComplete:_arg3});
_local4.insertMultiple(TweenMax.allTo([btnNext, btnBack, btnMute], _arg1, {y:550}, _arg2), 0);
}
private function animateNextOff():void{
if (glowTime != null){
glowTime.kill();
};
new TweenLite(btnNext, 1, {alpha:0.2, easing:Elastic.easeOut});
btnNext.removeEventListener(MouseEvent.CLICK, onNextClick);
btnNext.buttonMode = false;
}
public function set NextEnabled(_arg1:Boolean):void{
_NextEnabled = _arg1;
if (_NextEnabled){
animateNextOn();
} else {
animateNextOff();
};
}
private function animateBackOn():void{
var _local1:TimelineLite = new TimelineLite();
_local1.append(new TweenLite(btnBack, 0.5, {alpha:1, scaleX:1.2, scaleY:1.2, easing:Elastic.easeOut}));
_local1.append(new TweenLite(btnBack, 0.5, {scaleX:1, scaleY:1, easing:Elastic.easeOut}));
btnBack.addEventListener(MouseEvent.CLICK, onBackClick);
btnBack.buttonMode = true;
}
private function animateBackOff():void{
new TweenLite(btnBack, 1, {alpha:0.2, easing:Elastic.easeOut});
btnBack.removeEventListener(MouseEvent.CLICK, onBackClick);
btnBack.buttonMode = false;
}
function removeNextListener():void{
btnNext.removeEventListener(MouseEvent.CLICK, onNextClick);
}
public function set BackEnabled(_arg1:Boolean):void{
_BackEnabled = _arg1;
if (_BackEnabled){
animateBackOn();
} else {
animateBackOff();
};
}
public function get NextEnabled():Boolean{
return (_NextEnabled);
}
private function onNextClick(_arg1:MouseEvent):void{
this.dispatchEvent(new Event("NextClick", true, false));
this.dispatchEvent(new Event("SoundWhoosh", true));
}
public function get BackEnabled():Boolean{
return (_BackEnabled);
}
}
}//package
Section 55
//BoardButton (BoardButton)
package {
import flash.display.*;
import flash.events.*;
public class BoardButton extends MovieClip {
private var _value:Object;// = null
public var mcFilled:MovieClip;
private var _selected:Boolean;// = false
public function BoardButton():void{
this.addEventListener(MouseEvent.CLICK, onClick);
this.buttonMode = true;
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
private function onClick(_arg1:MouseEvent):void{
if (!_selected){
this.mcFilled.alpha = 1;
this.dispatchEvent(new Event("SoundPencil", true));
} else {
this.mcFilled.alpha = 0;
this.dispatchEvent(new Event("SoundEraser", true));
};
_selected = !(_selected);
this.dispatchEvent(new Event("BoardButtonClicked", true, false));
}
public function get value():Object{
return (_value);
}
public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_selected){
this.mcFilled.alpha = 1;
} else {
this.mcFilled.alpha = 0;
};
}
public function get selected():Boolean{
return (_selected);
}
}
}//package
Section 56
//Bubble (Bubble)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import flash.text.*;
public class Bubble extends MovieClip {
private var _targetWidth:int;// = 0
public var txtMessage:TextField;
public var mcBubbleShape:MovieClip;
public function Bubble():void{
this.addEventListener(Event.ADDED, onAdded);
this.mcBubbleShape.scaleX = 0.01;
this.mcBubbleShape.scaleY = 0.01;
this.txtMessage.width = 0;
}
private function onAdded(_arg1:Event):void{
new TweenLite(this.mcBubbleShape, 0.2, {scaleX:1, scaleY:1, onComplete:expand});
}
public function contract():void{
new TweenLite(this.txtMessage, 0.75, {width:0});
new TweenLite(this.mcBubbleShape, 0.75, {width:132});
new TweenLite(this.mcBubbleShape, 0.2, {scaleX:0.01, scaleY:0.01, alpha:0});
this.dispatchEvent(new Event("BubbleContracted", true, false));
}
public function get targetWidth():int{
return (_targetWidth);
}
private function expand():void{
new TweenLite(this.mcBubbleShape, 0.75, {width:_targetWidth});
new TweenLite(this.txtMessage, 0.75, {width:_targetWidth});
this.dispatchEvent(new Event("BubbleExpanded", true, false));
}
public function set targetWidth(_arg1:int):void{
_targetWidth = _arg1;
}
}
}//package
Section 57
//BubbleFlipped (BubbleFlipped)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import flash.text.*;
public class BubbleFlipped extends MovieClip {
private var _mc:MovieClip;// = null
private var _targetWidth:int;// = 0
public var txtMessage:TextField;
public var mcBubbleShape:MovieClip;
public function BubbleFlipped():void{
this.addEventListener(Event.ADDED, onAdded);
this.mcBubbleShape.scaleX = 0.01;
this.mcBubbleShape.scaleY = 0.01;
this.txtMessage.width = 0;
}
private function onAdded(_arg1:Event):void{
new TweenLite(this.mcBubbleShape, 0.2, {scaleX:1, scaleY:1, onComplete:expand});
}
public function set targetWidth(_arg1:int):void{
_targetWidth = _arg1;
}
public function contract():void{
new TweenLite(this.txtMessage, 0.75, {width:0});
new TweenLite(this.mcBubbleShape, 0.75, {width:132});
new TweenLite(this.mcBubbleShape, 0.2, {scaleX:0.01, scaleY:0.01, alpha:0});
this.dispatchEvent(new Event("BubbleContracted", true, false));
}
private function expand():void{
new TweenLite(this.mcBubbleShape, 0.75, {width:_targetWidth});
new TweenLite(this.txtMessage, 0.75, {width:_targetWidth, x:((_targetWidth + 25) * -1)});
this.dispatchEvent(new Event("BubbleExpanded", true, false));
}
public function set mc(_arg1:MovieClip):void{
_mc = _arg1;
_mc.x = ((this._targetWidth / 2) - (_mc.width / 2));
_mc.y = ((this.height / 2) - (_mc.width / 2));
this.addChild(_mc);
}
public function get targetWidth():int{
return (_targetWidth);
}
public function get mc():MovieClip{
return (_mc);
}
}
}//package
Section 58
//Disclaimer (Disclaimer)
package {
import flash.display.*;
public dynamic class Disclaimer extends MovieClip {
}
}//package
Section 59
//MatchPlaySimulator (MatchPlaySimulator)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import com.greensock.easing.*;
import flash.media.*;
public class MatchPlaySimulator extends MovieClip {
public var mcPreloader:MovieClip;
private var pencilSound:SoundPencilFill;
public var numbersSelected:Array;
public var numbersDrawn:Array;
private var currentPageNumber:int;// = 1
public var numbersLine2:Array;
public var numbersLine3:Array;
public var currentScenario:String;
private var currentPage:MovieClip;
private var whooshSound:SoundWhoosh;
private var pageTurnSound:SoundPageTurn;
public var scenariosAll:Array;
public var scenariosRemaining;
private var bubbleChannel:SoundChannel;
public var numbersSelectedType:String;// = "Manual"
private var ballSound1:SoundBall1;
private var ballSound2:SoundBall2;
private var bubbleSound:SoundBloop;
private var ballSound4:SoundBall4;
private var ballSound5:SoundBall5;
private var ballSound6:SoundBall6;
private var ballSound7:SoundBall7;
private var ballSound8:SoundBall8;
private var eraserSound:SoundEraser;
private var ballSound3:SoundBall3;
public function MatchPlaySimulator():void{
scenariosAll = ["Loss", "Jackpot"];
scenariosRemaining = [];
numbersSelected = [];
numbersDrawn = [];
numbersLine2 = [];
numbersLine3 = [];
super();
this.stop();
var _local1:* = 1;
while (_local1 < 21) {
scenariosAll.push("BreakEvenCombined");
_local1++;
};
var _local2:* = 1;
while (_local2 < 15) {
scenariosAll.push("BreakEvenLine");
_local2++;
};
var _local3:* = 1;
while (_local3 < 61) {
scenariosAll.push("Multiline");
_local3++;
};
scenariosRemaining = SimulatorUtil.shuffleArray(scenariosAll);
bubbleSound = new SoundBloop();
pageTurnSound = new SoundPageTurn();
pencilSound = new SoundPencilFill();
eraserSound = new SoundEraser();
whooshSound = new SoundWhoosh();
ballSound1 = new SoundBall1();
ballSound2 = new SoundBall2();
ballSound3 = new SoundBall3();
ballSound4 = new SoundBall4();
ballSound5 = new SoundBall5();
ballSound6 = new SoundBall6();
ballSound7 = new SoundBall7();
ballSound8 = new SoundBall8();
this.addEventListener("EnableNextButton", onNextEnable);
this.addEventListener("EnableBackButton", onBackEnable);
this.addEventListener("DisableNextButton", onNextDisable);
this.addEventListener("DisableBackButton", onBackDisable);
this.addEventListener("NextClick", onNextClick);
this.addEventListener("BackClick", onBackClick);
this.addEventListener("BoardButtonClicked", onBoardButtonClicked);
this.addEventListener("UpdateScenario", onScenarioUpdate);
this.addEventListener("PlayAgain", onPlayAgain);
this.addEventListener("SoundBubble", onSoundBubble);
this.addEventListener("SoundPage", onSoundPage);
this.addEventListener("SoundPencil", onSoundPencil);
this.addEventListener("SoundEraser", onSoundEraser);
this.addEventListener("SoundWhoosh", onSoundWhoosh);
this.addEventListener("SoundBall", onSoundBall);
this.addEventListener(Event.ENTER_FRAME, onPreloadEnterFrame);
}
private function onBackEnable(_arg1:Event):void{
currentPage.BackEnabled = true;
}
private function onReady():void{
if (mcPreloader != null){
this.removeChild(mcPreloader);
mcPreloader = null;
};
var _local1:* = new Page01();
this.addChild(_local1);
currentPage = _local1;
}
private function onBoardButtonClicked(_arg1):void{
numbersSelected = currentPage.numbersSelected.sort(Array.NUMERIC);
if (_arg1.target.name == "btnVoid"){
numbersSelectedType = "";
} else {
if (_arg1.target.name == "btnQP"){
numbersSelectedType = "QP";
numbersSelected = SimulatorUtil.getPlayerQuickPic();
} else {
numbersSelectedType = "Manual";
};
};
}
private function onNextDisable(_arg1:Event):void{
currentPage.NextEnabled = false;
}
private function onNextEnable(_arg1:Event):void{
currentPage.NextEnabled = true;
}
private function onSoundPencil(_arg1=null):void{
bubbleChannel = pencilSound.play();
}
private function onSoundBall(_arg1=null):void{
var _local2:Array = [ballSound1, ballSound2, ballSound3, ballSound4, ballSound5, ballSound5, ballSound6, ballSound7, ballSound8];
var _local3:Sound = _local2[SimulatorUtil.randRange(1, 8)];
bubbleChannel = _local3.play();
}
private function onSoundPage(_arg1=null):void{
bubbleChannel = pageTurnSound.play();
}
private function onSoundBubble(_arg1=null):void{
bubbleChannel = bubbleSound.play();
}
private function onSoundWhoosh(_arg1=null):void{
bubbleChannel = whooshSound.play();
}
private function onSoundEraser(_arg1=null):void{
bubbleChannel = eraserSound.play();
}
private function onBackDisable(_arg1:Event):void{
currentPage.BackEnabled = false;
}
private function goToPage(_arg1:int):void{
var _local2:MovieClip;
switch (_arg1){
case 1:
_local2 = new Page01();
break;
case 2:
_local2 = new Page02();
break;
case 3:
_local2 = new Page03();
break;
case 4:
_local2 = new Page04();
break;
case 5:
_local2 = new Page05();
_local2.currentScenario = currentScenario;
_local2.numbersSelected = numbersSelected;
_local2.numbersSelectedType = numbersSelectedType;
break;
case 6:
_local2 = new Page06();
break;
};
if (_arg1 > currentPageNumber){
_local2.x = this.width;
this.addChild(_local2);
new TweenLite(currentPage, 1, {x:(0 - this.width), ease:Back.easeIn});
new TweenLite(_local2, 1, {x:0, onComplete:onPageIn, ease:Back.easeIn, onCompleteParams:[_local2, currentPage]});
} else {
_local2.x = (0 - this.width);
this.addChild(_local2);
new TweenLite(currentPage, 1, {x:this.width, ease:Back.easeIn});
new TweenLite(_local2, 1, {x:0, onComplete:onPageIn, ease:Back.easeIn, onCompleteParams:[_local2, currentPage]});
};
currentPageNumber = _arg1;
}
private function onNextClick(_arg1:Event):void{
goToPage((currentPageNumber + 1));
}
private function onScenarioUpdate(_arg1):void{
if (scenariosRemaining.length == 0){
scenariosRemaining = SimulatorUtil.shuffleArray(scenariosAll);
};
currentScenario = scenariosRemaining[0];
scenariosRemaining.splice(0, 1);
}
private function onPreloadEnterFrame(_arg1:Event):void{
mcPreloader.pbProgress.setProgress(this.loaderInfo.bytesLoaded, this.loaderInfo.bytesTotal);
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
this.removeEventListener(Event.ENTER_FRAME, onPreloadEnterFrame);
new TweenLite(mcPreloader, 0.5, {y:"-100", alpha:0, onComplete:onReady});
};
}
private function onBackClick(_arg1:Event):void{
goToPage((currentPageNumber - 1));
}
private function onPageIn(_arg1, _arg2):void{
currentPage = null;
currentPage = _arg1;
this.removeChild(_arg2);
}
private function onPlayAgain(_arg1):void{
onScenarioUpdate(_arg1);
goToPage(4);
}
}
}//package
Section 60
//MuteButton (MuteButton)
package {
import flash.display.*;
public dynamic class MuteButton extends MovieClip {
public function MuteButton(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 61
//NextButton (NextButton)
package {
import flash.display.*;
public dynamic class NextButton extends MovieClip {
}
}//package
Section 62
//Page01 (Page01)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import com.greensock.easing.*;
public class Page01 extends BasePage {
public var txt1:Pg1_2Dollars;
public var mcBubble:MovieClip;
public var txt3:Pg1_4Ways;
public var txt2:Pg1_3Lines;
public var mcHeader:MovieClip;
public function Page01():void{
this.alpha = 0;
mcBubble.scaleX = (mcBubble.scaleY = 0);
hideControls(0);
new TweenLite(this, 0.5, {alpha:1, onComplete:onReady});
}
private function onControlsShowing():void{
this.dispatchEvent(new Event("EnableNextButton", true, false));
}
private function onLine1Complete():void{
onLine2Complete();
}
private function onLine2Complete():void{
new TweenLite(mcBubble, 1, {delay:0.5, scaleX:1, scaleY:1, ease:Elastic.easeOut, onStart:playSound, onComplete:onBubbleExpanded});
}
private function playSound():void{
this.dispatchEvent(new Event("SoundBubble", true));
}
private function onReady():void{
txt1.x = stage.stageWidth;
txt1.alpha = 0;
txt1.y = 252;
this.addChild(txt1);
txt2.x = stage.stageWidth;
txt2.alpha = 0;
txt2.y = 252;
this.addChild(txt2);
txt3.x = stage.stageWidth;
txt3.y = 252;
txt3.alpha = 0;
this.addChild(txt3);
var _local1:TimelineLite = new TimelineLite({onComplete:onLine1Complete});
_local1.append(new TweenLite(txt1, 0.75, {alpha:1, x:85}));
_local1.append(new TweenLite(txt2, 0.75, {alpha:1, x:235}));
_local1.append(new TweenLite(txt3, 0.75, {alpha:1, x:465}));
}
private function onBubbleExpanded(_arg1=null):void{
showControls(0.5, 0.5, onControlsShowing);
}
}
}//package
Section 63
//Page02 (Page02)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import com.greensock.easing.*;
public class Page02 extends BasePage {
public var mcTicket:MovieClip;
public var mc01:MovieClip;
public var mc02:MovieClip;
public var mc03:MovieClip;
public var mc04:MovieClip;
public function Page02():void{
mcTicket.alpha = (mc01.alpha = (mc02.alpha = (mc03.alpha = (mc04.alpha = 0))));
mcTicket.scaleX = (mcTicket.scaleY = 0.01);
mc01.scaleX = (mc01.scaleY = 0);
mc02.scaleX = (mc02.scaleY = 0);
mc03.scaleX = (mc03.scaleY = 0);
mc04.scaleX = (mc04.scaleY = 0);
mc01.mc.txt.alpha = 0;
mc02.mc.txt.alpha = 0;
mc03.mc.txt.alpha = 0;
mc04.mc.txt.alpha = 0;
var _local1:TimelineMax = new TimelineMax({delay:1, onComplete:onTimelineDone});
_local1.append(new TweenLite(mcTicket, 0.5, {alpha:1, scaleX:1, scaleY:1, rotation:720}));
_local1.append(new TweenLite(mc01, 0.5, {alpha:1, scaleX:1, scaleY:1}));
_local1.append(new TweenLite(mc01.mc.txt, 0.5, {alpha:1, delay:1}));
_local1.append(new TweenLite(mc02, 0.5, {alpha:1, scaleX:1, scaleY:1}));
_local1.append(new TweenLite(mc02.mc.txt, 0.5, {alpha:1, delay:1}));
_local1.append(new TweenLite(mc03, 0.5, {alpha:1, scaleX:1, scaleY:1}));
_local1.append(new TweenLite(mc03.mc.txt, 0.5, {alpha:1, delay:1}));
_local1.append(new TweenLite(mc04, 0.5, {alpha:1, scaleX:1, scaleY:1}));
_local1.append(new TweenLite(mc04.mc.txt, 0.5, {alpha:1, delay:1}));
}
private function onTimelineDone():void{
this.dispatchEvent(new Event("EnableBackButton", true, false));
this.dispatchEvent(new Event("EnableNextButton", true, false));
}
}
}//package
Section 64
//Page03 (Page03)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
public class Page03 extends BasePage {
public var mcClick:MovieClip;
public var mcTicketSales:MovieClip;
public function Page03():void{
var _local1:Date = new Date(2010, 1, 21);
if (new Date() >= _local1){
mcTicketSales.alpha = 0;
mcClick.y = (mcClick.y - 50);
};
mcClick.buttonMode = true;
mcClick.addEventListener(MouseEvent.CLICK, onButtonClick);
showControls(0.5, 0.5, onControlsShowing);
var _local2:TimelineMax = new TimelineMax({delay:1.5, repeat:-1});
_local2.append(new TweenLite(mcClick, 1, {scaleX:1.2, scaleY:1.2}));
_local2.append(new TweenLite(mcClick, 1, {scaleX:1, scaleY:1}));
_local2.append(new TweenLite(mcClick, 3, {alpha:1}));
}
private function onControlsShowing():void{
this.dispatchEvent(new Event("EnableBackButton", true, false));
}
private function onButtonClick(_arg1:MouseEvent):void{
dispatchEvent(new Event("UpdateScenario", true, false));
dispatchEvent(new Event("NextClick", true, false));
this.dispatchEvent(new Event("SoundWhoosh", true));
}
}
}//package
Section 65
//Page04 (Page04)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import com.greensock.easing.*;
public class Page04 extends BasePage {
public var mcHighlight:MovieClip;
public var btnGetTicket:MovieClip;
private var _numbersSelected:Array;
public var mcText:MovieClip;
private var bubble1:MovieClip;
private var bubble2:MovieClip;
public var mcPlayslip:MovieClip;
public var mcClickBubbleLeft:MovieClip;
public var mcBubble1:MovieClip;
public var mcBubble2:MovieClip;
public var mcText2:MovieClip;
public var mcAdvanceBubble:MovieClip;
public var mcClickBubbleRight:MovieClip;
public var mcBoard:MovieClip;
public function Page04():void{
_numbersSelected = [];
super();
mcBubble1.alpha = (mcBubble1.scaleX = (mcBubble1.scaleY = 0));
mcBubble2.alpha = (mcBubble2.scaleX = (mcBubble2.scaleY = 0));
mcText.alpha = 0;
mcPlayslip.alpha = 0;
mcPlayslip.scaleX = (mcPlayslip.scaleY = 0.01);
mcHighlight.alpha = 0;
mcBoard.mouseChildren = false;
mcBoard.alpha = 0;
mcBoard.width = mcHighlight.width;
mcBoard.height = mcHighlight.height;
mcBoard.x = mcHighlight.x;
mcBoard.y = mcHighlight.y;
mcClickBubbleLeft.alpha = 0;
mcClickBubbleLeft.scaleX = (mcClickBubbleLeft.scaleY = 0.01);
mcClickBubbleRight.alpha = 0;
mcClickBubbleRight.scaleX = (mcClickBubbleRight.scaleY = 0.01);
mcAdvanceBubble.scaleX = 0.01;
mcAdvanceBubble.scaleY = 0.01;
mcAdvanceBubble.alpha = 0;
mcText2.alpha = 0;
btnGetTicket.alpha = 0;
showControls(0.5, 0.5, onControlsShowing);
var _local1 = 1;
while (_local1 < 39) {
mcBoard[("btn" + SimulatorUtil.zeroPad(_local1, 2))].value = _local1;
_local1++;
};
}
private function onPart2():void{
mcBoard.mouseChildren = true;
mcBoard.alpha = 1;
var _local1:TimelineMax = new TimelineMax({delay:1});
_local1.append(new TweenLite(mcPlayslip, 1, {alpha:0.5}));
_local1.append(new TweenLite(mcBoard, 1, {x:378, y:226, width:169, height:260, delay:1}));
_local1.append(new TweenLite(mcText, 0.5, {alpha:0}));
_local1.append(new TweenLite(mcClickBubbleLeft, 0.5, {alpha:1, scaleX:1, scaleY:1, delay:0.5}));
_local1.append(new TweenLite(mcClickBubbleRight, 0.5, {alpha:1, scaleX:1, scaleY:1, delay:0.5}));
this.addEventListener("BoardButtonClicked", onBoardButtonClicked);
this.dispatchEvent(new Event("DisableNextButton", true, false));
}
private function onPart3(_arg1=null):void{
btnNext.removeEventListener(MouseEvent.CLICK, onPart3);
var _local2:TimelineMax = new TimelineMax({onComplete:onPart4});
_local2.append(new TweenLite(mcClickBubbleLeft, 0.5, {scaleX:0, scaleY:0.01, alpha:0}));
_local2.append(new TweenLite(mcClickBubbleRight, 0.5, {scaleX:0, scaleY:0.01, alpha:0}));
_local2.append(new TweenLite(mcBoard, 1, {x:218.5, y:170.5, width:69, height:107}));
_local2.append(new TweenLite(mcPlayslip, 1, {alpha:1}));
}
private function onPart4():void{
mcBoard.mouseChildren = false;
new TweenLite(mcClickBubbleLeft, 0.5, {scaleX:0, scaleY:0.01, alpha:0});
new TweenLite(mcClickBubbleRight, 0.5, {scaleX:0, scaleY:0.01, alpha:0});
new TweenLite(mcAdvanceBubble, 0.5, {scaleX:1, scaleY:1, alpha:1});
this.dispatchEvent(new Event("EnableNextButton", true, false));
removeNextListener();
btnNext.addEventListener(MouseEvent.CLICK, onPart5);
}
private function onBoardButtonClicked(_arg1):void{
if (_arg1.target == mcBoard.btnVoid){
_arg1.target.selected = false;
clearNumbers();
} else {
if (_arg1.target == mcBoard.btnQP){
clearNumbers();
} else {
mcBoard.btnQP.selected = false;
if ((((_numbersSelected.length == 6)) && (_arg1.target.selected))){
_arg1.target.selected = false;
} else {
if (_arg1.target.selected){
_numbersSelected.push(_arg1.target.value);
} else {
_numbersSelected.splice(_numbersSelected.indexOf(_arg1.target.value), 1);
};
};
};
};
if (((mcBoard.btnQP.selected) || ((_numbersSelected.length == 6)))){
onPart3();
} else {
this.dispatchEvent(new Event("DisableNextButton", true, false));
};
}
private function onControlsShowing():void{
this.dispatchEvent(new Event("EnableBackButton", true, false));
new TweenLite(mcBubble1, 1, {alpha:1, scaleX:1, scaleY:1, ease:Elastic.easeOut, onComplete:onBubbleExpanded});
this.dispatchEvent(new Event("SoundBubble", true));
}
private function onPart5(_arg1=null):void{
btnNext.removeEventListener(MouseEvent.CLICK, onPart5);
this.dispatchEvent(new Event("DisableNextButton", true, false));
var _local2:TimelineMax = new TimelineMax();
_local2.append(new TweenLite(mcAdvanceBubble, 1, {scaleX:0, scaleY:0, alpha:0, ease:Back.easeOut}));
_local2.append(new TweenLite(mcBubble1, 0.5, {alpha:0, scaleX:0, scaleY:0}));
_local2.append(new TweenLite(mcBubble2, 1, {alpha:1, scaleX:1, scaleY:1, ease:Elastic.easeOut, delay:1, onStart:playBubble}));
_local2.append(new TweenLite(mcText2, 1, {alpha:1, ease:Back.easeOut}));
_local2.append(new TweenLite(btnGetTicket, 1, {alpha:1, ease:Back.easeOut, onComplete:startLoop}));
btnGetTicket.addEventListener(MouseEvent.CLICK, onButtonClick);
btnGetTicket.buttonMode = true;
}
private function onButtonClick(_arg1:MouseEvent):void{
dispatchEvent(new Event("NextClick", true, false));
this.dispatchEvent(new Event("SoundWhoosh", true));
}
private function playBubble():void{
this.dispatchEvent(new Event("SoundBubble", true));
}
public function get numbersSelected():Array{
return (_numbersSelected);
}
private function onBubbleExpanded(_arg1=null):void{
new TweenLite(mcPlayslip, 1, {alpha:1, rotation:360, scaleX:1, scaleY:1, delay:1, onComplete:onPlayslip});
}
private function onPlayslipComplete():void{
mcHighlight.alpha = 0;
removeNextListener();
onPart2();
}
private function startLoop():void{
var _local1:TimelineMax = new TimelineMax({delay:1.5, repeat:-1});
_local1.append(new TweenLite(btnGetTicket, 1, {scaleX:1.2, scaleY:1.2}));
_local1.append(new TweenLite(btnGetTicket, 1, {scaleX:1, scaleY:1}));
_local1.append(new TweenLite(btnGetTicket, 3, {alpha:1}));
}
private function onPlayslip():void{
new TweenLite(mcText, 0.75, {alpha:1, delay:0.5});
mcHighlight.alpha = 1;
var _local1:* = new TweenMax(mcText.mcTen, 0.7, {yoyo:true, repeat:5, scaleX:1.5, scaleY:1.5});
var _local2:TimelineMax = new TimelineMax({onComplete:onPlayslipComplete});
_local2.append(new TweenLite(mcHighlight, 0, {x:287, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:356, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:425, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:496, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:218, y:281, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:287, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:356, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:425, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:496, delay:0.4}));
_local2.append(new TweenLite(mcHighlight, 0, {x:496, delay:0.4}));
}
private function clearNumbers():void{
var _local1 = 1;
while (_local1 < 39) {
mcBoard[("btn" + SimulatorUtil.zeroPad(_local1, 2))].selected = false;
_local1++;
};
_numbersSelected = [];
}
}
}//package
Section 66
//Page05 (Page05)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import com.greensock.easing.*;
public class Page05 extends BasePage {
public var numbersSelected:Array;
private var ticket:MovieClip;
private var buttonTimeline:TimelineMax;
public var mcPlayKey:MovieClip;
private var ballsAdded:int;// = 0
private var button2Timeline:TimelineMax;
public var mcStep4Bubble:MovieClip;
public var currentScenario:String;
public var mcText1:MovieClip;
public var mcText2:MovieClip;
public var mcText3:MovieClip;
private var lineTimer:Timer;
public var mcLineAQP:MovieClip;
public var btnCheckTicket:MovieClip;
public var mcStartButton:MovieClip;
private var totalWinnings:int;// = 0
public var mcBallContainer:MovieClip;
private var totalMatches:int;// = 0
public var mcText1B:MovieClip;
public var numbersSelectedType:String;
public var mcLineBC:MovieClip;
public var mcStep3:MovieClip;
private var drawingResults:Object;
public var mcDrawingTotal:MovieClip;
public var mcLineAManual:MovieClip;
public function Page05():void{
lineTimer = new Timer(4000);
super();
mcStep3.scaleX = (mcStep3.scaleY = 0);
mcStep4Bubble.scaleX = (mcStep4Bubble.scaleY = (mcStep4Bubble.alpha = 0));
mcText1.alpha = 0;
mcText1B.alpha = 0;
mcText2.alpha = 0;
mcStartButton.alpha = (mcStartButton.scaleX = (mcStartButton.scaleY = 0));
mcLineAManual.scaleX = (mcLineAManual.scaleY = (mcLineAManual.alpha = 0));
mcLineAQP.scaleX = (mcLineAQP.scaleY = (mcLineAQP.alpha = 0));
mcLineBC.scaleX = (mcLineBC.scaleY = (mcLineBC.alpha = 0));
mcText3.alpha = 0;
btnCheckTicket.alpha = (btnCheckTicket.scaleX = (btnCheckTicket.scaleY = 0));
mcPlayKey.alpha = (mcPlayKey.scaleX = (mcPlayKey.scaleY = 0));
mcDrawingTotal.alpha = 0;
showControls(0.5, 0.5, onControlsShowing);
}
private function onPart2(_arg1):void{
this.dispatchEvent(new Event("DisableNextButton", true, false));
var _local2:TimelineMax = new TimelineMax({onComplete:onTimeline2Complete});
if (numbersSelectedType != "QP"){
_local2.append(new TweenLite(mcText1, 1, {alpha:0}));
} else {
_local2.append(new TweenLite(mcText1B, 1, {alpha:0}));
};
}
private function onPart3():void{
new TweenLite(ticket.mcLineBCHi, 0.5, {delay:2, alpha:1});
new TweenLite(mcLineBC, 0.5, {delay:2.5, scaleX:1, scaleY:1, alpha:1, onComplete:onPart3Complete});
}
private function onPart4(_arg1):void{
btnNext.removeEventListener(MouseEvent.CLICK, onPart4);
this.dispatchEvent(new Event("DisableNextButton", true, false));
var _local2:TimelineMax = new TimelineMax({onComplete:onPart4TimeComplete});
_local2.append(new TweenLite(mcText1, 0, {alpha:0}));
_local2.append(new TweenLite(mcText1B, 0, {alpha:0}));
if (numbersSelectedType == "QP"){
_local2.append(new TweenLite(mcLineAQP, 0.5, {scaleX:0, scaleY:0, alpha:0}));
} else {
_local2.append(new TweenLite(mcLineAManual, 0.5, {scaleX:0, scaleY:0, alpha:0}));
};
_local2.append(new TweenLite(ticket.mcLineAHi, 0.5, {alpha:0}));
_local2.append(new TweenLite(mcLineBC, 0.5, {scaleX:0, scaleY:0, alpha:0}));
_local2.append(new TweenLite(ticket.mcLineBCHi, 0.5, {alpha:0}));
_local2.append(new TweenLite(mcStep3, 0.5, {scaleX:0, scaleY:0, alpha:0}));
_local2.append(new TweenLite(mcStep4Bubble, 0.5, {scaleX:1, scaleY:1, alpha:1, ease:Elastic.easeOut, onStart:playBubble}));
_local2.append(new TweenLite(mcStartButton, 0.5, {delay:1, rotation:360, scaleX:1, scaleY:1, alpha:1}));
_local2.append(new TweenLite(mcText2, 0.5, {delay:1, alpha:1}));
}
private function onPart6(_arg1):void{
btnCheckTicket.removeEventListener(MouseEvent.CLICK, onPart6);
button2Timeline.pause();
new TweenLite(mcText3, 1, {alpha:0, scaleX:0, scaleY:0});
new TweenLite(btnCheckTicket, 1, {alpha:0, scaleX:0, scaleY:0});
new TweenLite(mcPlayKey, 1, {alpha:1, scaleX:1, scaleY:1, delay:2, onComplete:onShowLineA});
}
private function onPart5(_arg1):void{
buttonTimeline.pause();
mcStartButton.alpha = 0;
mcStartButton.buttonMode = false;
mcStartButton.removeEventListener(MouseEvent.CLICK, onPart5);
var _local2:Timer = new Timer(1000, 6);
_local2.addEventListener(TimerEvent.TIMER, onBallAdd);
_local2.start();
new TweenLite(mcStep4Bubble, 0.5, {alpha:0, scaleX:0, scaleY:0, ease:Elastic.easeOut});
new TweenLite(mcText2, 1, {alpha:0, scaleX:0, scaleY:0});
new TweenLite(mcText3, 1, {alpha:1, scaleX:1, scaleY:1, delay:8});
new TweenLite(btnCheckTicket, 1, {alpha:1, scaleX:1, scaleY:1, delay:9, onComplete:onCheckReady});
}
private function onShowLineB(_arg1=null):void{
var _local3:int;
var _local4:*;
showLineMatch(0);
lineTimer.removeEventListener(TimerEvent.TIMER, onShowLineB);
var _local2:* = SimulatorUtil.getMatchingPositions(drawingResults.lineBNumbers, drawingResults.drawingNumbers);
clearLineHilites();
for each (_local3 in _local2) {
ticket[("mcLineB" + _local3)].alpha = 1;
};
_local4 = SimulatorUtil.getLineValue(_local2.length);
totalWinnings = (totalWinnings + _local4);
totalMatches = (totalMatches + _local2.length);
if (_local2.length > 2){
showLineMatch(_local2.length);
};
mcDrawingTotal.txtLineB.text = ("Line B = $" + _local4);
showHighlight(mcDrawingTotal.txtLineB);
lineTimer.addEventListener(TimerEvent.TIMER, onShowLineC);
}
private function showLineMatch(_arg1:int):void{
var _local3:DisplayObject;
var _local2 = 3;
while (_local2 < 7) {
mcPlayKey[("mcLineMatch" + _local2)].alpha = 0;
_local2++;
};
if (_arg1 > 0){
_local3 = mcPlayKey.getChildByName(("mcLineMatch" + _arg1));
new TweenLite(_local3, 1, {alpha:1});
};
}
private function onShowTotal(_arg1=null):void{
clearLineHilites();
lineTimer.removeEventListener(TimerEvent.TIMER, onShowTotal);
lineTimer.stop();
showHighlight(mcDrawingTotal.mcTotal.txtTotal);
btnNext.removeEventListener(MouseEvent.CLICK, onShowTotal);
mcDrawingTotal.mcTotal.txtTotal.text = ("$" + totalWinnings);
new TweenMax(mcDrawingTotal.mcTotal, 1, {yoyo:true, repeat:5, scaleX:1.5, scaleY:1.5, onComplete:onResetMatches});
this.dispatchEvent(new Event("EnableNextButton", true, false));
addNextListener();
}
private function onShowCombined(_arg1=null):void{
var _local3:int;
var _local4:*;
var _local5:int;
var _local6:*;
var _local7:int;
var _local8:*;
showLineMatch(0);
lineTimer.removeEventListener(TimerEvent.TIMER, onShowCombined);
var _local2:* = SimulatorUtil.getMatchingPositions(numbersSelected, drawingResults.drawingNumbers);
for each (_local3 in _local2) {
ticket[("mcLineA" + _local3)].alpha = 1;
};
_local4 = SimulatorUtil.getMatchingPositions(drawingResults.lineBNumbers, drawingResults.drawingNumbers);
for each (_local5 in _local4) {
ticket[("mcLineB" + _local5)].alpha = 1;
};
_local6 = SimulatorUtil.getMatchingPositions(drawingResults.lineCNumbers, drawingResults.drawingNumbers);
for each (_local7 in _local6) {
ticket[("mcLineC" + _local7)].alpha = 1;
};
_local8 = SimulatorUtil.getCombinedValue(totalMatches);
if (totalMatches >= 5){
showCombinedMatch(totalMatches);
};
totalWinnings = (totalWinnings + _local8);
mcDrawingTotal.txtCombined.text = ((totalMatches + " matches = $") + _local8);
showHighlight(mcDrawingTotal.txtCombined);
lineTimer.addEventListener(TimerEvent.TIMER, onShowTotal);
}
private function onCheckReady():void{
btnCheckTicket.buttonMode = true;
btnCheckTicket.addEventListener(MouseEvent.CLICK, onPart6);
button2Timeline = new TimelineMax({delay:1.5, repeat:-1});
button2Timeline.append(new TweenLite(btnCheckTicket, 1, {scaleX:1.2, scaleY:1.2}));
button2Timeline.append(new TweenLite(btnCheckTicket, 1, {scaleX:1, scaleY:1}));
button2Timeline.append(new TweenLite(btnCheckTicket, 3, {alpha:1}));
button2Timeline.play();
}
private function onShowLineA():void{
var _local2:int;
var _local3:*;
showLineMatch(0);
mcDrawingTotal.alpha = 1;
var _local1:* = SimulatorUtil.getMatchingPositions(numbersSelected, drawingResults.drawingNumbers);
clearLineHilites();
for each (_local2 in _local1) {
ticket[("mcLineA" + _local2)].alpha = 1;
};
_local3 = SimulatorUtil.getLineValue(_local1.length);
totalWinnings = (totalWinnings + _local3);
totalMatches = (totalMatches + _local1.length);
if (_local1.length > 2){
showLineMatch(_local1.length);
};
mcDrawingTotal.txtLineA.text = ("Line A = $" + _local3);
showHighlight(mcDrawingTotal.txtLineA);
lineTimer.addEventListener(TimerEvent.TIMER, onShowLineB);
lineTimer.start();
}
private function showCombinedMatch(_arg1:int):void{
var _local3:DisplayObject;
var _local2 = 5;
while (_local2 < 11) {
mcPlayKey[("mcCombinedMatch" + _local2)].alpha = 0;
_local2++;
};
if (_arg1 >= 10){
new TweenLite(mcPlayKey.mcCombinedMatch10, 1, {alpha:1});
} else {
if (_arg1 > 0){
_local3 = mcPlayKey.getChildByName(("mcCombinedMatch" + _arg1));
new TweenLite(_local3, 1, {alpha:1});
};
};
}
private function showHighlight(_arg1:TextField):void{
var _local2:TextFormat = mcDrawingTotal.txtLineA.getTextFormat();
_local2.color = 0xFFFFFF;
mcDrawingTotal.txtLineA.setTextFormat(_local2);
mcDrawingTotal.txtLineB.setTextFormat(_local2);
mcDrawingTotal.txtLineC.setTextFormat(_local2);
mcDrawingTotal.txtCombined.setTextFormat(_local2);
var _local3:TextFormat = _arg1.getTextFormat();
_local3.color = 13041489;
_arg1.setTextFormat(_local3);
}
private function onPart4TimeComplete():void{
mcStartButton.addEventListener(MouseEvent.CLICK, onPart5);
mcStartButton.buttonMode = true;
buttonTimeline = new TimelineMax({delay:1.5, repeat:-1});
buttonTimeline.append(new TweenLite(mcStartButton, 1, {scaleX:1.2, scaleY:1.2}));
buttonTimeline.append(new TweenLite(mcStartButton, 1, {scaleX:1, scaleY:1}));
buttonTimeline.append(new TweenLite(mcStartButton, 3, {alpha:1}));
buttonTimeline.play();
}
private function clearLineHilites():void{
var _local1:int;
while (_local1 < 6) {
ticket[("mcLineA" + _local1)].alpha = 0;
ticket[("mcLineB" + _local1)].alpha = 0;
ticket[("mcLineC" + _local1)].alpha = 0;
_local1++;
};
var _local2 = 5;
while (_local2 < 11) {
mcPlayKey[("mcCombinedMatch" + _local2)].alpha = 0;
_local2++;
};
}
private function onTimeline1Complete():void{
var _local1:int;
var _local2:int;
var _local3:int;
drawingResults = SimulatorUtil.runDrawing(numbersSelected, currentScenario);
ticket = new Ticket();
ticket.mcLineAHi.alpha = 0;
ticket.mcLineBCHi.alpha = 0;
ticket.filters = [SimulatorUtil.getDropShadow()];
ticket.y = (this.height + ticket.height);
ticket.x = (40 + (ticket.width / 2));
ticket.txtLineA.text = "";
for each (_local1 in numbersSelected) {
ticket.txtLineA.text = (ticket.txtLineA.text + (SimulatorUtil.zeroPad(_local1, 2).toString() + " "));
};
if (numbersSelectedType == "QP"){
ticket.txtLineA.text = (ticket.txtLineA.text + " QP");
};
for each (_local2 in drawingResults.lineBNumbers) {
ticket.txtLineB.text = (ticket.txtLineB.text + (SimulatorUtil.zeroPad(_local2, 2).toString() + " "));
};
ticket.txtLineB.text = (ticket.txtLineB.text + " QP");
for each (_local3 in drawingResults.lineCNumbers) {
ticket.txtLineC.text = (ticket.txtLineC.text + (SimulatorUtil.zeroPad(_local3, 2).toString() + " "));
};
ticket.txtLineC.text = (ticket.txtLineC.text + " QP");
this.addChildAt(ticket, 0);
new TweenLite(ticket, 1, {y:(40 + ticket.height)});
if (numbersSelectedType != "QP"){
new TweenLite(mcText1, 1, {alpha:1, onComplete:onPart1Complete});
} else {
new TweenLite(mcText1B, 1, {alpha:1, onComplete:onPart1Complete});
};
}
private function onTimeline2Complete():void{
new TweenLite(ticket.mcLineAHi, 0.5, {alpha:1});
if (numbersSelectedType == "QP"){
new TweenLite(mcLineAQP, 0.5, {delay:1, scaleX:1, scaleY:1, alpha:1});
} else {
new TweenLite(mcLineAManual, 0.5, {delay:1, scaleX:1, scaleY:1, alpha:1});
};
onPart3();
}
private function onControlsShowing():void{
this.dispatchEvent(new Event("EnableBackButton", true, false));
var _local1:TimelineMax = new TimelineMax({onComplete:onTimeline1Complete});
_local1.append(new TweenLite(mcStep3, 1, {scaleX:1, scaleY:1, ease:Elastic.easeOut}));
this.dispatchEvent(new Event("SoundBubble", true));
}
private function onShowLineC(_arg1=null):void{
var _local3:int;
var _local4:*;
showLineMatch(0);
lineTimer.removeEventListener(TimerEvent.TIMER, onShowLineC);
var _local2:* = SimulatorUtil.getMatchingPositions(drawingResults.lineCNumbers, drawingResults.drawingNumbers);
clearLineHilites();
for each (_local3 in _local2) {
ticket[("mcLineC" + _local3)].alpha = 1;
};
_local4 = SimulatorUtil.getLineValue(_local2.length);
totalWinnings = (totalWinnings + _local4);
totalMatches = (totalMatches + _local2.length);
if (_local2.length > 2){
showLineMatch(_local2.length);
};
mcDrawingTotal.txtLineC.text = ("Line C = $" + _local4);
showHighlight(mcDrawingTotal.txtLineC);
lineTimer.addEventListener(TimerEvent.TIMER, onShowCombined);
}
private function onPart1Complete():void{
this.dispatchEvent(new Event("EnableNextButton", true, false));
removeNextListener();
btnNext.addEventListener(MouseEvent.CLICK, onPart2);
}
private function onPart3Complete():void{
this.dispatchEvent(new Event("EnableNextButton", true, false));
removeNextListener();
btnNext.addEventListener(MouseEvent.CLICK, onPart4);
}
private function onBallAdd(_arg1:Event):void{
var _local2:* = new Ball();
_local2.maxY = 405;
_local2.maxX = 711;
_local2.x = mcBallContainer.width;
_local2.alpha = 0;
switch (_arg1.target.currentCount){
case 1:
_local2.vel.x = -20;
_local2.rotOff = -40;
break;
case 2:
_local2.vel.x = -18.5;
_local2.rotOff = -90;
break;
case 3:
_local2.vel.x = -17;
_local2.rotOff = -135;
break;
case 4:
_local2.vel.x = -15.5;
_local2.rotOff = -185;
break;
case 5:
_local2.vel.x = -14;
_local2.rotOff = -235;
break;
case 6:
_local2.vel.x = -12.5;
_local2.rotOff = -285;
break;
};
_local2.txtNumber.text = drawingResults.drawingNumbers[(_arg1.target.currentCount - 1)];
mcBallContainer.addChild(_local2);
new TweenLite(_local2, 0.5, {alpha:1});
ballsAdded++;
}
private function onResetMatches():void{
totalWinnings = 0;
totalMatches = 0;
mcDrawingTotal.txtLineA.text = "";
mcDrawingTotal.txtLineB.text = "";
mcDrawingTotal.txtLineC.text = "";
mcDrawingTotal.txtCombined.text = "";
mcDrawingTotal.mcTotal.txtTotal.text = "";
new TweenLite(mcDrawingTotal, 2, {onComplete:onShowLineA});
}
private function playBubble():void{
this.dispatchEvent(new Event("SoundBubble", true));
}
}
}//package
Section 67
//Page06 (Page06)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import com.greensock.easing.*;
import flash.net.*;
public class Page06 extends BasePage {
public var mcText:MovieClip;
public var mcCongrats:MovieClip;
public var mcMore:MovieClip;
public var btnPlay:MovieClip;
public var btnFAQ:MovieClip;
public var btnEnter:MovieClip;
public function Page06():void{
mcCongrats.alpha = (mcCongrats.scaleX = (mcCongrats.scaleY = 0));
btnPlay.alpha = (btnPlay.scaleX = (btnPlay.scaleY = 0));
btnFAQ.alpha = (btnFAQ.scaleX = (btnFAQ.scaleY = 0));
btnEnter.alpha = (btnEnter.scaleX = (btnEnter.scaleY = 0));
btnPlay.buttonMode = true;
btnPlay.addEventListener(MouseEvent.CLICK, onPlayClick);
btnFAQ.buttonMode = true;
btnFAQ.addEventListener(MouseEvent.CLICK, onFAQClick);
var _local1:TimelineMax = new TimelineMax({delay:1, onComplete:onTimeFinish});
_local1.append(new TweenLite(mcCongrats, 1, {alpha:1, scaleX:1, scaleY:1, ease:Elastic.easeOut, onStart:playBubble}));
_local1.append(new TweenLite(btnPlay, 1, {alpha:1, scaleX:1, scaleY:1, ease:Elastic.easeOut}));
_local1.append(new TweenLite(btnFAQ, 1, {alpha:1, scaleX:1, scaleY:1, ease:Elastic.easeOut}));
}
private function playBubble():void{
this.dispatchEvent(new Event("SoundBubble", true));
}
private function onEnterClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.coloradolottery.com/index.cfm/ID/194/go/SIMLINK/MatchPlay/"), "_self");
}
private function onFAQClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.coloradolottery.com/index.cfm/ID/194/go/SIMFAQ/MatchPlay/"), "_self");
}
private function onPlayClick(_arg1:MouseEvent):void{
this.dispatchEvent(new Event("PlayAgain", true, false));
}
private function onTimeFinish():void{
}
}
}//package
Section 68
//Pg1_2Dollars (Pg1_2Dollars)
package {
import flash.display.*;
public dynamic class Pg1_2Dollars extends MovieClip {
}
}//package
Section 69
//Pg1_3Lines (Pg1_3Lines)
package {
import flash.display.*;
public dynamic class Pg1_3Lines extends MovieClip {
}
}//package
Section 70
//Pg1_4Ways (Pg1_4Ways)
package {
import flash.display.*;
public dynamic class Pg1_4Ways extends MovieClip {
}
}//package
Section 71
//Pg5_Bubble1Text (Pg5_Bubble1Text)
package {
import flash.display.*;
public dynamic class Pg5_Bubble1Text extends MovieClip {
}
}//package
Section 72
//ProgressBar_barSkin (ProgressBar_barSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_barSkin extends MovieClip {
}
}//package
Section 73
//ProgressBar_indeterminateSkin (ProgressBar_indeterminateSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_indeterminateSkin extends MovieClip {
}
}//package
Section 74
//ProgressBar_trackSkin (ProgressBar_trackSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_trackSkin extends MovieClip {
}
}//package
Section 75
//SimulatorUtil (SimulatorUtil)
package {
import flash.filters.*;
public class SimulatorUtil {
public static function shuffleArray(_arg1:Array):Array{
var _local3:*;
var _local5:int;
var _local2:int = _arg1.length;
var _local4:int = _local2;
while (_local4--) {
_local5 = Math.floor((Math.random() * _local2));
_local3 = _arg1[_local4];
_arg1[_local4] = _arg1[_local5];
_arg1[_local5] = _local3;
};
return (_arg1);
}
private static function getNumbers(_arg1:Array, _arg2:int):Array{
var _local4:int;
var _local5:int;
var _local3:Array = [];
if (_arg2 > 0){
while (_local3.length != _arg2) {
_local4 = _arg1[randRange(0, 5)];
if (_local3.indexOf(_local4) == -1){
_local3.push(_local4);
};
};
};
while (_local3.length != 6) {
_local5 = getRandomNum();
if ((((_local3.indexOf(_local5) == -1)) && ((_arg1.indexOf(_local5) == -1)))){
_local3.push(_local5);
};
};
_local3 = _local3.sort(Array.NUMERIC);
return (_local3);
}
public static function getDropShadow():BitmapFilter{
var _local1:Number = 0;
var _local2:Number = 45;
var _local3:Number = 0.8;
var _local4:Number = 15;
var _local5:Number = 15;
var _local6:Number = 0;
var _local7:Number = 1;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Number = BitmapFilterQuality.HIGH;
return (new DropShadowFilter(_local6, _local2, _local1, _local3, _local4, _local5, _local7, _local10, _local8, _local9));
}
public static function getLineValue(_arg1:int):int{
var _local2:int;
if (_arg1 == 3){
_local2 = 2;
} else {
if (_arg1 == 4){
_local2 = 10;
} else {
if (_arg1 == 5){
_local2 = 500;
} else {
if (_arg1 == 6){
_local2 = 100000;
};
};
};
};
return (_local2);
}
public static function zeroPad(_arg1:int, _arg2:int):String{
var _local3:String = ("" + _arg1);
while (_local3.length < _arg2) {
_local3 = ("0" + _local3);
};
return (_local3);
}
private static function getRandomNum():int{
return (randRange(1, 38));
}
public static function runDrawing(_arg1:Array, _arg2:String):Object{
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:Array;
var _local7:Array;
var _local8:Array;
var _local9:int;
var _local10:Array;
var _local11:Array;
var _local12:int;
var _local14:Array;
var _local16:Array;
var _local17:Array;
var _local18:String;
var _local13:int;
_local14 = ["A", "B", "C"];
switch (_arg2){
case "Loss":
_local3 = randRange(0, 4);
_local5 = randRange(1, 2);
if (_local5 > _local3){
_local5 = 0;
};
_local4 = getNumbers(_arg1, _local5);
_local6 = getMatchingNumbers(_arg1, _local4);
_local13 = _local6.length;
if ((((_local13 < _local3)) && ((_local3 > 0)))){
_local9 = randRange(0, 2);
} else {
_local9 = 0;
};
if (_local9 > (_local3 - _local13)){
_local9 = (_local3 - _local13);
};
_local8 = getNumbers(_local4, _local9);
_local7 = getMatchingNumbers(_local8, _local4);
_local13 = (_local13 + _local7.length);
_local12 = (_local3 - _local13);
if (_local12 > 2){
_local12 = 2;
};
_local11 = getNumbers(_local4, _local12);
_local10 = getMatchingNumbers(_local11, _local4);
break;
case "BreakEvenCombined":
_local16 = [[2, 2, 1], [2, 1, 2], [1, 2, 2]];
_local17 = _local16[randRange(0, 2)];
_local3 = 5;
_local5 = _local17[0];
_local4 = getNumbers(_arg1, _local5);
_local6 = getMatchingNumbers(_arg1, _local4);
_local13 = _local6.length;
_local9 = _local17[1];
_local8 = getNumbers(_local4, _local9);
_local7 = getMatchingNumbers(_local8, _local4);
_local13 = (_local13 + _local7.length);
_local12 = _local17[2];
_local11 = getNumbers(_local4, _local12);
_local10 = getMatchingNumbers(_local11, _local4);
break;
case "BreakEvenLine":
_local4 = getNumbers(_arg1, 3);
_local8 = getNumbers(_local4, 0);
_local11 = getNumbers(_local4, 0);
break;
case "Multiline":
_local4 = getNumbers(_arg1, randRange(1, 4));
_local8 = getNumbers(_local4, randRange(1, 4));
_local11 = getNumbers(_local4, randRange(1, 4));
break;
case "Jackpot":
_local18 = _local14[randRange(0, 2)];
if (_local18 == "A"){
_local4 = getNumbers(_arg1, 6);
};
if (_local18 == "B"){
_local8 = getPlayerQuickPic();
_local4 = getNumbers(_local8, 6);
} else {
_local8 = getPlayerQuickPic();
};
if (_local18 == "C"){
_local11 = getPlayerQuickPic();
_local4 = getNumbers(_local11, 6);
} else {
_local11 = getPlayerQuickPic();
};
break;
};
var _local15:Object = {};
_local15.drawingNumbers = _local4;
_local15.lineBNumbers = _local8;
_local15.lineCNumbers = _local11;
return (_local15);
}
public static function getNumberSetExcluding(_arg1:Array):Array{
var _local3:*;
var _local2:Array = [];
while (_local2.length != 6) {
_local3 = getRandomNum();
if ((((_local2.indexOf(_local3) == -1)) && ((_arg1.indexOf(_local3) == -1)))){
_local2.push(_local3);
};
};
_local2 = _local2.sort(Array.NUMERIC);
return (_local2);
}
public static function getCombinedValue(_arg1:int):int{
var _local2:int;
if (_arg1 == 5){
_local2 = 2;
} else {
if (_arg1 == 6){
_local2 = 5;
} else {
if (_arg1 == 7){
_local2 = 10;
} else {
if (_arg1 == 8){
_local2 = 50;
} else {
if (_arg1 == 9){
_local2 = 250;
} else {
if (_arg1 >= 10){
_local2 = 1000;
};
};
};
};
};
};
return (_local2);
}
public static function getMatchingPositions(_arg1:Array, _arg2:Array):Array{
var _local4:int;
var _local3:Array = [];
for each (_local4 in _arg2) {
if (_arg1.indexOf(_local4) > -1){
_local3.push(_arg1.indexOf(_local4));
};
};
_local3 = _local3.sort(Array.NUMERIC);
return (_local3);
}
public static function randRange(_arg1:Number, _arg2:Number):Number{
return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1));
}
private static function combineArrays(_arg1:Array, _arg2:Array):Array{
var _local4:*;
var _local5:*;
var _local3:* = new Array();
for each (_local4 in _arg1) {
_local3.push(_local4);
};
for each (_local5 in _arg2) {
_local3.push(_local5);
};
return (_local3);
}
public static function getPlayerQuickPic():Array{
var _local2:*;
var _local1:Array = [];
while (_local1.length != 6) {
_local2 = getRandomNum();
if (_local1.indexOf(_local2) == -1){
_local1.push(_local2);
};
};
_local1 = _local1.sort(Array.NUMERIC);
return (_local1);
}
public static function getMatchingNumbers(_arg1:Array, _arg2:Array):Array{
var _local4:int;
var _local3:Array = [];
for each (_local4 in _arg2) {
if (_arg1.indexOf(_local4) > -1){
_local3.push(_local4);
};
};
_local3 = _local3.sort(Array.NUMERIC);
return (_local3);
}
}
}//package
Section 76
//SoundBall1 (SoundBall1)
package {
import flash.media.*;
public dynamic class SoundBall1 extends Sound {
}
}//package
Section 77
//SoundBall2 (SoundBall2)
package {
import flash.media.*;
public dynamic class SoundBall2 extends Sound {
}
}//package
Section 78
//SoundBall3 (SoundBall3)
package {
import flash.media.*;
public dynamic class SoundBall3 extends Sound {
}
}//package
Section 79
//SoundBall4 (SoundBall4)
package {
import flash.media.*;
public dynamic class SoundBall4 extends Sound {
}
}//package
Section 80
//SoundBall5 (SoundBall5)
package {
import flash.media.*;
public dynamic class SoundBall5 extends Sound {
}
}//package
Section 81
//SoundBall6 (SoundBall6)
package {
import flash.media.*;
public dynamic class SoundBall6 extends Sound {
}
}//package
Section 82
//SoundBall7 (SoundBall7)
package {
import flash.media.*;
public dynamic class SoundBall7 extends Sound {
}
}//package
Section 83
//SoundBall8 (SoundBall8)
package {
import flash.media.*;
public dynamic class SoundBall8 extends Sound {
}
}//package
Section 84
//SoundBloop (SoundBloop)
package {
import flash.media.*;
public dynamic class SoundBloop extends Sound {
}
}//package
Section 85
//SoundBubble (SoundBubble)
package {
import flash.media.*;
public dynamic class SoundBubble extends Sound {
}
}//package
Section 86
//SoundEraser (SoundEraser)
package {
import flash.media.*;
public dynamic class SoundEraser extends Sound {
}
}//package
Section 87
//SoundPageTurn (SoundPageTurn)
package {
import flash.media.*;
public dynamic class SoundPageTurn extends Sound {
}
}//package
Section 88
//SoundPencilFill (SoundPencilFill)
package {
import flash.media.*;
public dynamic class SoundPencilFill extends Sound {
}
}//package
Section 89
//SoundWhoosh (SoundWhoosh)
package {
import flash.media.*;
public dynamic class SoundWhoosh extends Sound {
}
}//package
Section 90
//Ticket (Ticket)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Ticket extends MovieClip {
public var mcLineA0:MovieClip;
public var mcLineA2:MovieClip;
public var txtLineA:TextField;
public var mcLineA5:MovieClip;
public var mcLineC0:MovieClip;
public var mcLineAHi:MovieClip;
public var mcLineC5:MovieClip;
public var mcLineBCHi:MovieClip;
public var txtLineB:TextField;
public var mcLineC1:MovieClip;
public var mcLineC3:MovieClip;
public var mcLineA3:MovieClip;
public var mcLineB1:MovieClip;
public var mcLineB3:MovieClip;
public var mcLineB4:MovieClip;
public var mcLineB5:MovieClip;
public var mcLineB2:MovieClip;
public var mcLineB0:MovieClip;
public var mcLineA1:MovieClip;
public var mcLineC2:MovieClip;
public var mcLineC4:MovieClip;
public var mcLineA4:MovieClip;
public var txtLineC:TextField;
}
}//package