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
//CDK (com.coreyoneil.collision.CDK)
package com.coreyoneil.collision {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.text.*;
import flash.errors.*;
public class CDK {
private var colorTransform1:ColorTransform;
private var colorTransform2:ColorTransform;
private var _returnAngleType:String;
private var pixels1:ByteArray;
private var pixels2:ByteArray;
private var bmdResample:BitmapData;
private var _returnAngle:Boolean;
private var transMatrix2:Matrix;
private var rect1:Rectangle;
private var rect2:Rectangle;
private var transMatrix1:Matrix;
protected var objectCheckArray:Array;
private var _alphaThreshold:Number;
private var item1Registration:Point;
private var bmd1:BitmapData;
private var bmd2:BitmapData;
protected var objectArray:Array;
private var item2Registration:Point;
protected var objectCollisionArray:Array;
private var _numChildren:uint;
private var colorExclusionArray:Array;
public function CDK():void{
if (getQualifiedClassName(this) == "com.coreyoneil.collision::CDK"){
throw (new Error("CDK is an abstract class and is not meant for instantiation - use CollisionGroup or CollisionList"));
};
init();
}
public function get returnAngle():Boolean{
return (_returnAngle);
}
public function set returnAngle(_arg1:Boolean):void{
_returnAngle = _arg1;
}
private function init():void{
objectCheckArray = [];
objectCollisionArray = [];
objectArray = [];
colorExclusionArray = [];
_alphaThreshold = 0;
_returnAngle = true;
_returnAngleType = "RADIANS";
}
protected function findCollisions(_arg1, _arg2):void{
var item1_isText:Boolean;
var item2_isText:Boolean;
var item1xDiff:Number;
var item1yDiff:Number;
var currentObj:*;
var k:uint;
var value1:uint;
var value2:uint;
var collisionPoint:Number;
var overlap:Boolean;
var overlapping:Array;
var locY:Number;
var locX:Number;
var locStage:Point;
var hasColors:int;
var pixelLength:int;
var alpha1:uint;
var alpha2:uint;
var colorFlag:Boolean;
var red1:uint;
var red2:uint;
var green1:uint;
var green2:uint;
var blue1:uint;
var blue2:uint;
var colorObj:Object;
var aPlus:uint;
var aMinus:uint;
var rPlus:uint;
var rMinus:uint;
var gPlus:uint;
var gMinus:uint;
var bPlus:uint;
var bMinus:uint;
var item1Flags:uint;
var item2Flags:uint;
var n:uint;
var angle:Number;
var recordedCollision:Object;
var item1 = _arg1;
var item2 = _arg2;
item1_isText = false;
item2_isText = false;
if ((item1 is TextField)){
item1_isText = ((item1.antiAliasType)=="advanced") ? true : false;
item1.antiAliasType = ((item1.antiAliasType)=="advanced") ? "normal" : item1.antiAliasType;
};
if ((item2 is TextField)){
item2_isText = ((item2.antiAliasType)=="advanced") ? true : false;
item2.antiAliasType = ((item2.antiAliasType)=="advanced") ? "normal" : item2.antiAliasType;
};
colorTransform1 = item1.transform.colorTransform;
colorTransform2 = item2.transform.colorTransform;
item1Registration = new Point();
item2Registration = new Point();
item1Registration = item1.localToGlobal(item1Registration);
item2Registration = item2.localToGlobal(item2Registration);
bmd1 = new BitmapData(item1.width, item1.height, true, 0xFFFFFF);
bmd2 = new BitmapData(item1.width, item1.height, true, 0xFFFFFF);
transMatrix1 = item1.transform.matrix;
currentObj = item1;
while (currentObj.parent != null) {
transMatrix1.concat(currentObj.parent.transform.matrix);
currentObj = currentObj.parent;
};
rect1 = item1.getBounds(currentObj);
if (item1 != currentObj){
rect1.x = (rect1.x + currentObj.x);
rect1.y = (rect1.y + currentObj.y);
};
var _local4 = (item1Registration.x - rect1.left);
item1xDiff = _local4;
transMatrix1.tx = _local4;
_local4 = (item1Registration.y - rect1.top);
item1yDiff = _local4;
transMatrix1.ty = _local4;
transMatrix2 = item2.transform.matrix;
currentObj = item2;
while (currentObj.parent != null) {
transMatrix2.concat(currentObj.parent.transform.matrix);
currentObj = currentObj.parent;
};
transMatrix2.tx = (item2Registration.x - rect1.left);
transMatrix2.ty = (item2Registration.y - rect1.top);
bmd1.draw(item1, transMatrix1, colorTransform1, null, null, true);
bmd2.draw(item2, transMatrix2, colorTransform2, null, null, true);
pixels1 = bmd1.getPixels(new Rectangle(0, 0, bmd1.width, bmd1.height));
pixels2 = bmd2.getPixels(new Rectangle(0, 0, bmd1.width, bmd1.height));
k = 0;
value1 = 0;
value2 = 0;
collisionPoint = -1;
overlap = false;
overlapping = [];
hasColors = colorExclusionArray.length;
pixels1.position = 0;
pixels2.position = 0;
pixelLength = pixels1.length;
while (k < pixelLength) {
k = pixels1.position;
try {
value1 = pixels1.readUnsignedInt();
value2 = pixels2.readUnsignedInt();
} catch(e:EOFError) {
break;
};
alpha1 = ((value1 >> 24) & 0xFF);
alpha2 = ((value2 >> 24) & 0xFF);
if ((((alpha1 > _alphaThreshold)) && ((alpha2 > _alphaThreshold)))){
colorFlag = false;
if (hasColors){
red1 = ((value1 >> 16) & 0xFF);
red2 = ((value2 >> 16) & 0xFF);
green1 = ((value1 >> 8) & 0xFF);
green2 = ((value2 >> 8) & 0xFF);
blue1 = (value1 & 0xFF);
blue2 = (value2 & 0xFF);
n = 0;
while (n < hasColors) {
colorObj = Object(colorExclusionArray[n]);
item1Flags = 0;
item2Flags = 0;
if ((((blue1 >= colorObj.bMinus)) && ((blue1 <= colorObj.bPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((blue2 >= colorObj.bMinus)) && ((blue2 <= colorObj.bPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((green1 >= colorObj.gMinus)) && ((green1 <= colorObj.gPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((green2 >= colorObj.gMinus)) && ((green2 <= colorObj.gPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((red1 >= colorObj.rMinus)) && ((red1 <= colorObj.rPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((red2 >= colorObj.rMinus)) && ((red2 <= colorObj.rPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((alpha1 >= colorObj.aMinus)) && ((alpha1 <= colorObj.aPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((alpha2 >= colorObj.aMinus)) && ((alpha2 <= colorObj.aPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((item1Flags == 4)) || ((item2Flags == 4)))){
colorFlag = true;
};
n = (n + 1);
};
};
if (!colorFlag){
overlap = true;
collisionPoint = (k >> 2);
locY = (collisionPoint / bmd1.width);
locX = (collisionPoint % bmd1.width);
locY = (locY - item1yDiff);
locX = (locX - item1xDiff);
locStage = item1.localToGlobal(new Point(locX, locY));
overlapping.push(locStage);
};
};
};
if (overlap){
angle = (_returnAngle) ? findAngle(item1, item2) : 0;
recordedCollision = {object1:item1, object2:item2, angle:angle, overlapping:overlapping};
objectCollisionArray.push(recordedCollision);
};
if (item1_isText){
item1.antiAliasType = "advanced";
};
if (item2_isText){
item2.antiAliasType = "advanced";
};
_local4 = false;
item2_isText = _local4;
item1_isText = _local4;
}
public function dispose():void{
objectArray = [];
}
public function excludeColor(_arg1:uint, _arg2:uint=0xFF, _arg3:uint=20, _arg4:uint=20, _arg5:uint=20):void{
var _local6:int;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:Object;
_local6 = colorExclusionArray.length;
_local7 = 0;
while (_local7 < _local6) {
if (colorExclusionArray[_local7].color == _arg1){
throw (new Error((("Color could not be added - color already in the exclusion list [" + _arg1) + "]")));
};
_local7++;
};
_local8 = (((_arg1 >> 24) & 0xFF) + _arg2);
_local9 = (_local8 - (_arg2 << 1));
_local10 = (((_arg1 >> 16) & 0xFF) + _arg3);
_local11 = (_local10 - (_arg3 << 1));
_local12 = (((_arg1 >> 8) & 0xFF) + _arg4);
_local13 = (_local12 - (_arg4 << 1));
_local14 = ((_arg1 & 0xFF) + _arg5);
_local15 = (_local14 - (_arg5 << 1));
_local16 = {color:_arg1, aPlus:_local8, aMinus:_local9, rPlus:_local10, rMinus:_local11, gPlus:_local12, gMinus:_local13, bPlus:_local14, bMinus:_local15};
colorExclusionArray.push(_local16);
}
public function get numChildren():uint{
return (objectArray.length);
}
public function get alphaThreshold():Number{
return (_alphaThreshold);
}
public function removeItem(_arg1):void{
var _local2:int;
_local2 = objectArray.indexOf(_arg1);
if (_local2 > -1){
objectArray.splice(_local2, 1);
} else {
throw (new Error((_arg1 + " could not be removed - object not found in item list.")));
};
}
public function set returnAngleType(_arg1:String):void{
_arg1 = _arg1.toUpperCase();
switch (_arg1){
case "DEGREES":
case "DEGREE":
case "DEG":
case "DEGS":
_returnAngleType = "DEGREES";
break;
case "RADIANS":
case "RADIAN":
case "RAD":
case "RADS":
_returnAngleType = "RADIANS";
break;
default:
throw (new Error("returnAngleType expects 'DEGREES' or 'RADIANS'"));
};
}
private function findAngle(_arg1:DisplayObject, _arg2:DisplayObject):Number{
var center:Point;
var pixels:ByteArray;
var columnHeight:uint;
var rowWidth:uint;
var pixel:uint;
var thisAlpha:uint;
var lastAlpha:int;
var edgeArray:Array;
var hasColors:int;
var j:uint;
var edgePoint:int;
var numEdges:int;
var slopeYAvg:Number;
var slopeXAvg:Number;
var average:Number;
var k:uint;
var upperLimit:int;
var colorFlag:Boolean;
var red1:uint;
var green1:uint;
var blue1:uint;
var colorObj:Object;
var a:uint;
var r:uint;
var g:uint;
var b:uint;
var item1Flags:uint;
var n:uint;
var item1 = _arg1;
var item2 = _arg2;
center = new Point((item1.width >> 1), (item1.height >> 1));
pixels = pixels2;
transMatrix2.tx = (transMatrix2.tx + center.x);
transMatrix2.ty = (transMatrix2.ty + center.y);
bmdResample = new BitmapData((item1.width << 1), (item1.height << 1), true, 0xFFFFFF);
bmdResample.draw(item2, transMatrix2, colorTransform2, null, null, true);
pixels = bmdResample.getPixels(new Rectangle(0, 0, bmdResample.width, bmdResample.height));
center.x = (bmdResample.width >> 1);
center.y = (bmdResample.height >> 1);
columnHeight = Math.round(bmdResample.height);
rowWidth = Math.round(bmdResample.width);
edgeArray = [];
hasColors = colorExclusionArray.length;
j = 0;
while (j < columnHeight) {
k = ((j * rowWidth) << 2);
pixels.position = k;
lastAlpha = -1;
upperLimit = (((j + 1) * rowWidth) << 2);
while (k < upperLimit) {
k = pixels.position;
try {
pixel = pixels.readUnsignedInt();
} catch(e:EOFError) {
break;
};
thisAlpha = ((pixel >> 24) & 0xFF);
if (lastAlpha == -1){
lastAlpha = thisAlpha;
} else {
if (thisAlpha > _alphaThreshold){
colorFlag = false;
if (hasColors){
red1 = ((pixel >> 16) & 0xFF);
green1 = ((pixel >> 8) & 0xFF);
blue1 = (pixel & 0xFF);
n = 0;
while (n < hasColors) {
colorObj = Object(colorExclusionArray[n]);
item1Flags = 0;
if ((((blue1 >= colorObj.bMinus)) && ((blue1 <= colorObj.bPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((green1 >= colorObj.gMinus)) && ((green1 <= colorObj.gPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((red1 >= colorObj.rMinus)) && ((red1 <= colorObj.rPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((thisAlpha >= colorObj.aMinus)) && ((thisAlpha <= colorObj.aPlus)))){
item1Flags = (item1Flags + 1);
};
if (item1Flags == 4){
colorFlag = true;
};
n = (n + 1);
};
};
if (!colorFlag){
edgeArray.push((k >> 2));
};
};
};
};
j = (j + 1);
};
numEdges = edgeArray.length;
slopeYAvg = 0;
slopeXAvg = 0;
j = 0;
while (j < numEdges) {
edgePoint = int(edgeArray[j]);
slopeYAvg = (slopeYAvg + (center.y - (edgePoint / rowWidth)));
slopeXAvg = (slopeXAvg + ((edgePoint % rowWidth) - center.x));
j = (j + 1);
};
average = -(Math.atan2(slopeYAvg, slopeXAvg));
average = ((_returnAngleType == "RADIANS")) ? average : (average * 57.2957795);
return (average);
}
public function addItem(_arg1):void{
if ((_arg1 is DisplayObject)){
objectArray.push(_arg1);
} else {
throw (new Error((("Cannot add item: " + _arg1) + " - item must be a Display Object.")));
};
}
public function get returnAngleType():String{
return (_returnAngleType);
}
public function set alphaThreshold(_arg1:Number):void{
if ((((_arg1 <= 1)) && ((_arg1 >= 0)))){
_alphaThreshold = (_arg1 * 0xFF);
} else {
throw (new Error("alphaThreshold expects a value from 0 to 1"));
};
}
public function removeExcludeColor(_arg1:uint):void{
var _local2:Boolean;
var _local3:int;
var _local4:uint;
_local2 = false;
_local3 = colorExclusionArray.length;
_local4 = 0;
while (_local4 < _local3) {
if (colorExclusionArray[_local4].color == _arg1){
colorExclusionArray.splice(_local4, 1);
_local2 = true;
break;
};
_local4++;
};
if (!_local2){
throw (new Error((("Color could not be removed - color not found in exclusion list [" + _arg1) + "]")));
};
}
protected function clearArrays():void{
objectCheckArray = [];
objectCollisionArray = [];
}
}
}//package com.coreyoneil.collision
Section 4
//CollisionList (com.coreyoneil.collision.CollisionList)
package com.coreyoneil.collision {
import flash.display.*;
public class CollisionList extends CDK {
public function CollisionList(_arg1, ... _args):void{
var _local3:uint;
super();
addItem(_arg1);
_local3 = 0;
while (_local3 < _args.length) {
addItem(_args[_local3]);
_local3++;
};
}
public function swapTarget(_arg1):void{
if ((_arg1 is DisplayObject)){
objectArray[0] = _arg1;
} else {
throw (new Error((("Cannot swap target: " + _arg1) + " - item must be a Display Object.")));
};
}
public function checkCollisions():Array{
var _local1:uint;
var _local2:*;
var _local3:DisplayObject;
var _local4:uint;
clearArrays();
_local1 = objectArray.length;
_local2 = DisplayObject(objectArray[0]);
_local4 = 1;
while (_local4 < _local1) {
_local3 = DisplayObject(objectArray[_local4]);
if (_local2.hitTestObject(_local3)){
if ((_local3.width * _local3.height) > (_local2.width * _local2.height)){
objectCheckArray.push([_local2, _local3]);
} else {
objectCheckArray.push([_local3, _local2]);
};
};
_local4++;
};
_local1 = objectCheckArray.length;
_local4 = 0;
while (_local4 < _local1) {
findCollisions(DisplayObject(objectCheckArray[_local4][0]), DisplayObject(objectCheckArray[_local4][1]));
_local4++;
};
return (objectCollisionArray);
}
override public function removeItem(_arg1):void{
var _local2:int;
_local2 = objectArray.indexOf(_arg1);
if (_local2 > 0){
objectArray.splice(_local2, 1);
} else {
if (_local2 == 0){
throw (new Error("You cannot remove the target from CollisionList. Use swapTarget to change the target."));
};
throw (new Error((_arg1 + " could not be removed - object not found in item list.")));
};
}
}
}//package com.coreyoneil.collision
Section 5
//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 6
//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 7
//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 8
//Back (com.greensock.easing.Back)
package com.greensock.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 * 0.5) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package com.greensock.easing
Section 9
//Bounce (com.greensock.easing.Bounce)
package com.greensock.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 * 0.5)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package com.greensock.easing
Section 10
//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 11
//Strong (com.greensock.easing.Strong)
package com.greensock.easing {
public class Strong {
public static const power:uint = 4;
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
return ((((((((_arg3 * 0.5) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 * 0.5) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package com.greensock.easing
Section 12
//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 13
//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 14
//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 15
//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 16
//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 17
//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 18
//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 19
//ColorTransformPlugin (com.greensock.plugins.ColorTransformPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.geom.*;
public class ColorTransformPlugin extends TintPlugin {
public static const API:Number = 1;
public function ColorTransformPlugin(){
this.propName = "colorTransform";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _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 20
//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 21
//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 22
//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 23
//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 24
//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 25
//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 26
//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 27
//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 28
//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 29
//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 30
//TintPlugin (com.greensock.plugins.TintPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.core.*;
import com.greensock.*;
import flash.geom.*;
public class TintPlugin extends TweenPlugin {
protected var _ct:ColorTransform;
protected var _transform:Transform;
protected var _ignoreAlpha:Boolean;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
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 31
//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 32
//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 33
//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 34
//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 35
//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 36
//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 37
//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 38
//Game (comcero.Game)
package comcero {
import flash.display.*;
import flash.events.*;
import com.greensock.*;
import flash.utils.*;
import tamba.events.*;
import tamba.utils.*;
import com.greensock.easing.*;
import com.coreyoneil.collision.*;
import tamba.net.*;
import tamba.media.*;
import flash.ui.*;
public class Game extends MovieClip {
private var border:MovieClip;
private var skyDistance:Number;// = 0
private var housePhase:int;// = 0
private var gameTimer:Timer;
private var levelOver:Boolean;// = false
private var maxLevel:int;// = 4
private var crosshairs:MovieClip;
private var lastLevel:MovieClip;
private var score:int;// = 0
private var mouseHit:MovieClip;
private var zombieTimer:Timer;
private var collisionList:CollisionList;
private var damageFrames:int;// = 10
private var levelClip:MovieClip;
private var maxZombies:int;// = 7
private var zombies:Array;
private var house:MovieClip;
private var totalZombies:int;
private var sky:MovieClip;
private var damageFrame:int;// = 0
private var gameSecs:int;// = 0
private var zombieHolder:MovieClip;
private var levelViews:Array;
private var level:int;// = 1
private var zombieJobs:Array;
private var marketClip:MovieClip;
private var gameSuccess:Boolean;// = false
private var focalLength:Number;// = 0
private var zombieFreq:int;
private var zombieSpeed:Number;
private var floorY:int;// = 440
private var gameOver:Boolean;// = false
private var zombieViews:Array;
private var levelJobs:Array;
public function Game():void{
level = 1;
maxLevel = 4;
score = 0;
levelOver = false;
skyDistance = 0;
gameSuccess = false;
gameOver = false;
gameSecs = 0;
zombies = [];
zombieJobs = ["builder", "plumber", "sparky", "roofer"];
zombieViews = ["left", "right", "back"];
levelJobs = [];
levelViews = [];
maxZombies = 7;
housePhase = 0;
focalLength = 0;
damageFrame = 0;
damageFrames = 10;
floorY = 440;
super();
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
}
private function shakeMessage(_arg1:MovieClip, _arg2:Function):void{
Audio.playEffect("hit_1");
TweenMax.to(_arg1, 0.25, {y:_arg1.targetY, ease:Bounce.easeOut});
TweenLite.delayedCall(2, removeMessage, [_arg1]);
TweenLite.delayedCall(2, _arg2);
}
private function onMarketingNextClicked(_arg1:MouseEvent):void{
nextLevel();
}
private function startGameTimer():void{
gameTimer = new Timer(1000);
gameTimer.addEventListener("timer", onGameTimerUpdate, false, 0, true);
gameTimer.start();
TweenLite.to(sky, 60, {colorTransform:{tint:0xFF0000, tintAmount:0.5}});
}
private function onClientClicked(_arg1:MouseEvent):void{
GetURL.goto(GlobalObject.get("clientURL"), "_blank");
}
private function showMessage(_arg1:String, _arg2:Function):void{
var _local3:MovieClip;
_local3 = new game_message();
_local3.mc_message.text_message.text = _arg1;
_local3.x = 80;
_local3.y = 600;
_local3.targetY = 148;
TweenMax.to(_local3, 0.25, {y:(_local3.targetY * 0.8), ease:Linear.easeNone, onComplete:shakeMessage, onCompleteParams:[_local3, _arg2]});
addChild(_local3);
}
private function addProjectiles(_arg1:MovieClip):void{
var _local2:MovieClip;
var _local3:int;
var _local4:int;
var _local5:int;
_local3 = 0;
while (_local3 < (housePhase * 3)) {
_local4 = (Math.random() * _arg1.width);
_local5 = (Math.random() * _arg1.height);
_local4 = (_local4 + ((_arg1.x + _arg1.parent.x) + _arg1.parent.parent.x));
_local5 = (_local5 + ((_arg1.y + _arg1.parent.y) + _arg1.parent.parent.y));
_local5 = (_local5 - 50);
if (_arg1.name == "mc_roofer"){
_local2 = new roof_tile();
} else {
_local2 = new house_brick_1();
};
_local2.x = _local4;
_local2.y = _local5;
levelClip.mc_proj.addChild(_local2);
TweenLite.to(_local2, (Math.random() * 0.8), {ease:Back.easeIn, rotation:(Math.random() * 360), y:(floorY + (Math.random() * 100))});
_local3++;
};
}
private function initLevel():void{
totalZombies = 0;
levelOver = false;
gameSecs = 60;
housePhase = 0;
zombieSpeed = (level + 1);
zombieFreq = 8;
zombieFreq = (zombieFreq - level);
levelClip = new (getDefinitionByName(("level_" + level)));
initHouse();
zombieHolder = levelClip.mc_zombies;
addChildAt(levelClip, 0);
mouseHit = new mouse_hit();
levelClip.addChild(mouseHit);
collisionList = new CollisionList(mouseHit);
collisionList.returnAngle = false;
updateTimerText(gameSecs);
levelClip.y = -(levelClip.height);
Audio.playEffect("househit");
TweenLite.to(levelClip, 0.5, {y:0, ease:Bounce.easeOut, onComplete:function (){
if (lastLevel != null){
lastLevel.parent.removeChild(lastLevel);
};
if (marketClip != null){
marketClip.parent.removeChild(marketClip);
};
}});
TweenLite.delayedCall(1, showMessage, [("Level\n" + level), startLevel]);
initSky();
}
private function nextLevel():void{
if (!gameOver){
level++;
initLevel();
} else {
endGame();
};
}
private function onZombieTimerUpdate(_arg1:Event):void{
makeZombie();
resetZombieTimer();
}
private function onPointsScored(_arg1:EventWithParams):void{
score = (score + _arg1.params.score);
levelClip.mc_score.mc_display.text_display.text = ("SCORE: " + score);
}
private function startLevel():void{
initZombies();
resetZombieTimer();
startGameTimer();
makeZombie();
}
private function onStageMouseMove(_arg1:Event):void{
crosshairs.x = mouseX;
crosshairs.y = mouseY;
}
private function damageHousePart(_arg1:MovieClip, _arg2:String=""):void{
var _local3:Boolean;
var _local4:int;
var _local5:*;
if (_arg1.name == "mc_anim"){
return;
};
_local3 = false;
if (((!((_arg2 == ""))) && ((damageFrame < 1000)))){
_local3 = true;
};
_arg1.removeEventListener(Event.ENTER_FRAME, onHousePartEnterFrame);
if ((_arg1 is MovieClip)){
if (((_local3) && ((_arg1.name.indexOf(("mc_" + _arg2)) < 0)))){
} else {
trace("Damaging", _arg1.name, "with type", _arg2, damageFrame);
if ((((_arg1.name == "mc_roofer")) || ((_arg1.name == "mc_builder_wall")))){
addProjectiles(_arg1);
};
_arg1.addEventListener(Event.ENTER_FRAME, onHousePartEnterFrame);
};
};
_local4 = _arg1.numChildren;
while (_local4--) {
_local5 = _arg1.getChildAt(_local4);
if ((_local5 is MovieClip)){
damageHousePart(_local5, _arg2);
};
};
}
private function stopGameTimer():void{
if (gameTimer != null){
gameTimer.removeEventListener("timer", onGameTimerUpdate);
gameTimer.stop();
gameTimer = null;
};
}
private function onHousePartEnterFrame(_arg1:Event):void{
var _local2:*;
var _local3:int;
_local2 = _arg1.currentTarget;
_local3 = damageFrame;
if (_local2.totalFrames < _local3){
_local3 = _local2.totalFrames;
};
if (_local2.currentFrame >= _local3){
_local2.gotoAndStop(_local3);
_local2.removeEventListener(Event.ENTER_FRAME, onHousePartEnterFrame);
} else {
_local2.play();
};
}
private function onFrameEntered(_arg1:Event):void{
sortZombies();
}
private function shuffleArray(_arg1:Array):Array{
var _local2:Array;
_local2 = [];
while (_arg1.length > 0) {
_local2.push(_arg1.splice(Math.round((Math.random() * (_arg1.length - 1))), 1)[0]);
};
return (_local2);
}
private function removeMessage(_arg1:MovieClip):void{
TweenMax.to(_arg1, 0.5, {colorMatrixFilter:{brightness:-2}, alpha:0, onComplete:removeMessage2, onCompleteParams:[_arg1]});
}
private function onZombieCompleted(_arg1:EventWithParams):void{
var _local2:*;
if (((_arg1.params.success) && (!(levelOver)))){
_local2 = (house.parent as MovieClip);
if (_local2.currentFrame == 1){
_local2.gotoAndPlay("hit");
damageHouse(_arg1.params.type);
Audio.playEffect("househit");
if (housePhase > 3){
stopGameTimer();
stopZombieTimer();
removeAllZombies();
levelOver = true;
TweenLite.delayedCall(2, endLevel, [false]);
};
};
};
zombieFreq = (zombieFreq * 0.99);
if (zombieFreq < 3){
zombieFreq = 3;
};
zombieSpeed = (zombieSpeed * 1.1);
totalZombies--;
}
private function damageHouse(_arg1:String=""):void{
damageFrame = (damageFrames * housePhase);
if (housePhase > 2){
damageFrame = 1000;
};
damageHousePart(house, _arg1);
if (_arg1 != ""){
};
housePhase++;
trace("Damage", _arg1, damageFrame);
}
private function onRemovedFromStage(_arg1:Event):void{
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onStageMouseDown);
stage.removeEventListener(Event.ENTER_FRAME, onFrameEntered);
trace("Bye,game!");
Mouse.show();
crosshairs.parent.removeChild(crosshairs);
}
private function startZombieTimer(_arg1:int=3000):void{
zombieTimer = new Timer(_arg1);
zombieTimer.addEventListener("timer", onZombieTimerUpdate, false, 0, true);
zombieTimer.start();
}
private function onGameTimerUpdate(_arg1:Event):void{
gameSecs--;
if (gameSecs <= 0){
gameSecs = 0;
stopGameTimer();
endLevel(true);
};
updateTimerText(gameSecs);
}
private function onStageMouseDown(_arg1:Event):void{
var _local2:Array;
var _local3:int;
var _local4:Array;
mouseHit.x = mouseX;
mouseHit.y = mouseY;
_local2 = collisionList.checkCollisions();
_local3 = _local2.length;
_local4 = [];
while (_local3--) {
trace("Hit zombie", _local2[_local3].object2.id);
if ((_local2[_local3].object2 is Zombie)){
_local4.push(_local2[_local3].object2);
};
};
if (_local4.length){
_local4.sortOn("y", (Array.NUMERIC | Array.DESCENDING));
_local4[0].clickZombie();
};
}
private function updateTimerText(_arg1:int):void{
levelClip.mc_timer.mc_display.text_display.text = ("TIME: " + _arg1);
}
private function stopZombieTimer():void{
if (zombieTimer != null){
zombieTimer.removeEventListener("timer", onZombieTimerUpdate);
zombieTimer.stop();
zombieTimer = null;
};
}
private function endLevel(_arg1:Boolean):void{
stopGameTimer();
stopZombieTimer();
removeAllZombies();
levelOver = true;
if (_arg1){
if (level < maxLevel){
showMessage("Level\nOver!", showMarketingScreen);
lastLevel = levelClip;
} else {
gameSuccess = true;
gameOver = true;
showMessage("Well\nDone!", showMarketingScreen);
lastLevel = levelClip;
};
} else {
gameSuccess = false;
gameOver = true;
showMessage("Game\nOver", showMarketingScreen);
};
}
private function endGame():void{
dispatchEvent(new EventWithParams("onComplete", {success:gameSuccess, score:score}));
TweenLite.to(levelClip, 0.5, {y:600, onComplete:removeSelf});
TweenLite.to(border, 0.5, {alpha:0});
}
private function showMarketingScreen():void{
var _local1:int;
_local1 = GlobalObject.get("messageIndex");
marketClip = new marketing_screen();
marketClip.y = 600;
marketClip.mc_message.gotoAndStop(_local1);
addChild(marketClip);
Utils.addButtonListener(marketClip.btn_next, onMarketingNextClicked);
Utils.addButtonListener(marketClip.btn_client, onClientClicked);
TweenLite.to(marketClip, 0.5, {x:0, y:0, ease:Bounce.easeOut});
_local1++;
if (_local1 > 4){
_local1 = 1;
};
GlobalObject.set("messageIndex", _local1);
}
private function sortZombies():void{
var _local1:int;
zombies.sortOn("y", Array.NUMERIC);
_local1 = zombies.length;
while (_local1--) {
if (zombieHolder.getChildIndex(zombies[_local1]) != _local1){
zombieHolder.setChildIndex(zombies[_local1], _local1);
};
};
}
private function updateSky():void{
if (sky != null){
};
}
private function onAddedToStage(_arg1:Event):void{
initLevel();
border = new game_border();
Utils.addButtonListener(border.mc_logo, onClientClicked);
parent.addChild(border);
Mouse.hide();
crosshairs = new game_crosshairs();
crosshairs.x = mouseX;
crosshairs.y = mouseY;
parent.addChild(crosshairs);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onStageMouseMove, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageMouseDown, false, 0, true);
stage.addEventListener(Event.ENTER_FRAME, onFrameEntered, false, 0, true);
}
private function removeMessage2(_arg1:MovieClip){
var msgClip = _arg1;
TweenMax.to(msgClip, 0.25, {alpha:0, onComplete:function (){
msgClip.parent.removeChild(msgClip);
}});
}
private function makeZombie():void{
var _local1:String;
var _local2:Zombie;
if (totalZombies >= 5){
return;
};
totalZombies++;
_local1 = levelViews[0];
_local2 = new Zombie(levelJobs[0], _local1);
_local2.addEventListener("onScore", onPointsScored, false, 0, true);
levelJobs.shift();
levelViews.shift();
_local2.addEventListener("onCompleted", onZombieCompleted, false, 0, true);
if (_local1 == "left"){
_local2.originX = -100;
} else {
if (_local1 == "right"){
_local2.originX = 700;
} else {
Utils.randomInteger(levelClip.mc_entrance.x, (levelClip.mc_entrance.x + levelClip.mc_entrance.width));
};
};
_local2.recoverRate = (5 - level);
_local2.targetX = Utils.randomInteger((levelClip.mc_house.x + 20), (levelClip.mc_house.x + 400));
zombieHolder.addChild(_local2);
_local2.speed = ((Math.random() * level) + 1);
zombies.push(_local2);
_local2.id = zombies.length;
collisionList.addItem(_local2);
}
private function removeAllZombies():void{
var _local1:int;
_local1 = zombieHolder.numChildren;
while (_local1--) {
zombieHolder.removeChildAt(0);
};
zombies = [];
}
private function initZombies():void{
var _local1:int;
var _local2:Array;
var _local3:Array;
levelJobs = [];
levelViews = [];
_local1 = 0;
while (_local1 < 100) {
_local2 = shuffleArray(zombieJobs.concat());
levelJobs = levelJobs.concat(_local2);
_local3 = shuffleArray(zombieViews.concat());
levelViews = levelViews.concat(_local3);
_local1++;
};
}
private function removeSelf():void{
parent.removeChild(border);
parent.removeChild(this);
}
private function initHouse():void{
housePhase = 0;
house = levelClip.mc_house.mc_builder;
damageHouse("");
}
private function initSky():void{
sky = new game_sky_2();
sky.y = -4;
levelClip.addChildAt(sky, 0);
}
private function resetZombieTimer():void{
var _local1:int;
_local1 = (zombieFreq * 1000);
stopZombieTimer();
startZombieTimer(_local1);
}
}
}//package comcero
Section 39
//HighScores (comcero.HighScores)
package comcero {
import flash.display.*;
import tamba.game.*;
public class HighScores extends Leaderboard {
public function HighScores(_arg1:String, _arg2:String, _arg3:uint, _arg4:String, _arg5:String, _arg6:String){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
override protected function onLineAdded(_arg1:MovieClip, _arg2:Object):void{
_arg1.score.text = _arg2.points;
}
}
}//package comcero
Section 40
//Main (comcero.Main)
package comcero {
import flash.display.*;
import flash.events.*;
import tamba.events.*;
import tamba.utils.*;
import com.memecounter.*;
import tamba.display.*;
import flash.system.*;
public class Main extends MovieClip {
private var warpScene:WarpScene;
private var preloaderMovie:MovieClip;
private var preloader:Preloader;
private var contentHolder:MovieClip;
private var screenManager:ScreenManager;
public function Main():void{
var rootURL:String;
super();
addFrameScript(0, frame1);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.showDefaultContextMenu = false;
try {
Tracker.init(1012, root);
} catch(e:Error) {
};
rootURL = "http://viral.tamba.co.uk/comcero/";
GlobalObject.set("rootURL", rootURL);
GlobalObject.set("remotingURL", (rootURL + "amfphp/gateway.php"));
GlobalObject.set("bookmarkURL", "http://www.tamba-games.co.uk/bookmarks.php");
GlobalObject.set("clientURL", "http://www.comcero.com");
GlobalObject.set("messageIndex", 1);
contentHolder = new MovieClip();
contentHolder.mask = new StageMask(600, 600);
addChild(contentHolder);
startPreloader();
warpScene = new WarpScene();
contentHolder.addChildAt(warpScene, 0);
}
private function startPreloader():void{
preloaderMovie = new screen_preloader();
contentHolder.addChild(preloaderMovie);
preloader = new Preloader(this);
preloader.addEventListener("onPreloaderProgress", onPreloaderProgress);
preloader.addEventListener("onPreloaderComplete", onPreloaderComplete);
preloader.start();
}
function frame1(){
stop();
}
private function onAssetsFrameEntered(_arg1:Event=null):void{
stage.removeEventListener(Event.ENTER_FRAME, onAssetsFrameEntered);
if (preloaderMovie != null){
contentHolder.removeChild(preloaderMovie);
};
screenManager = new ScreenManager(warpScene);
contentHolder.addChild(screenManager);
}
private function onPreloaderComplete(_arg1:EventWithParams=null):void{
preloader.removeEventListener("onPreloaderProgress", onPreloaderProgress);
preloader.removeEventListener("onPreloaderComplete", onPreloaderComplete);
preloader = null;
stage.addEventListener(Event.ENTER_FRAME, onAssetsFrameEntered);
gotoAndStop(3);
}
private function onPreloaderProgress(_arg1:EventWithParams):void{
preloaderMovie.text_pct.text = (Math.floor((100 * _arg1.params.progress)) + "%");
}
}
}//package comcero
Section 41
//ScreenManager (comcero.ScreenManager)
package comcero {
import flash.display.*;
import flash.events.*;
import com.greensock.*;
import flash.utils.*;
import tamba.events.*;
import tamba.utils.*;
import com.greensock.easing.*;
import tamba.game.*;
import tamba.net.*;
import tamba.media.*;
public class ScreenManager extends MovieClip {
private var warpScene:MovieClip;
private var screenName:String;// = "screen_title"
private var clientID:String;// = "comcero"
private var introShown:Boolean;// = false
private var bg:MovieClip;
private var menuActive:Boolean;// = false
private var highScores:HighScores;
private var submitScore:SubmitScore;
private var isScoreSubmitted:Boolean;// = false
private var screen:MovieClip;
private var sendFriend:SendToFriend;
private var score:int;// = 0
private var screenInfo:Object;
private var gameSuccess:Boolean;// = false
private var footer:MovieClip;
private var maxSendFriend:int;// = 4
private var game:Game;
public function ScreenManager(_arg1:WarpScene):void{
clientID = "comcero";
screenName = "screen_title";
score = 0;
isScoreSubmitted = false;
introShown = false;
maxSendFriend = 4;
screenInfo = {screen_instructions:{init:initInstructions}, screen_sendfriend:{init:initSendFriend}, screen_leaderboard:{init:initLeaderboard}, screen_submitscore:{init:initSubmitScore}};
menuActive = false;
gameSuccess = false;
super();
warpScene = _arg1;
initBG();
initFooter();
Audio.playMusic("music_main");
}
private function onTambaClicked(_arg1:MouseEvent):void{
GetURL.goto("http://www.tamba.co.uk", "_blank");
}
private function onHighScoresSuccess(_arg1:EventWithParams):void{
var _local2:MovieClip;
_local2 = _arg1.params.data;
_local2.x = 60;
_local2.y = 50;
screen.addChild(_local2);
highScores.removeEventListener("onSuccess", onHighScoresSuccess);
}
private function resetSendFriend():void{
var _local1:*;
_local1 = 1;
while (_local1 <= maxSendFriend) {
screen[("input_friendname_" + _local1)].htmlText = "";
screen[("input_friendemail_" + _local1)].htmlText = "";
_local1++;
};
screen.btn_submit.visible = true;
}
private function initGame():void{
game = new Game();
game.addEventListener("onComplete", onGameComplete, false, 0, true);
addChildAt(game, 1);
TweenLite.delayedCall(2, onGameStart);
TweenLite.to(footer.mc_bookmarks, 0.5, {y:600});
}
private function onLeaderboardClicked(_arg1:MouseEvent):void{
switchScreen("screen_leaderboard");
}
private function initSubmitScore():void{
screen.text_score.text = (score + " points");
Utils.addButtonListener(screen.btn_submit, onScoreSubmitted);
}
private function initLeaderboard():void{
highScores = new HighScores(GlobalObject.get("remotingURL"), "GameFunctions", 300, "leaderboard_line", "scroll_track", "scroll_face");
highScores.addEventListener("onSuccess", onHighScoresSuccess, false, 0, true);
highScores.makeLeaderboard();
}
private function onClientClicked(_arg1:MouseEvent):void{
GetURL.goto(GlobalObject.get("clientURL"), "_blank");
}
private function onScoreSubmitted(_arg1:Event):void{
screen.text_error.text = "Please wait...";
screen.btn_submit.visible = false;
submitScore = new SubmitScore(GlobalObject.get("remotingURL"), "GameFunctions", "comceroinvade", screen.input_yourname.text, screen.input_youremail.text, score, 0);
submitScore.addEventListener("onSuccess", onSubmitScoreSuccess, false, 0, true);
submitScore.addEventListener("onError", onSubmitScoreError, false, 0, true);
submitScore.submit();
}
private function onPlayClicked(_arg1:MouseEvent):void{
switchScreen("screen_game");
}
private function onBookmarkClicked(_arg1:MouseEvent):void{
var _local2:String;
_local2 = ((((GlobalObject.get("bookmarkURL") + "?client=") + clientID) + "&bookmark=") + _arg1.currentTarget.name.replace("btn_", ""));
GetURL.goto(_local2, "_blank");
}
private function onInstructionsClicked(_arg1:MouseEvent):void{
switchScreen("screen_instructions");
}
private function initBG():void{
var _local1:MovieClip;
var _local2:MovieClip;
bg = new ui_bg();
_local1 = bg.mc_grave_1.mc_buttons;
_local2 = bg.mc_grave_2.mc_buttons;
Utils.addButtonListener(_local1.btn_play, onPlayClicked);
Utils.addButtonListener(_local1.btn_instructions, onInstructionsClicked);
Utils.addButtonListener(_local1.btn_prize, onTermsClicked);
Utils.addButtonListener(_local2.btn_sendfriend, onSendFriendClicked);
Utils.addButtonListener(_local2.btn_leaderboard, onLeaderboardClicked);
Utils.addButtonListener(bg.mc_screen_back.btn_back, onMainMenuClicked);
Utils.addButtonListener(bg.mc_logo, onClientClicked);
Utils.addButtonListener(bg.mc_screen_content.mc_logo, onClientClicked);
Utils.addButtonListener(bg.mc_gameover_grave, onClientClicked);
Utils.addButtonListener(bg.mc_gameover_back, onMainMenuClicked);
Utils.addButtonListener(bg.mc_gameover_submit, onSubmitScoreClicked);
animateIn();
addChild(bg);
}
private function onMainMenuClicked(_arg1:MouseEvent):void{
switchScreen("screen_title");
}
private function initSendFriend():void{
var _local1:int;
var _local2:int;
screen.input_yourname.tabIndex = 0;
screen.input_youremail.tabIndex = 1;
_local1 = 2;
_local2 = 1;
while (_local2 <= maxSendFriend) {
screen[("input_friendname_" + _local2)].tabIndex = _local1;
_local1++;
screen[("input_friendemail_" + _local2)].tabIndex = _local1;
_local1++;
_local2++;
};
Utils.addButtonListener(screen.btn_submit, onSendFriendSubmitted);
}
private function onSubmitScoreSuccess(_arg1:EventWithParams):void{
screen.text_error.text = "";
isScoreSubmitted = true;
screenName = "screen_leaderboard";
animateOut();
}
private function animateChildOut(_arg1:MovieClip):void{
if (!isPermAsset(_arg1)){
TweenMax.to(_arg1, 0.5, {alpha:0, overwrite:0});
};
}
private function bounceChild(_arg1:MovieClip):void{
TweenMax.to(_arg1, 0.25, {x:_arg1.trueX, y:_arg1.trueY, ease:Bounce.easeOut});
}
private function animateOut():void{
var _local1:int;
var _local2:*;
_local1 = bg.numChildren;
TweenMax.to(bg.mc_gamelogo, 0.5, {alpha:0, ease:Bounce.easeIn});
while (_local1--) {
_local2 = bg.getChildAt(_local1);
if ((_local2 is MovieClip)){
if (!isPermAsset(_local2)){
TweenLite.delayedCall(0.1, animateChildOut, [_local2]);
TweenMax.to(_local2, 0.5, {colorMatrixFilter:{brightness:-2}, ease:Bounce.easeIn});
};
};
};
if (screen != null){
screen.parent.removeChild(screen);
screen = null;
};
if (screenName == "screen_game"){
TweenLite.delayedCall(1, initGame);
} else {
if (((!((screenName == "screen_title"))) && (!((screenName == "screen_gameover"))))){
screen = new (getDefinitionByName(screenName));
screenInfo[screenName].init();
bg.mc_screen_content.mc_holder.addChild(screen);
};
TweenLite.delayedCall(1, animateIn);
};
}
private function onSoundClicked(_arg1:MouseEvent):void{
if (Audio.musicVolume > 0){
Audio.effectsVolume = 0;
Audio.musicVolume = 0;
_arg1.currentTarget.text_label.htmlText = "Turn sound on";
} else {
Audio.effectsVolume = 1;
Audio.musicVolume = 1;
_arg1.currentTarget.text_label.htmlText = "Turn sound off";
};
}
private function onSendFriendError(_arg1:EventWithParams):void{
trace("error", _arg1.params.message);
screen.text_error.htmlText = _arg1.params.message;
screen.btn_submit.visible = true;
}
private function onTermsClicked(_arg1:MouseEvent):void{
GetURL.goto("http://www.comcero.com/info/terms.jsp#games", "_blank");
}
private function onGameStart():void{
bg.visible = false;
warpScene.stopEffect();
}
private function onSendFriendSuccess(_arg1:EventWithParams):void{
screen.text_error.htmlText = "Send successful! Would you like to send more?";
resetSendFriend();
screen.btn_submit.visible = true;
}
private function onSubmitScoreClicked(_arg1:MouseEvent):void{
switchScreen("screen_submitscore");
}
private function brightenChild(_arg1:MovieClip):void{
TweenMax.to(_arg1, 0.5, {colorMatrixFilter:{brightness:1}, ease:Bounce.easeOut, overwrite:0});
}
private function initFooter():void{
footer = new screen_footer();
footer.btn_sound.text_label.htmlText = "Turn sound off";
footer.btn_tamba.text_label.htmlText = "Game by TAMBA";
Utils.addButtonListener(footer.btn_tamba, onTambaClicked, null, null, true);
Utils.addButtonListener(footer.btn_sound, onSoundClicked, null, null, true);
addChild(footer);
initBookmarks(footer.mc_bookmarks);
}
private function onSubmitScoreError(_arg1:EventWithParams):void{
screen.text_error.text = _arg1.params.message;
screen.btn_submit.visible = true;
resetSubmitScore();
}
private function initInstructions():void{
trace("Instructions");
}
private function animateChildIn(_arg1:MovieClip, _arg2:int=0):void{
var _local3:Number;
if (!isPermAsset(_arg1)){
if (_arg1.name == "mc_gameover_grave"){
_arg1.gotoAndPlay(2);
};
_local3 = 0.04;
TweenLite.delayedCall((0.5 + _local3), brightenChild, [_arg1]);
TweenMax.to(_arg1, 0.5, {delay:_local3, x:(_arg1.trueX * 0.9), y:(_arg1.trueY * 0.9), ease:Linear.easeNone, onComplete:bounceChild, onCompleteParams:[_arg1]});
};
}
private function onGameComplete(_arg1:EventWithParams):void{
bg.visible = true;
score = _arg1.params.score;
warpScene.startEffect();
screenName = "screen_gameover";
animateIn();
TweenLite.to(footer.mc_bookmarks, 0.5, {y:583});
}
private function isPermAsset(_arg1:MovieClip):Boolean{
if ((((((_arg1.name == "mc_sky")) || ((_arg1.name == "mc_warpscene")))) || ((_arg1.name == "mc_gamelogo")))){
return (true);
};
return (false);
}
private function initBookmarks(_arg1:MovieClip):void{
var _local2:uint;
_local2 = _arg1.numChildren;
while (_local2--) {
if (_arg1.getChildAt(_local2).name.indexOf("btn_") === 0){
Utils.addButtonListener(_arg1.getChildAt(_local2), onBookmarkClicked);
};
};
}
private function animateIn():void{
var i:int;
var logoX:int;
var logoScale:Number;
var child:*;
i = bg.numChildren;
if (screenName == "screen_title"){
logoX = 292;
logoScale = 1;
} else {
logoX = 100;
logoScale = 0.9;
};
bg.mc_gamelogo.x = logoX;
bg.mc_gamelogo.scaleX = (bg.mc_gamelogo.scaleY = logoScale);
bg.mc_gamelogo.alpha = 0;
TweenMax.to(bg.mc_gamelogo, 1, {alpha:1, overwrite:1, ease:Strong.easeIn});
while ((i = (i - 1)), i) {
child = bg.getChildAt(i);
if ((child is MovieClip)){
if (!isPermAsset(child)){
if (!child.trueX){
child.trueX = child.x;
child.trueY = child.y;
};
if ((child.x + child.width) > 300){
child.x = 600;
} else {
child.x = -(child.width);
};
if ((((((((child.y > 300)) || (!((screenName == "screen_title"))))) || ((child.name.indexOf("_grave_") > -1)))) || ((child.name.indexOf("_zombie_") > -1)))){
child.y = 600;
} else {
child.y = -(child.height);
};
if (!child.initX){
child.x = (child.x * 2);
child.y = (child.y * 2);
child.initX = child.x;
child.initY = child.y;
};
child.alpha = 1;
child.visible = true;
};
if (screenName == "screen_title"){
if ((((child.name.indexOf("mc_screen_") == 0)) || ((child.name.indexOf("mc_gameover_") == 0)))){
child.visible = false;
};
} else {
if (screenName == "screen_gameover"){
if ((((((child.name.indexOf("mc_gameover_") < 0)) && (!(isPermAsset(child))))) || ((child.name.indexOf("mc_screen_") == 0)))){
child.visible = false;
};
} else {
if ((((((child.name.indexOf("mc_screen_") < 0)) && (!(isPermAsset(child))))) || ((child.name.indexOf("mc_gameover_") == 0)))){
child.visible = false;
};
};
};
if (((!(isPermAsset(child))) && (child.visible))){
TweenMax.to(child, 0.1, {colorMatrixFilter:{brightness:-2}, onComplete:animateChildIn, onCompleteParams:[child, i]});
};
};
};
TweenLite.delayedCall(0.5, function (){
if (!introShown){
Audio.playEffect("titlegroan");
introShown = true;
};
});
TweenLite.delayedCall(1, function (){
menuActive = true;
});
}
private function onSendFriendClicked(_arg1:MouseEvent):void{
switchScreen("screen_sendfriend");
}
private function switchScreen(_arg1:String):void{
if (menuActive){
screenName = _arg1;
menuActive = false;
animateOut();
};
}
private function resetSubmitScore():void{
submitScore.removeEventListener("onSuccess", onSubmitScoreSuccess);
submitScore.removeEventListener("onError", onSubmitScoreError);
}
private function onSendFriendSubmitted(_arg1:MouseEvent):void{
var _local2:Array;
var _local3:*;
screen.btn_submit.visible = false;
screen.text_error.htmlText = "";
_local2 = [];
_local3 = 1;
while (_local3 <= maxSendFriend) {
if (((!((screen[("input_friendname_" + _local3)].text == ""))) || (!((screen[("input_friendemail_" + _local3)].text == ""))))){
_local2.push([screen[("input_friendname_" + _local3)].text, screen[("input_friendemail_" + _local3)].text]);
};
_local3++;
};
sendFriend = new SendToFriend(GlobalObject.get("remotingURL"), "GameFunctions", screen.input_yourname.text, screen.input_youremail.text, _local2);
sendFriend.addEventListener("onSuccess", onSendFriendSuccess, false, 0, true);
sendFriend.addEventListener("onError", onSendFriendError, false, 0, true);
sendFriend.send();
}
}
}//package comcero
Section 42
//Utils (comcero.Utils)
package comcero {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import com.greensock.easing.*;
public class Utils {
public static var buttonListeners:Array = [];
public static function clearButtonListeners():void{
var _local1:String;
for (_local1 in buttonListeners) {
buttonListeners[_local1][0].removeEventListener(MouseEvent[buttonListeners[_local1][1]], buttonListeners[_local1][2]);
buttonListeners[_local1][0].buttonMode = false;
};
buttonListeners = [];
}
private static function onDefaultMouseOut(_arg1:MouseEvent){
}
public static function highlightClip(_arg1:MovieClip, _arg2:Boolean):void{
var _local3:ColorTransform;
var _local4:int;
_local3 = new ColorTransform();
_local4 = 20;
if (!_arg2){
_local4 = 0;
};
_local3.redOffset = _local4;
_local3.greenOffset = _local4;
_local3.blueOffset = _local4;
_arg1.transform.colorTransform = _local3;
}
public static function validateEmail(_arg1:String):Boolean{
var _local2:RegExp;
_local2 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
return (_local2.test(_arg1));
}
public static function addButtonListener(_arg1:Object, _arg2:Function=null, _arg3:Function=null, _arg4:Function=null, _arg5:Boolean=false):void{
if (_arg2 == null){
_arg2 = onDefaultClick;
};
if (_arg3 == null){
_arg3 = onDefaultMouseOver;
};
if (_arg4 == null){
_arg4 = onDefaultMouseOut;
};
_arg1.addEventListener(MouseEvent.CLICK, _arg2, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_OVER, _arg3, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, _arg4, false, 0, true);
if ((_arg1 is MovieClip)){
_arg1.mouseChildren = false;
_arg1.buttonMode = true;
_arg1.useHandCursor = true;
};
if (!_arg5){
buttonListeners.push([_arg1, "CLICK", _arg2]);
buttonListeners.push([_arg1, "MOUSE_OVER", _arg3]);
buttonListeners.push([_arg1, "MOUSE_OUT", _arg4]);
};
}
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
return (_arg1.replace(/^\s+|\s+$/g, ""));
}
public static function zeroPad(_arg1:int, _arg2:int):String{
var _local3:String;
_local3 = ("" + _arg1);
while (_local3.length < _arg2) {
_local3 = ("0" + _local3);
};
return (_local3);
}
public static function validateString(_arg1:String):Boolean{
return ((_arg1.length > 0));
}
public static function msToString(_arg1:uint):String{
var _local2:Date;
var _local3:int;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:Number;
var _local8:String;
_local2 = new Date(_arg1);
_local3 = _local2.getMinutes();
_local4 = _local3.toString();
if (_local3 < 10){
_local4 = ("0" + _local4);
};
_local5 = _local2.getSeconds();
_local6 = _local5.toString();
if (_local5 < 10){
_local6 = ("0" + _local6);
};
_local7 = Math.floor(((_arg1 % 1000) / 10));
_local8 = _local7.toString();
if (_local7 < 10){
_local8 = ("0" + _local8);
};
return (((((_local4 + ":") + _local6) + ":") + _local8));
}
private static function onDefaultClick(_arg1:MouseEvent):void{
}
private static function onDefaultMouseOver(_arg1:MouseEvent){
}
public static function randomInteger(_arg1:Number, _arg2:Number):Number{
return (Math.round(((Math.random() * (_arg2 - _arg1)) + _arg1)));
}
}
}//package comcero
Section 43
//WarpScene (comcero.WarpScene)
package comcero {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
public class WarpScene extends MovieClip {
private var clip:MovieClip;
private var f:int;// = 0
private var dmFilter:DisplacementMapFilter;
private var mapY:int;// = 0
public var current:Boolean;// = false
public function WarpScene():void{
current = false;
f = 0;
mapY = 0;
dmFilter = createDMFilter();
super();
clip = new ui_warp();
clip.filters = [dmFilter];
addChild(clip);
startEffect();
}
private function createDMFilter():DisplacementMapFilter{
var _local1:MovieClip;
var _local2:BitmapData;
var _local3:Point;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:Number;
var _local8:Number;
var _local9:String;
var _local10:uint;
var _local11:Number;
_local1 = new dm_1();
_local2 = new BitmapData(600, 600);
_local2.draw(_local1);
_local3 = new Point(0, 0);
_local4 = BitmapDataChannel.RED;
_local5 = _local4;
_local6 = _local4;
_local7 = 0;
_local8 = 2;
_local9 = DisplacementMapFilterMode.COLOR;
_local10 = 0;
_local11 = 0;
return (new DisplacementMapFilter(_local2, _local3, _local5, _local6, _local7, _local8, _local9, _local10, _local11));
}
public function stopEffect():void{
removeEventListener(Event.ENTER_FRAME, onFrameEntered);
}
public function startEffect():void{
addEventListener(Event.ENTER_FRAME, onFrameEntered, false, 0, true);
}
private function onFrameEntered(_arg1:Event):void{
f++;
if ((f % 2) == 0){
return;
};
dmFilter.mapPoint = new Point(0, mapY);
mapY = (mapY - 1);
if (mapY < -300){
mapY = 0;
};
clip.filters = [dmFilter];
}
}
}//package comcero
Section 44
//Zombie (comcero.Zombie)
package comcero {
import flash.display.*;
import flash.events.*;
import com.greensock.*;
import flash.utils.*;
import tamba.events.*;
import com.greensock.easing.*;
import tamba.media.*;
public class Zombie extends MovieClip {
private var _approachDistance:int;// = 50
private var _type:String;
private var addedToStage:Boolean;// = false
private var _clip:MovieClip;
private var recoverTimer:Timer;
private var completedRun:Boolean;// = false
private var roarCount:int;// = 0
private var _recoverRate:Number;// = 1000
private var _originX:int;// = 300
private var _originY:int;// = 800
private var _targetDistance:int;// = 235
private var parts:Array;
private var clickable:Boolean;// = true
public var id:int;// = 0
private var maxSpeed:int;// = 8
private var _speed:Number;// = 1
private var _distance:Number;// = 0
private var xStep:Number;// = 0
private var frame:int;// = 1
private var _view:String;
private var _targetX:int;// = 107
private var _focalLength:int;// = 300
private var totalParts:int;
public function Zombie(_arg1:String, _arg2:String="back"):void{
id = 0;
_distance = 0;
_targetDistance = 235;
_approachDistance = 50;
_originX = 300;
_targetX = 107;
_focalLength = 300;
_originY = 800;
_speed = 1;
_recoverRate = 1000;
xStep = 0;
frame = 1;
parts = ["hat", "head", "sleeve_right", "sleeve_left", "arm_right", "arm_left", "body", "leg_left", "leg_right"];
totalParts = parts.length;
maxSpeed = 8;
completedRun = false;
clickable = true;
addedToStage = false;
roarCount = 0;
super();
clip = new zombie_clip();
clip.y = 0;
clip.x = 0;
type = _arg1;
view = _arg2;
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage, false, 0, true);
this.x = _originX;
}
private function setScale():void{
var _local1:Number;
_local1 = (_focalLength / (_focalLength + _distance));
this.y = (_originY * _local1);
this.scaleX = (this.scaleY = (_local1 * 0.8));
}
private function removeListeners():void{
clip.removeEventListener(Event.ENTER_FRAME, onFrameEntered);
clip.removeEventListener(Event.RENDER, onFrameRendered);
}
public function destroySelf():void{
if (view != "death"){
view = "death";
clip.scaleX = (clip.scaleY = 0.4);
TweenLite.to(clip, 0.25, {scaleX:1, scaleY:1, ease:Bounce.easeOut});
TweenLite.delayedCall(2, removeSelf);
};
}
public function set type(_arg1:String):void{
_type = _arg1;
}
private function reverseSpeed():void{
speed = -(_speed);
clip.scaleX = (clip.scaleY = 0.5);
TweenLite.to(clip, 0.25, {scaleX:1, scaleY:1, ease:Bounce.easeOut});
if (_speed > 0){
speed = (_speed * 1.1);
if (view == "right"){
view = "left";
} else {
if (view == "left"){
view = "right";
} else {
view = "back";
};
};
roar(false);
clickable = true;
} else {
clickable = false;
roar(true);
startRecoverTimer();
if (view == "left"){
view = "right";
} else {
if (view == "right"){
view = "left";
} else {
view = "front";
};
};
};
}
public function set speed(_arg1:Number):void{
if (_arg1 > maxSpeed){
_arg1 = maxSpeed;
};
_speed = _arg1;
}
private function addListeners():void{
clip.addEventListener(Event.ENTER_FRAME, onFrameEntered, false, 0, true);
clip.addEventListener(Event.RENDER, onFrameRendered, false, 0, true);
}
public function set clip(_arg1:MovieClip):void{
_clip = _arg1;
}
private function onRecoverTimerUpdate(_arg1:Event):void{
if (_speed <= 0){
stopRecoverTimer();
reverseSpeed();
};
trace("Zombie recovered!");
}
public function get view():String{
return (_view);
}
private function onFrameEntered(_arg1:Event):void{
stage.invalidate();
}
public function set recoverRate(_arg1:Number):void{
_recoverRate = (_arg1 * 1000);
}
private function onRemovedFromStage(_arg1:Event):void{
removeListeners();
stopRecoverTimer();
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
trace("Zombie gone");
}
private function onCompleted(_arg1:Boolean):void{
if (!completedRun){
completedRun = true;
dispatchEvent(new EventWithParams("onCompleted", {type:type, success:_arg1}));
if (_arg1){
destroySelf();
};
};
}
private function roar(_arg1:Boolean=false):void{
var _local2:int;
var _local3:String;
roarCount++;
if (((!(_arg1)) && (((roarCount % 2) == 0)))){
return;
};
_local2 = 3;
_local3 = "groan";
if (_arg1){
_local3 = "hit";
_local2 = 2;
};
Audio.playEffect(((_local3 + "_") + Utils.randomInteger(1, _local2)));
}
public function get type():String{
return (_type);
}
private function onClicked(_arg1:MouseEvent=null):void{
var _local2:int;
var _local3:MovieClip;
if (((clickable) && (!((view == "death"))))){
reverseSpeed();
_local2 = (distance * 0.2);
_local3 = _clip.mc_score.mc_inner;
_local3.text_score.text = _local2;
_clip.mc_score.gotoAndPlay(2);
dispatchEvent(new EventWithParams("onScore", {score:_local2}));
};
}
public function get clip():MovieClip{
return (_clip);
}
private function stopRecoverTimer():void{
if (recoverTimer != null){
recoverTimer.removeEventListener("timer", onRecoverTimerUpdate);
recoverTimer.stop();
recoverTimer = null;
};
}
public function set view(_arg1:String):void{
_view = _arg1;
frame = 1;
clip.gotoAndStop(_view);
if (addedToStage){
updateSelf();
};
}
private function onAddedToStage(_arg1:Event):void{
addListeners();
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
addChild(clip);
roar(false);
addedToStage = true;
}
private function onFrameRendered(_arg1:Event):void{
var _local2:int;
_local2 = totalParts;
while (_local2--) {
clip.mc_inner[("mc_" + parts[_local2])].gotoAndStop(type);
};
clip.mc_inner.mc_arm_left.mc_tool.gotoAndStop((type + "_left"));
clip.mc_inner.mc_arm_right.mc_tool.gotoAndStop((type + "_right"));
updateSelf();
}
private function updateSelf():void{
if (clip.mc_inner != null){
clip.mc_inner.gotoAndStop(frame);
frame = (frame + Math.abs(_speed));
if (frame > clip.mc_inner.totalFrames){
if (view == "death"){
frame = clip.mc_inner.totalFrames;
} else {
frame = 1;
};
};
distance = (distance + (_speed * 0.5));
};
}
private function startRecoverTimer():void{
stopRecoverTimer();
recoverTimer = new Timer(_recoverRate);
recoverTimer.addEventListener("timer", onRecoverTimerUpdate, false, 0, true);
recoverTimer.start();
}
public function set targetX(_arg1:int):void{
_targetX = _arg1;
}
public function clickZombie():void{
onClicked();
}
public function set originX(_arg1:int):void{
_originX = _arg1;
this.x = _originX;
}
private function removeSelf():void{
}
public function set distance(_arg1:Number):void{
var _local2:Boolean;
if ((((((_arg1 >= _targetDistance)) && ((_speed > 0)))) || ((((_arg1 <= 0)) && ((_speed < 0)))))){
_local2 = true;
if (_arg1 <= 10){
_local2 = false;
_arg1 = 0;
reverseSpeed();
} else {
_arg1 = _targetDistance;
onCompleted(_local2);
};
};
_distance = _arg1;
if ((((_distance > _approachDistance)) && (!(completedRun)))){
this.x = (this.x + (((_targetX - _originX) / (_targetDistance - _approachDistance)) * (_speed * 0.5)));
};
setScale();
}
public function get distance():Number{
return (_distance);
}
}
}//package comcero
Section 45
//StageMask (tamba.display.StageMask)
package tamba.display {
import flash.display.*;
public class StageMask extends Sprite {
public function StageMask(_arg1:uint, _arg2:uint):void{
this.graphics.beginFill(0xFF0000);
this.graphics.drawRect(0, 0, _arg1, _arg2);
this.graphics.endFill();
}
}
}//package tamba.display
Section 46
//EventWithParams (tamba.events.EventWithParams)
package tamba.events {
import flash.events.*;
public class EventWithParams extends Event {
private var _eventParams:Object;
private var _eventType:String;// = "onCustomEvent"
public function EventWithParams(_arg1:String, _arg2:Object=null){
_eventType = "onCustomEvent";
_eventParams = {};
super(_arg1, true, true);
_eventType = _arg1;
_eventParams = _arg2;
}
public function get params():Object{
return (_eventParams);
}
override public function get type():String{
return (_eventType);
}
}
}//package tamba.events
Section 47
//Preloader (tamba.events.Preloader)
package tamba.events {
import flash.display.*;
import flash.events.*;
public class Preloader extends Sprite {
private var preloaderParent;
public static const COMPLETE:String = "onPreloaderComplete";
public static const PROGRESS:String = "onPreloaderProgress";
public function Preloader(_arg1):void{
preloaderParent = _arg1;
}
public function start():void{
if (preloaderParent.loaderInfo.bytesLoaded >= preloaderParent.loaderInfo.bytesTotal){
onPreloaderComplete();
} else {
preloaderParent.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onPreloaderProgress, false, 0, true);
preloaderParent.loaderInfo.addEventListener(Event.COMPLETE, onPreloaderComplete, false, 0, true);
};
}
private function onPreloaderProgress(_arg1:ProgressEvent):void{
dispatchEvent(new EventWithParams(PROGRESS, {progress:(_arg1.bytesLoaded / _arg1.bytesTotal)}));
}
private function onPreloaderComplete(_arg1:Event=null):void{
dispatchEvent(new EventWithParams(COMPLETE));
}
}
}//package tamba.events
Section 48
//Leaderboard (tamba.game.Leaderboard)
package tamba.game {
import flash.display.*;
import flash.utils.*;
import tamba.events.*;
import tamba.net.*;
import tamba.ui.*;
public class Leaderboard extends MovieClip {
private var trackLinkage:String;
private var lineLinkage:String;
private var remoting:Remoting;
private var gatewayURL:String;
private var faceLinkage:String;
private var boardHeight:uint;
private var serviceName:String;
public function Leaderboard(_arg1:String, _arg2:String, _arg3:uint, _arg4:String, _arg5:String, _arg6:String){
gatewayURL = _arg1;
serviceName = _arg2;
boardHeight = _arg3;
lineLinkage = _arg4;
trackLinkage = _arg5;
faceLinkage = _arg6;
}
private function onRemotingSuccess(_arg1:EventWithParams):void{
var _local2:MovieClip;
var _local3:Array;
var _local4:uint;
var _local5:uint;
var _local6:ScrollBar;
var _local7:MovieClip;
var _local8:MovieClip;
var _local9:String;
_local2 = new MovieClip();
_local3 = _arg1.params.data;
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local8 = new (getDefinitionByName(lineLinkage));
for (_local9 in _local3[_local5]) {
if (_local8[_local9] != null){
_local8[_local9].text = _local3[_local5][_local9];
};
};
_local8.y = (_local5 * _local8.height);
onLineAdded(_local8, _local3[_local5]);
_local2.addChild(_local8);
_local5++;
};
_local6 = new ScrollBar(_local2, (_local2.width + 10), boardHeight, trackLinkage, faceLinkage);
_local7 = new MovieClip();
_local7.addChild(_local2);
_local7.addChild(_local6);
dispatchEvent(new EventWithParams("onSuccess", {method:_arg1.params.method, data:_local7}));
}
protected function onLineAdded(_arg1:MovieClip, _arg2:Object):void{
}
private function onRemotingError(_arg1:EventWithParams):void{
dispatchError(new Error("remoting"));
}
public function makeLeaderboard(_arg1:int=20):void{
remoting = new Remoting(gatewayURL, serviceName);
remoting.addEventListener("onRemotingSuccess", onRemotingSuccess, false, 0, true);
remoting.addEventListener("onRemotingError", onRemotingError, false, 0, true);
remoting.call("getHighScores", _arg1);
}
private function dispatchError(_arg1):void{
}
}
}//package tamba.game
Section 49
//SendToFriend (tamba.game.SendToFriend)
package tamba.game {
import flash.display.*;
import tamba.events.*;
import tamba.net.*;
public class SendToFriend extends Sprite {
private var senderName:String;
private var senderEmail:String;
private var errorMessages:Object;
private var remoting:Remoting;
private var gatewayURL:String;
private var recipients:Array;
private var serviceName:String;
public function SendToFriend(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Array){
errorMessages = {error_yourname:"Please enter your name", error_youremail:"Please enter a valid email address", error_recipients:"Please enter some recipients", error_friendname:"One of your recipients has a missing name", error_friendemail:"One of your recipients has an invalid email address", error_server:"Could not connect to the server"};
super();
gatewayURL = _arg1;
serviceName = _arg2;
senderName = _arg3;
senderEmail = _arg4;
recipients = _arg5;
}
private function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
return (_arg1.replace(/^\s+|\s+$/g, ""));
}
private function validateEmail(_arg1:String):Boolean{
var _local2:RegExp;
_arg1 = trim(_arg1);
_local2 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
if ((((_arg1.length <= 1)) || (!(_local2.test(_arg1))))){
return (false);
};
return (true);
}
private function onRemotingSuccess(_arg1:EventWithParams):void{
dispatchEvent(new EventWithParams("onSuccess", {method:_arg1.params.method, data:_arg1.params.data}));
}
public function send():void{
var _local1:uint;
var _local2:uint;
if (!validateName(senderName)){
dispatchError(new Error("error_yourname"));
return;
};
if (!validateEmail(senderEmail)){
dispatchError(new Error("error_youremail"));
return;
};
if (recipients.length <= 0){
dispatchError(new Error("error_recipients"));
return;
};
_local1 = recipients.length;
_local2 = 0;
while (_local2 < _local1) {
if (!validateName(recipients[_local2][0])){
dispatchError(new Error("error_friendname"));
return;
};
if (!validateEmail(recipients[_local2][1])){
dispatchError(new Error("error_friendemail"));
return;
};
_local2++;
};
remoting = new Remoting(gatewayURL, serviceName);
remoting.addEventListener("onRemotingSuccess", onRemotingSuccess, false, 0, true);
remoting.addEventListener("onRemotingError", onRemotingError, false, 0, true);
remoting.call("sendToFriend", senderName, senderEmail, recipients);
}
private function onRemotingError(_arg1:EventWithParams):void{
dispatchError(new Error("error_server"));
}
private function dispatchError(_arg1):void{
dispatchEvent(new EventWithParams("onError", {name:_arg1.message, message:errorMessages[_arg1.message]}));
}
private function validateName(_arg1:String=null):Boolean{
_arg1 = trim(_arg1);
if (_arg1.length <= 0){
return (false);
};
return (true);
}
}
}//package tamba.game
Section 50
//SubmitScore (tamba.game.SubmitScore)
package tamba.game {
import flash.display.*;
import tamba.events.*;
import com.adobe.crypto.*;
import tamba.net.*;
public class SubmitScore extends Sprite {
private var playerName:String;
private var playerScore:int;
private var playerEmail:String;
private var errorMessages:Object;
private var optin:int;// = 0
private var remoting:Remoting;
private var hashSalt:String;
private var gatewayURL:String;
private var serviceName:String;
public function SubmitScore(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:int, _arg7:uint=0){
optin = 0;
errorMessages = {error_yourname:"Please enter your name", error_youremail:"Please enter a valid email address", error_server:"Could not connect to the server"};
super();
gatewayURL = _arg1;
serviceName = _arg2;
hashSalt = _arg3;
playerName = _arg4;
playerEmail = _arg5;
playerScore = _arg6;
optin = _arg7;
}
private function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
return (_arg1.replace(/^\s+|\s+$/g, ""));
}
private function validateEmail(_arg1:String):Boolean{
var _local2:RegExp;
_arg1 = trim(_arg1);
_local2 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/i;
if ((((_arg1.length <= 1)) || (!(_local2.test(_arg1))))){
return (false);
};
return (true);
}
private function onRemotingSuccess(_arg1:EventWithParams):void{
dispatchEvent(new EventWithParams("onSuccess", {method:_arg1.params.method, data:_arg1.params.data}));
}
private function onRemotingError(_arg1:EventWithParams):void{
dispatchError(new Error("error_server"));
}
private function dispatchError(_arg1):void{
dispatchEvent(new EventWithParams("onError", {name:_arg1.message, message:errorMessages[_arg1.message]}));
}
public function submit():void{
var _local1:String;
if (!validateName(playerName)){
dispatchError(new Error("error_yourname"));
return;
};
if (!validateEmail(playerEmail)){
dispatchError(new Error("error_youremail"));
return;
};
_local1 = MD5.hash(((((((("client=" + hashSalt) + "&email=") + playerEmail) + "&score=") + playerScore) + "&optin=") + optin));
remoting = new Remoting(gatewayURL, serviceName);
remoting.addEventListener("onRemotingSuccess", onRemotingSuccess, false, 0, true);
remoting.addEventListener("onRemotingError", onRemotingError, false, 0, true);
remoting.call("setHighScore", playerName, playerEmail, playerScore, optin, _local1);
}
private function validateName(_arg1:String=null):Boolean{
_arg1 = trim(_arg1);
if (_arg1.length <= 0){
return (false);
};
return (true);
}
}
}//package tamba.game
Section 51
//Audio (tamba.media.Audio)
package tamba.media {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class Audio extends Sprite {
private static var effectsList:Array = [];
private static var fadeStartVolume:Number = 0;
private static var _musicVolume:Number = 1;
private static var effectsChannel:SoundChannel;
private static var musicChannel:SoundChannel;
private static var fadeTimer:Timer;
private static var fadeTimerMs:int = 50;
private static var fadeEndVolume:Number = 0;
private static var fadeRate:Number = 0.05;
private static var _effectsVolume:Number = 1;
public static function get effectsVolume():Number{
return (_effectsVolume);
}
public static 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();
}
public static function stopMusic():void{
if (musicChannel != null){
musicChannel.stop();
};
}
public static 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);
};
}
private static 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 static function get musicVolume():Number{
return (_musicVolume);
}
public static function stopEffects():void{
var _local1:uint;
_local1 = effectsList.length;
while (_local1--) {
if (effectsList[_local1] != null){
effectsList[_local1].stop();
};
};
effectsList = [];
}
public static 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 static 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;
};
};
}
private static function applyMusicVolume():void{
var _local1:SoundTransform;
if (musicChannel != null){
_local1 = musicChannel.soundTransform;
_local1.volume = _musicVolume;
musicChannel.soundTransform = _local1;
};
}
public static function set effectsVolume(_arg1:Number):void{
_effectsVolume = _arg1;
applyEffectsVolume();
}
public static function set musicVolume(_arg1:Number):void{
_musicVolume = _arg1;
applyMusicVolume();
}
}
}//package tamba.media
Section 52
//GetURL (tamba.net.GetURL)
package tamba.net {
import flash.display.*;
import flash.net.*;
public class GetURL extends Sprite {
public static function goto(_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("GetURL failed", e.message);
};
}
}
}//package tamba.net
Section 53
//Remoting (tamba.net.Remoting)
package tamba.net {
import flash.display.*;
import flash.events.*;
import tamba.events.*;
import flash.net.*;
public class Remoting extends Sprite {
private var callResponder:Responder;
private var netConnection:NetConnection;
private var functionName:String;
private var gatewayURL:String;
private var serviceName:String;
public function Remoting(_arg1:String, _arg2:String):void{
gatewayURL = _arg1;
serviceName = _arg2;
callResponder = new Responder(callHandler, errorHandler);
netConnection = new NetConnection();
netConnection.addEventListener(IOErrorEvent.IO_ERROR, onRemotingIOError, false, 0, true);
netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onRemotingSecurityError, false, 0, true);
netConnection.addEventListener(NetStatusEvent.NET_STATUS, onRemotingNetStatusChange, false, 0, true);
}
private function callHandler(_arg1):void{
dispatchEvent(new EventWithParams("onRemotingSuccess", {method:functionName, data:_arg1}));
netConnection.close();
}
private function errorHandler(_arg1:Object):void{
var _local2:*;
for (_local2 in _arg1) {
trace(_local2, "=", _arg1[_local2]);
};
dispatchEvent(new EventWithParams("onRemotingError", {name:_arg1.code, message:_arg1.description}));
netConnection.close();
}
public function call(_arg1:String, ... _args):void{
functionName = _arg1;
if (netConnection.connected){
netConnection.close();
};
netConnection.connect(gatewayURL);
_args.unshift(((serviceName + ".") + functionName), callResponder);
netConnection.call.apply(null, _args);
}
private function onRemotingSecurityError(_arg1:SecurityErrorEvent):void{
dispatchError(new Error(_arg1.text));
}
private function onRemotingNetStatusChange(_arg1:NetStatusEvent):void{
if (_arg1.info.level == "error"){
dispatchError(new Error(_arg1.info.code));
};
}
private function dispatchError(_arg1):void{
dispatchEvent(new EventWithParams("onRemotingError", {name:_arg1.name, message:_arg1.message}));
}
private function onRemotingIOError(_arg1:IOErrorEvent):void{
dispatchError(new Error(_arg1.text));
}
}
}//package tamba.net
Section 54
//ScrollBar (tamba.ui.ScrollBar)
package tamba.ui {
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));
};
_scrollFace.buttonMode = true;
_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 tamba.ui
Section 55
//GlobalObject (tamba.utils.GlobalObject)
package tamba.utils {
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 tamba.utils
Section 56
//_assets_1 (zombie_fla._assets_1)
package zombie_fla {
import flash.display.*;
public dynamic class _assets_1 extends MovieClip {
public function _assets_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_fla
Section 57
//btn_sound_205 (zombie_fla.btn_sound_205)
package zombie_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_sound_205 extends MovieClip {
public var text_label:TextField;
}
}//package zombie_fla
Section 58
//btn_tamba_206 (zombie_fla.btn_tamba_206)
package zombie_fla {
import flash.display.*;
import flash.text.*;
public dynamic class btn_tamba_206 extends MovieClip {
public var text_label:TextField;
}
}//package zombie_fla
Section 59
//game_message_msg_8 (zombie_fla.game_message_msg_8)
package zombie_fla {
import flash.display.*;
import flash.text.*;
public dynamic class game_message_msg_8 extends MovieClip {
public var text_message:TextField;
}
}//package zombie_fla
Section 60
//gameover_grave_255 (zombie_fla.gameover_grave_255)
package zombie_fla {
import flash.display.*;
public dynamic class gameover_grave_255 extends MovieClip {
public var mc_hand:MovieClip;
public function gameover_grave_255(){
addFrameScript(79, frame80, 99, frame100);
}
function frame80(){
mc_hand.gotoAndPlay(2);
}
function frame100(){
stop();
}
}
}//package zombie_fla
Section 61
//house_1_15 (zombie_fla.house_1_15)
package zombie_fla {
import flash.display.*;
public dynamic class house_1_15 extends MovieClip {
public var mc_sparky:MovieClip;
public var mc_anim:MovieClip;
public var mc_builder_wall:MovieClip;
public var mc_roofer:MovieClip;
public var mc_roofer_2:MovieClip;
public var mc_plumber:MovieClip;
public var mc_builder:MovieClip;
}
}//package zombie_fla
Section 62
//house_1_bench_41 (zombie_fla.house_1_bench_41)
package zombie_fla {
import flash.display.*;
public dynamic class house_1_bench_41 extends MovieClip {
public var testclip:MovieClip;
}
}//package zombie_fla
Section 63
//house_1_drainpipe_35 (zombie_fla.house_1_drainpipe_35)
package zombie_fla {
import flash.display.*;
public dynamic class house_1_drainpipe_35 extends MovieClip {
public var mc_anim:MovieClip;
public function house_1_drainpipe_35(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package zombie_fla
Section 64
//house_1_drainpipe_left_48 (zombie_fla.house_1_drainpipe_left_48)
package zombie_fla {
import flash.display.*;
public dynamic class house_1_drainpipe_left_48 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 65
//house_1_flame_1_16 (zombie_fla.house_1_flame_1_16)
package zombie_fla {
import flash.display.*;
public dynamic class house_1_flame_1_16 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 66
//house_1_score_70 (zombie_fla.house_1_score_70)
package zombie_fla {
import flash.display.*;
public dynamic class house_1_score_70 extends MovieClip {
public var mc_display:MovieClip;
}
}//package zombie_fla
Section 67
//house_1_time_68 (zombie_fla.house_1_time_68)
package zombie_fla {
import flash.display.*;
public dynamic class house_1_time_68 extends MovieClip {
public var mc_display:MovieClip;
}
}//package zombie_fla
Section 68
//house_1_wall_23 (zombie_fla.house_1_wall_23)
package zombie_fla {
import flash.display.*;
public dynamic class house_1_wall_23 extends MovieClip {
public var mc_sparky:MovieClip;
}
}//package zombie_fla
Section 69
//house_2_75 (zombie_fla.house_2_75)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_75 extends MovieClip {
public var mc_sparky:MovieClip;
public var mc_builder_wall:MovieClip;
public var mc_anim:MovieClip;
public var mc_roofer:MovieClip;
public var mc_roofer_2:MovieClip;
public var mc_plumber:MovieClip;
}
}//package zombie_fla
Section 70
//house_2_drainpipe_1_89 (zombie_fla.house_2_drainpipe_1_89)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_drainpipe_1_89 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 71
//house_2_drainpipe_3_99 (zombie_fla.house_2_drainpipe_3_99)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_drainpipe_3_99 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 72
//house_2_flame_1_76 (zombie_fla.house_2_flame_1_76)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_flame_1_76 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 73
//house_2_score_121 (zombie_fla.house_2_score_121)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_score_121 extends MovieClip {
public var mc_display:MovieClip;
}
}//package zombie_fla
Section 74
//house_2_time_120 (zombie_fla.house_2_time_120)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_time_120 extends MovieClip {
public var mc_display:MovieClip;
}
}//package zombie_fla
Section 75
//house_2_wall_78 (zombie_fla.house_2_wall_78)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_wall_78 extends MovieClip {
public var mc_sparky:MovieClip;
}
}//package zombie_fla
Section 76
//house_2_window_1_87 (zombie_fla.house_2_window_1_87)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_window_1_87 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 77
//house_2_window_2_84 (zombie_fla.house_2_window_2_84)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_window_2_84 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 78
//house_2_window_4_86 (zombie_fla.house_2_window_4_86)
package zombie_fla {
import flash.display.*;
public dynamic class house_2_window_4_86 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 79
//house_3_125 (zombie_fla.house_3_125)
package zombie_fla {
import flash.display.*;
public dynamic class house_3_125 extends MovieClip {
public var mc_sparky:MovieClip;
public var mc_builder_wall:MovieClip;
public var mc_anim:MovieClip;
public var mc_roofer:MovieClip;
public var mc_roofer_2:MovieClip;
public var mc_plumber:MovieClip;
}
}//package zombie_fla
Section 80
//house_3_drainpipe_1_136 (zombie_fla.house_3_drainpipe_1_136)
package zombie_fla {
import flash.display.*;
public dynamic class house_3_drainpipe_1_136 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 81
//house_3_drainpipe_2_149 (zombie_fla.house_3_drainpipe_2_149)
package zombie_fla {
import flash.display.*;
public dynamic class house_3_drainpipe_2_149 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 82
//house_3_drainpipe_top_140 (zombie_fla.house_3_drainpipe_top_140)
package zombie_fla {
import flash.display.*;
public dynamic class house_3_drainpipe_top_140 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 83
//house_3_wall_126 (zombie_fla.house_3_wall_126)
package zombie_fla {
import flash.display.*;
public dynamic class house_3_wall_126 extends MovieClip {
public var mc_sparky:MovieClip;
}
}//package zombie_fla
Section 84
//house_3_window_1_146 (zombie_fla.house_3_window_1_146)
package zombie_fla {
import flash.display.*;
public dynamic class house_3_window_1_146 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 85
//house_3_window_2_142 (zombie_fla.house_3_window_2_142)
package zombie_fla {
import flash.display.*;
public dynamic class house_3_window_2_142 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 86
//house_4_160 (zombie_fla.house_4_160)
package zombie_fla {
import flash.display.*;
public dynamic class house_4_160 extends MovieClip {
public var mc_sparky:MovieClip;
public var mc_builder_wall:MovieClip;
public var mc_anim:MovieClip;
public var mc_roofer:MovieClip;
public var mc_roofer_2:MovieClip;
public var mc_plumber:MovieClip;
}
}//package zombie_fla
Section 87
//house_4_drainpipe_1_174 (zombie_fla.house_4_drainpipe_1_174)
package zombie_fla {
import flash.display.*;
public dynamic class house_4_drainpipe_1_174 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 88
//house_4_drainpipe_171 (zombie_fla.house_4_drainpipe_171)
package zombie_fla {
import flash.display.*;
public dynamic class house_4_drainpipe_171 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 89
//house_4_wall_162 (zombie_fla.house_4_wall_162)
package zombie_fla {
import flash.display.*;
public dynamic class house_4_wall_162 extends MovieClip {
public var mc_sparky:MovieClip;
}
}//package zombie_fla
Section 90
//house_4_window_181 (zombie_fla.house_4_window_181)
package zombie_fla {
import flash.display.*;
public dynamic class house_4_window_181 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 91
//house_4_window_4_173 (zombie_fla.house_4_window_4_173)
package zombie_fla {
import flash.display.*;
public dynamic class house_4_window_4_173 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 92
//house_level_1_14 (zombie_fla.house_level_1_14)
package zombie_fla {
import flash.display.*;
public dynamic class house_level_1_14 extends MovieClip {
public var mc_builder:MovieClip;
public function house_level_1_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_fla
Section 93
//house_level_2_74 (zombie_fla.house_level_2_74)
package zombie_fla {
import flash.display.*;
public dynamic class house_level_2_74 extends MovieClip {
public var mc_builder:MovieClip;
public function house_level_2_74(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_fla
Section 94
//house_level_3_124 (zombie_fla.house_level_3_124)
package zombie_fla {
import flash.display.*;
public dynamic class house_level_3_124 extends MovieClip {
public var mc_builder:MovieClip;
public function house_level_3_124(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_fla
Section 95
//house_level_4_159 (zombie_fla.house_level_4_159)
package zombie_fla {
import flash.display.*;
public dynamic class house_level_4_159 extends MovieClip {
public var mc_builder:MovieClip;
public function house_level_4_159(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_fla
Section 96
//hud_score_71 (zombie_fla.hud_score_71)
package zombie_fla {
import flash.display.*;
import flash.text.*;
public dynamic class hud_score_71 extends MovieClip {
public var text_display:TextField;
}
}//package zombie_fla
Section 97
//hud_time_69 (zombie_fla.hud_time_69)
package zombie_fla {
import flash.display.*;
import flash.text.*;
public dynamic class hud_time_69 extends MovieClip {
public var text_display:TextField;
}
}//package zombie_fla
Section 98
//level_4_flame_1_161 (zombie_fla.level_4_flame_1_161)
package zombie_fla {
import flash.display.*;
public dynamic class level_4_flame_1_161 extends MovieClip {
public var mc_anim:MovieClip;
}
}//package zombie_fla
Section 99
//mc_bookmarks_207 (zombie_fla.mc_bookmarks_207)
package zombie_fla {
import flash.display.*;
public dynamic class mc_bookmarks_207 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 zombie_fla
Section 100
//Sparkles_21 (zombie_fla.Sparkles_21)
package zombie_fla {
import flash.display.*;
public dynamic class Sparkles_21 extends MovieClip {
public function Sparkles_21(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package zombie_fla
Section 101
//ui_bg_grave_1_239 (zombie_fla.ui_bg_grave_1_239)
package zombie_fla {
import flash.display.*;
public dynamic class ui_bg_grave_1_239 extends MovieClip {
public var mc_buttons:MovieClip;
}
}//package zombie_fla
Section 102
//ui_bg_grave_2_235 (zombie_fla.ui_bg_grave_2_235)
package zombie_fla {
import flash.display.*;
public dynamic class ui_bg_grave_2_235 extends MovieClip {
public var mc_buttons:MovieClip;
}
}//package zombie_fla
Section 103
//ui_gameover_hand_256 (zombie_fla.ui_gameover_hand_256)
package zombie_fla {
import flash.display.*;
public dynamic class ui_gameover_hand_256 extends MovieClip {
public function ui_gameover_hand_256(){
addFrameScript(0, frame1, 22, frame23);
}
function frame1(){
stop();
}
function frame23(){
stop();
}
}
}//package zombie_fla
Section 104
//ui_grave_1_buttons_240 (zombie_fla.ui_grave_1_buttons_240)
package zombie_fla {
import flash.display.*;
public dynamic class ui_grave_1_buttons_240 extends MovieClip {
public var btn_play:MovieClip;
public var btn_prize:MovieClip;
public var btn_instructions:MovieClip;
}
}//package zombie_fla
Section 105
//ui_grave_2_buttons_236 (zombie_fla.ui_grave_2_buttons_236)
package zombie_fla {
import flash.display.*;
public dynamic class ui_grave_2_buttons_236 extends MovieClip {
public var btn_leaderboard:MovieClip;
public var btn_sendfriend:MovieClip;
}
}//package zombie_fla
Section 106
//ui_grave_back_263 (zombie_fla.ui_grave_back_263)
package zombie_fla {
import flash.display.*;
public dynamic class ui_grave_back_263 extends MovieClip {
public var mc_screen_hand_1:MovieClip;
public var btn_back:MovieClip;
}
}//package zombie_fla
Section 107
//ui_grave_mainmenu_258 (zombie_fla.ui_grave_mainmenu_258)
package zombie_fla {
import flash.display.*;
public dynamic class ui_grave_mainmenu_258 extends MovieClip {
public var btn_back:MovieClip;
}
}//package zombie_fla
Section 108
//ui_grave_submitscore_260 (zombie_fla.ui_grave_submitscore_260)
package zombie_fla {
import flash.display.*;
public dynamic class ui_grave_submitscore_260 extends MovieClip {
public var btn_submit:MovieClip;
}
}//package zombie_fla
Section 109
//ui_screen_content_holder_265 (zombie_fla.ui_screen_content_holder_265)
package zombie_fla {
import flash.display.*;
public dynamic class ui_screen_content_holder_265 extends MovieClip {
public var mc_holder:MovieClip;
public var mc_screen_hand_2:MovieClip;
public var mc_logo:MovieClip;
}
}//package zombie_fla
Section 110
//water_37 (zombie_fla.water_37)
package zombie_fla {
import flash.display.*;
public dynamic class water_37 extends MovieClip {
public var frame:int;
public function water_37(){
addFrameScript(0, frame1, 14, frame15);
}
function frame15(){
gotoAndPlay(2);
}
function frame1(){
frame = Math.floor(((Math.random() * this.totalFrames) + 1));
if (frame == 1){
frame = 2;
};
this.gotoAndPlay(frame);
}
}
}//package zombie_fla
Section 111
//zombie_armleft_side_2_372 (zombie_fla.zombie_armleft_side_2_372)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_armleft_side_2_372 extends MovieClip {
public var mc_inner:MovieClip;
public var mc_tool:MovieClip;
}
}//package zombie_fla
Section 112
//zombie_armleft_side_345 (zombie_fla.zombie_armleft_side_345)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_armleft_side_345 extends MovieClip {
public var mc_inner:MovieClip;
public var mc_tool:MovieClip;
}
}//package zombie_fla
Section 113
//zombie_armright_side_2_373 (zombie_fla.zombie_armright_side_2_373)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_armright_side_2_373 extends MovieClip {
public var mc_inner:MovieClip;
public var mc_tool:MovieClip;
}
}//package zombie_fla
Section 114
//zombie_armright_side_357 (zombie_fla.zombie_armright_side_357)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_armright_side_357 extends MovieClip {
public var mc_inner:MovieClip;
public var mc_tool:MovieClip;
}
}//package zombie_fla
Section 115
//zombie_back_311 (zombie_fla.zombie_back_311)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_back_311 extends MovieClip {
public var mc_arm_right:MovieClip;
public var mc_leg_left:MovieClip;
public var mc_sleeve_right:MovieClip;
public var mc_leg_right:MovieClip;
public var mc_hat:MovieClip;
public var mc_sleeve_left:MovieClip;
public var mc_arm_left:MovieClip;
public var mc_body:MovieClip;
public var mc_head:MovieClip;
}
}//package zombie_fla
Section 116
//zombie_body_277 (zombie_fla.zombie_body_277)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_body_277 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 117
//zombie_body_back_318 (zombie_fla.zombie_body_back_318)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_body_back_318 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 118
//zombie_body_side_352 (zombie_fla.zombie_body_side_352)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_body_side_352 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 119
//zombie_dead_leg_1_63 (zombie_fla.zombie_dead_leg_1_63)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_dead_leg_1_63 extends MovieClip {
public function zombie_dead_leg_1_63(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
}
}
}//package zombie_fla
Section 120
//zombie_death_374 (zombie_fla.zombie_death_374)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_death_374 extends MovieClip {
public var mc_arm_right:MovieClip;
public var mc_leg_left:MovieClip;
public var mc_sleeve_right:MovieClip;
public var mc_leg_right:MovieClip;
public var mc_hat:MovieClip;
public var mc_sleeve_left:MovieClip;
public var mc_arm_left:MovieClip;
public var mc_body:MovieClip;
public var mc_head:MovieClip;
public function zombie_death_374(){
addFrameScript(65, frame66);
}
function frame66(){
stop();
}
}
}//package zombie_fla
Section 121
//zombie_death_58 (zombie_fla.zombie_death_58)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_death_58 extends MovieClip {
public function zombie_death_58(){
addFrameScript(51, frame52);
}
function frame52(){
stop();
}
}
}//package zombie_fla
Section 122
//zombie_front_270 (zombie_fla.zombie_front_270)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_front_270 extends MovieClip {
public var mc_arm_right:MovieClip;
public var mc_leg_left:MovieClip;
public var mc_sleeve_right:MovieClip;
public var mc_leg_right:MovieClip;
public var mc_hat:MovieClip;
public var mc_sleeve_left:MovieClip;
public var mc_arm_left:MovieClip;
public var mc_body:MovieClip;
public var mc_head:MovieClip;
}
}//package zombie_fla
Section 123
//zombie_generic_back_armleft_324 (zombie_fla.zombie_generic_back_armleft_324)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_generic_back_armleft_324 extends MovieClip {
public var mc_tool:MovieClip;
}
}//package zombie_fla
Section 124
//zombie_generic_back_rightarm_323 (zombie_fla.zombie_generic_back_rightarm_323)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_generic_back_rightarm_323 extends MovieClip {
public var mc_tool:MovieClip;
}
}//package zombie_fla
Section 125
//zombie_generic_front_armleft_282 (zombie_fla.zombie_generic_front_armleft_282)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_generic_front_armleft_282 extends MovieClip {
public var mc_tool:MovieClip;
}
}//package zombie_fla
Section 126
//zombie_generic_front_armright_297 (zombie_fla.zombie_generic_front_armright_297)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_generic_front_armright_297 extends MovieClip {
public var mc_tool:MovieClip;
}
}//package zombie_fla
Section 127
//zombie_hat_304 (zombie_fla.zombie_hat_304)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_hat_304 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 128
//zombie_hat_back_326 (zombie_fla.zombie_hat_back_326)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_hat_back_326 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 129
//zombie_hat_side_366 (zombie_fla.zombie_hat_side_366)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_hat_side_366 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 130
//zombie_head_side_364 (zombie_fla.zombie_head_side_364)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_head_side_364 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 131
//zombie_leg_271 (zombie_fla.zombie_leg_271)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_leg_271 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 132
//zombie_leg_back_312 (zombie_fla.zombie_leg_back_312)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_leg_back_312 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 133
//zombie_legleft_side_332 (zombie_fla.zombie_legleft_side_332)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_legleft_side_332 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 134
//zombie_legright_side_338 (zombie_fla.zombie_legright_side_338)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_legright_side_338 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 135
//zombie_neck_side_343 (zombie_fla.zombie_neck_side_343)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_neck_side_343 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 136
//zombie_score_310 (zombie_fla.zombie_score_310)
package zombie_fla {
import flash.display.*;
import flash.text.*;
public dynamic class zombie_score_310 extends MovieClip {
public var text_score:TextField;
}
}//package zombie_fla
Section 137
//zombie_score_anim_309 (zombie_fla.zombie_score_anim_309)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_score_anim_309 extends MovieClip {
public var mc_inner:MovieClip;
public function zombie_score_anim_309(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package zombie_fla
Section 138
//zombie_side_2_371 (zombie_fla.zombie_side_2_371)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_side_2_371 extends MovieClip {
public var mc_arm_right:MovieClip;
public var mc_leg_left:MovieClip;
public var mc_sleeve_right:MovieClip;
public var mc_neck:MovieClip;
public var mc_leg_right:MovieClip;
public var mc_hat:MovieClip;
public var mc_sleeve_left:MovieClip;
public var mc_arm_left:MovieClip;
public var mc_body:MovieClip;
public var mc_head:MovieClip;
}
}//package zombie_fla
Section 139
//zombie_side_331 (zombie_fla.zombie_side_331)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_side_331 extends MovieClip {
public var mc_arm_right:MovieClip;
public var mc_leg_left:MovieClip;
public var mc_sleeve_right:MovieClip;
public var mc_neck:MovieClip;
public var mc_leg_right:MovieClip;
public var mc_hat:MovieClip;
public var mc_sleeve_left:MovieClip;
public var mc_arm_left:MovieClip;
public var mc_body:MovieClip;
public var mc_head:MovieClip;
}
}//package zombie_fla
Section 140
//zombie_sleeve_1_292 (zombie_fla.zombie_sleeve_1_292)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_sleeve_1_292 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 141
//zombie_sleeve_1_side_347 (zombie_fla.zombie_sleeve_1_side_347)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_sleeve_1_side_347 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 142
//zombie_sleeve_2_298 (zombie_fla.zombie_sleeve_2_298)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_sleeve_2_298 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 143
//zombie_sleeve_2_side_359 (zombie_fla.zombie_sleeve_2_side_359)
package zombie_fla {
import flash.display.*;
public dynamic class zombie_sleeve_2_side_359 extends MovieClip {
public var mc_inner:MovieClip;
}
}//package zombie_fla
Section 144
//dm_1 (dm_1)
package {
import flash.display.*;
public dynamic class dm_1 extends MovieClip {
}
}//package
Section 145
//game_border (game_border)
package {
import flash.display.*;
public dynamic class game_border extends MovieClip {
public var mc_logo:MovieClip;
}
}//package
Section 146
//game_crosshairs (game_crosshairs)
package {
import flash.display.*;
public dynamic class game_crosshairs extends MovieClip {
}
}//package
Section 147
//game_message (game_message)
package {
import flash.display.*;
public dynamic class game_message extends MovieClip {
public var mc_message:MovieClip;
public var mc_logo:MovieClip;
}
}//package
Section 148
//game_sky (game_sky)
package {
import flash.display.*;
public dynamic class game_sky extends BitmapData {
public function game_sky(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 149
//game_sky_2 (game_sky_2)
package {
import flash.display.*;
public dynamic class game_sky_2 extends MovieClip {
}
}//package
Section 150
//groan_1 (groan_1)
package {
import flash.media.*;
public dynamic class groan_1 extends Sound {
}
}//package
Section 151
//groan_2 (groan_2)
package {
import flash.media.*;
public dynamic class groan_2 extends Sound {
}
}//package
Section 152
//groan_3 (groan_3)
package {
import flash.media.*;
public dynamic class groan_3 extends Sound {
}
}//package
Section 153
//hit_1 (hit_1)
package {
import flash.media.*;
public dynamic class hit_1 extends Sound {
}
}//package
Section 154
//hit_2 (hit_2)
package {
import flash.media.*;
public dynamic class hit_2 extends Sound {
}
}//package
Section 155
//house_brick_1 (house_brick_1)
package {
import flash.display.*;
public dynamic class house_brick_1 extends MovieClip {
}
}//package
Section 156
//househit (househit)
package {
import flash.media.*;
public dynamic class househit extends Sound {
}
}//package
Section 157
//leaderboard_line (leaderboard_line)
package {
import flash.display.*;
import flash.text.*;
public dynamic class leaderboard_line extends MovieClip {
public var score:TextField;
public var username:TextField;
}
}//package
Section 158
//level_1 (level_1)
package {
import flash.display.*;
public dynamic class level_1 extends MovieClip {
public var mc_house:MovieClip;
public var mc_entrance:MovieClip;
public var mc_timer:MovieClip;
public var mc_proj:MovieClip;
public var mc_zombies:MovieClip;
public var mc_score:MovieClip;
}
}//package
Section 159
//level_2 (level_2)
package {
import flash.display.*;
public dynamic class level_2 extends MovieClip {
public var mc_house:MovieClip;
public var mc_entrance:MovieClip;
public var mc_timer:MovieClip;
public var mc_proj:MovieClip;
public var mc_zombies:MovieClip;
public var mc_score:MovieClip;
}
}//package
Section 160
//level_3 (level_3)
package {
import flash.display.*;
public dynamic class level_3 extends MovieClip {
public var mc_house:MovieClip;
public var mc_entrance:MovieClip;
public var mc_timer:MovieClip;
public var mc_proj:MovieClip;
public var mc_zombies:MovieClip;
public var mc_score:MovieClip;
}
}//package
Section 161
//level_4 (level_4)
package {
import flash.display.*;
public dynamic class level_4 extends MovieClip {
public var mc_house:MovieClip;
public var mc_entrance:MovieClip;
public var mc_timer:MovieClip;
public var mc_proj:MovieClip;
public var mc_zombies:MovieClip;
public var mc_score:MovieClip;
}
}//package
Section 162
//marketing_screen (marketing_screen)
package {
import flash.display.*;
public dynamic class marketing_screen extends MovieClip {
public var btn_client:MovieClip;
public var mc_message:MovieClip;
public var btn_next:MovieClip;
}
}//package
Section 163
//mouse_hit (mouse_hit)
package {
import flash.display.*;
public dynamic class mouse_hit extends MovieClip {
}
}//package
Section 164
//music_main (music_main)
package {
import flash.media.*;
public dynamic class music_main extends Sound {
}
}//package
Section 165
//roof_tile (roof_tile)
package {
import flash.display.*;
public dynamic class roof_tile extends MovieClip {
}
}//package
Section 166
//screen_footer (screen_footer)
package {
import flash.display.*;
public dynamic class screen_footer extends MovieClip {
public var btn_tamba:MovieClip;
public var btn_sound:MovieClip;
public var mc_bookmarks:MovieClip;
}
}//package
Section 167
//screen_game (screen_game)
package {
import flash.display.*;
public dynamic class screen_game extends MovieClip {
}
}//package
Section 168
//screen_instructions (screen_instructions)
package {
import flash.display.*;
public dynamic class screen_instructions extends MovieClip {
}
}//package
Section 169
//screen_leaderboard (screen_leaderboard)
package {
import flash.display.*;
public dynamic class screen_leaderboard extends MovieClip {
}
}//package
Section 170
//screen_preloader (screen_preloader)
package {
import flash.display.*;
import flash.text.*;
public dynamic class screen_preloader extends MovieClip {
public var text_pct:TextField;
}
}//package
Section 171
//screen_sendfriend (screen_sendfriend)
package {
import flash.display.*;
import flash.text.*;
public dynamic class screen_sendfriend extends MovieClip {
public var input_friendname_4:TextField;
public var input_yourname:TextField;
public var input_youremail:TextField;
public var input_friendemail_1:TextField;
public var input_friendemail_2:TextField;
public var input_friendemail_4:TextField;
public var input_friendemail_3:TextField;
public var btn_submit:MovieClip;
public var text_error:TextField;
public var input_friendname_2:TextField;
public var input_friendname_3:TextField;
public var input_friendname_1:TextField;
}
}//package
Section 172
//screen_submitscore (screen_submitscore)
package {
import flash.display.*;
import flash.text.*;
public dynamic class screen_submitscore extends MovieClip {
public var text_score:TextField;
public var input_yourname:TextField;
public var input_youremail:TextField;
public var btn_submit:MovieClip;
public var text_error:TextField;
}
}//package
Section 173
//scroll_face (scroll_face)
package {
import flash.display.*;
public dynamic class scroll_face extends MovieClip {
}
}//package
Section 174
//scroll_track (scroll_track)
package {
import flash.display.*;
public dynamic class scroll_track extends MovieClip {
}
}//package
Section 175
//titlegroan (titlegroan)
package {
import flash.media.*;
public dynamic class titlegroan extends Sound {
}
}//package
Section 176
//ui_bg (ui_bg)
package {
import flash.display.*;
public dynamic class ui_bg extends MovieClip {
public var mc_gameover_submit:MovieClip;
public var mc_gameover_grave:MovieClip;
public var mc_hand_2:MovieClip;
public var mc_hand_3:MovieClip;
public var mc_gamelogo:MovieClip;
public var mc_hand_1:MovieClip;
public var mc_screen_content:MovieClip;
public var mc_screen_hat:MovieClip;
public var mc_screen_back:MovieClip;
public var mc_logo:MovieClip;
public var mc_grave_1:MovieClip;
public var mc_grave_2:MovieClip;
public var mc_gameover_back:MovieClip;
public var mc_zombie_1:MovieClip;
public var mc_zombie_2:MovieClip;
}
}//package
Section 177
//ui_warp (ui_warp)
package {
import flash.display.*;
public dynamic class ui_warp extends MovieClip {
}
}//package
Section 178
//zombie_clip (zombie_clip)
package {
import flash.display.*;
public dynamic class zombie_clip extends MovieClip {
public var mc_inner:MovieClip;
public var mc_score:MovieClip;
}
}//package