Section 1
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class MD5 {
public static var digest:ByteArray;
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public static function hashBinary(_arg1:ByteArray):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
}
}//package com.adobe.crypto
Section 2
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 3
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var start:Number;
public var name:String;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var priority:int;
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 4
//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 _local4:TweenCore;
var _local5:Number;
var _local6:TweenCore;
_local4 = _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 get rawTime():Number{
return (this.cachedTotalTime);
}
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;
};
};
}
}
}//package com.greensock.core
Section 5
//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 cachedReversed:Boolean;
public var nextNode:TweenCore;
public var cachedTime:Number;
protected var _rawPrevTime:Number;// = -1
public var vars:Object;
public var cachedTotalTime:Number;
public var data;
public var timeline:SimpleTimeline;
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.13;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
var _local3:SimpleTimeline;
_rawPrevTime = -1;
super();
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;
};
};
_local3 = ((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 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;
_local2 = 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 invalidate():void{
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
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 get reversed():Boolean{
return (this.cachedReversed);
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
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;
_local2 = (_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.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (((!(_arg2)) && (this.gc))){
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 6
//Linear (com.greensock.easing.Linear)
package com.greensock.easing {
public class Linear {
public static const power:uint = 0;
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package com.greensock.easing
Section 7
//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 8
//AutoAlphaPlugin (com.greensock.plugins.AutoAlphaPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _ignoreVisible:Boolean;
protected var _target:Object;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_ignoreVisible = Boolean(("visible" in _arg1));
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (!_ignoreVisible){
_target.visible = Boolean(!((_target.alpha == 0)));
};
}
}
}//package com.greensock.plugins
Section 9
//BevelFilterPlugin (com.greensock.plugins.BevelFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
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 10
//BezierPlugin (com.greensock.plugins.BezierPlugin)
package com.greensock.plugins {
import com.greensock.core.*;
import com.greensock.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orientData:Array;
protected var _orient:Boolean;
protected var _beziers:Object;
protected var _target: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 onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local4:Object;
var _local5:Object;
var _local6:int;
var _local7:String;
var _local8:Object;
_target = _arg1.target;
_local4 = ((_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;
};
};
_local5 = {};
_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 killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
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;
_local7 = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]];
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]];
_local3++;
};
} else {
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)];
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)];
_local3++;
};
_local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]];
} else {
if (_local4.length == 3){
_local5[_local5.length] = [_local4[0], _local4[1], _local4[2]];
} else {
if (_local4.length == 2){
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
};
};
};
return (_local7);
}
}
}//package com.greensock.plugins
Section 11
//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 12
//BlurFilterPlugin (com.greensock.plugins.BlurFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
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 13
//ColorMatrixFilterPlugin (com.greensock.plugins.ColorMatrixFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
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 set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:Object;
var _local5:Array;
_target = _arg1;
_type = ColorMatrixFilter;
_local4 = _arg2;
initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice()), _propNames);
_matrix = ColorMatrixFilter(_filter).matrix;
_local5 = [];
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);
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = (1 - _arg2);
_local4 = (_local3 * _lumR);
_local5 = (_local3 * _lumG);
_local6 = (_local3 * _lumB);
_local7 = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
_local3 = Math.cos(_arg2);
_local4 = Math.sin(_arg2);
_local5 = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
_local3 = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
_local3 = [];
_local4 = 0;
_local5 = 0;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
_local4 = (((_arg2 >> 16) & 0xFF) / 0xFF);
_local5 = (((_arg2 >> 8) & 0xFF) / 0xFF);
_local6 = ((_arg2 & 0xFF) / 0xFF);
_local7 = (1 - _arg3);
_local8 = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
}
}//package com.greensock.plugins
Section 14
//ColorTransformPlugin (com.greensock.plugins.ColorTransformPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.geom.*;
import com.greensock.*;
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 _local4:ColorTransform;
var _local5:String;
var _local6:Number;
if (!(_arg1 is DisplayObject)){
return (false);
};
_local4 = _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 15
//DropShadowFilterPlugin (com.greensock.plugins.DropShadowFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
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 16
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin)
package com.greensock.plugins {
import com.greensock.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _info:Array;
protected var _a: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{
var _local3:int;
_a = _arg1;
_local3 = _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 _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
_local2 = _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 index:uint;
public var start:Number;
private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
Section 17
//FilterPlugin (com.greensock.plugins.FilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.core.*;
import com.greensock.*;
import flash.filters.*;
public class FilterPlugin extends TweenPlugin {
protected var _index:int;
protected var _filter:BitmapFilter;
protected var _type:Class;
protected var _remove:Boolean;
protected var _target:Object;
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 _local4:Array;
var _local5:String;
var _local6:int;
var _local7:HexColorsPlugin;
var _local8:Object;
_local4 = _target.filters;
_local8 = ((_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 _local2:int;
var _local3:PropTween;
var _local4:Array;
_local2 = _tweens.length;
_local4 = _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 18
//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{
var _local4:Array;
var _local5:String;
var _local6:int;
var _local7:int;
if ((!(_arg3.target) is MovieClip)){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
_local4 = _target.currentLabels;
_local5 = _arg2;
_local6 = _target.currentFrame;
_local7 = _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 19
//FramePlugin (com.greensock.plugins.FramePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class FramePlugin extends TweenPlugin {
public var frame:int;
protected var _target:MovieClip;
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 20
//GlowFilterPlugin (com.greensock.plugins.GlowFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
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 21
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin)
package com.greensock.plugins {
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 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);
}
override public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (_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--;
};
}
}
}//package com.greensock.plugins
Section 22
//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 23
//RoundPropsPlugin (com.greensock.plugins.RoundPropsPlugin)
package com.greensock.plugins {
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 24
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin)
package com.greensock.plugins {
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], ((typeof(_arg2[_local4]))=="number") ? Number(_arg2[_local4]) : (_arg1[_local4] + Number(_arg2[_local4])));
};
return (true);
}
public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local5:Number;
_local5 = ((_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 25
//TintPlugin (com.greensock.plugins.TintPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.core.*;
import flash.geom.*;
import com.greensock.*;
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{
var _local4:ColorTransform;
if (!(_arg1 is DisplayObject)){
return (false);
};
_local4 = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.vars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_transform = _arg1.transform;
_ct = _transform.colorTransform;
_local3 = _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);
};
};
}
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;
}
}
}//package com.greensock.plugins
Section 26
//TweenPlugin (com.greensock.plugins.TweenPlugin)
package com.greensock.plugins {
import com.greensock.core.*;
import com.greensock.*;
public class TweenPlugin {
public var activeDisable:Boolean;
public var onEnable:Function;
public var round:Boolean;
public var onDisable:Function;
public var propName:String;
protected var _tweens:Array;
public var priority:int;// = 0
public var overwriteProps:Array;
public var onComplete:Function;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.31;
public static const API:Number = 1;
public function TweenPlugin(){
priority = 0;
_tweens = [];
_changeFactor = 0;
super();
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _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);
};
};
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:PropTween;
var _local4:Number;
_local2 = _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));
};
};
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function get changeFactor():Number{
return (_changeFactor);
}
public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = 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 static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
TweenLite.onPluginEvent = TweenPlugin.onTweenEvent;
_local2 = _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 _local3:PropTween;
var _local4:Boolean;
var _local5:Array;
var _local6:int;
_local3 = _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 27
//VisiblePlugin (com.greensock.plugins.VisiblePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class VisiblePlugin extends TweenPlugin {
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _target:Object;
protected var _initVal:Boolean;
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 28
//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 _st:SoundTransform;
protected var _target:Object;
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 29
//OverwriteManager (com.greensock.OverwriteManager)
package com.greensock {
import com.greensock.core.*;
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 _local8:Number;
var _local9:Array;
var _local10:Array;
var _local11:uint;
var _local12:uint;
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);
};
_local8 = _arg1.startTime;
_local9 = [];
_local10 = [];
_local11 = 0;
_local12 = 0;
_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 30
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.display.*;
import flash.events.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
public class TweenLite extends TweenCore {
public var target:Object;
protected var _overwrite:uint;
public var ratio:Number;// = 0
protected var _notifyPluginsOfEnabled:Boolean;
protected var _hasPlugins:Boolean;
public var cachedPT1:PropTween;
protected var _overwrittenProps:Object;
public var propTweenLookup:Object;
protected var _ease:Function;
public static const version:Number = 11.131;
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 _local4:Array;
var _local5:TweenLite;
ratio = 0;
super(_arg2, _arg3);
this.target = _arg1;
if ((((this.target is TweenCore)) && (("timeScale" in this.vars)))){
this.cachedTimeScale = 1;
};
propTweenLookup = {};
_ease = defaultEase;
_overwrite = (((!((Number(_arg3.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
_local4 = 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);
};
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number;
var _local6:PropTween;
_local5 = this.cachedTime;
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 (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
_local6 = 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);
};
}
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;
}
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 invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
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 setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:Array;
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);
}
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 31
//TweenMax (com.greensock.TweenMax)
package com.greensock {
import flash.display.*;
import flash.events.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
import com.greensock.events.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _easePower:uint;
protected var _dispatcher:EventDispatcher;
protected var _hasUpdateListener:Boolean;
protected var _easeType:uint;
public var yoyo:Boolean;
protected var _repeat:int;// = 0
protected var _cyclesComplete:uint;// = 0
protected var _repeatDelay:Number;// = 0
public static const version:Number = 11.131;
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){
_repeat = 0;
_repeatDelay = 0;
_cyclesComplete = 0;
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 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;
};
};
};
}
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;
};
};
};
}
protected function updateTo(_arg1:Object, _arg2:Boolean=true):void{
var _local3:PropTween;
var _local4:Number;
var _local5:String;
var _local6:Object;
var _local7:Boolean;
var _local8:Object;
var _local9:int;
_local3 = this.cachedPT1;
_local4 = 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 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));
};
};
};
}
public function set totalProgress(_arg1:Number):void{
setTotalTime((this.totalDuration * _arg1), false);
}
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 killProperties(_arg1:Array):void{
var _local2:Object;
var _local3:int;
_local2 = {};
_local3 = _arg1.length;
while (_local3--) {
_local2[_arg1[_local3]] = true;
};
killVars(_local2);
}
public function dispatchEvent(_arg1:Event):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1));
}
protected function insertPropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String, _arg6:Boolean, _arg7:PropTween):PropTween{
var _local8:PropTween;
var _local9:Array;
var _local10:int;
_local8 = 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);
}
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 = {};
_local4[_arg1] = _arg2;
updateTo(_local4, _arg3);
}
public function set repeatDelay(_arg1:Number):void{
_repeatDelay = _arg1;
setDirtyCache(true);
}
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 get timeScale():Number{
return (this.cachedTimeScale);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Number;
var _local5:Number;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:PropTween;
var _local10:Number;
var _local11:uint;
var _local12:Number;
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
_local5 = 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 (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
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));
};
};
_local9 = 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));
}
public function set currentProgress(_arg1:Number):void{
if (_cyclesComplete == 0){
setTotalTime((this.duration * _arg1), false);
} else {
setTotalTime(((this.duration * _arg1) + (_cyclesComplete * this.cachedDuration)), false);
};
}
public function get totalProgress():Number{
return ((this.cachedTotalTime / this.totalDuration));
}
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);
}
public function get repeat():int{
return (_repeat);
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
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);
}
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 hasEventListener(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1));
}
override public function set totalDuration(_arg1:Number):void{
if (_repeat == -1){
return;
};
this.duration = ((_arg1 - (_repeat * _repeatDelay)) / (_repeat + 1));
}
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{
var _local2:Number;
if (_arg1 == 0){
_arg1 = 0.0001;
};
_local2 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
public static function set globalTimeScale(_arg1:Number):void{
var _local2:SimpleTimeline;
var _local3:Number;
if (_arg1 == 0){
_arg1 = 0.0001;
};
if (TweenLite.rootTimeline == null){
TweenLite.to({}, 0, {});
};
_local2 = TweenLite.rootTimeline;
_local3 = (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 _local2:Array;
var _local3:Array;
var _local4:int;
var _local5:uint;
_local2 = masterList[_arg1];
_local3 = [];
if (_local2){
_local4 = _local2.length;
_local5 = 0;
while (_local4--) {
if (!_local2[_local4].gc){
var _temp1 = _local5;
_local5 = (_local5 + 1);
var _local6 = _temp1;
_local3[_local6] = _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 _local3:Array;
var _local4:Object;
var _local5:DisplayObjectContainer;
var _local6:int;
_local3 = getAllTweens();
_local6 = _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 _local2:Array;
var _local3:int;
var _local4:TweenLite;
_local2 = getTweensOf(_arg1);
_local3 = _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 _local4:Array;
var _local5:Boolean;
var _local6:int;
_local4 = getAllTweens();
_local6 = _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 _local4:Array;
var _local5:Boolean;
var _local6:int;
_local4 = getAllTweens();
_local6 = _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 _local1:Dictionary;
var _local2:uint;
var _local3:Array;
var _local4:Array;
var _local5:int;
_local1 = masterList;
_local2 = 0;
_local3 = [];
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 l:uint;
var a:Array;
var curDelay:Number;
var onCompleteProxy:Function;
var onCompleteParamsProxy:Array;
var lastIndex:int;
var targets = _arg1;
var duration = _arg2;
var vars = _arg3;
var stagger = _arg4;
var onCompleteAll = _arg5;
var onCompleteAllParams = _arg6;
l = targets.length;
a = [];
curDelay = ((vars.delay) || (0));
onCompleteProxy = vars.onComplete;
onCompleteParamsProxy = vars.onCompleteParams;
lastIndex = ((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 32
//Tracker (com.memecounter.Tracker)
package com.memecounter {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class Tracker {
public static const ORI_DOM:String = "ori_dom";
public static const LOCALHOST:String = "localhost";
private static const MAX_ATTEMPTS:int = 3;
public static const LOCAL:String = "Local";
private static const ERROR_URL:String = "http://error.distralytics.com/comms/";
public static const TRACKER_PATH:String = "/node/tracking/trackerAS3.swf";
private static var ori_dom:String;
private static var lurl:String;
private static var _isReady:Boolean = false;
private static var _isInited:Boolean = false;
public static var c:uint;
public static var d:String = "";
public static var a:uint = 0;
public static var root:DisplayObject;
public static var mcEvent:Function;
public static var fpv:String = "";
private static var l:Loader;
public static var da:Array = ["distralytics.com", "distralytics.co.uk"];
private static var tracker:MovieClip;
private static function loadComplete(_arg1:Event):void{
var e = _arg1;
try {
tracker = e.target.content;
tracker.init(Tracker, root);
} catch(e:Error) {
trace("Memecounter error: unable to access tracker object due to security sandbox.");
};
}
public static function init(_arg1:uint, _arg2:DisplayObject):void{
var _local3:uint;
if (!_isInited){
_isInited = true;
c = _arg1;
root = _arg2;
_local3 = 0;
while (_local3 < da.length) {
Security.allowDomain(("*" + da[_local3]));
Security.allowDomain(da[_local3]);
Security.allowDomain(((c + ".c.") + da[_local3]));
Security.allowDomain(("*." + da[_local3]));
_local3++;
};
ori_dom = (root.loaderInfo.parameters.hasOwnProperty(ORI_DOM)) ? root.loaderInfo.parameters[ORI_DOM] : "";
d = ((ori_dom)!="") ? ori_dom : ((new LocalConnection().domain.indexOf(LOCALHOST))==-1) ? new LocalConnection().domain : LOCAL;
fpv = Capabilities.version.split(" ")[1].split(",")[0];
lurl = (((((((((TRACKER_PATH + "?c=") + c) + "&r=") + Math.floor((Math.random() * 10000000000))) + "&d=") + d) + "&p=") + fpv) + "&as=3");
l = new Loader();
l.contentLoaderInfo.addEventListener(Event.INIT, loadComplete);
l.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
lc();
mcEvent = kvEvent;
};
}
public static function trackerReady():void{
_isReady = true;
}
public static function get isReady():Boolean{
return (_isReady);
}
public static function mcClick(_arg1:String, _arg2:String=null):void{
if (_isReady){
tracker.mcClick(_arg1, _arg2);
};
}
private static function loadError(_arg1:Event):void{
var _local2:URLLoader;
var _local3:URLRequest;
var _local4:URLVariables;
a++;
if (a < MAX_ATTEMPTS){
lc();
} else {
_local2 = new URLLoader();
_local3 = new URLRequest(ERROR_URL);
_local4 = new URLVariables();
_local3.method = URLRequestMethod.GET;
_local3.data = _local4;
_local4.error = "Unable to load SWF";
_local4.c = c;
_local4.fd = root.loaderInfo.loaderURL;
_local4.p = fpv;
_local4.mv = "3.3.x";
_local4.r = Math.random();
_local2.load(_local3);
};
}
public static function kvCountry():String{
if (_isReady){
return (tracker.kvCountry());
};
return ("");
}
public static function kvClick(_arg1:uint):void{
if (_isReady){
tracker.kvClick(_arg1);
};
}
public static function kvEvent(_arg1):void{
if (_isReady){
tracker.kvEvent(_arg1);
};
}
private static function lc():void{
var _local1:String;
var _local2:String;
_local2 = da[(a % da.length)];
if (_local2.charAt(0) === "."){
_local1 = (("http://" + _local2.substr(1, (_local2.length - 1))) + lurl);
} else {
_local1 = (((("http://" + c) + ".c.") + _local2) + lurl);
};
Security.allowDomain(_local1);
l.load(new URLRequest(_local1));
}
}
}//package com.memecounter
Section 33
//Audio (com.tamba.tonic.Audio)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class Audio extends Sprite {
private var fadeStartVolume:Number;// = 0
private var fadeTimer:Timer;
private var fadeRate:Number;// = 0.05
private var fadeTimerMs:int;// = 50
private var fadeEndVolume:Number;// = 0
private static var effectsList:Array = [];
private static var effectsChannel:SoundChannel;
private static var _effectsVolume:Number = 1;
private static var musicChannel:SoundChannel;
private static var _musicVolume:Number = 1;
public function Audio(){
fadeTimerMs = 50;
fadeStartVolume = 0;
fadeEndVolume = 0;
fadeRate = 0.05;
super();
}
public function fadeMusic(_arg1:Number=0, _arg2:Number=1, _arg3:Number=1):void{
_musicVolume = (fadeStartVolume = _arg1);
fadeEndVolume = _arg2;
fadeRate = (Math.abs((fadeEndVolume - fadeStartVolume)) / ((_arg3 / fadeTimerMs) * 1000));
fadeTimer = new Timer(fadeTimerMs);
fadeTimer.addEventListener("timer", onFadeTimer, false, 0, true);
fadeTimer.start();
}
private function onFadeTimer(_arg1:Event):void{
if (fadeEndVolume > fadeStartVolume){
musicVolume = (musicVolume + fadeRate);
} else {
musicVolume = (musicVolume - fadeRate);
};
if ((((((fadeEndVolume > fadeStartVolume)) && ((_musicVolume > fadeEndVolume)))) || ((((fadeEndVolume <= fadeStartVolume)) && ((_musicVolume < fadeEndVolume)))))){
musicVolume = fadeEndVolume;
fadeTimer.stop();
};
applyMusicVolume();
}
public function set musicVolume(_arg1:Number):void{
_musicVolume = _arg1;
applyMusicVolume();
}
public function stopMusic():void{
if (musicChannel != null){
musicChannel.stop();
};
}
public function playMusic(_arg1:String):void{
var linkage = _arg1;
try {
musicChannel = new (getDefinitionByName(linkage)).play(0, 999);
trace(musicVolume);
applyMusicVolume();
} catch(error:Error) {
trace("playMusic: Invalid linkage >", linkage);
};
}
public function set effectsVolume(_arg1:Number):void{
_effectsVolume = _arg1;
applyEffectsVolume();
}
private function applyMusicVolume():void{
var _local1:SoundTransform;
if (musicChannel != null){
_local1 = musicChannel.soundTransform;
_local1.volume = _musicVolume;
musicChannel.soundTransform = _local1;
};
}
public function get musicVolume():Number{
return (_musicVolume);
}
public function stopEffects():void{
var _local1:uint;
_local1 = effectsList.length;
while (_local1--) {
if (effectsList[_local1] != null){
effectsList[_local1].stop();
};
};
effectsList = [];
}
public function get effectsVolume():Number{
return (_effectsVolume);
}
public function playEffect(_arg1:String, _arg2:int=1):void{
var linkage = _arg1;
var repeat = _arg2;
try {
effectsChannel = new (getDefinitionByName(linkage)).play(0, repeat);
effectsList.push(effectsChannel);
applyEffectsVolume();
} catch(error:Error) {
trace("playEffect: Invalid linkage >", linkage);
};
}
private function applyEffectsVolume():void{
var _local1:uint;
var _local2:SoundTransform;
_local1 = effectsList.length;
while (_local1--) {
if (effectsList[_local1] != null){
_local2 = effectsList[_local1].soundTransform;
_local2.volume = _effectsVolume;
effectsList[_local1].soundTransform = _local2;
};
};
}
}
}//package com.tamba.tonic
Section 34
//BaseScreen (com.tamba.tonic.BaseScreen)
package com.tamba.tonic {
import flash.display.*;
import flash.text.*;
import flash.ui.*;
public class BaseScreen extends MovieClip {
public var inp_send_email:TextField;
public var scrollBar:SimpleButton;
public var HallButton:MovieClip;
public var LivingRoomButton:MovieClip;
public var btnContinue:SimpleButton;
public var score_txt:TextField;
public var btn_submit:SimpleButton;
public var NurseryButton:MovieClip;
public var SelectBathroomButton:MovieClip;
public var btnStart:SimpleButton;
public var scores_txt:TextField;
public var inp_send_email_1:TextField;
public var inp_send_email_3:TextField;
public var inp_send_email_4:TextField;
public var text_error:TextField;
public var inp_send_email_2:TextField;
public var inp_send_email_5:TextField;
public var MarketingTxt:MovieClip;
public var inp_send_name:TextField;
public var menuUI:MovieClip;
public var SelectKitchenButton:MovieClip;
public var inp_send_name_2:TextField;
public var inp_send_name_3:TextField;
public var inp_send_name_4:TextField;
public var mc_instruct:MovieClip;
public var inp_send_name_5:TextField;
public var input_name:TextField;
public var slider:MovieClip;
public var btn_sendfriend:SimpleButton;
public var inp_send_name_1:TextField;
public var input_email:TextField;
public var names_txt:TextField;
public function BaseScreen(){
Mouse.show();
}
public function destroy():void{
}
public function getApp():Main{
return ((root as Main));
}
}
}//package com.tamba.tonic
Section 35
//BathroomScreenBase (com.tamba.tonic.BathroomScreenBase)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class BathroomScreenBase extends GameBase {
public var GermContainer1:MovieClip;
public var HUD:MovieClip;
public var BathroomGermZone1:MovieClip;
public var BathroomGermZone2:MovieClip;
public var BathroomGermZone6:MovieClip;
public var BathroomGermZone4:MovieClip;
public var BathroomGermZone5:MovieClip;
public var BathroomGermZone7:MovieClip;
public var BathroomGermZone8:MovieClip;
public var Towel1:MovieClip;
override public function OnInitScene():void{
var _local1:GermZone;
var _local2:String;
m_Towel = Towel1;
m_LevelId = Main.LEVEL_BATHROOM;
m_Hud = HUD;
_local2 = "GermGreen";
_local1 = new GermZone(BathroomGermZone2, new Point(1, -13), 64, 2, _local2);
GermContainer1.addChild(_local1);
_local1.x = BathroomGermZone2.x;
_local1.y = BathroomGermZone2.y;
zones.push(_local1);
_local1 = new GermZone(BathroomGermZone8, new Point(0, 0), 64, 2, _local2);
GermContainer1.addChild(_local1);
_local1.x = BathroomGermZone8.x;
_local1.y = BathroomGermZone8.y;
zones.push(_local1);
_local1 = new GermZone(BathroomGermZone1, new Point(-37, -17), 64, 2, _local2, false);
GermContainer1.addChild(_local1);
_local1.x = BathroomGermZone1.x;
_local1.y = BathroomGermZone1.y;
_local1.active = true;
zones.push(_local1);
_local1 = new GermZone(BathroomGermZone8, new Point(-20, -85), 64, 2, _local2);
GermContainer1.addChild(_local1);
_local1.x = BathroomGermZone8.x;
_local1.y = BathroomGermZone8.y;
zones.push(_local1);
_local1 = new GermZone(BathroomGermZone7, new Point(41, -14), 64, 2, _local2);
GermContainer1.addChild(_local1);
_local1.x = BathroomGermZone7.x;
_local1.y = BathroomGermZone7.y;
zones.push(_local1);
_local1 = new GermZone(BathroomGermZone4, new Point(0, 0), 64, 2, _local2, false);
GermContainer1.addChild(_local1);
_local1.x = BathroomGermZone4.x;
_local1.y = BathroomGermZone4.y;
_local1.active = true;
zones.push(_local1);
_local1 = new GermZone(BathroomGermZone7, new Point(0, 0), 64, 2, _local2);
GermContainer1.addChild(_local1);
_local1.x = BathroomGermZone7.x;
_local1.y = BathroomGermZone7.y;
zones.push(_local1);
}
override public function onFrameEnter(_arg1:Event):void{
super.onFrameEnter(_arg1);
}
}
}//package com.tamba.tonic
Section 36
//FPSCounter (com.tamba.tonic.FPSCounter)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class FPSCounter extends Sprite {
private var ticks:uint;// = 0
private var tf:TextField;
private var last:uint;
public function FPSCounter(_arg1:int=0, _arg2:int=0, _arg3:uint=0xFFFFFF, _arg4:Boolean=false, _arg5:uint=0){
last = getTimer();
ticks = 0;
super();
x = _arg1;
y = _arg2;
tf = new TextField();
tf.textColor = _arg3;
tf.text = "----- fps";
tf.selectable = false;
tf.background = _arg4;
tf.backgroundColor = _arg5;
tf.autoSize = TextFieldAutoSize.LEFT;
addChild(tf);
width = tf.textWidth;
height = tf.textHeight;
addEventListener(Event.ENTER_FRAME, tick);
}
public function tick(_arg1:Event):void{
var _local2:uint;
var _local3:uint;
var _local4:Number;
ticks++;
_local2 = getTimer();
_local3 = (_local2 - last);
if (_local3 >= 1000){
_local4 = ((ticks / _local3) * 1000);
tf.text = (_local4.toFixed(1) + " fps");
ticks = 0;
last = _local2;
};
}
}
}//package com.tamba.tonic
Section 37
//GameBase (com.tamba.tonic.GameBase)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import com.greensock.*;
import com.greensock.easing.*;
import flash.ui.*;
public class GameBase extends BaseScreen {
public var m_Hud:MovieClip;
public var stateChangeTime:Number;// = 0
public var STATE_GETREADY:int;// = 0
public var lastZoneId:int;// = 0
public var STATE_WAITEXIT:int;// = 4
public var STATE_EXIT:int;// = 5
public var lastSubdivideTime:Number;// = 0
private var invaderTimer:Timer;
public var zones:Array;
public var lastZoneActivate:Number;// = 0
public var STATE_PLAY:int;// = 1
public var m_Towel:MovieClip;
public var zoneSubDivideInterval:Number;// = 250
public var score:int;// = 0
public var clothActivated:Boolean;// = false
public var lastFireTime:Number;
public var m_StartTime:Number;
private var isScrubbing:Boolean;// = false
public var mouseDown:Boolean;// = false
public var clothPower:Number;// = 100
public var isGameover:Boolean;// = false
public var germCnt:int;// = 0
public var EVENT_STATECHANGE:String;// = "EVENT_STATECHANGE"
public var sprayPowerupAmount:Number;// = 100
public var zoneActiventerval:Number;// = 5000
public var STATE_COMPLETE:int;// = 3
public var infectedThreshold:Number;// = 0.1
public var maxGameTime:int;// = 30000
private var bottleHint:MovieClip;
private var invader:Invader;
private var bottleHintShown:Boolean;// = false
public var m_LevelId:int;// = -1
public var STATE_GAMEOVER:int;// = 2
public var gameState:int;
private var audio:Audio;
public var lastFrameTime:Number;
public function GameBase(){
STATE_GETREADY = 0;
STATE_PLAY = 1;
STATE_GAMEOVER = 2;
STATE_COMPLETE = 3;
STATE_WAITEXIT = 4;
STATE_EXIT = 5;
EVENT_STATECHANGE = "EVENT_STATECHANGE";
zoneSubDivideInterval = 250;
zoneActiventerval = 5000;
infectedThreshold = 0.1;
lastFrameTime = getTimer();
lastFireTime = getTimer();
zones = [];
lastSubdivideTime = 0;
lastZoneActivate = 0;
mouseDown = false;
lastZoneId = 0;
m_LevelId = -1;
stateChangeTime = 0;
isGameover = false;
clothPower = 100;
clothActivated = false;
sprayPowerupAmount = 100;
m_StartTime = getTimer();
maxGameTime = 30000;
germCnt = 0;
score = 0;
isScrubbing = false;
bottleHintShown = false;
super();
audio = new Audio();
GlobalObject.set("clothPower", clothPower);
m_StartTime = getTimer();
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
Mouse.hide();
setState(STATE_GETREADY);
}
public function onMouseDown(_arg1:Event):void{
if (clothActivated){
mouseDown = true;
};
}
private function onInvaderComplete(_arg1:Event):void{
invader.parent.removeChild(invader);
invader = null;
startInvaderTimer();
}
public function OnInitScene():void{
}
private function onInvaderTimerUpdate(_arg1:Event):void{
var invaderSent:Boolean;
var temp:Array;
var tempZones:Array;
var i:*;
var invaderType:String;
var event = _arg1;
try {
if (invader != null){
return;
};
if (getApp().levelId == 2){
return;
};
if (gameState != STATE_PLAY){
return;
};
trace(("Checking for invader requirement...." + gameState));
invaderSent = false;
temp = zones.concat();
tempZones = [];
while (temp.length > 0) {
tempZones.push(temp.splice(Math.round((Math.random() * (temp.length - 1))), 1)[0]);
};
i = 0;
while (i < tempZones.length) {
if (((tempZones[i].invaderRequested) && (!(tempZones[i].invaderArriving)))){
if (!invaderSent){
trace(("Sending invader to " + tempZones[i]));
tempZones[i].invaderArriving = true;
invaderType = "puppy";
if ((((((getApp().levelId == 0)) || ((getApp().levelId == 3)))) || ((getApp().levelId == 4)))){
invaderType = "baby";
};
invader = new Invader(invaderType, tempZones[i]);
invader.addEventListener("onComplete", onInvaderComplete, false, 0, true);
invaderSent = true;
stopInvaderTimer();
} else {
tempZones[i].respawnTime = 0;
tempZones[i].invaderRequested = false;
tempZones[i].invaderArriving = false;
};
};
i = (i + 1);
};
} catch(e:Error) {
};
}
public function onGetReadyDone(_arg1:Event):void{
var evt = _arg1;
setState(STATE_PLAY);
TweenLite.to(bottleHint, 1, {alpha:1, onComplete:function (){
bottleHintShown = true;
}});
m_StartTime = getTimer();
startInvaderTimer();
}
public function recharge():void{
if (bottleHint != null){
TweenLite.to(bottleHint, 1, {alpha:0, onComplete:function (){
bottleHint.parent.removeChild(bottleHint);
bottleHint = null;
}});
};
trace(bottleHintShown);
clothActivated = true;
audio.playEffect("spray");
clothPower = 100;
}
public function onFrameEnter(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:int;
var _local8:Number;
var _local9:Boolean;
var _local10:*;
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = ((getTimer() - lastFrameTime) / 1000);
germCnt = 0;
_local7 = 0;
while (_local7 < zones.length) {
germCnt = (germCnt + zones[_local7].m_Germs.length);
_local5 = (_local5 + zones[_local7].getInfectedTotal());
if (zones[_local7].getInfectedTotal() >= infectedThreshold){
_local3++;
};
if (zones[_local7].respawnCnt >= zones[_local7].maxRespawn){
_local4++;
trace((zones[_local7] + " complete"));
};
_local7++;
};
if (mouseDown){
fireWeaponAsPos(new Point(mouseX, mouseY), _local6);
};
if ((((((gameState == STATE_PLAY)) || ((gameState == STATE_GETREADY)))) || ((gameState == STATE_GETREADY)))){
m_Towel.x = mouseX;
m_Towel.y = mouseY;
m_Towel.TowelDry.alpha = (1 - (clothPower / 100));
if (((!(m_Towel.flashSponge)) && (((clothPower / 100) < 0.6)))){
m_Towel.flashSponge = true;
m_Towel.play();
};
};
if (gameState == STATE_GETREADY){
} else {
if ((((gameState == STATE_PLAY)) || ((gameState == STATE_GETREADY)))){
_local8 = (getTimer() - m_StartTime);
if ((getTimer() - lastSubdivideTime) > zoneSubDivideInterval){
lastSubdivideTime = getTimer();
if ((((_local8 < (maxGameTime * 0.85))) || ((germCnt < 0)))){
_local7 = lastZoneId;
while (_local7 < zones.length) {
if (zones[_local7].active){
_local10 = getTimer();
_local2 = (_local2 + zones[_local7].doSubdivide());
if ((getTimer() - _local10) > 46){
break;
};
if (_local2 > 1){
break;
};
} else {
if ((getTimer() - lastZoneActivate) > zoneActiventerval){
if (zones[_local7].respawnCnt < zones[_local7].maxRespawn){
zones[_local7].active = true;
lastZoneActivate = getTimer();
};
};
};
_local7++;
};
};
lastZoneId = _local7;
if (lastZoneId >= zones.length){
lastZoneId = 0;
};
if (((m_Hud) && ((gameState == STATE_PLAY)))){
m_Hud.setTimerBar((1 - ((getTimer() - m_StartTime) / maxGameTime)));
};
};
_local9 = (_local8 > maxGameTime);
if ((((_local4 >= zones.length)) || (_local9))){
trace(((("infectedTotal=" + _local3) + "/") + zones.length));
if (_local3 >= zones.length){
getApp().scoreTotal = score;
setState(STATE_GAMEOVER);
isGameover = true;
addChild(new GameOverAnim());
} else {
setState(STATE_COMPLETE);
addChild(new CompleteAnim());
getApp().levelsComplete[getApp().levelId] = score;
getApp().levelId++;
getApp().scoreTotal = score;
};
} else {
if (_local3 >= zones.length){
};
};
} else {
if (gameState == STATE_WAITEXIT){
if (isGameover){
getApp().setNextScreen(GameoverScreen);
} else {
getApp().setNextScreen(RoomSelectScreen);
};
play();
setState(STATE_EXIT);
destroy();
};
};
};
lastFrameTime = getTimer();
}
public function onMouseMove(_arg1:Event):void{
if (((((!(isScrubbing)) && (mouseDown))) && ((gameState == STATE_PLAY)))){
isScrubbing = true;
audio.playEffect("scrub");
};
if ((((mouseY > 385)) || (!((gameState == STATE_PLAY))))){
Mouse.show();
} else {
Mouse.hide();
};
}
private function onRemovedFromStage(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, onFrameEnter);
removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
removeEventListener("GET_READY_DONE", onGetReadyDone);
removeEventListener("GAMEOVER_DONE", onGameoverDone);
removeEventListener("COMPLETE_DONE", onCompleteDone);
}
public function initGame(){
score = getApp().scoreTotal;
addEventListener(Event.ENTER_FRAME, onFrameEnter);
addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
addEventListener("GET_READY_DONE", onGetReadyDone);
addEventListener("GAMEOVER_DONE", onGameoverDone);
addEventListener("COMPLETE_DONE", onCompleteDone);
OnInitScene();
if (m_Hud){
m_Hud.setScore(score);
};
TweenLite.delayedCall(0.1, m_Hud.setScore, [score]);
addChild(new GetReadyAnim());
bottleHint = new bottle_hint();
bottleHint.x = 88;
bottleHint.y = 352;
bottleHint.alpha = 0;
addChild(bottleHint);
if (getApp().debug){
addChild(new FPSCounter(0, 0, 0));
};
}
public function setState(_arg1:int):void{
gameState = _arg1;
dispatchEvent(new Event(EVENT_STATECHANGE));
stateChangeTime = getTimer();
}
public function onMouseUp(_arg1:Event):void{
isScrubbing = false;
audio.stopEffects();
mouseDown = false;
}
private function stopInvaderTimer():void{
if (invaderTimer != null){
invaderTimer.removeEventListener("timer", onInvaderTimerUpdate);
invaderTimer.stop();
invaderTimer = null;
};
}
private function onAddedToStage(_arg1:Event):void{
initGame();
}
public function onCompleteDone(_arg1:Event):void{
setState(STATE_WAITEXIT);
audio.stopEffects();
stopInvaderTimer();
if (invader != null){
TweenLite.to(invader, 0.5, {alpha:0});
};
}
private function startInvaderTimer():void{
invaderTimer = new Timer(5000);
invaderTimer.addEventListener("timer", onInvaderTimerUpdate);
invaderTimer.start();
}
public function onGameoverDone(_arg1:Event):void{
setState(STATE_WAITEXIT);
audio.stopEffects();
stopInvaderTimer();
}
public function fireWeaponAsPos(_arg1:Point, _arg2:Number):void{
var _local3:Point;
var _local4:int;
var _local5:Array;
var _local6:int;
var _local7:ScoreTxtOverlay;
if (gameState != STATE_PLAY){
return;
};
if ((getTimer() - lastFireTime) < 85){
};
lastFireTime = getTimer();
if (clothPower <= 0){
clothPower = 0;
};
_local3 = new Point();
_local4 = 0;
while (_local4 < zones.length) {
_local3 = zones[_local4].globalToLocal(_arg1);
_local5 = zones[_local4].getGermsNear(_local3, 50);
_local6 = 0;
while (_local6 < _local5.length) {
_local5[_local6].health = (_local5[_local6].health - ((clothPower * 2) * _arg2));
if (_local5[_local6].health < 0){
zones[_local4].removeGerm(_local5[_local6]);
score = (score + _local5[_local6].getScoreValue());
clothPower = (clothPower - (100 * _arg2));
if (clothPower < 0){
clothPower = 0;
};
GlobalObject.set("clothPower", clothPower);
_local7 = new ScoreTxtOverlay();
_arg1 = new Point((zones[_local4].x + _local5[_local6].x), (zones[_local4].y + _local5[_local6].y));
_local7.x = _arg1.x;
_local7.y = _arg1.y;
_local7.txtObj.scoreTxt1.text = ("+" + _local5[_local6].getScoreValue());
addChild(_local7);
if (m_Hud){
m_Hud.setScore(score);
};
};
_local6++;
};
_local4++;
};
}
override public function destroy():void{
}
}
}//package com.tamba.tonic
Section 38
//Germ (com.tamba.tonic.Germ)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class Germ extends Sprite {
public var cachedHasNearByFreeSpace:Boolean;// = true
public var m_StartPos:Point;
public var health:Number;// = 100
public var m_DestPos:Point;
protected var m_Time:Number;// = 0
protected var m_Moving:Boolean;
protected var m_LastFrameTime:Number;// = 0
protected var m_HotspotLevel:int;// = 2
public var germId:int;// = -1
protected var m_Radius:Number;// = 6
private var audio:Audio;
private var killPoints:Number;// = 100
public function Germ(_arg1:int, _arg2:Point, _arg3:Point, _arg4:int=2, _arg5:String=""){
var _local6:MovieClip;
m_Radius = 6;
m_Time = 0;
m_LastFrameTime = 0;
germId = -1;
health = 100;
cachedHasNearByFreeSpace = true;
m_HotspotLevel = 2;
killPoints = 100;
super();
audio = new Audio();
this.germId = _arg1;
m_StartPos = _arg2;
m_DestPos = _arg3;
m_HotspotLevel = _arg4;
m_Moving = true;
if (_arg5 == ""){
if (m_HotspotLevel == 3){
_local6 = new GermRed();
} else {
_local6 = new GermPurple();
};
} else {
_local6 = new (getDefinitionByName(_arg5));
};
addChild(_local6);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
m_LastFrameTime = getTimer();
onEnterFrame(null);
blendMode = BlendMode.HARDLIGHT;
}
public function getScoreValue():int{
audio.playEffect("pop");
if (killPoints <= 0){
killPoints = 1;
};
return (killPoints);
}
public function isClothLowPower():Boolean{
return ((((m_HotspotLevel == 3)) && ((GlobalObject.get("clothPower") <= 50))));
}
public function isMoving():Boolean{
return (m_Moving);
}
public function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public function onEnterFrame(_arg1:Event):void{
var _local2:Number;
if (!m_Moving){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
return;
};
_local2 = ((getTimer() - m_LastFrameTime) / 100);
if (isClothLowPower()){
m_Time = (m_Time + (0.2 * _local2));
} else {
m_Time = (m_Time + (0.1 * _local2));
};
if (m_Time >= 1){
m_Time = 1;
m_Moving = false;
};
x = easeInQuad(m_Time, m_StartPos.x, (m_DestPos.x - m_StartPos.x), 1, m_DestPos.x);
y = easeInQuad(m_Time, m_StartPos.y, (m_DestPos.y - m_StartPos.y), 1, m_DestPos.y);
killPoints = (killPoints - 0.5);
m_LastFrameTime = getTimer();
}
public function collidePoint(_arg1:Point):Boolean{
if (m_Moving){
if (Point.distance(m_DestPos, _arg1) < (m_Radius * 2)){
return (true);
};
};
return ((Point.distance(m_StartPos, _arg1) < (m_Radius * 2)));
}
}
}//package com.tamba.tonic
Section 39
//GermZone (com.tamba.tonic.GermZone)
package com.tamba.tonic {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class GermZone extends Sprite {
protected var m_RequiresInvader:Boolean;// = true
private var germLinkage:String;// = ""
public var active:Boolean;// = false
protected var m_SpawnPoint:Point;
public var respawnTime:int;// = 0
public var maxRespawn:int;// = 3
public var respawnCnt:int;// = 0
protected var m_PosCache:Array;
protected var m_MaskZone:MovieClip;
protected var m_FirstRun:Boolean;// = true
public var invaderArriving:Boolean;// = false
public var m_Germs:Array;
public var m_HotspotLevel:int;// = 2
protected var m_MaxGerms:int;// = 0
protected var m_ActiveGerms:Array;
protected var m_LastRemoveTime:Number;// = 0
public var invaderRequested:Boolean;// = false
public function GermZone(_arg1:MovieClip, _arg2:Point, _arg3:int=75, _arg4:int=2, _arg5:String="", _arg6:Boolean=true){
active = false;
maxRespawn = 3;
respawnCnt = 0;
m_Germs = [];
m_PosCache = [];
m_ActiveGerms = [];
m_FirstRun = true;
m_MaxGerms = 0;
m_LastRemoveTime = 0;
m_RequiresInvader = true;
m_HotspotLevel = 2;
germLinkage = "";
invaderRequested = false;
invaderArriving = false;
respawnTime = 0;
super();
_arg1.visible = false;
m_MaskZone = _arg1;
m_SpawnPoint = _arg2;
m_MaxGerms = _arg3;
m_HotspotLevel = _arg4;
m_RequiresInvader = _arg6;
germLinkage = _arg5;
}
public function removeGerm(_arg1:Germ):void{
var _local2:int;
var _local3:*;
_local2 = 0;
while (_local2 < m_Germs.length) {
if (m_Germs[_local2] == _arg1){
m_Germs.splice(_local2, 1);
removeChild(_arg1);
break;
};
_local2++;
};
_local2 = 0;
while (_local2 < m_ActiveGerms.length) {
if (m_ActiveGerms[_local2] == _arg1){
m_ActiveGerms.splice(_local2, 1);
break;
};
_local2++;
};
m_LastRemoveTime = getTimer();
m_PosCache = [];
_local3 = getGermsNear(_arg1.m_StartPos, 20);
_local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2].cachedHasNearByFreeSpace = true;
_local2++;
};
}
public function randDest(_arg1:Germ, _arg2:Number, _arg3:Boolean=false):Point{
var _local4:int;
var _local5:int;
var _local6:Point;
var _local7:int;
var _local8:Point;
var _local9:int;
var _local10:*;
var _local11:int;
var _local12:int;
var _local13:Boolean;
var _local14:Number;
var _local15:Number;
var _local16:Boolean;
_local5 = getTimer();
_local6 = new Point();
_local7 = 0;
if (!_arg1){
return (_local6);
};
if (!_arg1.cachedHasNearByFreeSpace){
return (_local6);
};
_local8 = new Point();
_local9 = Util.randRange(0, 360);
_local10 = getGermsNear(_arg1.m_StartPos, 10);
_local11 = _local9;
while ((_local11 = (_local11 - Util.randRange(0, 180))) > 0) {
_local14 = Util.randRange(0, 360);
_arg2 = Util.randRange((_arg2 - 2), (_arg2 + 2));
_local15 = Util.degreesToRandians(_local11);
_local8.x = (_arg1.x + (Math.cos(_local15) * _arg2));
_local8.y = (_arg1.y + (Math.sin(_local15) * _arg2));
if (!_arg3){
_local6 = _local8;
break;
};
_local16 = false;
_local4 = 0;
while (_local4 < _local10.length) {
if (_arg1 == _local10[_local4]){
} else {
_local7++;
if (_local10[_local4].collidePoint(_local8)){
_local16 = true;
break;
};
};
_local4++;
};
if (!_local16){
_local6 = _local8;
break;
};
};
_local12 = (getTimer() - _local5);
if (_local12 > 50){
};
_local13 = m_MaskZone.hitTestPoint((_local6.x + x), (_local6.y + y), true);
if (!_local13){
_local6 = new Point();
};
return (_local6);
}
public function doSubdivide():int{
var _local1:int;
var _local2:int;
var _local3:Germ;
var _local4:Germ;
var _local5:int;
var _local6:Boolean;
var _local7:int;
var _local8:int;
var _local9:Point;
_local1 = 0;
if (m_Germs.length > m_MaxGerms){
return (0);
};
_local2 = getTimer();
if (m_FirstRun){
m_FirstRun = false;
_local3 = new Germ(0, m_SpawnPoint, m_SpawnPoint, m_HotspotLevel, germLinkage);
addGerm(_local3);
_local1++;
} else {
if (m_Germs.length < 1){
if (respawnCnt < maxRespawn){
if (!m_RequiresInvader){
respawnTime = 5000;
} else {
if (!invaderRequested){
trace(this, " requests invader");
invaderRequested = true;
respawnTime = 99999999;
};
};
if (m_HotspotLevel == 3){
respawnTime = (respawnTime * (GlobalObject.get("clothPower") / 100));
};
if ((getTimer() - m_LastRemoveTime) > respawnTime){
invaderRequested = false;
invaderArriving = false;
trace(this, ((" respawning after " + (respawnTime / 1000)) + " seconds"));
m_FirstRun = true;
respawnCnt++;
};
};
} else {
_local6 = false;
_local7 = 0;
while (_local7 < Util.randRange(1, 3)) {
_local8 = 0;
while (_local8 < m_ActiveGerms.length) {
_local4 = m_ActiveGerms[_local8];
if (!_local4.isMoving()){
m_ActiveGerms.splice(_local8, 1);
_local9 = randDest(_local4, 10, true);
if (((((_local9.x) && (_local9.y))) && (!((((((((_local9.x < 10)) || ((_local9.x > 590)))) || ((_local9.y < 10)))) || ((_local9.y > 390))))))){
} else {
_local6 = true;
break;
};
_local3 = new Germ(m_Germs.length, new Point(_local4.x, _local4.y), _local9, m_HotspotLevel, germLinkage);
addGerm(_local3);
_local1++;
break;
};
_local8++;
};
_local7++;
};
if ((((m_ActiveGerms.length == 0)) || (_local6))){
_local4 = m_Germs[Util.randRange(0, (m_Germs.length - 1))];
_local9 = randDest(_local4, 10, true);
if (((_local9.x) && (_local9.y))){
_local3 = new Germ(m_Germs.length, new Point(_local4.x, _local4.y), _local9, m_HotspotLevel, germLinkage);
addGerm(_local3);
_local1++;
};
};
};
};
_local5 = (getTimer() - _local2);
if (_local5 > 100){
trace(("doSubdivide took: " + _local5));
};
return (_local1);
}
public function setMaskMc(_arg1:MovieClip):void{
m_MaskZone = _arg1;
}
public function getInfectedTotal():Number{
if (m_Germs.length){
return ((m_Germs.length / Number(m_MaxGerms)));
};
return (0);
}
public function getGermsNear(_arg1:Point, _arg2:Number=10):Array{
var _local3:Boolean;
var _local4:int;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:Number;
_local3 = m_MaskZone.hitTestPoint((_arg1.x + x), (_arg1.y + y), false);
if (!_local3){
return ([]);
};
_local4 = getTimer();
_local5 = [];
_local6 = 0;
while (_local6 < m_Germs.length) {
_local8 = Point.distance(m_Germs[_local6].m_DestPos, _arg1);
if (_local8 < _arg2){
_local5.push(m_Germs[_local6]);
};
_local6++;
};
_local7 = (getTimer() - _local4);
if (_local7 > 10){
trace(("getGermsNear took: " + _local7));
};
return (_local5);
}
public function addGerm(_arg1:Germ):void{
m_Germs.push(_arg1);
m_ActiveGerms.push(_arg1);
addChild(_arg1);
m_PosCache = [];
}
}
}//package com.tamba.tonic
Section 40
//GlobalObject (com.tamba.tonic.GlobalObject)
package com.tamba.tonic {
public class GlobalObject {
private static var _vars:Object = {};
public static function set(_arg1:String, _arg2):void{
_vars[_arg1] = _arg2;
}
public static function get(_arg1:String){
if (_vars[_arg1] == null){
};
return (_vars[_arg1]);
}
}
}//package com.tamba.tonic
Section 41
//HallScreenBase (com.tamba.tonic.HallScreenBase)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class HallScreenBase extends GameBase {
public var GermContainer1:MovieClip;
public var HUD:MovieClip;
public var GermZone1:MovieClip;
public var GermZone5:MovieClip;
public var Towel1:MovieClip;
public var GermZone3:MovieClip;
public var GermZone4:MovieClip;
public var GermZone2:MovieClip;
override public function OnInitScene():void{
var _local1:int;
var _local2:GermZone;
m_Towel = Towel1;
m_LevelId = Main.LEVEL_HALL;
m_Hud = HUD;
_local1 = 75;
_local2 = new GermZone(GermZone1, new Point(10, -20), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone1.x;
_local2.y = GermZone1.y;
zones.push(_local2);
_local2 = new GermZone(GermZone4, new Point(0, 0), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone4.x;
_local2.y = GermZone4.y;
zones.push(_local2);
_local2 = new GermZone(GermZone4, new Point(50, 40), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone4.x;
_local2.y = GermZone4.y;
zones.push(_local2);
_local2 = new GermZone(GermZone4, new Point(130, 80), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone4.x;
_local2.y = GermZone4.y;
zones.push(_local2);
}
override public function onFrameEnter(_arg1:Event):void{
super.onFrameEnter(_arg1);
}
}
}//package com.tamba.tonic
Section 42
//Invader (com.tamba.tonic.Invader)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import com.greensock.*;
import com.greensock.easing.*;
public class Invader extends MovieClip {
private var creature:MovieClip;
private var startPoint:Point;
private var scale:Number;// = 0.25
private var targetPoint:Point;
private var lastX:Number;// = 0
private var type:String;// = ""
private var baseClip:MovieClip;
private var germZone:GermZone;
public function Invader(_arg1:String, _arg2:GermZone):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:*;
var _local8:int;
type = "";
scale = 0.25;
lastX = 0;
startPoint = new Point();
targetPoint = new Point();
super();
baseClip = new MovieClip();
type = _arg1;
creature = new (getDefinitionByName(("invader_" + type)));
creature.scaleX = (creature.scaleY = scale);
creature.x = (-(creature.width) * 0.5);
creature.y = (-(creature.height) * 0.5);
creature.gotoAndStop("up");
baseClip.addChild(creature);
addChild(baseClip);
this.y = (startPoint.y = 450);
germZone = _arg2;
targetPoint.x = Math.floor(_arg2.x);
targetPoint.y = Math.floor(_arg2.y);
_arg2.parent.addChild(this);
_local3 = 280;
_local4 = 150;
_local5 = 450;
if (targetPoint.y < _local3){
targetPoint.y = _local3;
};
if (targetPoint.x < _local4){
targetPoint.x = _local4;
} else {
if (targetPoint.x > _local5){
targetPoint.x = _local5;
};
};
_local6 = 3;
if (type == "baby"){
_local6 = (_local6 * 1.5);
};
_local7 = this.getChildAt(0);
_local8 = targetPoint.x;
if (targetPoint.x > 300){
this.x = (startPoint.x = 250);
_local7.scaleX = 1;
_local8 = (_local8 * 0.75);
} else {
if (targetPoint.x <= 300){
this.x = (startPoint.x = 450);
_local7.scaleX = -1;
_local8 = (_local8 + (_local8 * 0.25));
};
};
TweenMax.to(this, _local6, {x:_local8, y:targetPoint.y, ease:Linear.easeInOut, onUpdate:onMovementUpdate, onComplete:onFirstMovementComplete});
}
private function onMissionComplete():void{
dispatchEvent(new Event("onComplete"));
}
private function onMovementComplete():void{
var _local1:*;
_local1 = this.getChildAt(0);
if (targetPoint.x < 300){
if (_local1.scaleX < 0){
_local1.scaleX = 1;
};
} else {
if (_local1.scaleX > 0){
_local1.scaleX = -1;
};
};
creature.gotoAndStop("touch");
germZone.m_HotspotLevel = 3;
germZone.respawnTime = 0;
TweenMax.to(this, 40, {useFrames:true, x:this.x, onComplete:exit});
}
private function onMovementUpdate():void{
var _local1:*;
var _local2:Number;
_local1 = this.getChildAt(0);
if (lastX > this.x){
if (_local1.scaleX < 0){
_local1.scaleX = -1;
};
} else {
if (_local1.scaleX > 0){
_local1.scaleX = 1;
};
};
_local2 = (this.y / 400);
this.scaleX = (this.scaleY = _local2);
lastX = this.x;
}
private function exit():void{
var _local1:int;
creature.gotoAndStop("down");
_local1 = 2;
if (type == "baby"){
_local1 = (_local1 * 2);
};
TweenMax.to(this, _local1, {x:startPoint.x, y:(startPoint.y + 100), onComplete:onMissionComplete, onUpdate:onMovementUpdate});
}
private function onFirstMovementComplete():void{
var _local1:*;
var _local2:Number;
_local1 = this.getChildAt(0);
_local2 = 1;
if (targetPoint.x < 300){
if (_local1.scaleX < 0){
_local1.scaleX = 1;
};
} else {
if (_local1.scaleX > 0){
_local1.scaleX = -1;
};
};
creature.gotoAndStop("side");
TweenMax.to(this, _local2, {x:targetPoint.x, ease:Linear.easeInOut, onUpdate:onMovementUpdate, onComplete:onMovementComplete});
}
}
}//package com.tamba.tonic
Section 43
//KitchenScreenBase (com.tamba.tonic.KitchenScreenBase)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class KitchenScreenBase extends GameBase {
public var Towel1:MovieClip;
public var GermContainer1:MovieClip;
public var HUD:MovieClip;
public var GermZone1:MovieClip;
public var GermZone5:MovieClip;
public var GermZone6:MovieClip;
public var GermZone7:MovieClip;
public var GermZone3:MovieClip;
public var GermZone4:MovieClip;
public var GermZone8:MovieClip;
public var GermZone2:MovieClip;
public var GermZone12:MovieClip;
public var GermZone10:MovieClip;
public var GermZone11:MovieClip;
override public function OnInitScene():void{
var _local1:int;
var _local2:GermZone;
var _local3:String;
m_Towel = Towel1;
m_LevelId = Main.LEVEL_KITCHEN;
m_Hud = HUD;
_local1 = 75;
_local3 = "GermPurple";
_local2 = new GermZone(GermZone1, new Point(0, 0), _local1, 3, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone1.x;
_local2.y = GermZone1.y;
_local2.active = true;
zones.push(_local2);
_local2 = new GermZone(GermZone2, new Point(0, 0), _local1, 3, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone2.x;
_local2.y = GermZone2.y;
zones.push(_local2);
_local2 = new GermZone(GermZone4, new Point(0, 0), _local1, 3, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone4.x;
_local2.y = GermZone4.y;
zones.push(_local2);
_local2 = new GermZone(GermZone1, new Point(-16, 38), _local1, 3, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone1.x;
_local2.y = GermZone1.y;
zones.push(_local2);
_local2 = new GermZone(GermZone3, new Point(12, -71), _local1, 2, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone3.x;
_local2.y = GermZone3.y;
zones.push(_local2);
_local2 = new GermZone(GermZone10, new Point(0, 0), _local1, 2, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone10.x;
_local2.y = GermZone10.y;
_local2.active = true;
zones.push(_local2);
_local2 = new GermZone(GermZone11, new Point(0, 0), _local1, 2, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone11.x;
_local2.y = GermZone11.y;
zones.push(_local2);
_local2 = new GermZone(GermZone6, new Point(-40, -8), _local1, 2, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone6.x;
_local2.y = GermZone6.y;
zones.push(_local2);
_local2 = new GermZone(GermZone7, new Point(0, 0), _local1, 2, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone7.x;
_local2.y = GermZone7.y;
_local2.active = true;
zones.push(_local2);
_local2 = new GermZone(GermZone5, new Point(0, 0), _local1, 2, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone5.x;
_local2.y = GermZone5.y;
zones.push(_local2);
_local2 = new GermZone(GermZone12, new Point(0, 0), _local1, 2, _local3);
GermContainer1.addChild(_local2);
_local2.x = GermZone12.x;
_local2.y = GermZone12.y;
zones.push(_local2);
}
override public function onFrameEnter(_arg1:Event):void{
super.onFrameEnter(_arg1);
}
}
}//package com.tamba.tonic
Section 44
//LivingRoomScreenBase (com.tamba.tonic.LivingRoomScreenBase)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class LivingRoomScreenBase extends GameBase {
public var GermContainer1:MovieClip;
public var HUD:MovieClip;
public var GermZone1:MovieClip;
public var Towel1:MovieClip;
public var GermZone6:MovieClip;
public var GermZone3:MovieClip;
public var GermZone2:MovieClip;
override public function OnInitScene():void{
var _local1:int;
var _local2:GermZone;
m_Towel = Towel1;
m_LevelId = Main.LEVEL_LIVINGROOM;
m_Hud = HUD;
_local1 = 75;
_local2 = new GermZone(GermZone3, new Point(0, 0), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone3.x;
_local2.y = GermZone3.y;
_local2.active = true;
zones.push(_local2);
_local2 = new GermZone(GermZone2, new Point(-88, -30), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone2.x;
_local2.y = GermZone2.y;
zones.push(_local2);
_local2 = new GermZone(GermZone2, new Point(-98, 29), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone2.x;
_local2.y = GermZone2.y;
_local2.active = true;
zones.push(_local2);
_local2 = new GermZone(GermZone2, new Point(0, 0), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone2.x;
_local2.y = GermZone2.y;
zones.push(_local2);
_local2 = new GermZone(GermZone6, new Point(0, 0), _local1, 2);
GermContainer1.addChild(_local2);
_local2.x = GermZone6.x;
_local2.y = GermZone6.y;
zones.push(_local2);
}
override public function onFrameEnter(_arg1:Event):void{
super.onFrameEnter(_arg1);
}
}
}//package com.tamba.tonic
Section 45
//Main (com.tamba.tonic.Main)
package com.tamba.tonic {
import flash.events.*;
import com.memecounter.*;
import flash.text.*;
public class Main extends ScreenManager {
public var percentTxt:TextField;
public var debug:Boolean;// = false
public var levelId:int;
public var levelsComplete:Array;
public var scoreTotal:int;// = 0
public static var LEVEL_END:int = 5;
public static var LEVEL_KITCHEN:int = 2;
public static var LEVEL_BATHROOM:int = 4;
public static var LEVEL_HALL:int = 0;
public static var LEVEL_NERSERY:int = 3;
public static var LEVEL_LIVINGROOM:int = 1;
public function Main(){
debug = false;
levelId = LEVEL_HALL;
levelsComplete = [0, 0, 0, 0, 0];
scoreTotal = 0;
super();
addFrameScript(0, frame1, 17, frame18);
try {
Tracker.init(1010, root);
trace("meme!");
} catch(e:Error) {
};
}
function frame18(){
setScreen(new MainMenuScreen());
stop();
}
function frame1(){
stage.addEventListener(Event.ENTER_FRAME, update);
stage.showDefaultContextMenu = false;
stop();
}
public function update(_arg1:Event):void{
var _local2:Number;
var _local3:Boolean;
_local2 = Math.floor(((this.loaderInfo.bytesLoaded * 100) / this.loaderInfo.bytesTotal));
percentTxt.text = (_local2 + "%");
_local3 = false;
if (_local2 >= 100){
stage.removeEventListener(Event.ENTER_FRAME, update);
gotoAndPlay("loadDone");
_local3 = true;
};
}
public function resetGame():void{
scoreTotal = 0;
levelId = 0;
levelsComplete = [0, 0, 0, 0, 0];
}
public function getGameUrl():String{
return ("http://www.tamba.co.uk/dev/tonic/");
}
}
}//package com.tamba.tonic
Section 46
//MainMenuScreenBase (com.tamba.tonic.MainMenuScreenBase)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class MainMenuScreenBase extends BaseScreen {
public var gameNameTwitter:String;// = "Germ+Warfare"
public var _strGameURL:String;
public var digBodyText:String;// = ""
public var mc_bookmarks:MovieClip;
public var gameName:String;// = "Germ Warfare"
private var audio:Audio;
public function MainMenuScreenBase(){
gameName = "Germ Warfare";
gameNameTwitter = "Germ+Warfare";
digBodyText = "";
super();
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
function onStumbleuponClicked(_arg1:MouseEvent):void{
getURL(((("http://www.stumbleupon.com/submit?url=" + _strGameURL) + "&title=Play ") + gameName), "_blank");
}
function onGoogleClicked(_arg1:MouseEvent):void{
getURL(((("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=" + _strGameURL) + "&title=Play ") + gameName), "_blank");
}
function onBookmarkClicked(_arg1:MouseEvent):void{
var _local2:String;
var _local3:String;
_local2 = "germhunter";
_local3 = ((("http://www.tamba-games.co.uk/bookmarks.php?client=" + _local2) + "&bookmark=") + _arg1.currentTarget.name.replace("btn_", ""));
getURL(_local3, "_blank");
}
function getURL(_arg1:String, _arg2:String=null):void{
var req:URLRequest;
var url = _arg1;
var window = _arg2;
req = new URLRequest(url);
try {
navigateToURL(req, window);
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
function onRedditClicked(_arg1:MouseEvent):void{
getURL(((("http://reddit.com/submit?url=" + _strGameURL) + "&title=Play ") + gameName), "_blank");
}
function addButtonHandler(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Boolean=false):void{
_arg1.addEventListener(MouseEvent[_arg2], _arg3);
_arg1.buttonMode = true;
}
function onFacebookClicked(_arg1:MouseEvent):void{
getURL(((("http://www.facebook.com/sharer.php?u=" + _strGameURL) + "&t=Play+") + gameNameTwitter), "_blank");
}
function onDiggClicked(_arg1:MouseEvent):void{
getURL(((((((("http://digg.com/submit?phase=2&url=" + _strGameURL) + "&title=") + gameName) + "&bodytext=") + digBodyText) + "?.&topic=") + gameName), "_blank");
}
function onYahooClicked(_arg1:MouseEvent):void{
getURL((((("http://bookmarks.yahoo.com/myresults/bookmarklet?t=Play " + gameName) + "&u=") + _strGameURL) + "&ei=UTF"), "_blank");
}
private function onAddedToStage(_arg1:Event):void{
_strGameURL = getApp().getGameUrl();
addButtonHandler(mc_bookmarks.btn_facebook, "CLICK", onBookmarkClicked, true);
addButtonHandler(mc_bookmarks.btn_twitter, "CLICK", onBookmarkClicked, true);
addButtonHandler(mc_bookmarks.btn_google, "CLICK", onBookmarkClicked, true);
addButtonHandler(mc_bookmarks.btn_yahoo, "CLICK", onBookmarkClicked, true);
addButtonHandler(mc_bookmarks.btn_delicious, "CLICK", onBookmarkClicked, true);
addButtonHandler(mc_bookmarks.btn_reddit, "CLICK", onBookmarkClicked, true);
addButtonHandler(mc_bookmarks.btn_stumbleupon, "CLICK", onBookmarkClicked, true);
addButtonHandler(mc_bookmarks.btn_digg, "CLICK", onBookmarkClicked, true);
audio = new Audio();
audio.playMusic("musicmain");
}
function onDeliciousClicked(_arg1:MouseEvent):void{
getURL((((("http://delicious.com/save?url=" + _strGameURL) + "&title=Play ") + gameName) + "¬es=&tags=&noui=no&share=yes&time=1262701148&recipients="), "_blank");
}
function onTwitterClicked(_arg1:MouseEvent):void{
getURL(((("http://twitter.com/home?status=Currently playing " + gameName) + " at ") + _strGameURL), "_blank");
}
}
}//package com.tamba.tonic
Section 47
//NurseryScreenBase (com.tamba.tonic.NurseryScreenBase)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class NurseryScreenBase extends GameBase {
public var GermContainer1:MovieClip;
public var HUD:MovieClip;
public var GermZone1:MovieClip;
public var GermZone5:MovieClip;
public var Towel1:MovieClip;
public var GermZone3:MovieClip;
public var GermZone4:MovieClip;
public var GermZone2:MovieClip;
override public function OnInitScene():void{
var _local1:GermZone;
m_Towel = Towel1;
m_LevelId = Main.LEVEL_NERSERY;
m_Hud = HUD;
_local1 = new GermZone(GermZone3, new Point(0, 0), 64, 2);
GermContainer1.addChild(_local1);
_local1.x = GermZone3.x;
_local1.y = GermZone3.y;
_local1.active = true;
zones.push(_local1);
_local1 = new GermZone(GermZone2, new Point(-20, -20), 64, 2);
GermContainer1.addChild(_local1);
_local1.x = GermZone2.x;
_local1.y = GermZone2.y;
_local1.active = true;
zones.push(_local1);
_local1 = new GermZone(GermZone1, new Point(0, 0), 64, 2, "", false);
GermContainer1.addChild(_local1);
_local1.x = GermZone1.x;
_local1.y = GermZone1.y;
_local1.active = true;
zones.push(_local1);
_local1 = new GermZone(GermZone4, new Point(0, 0), 64, 2);
GermContainer1.addChild(_local1);
_local1.x = GermZone4.x;
_local1.y = GermZone4.y;
_local1.active = true;
zones.push(_local1);
}
override public function onFrameEnter(_arg1:Event):void{
super.onFrameEnter(_arg1);
}
}
}//package com.tamba.tonic
Section 48
//Remoting (com.tamba.tonic.Remoting)
package com.tamba.tonic {
import flash.display.*;
import com.adobe.crypto.*;
import flash.net.*;
public class Remoting extends Sprite {
private var _strRemoteClass:String;// = "gameService"
private var _objParent;
private var rspIncRegionCount:Responder;
private var leaderboeadErrorCallback:Object;// = null
private var _strRootURL:String;// = "http://www.tamba-games.co.uk/tonic"
private var rspGetHighScores:Responder;
private var hiscoreSerrorCallback:Object;// = null
private var rspSendToFriend:Responder;
private var leaderboeadSuccessCallback:Object;// = null
private var _strServiceURL:String;
private var rspSetHighScore:Responder;
private var _objNC:NetConnection;
private var hiscoreSuccessCallback:Object;// = null
public function Remoting(_arg1):void{
_strRootURL = "http://www.tamba-games.co.uk/tonic";
_strServiceURL = (_strRootURL + "/amfphp/gateway.php");
_objNC = new NetConnection();
_strRemoteClass = "gameService";
hiscoreSuccessCallback = null;
hiscoreSerrorCallback = null;
leaderboeadSuccessCallback = null;
leaderboeadErrorCallback = null;
rspGetHighScores = new Responder(handleGetHighScores, errorHandlerLeaderboard);
rspSetHighScore = new Responder(handleSetHighScore, errorHandlerHiScore);
rspSendToFriend = new Responder(handleGetHighScores, errorHandlerLeaderboard);
rspIncRegionCount = new Responder(handleIncRegionCount, errorHandler);
super();
_objParent = _arg1;
remoteConnect();
}
private function handleIncRegionCount(_arg1:Object):void{
remoteDisconnect();
}
private function errorHandlerLeaderboard(_arg1:Object):void{
trace(("Remoting error: " + _arg1.description));
leaderboeadErrorCallback(this);
}
private function handleSetHighScore(_arg1:Object):void{
this.hiscoreSuccessCallback(this);
remoteDisconnect();
}
private function errorHandler(_arg1:Object):void{
trace(("Remoting error: " + _arg1.description));
}
private function handleGetHighScores(_arg1:Object):void{
leaderboeadSuccessCallback(_arg1);
remoteDisconnect();
}
public function getHighScores(_arg1:int, _arg2:Object, _arg3:Object):void{
trace("Retrieving high score list...");
_objNC.call((_strRemoteClass + ".getLeaderboard"), rspGetHighScores, _arg1);
this.leaderboeadSuccessCallback = _arg2;
this.leaderboeadErrorCallback = _arg3;
}
private function remoteDisconnect(){
trace("Closing connection to remoting server...");
_objNC.close();
}
public function sendToFriend(_arg1:String, _arg2:String, _arg3:Array, _arg4:Object, _arg5:Object):void{
_objNC.call((_strRemoteClass + ".sendToFriend"), rspSendToFriend, _arg1, _arg2, _arg3);
this.leaderboeadSuccessCallback = _arg4;
this.leaderboeadErrorCallback = _arg5;
}
private function errorHandlerHiScore(_arg1:Object):void{
trace(("Remoting error: " + _arg1.description));
this.hiscoreSerrorCallback(this);
}
public function setHighScore(_arg1:String, _arg2, _arg3:int, _arg4:Object, _arg5:Object):void{
var _local6:String;
_local6 = MD5.hash(((((("client=tonic&username=" + _arg1) + "&email=") + _arg2) + "&score=") + _arg3));
_objNC.call((_strRemoteClass + ".setHighScore"), rspSetHighScore, _arg1, _arg2, _arg3, _local6);
this.hiscoreSuccessCallback = _arg4;
this.hiscoreSerrorCallback = _arg5;
}
private function remoteConnect():void{
trace(("Opening connection to remoting server: " + _strServiceURL));
_objNC.connect(_strServiceURL);
}
public function incRegionCount(_arg1:String):void{
_objNC.call((_strRemoteClass + ".incRegionCount"), rspIncRegionCount, _arg1);
}
private function handleSendToFriend(_arg1:Object):void{
_objParent.sentToFriend();
remoteDisconnect();
}
}
}//package com.tamba.tonic
Section 49
//ScreenManager (com.tamba.tonic.ScreenManager)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class ScreenManager extends MovieClip {
protected var activeScreen:MovieClip;// = null
protected var nextScreen:Class;// = null
private var mainMusicPlaying:Boolean;// = false
protected var prevScreenName:String;
private var footer:MovieClip;
private var audio:Audio;
public function ScreenManager(){
activeScreen = null;
nextScreen = null;
mainMusicPlaying = false;
super();
audio = new Audio();
footer = new footer_mc();
addChild(footer);
footer.btn_sound.addEventListener(MouseEvent.CLICK, onSoundClicked);
footer.btn_tamba.addEventListener(MouseEvent.CLICK, onTambaClicked);
footer.btn_sound.mouseChildren = false;
footer.btn_sound.buttonMode = true;
footer.btn_tamba.mouseChildren = false;
footer.btn_tamba.buttonMode = true;
}
public function removeScreen(_arg1:MovieClip):void{
if (contains(_arg1)){
removeChild(activeScreen);
};
activeScreen = null;
}
public function setNextScreen(_arg1:Class):void{
var _local2:String;
_local2 = _arg1.toString();
audio.playEffect("fade");
nextScreen = _arg1;
}
function getURL(_arg1:String, _arg2:String=null):void{
var req:URLRequest;
var url = _arg1;
var window = _arg2;
req = new URLRequest(url);
try {
navigateToURL(req, window);
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
public function setScreen(_arg1:MovieClip):void{
if (activeScreen){
if (contains(activeScreen)){
activeScreen.destroy();
removeChild(activeScreen);
};
prevScreenName = activeScreen.screenName;
};
if (_arg1){
if (contains(_arg1)){
return;
};
addChild(_arg1);
};
activeScreen = _arg1;
setChildIndex(footer, (numChildren - 1));
}
private function onSoundClicked(_arg1:MouseEvent):void{
if (audio.musicVolume > 0){
audio.effectsVolume = 0;
audio.musicVolume = 0;
} else {
audio.effectsVolume = 1;
audio.musicVolume = 1;
};
}
public function getPrevScreenName():String{
return (prevScreenName);
}
private function onTambaClicked(_arg1:MouseEvent):void{
getURL("http://www.tamba.co.uk", "_blank");
}
public function notifyScreenExit(_arg1:MovieClip=null):void{
setScreen(new nextScreen());
nextScreen = null;
}
}
}//package com.tamba.tonic
Section 50
//ScrollBar (com.tamba.tonic.ScrollBar)
package com.tamba.tonic {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
public class ScrollBar extends Sprite {
private var trackLinkage:String;
private var scrollContent;
private var maskHeight:int;
private var maskWidth:int;
private var contentInitY:int;
private var _scrollFace;
private var scrollMask:Sprite;
private var faceLinkage:String;
private var moveIncrement:Number;
private var _scrollTrack;
public function ScrollBar(_arg1, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:String=null):void{
scrollContent = _arg1;
maskWidth = _arg2;
maskHeight = _arg3;
trackLinkage = _arg4;
faceLinkage = _arg5;
contentInitY = scrollContent.y;
initChildren();
moveIncrement = ((scrollContent.height - scrollMask.height) / (_scrollTrack.height - _scrollFace.height));
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
private function onScrollFaceMouseMove(_arg1:MouseEvent=null):void{
scrollContent.y = ((-(Math.abs((contentInitY - (_scrollFace.y + _scrollTrack.y)))) * moveIncrement) + contentInitY);
}
private function initTrack():void{
if (trackLinkage == null){
_scrollTrack = new Sprite();
_scrollTrack.graphics.beginFill(0xAAAAAA);
_scrollTrack.graphics.drawRect(0, 0, 20, scrollMask.height);
_scrollTrack.graphics.endFill();
_scrollTrack.filters = [new BevelFilter(-0.25, 45)];
} else {
_scrollTrack = new (getDefinitionByName(trackLinkage));
};
_scrollTrack.x = (scrollMask.x + scrollMask.width);
_scrollTrack.y = scrollMask.y;
addChild(_scrollTrack);
}
private function initMask():void{
scrollMask = new Sprite();
scrollMask.x = scrollContent.x;
scrollMask.y = scrollContent.y;
scrollMask.graphics.beginFill(0);
scrollMask.graphics.drawRect(0, 0, maskWidth, maskHeight);
scrollMask.graphics.endFill();
scrollContent.mask = scrollMask;
addChild(scrollMask);
}
private function initChildren():void{
removeChildren();
initMask();
initTrack();
initFace();
}
private function onScrollTrackMouseDown(_arg1:MouseEvent){
_scrollFace.y = (_scrollTrack.mouseY - _scrollFace.height);
if (_scrollFace.y < 0){
_scrollFace.y = 0;
};
onScrollFaceMouseMove();
}
private function onAddedToStage(_arg1:Event):void{
_scrollFace.addEventListener(MouseEvent.MOUSE_DOWN, onScrollFaceMouseDown, false, 0, true);
}
private function initFace():void{
if (faceLinkage == null){
_scrollFace = new Sprite();
_scrollFace.graphics.beginFill(0xEEEEEE);
_scrollFace.graphics.drawRect(0, 0, 20, 20);
_scrollFace.graphics.endFill();
_scrollFace.filters = [new BevelFilter(0.25, 45)];
} else {
_scrollFace = new (getDefinitionByName(faceLinkage));
};
_scrollTrack.addChild(_scrollFace);
}
public function get scrollTrack(){
return (_scrollTrack);
}
private function removeChildren():void{
while (numChildren) {
removeChild(getChildAt(0));
};
}
public function get scrollFace(){
return (_scrollFace);
}
private function onScrollFaceMouseUp(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, onScrollFaceMouseUp);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onScrollFaceMouseMove);
stopDrag();
}
private function onScrollFaceMouseDown(_arg1:MouseEvent){
stage.addEventListener(MouseEvent.MOUSE_UP, onScrollFaceMouseUp);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onScrollFaceMouseMove);
_scrollFace.startDrag(false, new Rectangle(0, 0, 0, (_scrollTrack.height - _scrollFace.height)));
}
}
}//package com.tamba.tonic
Section 51
//Util (com.tamba.tonic.Util)
package com.tamba.tonic {
import flash.geom.*;
public class Util {
public static function angleBetweenRad(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
_local5 = Math.atan2(_local4, _local3);
return (_local5);
}
public static function degreesToRandians(_arg1:Number):Number{
return (((_arg1 * Math.PI) / 180));
}
public static function angleBetween(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
_local5 = Math.atan2(_local4, _local3);
_local6 = (_local5 * (180 / Math.PI));
return (_local6);
}
public static function lerp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * _arg3)));
}
public static function randRange(_arg1:Number, _arg2:Number):Number{
return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1));
}
public static function radiansToDegrees(_arg1:Number):Number{
return (((_arg1 * 180) / Math.PI));
}
public static function normaliseDegree(_arg1:Number):Number{
var _local2:Number;
_local2 = (_arg1 % 360);
if (_local2 < 0){
_local2 = (360 + _local2);
};
return (Math.abs(_local2));
}
public static function inRange(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
if (_arg3 > _arg2){
if ((((_arg1 >= _arg2)) && ((_arg1 <= _arg3)))){
return (true);
};
} else {
if ((((_arg1 >= _arg3)) && ((_arg1 <= _arg2)))){
return (true);
};
};
return (false);
}
}
}//package com.tamba.tonic
Section 52
//BathroomButton1_340 (germhunter_fla.BathroomButton1_340)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
public dynamic class BathroomButton1_340 extends MovieClip {
public var enableUI:Boolean;
public function BathroomButton1_340(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
public function onOver(_arg1:Event):void{
if (enableUI){
gotoAndStop(3);
};
}
function frame4(){
stop();
enableUI = false;
}
function frame1(){
enableUI = true;
stop();
}
function frame2(){
stop();
}
public function onOut(_arg1:Event):void{
if (enableUI){
gotoAndStop(2);
};
}
}
}//package germhunter_fla
Section 53
//bookmarks_mc_323 (germhunter_fla.bookmarks_mc_323)
package germhunter_fla {
import flash.display.*;
public dynamic class bookmarks_mc_323 extends MovieClip {
public var btn_delicious:MovieClip;
public var btn_facebook:MovieClip;
public var btn_stumbleupon:MovieClip;
public var btn_digg:MovieClip;
public var btn_google:MovieClip;
public var btn_twitter:MovieClip;
public var btn_yahoo:MovieClip;
public var btn_reddit:MovieClip;
}
}//package germhunter_fla
Section 54
//GameGUD_25 (germhunter_fla.GameGUD_25)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class GameGUD_25 extends MovieClip {
public var timerBar:MovieClip;
public var scoreTxtMc:MovieClip;
public function GameGUD_25(){
addFrameScript(0, frame1);
}
public function setTimerBar(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = -276.4;
_local3 = 300.6;
_local4 = (_local3 - _local2);
timerBar.x = (_local2 + (_local4 * _arg1));
}
public function setScore(_arg1:int){
scoreTxtMc.scoreTxt.text = ("SCORE: " + _arg1);
}
function frame1(){
setTimerBar(1);
setScore(0);
stop();
}
}
}//package germhunter_fla
Section 55
//HallButton1_520 (germhunter_fla.HallButton1_520)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
public dynamic class HallButton1_520 extends MovieClip {
public var enableUI:Boolean;
public function HallButton1_520(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
public function onOver(_arg1:Event):void{
if (enableUI){
gotoAndStop(3);
};
}
function frame4(){
stop();
enableUI = false;
}
function frame1(){
enableUI = true;
stop();
}
function frame2(){
stop();
}
public function onOut(_arg1:Event):void{
if (enableUI){
gotoAndStop(2);
};
}
}
}//package germhunter_fla
Section 56
//HiscoresButton_317 (germhunter_fla.HiscoresButton_317)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
public dynamic class HiscoresButton_317 extends MovieClip {
public var buttonMc:SimpleButton;
public var isActive:Boolean;
public function HiscoresButton_317(){
addFrameScript(0, frame1, 1, frame2);
}
public function setActive(_arg1:Boolean){
isActive = _arg1;
if (isActive){
gotoAndStop(2);
};
}
public function onOver(_arg1:Event):void{
gotoAndStop(2);
}
function frame1(){
isActive = false;
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
stop();
}
function frame2(){
stop();
}
public function onOut(_arg1:Event):void{
if (!isActive){
gotoAndStop(1);
};
}
}
}//package germhunter_fla
Section 57
//instructions_559 (germhunter_fla.instructions_559)
package germhunter_fla {
import flash.display.*;
public dynamic class instructions_559 extends MovieClip {
public var splayMc:MovieClip;
public var mc_cloth:MovieClip;
}
}//package germhunter_fla
Section 58
//InstructionsButton_319 (germhunter_fla.InstructionsButton_319)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
public dynamic class InstructionsButton_319 extends MovieClip {
public var buttonMc:SimpleButton;
public var isActive:Boolean;
public function InstructionsButton_319(){
addFrameScript(0, frame1, 1, frame2);
}
public function setActive(_arg1:Boolean){
isActive = _arg1;
if (isActive){
gotoAndStop(2);
};
}
public function onOver(_arg1:Event):void{
gotoAndStop(2);
}
function frame1(){
isActive = false;
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
stop();
}
function frame2(){
stop();
}
public function onOut(_arg1:Event):void{
if (!isActive){
gotoAndStop(1);
};
}
}
}//package germhunter_fla
Section 59
//KitchenButton1_342 (germhunter_fla.KitchenButton1_342)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
public dynamic class KitchenButton1_342 extends MovieClip {
public var enableUI:Boolean;
public function KitchenButton1_342(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
public function onOver(_arg1:Event):void{
if (enableUI){
gotoAndStop(3);
};
}
function frame4(){
stop();
enableUI = false;
}
function frame1(){
enableUI = true;
stop();
}
function frame2(){
stop();
}
public function onOut(_arg1:Event):void{
if (enableUI){
gotoAndStop(2);
};
}
}
}//package germhunter_fla
Section 60
//leg_back_32 (germhunter_fla.leg_back_32)
package germhunter_fla {
import flash.display.*;
public dynamic class leg_back_32 extends MovieClip {
public function leg_back_32(){
addFrameScript(6, frame7);
}
function frame7(){
}
}
}//package germhunter_fla
Section 61
//LivingRoomButton1_400 (germhunter_fla.LivingRoomButton1_400)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
public dynamic class LivingRoomButton1_400 extends MovieClip {
public var enableUI:Boolean;
public function LivingRoomButton1_400(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
public function onOver(_arg1:Event):void{
if (enableUI){
gotoAndStop(3);
};
}
function frame4(){
stop();
enableUI = false;
}
function frame1(){
enableUI = true;
stop();
}
function frame2(){
stop();
}
public function onOut(_arg1:Event):void{
if (enableUI){
gotoAndStop(2);
};
}
}
}//package germhunter_fla
Section 62
//MainMenuUI_314 (germhunter_fla.MainMenuUI_314)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class MainMenuUI_314 extends MovieClip {
public var InstructionsButton:MovieClip;
public var HiscoresButton:MovieClip;
public var SendToFriendButton:MovieClip;
public var PlayButton:SimpleButton;
public function MainMenuUI_314(){
addFrameScript(0, frame1);
}
public function onHiscoresButton(_arg1:Event):void{
getApp().setNextScreen(HiscoresScreen);
(parent as MovieClip).play();
}
public function getApp():Main{
return ((root as Main));
}
public function onInstructionsButton(_arg1:Event):void{
getApp().setNextScreen(InstructionsScreen);
(parent as MovieClip).play();
}
function frame1(){
stop();
PlayButton.addEventListener(MouseEvent.CLICK, onPlayButton);
HiscoresButton.addEventListener(MouseEvent.CLICK, onHiscoresButton);
InstructionsButton.addEventListener(MouseEvent.CLICK, onInstructionsButton);
SendToFriendButton.addEventListener(MouseEvent.CLICK, onSendToFriendButton);
}
public function onSendToFriendButton(_arg1:Event):void{
getApp().setNextScreen(SendToFriendScreen);
(parent as MovieClip).play();
}
public function onPlayButton(_arg1:Event):void{
getApp().resetGame();
getApp().setNextScreen(RoomSelectScreen);
(parent as MovieClip).play();
}
}
}//package germhunter_fla
Section 63
//MarketingMsgTxt_617 (germhunter_fla.MarketingMsgTxt_617)
package germhunter_fla {
import flash.display.*;
public dynamic class MarketingMsgTxt_617 extends MovieClip {
public function MarketingMsgTxt_617(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package germhunter_fla
Section 64
//NurseryButton1_344 (germhunter_fla.NurseryButton1_344)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
public dynamic class NurseryButton1_344 extends MovieClip {
public var enableUI:Boolean;
public function NurseryButton1_344(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
public function onOver(_arg1:Event):void{
if (enableUI){
gotoAndStop(3);
};
}
function frame4(){
stop();
enableUI = false;
}
function frame1(){
enableUI = true;
stop();
}
function frame2(){
stop();
}
public function onOut(_arg1:Event):void{
if (enableUI){
gotoAndStop(2);
};
}
}
}//package germhunter_fla
Section 65
//puppy_jumpup_46 (germhunter_fla.puppy_jumpup_46)
package germhunter_fla {
import flash.display.*;
public dynamic class puppy_jumpup_46 extends MovieClip {
public var mc_leg_front_1:MovieClip;
public var mc_leg_front_2:MovieClip;
public var mc_leg_back_2:MovieClip;
public var mc_leg_back_1:MovieClip;
public function puppy_jumpup_46(){
addFrameScript(42, frame43);
}
function frame43(){
stop();
}
}
}//package germhunter_fla
Section 66
//puppy_walk_back_51 (germhunter_fla.puppy_walk_back_51)
package germhunter_fla {
import flash.display.*;
public dynamic class puppy_walk_back_51 extends MovieClip {
public var mc_leg_front_1:MovieClip;
public var mc_leg_front_2:MovieClip;
public var mc_leg_back_2:MovieClip;
public var mc_leg_back_1:MovieClip;
public function puppy_walk_back_51(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
mc_leg_front_1.gotoAndPlay("start_1");
mc_leg_front_2.gotoAndPlay("start_2");
mc_leg_back_1.gotoAndPlay("start_1");
mc_leg_back_2.gotoAndPlay("start_2");
}
function frame30(){
gotoAndPlay(2);
}
}
}//package germhunter_fla
Section 67
//puppy_walk_front_60 (germhunter_fla.puppy_walk_front_60)
package germhunter_fla {
import flash.display.*;
public dynamic class puppy_walk_front_60 extends MovieClip {
public var mc_leg_front_1:MovieClip;
public var mc_leg_front_2:MovieClip;
public var mc_leg_back_2:MovieClip;
public var mc_leg_back_1:MovieClip;
public function puppy_walk_front_60(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
mc_leg_front_1.gotoAndPlay("start_1");
mc_leg_front_2.gotoAndPlay("start_2");
mc_leg_back_1.gotoAndPlay("start_1");
mc_leg_back_2.gotoAndPlay("start_2");
}
function frame30(){
gotoAndPlay(2);
}
}
}//package germhunter_fla
Section 68
//puppy_walk_side_31 (germhunter_fla.puppy_walk_side_31)
package germhunter_fla {
import flash.display.*;
public dynamic class puppy_walk_side_31 extends MovieClip {
public var mc_leg_front_1:MovieClip;
public var mc_leg_front_2:MovieClip;
public var mc_leg_back_2:MovieClip;
public var mc_leg_back_1:MovieClip;
public function puppy_walk_side_31(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
mc_leg_front_1.gotoAndPlay("start_1");
mc_leg_front_2.gotoAndPlay("start_2");
mc_leg_back_1.gotoAndPlay("start_1");
mc_leg_back_2.gotoAndPlay("start_2");
}
function frame30(){
gotoAndPlay(2);
}
}
}//package germhunter_fla
Section 69
//ScoreTxt1_17 (germhunter_fla.ScoreTxt1_17)
package germhunter_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ScoreTxt1_17 extends MovieClip {
public var scoreTxt1:TextField;
}
}//package germhunter_fla
Section 70
//scoreTxtMc_27 (germhunter_fla.scoreTxtMc_27)
package germhunter_fla {
import flash.display.*;
import flash.text.*;
public dynamic class scoreTxtMc_27 extends MovieClip {
public var scoreTxt:TextField;
}
}//package germhunter_fla
Section 71
//SendToFriendButton_321 (germhunter_fla.SendToFriendButton_321)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
public dynamic class SendToFriendButton_321 extends MovieClip {
public var buttonMc:SimpleButton;
public var isActive:Boolean;
public function SendToFriendButton_321(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function setActive(_arg1:Boolean){
isActive = _arg1;
if (isActive){
gotoAndStop(2);
};
}
function frame3(){
stop();
}
public function onOver(_arg1:Event):void{
gotoAndStop(2);
}
function frame1(){
isActive = false;
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
stop();
}
function frame2(){
stop();
}
public function onOut(_arg1:Event):void{
if (!isActive){
gotoAndStop(1);
};
}
}
}//package germhunter_fla
Section 72
//SparyIconBase_560 (germhunter_fla.SparyIconBase_560)
package germhunter_fla {
import flash.display.*;
public dynamic class SparyIconBase_560 extends MovieClip {
public function SparyIconBase_560(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package germhunter_fla
Section 73
//SparyIconBaseRed_19 (germhunter_fla.SparyIconBaseRed_19)
package germhunter_fla {
import flash.display.*;
public dynamic class SparyIconBaseRed_19 extends MovieClip {
public function SparyIconBaseRed_19(){
addFrameScript(0, frame1, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
}
}//package germhunter_fla
Section 74
//SprayIconAntiBac_18 (germhunter_fla.SprayIconAntiBac_18)
package germhunter_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import com.greensock.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class SprayIconAntiBac_18 extends MovieClip {
public var splayMc:MovieClip;
public var enableUI:Boolean;
public var mc_hit:SimpleButton;
public var t;
public var inited:Boolean;
public function SprayIconAntiBac_18(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 46, frame47);
}
public function onDown(_arg1:Event):void{
if (enableUI){
enableUI = false;
splayMc.gotoAndPlay(1);
splayMc.visible = true;
gotoAndPlay(4);
(parent as Object).recharge();
};
}
function frame3(){
stop();
}
public function onOver(_arg1:Event):void{
if (enableUI){
gotoAndStop(3);
};
}
function frame1(){
inited = false;
}
function frame2(){
enableUI = true;
stop();
mc_hit.addEventListener(MouseEvent.CLICK, onDown);
mc_hit.addEventListener(MouseEvent.MOUSE_OVER, onOver);
mc_hit.addEventListener(MouseEvent.MOUSE_OUT, onOut);
splayMc.visible = false;
if (!inited){
inited = true;
this.visible = false;
this.alpha = 0;
t = this;
TweenLite.delayedCall(2, function (){
t.visible = true;
TweenLite.to(t, 0.5, {alpha:1});
});
};
}
function frame47(){
enableUI = true;
gotoAndStop(2);
}
public function onOut(_arg1:Event):void{
if (enableUI){
gotoAndStop(2);
};
}
}
}//package germhunter_fla
Section 75
//Towel1_12 (germhunter_fla.Towel1_12)
package germhunter_fla {
import flash.display.*;
public dynamic class Towel1_12 extends MovieClip {
public var TowelDry:MovieClip;
public var flashSponge:Boolean;
public function Towel1_12(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
flashSponge = false;
}
function frame2(){
if (!flashSponge){
stop();
};
}
}
}//package germhunter_fla
Section 76
//BathroomScreen (BathroomScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class BathroomScreen extends BathroomScreenBase {
public function BathroomScreen(){
addFrameScript(11, frame12, 22, frame23);
}
function frame12(){
stop();
dispatchEvent(new Event("TRANSITION_DONE"));
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
}
}//package
Section 77
//bottle_hint (bottle_hint)
package {
import flash.display.*;
public dynamic class bottle_hint extends MovieClip {
}
}//package
Section 78
//CompleteAnim (CompleteAnim)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import com.tamba.tonic.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class CompleteAnim extends MovieClip {
public var btnContinue:SimpleButton;
public var rand:Number;
public var suffix:String;
public var MarketingTxt:MovieClip;
public function CompleteAnim(){
addFrameScript(0, frame1, 110, frame111, 124, frame125, 135, frame136);
}
public function getApp(){
return ((root as Main));
}
function frame1(){
Mouse.show();
}
function frame111(){
btnContinue.addEventListener(MouseEvent.CLICK, onContinue);
suffix = "";
rand = (Math.random() * 500);
if (rand > 250){
suffix = "_ALT";
trace("Displaying alt fact");
} else {
trace("Displaying standard fact");
};
switch (getApp().levelId){
case Main.LEVEL_HALL:
MarketingTxt.gotoAndStop(1);
break;
case Main.LEVEL_LIVINGROOM:
MarketingTxt.gotoAndStop(("POST_LEVEL_HALL" + suffix));
break;
case Main.LEVEL_KITCHEN:
MarketingTxt.gotoAndStop(("POST_LEVEL_LIVINGROOM" + suffix));
break;
case Main.LEVEL_NERSERY:
MarketingTxt.gotoAndStop(("POST_LEVEL_KITCHEN" + suffix));
break;
case Main.LEVEL_BATHROOM:
MarketingTxt.gotoAndStop(("POST_LEVEL_NERSERY" + suffix));
break;
case Main.LEVEL_END:
MarketingTxt.gotoAndStop(("POST_LEVEL_BATHROOM" + suffix));
break;
default:
trace(("Unkown levelId: " + getApp().levelId));
};
}
public function onContinue(_arg1:Event):void{
play();
}
function frame125(){
stop();
}
function frame136(){
parent.dispatchEvent(new Event("COMPLETE_DONE"));
stop();
}
}
}//package
Section 79
//CongratulationsScreen (CongratulationsScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class CongratulationsScreen extends BaseScreen {
public function CongratulationsScreen(){
addFrameScript(1, frame2, 22, frame23, 46, frame47);
}
public function onContinueButton(_arg1:Event):void{
getApp().setNextScreen(SubmitScoreScreen);
play();
}
function frame23(){
stop();
}
function frame47(){
getApp().notifyScreenExit(this);
stop();
}
function frame2(){
btnContinue.addEventListener(MouseEvent.CLICK, onContinueButton);
}
}
}//package
Section 80
//fade (fade)
package {
import flash.media.*;
public dynamic class fade extends Sound {
}
}//package
Section 81
//footer_mc (footer_mc)
package {
import flash.display.*;
public dynamic class footer_mc extends MovieClip {
public var btn_tamba:MovieClip;
public var btn_sound:MovieClip;
}
}//package
Section 82
//GameOverAnim (GameOverAnim)
package {
import flash.display.*;
import flash.events.*;
public dynamic class GameOverAnim extends MovieClip {
public function GameOverAnim(){
addFrameScript(110, frame111);
}
function frame111(){
parent.dispatchEvent(new Event("GAMEOVER_DONE"));
stop();
}
}
}//package
Section 83
//GameoverScreen (GameoverScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class GameoverScreen extends BaseScreen {
public function GameoverScreen(){
addFrameScript(1, frame2, 22, frame23, 46, frame47);
}
public function onContinueButton(_arg1:Event):void{
getApp().setNextScreen(SubmitScoreScreen);
play();
}
function frame23(){
stop();
}
function frame47(){
getApp().notifyScreenExit(this);
stop();
}
function frame2(){
btnContinue.addEventListener(MouseEvent.CLICK, onContinueButton);
}
}
}//package
Section 84
//GermGreen (GermGreen)
package {
import flash.display.*;
public dynamic class GermGreen extends MovieClip {
public function GermGreen(){
addFrameScript(61, frame62);
}
function frame62(){
stop();
}
}
}//package
Section 85
//GermPurple (GermPurple)
package {
import flash.display.*;
public dynamic class GermPurple extends MovieClip {
public function GermPurple(){
addFrameScript(61, frame62);
}
function frame62(){
stop();
}
}
}//package
Section 86
//GermRed (GermRed)
package {
import flash.display.*;
public dynamic class GermRed extends MovieClip {
public function GermRed(){
addFrameScript(61, frame62);
}
function frame62(){
stop();
}
}
}//package
Section 87
//GetReadyAnim (GetReadyAnim)
package {
import flash.display.*;
import flash.events.*;
public dynamic class GetReadyAnim extends MovieClip {
public function GetReadyAnim(){
addFrameScript(110, frame111);
}
function frame111(){
parent.dispatchEvent(new Event("GET_READY_DONE"));
stop();
if (parent.contains(this)){
parent.removeChild(this);
};
}
}
}//package
Section 88
//HallScreen (HallScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class HallScreen extends HallScreenBase {
public function HallScreen(){
addFrameScript(11, frame12, 22, frame23);
}
function frame12(){
stop();
dispatchEvent(new Event("TRANSITION_DONE"));
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
}
}//package
Section 89
//HiscoresScreen (HiscoresScreen)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import com.tamba.tonic.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class HiscoresScreen extends BaseScreen {
public var objRemote:Remoting;
public function HiscoresScreen(){
addFrameScript(0, frame1, 11, frame12, 22, frame23);
}
public function onSuccess(_arg1:Object):void{
var _local2:*;
names_txt.text = "";
scores_txt.text = "";
trace("onSuccess");
_local2 = 0;
while (_local2 < _arg1.length) {
trace(_local2, _arg1[_local2][0]);
names_txt.appendText((_arg1[_local2][0] + "\n"));
scores_txt.appendText((_arg1[_local2][1] + "\n"));
_local2++;
};
}
function frame12(){
stop();
}
function frame1(){
menuUI.HiscoresButton.setActive(true);
objRemote = new Remoting(this);
objRemote.getHighScores(50, onSuccess, onFail);
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
public function onFail(_arg1:Remoting):void{
trace("onFail");
}
}
}//package
Section 90
//InstructionsScreen (InstructionsScreen)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.filters.*;
import com.tamba.tonic.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class InstructionsScreen extends BaseScreen {
public var scrollbar:ScrollBar;
public function InstructionsScreen(){
addFrameScript(0, frame1, 11, frame12, 22, frame23);
}
function frame12(){
stop();
}
function frame1(){
menuUI.InstructionsButton.setActive(true);
scrollbar = new ScrollBar(mc_instruct, 234, 260, "scroll_track", "scroll_face");
addChild(scrollbar);
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
}
}//package
Section 91
//invader_baby (invader_baby)
package {
import flash.display.*;
public dynamic class invader_baby extends MovieClip {
}
}//package
Section 92
//invader_puppy (invader_puppy)
package {
import flash.display.*;
public dynamic class invader_puppy extends MovieClip {
}
}//package
Section 93
//KitchenScreen (KitchenScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class KitchenScreen extends KitchenScreenBase {
public function KitchenScreen(){
addFrameScript(0, frame1, 1, frame2, 11, frame12, 22, frame23);
}
function frame12(){
stop();
dispatchEvent(new Event("TRANSITION_DONE"));
}
function frame1(){
}
function frame2(){
trace("kitchen new");
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
public function onEnterFcukingFrame(_arg1:Event){
trace(GermZone1.hitTestPoint(mouseX, mouseY, true));
}
}
}//package
Section 94
//LivingRoomScreen (LivingRoomScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class LivingRoomScreen extends LivingRoomScreenBase {
public function LivingRoomScreen(){
addFrameScript(11, frame12, 22, frame23);
}
function frame12(){
stop();
dispatchEvent(new Event("TRANSITION_DONE"));
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
}
}//package
Section 95
//MainMenuScreen (MainMenuScreen)
package {
import com.tamba.tonic.*;
public dynamic class MainMenuScreen extends MainMenuScreenBase {
public function MainMenuScreen(){
addFrameScript(0, frame1, 11, frame12, 22, frame23);
}
function frame12(){
stop();
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
function frame1(){
}
}
}//package
Section 96
//musicmain (musicmain)
package {
import flash.media.*;
public dynamic class musicmain extends Sound {
}
}//package
Section 97
//NurseryScreen (NurseryScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class NurseryScreen extends NurseryScreenBase {
public function NurseryScreen(){
addFrameScript(11, frame12, 22, frame23);
}
function frame12(){
stop();
dispatchEvent(new Event("TRANSITION_DONE"));
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
}
}//package
Section 98
//pop (pop)
package {
import flash.media.*;
public dynamic class pop extends Sound {
}
}//package
Section 99
//RoomSelectScreen (RoomSelectScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class RoomSelectScreen extends BaseScreen {
public function RoomSelectScreen(){
addFrameScript(1, frame2, 11, frame12, 22, frame23);
}
function frame12(){
stop();
}
public function onContinueButton(_arg1:Event):void{
switch (getApp().levelId){
case Main.LEVEL_HALL:
trace("onContinueButton LEVEL_HALL");
getApp().setNextScreen(HallScreen);
break;
case Main.LEVEL_LIVINGROOM:
trace("onContinueButton LEVEL_LIVINGROOM");
getApp().setNextScreen(LivingRoomScreen);
break;
case Main.LEVEL_KITCHEN:
trace("onContinueButton LEVEL_KITCHEN");
getApp().setNextScreen(KitchenScreen);
break;
case Main.LEVEL_NERSERY:
trace("onContinueButton LEVEL_NERSERY");
getApp().setNextScreen(NurseryScreen);
break;
case Main.LEVEL_BATHROOM:
trace("onContinueButton LEVEL_BATHROOM");
getApp().setNextScreen(BathroomScreen);
break;
case Main.LEVEL_END:
trace("onContinueButton Congrats");
getApp().setNextScreen(CongratulationsScreen);
break;
};
play();
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
function frame2(){
if (!getApp().levelsComplete[Main.LEVEL_HALL]){
} else {
HallButton.gotoAndStop(4);
};
if (!getApp().levelsComplete[Main.LEVEL_BATHROOM]){
} else {
SelectBathroomButton.gotoAndStop(4);
};
if (!getApp().levelsComplete[Main.LEVEL_KITCHEN]){
} else {
SelectKitchenButton.gotoAndStop(4);
};
if (!getApp().levelsComplete[Main.LEVEL_NERSERY]){
} else {
NurseryButton.gotoAndStop(4);
};
if (!getApp().levelsComplete[Main.LEVEL_LIVINGROOM]){
} else {
LivingRoomButton.gotoAndStop(4);
};
HallButton.addEventListener(MouseEvent.CLICK, onContinueButton);
SelectBathroomButton.addEventListener(MouseEvent.CLICK, onContinueButton);
SelectKitchenButton.addEventListener(MouseEvent.CLICK, onContinueButton);
NurseryButton.addEventListener(MouseEvent.CLICK, onContinueButton);
LivingRoomButton.addEventListener(MouseEvent.CLICK, onContinueButton);
btnContinue.addEventListener(MouseEvent.CLICK, onContinueButton);
btnStart.addEventListener(MouseEvent.CLICK, onContinueButton);
switch (getApp().levelId){
case Main.LEVEL_HALL:
HallButton.gotoAndStop(3);
break;
case Main.LEVEL_LIVINGROOM:
LivingRoomButton.gotoAndStop(3);
break;
case Main.LEVEL_KITCHEN:
SelectKitchenButton.gotoAndStop(3);
break;
case Main.LEVEL_NERSERY:
NurseryButton.gotoAndStop(3);
break;
case Main.LEVEL_BATHROOM:
SelectBathroomButton.gotoAndStop(3);
break;
case Main.LEVEL_END:
trace("set LEVEL_END msg");
break;
default:
trace(("Unkown levelId: " + getApp().levelId));
};
if (getApp().levelId != 0){
btnStart.visible = false;
};
}
}
}//package
Section 100
//ScoreTxtOverlay (ScoreTxtOverlay)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public dynamic class ScoreTxtOverlay extends MovieClip {
public var startTime:int;
public var txtObj:MovieClip;
public function ScoreTxtOverlay(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, onFrameEnter);
startTime = getTimer();
}
public function onFrameEnter(_arg1:Event):void{
var _local2:Number;
_local2 = ((getTimer() - startTime) / 1000);
y = (y - (50 * _local2));
alpha = (alpha - (5 * _local2));
if (alpha < 0){
if (parent.contains(this)){
parent.removeChild(this);
};
removeEventListener(Event.ENTER_FRAME, onFrameEnter);
};
startTime = getTimer();
}
}
}//package
Section 101
//scroll_face (scroll_face)
package {
import flash.display.*;
public dynamic class scroll_face extends MovieClip {
}
}//package
Section 102
//scroll_track (scroll_track)
package {
import flash.display.*;
public dynamic class scroll_track extends MovieClip {
}
}//package
Section 103
//scrub (scrub)
package {
import flash.media.*;
public dynamic class scrub extends Sound {
}
}//package
Section 104
//SendToFriendScreen (SendToFriendScreen)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import com.greensock.*;
import flash.filters.*;
import com.tamba.tonic.*;
import com.greensock.easing.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class SendToFriendScreen extends BaseScreen {
public var _intMaxFriends:int;
public function SendToFriendScreen(){
addFrameScript(0, frame1, 12, frame13, 22, frame23);
}
public function onSendButton(_arg1:Event){
var _local2:Array;
var _local3:MovieClip;
var _local4:*;
var _local5:String;
var _local6:String;
var _local7:Remoting;
_local2 = [];
_local3 = this;
_local4 = 1;
while (_local4 <= _intMaxFriends) {
_local5 = trim(_local3[("inp_send_name_" + _local4)].text);
_local6 = trim(_local3[("inp_send_email_" + _local4)].text);
_local2.push([_local5, _local6]);
_local4++;
};
_local5 = trim(this["inp_send_name"].text);
_local6 = trim(this["inp_send_email"].text);
if (validateSendFriendSubmit(_local5, _local6, _local2)){
btn_sendfriend.visible = false;
showAlertMessage("Please wait...");
_local7 = new Remoting(this);
_local7.sendToFriend(_local5, _local6, _local2, onSuccess, onFail);
};
}
public function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
return (_arg1.replace(/^\s+|\s+$/g, ""));
}
function frame13(){
stop();
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
function frame1(){
menuUI.SendToFriendButton.setActive(true);
btn_sendfriend.addEventListener(MouseEvent.CLICK, onSendButton);
_intMaxFriends = 5;
resetSendFriend();
inp_send_name.tabIndex = 1;
inp_send_email.tabIndex = 2;
inp_send_name_1.tabIndex = 3;
inp_send_email_1.tabIndex = 4;
inp_send_name_2.tabIndex = 5;
inp_send_email_2.tabIndex = 6;
inp_send_name_3.tabIndex = 7;
inp_send_email_3.tabIndex = 8;
}
public function showAlertMessage(_arg1:String):void{
var strMessage = _arg1;
try {
text_error.text = strMessage;
} catch(e:Error) {
trace("Can't set warning message");
};
}
public function resetSendFriend(_arg1:Boolean=true):void{
var _local2:*;
if (_arg1){
inp_send_name.text = "";
inp_send_email.text = "";
};
_local2 = 1;
while (_local2 <= _intMaxFriends) {
this[("inp_send_name_" + _local2)].text = "";
this[("inp_send_email_" + _local2)].text = "";
_local2++;
};
}
public function onSuccess(_arg1:Remoting):void{
var _local2:MovieClip;
var _local3:*;
showAlertMessage("Messages sent!");
btn_sendfriend.visible = true;
_local2 = this;
_local3 = 1;
while (_local3 <= _intMaxFriends) {
_local2[("inp_send_name_" + _local3)].text = "";
_local2[("inp_send_email_" + _local3)].text = "";
_local3++;
};
}
public function validateSendFriendSubmit(_arg1:String, _arg2:String, _arg3:Array):Boolean{
var _local4:RegExp;
var _local5:uint;
var _local6:*;
_local4 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
_local5 = 0;
if (_arg1.length < 1){
showAlertMessage("Please enter your name.");
return (false);
};
if (!_local4.test(_arg2)){
showAlertMessage("Your email address isn't valid.");
return (false);
};
_local6 = 0;
while (_local6 < _arg3.length) {
if ((((_arg3[_local6][0] == "")) && (_local4.test(_arg3[_local6][1])))){
showAlertMessage((("Friend " + (_local6 + 1)) + " doesn't have a name."));
return (false);
};
if (((!((_arg3[_local6][0] == ""))) && (!(_local4.test(_arg3[_local6][1]))))){
showAlertMessage((("Friend " + (_local6 + 1)) + "'s email address isn't valid."));
return (false);
};
if (((_arg3[_local6][0]) && (_local4.test(_arg3[_local6][1])))){
_local5++;
};
_local6++;
};
if (_local5 <= 0){
showAlertMessage("Please enter some recipients.");
return (false);
};
return (true);
}
public function onFail(_arg1:Remoting):void{
trace("onFail");
showAlertMessage("Oops, failed to submit score.");
btn_submit.visible = true;
}
}
}//package
Section 105
//spray (spray)
package {
import flash.media.*;
public dynamic class spray extends Sound {
}
}//package
Section 106
//SubmitScoreScreen (SubmitScoreScreen)
package {
import flash.events.*;
import com.tamba.tonic.*;
public dynamic class SubmitScoreScreen extends BaseScreen {
public function SubmitScoreScreen(){
addFrameScript(0, frame1, 11, frame12, 22, frame23);
}
public function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
return (_arg1.replace(/^\s+|\s+$/g, ""));
}
public function validateScoreSubmit(_arg1:String, _arg2:String):Boolean{
var _local3:RegExp;
_local3 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
if (_arg1.length < 1){
showAlertMessage("Please enter your name.");
return (false);
};
if (!_local3.test(_arg2)){
showAlertMessage("Your email address is not valid.");
return (false);
};
return (true);
}
function frame12(){
stop();
}
function frame1(){
btn_submit.addEventListener(MouseEvent.CLICK, onSubmitScoreSubmitted);
input_name.tabIndex = 1;
input_email.tabIndex = 2;
score_txt.text = ("" + getApp().scoreTotal);
}
function frame23(){
getApp().notifyScreenExit(this);
stop();
}
public function showAlertMessage(_arg1:String):void{
var strMessage = _arg1;
try {
text_error.text = strMessage;
} catch(e:Error) {
trace("Can't set warning message");
};
}
public function onSuccess(_arg1:Remoting):void{
getApp().setNextScreen(HiscoresScreen);
play();
}
public function onSubmitScoreSubmitted(_arg1:MouseEvent):void{
var _local2:String;
var _local3:String;
var _local4:Remoting;
trace("onSubmitScoreSubmitted");
_local2 = trim(input_name.text);
_local3 = trim(input_email.text);
if (validateScoreSubmit(_local2, _local3)){
trace("SUbmitting...");
btn_submit.visible = false;
_local4 = new Remoting(this);
_local4.setHighScore(_local2, _local3, getApp().scoreTotal, onSuccess, onFail);
};
}
public function onFail(_arg1:Remoting):void{
trace("onFail");
showAlertMessage("Oops, failed to submit score.");
btn_submit.visible = true;
}
}
}//package