Section 1
//StringUtil (com.adobe.utils.StringUtil)
package com.adobe.utils {
public class StringUtil {
public static function beginsWith(_arg1:String, _arg2:String):Boolean{
return ((_arg2 == _arg1.substring(0, _arg2.length)));
}
public static function trim(_arg1:String):String{
return (_slot1.ltrim(_slot1.rtrim(_arg1)));
}
public static function stringsAreEqual(_arg1:String, _arg2:String, _arg3:Boolean):Boolean{
if (_arg3){
return ((_arg1 == _arg2));
};
return ((_arg1.toUpperCase() == _arg2.toUpperCase()));
}
public static function replace(_arg1:String, _arg2:String, _arg3:String):String{
var _local9:Number;
var _local4:String = new String();
var _local5:Boolean;
var _local6:Number = _arg1.length;
var _local7:Number = _arg2.length;
var _local8:Number = 0;
while (_local8 < _local6) {
if (_arg1.charAt(_local8) == _arg2.charAt(0)){
_local5 = true;
_local9 = 0;
while (_local9 < _local7) {
if (_arg1.charAt((_local8 + _local9)) != _arg2.charAt(_local9)){
_local5 = false;
break;
};
_local9++;
};
//unresolved if
_local4 = (_local4 + _arg3);
_local8 = (_local8 + (_local7 - 1));
} else {
_local4 = (_local4 + _arg1.charAt(_local8));
};
_local8++;
};
return (_local4);
}
public static function rtrim(_arg1:String):String{
var _local2:Number = _arg1.length;
var _local3:Number = _local2;
while (_local3 > 0) {
if (_arg1.charCodeAt((_local3 - 1)) > 32){
return (_arg1.substring(0, _local3));
};
_local3--;
};
return ("");
}
public static function endsWith(_arg1:String, _arg2:String):Boolean{
return ((_arg2 == _arg1.substring((_arg1.length - _arg2.length))));
}
public static function stringHasValue(_arg1:String):Boolean{
return (((!((_arg1 == null))) && ((_arg1.length > 0))));
}
public static function remove(_arg1:String, _arg2:String):String{
return (_slot1.replace(_arg1, _arg2, ""));
}
public static function ltrim(_arg1:String):String{
var _local2:Number = _arg1.length;
var _local3:Number = 0;
while (_local3 < _local2) {
if (_arg1.charCodeAt(_local3) > 32){
return (_arg1.substring(_local3));
};
_local3++;
};
return ("");
}
}
}//package com.adobe.utils
Section 2
//BitmapScrollItem (com.e4.vampirekitten.scrollengine.BitmapScrollItem)
package com.e4.vampirekitten.scrollengine {
import flash.display.*;
import flash.geom.*;
public class BitmapScrollItem extends ScrollItem {
private var bmpRect:Rectangle;
public var bmpData:BitmapData;
private var p:Point;
private var alignOffset:Number;
public function BitmapScrollItem(_arg1:BitmapData, _arg2:Array, _arg3:ScrollLayer, _arg4:int){
super(_arg2, _arg3, _arg4, new Point(0, 0));
bmpData = _arg1;
bmpRect = bmpData.rect;
p = new Point();
alignOffset = ((align == ALIGN_BOTTOM)) ? -(height) : 0;
}
override public function draw(_arg1:BitmapData=null):void{
super.draw();
if (_arg1 != null){
p.x = int(screenPos.x);
p.y = int((screenPos.y + alignOffset));
_arg1.copyPixels(bmpData, bmpRect, p, null, null, true);
};
}
override public function get width():Number{
return (bmpData.width);
}
override public function get height():Number{
return (bmpData.height);
}
override public function set width(_arg1:Number):void{
error("cannot change the width of a bitmapdata scroll item instance");
}
override public function set height(_arg1:Number):void{
error("cannot change the height of a bitmapdata scroll item instance");
}
override public function destroy():void{
inuse = false;
}
override public function kill():void{
bmpData.dispose();
}
}
}//package com.e4.vampirekitten.scrollengine
Section 3
//ObjectScrollLayer (com.e4.vampirekitten.scrollengine.ObjectScrollLayer)
package com.e4.vampirekitten.scrollengine {
import flash.geom.*;
public class ObjectScrollLayer extends ScrollLayer {
public function ObjectScrollLayer(_arg1:Point, _arg2:Point, _arg3:Boolean, _arg4:Number, _arg5:Number, _arg6:Array, _arg7:String=null, _arg8:Number=0, _arg9:Number=1, _arg10:Boolean=false, _arg11:int=1, _arg12:Boolean=true, _arg13:Boolean=false, _arg14:Array=null, _arg15:Boolean=true){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14, _arg15);
overspill = (displayWidth * 2.2);
}
override protected function getNextItem():Array{
var _local1:Array;
var _local2:Boolean;
while (!(_local2)) {
if (bUsePRNG){
_local1 = itemPool[pRNG.nextIntRange(0, itemPool.length)];
} else {
_local1 = itemPool[Math.floor((Math.random() * itemPool.length))];
};
if (_local1 != lastItem){
_local2 = true;
};
};
lastItem = _local1;
return (lastItem);
}
}
}//package com.e4.vampirekitten.scrollengine
Section 4
//ScrollItem (com.e4.vampirekitten.scrollengine.ScrollItem)
package com.e4.vampirekitten.scrollengine {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.system.*;
public class ScrollItem extends EventDispatcher {
private var _inuse:Boolean;
protected var align:int;
public var name:String;
public var screenPos:Point;
public var destroyIfOffscreen:Boolean;
private var bCollisionDataEnabled:Boolean;
protected var parent:ScrollLayer;
public var clipType:Class;
private var _visible:Boolean;
public var itemLayerOffset:Point;
protected var collisionData:Array;
public static const ALIGN_BOTTOM:int = 1;
public static const ALIGN_TOP:int = 0;
private static var objectCounter:int = 0;
public function ScrollItem(_arg1:Array, _arg2:ScrollLayer, _arg3:int, _arg4:Point){
itemLayerOffset = _arg4.clone();
align = _arg3;
parent = _arg2;
collisionData = _arg1;
destroyIfOffscreen = true;
name = ("ScrollItem" + objectCounter++);
screenPos = new Point(0, 0);
_inuse = false;
}
public function destroy():void{
error("ScrollItem::destroy - need to override");
System.exit(0);
}
public function get inuse():Boolean{
return (_inuse);
}
public function set inuse(_arg1:Boolean):void{
_inuse = _arg1;
if (_inuse){
visible = true;
} else {
visible = false;
};
}
public function set width(_arg1:Number):void{
error("ScrollItem::set width - need to override");
System.exit(0);
}
public function getCollisionData():Array{
return ((bCollisionDataEnabled) ? collisionData : []);
}
public function draw(_arg1:BitmapData=null):void{
screenPos.x = (parent.layerScrollPos.x + itemLayerOffset.x);
screenPos.y = (parent.layerScrollPos.y + itemLayerOffset.y);
}
public function get width():Number{
error("ScrollItem::get width - need to override");
System.exit(0);
return (0);
}
public function set height(_arg1:Number):void{
error("ScrollItem::set height - need to override");
System.exit(0);
}
public function kill():void{
error("ScrollItem::destroy - need to override");
System.exit(0);
}
public function set visible(_arg1:Boolean):void{
_visible = _arg1;
}
public function get height():Number{
error("ScrollItem::get height - need to override");
System.exit(0);
return (0);
}
public function get visible():Boolean{
return (_visible);
}
public function disableCollisionData():void{
bCollisionDataEnabled = false;
}
public function enableCollisionData():void{
bCollisionDataEnabled = true;
}
}
}//package com.e4.vampirekitten.scrollengine
Section 5
//ScrollLayer (com.e4.vampirekitten.scrollengine.ScrollLayer)
package com.e4.vampirekitten.scrollengine {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import com.plasticmartians.framework.utils.*;
import de.polygonal.math.*;
public class ScrollLayer extends Sprite {
protected var bUsePRNG:Boolean;
private var align:int;
private var nGap:Number;
public var displayHeight:Number;
public var bDrawCollision:Boolean;
public var fillEmptySpace:Boolean;
private var vel:Point;
private var blurAmount:Number;
protected var pRNG:PM_PRNG;
public var initPos:Point;
public var displayWidth:Number;
private var bUseCache:Boolean;
protected var lastItem:Array;
private var scale:Number;
private var pLastItemOffset:Point;
protected var itemPool:Array;
private var zeroPoint:Point;
public var overspill:Number;
protected var tileCollisionData:Array;
protected var scrollItems:Array;
public var layerScrollPos:Point;
private var debugPanel:Sprite;
public var isBitmap:Boolean;
public static const POOL_ITEMS:int = 15;
private static var LAYER:int = 0;
public function ScrollLayer(_arg1:Point, _arg2:Point, _arg3:Boolean, _arg4:Number, _arg5:Number, _arg6:Array, _arg7:String=null, _arg8:Number=0, _arg9:Number=1, _arg10:Boolean=false, _arg11:int=1, _arg12:Boolean=true, _arg13:Boolean=false, _arg14:Array=null, _arg15:Boolean=true){
var _local19:*;
var _local20:Number;
var _local21:DisplayObjectContainer;
var _local22:Array;
var _local23:int;
var _local24:Loader;
var _local25:DisplayObject;
var _local26:BlurFilter;
var _local27:Number;
var _local28:Sprite;
var _local29:BitmapData;
var _local30:Matrix;
var _local31:Number;
var _local32:*;
var _local33:int;
super();
bUsePRNG = true;
pRNG = new PM_PRNG();
pRNG.seed = 23189;
overspill = 100;
name = _arg7;
if (name == null){
name = ("scrolllayer_" + LAYER++);
};
debug((">> CREATING SCROLL LAYER: " + name));
nGap = 0;
drawCollision = _arg13;
bUseCache = _arg3;
initPos = _arg2.clone();
displayWidth = _arg4;
displayHeight = _arg5;
align = _arg11;
fillEmptySpace = _arg12;
blurAmount = _arg8;
if (blurAmount > 0){
};
isBitmap = _arg10;
scale = _arg9;
vel = _arg1.clone();
zeroPoint = new Point();
scrollItems = new Array();
layerScrollPos = initPos.clone();
tileCollisionData = new Array();
var _local16:Array = new Array();
var _local17:Array = new Array();
pLastItemOffset = new Point();
var _local18:Number = 0;
while (_local18 < _arg6.length) {
if ((_arg6[_local18] is Class)){
_local21 = new (_arg6[_local18]);
} else {
if ((_arg6[_local18] is ByteArray)){
_local24 = new Loader();
_local24.loadBytes(_arg6[_local18]);
_local21 = _local24;
} else {
_local21 = _arg6[_local18];
};
};
_local17.push(_local21);
_local22 = new Array();
_local23 = _local21.numChildren;
_local20 = 0;
while (_local20 < _local23) {
_local25 = _local21.getChildAt(_local20);
if (_local25.name == "regmark"){
_local22.push(new Point((_local25.x * scale), (_local25.y * scale)));
_local16.push(_local25);
};
_local20++;
};
tileCollisionData.push(_local22);
_local18++;
};
for (_local19 in _local16) {
_local16[_local19].parent.removeChild(_local16[_local19]);
};
itemPool = new Array();
itemPool[0] = new Array();
_local20 = 0;
if (_arg10){
_local26 = new BlurFilter(blurAmount, blurAmount, 1);
_local27 = 0;
while (_local27 < _local17.length) {
_local28 = _local17[_local27];
_local29 = new BitmapData((_local28.width * scale), (_local28.height * scale), true, 0xFF0000);
_local28.scaleX = (_local28.scaleY = scale);
_local30 = new Matrix();
_local30.tx = 0;
_local30.ty = ((align == ScrollItem.ALIGN_BOTTOM)) ? (_local28.height / scale) : 0;
_local30.scale(scale, scale);
_local29.draw(_local28, _local30, new ColorTransform(), null, null, true);
if (blurAmount > 0){
_local29.applyFilter(_local29, _local29.rect, zeroPoint, _local26);
};
if (_arg14 != null){
for (_local32 in _arg14) {
_local29.applyFilter(_local29, _local29.rect, zeroPoint, _arg14[_local32]);
};
};
_local17[_local27] = _local29;
itemPool[_local27] = new Array();
_local31 = 0;
_local20 = 0;
while (_local20 < POOL_ITEMS) {
itemPool[_local27][_local20] = new BitmapScrollItem(_local29, tileCollisionData[_local27], this, align);
if (_local31 > (displayWidth + itemPool[_local27][_local20].width)){
break;
};
_local31 = (_local31 + itemPool[_local27][_local20].width);
_local20++;
};
_local27++;
};
} else {
_local17 = _arg6;
_local27 = 0;
while (_local27 < _local17.length) {
itemPool[_local27] = new Array();
_local31 = 0;
_local20 = 0;
while (_local20 < POOL_ITEMS) {
itemPool[_local27][_local20] = new VectorScrollItem(_local17[_local27], tileCollisionData[_local27], this, align, scale, initPos);
itemPool[_local27][_local20].clip.cacheAsBitmap = bUseCache;
if (_local31 > (displayWidth + itemPool[_local27][_local20].width)){
break;
};
_local31 = (_local31 + itemPool[_local27][_local20].width);
_local20++;
};
_local27++;
};
};
debug((((((("layer #" + name) + " has ") + itemPool.length) + " items in the pool and ") + itemPool[0].length) + " copies of each item"));
this.cacheAsBitmap = bUseCache;
this.mouseEnabled = false;
if (((fillEmptySpace) && (_arg15))){
_local33 = pRNG.nextIntRange(0, (_local17.length - 1));
addItem(itemPool[_local33]);
fillSpace();
};
}
public function setScrollPosX(_arg1:Number):void{
_arg1 = -(_arg1);
layerScrollPos.x = (_arg1 * vel.x);
}
protected function getItemFromPool(_arg1:Array):ScrollItem{
var _local2:*;
for (_local2 in _arg1) {
if (!ScrollItem(_arg1[_local2]).inuse){
return (_arg1[_local2]);
};
};
return (null);
}
public function setGap(_arg1:Number):void{
nGap = _arg1;
}
public function set drawCollision(_arg1:Boolean):void{
bDrawCollision = _arg1;
if (bDrawCollision){
debugPanel = new Sprite();
addChild(debugPanel);
};
}
public function setPRNG(_arg1:Boolean):void{
bUsePRNG = _arg1;
}
public function destroyItem(_arg1:ScrollItem):void{
var _local2:Number = scrollItems.indexOf(_arg1);
if (_local2 != -1){
_arg1.destroy();
scrollItems.splice(_local2, 1);
} else {
error(((("Scroll item not found on layer #" + name) + ": ") + _arg1.name));
};
}
protected function getNextItem():Array{
var _local1:Number = 0;
if (bUsePRNG){
_local1 = pRNG.nextIntRange(0, (itemPool.length - 1));
} else {
_local1 = Math.floor((Math.random() * itemPool.length));
};
lastItem = itemPool[_local1];
return (lastItem);
}
protected function fillSpace():void{
if (scrollItems.length == 0){
if (((layerScrollPos.x + pLastItemOffset.x) + nGap) <= (displayWidth + 20)){
addItem(getNextItem());
};
} else {
while (((scrollItems[(scrollItems.length - 1)].screenPos.x + scrollItems[(scrollItems.length - 1)].width) + nGap) <= (displayWidth + overspill)) {
if (!addItem(getNextItem())){
break;
};
};
while ((scrollItems[0].screenPos.x - nGap) > 0) {
if (!addItem(getNextItem(), true, true)){
break;
};
};
};
}
public function getScrollItems():Array{
return (scrollItems);
}
public function getCollisionData():Array{
var _local3:ScrollItem;
var _local4:Array;
var _local5:Number;
var _local1:Array = new Array();
var _local2:Number = (scrollItems.length - 1);
while (_local2 >= 0) {
_local3 = scrollItems[_local2];
_local4 = _local3.getCollisionData();
_local5 = 0;
while (_local5 < _local4.length) {
_local1.push({obj:_local3, p:new Point((_local4[_local5].x + _local3.screenPos.x), (_local4[_local5].y + _local3.screenPos.y))});
_local5++;
};
_local2--;
};
return (_local1);
}
public function get drawCollision():Boolean{
return (bDrawCollision);
}
public function update(_arg1:Point=null, _arg2:BitmapData=null):void{
var _local3:Point;
var _local4:ScrollItem;
var _local6:Array;
var _local7:Number;
var _local8:Point;
var _local9:Point;
if (_arg1 != null){
_local3 = new Point((Number(_arg1.x) * Number(vel.x)), (Number(_arg1.y) * Number(vel.y)));
} else {
_local3 = new Point();
};
layerScrollPos.x = (layerScrollPos.x + _local3.x);
layerScrollPos.y = (layerScrollPos.y + _local3.y);
layerScrollPos.x = Utils.roundToDecimalPlace(layerScrollPos.x, 2);
layerScrollPos.y = Utils.roundToDecimalPlace(layerScrollPos.y, 2);
if (drawCollision){
debugPanel.graphics.clear();
};
var _local5:Number = (scrollItems.length - 1);
while (_local5 >= 0) {
_local4 = scrollItems[_local5];
if (_local4.inuse){
if (((((((_local4.screenPos.x + _local4.width) < 0)) && (_local4.destroyIfOffscreen))) && ((_arg1.x < 0)))){
dispatchEvent(new ScrollLayerEvent(ScrollLayerEvent.REMOVEDITEM, _local4));
_local4.destroy();
scrollItems.splice(_local5, 1);
} else {
if ((((((_local4.screenPos.x > displayWidth)) && (_local4.destroyIfOffscreen))) && ((_arg1.x > 0)))){
dispatchEvent(new ScrollLayerEvent(ScrollLayerEvent.REMOVEDITEM, _local4));
_local4.destroy();
scrollItems.splice(_local5, 1);
} else {
_local4.draw(_arg2);
if (drawCollision){
_local6 = _local4.getCollisionData();
debugPanel.graphics.moveTo(0, 0);
debugPanel.graphics.lineStyle(2, 0xFFFFFF);
_local7 = 0;
while (_local7 < (_local6.length - 1)) {
_local8 = _local6[_local7];
_local9 = _local6[(_local7 + 1)];
debugPanel.graphics.moveTo((_local4.screenPos.x + _local8.x), (_local4.screenPos.y + _local8.y));
debugPanel.graphics.lineTo((_local4.screenPos.x + _local9.x), (_local4.screenPos.y + _local9.y));
_local7++;
};
};
};
};
};
_local5--;
};
if (fillEmptySpace){
fillSpace();
};
}
public function addItem(_arg1, _arg2:Boolean=true, _arg3:Boolean=false):Boolean{
var _local4:ScrollItem;
var _local5:ScrollItem;
var _local6:ScrollItem;
if (_arg1 == null){
info((("layer #" + name) + " null item"));
return (false);
};
if ((_arg1 is ScrollItem)){
_local4 = _arg1;
} else {
_local4 = getItemFromPool(_arg1);
};
if (_local4 == null){
return (false);
};
_local4.inuse = true;
_local4.enableCollisionData();
if (_arg2){
if (scrollItems.length > 0){
if (_arg3){
_local5 = ScrollItem(scrollItems[0]);
_local4.itemLayerOffset = _local5.itemLayerOffset.clone();
_local4.itemLayerOffset.x = (_local4.itemLayerOffset.x - (_local4.width - nGap));
} else {
_local6 = ScrollItem(scrollItems[(scrollItems.length - 1)]);
if (_local6 != null){
_local4.itemLayerOffset = _local6.itemLayerOffset.clone();
_local4.itemLayerOffset.x = (_local4.itemLayerOffset.x + (_local6.width + nGap));
} else {
_local4.itemLayerOffset = pLastItemOffset.clone();
_local4.itemLayerOffset.x = (_local4.itemLayerOffset.x + (pLastItemOffset.x + nGap));
};
};
} else {
_local4.itemLayerOffset = layerScrollPos.clone();
_local4.itemLayerOffset.x = (pLastItemOffset.x + nGap);
};
};
if ((_local4 is VectorScrollItem)){
addChild(VectorScrollItem(_local4).clip);
};
_local4.draw();
pLastItemOffset = _local4.itemLayerOffset.clone();
if (_arg3){
scrollItems.unshift(_local4);
} else {
scrollItems.push(_local4);
};
dispatchEvent(new ScrollLayerEvent(ScrollLayerEvent.ADDEDITEM, _local4));
return (true);
}
public function reset():void{
}
public function seed(_arg1:Number):void{
pRNG.seed = _arg1;
}
public function setScrollPosY(_arg1:Number):void{
_arg1 = -(_arg1);
layerScrollPos.y = (_arg1 * vel.y);
}
public function destroy():void{
var _local1:ScrollItem;
var _local2:Array;
debug(("Destroying layer #" + name));
for each (_local1 in scrollItems) {
_local1.destroy();
};
for each (_local2 in itemPool) {
for each (_local1 in _local2) {
_local1.kill();
};
};
}
}
}//package com.e4.vampirekitten.scrollengine
Section 6
//ScrollLayerEvent (com.e4.vampirekitten.scrollengine.ScrollLayerEvent)
package com.e4.vampirekitten.scrollengine {
import flash.events.*;
public class ScrollLayerEvent extends Event {
public var item:ScrollItem;
public static const ADDEDITEM:String = "addedItem";
public static const REMOVEDITEM:String = "removedItem";
public function ScrollLayerEvent(_arg1:String, _arg2:ScrollItem, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
item = _arg2;
}
}
}//package com.e4.vampirekitten.scrollengine
Section 7
//ScrollManager (com.e4.vampirekitten.scrollengine.ScrollManager)
package com.e4.vampirekitten.scrollengine {
import flash.display.*;
import flash.geom.*;
import de.polygonal.ds.*;
public class ScrollManager extends Sprite {
private const zeroPoint:Point;
private var _running:Boolean;
private var bmp:Bitmap;
private var displayHeight:Number;
private var bg:Class;
private var bmpData:BitmapData;
private var bmpClearData:BitmapData;
private var _layers:DLinkedList;
private var hasBitmaps:Boolean;
private var displayWidth:Number;
private var pScrollPos:Point;
public function ScrollManager(_arg1:Number, _arg2:Number, _arg3:Class=null):void{
zeroPoint = new Point();
super();
bg = _arg3;
_running = true;
_layers = new DLinkedList();
pScrollPos = new Point();
displayWidth = _arg1;
displayHeight = _arg2;
hasBitmaps = false;
if (bg != null){
addChild(new bg());
};
}
public function reset():void{
var _local2:ScrollLayer;
var _local1:DListIterator = _layers.getListIterator();
while ((_local2 = ScrollLayer(_local1.next())) != null) {
_local2.reset();
};
}
public function getScrollPos():Point{
return (pScrollPos);
}
public function getLayer(_arg1):ScrollLayer{
var _local2:ScrollLayer;
var _local3:DListIterator;
if ((((_arg1 is Number)) || ((_arg1 is int)))){
_local2 = getLayers()[Math.floor(_arg1)];
} else {
_local3 = _layers.getListIterator();
while ((_local2 = ScrollLayer(_local3.next())) != null) {
if (_local2.name == _arg1){
break;
};
};
};
return (_local2);
}
public function getHeight():Number{
return ((displayHeight * scaleX));
}
public function setScrollX(_arg1:Number):void{
var _local2:Number = (_arg1 - pScrollPos.x);
update(new Point(-(_local2), 0));
}
public function addLayer(_arg1:ScrollLayer):void{
_layers.append(_arg1);
if (((_arg1.isBitmap) && (!(hasBitmaps)))){
hasBitmaps = true;
bmpData = new BitmapData(displayWidth, displayHeight, true, 0xFF0000);
if (bg != null){
bmpClearData = new BitmapData(displayWidth, displayHeight, false, 0xFF0000);
bmpClearData.draw(new bg());
} else {
bmpClearData = new BitmapData(displayWidth, displayHeight, true, 0xFF0000);
bmpClearData.fillRect(bmpClearData.rect, 0);
};
bmp = new Bitmap(bmpData, PixelSnapping.NEVER, false);
addChild(bmp);
} else {
addChild(_arg1);
};
}
public function update(_arg1:Point):void{
var _local3:*;
pScrollPos.add(_arg1);
if (!_running){
return;
};
if (hasBitmaps){
bmpData.lock();
bmpData.fillRect(bmpData.rect, 0);
};
var _local2:Array = _layers.toArray();
for (_local3 in _local2) {
ScrollLayer(_local2[_local3]).update(_arg1, bmpData);
};
if (hasBitmaps){
bmpData.unlock();
};
}
public function getLayers():Array{
var _local3:ScrollLayer;
var _local1:Array = new Array();
var _local2:Iterator = _layers.getIterator();
while ((_local3 = ScrollLayer(_local2.next())) != null) {
_local1.push(_local3);
};
return (_local1);
}
public function destroy():void{
var thisLayer:ScrollLayer;
var li:DListIterator = _layers.getListIterator();
while ((thisLayer = ScrollLayer(li.next())) != null) {
try {
thisLayer.destroy();
} catch(e:Error) {
error(("problem destroying layer: " + e));
};
try {
if (thisLayer != null){
if (thisLayer.parent != null){
thisLayer.parent.removeChild(thisLayer);
};
};
} catch(e:Error) {
error(("problem removing layer: " + e));
};
};
if (hasBitmaps){
bmpData.dispose();
bmpClearData.dispose();
bmp.parent.removeChild(bmp);
};
_layers.clear();
}
}
}//package com.e4.vampirekitten.scrollengine
Section 8
//VectorScrollItem (com.e4.vampirekitten.scrollengine.VectorScrollItem)
package com.e4.vampirekitten.scrollengine {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class VectorScrollItem extends ScrollItem {
public var clip:DisplayObjectContainer;
public function VectorScrollItem(_arg1, _arg2:Array, _arg3:ScrollLayer, _arg4:int, _arg5:Number, _arg6:Point){
var _local7:Loader;
super(_arg2, _arg3, _arg4, _arg6);
if ((_arg1 is ByteArray)){
_local7 = new Loader();
_local7.loadBytes(_arg1);
clip = _local7;
} else {
clip = new (_arg1);
};
if ((clip is MovieClip)){
MovieClip(clip).gotoAndStop(1);
};
clipType = _arg1;
removeRegMarks();
clip.scaleY = (clip.scaleX = _arg5);
clip.visible = false;
clip.cacheAsBitmap = false;
clip.mouseEnabled = false;
clip.mouseChildren = false;
itemLayerOffset.x = (parent.layerScrollPos.x + _arg6.x);
itemLayerOffset.y = (parent.layerScrollPos.y + _arg6.y);
}
override public function set visible(_arg1:Boolean):void{
super.visible = _arg1;
if (clip != null){
clip.visible = _arg1;
};
}
override public function get width():Number{
return (clip.width);
}
override public function get height():Number{
return (clip.height);
}
override public function draw(_arg1:BitmapData=null):void{
super.draw();
clip.x = screenPos.x;
clip.y = screenPos.y;
}
override public function set width(_arg1:Number):void{
clip.width = _arg1;
}
override public function set height(_arg1:Number):void{
clip.height = _arg1;
}
private function removeRegMarks():void{
var _local4:*;
var _local5:DisplayObject;
var _local1:Array = new Array();
var _local2:int = clip.numChildren;
var _local3:int;
while (_local3 < _local2) {
_local5 = clip.getChildAt(_local3);
if (_local5.name == "regmark"){
_local1.push(_local5);
};
_local3++;
};
for (_local4 in _local1) {
_local1[_local4].parent.removeChild(_local1[_local4]);
};
}
override public function destroy():void{
clip.parent.removeChild(clip);
inuse = false;
}
override public function kill():void{
if (clip.parent != null){
clip.parent.removeChild(clip);
};
clip = null;
}
}
}//package com.e4.vampirekitten.scrollengine
Section 9
//AppLoader (com.e4.vampirekitten.AppLoader)
package com.e4.vampirekitten {
import flash.events.*;
import flash.display.*;
import com.plasticmartians.framework.sound.*;
import com.greensock.*;
import mochi.as3.*;
import flash.filters.*;
import flash.utils.*;
import com.greensock.easing.*;
import com.plasticmartians.framework.utils.*;
public class AppLoader extends MovieClip {
public const BAR_WIDTH:Number = 200;
private var _logo:SaucerIdent;
private var mochiMovie:Sprite;
private var ahhSnd:SoundClip;
var _mochiads_game_id:String;// = "5fa29b78b85c51c8"
private var bCanLoad:Boolean;
private var bgColor:BGColour;
private var bIdentPlaying:Boolean;
private var _kitten:Kitten;
private var mcAlwaysOnTop:Sprite;
private var _advert:MovieClip;
private var t:Timer;
private var _e4logo:E4Ident;
public static const SHOW_AD:Boolean = false;
public function AppLoader(){
stop();
bCanLoad = false;
bIdentPlaying = true;
this.addEventListener(Event.ENTER_FRAME, onAddedToStage);
}
public function onE4EnterFrame(_arg1:Event=null):void{
if (_e4logo.currentFrame >= _e4logo.totalFrames){
removeEventListener(Event.ENTER_FRAME, onE4EnterFrame);
_e4logo.stop();
Utils.fadeOut(_e4logo, 0.5, true);
showLogo();
};
}
private function showLogo(_arg1:Event=null):void{
_logo["mcLogo"].gotoAndPlay(1);
_logo.x = (stage.stageWidth / 2);
TweenMax.to(_logo, 0.5, {ease:Back.easeOut, y:(stage.stageHeight / 2)});
addEventListener(Event.ENTER_FRAME, onEnterFrame);
ahhSnd = SoundManager.getInstance().addSound(new IntroSnd(), "aaah");
if (!DebugState.DEBUG){
SoundManager.getInstance().playSound(ahhSnd);
};
}
public function onConnect():void{
error("connected");
}
private function showE4Logo(_arg1:Event=null):void{
Utils.fadeOut(_kitten);
_e4logo = new E4Ident();
addChild(_e4logo);
_e4logo.gotoAndPlay(1);
_e4logo.x = (stage.stageWidth / 2);
_e4logo.y = (stage.stageHeight / 2);
addEventListener(Event.ENTER_FRAME, onE4EnterFrame);
}
private function init(_arg1:Event=null):void{
var e = _arg1;
mcAlwaysOnTop.parent.removeChild(mcAlwaysOnTop);
nextFrame();
stage.removeEventListener(MouseEvent.MOUSE_DOWN, init);
var mainClass:Class = Class(getDefinitionByName(getQualifiedClassName(VampireKitten)));
if (!DebugState.DEBUG){
SoundManager.getInstance().fadeSound(ahhSnd);
};
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
try {
TweenMax.killTweensOf(_logo);
_kitten.parent.removeChild(_kitten);
_logo.parent.removeChild(_logo);
bgColor.parent.removeChild(bgColor);
} catch(e:Error) {
};
var app:Object = new (mainClass);
addChild((app as DisplayObject));
}
public function onEnterFrame(_arg1:Event=null):void{
if ((((_logo["mcLogo"].currentFrame >= (_logo["mcLogo"].totalFrames - 1))) && (bIdentPlaying))){
bIdentPlaying = false;
_logo["mcLogo"].stop();
};
var _local2:Number = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
if ((((framesLoaded == totalFrames)) && (!(bCanLoad)))){
bCanLoad = true;
stage.addEventListener(MouseEvent.MOUSE_DOWN, init);
};
if (((bCanLoad) && (!(bIdentPlaying)))){
init();
};
}
private function adStarted():void{
TweenMax.to(_kitten, 0.5, {ease:Cubic.easeOut, y:30, scaleX:0.6, scaleY:0.6});
}
public function onAddedToStage(_arg1:Event):void{
OverwriteManager.init(OverwriteManager.NONE);
mcAlwaysOnTop = new Sprite();
addChild(mcAlwaysOnTop);
this.removeEventListener(Event.ENTER_FRAME, onAddedToStage);
stage.scaleMode = StageScaleMode.NO_SCALE;
bgColor = new BGColour();
addChild(bgColor);
_logo = new SaucerIdent();
addChild(_logo);
_kitten = new Kitten();
addChild(_kitten);
_kitten.gotoAndStop("bat");
_kitten.x = (stage.stageWidth / 2);
_kitten.y = (stage.stageHeight / 2);
_kitten.filters = [new GlowFilter(0xFFFFFF, 0.7, 8, 8, 2, 3)];
_advert = new MovieClip();
_advert.x = ((stage.stageWidth / 2) - (350 / 2));
_advert.y = 50;
addChild(_advert);
mochiMovie = new Sprite();
mochiMovie.visible = false;
addChild(mochiMovie);
Utils.fadeIn(_logo, 0.2);
_logo["mcLogo"].gotoAndStop(1);
_logo.x = (stage.stageWidth / 2);
_logo.y = (stage.stageHeight + 200);
if (DebugState.DEBUG){
init();
} else {
MochiServices.connect(_mochiads_game_id, mochiMovie, onConnect);
MochiBot.track(this, "476c94f2");
MochiBot.track(this, "13941028");
MochiAd.showPreGameAd({ad_started:adStarted, ad_finished:showE4Logo, clip:_advert, id:_mochiads_game_id, res:"350x350", background:0, color:0xFFFFFF, outline:0xBBBBBB, no_bg:true});
};
}
}
}//package com.e4.vampirekitten
Section 10
//GraveStoneScrollLayer (com.e4.vampirekitten.GraveStoneScrollLayer)
package com.e4.vampirekitten {
import com.e4.vampirekitten.scrollengine.*;
import flash.geom.*;
public class GraveStoneScrollLayer extends ScrollLayer {
public function GraveStoneScrollLayer(_arg1:Point, _arg2:Point, _arg3:Boolean, _arg4:Number, _arg5:Number, _arg6:Array, _arg7:String=null, _arg8:Number=0, _arg9:Number=1, _arg10:Boolean=false, _arg11:int=1, _arg12:Boolean=true, _arg13:Boolean=false, _arg14:Array=null, _arg15:Boolean=true){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14, _arg15);
}
override public function addItem(_arg1, _arg2:Boolean=true, _arg3:Boolean=false):Boolean{
var _local5:VectorScrollItem;
var _local4:Boolean = super.addItem(_arg1, _arg2, _arg3);
if (_local4){
_local5 = scrollItems[(scrollItems.length - 1)];
GraveStone(_local5.clip).textDistance.text = ("" + (Math.round((_local5.itemLayerOffset.x / 1000)) * 5));
};
return (_local4);
}
}
}//package com.e4.vampirekitten
Section 11
//Menu (com.e4.vampirekitten.Menu)
package com.e4.vampirekitten {
import flash.events.*;
import flash.display.*;
import com.greensock.*;
import flash.filters.*;
import com.greensock.easing.*;
import com.plasticmartians.framework.utils.*;
public class Menu extends Sprite {
private var aMenuItems:Array;
private var bEnlarge:Boolean;
private var menuTitle:MenuTitleText;
public function Menu(_arg1:XMLList, _arg2:Boolean=true, _arg3:Boolean=false){
var _local5:MovieClip;
var _local6:Number;
var _local7:Number;
super();
bEnlarge = _arg2;
aMenuItems = new Array();
if (((!((_arg1.@title == null))) && (!((_arg1.@title == ""))))){
menuTitle = new MenuTitleText();
menuTitle.x = _arg1.@x;
menuTitle.y = _arg1.@y;
menuTitle.textField.text = _arg1.@title;
Utils.fadeIn(menuTitle);
addChild(menuTitle);
menuTitle.filters = [new DropShadowFilter(10, 45, 0, 0.5, 9, 9)];
};
var _local4:Number = 0;
while (_local4 < _arg1.item.length()) {
if (_arg3){
_local5 = new SmallMenuItem();
} else {
_local5 = new MenuItem();
};
_local5.mcText.textField.text = _arg1.item[_local4].@text;
_local5.x = -(_local5.width);
_local5.y = _arg1.item[_local4].@y;
_local5.action = _arg1.item[_local4].@action;
_local6 = _arg1.item[_local4].@scale;
_local5.overallScale = ((_local6)!=0) ? _local6 : 1;
_local5.scaleX = (_local5.scaleY = _local5.overallScale);
_local5.buttonMode = true;
_local5.useHandCursor = true;
_local5.mouseChildren = false;
_local5.mouseEnabled = true;
aMenuItems.push(_local5);
addChild(_local5);
_local7 = _arg1.item[_local4].@x;
_local5.initx = _local7;
TweenMax.to(_local5, 1, {ease:Back.easeOut, x:_local7, delay:(_local4 * 0.1)});
_local4++;
};
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
this.filters = [new DropShadowFilter(10, 45, 0, 0.5, 9, 9)];
}
private function onMouseOver(_arg1:MouseEvent):void{
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
_local2.x = _local2.initx;
TweenMax.killTweensOf(_local2);
if (bEnlarge){
TweenMax.to(_local2, 0.4, {ease:Back.easeOut, scaleX:(_local2.overallScale + 0.2), scaleY:(_local2.overallScale + 0.2)});
};
_local2.addEventListener(MouseEvent.ROLL_OUT, onMouseOut, false, 0, true);
}
private function onCompleteDestroy():void{
var _local2:MovieClip;
debug("destroying menu");
var _local1:Number = 0;
while (_local1 < aMenuItems.length) {
_local2 = aMenuItems[_local1];
_local2.parent.removeChild(_local2);
_local1++;
};
this.parent.removeChild(this);
}
private function onMouseUp(_arg1:MouseEvent):void{
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
var _local3:String = _local2.action;
dispatchEvent(new MenuEvent(MenuEvent.MENU_ACTION, _local3));
_local2.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
_local2.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_local2.removeEventListener(MouseEvent.ROLL_OVER, onMouseOver);
_local2.removeEventListener(MouseEvent.ROLL_OUT, onMouseOut);
}
private function onMouseOut(_arg1:MouseEvent):void{
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
_local2.x = _local2.initx;
TweenMax.killTweensOf(_local2);
if (bEnlarge){
TweenMax.to(_local2, 0.6, {ease:Strong.easeOut, scaleX:_local2.overallScale, scaleY:_local2.overallScale});
};
_local2.removeEventListener(MouseEvent.ROLL_OUT, onMouseOut);
}
public function onAddedToStage(_arg1:Event):void{
var _local2:*;
var _local3:MovieClip;
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
for (_local2 in aMenuItems) {
_local3 = aMenuItems[_local2];
_local3.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true);
_local3.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);
_local3.addEventListener(MouseEvent.ROLL_OVER, onMouseOver, false, 0, true);
};
}
private function onMouseDown(_arg1:MouseEvent):void{
}
public function destroy():void{
var _local2:MovieClip;
var _local1:Number = 0;
while (_local1 < aMenuItems.length) {
_local2 = aMenuItems[_local1];
_local2.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
_local2.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_local2.removeEventListener(MouseEvent.ROLL_OVER, onMouseOver);
_local2.removeEventListener(MouseEvent.ROLL_OUT, onMouseOut);
TweenMax.killTweensOf(_local2);
TweenMax.to(_local2, 0.7, {ease:Back.easeIn, x:-(_local2.width), delay:(_local1 * 0.1)});
_local1++;
};
if (menuTitle != null){
Utils.fadeOut(menuTitle, 0.8, true, onCompleteDestroy);
} else {
onCompleteDestroy();
};
}
}
}//package com.e4.vampirekitten
Section 12
//MenuEvent (com.e4.vampirekitten.MenuEvent)
package com.e4.vampirekitten {
import flash.events.*;
public class MenuEvent extends Event {
public var actionType:String;
public static const MENU_ACTION:String = "menuAction";
public function MenuEvent(_arg1:String, _arg2:String, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
actionType = _arg2;
}
}
}//package com.e4.vampirekitten
Section 13
//Player (com.e4.vampirekitten.Player)
package com.e4.vampirekitten {
import flash.events.*;
import flash.display.*;
import com.plasticmartians.framework.sound.*;
import com.greensock.*;
import com.e4.vampirekitten.scrollengine.*;
import flash.geom.*;
import flash.filters.*;
import com.plasticmartians.framework.*;
import flash.utils.*;
import com.greensock.easing.*;
import com.oaxoa.fx.*;
public class Player extends VectorScrollItem {
var ll:Lightning;
private var gf_boost:GlowFilter;
public var isHit:Boolean;
private var specialTimer:Timer;
private var _isPowerup:Boolean;
private var isBoost:Boolean;
public var vel:Vector2D;
public var isSpecialActivated:Boolean;
private var bounciness:Number;
private var initPos:Point;
private var oldVel:Vector2D;
private var gfx:MovieClip;
public static const COMBO_TIME:int = 5000;
public static var TOP:Number = 220;
public static var BOTTOM:Number = 720;
public function Player(_arg1:ScrollLayer, _arg2:int, _arg3:Number, _arg4:Point){
gf_boost = new GlowFilter(0xFFFFFF, 1, 15, 15, 3);
isBoost = false;
super(Kitten, null, _arg1, _arg2, _arg3, _arg4);
isSpecialActivated = false;
destroyIfOffscreen = false;
initPos = _arg4.clone();
vel = new Vector2D(0, 0);
MovieClip(clip).gotoAndStop("rope");
gfx = MovieClip(clip.getChildByName("mcGfx"));
itemLayerOffset.x = (parent.layerScrollPos.x + initPos.x);
itemLayerOffset.y = (parent.layerScrollPos.y + initPos.y);
bounciness = 0.75;
isHit = false;
}
public function onSpecialTimer(_arg1:TimerEvent):void{
SoundManager.getInstance().fadeSound(SoundManager.getInstance().getSoundClip("bat"));
specialTimer.removeEventListener(TimerEvent.TIMER, onSpecialTimer);
MovieClip(clip).gotoAndStop("normal");
isSpecialActivated = false;
}
public function update():void{
if (isBoost){
ll.endX = clip.x;
ll.endY = clip.y;
ll.update();
};
if (!isSpecialActivated){
if (gfx.currentFrame <= 2){
if (gfx.currentFrame != 2){
gfx.gotoAndStop(2);
};
};
if (!_isPowerup){
itemLayerOffset.x = (itemLayerOffset.x + vel.x);
itemLayerOffset.y = (itemLayerOffset.y + vel.y);
vel.y = (vel.y + 0.2);
if (itemLayerOffset.y > BOTTOM){
itemLayerOffset.y = BOTTOM;
vel.y = -((vel.y * bounciness));
vel.x = (vel.x * 0.85);
dispatchEvent(new PlayerEvent(PlayerEvent.HITGROUND));
if (vel.x > 8){
gfx.gotoAndPlay(3);
};
};
if (!isHit){
clip.rotation = (clip.rotation + vel.x);
};
if (itemLayerOffset.y < -(clip.height)){
clip.visible = false;
} else {
clip.visible = true;
};
};
} else {
itemLayerOffset.x = (itemLayerOffset.x + vel.x);
itemLayerOffset.y = (itemLayerOffset.y + vel.y);
if (itemLayerOffset.y < TOP){
itemLayerOffset.y = TOP;
};
vel.y = (vel.y * 0.99);
};
vel.x = (vel.x * 0.999);
super.draw();
}
public function special():void{
clip.rotation = 0;
isSpecialActivated = true;
MovieClip(clip).gotoAndStop("bat");
specialTimer = new Timer(COMBO_TIME);
specialTimer.addEventListener(TimerEvent.TIMER, onSpecialTimer);
specialTimer.start();
}
public function kick():void{
MovieClip(clip).gotoAndStop("normal");
}
public function get isPowerup():Boolean{
return (_isPowerup);
}
public function boost():void{
clip.filters = [gf_boost];
TweenMax.to(clip, 0.4, {ease:Cubic.easeIn, yoyo:true, repeat:2, onComplete:clearFilters});
isBoost = true;
var _local1:uint = 0xFFFFFF;
ll = new Lightning(_local1, 2);
ll.blendMode = BlendMode.ADD;
ll.childrenDetachedEnd = true;
ll.childrenLifeSpanMin = 0.1;
ll.childrenLifeSpanMax = 2;
ll.childrenMaxCount = 4;
ll.childrenMaxCountDecay = 0.5;
ll.steps = 50;
ll.alphaFadeType = LightningFadeType.TIP_TO_END;
var _local2:GlowFilter = new GlowFilter();
_local2.color = _local1;
_local2.strength = 3.5;
_local2.quality = 3;
_local2.blurX = (_local2.blurY = 10);
ll.filters = [_local2];
clip.parent.addChild(ll);
ll.startX = -200;
ll.startY = -200;
ll.endX = clip.x;
ll.endY = clip.y;
ll.childrenDetachedEnd = false;
ll.alphaFadeType = LightningFadeType.GENERATION;
ll.killAllChildren();
ll.childrenProbability = 0.3;
}
public function clearFilters():void{
isBoost = false;
error("CLEARING FILTERS");
ll.parent.removeChild(ll);
clip.filters = [];
}
public function set isPowerup(_arg1:Boolean):void{
_isPowerup = _arg1;
if (_arg1){
oldVel = vel.clone();
vel.x = 0;
vel.y = 0;
clip.visible = false;
} else {
clip.visible = true;
vel = oldVel.clone();
};
}
public function collide():void{
bounciness = 0.4;
isHit = true;
vel.x = (vel.y = 0);
TweenLite.killTweensOf(clip);
TweenLite.to(clip, 0.2, {ease:Cubic.easeOut, rotation:0});
}
}
}//package com.e4.vampirekitten
Section 14
//PlayerEvent (com.e4.vampirekitten.PlayerEvent)
package com.e4.vampirekitten {
import flash.events.*;
public class PlayerEvent extends Event {
public static const HITGROUND:String = "hitGround";
public function PlayerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package com.e4.vampirekitten
Section 15
//VampireKitten (com.e4.vampirekitten.VampireKitten)
package com.e4.vampirekitten {
import flash.events.*;
import flash.display.*;
import com.plasticmartians.framework.sound.*;
import com.greensock.*;
import com.e4.vampirekitten.scrollengine.*;
import flash.geom.*;
import flash.net.*;
import flash.filters.*;
import com.plasticmartians.framework.application.*;
import com.plasticmartians.framework.*;
import org.flintparticles.twoD.zones.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.counters.*;
import flash.system.*;
import flash.utils.*;
import com.greensock.easing.*;
import com.plasticmartians.framework.utils.*;
import org.flintparticles.twoD.renderers.*;
import org.flintparticles.twoD.emitters.*;
import com.omniture.*;
import com.greensock.plugins.*;
import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.initializers.*;
import org.flintparticles.common.energyEasing.*;
import com.plasticmartians.framework.graphics.*;
import com.flashdynamix.utils.*;
import flash.ui.*;
public class VampireKitten extends BaseApp {
private const INDICATOR_GAP:int = 5;
private const BLUR:BlurFilter;
private const actionSourceGameName:String = "Vampire Kitten";
private const OBJECTS:Array;
private var mcDistanceLabel:DistanceIndicator;
private var bgLayer:ScrollLayer;
private var leg:DisplayObjectContainer;
public var xmlMenu:XML;
private var mcSlider:MovieClip;
private var legMask:DisplayObjectContainer;
private var mcGameoverGravestone:GameOverGravestone;
private var settingsMenu:Menu;
private var mcPressAndHold:PressAndHold;
private var nSpecialAquireTime:Number;
private var mcPowerupText:MovieClip;
private var helpMenu:Menu;
var legItem:VectorScrollItem;
private var mcSpecial:Special;
private var bg:SmallBG;
private var bloodHolder:Sprite;
private var gf_boost:GlowFilter;
private var scrollHeight:Number;
private var bAngleDisplayActive:Boolean;
private var mcReleaseToKick:ReleaseToKick;
private var currentPowerupItem:VectorScrollItem;
private var aSpecials:Array;
private var so:SharedObject;
private var nRecord:Number;
private var mcInstructions:Instructions;
private var mcGameHolder:Sprite;
private var pauseMenu:Menu;
public var HITSOUNDS:Array;
public var nCurrentAngleDownLevel:Number;
private var fgVegLayer:ScrollLayer;
private var legRotV:Number;
private var gotSpecial:Boolean;
private var mcE4Footer:E4Footer;
private var mcDistanceIndicator:DistanceIndicator;
private var mcUI:Sprite;
private var guideRadius:Number;
private var inGameMenu:Menu;
private var mcParallaxDisplay:Sprite;
private var mainMenu:Menu;
private var renderer:BitmapRenderer;
private var bBoostActive:Boolean;
private var kittenRot:Number;
private var mcRecordDistanceIndicator:DistanceIndicator;
private var player:Player;
private var mcBoostIndicator:BoostIndicator;
private var playerLayer:ScrollLayer;
private var scrollWidth:Number;
private var guide:DisplayObject;
private var mcRadar:Radar;
private var fgLayer:ObjectScrollLayer;
private var allowMousePick:Boolean;// = true
private var nPlayerDir:Number;
private var nCurrentBoost:int;
private var mcGameUI:Sprite;
private var mciSound:MovieClip;
var _mochiads_game_id:String;// = "5fa29b78b85c51c8"
private var accelerateAction:Action;
private var legBlurFilter:BlurFilter;
private var emitter:Emitter2D;
private var mcMarker:Marker;
private var aIndicators:Array;
private var bBoostDisplayActive:Boolean;
private var mcClearSettings:MovieClip;
private var ml:MouseListener;
private var mcRecordLabel:DistanceIndicator;
private var mcAngleDownIndicator:AngleDownIndicator;
private var gravestoneLayer:GraveStoneScrollLayer;
private var guidePos:Point;
private var velocityInitializer:Initializer;
private var mcSettings:Settings;
private var comboChain:Number;
private var mcPowerup:MovieClip;
private var smScrollManager:ScrollManager;
private var actionSourceStartGameTime:Number;
private var actionSource:ActionSource;
private var ds_boost:DropShadowFilter;
private var positionInitializer:Initializer;
private var smManager:SoundManager;
public static const MAX_ANGLE_DOWN:int = 50;
public static const STAGE_WIDTH:Number = 600;
private static const PAUSE_KEY:int = 80;
public static const STAGE_HEIGHT:Number = 400;
public static const LSO_NAME:String = "com.e4.vampirekitten.1";
public static const KITTEN_IDEAL_X:Number = 300;
public static const NUM_BOOSTS:int = 4;
public static const BOOST_MULTIPLIER:Number = 8;
private static const SOUND_KEY:int = 83;
public static var APP_STATES:Object = {RETRY:"Retry", PICKPOSITION:"PickPosition", PICKLEGPOSITION:"PickLegPosition", QUITGAME:"QuitGame", PAUSE:"Pause", SUBMITSCORE:"SubmitScore", CLEARSETTINGS:"ClearSettings", AREYOUSURECLEARSETTINGS:"AreYouSureClearSettings", AREYOUSURE:"AreYouSure", CHOOSELEVEL:"ChooseLevel", SCORE:"Score", ABOUT:"About", INIT:"Init", LOAD:"Load", PLAY:"Play", PREPLAY:"PrePlay", HELP:"Help", SETTINGS:"Settings", SUBMENU:"SubMenu", WORLD:"World", PREVLEVEL:"PrevLevel", NEXTLEVEL:"NextLevel", LEVELCOMPLETE:"LevelComplete", GAMEOVERALT:"GameOverAlt", GAMEOVER:"GameOver", MAINMENU:"MainMenu"};
public static var SOUNDS:Array = [{sound:specialactivate, name:"specialactivate"}, {sound:bat, name:"bat"}, {sound:coffin, name:"coffin"}, {sound:conffinslide, name:"coffinslide"}, {sound:cross, name:"cross"}, {sound:death, name:"death"}, {sound:gameover, name:"gameover"}, {sound:death, name:"death"}, {sound:goodpowerup, name:"goodpowerup"}, {sound:badpowerup1, name:"badpowerup1"}, {sound:badpowerup2, name:"badpowerup2"}, {sound:purr, name:"purr"}, {sound:groundhit1, name:"groundhit1"}, {sound:groundhit2, name:"groundhit2"}, {sound:groundhit3, name:"groundhit3"}, {sound:groundhit4, name:"groundhit4"}, {sound:kickcat1, name:"kickcat1"}, {sound:kickcat2, name:"kickcat2"}, {sound:guts, name:"guts"}, {sound:menuclick, name:"menuclick"}, {sound:musicloop, name:"musicloop"}, {sound:priestscream, name:"priestscream"}, {sound:specialcounter, name:"specialcounter"}, {sound:virginscream, name:"virginscream"}, {sound:wind, name:"wind"}, {sound:boostup, name:"boostup"}, {sound:boostdown, name:"boostdown"}, {sound:intro, name:"intro"}];
public static var BOOST_Y_MAX:Number = 480;
public function VampireKitten():void{
HITSOUNDS = ["groundhit1", "groundhit2", "groundhit3", "groundhit4", "kickcat1", "kickcat2"];
OBJECTS = [Guts, Priest, Virgin, Coffin, Garlic, GoldCross, Stake];
BLUR = new BlurFilter(8, 8);
legBlurFilter = new BlurFilter(0, 0, 1);
gf_boost = new GlowFilter(0xFFFFFF, 1, 5, 5, 3);
ds_boost = new DropShadowFilter(3, 45, 0, 1, 8, 8, 1.3, 3);
emitter = new Emitter2D();
xmlMenu = <menus>
<menu id="main" title="Vampire Kitten" x="200" y="50">
<item text="play" action="PrePlay" x="0" y="190"/>
<item text="help" action="Help" x="0" y="260"/>
<item text="settings" action="Settings" x="0" y="330"/>
</menu>
<menu id="pause" title="Pause" x="200" y="50">
<item text="resume" action="Play" x="0" y="280"/>
<item text="quit" action="QuitGame" x="0" y="350"/>
</menu>
<menu id="help" title="" x="200" y="50">
<item text="back" action="MainMenu" x="0" y="364"/>
</menu>
<menu id="ingame" title="">
<item text="retry" action="Retry" x="-60" y="230" scale="0.9"/>
<item text="pause" action="Pause" x="-60" y="260" scale="0.9"/>
<item text="quit" action="QuitGame" x="-60" y="290" scale="0.9"/>
</menu>
<menu id="settings" title="" x="200" y="50">
<item text="back" action="MainMenu" x="0" y="364"/>
</menu>
</menus>
;
super();
}
public function cleanupHelp():void{
helpMenu.removeEventListener(MenuEvent.MENU_ACTION, onClickMenu);
helpMenu.destroy();
mcInstructions.parent.removeChild(mcInstructions);
}
public function setupRetry(){
destroyGame();
smState.setNextState(STATES.PREPLAY);
}
public function setupPickLegPosition():void{
mcReleaseToKick = new ReleaseToKick();
mcGame.addChild(mcReleaseToKick);
Utils.fadeIn(mcReleaseToKick);
mcReleaseToKick.x = (STAGE_WIDTH / 2);
mcReleaseToKick.y = (STAGE_HEIGHT - 70);
var _local1:Point = new Point(player.clip.x, player.clip.y);
_local1 = player.clip.parent.localToGlobal(_local1);
var _local2:Point = new Point(leg.x, leg.y);
_local2 = leg.parent.localToGlobal(_local2);
kittenRot = (((Math.atan2((_local2.y - _local1.y), (_local2.x - _local1.x)) * Utils.RAD2ANG) + 90) + 27);
TweenMax.to(leg, 0.4, {ease:Cubic.easeIn, rotation:90});
TweenMax.to(legMask, 0.4, {ease:Cubic.easeIn, rotation:90});
TweenMax.to(leg, 0.8, {ease:Cubic.easeOut, repeat:999, yoyo:true, rotation:kittenRot, delay:0.4});
TweenMax.to(legMask, 0.8, {ease:Cubic.easeOut, repeat:999, yoyo:true, rotation:kittenRot, delay:0.4});
stage.addEventListener(MouseEvent.MOUSE_UP, onPickLegPosition);
}
public function onRemovedItem(_arg1:ScrollLayerEvent):void{
var _local2:*;
for (_local2 in aIndicators) {
if (aIndicators[_local2].item == _arg1.item){
aIndicators[_local2].indicator.parent.removeChild(aIndicators[_local2].indicator);
aIndicators.splice(_local2, 1);
break;
};
};
updateRadar();
}
private function onMouseOverSettings(_arg1:MouseEvent):void{
mcClearSettings.filters = [];
mcClearSettings.x = (mcClearSettings.x + 2);
mcClearSettings.y = (mcClearSettings.y + 2);
}
public function onPressClearSettings(_arg1:Event=null):void{
clearSettings();
smState.setState(STATES.SETTINGS);
}
private function configActionSource():void{
actionSource = new ActionSource();
actionSource.account = "channel4e4comtest";
actionSource.pageName = "";
actionSource.pageURL = "";
actionSource.charSet = "UTF-8";
actionSource.currencyCode = "GBP";
actionSource.trackClickMap = true;
actionSource.movieID = "";
actionSource.debugTracking = true;
actionSource.trackLocal = true;
actionSource.visitorNamespace = "channel4";
actionSource.trackingServer = "st.e4.com";
addChild(actionSource);
}
public function setupMainMenu():void{
smManager.playSound(smManager.getSoundClip("intro"), 0, 0, 0.6);
if (bg == null){
bg = new SmallBG();
mcUI.addChild(bg);
};
Utils.fadeIn(bg);
mainMenu = new Menu(xmlMenu.menu.(@id == "main"));
mainMenu.addEventListener(MenuEvent.MENU_ACTION, onClickMenu);
mcUI.addChild(mainMenu);
mcE4Footer = new E4Footer();
mcAlwaysOnTop.addChild(mcE4Footer);
mcE4Footer.y = (STAGE_HEIGHT + 100);
mcE4Footer.addEventListener(MouseEvent.CLICK, onClickE4);
mcE4Footer.buttonMode = true;
mcE4Footer.useHandCursor = true;
TweenMax.to(mcE4Footer, 1, {ease:Back.easeOut, y:STAGE_HEIGHT});
}
private function actionSourcePlayGame():void{
actionSourceStartGameTime = getTimer();
actionSource.linkTrackVars = "eVar4,eVar32,products,events";
actionSource.linkTrackEvents = "event20,event23";
actionSource.eVar4 = "<domain>";
actionSource.eVar32 = (actionSourceGameName + ": Game Play");
actionSource.products = ("Games;" + actionSourceGameName);
actionSource.events = "event20,event23";
actionSource.trackLink(actionSource.pageURL, "o", (actionSourceGameName + " Game Interaction"));
}
private function onDragSlider(_arg1:MouseEvent):void{
allowMousePick = false;
Sprite(mcSlider.dragger).startDrag(true, new Rectangle(0, 0, mcSlider.line.width, 0));
stage.addEventListener(MouseEvent.MOUSE_UP, onStopDragSlider, false, 0, true);
}
public function setupQuitGame():void{
destroyGame();
smState.setNextState(STATES.MAINMENU);
}
private function onStopDragSlider(_arg1:MouseEvent):void{
allowMousePick = true;
Sprite(mcSlider.dragger).stopDrag();
smManager.setMasterVolume((mcSlider.dragger.x / mcSlider.line.width));
stage.removeEventListener(MouseEvent.MOUSE_UP, onStopDragSlider);
}
private function onPickLegPosition(_arg1:MouseEvent):void{
var _local2:Number = -((kittenRot - leg.rotation));
var _local3:Number = Math.abs((_local2 / 5));
info(("POWER: " + _local3));
player.vel.x = (_local3 * 3);
player.vel.y = (-(((scrollHeight - player.itemLayerOffset.y) / 10)) * (_local3 / 30));
TweenMax.killTweensOf(leg);
TweenMax.killTweensOf(legMask);
TweenMax.to(leg, 0.2, {rotation:(kittenRot - 5), onComplete:kickKitten});
TweenMax.to(legMask, 0.2, {rotation:(kittenRot - 5)});
}
private function onClickPM(_arg1:MouseEvent):void{
var e = _arg1;
var url = "http://www.plasticmartians.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function cleanupGameOver():void{
destroyGame();
}
private function saveSettings():void{
debug("SAVING SharedObject data");
try {
so.data.record = new Number(nRecord);
so.data.sound = new Boolean(smManager.getSound());
so.data.volume = new Number(smManager.getMasterVolume());
so.flush();
} catch(e:Error) {
error(e);
};
}
public function onKeyDown(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == Keyboard.ESCAPE)) || ((_arg1.keyCode == PAUSE_KEY)))){
smState.setState(STATES.PAUSE);
};
if (_arg1.keyCode == SOUND_KEY){
smManager.toggleSound();
};
}
private function updateSpecials():void{
var _local3:Class;
var _local4:Boolean;
var _local5:*;
var _local6:Class;
var _local7:Sprite;
if (Math.random() > 0.995){
if (aSpecials.length < 4){
_local3 = OBJECTS[Math.floor((Math.random() * OBJECTS.length))];
_local4 = true;
for each (_local5 in aSpecials) {
if (_local5.classType == _local3){
_local4 = false;
};
};
if (_local4){
_local6 = getIcon(_local3);
_local7 = new (_local6);
mcSpecial.addChild(_local7);
if (aSpecials.length > 0){
_local7.x = ((aSpecials[(aSpecials.length - 1)].indicator.x + aSpecials[(aSpecials.length - 1)].indicator.width) + INDICATOR_GAP);
};
aSpecials.push({indicator:_local7, classType:_local3});
};
};
};
if (Math.random() > 0.995){
if (aSpecials.length > 0){
Utils.fadeOut(aSpecials[0].indicator);
aSpecials.splice(0, 1);
};
};
var _local1:Number = 0;
var _local2:Number = 0;
while (_local2 < aSpecials.length) {
_local7 = aSpecials[_local2].indicator;
if (((!((_local7.x == _local1))) && (!(TweenMax.isTweening(_local7))))){
TweenMax.to(_local7, 0.2, {ease:Cubic.easeInOut, x:_local1});
};
_local1 = (_local1 + (_local7.width + INDICATOR_GAP));
_local2++;
};
}
private function testCollision(_arg1:Point, _arg2:Point, _arg3:Array):Object{
var _local4:Point;
var _local5:Point;
var _local6:Point;
if (_arg3 == null){
return (null);
};
var _local7:Number = 0;
while (_local7 < (_arg3.length - 1)) {
_local4 = _arg3[_local7].p;
_local5 = _arg3[(_local7 + 1)].p;
_local6 = GraphicUtils.lineIntersectLine(_arg1, _arg2, _local4, _local5);
if (_local6 != null){
return ({p:_local6, obj:_arg3[_local7].obj});
};
_local7++;
};
return (null);
}
private function setSliderX(_arg1:Number):void{
info(("setting slider: " + _arg1));
mcSlider.dragger.x = (_arg1 * mcSlider.line.width);
info(mcSlider.dragger.x);
}
public function cleanupSettings():void{
saveSettings();
settingsMenu.removeEventListener(MenuEvent.MENU_ACTION, onClickMenu);
settingsMenu.destroy();
mcSettings.parent.removeChild(mcSettings);
}
private function onClick(_arg1:MouseEvent=null):void{
var _local2:Sprite;
debug("CLICKED STAGE");
if (((bBoostActive) && (!(gotSpecial)))){
if ((((((player.screenPos.y > 0)) && ((player.itemLayerOffset.y < BOOST_Y_MAX)))) && ((player.vel.y > 0)))){
if (nCurrentBoost < NUM_BOOSTS){
debug("BOOST");
_local2 = mcBoostIndicator.mcGfx[("mcBoost" + nCurrentBoost)];
_local2.filters = [gf_boost, gf_boost];
TweenMax.to(_local2, 0.4, {ease:Back.easeIn, scaleX:0, scaleY:0, onComplete:Utils.destroyDisplayObject, onCompleteParams:[_local2]});
nCurrentBoost++;
player.vel.y = (-(BOOST_MULTIPLIER) * 1.7);
player.vel.x = (player.vel.x + BOOST_MULTIPLIER);
bBoostActive = false;
smManager.playSound(smManager.getSoundClip("boostup"));
player.boost();
};
} else {
if ((((((player.screenPos.y > 0)) && ((player.itemLayerOffset.y < BOOST_Y_MAX)))) && ((player.vel.y < 0)))){
if (Math.floor(nCurrentAngleDownLevel) == _slot1.MAX_ANGLE_DOWN){
nCurrentAngleDownLevel = 1;
TweenMax.to(this, 6, {ease:Linear.easeInOut, nCurrentAngleDownLevel:_slot1.MAX_ANGLE_DOWN});
player.vel.y = (BOOST_MULTIPLIER / 2);
bBoostActive = false;
smManager.playSound(smManager.getSoundClip("boostdown"));
player.boost();
};
};
};
};
}
private function startParticleExplosion(_arg1:DisplayObjectContainer, _arg2:Number, _arg3:Number, _arg4:Number=50, _arg5:Boolean=false):void{
emitter.removeInitializer(velocityInitializer);
emitter.removeAction(accelerateAction);
emitter.removeInitializer(positionInitializer);
positionInitializer = new Position(new LineZone(new Point(-((_arg1.width / 2)), 0), new Point((_arg1.width / 2), 0)));
var _local6:Number = ((player.vel.y > 0)) ? player.vel.y : 0;
if (_arg5){
accelerateAction = new Accelerate((-(player.vel.x) * 8), 10);
velocityInitializer = new Velocity(new DiscZone(new Point(0, 0), 200, 120));
} else {
accelerateAction = new Accelerate((-(player.vel.x) * 8), 1000);
velocityInitializer = new Velocity(new LineZone(new Point(-150, (_local6 + 200)), new Point(50, (_local6 + 300))));
};
emitter.addInitializer(velocityInitializer);
emitter.addInitializer(positionInitializer);
emitter.addAction(accelerateAction);
emitter.counter = new Blast(_arg4);
emitter.x = _arg2;
emitter.y = _arg3;
emitter.start();
}
private function getIcon(_arg1:Class):Class{
var _local2 = "";
switch (_arg1){
case Guts:
_local2 = "Guts";
break;
case Priest:
_local2 = "Priest";
break;
case Virgin:
_local2 = "Virgin";
break;
case GoldCross:
_local2 = "GoldCross";
break;
case Garlic:
_local2 = "Garlic";
break;
case Coffin:
_local2 = "Coffin";
break;
default:
_local2 = "Stake";
break;
};
_local2 = (_local2 + "Icon");
return (Class(getDefinitionByName(_local2)));
}
private function actionSourceGameOver():void{
var _local1:Number = Math.round(((getTimer() - actionSourceStartGameTime) / 1000));
actionSource.linkTrackVars = "eVar32,products,events";
actionSource.linkTrackEvents = "event22,event23";
actionSource.eVar32 = (actionSourceGameName + ": Game Over");
actionSource.products = ((("Games;" + actionSourceGameName) + ";;;event22=") + _local1);
actionSource.events = "event22,event23";
actionSource.trackLink(actionSource.pageURL, "o", (actionSourceGameName + " Game Interaction"));
}
public function onComboActivate(_arg1:MouseEvent):void{
var _local2:Number = ((mcPowerup.totalFrames - mcPowerup.currentFrame) / mcPowerup.totalFrames);
smManager.stopSound(smManager.getSoundClip("specialcounter"));
debug("ACTIVATED COMBO");
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
gotSpecial = false;
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onComboActivate);
player.isPowerup = false;
gotSpecial = false;
mcPowerup.stop();
mcPowerup.parent.removeChild(mcPowerup);
mcPowerupText.parent.removeChild(mcPowerupText);
mcPowerup = null;
mcPowerupText = null;
currentPowerupItem.disableCollisionData();
currentPowerupItem = null;
fgVegLayer.visible = true;
gravestoneLayer.visible = true;
player.vel.x = (player.vel.x + ((10 * comboChain) * _local2));
player.vel.y = ((-(Math.abs(player.vel.y)) - 9) * _local2);
player.special();
smManager.playSound(smManager.getSoundClip("specialactivate"), 0, 0, 0.6);
smManager.playSound(smManager.getSoundClip("bat"), 0, 0, 0.7);
}
private function destroyGame():void{
try {
if (mcGameoverGravestone != null){
mcGameoverGravestone.parent.removeChild(mcGameoverGravestone);
};
} catch(e:Error) {
error(e);
};
try {
info("#1");
stage.removeEventListener(MouseEvent.CLICK, onClickGameOver);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onComboActivate);
} catch(e:Error) {
error(e);
};
try {
info("#2");
smState.killDelayTimer();
} catch(e:Error) {
error(e);
};
try {
info("#3");
smScrollManager.destroy();
} catch(e:Error) {
error(e);
};
try {
smScrollManager.parent.removeChild(smScrollManager);
} catch(e:Error) {
error(e);
};
try {
info("#4");
mcGame.parent.removeChild(mcGame);
} catch(e:Error) {
error(e);
};
try {
info("#5");
mcGameUI.parent.removeChild(mcGameUI);
player.destroy();
player.kill();
} catch(e:Error) {
error(e);
};
mcGameHolder.parent.removeChild(mcGameHolder);
info("#6");
}
public function onAddedItem(_arg1:ScrollLayerEvent):void{
var _local2:ScrollItem = _arg1.item;
var _local3:Class = getIcon(_local2.clipType);
var _local4:Sprite = new (_local3);
mcRadar.addChild(_local4);
Utils.fadeIn(_local4, 0.2);
if (aIndicators.length > 0){
_local4.x = ((aIndicators[(aIndicators.length - 1)].indicator.x + aIndicators[(aIndicators.length - 1)].indicator.width) + INDICATOR_GAP);
};
aIndicators.push({item:_arg1.item, indicator:_local4});
updateRadar();
}
public function setupAbout():void{
}
private function loadSettings():void{
debug("LOADING SharedObject data");
try {
nRecord = ((so.data.record)!=null) ? so.data.record : 0;
smManager.setSound(((so.data.sound)!=null) ? so.data.sound : true);
smManager.setMasterVolume(((so.data.volume)!=null) ? so.data.volume : 1);
} catch(e:Error) {
error(e);
};
}
public function setupInit():void{
so = SharedObject.getLocal(LSO_NAME);
loadSettings();
smState.setNextState(STATES.MAINMENU);
}
public function cleanupPickPosition():void{
Utils.fadeOut(mcPressAndHold);
player.clip.filters = [];
TweenMax.killTweensOf(player.itemLayerOffset);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onPickPosition);
}
public function cleanupPickLegPosition():void{
smManager.stopSound(smManager.getSoundClip("purr"));
Utils.fadeOut(mcReleaseToKick);
stage.removeEventListener(MouseEvent.MOUSE_UP, onPickLegPosition);
}
public function setupPrePlay():void{
var _local4:ScrollLayer;
actionSourcePlayGame();
smManager.playSound(smManager.getSoundClip("musicloop"), 0, 99999, 1.5);
comboChain = 0;
aSpecials = new Array();
aIndicators = new Array();
if (bg != null){
debug("REMOVING BG");
bg.parent.removeChild(bg);
bg = null;
};
bBoostActive = true;
mcGameHolder = new Sprite();
mcGame = new Sprite();
mcGameUI = new Sprite();
addChild(mcGameHolder);
mcGameHolder.addChild(mcGame);
mcGameHolder.addChild(mcGameUI);
addChild(mcAlwaysOnTop);
addChild(mcUI);
mcAlwaysOnTop.filters = (mcGame.filters = []);
nCurrentAngleDownLevel = 50;
bAngleDisplayActive = false;
if (mcAngleDownIndicator != null){
mcAngleDownIndicator.parent.removeChild(mcAngleDownIndicator);
};
mcAngleDownIndicator = new AngleDownIndicator();
mcAngleDownIndicator.x = 10;
mcAngleDownIndicator.y = (STAGE_HEIGHT + 60);
mcAngleDownIndicator.mcGfx.mcSyringe.gotoAndStop(nCurrentAngleDownLevel);
mcGameUI.addChild(mcAngleDownIndicator);
mcAngleDownIndicator.filters = [ds_boost];
bBoostDisplayActive = false;
nCurrentBoost = 0;
if (mcBoostIndicator != null){
mcBoostIndicator.parent.removeChild(mcBoostIndicator);
};
mcBoostIndicator = new BoostIndicator();
mcBoostIndicator.x = (STAGE_WIDTH - 10);
mcBoostIndicator.y = (STAGE_HEIGHT + 60);
mcGameUI.addChild(mcBoostIndicator);
mcBoostIndicator.filters = [ds_boost];
if (mcRadar != null){
mcRadar.parent.removeChild(mcRadar);
};
mcRadar = new Radar();
mcRadar.scaleX = (mcRadar.scaleY = 0.8);
mcRadar.x = (STAGE_WIDTH + 20);
mcRadar.y = 125;
if (mcSpecial != null){
mcSpecial.parent.removeChild(mcSpecial);
};
mcSpecial = new Special();
mcSpecial.scaleX = (mcSpecial.scaleY = 0.8);
mcSpecial.x = (STAGE_WIDTH + 20);
mcSpecial.y = 80;
mcGameUI.addChild(mcSpecial);
mcGameUI.addChild(mcRadar);
if (mcRecordLabel != null){
mcRecordLabel.parent.removeChild(mcRecordLabel);
};
mcRecordLabel = new DistanceIndicator();
mcRecordLabel.x = ((STAGE_WIDTH - 110) + 200);
mcRecordLabel.y = 0;
mcGameUI.addChild(mcRecordLabel);
mcRecordLabel.txtDistance.text = "record:";
if (mcRecordDistanceIndicator != null){
mcRecordDistanceIndicator.parent.removeChild(mcRecordDistanceIndicator);
};
mcRecordDistanceIndicator = new DistanceIndicator();
mcRecordDistanceIndicator.x = ((STAGE_WIDTH - 10) + 200);
mcRecordDistanceIndicator.y = 0;
mcGameUI.addChild(mcRecordDistanceIndicator);
mcRecordDistanceIndicator.txtDistance.text = (nRecord + " m");
if (mcDistanceLabel != null){
mcDistanceLabel.parent.removeChild(mcDistanceLabel);
};
mcDistanceLabel = new DistanceIndicator();
mcDistanceLabel.x = ((STAGE_WIDTH - 110) + 200);
mcDistanceLabel.y = 20;
mcGameUI.addChild(mcDistanceLabel);
mcDistanceLabel.txtDistance.text = "current:";
if (mcDistanceIndicator != null){
mcDistanceIndicator.parent.removeChild(mcDistanceIndicator);
};
mcDistanceIndicator = new DistanceIndicator();
mcDistanceIndicator.x = ((STAGE_WIDTH - 10) + 200);
mcDistanceIndicator.y = 20;
mcGameUI.addChild(mcDistanceIndicator);
mcDistanceIndicator.txtDistance.text = "0 m";
legRotV = 0;
ml = MouseListener.getInstance(stage);
bloodHolder = new Sprite();
mcGame.addChild(bloodHolder);
var _local1:FilterBank = new FilterBank();
bloodHolder.filters = [new BlurFilter(1, 1, 2), _local1.mcFilters.filters[0], new DropShadowFilter(4, 45, 0, 0.4, 5, 5, 1)];
var _local2:Sprite = new Sprite();
_local2.graphics.beginFill(0xFF0000);
_local2.graphics.drawRect(0, 0, STAGE_WIDTH, STAGE_HEIGHT);
scrollWidth = (STAGE_WIDTH * 2);
scrollHeight = (STAGE_HEIGHT * 2);
smScrollManager = new ScrollManager(scrollWidth, scrollHeight, BG);
var _local3:Number = 0;
_local4 = new ScrollLayer(new Point(0.05, 0.5), new Point(0, ((_local3 + 100) + 65)), false, scrollWidth, scrollHeight, [Cloud1, Cloud2, Cloud3, Cloud4, Cloud5], "clouds", 0, 0.6, true);
_local4.seed(12334);
_local4.setGap(50);
smScrollManager.addLayer(_local4);
_local4 = new ScrollLayer(new Point(0.1, 0.5), new Point(0, ((_local3 + 140) + 65)), false, scrollWidth, scrollHeight, [Cloud1, Cloud2, Cloud3, Cloud4, Cloud5], "clouds", 0, 0.7, true);
_local4.seed(37823);
_local4.setGap(50);
smScrollManager.addLayer(_local4);
_local4 = new ScrollLayer(new Point(0.2, 0.5), new Point(0, ((_local3 + 180) + 65)), false, scrollWidth, scrollHeight, [Cloud1, Cloud2, Cloud3, Cloud4, Cloud5], "clouds", 0, 0.9, true);
_local4.seed(2031);
_local4.setGap(50);
smScrollManager.addLayer(_local4);
_local4 = new ScrollLayer(new Point(0.3, 0.5), new Point(0, (_local3 + 360)), false, scrollWidth, scrollHeight, [FloorPara0], "vegback", 0, 1, true);
smScrollManager.addLayer(_local4);
_local4 = new ScrollLayer(new Point(0.4, 0.4), new Point(0, (_local3 + 365)), false, scrollWidth, scrollHeight, [FloorRear1], "floorrear", 0, 1, true);
smScrollManager.addLayer(_local4);
_local4 = new ScrollLayer(new Point(0.4, 0.4), new Point(0, (_local3 + 355)), false, scrollWidth, scrollHeight, [BG1, BG2, BG3, BG4], "treesback", 0, 0.7, true, 1, true, false);
smScrollManager.addLayer(_local4);
_local4 = new ScrollLayer(new Point(0.6, 0.5), new Point(0, (_local3 + 375)), false, scrollWidth, scrollHeight, [BG1, BG2, BG3, BG4], "treesfront", 0, 1.1, true, 1, true, false);
smScrollManager.addLayer(_local4);
_local4 = new ScrollLayer(new Point(0.8, 0.5), new Point(0, (_local3 + 370)), false, scrollWidth, scrollHeight, [FloorPara1], "backveg", 0, 1, true);
smScrollManager.addLayer(_local4);
_local4 = new ScrollLayer(new Point(1, 1), new Point(0, (_local3 + 380)), false, scrollWidth, scrollHeight, [FloorPara2], "floorback", 0, 1, true);
_local4.setGap(0);
smScrollManager.addLayer(_local4);
fgLayer = new ObjectScrollLayer(new Point(1, 1), new Point(0, (_local3 + 370)), false, scrollWidth, scrollHeight, OBJECTS, "objectlayer", 0, 1, false, 1, true, false, null, false);
fgLayer.setGap(1000);
fgLayer.setPRNG(false);
fgLayer.addEventListener(ScrollLayerEvent.ADDEDITEM, onAddedItem, false, 0, true);
fgLayer.addEventListener(ScrollLayerEvent.REMOVEDITEM, onRemovedItem, false, 0, true);
smScrollManager.addLayer(fgLayer);
addChild(_local2);
mcGameHolder.mask = _local2;
playerLayer = new ScrollLayer(new Point(1, 1), new Point(0, 0), false, scrollWidth, scrollHeight, [], "player", 0, 1, true);
playerLayer.fillEmptySpace = false;
smScrollManager.addLayer(playerLayer);
_local4 = new ScrollLayer(new Point(1.4, 1), new Point(0, (_local3 + 395)), false, scrollWidth, scrollHeight, [FloorPara2], "floorfront", 0, 1, true);
_local4.setGap(0);
smScrollManager.addLayer(_local4);
fgVegLayer = new ScrollLayer(new Point(1.7, 1), new Point(0, (_local3 + 400)), false, scrollWidth, scrollHeight, [FloorPara3], "frontveg", 0, 1, false);
smScrollManager.addLayer(fgVegLayer);
gravestoneLayer = new GraveStoneScrollLayer(new Point(1.9, 1), new Point(0, (_local3 + 395)), false, scrollWidth, scrollHeight, [GraveStone], "gravestones", 0, 0.4, false, 1, true, false, null, false);
gravestoneLayer.setGap(1200);
smScrollManager.addLayer(gravestoneLayer);
legItem = new VectorScrollItem(Leg, null, playerLayer, ScrollItem.ALIGN_TOP, 1, new Point(250, ((_local3 + _local3) + 440)));
legItem.destroyIfOffscreen = true;
leg = Leg(legItem.clip).mcFoot;
legMask = Leg(legItem.clip).mcMask;
legItem.clip.mouseEnabled = false;
legItem.clip.mouseChildren = true;
leg.mouseEnabled = true;
playerLayer.addItem(legItem, false);
leg.rotation = 0;
guide = legItem.clip.getChildByName("mcGuide");
guidePos = new Point(guide.x, guide.y);
guidePos = guide.localToGlobal(guidePos);
guidePos.y = (guidePos.y - STAGE_HEIGHT);
guideRadius = ((guide.width / 2) + 40);
player = new Player(playerLayer, ScrollItem.ALIGN_TOP, 1, new Point(0, 0));
initialiseExplodeEmitter(playerLayer);
playerLayer.addItem(player, false);
player.addEventListener(PlayerEvent.HITGROUND, onHitGround);
constrainToCircle(-10000, STAGE_HEIGHT, player);
mcParallaxDisplay = new Sprite();
mcGame.addChild(mcParallaxDisplay);
mcParallaxDisplay.x = (STAGE_WIDTH / 2);
mcParallaxDisplay.y = (STAGE_HEIGHT / 2);
mcParallaxDisplay.addChild(smScrollManager);
smScrollManager.x = 0;
smScrollManager.y = 0;
var _local5:DashedLine = new DashedLine(5, 0xFFFFFF);
_local5.alpha = 0.1;
_local5.moveTo(0, BOOST_Y_MAX);
_local5.lineTo(scrollWidth, BOOST_Y_MAX);
mcParallaxDisplay.addChild(_local5);
_local5 = new DashedLine(5, 0xFFFFFF);
_local5.alpha = 0.1;
_local5.moveTo(0, (BOOST_Y_MAX - STAGE_HEIGHT));
_local5.lineTo(scrollWidth, (BOOST_Y_MAX - STAGE_HEIGHT));
mcParallaxDisplay.addChild(_local5);
smScrollManager.update(new Point(0, 0));
stage.invalidate();
updateParallax();
smScrollManager.update(new Point(0, 0));
stage.invalidate();
Utils.fadeIn(mcGame, 2);
smState.setNextState(STATES.PICKPOSITION);
addChild(mcDebugTextHolder);
}
private function onClickE4(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://e4.com/games"), "_blank");
}
public function setupPlay():void{
inGameMenu = new Menu(xmlMenu.menu.(@id == "ingame"), false, true);
inGameMenu.addEventListener(MenuEvent.MENU_ACTION, onClickMenu);
mcGameUI.addChild(inGameMenu);
TweenMax.to(mcRadar, 0.4, {ease:Back.easeOut, x:((STAGE_WIDTH - mcRadar.width) - 10)});
TweenMax.to(mcSpecial, 0.4, {ease:Back.easeOut, x:((STAGE_WIDTH - mcRadar.width) - 10)});
TweenMax.to(mcBoostIndicator, 0.4, {ease:Back.easeOut, y:(STAGE_HEIGHT - 5)});
TweenMax.to(mcAngleDownIndicator, 0.4, {ease:Back.easeOut, y:(STAGE_HEIGHT - 5)});
TweenMax.to(mcRecordLabel, 0.4, {ease:Back.easeOut, x:(STAGE_WIDTH - 110)});
TweenMax.to(mcRecordDistanceIndicator, 0.4, {ease:Back.easeOut, x:(STAGE_WIDTH - 10)});
TweenMax.to(mcDistanceLabel, 0.4, {ease:Back.easeOut, x:(STAGE_WIDTH - 110)});
TweenMax.to(mcDistanceIndicator, 0.4, {ease:Back.easeOut, x:(STAGE_WIDTH - 10)});
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onClick, false, 0xFF);
smManager.playSound(smManager.getSoundClip("wind"), 0, 99999, 0);
smManager.playSound(smManager.getSoundClip("musicloop"), 0, 99999, 1.5);
}
public function setupHelp():void{
mcInstructions = new Instructions();
mcUI.addChild(mcInstructions);
mcInstructions.x = (STAGE_WIDTH / 2);
mcInstructions.y = ((STAGE_HEIGHT / 2) - 15);
Utils.fadeIn(mcInstructions);
helpMenu = new Menu(xmlMenu.menu.(@id == "help"));
helpMenu.addEventListener(MenuEvent.MENU_ACTION, onClickMenu);
mcUI.addChild(helpMenu);
}
private function actionSourceCompleteGame():void{
var _local1:Number = Math.round(((getTimer() - actionSourceStartGameTime) / 1000));
actionSource.linkTrackVars = "eVar32,products,events";
actionSource.linkTrackEvents = "event21,event22,event23";
actionSource.eVar32 = (actionSourceGameName + ": Game Completed");
actionSource.products = ((("Games;" + actionSourceGameName) + ";;;event22=") + _local1);
actionSource.events = "event21,event22,event23,";
actionSource.trackLink(actionSource.pageURL, "o", (actionSourceGameName + " Game Interaction"));
}
private function kickKitten():void{
player.kick();
TweenMax.killTweensOf(leg);
TweenMax.killTweensOf(legMask);
var _local1:int = (Math.floor((Math.random() * 2)) + 1);
smManager.playSound(smManager.getSoundClip(("kickcat" + _local1)));
smState.setState(STATES.PLAY);
}
public function updatePrePlay():void{
smScrollManager.update(new Point(0, 0));
mcParallaxDisplay.scaleX = (mcParallaxDisplay.scaleY = 1);
mcParallaxDisplay.x = 0;
mcParallaxDisplay.y = (STAGE_HEIGHT - scrollHeight);
updateParallax();
}
public function setupPause():void{
mcGameHolder.filters = [BLUR];
pauseMenu = new Menu(xmlMenu.menu.(@id == "pause"));
pauseMenu.addEventListener(MenuEvent.MENU_ACTION, onClickMenu);
mcUI.addChild(pauseMenu);
}
public function cleanupMainMenu():void{
mainMenu.removeEventListener(MenuEvent.MENU_ACTION, onClickMenu);
mainMenu.destroy();
TweenMax.to(mcE4Footer, 1, {ease:Back.easeIn, y:(STAGE_HEIGHT + 100), onComplete:Utils.destroyDisplayObject, onCompleteParams:[mcE4Footer]});
mcE4Footer.removeEventListener(MouseEvent.CLICK, onClickE4);
}
private function updateParallax():void{
var _local1:Number = ((player.itemLayerOffset.y / Player.BOTTOM) + 0.1);
if (_local1 < 0.5){
_local1 = 0.5;
} else {
if (_local1 > 1){
_local1 = 1;
};
};
if (currentPowerupItem != null){
_local1 = 1;
};
mcParallaxDisplay.scaleX = (mcParallaxDisplay.scaleY = _local1);
mcParallaxDisplay.x = 0;
mcParallaxDisplay.y = (STAGE_HEIGHT - (scrollHeight * _local1));
}
public function onFault(_arg1:Object):void{
var _local2:*;
trace(("fault " + _arg1));
error(("fault " + _arg1));
for (_local2 in _arg1) {
error(((_local2 + ": ") + _arg1[_local2]));
};
}
private function getDistanceTravelled():Number{
return (-(Math.round(((gravestoneLayer.layerScrollPos.x / 1000) * 5))));
}
public function setupPickPosition():void{
smManager.playSound(smManager.getSoundClip("purr"), 0, 9999, 0.3);
TweenMax.to(player.itemLayerOffset, 1, {ease:Cubic.easeInOut, repeat:999, yoyo:true, y:520, onUpdate:updatePickPosition});
nPlayerDir = 1;
stage.addEventListener(MouseEvent.MOUSE_DOWN, onPickPosition);
mcPressAndHold = new PressAndHold();
mcGame.addChild(mcPressAndHold);
Utils.fadeIn(mcPressAndHold);
mcPressAndHold.x = (STAGE_WIDTH / 2);
mcPressAndHold.y = (STAGE_HEIGHT - 70);
}
public function setupGameOver():void{
actionSourceGameOver();
saveSettings();
mcGameoverGravestone = new GameOverGravestone();
mcGameoverGravestone.x = (STAGE_WIDTH / 2);
mcGameoverGravestone.y = (STAGE_HEIGHT + mcGameoverGravestone.height);
mcUI.addChild(mcGameoverGravestone);
TweenMax.to(mcGameoverGravestone, 0.5, {ease:Quad.easeOut, y:(_slot1.STAGE_HEIGHT + 10)});
mcGameoverGravestone.mcGfx.textDistance.text = ("" + getDistanceTravelled());
mcDistanceIndicator.txtDistance.text = ("" + getDistanceTravelled());
stage.addEventListener(MouseEvent.CLICK, onClickGameOver);
smState.setDelayedNextState(STATES.PREPLAY, 10000);
smManager.playSound(smManager.getSoundClip("gameover"));
mcGameHolder.filters = [BLUR];
}
public function clearSettings(_arg1:Event=null):void{
smManager.setSound(true);
smManager.setMasterVolume(1);
nRecord = 0;
saveSettings();
}
public function updatePlay():void{
var _local2:Number;
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local1:Boolean = updatePowerups();
if (((!(_local1)) && ((currentPowerupItem == null)))){
if (((((((((((!(player.isSpecialActivated)) && (bBoostActive))) && ((nCurrentBoost < NUM_BOOSTS)))) && ((player.screenPos.y > 0)))) && ((player.itemLayerOffset.y < BOOST_Y_MAX)))) && ((player.vel.y > 0)))){
if (!bBoostDisplayActive){
bBoostDisplayActive = true;
mcBoostIndicator.filters = [gf_boost];
TweenMax.to(mcBoostIndicator, 0.2, {ease:Cubic.easeIn, scaleX:1.1, scaleY:1.1, yoyo:true, repeat:-1});
};
} else {
if (bBoostDisplayActive){
mcBoostIndicator.scaleX = (mcBoostIndicator.scaleY = 1);
bBoostDisplayActive = false;
TweenMax.killTweensOf(mcBoostIndicator);
mcBoostIndicator.filters = [ds_boost];
};
};
if (((((((((((!(player.isSpecialActivated)) && (bBoostActive))) && ((nCurrentAngleDownLevel == MAX_ANGLE_DOWN)))) && ((player.screenPos.y > 0)))) && ((player.itemLayerOffset.y < BOOST_Y_MAX)))) && ((player.vel.y < 0)))){
if (!bAngleDisplayActive){
bAngleDisplayActive = true;
mcAngleDownIndicator.filters = [gf_boost];
TweenMax.to(mcAngleDownIndicator, 0.2, {ease:Cubic.easeIn, scaleX:1.1, scaleY:1.1, yoyo:true, repeat:-1});
};
} else {
if (bAngleDisplayActive){
mcAngleDownIndicator.scaleX = (mcAngleDownIndicator.scaleY = 1);
bAngleDisplayActive = false;
TweenMax.killTweensOf(mcAngleDownIndicator);
mcAngleDownIndicator.filters = [ds_boost];
};
};
mcAngleDownIndicator.mcGfx.mcSyringe.gotoAndStop(Math.floor(nCurrentAngleDownLevel));
player.update();
testPlayerCollisions();
_local2 = 0;
if (currentPowerupItem == null){
if (player.itemLayerOffset.y > 0){
_local5 = (player.itemLayerOffset.x + playerLayer.layerScrollPos.x);
if ((((_local5 > (KITTEN_IDEAL_X + 5))) || ((_local5 < (KITTEN_IDEAL_X - 5))))){
_local2 = ((_local5 - KITTEN_IDEAL_X) / 30);
};
};
smScrollManager.update(new Point((-(player.vel.x) - _local2), 0));
updateParallax();
if ((((player.itemLayerOffset.y < BOOST_Y_MAX)) && ((Math.random() > 0.9)))){
startParticleExplosion(player.clip, player.screenPos.x, player.screenPos.y, 1);
};
};
_local3 = new Point(player.clip.x, player.clip.y);
_local3 = player.clip.parent.localToGlobal(_local3);
if (_local3.y < 0){
if (mcMarker == null){
mcMarker = new Marker();
mcAlwaysOnTop.addChild(mcMarker);
};
mcMarker.x = _local3.x;
mcMarker.y = 20;
_local6 = Math.round(((-(player.itemLayerOffset.y) + 5) / 10));
if (_local6 < 0){
_local6 = 0;
};
mcMarker.mcGfx.txtHeight.text = _local6;
startParticleExplosion(mcMarker, (mcMarker.x + mcMarker.width), (mcMarker.y + mcMarker.height), 1);
} else {
if (mcMarker != null){
mcMarker.parent.removeChild(mcMarker);
mcMarker = null;
};
};
if (player.screenPos.y < 0){
bBoostActive = true;
};
_local4 = getDistanceTravelled();
if (_local4 > nRecord){
nRecord = _local4;
mcRecordDistanceIndicator.txtDistance.text = (_local4 + " m");
mcDistanceIndicator.txtDistance.text = (_local4 + " m");
mcDistanceLabel.txtDistance.text = "new record:";
mcDistanceLabel.txtDistance.textColor = 0xFF0000;
} else {
if (_local4 < nRecord){
mcDistanceIndicator.txtDistance.text = (_local4 + " m");
mcDistanceLabel.txtDistance.textColor = 0xFFFFFF;
};
};
};
if ((((player.vel.x < 0.3)) && ((currentPowerupItem == null)))){
smState.setState(STATES.GAMEOVER);
};
updateRadar();
updateSpecials();
smManager.setSoundVolume(smManager.getSoundClip("wind"), ((player.vel.x / 100) / 3));
}
override public function onAddedToStage(_arg1:Event):void{
var _local2:*;
var _local3:*;
configActionSource();
smManager = SoundManager.getInstance();
for each (_local2 in SOUNDS) {
smManager.addSound(new _local2.sound(), _local2.name);
};
smManager.loadSounds();
for (_local3 in APP_STATES) {
STATES[_local3] = APP_STATES[_local3];
};
super.onAddedToStage(_arg1);
Security.allowInsecureDomain("plasticmartians.co.uk");
Security.allowDomain("plasticmartians.co.uk");
Security.loadPolicyFile("http://www.plasticmartians.co.uk/crossdomain.xml");
graphics.beginFill(0);
graphics.drawRect(0, 0, STAGE_WIDTH, STAGE_HEIGHT);
graphics.endFill();
if (DebugState.DEBUG){
SWFProfiler.init(stage, this);
SWFProfiler.start();
};
txtVersion.text = (((((DEBUG) ? " d" : " " + VersionInfo.versionNumber) + ".") + VersionInfo.buildNumber) + " ");
OverwriteManager.init();
OverwriteManager.mode = OverwriteManager.NONE;
TweenPlugin.activate([Physics2DPlugin, GlowFilterPlugin, BlurFilterPlugin]);
smState.setNextState(STATES.INIT);
mcUI = new Sprite();
addChild(mcUI);
mcAlwaysOnTop = new Sprite();
addChild(mcAlwaysOnTop);
}
private function onMouseOutSettings(_arg1:MouseEvent):void{
mcClearSettings.filters = [new DropShadowFilter(5, 45, 0, 1, 5, 5, 0.5)];
mcClearSettings.x = (mcClearSettings.x - 2);
mcClearSettings.y = (mcClearSettings.y - 2);
}
public function cleanupPause():void{
pauseMenu.removeEventListener(MenuEvent.MENU_ACTION, onClickMenu);
pauseMenu.destroy();
mcGameHolder.filters = [];
}
private function updateRadar():void{
var _local3:Sprite;
var _local1:Number = 0;
var _local2:Number = 0;
while (_local2 < aIndicators.length) {
_local3 = aIndicators[_local2].indicator;
if (((!((_local3.x == _local1))) && (!(TweenMax.isTweening(_local3))))){
TweenMax.to(_local3, 0.2, {ease:Cubic.easeInOut, x:_local1});
};
_local3.getChildByName("mcArrow").rotation = ((Math.atan2((_local3.y - aIndicators[_local2].item.clip.y), (_local3.x - aIndicators[_local2].item.clip.x)) * Utils.RAD2ANG) - 45);
_local1 = (_local1 + (_local3.width + INDICATOR_GAP));
_local2++;
};
}
public function setupSettings():void{
mcSettings = new Settings();
mcUI.addChild(mcSettings);
mcSettings.x = (STAGE_WIDTH / 2);
mcSettings.y = ((STAGE_HEIGHT / 2) - 15);
Utils.fadeIn(mcSettings);
settingsMenu = new Menu(xmlMenu.menu.(@id == "settings"));
settingsMenu.addEventListener(MenuEvent.MENU_ACTION, onClickMenu);
mcUI.addChild(settingsMenu);
loadSettings();
mcSlider = mcSettings["mciSlider"];
debug(("mcClisder: " + mcSlider));
setSliderX(smManager.getMasterVolume());
mcSlider.dragger.useHandCursor = true;
mcSlider.dragger.buttonMode = true;
mciSound = mcSettings["mciSound"];
mciSound.gotoAndStop((smManager.getSound()) ? 1 : 2);
mciSound.useHandCursor = true;
mciSound.buttonMode = true;
mciSound.addEventListener(MouseEvent.CLICK, onPressSound, false, 0, true);
mcClearSettings = mcSettings["mcClearSettings"];
mcClearSettings.filters = [new DropShadowFilter(5, 45, 0, 1, 5, 5, 0.5)];
mcClearSettings.useHandCursor = true;
mcClearSettings.buttonMode = true;
mcClearSettings.addEventListener(MouseEvent.CLICK, onPressClearSettings, false, 0, true);
mcClearSettings.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverSettings, false, 0, true);
mcClearSettings.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutSettings, false, 0, true);
mcSlider.dragger.addEventListener(MouseEvent.MOUSE_DOWN, onDragSlider, false, 0, true);
}
private function constrainToCircle(_arg1:Number, _arg2:Number, _arg3:Player):void{
var _local4:Point = new Point(_arg1, _arg2);
var _local5:Number = _local4.x;
var _local6:Number = _local4.y;
var _local7:Number = Math.atan2(_local6, _local5);
if (_local7 < 0.3){
_local7 = 0.3;
};
if (_local7 > 1){
_local7 = 1;
};
_local4.x = (Math.cos(_local7) * guideRadius);
_local4.y = (Math.sin(_local7) * guideRadius);
_local4 = guide.localToGlobal(_local4);
_local4 = playerLayer.globalToLocal(_local4);
_arg3.itemLayerOffset.x = _local4.x;
_arg3.itemLayerOffset.y = _local4.y;
}
public function onLeaveStage(_arg1:Event=null):void{
}
private function onPressSound(_arg1:MouseEvent):void{
smManager.toggleSound();
mciSound.gotoAndStop((smManager.getSound()) ? 1 : 2);
}
public function updatePickPosition():void{
smScrollManager.update(new Point(0, 0));
mcParallaxDisplay.scaleX = (mcParallaxDisplay.scaleY = 1);
mcParallaxDisplay.x = 0;
mcParallaxDisplay.y = (STAGE_HEIGHT - (scrollHeight * 1));
var _local1:Point = new Point(player.clip.x, player.clip.y);
_local1 = player.clip.parent.localToGlobal(_local1);
_local1 = guide.globalToLocal(_local1);
constrainToCircle(_local1.x, _local1.y, player);
}
private function onHitGround(_arg1:PlayerEvent):void{
bBoostActive = true;
var _local2:String = HITSOUNDS[Math.floor((Math.random() * HITSOUNDS.length))];
smManager.playSound(smManager.getSoundClip(_local2));
}
private function initialiseExplodeEmitter(_arg1:Sprite):void{
var _local2:ParticleBloodDrip = new ParticleBloodDrip();
emitter.addInitializer(new SharedImage(DisplayObject(_local2)));
velocityInitializer = new Velocity(new LineZone(new Point(-10, 50), new Point(10, 100)));
emitter.addInitializer(velocityInitializer);
emitter.addInitializer(new Lifetime(1));
emitter.addInitializer(new ScaleAllInit(0.4, 1.6));
positionInitializer = new Position(new LineZone(new Point(-20, 0), new Point(20, 0)));
emitter.addInitializer(positionInitializer);
emitter.addAction(new Age(Quadratic.easeIn));
emitter.addAction(new Move());
emitter.addAction(new Fade());
accelerateAction = new Accelerate(4000, 1800);
emitter.addAction(accelerateAction);
emitter.addAction(new RotateToDirection());
emitter.addAction(new LinearDrag(0.8));
renderer = new BitmapRenderer(new Rectangle(0, 0, (STAGE_WIDTH / 2), (STAGE_HEIGHT * 2)));
renderer.addFilter(new BlurFilter(1, 1, 1));
renderer.addFilter(new ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0.65, 0]));
renderer.addEmitter(emitter);
_arg1.addChild(renderer);
}
private function onPickPosition(_arg1:MouseEvent):void{
smManager.playSound(smManager.getSoundClip("menuclick"), 0, 0);
smState.setState(STATES.PICKLEGPOSITION);
}
private function onClickGameOver(_arg1:MouseEvent=null):void{
smState.setState(STATES.PREPLAY);
}
public function testPlayerCollisions():void{
var _local3:Object;
var _local4:VectorScrollItem;
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local1:Point = player.screenPos;
var _local2:Vector2D = player.vel;
if (!player.isHit){
_local3 = testCollision(_local1, new Point((_local1.x + _local2.x), (_local1.y + _local2.y)), fgLayer.getCollisionData());
if (_local3 != null){
_local4 = _local3.obj;
currentPowerupItem = _local4;
player.isPowerup = true;
gotSpecial = false;
_local5 = (aSpecials.length - 1);
while (_local5 >= 0) {
if (aSpecials[_local5].classType == currentPowerupItem.clipType){
comboChain++;
nSpecialAquireTime = getTimer();
gotSpecial = true;
aSpecials[_local5].indicator.parent.removeChild(aSpecials[_local5].indicator);
aSpecials.splice(_local5, 1);
smManager.playSound(smManager.getSoundClip("specialcounter"), 0, 20);
break;
};
_local5--;
};
if (!gotSpecial){
mcPowerupText = new PowerupText();
comboChain = 0;
_local7 = "";
switch (currentPowerupItem.clipType){
case Guts:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(2);
_local7 = "GUTS!!\nNOM NOM NOM";
mcPowerup = new GoodPowerup();
smManager.playSound(smManager.getSoundClip("goodpowerup"));
smManager.playSound(smManager.getSoundClip("guts"));
info(">> GUTS");
break;
case Priest:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(2);
_local7 = "PRIEST!!\nSLOW";
mcPowerup = new BadPowerup();
smManager.playSound(smManager.getSoundClip("priestscream"));
smManager.playSound(smManager.getSoundClip("badpowerup1"));
info(">> PRIEST");
break;
case Virgin:
info(">> VIRGIN");
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(2);
_local7 = "BLOOD\nBOOST";
mcPowerup = new GoodPowerup();
smManager.playSound(smManager.getSoundClip("goodpowerup"));
smManager.playSound(smManager.getSoundClip("virginscream"), 0, 0, 0.7);
break;
case GoldCross:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(2);
info(">> CROSS");
_local7 = "ANGLE\nDOWN";
mcPowerup = new BadPowerup();
smManager.playSound(smManager.getSoundClip("cross"));
smManager.playSound(smManager.getSoundClip("badpowerup2"));
break;
case Garlic:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(2);
info(">> GARLIC");
_local7 = "GARLIC\nSTOP!!";
mcPowerup = new BadPowerup();
smManager.playSound(smManager.getSoundClip("badpowerup1"), 0, 0, 0.7);
break;
case Coffin:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(2);
_local7 = "COFFIN UP\nBLOOD";
mcPowerup = new GoodPowerup();
smManager.playSound(smManager.getSoundClip("goodpowerup"));
smManager.playSound(smManager.getSoundClip("coffin"));
info(">> COFFIN");
break;
default:
info(">> STAKE");
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndPlay(2);
_local7 = "STAKE\nSTOP";
mcPowerup = new BadPowerup();
smManager.playSound(smManager.getSoundClip("badpowerup2"), 0, 0, 0.7);
break;
};
mcPowerupText.mcText.txtPowerup.text = _local7;
} else {
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(2);
mcPowerupText = new ComboText();
mcPowerup = new Combo();
if (comboChain == 1){
mcPowerupText.mcText.txtPowerup.text = "PRESS TO ACTIVATE\nSPECIAL!!!!";
} else {
if (comboChain != 0){
mcPowerupText.mcText.txtPowerup.text = (("C-C-C-COMBO!!!!\nx " + comboChain) + "\nPRESS NOW!!");
};
};
stage.addEventListener(MouseEvent.MOUSE_DOWN, onComboActivate);
};
fgVegLayer.visible = false;
gravestoneLayer.visible = false;
fgLayer.addChildAt(mcPowerup, 0);
mcAlwaysOnTop.addChild(mcPowerupText);
bBoostActive = true;
updateParallax();
_local6 = (_local4.screenPos.x - (STAGE_WIDTH / 2));
smScrollManager.setScrollX((smScrollManager.getScrollPos().x + _local6));
smScrollManager.update(new Point());
mcPowerup.x = _local4.screenPos.x;
mcPowerup.y = _local4.screenPos.y;
mcPowerupText.x = (STAGE_WIDTH / 2);
mcPowerupText.y = (STAGE_HEIGHT - 60);
};
};
}
private function onClickMenu(_arg1:MenuEvent):void{
smManager.playSound(smManager.getSoundClip("menuclick"), 0, 0);
smState.setState(_arg1.actionType);
}
public function cleanupPlay():void{
inGameMenu.removeEventListener(MenuEvent.MENU_ACTION, onClickMenu);
inGameMenu.destroy();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onClick);
smManager.stopSound(smManager.getSoundClip("wind"));
smManager.stopSound(smManager.getSoundClip("musicloop"));
}
public function updatePowerups():Boolean{
var _local1:Boolean;
if (currentPowerupItem != null){
if (gotSpecial){
mcPowerup.alpha = (0.9 + (Math.random() * 0.1));
};
if (mcPowerup.currentFrame == mcPowerup.totalFrames){
player.isPowerup = false;
if (gotSpecial){
player.vel.x = (player.vel.x * 0.9);
player.vel.y = (player.vel.y * 0.9);
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onComboActivate);
smManager.stopSound(smManager.getSoundClip("specialcounter"));
} else {
switch (currentPowerupItem.clipType){
case Guts:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
player.vel.x = (player.vel.x + 15);
player.vel.y = (-(Math.abs(player.vel.y)) - 2);
info(">> GUTS");
break;
case Priest:
info("<< PRIEST");
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
player.vel.y = (player.vel.y * 0.6);
player.vel.x = (player.vel.x * 0.6);
break;
case Virgin:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
player.vel.x = (player.vel.x + 10);
player.vel.y = (-(Math.abs(player.vel.y)) - 5);
info("<< VIRGIN");
break;
case GoldCross:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
info("<< CROSS");
player.vel.y = (Math.abs(player.vel.y) / 2);
player.vel.x = (player.vel.x - 2);
break;
case Garlic:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
MovieClip(MovieClip(currentPowerupItem.clip).mcGfx).stop();
info("<< GARLIC");
smState.setState(STATES.GAMEOVER);
player.visible = false;
_local1 = true;
break;
case Coffin:
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
player.vel.y = (-(Math.abs(player.vel.y)) - 10);
info("<< COFFIN");
break;
default:
info("<< STAKE");
MovieClip(currentPowerupItem.clip).mcGfx.gotoAndStop(1);
MovieClip(MovieClip(currentPowerupItem.clip).mcGfx).stop();
smState.setState(STATES.GAMEOVER);
player.visible = false;
_local1 = true;
break;
};
debug("removing powerup display");
};
gotSpecial = false;
mcPowerup.stop();
mcPowerup.parent.removeChild(mcPowerup);
mcPowerup = null;
mcPowerupText.parent.removeChild(mcPowerupText);
mcPowerupText = null;
currentPowerupItem.disableCollisionData();
currentPowerupItem = null;
fgVegLayer.visible = true;
gravestoneLayer.visible = true;
};
};
return (_local1);
}
}
}//package com.e4.vampirekitten
Section 16
//VersionInfo (com.e4.vampirekitten.VersionInfo)
package com.e4.vampirekitten {
public class VersionInfo {
public static const versionNumber:String = "0.8";
public static const buildNumber:Number = 123;
public static const copyrightString:String = "Copyright(c) 2010";
public static const buildTime:String = "30/07/2010";
}
}//package com.e4.vampirekitten
Section 17
//SWFProfiler (com.flashdynamix.utils.SWFProfiler)
package com.flashdynamix.utils {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
import flash.ui.*;
public class SWFProfiler {
private static var started:Boolean = false;
private static var initTime:int;
public static var memList:Array = [];
public static var history:int = 60;
private static var itvTime:int;
public static var minMem:Number;
public static var fpsList:Array = [];
private static var frameCount:int;
private static var totalCount:int;
private static var inited:Boolean = false;
public static var minFps:Number;
public static var maxMem:Number;
private static var displayed:Boolean = false;
public static var maxFps:Number;
private static var currentTime:int;
private static var frame:Sprite;
private static var ci:ContextMenuItem;
private static var content:ProfilerContent;
private static var stage:Stage;
private static function addEvent(_arg1:EventDispatcher, _arg2:String, _arg3:Function):void{
_arg1.addEventListener(_arg2, _arg3, false, 0, true);
}
public static function stop():void{
if (!started){
return;
};
started = false;
removeEvent(frame, Event.ENTER_FRAME, draw);
}
public static function get averageFps():Number{
return ((totalCount / runningTime));
}
public static function init(_arg1:Stage, _arg2:InteractiveObject):void{
if (inited){
return;
};
inited = true;
stage = _arg1;
content = new ProfilerContent();
frame = new Sprite();
minFps = Number.MAX_VALUE;
maxFps = Number.MIN_VALUE;
minMem = Number.MAX_VALUE;
maxMem = Number.MIN_VALUE;
var _local3:ContextMenu = new ContextMenu();
_local3.hideBuiltInItems();
ci = new ContextMenuItem("Show Profiler", true);
addEvent(ci, ContextMenuEvent.MENU_ITEM_SELECT, onSelect);
_local3.customItems = [ci];
_arg2.contextMenu = _local3;
start();
}
public static function get currentMem():Number{
return (((System.totalMemory / 0x0400) / 1000));
}
private static function get runningTime():Number{
return (((currentTime - initTime) / 1000));
}
private static function get intervalTime():Number{
return (((currentTime - itvTime) / 1000));
}
private static function resize(_arg1:Event):void{
content.update(runningTime, minFps, maxFps, minMem, maxMem, currentFps, currentMem, averageFps, fpsList, memList, history);
}
private static function updateDisplay():void{
updateMinMax();
content.update(runningTime, minFps, maxFps, minMem, maxMem, currentFps, currentMem, averageFps, fpsList, memList, history);
}
private static function onSelect(_arg1:ContextMenuEvent):void{
if (!displayed){
show();
} else {
hide();
};
}
public static function get currentFps():Number{
return ((frameCount / intervalTime));
}
private static function hide():void{
ci.caption = "Show Profiler";
displayed = false;
removeEvent(stage, Event.RESIZE, resize);
stage.removeChild(content);
}
private static function draw(_arg1:Event):void{
currentTime = getTimer();
frameCount++;
totalCount++;
if (intervalTime >= 1){
if (displayed){
updateDisplay();
} else {
updateMinMax();
};
fpsList.unshift(currentFps);
memList.unshift(currentMem);
if (fpsList.length > history){
fpsList.pop();
};
if (memList.length > history){
memList.pop();
};
itvTime = currentTime;
frameCount = 0;
};
}
private static function updateMinMax():void{
minFps = Math.min(currentFps, minFps);
maxFps = Math.max(currentFps, maxFps);
minMem = Math.min(currentMem, minMem);
maxMem = Math.max(currentMem, maxMem);
}
public static function gc():void{
try {
new LocalConnection().connect("foo");
new LocalConnection().connect("foo");
} catch(e:Error) {
};
}
public static function start():void{
if (started){
return;
};
started = true;
initTime = (itvTime = getTimer());
totalCount = (frameCount = 0);
addEvent(frame, Event.ENTER_FRAME, draw);
}
private static function removeEvent(_arg1:EventDispatcher, _arg2:String, _arg3:Function):void{
_arg1.removeEventListener(_arg2, _arg3);
}
private static function show():void{
ci.caption = "Hide Profiler";
displayed = true;
addEvent(stage, Event.RESIZE, resize);
stage.addChild(content);
updateDisplay();
}
}
}//package com.flashdynamix.utils
import flash.events.*;
import flash.display.*;
import flash.text.*;
class ProfilerContent extends Sprite {
private var maxFpsTxtBx:TextField;
private var minMemTxtBx:TextField;
private var fps:Shape;
private var box:Shape;
private var minFpsTxtBx:TextField;
private var maxMemTxtBx:TextField;
private var infoTxtBx:TextField;
private var mb:Shape;
private function ProfilerContent():void{
fps = new Shape();
mb = new Shape();
box = new Shape();
this.mouseChildren = false;
this.mouseEnabled = false;
fps.x = 65;
fps.y = 45;
mb.x = 65;
mb.y = 90;
var _local1:TextFormat = new TextFormat("_sans", 9, 0xAAAAAA);
infoTxtBx = new TextField();
infoTxtBx.autoSize = TextFieldAutoSize.LEFT;
infoTxtBx.defaultTextFormat = new TextFormat("_sans", 11, 0xCCCCCC);
infoTxtBx.y = 98;
minFpsTxtBx = new TextField();
minFpsTxtBx.autoSize = TextFieldAutoSize.LEFT;
minFpsTxtBx.defaultTextFormat = _local1;
minFpsTxtBx.x = 7;
minFpsTxtBx.y = 37;
maxFpsTxtBx = new TextField();
maxFpsTxtBx.autoSize = TextFieldAutoSize.LEFT;
maxFpsTxtBx.defaultTextFormat = _local1;
maxFpsTxtBx.x = 7;
maxFpsTxtBx.y = 5;
minMemTxtBx = new TextField();
minMemTxtBx.autoSize = TextFieldAutoSize.LEFT;
minMemTxtBx.defaultTextFormat = _local1;
minMemTxtBx.x = 7;
minMemTxtBx.y = 83;
maxMemTxtBx = new TextField();
maxMemTxtBx.autoSize = TextFieldAutoSize.LEFT;
maxMemTxtBx.defaultTextFormat = _local1;
maxMemTxtBx.x = 7;
maxMemTxtBx.y = 50;
addChild(box);
addChild(infoTxtBx);
addChild(minFpsTxtBx);
addChild(maxFpsTxtBx);
addChild(minMemTxtBx);
addChild(maxMemTxtBx);
addChild(fps);
addChild(mb);
this.addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
}
private function added(_arg1:Event):void{
resize();
stage.addEventListener(Event.RESIZE, resize, false, 0, true);
}
private function removed(_arg1:Event):void{
stage.removeEventListener(Event.RESIZE, resize);
}
private function resize(_arg1:Event=null):void{
var _local2:Graphics = box.graphics;
_local2.clear();
_local2.beginFill(0, 0.5);
_local2.drawRect(0, 0, stage.stageWidth, 120);
_local2.lineStyle(1, 0xFFFFFF, 0.2);
_local2.moveTo(65, 45);
_local2.lineTo(65, 10);
_local2.moveTo(65, 45);
_local2.lineTo((stage.stageWidth - 15), 45);
_local2.moveTo(65, 90);
_local2.lineTo(65, 55);
_local2.moveTo(65, 90);
_local2.lineTo((stage.stageWidth - 15), 90);
_local2.endFill();
infoTxtBx.x = ((stage.stageWidth - infoTxtBx.width) - 20);
}
public function update(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Array, _arg10:Array, _arg11:int):void{
var _local19:Number;
if (_arg1 >= 1){
minFpsTxtBx.text = (_arg2.toFixed(3) + " Fps");
maxFpsTxtBx.text = (_arg3.toFixed(3) + " Fps");
minMemTxtBx.text = (_arg4.toFixed(3) + " Mb");
maxMemTxtBx.text = (_arg5.toFixed(3) + " Mb");
};
infoTxtBx.text = (((((("Current Fps " + _arg6.toFixed(3)) + " | Average Fps ") + _arg8.toFixed(3)) + " | Memory Used ") + _arg7.toFixed(3)) + " Mb");
infoTxtBx.x = ((stage.stageWidth - infoTxtBx.width) - 20);
var _local12:Graphics = fps.graphics;
_local12.clear();
_local12.lineStyle(1, 0x33FF00, 0.7);
var _local13:int;
var _local14:int = _arg9.length;
var _local15 = 35;
var _local16:int = (stage.stageWidth - 80);
var _local17:Number = (_local16 / (_arg11 - 1));
var _local18:Number = (_arg3 - _arg2);
_local13 = 0;
while (_local13 < _local14) {
_local19 = ((_arg9[_local13] - _arg2) / _local18);
if (_local13 == 0){
_local12.moveTo(0, (-(_local19) * _local15));
} else {
_local12.lineTo((_local13 * _local17), (-(_local19) * _local15));
};
_local13++;
};
_local12 = mb.graphics;
_local12.clear();
_local12.lineStyle(1, 26367, 0.7);
_local13 = 0;
_local14 = _arg10.length;
_local18 = (_arg5 - _arg4);
_local13 = 0;
while (_local13 < _local14) {
_local19 = ((_arg10[_local13] - _arg4) / _local18);
if (_local13 == 0){
_local12.moveTo(0, (-(_local19) * _local15));
} else {
_local12.lineTo((_local13 * _local17), (-(_local19) * _local15));
};
_local13++;
};
}
}
Section 18
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var priority:int;
public var start:Number;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var name:String;
public var property:String;
public var nextNode:PropTween;
public var isPlugin:Boolean;
public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
if (_arg7){
_arg7.prevNode = this;
this.nextNode = _arg7;
};
this.priority = _arg8;
}
}
}//package com.greensock.core
Section 19
//SimpleTimeline (com.greensock.core.SimpleTimeline)
package com.greensock.core {
public class SimpleTimeline extends TweenCore {
public var autoRemoveChildren:Boolean;
protected var _lastChild:TweenCore;
protected var _firstChild:TweenCore;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local5:Number;
var _local6:TweenCore;
var _local4:TweenCore = _firstChild;
this.cachedTotalTime = _arg1;
this.cachedTime = _arg1;
while (_local4) {
_local6 = _local4.nextNode;
if (((_local4.active) || ((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))))){
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.timeline){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
if (_firstChild){
_firstChild.prevNode = _arg1;
_arg1.nextNode = _firstChild;
} else {
_arg1.nextNode = null;
};
_firstChild = _arg1;
_arg1.prevNode = null;
}
public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (((!(_arg1.gc)) && (!(_arg2)))){
_arg1.setEnabled(false, true);
};
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_lastChild == _arg1){
_lastChild = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_firstChild == _arg1){
_firstChild = _arg1.nextNode;
};
};
_arg1.nextNode = (_arg1.prevNode = null);
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
}
}//package com.greensock.core
Section 20
//TweenCore (com.greensock.core.TweenCore)
package com.greensock.core {
import com.greensock.*;
public class TweenCore {
public var initted:Boolean;
protected var _hasUpdate:Boolean;
public var active:Boolean;
protected var _delay:Number;
public var cachedTime:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
protected var _rawPrevTime:Number;// = -1
public var vars:Object;
public var cachedTotalTime:Number;
public var timeline:SimpleTimeline;
public var data;
public var cachedStartTime:Number;
public var prevNode:TweenCore;
public var cachedDuration:Number;
public var gc:Boolean;
protected var _pauseTime:Number;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var cachedTimeScale:Number;
public var cachedTotalDuration:Number;
public static const version:Number = 1;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
this.vars = ((_arg2) || ({}));
this.cachedDuration = (this.cachedTotalDuration = ((_arg1) || (0)));
_delay = ((this.vars.delay) || (0));
this.cachedTimeScale = ((this.vars.timeScale) || (1));
this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false)))));
this.cachedTotalTime = (this.cachedTime = 0);
this.data = this.vars.data;
if (!_classInitted){
if (isNaN(TweenLite.rootFrame)){
TweenLite.initClass();
_classInitted = true;
} else {
return;
};
};
var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline;
this.cachedStartTime = (_local3.cachedTotalTime + _delay);
_local3.addChild(this);
if (this.vars.reversed){
this.cachedReversed = true;
};
if (this.vars.paused){
this.paused = true;
};
}
public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function get delay():Number{
return (_delay);
}
public function get duration():Number{
return (this.cachedDuration);
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
public function set startTime(_arg1:Number):void{
var _local2:Boolean = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc)))));
this.cachedStartTime = _arg1;
if (_local2){
this.timeline.addChild(this);
};
}
public function set delay(_arg1:Number):void{
this.startTime = (this.startTime + (_arg1 - _delay));
_delay = _arg1;
}
public function resume():void{
this.paused = false;
}
public function get paused():Boolean{
return (this.cachedPaused);
}
public function play():void{
this.reversed = false;
this.paused = false;
}
public function set duration(_arg1:Number):void{
this.cachedDuration = (this.cachedTotalDuration = _arg1);
setDirtyCache(false);
}
public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (!_arg1){
renderTime(this.cachedTotalDuration, _arg2, false);
return;
};
if (this.timeline.autoRemoveChildren){
this.setEnabled(false, false);
} else {
this.active = false;
};
if (!_arg2){
if (((((this.vars.onComplete) && ((this.cachedTime == this.cachedDuration)))) && (!(this.cachedReversed)))){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
} else {
if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){
this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams);
};
};
};
}
public function invalidate():void{
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
public function get reversed():Boolean{
return (this.cachedReversed);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
public function reverse(_arg1:Boolean=true):void{
this.reversed = true;
if (_arg1){
this.paused = false;
} else {
if (this.gc){
this.setEnabled(true, false);
};
};
}
public function set paused(_arg1:Boolean):void{
if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){
if (_arg1){
_pauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime));
_pauseTime = NaN;
setDirtyCache(false);
};
this.cachedPaused = _arg1;
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
};
if (((!(_arg1)) && (this.gc))){
this.setEnabled(true, false);
};
}
public function kill():void{
setEnabled(false, false);
}
public function set totalTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get currentTime():Number{
return (this.cachedTime);
}
protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
if (this.timeline){
_local3 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
if (this.cachedReversed){
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale));
} else {
this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale));
};
if (!this.timeline.cacheIsDirty){
setDirtyCache(false);
};
if (this.cachedTotalTime != _arg1){
renderTime(_arg1, _arg2, false);
};
};
}
public function pause():void{
this.paused = true;
}
public function set totalDuration(_arg1:Number):void{
this.duration = _arg1;
}
public function get totalDuration():Number{
return (this.cachedTotalDuration);
}
public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
if (_arg1 == this.gc){
this.gc = !(_arg1);
if (_arg1){
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (!_arg2){
this.timeline.addChild(this);
};
} else {
this.active = false;
if (!_arg2){
this.timeline.remove(this);
};
};
};
return (false);
}
}
}//package com.greensock.core
Section 21
//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 22
//Cubic (com.greensock.easing.Cubic)
package com.greensock.easing {
public class Cubic extends FastEase {
public static const power:uint = 2;
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_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) + _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) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 * 0.5) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package com.greensock.easing
Section 23
//FastEase (com.greensock.easing.FastEase)
package com.greensock.easing {
import com.greensock.*;
public class FastEase {
public static function activateEase(_arg1:Function, _arg2:int, _arg3:uint):void{
TweenLite.fastEaseLookup[_arg1] = [_arg2, _arg3];
}
public static function activate(_arg1:Array):void{
var _local3:Object;
var _local2:int = _arg1.length;
while (_local2--) {
_local3 = _arg1[_local2];
if (_local3.hasOwnProperty("power")){
activateEase(_local3.easeIn, 1, _local3.power);
activateEase(_local3.easeOut, 2, _local3.power);
activateEase(_local3.easeInOut, 3, _local3.power);
if (_local3.hasOwnProperty("easeNone")){
activateEase(_local3.easeNone, 1, 0);
};
};
};
}
}
}//package com.greensock.easing
Section 24
//Linear (com.greensock.easing.Linear)
package com.greensock.easing {
public class Linear extends FastEase {
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 25
//Quad (com.greensock.easing.Quad)
package com.greensock.easing {
public class Quad extends FastEase {
public static const power:uint = 1;
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
return (((((_arg3 * 0.5) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) * 0.5) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package com.greensock.easing
Section 26
//Strong (com.greensock.easing.Strong)
package com.greensock.easing {
public class Strong extends FastEase {
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 27
//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 28
//AutoAlphaPlugin (com.greensock.plugins.AutoAlphaPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _target:Object;
protected var _ignoreVisible:Boolean;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_ignoreVisible = Boolean(("visible" in _arg1));
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (!_ignoreVisible){
_target.visible = Boolean(!((_target.alpha == 0)));
};
}
}
}//package com.greensock.plugins
Section 29
//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 30
//BezierPlugin (com.greensock.plugins.BezierPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.greensock.core.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orient:Boolean;
protected var _orientData:Array;
protected var _target:Object;
protected var _beziers:Object;
public static const API:Number = 1;
protected static const _RAD2DEG:Number = 57.2957795130823;
public function BezierPlugin(){
_future = {};
super();
this.propName = "bezier";
this.overwriteProps = [];
}
override public function killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local6:int;
var _local7:String;
var _local8:Object;
_target = _arg1.target;
var _local4:Object = ((_arg1.vars.isTV)==true) ? _arg1.vars.exposedVars : _arg1.vars;
if (_local4.orientToBezier == true){
_orientData = [["x", "y", "rotation", 0, 0.01]];
_orient = true;
} else {
if ((_local4.orientToBezier is Array)){
_orientData = _local4.orientToBezier;
_orient = true;
};
};
var _local5:Object = {};
_local6 = 0;
while (_local6 < _arg2.length) {
for (_local7 in _arg2[_local6]) {
if (_local5[_local7] == undefined){
_local5[_local7] = [_arg1.target[_local7]];
};
if (typeof(_arg2[_local6][_local7]) == "number"){
_local5[_local7].push(_arg2[_local6][_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_arg2[_local6][_local7])));
};
};
_local6++;
};
for (_local7 in _local5) {
this.overwriteProps[this.overwriteProps.length] = _local7;
if (_local4[_local7] != undefined){
if (typeof(_local4[_local7]) == "number"){
_local5[_local7].push(_local4[_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_local4[_local7])));
};
_local8 = {};
_local8[_local7] = true;
_arg1.killVars(_local8, false);
delete _local4[_local7];
};
};
_beziers = parseBeziers(_local5, _arg3);
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:String;
var _local4:Object;
var _local5:Number;
var _local6:uint;
var _local7:Number;
var _local8:Object;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
var _local13:Object;
var _local14:Boolean;
if (_arg1 == 1){
for (_local3 in _beziers) {
_local2 = (_beziers[_local3].length - 1);
_target[_local3] = _beziers[_local3][_local2][2];
};
} else {
for (_local3 in _beziers) {
_local6 = _beziers[_local3].length;
if (_arg1 < 0){
_local2 = 0;
} else {
if (_arg1 >= 1){
_local2 = (_local6 - 1);
} else {
_local2 = int((_local6 * _arg1));
};
};
_local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6);
_local4 = _beziers[_local3][_local2];
if (this.round){
_local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
_target[_local3] = ((_local7)>0) ? int((_local7 + 0.5)) : int((_local7 - 0.5));
} else {
_target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
};
};
};
if (_orient){
_local2 = _orientData.length;
_local8 = {};
while (_local2--) {
_local11 = _orientData[_local2];
_local8[_local11[0]] = _target[_local11[0]];
_local8[_local11[1]] = _target[_local11[1]];
};
_local13 = _target;
_local14 = this.round;
_target = _future;
this.round = false;
_orient = false;
_local2 = _orientData.length;
while (_local2--) {
_local11 = _orientData[_local2];
this.changeFactor = (_arg1 + ((_local11[4]) || (0.01)));
_local12 = ((_local11[3]) || (0));
_local9 = (_future[_local11[0]] - _local8[_local11[0]]);
_local10 = (_future[_local11[1]] - _local8[_local11[1]]);
_local13[_local11[2]] = ((Math.atan2(_local10, _local9) * _RAD2DEG) + _local12);
};
_target = _local13;
this.round = _local14;
_orient = true;
};
}
public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:int;
var _local4:Array;
var _local5:Object;
var _local6:String;
var _local7:Object = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]];
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]];
_local3++;
};
} else {
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)];
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)];
_local3++;
};
_local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]];
} else {
if (_local4.length == 3){
_local5[_local5.length] = [_local4[0], _local4[1], _local4[2]];
} else {
if (_local4.length == 2){
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
};
};
};
return (_local7);
}
}
}//package com.greensock.plugins
Section 31
//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 32
//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 33
//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 onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = ColorMatrixFilter;
var _local4:Object = _arg2;
initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice()), _propNames);
_matrix = ColorMatrixFilter(_filter).matrix;
var _local5:Array = [];
if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){
_local5 = _local4.matrix;
} else {
if (_local4.relative == true){
_local5 = _matrix.slice();
} else {
_local5 = _idMatrix.slice();
};
_local5 = setBrightness(_local5, _local4.brightness);
_local5 = setContrast(_local5, _local4.contrast);
_local5 = setHue(_local5, _local4.hue);
_local5 = setSaturation(_local5, _local4.saturation);
_local5 = setThreshold(_local5, _local4.threshold);
if (!isNaN(_local4.colorize)){
_local5 = colorize(_local5, _local4.colorize, _local4.amount);
};
};
_matrixTween = new EndArrayPlugin();
_matrixTween.init(_matrix, _local5);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Number = (1 - _arg2);
var _local4:Number = (_local3 * _lumR);
var _local5:Number = (_local3 * _lumG);
var _local6:Number = (_local3 * _lumB);
var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
var _local3:Number = Math.cos(_arg2);
var _local4:Number = Math.sin(_arg2);
var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
var _local3:Array = [];
var _local4:int;
var _local5:int;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF);
var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF);
var _local6:Number = ((_arg2 & 0xFF) / 0xFF);
var _local7:Number = (1 - _arg3);
var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
}
}//package com.greensock.plugins
Section 34
//ColorTransformPlugin (com.greensock.plugins.ColorTransformPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import flash.geom.*;
public class ColorTransformPlugin extends TintPlugin {
public static const API:Number = 1;
public function ColorTransformPlugin(){
this.propName = "colorTransform";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local5:String;
var _local6:Number;
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = _arg1.transform.colorTransform;
for (_local5 in _arg2) {
if ((((_local5 == "tint")) || ((_local5 == "color")))){
if (_arg2[_local5] != null){
_local4.color = int(_arg2[_local5]);
};
} else {
if ((((((_local5 == "tintAmount")) || ((_local5 == "exposure")))) || ((_local5 == "brightness")))){
} else {
_local4[_local5] = _arg2[_local5];
};
};
};
if (!isNaN(_arg2.tintAmount)){
_local6 = (_arg2.tintAmount / (1 - (((_local4.redMultiplier + _local4.greenMultiplier) + _local4.blueMultiplier) / 3)));
_local4.redOffset = (_local4.redOffset * _local6);
_local4.greenOffset = (_local4.greenOffset * _local6);
_local4.blueOffset = (_local4.blueOffset * _local6);
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - _arg2.tintAmount)));
} else {
if (!isNaN(_arg2.exposure)){
_local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = (0xFF * (_arg2.exposure - 1))));
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = 1));
} else {
if (!isNaN(_arg2.brightness)){
_local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = Math.max(0, ((_arg2.brightness - 1) * 0xFF))));
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - Math.abs((_arg2.brightness - 1)))));
};
};
};
_ignoreAlpha = Boolean(((!((_arg3.vars.alpha == undefined))) && ((_arg2.alphaMultiplier == undefined))));
init((_arg1 as DisplayObject), _local4);
return (true);
}
}
}//package com.greensock.plugins
Section 35
//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 36
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _a:Array;
protected var _info:Array;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
public function init(_arg1:Array, _arg2:Array):void{
_a = _arg1;
var _local3:int = _arg2.length;
while (_local3--) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local2:int = _info.length;
if (this.round){
while (_local2--) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_a[_local3.index] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
};
};
}
}
}//package com.greensock.plugins
class ArrayTweenInfo {
public var change:Number;
public var start:Number;
public var index:uint;
private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
Section 37
//FilterPlugin (com.greensock.plugins.FilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import com.greensock.core.*;
import flash.filters.*;
public class FilterPlugin extends TweenPlugin {
protected var _remove:Boolean;
protected var _target:Object;
protected var _index:int;
protected var _filter:BitmapFilter;
protected var _type:Class;
public static const VERSION:Number = 2.03;
public static const API:Number = 1;
public function onCompleteTween():void{
var _local1:Array;
var _local2:int;
if (_remove){
_local1 = _target.filters;
if (!(_local1[_index] is _type)){
_local2 = _local1.length;
while (_local2--) {
if ((_local1[_local2] is _type)){
_local1.splice(_local2, 1);
break;
};
};
} else {
_local1.splice(_index, 1);
};
_target.filters = _local1;
};
}
protected function initFilter(_arg1:Object, _arg2:BitmapFilter, _arg3:Array):void{
var _local5:String;
var _local6:int;
var _local7:HexColorsPlugin;
var _local4:Array = _target.filters;
var _local8:Object = ((_arg1 is BitmapFilter)) ? {} : _arg1;
_index = -1;
if (_local8.index != null){
_index = _local8.index;
} else {
_local6 = _local4.length;
while (_local6--) {
if ((_local4[_local6] is _type)){
_index = _local6;
break;
};
};
};
if ((((((_index == -1)) || ((_local4[_index] == null)))) || ((_local8.addFilter == true)))){
_index = ((_local8.index)!=null) ? _local8.index : _local4.length;
_local4[_index] = _arg2;
_target.filters = _local4;
};
_filter = _local4[_index];
if (_local8.remove == true){
_remove = true;
this.onComplete = onCompleteTween;
};
_local6 = _arg3.length;
while (_local6--) {
_local5 = _arg3[_local6];
if ((((_local5 in _arg1)) && (!((_filter[_local5] == _arg1[_local5]))))){
if ((((((_local5 == "color")) || ((_local5 == "highlightColor")))) || ((_local5 == "shadowColor")))){
_local7 = new HexColorsPlugin();
_local7.initColor(_filter, _local5, _filter[_local5], _arg1[_local5]);
_tweens[_tweens.length] = new PropTween(_local7, "changeFactor", 0, 1, _local5, false);
} else {
if ((((((((_local5 == "quality")) || ((_local5 == "inner")))) || ((_local5 == "knockout")))) || ((_local5 == "hideObject")))){
_filter[_local5] = _arg1[_local5];
} else {
addTween(_filter, _local5, _filter[_local5], _arg1[_local5], _local5);
};
};
};
};
}
override public function set changeFactor(_arg1:Number):void{
var _local3:PropTween;
var _local2:int = _tweens.length;
var _local4:Array = _target.filters;
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
if (!(_local4[_index] is _type)){
_local2 = (_index = _local4.length);
while (_local2--) {
if ((_local4[_local2] is _type)){
_index = _local2;
break;
};
};
};
_local4[_index] = _filter;
_target.filters = _local4;
}
}
}//package com.greensock.plugins
Section 38
//FrameLabelPlugin (com.greensock.plugins.FrameLabelPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class FrameLabelPlugin extends FramePlugin {
public static const API:Number = 1;
public function FrameLabelPlugin(){
this.propName = "frameLabel";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if ((!(_arg3.target) is MovieClip)){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
var _local4:Array = _target.currentLabels;
var _local5:String = _arg2;
var _local6:int = _target.currentFrame;
var _local7:int = _local4.length;
while (_local7--) {
if (_local4[_local7].name == _local5){
_local6 = _local4[_local7].frame;
break;
};
};
if (this.frame != _local6){
addTween(this, "frame", this.frame, _local6, "frame");
};
return (true);
}
}
}//package com.greensock.plugins
Section 39
//FramePlugin (com.greensock.plugins.FramePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class FramePlugin extends TweenPlugin {
protected var _target:MovieClip;
public var frame:int;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame", "frameLabel"];
this.round = true;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
}
}//package com.greensock.plugins
Section 40
//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 41
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class HexColorsPlugin extends TweenPlugin {
protected var _colors:Array;
public static const API:Number = 1;
public function HexColorsPlugin(){
this.propName = "hexColors";
this.overwriteProps = [];
_colors = [];
}
override public function killProps(_arg1:Object):void{
var _local2:int = (_colors.length - 1);
while (_local2 > -1) {
if (_arg1[_colors[_local2][1]] != undefined){
_colors.splice(_local2, 1);
};
_local2--;
};
super.killProps(_arg1);
}
public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_arg3 != _arg4){
_local5 = (_arg3 >> 16);
_local6 = ((_arg3 >> 8) & 0xFF);
_local7 = (_arg3 & 0xFF);
_colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)];
this.overwriteProps[this.overwriteProps.length] = _arg2;
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:Array;
_local2 = (_colors.length - 1);
while (_local2 > -1) {
_local3 = _colors[_local2];
_local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7])));
_local2--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
for (_local4 in _arg2) {
initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4]));
};
return (true);
}
}
}//package com.greensock.plugins
Section 42
//Physics2DPlugin (com.greensock.plugins.Physics2DPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import com.greensock.core.*;
public class Physics2DPlugin extends TweenPlugin {
protected var _y:Physics2DProp;
protected var _stepsPerTimeUnit:uint;// = 30
protected var _friction:Number;// = 1
protected var _step:uint;
protected var _tween:TweenLite;
protected var _target:DisplayObject;
protected var _x:Physics2DProp;
protected var _skipX:Boolean;
protected var _skipY:Boolean;
public static const API:Number = 1;
private static const _DEG2RAD:Number = 0.0174532925199433;
public function Physics2DPlugin(){
this.propName = "physics2D";
this.overwriteProps = ["x", "y"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
trace("Tween Error: physics2D requires that the target be a DisplayObject.");
return (false);
};
_target = DisplayObject(_arg1);
_tween = _arg3;
_step = 0;
var _local4:SimpleTimeline = _tween.timeline;
while (_local4.timeline) {
_local4 = _local4.timeline;
};
if (_local4 == TweenLite.rootFramesTimeline){
_stepsPerTimeUnit = 1;
};
var _local5:Number = ((Number(_arg2.angle)) || (0));
var _local6:Number = ((Number(_arg2.velocity)) || (0));
var _local7:Number = ((Number(_arg2.acceleration)) || (0));
var _local8:Number = (((_arg2.accelerationAngle) || ((_arg2.accelerationAngle == 0)))) ? Number(_arg2.accelerationAngle) : _local5;
if (_arg2.gravity){
_local7 = Number(_arg2.gravity);
_local8 = 90;
};
_local5 = (_local5 * _DEG2RAD);
_local8 = (_local8 * _DEG2RAD);
if (_arg2.friction){
_friction = (1 - Number(_arg2.friction));
};
_x = new Physics2DProp(_target.x, (Math.cos(_local5) * _local6), (Math.cos(_local8) * _local7), _stepsPerTimeUnit);
_y = new Physics2DProp(_target.y, (Math.sin(_local5) * _local6), (Math.sin(_local8) * _local7), _stepsPerTimeUnit);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:Number;
var _local8:int;
var _local2:Number = _tween.cachedTime;
if (_friction == 1){
_local5 = ((_local2 * _local2) * 0.5);
_local3 = (_x.start + ((_x.velocity * _local2) + (_x.acceleration * _local5)));
_local4 = (_y.start + ((_y.velocity * _local2) + (_y.acceleration * _local5)));
} else {
_local6 = (int((_local2 * _stepsPerTimeUnit)) - _step);
_local7 = ((_local2 * _stepsPerTimeUnit) % 1);
if (_local6 >= 0){
_local8 = _local6;
while (_local8--) {
_x.v = (_x.v + _x.a);
_y.v = (_y.v + _y.a);
_x.v = (_x.v * _friction);
_y.v = (_y.v * _friction);
_x.value = (_x.value + _x.v);
_y.value = (_y.value + _y.v);
};
} else {
_local8 = -(_local6);
while (_local8--) {
_x.value = (_x.value - _x.v);
_y.value = (_y.value - _y.v);
_x.v = (_x.v / _friction);
_y.v = (_y.v / _friction);
_x.v = (_x.v - _x.a);
_y.v = (_y.v - _y.a);
};
};
_local3 = (_x.value + (_x.v * _local7));
_local4 = (_y.value + (_y.v * _local7));
_step = (_step + _local6);
};
if (this.round){
_local3 = ((_local3)>0) ? int((_local3 + 0.5)) : int((_local3 - 0.5));
_local4 = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
if (!_skipX){
_target.x = _local3;
};
if (!_skipY){
_target.y = _local4;
};
}
override public function killProps(_arg1:Object):void{
if (("x" in _arg1)){
_skipX = true;
};
if (("y" in _arg1)){
_skipY = true;
};
super.killProps(_arg1);
}
}
}//package com.greensock.plugins
class Physics2DProp {
public var acceleration:Number;
public var a:Number;
public var start:Number;
public var value:Number;
public var v:Number;
public var velocity:Number;
private function Physics2DProp(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:uint){
this.start = (this.value = _arg1);
this.velocity = _arg2;
this.v = (this.velocity / _arg4);
if (((_arg3) || ((_arg3 == 0)))){
this.acceleration = _arg3;
this.a = (this.acceleration / (_arg4 * _arg4));
} else {
this.acceleration = (this.a = 0);
};
}
}
Section 43
//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 44
//RoundPropsPlugin (com.greensock.plugins.RoundPropsPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class RoundPropsPlugin extends TweenPlugin {
public static const API:Number = 1;
public function RoundPropsPlugin(){
this.propName = "roundProps";
this.overwriteProps = [];
this.round = true;
}
public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package com.greensock.plugins
Section 45
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class ShortRotationPlugin extends TweenPlugin {
public static const API:Number = 1;
public function ShortRotationPlugin(){
this.propName = "shortRotation";
this.overwriteProps = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
if (typeof(_arg2) == "number"){
trace("WARNING: You appear to be using the old shortRotation syntax. Instead of passing a number, please pass an object with properties that correspond to the rotations values For example, TweenMax.to(mc, 2, {shortRotation:{rotationX:-170, rotationY:25}})");
return (false);
};
for (_local4 in _arg2) {
initRotation(_arg1, _local4, _arg1[_local4], _arg2[_local4]);
};
return (true);
}
public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local5:Number = ((_arg4 - _arg3) % 360);
if (((_arg4 - _arg3) % 360) != (_local5 % 180)){
_local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360);
};
addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package com.greensock.plugins
Section 46
//TintPlugin (com.greensock.plugins.TintPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import com.greensock.core.*;
import flash.geom.*;
public class TintPlugin extends TweenPlugin {
protected var _ct:ColorTransform;
protected var _transform:Transform;
protected var _ignoreAlpha:Boolean;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.vars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_transform.colorTransform = _ct;
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local4:String;
_transform = _arg1.transform;
_ct = _transform.colorTransform;
var _local3:int = _props.length;
while (_local3--) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new PropTween(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
};
}
}
}//package com.greensock.plugins
Section 47
//TweenPlugin (com.greensock.plugins.TweenPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.greensock.core.*;
public class TweenPlugin {
public var activeDisable:Boolean;
protected var _changeFactor:Number;// = 0
protected var _tweens:Array;
public var onDisable:Function;
public var propName:String;
public var round:Boolean;
public var onEnable:Function;
public var priority:int;// = 0
public var overwriteProps:Array;
public var onComplete:Function;
public static const VERSION:Number = 1.31;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
protected function updateTweens(_arg1:Number):void{
var _local3:PropTween;
var _local4:Number;
var _local2:int = _tweens.length;
if (this.round){
while (_local2--) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local3.target[_local3.property] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
};
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (Number(_arg4) - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new PropTween(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
public function get changeFactor():Number{
return (_changeFactor);
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function killProps(_arg1:Object):void{
var _local2:int = this.overwriteProps.length;
while (_local2--) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
};
_local2 = _tweens.length;
while (_local2--) {
if ((PropTween(_tweens[_local2]).name in _arg1)){
_tweens.splice(_local2, 1);
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
public static function activate(_arg1:Array):Boolean{
var _local3:Object;
TweenLite.onPluginEvent = TweenPlugin.onTweenEvent;
var _local2:int = _arg1.length;
while (_local2--) {
if (_arg1[_local2].hasOwnProperty("API")){
_local3 = new ((_arg1[_local2] as Class));
TweenLite.plugins[_local3.propName] = _arg1[_local2];
};
};
return (true);
}
private static function onTweenEvent(_arg1:String, _arg2:TweenLite):Boolean{
var _local4:Boolean;
var _local5:Array;
var _local6:int;
var _local3:PropTween = _arg2.cachedPT1;
if (_arg1 == "onInit"){
_local5 = [];
while (_local3) {
_local5[_local5.length] = _local3;
_local3 = _local3.nextNode;
};
_local5.sortOn("priority", (Array.NUMERIC | Array.DESCENDING));
_local6 = _local5.length;
while (_local6--) {
PropTween(_local5[_local6]).nextNode = _local5[(_local6 + 1)];
PropTween(_local5[_local6]).prevNode = _local5[(_local6 - 1)];
};
_arg2.cachedPT1 = _local5[0];
} else {
while (_local3) {
if (((_local3.isPlugin) && (_local3.target[_arg1]))){
if (_local3.target.activeDisable){
_local4 = true;
};
var _local7 = _local3.target;
_local7[_arg1]();
};
_local3 = _local3.nextNode;
};
};
return (_local4);
}
}
}//package com.greensock.plugins
Section 48
//VisiblePlugin (com.greensock.plugins.VisiblePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class VisiblePlugin extends TweenPlugin {
protected var _target:Object;
protected var _initVal:Boolean;
protected var _visible:Boolean;
protected var _tween:TweenLite;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_initVal = _target.visible;
_visible = Boolean(_arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
if ((((_arg1 == 1)) && ((_tween.cachedDuration == _tween.cachedTime)))){
_target.visible = _visible;
} else {
_target.visible = _initVal;
};
}
}
}//package com.greensock.plugins
Section 49
//VolumePlugin (com.greensock.plugins.VolumePlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.media.*;
import com.greensock.*;
public class VolumePlugin extends TweenPlugin {
protected var _target:Object;
protected var _st:SoundTransform;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
}
}//package com.greensock.plugins
Section 50
//OverwriteManager (com.greensock.OverwriteManager)
package com.greensock {
import com.greensock.core.*;
import flash.utils.*;
import flash.errors.*;
public class OverwriteManager {
public static const ALL_ONSTART:int = 4;
public static const CONCURRENT:int = 3;
public static const ALL_IMMEDIATE:int = 1;
public static const PREEXISTING:int = 5;
public static const AUTO:int = 2;
public static const version:Number = 6;
public static const NONE:int = 0;
public static var enabled:Boolean;
public static var mode:int;
public static function getGlobalPaused(_arg1:TweenCore):Boolean{
while (_arg1) {
if (_arg1.cachedPaused){
return (true);
};
_arg1 = _arg1.timeline;
};
return (false);
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 11.099994){
throw (new Error("Warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."));
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Object, _arg3:Array, _arg4:uint):Boolean{
var _local5:int;
var _local6:Boolean;
var _local7:TweenLite;
var _local13:uint;
var _local14:Number;
var _local15:Number;
var _local16:TweenCore;
var _local17:Number;
var _local18:SimpleTimeline;
if (_arg4 >= 4){
_local13 = _arg3.length;
_local5 = 0;
while (_local5 < _local13) {
_local7 = _arg3[_local5];
if (_local7 != _arg1){
if (_local7.setEnabled(false, false)){
_local6 = true;
};
} else {
if (_arg4 == 5){
break;
};
};
_local5++;
};
return (_local6);
};
var _local8:Number = _arg1.startTime;
var _local9:Array = [];
var _local10:Array = [];
var _local11:uint;
var _local12:uint;
_local5 = _arg3.length;
while (_local5--) {
_local7 = _arg3[_local5];
if ((((_local7 == _arg1)) || (_local7.gc))){
} else {
if (_local7.timeline != _arg1.timeline){
if (!getGlobalPaused(_local7)){
var _temp1 = _local11;
_local11 = (_local11 + 1);
var _local19 = _temp1;
_local10[_local19] = _local7;
};
} else {
if ((((((_local7.startTime <= _local8)) && (((_local7.startTime + _local7.totalDuration) > _local8)))) && (!(getGlobalPaused(_local7))))){
var _temp2 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp2;
_local9[_local19] = _local7;
};
};
};
};
if (_local11 != 0){
_local14 = _arg1.cachedTimeScale;
_local15 = _local8;
_local18 = _arg1.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.startTime);
_local18 = _local18.timeline;
};
_local8 = (_local14 * _local15);
_local5 = _local11;
while (_local5--) {
_local16 = _local10[_local5];
_local14 = _local16.cachedTimeScale;
_local15 = _local16.startTime;
_local18 = _local16.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.startTime);
_local18 = _local18.timeline;
};
_local17 = (_local14 * _local15);
if ((((_local17 <= _local8)) && (((((_local17 + (_local16.totalDuration * _local14)) > _local8)) || ((_local16.cachedDuration == 0)))))){
var _temp3 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp3;
_local9[_local19] = _local16;
};
};
};
if (_local12 == 0){
return (_local6);
};
_local5 = _local12;
if (_arg4 == 2){
while (_local5--) {
_local7 = _local9[_local5];
if (_local7.killVars(_arg2)){
_local6 = true;
};
if ((((_local7.cachedPT1 == null)) && (_local7.initted))){
_local7.setEnabled(false, false);
};
};
} else {
while (_local5--) {
if (TweenLite(_local9[_local5]).setEnabled(false, false)){
_local6 = true;
};
};
};
return (_local6);
}
}
}//package com.greensock
Section 51
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.events.*;
import flash.display.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
public class TweenLite extends TweenCore {
protected var _hasPlugins:Boolean;
public var propTweenLookup:Object;
public var cachedPT1:PropTween;
protected var _overwrite:uint;
protected var _ease:Function;
public var target:Object;
public var ratio:Number;// = 0
protected var _overwrittenProps:Object;
protected var _notifyPluginsOfEnabled:Boolean;
public static const version:Number = 11.101;
public static var rootTimeline:SimpleTimeline;
public static var fastEaseLookup:Dictionary = new Dictionary(false);
public static var onPluginEvent:Function;
public static var rootFramesTimeline:SimpleTimeline;
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var masterList:Dictionary = new Dictionary(false);
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _shape:Shape = new Shape();
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local5:TweenLite;
super(_arg2, _arg3);
this.target = _arg1;
if ((((this.target is TweenCore)) && (("timeScale" in this.vars)))){
this.cachedTimeScale = 1;
};
propTweenLookup = {};
_ease = defaultEase;
_overwrite = (((!(("overwrite" in _arg3))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
var _local4:Array = masterList[_arg1];
if (!_local4){
masterList[_arg1] = [this];
} else {
if (_overwrite == 1){
for each (_local5 in _local4) {
if (!_local5.gc){
_local5.setEnabled(false, false);
};
};
masterList[_arg1] = [this];
} else {
_local4[_local4.length] = this;
};
};
if (((this.active) || (this.vars.immediateRender))){
renderTime(0, false, true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number = this.cachedTime;
this.active = true;
if (_arg1 >= this.cachedDuration){
this.cachedTotalTime = (this.cachedTime = this.cachedDuration);
this.ratio = 1;
_local4 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime > 0){
_arg3 = true;
_local4 = true;
};
_rawPrevTime = _arg1;
};
};
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local4 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
this.ratio = _ease(_arg1, 0, 1, this.cachedDuration);
};
};
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
if (((!(_local4)) && (this.cachedTime))){
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
var _local6:PropTween = this.cachedPT1;
while (_local6) {
_local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change));
_local6 = _local6.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local4){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:Array;
if (_arg1 == this.gc){
if (_arg1){
_local3 = TweenLite.masterList[this.target];
if (!_local3){
TweenLite.masterList[this.target] = [this];
} else {
_local3[_local3.length] = this;
};
};
super.setEnabled(_arg1, _arg2);
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this));
};
};
return (false);
}
protected function init():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:Boolean;
var _local5:Array;
var _local6:PropTween;
if (typeof(this.vars.ease) == "function"){
_ease = this.vars.ease;
};
if (this.vars.easeParams){
this.vars.proxiedEase = _ease;
_ease = easeProxy;
};
this.cachedPT1 = null;
this.propTweenLookup = {};
for (_local1 in this.vars) {
if ((((_local1 in _reservedProps)) && (!((((_local1 == "timeScale")) && ((this.target is TweenCore))))))){
} else {
if ((((_local1 in plugins)) && (new ((plugins[_local1] as Class)).onInitTween(this.target, this.vars[_local1], this)))){
this.cachedPT1 = new PropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
if (this.cachedPT1.name == "_MULTIPLE_"){
_local2 = _local3.overwriteProps.length;
while (_local2--) {
this.propTweenLookup[_local3.overwriteProps[_local2]] = this.cachedPT1;
};
} else {
this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1;
};
if (_local3.priority){
this.cachedPT1.priority = _local3.priority;
_local4 = true;
};
if (((_local3.onDisable) || (_local3.onEnable))){
_notifyPluginsOfEnabled = true;
};
_hasPlugins = true;
} else {
this.cachedPT1 = new PropTween(this.target, _local1, Number(this.target[_local1]), ((typeof(this.vars[_local1]))=="number") ? (Number(this.vars[_local1]) - this.target[_local1]) : Number(this.vars[_local1]), _local1, false, this.cachedPT1);
this.propTweenLookup[_local1] = this.cachedPT1;
};
};
};
if (_local4){
onPluginEvent("onInit", this);
};
if (this.vars.runBackwards){
_local6 = this.cachedPT1;
while (_local6) {
_local6.start = (_local6.start + _local6.change);
_local6.change = -(_local6.change);
_local6 = _local6.nextNode;
};
};
_hasUpdate = Boolean(!((this.vars.onUpdate == null)));
if (_overwrittenProps){
killVars(_overwrittenProps);
if (this.cachedPT1 == null){
this.setEnabled(false, false);
};
};
if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){
if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){
init();
};
};
this.initted = true;
}
public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{
var _local3:String;
var _local4:PropTween;
var _local5:Boolean;
if (_overwrittenProps == null){
_overwrittenProps = {};
};
for (_local3 in _arg1) {
if ((_local3 in propTweenLookup)){
_local4 = propTweenLookup[_local3];
if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){
_local4.target.killProps(_arg1);
if (_local4.target.overwriteProps.length == 0){
_local4.name = "";
};
};
if (_local4.name != "_MULTIPLE_"){
if (_local4.nextNode){
_local4.nextNode.prevNode = _local4.prevNode;
};
if (_local4.prevNode){
_local4.prevNode.nextNode = _local4.nextNode;
} else {
if (this.cachedPT1 == _local4){
this.cachedPT1 = _local4.nextNode;
};
};
if (((_local4.isPlugin) && (_local4.target.onDisable))){
_local4.target.onDisable();
if (_local4.target.activeDisable){
_local5 = true;
};
};
delete propTweenLookup[_local3];
};
};
if (_arg2){
_overwrittenProps[_local3] = 1;
};
};
return (_local5);
}
override public function invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
public static function initClass():void{
rootFrame = 0;
rootTimeline = new SimpleTimeline(null);
rootFramesTimeline = new SimpleTimeline(null);
rootTimeline.cachedStartTime = (getTimer() * 0.001);
rootFramesTimeline.cachedStartTime = rootFrame;
rootTimeline.autoRemoveChildren = true;
rootFramesTimeline.autoRemoveChildren = true;
_shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
}
public static function killTweensOf(_arg1:Object, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
if ((_arg1 in masterList)){
_local3 = masterList[_arg1];
_local4 = _local3.length;
while (_local4--) {
if (!TweenLite(_local3[_local4]).gc){
if (_arg2){
TweenLite(_local3[_local4]).complete(false, false);
} else {
TweenLite(_local3[_local4]).setEnabled(false, false);
};
};
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenLite(_arg1, _arg2, _arg3));
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (1 - (_arg1 / _arg4));
return ((1 - (_arg1 * _arg1)));
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
protected static function updateAll(_arg1:Event=null):void{
var _local2:Dictionary;
var _local3:Object;
var _local4:Array;
var _local5:int;
rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false);
rootFrame++;
rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false);
if (!(rootFrame % 60)){
_local2 = masterList;
for (_local3 in _local2) {
_local4 = _local2[_local3];
_local5 = _local4.length;
while (_local5--) {
if (TweenLite(_local4[_local5]).gc){
_local4.splice(_local5, 1);
};
};
if (_local4.length == 0){
delete _local2[_local3];
};
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package com.greensock
Section 52
//TweenMax (com.greensock.TweenMax)
package com.greensock {
import flash.events.*;
import flash.display.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
import com.greensock.events.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _easeType:uint;
public var yoyo:Boolean;
protected var _easePower:uint;
protected var _repeat:int;// = 0
protected var _cyclesComplete:uint;// = 0
protected var _dispatcher:EventDispatcher;
protected var _hasUpdateListener:Boolean;
protected var _repeatDelay:Number;// = 0
public static const version:Number = 11.103;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
if (TweenLite.version < 11.1){
throw (new Error("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com."));
};
this.yoyo = Boolean(this.vars.yoyo);
_repeat = ((this.vars.repeat) || (0));
_repeatDelay = ((this.vars.repeatDelay) || (0));
this.cacheIsDirty = true;
if (((((((((this.vars.onCompleteListener) || (this.vars.onUpdateListener))) || (this.vars.onStartListener))) || (this.vars.onRepeatListener))) || (this.vars.onReverseCompleteListener))){
initDispatcher();
if ((((_arg2 == 0)) && ((_delay == 0)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
};
};
if (((("timeScale" in this.vars)) && (!((this.target is TweenCore))))){
this.cachedTimeScale = this.vars.timeScale;
};
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local10:Number;
var _local11:uint;
var _local12:Number;
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
var _local4:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
var _local5:Number = this.cachedTime;
if (_arg1 >= _local4){
this.cachedTotalTime = _local4;
this.cachedTime = this.cachedDuration;
this.ratio = 1;
_local6 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime > 0){
_arg3 = true;
_local6 = true;
};
_rawPrevTime = _arg1;
};
};
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local6 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
if (_repeat == 0){
_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){
this.cachedTime = (((((this.yoyo) && ((((this.cachedTotalTime / _local10) % 2) >= 1)))) || (((!(this.yoyo)) && (!(((this.cachedTotalTime / _local10) % 1))))))) ? (this.cachedDuration - (this.cachedTotalTime % _local10)) : (this.cachedTotalTime % _local10);
if (this.cachedTime >= this.cachedDuration){
this.cachedTime = this.cachedDuration;
this.ratio = 1;
} else {
if (this.cachedTime <= 0){
this.cachedTime = (this.ratio = 0);
} else {
_local8 = true;
};
};
};
};
if (((!((_cyclesComplete == int((this.cachedTotalTime / _local10))))) && (!(_local6)))){
_local7 = true;
_cyclesComplete = int((this.cachedTotalTime / _local10));
};
};
if ((((_local5 == this.cachedTime)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
};
if (_local8){
if (_easeType){
_local11 = _easePower;
_local12 = (this.cachedTime / this.cachedDuration);
if (_easeType == 2){
_local12 = (1 - _local12);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (1 - this.ratio);
} else {
if (_easeType == 1){
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
} else {
if (_local12 < 0.5){
_local12 = (_local12 * 2);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (this.ratio * 0.5);
} else {
_local12 = ((1 - _local12) * 2);
this.ratio = _local12;
while (_local11--) {
this.ratio = (_local12 * this.ratio);
};
this.ratio = (1 - (0.5 * this.ratio));
};
};
};
} else {
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if ((((((_local5 == 0)) && (!((this.cachedTotalTime == 0))))) && (!(_arg2)))){
if (this.vars.onStart){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
};
};
var _local9:PropTween = this.cachedPT1;
while (_local9) {
_local9.target[_local9.property] = (_local9.start + (this.ratio * _local9.change));
_local9 = _local9.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_hasUpdateListener) && (!(_arg2)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
};
if (_local6){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
} else {
if (((_local7) && (!(_arg2)))){
if (this.vars.onRepeat){
this.vars.onRepeat.apply(null, this.vars.onRepeatParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT));
};
};
};
}
public function willTrigger(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1));
}
protected function insertPropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String, _arg6:Boolean, _arg7:PropTween):PropTween{
var _local9:Array;
var _local10:int;
var _local8:PropTween = new PropTween(_arg1, _arg2, _arg3, ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4), _arg5, _arg6, _arg7);
if (((_arg6) && ((_arg5 == "_MULTIPLE_")))){
_local9 = _arg1.overwriteProps;
_local10 = _local9.length;
while (_local10--) {
this.propTweenLookup[_local9[_local10]] = _local8;
};
} else {
this.propTweenLookup[_arg5] = _local8;
};
return (_local8);
}
override protected function init():void{
var _local1:TweenMax;
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Object;
var _local7:PropTween;
var _local8: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;
_local8 = _local5.length;
while (_local8--) {
_local3 = _local5[_local8];
_local7 = this.cachedPT1;
while (_local7) {
if (_local7.name == _local3){
if (_local7.isPlugin){
_local7.target.round = true;
} else {
if (_local6 == null){
_local6 = new TweenLite.plugins.roundProps();
_local6.add(_local7.target, _local3, _local7.start, _local7.change);
_hasPlugins = true;
this.cachedPT1 = insertPropTween(_local6, "changeFactor", 0, 1, "_MULTIPLE_", true, this.cachedPT1);
} else {
_local6.add(_local7.target, _local3, _local7.start, _local7.change);
};
this.removePropTween(_local7);
};
} else {
if (((((_local7.isPlugin) && ((_local7.name == "_MULTIPLE_")))) && (!(_local7.target.round)))){
_local4 = ((" " + _local7.target.overwriteProps.join(" ")) + " ");
if (_local4.indexOf(((" " + _local3) + " ")) != -1){
_local7.target.round = true;
};
};
};
_local7 = _local7.nextNode;
};
};
};
}
public function get totalProgress():Number{
return ((this.cachedTotalTime / this.totalDuration));
}
public function set currentProgress(_arg1:Number):void{
if (_cyclesComplete == 0){
setTotalTime((this.duration * _arg1), false);
} else {
setTotalTime(((this.duration * _arg1) + (_cyclesComplete * this.cachedDuration)), false);
};
}
protected function adjustStartValues():void{
var _local1:Number;
var _local2:PropTween;
var _local3:Number;
if (this.cachedTime != 0){
_local1 = (1 / (1 - this.ratio));
_local2 = this.cachedPT1;
while (_local2) {
_local3 = (_local2.start + _local2.change);
if (_local2.isPlugin){
_local2.change = ((_local3 - this.ratio) * _local1);
} else {
_local2.change = ((_local3 - _local2.target[_local2.property]) * _local1);
};
_local2.start = (_local3 - _local2.change);
_local2 = _local2.nextNode;
};
};
}
public function get repeat():int{
return (_repeat);
}
public function set totalProgress(_arg1:Number):void{
setTotalTime((this.totalDuration * _arg1), false);
}
protected function removePropTween(_arg1:PropTween):Boolean{
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (this.cachedPT1 == _arg1){
this.cachedPT1 = _arg1.nextNode;
};
};
if (((_arg1.isPlugin) && (_arg1.target.onDisable))){
_arg1.target.onDisable();
if (_arg1.target.activeDisable){
return (true);
};
};
return (false);
}
public function get repeatDelay():Number{
return (_repeatDelay);
}
protected function updateTo(_arg1:Object, _arg2:Boolean=true):void{
var _local5:String;
var _local6:Object;
var _local7:Boolean;
var _local8:Object;
var _local9:int;
var _local3:PropTween = this.cachedPT1;
var _local4:Number = this.cachedTotalTime;
if (this.initted){
if (!_arg2){
this.totalTime = 0;
};
killVars(_arg1, false);
for (_local5 in _arg1) {
if ((_local5 in _reservedProps)){
} else {
if ((((_local5 in plugins)) && (new ((plugins[_local5] as Class)).onInitTween(this.target, _arg1[_local5], this)))){
_local8 = {};
_local9 = _local6.overwriteProps.length;
while (_local9--) {
_local8[_local6.overwriteProps[_local9]] = true;
};
killVars(_local8, false);
this.cachedPT1 = insertPropTween(_local6, "changeFactor", 0, 1, ((_local6.overwriteProps.length)==1) ? _local6.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
_hasPlugins = true;
if (_local6.priority){
this.cachedPT1.priority = _local6.priority;
_local7 = true;
};
} else {
this.cachedPT1 = insertPropTween(this.target, _local5, this.target[_local5], _arg1[_local5], _local5, false, this.cachedPT1);
};
};
this.vars[_local5] = _arg1[_local5];
};
if (_local7){
onPluginEvent("onInit", this);
};
if (((_arg2) && (this.cachedTotalTime))){
adjustStartValues();
};
} else {
for (_local5 in _arg1) {
this.vars[_local5] = _arg1[_local5];
};
};
}
public function killProperties(_arg1:Array):void{
var _local2:Object = {};
var _local3:int = _arg1.length;
while (_local3--) {
_local2[_arg1[_local3]] = true;
};
killVars(_local2);
}
public function set repeat(_arg1:int):void{
_repeat = _arg1;
setDirtyCache(true);
}
override public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
super.complete(_arg1, _arg2);
if (((!(_arg2)) && (_dispatcher))){
if ((((this.cachedTime == this.cachedDuration)) && (!(this.cachedReversed)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
} else {
if (((this.cachedReversed) && ((this.cachedTotalTime == 0)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE));
};
};
};
}
override public function invalidate():void{
this.yoyo = Boolean((this.vars.yoyo == true));
_repeat = ((this.vars.repeat) || (0));
_repeatDelay = ((this.vars.repeatDelay) || (0));
_hasUpdateListener = false;
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
initDispatcher();
};
setDirtyCache(true);
super.invalidate();
}
public function dispatchEvent(_arg1:Event):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1));
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{
var _local4:Object = {};
_local4[_arg1] = _arg2;
updateTo(_local4, _arg3);
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_dispatcher == null){
initDispatcher();
};
if (_arg1 == TweenEvent.UPDATE){
_hasUpdateListener = true;
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function set repeatDelay(_arg1:Number):void{
_repeatDelay = _arg1;
setDirtyCache(true);
}
override public function set currentTime(_arg1:Number):void{
if (_cyclesComplete == 0){
} else {
if (((this.yoyo) && (((_cyclesComplete % 2) == 1)))){
_arg1 = ((this.duration - _arg1) + (_cyclesComplete * (this.cachedDuration + _repeatDelay)));
} else {
_arg1 = (_arg1 + (_cyclesComplete * (this.duration + _repeatDelay)));
};
};
setTotalTime(_arg1, false);
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
protected function initDispatcher():void{
if (_dispatcher == null){
_dispatcher = new EventDispatcher(this);
};
if ((this.vars.onStartListener is Function)){
_dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true);
};
if ((this.vars.onUpdateListener is Function)){
_dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true);
_hasUpdateListener = true;
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
if ((this.vars.onRepeatListener is Function)){
_dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true);
};
if ((this.vars.onReverseCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true);
};
}
override public function set totalDuration(_arg1:Number):void{
if (_repeat == -1){
return;
};
this.duration = ((_arg1 - (_repeat * _repeatDelay)) / (_repeat + 1));
}
public function hasEventListener(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1));
}
override public function get totalDuration():Number{
if (this.cacheIsDirty){
this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat));
this.cacheIsDirty = false;
};
return (this.cachedTotalDuration);
}
public function set timeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
var _local2:Number = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
public function get timeScale():Number{
return (this.cachedTimeScale);
}
public static function set globalTimeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
if (TweenLite.rootTimeline == null){
TweenLite.to({}, 0, {});
};
var _local2:SimpleTimeline = TweenLite.rootTimeline;
var _local3:Number = (getTimer() * 0.001);
_local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1));
_local2 = TweenLite.rootFramesTimeline;
_local3 = TweenLite.rootFrame;
_local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1));
TweenLite.rootFramesTimeline.cachedTimeScale = (TweenLite.rootTimeline.cachedTimeScale = _arg1);
}
public static function fromTo(_arg1:Object, _arg2:Number, _arg3:Object, _arg4:Object):TweenMax{
_arg4.startAt = _arg3;
if (_arg3.immediateRender){
_arg4.immediateRender = true;
};
return (new TweenMax(_arg1, _arg2, _arg4));
}
public static function allFromTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Object, _arg5:Number=0, _arg6:Function=null, _arg7:Array=null):Array{
_arg4.startAt = _arg3;
if (_arg3.immediateRender){
_arg4.immediateRender = true;
};
return (allTo(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7));
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(true, _arg1, _arg2);
}
public static function getTweensOf(_arg1:Object):Array{
var _local4:int;
var _local2:Array = masterList[_arg1];
var _local3:Array = [];
if (_local2){
_local4 = _local2.length;
while (_local4--) {
if (!_local2[_local4].gc){
_local3[_local3.length] = _local2[_local4];
};
};
};
return (_local3);
}
public static function get globalTimeScale():Number{
return (((TweenLite.rootTimeline)==null) ? 1 : TweenLite.rootTimeline.cachedTimeScale);
}
public static function killChildTweensOf(_arg1:DisplayObjectContainer, _arg2:Boolean=false):void{
var _local4:Object;
var _local5:DisplayObjectContainer;
var _local3:Array = getAllTweens();
var _local6:int = _local3.length;
while (_local6--) {
_local4 = _local3[_local6].target;
if ((_local4 is DisplayObject)){
_local5 = _local4.parent;
while (_local5) {
if (_local5 == _arg1){
if (_arg2){
_local3[_local6].complete(false);
} else {
_local3[_local6].setEnabled(false, false);
};
};
_local5 = _local5.parent;
};
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{
return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
public static function isTweening(_arg1:Object):Boolean{
var _local4:TweenLite;
var _local2:Array = getTweensOf(_arg1);
var _local3:int = _local2.length;
while (_local3--) {
_local4 = _local2[_local3];
if (((_local4.active) || ((((_local4.cachedStartTime == _local4.timeline.cachedTime)) && (_local4.timeline.active))))){
return (true);
};
};
return (false);
}
public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local5:Boolean;
var _local4:Array = getAllTweens();
var _local6:int = _local4.length;
while (_local6--) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
if (_arg1){
_local4[_local6].complete(false);
} else {
_local4[_local6].setEnabled(false, false);
};
};
};
}
private static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local5:Boolean;
var _local4:Array = getAllTweens();
var _local6:int = _local4.length;
while (_local6--) {
_local5 = (TweenLite(_local4[_local6]).target == TweenLite(_local4[_local6]).vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
TweenCore(_local4[_local6]).paused = _arg1;
};
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (allTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
public static function getAllTweens():Array{
var _local4:Array;
var _local5:int;
var _local1:Dictionary = masterList;
var _local2:uint;
var _local3:Array = [];
for each (_local4 in _local1) {
_local5 = _local4.length;
while (_local5--) {
if (!TweenLite(_local4[_local5]).gc){
var _temp1 = _local2;
_local2 = (_local2 + 1);
var _local8 = _temp1;
_local3[_local8] = _local4[_local5];
};
};
};
return (_local3);
}
public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(false, _arg1, _arg2);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{
var i:int;
var varsDup:Object;
var p:String;
var onCompleteProxy:Function;
var onCompleteParamsProxy:Array;
var targets = _arg1;
var duration = _arg2;
var vars = _arg3;
var stagger = _arg4;
var onCompleteAll = _arg5;
var onCompleteAllParams = _arg6;
var l:uint = targets.length;
var a:Array = [];
var curDelay:Number = ((vars.delay) || (0));
onCompleteProxy = vars.onComplete;
onCompleteParamsProxy = vars.onCompleteParams;
var lastIndex:int = ((stagger)<=0) ? 0 : (l - 1);
i = 0;
while (i < l) {
varsDup = {};
for (p in vars) {
varsDup[p] = vars[p];
};
varsDup.delay = curDelay;
if ((((i == lastIndex)) && (!((onCompleteAll == null))))){
varsDup.onComplete = function ():void{
if (onCompleteProxy != null){
onCompleteProxy.apply(null, onCompleteParamsProxy);
};
onCompleteAll.apply(null, onCompleteAllParams);
};
};
a[a.length] = new TweenMax(targets[i], duration, varsDup);
curDelay = (curDelay + stagger);
i = (i + 1);
};
return (a);
}
TweenPlugin.activate([AutoAlphaPlugin, EndArrayPlugin, FramePlugin, RemoveTintPlugin, TintPlugin, VisiblePlugin, VolumePlugin, BevelFilterPlugin, BezierPlugin, BezierThroughPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, ColorTransformPlugin, DropShadowFilterPlugin, FrameLabelPlugin, GlowFilterPlugin, HexColorsPlugin, RoundPropsPlugin, ShortRotationPlugin, {}]);
}
}//package com.greensock
Section 53
//Lightning (com.oaxoa.fx.Lightning)
package com.oaxoa.fx {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
public class Lightning extends Sprite {
private const SMOOTH_COLOR:uint = 0x808080;
private var _childrenProbabilityDecay:Number;// = 0
private var _amplitude:Number;// = 0.5
public var len:Number;
private var generation:uint;
public var multi2:Number;
private var soff:Number;
private var bbd:BitmapData;
public var _steps:uint;
private var calculatedSpeed:Number;
public var startX:Number;
public var startY:Number;
private var position:Number;// = 0
public var multi:Number;
private var _childrenLengthDecay:Number;// = 0
private var boffs:Array;
public var _smoothPercentage:uint;// = 50
private var _speed:Number;// = 1
private var boffx:Number;
private var boffy:Number;
public var alphaFadeType:String;
private var _childrenMaxGenerations:uint;// = 3
public var parentInstance:Lightning;
public var _color:uint;
public var lifeSpan:Number;
public var _isVisible:Boolean;// = true
public var thicknessFadeType:String;
public var _childrenSmoothPercentage:uint;
public var _alphaFade:Boolean;// = true
private var calculatedWavelength:Number;
private var _childrenAngleVariation:Number;// = 60
private var tx:Number;
private var ty:Number;
private var _childrenMaxCount:uint;// = 4
private var glow:GlowFilter;
public var childrenSmooth:Sprite;
private var dy:Number;
public var childrenArray:Array;
private var dx:Number;
private var lifeTimer:Timer;
private var holder:Sprite;
public var smooth:Sprite;
public var stepEvery:Number;
private var _childrenMaxCountDecay:Number;// = 0.5
private var _maxLengthVary:Number;// = 0
private var _thicknessDecay:Number;
private var _childrenDetachedEnd:Boolean;// = false
private var _wavelength:Number;// = 0.3
private var _childrenLifeSpanMin:Number;// = 0
private var absolutePosition:Number;// = 1
private var initialized:Boolean;// = false
private var soffs:Array;
private var angle:Number;
private var soffx:Number;
public var endX:Number;
public var endY:Number;
private var seed1:uint;
private var seed2:uint;
private var boff:Number;
private var _childrenLifeSpanMax:Number;// = 0
private var _maxLength:Number;// = 0
private var soffy:Number;
private var _thickness:Number;
private var _childrenProbability:Number;// = 0.025
private var sbd:BitmapData;
public function Lightning(_arg1:uint=0xFFFFFF, _arg2:Number=2, _arg3:uint=0){
childrenArray = [];
super();
mouseEnabled = false;
_color = _arg1;
_thickness = _arg2;
alphaFadeType = LightningFadeType.GENERATION;
thicknessFadeType = LightningFadeType.NONE;
generation = _arg3;
if (generation == 0){
init();
};
}
public function get isVisible():Boolean{
return (_isVisible);
}
public function get childrenSmoothPercentage():Number{
return (_childrenSmoothPercentage);
}
public function get childrenLengthDecay():Number{
return (_childrenLengthDecay);
}
public function set childrenSmoothPercentage(_arg1:Number):void{
_childrenSmoothPercentage = _arg1;
var _local2:Matrix = new Matrix();
_local2.createGradientBox(steps, 1);
var _local3:uint = ((_childrenSmoothPercentage / 100) * 128);
childrenSmooth.graphics.clear();
childrenSmooth.graphics.beginGradientFill("linear", [SMOOTH_COLOR, SMOOTH_COLOR, SMOOTH_COLOR, SMOOTH_COLOR], [1, 0, 0, 1], [0, _local3, (0xFF - _local3), 0xFF], _local2);
childrenSmooth.graphics.drawRect(0, 0, steps, 1);
childrenSmooth.graphics.endFill();
}
private function init():void{
randomizeSeeds();
if (lifeSpan > 0){
startLifeTimer();
};
multi2 = 0.03;
holder = new Sprite();
holder.mouseEnabled = false;
startX = 50;
startY = 200;
endX = 50;
endY = 600;
stepEvery = 4;
_steps = 50;
sbd = new BitmapData(_steps, 1, false);
bbd = new BitmapData(_steps, 1, false);
soffs = [new Point(0, 0), new Point(0, 0)];
boffs = [new Point(0, 0), new Point(0, 0)];
if (generation == 0){
smooth = new Sprite();
childrenSmooth = new Sprite();
smoothPercentage = 50;
childrenSmoothPercentage = 50;
} else {
smooth = (childrenSmooth = parentInstance.childrenSmooth);
};
steps = 100;
childrenLengthDecay = 0.5;
addChild(holder);
initialized = true;
}
public function set childrenDetachedEnd(_arg1:Boolean):void{
_childrenDetachedEnd = _arg1;
}
public function set amplitude(_arg1:Number):void{
var _local2:Object;
_amplitude = _arg1;
for each (_local2 in childrenArray) {
_local2.instance.amplitude = _arg1;
};
}
public function get wavelength():Number{
return (_wavelength);
}
public function get steps():uint{
return (_steps);
}
public function set childrenLifeSpanMin(_arg1:Number):void{
_childrenLifeSpanMin = _arg1;
}
public function set childrenLifeSpanMax(_arg1:Number):void{
_childrenLifeSpanMax = _arg1;
}
public function get childrenMaxCount():uint{
return (_childrenMaxCount);
}
public function get childrenMaxGenerations():uint{
return (_childrenMaxGenerations);
}
public function set wavelength(_arg1:Number):void{
var _local2:Object;
_wavelength = _arg1;
for each (_local2 in childrenArray) {
_local2.instance.wavelength = _arg1;
};
}
public function set steps(_arg1:uint):void{
if (_arg1 < 2){
_arg1 = 2;
};
if (_arg1 > 2880){
_arg1 = 2880;
};
_steps = _arg1;
sbd = new BitmapData(_steps, 1, false);
bbd = new BitmapData(_steps, 1, false);
if (generation == 0){
smoothPercentage = smoothPercentage;
};
}
public function set thicknessDecay(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
_thicknessDecay = _arg1;
}
public function get speed():Number{
return (_speed);
}
public function set childrenProbabilityDecay(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
_childrenProbabilityDecay = _arg1;
}
public function set childrenMaxCount(_arg1:uint):void{
_childrenMaxCount = _arg1;
killSurplus();
}
public function set childrenMaxCountDecay(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
_childrenMaxCountDecay = _arg1;
}
public function get color():uint{
return (_color);
}
public function kill():void{
var _local1:uint;
var _local2:Lightning;
var _local3:Object;
killAllChildren();
if (lifeTimer){
lifeTimer.removeEventListener(TimerEvent.TIMER, kill);
lifeTimer.stop();
};
if (parentInstance != null){
_local1 = 0;
_local2 = (this.parent as Lightning);
for each (_local3 in _local2.childrenArray) {
if (_local3.instance == this){
_local2.childrenArray.splice(_local1, 1);
};
_local1++;
};
};
this.parent.removeChild(this);
delete ??getglobalscope
[this];
}
public function startLifeTimer():void{
lifeTimer = new Timer((lifeSpan * 1000), 1);
lifeTimer.start();
lifeTimer.addEventListener(TimerEvent.TIMER, onTimer);
}
public function get maxLength():Number{
return (_maxLength);
}
public function get thickness():Number{
return (_thickness);
}
public function get childrenAngleVariation():Number{
return (_childrenAngleVariation);
}
public function set maxLengthVary(_arg1:Number):void{
_maxLengthVary = _arg1;
}
public function killAllChildren():void{
var _local1:Lightning;
while (childrenArray.length > 0) {
_local1 = childrenArray[0].instance;
_local1.kill();
};
}
public function get amplitude():Number{
return (_amplitude);
}
public function get childrenDetachedEnd():Boolean{
return (_childrenDetachedEnd);
}
public function set childrenProbability(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
_childrenProbability = _arg1;
}
public function get childrenLifeSpanMax():Number{
return (_childrenLifeSpanMax);
}
public function get childrenProbabilityDecay():Number{
return (_childrenProbabilityDecay);
}
public function render():void{
var _local1:Object;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
holder.graphics.clear();
holder.graphics.lineStyle(thickness, _color);
angle = Math.atan2((endY - startY), (endX - startX));
var _local2:uint;
while (_local2 < steps) {
_local3 = ((1 / steps) * (steps - _local2));
_local4 = 1;
_local5 = thickness;
if (alphaFadeType == LightningFadeType.TIP_TO_END){
_local4 = (absolutePosition * _local3);
};
if (thicknessFadeType == LightningFadeType.TIP_TO_END){
_local5 = (thickness * (absolutePosition * _local3));
};
if ((((alphaFadeType == LightningFadeType.TIP_TO_END)) || ((thicknessFadeType == LightningFadeType.TIP_TO_END)))){
holder.graphics.lineStyle(int(_local5), _color, _local4);
};
soff = ((((sbd.getPixel(_local2, 0) - 0x808080) / 0xFFFFFF) * len) * multi2);
soffx = (Math.sin(angle) * soff);
soffy = (Math.cos(angle) * soff);
boff = ((((bbd.getPixel(_local2, 0) - 0x808080) / 0xFFFFFF) * len) * amplitude);
boffx = (Math.sin(angle) * boff);
boffy = (Math.cos(angle) * boff);
tx = (((startX + ((dx / (steps - 1)) * _local2)) + soffx) + boffx);
ty = (((startY + ((dy / (steps - 1)) * _local2)) - soffy) - boffy);
if (_local2 == 0){
holder.graphics.moveTo(tx, ty);
};
holder.graphics.lineTo(tx, ty);
for each (_local1 in childrenArray) {
if (_local1.startStep == _local2){
_local1.instance.startX = tx;
_local1.instance.startY = ty;
};
if (_local1.detachedEnd){
_local6 = (angle + ((_local1.childAngle / 180) * Math.PI));
_local7 = (len * childrenLengthDecay);
_local1.instance.endX = (_local1.instance.startX + (Math.cos(_local6) * _local7));
_local1.instance.endY = (_local1.instance.startY + (Math.sin(_local6) * _local7));
} else {
if (_local1.endStep == _local2){
_local1.instance.endX = tx;
_local1.instance.endY = ty;
};
};
};
_local2++;
};
}
public function generateChild(_arg1:uint=1, _arg2:Boolean=false):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:Number;
var _local8:Lightning;
if ((((generation < childrenMaxGenerations)) && ((childrenArray.length < childrenMaxCount)))){
_local3 = (steps * childrenLengthDecay);
if (_local3 >= 2){
_local4 = 0;
while (_local4 < _arg1) {
_local5 = (Math.random() * steps);
_local6 = (Math.random() * steps);
while (_local6 == _local5) {
_local6 = (Math.random() * steps);
};
_local7 = ((Math.random() * childrenAngleVariation) - (childrenAngleVariation / 2));
_local8 = new Lightning(color, thickness, (generation + 1));
_local8.parentInstance = this;
_local8.lifeSpan = ((Math.random() * (childrenLifeSpanMax - childrenLifeSpanMin)) + childrenLifeSpanMin);
_local8.position = (1 - (_local5 / steps));
_local8.absolutePosition = (absolutePosition * _local8.position);
_local8.alphaFadeType = alphaFadeType;
_local8.thicknessFadeType = thicknessFadeType;
if (alphaFadeType == LightningFadeType.GENERATION){
_local8.alpha = (1 - ((1 / (childrenMaxGenerations + 1)) * _local8.generation));
};
if (thicknessFadeType == LightningFadeType.GENERATION){
_local8.thickness = (thickness - ((thickness / (childrenMaxGenerations + 1)) * _local8.generation));
};
_local8.childrenMaxGenerations = childrenMaxGenerations;
_local8.childrenMaxCount = (childrenMaxCount * (1 - childrenMaxCountDecay));
_local8.childrenProbability = (childrenProbability * (1 - childrenProbabilityDecay));
_local8.childrenProbabilityDecay = childrenProbabilityDecay;
_local8.childrenLengthDecay = childrenLengthDecay;
_local8.childrenDetachedEnd = childrenDetachedEnd;
_local8.wavelength = wavelength;
_local8.amplitude = amplitude;
_local8.speed = speed;
_local8.init();
childrenArray.push({instance:_local8, startStep:_local5, endStep:_local6, detachedEnd:childrenDetachedEnd, childAngle:_local7});
addChild(_local8);
_local8.steps = (steps * (1 - childrenLengthDecay));
if (_arg2){
_local8.generateChild(_arg1, true);
};
_local4++;
};
};
};
}
private function onTimer(_arg1:TimerEvent):void{
kill();
}
public function get childrenMaxCountDecay():Number{
return (_childrenMaxCountDecay);
}
public function set childrenMaxGenerations(_arg1:uint):void{
_childrenMaxGenerations = _arg1;
killSurplus();
}
public function killSurplus():void{
var _local1:Lightning;
while (childrenArray.length > childrenMaxCount) {
_local1 = childrenArray[(childrenArray.length - 1)].instance;
_local1.kill();
};
}
public function get childrenProbability():Number{
return (_childrenProbability);
}
public function set speed(_arg1:Number):void{
var _local2:Object;
_speed = _arg1;
for each (_local2 in childrenArray) {
_local2.instance.speed = _arg1;
};
}
public function get maxLengthVary():Number{
return (_maxLengthVary);
}
public function set color(_arg1:uint):void{
var _local2:Object;
_color = _arg1;
glow.color = _arg1;
holder.filters = [glow];
for each (_local2 in childrenArray) {
_local2.instance.color = _arg1;
};
}
public function update():void{
var _local1:Number;
var _local2:Object;
var _local3:Matrix;
var _local4:Number;
if (initialized){
dx = (endX - startX);
dy = (endY - startY);
len = Math.sqrt(((dx * dx) + (dy * dy)));
soffs[0].x = (soffs[0].x + ((steps / 100) * speed));
soffs[0].y = (soffs[0].y + ((steps / 100) * speed));
sbd.perlinNoise((steps / 20), (steps / 20), 1, seed1, false, true, 7, true, soffs);
calculatedWavelength = (steps * wavelength);
calculatedSpeed = ((calculatedWavelength * 0.1) * speed);
boffs[0].x = (boffs[0].x - calculatedSpeed);
boffs[0].y = (boffs[0].y + calculatedSpeed);
bbd.perlinNoise(calculatedWavelength, calculatedWavelength, 1, seed2, false, true, 7, true, boffs);
if (smoothPercentage > 0){
_local3 = new Matrix();
_local3.scale((steps / smooth.width), 1);
bbd.draw(smooth, _local3);
};
if (parentInstance != null){
isVisible = parentInstance.isVisible;
} else {
if (maxLength == 0){
isVisible = true;
} else {
if (len <= maxLength){
_local4 = 1;
} else {
if (len > (maxLength + maxLengthVary)){
_local4 = 0;
} else {
_local4 = (1 - ((len - maxLength) / maxLengthVary));
};
};
isVisible = ((Math.random() < _local4)) ? true : false;
};
};
_local1 = Math.random();
if (_local1 < childrenProbability){
generateChild();
};
if (isVisible){
render();
};
for each (_local2 in childrenArray) {
_local2.instance.update();
};
};
}
public function set smoothPercentage(_arg1:Number):void{
var _local2:Matrix;
var _local3:uint;
if (smooth){
_smoothPercentage = _arg1;
_local2 = new Matrix();
_local2.createGradientBox(steps, 1);
_local3 = ((_smoothPercentage / 100) * 128);
smooth.graphics.clear();
smooth.graphics.beginGradientFill("linear", [SMOOTH_COLOR, SMOOTH_COLOR, SMOOTH_COLOR, SMOOTH_COLOR], [1, 0, 0, 1], [0, _local3, (0xFF - _local3), 0xFF], _local2);
smooth.graphics.drawRect(0, 0, steps, 1);
smooth.graphics.endFill();
};
}
public function set childrenAngleVariation(_arg1:Number):void{
var _local2:Object;
_childrenAngleVariation = _arg1;
for each (_local2 in childrenArray) {
_local2.childAngle = ((Math.random() * _arg1) - (_arg1 / 2));
_local2.instance.childrenAngleVariation = _arg1;
};
}
public function get thicknessDecay():Number{
return (_thicknessDecay);
}
public function set maxLength(_arg1:Number):void{
_maxLength = _arg1;
}
public function get smoothPercentage():Number{
return (_smoothPercentage);
}
public function set thickness(_arg1:Number):void{
if (_arg1 < 0){
_arg1 = 0;
};
_thickness = _arg1;
}
public function get childrenLifeSpanMin():Number{
return (_childrenLifeSpanMin);
}
public function set isVisible(_arg1:Boolean):void{
_isVisible = (visible = _arg1);
}
private function randomizeSeeds():void{
seed1 = (Math.random() * 100);
seed2 = (Math.random() * 100);
}
public function set childrenLengthDecay(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
_childrenLengthDecay = _arg1;
}
}
}//package com.oaxoa.fx
Section 54
//LightningFadeType (com.oaxoa.fx.LightningFadeType)
package com.oaxoa.fx {
public class LightningFadeType {
public static const NONE:String = "none";
public static const TIP_TO_END:String = "tip";
public static const GENERATION:String = "generation";
}
}//package com.oaxoa.fx
Section 55
//ActionSource (com.omniture.ActionSource)
package com.omniture {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
import flash.external.*;
public dynamic class ActionSource extends Sprite {
private var _useExternalVariables:Boolean;// = false
private var onLoadTracked:Boolean;// = false
public var ssl:Boolean;
private var accountConfigList:Array;
private var _movieID:String;// = ""
public var lastRequest:String;
private var _trackClickMap:Boolean;// = false
private var _pageName:String;// = ""
public var debugTracking:Boolean;// = false
private var flashLivePreview:Boolean;// = false
public var account:String;
public var _movie:Object;
private var delayTrackingInterval:Number;
private var _pageURL:String;// = ""
public var otherVariables:Object;
private var _configURL:String;
public var flashASVersion:Number;// = 3
public var delayTracking:Number;
private var _moduleMediaVariables:Object;
private var configXML:ActionSource_XML;
private var requestNum:Number;
private var accountVarList:Array;
private var trackOnLoadInterval:Number;
public var dc:String;
public var visitorNamespace:String;
private var _version:String;// = ""
private var trackCalled:Boolean;// = false
public var mobile:Boolean;
private var _root:Object;
private var delayTrackingStage:Number;
private var requiredVarList:Array;
public var flashVersion:Number;
public var trackingServerBase:String;
public var requestList:Array;
private var _trackOnLoad:Boolean;// = false
public var Media:ActionSource_Module_Media;
private var bufferTrackInterval:Number;// = 0
public var ClickMap:ActionSource_Module_ClickMap;
public var autoTrack:Boolean;
public var trackLocal:Boolean;// = true
public var trackingServer:String;
private var bufferTrackQueue:Array;
private var externalVariables:Object;
private var _charSet:String;// = ""
public var trackingServerSecure:String;
private var flashRoot:Object;
public function ActionSource(){
var _local2:Number;
super();
var _local1:Object = this;
_local1.version = "FAS-2.8.1";
var _local3:String = getVersion();
var _local4:Array = _local3.split(" ");
_local1.flashVersion = parseInt(_local4[1].substr(0, 1));
_local1.initPre();
_local1.requestNum = 0;
_local1.requestList = new Array();
_local1.lastRequest = "";
_local1.requiredVarList = ["dynamicVariablePrefix", "visitorID", "vmk", "visitorMigrationKey", "visitorMigrationServer", "visitorMigrationServerSecure", "charSet", "visitorNamespace", "cookieDomainPeriods", "cookieLifetime", "pageName", "pageURL", "referrer", "currencyCode"];
_local1.accountVarList = ["purchaseID", "variableProvider", "channel", "server", "pageType", "transactionID", "campaign", "state", "zip", "events", "products", "tnt"];
_local2 = (_local1.requiredVarList.length - 1);
while (_local2 >= 0) {
_local1.accountVarList.unshift(_local1.requiredVarList[_local2]);
_local2--;
};
_local2 = 1;
while (_local2 <= 50) {
_local1.accountVarList.push(("prop" + _local2));
_local1.accountVarList.push(("eVar" + _local2));
_local1.accountVarList.push(("hier" + _local2));
_local1.accountVarList.push(("list" + _local2));
_local2++;
};
_local1.accountVarList.push("pe");
_local1.accountVarList.push("pev1");
_local1.accountVarList.push("pev2");
_local1.accountVarList.push("pev3");
_local1.requiredVarList.push("pe");
_local1.requiredVarList.push("pev1");
_local1.requiredVarList.push("pev2");
_local1.requiredVarList.push("pev3");
_local1.accountConfigList = ["account", "configURL", "linkObject", "linkURL", "linkName", "linkType", "trackDownloadLinks", "trackExternalLinks", "trackClickMap", "linkLeaveQueryString", "linkTrackVars", "linkTrackEvents", "trackingServer", "trackingServerSecure", "dc", "movieID", "autoTrack", "delayTracking", "trackLocal", "debugTracking"];
_local1.modulesInit();
_local1.setupInterval(_local1, "setVariableCallHandler", 1000, null);
_local1.initPost();
}
private function doTrackOnLoad(){
var _local1:Object = this;
if (((!(_local1.isSet(_local1.account))) || (!(_local1.isSet(_local1.movie))))){
return;
};
clearInterval(_local1.trackOnLoadInterval);
if (((_local1._trackOnLoad) && (!(_local1.onLoadTracked)))){
_local1.onLoadTracked = true;
_local1.track();
};
}
public function set moduleMediaVariables(_arg1:Object){
this._moduleMediaVariables = _arg1;
this.modulesUpdate();
}
public function flushBufferedRequest(_arg1:String, _arg2:String){
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:String;
var _local3:Object = this;
_local4 = _local3.getBufferedRequests();
if (((((_local3.isSet(_local4)) && (_local3.isSet(_local4.data)))) && (_local3.isSet(_local4.data.list)))){
_local6 = 0;
while (_local6 < _local4.data.list.length) {
_local5 = _local4.data.list[_local6];
if ((((_local5.account == _arg1)) && ((_local5.id == _arg2)))){
_local7 = _local4.data.list[_local6].request;
_local4.data.list[_local6].account = "";
_local4.data.list[_local6].id = "";
_local4.data.list[_local6].request = "";
_local4.flush();
_local3.makeRequest("", "", _local7, "");
};
_local6++;
};
};
}
public function get trackClickMap():Boolean{
return (_trackClickMap);
}
public function isNumber(_arg1):Boolean{
return (!(isNaN(parseInt(_arg1))));
}
private function updateExternalVariables(){
var _local2:String;
var _local3:Array;
var _local4:Number;
var _local5:Array;
var _local7:Object;
var _local8:String;
var _local9:String;
var _local10:Object;
var _local1:Object = this;
var _local6 = "";
_local1.externalVariables = new Object();
_local2 = _local1.getMovieClipURL(_local1);
if (_local1.isSet(_local2)){
_local3 = _local2.split("?");
_local6 = (_local6 + ("&" + _local3[1]));
};
if (_local1.isSet(_local1, "parent")){
_local2 = _local1.getMovieClipURL(_local1.parent);
if (_local1.isSet(_local2)){
_local3 = _local2.split("?");
_local6 = (_local6 + ("&" + _local3[1]));
};
} else {
if (_local1.isSet(_local1, "_parent")){
_local2 = _local1.getMovieClipURL(_local1._parent);
if (_local1.isSet(_local2)){
_local3 = _local2.split("?");
_local6 = (_local6 + ("&" + _local3[1]));
};
};
};
if (_local1.isSet(_local1.movie)){
_local2 = _local1.getMovieClipURL(_local1.movie);
if (_local1.isSet(_local2)){
_local3 = _local2.split("?");
_local6 = (_local6 + ("&" + _local3[1]));
};
};
if (_local1.isSet(_local6)){
_local3 = _local6.split("&");
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4].split("=");
_local8 = _local5[0];
if ((((_local8.substr(0, 2) == "s_")) || ((_local8.substr(0, 2) == "s.")))){
_local8 = _local8.substr(2);
_local9 = unescape(_local5[1]);
_local1.externalVariables[_local8] = _local9;
};
_local4++;
};
};
if (_local1.isSet(_local1.movie)){
_local7 = _local1.movie;
if (_local1.flashASVersion >= 3){
if (((_local1.isSet(_local1.movie, "loaderInfo")) && (_local1.isSet(_local1.movie.loaderInfo, "parameters")))){
_local7 = _local1.movie.loaderInfo.parameters;
};
};
for (_local8 in _local7) {
if ((((((_local8.substr(0, 2) == "s_")) || ((_local8.substr(0, 2) == "s.")))) && ((((typeof(_local7[_local8]) == "string")) || ((typeof(_local7[_local8]) == "boolean")))))){
_local9 = _local7[_local8];
_local8 = _local8.substr(2);
_local1.externalVariables[_local8] = _local9;
};
};
};
if (_local1.isSet(_local1.useExternalVariables)){
_local1.variableOverridesApply(_local1.externalVariables);
};
}
public function get useExternalVariables():Boolean{
return (this._useExternalVariables);
}
private function flushRequestList(){
var _local2:String;
var _local3:Array;
var _local4:Number;
var _local1:Object = this;
while (_local1.requestNum < _local1.requestList.length) {
if (_local1.isSet(_local1.debugTracking)){
_local2 = ("ActionSource Debug: " + _local1.requestList[_local1.requestNum]);
_local3 = _local1.requestList[_local1.requestNum].split("&");
_local4 = 0;
while (_local4 < _local3.length) {
_local2 = (_local2 + ("\n\t" + unescape(_local3[_local4])));
_local4++;
};
_local1.logDebug(_local2);
};
_local1.requestURL(_local1.requestList[_local1.requestNum]);
_local1.lastRequest = _local1.requestList[_local1.requestNum];
_local1.requestNum++;
};
}
private function setVariableCallHandler(){
var _local2:Object;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local8:Object;
var _local9:Number;
var _local1:Object = this;
for (_local3 in _local1) {
if (_local3.substr(0, 5) == "_svc_"){
_local5 = _local3.split("_");
if (((_local1.isSet(_local5)) && ((_local5.length >= 4)))){
if ((((_local5[3] == "dot")) && ((_local5.length > 4)))){
_local5[2] = (_local5[2] + ("_dot_" + _local5[4]));
_local6 = 5;
while (_local6 < _local5.length) {
_local5[(_local6 - 2)] = _local5[_local6];
_local6++;
};
};
_local8 = null;
if (_local1.isSet(_local7)){
_local9 = 0;
while (_local9 < _local7.length) {
if (_local7[_local9].methodName == _local5[2]){
_local8 = _local7[_local9];
};
_local9++;
};
};
if (!_local1.isSet(_local8)){
_local7 = new Array();
_local8 = new Object();
_local8.methodName = _local5[2];
_local7[0] = _local8;
};
if (_local5[3] == "call"){
if (_local1.isSet(_local1[_local3])){
_local8.call = true;
};
_local1[_local3] = null;
} else {
if ((((((_local5[3] == "param")) && ((_local5.length > 4)))) && (_local1.isSet(_local5[4])))){
if (!_local1.isSet(_local8.paramList)){
_local8.paramList = new Array();
};
_local8.paramList[_local5[4]] = _local1[_local3];
};
};
};
};
};
if (((_local1.isSet(_local7)) && ((_local7.length > 0)))){
_local9 = 0;
while (_local9 < _local7.length) {
_local8 = _local7[_local9];
if (((_local1.isSet(_local8.methodName)) && (_local1.isSet(_local8.call)))){
_local5 = _local8.methodName.split("_dot_");
if (_local5.length > 1){
_local2 = _local1[_local5[0]];
_local4 = _local5[1];
} else {
_local2 = _local1;
_local4 = _local8.methodName;
};
if (_local1.isSet(_local2[_local4])){
if (((_local1.isSet(_local8.paramList)) && ((_local8.paramList.length > 0)))){
if (_local8.paramList.length == 1){
_local1[(("_svc_" + _local8.methodName) + "_result")] = _local2[_local4](_local8.paramList[0]);
} else {
if (_local8.paramList.length == 2){
_local1[(("_svc_" + _local8.methodName) + "_result")] = _local2[_local4](_local8.paramList[0], _local8.paramList[1]);
} else {
if (_local8.paramList.length == 3){
_local1[(("_svc_" + _local8.methodName) + "_result")] = _local2[_local4](_local8.paramList[0], _local8.paramList[1], _local8.paramList[2]);
};
};
};
} else {
_local1[(("_svc_" + _local8.methodName) + "_result")] = _local2[_local4]();
};
setGlobal((("_svc_" + _local8.methodName) + "_result"), _local1[(("_svc_" + _local8.methodName) + "_result")]);
};
};
_local9++;
};
};
}
public function set trackOnLoad(_arg1:Boolean){
this._trackOnLoad = _arg1;
if (this._trackOnLoad){
this.trackOnLoadInterval = this.setupInterval(this, "doTrackOnLoad", 100, null);
};
}
public function get movie():Object{
return (this._movie);
}
public function get charSet():String{
return (_charSet);
}
private function getMovieClipURL(_arg1:Object):String{
var _local2:Object = this;
if (_local2.isSet(_arg1)){
if ((((((_local2.flashASVersion > 2)) && (_local2.isSet(_arg1, "loaderInfo")))) && (_local2.isSet(_arg1.loaderInfo, "loaderURL")))){
return (_arg1.loaderInfo.loaderURL);
};
if (_local2.isSet(_arg1, "_url")){
return (_arg1._url);
};
};
return ("");
}
private function bufferRequest(_arg1:String, _arg2:String, _arg3:String){
var _local5:Object;
var _local6:Object;
var _local7:Number;
var _local8:Number;
var _local4:Object = this;
_local5 = _local4.getBufferedRequests();
if (_local4.isSet(_local5)){
if (!_local4.isSet(_local5.data)){
_local5.data = new Object();
};
if (!_local4.isSet(_local5.data.list)){
_local5.data.list = new Array();
};
_local8 = -1;
_local7 = 0;
while (_local7 < _local5.data.list.length) {
if (_local5.data.list[_local7].id == _arg2){
_local5.data.list[_local7].request = _arg3;
_arg3 = "";
} else {
if (!_local4.isSet(_local5.data.list[_local7].id)){
_local8 = _local7;
};
};
_local7++;
};
if (_local4.isSet(_arg3)){
_local6 = new Object();
_local6.account = _arg1;
_local6.id = _arg2;
_local6.request = _arg3;
if (_local8 >= 0){
_local5.data.list[_local8] = _local6;
} else {
_local5.data.list.push(_local6);
};
};
_local5.flush();
};
}
private function modulesInit(){
var _local1:Object = this;
_local1.ClickMap = new ActionSource_Module_ClickMap(_local1);
_local1.Media = new ActionSource_Module_Media(_local1);
_local1.modulesUpdate();
}
public function clearVars(){
var _local2:Number;
var _local3:String;
var _local1:Object = this;
_local2 = 0;
while (_local2 < accountVarList.length) {
_local3 = _local1.accountVarList[_local2];
if ((((((((((((((((((((((((_local3.substr(0, 4) == "prop")) || ((_local3.substr(0, 4) == "eVar")))) || ((_local3.substr(0, 4) == "hier")))) || ((_local3.substr(0, 4) == "list")))) || ((_local3 == "channel")))) || ((_local3 == "events")))) || ((_local3 == "purchaseID")))) || ((_local3 == "transactionID")))) || ((_local3 == "products")))) || ((_local3 == "state")))) || ((_local3 == "zip")))) || ((_local3 == "campaign")))){
_local1[_local3] = undefined;
};
_local2++;
};
}
public function set trackClickMap(_arg1:Boolean){
_trackClickMap = _arg1;
setGlobal("trackClickMap", _arg1);
}
public function variableOverridesApply(_arg1:Object){
var _local3:Number;
var _local4:String;
var _local5:Array;
var _local2:Object = this;
_local3 = 0;
while (_local3 < _local2.accountVarList.length) {
_local4 = _local2.accountVarList[_local3];
if (((_local2.isSet(_arg1[_local4])) || (_local2.isSet(_arg1[("!" + _local4)])))){
_local2[_local4] = _arg1[_local4];
};
_local3++;
};
_local3 = 0;
while (_local3 < _local2.accountConfigList.length) {
_local4 = _local2.accountConfigList[_local3];
if (((_local2.isSet(_arg1[_local4])) || (_local2.isSet(_arg1[("!" + _local4)])))){
if ((((((((((((((_local4 == "trackDownloadLinks")) || ((_local4 == "trackExternalLinks")))) || ((_local4 == "trackClickMap")))) || ((_local4 == "linkLeaveQueryString")))) || ((_local4 == "autoTrack")))) || ((_local4 == "trackLocal")))) || ((_local4 == "debugTracking")))){
if (typeof(_arg1[_local4]) == "string"){
if (_arg1[_local4].toLowerCase() == "true"){
_arg1[_local4] = true;
} else {
_arg1[_local4] = false;
};
} else {
_arg1[_local4] = _local2.isSet(_arg1[_local4]);
};
} else {
if (_local4 == "delayTracking"){
if (typeof(_arg1[_local4]) == "string"){
_arg1[_local4] = parseInt(_arg1[_local4]);
} else {
if (typeof(_arg1[_local4]) != "number"){
_arg1[_local4] = 0;
};
};
};
};
_local2[_local4] = _arg1[_local4];
};
_local3++;
};
for (_local4 in _arg1) {
if (_local4.indexOf(".") >= 0){
_local5 = _local4.split(".");
if (_local5.length == 2){
if (((!(_local2.isSet(_arg1[_local5[0]]))) || (!((typeof(_arg1[_local5[0]]) == "object"))))){
_arg1[_local5[0]] = new Object();
};
_arg1[_local4][_local5[1]] = _arg1[_local4];
_local4 = _local5[0];
} else {
_local4 = "";
};
};
};
for (_local4 in _arg1) {
if (typeof(_arg1[_local4]) == "object"){
if (_local4 == "config"){
_local2.variableOverridesApply(_arg1[_local4]);
} else {
if ((((((((_local4.substr(0, 1) == _local4.substr(0, 1).toUpperCase())) && (_local2.isSet(_local2[_local4])))) && ("boolean"))) && (_local2.isSet(_local2[_local4].variableOverridesApply)))){
_local2[_local4].variableOverridesApply(_arg1[_local4]);
};
};
};
};
}
private function getBufferedRequests(){
var bufferedRequests:Object;
var s:Object = this;
if (!s.isSet(s.disableBufferedRequests)){
bufferedRequests = s.getSharedObject("s_br");
};
if (!s.isSet(bufferedRequests)){
bufferedRequests = s.bufferedRequests;
if (!s.isSet(bufferedRequests)){
s.bufferedRequests = new Object();
s.bufferedRequests.flush = function (){
};
bufferedRequests = s.bufferedRequests;
};
};
return (bufferedRequests);
}
public function set useExternalVariables(_arg1:Boolean){
this._useExternalVariables = _arg1;
if (this.isSet(this._useExternalVariables)){
this.updateExternalVariables();
};
}
public function track(_arg1:Object=null, _arg2:String=""){
this._track(_arg1, _arg2);
}
private function _track(_arg1:Object, _arg2:String){
var _local4:Boolean;
var _local5:Object;
var _local11:Number;
var _local12:String;
var _local3:Object = this;
var _local6:Date = new Date();
var _local7:Number = Math.floor((Math.random() * 10000000000000));
var _local8:String = (("s" + (Math.floor((_local6.getTime() / 10800000)) % 10)) + _local7);
var _local9:String = ((((((((((((((("" + _local6.getDate()) + "/") + _local6.getMonth()) + "/") + _local6.getFullYear()) + " ") + _local6.getHours()) + ":") + _local6.getMinutes()) + ":") + _local6.getSeconds()) + " ") + _local6.getDay()) + " ") + _local6.getTimezoneOffset());
var _local10:String = ("t=" + escape(_local9));
if (_local3.isSet(_local3.flashLivePreview)){
return;
};
if (_local3.isSet(_local3.otherVariables)){
_local11 = 0;
while (_local11 < _local3.accountVarList.length) {
_local12 = _local3.accountVarList[_local11];
if (_local3.isSet(_local3.otherVariables[_local12])){
_local3[_local12] = _local3.otherVariables[_local12];
};
_local11++;
};
_local11 = 0;
while (_local11 < _local3.accountConfigList.length) {
_local12 = _local3.accountConfigList[_local11];
if (_local3.isSet(_local3.otherVariables[_local12])){
_local3[_local12] = _local3.otherVariables[_local12];
};
_local11++;
};
};
_local4 = _local3.bufferTrack(_arg1, _arg2);
if (!_local4){
if (_local3.isSet(_arg1)){
_local5 = new Object();
_local3.variableOverridesBuild(_local5, false);
_local3.variableOverridesApply(_arg1);
};
if (((_local3.isSet(_local3.usePlugins)) && (_local3.isSet(_local3.doPlugins)))){
_local3.doPlugins(_local3);
};
if (_local3.isSet(_local3.account)){
if (!_local3.isSet(_local3.pageURL)){
_local3.pageURL = _local3.getMovieURL();
};
if (((!(_local3.isSet(_local3.referrer))) && (!(_local3.isSet(_local3._1_referrer))))){
_local3.referrer = _local3.getMovieReferrer();
_local3._1_referrer = 1;
};
_local10 = (_local10 + _local3.queryStringAccountVariables());
_local10 = (_local10 + _local3.queryStringLinkTracking());
_local10 = (_local10 + _local3.queryStringClickMap());
_local10 = (_local10 + _local3.queryStringTechnology());
_local3.makeRequest(_local8, _local10, "", _arg2);
};
if (_local3.isSet(_arg1)){
_local3.variableOverridesApply(_local5);
};
};
_local3.referrer = undefined;
_local3.pe = undefined;
_local3.pev1 = undefined;
_local3.pev2 = undefined;
_local3.pev3 = undefined;
_local3.linkObject = undefined;
_local3.linkURL = undefined;
_local3.linkName = undefined;
_local3.linkType = undefined;
_local3.objectID = undefined;
if (((!(_local4)) && (_local3.isSet(_local3.account)))){
if (((!(_local3.isSet(_arg2))) && (!(_local3.isSet(_local3.trackCalled))))){
_local3.trackCalled = true;
_local3.flushBufferedRequests();
};
};
}
private function variableOverridesBuild(_arg1:Object, _arg2:Boolean){
var _local4:Number;
var _local5:String;
var _local3:Object = this;
_local4 = 0;
while (_local4 < _local3.accountVarList.length) {
_local5 = _local3.accountVarList[_local4];
if (!_local3.isSet(_arg1[_local5])){
_arg1[_local5] = _local3[_local5];
if (((!(_arg2)) && (!(_local3.isSet(_arg1[_local5]))))){
_arg1[("!" + _local5)] = 1;
};
};
_local4++;
};
_local4 = 0;
while (_local4 < _local3.accountConfigList.length) {
_local5 = _local3.accountConfigList[_local4];
if (!_local3.isSet(_arg1[_local5])){
_arg1[_local5] = _local3[_local5];
if (((!(_arg2)) && (!(_local3.isSet(_arg1[_local5]))))){
_arg1[("!" + _local5)] = 1;
};
};
_local4++;
};
}
public function get movieID():String{
return (_movieID);
}
public function set charSet(_arg1:String){
_charSet = _arg1;
setGlobal("charSet", _arg1);
}
private function modulesUpdate(){
var _local2:String;
var _local1:Object = this;
if (_local1.isSet(_local1.Media)){
if (_local1.isSet(_local1._moduleMediaVariables)){
for (_local2 in _local1._moduleMediaVariables) {
if (_local1.isSet(_local1._moduleMediaVariables[_local2])){
if ((((_local2 == "trackWhilePlaying")) || ((_local2 == "autoTrack")))){
if (("" + _local1._moduleMediaVariables[_local2]).toLowerCase() == "true"){
_local1._moduleMediaVariables[_local2] = true;
} else {
_local1._moduleMediaVariables[_local2] = false;
};
};
_local1.Media[_local2] = _local1._moduleMediaVariables[_local2];
};
};
};
_local1.Media.autoTrack = _local1.Media.autoTrack;
};
}
public function get pageURL():String{
return (_pageURL);
}
private function _trackLink(_arg1, _arg2:String, _arg3:String, _arg4:Object){
var _local6:String;
var _local5:Object = this;
if (((_local5.isSet(_arg1)) && ((typeof(_arg1) == "string")))){
_local6 = _arg1;
_arg1 = new Object();
_arg1.url = _local6;
};
_local5.linkObject = _arg1;
_local5.linkType = _arg2;
_local5.linkName = _arg3;
_local5.track(_arg4);
}
private function requestURL(_arg1){
var _local2:URLRequest = new URLRequest(_arg1);
sendToURL(_local2);
}
public function setupInterval(_arg1:Object, _arg2:String, _arg3:Number, _arg4){
if (_arg4 != null){
return (setInterval(_arg1[_arg2], _arg3, _arg4));
};
return (setInterval(_arg1[_arg2], _arg3));
}
private function queryStringLinkTracking():String{
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local9:Number;
var _local1:Object = this;
var _local2:String = _local1.linkType;
var _local3:String = _local1.linkURL;
var _local4:String = _local1.linkName;
var _local8 = "";
if (((!(_local1.isSet(_local3))) && (_local1.isSet(_local1.linkObject)))){
if (_local1.isSet(_local1.linkObject, "url")){
_local3 = _local1.linkObject.url;
} else {
if (_local1.isSet(_local1.linkObject, "URL")){
_local3 = _local1.linkObject.URL;
} else {
if (_local1.isSet(_local1.linkObject, "href")){
_local3 = _local1.linkObject.href;
} else {
if (_local1.isSet(_local1.linkObject, "HREF")){
_local3 = _local1.linkObject.HREF;
} else {
if (_local1.isSet(_local1.linkObject, "htmlText")){
_local5 = _local1.linkObject.htmlText.toLowerCase().indexOf("href=");
if (_local5 >= 0){
_local5 = (_local5 + 5);
_local7 = _local1.linkObject.htmlText.substr(_local5, 1);
if ((((_local7 == "\"")) || ((_local7 == "'")))){
_local5++;
_local6 = _local1.linkObject.htmlText.toLowerCase().indexOf(_local7, _local5);
if (_local6 >= 0){
--_local6;
if (_local6 > _local5){
_local3 = _local1.linkObject.htmlText.substr(_local5, ((_local6 - _local5) + 1));
};
};
};
};
};
};
};
};
};
};
if (((_local1.isSet(_local2)) && (((_local1.isSet(_local3)) || (_local1.isSet(_local4)))))){
_local2 = _local2.toLowerCase();
if (((!((_local2 == "d"))) && (!((_local2 == "e"))))){
_local2 = "o";
};
if (((_local1.isSet(_local3)) && (!(_local1.isSet(_local1.linkLeaveQueryString))))){
_local9 = _local3.indexOf("?");
if (_local9 >= 0){
_local3 = _local3.substr(0, _local9);
};
};
_local8 = (_local8 + ("&pe=lnk_" + escape(_local2)));
_local8 = (_local8 + (_local1.isSet(_local3)) ? ("&pev1=" + escape(_local3)) : "");
_local8 = (_local8 + (_local1.isSet(_local4)) ? ("&pev2=" + escape(_local4)) : "");
};
return (_local8);
}
public function set movie(_arg1:Object){
var _local3:String;
var _local2:Object = this;
_local2._movie = _arg1;
if (!_local2.flashLivePreview){
_local3 = _local2.getMovieURL();
_local2.ssl = (_local3.toLowerCase().substr(0, 6) == "https:");
if (_local2.isSet(_local2._movie)){
if (_local2.flashASVersion < 3){
_local2._movie.s_s = this;
_local2.version = _local2.version;
_local2.charSet = _local2.charSet;
_local2.pageName = _local2.pageName;
_local2.pageURL = _local2.pageURL;
_local2.trackClickMap = _local2.trackClickMap;
_local2.movieID = _local2.movieID;
};
_local2.updateExternalVariables();
_local2.modulesUpdate();
};
};
}
private function initPre(){
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
public function set pageName(_arg1:String){
_pageName = _arg1;
setGlobal("pageName", _arg1);
}
public function logDebug(_arg1:String){
trace(_arg1);
this.callJavaScript((("function s_logDebug(){var e;try{console.log(\"" + this.replace(this.replace(_arg1, "\n", "\\n"), "\"", "\\\"")) + "\");}catch(e){}}"));
}
private function getSharedObject(_arg1:String){
var encoding:Number;
var tryNum:Number;
var e:Object;
var key = _arg1;
var o:Object;
tryNum = 0;
while (((!(this.isSet(o))) && ((tryNum < 2)))) {
try {
encoding = SharedObject.defaultObjectEncoding;
SharedObject.defaultObjectEncoding = ObjectEncoding.AMF0;
o = SharedObject.getLocal(key, "/");
SharedObject.defaultObjectEncoding = encoding;
o.objectEncoding = ObjectEncoding.AMF0;
} catch(e) {
};
tryNum = (tryNum + 1);
};
return (o);
}
public function get moduleMediaVariables():Object{
return (this._moduleMediaVariables);
}
private function callJavaScript(_arg1:String){
var e:Object;
var script = _arg1;
var s:Object = this;
try {
if (((((s.isSet(ExternalInterface)) && (s.isSet(ExternalInterface.available)))) && (s.isSet(ExternalInterface.call)))){
return (ExternalInterface.call(script));
};
} catch(e) {
};
return (null);
}
public function getMovieURL():String{
var _local2:String;
var _local1:Object = this;
_local2 = _local1.callJavaScript("function s_ActionSource_wl(){return window.location.href;}");
if (_local1.isSet(_local2)){
return (_local2);
};
if (_local1.isSet(_local1.movie)){
return (_local1.getMovieClipURL(_local1.movie));
};
return ("");
}
public function get trackOnLoad():Boolean{
return (this._trackOnLoad);
}
public function set movieID(_arg1:String){
_movieID = _arg1;
setGlobal("movieID", _arg1);
}
public function set configURL(_arg1:String){
var _local2:Object = this;
if (_arg1 != _local2._configURL){
_local2._configURL = _arg1;
if (_local2.isSet(_local2._configURL)){
if (!_local2.isSet(_local2.configXML)){
_local2.configXML = new ActionSource_XML(_local2);
_local2.configXML.onDataReady = "variableOverridesApply";
};
_local2.configXML.url = _local2._configURL;
};
};
}
private function getVersion():String{
return (Capabilities.version);
}
private function setGlobal(_arg1:String, _arg2){
var _local3:Object = this;
if (((_local3.isSet(_local3._movie)) && ((_local3.flashASVersion < 3)))){
_local3._movie[("s_s_" + _arg1)] = _arg2;
};
}
private function onAddedToStage(_arg1:Event){
if ((((parent == null)) || (!((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent"))))){
this.visible = false;
this.movie = root;
} else {
this.flashLivePreview = true;
};
}
public function set version(_arg1:String){
_version = _arg1;
setGlobal("version", _arg1);
}
private function getMovieReferrer():String{
var _local1:Object = this;
return (_local1.callJavaScript((((((((((((((((((((((((("" + "function s_ActionSource_r(){") + "\tvar ") + "\t\tr = '',") + "\t\tw = window,") + "\t\te,") + "\t\tp,") + "\t\tl,") + "\t\te;") + "\tif ((w) && (w.document)) {") + "\t\tr = w.document.referrer;") + "\t\ttry {") + "\t\t\tp = w.parent;") + "\t\t\tl = w.location;") + "\t\t\twhile ((p) && (p.location) && (l) && (''+p.location != ''+l) && (w.location) && (''+p.location != ''+w.location) && (p.location.host == l.host)) {") + "\t\t\t\tw = p;") + "\t\t\t\tp = w.parent;") + "\t\t\t}") + "\t\t} catch (e) {}") + "\t\tif ((w) && (w.document)) {") + "\t\t\tr = w.document.referrer;") + "\t\t}") + "\t}") + "\treturn r;") + "}")));
}
public function get pageName():String{
return (_pageName);
}
public function replace(_arg1:String, _arg2:String, _arg3:String):String{
if (this.isSet(_arg1)){
if (_arg1.indexOf(_arg2) >= 0){
return (_arg1.split(_arg2).join(_arg3));
};
};
return (_arg1);
}
public function set pageURL(_arg1:String){
_pageURL = _arg1;
setGlobal("pageURL", _arg1);
}
private function initPost(){
}
public function get configURL():String{
return (this._configURL);
}
private function makeRequest(_arg1:String, _arg2:String, _arg3:String, _arg4:String){
var _local11:String;
var _local12:Number;
var _local5:Object = this;
var _local6:* = _local5.getMovieURL();
var _local7:String = _local5.trackingServer;
var _local8:String = _local5.trackingServerBase;
var _local9:String = _local5.dc;
var _local10 = "sc.";
if (!_local5.isSet(_arg3)){
if (_local5.isSet(_local7)){
if (((_local5.isSet(_local5.trackingServerSecure)) && (_local5.isSet(_local5.ssl)))){
_local7 = _local5.trackingServerSecure;
};
} else {
_local11 = _local5.visitorNamespace;
if (!_local5.isSet(_local11)){
_local11 = _local5.account;
_local12 = _local11.indexOf(",");
if (_local12 >= 0){
_local11 = _local11.substr(0, _local12);
};
_local11 = _local11.split("_").join("-");
};
if (!_local5.isSet(_local8)){
_local8 = "2o7.net";
};
if (_local5.isSet(_local9)){
_local9 = _local9.toLowerCase();
} else {
_local9 = "d1";
};
if (_local8 == "2o7.net"){
if (_local9 == "d1"){
_local9 = "112";
} else {
if (_local9 == "d2"){
_local9 = "122";
};
};
_local10 = "";
};
_local7 = (((((_local11 + ".") + _local9) + ".") + _local10) + _local8);
};
if (_local5.isSet(_local5.ssl)){
_arg3 = "https://";
} else {
_arg3 = "http://";
};
_arg3 = (_arg3 + (((((((((((((_local7 + "/b/ss/") + _local5.account) + "/") + (_local5.mobile) ? "5.0" : "0") + "/") + _local5.version) + "-AS") + _local5.flashASVersion) + "/") + _arg1) + "?AQB=1&ndh=1&") + _arg2) + "&AQE=1"));
if (_local5.isSet(_arg4)){
_local5.bufferRequest(_local5.account, _arg4, _arg3);
return;
};
};
if (((_local5.isSet(_local5.ssl)) && ((_arg3.toLowerCase().substr(0, 5) == "http:")))){
_arg3 = ("https:" + _arg3.substr(5));
};
if (((((((_local5.isSet(_local5.trackLocal)) || ((_local5.flashVersion < 8)))) || (!(_local5.isSet(_local6))))) || ((_local6.toLowerCase().substr(0, 4) == "http")))){
_local5.requestList.push(_arg3);
if (((!(_local5.isSet(_local5.delayTracking))) || (((_local5.isSet(_local5.delayTrackingStage)) && ((_local5.delayTrackingStage == 2)))))){
_local5.flushRequestList();
} else {
if (((_local5.isSet(_local5.delayTracking)) && (!(_local5.isSet(_local5.delayTrackingStage))))){
_local5.delayTrackingStage = 1;
_local5.delayTrackingInterval = _local5.setupInterval(_local5, "delayTrackingDone", _local5.delayTracking, null);
};
};
};
}
private function bufferTrackCheck(){
var _local2:Number;
var _local3:Object;
var _local1:Object = this;
if (((((((!(_local1.isSet(_local1.bufferTrackQueue))) || ((_local1.bufferTrackQueue.length <= 0)))) || (!(_local1.isSet(_local1.configXML))))) || (_local1.isSet(_local1.configXML.loaded)))){
clearInterval(_local1.bufferTrackInterval);
_local1.bufferTrackInterval = 0;
if (_local1.isSet(_local1.bufferTrackQueue)){
_local2 = 0;
while (_local2 < _local1.bufferTrackQueue.length) {
_local3 = _local1.bufferTrackQueue[_local2];
if (_local1.isSet(_local3)){
_local1.variableOverridesApply(_local3.setVariables);
_local1.track(_local3.variableOverrides, _local3.bufferedRequestID);
};
_local2++;
};
};
_local1.bufferTrackQueue = undefined;
};
}
public function isSet(_arg1, _arg2:String=null):Boolean{
var e:Object;
var val = _arg1;
var mbr = _arg2;
try {
if (mbr != null){
val = val[mbr];
};
return (((((((((((!((val == null))) && (!((val == undefined))))) && (!((("" + val) == "NaN"))))) && (!((val == false))))) && (!((val == ""))))) && (!((val == 0)))));
} catch(e) {
};
return (false);
}
private function queryStringAccountVariables():String{
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:String;
var _local7:*;
var _local8:String;
var _local9:String;
var _local1:Object = this;
var _local2 = "";
var _local10:* = "";
var _local11:* = "";
var _local12:* = "";
if (((_local1.isSet(_local1.pe)) || (_local1.isSet(_local1.linkType)))){
_local10 = _local1.linkTrackVars;
_local11 = _local1.linkTrackEvents;
if (_local1.isSet(_local1.pe)){
_local12 = (_local1.pe.substr(0, 1).toUpperCase() + _local1.pe.substr(1));
if (_local1.isSet(_local1[_local12])){
_local10 = _local1[_local12].trackVars;
_local11 = _local1[_local12].trackEvents;
};
};
};
if (_local1.isSet(_local10)){
_local10 = (((("," + _local10) + ",") + _local1.requiredVarList.join(",")) + ",");
};
if (_local1.isSet(_local11)){
_local11 = (("," + _local11) + ",");
};
_local3 = 0;
while (_local3 < _local1.accountVarList.length) {
_local5 = _local1.accountVarList[_local3];
_local6 = _local1[_local5];
_local8 = _local5.substr(0, 4);
_local9 = _local5.substr(4);
if (((_local1.isSet(_local6)) && (((!(_local1.isSet(_local10))) || ((_local10.indexOf((("," + _local5) + ",")) >= 0)))))){
switch (_local5){
case "dynamicVariablePrefix":
_local5 = "D";
break;
case "visitorID":
_local5 = "vid";
break;
case "pageURL":
_local5 = "g";
break;
case "referrer":
_local5 = "r";
break;
case "vmk":
case "visitorMigrationKey":
_local5 = "vmt";
break;
case "visitorMigrationServer":
_local5 = "vmf";
if (((_local1.isSet(_local1.ssl)) && (_local1.isSet(_local1.visitorMigrationServerSecure)))){
_local6 = "";
};
break;
case "visitorMigrationServerSecure":
_local5 = "vmf";
if (((!(_local1.isSet(_local1.ssl))) && (_local1.isSet(_local1.visitorMigrationServer)))){
_local6 = "";
};
break;
case "charSet":
_local5 = "ce";
break;
case "visitorNamespace":
_local5 = "ns";
break;
case "cookieDomainPeriods":
_local5 = "cdp";
break;
case "cookieLifetime":
_local5 = "cl";
break;
case "currencyCode":
_local5 = "cc";
break;
case "channel":
_local5 = "ch";
break;
case "transactionID":
_local5 = "xact";
break;
case "campaign":
_local5 = "v0";
break;
case "events":
if (_local1.isSet(_local11)){
_local7 = _local6.split(",");
_local6 = "";
_local4 = 0;
while (_local4 < _local7.length) {
if (_local11.indexOf((("," + _local7[_local4]) + ",")) >= 0){
_local6 = (_local6 + ((_local1.isSet(_local6)) ? "," : "" + _local7[_local4]));
};
_local4++;
};
};
break;
default:
if (_local1.isNumber(_local9)){
if (_local8 == "prop"){
_local5 = ("c" + _local9);
} else {
if (_local8 == "eVar"){
_local5 = ("v" + _local9);
} else {
if (_local8 == "list"){
_local5 = ("l" + _local9);
} else {
if (_local8 == "hier"){
_local5 = ("h" + _local9);
_local6 = _local6.substr(0, 0xFF);
};
};
};
};
};
break;
};
if (_local1.isSet(_local6)){
_local2 = (_local2 + ((("&" + escape(_local5)) + "=") + ((_local5.substr(0, 3))!="pev") ? escape(_local6) : _local6));
};
};
_local3++;
};
return (_local2);
}
public function trackLink(_arg1, _arg2:String, _arg3:String, _arg4:Object=null){
this._trackLink(_arg1, _arg2, _arg3, _arg4);
}
public function get version():String{
return (_version);
}
private function _flushBufferedRequests(_arg1:String){
var _local3:Object;
var _local4:Object;
var _local5:Number;
var _local2:Object = this;
_local3 = _local2.getBufferedRequests();
if (((((_local2.isSet(_local3)) && (_local2.isSet(_local3.data)))) && (_local2.isSet(_local3.data.list)))){
_local5 = 0;
while (_local5 < _local3.data.list.length) {
_local4 = _local3.data.list[_local5];
if (_local4.account == _arg1){
_local2.flushBufferedRequest(_arg1, _local4.id);
};
_local5++;
};
};
}
private function bufferTrack(_arg1:Object, _arg2:String){
var _local4:Object;
var _local5:Object;
var _local3:Object = this;
if (((_local3.isSet(_local3.configXML)) && (!(_local3.isSet(_local3.configXML.loaded))))){
if (!_local3.isSet(_local3.bufferTrackQueue)){
_local3.bufferTrackQueue = new Array();
};
_local5 = new Object();
_local5.setVariables = new Object();
_local3.variableOverridesBuild(_local5.setVariables, true);
if (_local3.isSet(_arg1)){
_local5.variableOverrides = new Object();
for (_local4 in _arg1) {
_local5.variableOverrides[_local4] = _arg1[_local4];
};
};
_local5.bufferedRequestID = _arg2;
_local3.bufferTrackQueue.push(_local5);
if (!_local3.isSet(_local3.bufferTrackInterval)){
_local3.bufferTrackInterval = _local3.setupInterval(_local3, "bufferTrackCheck", 100, null);
};
return (true);
};
return (false);
}
private function queryStringClickMap():String{
var _local1:Object = this;
var _local2 = "";
var _local3:String = _local1.pageName;
var _local4:Number = 1;
var _local5:String = _local1.objectID;
var _local6:Number = 1;
var _local7 = "FLASH";
if (((((!(_local1.isSet(_local5))) && (_local1.isSet(_local1.linkObject)))) && (((_local1.isSet(_local1.linkObject, "name")) || (_local1.isSet(_local1.linkObject, "_name")))))){
_local5 = _local1.ClickMap.getObjectID(_local1.linkObject);
};
if (!_local1.isSet(_local3)){
_local3 = _local1.pageURL;
_local4 = 0;
};
if (((((((_local1.isSet(_local1.trackClickMap)) && (_local1.isSet(_local3)))) && (_local1.isSet(_local5)))) && (_local1.isSet(_local7)))){
_local2 = (_local2 + ("&pid=" + escape(_local3)));
_local2 = (_local2 + (_local1.isSet(_local4)) ? ("&pidt=" + escape(("" + _local4))) : "");
_local2 = (_local2 + ("&oid=" + escape(_local5.substr(0, 100))));
_local2 = (_local2 + (_local1.isSet(_local6)) ? ("&oidt=" + escape(("" + _local6))) : "");
_local2 = (_local2 + ("&ot=" + escape(_local7)));
};
return (_local2);
}
private function queryStringTechnology():String{
var _local1:Object = this;
var _local2 = "";
var _local3:Object = Capabilities;
if (((((_local1.isSet(_local3)) && (_local1.isSet(_local3.screenResolutionX)))) && (_local1.isSet(_local3.screenResolutionY)))){
_local2 = (_local2 + ((("&s=" + _local3.screenResolutionX) + "x") + _local3.screenResolutionY));
};
return (_local2);
}
public function flushBufferedRequests(){
var _local1:* = this;
if (_local1.isSet(_local1.account)){
_local1._flushBufferedRequests(_local1.account);
};
}
public function setInterface(_arg1:Object){
var s:Object;
var subInter:Object;
var interReady:Function;
var inter = _arg1;
s = this;
if (s.isSet(inter)){
if (s.isSet(inter, "root")){
s.movie = inter.root;
} else {
if (s.isSet(inter, "_root")){
s.movie = inter._root;
} else {
if (((s.isSet(inter, "getModule")) && (s.isSet(inter, "addEventListener")))){
subInter = inter.getModule("experience");
if (((s.isSet(subInter)) && (s.isSet(subInter, "getStage")))){
inter = subInter.getStage();
if (s.isSet(inter)){
s.movie = inter;
};
} else {
interReady = function (_arg1:Object){
s.setInterface(inter);
};
inter.addEventListener("complete", subInter);
};
} else {
s.movie = inter;
};
};
};
};
}
private function delayTrackingDone(){
var _local1:Object = this;
clearInterval(_local1.delayTrackingInterval);
_local1.delayTrackingStage = 2;
_local1.flushRequestList();
}
}
}//package com.omniture
Section 56
//ActionSource_Module_ClickMap (com.omniture.ActionSource_Module_ClickMap)
package com.omniture {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.external.*;
public dynamic class ActionSource_Module_ClickMap {
private var s:Object;
private static var isExternalSet:Boolean = false;
public function ActionSource_Module_ClickMap(_arg1:Object){
var e:Object;
var s = _arg1;
super();
var m:Object = this;
m.s = s;
m.s.addEventListener(Event.ADDED_TO_STAGE, m.onAddedToStage, false, 0, true);
if (((ExternalInterface.available) && (!(m.isExternalSet)))){
m.isExternalSet = true;
try {
ExternalInterface.addCallback("s_getDOMIndex", m.getDOMIndex);
ExternalInterface.addCallback("s_getTrackClickMap", m.getTrackClickMap);
ExternalInterface.addCallback("s_getAccount", m.getAccount);
ExternalInterface.addCallback("s_getPageName", m.getPageName);
ExternalInterface.addCallback("s_getPageURL", m.getPageURL);
ExternalInterface.addCallback("s_getMovieID", m.getMovieID);
ExternalInterface.addCallback("s_getVersion", m.getVersion);
ExternalInterface.addCallback("s_getCharSet", m.getCharSet);
ExternalInterface.addCallback("s_getSWFURL", m.getSWFURL);
} catch(e) {
};
};
}
private function nodeShift(_arg1:DisplayObject, _arg2:Number, _arg3:Number){
_arg1.x = _arg2;
_arg1.y = _arg3;
}
private function parentGetBounds(_arg1:DisplayObject){
var _local2:* = _arg1.parent.getBounds(_arg1.parent);
var _local3:* = new Object();
_local3.xMin = _local2.x;
_local3.yMin = _local2.y;
_local3.xMax = (_local2.x + _local2.width);
_local3.yMax = (_local2.y + _local2.height);
return (_local3);
}
private function onMouseClick(_arg1:MouseEvent):void{
var e:Object;
var event = _arg1;
var m:Object = this;
try {
m.sendClickMapEvent(InteractiveObject(event.target));
} catch(e) {
};
}
public function getSWFURL(){
var _local1:Object = this;
if (_local1.s.isSet(s.movie)){
if (((_local1.s.isSet(_local1.s.movie.loaderInfo)) && (_local1.s.isSet(_local1.s.movie.loaderInfo.loaderURL)))){
return (_local1.s.movie.loaderInfo.loaderURL);
};
if (_local1.s.isSet(_local1.s.movie._url)){
return (_local1.s.movie._url);
};
};
return ("");
}
public function getVersion(){
var _local1:Object = this;
return (_local1.s.version);
}
private function getDOMID(_arg1:Object){
var _local3:Object;
var _local2:Object = this;
if (_local2.s.isSet(_arg1)){
_local3 = _local2.getGeom(_arg1);
return (((((((((_local2.getFullPath(_arg1) + ",") + _local3.x) + ",") + _local3.y) + ",") + _local3.w) + ",") + _local3.h));
};
return ("");
}
public function getPageName(){
var _local1:Object = this;
return (_local1.s.pageName);
}
private function onAddedToStage(_arg1:Event):void{
var _local2:Object = this;
_local2.s.root.addEventListener(MouseEvent.CLICK, _local2.onMouseClick, true, 0, true);
}
private function getFullPath(_arg1:DisplayObject){
var _local2:String;
var _local3:String;
var _local4:Array = new Array();
do {
_local4.splice(0, 0, _arg1.name);
_arg1 = _arg1.parent;
} while (_arg1.parent != null);
_local2 = _local4.join(".");
_local3 = _local2.substr((_local2.length - 4), 4);
if ((((_local3 == ".frs")) || ((_local3 == ".fds")))){
_local2 = _local2.substr(0, (_local2.length - 4));
};
return (_local2);
}
public function getPageURL(){
var _local1:Object = this;
return (_local1.s.pageURL);
}
public function getDOMIndex(){
var _local1:Object = this;
return (_local1.getIndex());
}
public function getObjectID(_arg1:Object){
var _local2:Object = this;
var _local3:String = _local2.getMovieID();
var _local4 = "";
_local4 = _local2.getFullPath(_arg1);
if (_local2.s.isSet(_local4)){
_local4 = (((_local2.s.isSet(_local3)) ? _local3 : "" + ":") + _local4);
};
return (_local4);
}
private function indexChildren(_arg1:DisplayObjectContainer):String{
var _local4:Number;
var _local5:DisplayObject;
var _local2:Object = this;
var _local3:String = new String();
_local4 = 0;
while (_local4 < _arg1.numChildren) {
_local5 = _arg1.getChildAt(_local4);
if (_local2.s.isSet(_local5)){
_local3 = (_local3 + ("|" + _local2.getDOMID(_local5)));
if ((_local5 is DisplayObjectContainer)){
_local3 = (_local3 + _local2.indexChildren(DisplayObjectContainer(_local5)));
};
};
_local4++;
};
return (_local3);
}
private function nodePos(_arg1:DisplayObject){
var _local2:* = new Object();
_local2.x = _arg1.x;
_local2.y = _arg1.y;
return (_local2);
}
public function getMovieID(){
var _local4:Number;
var _local5:Number;
var _local1:Object = this;
var _local2:String = _local1.getSWFURL();
var _local3:String = s.movieID;
if (((!(_local1.s.isSet(_local3))) && (_local1.s.isSet(_local2)))){
_local4 = _local2.lastIndexOf("/");
_local5 = _local2.lastIndexOf(".");
if (_local4 >= 0){
_local4++;
} else {
_local4 = 0;
};
if (_local5 >= 0){
_local5 = (_local5 - _local4);
} else {
_local5 = _local2.length;
};
_local3 = _local2.substr(_local4, _local5);
};
if (!_local1.s.isSet(_local3)){
_local3 = "movieID undefined";
};
return (_local3);
}
public function getCharSet(){
var _local1:Object = this;
return (_local1.s.charSet);
}
public function getAccount(){
var _local1:Object = this;
return (_local1.s.account);
}
public function getTrackClickMap(){
var _local1:Object = this;
return (_local1.s.trackClickMap.toString());
}
private function getGeom(_arg1:Object){
var _local5:Object;
var _local6:Object;
var _local7:Object;
var _local8:Object;
var _local9:Object;
var _local2:Object = this;
var _local3:Object = new Object();
var _local4:Object;
_local3.x = 0;
_local3.y = 0;
_local3.w = 0;
_local3.h = 0;
if (((_local2.s.isSet(_arg1)) && (((_local2.s.isSet(_arg1, "_parent")) || (_local2.s.isSet(_arg1, "parent")))))){
if (s.isSet(_arg1, "_parent")){
_local4 = _local2.getGeom(_arg1._parent);
} else {
if (s.isSet(_arg1, "parent")){
_local4 = _local2.getGeom(_arg1.parent);
};
};
if (((((((((((_local2.s.isSet(_arg1, "size")) && ((typeof(_arg1.size) == "function")))) && (_local2.s.isSet(_arg1, "__width")))) && (_local2.s.isSet(_arg1, "__height")))) && (!((_arg1.__width == _arg1._width))))) && (!((_arg1.__height == _arg1._height))))){
_arg1.size();
};
if (((_local2.s.isSet(_arg1, "width")) && (_local2.s.isSet(_arg1, "height")))){
_local3.x = _arg1.x;
_local3.y = _arg1.y;
_local2.parentLocalToGlobal(_arg1, _local3);
_local3.w = _arg1.width;
_local3.h = _arg1.height;
} else {
_local7 = _local2.parentGetBounds(_arg1);
_local5 = _local2.nodePos(_arg1);
_local6 = _local2.nodePos(_arg1);
_local2.nodeShift(_arg1, _local7.xMin, _local7.yMin);
_local8 = _local2.parentGetBounds(_arg1);
_local2.nodeShift(_arg1, _local7.xMax, _local7.yMax);
_local9 = _local2.parentGetBounds(_arg1);
_local2.nodeShift(_arg1, _local5.x, _local5.y);
_local5.x = (_local5.x + (_local8.xMin - _local7.xMin));
_local5.y = (_local5.y + (_local8.yMin - _local7.yMin));
_local6.x = (_local6.x + (_local9.xMax - _local7.xMax));
_local6.y = (_local6.y + (_local9.yMax - _local7.yMax));
_local2.parentLocalToGlobal(_arg1, _local5);
_local2.parentLocalToGlobal(_arg1, _local6);
_local3.x = _local5.x;
_local3.y = _local5.y;
_local3.w = (_local6.x - _local5.x);
_local3.h = (_local6.y - _local5.y);
};
if (((((_local2.s.isSet(_local4)) && (_local2.s.isSet(_local4.x)))) && (_local2.s.isSet(_local4.y)))){
_local3.x = (_local3.x + _local4.x);
_local3.y = (_local3.y + _local4.y);
};
_local3.x = Math.round(_local3.x);
_local3.y = Math.round(_local3.y);
_local3.w = Math.ceil(_local3.w);
_local3.h = Math.ceil(_local3.h);
};
return (_local3);
}
public function getIndex(){
var _local2:String;
var _local1:Object = this;
if (_local1.s.isSet(_local1.s.movie)){
_local2 = (((_local1.s.movie.stage.stageWidth + ",") + _local1.s.movie.stage.stageHeight) + _local1.indexChildren(_local1.s.movie));
return (_local2);
};
return ("");
}
private function sendClickMapEvent(_arg1:Object){
var _local5:String;
var _local6:Number;
var _local2:Object = this;
var _local3:String = _local2.s.getMovieURL();
var _local4:String = _local2.getMovieID();
if (_local2.s.isSet(_local2.s.trackClickMap)){
_local2.s.objectID = _local2.getObjectID(_arg1);
};
if (_local2.s.autoTrack){
_local5 = _local3;
_local6 = _local5.indexOf("?");
if (_local6 >= 0){
_local5 = _local5.substr(0, _local6);
};
if (_local5.length > (100 - 23)){
_local5 = _local5.substr(-((100 - 23)));
};
_local2.s.trackLink(_local3, "o", ("ActionSource.AutoTrack:" + _local5));
};
}
private function parentLocalToGlobal(_arg1:DisplayObject, _arg2:Object){
var _local3:* = new Point(_arg2.x, _arg2.y);
_arg1.parent.localToGlobal(_local3);
_arg2.x = _local3.x;
_arg2.y = _local3.y;
}
}
}//package com.omniture
Section 57
//ActionSource_Module_Media (com.omniture.ActionSource_Module_Media)
package com.omniture {
import flash.utils.*;
public dynamic class ActionSource_Module_Media {
private var autoTrackDone:Boolean;// = false
public var playerName:String;
public var trackVars:String;
private var monitorList:Array;
private var list:Object;
public var trackWhilePlaying:Boolean;// = false
public var trackMilestones:String;// = ""
public var trackSeconds:Number;// = 0
private var autoTrackInterval:Number;
public var trackEvents:String;
private var _autoTrack:Boolean;// = false
private var s:Object;
public function ActionSource_Module_Media(_arg1:Object){
var _local2:Object = this;
_local2.s = _arg1;
_local2.monitorList = null;
}
public function listenerMedia_scrubbing(_arg1){
this.listenerMedia.scrubbing(_arg1);
}
public function stop(_arg1:String, _arg2:Number){
this.event(_arg1, 2, _arg2);
}
public function listenerBrightcove_seek(_arg1){
this.listenerBrightcove.seek(_arg1);
}
public function listenerMedia_complete(_arg1){
this.listenerMedia.complete(_arg1);
}
public function doAutoTrack(){
var _local1:Object = this;
if (((!(_local1.s.isSet(_local1.s.account))) || (!(_local1.s.isSet(_local1.s.movie))))){
return;
};
clearInterval(_local1.autoTrackInterval);
if (((_local1._autoTrack) && (!(_local1.autoTrackDone)))){
if (_local1.attach(_local1.s.movie)){
_local1.autoTrackDone = true;
} else {
_local1.autoTrackInterval = _local1.s.setupInterval(this, "doAutoTrack", 1000, null);
};
};
}
public function listenerMedia_click(_arg1){
this.listenerMedia.click(_arg1);
}
private function event(_arg1:String, _arg2:Number, _arg3:Number){
var _local5:Object;
var _local10:Array;
var _local11:Number;
var _local18:String;
var _local4:Object = this;
var _local6:Date = new Date();
var _local7:Number = Math.floor((_local6.getTime() / 1000));
var _local8:Number = _local4.trackSeconds;
var _local9:String = _local4.trackMilestones;
var _local12 = "--**--";
var _local13:Boolean;
var _local14:String;
var _local15:String = _local4.trackVars;
var _local16:String = _local4.trackEvents;
var _local17 = "media";
var _local19:Object = new Object();
_arg1 = _local4.cleanName(_arg1);
_local5 = (((((_local4.s.isSet(_arg1)) && (_local4.s.isSet(_local4.list)))) && (_local4.s.isSet(_local4.list[_arg1])))) ? _local4.list[_arg1] : null;
if (_local4.s.isSet(_local5)){
_local19.name = _arg1;
_local19.length = _local5.length;
_local19.playerName = _local5.playerName;
if (_local5.lastTrackOffset < 0){
_local19.event = "OPEN";
} else {
_local19.event = ((_arg2 == 1)) ? "PLAY" : ((_arg2 == 2)) ? "STOP" : ((_arg2 == 3)) ? "MONITOR" : "CLOSE";
};
_local19.openTime = new Date();
_local19.openTime.setTime((_local5.timestamp * 1000));
if ((((_arg2 > 2)) || (((!((_arg2 == _local5.lastEventType))) && (((!((_arg2 == 2))) || ((_local5.lastEventType == 1)))))))){
_local14 = ("Media." + _arg1);
_local18 = (((((("" + escape(_local5.name)) + _local12) + _local5.length) + _local12) + escape(_local5.playerName)) + _local12);
if (_local4.s.isSet(_arg2)){
if ((((_arg3 < 0)) && ((_local5.lastEventTimestamp > 0)))){
_arg3 = ((_local7 - _local5.lastEventTimestamp) + _local5.lastEventOffset);
_arg3 = ((_arg3 < _local5.length)) ? _arg3 : (_local5.length - 1);
};
_arg3 = Math.floor(_arg3);
if ((((_arg2 >= 2)) && ((_local5.lastEventOffset < _arg3)))){
_local5.timePlayed = (_local5.timePlayed + (_arg3 - _local5.lastEventOffset));
_local5.timePlayedSinseTrack = (_local5.timePlayedSinseTrack + (_arg3 - _local5.lastEventOffset));
};
if (_arg2 <= 2){
_local5.session = (_local5.session + (((_arg2 == 1)) ? "S" : "E" + _arg3));
_local5.lastEventType = _arg2;
} else {
if (_local5.lastEventType != 1){
_local4.event(_arg1, 1, _arg3);
};
};
_local5.lastEventTimestamp = _local7;
_local5.lastEventOffset = _arg3;
_local18 = (_local18 + ((((((("" + _local5.timePlayed) + _local12) + _local5.timestamp) + _local12) + (((_local4.s.isSet(_local4.trackWhilePlaying)) && ((_local5.lastTrackOffset >= 0)))) ? ("L" + _local5.lastTrackOffset) : "") + _local5.session) + ((_arg2)!=2) ? ((_local4.s.isSet(_local4.trackWhilePlaying)) ? "L" : "E" + _arg3) : ""));
if (_local4.s.isSet(_local4.trackWhilePlaying)){
_local14 = null;
_local17 = "m_o";
if (_arg2 != 4){
_local19.offset = _arg3;
_local19.percent = (((_local19.offset + 1) / _local19.length) * 100);
_local19.percent = ((_local19.percent > 100)) ? 100 : Math.floor(_local19.percent);
_local19.timePlayed = _local5.timePlayed;
if (_local4.s.isSet(_local4.monitor)){
_local4.monitor(_local4.s, _local19);
};
};
if (_local5.lastTrackOffset < 0){
_local17 = "m_s";
} else {
if (_arg2 == 4){
_local17 = "m_i";
} else {
_local13 = false;
_local16 = "None";
_local15 = _local16;
_local8 = (_local4.s.isSet(_local8)) ? parseInt(("" + _local8)) : 0;
_local10 = (_local4.s.isSet(_local9)) ? _local9.split(",") : null;
if (((_local4.s.isSet(_local8)) && ((_local5.timePlayedSinseTrack >= _local8)))){
_local13 = true;
} else {
if (_local4.s.isSet(_local10)){
if (_arg3 < _local5.lastTrackOffset){
_local5.lastTrackOffset = _arg3;
} else {
_local11 = 0;
while (_local11 < _local10.length) {
_local8 = (_local4.s.isSet(_local10[_local11])) ? parseInt(("" + _local10[_local11])) : 0;
if (((((_local4.s.isSet(_local8)) && ((((_local5.lastTrackOffset + 1) / _local5.length) < (_local8 / 100))))) && ((((_arg3 + 1) / _local5.length) >= (_local8 / 100))))){
_local13 = true;
_local11 = _local10.length;
};
_local11++;
};
};
};
};
};
};
};
} else {
_local4.event(_arg1, 2, -1);
if (_local4.s.isSet(_local4.trackWhilePlaying)){
_local19.offset = _local5.lastEventOffset;
_local19.percent = (((_local19.offset + 1) / _local19.length) * 100);
_local19.percent = ((_local19.percent > 100)) ? 100 : Math.floor(_local19.percent);
_local19.timePlayed = _local5.timePlayed;
if (_local4.s.isSet(_local4.monitor)){
_local4.monitor(_local4.s, _local19);
};
};
_local4.list[_arg1] = 0;
if (_local4.s.isSet(_local5.session)){
_local18 = (_local18 + (((((("" + _local5.timePlayed) + _local12) + _local5.timestamp) + _local12) + (((_local4.s.isSet(_local4.trackWhilePlaying)) && ((_local5.lastTrackOffset >= 0)))) ? ("L" + _local5.lastTrackOffset) : "") + _local5.session));
if (_local4.s.isSet(_local4.trackWhilePlaying)){
_local16 = "None";
_local15 = _local16;
_local17 = "m_o";
} else {
_local13 = false;
_local4.s.flushBufferedRequest(_local4.s.account, _local14);
};
} else {
_local13 = false;
};
_local14 = null;
};
if (_local13){
_local4.s.track({linkTrackVars:_local15, linkTrackEvents:_local16, pe:_local17, pev3:_local18}, _local14);
if (_local4.s.isSet(_local4.trackWhilePlaying)){
_local5.timePlayedSinseTrack = 0;
_local5.lastTrackOffset = _arg3;
_local5.session = "";
};
};
};
};
}
public function listenerFLVPlayback_complete(_arg1){
this.listenerFLVPlayback.complete(_arg1);
}
public function variableOverridesApply(_arg1:Object){
var _local3:String;
var _local2:Object = this;
for (_local3 in _arg1) {
if ((((_local3 == "autoTrack")) || ((_local3 == "trackWhilePlaying")))){
if (typeof(_arg1[_local3]) == "string"){
if (_arg1[_local3].toLowerCase() == "true"){
_arg1[_local3] = true;
} else {
_arg1[_local3] = false;
};
} else {
if (typeof(_arg1[_local3]) != "boolean"){
_arg1[_local3] = false;
};
};
} else {
if (_local3 == "trackSeconds"){
if (typeof(_arg1[_local3]) == "string"){
(_arg1[_local3] == parseInt(_arg1[_local3]));
} else {
if (typeof(_arg1[_local3]) != "number"){
(_arg1[_local3] == 0);
};
};
};
};
if ((((((((typeof(_arg1[_local3]) == "string")) || ((typeof(_arg1[_local3]) == "number")))) || ((typeof(_arg1[_local3]) == "boolean")))) && ((((((((((((((_local3 == "autoTrack")) || ((_local3 == "trackWhilePlaying")))) || ((_local3 == "trackSeconds")))) || ((_local3 == "trackMilestones")))) || ((_local3 == "playerName")))) || ((_local3 == "trackVars")))) || ((_local3 == "trackEvents")))))){
_local2[_local3] = _arg1[_local3];
};
};
}
private function startMonitor(_arg1:Object){
var monitorNum:Number;
var monitor = _arg1;
var m:Object = this;
var nextMonitorNum:Number = 0;
if (m.s.isSet(m.monitorList)){
nextMonitorNum = -1;
monitorNum = 0;
while (monitorNum < m.monitorList.length) {
if (m.s.isSet(m.monitorList[monitorNum])){
if (((((((m.s.isSet(m.monitorList[monitorNum].node)) && (m.s.isSet(monitor)))) && (m.s.isSet(monitor.node)))) && ((m.monitorList[monitorNum].node == monitor.node)))){
return;
};
} else {
if (nextMonitorNum < 0){
nextMonitorNum = monitorNum;
};
};
monitorNum = (monitorNum + 1);
};
if (nextMonitorNum < 0){
nextMonitorNum = m.monitorList.length;
};
} else {
m.monitorList = new Array();
};
monitor.update = function (_arg1:Object){
if ((((((((((((_arg1.m == null)) || ((_arg1.m == undefined)))) || ((_arg1.m.s == null)))) || ((_arg1.m.s == undefined)))) || ((_arg1.node == null)))) || ((_arg1.node == undefined)))){
clearInterval(_arg1.interval);
_arg1.m.monitorList[_arg1.num] = null;
} else {
_arg1.monitor();
};
};
monitor.interval = m.s.setupInterval(monitor, "update", 5000, monitor);
monitor.num = nextMonitorNum;
m.monitorList[monitor.num] = monitor;
}
private function _open(_arg1:String, _arg2:Number, _arg3:String, _arg4:Object){
var _local9:String;
var _local5:Object = this;
var _local6:Object = new Object();
var _local7:Date = new Date();
var _local8 = "";
_arg1 = _local5.cleanName(_arg1);
_arg2 = Math.floor(_arg2);
if (!_local5.s.isSet(_arg2)){
_arg2 = 1;
};
if (((_local5.s.isSet(_arg1)) && (_local5.s.isSet(_arg3)))){
if (!_local5.s.isSet(_local5.list)){
_local5.list = new Object();
};
if (_local5.s.isSet(_local5.list[_arg1])){
_local5.close(_arg1);
};
if (_local5.s.isSet(_arg4)){
_local8 = ("" + _arg4);
};
for (_local9 in _local5.list) {
if (((_local5.s.isSet(_local5.list[_local9])) && ((_local5.list[_local9].playerID == _local8)))){
_local5.close(_local5.list[_local9].name);
};
};
_local6.name = _arg1;
_local6.length = _arg2;
_local6.playerName = _local5.cleanName((_local5.s.isSet(_local5.playerName)) ? _local5.playerName : _arg3);
_local6.playerID = _local8;
_local6.timePlayed = 0;
_local6.timePlayedSinseTrack = 0;
_local6.timestamp = Math.floor((_local7.getTime() / 1000));
_local6.lastEventType = 0;
_local6.lastEventTimestamp = _local6.timestamp;
_local6.lastEventOffset = 0;
_local6.session = "";
_local6.lastTrackOffset = -1;
_local5.list[_arg1] = _local6;
};
}
private function autoEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Object){
var _local7:Object = this;
_arg1 = _local7.cleanName(_arg1);
if (((((_local7.s.isSet(_arg1)) && (_local7.s.isSet(_arg2)))) && (_local7.s.isSet(_arg3)))){
if (((!(_local7.s.isSet(_local7.list))) || (!(_local7.s.isSet(_local7.list[_arg1]))))){
_local7.open(_arg1, _arg2, _arg3, _arg6);
};
_local7.event(_arg1, _arg4, _arg5);
};
}
public function play(_arg1:String, _arg2:Number){
var media:Object;
var monitor:Object;
var name = _arg1;
var offset = _arg2;
var m:Object = this;
m.event(name, 1, offset);
monitor = new Object();
monitor.m = m;
monitor.node = m.cleanName(name);
monitor.monitor = function (){
var _local3:Object;
var _local1:Object = this.m;
var _local2:Object = this.node;
_local3 = (((((_local1.s.isSet(_local2)) && (_local1.s.isSet(_local1.list)))) && (_local1.s.isSet(_local1.list[_local2])))) ? _local1.list[_local2] : null;
if (_local1.s.isSet(_local3)){
if (_local3.lastEventType == 1){
_local1.event(_local3.name, 3, -1);
};
} else {
this.node = null;
};
};
m.startMonitor(monitor);
}
public function set autoTrack(_arg1:Boolean){
this._autoTrack = _arg1;
if (this._autoTrack){
this.autoTrackInterval = this.s.setupInterval(this, "doAutoTrack", 100, null);
};
}
public function listenerFLVPlayback_stateChange(_arg1){
this.listenerFLVPlayback.stateChange(_arg1);
}
public function listenerBrightcove_videoStart(_arg1){
this.listenerBrightcove.videoStart(_arg1);
}
public function listenerMedia_change(_arg1){
this.listenerMedia.change(_arg1);
}
private function attach(_arg1:Object):Boolean{
var member:String;
var childNum:Number;
var player:Object;
var monitor:Object;
var subAttached:Boolean;
var node = _arg1;
var m:Object = this;
var attached:Boolean;
if (m.s.isSet(node)){
if (((m.s.isSet(node, "getModule")) || (m.s.isSet(node, "showBrightcoveMenu")))){
player = node;
if ((((m.s.flashASVersion > 2)) && (m.s.isSet(node, "getModule")))){
player = node.getModule("experience");
if (((((m.s.isSet(player)) && (m.s.isSet(player, "getReady")))) && (player.getReady()))){
player = node.getModule("videoPlayer");
} else {
player = undefined;
};
};
if (((s.isSet(player)) && (s.isSet(player, "addEventListener")))){
if (!m.s.isSet(m.listenerBrightcove)){
m.listenerBrightcove = new Object();
m.listenerBrightcove.m = m;
m.listenerBrightcove.playerName = "Brightcove";
if (m.s.flashASVersion > 2){
m.listenerBrightcove.playerName = (m.listenerBrightcove.playerName + " 3");
} else {
m.listenerBrightcove.playerName = (m.listenerBrightcove.playerName + " 2");
};
m.listenerBrightcove.handleEvent = function (_arg1:Object, _arg2:Number, _arg3:Number){
var _local5:String;
var _local6:Number;
var _local7:Object;
var _local4:Object = this.m;
if (((_local4.s.isSet(_local4.autoTrack)) && (_local4.s.isSet(_arg1)))){
if (_local4.s.flashASVersion > 2){
_local7 = _arg1.getCurrentVideo();
} else {
_local7 = _arg1.getCurrentTitle();
};
if (((_local4.s.isSet(_local7)) && (_local4.s.isSet(_local7.id)))){
_local5 = ((this.playerName + ":") + _local7.id);
_local6 = (_local7.length / 1000);
if (_arg3 < 0){
_arg3 = _arg1.getVideoPosition();
};
if (!_local4.s.isSet(_arg3)){
_arg3 = 0;
};
_local4.autoEvent(_local5, _local6, this.playerName, _arg2, _arg3, _arg1);
};
};
};
m.listenerBrightcove.videoProgress = (m.listenerBrightcove.videoStart = (m.listenerBrightcove.progress = (m.listenerBrightcove.play = function (_arg1){
if (((((((this.m.s.isSet(_arg1)) && (this.m.s.isSet(_arg1.target)))) && (this.m.s.isSet(_arg1.target.isPlaying)))) && (_arg1.target.isPlaying()))){
this.handleEvent(_arg1.target, 1, ((typeof(_arg1.position) == "number")) ? _arg1.position : -1);
};
})));
m.listenerBrightcove.videoStop = (m.listenerBrightcove.startBuffering = (m.listenerBrightcove.pause = (m.listenerBrightcove.buffering = (m.listenerBrightcove.scrubber = (m.listenerBrightcove.seek = function (_arg1){
if (this.m.s.isSet(_arg1)){
this.handleEvent(_arg1.target, 2, -1);
};
})))));
m.listenerBrightcove.videoComplete = (m.listenerBrightcove.mediaComplete = function (_arg1){
if (this.m.s.isSet(_arg1)){
this.handleEvent(_arg1.target, 0, -1);
};
});
};
if (m.s.flashASVersion > 2){
player.addEventListener("videoProgress", m.listenerBrightcove_videoProgress);
player.addEventListener("videoStart", m.listenerBrightcove_videoStart);
player.addEventListener("videoStop", m.listenerBrightcove_videoStop);
player.addEventListener("startBuffering", m.listenerBrightcove_startBuffering);
player.addEventListener("seek", m.listenerBrightcove_seek);
player.addEventListener("videoComplete", m.listenerBrightcove_videoComplete);
} else {
player.addEventListener("progress", m.listenerBrightcove, "progress");
player.addEventListener("play", m.listenerBrightcove, "play");
player.addEventListener("pause", m.listenerBrightcove, "pause");
player.addEventListener("buffering", m.listenerBrightcove, "buffering");
player.addEventListener("scrubber", m.listenerBrightcove, "scrubber");
player.addEventListener("seek", m.listenerBrightcove, "seek");
player.addEventListener("mediaComplete", m.listenerBrightcove, "mediaComplete");
};
monitor = new Object();
monitor.m = m;
monitor.node = player;
monitor.monitor = function (){
var _local1:Object = this.m;
var _local2:Object = this.node;
if (((_local1.s.isSet(_local2.isPlaying)) && (_local2.isPlaying()))){
this.m.listenerBrightcove.handleEvent(_local2, 3, -1);
};
};
m.startMonitor(monitor);
attached = true;
return (attached);
};
};
if (((((((((0) && (m.s.isSet(node, "flvVideo")))) && (m.s.isSet(node.flvVideo, "mBandwidthDetector")))) && (m.s.isSet(node.flvVideo.mBandwidthDetector, "mVideoPlayer")))) && (m.s.isSet(node.flvVideo.mBandwidthDetector.mVideoPlayer, "addEventListener")))){
node = node.flvVideo.mBandwidthDetector.mVideoPlayer;
if (!m.s.isSet(m.listenerMaven)){
m.listenerMaven = new Object();
m.listenerMaven.m = m;
m.listenerMaven.playerName = "Maven Networks";
m.listenerMaven.handleEvent = function (_arg1:Object, _arg2:Number){
var _local4:String;
var _local5:Number;
var _local6:Number;
var _local3:Object = this.m;
if (((_local3.s.isSet(_local3.autoTrack)) && (_local3.s.isSet(_arg1)))){
if (_local3.s.flashASVersion > 2){
_local4 = _arg1.source;
} else {
_local4 = _arg1.contentPath;
};
_local5 = _arg1.totalTime;
_local6 = _arg1.playheadTime;
_local3.autoEvent(_local4, _local5, this.playerName, _arg2, _local6, _arg1);
};
};
m.listenerMaven.stateChange = function (_arg1){
var _local4:Object;
var _local2:Object = this.m;
var _local3:Number = -1;
if (((_local2.s.isSet(_arg1)) && (_local2.s.isSet(_arg1.target)))){
_local4 = _arg1.target;
if (_local2.s.isSet(_local4, "state")){
if (_local4.state == "playing"){
_local3 = 1;
} else {
if ((((((((((_local4.state == "stopped")) || ((_local4.state == "paused")))) || ((_local4.state == "buffering")))) || ((_local4.state == "rewinding")))) || ((_local4.state == "seeking")))){
_local3 = 2;
};
};
if (_local3 >= 0){
this.handleEvent(_arg1.target, _local3);
};
};
};
};
m.listenerMaven.complete = function (_arg1){
if (this.m.s.isSet(_arg1)){
this.handleEvent(_arg1.target, 0);
};
};
};
if (m.s.flashASVersion > 2){
node.addEventListener("complete", m.listenerMaven_complete);
node.addEventListener("stateChange", m.listenerMaven_stateChange);
} else {
node.addEventListener("complete", m.listenerMaven);
node.addEventListener("stateChange", m.listenerMaven);
};
monitor = new Object();
monitor.m = m;
monitor.node = node;
monitor.monitor = function (){
var _local1:Object = this.m;
var _local2:Object = this.node;
if (((_local1.s.isSet(_local2.state)) && ((_local2.state == "playing")))){
this.m.listenerMaven.handleEvent(_local2, 3);
};
};
m.startMonitor(monitor);
attached = true;
return (attached);
};
if (((m.s.isSet(node, "addEventListener")) && (m.s.isSet(node, "isFLVCuePointEnabled")))){
if (!m.s.isSet(m.listenerFLVPlayback)){
m.listenerFLVPlayback = new Object();
m.listenerFLVPlayback.m = m;
m.listenerFLVPlayback.playerName = "Flash FLVPlayback";
m.listenerFLVPlayback.handleEvent = function (_arg1:Object, _arg2:Number){
var _local4:String;
var _local5:Number;
var _local6:Number;
var _local3:Object = this.m;
if (((_local3.s.isSet(_local3.autoTrack)) && (_local3.s.isSet(_arg1)))){
if (_local3.s.flashASVersion > 2){
_local4 = _arg1.source;
} else {
_local4 = _arg1.contentPath;
};
_local5 = _arg1.totalTime;
_local6 = _arg1.playheadTime;
_local3.autoEvent(_local4, _local5, this.playerName, _arg2, _local6, _arg1);
};
};
m.listenerFLVPlayback.stateChange = function (_arg1){
var _local4:Object;
var _local2:Object = this.m;
var _local3:Number = -1;
if (((_local2.s.isSet(_arg1)) && (_local2.s.isSet(_arg1.target)))){
_local4 = _arg1.target;
if (_local2.s.isSet(_local4, "state")){
if (_local4.state == "playing"){
_local3 = 1;
} else {
if ((((((((((_local4.state == "stopped")) || ((_local4.state == "paused")))) || ((_local4.state == "buffering")))) || ((_local4.state == "rewinding")))) || ((_local4.state == "seeking")))){
_local3 = 2;
};
};
if (_local3 >= 0){
this.handleEvent(_arg1.target, _local3);
};
};
};
};
m.listenerFLVPlayback.complete = function (_arg1){
if (this.m.s.isSet(_arg1)){
this.handleEvent(_arg1.target, 0);
};
};
};
if (m.s.flashASVersion > 2){
node.addEventListener("complete", m.listenerFLVPlayback_complete);
node.addEventListener("stateChange", m.listenerFLVPlayback_stateChange);
} else {
node.addEventListener("complete", m.listenerFLVPlayback);
node.addEventListener("stateChange", m.listenerFLVPlayback);
};
monitor = new Object();
monitor.m = m;
monitor.node = node;
monitor.monitor = function (){
var _local1:Object = this.m;
var _local2:Object = this.node;
if (((_local1.s.isSet(_local2.state)) && ((_local2.state == "playing")))){
this.m.listenerFLVPlayback.handleEvent(_local2, 3);
};
};
m.startMonitor(monitor);
attached = true;
return (attached);
};
if (((m.s.isSet(node, "addEventListener")) && (m.s.isSet(node, "addCuePoint")))){
if (!m.s.isSet(m.listenerMedia)){
m.listenerMedia = new Object();
m.listenerMedia.m = m;
m.listenerMedia.playerName = "Flash Media";
m.listenerMedia.handleEvent = function (_arg1:Object, _arg2:Number){
var _local4:String;
var _local5:Number;
var _local6:Number;
var _local3:Object = this.m;
if (((_local3.s.isSet(_local3.autoTrack)) && (_local3.s.isSet(_arg1)))){
_local4 = _arg1.contentPath;
_local5 = _arg1.totalTime;
_local6 = _arg1.playheadTime;
_local3.autoEvent(_local4, _local5, this.playerName, _arg2, _local6, _arg1);
};
};
m.listenerMedia.complete = function (_arg1){
if (this.m.s.isSet(_arg1)){
this.handleEvent(_arg1.target, 0);
};
};
m.listenerMedia.click = function (_arg1){
if (((this.m.s.isSet(_arg1)) && (this.m.s.isSet(_arg1.target)))){
this.handleEvent(_arg1.target, (this.m.s.isSet(_arg1.target.playing)) ? 1 : 2);
};
};
m.listenerMedia.change = function (_arg1){
if (((this.m.s.isSet(_arg1)) && (this.m.s.isSet(_arg1.target)))){
this.handleEvent(_arg1.target, (this.m.s.isSet(_arg1.target.playing)) ? 1 : 2);
};
};
m.listenerMedia.scrubbing = function (_arg1){
if (this.m.s.isSet(_arg1)){
this.handleEvent(_arg1.target, 2);
};
};
};
if (m.s.flashASVersion > 2){
node.addEventListener("complete", m.listenerMedia_complete);
node.addEventListener("click", m.listenerMedia_click);
node.addEventListener("change", m.listenerMedia_change);
node.addEventListener("scrubbing", m.listenerMedia_scrubbing);
} else {
node.addEventListener("complete", m.listenerMedia);
node.addEventListener("click", m.listenerMedia);
node.addEventListener("change", m.listenerMedia);
node.addEventListener("scrubbing", m.listenerMedia);
};
monitor = new Object();
monitor.m = m;
monitor.node = node;
monitor.monitor = function (){
var _local1:Object = this.m;
var _local2:Object = this.node;
if (_local1.s.isSet(_local2.playing)){
this.m.listenerMedia.handleEvent(_local2, 3);
};
};
m.startMonitor(monitor);
attached = true;
return (attached);
};
if (m.s.flashASVersion > 2){
if (((m.s.isSet(node, "numChildren")) && (m.s.isSet(node, "getChildAt")))){
childNum = 0;
while (childNum < node.numChildren) {
subAttached = m.attach(node.getChildAt(childNum));
if (m.s.isSet(subAttached)){
attached = subAttached;
};
childNum = (childNum + 1);
};
};
} else {
for (member in node) {
if (((((((m.s.isSet(node[member])) && (m.s.isSet(node[member]._name)))) && ((node[member]._name == member)))) && ((((("" + node) + ".") + member) == ("" + node[member]))))){
subAttached = m.attach(node[member]);
if (m.s.isSet(subAttached)){
attached = subAttached;
};
};
};
};
};
return (attached);
}
public function listenerBrightcove_videoStop(_arg1){
this.listenerBrightcove.videoStop(_arg1);
}
public function open(_arg1:String, _arg2:Number, _arg3:String, _arg4:Object=null){
this._open(_arg1, _arg2, _arg3, _arg4);
}
public function track(_arg1:String){
var _local2:Object = this;
if (_local2.s.isSet(_local2.trackWhilePlaying)){
_local2.event(_arg1, 4, -1);
};
}
public function get autoTrack():Boolean{
return (this._autoTrack);
}
public function listenerBrightcove_videoProgress(_arg1){
this.listenerBrightcove.videoProgress(_arg1);
}
private function cleanName(_arg1:String):String{
var _local2:Object = this;
return (_local2.s.replace(_local2.s.replace(_local2.s.replace(_arg1, "\n", ""), "\r", ""), "--**--", ""));
}
public function listenerBrightcove_startBuffering(_arg1){
this.listenerBrightcove.startBuffering(_arg1);
}
public function close(_arg1:String){
this.event(_arg1, 0, -1);
}
public function listenerBrightcove_videoComplete(_arg1){
this.listenerBrightcove.videoComplete(_arg1);
}
}
}//package com.omniture
Section 58
//ActionSource_XML (com.omniture.ActionSource_XML)
package com.omniture {
import flash.events.*;
import flash.net.*;
public dynamic class ActionSource_XML {
public var onDataReady:String;// = ""
public var data:Object;
public var loaded:Boolean;// = true
private var _url:String;
private var loader:URLLoader;
public function ActionSource_XML(_arg1:Object){
this.s = _arg1;
this.loader = new URLLoader();
this.loader.addEventListener(Event.COMPLETE, this.onComplete);
}
public function get url():String{
return (this._url);
}
private function loadXML(){
this.loaded = false;
this.loader.load(new URLRequest(this._url));
}
private function onComplete(_arg1:Event){
var _local3:XML;
var _local2:Object = XML.settings();
XML.ignoreWhitespace = true;
XML.ignoreProcessingInstructions = true;
XML.ignoreComments = true;
_local3 = new XML(this.loader.data);
this.data = new Object();
if ((((_local3.name() == "config")) && ((_local3.nodeKind() == "element")))){
this.handleNode(_local3, this.data);
};
XML.setSettings(_local2);
if (this.s.isSet(this.onDataReady)){
var _local4 = this.s;
_local4[onDataReady](this.data);
};
this.loaded = true;
}
private function handleNode(_arg1:XML, _arg2:Object){
var _local3:String;
var _local4:XMLList;
var _local5:Number;
_local3 = _arg1.name();
if (((this.s.isSet(_local3)) && ((_arg1.nodeKind() == "element")))){
_local4 = _arg1.children();
if (((this.s.isSet(_local4)) && ((_local4.length() > 0)))){
if (_local4[0].nodeKind() == "text"){
_arg2[_local3] = ("" + _local4[0]);
} else {
_arg2[_local3] = new Object();
_local5 = 0;
while (_local5 < _local4.length()) {
this.handleNode(_local4[_local5], _arg2[_local3]);
_local5++;
};
};
};
};
}
public function set url(_arg1:String){
var _local2:String;
this._url = _arg1;
if (this.s.isSet(this._url)){
_local2 = this._url.toLowerCase();
if (this.s.isSet(this.s.ssl)){
if (_local2.substr(0, 7) == "http://"){
this._url = this._url.substr(7);
_local2 = this._url.toLowerCase();
};
if (_local2.substr(0, 8) != "https://"){
this._url = ("https://" + this._url);
};
} else {
if (((!((_local2.substr(0, 7) == "http://"))) && (!((_local2.substr(0, 8) == "https://"))))){
this._url = ("http://" + this._url);
};
};
this.loadXML();
};
}
}
}//package com.omniture
Section 59
//BaseApp (com.plasticmartians.framework.application.BaseApp)
package com.plasticmartians.framework.application {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import mx.logging.*;
import flash.utils.*;
import com.soenkerohde.logging.*;
public class BaseApp extends MovieClip {
public const DEBUG:Boolean = false;
public const KEY_VERSION:int = 73;
private var mainUpdateTimer:Timer;
public var mcBase:Sprite;
public var mcGame:Sprite;
protected var txtVersion:TextField;
public var mcAlwaysOnTop:Sprite;
private var thisInstanceNumber:Number;
protected var smState:StateMachine;
private static var aDebugFieldsOrder:Array;
public static var STATES:Object = {INIT:"Init", LOAD:"Load", PLAY:"Play", SUBMENU:"SubMenu"};
public static var nInstance:Number = 0;
private static var tf:TextFormat;
public static var iteration:Number = 0;
public static var mcDebugTextHolder:Sprite;
public static var aDebugFields:Array;
public function BaseApp(){
var _local1:SOSLoggingTarget;
super();
if (DebugState.DEBUG){
_local1 = new SOSLoggingTarget();
_local1.includeCategory = false;
_local1.includeDate = true;
_local1.includeLevel = true;
_local1.includeTime = true;
Log.addTarget(_local1);
};
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
thisInstanceNumber = nInstance++;
}
protected function update(_arg1:Event=null):void{
var _local2:Number;
var _local3:Number;
var _local4:TextField;
smState.update();
if (DEBUG){
_local2 = 0;
_local3 = 0;
while (_local3 < aDebugFieldsOrder.length) {
_local4 = aDebugFields[aDebugFieldsOrder[_local3]];
_local4.y = _local2;
_local2 = (_local2 + (_local4.height + 2));
_local3++;
};
};
}
private function infoHandlerDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == KEY_VERSION){
mcAlwaysOnTop.addChild(txtVersion);
txtVersion.x = ((stage.stageWidth - txtVersion.width) - 2);
txtVersion.y = ((stage.stageHeight - txtVersion.height) - 2);
stage.addEventListener(KeyboardEvent.KEY_UP, infoHandlerUp);
};
}
public function onAddedToStage(_arg1:Event):void{
var e = _arg1;
mcBase = new Sprite();
addChild(mcBase);
mcGame = new Sprite();
mcBase.addChild(mcGame);
mcAlwaysOnTop = new Sprite();
addChild(mcAlwaysOnTop);
try {
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
} catch(e:Error) {
error(e);
};
tf = new TextFormat("_sans", 10, 0xAAAAAA);
info("--MAIN APP CONSTRUCTOR--", this);
aDebugFields = new Array();
aDebugFieldsOrder = new Array();
mcDebugTextHolder = new Sprite();
mcDebugTextHolder.x = 0;
mcDebugTextHolder.y = 0;
mcAlwaysOnTop.addChild(mcDebugTextHolder);
stage.addEventListener(KeyboardEvent.KEY_DOWN, infoHandlerDown);
txtVersion = new TextField();
txtVersion.background = true;
txtVersion.backgroundColor = 0xFFFFFF;
txtVersion.autoSize = TextFieldAutoSize.LEFT;
txtVersion.border = true;
txtVersion.borderColor = 0;
txtVersion.selectable = false;
txtVersion.defaultTextFormat = tf;
txtVersion.textColor = 0;
smState = new StateMachine(this, STATES);
smState.setDebug(DEBUG);
debugVisibility = DebugState.DEBUG;
addEventListener(Event.ENTER_FRAME, update);
info(DebugState.DEBUG);
}
private function infoHandlerUp(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == KEY_VERSION){
mcAlwaysOnTop.removeChild(txtVersion);
stage.removeEventListener(KeyboardEvent.KEY_UP, infoHandlerUp);
};
}
public static function get debugVisibility():Boolean{
return (mcDebugTextHolder.visible);
}
public static function setDebugField(_arg1, _arg2):void{
if (aDebugFields[_arg1] == undefined){
aDebugFields[_arg1] = createDebugField();
aDebugFieldsOrder.push(_arg1);
};
TextField(aDebugFields[_arg1]).text = _arg2;
}
public static function set debugVisibility(_arg1:Boolean):void{
mcDebugTextHolder.visible = _arg1;
}
public static function createDebugField():TextField{
var _local1:TextField = new TextField();
_local1.x = 0;
_local1.y = 0;
_local1.width = 200;
_local1.height = 20;
_local1.defaultTextFormat = tf;
_local1.border = true;
_local1.borderColor = 0x333333;
mcDebugTextHolder.addChild(_local1);
_local1.background = true;
_local1.backgroundColor = 0xDDDDDD;
_local1.textColor = 0;
_local1.text = ("#" + mcDebugTextHolder.numChildren);
_local1.autoSize = TextFieldAutoSize.LEFT;
return (_local1);
}
}
}//package com.plasticmartians.framework.application
Section 60
//State (com.plasticmartians.framework.application.State)
package com.plasticmartians.framework.application {
public class State {
public var sPostfix:String;
public var cleanup:Function;
public var update:Function;
public var setup:Function;
public function State(_arg1:String, _arg2){
var postfix = _arg1;
var owner = _arg2;
super();
sPostfix = postfix;
cleanup = (setup = (update = null));
try {
setup = owner[("setup" + sPostfix)];
} catch(e:Error) {
};
try {
cleanup = owner[("cleanup" + sPostfix)];
} catch(e:Error) {
};
try {
update = owner[("update" + sPostfix)];
} catch(e:Error) {
};
}
public function toString():String{
return (sPostfix.toUpperCase());
}
}
}//package com.plasticmartians.framework.application
Section 61
//StateMachine (com.plasticmartians.framework.application.StateMachine)
package com.plasticmartians.framework.application {
import flash.events.*;
import flash.utils.*;
public class StateMachine {
private var delayTimer:Timer;
private var _sNextState:String;
private var sStateWaiting:Object;
private var _aRegisteredStatesHash:Object;
private var bDebug:Boolean;
private var _aRegisteredStates:Array;
private var _sCurrentState:State;
private var _bSwitchingStates:Boolean;
private var DEFAULTSTATE:Object;
private var _oBaseScope:Object;
public function StateMachine(_arg1:Object, _arg2:Object){
DEFAULTSTATE = {NULLSTATE:"NullState", NULLSTATE:"NullState"};
super();
_oBaseScope = _arg1;
_aRegisteredStates = new Array();
_aRegisteredStatesHash = _arg2;
addStates(DEFAULTSTATE);
addStates(_arg2);
setState(DEFAULTSTATE.NULLSTATE);
_bSwitchingStates = false;
_sCurrentState = null;
_sNextState = null;
}
public function killDelayTimer():void{
try {
if (delayTimer != null){
delayTimer.stop();
delayTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, setStateTimer);
delayTimer = null;
};
} catch(e:Error) {
error(e);
};
}
public function addStates(_arg1:Object):void{
var _local2:*;
for (_local2 in _arg1) {
info(("adding state: " + _local2));
_aRegisteredStates.push(new State(_arg1[_local2], _oBaseScope));
};
}
public function update():void{
var _local1:Object;
if (_sNextState != null){
_local1 = _sNextState;
_sNextState = null;
setState(_local1);
};
if (_sCurrentState != null){
if (_sCurrentState.update != null){
_sCurrentState.update();
};
};
}
public function setDebug(_arg1:Boolean):void{
bDebug = _arg1;
}
public function setState(_arg1, _arg2:Array=null){
var _local3:State;
killDelayTimer();
info(("setState: " + _arg1));
if (!_bSwitchingStates){
_bSwitchingStates = true;
if (_sCurrentState != null){
info(("<<< CLEANUP " + _sCurrentState.toString()));
info("------------------------------------------------------------");
info(" ");
if (_sCurrentState.cleanup != null){
_sCurrentState.cleanup();
};
};
_local3 = checkStateExists(_arg1);
if (_local3){
info(" ");
info("------------------------------------------------------------");
info((">>> SETUP " + _local3.toString()));
if (_local3.setup != null){
_local3.setup.apply(_oBaseScope, _arg2);
};
_sCurrentState = _local3;
} else {
info((("**>> UNKNOWN NEW STATE " + _arg1.toUpperCase()) + " <<**"));
};
_bSwitchingStates = false;
} else {
info((("**>> ATTEMPT TO SWITCH STATES WHEN ALREADY MID SWITCH " + _arg1) + " <<**"));
};
}
public function setNextState(_arg1:String):void{
if (_sNextState != null){
info((("**>> WARNING: NEXT STATE ALREADY DEFINED: " + _sNextState.toUpperCase()) + " <<**"));
};
if (checkStateExists(_arg1) == null){
info((("**>> UNKNOWN NEW NEXT STATE " + _arg1) + " <<**"));
};
_sNextState = _arg1;
}
public function setDelayedNextState(_arg1, _arg2:Number):void{
killDelayTimer();
delayTimer = new Timer(_arg2, 1);
sStateWaiting = _arg1;
delayTimer.addEventListener(TimerEvent.TIMER_COMPLETE, setStateTimer, false, 0, true);
delayTimer.start();
}
public function getState():String{
if (_sCurrentState != null){
return (_aRegisteredStatesHash[_sCurrentState.toString()]);
};
return (null);
}
public function setStateImmediately(_arg1):void{
var _local2:State;
if (_sCurrentState.cleanup != null){
_sCurrentState.cleanup();
};
info(("<< CLEANUP " + _sCurrentState.toString()));
_local2 = checkStateExists(_arg1);
_sCurrentState = _local2;
info((">> IMMEDIATE SETUP " + _arg1.toString()));
}
private function checkStateExists(_arg1:String):State{
var _local2:Number;
if (_arg1 != null){
_arg1 = String(_arg1).toUpperCase();
_local2 = 0;
while (_local2 < _aRegisteredStates.length) {
if (_aRegisteredStates[_local2].toString() == _arg1){
return (_aRegisteredStates[_local2]);
};
_local2++;
};
};
return (null);
}
private function setStateTimer(_arg1:TimerEvent):void{
killDelayTimer();
setState(sStateWaiting);
}
}
}//package com.plasticmartians.framework.application
Section 62
//DashedLine (com.plasticmartians.framework.graphics.DashedLine)
package com.plasticmartians.framework.graphics {
import flash.display.*;
import flash.geom.*;
public class DashedLine extends Sprite {
var fill:Shape;
var lineAlpha:Number;// = 1
var lengthsArray:Array;
var lineColor:uint;
var startIndex;// = 0
var lineWeight:Number;
var curY:Number;// = 0
var curX:Number;// = 0
var curIndex;// = null
var stroke:Shape;
var arraySum;// = 0
var remainingDist;// = 0
public function DashedLine(_arg1=0, _arg2=0, _arg3:Array=null){
var _local4:*;
lengthsArray = new Array();
fill = new Shape();
stroke = new Shape();
super();
if (_arg3 != null){
this.lengthsArray = _arg3;
} else {
this.lengthsArray = [5, 5];
};
if ((this.lengthsArray.length % 2) != 0){
_arg3.push(5);
};
for (_local4 in _arg3) {
arraySum = (arraySum + _arg3[_local4]);
};
lineWeight = _arg1;
lineColor = _arg2;
stroke.graphics.lineStyle(lineWeight, lineColor, lineAlpha, false, "none", CapsStyle.NONE);
addChild(fill);
addChild(stroke);
}
public function clear(){
stroke.graphics.clear();
stroke.graphics.lineStyle(lineWeight, lineColor, lineAlpha, false, "none", CapsStyle.NONE);
fill.graphics.clear();
moveTo(0, 0);
}
public function lineTo(_arg1, _arg2){
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local3:* = ((_arg2 - curY) / (_arg1 - curX));
var _local4:* = curX;
var _local5:* = curY;
var _local6:* = ((_arg1)<_local4) ? -1 : 1;
var _local7:* = ((_arg2)<_local5) ? -1 : 1;
while ((((Math.abs((_local4 - curX)) < Math.abs((_local4 - _arg1)))) || ((Math.abs((_local5 - curY)) < Math.abs((_local5 - _arg2)))))) {
_local8 = startIndex;
while (_local8 < lengthsArray.length) {
_local9 = ((remainingDist)==0) ? lengthsArray[_local8] : remainingDist;
_local10 = (getCoords(_local9, _local3).x * _local6);
_local11 = (getCoords(_local9, _local3).y * _local7);
if (((((Math.abs((_local4 - curX)) + Math.abs(_local10)) < Math.abs((_local4 - _arg1)))) || (((Math.abs((_local5 - curY)) + Math.abs(_local11)) < Math.abs((_local5 - _arg2)))))){
if ((_local8 % 2) == 0){
stroke.graphics.lineTo((curX + _local10), (curY + _local11));
} else {
stroke.graphics.moveTo((curX + _local10), (curY + _local11));
};
curX = (curX + _local10);
curY = (curY + _local11);
curIndex = _local8;
startIndex = 0;
remainingDist = 0;
} else {
remainingDist = getDistance(curX, curY, _arg1, _arg2);
curIndex = _local8;
//unresolved jump
};
_local8++;
};
};
startIndex = curIndex;
if (remainingDist != 0){
if ((curIndex % 2) == 0){
stroke.graphics.lineTo(_arg1, _arg2);
} else {
stroke.graphics.moveTo(_arg1, _arg2);
};
remainingDist = (lengthsArray[curIndex] - remainingDist);
} else {
if (startIndex == (lengthsArray.length - 1)){
startIndex = 0;
} else {
startIndex++;
};
};
curX = _arg1;
curY = _arg2;
fill.graphics.lineTo(_arg1, _arg2);
}
private function getCoords(_arg1, _arg2):Point{
var _local3:* = Math.atan(_arg2);
var _local4:* = Math.abs((Math.sin(_local3) * _arg1));
var _local5:* = Math.abs((Math.cos(_local3) * _arg1));
return (new Point(_local5, _local4));
}
public function lineStyle(_arg1=0, _arg2=0, _arg3=1){
lineWeight = _arg1;
lineColor = _arg2;
lineAlpha = _arg3;
stroke.graphics.lineStyle(lineWeight, lineColor, lineAlpha, false, "none", CapsStyle.NONE);
}
public function moveTo(_arg1, _arg2){
stroke.graphics.moveTo(_arg1, _arg2);
fill.graphics.moveTo(_arg1, _arg2);
curX = _arg1;
curY = _arg2;
remainingDist = 0;
startIndex = 0;
}
public function beginFill(_arg1, _arg2=1){
fill.graphics.beginFill(_arg1, _arg2);
}
private function getDistance(_arg1, _arg2, _arg3, _arg4){
var _local5:* = Math.sqrt((Math.pow((_arg3 - _arg1), 2) + Math.pow((_arg4 - _arg2), 2)));
return (_local5);
}
public function endFill(){
fill.graphics.endFill();
}
}
}//package com.plasticmartians.framework.graphics
Section 63
//SoundClip (com.plasticmartians.framework.sound.SoundClip)
package com.plasticmartians.framework.sound {
import flash.media.*;
import flash.net.*;
public class SoundClip {
public var buffer:Number;
public var channel:SoundChannel;
public var loopCallback:Function;
public var name:String;
public var startTime:Number;
public var sound:Sound;
public var volume:Number;
public var loops:Number;
public var position:Number;
public var paused:Boolean;
public var url:URLRequest;
public var checkPolicyFile:Boolean;
public var pausedByAll:Boolean;
public function SoundClip(_arg1:String=null, _arg2:Sound=null, _arg3:SoundChannel=null, _arg4:Number=0, _arg5:Boolean=false, _arg6:Number=0, _arg7:Number=1, _arg8:Number=1, _arg9:Boolean=false, _arg10:URLRequest=null, _arg11:Number=1000, _arg12:Boolean=false, _arg13:Function=null){
this.name = _arg1;
this.sound = _arg2;
this.channel = _arg3;
this.position = _arg4;
this.paused = _arg5;
this.volume = _arg6;
this.startTime = _arg7;
this.loops = _arg8;
this.pausedByAll = _arg9;
this.url = _arg10;
this.buffer = _arg11;
this.checkPolicyFile = _arg12;
this.loopCallback = _arg13;
}
public function clone():SoundClip{
return (new SoundClip(name, sound, null, position, paused, volume, startTime, loops, pausedByAll, url, buffer, checkPolicyFile, loopCallback));
}
}
}//package com.plasticmartians.framework.sound
Section 64
//SoundManager (com.plasticmartians.framework.sound.SoundManager)
package com.plasticmartians.framework.sound {
import flash.events.*;
import flash.media.*;
import com.greensock.*;
import flash.net.*;
import flash.utils.*;
import com.plasticmartians.framework.utils.*;
public class SoundManager extends EventDispatcher {
private var _sound:Boolean;
private var _numLoadingSounds:Number;
public var soundSize:Number;
private var _soundsToLoad:Array;
private var _sounds:Array;
private var t:Timer;
private var _masterVolume:Number;
public static const PARRALEL_LOAD:Number = 5;
private static var _instance:SoundManager;
private static var _allowInstance:Boolean;
public function SoundManager(){
_sounds = new Array();
_soundsToLoad = new Array();
setMasterVolume(1);
_sound = true;
_numLoadingSounds = 0;
if (!SoundManager._allowInstance){
throw (new Error("Error: Use SoundManager.getInstance() instead of the new keyword."));
};
}
public function getSoundDuration(_arg1:SoundClip):Number{
return (_arg1.sound.length);
}
public function stopFadeSound(_arg1:SoundChannel):void{
_arg1.stop();
}
public function getMasterVolume():Number{
return (_masterVolume);
}
public function isSoundPaused(_arg1:SoundClip):Boolean{
return (_arg1.paused);
}
public function onSoundLoaded(_arg1:Event=null):void{
_numLoadingSounds--;
loadSounds();
if (_numLoadingSounds == 0){
t.stop();
t.removeEventListener(TimerEvent.TIMER, updateProgress);
};
}
public function updateProgress(_arg1:TimerEvent=null){
}
public function onSoundErrored(_arg1:IOErrorEvent=null):void{
onSoundLoaded();
}
public function toggleSound():void{
setSound(!(_sound));
}
public function setMasterVolume(_arg1:Number):void{
var _local3:SoundClip;
var _local4:SoundTransform;
_arg1 = ((_arg1 < 0)) ? 0 : ((_arg1 > 1)) ? 1 : _arg1;
_masterVolume = _arg1;
var _local2:int;
while (_local2 < _sounds.length) {
_local3 = _sounds[_local2];
_local4 = _local3.channel.soundTransform;
_local4.volume = (_local3.volume * _masterVolume);
_local3.channel.soundTransform = _local4;
_local2++;
};
}
public function removeAllSounds():void{
var _local1:int;
while (_local1 < _sounds.length) {
delete _sounds[_local1];
_local1++;
};
_sounds = new Array();
}
public function getSoundPosition(_arg1:SoundClip):Number{
return (_arg1.channel.position);
}
private function onLoop(_arg1:Event, _arg2:SoundClip):void{
_arg2.loops--;
playSound(_arg2, 0, _arg2.loops);
}
public function unPauseSoundClip(_arg1:SoundClip):void{
if (_arg1.paused){
_arg1.channel = _arg1.sound.play(_arg1.position, _arg1.loops, new SoundTransform(_arg1.volume));
};
}
public function muteAllSounds():void{
var _local1:int;
while (_local1 < _sounds.length) {
setSoundVolume(_sounds[_local1], 0);
_local1++;
};
}
public function stopSound(_arg1:SoundClip):void{
_arg1.paused = true;
if (_arg1.channel){
if (_arg1.loopCallback){
_arg1.channel.removeEventListener(Event.SOUND_COMPLETE, _arg1.loopCallback);
_arg1.loopCallback = null;
_arg1.loops = 0;
};
_arg1.position = _arg1.channel.position;
_arg1.channel.stop();
};
}
public function fadeAllSounds(_arg1:Boolean=true):void{
var _local3:SoundClip;
var _local2:int;
while (_local2 < _sounds.length) {
_local3 = _sounds[_local2];
if (_arg1){
if (!_local3.paused){
fadeSound(_local3);
};
} else {
fadeSound(_local3);
};
_local2++;
};
}
public function unmuteAllSounds():void{
var _local2:SoundClip;
var _local3:SoundTransform;
var _local1:int;
while (_local1 < _sounds.length) {
_local2 = _sounds[_local1];
_local3 = _local2.channel.soundTransform;
_local3.volume = _local2.volume;
_local2.channel.soundTransform = _local3;
_local1++;
};
}
public function pauseSound(_arg1:SoundClip):void{
_arg1.paused = true;
_arg1.position = _arg1.channel.position;
_arg1.channel.stop();
}
public function playSound(_arg1:SoundClip, _arg2:Number=0, _arg3:int=0, _arg4:Number=-1):void{
if (_sound){
if (_arg1.channel){
_arg1.channel.stop();
};
if (_arg1.loopCallback){
_arg1.channel.removeEventListener(Event.SOUND_COMPLETE, _arg1.loopCallback);
_arg1.loopCallback = null;
};
_arg2 = (_arg2 % _arg1.sound.length);
_arg1.startTime = _arg2;
_arg1.loops = _arg3;
if (_arg4 != -1){
_arg1.volume = _arg4;
};
_arg1.channel = _arg1.sound.play(_arg2, 1, new SoundTransform((_arg1.volume * getMasterVolume())));
if (_arg1.loops > 0){
_arg1.loopCallback = Delegate.create(onLoop, _arg1);
_arg1.channel.addEventListener(Event.SOUND_COMPLETE, _arg1.loopCallback, false, 10, false);
};
_arg1.paused = false;
};
}
public function setSoundVolume(_arg1:SoundClip, _arg2:Number):void{
var _local3:SoundTransform;
_arg2 = ((_arg2 < 0)) ? 0 : ((_arg2 > 1)) ? 1 : _arg2;
_arg1.volume = _arg2;
if (_arg1.channel){
_local3 = _arg1.channel.soundTransform;
_local3.volume = (_arg2 * _masterVolume);
_arg1.channel.soundTransform = _local3;
};
}
public function getSoundClip(_arg1:String):SoundClip{
var _local2:*;
for (_local2 in _sounds) {
if (_sounds[_local2].name == _arg1){
return (_sounds[_local2]);
};
};
return (null);
}
public function loadSounds(){
var _local1:SoundClip;
var _local2:Number;
if (_soundsToLoad.length > 0){
_local2 = _numLoadingSounds;
while (_local2 < PARRALEL_LOAD) {
if (_soundsToLoad.length <= 0){
break;
};
_numLoadingSounds++;
_local1 = _soundsToLoad.shift();
_local1.sound.addEventListener(IOErrorEvent.IO_ERROR, Delegate.create(onSoundErrored, _local1));
_local1.sound.addEventListener(Event.COMPLETE, onSoundLoaded);
_local1.sound.load(_local1.url, new SoundLoaderContext(_local1.buffer, _local1.checkPolicyFile));
_local2++;
};
};
}
public function get sounds():Array{
return (_sounds);
}
public function setSound(_arg1:Boolean){
_sound = _arg1;
if (!_arg1){
muteAllSounds();
};
}
public function getSoundVolume(_arg1:SoundClip):Number{
return (_arg1.volume);
}
public function getSound():Boolean{
return (_sound);
}
public function loadAll():void{
if (_soundsToLoad.length <= 0){
dispatchEvent(new Event(Event.SOUND_COMPLETE));
} else {
_numLoadingSounds = 0;
t = new Timer((1000 / 30));
t.addEventListener(TimerEvent.TIMER, updateProgress);
t.start();
loadSounds();
};
}
public function stopAllSounds(_arg1:Boolean=true):void{
var _local3:SoundClip;
var _local2:int;
while (_local2 < _sounds.length) {
_local3 = _sounds[_local2];
if (_arg1){
if (!_local3.paused){
_local3.pausedByAll = true;
stopSound(_local3);
};
} else {
stopSound(_local3);
};
_local2++;
};
}
public function getSoundClipURL(_arg1:String):SoundClip{
var _local2:*;
for (_local2 in _sounds) {
if (_sounds[_local2].url.url == _arg1){
return (_sounds[_local2]);
};
};
return (null);
}
public function addExternalSound(_arg1:String, _arg2:String, _arg3:Number=200, _arg4:Boolean=false):SoundClip{
var _local5:SoundClip = new SoundClip();
var _local6:Sound = new Sound();
_local5.name = _arg2;
_local5.sound = _local6;
_local5.channel = new SoundChannel();
_local5.position = 0;
_local5.paused = true;
_local5.volume = 1;
_local5.startTime = 0;
_local5.loops = 0;
_local5.pausedByAll = false;
_local5.url = new URLRequest(_arg1);
_local5.buffer = _arg3;
_local5.checkPolicyFile = _arg4;
soundSize = (soundSize + _local6.bytesTotal);
_sounds.push(_local5);
_soundsToLoad.push(_local5);
return (_local5);
}
public function removeSound(_arg1:SoundClip):void{
var _local2:SoundClip;
var _local3:int;
while (_local3 < _sounds.length) {
_local2 = _sounds[_local3];
if (_local2.name == _arg1.name){
_local2 = null;
_sounds.splice(_local3, 1);
break;
};
_local3++;
};
}
public function addSound(_arg1:Sound, _arg2:String, _arg3:Number=200, _arg4:Boolean=false):SoundClip{
var _local5:SoundClip = new SoundClip();
_local5.name = _arg2;
_local5.sound = _arg1;
_local5.channel = new SoundChannel();
_local5.position = 0;
_local5.paused = true;
_local5.volume = 1;
_local5.startTime = 0;
_local5.loops = 0;
_local5.pausedByAll = false;
_local5.url = null;
_local5.buffer = _arg3;
_local5.checkPolicyFile = _arg4;
soundSize = (soundSize + _arg1.bytesTotal);
_sounds.push(_local5);
return (_local5);
}
public function pauseAllSounds(_arg1:Boolean=true):void{
var _local3:SoundClip;
var _local2:int;
while (_local2 < _sounds.length) {
_local3 = _sounds[_local2];
if (_arg1){
if (!_local3.paused){
_local3.pausedByAll = true;
pauseSound(_local3);
};
} else {
pauseSound(_local3);
};
_local2++;
};
}
public function playAllSounds(_arg1:Boolean=false):void{
var _local3:SoundClip;
var _local2:int;
while (_local2 < _sounds.length) {
_local3 = _sounds[_local2];
if (_arg1){
if (_local3.pausedByAll){
_local3.pausedByAll = false;
playSound(_local3);
};
} else {
playSound(_local3);
};
_local2++;
};
}
public function fadeSound(_arg1:SoundClip, _arg2:Number=0, _arg3:Number=1):void{
var _local4:SoundChannel = _arg1.channel;
if (_arg2 == 0){
TweenLite.to(_local4, _arg3, {volume:_arg2, onComplete:Delegate.create(stopFadeSound, _local4)});
} else {
TweenLite.to(_local4, _arg3, {volume:_arg2});
};
}
public function isSoundPausedByAll(_arg1:SoundClip):Boolean{
return (_arg1.pausedByAll);
}
public function getSoundObject(_arg1:SoundClip):Sound{
return (_arg1.sound);
}
public static function getInstance():SoundManager{
if (SoundManager._instance == null){
SoundManager._allowInstance = true;
SoundManager._instance = new (SoundManager);
SoundManager._allowInstance = false;
};
return (SoundManager._instance);
}
}
}//package com.plasticmartians.framework.sound
Section 65
//Delegate (com.plasticmartians.framework.utils.Delegate)
package com.plasticmartians.framework.utils {
public class Delegate {
public static function create(_arg1:Function, ... _args):Function{
var handler = _arg1;
var args = _args;
return (function (... _args):void{
handler.apply(this, _args.concat(args));
});
}
}
}//package com.plasticmartians.framework.utils
Section 66
//GraphicUtils (com.plasticmartians.framework.utils.GraphicUtils)
package com.plasticmartians.framework.utils {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
public class GraphicUtils {
public static var ALIGN_LEFT:Number = 2;
public static var ALIGN_BOTTOM:Number = 32;
public static var ALIGN_H_CENTER:Number = 1;
public static var ALIGN_RIGHT:Number = 4;
public static var ALIGN_V_CENTER:Number = 8;
public static var ALIGN_TOP:Number = 16;
public static function drawRect(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
if (arguments.length < 4){
return;
};
if (_arg6 > 0){
if (_arg6 > (Math.min(_arg4, _arg5) / 2)){
_arg6 = (Math.min(_arg4, _arg5) / 2);
};
_local8 = (Math.PI / 4);
_arg1.graphics.moveTo((_arg2 + _arg6), _arg3);
_arg1.graphics.lineTo(((_arg2 + _arg4) - _arg6), _arg3);
_local9 = (-(Math.PI) / 2);
_local10 = (((_arg2 + _arg4) - _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = ((_arg3 + _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = (((_arg2 + _arg4) - _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = ((_arg3 + _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_arg1.graphics.curveTo(_local10, _local11, _local12, _local13);
_local9 = (_local9 + _local8);
_local10 = (((_arg2 + _arg4) - _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = ((_arg3 + _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = (((_arg2 + _arg4) - _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = ((_arg3 + _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_arg1.graphics.curveTo(_local10, _local11, _local12, _local13);
_arg1.graphics.lineTo((_arg2 + _arg4), ((_arg3 + _arg5) - _arg6));
_local9 = (_local9 + _local8);
_local10 = (((_arg2 + _arg4) - _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = (((_arg3 + _arg5) - _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = (((_arg2 + _arg4) - _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = (((_arg3 + _arg5) - _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_arg1.graphics.curveTo(_local10, _local11, _local12, _local13);
_local9 = (_local9 + _local8);
_local10 = (((_arg2 + _arg4) - _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = (((_arg3 + _arg5) - _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = (((_arg2 + _arg4) - _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = (((_arg3 + _arg5) - _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_arg1.graphics.curveTo(_local10, _local11, _local12, _local13);
_arg1.graphics.lineTo((_arg2 + _arg6), (_arg3 + _arg5));
_local9 = (_local9 + _local8);
_local10 = ((_arg2 + _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = (((_arg3 + _arg5) - _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = ((_arg2 + _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = (((_arg3 + _arg5) - _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_arg1.graphics.curveTo(_local10, _local11, _local12, _local13);
_local9 = (_local9 + _local8);
_local10 = ((_arg2 + _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = (((_arg3 + _arg5) - _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = ((_arg2 + _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = (((_arg3 + _arg5) - _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_arg1.graphics.curveTo(_local10, _local11, _local12, _local13);
_arg1.graphics.lineTo(_arg2, (_arg3 + _arg6));
_local9 = (_local9 + _local8);
_local10 = ((_arg2 + _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = ((_arg3 + _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = ((_arg2 + _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = ((_arg3 + _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_arg1.graphics.curveTo(_local10, _local11, _local12, _local13);
_local9 = (_local9 + _local8);
_local10 = ((_arg2 + _arg6) + ((Math.cos((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local11 = ((_arg3 + _arg6) + ((Math.sin((_local9 + (_local8 / 2))) * _arg6) / Math.cos((_local8 / 2))));
_local12 = ((_arg2 + _arg6) + (Math.cos((_local9 + _local8)) * _arg6));
_local13 = ((_arg3 + _arg6) + (Math.sin((_local9 + _local8)) * _arg6));
_arg1.graphics.curveTo(_local10, _local11, _local12, _local13);
} else {
_arg1.graphics.moveTo(_arg2, _arg3);
_arg1.graphics.lineTo((_arg2 + _arg4), _arg3);
_arg1.graphics.lineTo((_arg2 + _arg4), (_arg3 + _arg5));
_arg1.graphics.lineTo(_arg2, (_arg3 + _arg5));
_arg1.graphics.lineTo(_arg2, _arg3);
};
}
public static function drawRectangle(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Point, _arg5:Number, _arg6:Number=100, _arg7:Boolean=true, _arg8:Number=1):void{
if (_arg7){
_arg1.graphics.moveTo(_arg4.x, _arg4.y);
_arg1.graphics.beginFill(_arg5, _arg6);
_arg1.graphics.lineTo((_arg4.x + _arg2), _arg4.y);
_arg1.graphics.lineTo((_arg4.x + _arg2), (_arg4.y + _arg3));
_arg1.graphics.lineTo(_arg4.x, (_arg4.y + _arg3));
_arg1.graphics.endFill();
} else {
drawRectangle(_arg1, _arg2, _arg8, _arg4, _arg5, _arg6);
drawRectangle(_arg1, _arg2, _arg8, new Point(_arg4.x, ((_arg4.y + _arg3) - _arg8)), _arg5, _arg6);
drawRectangle(_arg1, _arg8, _arg3, _arg4, _arg5, _arg6);
drawRectangle(_arg1, _arg8, _arg3, new Point(((_arg4.x + _arg2) - _arg8), _arg4.y), _arg5, _arg6);
};
}
public static function dropShadow(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){
var _local5:Number = 0.2;
var _local6:Number = 2;
var _local7:Number = 2;
var _local8:Number = _arg2;
var _local9:Number = _arg3;
var _local10:Number = _arg4;
var _local11:Number = 1;
var _local12:Number = 3;
var _local13:Boolean;
var _local14:Boolean;
var _local15:Boolean;
var _local16:DropShadowFilter = new DropShadowFilter(_local8, _local9, _local10, _local5, _local6, _local7, _local11, _local12, _local13, _local14, _local15);
var _local17:Array = new Array();
_local17.push(_local16);
_arg1.filters = _local17;
}
public static function setBrightness(_arg1:MovieClip, _arg2:Number):void{
var _local3:Array = [1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0];
var _local4:ColorMatrixFilter = new ColorMatrixFilter(_local3);
_arg1.filters = [_local4];
}
public static function drawCircle(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Number = (_arg4 * (Math.SQRT2 - 1));
var _local6:Number = ((_arg4 * Math.SQRT2) / 2);
_arg1.graphics.moveTo((_arg2 + _arg4), _arg3);
_arg1.graphics.curveTo((_arg2 + _arg4), (_arg3 + _local5), (_arg2 + _local6), (_arg3 + _local6));
_arg1.graphics.curveTo((_arg2 + _local5), (_arg3 + _arg4), _arg2, (_arg3 + _arg4));
_arg1.graphics.curveTo((_arg2 - _local5), (_arg3 + _arg4), (_arg2 - _local6), (_arg3 + _local6));
_arg1.graphics.curveTo((_arg2 - _arg4), (_arg3 + _local5), (_arg2 - _arg4), _arg3);
_arg1.graphics.curveTo((_arg2 - _arg4), (_arg3 - _local5), (_arg2 - _local6), (_arg3 - _local6));
_arg1.graphics.curveTo((_arg2 - _local5), (_arg3 - _arg4), _arg2, (_arg3 - _arg4));
_arg1.graphics.curveTo((_arg2 + _local5), (_arg3 - _arg4), (_arg2 + _local6), (_arg3 - _local6));
_arg1.graphics.curveTo((_arg2 + _arg4), (_arg3 - _local5), (_arg2 + _arg4), _arg3);
}
public static function drawNumberClip(_arg1:Sprite, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Array):Sprite{
var digit:Sprite;
var parent = _arg1;
var num = _arg2;
var xx = _arg3;
var yy = _arg4;
var nAlign = _arg5;
var gap = _arg6;
var numbers = _arg7;
var thisNum:Sprite = new Sprite();
parent.addChild(thisNum);
var s:String = String(num);
var x:Number = 0;
var i:int;
while (i < s.length) {
try {
digit = new (numbers[s.charAt(i)]);
thisNum.addChild(digit);
digit.x = x;
x = (x + (digit.width + gap));
} catch(e:Error) {
};
i = (i + 1);
};
if ((nAlign & ALIGN_H_CENTER)){
thisNum.x = (xx - (thisNum.width / 2));
} else {
if ((nAlign & ALIGN_LEFT)){
thisNum.x = xx;
} else {
if ((nAlign & ALIGN_RIGHT)){
thisNum.x = (xx - thisNum.width);
};
};
};
if ((nAlign & ALIGN_V_CENTER)){
thisNum.y = (yy - (thisNum.height / 2));
} else {
if ((nAlign & ALIGN_TOP)){
thisNum.y = yy;
} else {
if ((nAlign & ALIGN_BOTTOM)){
thisNum.y = (yy - thisNum.height);
};
};
};
return (thisNum);
}
public static function drawWedge(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number=-1):void{
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
if (arguments.length < 5){
return;
};
_arg1.graphics.moveTo(_arg2, _arg3);
if (_arg7 == -1){
_arg7 = _arg6;
};
if (Math.abs(_arg5) > 360){
_arg5 = 360;
};
_local13 = Math.ceil((Math.abs(_arg5) / 45));
_local9 = (_arg5 / _local13);
_local10 = (-((_local9 / 180)) * Math.PI);
_local11 = (-((_arg4 / 180)) * Math.PI);
if (_local13 > 0){
_local14 = (_arg2 + (Math.cos(((_arg4 / 180) * Math.PI)) * _arg6));
_local15 = (_arg3 + (Math.sin(((-(_arg4) / 180) * Math.PI)) * _arg7));
_arg1.graphics.lineTo(_local14, _local15);
_local20 = 0;
while (_local20 < _local13) {
_local11 = (_local11 + _local10);
_local12 = (_local11 - (_local10 / 2));
_local16 = (_arg2 + (Math.cos(_local11) * _arg6));
_local17 = (_arg3 + (Math.sin(_local11) * _arg7));
_local18 = (_arg2 + (Math.cos(_local12) * (_arg6 / Math.cos((_local10 / 2)))));
_local19 = (_arg3 + (Math.sin(_local12) * (_arg7 / Math.cos((_local10 / 2)))));
_arg1.graphics.curveTo(_local18, _local19, _local16, _local17);
_local20++;
};
_arg1.graphics.lineTo(_arg2, _arg3);
};
}
public static function drawCross(_arg1:Sprite, _arg2:Point, _arg3:Number, _arg4:Number, _arg5:Number=1):void{
_arg1.graphics.lineStyle(_arg5, _arg4, 50);
_arg1.graphics.moveTo((_arg2.x - _arg3), (_arg2.y - _arg3));
_arg1.graphics.lineTo((_arg2.x + _arg3), (_arg2.y + _arg3));
_arg1.graphics.moveTo((_arg2.x - _arg3), (_arg2.y + _arg3));
_arg1.graphics.lineTo((_arg2.x + _arg3), (_arg2.y - _arg3));
}
public static function setTint(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
}
public static function randomColour():int{
return (Math.floor((0xFFFFFF * Math.random())));
}
public static function lineIntersectLine(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Point, _arg5:Boolean=true, _arg6:Boolean=true):Point{
var _local7:Point;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
_local8 = (_arg2.y - _arg1.y);
_local10 = (_arg1.x - _arg2.x);
_local12 = ((_arg2.x * _arg1.y) - (_arg1.x * _arg2.y));
_local9 = (_arg4.y - _arg3.y);
_local11 = (_arg3.x - _arg4.x);
_local13 = ((_arg4.x * _arg3.y) - (_arg3.x * _arg4.y));
var _local14:Number = ((_local8 * _local11) - (_local9 * _local10));
if (_local14 == 0){
return (null);
};
_local7 = new Point();
_local7.x = (((_local10 * _local13) - (_local11 * _local12)) / _local14);
_local7.y = (((_local9 * _local12) - (_local8 * _local13)) / _local14);
if (_arg1.x == _arg2.x){
_local7.x = _arg1.x;
} else {
if (_arg3.x == _arg4.x){
_local7.x = _arg3.x;
};
};
if (_arg1.y == _arg2.y){
_local7.y = _arg1.y;
} else {
if (_arg3.y == _arg4.y){
_local7.y = _arg3.y;
};
};
if (_arg5){
if (((_arg1.x)<_arg2.x) ? (((_local7.x < _arg1.x)) || ((_local7.x > _arg2.x))) : (((_local7.x > _arg1.x)) || ((_local7.x < _arg2.x)))){
return (null);
};
if (((_arg1.y)<_arg2.y) ? (((_local7.y < _arg1.y)) || ((_local7.y > _arg2.y))) : (((_local7.y > _arg1.y)) || ((_local7.y < _arg2.y)))){
return (null);
};
};
if (_arg6){
if (((_arg3.x)<_arg4.x) ? (((_local7.x < _arg3.x)) || ((_local7.x > _arg4.x))) : (((_local7.x > _arg3.x)) || ((_local7.x < _arg4.x)))){
return (null);
};
if (((_arg3.y)<_arg4.y) ? (((_local7.y < _arg3.y)) || ((_local7.y > _arg4.y))) : (((_local7.y > _arg3.y)) || ((_local7.y < _arg4.y)))){
return (null);
};
};
return (_local7);
}
}
}//package com.plasticmartians.framework.utils
Section 67
//StringUtils (com.plasticmartians.framework.utils.StringUtils)
package com.plasticmartians.framework.utils {
public class StringUtils {
public static function endswith(_arg1:String, _arg2:String):Boolean{
var _local3:Number = _arg1.lastIndexOf(_arg2);
var _local4:* = _arg1.length;
var _local5:* = _arg2.length;
return (((_local4 - _local5) == _local3));
}
public static function startswith(_arg1:String, _arg2:String):Boolean{
return ((_arg1.indexOf(_arg2) == 0));
}
}
}//package com.plasticmartians.framework.utils
Section 68
//Utils (com.plasticmartians.framework.utils.Utils)
package com.plasticmartians.framework.utils {
import flash.display.*;
import com.greensock.*;
import flash.geom.*;
import com.greensock.easing.*;
import de.polygonal.math.*;
public final class Utils {
public static const RAD2ANG:Number = 57.2957795130823;
public static const ANG2RAD:Number = 0.0174532925199433;
public static var pseudoRNG:PM_PRNG = new PM_PRNG();
public static function fadeIn(_arg1:DisplayObject, _arg2:Number=0.5, _arg3:Boolean=true):void{
_arg1.visible = true;
if (_arg3){
_arg1.alpha = 0;
};
TweenLite.killTweensOf(_arg1);
TweenLite.to(_arg1, _arg2, {alpha:1, ease:Cubic.easeOut});
}
public static function destroyDisplayObject(_arg1:DisplayObject):void{
_arg1.parent.removeChild(_arg1);
_arg1 = null;
}
public static function fadeCallback(_arg1:Function):void{
if (_arg1 != null){
_arg1.call();
};
}
public static function formatTime(_arg1:Number, _arg2:Boolean, _arg3:Boolean):String{
var _local4:Number = Math.floor(((_arg1 / 1000) / 60));
_arg1 = (_arg1 - ((_local4 * 60) * 1000));
var _local5:Number = Math.floor((_arg1 / 1000));
_arg1 = (_arg1 - (_local5 * 1000));
var _local6:Number = Math.floor((_arg1 / 10));
var _local7:String = ("" + _local5);
var _local8:String = ("" + _local6);
var _local9:String = ("" + _local4);
if (_arg2){
if (_local9.length == 1){
_local9 = ("0" + _local9);
};
if (_local7.length == 1){
_local7 = ("0" + _local7);
};
if (_local8.length == 1){
_local8 = ("0" + _local8);
};
};
return ((((_local9 + ":") + _local7) + (_arg3) ? (":" + _local8) : ""));
}
public static function getColourFromHex(_arg1:String):Number{
if (StringUtils.startswith(_arg1, "#")){
_arg1 = _arg1.substring(1);
return (parseInt(_arg1, 16));
};
if (StringUtils.startswith(_arg1, "0x")){
_arg1 = _arg1.substring(2);
return (parseInt(_arg1, 16));
};
return (parseInt(_arg1, 16));
}
public static function getColorFromY(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number):uint{
var _local5:Number = (_arg1 / _arg2);
var _local6 = (0xFF << 24);
var _local7 = ((_arg3 >> 16) & 0xFF);
var _local8 = ((_arg4 >> 16) & 0xFF);
var _local9 = ((_arg3 >> 8) & 0xFF);
var _local10 = ((_arg4 >> 8) & 0xFF);
var _local11 = (_arg3 & 0xFF);
var _local12 = (_arg4 & 0xFF);
var _local13 = ((_local7 + (_local5 * (_local8 - _local7))) << 16);
var _local14 = ((_local9 + (_local5 * (_local10 - _local9))) << 8);
var _local15:int = (_local11 + (_local5 * (_local12 - _local11)));
return ((((_local6 + _local13) + _local14) + _local15));
}
public static function fadeOut(_arg1:DisplayObject, _arg2:Number=0.5, _arg3:Boolean=true, _arg4:Function=null):void{
TweenLite.killTweensOf(_arg1);
if (_arg3){
TweenLite.to(_arg1, _arg2, {alpha:0, ease:Cubic.easeOut, onComplete:Utils.destroyObject, onCompleteParams:[_arg1, _arg4]});
} else {
TweenLite.to(_arg1, _arg2, {alpha:0, ease:Cubic.easeOut, onComplete:Utils.fadeCallback, onCompleteParams:[_arg4]});
};
}
public static function getUniqueArrayValues(_arg1:Array):Array{
var _local4:Array;
var _local5:*;
var _local6:*;
var _local7:Array;
var _local8:*;
var _local2:* = {};
var _local3:* = _arg1.length;
_local7 = new Array();
_local4 = new Array();
while (_local3--) {
_local5 = _arg1[_local3];
_local6 = typeof(_local5);
if ((((_local6 == "number")) || ((_local6 == "string")))){
_local2[_local5] = _local5;
} else {
if (!_local5.$$$){
_local7.push(_local5);
_local5.$$$ = true;
};
};
};
for (_local3 in _local2) {
_local4.push(_local2[_local3]);
};
_local3 = _local7.length;
if (_local3){
while (_local3--) {
_local8 = _local7[_local3];
delete _local8.$$$;
_local4.push(_local8);
};
};
return (_local4);
}
public static function duplicateDisplayObject(_arg1:DisplayObject, _arg2:Boolean=false):DisplayObject{
var _local5:Rectangle;
var _local3:Class = Class(Object(_arg1).constructor);
var _local4:DisplayObject = new (_local3);
_local4.transform = _arg1.transform;
_local4.filters = _arg1.filters;
_local4.cacheAsBitmap = _arg1.cacheAsBitmap;
_local4.opaqueBackground = _arg1.opaqueBackground;
if (_arg1.scale9Grid){
_local5 = _arg1.scale9Grid;
_local4.scale9Grid = _local5;
};
if (((_arg2) && (_arg1.parent))){
_arg1.parent.addChild(_local4);
};
return (_local4);
}
public static function destroyObject(_arg1:DisplayObject, _arg2:Function=null):void{
_arg1.parent.removeChild(_arg1);
_arg1 = null;
if (_arg2 != null){
fadeCallback(_arg2);
};
}
public static function roundToDecimalPlace(_arg1:Number, _arg2:int):Number{
return ((int((_arg1 * Math.pow(10, _arg2))) / Math.pow(10, _arg2)));
}
}
}//package com.plasticmartians.framework.utils
Section 69
//MouseListener (com.plasticmartians.framework.MouseListener)
package com.plasticmartians.framework {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class MouseListener {
private var bMouseDown:Boolean;
private var nVelSampleTime:Number;
private var nTimeMouseDown:Number;
private var stage:Stage;
private var pOldMouse:Point;
private var vMouse:Point;
private var pMouse:Point;
private static var _instance:MouseListener;
public function MouseListener(_arg1:Stage){
if (_arg1 == null){
throw (new ArgumentError("Missing stage argument"));
};
nVelSampleTime = getTimer();
this.stage = _arg1;
bMouseDown = false;
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
pOldMouse = new Point(-1, -1);
pMouse = new Point(-1, -1);
vMouse = new Point(0, 0);
onMouseMove(null);
_arg1.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
}
private function onMouseLeave(_arg1:Event):void{
bMouseDown = false;
}
private function onMouseUp(_arg1:MouseEvent):void{
bMouseDown = false;
stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
stage.removeEventListener(Event.MOUSE_LEAVE, onMouseLeave);
}
private function onMouseDown(_arg1:MouseEvent):void{
bMouseDown = true;
nTimeMouseDown = new Date().getMilliseconds();
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
stage.addEventListener(Event.MOUSE_LEAVE, onMouseLeave);
}
public function getLength():Number{
return (Math.sqrt((Math.pow(vMouse.x, 2) + Math.pow(vMouse.y, 2))));
}
private function onMouseMove(_arg1:MouseEvent){
var _local2:Number = (getTimer() - nVelSampleTime);
vMouse.x = ((-(pOldMouse.x) + stage.mouseX) / _local2);
vMouse.y = ((-(pOldMouse.y) + stage.mouseY) / _local2);
pOldMouse.x = stage.mouseX;
pOldMouse.y = stage.mouseY;
nVelSampleTime = getTimer();
}
public function set velocity(_arg1:Point):void{
vMouse.x = _arg1.x;
vMouse.y = _arg1.y;
}
public function get velocity():Point{
return (vMouse);
}
public static function getInstance(_arg1:Stage):MouseListener{
if (_instance == null){
_instance = new MouseListener(_arg1);
};
return (_instance);
}
}
}//package com.plasticmartians.framework
Section 70
//Vector2D (com.plasticmartians.framework.Vector2D)
package com.plasticmartians.framework {
import flash.display.*;
import com.plasticmartians.framework.utils.*;
public class Vector2D {
private var __normal:Vector2D;
private var _x:Number;// = 0
private var bInvalidLen:Boolean;
private var __len:Number;
private var _y:Number;// = 0
private var bInvalidNormal:Boolean;
public function Vector2D(_arg1, _arg2){
if ((_arg1 instanceof _slot1)){
_x = Vector2D(_arg1)._x;
_y = Vector2D(_arg1)._y;
} else {
_x = Number(_arg1);
_y = Number(_arg2);
};
bInvalidLen = true;
bInvalidNormal = true;
}
public function getNormalized():Vector2D{
if (length == 0){
return (null);
};
return (new Vector2D((_x / __len), (_y / __len)));
}
public function equals(_arg1:Vector2D):Boolean{
return ((((_x == _arg1._x)) && ((_y == _arg1._y))));
}
public function set length(_arg1:Number):void{
if (isNaN(Number(_arg1))){
_x = (_y = 0);
};
var _local2:Number = Math.sqrt((Math.pow(_x, 2) + Math.pow(_y, 2)));
if (0 < _local2){
mulScalar((_arg1 / _local2));
} else {
_y = 0;
_x = _arg1;
};
bInvalidLen = true;
}
public function normalize():Vector2D{
var _local1:Number = length;
if (_local1 != 0){
_x = (_x / _local1);
_y = (_y / _local1);
} else {
_x = 0;
_y = 0;
};
bInvalidLen = true;
return (this);
}
private function updateLength():void{
__len = Math.sqrt((Math.pow(_x, 2) + Math.pow(_y, 2)));
bInvalidLen = false;
}
private function updateNormal():void{
var _local1:Number = length;
__normal = new Vector2D((-(_y) / _local1), (_x / _local1));
bInvalidNormal = false;
}
public function mulVectorNew(_arg1:Vector2D):Vector2D{
return (new Vector2D((_x * _arg1._x), (_y * _arg1._y)));
}
public function get angle():Number{
return (Math.atan2(_y, _x));
}
public function crossProduct(_arg1:Number):Vector2D{
return (new Vector2D((_x * _arg1), (_y * _arg1)));
}
public function rotateRadians(_arg1:Number){
var _local2:* = Math.cos(_arg1);
var _local3:* = Math.sin(_arg1);
var _local4:* = ((x * _local2) - (y * _local3));
var _local5:* = ((x * _local3) + (y * _local2));
x = _local4;
y = _local5;
bInvalidNormal = true;
}
public function sub(_arg1:Vector2D):Vector2D{
_x = (_x - _arg1._x);
_y = (_y - _arg1._y);
bInvalidLen = true;
bInvalidNormal = true;
return (this);
}
public function plus(_arg1:Vector2D):Vector2D{
_x = (_x + _arg1._x);
_y = (_y + _arg1._y);
bInvalidLen = true;
bInvalidNormal = true;
return (this);
}
public function rotate(_arg1:Number){
var _local2:* = Math.cos((_arg1 * Utils.ANG2RAD));
var _local3:* = Math.sin((_arg1 * Utils.ANG2RAD));
var _local4:* = ((x * _local2) - (y * _local3));
var _local5:* = ((x * _local3) + (y * _local2));
x = _local4;
y = _local5;
bInvalidNormal = true;
}
public function clone():Vector2D{
return (new Vector2D(_x, _y));
}
public function drawAt(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Number=0xFF0000){
var _local6:Number;
var _local7:Number;
_local6 = (_arg2 + (_x * _arg4));
_local7 = (_arg3 + (_y * _arg4));
_arg1.graphics.lineStyle(1, _arg5, 100);
_arg1.graphics.moveTo(_arg2, _arg3);
_arg1.graphics.lineTo(_local6, _local7);
var _local8:Vector2D = new Vector2D(_arg2, _arg3).plusNew(this.getNormalized().crossProduct(((length * _arg4) - 6)));
var _local9:Vector2D = this.normal;
_local9.normalize();
_local9 = _local9.crossProduct(4);
_local8.plus(_local9);
_arg1.graphics.moveTo(_local8.x, _local8.y);
_arg1.graphics.lineTo(_local6, _local7);
_local8.plus(_local9.crossProduct(-2));
_arg1.graphics.lineTo(_local8.x, _local8.y);
}
public function mulScalar(_arg1:Number):Vector2D{
_x = (_x * _arg1);
_y = (_y * _arg1);
bInvalidLen = true;
bInvalidNormal = true;
return (this);
}
public function subNew(_arg1:Vector2D):Vector2D{
return (new Vector2D((_x - _arg1._x), (_y - _arg1._y)));
}
public function invert(){
x = -(_x);
y = -(_y);
}
public function get length():Number{
if (bInvalidLen){
updateLength();
};
return (__len);
}
public function get normal():Vector2D{
if (bInvalidNormal){
updateNormal();
};
return (__normal);
}
public function getInverted():Vector2D{
return (new Vector2D(-(_x), -(_y)));
}
public function toString():String{
return (new String((((("[" + _x) + ",") + _y) + "]")));
}
public function plusNew(_arg1:Vector2D):Vector2D{
return (new Vector2D((_x + _arg1._x), (_y + _arg1._y)));
}
public function mulVector(_arg1:Vector2D):Vector2D{
_x = (_x * _arg1._x);
_y = (_y * _arg1._y);
bInvalidLen = true;
bInvalidNormal = true;
return (this);
}
public function set x(_arg1:Number){
_x = _arg1;
bInvalidLen = true;
bInvalidNormal = true;
}
public function set y(_arg1:Number){
_y = _arg1;
bInvalidLen = true;
bInvalidNormal = true;
}
public function mulScalarNew(_arg1:Number):Vector2D{
return (new Vector2D((_x * _arg1), (_y * _arg1)));
}
public function get y():Number{
return (_y);
}
public function setTo(_arg1, _arg2):Vector2D{
if ((_arg1 instanceof _slot1)){
this._x = _arg1._x;
this._y = _arg1._y;
} else {
this._x = _arg1;
this._y = _arg2;
};
bInvalidLen = true;
bInvalidNormal = true;
return (this);
}
public function dotProduct(_arg1:Vector2D):Number{
return (((_x * _arg1._x) + (_y * _arg1._y)));
}
public function get x():Number{
return (_x);
}
}
}//package com.plasticmartians.framework
Section 71
//SOSLoggingTarget (com.soenkerohde.logging.SOSLoggingTarget)
package com.soenkerohde.logging {
import flash.events.*;
import flash.net.*;
import mx.logging.*;
import mx.core.*;
import mx.logging.targets.*;
import com.adobe.utils.*;
public class SOSLoggingTarget extends LineFormattedTarget {
public var server:String;// = "localhost"
private var history:Array;
private var socket:XMLSocket;
public function SOSLoggingTarget(){
socket = new XMLSocket();
history = new Array();
}
private function padTime(_arg1:Number, _arg2:Boolean=false):String{
if (_arg2){
if (_arg1 < 10){
return (("00" + _arg1.toString()));
};
if (_arg1 < 100){
return (("0" + _arg1.toString()));
};
return (_arg1.toString());
//unresolved jump
};
return (((_arg1 > 9)) ? _arg1.toString() : ("0" + _arg1.toString()));
}
private function getTypeByLogLevel(_arg1:int):String{
switch (_arg1){
case LogEventLevel.DEBUG:
return ("DEBUG");
case LogEventLevel.INFO:
return ("INFO");
case LogEventLevel.WARN:
return ("WARN");
case LogEventLevel.ERROR:
return ("ERROR");
case LogEventLevel.FATAL:
return ("FATAL");
default:
return ("INFO");
};
}
private function onSecurityError(_arg1:SecurityErrorEvent):void{
trace("XMLSocket SecurityError");
}
private function onIOError(_arg1:IOErrorEvent):void{
trace("XMLSocket IOError");
}
private function onConnect(_arg1:Event):void{
var _local2:Object;
for each (_local2 in history) {
send(_local2);
};
}
override mx_internal function internalLog(_arg1:String):void{
}
private function send(_arg1:Object):void{
var _local4:String;
var _local6:String;
var _local2:String = getTypeByLogLevel(_arg1.level);
var _local3 = "";
if (_arg1.date != null){
_local3 = (_local3 + (_arg1.date + fieldSeparator));
};
if (_arg1.time != null){
_local3 = (_local3 + (_arg1.time + fieldSeparator));
};
if (_arg1.category != null){
_local3 = (_local3 + (_arg1.category + fieldSeparator));
};
_local3 = (_local3 + _arg1.message);
var _local5:Array = _local3.split("\n");
if (_local5.length <= 1){
_local4 = ((("!SOS<showMessage key=\"" + _local2.toUpperCase()) + "\"/> ") + _local3);
} else {
_local6 = _local5[0];
_local4 = (("!SOS<showFoldMessage key=\"" + _local2.toUpperCase()) + "\">");
_local4 = (_local4 + (("<title>" + _local6) + "</title>"));
_local3 = StringUtil.replace(_local3.substr((_local3.indexOf("\n") + 1), _local3.length), "<", "^");
_local3 = _local3.substr((_local3.indexOf("\n") + 1), _local3.length);
_local4 = (_local4 + (("<message>" + _local3) + "</message>"));
_local4 = (_local4 + "</showFoldMessage>");
};
socket.send((_local4 + "\n"));
}
override public function logEvent(_arg1:LogEvent):void{
var _local3:Date;
var _local2:Object = {message:_arg1.message};
if (((includeDate) || (includeTime))){
_local3 = new Date();
if (includeDate){
_local2.date = ((((Number((_local3.getMonth() + 1)).toString() + "/") + _local3.getDate().toString()) + "/") + _local3.getFullYear());
};
if (includeTime){
_local2.time = ((((((padTime(_local3.getHours()) + ":") + padTime(_local3.getMinutes())) + ":") + padTime(_local3.getSeconds())) + ".") + padTime(_local3.getMilliseconds(), true));
};
};
if (includeLevel){
_local2.level = _arg1.level;
};
_local2.category = (includeCategory) ? ILogger(_arg1.target).category : "";
if (socket.connected){
send(_local2);
} else {
if (!socket.hasEventListener("connect")){
socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
socket.addEventListener(Event.CONNECT, onConnect);
};
socket.connect(server, 4444);
history.push(_local2);
};
}
}
}//package com.soenkerohde.logging
Section 72
//compareStringCaseInSensitive (de.polygonal.ds.sort.compare.compareStringCaseInSensitive)
package de.polygonal.ds.sort.compare {
public function compareStringCaseInSensitive(_arg1:String, _arg2:String):int{
var _local3:int;
var _local4:int;
var _local5:int;
_arg1 = _arg1.toLowerCase();
_arg2 = _arg2.toLowerCase();
if ((_arg1.length + _arg2.length) > 2){
_local3 = 0;
_local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length;
_local5 = 0;
while (_local5 < _local4) {
_local3 = (_arg1.charCodeAt(_local5) - _arg2.charCodeAt(_local5));
if (_local3 != 0){
break;
};
_local5++;
};
return (_local3);
//unresolved jump
};
return ((_arg1.charCodeAt(0) - _arg2.charCodeAt(0)));
}
}//package de.polygonal.ds.sort.compare
Section 73
//compareStringCaseInSensitiveDesc (de.polygonal.ds.sort.compare.compareStringCaseInSensitiveDesc)
package de.polygonal.ds.sort.compare {
public function compareStringCaseInSensitiveDesc(_arg1:String, _arg2:String):int{
var _local3:int;
var _local4:int;
var _local5:int;
_arg1 = _arg1.toLowerCase();
_arg2 = _arg2.toLowerCase();
if ((_arg1.length + _arg2.length) > 2){
_local3 = 0;
_local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length;
_local5 = 0;
while (_local5 < _local4) {
_local3 = (_arg2.charCodeAt(_local5) - _arg1.charCodeAt(_local5));
if (_local3 != 0){
break;
};
_local5++;
};
return (_local3);
//unresolved jump
};
return ((_arg2.charCodeAt(0) - _arg1.charCodeAt(0)));
}
}//package de.polygonal.ds.sort.compare
Section 74
//compareStringCaseSensitive (de.polygonal.ds.sort.compare.compareStringCaseSensitive)
package de.polygonal.ds.sort.compare {
public function compareStringCaseSensitive(_arg1:String, _arg2:String):int{
var _local3:int;
var _local4:int;
var _local5:int;
if ((_arg1.length + _arg2.length) > 2){
_local3 = 0;
_local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length;
_local5 = 0;
while (_local5 < _local4) {
_local3 = (_arg1.charCodeAt(_local5) - _arg2.charCodeAt(_local5));
if (_local3 != 0){
break;
};
_local5++;
};
return (_local3);
//unresolved jump
};
return ((_arg1.charCodeAt(0) - _arg2.charCodeAt(0)));
}
}//package de.polygonal.ds.sort.compare
Section 75
//compareStringCaseSensitiveDesc (de.polygonal.ds.sort.compare.compareStringCaseSensitiveDesc)
package de.polygonal.ds.sort.compare {
public function compareStringCaseSensitiveDesc(_arg1:String, _arg2:String):int{
var _local3:int;
var _local4:int;
var _local5:int;
if ((_arg1.length + _arg2.length) > 2){
_local3 = 0;
_local4 = ((_arg1.length > _arg2.length)) ? _arg1.length : _arg2.length;
_local5 = 0;
while (_local5 < _local4) {
_local3 = (_arg2.charCodeAt(_local5) - _arg1.charCodeAt(_local5));
if (_local3 != 0){
break;
};
_local5++;
};
return (_local3);
//unresolved jump
};
return ((_arg2.charCodeAt(0) - _arg1.charCodeAt(0)));
}
}//package de.polygonal.ds.sort.compare
Section 76
//dLinkedInsertionSort (de.polygonal.ds.sort.dLinkedInsertionSort)
package de.polygonal.ds.sort {
import de.polygonal.ds.*;
public function dLinkedInsertionSort(_arg1:DListNode, _arg2:Boolean=false):DListNode{
var _local4:DListNode;
var _local5:DListNode;
var _local6:DListNode;
var _local7:DListNode;
var _local8:*;
if (!_arg1){
return (null);
};
var _local3:DListNode = _arg1;
if (_arg2){
_local5 = _local3.next;
while (_local5) {
_local6 = _local5.next;
_local4 = _local5.prev;
if (_local4.data < _local5.data){
_local7 = _local4;
while (_local7.prev) {
if (_local7.prev.data < _local5.data){
_local7 = _local7.prev;
} else {
break;
};
};
if (_local6){
_local4.next = _local6;
_local6.prev = _local4;
} else {
_local4.next = null;
};
if (_local7 == _local3){
_local5.prev = null;
_local5.next = _local7;
_local7.prev = _local5;
_local3 = _local5;
} else {
_local5.prev = _local7.prev;
_local7.prev.next = _local5;
_local5.next = _local7;
_local7.prev = _local5;
};
};
_local5 = _local6;
};
return (_local3);
//unresolved jump
};
_local5 = _local3.next;
while (_local5) {
_local6 = _local5.next;
_local4 = _local5.prev;
if (_local4.data > _local5.data){
_local7 = _local4;
while (_local7.prev) {
if (_local7.prev.data > _local5.data){
_local7 = _local7.prev;
} else {
break;
};
};
if (_local6){
_local4.next = _local6;
_local6.prev = _local4;
} else {
_local4.next = null;
};
if (_local7 == _local3){
_local5.prev = null;
_local5.next = _local7;
_local7.prev = _local5;
_local3 = _local5;
} else {
_local5.prev = _local7.prev;
_local7.prev.next = _local5;
_local5.next = _local7;
_local7.prev = _local5;
};
};
_local5 = _local6;
};
return (_local3);
}
}//package de.polygonal.ds.sort
Section 77
//dLinkedInsertionSortCmp (de.polygonal.ds.sort.dLinkedInsertionSortCmp)
package de.polygonal.ds.sort {
import de.polygonal.ds.*;
public function dLinkedInsertionSortCmp(_arg1:DListNode, _arg2:Function, _arg3:Boolean=false):DListNode{
var _local5:DListNode;
var _local6:DListNode;
var _local7:DListNode;
var _local8:DListNode;
var _local9:*;
if (((!(_arg1)) || ((_arg2 == null)))){
return (null);
};
var _local4:DListNode = _arg1;
if (_arg3){
_local6 = _local4.next;
while (_local6) {
_local7 = _local6.next;
_local5 = _local6.prev;
if (_arg2(_local5.data, _local6.data) < 0){
_local8 = _local5;
while (_local8.prev) {
if (_arg2(_local8.prev.data, _local6.data) < 0){
_local8 = _local8.prev;
} else {
break;
};
};
if (_local7){
_local5.next = _local7;
_local7.prev = _local5;
} else {
_local5.next = null;
};
if (_local8 == _local4){
_local6.prev = null;
_local6.next = _local8;
_local8.prev = _local6;
_local4 = _local6;
} else {
_local6.prev = _local8.prev;
_local8.prev.next = _local6;
_local6.next = _local8;
_local8.prev = _local6;
};
};
_local6 = _local7;
};
} else {
_local6 = _local4.next;
while (_local6) {
_local7 = _local6.next;
_local5 = _local6.prev;
if (_arg2(_local5.data, _local6.data) > 0){
_local8 = _local5;
while (_local8.prev) {
if (_arg2(_local8.prev.data, _local6.data) > 0){
_local8 = _local8.prev;
} else {
break;
};
};
if (_local7){
_local5.next = _local7;
_local7.prev = _local5;
} else {
_local5.next = null;
};
if (_local8 == _local4){
_local6.prev = null;
_local6.next = _local8;
_local8.prev = _local6;
_local4 = _local6;
} else {
_local6.prev = _local8.prev;
_local8.prev.next = _local6;
_local6.next = _local8;
_local8.prev = _local6;
};
};
_local6 = _local7;
};
};
return (_local4);
}
}//package de.polygonal.ds.sort
Section 78
//dLinkedMergeSort (de.polygonal.ds.sort.dLinkedMergeSort)
package de.polygonal.ds.sort {
import de.polygonal.ds.*;
public function dLinkedMergeSort(_arg1:DListNode, _arg2:Boolean=false):DListNode{
var _local4:DListNode;
var _local5:DListNode;
var _local6:DListNode;
var _local7:DListNode;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
if (!_arg1){
return (null);
};
var _local3:DListNode = _arg1;
var _local8 = 1;
if (_arg2){
while (true) {
_local4 = _local3;
_local7 = null;
_local3 = _local7;
_local9 = 0;
while (_local4) {
_local9++;
_local12 = 0;
_local10 = 0;
_local5 = _local4;
while (_local12 < _local8) {
_local10++;
_local5 = _local5.next;
if (!_local5){
break;
};
_local12++;
};
_local11 = _local8;
while ((((_local10 > 0)) || ((((_local11 > 0)) && (_local5))))) {
if (_local10 == 0){
_local6 = _local5;
_local5 = _local5.next;
_local11--;
} else {
if ((((_local11 == 0)) || (!(_local5)))){
_local6 = _local4;
_local4 = _local4.next;
_local10--;
} else {
if ((_local4.data - _local5.data) >= 0){
_local6 = _local4;
_local4 = _local4.next;
_local10--;
} else {
_local6 = _local5;
_local5 = _local5.next;
_local11--;
};
};
};
if (_local7){
_local7.next = _local6;
} else {
_local3 = _local6;
};
_local6.prev = _local7;
_local7 = _local6;
};
_local4 = _local5;
};
_local7.next = null;
if (_local9 <= 1){
return (_local3);
};
_local8 = (_local8 << 1);
};
} else {
while (true) {
_local4 = _local3;
_local7 = null;
_local3 = _local7;
_local9 = 0;
while (_local4) {
_local9++;
_local12 = 0;
_local10 = 0;
_local5 = _local4;
while (_local12 < _local8) {
_local10++;
_local5 = _local5.next;
if (!_local5){
break;
};
_local12++;
};
_local11 = _local8;
while ((((_local10 > 0)) || ((((_local11 > 0)) && (_local5))))) {
if (_local10 == 0){
_local6 = _local5;
_local5 = _local5.next;
_local11--;
} else {
if ((((_local11 == 0)) || (!(_local5)))){
_local6 = _local4;
_local4 = _local4.next;
_local10--;
} else {
if ((_local4.data - _local5.data) <= 0){
_local6 = _local4;
_local4 = _local4.next;
_local10--;
} else {
_local6 = _local5;
_local5 = _local5.next;
_local11--;
};
};
};
if (_local7){
_local7.next = _local6;
} else {
_local3 = _local6;
};
_local6.prev = _local7;
_local7 = _local6;
};
_local4 = _local5;
};
_local7.next = null;
if (_local9 <= 1){
return (_local3);
};
_local8 = (_local8 << 1);
};
};
return (null);
}
}//package de.polygonal.ds.sort
Section 79
//dLinkedMergeSortCmp (de.polygonal.ds.sort.dLinkedMergeSortCmp)
package de.polygonal.ds.sort {
import de.polygonal.ds.*;
public function dLinkedMergeSortCmp(_arg1:DListNode, _arg2:Function, _arg3:Boolean=false):DListNode{
var _local5:DListNode;
var _local6:DListNode;
var _local7:DListNode;
var _local8:DListNode;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
if (((!(_arg1)) || ((_arg2 == null)))){
return (null);
};
var _local4:DListNode = _arg1;
var _local9 = 1;
if (_arg3){
while (true) {
_local5 = _local4;
_local8 = null;
_local4 = _local8;
_local10 = 0;
while (_local5) {
_local10++;
_local13 = 0;
_local11 = 0;
_local6 = _local5;
while (_local13 < _local9) {
_local11++;
_local6 = _local6.next;
if (!_local6){
break;
};
_local13++;
};
_local12 = _local9;
while ((((_local11 > 0)) || ((((_local12 > 0)) && (_local6))))) {
if (_local11 == 0){
_local7 = _local6;
_local6 = _local6.next;
_local12--;
} else {
if ((((_local12 == 0)) || (!(_local6)))){
_local7 = _local5;
_local5 = _local5.next;
_local11--;
} else {
if (_arg2(_local5.data, _local6.data) >= 0){
_local7 = _local5;
_local5 = _local5.next;
_local11--;
} else {
_local7 = _local6;
_local6 = _local6.next;
_local12--;
};
};
};
if (_local8){
_local8.next = _local7;
} else {
_local4 = _local7;
};
_local7.prev = _local8;
_local8 = _local7;
};
_local5 = _local6;
};
_arg1.prev = _local8;
_local8.next = null;
if (_local10 <= 1){
return (_local4);
};
_local9 = (_local9 << 1);
};
} else {
while (true) {
_local5 = _local4;
_local8 = null;
_local4 = _local8;
_local10 = 0;
while (_local5) {
_local10++;
_local13 = 0;
_local11 = 0;
_local6 = _local5;
while (_local13 < _local9) {
_local11++;
_local6 = _local6.next;
if (!_local6){
break;
};
_local13++;
};
_local12 = _local9;
while ((((_local11 > 0)) || ((((_local12 > 0)) && (_local6))))) {
if (_local11 == 0){
_local7 = _local6;
_local6 = _local6.next;
_local12--;
} else {
if ((((_local12 == 0)) || (!(_local6)))){
_local7 = _local5;
_local5 = _local5.next;
_local11--;
} else {
if (_arg2(_local5.data, _local6.data) <= 0){
_local7 = _local5;
_local5 = _local5.next;
_local11--;
} else {
_local7 = _local6;
_local6 = _local6.next;
_local12--;
};
};
};
if (_local8){
_local8.next = _local7;
} else {
_local4 = _local7;
};
_local7.prev = _local8;
_local8 = _local7;
};
_local5 = _local6;
};
_arg1.prev = _local8;
_local8.next = null;
if (_local10 <= 1){
return (_local4);
};
_local9 = (_local9 << 1);
};
};
return (null);
}
}//package de.polygonal.ds.sort
Section 80
//Collection (de.polygonal.ds.Collection)
package de.polygonal.ds {
public interface Collection {
function get size():int;
function isEmpty():Boolean;
function getIterator():Iterator;
function clear():void;
function toArray():Array;
function contains(_arg1):Boolean;
}
}//package de.polygonal.ds
Section 81
//DLinkedList (de.polygonal.ds.DLinkedList)
package de.polygonal.ds {
import de.polygonal.ds.sort.*;
import de.polygonal.ds.sort.compare.*;
public class DLinkedList implements Collection {
private var _count:int;
public var tail:DListNode;
public var head:DListNode;
public function DLinkedList(... _args){
head = (tail = null);
_count = 0;
if (_args.length > 0){
append.apply(this, _args);
};
}
public function get size():int{
return (_count);
}
public function isEmpty():Boolean{
return ((_count == 0));
}
public function remove(_arg1:DListIterator):Boolean{
if (((!((_arg1.list == this))) || (!(_arg1.node)))){
return (false);
};
var _local2:DListNode = _arg1.node;
if (_local2 == head){
head = head.next;
} else {
if (_local2 == tail){
tail = tail.prev;
};
};
if (_arg1.node){
_arg1.node = _arg1.node.next;
};
if (_local2.prev){
_local2.prev.next = _local2.next;
};
if (_local2.next){
_local2.next.prev = _local2.prev;
};
_local2.next = (_local2.prev = null);
if (head == null){
tail = null;
};
_count--;
return (true);
}
public function removeHead(){
var _local1:*;
if (head){
_local1 = head.data;
head = head.next;
if (head){
head.prev = null;
} else {
tail = null;
};
_count--;
return (_local1);
};
return (null);
}
public function clear():void{
var _local2:DListNode;
var _local1:DListNode = head;
head = null;
while (_local1) {
_local2 = _local1.next;
_local1.next = (_local1.prev = null);
_local1 = _local2;
};
_count = 0;
}
public function prepend(... _args):DListNode{
var _local4:DListNode;
var _local5:int;
var _local2:int = _args.length;
var _local3:DListNode = new DListNode(_args[int((_local2 - 1))]);
if (head){
head.insertBefore(_local3);
head = head.prev;
} else {
head = (tail = _local3);
};
if (_local2 > 1){
_local4 = _local3;
_local5 = (_local2 - 2);
while (_local5 >= 0) {
_local3 = new DListNode(_args[_local5]);
head.insertBefore(_local3);
head = head.prev;
_local5--;
};
_count = (_count + _local2);
return (_local4);
};
_count++;
return (_local3);
}
public function popDown():void{
var _local1:DListNode = tail;
if (tail.prev == head){
tail = head;
tail.next = null;
head = _local1;
head.prev = null;
head.next = tail;
tail.prev = head;
} else {
tail = tail.prev;
tail.next = null;
head.prev = _local1;
_local1.prev = null;
_local1.next = head;
head = _local1;
};
}
public function concat(... _args):DLinkedList{
var _local3:DLinkedList;
var _local4:DListNode;
var _local2:DLinkedList = new DLinkedList();
_local4 = head;
while (_local4) {
_local2.append(_local4.data);
_local4 = _local4.next;
};
var _local5:int = _args.length;
var _local6:int;
while (_local6 < _local5) {
_local3 = _args[_local6];
_local4 = _local3.head;
while (_local4) {
_local2.append(_local4.data);
_local4 = _local4.next;
};
_local6++;
};
return (_local2);
}
public function insertBefore(_arg1:DListIterator, _arg2):DListNode{
var _local3:DListNode;
if (_arg1.list != this){
return (null);
};
if (_arg1.node){
_local3 = new DListNode(_arg2);
_arg1.node.insertBefore(_local3);
if (_arg1.node == head){
head = head.prev;
};
_count++;
return (_local3);
//unresolved jump
};
return (prepend(_arg2));
}
public function append(... _args):DListNode{
var _local4:DListNode;
var _local5:int;
var _local2:int = _args.length;
var _local3:DListNode = new DListNode(_args[0]);
if (head){
tail.insertAfter(_local3);
tail = tail.next;
} else {
head = (tail = _local3);
};
if (_local2 > 1){
_local4 = _local3;
_local5 = 1;
while (_local5 < _local2) {
_local3 = new DListNode(_args[_local5]);
tail.insertAfter(_local3);
tail = tail.next;
_local5++;
};
_count = (_count + _local2);
return (_local4);
};
_count++;
return (_local3);
}
public function sort(... _args):void{
var _local2:int;
var _local3:Function;
var _local4:*;
if (_count <= 1){
return;
};
if (_args.length > 0){
_local2 = 0;
_local3 = null;
_local4 = _args[0];
if ((_local4 is Function)){
_local3 = _local4;
if (_args.length > 1){
_local4 = _args[1];
if ((_local4 is int)){
_local2 = _local4;
};
};
} else {
if ((_local4 is int)){
_local2 = _local4;
};
};
if (Boolean(_local3)){
if ((_local2 & 2)){
head = dLinkedInsertionSortCmp(head, _local3, (_local2 == 18));
} else {
head = dLinkedMergeSortCmp(head, _local3, (_local2 == 16));
};
} else {
if ((_local2 & 2)){
if ((_local2 & 4)){
if (_local2 == 22){
head = dLinkedInsertionSortCmp(head, compareStringCaseSensitiveDesc);
} else {
if (_local2 == 14){
head = dLinkedInsertionSortCmp(head, compareStringCaseInSensitive);
} else {
if (_local2 == 30){
head = dLinkedInsertionSortCmp(head, compareStringCaseInSensitiveDesc);
} else {
head = dLinkedInsertionSortCmp(head, compareStringCaseSensitive);
};
};
};
} else {
head = dLinkedInsertionSort(head, (_local2 == 18));
};
} else {
if ((_local2 & 4)){
if (_local2 == 20){
head = dLinkedMergeSortCmp(head, compareStringCaseSensitiveDesc);
} else {
if (_local2 == 12){
head = dLinkedMergeSortCmp(head, compareStringCaseInSensitive);
} else {
if (_local2 == 28){
head = dLinkedMergeSortCmp(head, compareStringCaseInSensitiveDesc);
} else {
head = dLinkedMergeSortCmp(head, compareStringCaseSensitive);
};
};
};
} else {
if ((_local2 & 16)){
head = dLinkedMergeSort(head, true);
};
};
};
};
} else {
head = dLinkedMergeSort(head);
};
}
public function contains(_arg1):Boolean{
var _local2:DListNode = head;
while (_local2) {
if (_local2.data == _arg1){
return (true);
};
_local2 = _local2.next;
};
return (false);
}
public function reverse():void{
var _local1:DListNode;
var _local3:DListNode;
if (_count == 0){
return;
};
var _local2:DListNode = tail;
while (_local2) {
_local1 = _local2.prev;
if (!_local2.next){
_local2.next = _local2.prev;
_local2.prev = null;
head = _local2;
} else {
if (!_local2.prev){
_local2.prev = _local2.next;
_local2.next = null;
tail = _local2;
} else {
_local3 = _local2.next;
_local2.next = _local2.prev;
_local2.prev = _local3;
};
};
_local2 = _local1;
};
}
public function insertAfter(_arg1:DListIterator, _arg2):DListNode{
var _local3:DListNode;
if (_arg1.list != this){
return (null);
};
if (_arg1.node){
_local3 = new DListNode(_arg2);
_arg1.node.insertAfter(_local3);
if (_arg1.node == tail){
tail = _arg1.node.next;
};
_count++;
return (_local3);
//unresolved jump
};
return (append(_arg2));
}
public function getIterator():Iterator{
return (new DListIterator(this, head));
}
public function toArray():Array{
var _local1:Array = [];
var _local2:DListNode = head;
while (_local2) {
_local1.push(_local2.data);
_local2 = _local2.next;
};
return (_local1);
}
public function getListIterator():DListIterator{
return (new DListIterator(this, head));
}
public function join(_arg1):String{
if (_count == 0){
return ("");
};
var _local2 = "";
var _local3:DListNode = head;
while (_local3.next) {
_local2 = (_local2 + (_local3.data + _arg1));
_local3 = _local3.next;
};
_local2 = (_local2 + _local3.data);
return (_local2);
}
public function toString():String{
return ((("[DLinkedList > has " + size) + " nodes]"));
}
public function removeTail(){
var _local1:*;
if (tail){
_local1 = tail.data;
tail = tail.prev;
if (tail){
tail.next = null;
} else {
head = null;
};
_count--;
return (_local1);
};
return (null);
}
public function lastNodeOf(_arg1, _arg2:DListIterator=null):DListIterator{
if (_arg2 != null){
if (_arg2.list != this){
return (null);
};
};
var _local3:DListNode = ((_arg2)==null) ? tail : _arg2.node;
while (_local3) {
if (_local3.data === _arg1){
return (new DListIterator(this, _local3));
};
_local3 = _local3.prev;
};
return (null);
}
public function merge(... _args):void{
var _local2:DLinkedList;
_local2 = _args[0];
if (_local2.head){
if (head){
tail.next = _local2.head;
_local2.head.prev = tail;
tail = _local2.tail;
} else {
head = _local2.head;
tail = _local2.tail;
};
_count = (_count + _local2.size);
};
var _local3:int = _args.length;
var _local4 = 1;
while (_local4 < _local3) {
_local2 = _args[_local4];
if (_local2.head){
tail.next = _local2.head;
_local2.head.prev = tail;
tail = _local2.tail;
_count = (_count + _local2.size);
};
_local4++;
};
}
public function nodeOf(_arg1, _arg2:DListIterator=null):DListIterator{
if (_arg2 != null){
if (_arg2.list != this){
return (null);
};
};
var _local3:DListNode = ((_arg2)==null) ? head : _arg2.node;
while (_local3) {
if (_local3.data === _arg1){
return (new DListIterator(this, _local3));
};
_local3 = _local3.next;
};
return (null);
}
public function dump():String{
if (head == null){
return ("DLinkedList, empty");
};
var _local1 = (((("DLinkedList, has " + _count) + " node") + ((_count == 1)) ? "" : "s") + "\n|< Head\n");
var _local2:DListIterator = getListIterator();
while (_local2.valid()) {
_local1 = (_local1 + (("\t" + _local2.data) + "\n"));
_local2.forth();
};
_local1 = (_local1 + "Tail >|");
return (_local1);
}
public function splice(_arg1:DListIterator, _arg2:uint=4294967295, ... _args):DLinkedList{
var _local4:DListNode;
var _local5:DListNode;
var _local6:DLinkedList;
var _local7:int;
var _local8:int;
var _local9:DListNode;
if (_arg1){
if (_arg1.list != this){
return (null);
};
};
if (_arg1.node){
_local4 = _arg1.node;
_local5 = _arg1.node.prev;
_local6 = new DLinkedList();
if (_arg2 == 4294967295){
if (_arg1.node == tail){
return (_local6);
};
while (_arg1.node) {
_local6.append(_arg1.node.data);
_arg1.remove();
};
_arg1.list = _local6;
_arg1.node = _local4;
return (_local6);
} else {
_local7 = 0;
while (_local7 < _arg2) {
if (_arg1.node){
_local6.append(_arg1.node.data);
_arg1.remove();
} else {
break;
};
_local7++;
};
};
_local8 = _args.length;
if (_local8 > 0){
if (_count == 0){
_local7 = 0;
while (_local7 < _local8) {
append(_args[_local7]);
_local7++;
};
} else {
if (_local5 == null){
_local9 = prepend(_args[0]);
_local7 = 1;
while (_local7 < _local8) {
_local9.insertAfter(new DListNode(_args[_local7]));
if (_local9 == tail){
tail = _local9.next;
};
_local9 = _local9.next;
_count++;
_local7++;
};
} else {
_local9 = _local5;
_local7 = 0;
while (_local7 < _local8) {
_local9.insertAfter(new DListNode(_args[_local7]));
if (_local9 == tail){
tail = _local9.next;
};
_local9 = _local9.next;
_count++;
_local7++;
};
};
};
_arg1.node = _local9;
} else {
_arg1.node = _local4;
};
_arg1.list = _local6;
return (_local6);
};
return (null);
}
public function shiftUp():void{
var _local1:DListNode = head;
if (head.next == tail){
head = tail;
head.prev = null;
tail = _local1;
tail.next = null;
head.next = tail;
tail.prev = head;
} else {
head = head.next;
head.prev = null;
tail.next = _local1;
_local1.next = null;
_local1.prev = tail;
tail = _local1;
};
}
}
}//package de.polygonal.ds
Section 82
//DListIterator (de.polygonal.ds.DListIterator)
package de.polygonal.ds {
public class DListIterator implements Iterator {
public var node:DListNode;
public var list:DLinkedList;
public function DListIterator(_arg1:DLinkedList, _arg2:DListNode=null){
this.list = _arg1;
this.node = _arg2;
}
public function remove():Boolean{
return (list.remove(this));
}
public function back():void{
if (node){
node = node.prev;
};
}
public function start():void{
node = list.head;
}
public function get data(){
if (node){
return (node.data);
};
return (null);
}
public function forth():void{
if (node){
node = node.next;
};
}
public function toString():String{
return ((("{DListIterator, data=" + (node) ? node.data : "null") + "}"));
}
public function hasNext():Boolean{
return (Boolean(node));
}
public function valid():Boolean{
return (Boolean(node));
}
public function next(){
var _local1:*;
if (hasNext()){
_local1 = node.data;
node = node.next;
return (_local1);
};
return (null);
}
public function set data(_arg1):void{
node.data = _arg1;
}
public function end():void{
node = list.tail;
}
}
}//package de.polygonal.ds
Section 83
//DListNode (de.polygonal.ds.DListNode)
package de.polygonal.ds {
public class DListNode implements LinkedListNode {
public var prev:DListNode;
public var next:DListNode;
public var data;
public function DListNode(_arg1){
next = (prev = null);
data = _arg1;
}
public function unlink():void{
if (prev){
prev.next = next;
};
if (next){
next.prev = prev;
};
next = (prev = null);
}
public function insertAfter(_arg1:DListNode):void{
_arg1.next = next;
_arg1.prev = this;
if (next){
next.prev = _arg1;
};
next = _arg1;
}
public function insertBefore(_arg1:DListNode):void{
_arg1.next = this;
_arg1.prev = prev;
if (prev){
prev.next = _arg1;
};
prev = _arg1;
}
public function toString():String{
return ((("[DListNode, data=" + data) + "]"));
}
}
}//package de.polygonal.ds
Section 84
//Iterator (de.polygonal.ds.Iterator)
package de.polygonal.ds {
public interface Iterator {
function start():void;
function set data(_arg1):void;
function get data();
function next();
function hasNext():Boolean;
}
}//package de.polygonal.ds
Section 85
//LinkedListNode (de.polygonal.ds.LinkedListNode)
package de.polygonal.ds {
public interface LinkedListNode {
}
}//package de.polygonal.ds
Section 86
//PM_PRNG (de.polygonal.math.PM_PRNG)
package de.polygonal.math {
public class PM_PRNG {
public var seed:uint;
public function PM_PRNG(){
seed = 1;
}
private function gen():uint{
return ((seed = ((seed * 16807) % 2147483647)));
}
public function nextIntRange(_arg1:Number, _arg2:Number):uint{
_arg1 = (_arg1 - 0.4999);
_arg2 = (_arg2 + 0.4999);
return (Math.round((_arg1 + ((_arg2 - _arg1) * nextDouble()))));
}
public function nextDouble():Number{
return ((gen() / 2147483647));
}
public function nextDoubleRange(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * nextDouble())));
}
public function nextInt():uint{
return (gen());
}
}
}//package de.polygonal.math
Section 87
//wav (loader2.wav)
package loader2 {
import flash.media.*;
public dynamic class wav extends Sound {
}
}//package loader2
Section 88
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
public class MochiAd {
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var mc:MovieClip;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!(clip is DisplayObject)){
trace("Warning: Object passed as container clip not a descendant of the DisplayObject type");
return (null);
};
if (MovieClip(clip).stage == null){
trace("Warning: Container clip for ad is not attached to the stage");
return (null);
};
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
var lv:URLVariables = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
if (!options.skip){
loader.load(req);
};
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array = _arg2.split(".");
var _local4:Number = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}, progress_override:function (_arg1:Object):Number{
return (NaN);
}, bar_offset:0};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
if (options.skip){
ad_timeout = 0;
};
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = (10 + options.bar_offset);
bar.y = (h - 20);
};
var bar_w:Number = ((w - bar.x) - 10);
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(bar_w, 0);
backing.lineTo(bar_w, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(bar_w, 0);
inside.lineTo(bar_w, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(bar_w, 0);
outline.lineTo(bar_w, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
var progress:Number = Math.min(1, options.progress_override(clip));
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (!isNaN(progress)){
complete = (progress == 1);
} else {
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local12:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
var _local7:Number = Math.min(1, options.progress_override(_local1));
if (_local7 == 1){
complete = true;
};
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local8:Number = ((100 * _local6) / _local5);
if (!isNaN(_local7)){
_local8 = (100 * _local7);
};
var _local9:Number = ((100 * _local3) / chk.ad_msec);
var _local10:Object = this._mochiad_bar._inside;
var _local11:Number = Math.min(100, Math.min(((_local8) || (0)), _local9));
_local11 = Math.max(this.last_pcnt, _local11);
this.last_pcnt = _local11;
_local10.scaleX = (_local11 * 0.01);
options.ad_progress(_local11);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8});
if (_local8 >= 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local12 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (unloaded){
MochiAd.unload(_local1);
} else {
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 89
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const NO_USER:String = "NoUser";
public static const IO_ERROR:String = "IOError";
public static const ITEM_NEW:String = "ItemNew";
public static const ITEM_OWNED:String = "ItemOwned";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const STORE_SHOW:String = "StoreShow";
public static var _inventory:MochiInventory;
public static function triggerEvent(_arg1:String, _arg2:Object):void{
MochiSocial.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
MochiSocial.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
MochiSocial.addEventListener(_arg1, _arg2);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function showStore(_arg1:Object=null):void{
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package mochi.as3
Section 90
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function get value():Number{
return (Number(this.toString()));
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi.as3
Section 91
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package mochi.as3
Section 92
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
import flash.display.*;
public class MochiEvents {
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var gameStart:Number;
private static var levelStart:Number;
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local4:Object;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
}
}//package mochi.as3
Section 93
//MochiInventory (mochi.as3.MochiInventory)
package mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _names:Array;
private var _syncID:Number;
private var _consumableProperties:Object;
private var _storeSync:Object;
private var _outstandingID:Number;
private var _syncPending:Boolean;
public static const READY:String = "InvReady";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
private static const KEY_SALT:String = " syncMaint";
public static const WRITTEN:String = "InvWritten";
public static const NOT_READY:String = "InvNotReady";
public static const VALUE_ERROR:String = "InvValueError";
private static const CONSUMER_KEY:String = "MochiConsumables";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (_arg1.privateProperties.consumable){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function sync(_arg1:Event=null):void{
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
var _local2:Object = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[_local2]);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
}
}//package mochi.as3
Section 94
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.utils.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _queue:Array;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
public static var servicesSync:MochiSync = new MochiSync();
private static var _nextCallbackID:Number;
private static var _clip:MovieClip;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _loader:Loader;
private static var _callbacks:Object;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = _callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete _callbacks[cb];
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
var s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.8 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
var _local3:Number = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String = _arg1.target;
var _local3:String = _arg1.event;
switch (_local2){
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "sync":
servicesSync.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
private static function loadLCBridge(_arg1:Object):void{
var loader:Loader;
var clip = _arg1;
loader = new Loader();
var mochiLCURL:String = (_servURL + _mochiLC);
var req:URLRequest = new URLRequest(mochiLCURL);
var complete:Function = function (_arg1:Object):void{
_mochiLocalConnection = MovieClip(loader.content);
listen();
};
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
loader.load(req);
clip.addChild(loader);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
var _local3:String = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
var _local4:URLRequest = new URLRequest(_local3);
var _local5:URLVariables = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function updateCopy(_arg1:Object):void{
MochiServices.send("coins_updateCopy", _arg1, null, null);
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
}
}//package mochi.as3
Section 95
//MochiSocial (mochi.as3.MochiSocial)
package mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const IO_ERROR:String = "IOError";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const USER_INFO:String = "UserInfo";
public static const ERROR:String = "Error";
public static const LOGIN_SHOW:String = "LoginShow";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_SHOWN:String = "LoginShown";
public static const LOGIN_HIDE:String = "LoginHide";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _user_info:Object = null;
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("coins_saveUserProperties", _arg1);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getUserInfo():void{
MochiServices.send("coins_getUserInfo");
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showLoginWidget", {options:_arg1});
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function requestLogin():void{
MochiServices.send("coins_requestLogin");
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function hideLoginWidget():void{
MochiServices.send("coins_hideLoginWidget");
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package mochi.as3
Section 96
//MochiSync (mochi.as3.MochiSync)
package mochi.as3 {
import flash.utils.*;
public dynamic class MochiSync extends Proxy {
private var _syncContainer:Object;
public static var SYNC_PROPERTY:String = "UpdateProperty";
public static var SYNC_REQUEST:String = "SyncRequest";
public function MochiSync():void{
_syncContainer = {};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
if (_syncContainer[_arg1] == _arg2){
return;
};
var _local3:String = _arg1.toString();
_syncContainer[_local3] = _arg2;
MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2});
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
return (_syncContainer[_arg1]);
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
switch (_arg1){
case SYNC_REQUEST:
MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY:
_syncContainer[_arg2.name] = _arg2.value;
break;
};
}
}
}//package mochi.as3
Section 97
//MochiUserData (mochi.as3.MochiUserData)
package mochi.as3 {
import flash.events.*;
import flash.net.*;
import flash.utils.*;
public class MochiUserData extends EventDispatcher {
public var callback:Function;// = null
public var operation:String;// = null
public var error:Event;// = null
public var data;// = null
public var _loader:URLLoader;
public var key:String;// = null
public function MochiUserData(_arg1:String="", _arg2:Function=null){
this.key = _arg1;
this.callback = _arg2;
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function getEvent():void{
request("get", serialize(null));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function request(_arg1:String, _arg2:ByteArray):void{
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
var api_url:String = MochiSocial.getAPIURL();
var api_token:String = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
var args:URLVariables = new URLVariables();
args.op = _operation;
args.key = key;
var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package mochi.as3
Section 98
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 99
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 100
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 101
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 102
//FlexVersion (mx.core.FlexVersion)
package mx.core {
import mx.resources.*;
public class FlexVersion {
public static const VERSION_2_0_1:uint = 33554433;
public static const CURRENT_VERSION:uint = 50331648;
public static const VERSION_3_0:uint = 50331648;
public static const VERSION_2_0:uint = 33554432;
public static const VERSION_ALREADY_READ:String = "versionAlreadyRead";
public static const VERSION_ALREADY_SET:String = "versionAlreadySet";
mx_internal static const VERSION:String = "3.2.0.3958";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
mx_internal static function changeCompatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
_compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function set compatibilityVersion(_arg1:uint):void{
var _local2:String;
if (_arg1 == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ);
};
_compatibilityVersion = _arg1;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(_arg1:Function):void{
_compatibilityErrorFunction = _arg1;
}
public static function set compatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var _local1:uint = ((compatibilityVersion >> 24) & 0xFF);
var _local2:uint = ((compatibilityVersion >> 16) & 0xFF);
var _local3:uint = (compatibilityVersion & 0xFFFF);
return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString()));
}
}
}//package mx.core
Section 103
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 104
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(_arg1:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 105
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.core
Section 106
//IContainer (mx.core.IContainer)
package mx.core {
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import mx.managers.*;
public interface IContainer extends IUIComponent {
function set hitArea(_arg1:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(_arg1:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(_arg1:Boolean):void;
function set creatingContentPane(_arg1:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(_arg1:DisplayObject):int;
function set doubleClickEnabled(_arg1:Boolean):void;
function getObjectsUnderPoint(_arg1:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(_arg1:Boolean):void;
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(_arg1:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(_arg1:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(_arg1:Boolean):void;
function getChildAt(_arg1:int):DisplayObject;
function set soundTransform(_arg1:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(_arg1:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(_arg1:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(_arg1:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(_arg1:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(_arg1:Boolean):void;
function set buttonMode(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(_arg1:DisplayObject):DisplayObject;
function set tabIndex(_arg1:int):void;
function addChild(_arg1:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean;
}
}//package mx.core
Section 107
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 108
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 109
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 110
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateSize():void;
function invalidateDisplayList():void;
function invalidateProperties():void;
}
}//package mx.core
Section 111
//IMXMLObject (mx.core.IMXMLObject)
package mx.core {
public interface IMXMLObject {
function initialized(_arg1:Object, _arg2:String):void;
}
}//package mx.core
Section 112
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 113
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier)
package mx.core {
import flash.events.*;
public interface IPropertyChangeNotifier extends IEventDispatcher, IUID {
}
}//package mx.core
Section 114
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 115
//IRectangularBorder (mx.core.IRectangularBorder)
package mx.core {
import flash.geom.*;
public interface IRectangularBorder extends IBorder {
function get backgroundImageBounds():Rectangle;
function get hasBackgroundImage():Boolean;
function set backgroundImageBounds(_arg1:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 116
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 117
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup)
package mx.core {
import flash.events.*;
public interface ISWFBridgeGroup {
function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider;
function removeChildBridge(_arg1:IEventDispatcher):void;
function get parentBridge():IEventDispatcher;
function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void;
function set parentBridge(_arg1:IEventDispatcher):void;
function containsBridge(_arg1:IEventDispatcher):Boolean;
function getChildBridges():Array;
}
}//package mx.core
Section 118
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider)
package mx.core {
import flash.events.*;
public interface ISWFBridgeProvider {
function get childAllowsParent():Boolean;
function get swfBridge():IEventDispatcher;
function get parentAllowsChild():Boolean;
}
}//package mx.core
Section 119
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(_arg1:Sprite):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function set isPopUp(_arg1:Boolean):void;
function get explicitMinHeight():Number;
function get percentWidth():Number;
function get isPopUp():Boolean;
function get owner():DisplayObjectContainer;
function get percentHeight():Number;
function get baselinePosition():Number;
function owns(_arg1:DisplayObject):Boolean;
function initialize():void;
function get maxWidth():Number;
function get minWidth():Number;
function getExplicitOrMeasuredWidth():Number;
function get explicitMaxWidth():Number;
function get explicitMaxHeight():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function set percentWidth(_arg1:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function set explicitWidth(_arg1:Number):void;
function set measuredMinHeight(_arg1:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(_arg1:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(_arg1:Number):void;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function set document(_arg1:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 120
//IUID (mx.core.IUID)
package mx.core {
public interface IUID {
function get uid():String;
function set uid(_arg1:String):void;
}
}//package mx.core
Section 121
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 122
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var classMap:Object = {};
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class = classMap[_arg1];
if (!_local2){
throw (new Error((("No class registered for interface '" + _arg1) + "'.")));
};
return (_local2["getInstance"]());
}
}
}//package mx.core
Section 123
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 124
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public static function set catchCallLaterExceptions(_arg1:Boolean):void{
_catchCallLaterExceptions = _arg1;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(_arg1:Boolean):void{
designTime = _arg1;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 125
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.2.0.3958";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
this._module = _arg7;
}
public function get module():IModuleInfo{
if (_module){
return (_module);
};
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module));
}
}
}//package mx.events
Section 126
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 127
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 128
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
import mx.core.*;
import mx.utils.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.2.0.3958";
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
var _local6:int = (leftShadow) ? leftShadow.width : 0;
var _local7:int = (rightShadow) ? rightShadow.width : 0;
var _local8:int = (topShadow) ? topShadow.height : 0;
var _local9:int = (bottomShadow) ? bottomShadow.height : 0;
var _local10:int = (_local6 + _local7);
var _local11:int = (_local8 + _local9);
var _local12:Number = ((_arg5 + _local11) / 2);
var _local13:Number = ((_arg4 + _local10) / 2);
var _local14:Matrix = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
var _local3:Shape = new FlexShape();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2);
var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6);
var _local9:Number = (_local7.left - _local8.left);
var _local10:Number = (_local8.right - _local7.right);
var _local11:Number = (_local7.top - _local8.top);
var _local12:Number = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
var _local13:Point = new Point(0, 0);
var _local14:Rectangle = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 129
//InvalidCategoryError (mx.logging.errors.InvalidCategoryError)
package mx.logging.errors {
import mx.core.*;
public class InvalidCategoryError extends Error {
mx_internal static const VERSION:String = "3.2.0.3958";
public function InvalidCategoryError(_arg1:String){
super(_arg1);
}
public function toString():String{
return (String(message));
}
}
}//package mx.logging.errors
Section 130
//InvalidFilterError (mx.logging.errors.InvalidFilterError)
package mx.logging.errors {
import mx.core.*;
public class InvalidFilterError extends Error {
mx_internal static const VERSION:String = "3.2.0.3958";
public function InvalidFilterError(_arg1:String){
super(_arg1);
}
public function toString():String{
return (String(message));
}
}
}//package mx.logging.errors
Section 131
//LineFormattedTarget (mx.logging.targets.LineFormattedTarget)
package mx.logging.targets {
import mx.logging.*;
import mx.core.*;
public class LineFormattedTarget extends AbstractTarget {
public var includeCategory:Boolean;
public var fieldSeparator:String;// = " "
public var includeTime:Boolean;
public var includeLevel:Boolean;
public var includeDate:Boolean;
mx_internal static const VERSION:String = "3.2.0.3958";
public function LineFormattedTarget(){
includeTime = false;
includeDate = false;
includeCategory = false;
includeLevel = false;
}
private function padTime(_arg1:Number, _arg2:Boolean=false):String{
if (_arg2){
if (_arg1 < 10){
return (("00" + _arg1.toString()));
};
if (_arg1 < 100){
return (("0" + _arg1.toString()));
};
return (_arg1.toString());
//unresolved jump
};
return (((_arg1 > 9)) ? _arg1.toString() : ("0" + _arg1.toString()));
}
override public function logEvent(_arg1:LogEvent):void{
var _local5:Date;
var _local2 = "";
if (((includeDate) || (includeTime))){
_local5 = new Date();
if (includeDate){
_local2 = (((((Number((_local5.getMonth() + 1)).toString() + "/") + _local5.getDate().toString()) + "/") + _local5.getFullYear()) + fieldSeparator);
};
if (includeTime){
_local2 = (_local2 + (((((((padTime(_local5.getHours()) + ":") + padTime(_local5.getMinutes())) + ":") + padTime(_local5.getSeconds())) + ".") + padTime(_local5.getMilliseconds(), true)) + fieldSeparator));
};
};
var _local3 = "";
if (includeLevel){
_local3 = ((("[" + LogEvent.getLevelString(_arg1.level)) + "]") + fieldSeparator);
};
var _local4:String = (includeCategory) ? (ILogger(_arg1.target).category + fieldSeparator) : "";
internalLog((((_local2 + _local3) + _local4) + _arg1.message));
}
mx_internal function internalLog(_arg1:String):void{
}
}
}//package mx.logging.targets
Section 132
//AbstractTarget (mx.logging.AbstractTarget)
package mx.logging {
import mx.resources.*;
import mx.core.*;
import mx.utils.*;
import mx.logging.errors.*;
public class AbstractTarget implements ILoggingTarget, IMXMLObject {
private var _level:int;// = 0
private var _loggerCount:uint;// = 0
private var _id:String;
private var _filters:Array;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function AbstractTarget(){
resourceManager = ResourceManager.getInstance();
_filters = ["*"];
super();
_id = UIDUtil.createUID();
}
public function get level():int{
return (_level);
}
public function set level(_arg1:int):void{
Log.removeTarget(this);
_level = _arg1;
Log.addTarget(this);
}
public function logEvent(_arg1:LogEvent):void{
}
public function addLogger(_arg1:ILogger):void{
if (_arg1){
_loggerCount++;
_arg1.addEventListener(LogEvent.LOG, logHandler);
};
}
public function initialized(_arg1:Object, _arg2:String):void{
_id = _arg2;
Log.addTarget(this);
}
public function get id():String{
return (_id);
}
private function logHandler(_arg1:LogEvent):void{
if (_arg1.level >= level){
logEvent(_arg1);
};
}
public function removeLogger(_arg1:ILogger):void{
if (_arg1){
_loggerCount--;
_arg1.removeEventListener(LogEvent.LOG, logHandler);
};
}
public function set filters(_arg1:Array):void{
var _local2:String;
var _local3:int;
var _local4:String;
var _local5:uint;
if (((_arg1) && ((_arg1.length > 0)))){
_local5 = 0;
while (_local5 < _arg1.length) {
_local2 = _arg1[_local5];
if (Log.hasIllegalCharacters(_local2)){
_local4 = resourceManager.getString("logging", "charsInvalid", [_local2]);
throw (new InvalidFilterError(_local4));
};
_local3 = _local2.indexOf("*");
if ((((_local3 >= 0)) && (!((_local3 == (_local2.length - 1)))))){
_local4 = resourceManager.getString("logging", "charPlacement", [_local2]);
throw (new InvalidFilterError(_local4));
};
_local5++;
};
} else {
_arg1 = ["*"];
};
if (_loggerCount > 0){
Log.removeTarget(this);
_filters = _arg1;
Log.addTarget(this);
} else {
_filters = _arg1;
};
}
public function get filters():Array{
return (_filters);
}
}
}//package mx.logging
Section 133
//ILogger (mx.logging.ILogger)
package mx.logging {
import flash.events.*;
public interface ILogger extends IEventDispatcher {
function debug(_arg1:String, ... _args):void;
function fatal(_arg1:String, ... _args):void;
function get category():String;
function warn(_arg1:String, ... _args):void;
function error(_arg1:String, ... _args):void;
function log(_arg1:int, _arg2:String, ... _args):void;
function info(_arg1:String, ... _args):void;
}
}//package mx.logging
Section 134
//ILoggingTarget (mx.logging.ILoggingTarget)
package mx.logging {
public interface ILoggingTarget {
function addLogger(_arg1:ILogger):void;
function removeLogger(_arg1:ILogger):void;
function get level():int;
function set filters(_arg1:Array):void;
function set level(_arg1:int):void;
function get filters():Array;
}
}//package mx.logging
Section 135
//Log (mx.logging.Log)
package mx.logging {
import mx.resources.*;
import mx.core.*;
import mx.logging.errors.*;
public class Log {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var _resourceManager:IResourceManager;
private static var _targets:Array = [];
private static var _loggers:Array;
private static var NONE:int = 2147483647;
private static var _targetLevel:int = NONE;
private static function categoryMatchInFilterList(_arg1:String, _arg2:Array):Boolean{
var _local4:String;
var _local3:Boolean;
var _local5 = -1;
var _local6:uint;
while (_local6 < _arg2.length) {
_local4 = _arg2[_local6];
_local5 = _local4.indexOf("*");
if (_local5 == 0){
return (true);
};
_local5 = ((_local5 < 0)) ? _local5 = _arg1.length;
_local5 : (_local5 - 1);
if (_arg1.substring(0, _local5) == _local4.substring(0, _local5)){
return (true);
};
_local6++;
};
return (false);
}
public static function flush():void{
_loggers = [];
_targets = [];
_targetLevel = NONE;
}
public static function isDebug():Boolean{
return (((_targetLevel)<=LogEventLevel.DEBUG) ? true : false);
}
public static function getLogger(_arg1:String):ILogger{
var _local3:ILoggingTarget;
checkCategory(_arg1);
if (!_loggers){
_loggers = [];
};
var _local2:ILogger = _loggers[_arg1];
if (_local2 == null){
_local2 = new LogLogger(_arg1);
_loggers[_arg1] = _local2;
};
var _local4:int;
while (_local4 < _targets.length) {
_local3 = ILoggingTarget(_targets[_local4]);
if (categoryMatchInFilterList(_arg1, _local3.filters)){
_local3.addLogger(_local2);
};
_local4++;
};
return (_local2);
}
public static function isWarn():Boolean{
return (((_targetLevel)<=LogEventLevel.WARN) ? true : false);
}
public static function addTarget(_arg1:ILoggingTarget):void{
var _local2:Array;
var _local3:ILogger;
var _local4:String;
var _local5:String;
if (_arg1){
_local2 = _arg1.filters;
for (_local4 in _loggers) {
if (categoryMatchInFilterList(_local4, _local2)){
_arg1.addLogger(ILogger(_loggers[_local4]));
};
};
_targets.push(_arg1);
if (_targetLevel == NONE){
_targetLevel = _arg1.level;
} else {
if (_arg1.level < _targetLevel){
_targetLevel = _arg1.level;
};
};
} else {
_local5 = resourceManager.getString("logging", "invalidTarget");
throw (new ArgumentError(_local5));
};
}
public static function hasIllegalCharacters(_arg1:String):Boolean{
return (!((_arg1.search(/[\[\]\~\$\^\&\\(\)\{\}\+\?\/=`!@#%,:;'"<>\s]/) == -1)));
}
private static function checkCategory(_arg1:String):void{
var _local2:String;
if ((((_arg1 == null)) || ((_arg1.length == 0)))){
_local2 = resourceManager.getString("logging", "invalidLen");
throw (new InvalidCategoryError(_local2));
};
if (((hasIllegalCharacters(_arg1)) || (!((_arg1.indexOf("*") == -1))))){
_local2 = resourceManager.getString("logging", "invalidChars");
throw (new InvalidCategoryError(_local2));
};
}
private static function resetTargetLevel():void{
var _local1:int = NONE;
var _local2:int;
while (_local2 < _targets.length) {
if ((((_local1 == NONE)) || ((_targets[_local2].level < _local1)))){
_local1 = _targets[_local2].level;
};
_local2++;
};
_targetLevel = _local1;
}
public static function removeTarget(_arg1:ILoggingTarget):void{
var _local2:Array;
var _local3:ILogger;
var _local4:String;
var _local5:int;
var _local6:String;
if (_arg1){
_local2 = _arg1.filters;
for (_local4 in _loggers) {
if (categoryMatchInFilterList(_local4, _local2)){
_arg1.removeLogger(ILogger(_loggers[_local4]));
};
};
_local5 = 0;
while (_local5 < _targets.length) {
if (_arg1 == _targets[_local5]){
_targets.splice(_local5, 1);
_local5--;
};
_local5++;
};
resetTargetLevel();
} else {
_local6 = resourceManager.getString("logging", "invalidTarget");
throw (new ArgumentError(_local6));
};
}
public static function isInfo():Boolean{
return (((_targetLevel)<=LogEventLevel.INFO) ? true : false);
}
public static function isFatal():Boolean{
return (((_targetLevel)<=LogEventLevel.FATAL) ? true : false);
}
public static function isError():Boolean{
return (((_targetLevel)<=LogEventLevel.ERROR) ? true : false);
}
private static function get resourceManager():IResourceManager{
if (!_resourceManager){
_resourceManager = ResourceManager.getInstance();
};
return (_resourceManager);
}
}
}//package mx.logging
Section 136
//LogEvent (mx.logging.LogEvent)
package mx.logging {
import flash.events.*;
import mx.core.*;
public class LogEvent extends Event {
public var level:int;
public var message:String;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const LOG:String = "log";
public function LogEvent(_arg1:String="", _arg2:int=0){
super(LogEvent.LOG, false, false);
this.message = _arg1;
this.level = _arg2;
}
override public function clone():Event{
return (new LogEvent(message, level));
}
public static function getLevelString(_arg1:uint):String{
switch (_arg1){
case LogEventLevel.INFO:
return ("INFO");
case LogEventLevel.DEBUG:
return ("DEBUG");
case LogEventLevel.ERROR:
return ("ERROR");
case LogEventLevel.WARN:
return ("WARN");
case LogEventLevel.FATAL:
return ("FATAL");
case LogEventLevel.ALL:
return ("ALL");
};
return ("UNKNOWN");
}
}
}//package mx.logging
Section 137
//LogEventLevel (mx.logging.LogEventLevel)
package mx.logging {
import mx.core.*;
public final class LogEventLevel {
public static const ALL:int = 0;
public static const FATAL:int = 1000;
public static const WARN:int = 6;
public static const INFO:int = 4;
public static const ERROR:int = 8;
public static const DEBUG:int = 2;
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.logging
Section 138
//LogLogger (mx.logging.LogLogger)
package mx.logging {
import flash.events.*;
import mx.resources.*;
import mx.core.*;
public class LogLogger extends EventDispatcher implements ILogger {
private var _category:String;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function LogLogger(_arg1:String){
resourceManager = ResourceManager.getInstance();
super();
_category = _arg1;
}
public function log(_arg1:int, _arg2:String, ... _args):void{
var _local4:String;
var _local5:int;
if (_arg1 < LogEventLevel.DEBUG){
_local4 = resourceManager.getString("logging", "levelLimit");
throw (new ArgumentError(_local4));
};
if (hasEventListener(LogEvent.LOG)){
_local5 = 0;
while (_local5 < _args.length) {
_arg2 = _arg2.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _args[_local5]);
_local5++;
};
dispatchEvent(new LogEvent(_arg2, _arg1));
};
}
public function error(_arg1:String, ... _args):void{
var _local3:int;
if (hasEventListener(LogEvent.LOG)){
_local3 = 0;
while (_local3 < _args.length) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local3) + "\\}"), "g"), _args[_local3]);
_local3++;
};
dispatchEvent(new LogEvent(_arg1, LogEventLevel.ERROR));
};
}
public function warn(_arg1:String, ... _args):void{
var _local3:int;
if (hasEventListener(LogEvent.LOG)){
_local3 = 0;
while (_local3 < _args.length) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local3) + "\\}"), "g"), _args[_local3]);
_local3++;
};
dispatchEvent(new LogEvent(_arg1, LogEventLevel.WARN));
};
}
public function get category():String{
return (_category);
}
public function info(_arg1:String, ... _args):void{
var _local3:int;
if (hasEventListener(LogEvent.LOG)){
_local3 = 0;
while (_local3 < _args.length) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local3) + "\\}"), "g"), _args[_local3]);
_local3++;
};
dispatchEvent(new LogEvent(_arg1, LogEventLevel.INFO));
};
}
public function debug(_arg1:String, ... _args):void{
var _local3:int;
if (hasEventListener(LogEvent.LOG)){
_local3 = 0;
while (_local3 < _args.length) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local3) + "\\}"), "g"), _args[_local3]);
_local3++;
};
dispatchEvent(new LogEvent(_arg1, LogEventLevel.DEBUG));
};
}
public function fatal(_arg1:String, ... _args):void{
var _local3:int;
if (hasEventListener(LogEvent.LOG)){
_local3 = 0;
while (_local3 < _args.length) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local3) + "\\}"), "g"), _args[_local3]);
_local3++;
};
dispatchEvent(new LogEvent(_arg1, LogEventLevel.FATAL));
};
}
}
}//package mx.logging
Section 139
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.events.*;
import flash.display.*;
import mx.core.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function moveFocus(_arg1:String, _arg2:DisplayObject=null):void;
function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function removeSWFBridge(_arg1:IEventDispatcher):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 140
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package mx.managers
Section 141
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.events.*;
import flash.display.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(_arg1:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.managers
Section 142
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function validateNow():void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function isInvalid():Boolean;
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
}
}//package mx.managers
Section 143
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function set processedDescriptors(_arg1:Boolean):void;
}
}//package mx.managers
Section 144
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import mx.core.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function set focusPane(_arg1:Sprite):void;
function get toolTipChildren():IChildList;
function useSWFBridge():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function deployMouseShields(_arg1:Boolean):void;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void;
function getSandboxRoot():DisplayObject;
function get swfBridgeGroup():ISWFBridgeGroup;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function get document():Object;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function getTopLevelRoot():DisplayObject;
function removeChildBridge(_arg1:IEventDispatcher):void;
function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function deactivate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(_arg1:int):void;
function isTopLevel():Boolean;
function isTopLevelRoot():Boolean;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle;
}
}//package mx.managers
Section 145
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var changingListenersInOtherSystemManagers:Boolean;
public static var bootstrapLoaderInfoURL:String;
public static var showMouseCursor:Boolean;
}
}//package mx.managers
Section 146
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 147
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import flash.display.*;
import flash.net.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
import mx.events.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
var _local4:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local4 = new ModuleEvent(ModuleEvent.PROGRESS);
_local4.bytesLoaded = info.size;
_local4.bytesTotal = info.size;
dispatchEvent(_local4);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2, _arg3);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
loader.content.removeEventListener("error", moduleErrorHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
loader.content.addEventListener("error", moduleErrorHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
private function loadBytes(_arg1:ApplicationDomain, _arg2:ByteArray):void{
var _local3:LoaderContext = new LoaderContext();
_local3.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local3)){
_local3["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.loadBytes(_arg2, _local3);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_arg3){
loadBytes(_arg1, _arg3);
return;
};
if (_url.indexOf("published://") == 0){
return;
};
var _local4:URLRequest = new URLRequest(_url);
var _local5:LoaderContext = new LoaderContext();
_local5.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local5.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local5.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local4, _local5);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function moduleErrorHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
if ((_arg1 is ModuleEvent)){
_local2 = ModuleEvent(_arg1);
} else {
_local2 = new ModuleEvent(ModuleEvent.ERROR);
};
dispatchEvent(_local2);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 148
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 149
//IResourceBundle (mx.resources.IResourceBundle)
package mx.resources {
public interface IResourceBundle {
function get content():Object;
function get locale():String;
function get bundleName():String;
}
}//package mx.resources
Section 150
//IResourceManager (mx.resources.IResourceManager)
package mx.resources {
import flash.events.*;
import flash.system.*;
public interface IResourceManager extends IEventDispatcher {
function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean;
function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class;
function getLocales():Array;
function removeResourceBundlesForLocale(_arg1:String):void;
function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle;
function get localeChain():Array;
function getInt(_arg1:String, _arg2:String, _arg3:String=null):int;
function update():void;
function set localeChain(_arg1:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(_arg1:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(_arg1:String):Array;
function removeResourceBundle(_arg1:String, _arg2:String):void;
function getObject(_arg1:String, _arg2:String, _arg3:String=null);
function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String;
function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void;
function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void;
function getPreferredLocaleChain():Array;
function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function initializeLocaleChain(_arg1:Array):void;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 151
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 152
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
import mx.core.*;
public class LocaleSorter {
mx_internal static const VERSION:String = "3.2.0.3958";
private static function normalizeLocale(_arg1:String):String{
return (_arg1.toLowerCase().replace(/-/g, "_"));
}
public static function sortLocalesByPreference(_arg1:Array, _arg2:Array, _arg3:String=null, _arg4:Boolean=false):Array{
var result:Array;
var hasLocale:Object;
var i:int;
var j:int;
var k:int;
var l:int;
var locale:String;
var plocale:LocaleID;
var appLocales = _arg1;
var systemPreferences = _arg2;
var ultimateFallbackLocale = _arg3;
var addAll = _arg4;
var promote:Function = function (_arg1:String):void{
if (typeof(hasLocale[_arg1]) != "undefined"){
result.push(appLocales[hasLocale[_arg1]]);
delete hasLocale[_arg1];
};
};
result = [];
hasLocale = {};
var locales:Array = trimAndNormalize(appLocales);
var preferenceLocales:Array = trimAndNormalize(systemPreferences);
addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale);
j = 0;
while (j < locales.length) {
hasLocale[locales[j]] = j;
j = (j + 1);
};
i = 0;
l = preferenceLocales.length;
while (i < l) {
plocale = LocaleID.fromString(preferenceLocales[i]);
promote(preferenceLocales[i]);
promote(plocale.toString());
while (plocale.transformToParent()) {
promote(plocale.toString());
};
plocale = LocaleID.fromString(preferenceLocales[i]);
j = 0;
while (j < l) {
locale = preferenceLocales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
j = 0;
k = locales.length;
while (j < k) {
locale = locales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
i = (i + 1);
};
if (addAll){
j = 0;
k = locales.length;
while (j < k) {
promote(locales[j]);
j = (j + 1);
};
};
return (result);
}
private static function addUltimateFallbackLocale(_arg1:Array, _arg2:String):void{
var _local3:String;
if (((!((_arg2 == null))) && (!((_arg2 == ""))))){
_local3 = normalizeLocale(_arg2);
if (_arg1.indexOf(_local3) == -1){
_arg1.push(_local3);
};
};
}
private static function trimAndNormalize(_arg1:Array):Array{
var _local2:Array = [];
var _local3:int;
while (_local3 < _arg1.length) {
_local2.push(normalizeLocale(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package mx.resources
class LocaleID {
private var privateLangs:Boolean;// = false
private var script:String;// = ""
private var variants:Array;
private var privates:Array;
private var extensions:Object;
private var lang:String;// = ""
private var region:String;// = ""
private var extended_langs:Array;
public static const STATE_PRIMARY_LANGUAGE:int = 0;
public static const STATE_REGION:int = 3;
public static const STATE_EXTENDED_LANGUAGES:int = 1;
public static const STATE_EXTENSIONS:int = 5;
public static const STATE_SCRIPT:int = 2;
public static const STATE_VARIANTS:int = 4;
public static const STATE_PRIVATES:int = 6;
private function LocaleID(){
extended_langs = [];
variants = [];
extensions = {};
privates = [];
super();
}
public function equals(_arg1:LocaleID):Boolean{
return ((toString() == _arg1.toString()));
}
public function canonicalize():void{
var _local1:String;
for (_local1 in extensions) {
if (extensions.hasOwnProperty(_local1)){
if (extensions[_local1].length == 0){
delete extensions[_local1];
} else {
extensions[_local1] = extensions[_local1].sort();
};
};
};
extended_langs = extended_langs.sort();
variants = variants.sort();
privates = privates.sort();
if (script == ""){
script = LocaleRegistry.getScriptByLang(lang);
};
if ((((script == "")) && (!((region == ""))))){
script = LocaleRegistry.getScriptByLangAndRegion(lang, region);
};
if ((((region == "")) && (!((script == ""))))){
region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
};
}
public function toString():String{
var _local2:String;
var _local1:Array = [lang];
Array.prototype.push.apply(_local1, extended_langs);
if (script != ""){
_local1.push(script);
};
if (region != ""){
_local1.push(region);
};
Array.prototype.push.apply(_local1, variants);
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1.push(_local2);
Array.prototype.push.apply(_local1, extensions[_local2]);
};
};
if (privates.length > 0){
_local1.push("x");
Array.prototype.push.apply(_local1, privates);
};
return (_local1.join("_"));
}
public function isSiblingOf(_arg1:LocaleID):Boolean{
return ((((lang == _arg1.lang)) && ((script == _arg1.script))));
}
public function transformToParent():Boolean{
var _local2:String;
var _local3:Array;
var _local4:String;
if (privates.length > 0){
privates.splice((privates.length - 1), 1);
return (true);
};
var _local1:String;
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1 = _local2;
};
};
if (_local1){
_local3 = extensions[_local1];
if (_local3.length == 1){
delete extensions[_local1];
return (true);
};
_local3.splice((_local3.length - 1), 1);
return (true);
};
if (variants.length > 0){
variants.splice((variants.length - 1), 1);
return (true);
};
if (script != ""){
if (LocaleRegistry.getScriptByLang(lang) != ""){
script = "";
return (true);
};
if (region == ""){
_local4 = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
if (_local4 != ""){
region = _local4;
script = "";
return (true);
};
};
};
if (region != ""){
if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){
region = "";
return (true);
};
};
if (extended_langs.length > 0){
extended_langs.splice((extended_langs.length - 1), 1);
return (true);
};
return (false);
}
public static function fromString(_arg1:String):LocaleID{
var _local5:Array;
var _local8:String;
var _local9:int;
var _local10:String;
var _local2:LocaleID = new (LocaleID);
var _local3:int = STATE_PRIMARY_LANGUAGE;
var _local4:Array = _arg1.replace(/-/g, "_").split("_");
var _local6:int;
var _local7:int = _local4.length;
while (_local6 < _local7) {
_local8 = _local4[_local6].toLowerCase();
if (_local3 == STATE_PRIMARY_LANGUAGE){
if (_local8 == "x"){
_local2.privateLangs = true;
} else {
if (_local8 == "i"){
_local2.lang = (_local2.lang + "i-");
} else {
_local2.lang = (_local2.lang + _local8);
_local3 = STATE_EXTENDED_LANGUAGES;
};
};
} else {
_local9 = _local8.length;
if (_local9 == 0){
} else {
_local10 = _local8.charAt(0).toLowerCase();
if ((((_local3 <= STATE_EXTENDED_LANGUAGES)) && ((_local9 == 3)))){
_local2.extended_langs.push(_local8);
if (_local2.extended_langs.length == 3){
_local3 = STATE_SCRIPT;
};
} else {
if ((((_local3 <= STATE_SCRIPT)) && ((_local9 == 4)))){
_local2.script = _local8;
_local3 = STATE_REGION;
} else {
if ((((_local3 <= STATE_REGION)) && ((((_local9 == 2)) || ((_local9 == 3)))))){
_local2.region = _local8;
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 <= STATE_VARIANTS)) && ((((((((_local10 >= "a")) && ((_local10 <= "z")))) && ((_local9 >= 5)))) || ((((((_local10 >= "0")) && ((_local10 <= "9")))) && ((_local9 >= 4)))))))){
_local2.variants.push(_local8);
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 < STATE_PRIVATES)) && ((_local9 == 1)))){
if (_local8 == "x"){
_local3 = STATE_PRIVATES;
_local5 = _local2.privates;
} else {
_local3 = STATE_EXTENSIONS;
_local5 = ((_local2.extensions[_local8]) || ([]));
_local2.extensions[_local8] = _local5;
};
} else {
if (_local3 >= STATE_EXTENSIONS){
_local5.push(_local8);
};
};
};
};
};
};
};
};
_local6++;
};
_local2.canonicalize();
return (_local2);
}
}
class LocaleRegistry {
private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28};
private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"];
private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}};
private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32};
private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}};
private function LocaleRegistry(){
}
public static function getScriptByLangAndRegion(_arg1:String, _arg2:String):String{
var _local3:Object = SCRIPT_ID_BY_LANG_AND_REGION[_arg1];
if (_local3 == null){
return ("");
};
var _local4:Object = _local3[_arg2];
if (_local4 == null){
return ("");
};
return (SCRIPTS[int(_local4)].toLowerCase());
}
public static function getScriptByLang(_arg1:String):String{
var _local2:Object = SCRIPT_ID_BY_LANG[_arg1];
if (_local2 == null){
return ("");
};
return (SCRIPTS[int(_local2)].toLowerCase());
}
public static function getDefaultRegionForLangAndScript(_arg1:String, _arg2:String):String{
var _local3:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[_arg1];
var _local4:Object = SCRIPT_BY_ID[_arg2];
if ((((_local3 == null)) || ((_local4 == null)))){
return ("");
};
return (((_local3[int(_local4)]) || ("")));
}
}
Section 153
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle implements IResourceBundle {
mx_internal var _locale:String;
private var _content:Object;
mx_internal var _bundleName:String;
mx_internal static const VERSION:String = "3.2.0.3958";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(_arg1:String=null, _arg2:String=null){
_content = {};
super();
mx_internal::_locale = _arg1;
mx_internal::_bundleName = _arg2;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(_arg1:String):String{
return (String(_getObject(_arg1)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String = _getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array = _getObject(_arg1).split(",");
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getObject(_arg1:String):Object{
return (_getObject(_arg1));
}
private function _getObject(_arg1:String):Object{
var _local2:Object = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(_arg1:String):Number{
return (Number(_getObject(_arg1)));
}
private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{
var _local3:Class;
if (_arg2.hasDefinition(_arg1)){
_local3 = (_arg2.getDefinition(_arg1) as Class);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:String;
var _local4:Class;
var _local5:Object;
var _local6:ResourceBundle;
if (!_arg2){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = (((mx_internal::locale + "$") + _arg1) + "_properties");
_local4 = getClassByName(_local3, _arg2);
if (!_local4){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, _arg2);
};
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, _arg2);
};
if (((!(_local4)) && (mx_internal::backupApplicationDomain))){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
};
};
if (_local4){
_local5 = new (_local4);
if ((_local5 is ResourceBundle)){
_local6 = ResourceBundle(_local5);
return (_local6);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 154
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
try {
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
} catch(e:Error) {
instance = new ResourceManagerImpl();
};
};
return (instance);
}
}
}//package mx.resources
Section 155
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
import mx.modules.*;
import mx.events.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function getPreferredLocaleChain():Array{
return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function initializeLocaleChain(_arg1:Array):void{
localeChain = LocaleSorter.sortLocalesByPreference(_arg1, getSystemPreferredLocales(), null, true);
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
private function getSystemPreferredLocales():Array{
var _local1:Array;
if (Capabilities["languages"]){
_local1 = Capabilities["languages"];
} else {
_local1 = [Capabilities.language];
};
return (_local1);
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
throw (new Error("unloadResourceModule() is not yet implemented."));
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 156
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
import mx.graphics.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = (bRoundedCorners) ? radius : 0;
radiusObj = {tl:radius, tr:radius, bl:_local9, br:_local9};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local10 = getStyle("highlightAlphas");
_local11 = (_local10) ? _local10[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local11, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 157
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.styles.*;
import mx.utils.*;
import mx.skins.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(_arg1:Object):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function registerEffects(_arg1:Array):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function getClassStyleDeclarations():Array{
return ([]);
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("focusBlendMode");
var _local4:Number = getStyle("focusAlpha");
var _local5:Number = getStyle("focusColor");
var _local6:Number = getStyle("cornerRadius");
var _local7:Number = getStyle("focusThickness");
var _local8:String = getStyle("focusRoundedCorners");
var _local9:Number = getStyle("themeColor");
var _local10:Number = _local5;
if (isNaN(_local10)){
_local10 = _local9;
};
var _local11:Graphics = graphics;
_local11.clear();
blendMode = _local3;
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 158
//ListDropIndicator (mx.skins.halo.ListDropIndicator)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.skins.*;
public class ListDropIndicator extends ProgrammaticSkin {
public var direction:String;// = "horizontal"
mx_internal static const VERSION:String = "3.2.0.3958";
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:Graphics = graphics;
_local3.clear();
_local3.lineStyle(2, 2831164);
if (direction == "horizontal"){
_local3.moveTo(0, 0);
_local3.lineTo(_arg1, 0);
} else {
_local3.moveTo(0, 0);
_local3.lineTo(0, _arg2);
};
}
}
}//package mx.skins.halo
Section 159
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.2.0.3958";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 160
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import mx.styles.*;
import mx.utils.*;
import mx.managers.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return ((_styleName) ? _styleName.getStyle(_arg1) : null);
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function get measuredHeight():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Object;
var _local12:Graphics = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
override public function get width():Number{
return (_width);
}
public function invalidateProperties():void{
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get styleName():Object{
return (_styleName);
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
public function invalidateSize():void{
}
public function validateProperties():void{
}
}
}//package mx.skins
Section 161
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import mx.resources.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
import mx.styles.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.2.0.3958";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 162
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import flash.display.*;
import mx.core.*;
import flash.utils.*;
import mx.managers.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.2.0.3958";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
super();
if (_arg1){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = _arg1;
var target = _arg2;
var filterMap = _arg3;
var nodeAddedToChain:Boolean;
var originalChain:Object = chain;
if (filterMap){
chain = {};
};
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (filterMap){
if (nodeAddedToChain){
filteredChain = {};
filterObjectFactory = function ():void{
};
filterObjectFactory.prototype = originalChain;
filteredChain = new (filterObjectFactory);
for (i in chain) {
if (filterMap[i] != null){
filteredChain[filterMap[i]] = chain[i];
};
};
chain = filteredChain;
chain[FILTERMAP_PROP] = filterMap;
} else {
chain = originalChain;
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local7:int;
var _local8:Object;
var _local3:Object = getStyle(_arg1);
var _local4:Boolean;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
var _local5:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local6:int = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
var _local6:Object;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
_local5 = styleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local6 = _local4[FILTERMAP_PROP];
if (_local6){
if (_local6[_arg1] != null){
_local4[_local6[_arg1]] = _arg2;
};
} else {
_local4[_arg1] = _arg2;
};
};
}
}
}//package mx.styles
Section 163
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(_arg1:Object):void;
function styleChanged(_arg1:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 164
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function get className():String;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(_arg1:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function getStyle(_arg1:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 165
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function registerInheritingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(_arg1):Boolean;
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function set typeSelectorCache(_arg1:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(_arg1:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 166
//IStyleManager2 (mx.styles.IStyleManager2)
package mx.styles {
import flash.events.*;
import flash.system.*;
public interface IStyleManager2 extends IStyleManager {
function get selectors():Array;
function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
}
}//package mx.styles
Section 167
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 168
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.2.0.3958";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function get selectors():Array{
return (impl.selectors);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 169
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.resources.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
import mx.modules.*;
import mx.events.*;
import mx.managers.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.2.0.3958";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 170
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
import mx.core.*;
public class ColorUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number = ((_arg1 >> 16) & 0xFF);
var _local4:Number = ((_arg1 >> 8) & 0xFF);
var _local5:Number = (_arg1 & 0xFF);
var _local6:Number = ((_arg2 >> 16) & 0xFF);
var _local7:Number = ((_arg2 >> 8) & 0xFF);
var _local8:Number = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 171
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number = (_arg2 + _arg4);
var _local11:Number = (_arg3 + _arg5);
var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
var _local13:Number = (_arg9 * 0.292893218813453);
var _local14:Number = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 172
//IXMLNotifiable (mx.utils.IXMLNotifiable)
package mx.utils {
public interface IXMLNotifiable {
function xmlNotification(_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void;
}
}//package mx.utils
Section 173
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 174
//StringUtil (mx.utils.StringUtil)
package mx.utils {
import mx.core.*;
public class StringUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
var _local3:int = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local4:Array;
if (_arg1 == null){
return ("");
};
var _local3:uint = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
var _local5:int;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 175
//UIDUtil (mx.utils.UIDUtil)
package mx.utils {
import mx.core.*;
import flash.utils.*;
public class UIDUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
private static const ALPHA_CHAR_CODES:Array = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70];
private static var uidDictionary:Dictionary = new Dictionary(true);
public static function fromByteArray(_arg1:ByteArray):String{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:int;
if (((((!((_arg1 == null))) && ((_arg1.length >= 16)))) && ((_arg1.bytesAvailable >= 16)))){
_local2 = new Array(36);
_local3 = 0;
_local4 = 0;
while (_local4 < 16) {
if ((((((((_local4 == 4)) || ((_local4 == 6)))) || ((_local4 == 8)))) || ((_local4 == 10)))){
var _temp1 = _local3;
_local3 = (_local3 + 1);
var _local6 = _temp1;
_local2[_local6] = 45;
};
_local5 = _arg1.readByte();
var _temp2 = _local3;
_local3 = (_local3 + 1);
_local6 = _temp2;
_local2[_local6] = ALPHA_CHAR_CODES[((_local5 & 240) >>> 4)];
var _temp3 = _local3;
_local3 = (_local3 + 1);
var _local7 = _temp3;
_local2[_local7] = ALPHA_CHAR_CODES[(_local5 & 15)];
_local4++;
};
return (String.fromCharCode.apply(null, _local2));
};
return (null);
}
public static function isUID(_arg1:String):Boolean{
var _local2:uint;
var _local3:Number;
if (((!((_arg1 == null))) && ((_arg1.length == 36)))){
_local2 = 0;
while (_local2 < 36) {
_local3 = _arg1.charCodeAt(_local2);
if ((((((((_local2 == 8)) || ((_local2 == 13)))) || ((_local2 == 18)))) || ((_local2 == 23)))){
if (_local3 != 45){
return (false);
};
} else {
if ((((((_local3 < 48)) || ((_local3 > 70)))) || ((((_local3 > 57)) && ((_local3 < 65)))))){
return (false);
};
};
_local2++;
};
return (true);
};
return (false);
}
public static function createUID():String{
var _local3:int;
var _local4:int;
var _local1:Array = new Array(36);
var _local2:int;
_local3 = 0;
while (_local3 < 8) {
var _temp1 = _local2;
_local2 = (_local2 + 1);
var _local7 = _temp1;
_local1[_local7] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))];
_local3++;
};
_local3 = 0;
while (_local3 < 3) {
var _temp2 = _local2;
_local2 = (_local2 + 1);
_local7 = _temp2;
_local1[_local7] = 45;
_local4 = 0;
while (_local4 < 4) {
var _temp3 = _local2;
_local2 = (_local2 + 1);
var _local8 = _temp3;
_local1[_local8] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))];
_local4++;
};
_local3++;
};
var _temp4 = _local2;
_local2 = (_local2 + 1);
_local7 = _temp4;
_local1[_local7] = 45;
var _local5:Number = new Date().getTime();
var _local6:String = ("0000000" + _local5.toString(16).toUpperCase()).substr(-8);
_local3 = 0;
while (_local3 < 8) {
var _temp5 = _local2;
_local2 = (_local2 + 1);
_local8 = _temp5;
_local1[_local8] = _local6.charCodeAt(_local3);
_local3++;
};
_local3 = 0;
while (_local3 < 4) {
var _temp6 = _local2;
_local2 = (_local2 + 1);
_local8 = _temp6;
_local1[_local8] = ALPHA_CHAR_CODES[Math.floor((Math.random() * 16))];
_local3++;
};
return (String.fromCharCode.apply(null, _local1));
}
public static function toByteArray(_arg1:String):ByteArray{
var _local2:ByteArray;
var _local3:uint;
var _local4:String;
var _local5:uint;
var _local6:uint;
if (isUID(_arg1)){
_local2 = new ByteArray();
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1.charAt(_local3);
if (_local4 == "-"){
} else {
_local5 = getDigit(_local4);
_local3++;
_local6 = getDigit(_arg1.charAt(_local3));
_local2.writeByte((((_local5 << 4) | _local6) & 0xFF));
};
_local3++;
};
_local2.position = 0;
return (_local2);
};
return (null);
}
private static function getDigit(_arg1:String):uint{
switch (_arg1){
case "A":
case "a":
return (10);
case "B":
case "b":
return (11);
case "C":
case "c":
return (12);
case "D":
case "d":
return (13);
case "E":
case "e":
return (14);
case "F":
case "f":
return (15);
default:
return (new uint(_arg1));
};
}
public static function getUID(_arg1:Object):String{
var result:String;
var xitem:XML;
var nodeKind:String;
var notificationFunction:Function;
var item = _arg1;
result = null;
if (item == null){
return (result);
};
if ((item is IUID)){
result = IUID(item).uid;
if ((((result == null)) || ((result.length == 0)))){
result = createUID();
IUID(item).uid = result;
};
} else {
if ((((item is IPropertyChangeNotifier)) && (!((item is IUIComponent))))){
result = IPropertyChangeNotifier(item).uid;
if ((((result == null)) || ((result.length == 0)))){
result = createUID();
IPropertyChangeNotifier(item).uid = result;
};
} else {
if ((item is String)){
return ((item as String));
};
try {
if ((((item is XMLList)) && ((item.length == 1)))){
item = item[0];
};
if ((item is XML)){
xitem = XML(item);
nodeKind = xitem.nodeKind();
if ((((nodeKind == "text")) || ((nodeKind == "attribute")))){
return (xitem.toString());
};
notificationFunction = xitem.notification();
if (!(notificationFunction is Function)){
notificationFunction = XMLNotifier.initializeXMLForNotification();
xitem.setNotification(notificationFunction);
};
if (notificationFunction["uid"] == undefined){
result = (notificationFunction["uid"] = createUID());
};
result = notificationFunction["uid"];
} else {
if (("mx_internal_uid" in item)){
return (item.mx_internal_uid);
};
if (("uid" in item)){
return (item.uid);
};
result = uidDictionary[item];
if (!result){
result = createUID();
try {
item.mx_internal_uid = result;
} catch(e:Error) {
uidDictionary[item] = result;
};
};
};
} catch(e:Error) {
result = item.toString();
};
};
};
return (result);
}
}
}//package mx.utils
Section 176
//XMLNotifier (mx.utils.XMLNotifier)
package mx.utils {
import mx.core.*;
import flash.utils.*;
public class XMLNotifier {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var instance:XMLNotifier;
public function XMLNotifier(_arg1:XMLNotifierSingleton){
}
public function watchXML(_arg1:Object, _arg2:IXMLNotifiable, _arg3:String=null):void{
var _local6:Dictionary;
var _local4:XML = XML(_arg1);
var _local5:Object = _local4.notification();
if (!(_local5 is Function)){
_local5 = initializeXMLForNotification();
_local4.setNotification((_local5 as Function));
if (((_arg3) && ((_local5["uid"] == null)))){
_local5["uid"] = _arg3;
};
};
if (_local5["watched"] == undefined){
_local6 = new Dictionary(true);
_local5["watched"] = _local6;
} else {
_local6 = _local5["watched"];
};
_local6[_arg2] = true;
}
public function unwatchXML(_arg1:Object, _arg2:IXMLNotifiable):void{
var _local5:Dictionary;
var _local3:XML = XML(_arg1);
var _local4:Object = _local3.notification();
if (!(_local4 is Function)){
return;
};
if (_local4["watched"] != undefined){
_local5 = _local4["watched"];
delete _local5[_arg2];
};
}
public static function getInstance():XMLNotifier{
if (!instance){
instance = new XMLNotifier(new XMLNotifierSingleton());
};
return (instance);
}
mx_internal static function initializeXMLForNotification():Function{
var notificationFunction:Function = function (_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void{
var _local8:Object;
var _local7:Dictionary = arguments.callee.watched;
if (_local7 != null){
for (_local8 in _local7) {
IXMLNotifiable(_local8).xmlNotification(_arg1, _arg2, _arg3, _arg4, _arg5);
};
};
};
return (notificationFunction);
}
}
}//package mx.utils
class XMLNotifierSingleton {
private function XMLNotifierSingleton(){
}
}
Section 177
//Action (org.flintparticles.common.actions.Action)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.behaviours.*;
public interface Action extends Behaviour {
function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void;
}
}//package org.flintparticles.common.actions
Section 178
//ActionBase (org.flintparticles.common.actions.ActionBase)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class ActionBase implements Action {
protected var _priority:int;// = 0
public function set priority(_arg1:int):void{
_priority = _arg1;
}
public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
}
public function removedFromEmitter(_arg1:Emitter):void{
}
public function addedToEmitter(_arg1:Emitter):void{
}
public function get priority():int{
return (_priority);
}
}
}//package org.flintparticles.common.actions
Section 179
//Age (org.flintparticles.common.actions.Age)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.energyEasing.*;
public class Age extends ActionBase {
private var _easing:Function;
public function Age(_arg1:Function=null){
if (_arg1 == null){
_easing = Linear.easeNone;
} else {
_easing = _arg1;
};
}
public function set easing(_arg1:Function):void{
_easing = _arg1;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
_arg2.age = (_arg2.age + _arg3);
if (_arg2.age >= _arg2.lifetime){
_arg2.energy = 0;
_arg2.isDead = true;
} else {
_arg2.energy = _easing(_arg2.age, _arg2.lifetime);
};
}
public function get easing():Function{
return (_easing);
}
}
}//package org.flintparticles.common.actions
Section 180
//Fade (org.flintparticles.common.actions.Fade)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class Fade extends ActionBase {
private var _endAlpha:Number;
private var _diffAlpha:Number;
public function Fade(_arg1:Number=1, _arg2:Number=0){
priority = -5;
_diffAlpha = (_arg1 - _arg2);
_endAlpha = _arg2;
}
public function get endAlpha():Number{
return (_endAlpha);
}
public function set endAlpha(_arg1:Number):void{
_diffAlpha = ((_endAlpha + _diffAlpha) - _arg1);
_endAlpha = _arg1;
}
public function set startAlpha(_arg1:Number):void{
_diffAlpha = (_arg1 - _endAlpha);
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Number = (_endAlpha + (_diffAlpha * _arg2.energy));
_arg2.color = ((_arg2.color & 0xFFFFFF) | (Math.round((_local4 * 0xFF)) << 24));
}
public function get startAlpha():Number{
return ((_endAlpha + _diffAlpha));
}
}
}//package org.flintparticles.common.actions
Section 181
//Activity (org.flintparticles.common.activities.Activity)
package org.flintparticles.common.activities {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.behaviours.*;
public interface Activity extends Behaviour {
function initialize(_arg1:Emitter):void;
function update(_arg1:Emitter, _arg2:Number):void;
}
}//package org.flintparticles.common.activities
Section 182
//Behaviour (org.flintparticles.common.behaviours.Behaviour)
package org.flintparticles.common.behaviours {
import org.flintparticles.common.emitters.*;
public interface Behaviour {
function set priority(_arg1:int):void;
function addedToEmitter(_arg1:Emitter):void;
function get priority():int;
function removedFromEmitter(_arg1:Emitter):void;
}
}//package org.flintparticles.common.behaviours
Section 183
//BehaviourArrayUtils (org.flintparticles.common.behaviours.BehaviourArrayUtils)
package org.flintparticles.common.behaviours {
public class BehaviourArrayUtils {
public static function add(_arg1:Array, _arg2:Behaviour):uint{
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
if (Behaviour(_arg1[_local4]).priority < _arg2.priority){
break;
};
_local4++;
};
_arg1.splice(_local4, 0, _arg2);
return ((_local3 + 1));
}
public static function remove(_arg1:Array, _arg2:Behaviour):Boolean{
var _local3:int = _arg1.indexOf(_arg2);
if (_local3 != -1){
_arg1.splice(_local3, 1);
return (true);
};
return (false);
}
public static function removeAt(_arg1:Array, _arg2:uint):Behaviour{
var _local3:Behaviour = (_arg1[_arg2] as Behaviour);
_arg1.splice(_arg2, 1);
return (_local3);
}
public static function containsType(_arg1:Array, _arg2:Class):Boolean{
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
if ((_arg1[_local4] is _arg2)){
return (true);
};
_local4++;
};
return (false);
}
public static function sortArray(_arg1:Array):void{
_arg1.sortOn("priority", Array.NUMERIC);
}
public static function clear(_arg1:Array):void{
_arg1.length = 0;
}
public static function contains(_arg1:Array, _arg2:Behaviour):Boolean{
return (!((_arg1.indexOf(_arg2) == -1)));
}
}
}//package org.flintparticles.common.behaviours
Section 184
//Blast (org.flintparticles.common.counters.Blast)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public class Blast implements Counter {
private var _done:Boolean;// = false
private var _startCount:uint;
public function Blast(_arg1:uint=0){
_startCount = _arg1;
}
public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{
return (0);
}
public function startEmitter(_arg1:Emitter):uint{
_arg1.dispatchCounterComplete();
return (_startCount);
}
public function resume():void{
}
public function stop():void{
}
public function get startCount():Number{
return (_startCount);
}
public function get complete():Boolean{
return (_done);
}
public function set startCount(_arg1:Number):void{
_startCount = _arg1;
}
}
}//package org.flintparticles.common.counters
Section 185
//Counter (org.flintparticles.common.counters.Counter)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public interface Counter {
function stop():void;
function updateEmitter(_arg1:Emitter, _arg2:Number):uint;
function get complete():Boolean;
function startEmitter(_arg1:Emitter):uint;
function resume():void;
}
}//package org.flintparticles.common.counters
Section 186
//ZeroCounter (org.flintparticles.common.counters.ZeroCounter)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public class ZeroCounter implements Counter {
public function get complete():Boolean{
return (true);
}
public function stop():void{
}
public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{
return (0);
}
public function startEmitter(_arg1:Emitter):uint{
return (0);
}
public function resume():void{
}
}
}//package org.flintparticles.common.counters
Section 187
//Emitter (org.flintparticles.common.emitters.Emitter)
package org.flintparticles.common.emitters {
import flash.events.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.activities.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.events.*;
import org.flintparticles.common.behaviours.*;
import org.flintparticles.common.utils.*;
public class Emitter extends EventDispatcher {
protected var _running:Boolean;// = false
protected var _activities:Array;
protected var _particles:Array;
protected var _initializers:Array;
protected var _dispatchCounterComplete:Boolean;// = false
protected var _counter:Counter;
protected var _started:Boolean;// = false
protected var _actions:Array;
protected var _useInternalTick:Boolean;// = true
protected var _particleFactory:ParticleFactory;
protected var _fixedFrameTime:Number;// = 0
protected var _maximumFrameTime:Number;// = 0.1
public function Emitter(){
_particles = new Array();
_actions = new Array();
_initializers = new Array();
_activities = new Array();
_counter = new ZeroCounter();
}
public function addInitializer(_arg1:Initializer):void{
BehaviourArrayUtils.add(_initializers, _arg1);
_arg1.addedToEmitter(this);
}
public function stop():void{
if (_useInternalTick){
FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, updateEventListener);
};
_started = false;
killAllParticles();
}
public function pause():void{
_running = false;
}
public function killAllParticles():void{
var _local1:int = _particles.length;
var _local2:int;
while (_local2 < _local1) {
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _particles[_local2]));
_particleFactory.disposeParticle(_particles[_local2]);
_local2++;
};
_particles.length = 0;
}
public function runAhead(_arg1:Number, _arg2:Number=10):void{
var _local3:Number = _maximumFrameTime;
var _local4:Number = (1 / _arg2);
_maximumFrameTime = _local4;
while (_arg1 > 0) {
_arg1 = (_arg1 - _local4);
update(_local4);
};
_maximumFrameTime = _local3;
}
public function set fixedFrameTime(_arg1:Number):void{
_fixedFrameTime = _arg1;
}
public function get maximumFrameTime():Number{
return (_maximumFrameTime);
}
public function set particles(_arg1:Array):void{
killAllParticles();
addExistingParticles(_arg1, false);
}
public function get useInternalTick():Boolean{
return (_useInternalTick);
}
public function set initializers(_arg1:Array):void{
var _local2:Initializer;
for each (_local2 in _initializers) {
_local2.removedFromEmitter(this);
};
_initializers = _arg1.slice();
BehaviourArrayUtils.sortArray(_initializers);
for each (_local2 in _arg1) {
_local2.addedToEmitter(this);
};
}
public function get particleFactory():ParticleFactory{
return (_particleFactory);
}
private function updateEventListener(_arg1:UpdateEvent):void{
if (_fixedFrameTime){
update(_fixedFrameTime);
} else {
update(_arg1.time);
};
}
protected function createParticle():Particle{
var _local1:Particle = _particleFactory.createParticle();
var _local2:int = _initializers.length;
initParticle(_local1);
var _local3:int;
while (_local3 < _local2) {
Initializer(_initializers[_local3]).initialize(this, _local1);
_local3++;
};
_particles.push(_local1);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_CREATED, _local1));
return (_local1);
}
public function get particles():Array{
return (_particles);
}
protected function sortParticles():void{
}
public function removeActivity(_arg1:Activity):void{
if (BehaviourArrayUtils.remove(_activities, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function set maximumFrameTime(_arg1:Number):void{
_maximumFrameTime = _arg1;
}
protected function initParticle(_arg1:Particle):void{
}
public function addAction(_arg1:Action):void{
BehaviourArrayUtils.add(_actions, _arg1);
_arg1.addedToEmitter(this);
}
public function hasInitializerOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_initializers, _arg1));
}
public function removeInitializer(_arg1:Initializer):void{
if (BehaviourArrayUtils.remove(_initializers, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function get running():Boolean{
return (_running);
}
public function hasActionOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_actions, _arg1));
}
public function get fixedFrameTime():Number{
return (_fixedFrameTime);
}
public function set particleFactory(_arg1:ParticleFactory):void{
_particleFactory = _arg1;
}
public function set useInternalTick(_arg1:Boolean):void{
if (_useInternalTick != _arg1){
_useInternalTick = _arg1;
if (_started){
if (_useInternalTick){
FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, updateEventListener, false, 0, true);
} else {
FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, updateEventListener);
};
};
};
}
public function resume():void{
_running = true;
}
public function addActivity(_arg1:Activity):void{
BehaviourArrayUtils.add(_activities, _arg1);
_arg1.addedToEmitter(this);
}
public function get initializers():Array{
return (_initializers);
}
public function addExistingParticles(_arg1:Array, _arg2:Boolean=false):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local3:int = _arg1.length;
if (_arg2){
_local5 = _initializers.length;
_local6 = 0;
while (_local6 < _local5) {
_local4 = 0;
while (_local4 < _local3) {
Initializer(_initializers[_local6]).initialize(this, _arg1[_local4]);
_local4++;
};
_local6++;
};
};
_local4 = 0;
while (_local4 < _local3) {
_particles.push(_arg1[_local4]);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_ADDED, _arg1[_local4]));
_local4++;
};
}
public function hasActivityOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_activities, _arg1));
}
public function set activities(_arg1:Array):void{
var _local2:Activity;
for each (_local2 in _activities) {
_local2.removedFromEmitter(this);
};
_activities = _arg1.slice();
BehaviourArrayUtils.sortArray(_activities);
for each (_local2 in _activities) {
_local2.addedToEmitter(this);
};
}
public function hasInitializer(_arg1:Initializer):Boolean{
return (BehaviourArrayUtils.contains(_initializers, _arg1));
}
public function removeAction(_arg1:Action):void{
if (BehaviourArrayUtils.remove(_actions, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function hasActivity(_arg1:Activity):Boolean{
return (BehaviourArrayUtils.contains(_activities, _arg1));
}
public function get activities():Array{
return (_activities);
}
public function hasAction(_arg1:Action):Boolean{
return (BehaviourArrayUtils.contains(_actions, _arg1));
}
public function start():void{
if (_useInternalTick){
FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, updateEventListener, false, 0, true);
};
_started = true;
_running = true;
var _local1:int = _activities.length;
var _local2:int;
while (_local2 < _local1) {
Activity(_activities[_local2]).initialize(this);
_local2++;
};
_local1 = _counter.startEmitter(this);
_local2 = 0;
while (_local2 < _local1) {
createParticle();
_local2++;
};
}
public function update(_arg1:Number):void{
var _local2:int;
var _local3:Particle;
var _local5:Action;
var _local6:int;
var _local7:int;
if (!_running){
return;
};
if (_arg1 > _maximumFrameTime){
_arg1 = _maximumFrameTime;
};
var _local4:int = _counter.updateEmitter(this, _arg1);
_local2 = 0;
while (_local2 < _local4) {
createParticle();
_local2++;
};
sortParticles();
_local4 = _activities.length;
_local2 = 0;
while (_local2 < _local4) {
Activity(_activities[_local2]).update(this, _arg1);
_local2++;
};
if (_particles.length > 0){
_local4 = _actions.length;
_local6 = _particles.length;
_local7 = 0;
while (_local7 < _local4) {
_local5 = _actions[_local7];
_local2 = 0;
while (_local2 < _local6) {
_local3 = _particles[_local2];
_local5.update(this, _local3, _arg1);
_local2++;
};
_local7++;
};
_local2 = _local6;
while (_local2--) {
_local3 = _particles[_local2];
if (_local3.isDead){
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _local3));
_particleFactory.disposeParticle(_local3);
_particles.splice(_local2, 1);
};
};
} else {
dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_EMPTY));
};
dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_UPDATED));
if (_dispatchCounterComplete){
_dispatchCounterComplete = false;
dispatchEvent(new EmitterEvent(EmitterEvent.COUNTER_COMPLETE));
};
}
public function set counter(_arg1:Counter):void{
_counter = _arg1;
if (running){
_counter.startEmitter(this);
};
}
public function set actions(_arg1:Array):void{
var _local2:Action;
for each (_local2 in _actions) {
_local2.removedFromEmitter(this);
};
_actions = _arg1.slice();
BehaviourArrayUtils.sortArray(_actions);
for each (_local2 in _arg1) {
_local2.addedToEmitter(this);
};
}
public function dispatchCounterComplete():void{
_dispatchCounterComplete = true;
}
public function get counter():Counter{
return (_counter);
}
public function get actions():Array{
return (_actions);
}
}
}//package org.flintparticles.common.emitters
Section 188
//Linear (org.flintparticles.common.energyEasing.Linear)
package org.flintparticles.common.energyEasing {
public class Linear {
public static function easeOut(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeIn(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeInOut(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeNone(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
}
}//package org.flintparticles.common.energyEasing
Section 189
//Quadratic (org.flintparticles.common.energyEasing.Quadratic)
package org.flintparticles.common.energyEasing {
public class Quadratic {
public static function easeOut(_arg1:Number, _arg2:Number):Number{
_arg1 = (1 - (_arg1 / _arg2));
return ((_arg1 * _arg1));
}
public static function easeIn(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 / _arg2);
return ((1 - (_arg1 * _arg1)));
}
public static function easeInOut(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 / (_arg2 * 0.5));
if (_arg1 < 1){
return ((1 - ((_arg1 * _arg1) * 0.5)));
};
_arg1 = (_arg1 - 2);
return (((_arg1 * _arg1) * 0.5));
}
}
}//package org.flintparticles.common.energyEasing
Section 190
//EmitterEvent (org.flintparticles.common.events.EmitterEvent)
package org.flintparticles.common.events {
import flash.events.*;
public class EmitterEvent extends Event {
public static var COUNTER_COMPLETE:String = "counterComplete";
public static var EMITTER_UPDATED:String = "emitterUpdated";
public static var EMITTER_EMPTY:String = "emitterEmpty";
public function EmitterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package org.flintparticles.common.events
Section 191
//ParticleEvent (org.flintparticles.common.events.ParticleEvent)
package org.flintparticles.common.events {
import flash.events.*;
import org.flintparticles.common.particles.*;
public class ParticleEvent extends Event {
public var particle:Particle;
public var otherObject;
public static var PARTICLES_COLLISION:String = "particlesCollision";
public static var PARTICLE_ADDED:String = "particleAdded";
public static var PARTICLE_DEAD:String = "particleDead";
public static var PARTICLE_CREATED:String = "particleCreated";
public function ParticleEvent(_arg1:String, _arg2:Particle=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.particle = _arg2;
}
override public function clone():Event{
var _local1:ParticleEvent = new ParticleEvent(type, particle, bubbles, cancelable);
_local1.otherObject = otherObject;
return (_local1);
}
}
}//package org.flintparticles.common.events
Section 192
//UpdateEvent (org.flintparticles.common.events.UpdateEvent)
package org.flintparticles.common.events {
import flash.events.*;
public class UpdateEvent extends Event {
public var time:Number;
public static var UPDATE:String = "update";
public function UpdateEvent(_arg1:String, _arg2:Number=NaN, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.time = _arg2;
}
override public function clone():Event{
return (new UpdateEvent(type, time, bubbles, cancelable));
}
}
}//package org.flintparticles.common.events
Section 193
//Initializer (org.flintparticles.common.initializers.Initializer)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.behaviours.*;
public interface Initializer extends Behaviour {
function initialize(_arg1:Emitter, _arg2:Particle):void;
}
}//package org.flintparticles.common.initializers
Section 194
//InitializerBase (org.flintparticles.common.initializers.InitializerBase)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class InitializerBase implements Initializer {
protected var _priority:int;// = 0
public function set priority(_arg1:int):void{
_priority = _arg1;
}
public function initialize(_arg1:Emitter, _arg2:Particle):void{
}
public function removedFromEmitter(_arg1:Emitter):void{
}
public function addedToEmitter(_arg1:Emitter):void{
}
public function get priority():int{
return (_priority);
}
}
}//package org.flintparticles.common.initializers
Section 195
//Lifetime (org.flintparticles.common.initializers.Lifetime)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class Lifetime extends InitializerBase {
private var _max:Number;
private var _min:Number;
public function Lifetime(_arg1:Number=1.79769313486232E308, _arg2:Number=NaN){
_max = _arg2;
_min = _arg1;
}
public function get lifetime():Number{
return (((_min == _max)) ? _min : ((_max + _min) * 0.5));
}
public function get maxLifetime():Number{
return (_max);
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
if (isNaN(_max)){
_arg2.lifetime = _min;
} else {
_arg2.lifetime = (_min + (Math.random() * (_max - _min)));
};
}
public function set lifetime(_arg1:Number):void{
_max = (_min = _arg1);
}
public function set minLifetime(_arg1:Number):void{
_min = _arg1;
}
public function set maxLifetime(_arg1:Number):void{
_max = _arg1;
}
public function get minLifetime():Number{
return (_min);
}
}
}//package org.flintparticles.common.initializers
Section 196
//SharedImage (org.flintparticles.common.initializers.SharedImage)
package org.flintparticles.common.initializers {
import flash.display.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class SharedImage extends InitializerBase {
private var _image:DisplayObject;
public function SharedImage(_arg1:DisplayObject=null){
_image = _arg1;
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
_arg2.image = _image;
}
public function set image(_arg1:DisplayObject):void{
_image = _arg1;
}
public function get image():DisplayObject{
return (_image);
}
}
}//package org.flintparticles.common.initializers
Section 197
//Particle (org.flintparticles.common.particles.Particle)
package org.flintparticles.common.particles {
import flash.geom.*;
import flash.utils.*;
public class Particle {
public var energy:Number;// = 1
public var lifetime:Number;// = 0
public var scale:Number;// = 1
public var image;// = null
public var color:uint;// = 4294967295
public var collisionRadius:Number;// = 1
private var _colorTransform:ColorTransform;// = null
private var _previousColor:uint;
public var isDead:Boolean;// = false
public var mass:Number;// = 1
private var _dictionary:Dictionary;// = null
public var age:Number;// = 0
public function get dictionary():Dictionary{
if (_dictionary == null){
_dictionary = new Dictionary(true);
};
return (_dictionary);
}
public function get colorTransform():ColorTransform{
if (((!(_colorTransform)) || (!((_previousColor == color))))){
_colorTransform = new ColorTransform((((color >>> 16) & 0xFF) / 0xFF), (((color >>> 8) & 0xFF) / 0xFF), ((color & 0xFF) / 0xFF), (((color >>> 24) & 0xFF) / 0xFF), 0, 0, 0, 0);
_previousColor = color;
};
return (_colorTransform);
}
protected function cloneInto(_arg1:Particle):Particle{
var _local2:Object;
_arg1.color = color;
_arg1.scale = scale;
_arg1.mass = mass;
_arg1.collisionRadius = collisionRadius;
_arg1.lifetime = lifetime;
_arg1.age = age;
_arg1.energy = energy;
_arg1.isDead = isDead;
_arg1.image = image;
if (_dictionary){
_arg1._dictionary = new Dictionary(true);
for (_local2 in _dictionary) {
_arg1._dictionary[_local2] = _dictionary[_local2];
};
};
return (_arg1);
}
public function get alpha():Number{
return ((((color & 4278190080) >>> 24) / 0xFF));
}
public function initialize():void{
color = 4294967295;
scale = 1;
mass = 1;
collisionRadius = 1;
lifetime = 0;
age = 0;
energy = 1;
isDead = false;
image = null;
_dictionary = null;
_colorTransform = null;
}
public function clone(_arg1:ParticleFactory=null):Particle{
var _local2:Particle;
if (_arg1){
_local2 = _arg1.createParticle();
} else {
_local2 = new Particle();
};
return (cloneInto(_local2));
}
}
}//package org.flintparticles.common.particles
Section 198
//ParticleFactory (org.flintparticles.common.particles.ParticleFactory)
package org.flintparticles.common.particles {
public interface ParticleFactory {
function clearAllParticles():void;
function createParticle():Particle;
function disposeParticle(_arg1:Particle):void;
}
}//package org.flintparticles.common.particles
Section 199
//Renderer (org.flintparticles.common.renderers.Renderer)
package org.flintparticles.common.renderers {
import org.flintparticles.common.emitters.*;
public interface Renderer {
function removeEmitter(_arg1:Emitter):void;
function addEmitter(_arg1:Emitter):void;
}
}//package org.flintparticles.common.renderers
Section 200
//SpriteRendererBase (org.flintparticles.common.renderers.SpriteRendererBase)
package org.flintparticles.common.renderers {
import flash.events.*;
import flash.display.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.events.*;
public class SpriteRendererBase extends Sprite implements Renderer {
protected var _emitters:Array;
public function SpriteRendererBase(){
_emitters = new Array();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, addedToStage, false, 0, true);
}
private function particleAdded(_arg1:ParticleEvent):void{
addParticle(_arg1.particle);
if (stage){
stage.invalidate();
};
}
public function set emitters(_arg1:Array):void{
var _local2:Emitter;
for each (_local2 in _emitters) {
removeEmitter(_local2);
};
for each (_local2 in _arg1) {
addEmitter(_local2);
};
}
private function addedToStage(_arg1:Event):void{
if (stage){
stage.invalidate();
};
}
public function get emitters():Array{
return (_emitters);
}
protected function addParticle(_arg1:Particle):void{
}
protected function updateParticles(_arg1:Event):void{
var _local2:Array = new Array();
var _local3:int;
while (_local3 < _emitters.length) {
_local2 = _local2.concat(Emitter(_emitters[_local3]).particles);
_local3++;
};
renderParticles(_local2);
}
protected function emitterUpdated(_arg1:EmitterEvent):void{
if (stage){
stage.invalidate();
};
}
public function removeEmitter(_arg1:Emitter):void{
var _local3:Particle;
var _local2:int;
while (_local2 < _emitters.length) {
if (_emitters[_local2] == _arg1){
_emitters.splice(_local2, 1);
_arg1.removeEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated);
_arg1.removeEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded);
_arg1.removeEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded);
_arg1.removeEventListener(ParticleEvent.PARTICLE_DEAD, particleRemoved);
for each (_local3 in _arg1.particles) {
removeParticle(_local3);
};
if (_emitters.length == 0){
removeEventListener(Event.RENDER, updateParticles);
renderParticles([]);
} else {
if (stage){
stage.invalidate();
};
};
return;
};
_local2++;
};
}
protected function renderParticles(_arg1:Array):void{
}
protected function removeParticle(_arg1:Particle):void{
}
private function particleRemoved(_arg1:ParticleEvent):void{
removeParticle(_arg1.particle);
if (stage){
stage.invalidate();
};
}
public function addEmitter(_arg1:Emitter):void{
var _local2:Particle;
_emitters.push(_arg1);
if (stage){
stage.invalidate();
};
_arg1.addEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_DEAD, particleRemoved, false, 0, true);
for each (_local2 in _arg1.particles) {
addParticle(_local2);
};
if (_emitters.length == 1){
addEventListener(Event.RENDER, updateParticles, false, 0, true);
};
}
}
}//package org.flintparticles.common.renderers
Section 201
//FrameUpdater (org.flintparticles.common.utils.FrameUpdater)
package org.flintparticles.common.utils {
import flash.events.*;
import flash.display.*;
import org.flintparticles.common.events.*;
import flash.utils.*;
public class FrameUpdater extends EventDispatcher {
private var _shape:Shape;
private var _running:Boolean;// = false
private var _time:Number;
private static var _instance:FrameUpdater;
public function FrameUpdater(){
_shape = new Shape();
}
private function startTimer():void{
_shape.addEventListener(Event.ENTER_FRAME, frameUpdate, false, 0, true);
_time = getTimer();
_running = true;
}
private function stopTimer():void{
_shape.removeEventListener(Event.ENTER_FRAME, frameUpdate);
_running = false;
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
if (((_running) && (!(hasEventListener(UpdateEvent.UPDATE))))){
stopTimer();
};
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
if (((!(_running)) && (hasEventListener(UpdateEvent.UPDATE)))){
startTimer();
};
}
private function frameUpdate(_arg1:Event):void{
var _local2:int = _time;
_time = getTimer();
var _local3:Number = ((_time - _local2) * 0.001);
dispatchEvent(new UpdateEvent(UpdateEvent.UPDATE, _local3));
}
public static function get instance():FrameUpdater{
if (_instance == null){
_instance = new (FrameUpdater);
};
return (_instance);
}
}
}//package org.flintparticles.common.utils
Section 202
//Maths (org.flintparticles.common.utils.Maths)
package org.flintparticles.common.utils {
public class Maths {
private static const DEGTORAD:Number = (Math.PI / 180);
private static const RADTODEG:Number = (180 / Math.PI);
public static function asRadians(_arg1:Number):Number{
return ((_arg1 * DEGTORAD));
}
public static function asDegrees(_arg1:Number):Number{
return ((_arg1 * RADTODEG));
}
}
}//package org.flintparticles.common.utils
Section 203
//Accelerate (org.flintparticles.twoD.actions.Accelerate)
package org.flintparticles.twoD.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.twoD.particles.*;
public class Accelerate extends ActionBase {
private var _x:Number;
private var _y:Number;
public function Accelerate(_arg1:Number=0, _arg2:Number=0){
this.x = _arg1;
this.y = _arg2;
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function get y():Number{
return (_y);
}
public function get x():Number{
return (_x);
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D;
_local4 = Particle2D(_arg2);
Particle2D(_arg2).velX = (_local4.velX + (_x * _arg3));
_local4.velY = (_local4.velY + (_y * _arg3));
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
}
}//package org.flintparticles.twoD.actions
Section 204
//LinearDrag (org.flintparticles.twoD.actions.LinearDrag)
package org.flintparticles.twoD.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.twoD.particles.*;
public class LinearDrag extends ActionBase {
private var _drag:Number;
public function LinearDrag(_arg1:Number=0){
this.drag = _arg1;
}
public function get drag():Number{
return (_drag);
}
public function set drag(_arg1:Number):void{
_drag = _arg1;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D = Particle2D(_arg2);
var _local5:Number = (1 - ((_drag * _arg3) / _local4.mass));
if (_local5 < 0){
_local4.velX = 0;
_local4.velY = 0;
} else {
_local4.velX = (_local4.velX * _local5);
_local4.velY = (_local4.velY * _local5);
};
}
}
}//package org.flintparticles.twoD.actions
Section 205
//Move (org.flintparticles.twoD.actions.Move)
package org.flintparticles.twoD.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.twoD.particles.*;
public class Move extends ActionBase {
public function Move(){
priority = -10;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D = Particle2D(_arg2);
Particle2D(_arg2).previousX = _local4.x;
_local4.previousY = _local4.y;
_local4.x = (_local4.x + (_local4.velX * _arg3));
_local4.y = (_local4.y + (_local4.velY * _arg3));
}
}
}//package org.flintparticles.twoD.actions
Section 206
//RotateToDirection (org.flintparticles.twoD.actions.RotateToDirection)
package org.flintparticles.twoD.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.twoD.particles.*;
public class RotateToDirection extends ActionBase {
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D = Particle2D(_arg2);
_local4.rotation = Math.atan2(_local4.velY, _local4.velX);
}
}
}//package org.flintparticles.twoD.actions
Section 207
//Emitter2D (org.flintparticles.twoD.emitters.Emitter2D)
package org.flintparticles.twoD.emitters {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.twoD.particles.*;
import org.flintparticles.common.utils.*;
public class Emitter2D extends Emitter {
protected var _y:Number;// = 0
public var spaceSort:Boolean;// = false
public var spaceSortedX:Array;
protected var _x:Number;// = 0
protected var _rotation:Number;// = 0
protected static var _creator:ParticleCreator2D = new ParticleCreator2D();
public function Emitter2D(){
_particleFactory = _creator;
}
public function get y():Number{
return (_y);
}
override protected function initParticle(_arg1:Particle):void{
var _local2:Particle2D = Particle2D(_arg1);
_local2.x = _x;
_local2.y = _y;
_local2.previousX = _x;
_local2.previousY = _y;
_local2.rotation = _rotation;
}
override protected function sortParticles():void{
var _local1:int;
var _local2:int;
if (spaceSort){
spaceSortedX = _particles.sortOn("x", (Array.NUMERIC | Array.RETURNINDEXEDARRAY));
_local1 = _particles.length;
_local2 = 0;
while (_local2 < _local1) {
Particle2D(_particles[spaceSortedX[_local2]]).sortID = _local2;
_local2++;
};
};
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function set rotRadians(_arg1:Number):void{
_rotation = _arg1;
}
public function get x():Number{
return (_x);
}
public function get rotRadians():Number{
return (_rotation);
}
public function set rotation(_arg1:Number):void{
_rotation = Maths.asRadians(_arg1);
}
public function get rotation():Number{
return (Maths.asDegrees(_rotation));
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
public static function get defaultParticleFactory():ParticleFactory{
return (_creator);
}
}
}//package org.flintparticles.twoD.emitters
Section 208
//Position (org.flintparticles.twoD.initializers.Position)
package org.flintparticles.twoD.initializers {
import flash.geom.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.twoD.zones.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.twoD.particles.*;
public class Position extends InitializerBase {
private var _zone:Zone2D;
public function Position(_arg1:Zone2D=null){
this.zone = _arg1;
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
var _local3:Particle2D;
var _local5:Number;
var _local6:Number;
_local3 = Particle2D(_arg2);
var _local4:Point = _zone.getLocation();
if (_local3.rotation == 0){
_local3.x = (_local3.x + _local4.x);
_local3.y = (_local3.y + _local4.y);
} else {
_local5 = Math.sin(_local3.rotation);
_local6 = Math.cos(_local3.rotation);
_local3.x = (_local3.x + ((_local6 * _local4.x) - (_local5 * _local4.y)));
_local3.y = (_local3.y + ((_local6 * _local4.y) + (_local5 * _local4.x)));
};
_local3.previousX = _local3.x;
_local3.previousY = _local3.y;
}
public function set zone(_arg1:Zone2D):void{
_zone = _arg1;
}
public function get zone():Zone2D{
return (_zone);
}
}
}//package org.flintparticles.twoD.initializers
Section 209
//ScaleAllInit (org.flintparticles.twoD.initializers.ScaleAllInit)
package org.flintparticles.twoD.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.initializers.*;
public class ScaleAllInit extends InitializerBase {
private var _max:Number;
private var _min:Number;
public function ScaleAllInit(_arg1:Number=1, _arg2:Number=NaN){
priority = -10;
this.minScale = _arg1;
this.maxScale = (isNaN(_arg2)) ? _arg1 : _arg2;
}
public function get scale():Number{
return (((_min == _max)) ? _min : ((_max + _min) / 2));
}
public function set maxScale(_arg1:Number):void{
_max = _arg1;
}
public function get maxScale():Number{
return (_max);
}
public function set minScale(_arg1:Number):void{
_min = _arg1;
}
public function set scale(_arg1:Number):void{
_max = (_min = _arg1);
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
var _local3:Number;
if (_max == _min){
_local3 = _min;
} else {
_local3 = (_min + (Math.random() * (_max - _min)));
};
_arg2.scale = _local3;
_arg2.mass = (_arg2.mass * (_local3 * _local3));
_arg2.collisionRadius = (_arg2.collisionRadius * _local3);
}
public function get minScale():Number{
return (_min);
}
}
}//package org.flintparticles.twoD.initializers
Section 210
//Velocity (org.flintparticles.twoD.initializers.Velocity)
package org.flintparticles.twoD.initializers {
import flash.geom.*;
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.twoD.zones.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.twoD.particles.*;
public class Velocity extends InitializerBase {
private var _zone:Zone2D;
public function Velocity(_arg1:Zone2D=null){
this.zone = _arg1;
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
var _local5:Number;
var _local6:Number;
var _local3:Particle2D = Particle2D(_arg2);
var _local4:Point = _zone.getLocation();
if (_local3.rotation == 0){
_local3.velX = _local4.x;
_local3.velY = _local4.y;
} else {
_local5 = Math.sin(_local3.rotation);
_local6 = Math.cos(_local3.rotation);
_local3.velX = ((_local6 * _local4.x) - (_local5 * _local4.y));
_local3.velY = ((_local6 * _local4.y) + (_local5 * _local4.x));
};
}
public function set zone(_arg1:Zone2D):void{
_zone = _arg1;
}
public function get zone():Zone2D{
return (_zone);
}
}
}//package org.flintparticles.twoD.initializers
Section 211
//Particle2D (org.flintparticles.twoD.particles.Particle2D)
package org.flintparticles.twoD.particles {
import flash.geom.*;
import org.flintparticles.common.particles.*;
public class Particle2D extends Particle {
public var y:Number;// = 0
public var previousX:Number;// = 0
public var previousY:Number;// = 0
private var _previousRadius:Number;
public var angVelocity:Number;// = 0
public var velX:Number;// = 0
public var velY:Number;// = 0
private var _previousMass:Number;
public var x:Number;// = 0
public var sortID:int;// = -1
private var _inertia:Number;
public var rotation:Number;// = 0
override public function clone(_arg1:ParticleFactory=null):Particle{
var _local2:Particle2D;
if (_arg1){
_local2 = (_arg1.createParticle() as Particle2D);
} else {
_local2 = new Particle2D();
};
cloneInto(_local2);
_local2.x = x;
_local2.y = y;
_local2.velX = velX;
_local2.velY = velY;
_local2.rotation = rotation;
_local2.angVelocity = angVelocity;
return (_local2);
}
override public function initialize():void{
super.initialize();
x = 0;
y = 0;
previousX = 0;
previousY = 0;
velX = 0;
velY = 0;
rotation = 0;
angVelocity = 0;
sortID = -1;
}
public function get matrixTransform():Matrix{
var _local1:Number = (scale * Math.cos(rotation));
var _local2:Number = (scale * Math.sin(rotation));
return (new Matrix(_local1, _local2, -(_local2), _local1, x, y));
}
public function get inertia():Number{
if (((!((mass == _previousMass))) || (!((collisionRadius == _previousRadius))))){
_inertia = (((mass * collisionRadius) * collisionRadius) * 0.5);
_previousMass = mass;
_previousRadius = collisionRadius;
};
return (_inertia);
}
}
}//package org.flintparticles.twoD.particles
Section 212
//ParticleCreator2D (org.flintparticles.twoD.particles.ParticleCreator2D)
package org.flintparticles.twoD.particles {
import org.flintparticles.common.particles.*;
public class ParticleCreator2D implements ParticleFactory {
private var _particles:Array;
public function ParticleCreator2D(){
_particles = new Array();
}
public function clearAllParticles():void{
_particles = new Array();
}
public function disposeParticle(_arg1:Particle):void{
if ((_arg1 is Particle2D)){
_arg1.initialize();
_particles.push(_arg1);
};
}
public function createParticle():Particle{
if (_particles.length){
return (_particles.pop());
};
return (new Particle2D());
}
}
}//package org.flintparticles.twoD.particles
Section 213
//BitmapRenderer (org.flintparticles.twoD.renderers.BitmapRenderer)
package org.flintparticles.twoD.renderers {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
import org.flintparticles.twoD.particles.*;
import org.flintparticles.common.renderers.*;
public class BitmapRenderer extends SpriteRendererBase {
protected var _bitmap:Bitmap;
protected var _bitmapData:BitmapData;
protected var _clearBetweenFrames:Boolean;
protected var _colorMap:Array;
protected var _smoothing:Boolean;
protected var _canvas:Rectangle;
protected var _postFilters:Array;
protected var _preFilters:Array;
protected static var ZERO_POINT:Point = new Point(0, 0);
public function BitmapRenderer(_arg1:Rectangle, _arg2:Boolean=false){
mouseEnabled = false;
mouseChildren = false;
_smoothing = _arg2;
_preFilters = new Array();
_postFilters = new Array();
_canvas = _arg1;
createBitmap();
_clearBetweenFrames = true;
}
public function get clearBetweenFrames():Boolean{
return (_clearBetweenFrames);
}
public function set clearBetweenFrames(_arg1:Boolean):void{
_clearBetweenFrames = _arg1;
}
override protected function renderParticles(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (!_bitmap){
return;
};
_bitmapData.lock();
_local3 = _preFilters.length;
_local2 = 0;
while (_local2 < _local3) {
_bitmapData.applyFilter(_bitmapData, _bitmapData.rect, BitmapRenderer.ZERO_POINT, _preFilters[_local2]);
_local2++;
};
if (((_clearBetweenFrames) && ((_local3 == 0)))){
_bitmapData.fillRect(_bitmap.bitmapData.rect, 0);
};
_local3 = _arg1.length;
if (_local3){
_local2 = _local3;
while (_local2--) {
drawParticle(_arg1[_local2]);
};
};
_local3 = _postFilters.length;
_local2 = 0;
while (_local2 < _local3) {
_bitmapData.applyFilter(_bitmapData, _bitmapData.rect, BitmapRenderer.ZERO_POINT, _postFilters[_local2]);
_local2++;
};
if (_colorMap){
_bitmapData.paletteMap(_bitmapData, _bitmapData.rect, ZERO_POINT, _colorMap[1], _colorMap[2], _colorMap[3], _colorMap[0]);
};
_bitmapData.unlock();
}
protected function createBitmap():void{
if (!_canvas){
return;
};
if (((_bitmap) && (_bitmapData))){
_bitmapData.dispose();
_bitmapData = null;
};
if (_bitmap){
removeChild(_bitmap);
_bitmap = null;
};
_bitmap = new Bitmap(null, "auto", _smoothing);
_bitmapData = new BitmapData(Math.ceil(_canvas.width), Math.ceil(_canvas.height), true, 0);
_bitmap.bitmapData = _bitmapData;
addChild(_bitmap);
_bitmap.x = _canvas.x;
_bitmap.y = _canvas.y;
}
public function get bitmapData():BitmapData{
return (_bitmapData);
}
public function set canvas(_arg1:Rectangle):void{
_canvas = _arg1;
createBitmap();
}
public function clearPaletteMap():void{
_colorMap = null;
}
public function get preFilters():Array{
return (_preFilters.slice());
}
public function removeFilter(_arg1:BitmapFilter):void{
var _local2:int;
while (_local2 < _preFilters.length) {
if (_preFilters[_local2] == _arg1){
_preFilters.splice(_local2, 1);
return;
};
_local2++;
};
_local2 = 0;
while (_local2 < _postFilters.length) {
if (_postFilters[_local2] == _arg1){
_postFilters.splice(_local2, 1);
return;
};
_local2++;
};
}
public function set smoothing(_arg1:Boolean):void{
_smoothing = _arg1;
if (_bitmap){
_bitmap.smoothing = _arg1;
};
}
public function set preFilters(_arg1:Array):void{
var _local2:BitmapFilter;
for each (_local2 in _preFilters) {
removeFilter(_local2);
};
for each (_local2 in _arg1) {
addFilter(_local2, false);
};
}
protected function drawParticle(_arg1:Particle2D):void{
var _local2:Matrix;
_local2 = _arg1.matrixTransform;
_local2.translate(-(_canvas.x), -(_canvas.y));
_bitmapData.draw(_arg1.image, _local2, _arg1.colorTransform, DisplayObject(_arg1.image).blendMode, null, _smoothing);
}
public function setPaletteMap(_arg1:Array=null, _arg2:Array=null, _arg3:Array=null, _arg4:Array=null):void{
_colorMap = new Array(4);
_colorMap[0] = _arg4;
_colorMap[1] = _arg1;
_colorMap[2] = _arg2;
_colorMap[3] = _arg3;
}
public function get smoothing():Boolean{
return (_smoothing);
}
public function set postFilters(_arg1:Array):void{
var _local2:BitmapFilter;
for each (_local2 in _postFilters) {
removeFilter(_local2);
};
for each (_local2 in _arg1) {
addFilter(_local2, true);
};
}
public function addFilter(_arg1:BitmapFilter, _arg2:Boolean=false):void{
if (_arg2){
_postFilters.push(_arg1);
} else {
_preFilters.push(_arg1);
};
}
public function get canvas():Rectangle{
return (_canvas);
}
public function get postFilters():Array{
return (_postFilters.slice());
}
}
}//package org.flintparticles.twoD.renderers
Section 214
//DiscZone (org.flintparticles.twoD.zones.DiscZone)
package org.flintparticles.twoD.zones {
import flash.geom.*;
public class DiscZone implements Zone2D {
private var _innerRadius:Number;
private var _innerSq:Number;
private var _outerRadius:Number;
private var _center:Point;
private var _outerSq:Number;
private static const TWOPI:Number = 6.28318530717959;
public function DiscZone(_arg1:Point=null, _arg2:Number=0, _arg3:Number=0){
if (_arg2 < _arg3){
throw (new Error((((("The outerRadius (" + _arg2) + ") can't be smaller than the innerRadius (") + _arg3) + ") in your DiscZone. N.B. the outerRadius is the second argument in the constructor and the innerRadius is the third argument.")));
};
if (_arg1 == null){
_center = new Point(0, 0);
} else {
_center = _arg1;
};
_innerRadius = _arg3;
_outerRadius = _arg2;
_innerSq = (_innerRadius * _innerRadius);
_outerSq = (_outerRadius * _outerRadius);
}
public function getArea():Number{
return ((Math.PI * (_outerSq - _innerSq)));
}
public function set centerX(_arg1:Number):void{
_center.x = _arg1;
}
public function set centerY(_arg1:Number):void{
_center.y = _arg1;
}
public function get innerRadius():Number{
return (_innerRadius);
}
public function set innerRadius(_arg1:Number):void{
_innerRadius = _arg1;
_innerSq = (_innerRadius * _innerRadius);
}
public function get center():Point{
return (_center);
}
public function set outerRadius(_arg1:Number):void{
_outerRadius = _arg1;
_outerSq = (_outerRadius * _outerRadius);
}
public function get centerX():Number{
return (_center.x);
}
public function get centerY():Number{
return (_center.y);
}
public function contains(_arg1:Number, _arg2:Number):Boolean{
_arg1 = (_arg1 - _center.x);
_arg2 = (_arg2 - _center.y);
var _local3:Number = ((_arg1 * _arg1) + (_arg2 * _arg2));
return ((((_local3 <= _outerSq)) && ((_local3 >= _innerSq))));
}
public function getLocation():Point{
var _local1:Number = Math.random();
var _local2:Point = Point.polar((_innerRadius + ((1 - (_local1 * _local1)) * (_outerRadius - _innerRadius))), (Math.random() * TWOPI));
_local2.x = (_local2.x + _center.x);
_local2.y = (_local2.y + _center.y);
return (_local2);
}
public function get outerRadius():Number{
return (_outerRadius);
}
public function set center(_arg1:Point):void{
_center = _arg1;
}
}
}//package org.flintparticles.twoD.zones
Section 215
//LineZone (org.flintparticles.twoD.zones.LineZone)
package org.flintparticles.twoD.zones {
import flash.geom.*;
public class LineZone implements Zone2D {
private var _start:Point;
private var _length:Point;
private var _end:Point;
public function LineZone(_arg1:Point=null, _arg2:Point=null){
if (_arg1 == null){
_start = new Point(0, 0);
} else {
_start = _arg1;
};
if (_arg2 == null){
_end = new Point(0, 0);
} else {
_end = _arg2;
};
_length = _end.subtract(_start);
}
public function get start():Point{
return (_start);
}
public function set start(_arg1:Point):void{
_start = _arg1;
_length = _end.subtract(_start);
}
public function set endY(_arg1:Number):void{
_end.y = _arg1;
_length = _end.subtract(_start);
}
public function set startX(_arg1:Number):void{
_start.x = _arg1;
_length = _end.subtract(_start);
}
public function set startY(_arg1:Number):void{
_start.y = _arg1;
_length = _end.subtract(_start);
}
public function getArea():Number{
return (_length.length);
}
public function getLocation():Point{
var _local1:Point = _start.clone();
var _local2:Number = Math.random();
_local1.x = (_local1.x + (_length.x * _local2));
_local1.y = (_local1.y + (_length.y * _local2));
return (_local1);
}
public function get endX():Number{
return (_end.x);
}
public function set end(_arg1:Point):void{
_end = _arg1;
_length = _end.subtract(_start);
}
public function get startY():Number{
return (_start.y);
}
public function set endX(_arg1:Number):void{
_end.x = _arg1;
_length = _end.subtract(_start);
}
public function get end():Point{
return (_end);
}
public function get startX():Number{
return (_start.x);
}
public function get endY():Number{
return (_end.y);
}
public function contains(_arg1:Number, _arg2:Number):Boolean{
if ((((_arg1 - _start.x) * _length.y) - ((_arg2 - _start.y) * _length.x)) != 0){
return (false);
};
return (((((_arg1 - _start.x) * (_arg1 - _end.x)) + ((_arg2 - _start.y) * (_arg2 - _end.y))) <= 0));
}
}
}//package org.flintparticles.twoD.zones
Section 216
//Zone2D (org.flintparticles.twoD.zones.Zone2D)
package org.flintparticles.twoD.zones {
import flash.geom.*;
public interface Zone2D {
function getArea():Number;
function getLocation():Point;
function contains(_arg1:Number, _arg2:Number):Boolean;
}
}//package org.flintparticles.twoD.zones
Section 217
//Checkbox_29 (vampirekitten_fla.Checkbox_29)
package vampirekitten_fla {
import flash.display.*;
public dynamic class Checkbox_29 extends MovieClip {
public function Checkbox_29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 218
//CoffinGfx_83 (vampirekitten_fla.CoffinGfx_83)
package vampirekitten_fla {
import flash.display.*;
public dynamic class CoffinGfx_83 extends MovieClip {
public function CoffinGfx_83(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 219
//GarlicGfx_159 (vampirekitten_fla.GarlicGfx_159)
package vampirekitten_fla {
import flash.display.*;
public dynamic class GarlicGfx_159 extends MovieClip {
public function GarlicGfx_159(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 220
//GoldCrossGfx_247 (vampirekitten_fla.GoldCrossGfx_247)
package vampirekitten_fla {
import flash.display.*;
public dynamic class GoldCrossGfx_247 extends MovieClip {
public function GoldCrossGfx_247(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 221
//GutsInner_52 (vampirekitten_fla.GutsInner_52)
package vampirekitten_fla {
import flash.display.*;
public dynamic class GutsInner_52 extends MovieClip {
public function GutsInner_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 222
//KittenBlackGfx_217 (vampirekitten_fla.KittenBlackGfx_217)
package vampirekitten_fla {
import flash.display.*;
public dynamic class KittenBlackGfx_217 extends MovieClip {
public function KittenBlackGfx_217(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 223
//KittenGfx_5 (vampirekitten_fla.KittenGfx_5)
package vampirekitten_fla {
import flash.display.*;
public dynamic class KittenGfx_5 extends MovieClip {
public function KittenGfx_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 224
//PriestGfx_151 (vampirekitten_fla.PriestGfx_151)
package vampirekitten_fla {
import flash.display.*;
public dynamic class PriestGfx_151 extends MovieClip {
public function PriestGfx_151(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 225
//StakeGfx_119 (vampirekitten_fla.StakeGfx_119)
package vampirekitten_fla {
import flash.display.*;
public dynamic class StakeGfx_119 extends MovieClip {
public function StakeGfx_119(){
addFrameScript(0, frame1, 34, frame35);
}
function frame1(){
stop();
}
function frame35(){
stop();
}
}
}//package vampirekitten_fla
Section 226
//VirginGfx_141 (vampirekitten_fla.VirginGfx_141)
package vampirekitten_fla {
import flash.display.*;
public dynamic class VirginGfx_141 extends MovieClip {
public function VirginGfx_141(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vampirekitten_fla
Section 227
//WAV (voxing.WAV)
package voxing {
import flash.media.*;
public dynamic class WAV extends Sound {
}
}//package voxing
Section 228
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 229
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 230
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 231
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropdown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.shadowDirection = "center";
this.fontWeight = "normal";
this.dropShadowEnabled = true;
this.leading = 0;
this.backgroundColor = 0xFFFFFF;
this.shadowDistance = 1;
this.cornerRadius = 0;
this.borderThickness = 0;
this.paddingLeft = 5;
this.paddingRight = 5;
};
};
}
}
}//package
Section 232
//_CompiledResourceBundleInfo (_CompiledResourceBundleInfo)
package {
public class _CompiledResourceBundleInfo {
public static function get compiledLocales():Array{
return (["en_US"]);
}
public static function get compiledResourceBundleNames():Array{
return (["logging"]);
}
}
}//package
Section 233
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 234
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.backgroundColor = 0xFFFFFF;
this.borderThickness = 0;
};
};
}
}
}//package
Section 235
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.borderStyle = "errorTipRight";
this.paddingTop = 4;
this.borderColor = 13510953;
this.color = 0xFFFFFF;
this.fontSize = 9;
this.shadowColor = 0;
this.paddingLeft = 4;
this.paddingBottom = 4;
this.paddingRight = 4;
};
};
}
}
}//package
Section 236
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fillColor = 0xFFFFFF;
this.kerning = false;
this.iconColor = 0x111111;
this.textRollOverColor = 2831164;
this.horizontalAlign = "left";
this.shadowCapColor = 14015965;
this.backgroundAlpha = 1;
this.filled = true;
this.textDecoration = "none";
this.roundedBottomCorners = true;
this.fontThickness = 0;
this.focusBlendMode = "normal";
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.horizontalGap = 8;
this.borderCapColor = 9542041;
this.buttonColor = 7305079;
this.indentation = 17;
this.selectionDisabledColor = 0xDDDDDD;
this.closeDuration = 250;
this.embedFonts = false;
this.paddingTop = 0;
this.letterSpacing = 0;
this.focusAlpha = 0.4;
this.bevel = true;
this.fontSize = 10;
this.shadowColor = 0xEEEEEE;
this.borderAlpha = 1;
this.paddingLeft = 0;
this.fontWeight = "normal";
this.indicatorGap = 14;
this.focusSkin = HaloFocusRect;
this.dropShadowEnabled = false;
this.leading = 2;
this.borderSkin = HaloBorder;
this.fontSharpness = 0;
this.modalTransparencyDuration = 100;
this.borderThickness = 1;
this.backgroundSize = "auto";
this.borderStyle = "inset";
this.borderColor = 12040892;
this.fontAntiAliasType = "advanced";
this.errorColor = 0xFF0000;
this.shadowDistance = 2;
this.horizontalGridLineColor = 0xF7F7F7;
this.stroked = false;
this.modalTransparencyColor = 0xDDDDDD;
this.cornerRadius = 0;
this.verticalAlign = "top";
this.textIndent = 0;
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.verticalGridLineColor = 14015965;
this.themeColor = 40447;
this.version = "3.0.0";
this.shadowDirection = "center";
this.modalTransparency = 0.5;
this.repeatInterval = 35;
this.openDuration = 250;
this.textAlign = "left";
this.fontFamily = "Verdana";
this.textSelectedColor = 2831164;
this.paddingBottom = 0;
this.strokeWidth = 1;
this.fontGridFitType = "pixel";
this.horizontalGridLines = false;
this.useRollOver = true;
this.verticalGridLines = true;
this.repeatDelay = 500;
this.fontStyle = "normal";
this.dropShadowColor = 0;
this.focusThickness = 2;
this.verticalGap = 6;
this.disabledColor = 11187123;
this.paddingRight = 0;
this.focusRoundedCorners = "tl tr bl br";
this.borderSides = "left top right bottom";
this.disabledIconColor = 0x999999;
this.modalTransparencyBlur = 3;
this.color = 734012;
this.selectionDuration = 250;
this.highlightAlphas = [0.3, 0];
};
};
}
}
}//package
Section 237
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 238
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 239
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".linkButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.paddingLeft = 2;
this.paddingBottom = 2;
this.paddingRight = 2;
};
};
}
}
}//package
Section 240
//_MenuStyle (_MenuStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _MenuStyle {
private static var _embed_css_Assets_swf_MenuBranchDisabled_945416395:Class = _MenuStyle__embed_css_Assets_swf_MenuBranchDisabled_945416395;
private static var _embed_css_Assets_swf_MenuRadioEnabled_1312169149:Class = _MenuStyle__embed_css_Assets_swf_MenuRadioEnabled_1312169149;
private static var _embed_css_Assets_swf_MenuCheckDisabled_777447741:Class = _MenuStyle__embed_css_Assets_swf_MenuCheckDisabled_777447741;
private static var _embed_css_Assets_swf_MenuCheckEnabled_867482146:Class = _MenuStyle__embed_css_Assets_swf_MenuCheckEnabled_867482146;
private static var _embed_css_Assets_swf_MenuSeparator_1315276292:Class = _MenuStyle__embed_css_Assets_swf_MenuSeparator_1315276292;
private static var _embed_css_Assets_swf_MenuRadioDisabled_333345282:Class = _MenuStyle__embed_css_Assets_swf_MenuRadioDisabled_333345282;
private static var _embed_css_Assets_swf_MenuBranchEnabled_1561051590:Class = _MenuStyle__embed_css_Assets_swf_MenuBranchEnabled_1561051590;
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Menu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Menu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.radioIcon = _embed_css_Assets_swf_MenuRadioEnabled_1312169149;
this.borderStyle = "menuBorder";
this.paddingTop = 1;
this.rightIconGap = 15;
this.branchIcon = _embed_css_Assets_swf_MenuBranchEnabled_1561051590;
this.checkDisabledIcon = _embed_css_Assets_swf_MenuCheckDisabled_777447741;
this.verticalAlign = "middle";
this.paddingLeft = 1;
this.paddingRight = 0;
this.checkIcon = _embed_css_Assets_swf_MenuCheckEnabled_867482146;
this.radioDisabledIcon = _embed_css_Assets_swf_MenuRadioDisabled_333345282;
this.dropShadowEnabled = true;
this.branchDisabledIcon = _embed_css_Assets_swf_MenuBranchDisabled_945416395;
this.dropIndicatorSkin = ListDropIndicator;
this.separatorSkin = _embed_css_Assets_swf_MenuSeparator_1315276292;
this.horizontalGap = 6;
this.leftIconGap = 18;
this.paddingBottom = 1;
};
};
}
}
}//package
Section 241
//_MenuStyle__embed_css_Assets_swf_MenuBranchDisabled_945416395 (_MenuStyle__embed_css_Assets_swf_MenuBranchDisabled_945416395)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuBranchDisabled_945416395 extends SpriteAsset {
}
}//package
Section 242
//_MenuStyle__embed_css_Assets_swf_MenuBranchEnabled_1561051590 (_MenuStyle__embed_css_Assets_swf_MenuBranchEnabled_1561051590)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuBranchEnabled_1561051590 extends SpriteAsset {
}
}//package
Section 243
//_MenuStyle__embed_css_Assets_swf_MenuCheckDisabled_777447741 (_MenuStyle__embed_css_Assets_swf_MenuCheckDisabled_777447741)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuCheckDisabled_777447741 extends SpriteAsset {
}
}//package
Section 244
//_MenuStyle__embed_css_Assets_swf_MenuCheckEnabled_867482146 (_MenuStyle__embed_css_Assets_swf_MenuCheckEnabled_867482146)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuCheckEnabled_867482146 extends SpriteAsset {
}
}//package
Section 245
//_MenuStyle__embed_css_Assets_swf_MenuRadioDisabled_333345282 (_MenuStyle__embed_css_Assets_swf_MenuRadioDisabled_333345282)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuRadioDisabled_333345282 extends SpriteAsset {
}
}//package
Section 246
//_MenuStyle__embed_css_Assets_swf_MenuRadioEnabled_1312169149 (_MenuStyle__embed_css_Assets_swf_MenuRadioEnabled_1312169149)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuRadioEnabled_1312169149 extends SpriteAsset {
}
}//package
Section 247
//_MenuStyle__embed_css_Assets_swf_MenuSeparator_1315276292 (_MenuStyle__embed_css_Assets_swf_MenuSeparator_1315276292)
package {
import mx.core.*;
public class _MenuStyle__embed_css_Assets_swf_MenuSeparator_1315276292 extends SpriteAsset {
}
}//package
Section 248
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderColor = 0xFFFFFF;
this.backgroundColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderAlpha = 1;
};
};
}
}
}//package
Section 249
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.backgroundColor = 0xFFFFFF;
this.backgroundImage = "";
this.horizontalAlign = "left";
this.paddingLeft = 0;
this.paddingBottom = 0;
this.paddingRight = 0;
};
};
}
}
}//package
Section 250
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".popUpMenu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.textAlign = "left";
};
};
}
}
}//package
Section 251
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 252
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderStyle = "inset";
this.borderColor = 14015965;
this.highlightColor = 12897484;
this.backgroundColor = 0xFFFFFF;
this.shadowCapColor = 14015965;
this.shadowColor = 14015965;
this.paddingLeft = 5;
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.paddingRight = 5;
};
};
}
}
}//package
Section 253
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 254
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 255
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0xFFFFFF;
this.textAlign = "center";
};
};
}
}
}//package
Section 256
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 257
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 258
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 259
//AngleDownIndicator (AngleDownIndicator)
package {
import flash.display.*;
public dynamic class AngleDownIndicator extends MovieClip {
public var mcGfx:MovieClip;
}
}//package
Section 260
//BadPowerup (BadPowerup)
package {
import flash.display.*;
public dynamic class BadPowerup extends MovieClip {
}
}//package
Section 261
//badpowerup1 (badpowerup1)
package {
import flash.media.*;
public dynamic class badpowerup1 extends Sound {
}
}//package
Section 262
//badpowerup2 (badpowerup2)
package {
import flash.media.*;
public dynamic class badpowerup2 extends Sound {
}
}//package
Section 263
//bat (bat)
package {
import flash.media.*;
public dynamic class bat extends Sound {
}
}//package
Section 264
//BG (BG)
package {
import flash.display.*;
public dynamic class BG extends Sprite {
}
}//package
Section 265
//BG1 (BG1)
package {
import flash.display.*;
public dynamic class BG1 extends Sprite {
}
}//package
Section 266
//BG2 (BG2)
package {
import flash.display.*;
public dynamic class BG2 extends Sprite {
}
}//package
Section 267
//BG3 (BG3)
package {
import flash.display.*;
public dynamic class BG3 extends Sprite {
}
}//package
Section 268
//BG4 (BG4)
package {
import flash.display.*;
public dynamic class BG4 extends Sprite {
}
}//package
Section 269
//BGColour (BGColour)
package {
import flash.display.*;
public dynamic class BGColour extends Sprite {
}
}//package
Section 270
//boostdown (boostdown)
package {
import flash.media.*;
public dynamic class boostdown extends Sound {
}
}//package
Section 271
//BoostIndicator (BoostIndicator)
package {
import flash.display.*;
public dynamic class BoostIndicator extends MovieClip {
public var mcGfx:MovieClip;
}
}//package
Section 272
//boostup (boostup)
package {
import flash.media.*;
public dynamic class boostup extends Sound {
}
}//package
Section 273
//Cloud1 (Cloud1)
package {
import flash.display.*;
public dynamic class Cloud1 extends MovieClip {
}
}//package
Section 274
//Cloud2 (Cloud2)
package {
import flash.display.*;
public dynamic class Cloud2 extends MovieClip {
}
}//package
Section 275
//Cloud3 (Cloud3)
package {
import flash.display.*;
public dynamic class Cloud3 extends MovieClip {
}
}//package
Section 276
//Cloud4 (Cloud4)
package {
import flash.display.*;
public dynamic class Cloud4 extends MovieClip {
}
}//package
Section 277
//Cloud5 (Cloud5)
package {
import flash.display.*;
public dynamic class Cloud5 extends MovieClip {
}
}//package
Section 278
//coffin (coffin)
package {
import flash.media.*;
public dynamic class coffin extends Sound {
}
}//package
Section 279
//Coffin (Coffin)
package {
import flash.display.*;
public dynamic class Coffin extends MovieClip {
public var regmark:MovieClip;
public var mcGfx:MovieClip;
public function Coffin(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 280
//CoffinIcon (CoffinIcon)
package {
import flash.display.*;
public dynamic class CoffinIcon extends MovieClip {
public var mcArrow:MovieClip;
}
}//package
Section 281
//Combo (Combo)
package {
import flash.display.*;
public dynamic class Combo extends MovieClip {
}
}//package
Section 282
//ComboText (ComboText)
package {
import flash.display.*;
public dynamic class ComboText extends MovieClip {
public var mcText:MovieClip;
}
}//package
Section 283
//conffinslide (conffinslide)
package {
import flash.media.*;
public dynamic class conffinslide extends Sound {
}
}//package
Section 284
//cross (cross)
package {
import flash.media.*;
public dynamic class cross extends Sound {
}
}//package
Section 285
//death (death)
package {
import flash.media.*;
public dynamic class death extends Sound {
}
}//package
Section 286
//debug (debug)
package {
import mx.logging.*;
public function debug(_arg1, _arg2=null):void{
var str = _arg1;
var caller = _arg2;
try {
if (DebugState.DEBUG){
Log.getLogger("App").debug(str);
};
} catch(e:Error) {
};
}
}//package
Section 287
//DebugState (DebugState)
package {
public class DebugState {
public static const DEBUG:Boolean = false;
}
}//package
Section 288
//DistanceIndicator (DistanceIndicator)
package {
import flash.display.*;
import flash.text.*;
public dynamic class DistanceIndicator extends MovieClip {
public var txtDistance:TextField;
}
}//package
Section 289
//E4Footer (E4Footer)
package {
import flash.display.*;
public dynamic class E4Footer extends MovieClip {
}
}//package
Section 290
//E4Ident (E4Ident)
package {
import flash.display.*;
public dynamic class E4Ident extends MovieClip {
}
}//package
Section 291
//en_US$core_properties (en_US$core_properties)
package {
import mx.resources.*;
public class en_US$core_properties extends ResourceBundle {
public function en_US$core_properties(){
super("en_US", "core");
}
override protected function getContent():Object{
var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."};
return (_local1);
}
}
}//package
Section 292
//en_US$logging_properties (en_US$logging_properties)
package {
import mx.resources.*;
public class en_US$logging_properties extends ResourceBundle {
public function en_US$logging_properties(){
super("en_US", "logging");
}
override protected function getContent():Object{
var _local1:Object = {invalidTarget:"Invalid target specified.", charsInvalid:"Error for filter '{0}': The following characters are not valid: []~$^&/(){}<>+=_-`!@#%?,:;'\".", charPlacement:"Error for filter '{0}': '*' must be the right most character.", levelLimit:"Level must be less than LogEventLevel.ALL.", invalidChars:"Categories can not contain any of the following characters: []`~,!@#$%*^&()]{}+=|';?><./\".", invalidLen:"Categories must be at least one character in length."};
return (_local1);
}
}
}//package
Section 293
//en_US$skins_properties (en_US$skins_properties)
package {
import mx.resources.*;
public class en_US$skins_properties extends ResourceBundle {
public function en_US$skins_properties(){
super("en_US", "skins");
}
override protected function getContent():Object{
var _local1:Object = {notLoaded:"Unable to load '{0}'."};
return (_local1);
}
}
}//package
Section 294
//en_US$styles_properties (en_US$styles_properties)
package {
import mx.resources.*;
public class en_US$styles_properties extends ResourceBundle {
public function en_US$styles_properties(){
super("en_US", "styles");
}
override protected function getContent():Object{
var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."};
return (_local1);
}
}
}//package
Section 295
//error (error)
package {
import mx.logging.*;
public function error(_arg1, _arg2=null):void{
var str = _arg1;
var caller = _arg2;
try {
if (DebugState.DEBUG){
Log.getLogger("App").error(String(str));
};
} catch(e:Error) {
};
}
}//package
Section 296
//FilterBank (FilterBank)
package {
import flash.display.*;
public dynamic class FilterBank extends MovieClip {
public var mcFilters:MovieClip;
}
}//package
Section 297
//FloorPara0 (FloorPara0)
package {
import flash.display.*;
public dynamic class FloorPara0 extends Sprite {
}
}//package
Section 298
//FloorPara1 (FloorPara1)
package {
import flash.display.*;
public dynamic class FloorPara1 extends Sprite {
}
}//package
Section 299
//FloorPara2 (FloorPara2)
package {
import flash.display.*;
public dynamic class FloorPara2 extends Sprite {
}
}//package
Section 300
//FloorPara3 (FloorPara3)
package {
import flash.display.*;
public dynamic class FloorPara3 extends Sprite {
}
}//package
Section 301
//FloorRear1 (FloorRear1)
package {
import flash.display.*;
public dynamic class FloorRear1 extends Sprite {
}
}//package
Section 302
//gameover (gameover)
package {
import flash.media.*;
public dynamic class gameover extends Sound {
}
}//package
Section 303
//GameOverGravestone (GameOverGravestone)
package {
import flash.display.*;
public dynamic class GameOverGravestone extends MovieClip {
public var mcGfx:MovieClip;
}
}//package
Section 304
//Garlic (Garlic)
package {
import flash.display.*;
public dynamic class Garlic extends MovieClip {
public var regmark:MovieClip;
public var mcGfx:MovieClip;
}
}//package
Section 305
//GarlicIcon (GarlicIcon)
package {
import flash.display.*;
public dynamic class GarlicIcon extends MovieClip {
public var mcArrow:MovieClip;
}
}//package
Section 306
//GoldCross (GoldCross)
package {
import flash.display.*;
public dynamic class GoldCross extends MovieClip {
public var regmark:MovieClip;
public var mcGfx:MovieClip;
}
}//package
Section 307
//GoldCrossIcon (GoldCrossIcon)
package {
import flash.display.*;
public dynamic class GoldCrossIcon extends MovieClip {
public var mcArrow:MovieClip;
}
}//package
Section 308
//GoodPowerup (GoodPowerup)
package {
import flash.display.*;
public dynamic class GoodPowerup extends MovieClip {
}
}//package
Section 309
//goodpowerup (goodpowerup)
package {
import flash.media.*;
public dynamic class goodpowerup extends Sound {
}
}//package
Section 310
//GraveStone (GraveStone)
package {
import flash.display.*;
import flash.text.*;
public dynamic class GraveStone extends MovieClip {
public var textDistance:TextField;
}
}//package
Section 311
//groundhit1 (groundhit1)
package {
import flash.media.*;
public dynamic class groundhit1 extends Sound {
}
}//package
Section 312
//groundhit2 (groundhit2)
package {
import flash.media.*;
public dynamic class groundhit2 extends Sound {
}
}//package
Section 313
//groundhit3 (groundhit3)
package {
import flash.media.*;
public dynamic class groundhit3 extends Sound {
}
}//package
Section 314
//groundhit4 (groundhit4)
package {
import flash.media.*;
public dynamic class groundhit4 extends Sound {
}
}//package
Section 315
//Guts (Guts)
package {
import flash.display.*;
public dynamic class Guts extends MovieClip {
public var regmark:MovieClip;
public var mcGfx:MovieClip;
}
}//package
Section 316
//guts (guts)
package {
import flash.media.*;
public dynamic class guts extends Sound {
}
}//package
Section 317
//GutsIcon (GutsIcon)
package {
import flash.display.*;
public dynamic class GutsIcon extends MovieClip {
public var mcArrow:MovieClip;
}
}//package
Section 318
//info (info)
package {
import mx.logging.*;
public function info(_arg1, _arg2=null):void{
var str = _arg1;
var caller = _arg2;
try {
if (DebugState.DEBUG){
Log.getLogger("App").info(String(str));
};
} catch(e:Error) {
};
}
}//package
Section 319
//Instructions (Instructions)
package {
import flash.display.*;
public dynamic class Instructions extends MovieClip {
}
}//package
Section 320
//intro (intro)
package {
import flash.media.*;
public dynamic class intro extends Sound {
}
}//package
Section 321
//IntroSnd (IntroSnd)
package {
import flash.media.*;
public dynamic class IntroSnd extends Sound {
}
}//package
Section 322
//kickcat1 (kickcat1)
package {
import flash.media.*;
public dynamic class kickcat1 extends Sound {
}
}//package
Section 323
//kickcat2 (kickcat2)
package {
import flash.media.*;
public dynamic class kickcat2 extends Sound {
}
}//package
Section 324
//Kitten (Kitten)
package {
import flash.display.*;
public dynamic class Kitten extends MovieClip {
public var mcGfx:MovieClip;
public var mcPully:MovieClip;
}
}//package
Section 325
//Leg (Leg)
package {
import flash.display.*;
public dynamic class Leg extends MovieClip {
public var mcMask:MovieClip;
public var mcFoot:MovieClip;
public var mcGuide:MovieClip;
}
}//package
Section 326
//Marker (Marker)
package {
import flash.display.*;
public dynamic class Marker extends MovieClip {
public var mcGfx:MovieClip;
}
}//package
Section 327
//menuclick (menuclick)
package {
import flash.media.*;
public dynamic class menuclick extends Sound {
}
}//package
Section 328
//MenuItem (MenuItem)
package {
import flash.display.*;
public dynamic class MenuItem extends MovieClip {
public var mcText:MovieClip;
public var mcStake:MovieClip;
}
}//package
Section 329
//MenuTitleText (MenuTitleText)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MenuTitleText extends Sprite {
public var mcFootHitArea:MovieClip;
public var textField:TextField;
}
}//package
Section 330
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 331
//musicloop (musicloop)
package {
import flash.media.*;
public dynamic class musicloop extends Sound {
}
}//package
Section 332
//ParticleBloodDrip (ParticleBloodDrip)
package {
import flash.display.*;
public dynamic class ParticleBloodDrip extends Sprite {
}
}//package
Section 333
//PowerupText (PowerupText)
package {
import flash.display.*;
public dynamic class PowerupText extends MovieClip {
public var mcText:MovieClip;
}
}//package
Section 334
//PressAndHold (PressAndHold)
package {
import flash.display.*;
public dynamic class PressAndHold extends MovieClip {
}
}//package
Section 335
//Priest (Priest)
package {
import flash.display.*;
public dynamic class Priest extends MovieClip {
public var regmark:MovieClip;
public var mcGfx:MovieClip;
public function Priest(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 336
//PriestIcon (PriestIcon)
package {
import flash.display.*;
public dynamic class PriestIcon extends MovieClip {
public var mcArrow:MovieClip;
}
}//package
Section 337
//priestscream (priestscream)
package {
import flash.media.*;
public dynamic class priestscream extends Sound {
}
}//package
Section 338
//purr (purr)
package {
import flash.media.*;
public dynamic class purr extends Sound {
}
}//package
Section 339
//Radar (Radar)
package {
import flash.display.*;
public dynamic class Radar extends MovieClip {
}
}//package
Section 340
//ReleaseToKick (ReleaseToKick)
package {
import flash.display.*;
public dynamic class ReleaseToKick extends MovieClip {
}
}//package
Section 341
//SaucerIdent (SaucerIdent)
package {
import flash.display.*;
public dynamic class SaucerIdent extends MovieClip {
public var mcLogo:MovieClip;
}
}//package
Section 342
//Settings (Settings)
package {
import flash.display.*;
public dynamic class Settings extends MovieClip {
public var mcClearSettings:MovieClip;
public var mciSlider:MovieClip;
public var mciSound:MovieClip;
}
}//package
Section 343
//SmallBG (SmallBG)
package {
import flash.display.*;
public dynamic class SmallBG extends Sprite {
}
}//package
Section 344
//SmallMenuItem (SmallMenuItem)
package {
import flash.display.*;
public dynamic class SmallMenuItem extends MovieClip {
public var mcText:MovieClip;
public var mcStake:MovieClip;
}
}//package
Section 345
//Special (Special)
package {
import flash.display.*;
public dynamic class Special extends MovieClip {
}
}//package
Section 346
//specialactivate (specialactivate)
package {
import flash.media.*;
public dynamic class specialactivate extends Sound {
}
}//package
Section 347
//specialcounter (specialcounter)
package {
import flash.media.*;
public dynamic class specialcounter extends Sound {
}
}//package
Section 348
//Stake (Stake)
package {
import flash.display.*;
public dynamic class Stake extends MovieClip {
public var regmark:MovieClip;
public var mcGfx:MovieClip;
public function Stake(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 349
//StakeIcon (StakeIcon)
package {
import flash.display.*;
public dynamic class StakeIcon extends MovieClip {
public var mcArrow:MovieClip;
}
}//package
Section 350
//Tree1 (Tree1)
package {
import flash.display.*;
public dynamic class Tree1 extends MovieClip {
}
}//package
Section 351
//Tree2 (Tree2)
package {
import flash.display.*;
public dynamic class Tree2 extends MovieClip {
}
}//package
Section 352
//Tree3 (Tree3)
package {
import flash.display.*;
public dynamic class Tree3 extends MovieClip {
}
}//package
Section 353
//Tree4 (Tree4)
package {
import flash.display.*;
public dynamic class Tree4 extends MovieClip {
}
}//package
Section 354
//wind (wind)
package {
import flash.media.*;
public dynamic class wind extends Sound {
}
}//package
Section 355
//Virgin (Virgin)
package {
import flash.display.*;
public dynamic class Virgin extends MovieClip {
public var regmark:MovieClip;
public var mcGfx:MovieClip;
public function Virgin(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 356
//VirginIcon (VirginIcon)
package {
import flash.display.*;
public dynamic class VirginIcon extends MovieClip {
public var mcArrow:MovieClip;
}
}//package
Section 357
//virginscream (virginscream)
package {
import flash.media.*;
public dynamic class virginscream extends Sound {
}
}//package