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

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

Ticketless - a funny tribute to Canabalt free online game.swf

This is the info page for
Flash #91132

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


Text
0% loaded

9999999999

XXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXX

ENTER YOUR NICKNAME :

SCORE WILL BE SAVED UNDER :

VIEW SCORE

VIEW SCORE

XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX

ActionScript [AS3]

Section 1
//PropTween (com.greensock.core.PropTween) package com.greensock.core { public class PropTween { public var priority:int; public var start:Number; public var prevNode:PropTween; public var change:Number; public var target:Object; public var name:String; public var property:String; public var nextNode:PropTween; public var isPlugin:Boolean; public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){ this.target = _arg1; this.property = _arg2; this.start = _arg3; this.change = _arg4; this.name = _arg5; this.isPlugin = _arg6; if (_arg7){ _arg7.prevNode = this; this.nextNode = _arg7; }; this.priority = _arg8; } } }//package com.greensock.core
Section 2
//SimpleTimeline (com.greensock.core.SimpleTimeline) package com.greensock.core { public class SimpleTimeline extends TweenCore { public var autoRemoveChildren:Boolean; protected var _lastChild:TweenCore; protected var _firstChild:TweenCore; public function SimpleTimeline(_arg1:Object=null){ super(0, _arg1); } override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ var _local5:Number; var _local6:TweenCore; var _local4:TweenCore = _firstChild; this.cachedTotalTime = _arg1; this.cachedTime = _arg1; while (_local4) { _local6 = _local4.nextNode; if (((_local4.active) || ((((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))) && (!(_local4.gc)))))){ if (!_local4.cachedReversed){ _local4.renderTime(((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale), _arg2, false); } else { _local5 = (_local4.cacheIsDirty) ? _local4.totalDuration : _local4.cachedTotalDuration; _local4.renderTime((_local5 - ((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale)), _arg2, false); }; }; _local4 = _local6; }; } public function addChild(_arg1:TweenCore):void{ if (((!(_arg1.gc)) && (_arg1.timeline))){ _arg1.timeline.remove(_arg1, true); }; _arg1.timeline = this; if (_arg1.gc){ _arg1.setEnabled(true, true); }; if (_firstChild){ _firstChild.prevNode = _arg1; }; _arg1.nextNode = _firstChild; _firstChild = _arg1; _arg1.prevNode = null; } public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{ if (((!(_arg1.gc)) && (!(_arg2)))){ _arg1.setEnabled(false, true); }; if (_arg1.nextNode){ _arg1.nextNode.prevNode = _arg1.prevNode; } else { if (_lastChild == _arg1){ _lastChild = _arg1.prevNode; }; }; if (_arg1.prevNode){ _arg1.prevNode.nextNode = _arg1.nextNode; } else { if (_firstChild == _arg1){ _firstChild = _arg1.nextNode; }; }; } public function get rawTime():Number{ return (this.cachedTotalTime); } } }//package com.greensock.core
Section 3
//TweenCore (com.greensock.core.TweenCore) package com.greensock.core { import com.greensock.*; public class TweenCore { public var initted:Boolean; protected var _hasUpdate:Boolean; public var active:Boolean; protected var _delay:Number; public var cachedTime:Number; public var cachedReversed:Boolean; public var nextNode:TweenCore; protected var _rawPrevTime:Number;// = -1 public var vars:Object; public var cachedTotalTime:Number; public var timeline:SimpleTimeline; public var data; public var cachedStartTime:Number; public var prevNode:TweenCore; public var cachedDuration:Number; public var gc:Boolean; protected var _pauseTime:Number; public var cacheIsDirty:Boolean; public var cachedPaused:Boolean; public var cachedTimeScale:Number; public var cachedTotalDuration:Number; public static const version:Number = 1.13; protected static var _classInitted:Boolean; public function TweenCore(_arg1:Number=0, _arg2:Object=null){ this.vars = ((_arg2) || ({})); this.cachedDuration = (this.cachedTotalDuration = ((_arg1) || (0))); _delay = ((this.vars.delay) || (0)); this.cachedTimeScale = ((this.vars.timeScale) || (1)); this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false))))); this.cachedTotalTime = (this.cachedTime = 0); this.data = this.vars.data; if (!_classInitted){ if (isNaN(TweenLite.rootFrame)){ TweenLite.initClass(); _classInitted = true; } else { return; }; }; var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline; this.cachedStartTime = (_local3.cachedTotalTime + _delay); _local3.addChild(this); if (this.vars.reversed){ this.cachedReversed = true; }; if (this.vars.paused){ this.paused = true; }; } public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ } public function get delay():Number{ return (_delay); } public function get duration():Number{ return (this.cachedDuration); } public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{ this.reversed = false; this.paused = false; this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2); } public function set reversed(_arg1:Boolean):void{ if (_arg1 != this.cachedReversed){ this.cachedReversed = _arg1; setTotalTime(this.cachedTotalTime, true); }; } public function set startTime(_arg1:Number):void{ var _local2:Boolean = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc))))); this.cachedStartTime = _arg1; if (_local2){ this.timeline.addChild(this); }; } public function set delay(_arg1:Number):void{ this.startTime = (this.startTime + (_arg1 - _delay)); _delay = _arg1; } public function resume():void{ this.paused = false; } public function get paused():Boolean{ return (this.cachedPaused); } public function play():void{ this.reversed = false; this.paused = false; } public function set duration(_arg1:Number):void{ this.cachedDuration = (this.cachedTotalDuration = _arg1); setDirtyCache(false); } public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{ if (!_arg1){ renderTime(this.cachedTotalDuration, _arg2, false); return; }; if (this.timeline.autoRemoveChildren){ this.setEnabled(false, false); } else { this.active = false; }; if (!_arg2){ if (((((this.vars.onComplete) && ((this.cachedTotalTime == this.cachedTotalDuration)))) && (!(this.cachedReversed)))){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); } else { if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){ this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams); }; }; }; } public function invalidate():void{ } public function get totalTime():Number{ return (this.cachedTotalTime); } public function get reversed():Boolean{ return (this.cachedReversed); } public function get startTime():Number{ return (this.cachedStartTime); } public function set currentTime(_arg1:Number):void{ setTotalTime(_arg1, false); } protected function setDirtyCache(_arg1:Boolean=true):void{ var _local2:TweenCore = (_arg1) ? this : this.timeline; while (_local2) { _local2.cacheIsDirty = true; _local2 = _local2.timeline; }; } public function reverse(_arg1:Boolean=true):void{ this.reversed = true; if (_arg1){ this.paused = false; } else { if (this.gc){ this.setEnabled(true, false); }; }; } public function set paused(_arg1:Boolean):void{ if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){ if (_arg1){ _pauseTime = this.timeline.rawTime; } else { this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime)); _pauseTime = NaN; setDirtyCache(false); }; this.cachedPaused = _arg1; this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); }; if (((!(_arg1)) && (this.gc))){ this.setTotalTime(this.cachedTotalTime, false); this.setEnabled(true, false); }; } public function kill():void{ setEnabled(false, false); } public function set totalTime(_arg1:Number):void{ setTotalTime(_arg1, false); } public function get currentTime():Number{ return (this.cachedTime); } protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{ var _local3:Number; var _local4:Number; if (this.timeline){ _local3 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime; if (this.cachedReversed){ _local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale)); } else { this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale)); }; if (!this.timeline.cacheIsDirty){ setDirtyCache(false); }; if (this.cachedTotalTime != _arg1){ renderTime(_arg1, _arg2, false); }; }; } public function pause():void{ this.paused = true; } public function set totalDuration(_arg1:Number):void{ this.duration = _arg1; } public function get totalDuration():Number{ return (this.cachedTotalDuration); } public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{ if (_arg1){ this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); if (((!(_arg2)) && (this.gc))){ this.timeline.addChild(this); }; } else { this.active = false; if (!_arg2){ this.timeline.remove(this, true); }; }; this.gc = !(_arg1); return (false); } } }//package com.greensock.core
Section 4
//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 5
//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 6
//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 7
//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 8
//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 9
//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 10
//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 11
//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 12
//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 13
//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 14
//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 15
//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 16
//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 17
//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 18
//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 19
//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 20
//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 21
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class ShortRotationPlugin extends TweenPlugin { public static const API:Number = 1; public function ShortRotationPlugin(){ this.propName = "shortRotation"; this.overwriteProps = []; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; if (typeof(_arg2) == "number"){ return (false); }; for (_local4 in _arg2) { initRotation(_arg1, _local4, _arg1[_local4], ((typeof(_arg2[_local4]))=="number") ? Number(_arg2[_local4]) : (_arg1[_local4] + Number(_arg2[_local4]))); }; return (true); } public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ var _local5:Number = ((_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 22
//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 23
//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 24
//VisiblePlugin (com.greensock.plugins.VisiblePlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class VisiblePlugin extends TweenPlugin { protected var _target:Object; protected var _initVal:Boolean; protected var _visible:Boolean; protected var _tween:TweenLite; public static const API:Number = 1; public function VisiblePlugin(){ this.propName = "visible"; this.overwriteProps = ["visible"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _tween = _arg3; _initVal = _target.visible; _visible = Boolean(_arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ if ((((_arg1 == 1)) && ((((_tween.cachedDuration == _tween.cachedTime)) || ((_tween.cachedTime == 0)))))){ _target.visible = _visible; } else { _target.visible = _initVal; }; } } }//package com.greensock.plugins
Section 25
//VolumePlugin (com.greensock.plugins.VolumePlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import flash.media.*; public class VolumePlugin extends TweenPlugin { protected var _target:Object; protected var _st:SoundTransform; public static const API:Number = 1; public function VolumePlugin(){ this.propName = "volume"; this.overwriteProps = ["volume"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){ return (false); }; _target = _arg1; _st = _target.soundTransform; addTween(_st, "volume", _st.volume, _arg2, "volume"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.soundTransform = _st; } } }//package com.greensock.plugins
Section 26
//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 27
//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.131; public static var rootTimeline:SimpleTimeline; public static var fastEaseLookup:Dictionary = new Dictionary(false); public static var onPluginEvent:Function; public static var rootFramesTimeline:SimpleTimeline; public static var defaultEase:Function = TweenLite.easeOut; public static var plugins:Object = {}; public static var masterList:Dictionary = new Dictionary(false); public static var overwriteManager:Object; public static var rootFrame:Number; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _shape:Shape = new Shape(); protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1}; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ var _local5:TweenLite; super(_arg2, _arg3); this.target = _arg1; if ((((this.target is TweenCore)) && (("timeScale" in this.vars)))){ this.cachedTimeScale = 1; }; propTweenLookup = {}; _ease = defaultEase; _overwrite = (((!((Number(_arg3.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); var _local4:Array = masterList[_arg1]; if (!_local4){ masterList[_arg1] = [this]; } else { if (_overwrite == 1){ for each (_local5 in _local4) { if (!_local5.gc){ _local5.setEnabled(false, false); }; }; masterList[_arg1] = [this]; } else { _local4[_local4.length] = this; }; }; if (((this.active) || (this.vars.immediateRender))){ renderTime(0, false, true); }; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ var _local4:Boolean; var _local5:Number = this.cachedTime; if (_arg1 >= this.cachedDuration){ this.cachedTotalTime = (this.cachedTime = this.cachedDuration); this.ratio = 1; _local4 = true; if (this.cachedDuration == 0){ if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){ _arg3 = true; }; _rawPrevTime = _arg1; }; } else { if (_arg1 <= 0){ this.cachedTotalTime = (this.cachedTime = (this.ratio = 0)); if (_arg1 < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ _arg3 = true; _local4 = true; }; _rawPrevTime = _arg1; }; }; if (((this.cachedReversed) && (!((_local5 == 0))))){ _local4 = true; }; } else { this.cachedTotalTime = (this.cachedTime = _arg1); this.ratio = _ease(_arg1, 0, 1, this.cachedDuration); }; }; if ((((this.cachedTime == _local5)) && (!(_arg3)))){ return; }; if (!this.initted){ init(); if (((!(_local4)) && (this.cachedTime))){ this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){ this.vars.onStart.apply(null, this.vars.onStartParams); }; 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){ _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 28
//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.131; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2); ; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){ 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; var _local4:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; var _local5:Number = this.cachedTime; if (_arg1 >= _local4){ this.cachedTotalTime = _local4; this.cachedTime = this.cachedDuration; this.ratio = 1; _local6 = true; if (this.cachedDuration == 0){ if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){ _arg3 = true; }; _rawPrevTime = _arg1; }; } else { if (_arg1 <= 0){ if (_arg1 < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ _arg3 = true; _local6 = true; }; _rawPrevTime = _arg1; }; }; this.cachedTotalTime = (this.cachedTime = (this.ratio = 0)); if (((this.cachedReversed) && (!((_local5 == 0))))){ _local6 = true; }; } else { this.cachedTotalTime = (this.cachedTime = _arg1); _local8 = true; }; }; if (_repeat != 0){ _local10 = (this.cachedDuration + _repeatDelay); if (_local6){ if (((this.yoyo) && ((_repeat % 2)))){ this.cachedTime = (this.ratio = 0); }; } else { if (_arg1 > 0){ if (_cyclesComplete != (_cyclesComplete = int((this.cachedTotalTime / _local10)))){ _local7 = true; }; this.cachedTime = (((this.cachedTotalTime / _local10) - _cyclesComplete) * _local10); if (((this.yoyo) && ((_cyclesComplete % 2)))){ this.cachedTime = (this.cachedDuration - this.cachedTime); } else { if (this.cachedTime >= this.cachedDuration){ this.cachedTime = this.cachedDuration; this.ratio = 1; _local8 = false; }; }; if (this.cachedTime <= 0){ this.cachedTime = (this.ratio = 0); _local8 = false; }; }; }; }; if ((((_local5 == this.cachedTime)) && (!(_arg3)))){ return; }; if (!this.initted){ init(); }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; if (_local8){ if (_easeType){ _local11 = _easePower; _local12 = (this.cachedTime / this.cachedDuration); if (_easeType == 2){ _local12 = (1 - _local12); this.ratio = _local12; while (_local11--) { this.ratio = (_local12 * this.ratio); }; this.ratio = (1 - this.ratio); } else { if (_easeType == 1){ this.ratio = _local12; while (_local11--) { this.ratio = (_local12 * this.ratio); }; } else { if (_local12 < 0.5){ _local12 = (_local12 * 2); this.ratio = _local12; while (_local11--) { this.ratio = (_local12 * this.ratio); }; this.ratio = (this.ratio * 0.5); } else { _local12 = ((1 - _local12) * 2); this.ratio = _local12; while (_local11--) { this.ratio = (_local12 * this.ratio); }; this.ratio = (1 - (0.5 * this.ratio)); }; }; }; } else { this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if ((((((_local5 == 0)) && (!((this.cachedTotalTime == 0))))) && (!(_arg2)))){ if (this.vars.onStart){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (_dispatcher){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); }; }; var _local9:PropTween = this.cachedPT1; while (_local9) { _local9.target[_local9.property] = (_local9.start + (this.ratio * _local9.change)); _local9 = _local9.nextNode; }; if (((_hasUpdate) && (!(_arg2)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (((_hasUpdateListener) && (!(_arg2)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); }; if (_local6){ if (((_hasPlugins) && (this.cachedPT1))){ onPluginEvent("onComplete", this); }; complete(true, _arg2); } else { if (((_local7) && (!(_arg2)))){ if (this.vars.onRepeat){ this.vars.onRepeat.apply(null, this.vars.onRepeatParams); }; if (_dispatcher){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT)); }; }; }; } public function willTrigger(_arg1:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1)); } protected function insertPropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String, _arg6:Boolean, _arg7:PropTween):PropTween{ var _local9:Array; var _local10:int; var _local8:PropTween = new PropTween(_arg1, _arg2, _arg3, ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4), _arg5, _arg6, _arg7); if (((_arg6) && ((_arg5 == "_MULTIPLE_")))){ _local9 = _arg1.overwriteProps; _local10 = _local9.length; while (_local10--) { this.propTweenLookup[_local9[_local10]] = _local8; }; } else { this.propTweenLookup[_arg5] = _local8; }; return (_local8); } override protected function init():void{ var _local1:TweenMax; var _local2:int; var _local3:String; var _local4:String; var _local5:Array; var _local6:Object; var _local7:PropTween; var _local8:PropTween; var _local9:int; if (this.vars.startAt){ this.vars.startAt.overwrite = 0; this.vars.startAt.immediateRender = true; _local1 = new TweenMax(this.target, 0, this.vars.startAt); }; super.init(); if ((_ease in fastEaseLookup)){ _easeType = fastEaseLookup[_ease][0]; _easePower = fastEaseLookup[_ease][1]; }; if (((!((this.vars.roundProps == null))) && (("roundProps" in TweenLite.plugins)))){ _local5 = this.vars.roundProps; _local9 = _local5.length; while (_local9--) { _local3 = _local5[_local9]; _local8 = this.cachedPT1; while (_local8) { if (_local8.name == _local3){ if (_local8.isPlugin){ _local8.target.round = true; } else { if (_local6 == null){ _local6 = new TweenLite.plugins.roundProps(); _local6.add(_local8.target, _local3, _local8.start, _local8.change); _hasPlugins = true; _local7 = insertPropTween(_local6, "changeFactor", 0, 1, "_MULTIPLE_", true, this.cachedPT1); this.cachedPT1 = _local7; } else { _local6.add(_local8.target, _local3, _local8.start, _local8.change); }; this.removePropTween(_local8); this.propTweenLookup[_local3] = _local7; }; } else { if (((((_local8.isPlugin) && ((_local8.name == "_MULTIPLE_")))) && (!(_local8.target.round)))){ _local4 = ((" " + _local8.target.overwriteProps.join(" ")) + " "); if (_local4.indexOf(((" " + _local3) + " ")) != -1){ _local8.target.round = true; }; }; }; _local8 = _local8.nextNode; }; }; }; } public function get totalProgress():Number{ return ((this.cachedTotalTime / this.totalDuration)); } public function set currentProgress(_arg1:Number):void{ if (_cyclesComplete == 0){ setTotalTime((this.duration * _arg1), false); } else { setTotalTime(((this.duration * _arg1) + (_cyclesComplete * this.cachedDuration)), false); }; } protected function adjustStartValues():void{ var _local1:Number; var _local2:PropTween; var _local3:Number; if (this.cachedTime != 0){ _local1 = (1 / (1 - this.ratio)); _local2 = this.cachedPT1; while (_local2) { if (!_local2.isPlugin){ _local3 = (_local2.start + _local2.change); _local2.change = ((_local3 - _local2.target[_local2.property]) * _local1); _local2.start = (_local3 - _local2.change); _local2 = _local2.nextNode; }; }; }; } public function get repeat():int{ return (_repeat); } public function set totalProgress(_arg1:Number):void{ setTotalTime((this.totalDuration * _arg1), false); } protected function removePropTween(_arg1:PropTween):Boolean{ if (_arg1.nextNode){ _arg1.nextNode.prevNode = _arg1.prevNode; }; if (_arg1.prevNode){ _arg1.prevNode.nextNode = _arg1.nextNode; } else { if (this.cachedPT1 == _arg1){ this.cachedPT1 = _arg1.nextNode; }; }; if (((_arg1.isPlugin) && (_arg1.target.onDisable))){ _arg1.target.onDisable(); if (_arg1.target.activeDisable){ return (true); }; }; return (false); } public function get repeatDelay():Number{ return (_repeatDelay); } protected function updateTo(_arg1:Object, _arg2:Boolean=true):void{ var _local5:String; var _local6:Object; var _local7:Boolean; var _local8:Object; var _local9:int; var _local3:PropTween = this.cachedPT1; var _local4:Number = this.cachedTotalTime; if (this.initted){ if (!_arg2){ this.totalTime = 0; }; killVars(_arg1, false); for (_local5 in _arg1) { if ((_local5 in _reservedProps)){ } else { if ((((_local5 in plugins)) && (new ((plugins[_local5] as Class)).onInitTween(this.target, _arg1[_local5], this)))){ _local8 = {}; _local9 = _local6.overwriteProps.length; while (_local9--) { _local8[_local6.overwriteProps[_local9]] = true; }; killVars(_local8, false); this.cachedPT1 = insertPropTween(_local6, "changeFactor", 0, 1, ((_local6.overwriteProps.length)==1) ? _local6.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1); _hasPlugins = true; if (_local6.priority){ this.cachedPT1.priority = _local6.priority; _local7 = true; }; } else { this.cachedPT1 = insertPropTween(this.target, _local5, this.target[_local5], _arg1[_local5], _local5, false, this.cachedPT1); }; }; this.vars[_local5] = _arg1[_local5]; }; if (_local7){ onPluginEvent("onInit", this); }; if (((_arg2) && (this.cachedTotalTime))){ adjustStartValues(); }; } else { for (_local5 in _arg1) { this.vars[_local5] = _arg1[_local5]; }; }; } public function killProperties(_arg1:Array):void{ var _local2:Object = {}; var _local3:int = _arg1.length; while (_local3--) { _local2[_arg1[_local3]] = true; }; killVars(_local2); } public function set repeat(_arg1:int):void{ _repeat = _arg1; setDirtyCache(true); } override public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{ super.complete(_arg1, _arg2); if (((!(_arg2)) && (_dispatcher))){ if ((((this.cachedTotalTime == this.cachedTotalDuration)) && (!(this.cachedReversed)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); } else { if (((this.cachedReversed) && ((this.cachedTotalTime == 0)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE)); }; }; }; } override public function invalidate():void{ this.yoyo = Boolean((this.vars.yoyo == true)); _repeat = ((this.vars.repeat) || (0)); _repeatDelay = ((this.vars.repeatDelay) || (0)); _hasUpdateListener = false; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); }; setDirtyCache(true); super.invalidate(); } public function dispatchEvent(_arg1:Event):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1)); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{ var _local4:Object = {}; _local4[_arg1] = _arg2; updateTo(_local4, _arg3); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if (_arg1 == TweenEvent.UPDATE){ _hasUpdateListener = true; }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function set repeatDelay(_arg1:Number):void{ _repeatDelay = _arg1; setDirtyCache(true); } override public function set currentTime(_arg1:Number):void{ if (_cyclesComplete == 0){ } else { if (((this.yoyo) && (((_cyclesComplete % 2) == 1)))){ _arg1 = ((this.duration - _arg1) + (_cyclesComplete * (this.cachedDuration + _repeatDelay))); } else { _arg1 = (_arg1 + (_cyclesComplete * (this.duration + _repeatDelay))); }; }; setTotalTime(_arg1, false); } public function get currentProgress():Number{ return ((this.cachedTime / this.duration)); } protected function initDispatcher():void{ if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); }; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); _hasUpdateListener = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; if ((this.vars.onRepeatListener is Function)){ _dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true); }; if ((this.vars.onReverseCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true); }; } override public function set totalDuration(_arg1:Number):void{ if (_repeat == -1){ return; }; this.duration = ((_arg1 - (_repeat * _repeatDelay)) / (_repeat + 1)); } public function hasEventListener(_arg1:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1)); } override public function get totalDuration():Number{ if (this.cacheIsDirty){ this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat)); this.cacheIsDirty = false; }; return (this.cachedTotalDuration); } public function set timeScale(_arg1:Number):void{ if (_arg1 == 0){ _arg1 = 0.0001; }; var _local2:Number = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime; this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1)); this.cachedTimeScale = _arg1; setDirtyCache(false); } public function get timeScale():Number{ return (this.cachedTimeScale); } public static function set globalTimeScale(_arg1:Number):void{ if (_arg1 == 0){ _arg1 = 0.0001; }; if (TweenLite.rootTimeline == null){ TweenLite.to({}, 0, {}); }; var _local2:SimpleTimeline = TweenLite.rootTimeline; var _local3:Number = (getTimer() * 0.001); _local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1)); _local2 = TweenLite.rootFramesTimeline; _local3 = TweenLite.rootFrame; _local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1)); TweenLite.rootFramesTimeline.cachedTimeScale = (TweenLite.rootTimeline.cachedTimeScale = _arg1); } public static function fromTo(_arg1:Object, _arg2:Number, _arg3:Object, _arg4:Object):TweenMax{ _arg4.startAt = _arg3; if (_arg3.immediateRender){ _arg4.immediateRender = true; }; return (new TweenMax(_arg1, _arg2, _arg4)); } public static function allFromTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Object, _arg5:Number=0, _arg6:Function=null, _arg7:Array=null):Array{ _arg4.startAt = _arg3; if (_arg3.immediateRender){ _arg4.immediateRender = true; }; return (allTo(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7)); } public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=true):void{ changePause(true, _arg1, _arg2); } public static function getTweensOf(_arg1:Object):Array{ var _local4:int; var _local5:uint; var _local2:Array = masterList[_arg1]; var _local3:Array = []; if (_local2){ _local4 = _local2.length; _local5 = 0; while (_local4--) { if (!_local2[_local4].gc){ var _temp1 = _local5; _local5 = (_local5 + 1); var _local6 = _temp1; _local3[_local6] = _local2[_local4]; }; }; }; return (_local3); } public static function get globalTimeScale():Number{ return (((TweenLite.rootTimeline)==null) ? 1 : TweenLite.rootTimeline.cachedTimeScale); } public static function killChildTweensOf(_arg1:DisplayObjectContainer, _arg2:Boolean=false):void{ var _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 29
//Debug (com.hexagonstar.util.debug.Debug) package com.hexagonstar.util.debug { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.system.*; public final class Debug { public static const LEVEL_WARN:int = 2; public static const LEVEL_DEBUG:int = 0; public static const LEVEL_INFO:int = 1; public static const LEVEL_FATAL:int = 4; public static const LEVEL_ERROR:int = 3; private static var _stage:Stage; private static var _filterLevel:int = 0; private static var _isEnabled:Boolean = true; private static var _isConnected:Boolean = false; private static var _isPollingFPS:Boolean = false; private static var _stopWatch:StopWatch; private static var _connection:LocalConnection; private static var _fpsMeter:FPSMeter; public static function forceGC():void{ try { } catch(e1:Error) { try { new LocalConnection().connect("forceGC"); new LocalConnection().connect("forceGC"); } catch(e2:Error) { }; }; } private static function send(_arg1:String, _arg2, _arg3:int=1, _arg4:int=0):void{ var _local5:Number; var _local6:ByteArray; if (_isEnabled){ if (!_isConnected){ _isConnected = true; _connection = new LocalConnection(); _connection.addEventListener(StatusEvent.STATUS, onStatus); }; _local5 = 0; if (typeof(_arg2) == "string"){ _local5 = String(_arg2).length; } else { if (typeof(_arg2) == "object"){ _local6 = new ByteArray(); _local6.writeObject(_arg2); _local5 = _local6.length; _local6 = null; }; }; if (_local5 > 39000){ storeDataLSO(_arg1, _arg2); _arg1 = "onLargeData"; _arg2 = null; }; _connection.send("_alcon_lc", _arg1, _arg2, _arg3, _arg4, ""); }; } public static function stop():void{ if (_fpsMeter){ _isPollingFPS = false; _fpsMeter.stop(); _fpsMeter.removeEventListener(FPSMeter.FPS_UPDATE, onFPSUpdate); _fpsMeter = null; _stage = null; }; } public static function timerReset():void{ if (_stopWatch){ _stopWatch.reset(); }; } private static function onFPSUpdate(_arg1:Event):void{ send("onFPS", ((((((_fpsMeter.fps + ",") + _stage.frameRate) + ",") + _fpsMeter.frt) + ",") + System.totalMemory)); } public static function delimiter():void{ Debug.trace("[%DLT%]", 5); } public static function set enabled(_arg1:Boolean):void{ _isEnabled = _arg1; } public static function inspect(_arg1:Object):void{ send("onInspect", _arg1, 1, -1); } public static function timerStart(_arg1:String=""):void{ if (_isEnabled){ if (!_stopWatch){ _stopWatch = new StopWatch(); }; _stopWatch.start(_arg1); }; } public static function createCategory(_arg1:int, _arg2:String="", _arg3:uint=0, _arg4:uint=0xFFFF00):void{ send("onCategory", [_arg1, _arg2, _arg3, _arg4], 0, 0); } private static function storeDataLSO(_arg1:String, _arg2):void{ var flushResult:String; var m = _arg1; var d = _arg2; var sharedObject:SharedObject = SharedObject.getLocal("alcon", "/"); sharedObject.data["alconMethod"] = m; sharedObject.data["alconData"] = d; try { flushResult = sharedObject.flush(); if (flushResult == SharedObjectFlushStatus.FLUSHED){ return; }; } catch(e:Error) { Security.showSettings(SecurityPanel.LOCAL_STORAGE); }; } public static function hexDump(_arg1:Object):void{ send("onHexDump", _arg1, 0, 0); } private static function onStatus(_arg1:StatusEvent):void{ } public static function get enabled():Boolean{ return (_isEnabled); } public static function trace(... _args):void{ var _local2:int = ((_args[1] is int)) ? _args[1] : 1; if ((((_local2 >= _filterLevel)) && ((_local2 < 7)))){ send("onData", _args[0], _local2, 0); }; } public static function timerToString():void{ if (_stopWatch){ Debug.trace(_stopWatch.toString()); }; } public static function mark(_arg1:uint=0xFF00FF):void{ send("onMarker", _arg1, 1, -1); } public static function timerInSeconds():void{ if (_stopWatch){ Debug.trace((_stopWatch.timeInSeconds + "s")); }; } public static function set filterLevel(_arg1:int):void{ if ((((_arg1 >= 0)) && ((_arg1 < 5)))){ _filterLevel = _arg1; }; } public static function monitor(_arg1:Stage, _arg2:int=500):void{ if (_isPollingFPS){ Debug.stop(); }; if (((_isEnabled) && (!(_fpsMeter)))){ _isPollingFPS = true; _stage = _arg1; sendCapabilities(); _fpsMeter = new FPSMeter(_stage, _arg2); _fpsMeter.addEventListener(FPSMeter.FPS_UPDATE, onFPSUpdate); _fpsMeter.start(); }; } public static function time():void{ Debug.trace("[%TME%]", 5); } private static function sendCapabilities():void{ var _local3:XML; var _local4:String; var _local1:XML = describeType(Capabilities); var _local2:Array = []; for each (_local3 in _local1.*) { _local4 = _local3.@name.toString(); if ((((((_local4.length > 0)) && (!((_local4 == "_internal"))))) && (!((_local4 == "prototype"))))){ _local2.push({p:_local4, v:Capabilities[_local4].toString()}); }; }; _local2.sortOn(["p"], Array.CASEINSENSITIVE); send("onCap", _local2); } public static function clear():void{ Debug.trace("[%CLR%]", 5); } public static function timerStop():void{ if (_stopWatch){ _stopWatch.stop(); }; } public static function timerInMilliSeconds():void{ if (_stopWatch){ Debug.trace((_stopWatch.timeInMilliSeconds + "ms")); }; } public static function get filterLevel():int{ return (_filterLevel); } public static function traceObj(_arg1:Object, _arg2:int=64, _arg3:int=1):void{ if ((((_arg3 >= _filterLevel)) && ((_arg3 < 7)))){ send("onData", _arg1, _arg3, _arg2); }; } public static function timerStopToString(_arg1:Boolean=false):void{ if (_stopWatch){ _stopWatch.stop(); Debug.trace(_stopWatch.toString()); if (_arg1){ _stopWatch.reset(); }; }; } public static function pause():void{ Debug.trace("[%PSE%]", 5); } } }//package com.hexagonstar.util.debug
Section 30
//FPSMeter (com.hexagonstar.util.debug.FPSMeter) package com.hexagonstar.util.debug { import flash.events.*; import flash.display.*; import flash.utils.*; public class FPSMeter extends EventDispatcher { private var _delayMax:int;// = 10 private var _pollInterval:int; private var _delay:int; private var _ms:int; private var _timer:Timer; private var _prev:int; private var _frt:int; private var _fps:int; private var _isRunning:Boolean; private var _stage:Stage; public static const FPS_UPDATE:String = "fpsUpdate"; public function FPSMeter(_arg1:Stage, _arg2:int=500){ _stage = _arg1; _pollInterval = _arg2; reset(); } public function stop():void{ if (_isRunning){ _timer.stop(); _timer.removeEventListener(TimerEvent.TIMER, onTimer); _stage.removeEventListener(Event.ENTER_FRAME, onEnterFrame); _timer = null; reset(); }; } public function reset():void{ _fps = 0; _frt = 0; _ms = 0; _delay = 0; _prev = 0; _isRunning = false; } public function start():void{ if (!_isRunning){ _isRunning = true; _timer = new Timer(_pollInterval, 0); _timer.addEventListener(TimerEvent.TIMER, onTimer); _stage.addEventListener(Event.ENTER_FRAME, onEnterFrame); _timer.start(); }; } private function onTimer(_arg1:TimerEvent):void{ dispatchEvent(new Event(FPSMeter.FPS_UPDATE)); } public function get frt():int{ return (_frt); } public function get fps():int{ return (_fps); } private function onEnterFrame(_arg1:Event):void{ var _local2:Number = getTimer(); _delay++; if (_delay >= _delayMax){ _delay = 0; _fps = int(((1000 * _delayMax) / (_local2 - _prev))); _prev = _local2; }; _frt = (_local2 - _ms); _ms = _local2; } } }//package com.hexagonstar.util.debug
Section 31
//StopWatch (com.hexagonstar.util.debug.StopWatch) package com.hexagonstar.util.debug { import flash.utils.*; public class StopWatch { private var _stopTimeKeys:Array; private var _startTimeKeys:Array; private var _started:Boolean;// = false private var _title:String; public function StopWatch(){ reset(); } public function get started():Boolean{ return (_started); } public function get timeInMilliSeconds():int{ if (_started){ _stopTimeKeys[(_startTimeKeys.length - 1)] = getTimer(); }; var _local1:int; var _local2:int; while (_local2 < _startTimeKeys.length) { _local1 = (_local1 + (_stopTimeKeys[_local2] - _startTimeKeys[_local2])); _local2++; }; return (_local1); } public function stop():void{ var _local1:int; if (_started){ _local1 = getTimer(); _stopTimeKeys[(_startTimeKeys.length - 1)] = _local1; _started = false; }; } public function toString():String{ var _local3:int; var _local4:int; var _local1 = "\n ********************* [STOPWATCH] *********************"; if (_title != ""){ _local1 = (_local1 + ("\n * " + _title)); }; var _local2:int; while (_local2 < _startTimeKeys.length) { _local3 = _startTimeKeys[_local2]; _local4 = _stopTimeKeys[_local2]; _local1 = (_local1 + (((((("\n * started [" + format(_local3)) + "ms] stopped [") + format(_local4)) + "ms] time [") + format((_local4 - _local3))) + "ms]")); _local2++; }; if (_local2 == 0){ _local1 = (_local1 + "\n * never started."); } else { _local1 = (_local1 + (("\n * total runnning time: " + timeInSeconds) + "s")); }; _local1 = (_local1 + "\n *******************************************************"); return (_local1); } public function get timeInSeconds():Number{ return ((timeInMilliSeconds / 1000)); } public function reset():void{ _startTimeKeys = []; _stopTimeKeys = []; _started = false; } private function format(_arg1:int):String{ var _local2 = ""; var _local3:int = _arg1.toString().length; var _local4:int; while (_local4 < (5 - _local3)) { _local2 = (_local2 + "0"); _local4++; }; return ((_local2 + _arg1)); } public function start(_arg1:String=""):void{ if (!_started){ _title = _arg1; _started = true; _startTimeKeys.push(getTimer()); }; } } }//package com.hexagonstar.util.debug
Section 32
//ASD (ludemes.ASD) package ludemes { import org.flixel.*; public class ASD extends FlxSprite { private var ASDImg:Class; public function ASD(_arg1:Number, _arg2:Number, _arg3:String){ ASDImg = ASD_ASDImg; super(_arg1, _arg2); loadGraphic(ASDImg, false, false, 11, 10); switch (_arg3){ case "A": frame = 0; break; case "S": frame = 1; break; case "D": frame = 2; break; }; } } }//package ludemes
Section 33
//ASD_ASDImg (ludemes.ASD_ASDImg) package ludemes { import mx.core.*; public class ASD_ASDImg extends BitmapAsset { } }//package ludemes
Section 34
//Balloon (ludemes.Balloon) package ludemes { import org.flixel.*; import com.greensock.*; public class Balloon extends FlxSprite { private var BalloonImg:Class; private var assignee:FlxSprite; public function Balloon(_arg1:int, _arg2:FlxSprite, _arg3:Number=2){ BalloonImg = Balloon_BalloonImg; super((_arg2.x + 3), 2); loadGraphic(BalloonImg, true, false, 17, 18); assignee = _arg2; addAnimation("ticket", [0, 1], 2); if (_arg1 == 0){ this.play("ticket"); } else { this.frame = _arg1; }; TweenMax.delayedCall(_arg3, suicide); } override public function update():void{ this.x = (assignee.x + 3); super.update(); } private function suicide():void{ this.kill(); } } }//package ludemes
Section 35
//Balloon_BalloonImg (ludemes.Balloon_BalloonImg) package ludemes { import mx.core.*; public class Balloon_BalloonImg extends BitmapAsset { } }//package ludemes
Section 36
//Door (ludemes.Door) package ludemes { import org.flixel.*; public class Door extends FlxSprite { private var opened:Boolean;// = false private var LuggageImg:Class; private static var type:int = 0; public function Door(_arg1:Number=0, _arg2:Number=0){ LuggageImg = Door_LuggageImg; super(_arg1, _arg2); this.loadGraphic(LuggageImg, false, false, 20, 50); addAnimation("open", [0, 1, 2, 3], 20, false); addAnimation("slowOpen", [0, 1, 2, 3], 8, false); } override public function update():void{ if (!opened){ if ((((this.x >= (Globals.player.x + 6))) && ((this.x <= (Globals.player.x + 12))))){ opened = true; if (Globals.player.playingAnimation != "shove"){ Globals.player.velocity.x = 40; play("slowOpen"); } else { Globals.scoreText.score++; play("open"); }; }; }; super.update(); if (this.x < (Globals.player.x - 30)){ this.active = false; }; } } }//package ludemes
Section 37
//Door_LuggageImg (ludemes.Door_LuggageImg) package ludemes { import mx.core.*; public class Door_LuggageImg extends BitmapAsset { } }//package ludemes
Section 38
//FinalSadPlayer (ludemes.FinalSadPlayer) package ludemes { import org.flixel.*; public class FinalSadPlayer extends FlxSprite { private var PlayersImg:Class; public function FinalSadPlayer(_arg1:Number=0, _arg2:Number=0, _arg3:Class=null){ PlayersImg = FinalSadPlayer_PlayersImg; super(_arg1, _arg2); loadGraphic(PlayersImg, false, true, 24, 30); frame = 1; } } }//package ludemes
Section 39
//FinalSadPlayer_PlayersImg (ludemes.FinalSadPlayer_PlayersImg) package ludemes { import mx.core.*; public class FinalSadPlayer_PlayersImg extends BitmapAsset { } }//package ludemes
Section 40
//FlixelLogo (ludemes.FlixelLogo) package ludemes { import org.flixel.*; public class FlixelLogo extends FlxSprite { private var LogoImg:Class; public function FlixelLogo(_arg1:Number=0, _arg2:Number=0){ LogoImg = FlixelLogo_LogoImg; super(_arg1, _arg2, LogoImg); } } }//package ludemes
Section 41
//FlixelLogo_LogoImg (ludemes.FlixelLogo_LogoImg) package ludemes { import mx.core.*; public class FlixelLogo_LogoImg extends BitmapAsset { } }//package ludemes
Section 42
//Inspector (ludemes.Inspector) package ludemes { import org.flixel.*; import com.greensock.*; import states.*; public class Inspector extends FlxSprite { public var playingAnimation:String;// = "" private var InspectorImg:Class; public var moveSpeed:int;// = 0 public function Inspector(_arg1:Number, _arg2:Number):void{ InspectorImg = Inspector_InspectorImg; super(_arg1, _arg2); loadGraphic(InspectorImg, true, false, 24, 30); addAnimation("stopped", [0]); addAnimation("run", [10, 11, 12, 13, 14, 15, 16, 17, 18, 19], 9); Globals.inspector = this; } override public function update():void{ if (this.x >= (Globals.player.x - 10)){ this.velocity.x = 0; this.play("stopped"); this.x = (Globals.player.x - 15); (FlxG.state as PlayState).createBalloon(3, this, 5); this.active = false; if (Globals.player.active){ Globals.player.y = 21; Globals.player.frame = 1; Globals.player.active = false; TweenMax.delayedCall(3, (FlxG.state as PlayState).goToScores); }; return; }; if (this.x < (Globals.player.x - 100)){ maxVelocity.x = 130; } else { maxVelocity.x = 100; if (Globals.scoreText.score > 20){ maxVelocity.x = 110; }; if (Globals.scoreText.score > 40){ maxVelocity.x = 115; }; if (Globals.scoreText.score > 60){ maxVelocity.x = 120; }; if (Globals.scoreText.score > 80){ maxVelocity.x = 125; }; if (Globals.scoreText.score > 150){ maxVelocity.x = 128; }; }; velocity.x = (velocity.x + (moveSpeed * FlxG.elapsed)); if (velocity.x == 0){ play("stopped"); playingAnimation = "stopped"; } else { play("run"); playingAnimation = "run"; }; super.update(); } } }//package ludemes
Section 43
//Inspector_InspectorImg (ludemes.Inspector_InspectorImg) package ludemes { import mx.core.*; public class Inspector_InspectorImg extends BitmapAsset { } }//package ludemes
Section 44
//Luggage (ludemes.Luggage) package ludemes { import org.flixel.*; public class Luggage extends FlxSprite { private var trippedOn:Boolean;// = false private var LuggageImg:Class; private static var type:int = 0; public function Luggage(_arg1:Number=0, _arg2:Number=0){ LuggageImg = Luggage_LuggageImg; super(_arg1, _arg2); this.drag.x = 50; this.loadGraphic(LuggageImg, false, false, 12, 12); this.frame = Luggage.type; if (Luggage.type == 5){ Luggage.type = 0; } else { Luggage.type++; }; } override public function update():void{ if (!trippedOn){ if ((((this.x >= (Globals.player.x + 3))) && ((this.x <= (Globals.player.x + 9))))){ if (Globals.player.y > 13){ trippedOn = true; this.velocity.x = 30; this.frame = (this.frame + 6); Globals.player.velocity.x = 50; }; }; }; super.update(); if (this.x < (Globals.player.x - 10)){ if (this.trippedOn){ } else { Globals.scoreText.score++; }; this.active = false; }; } } }//package ludemes
Section 45
//Luggage_LuggageImg (ludemes.Luggage_LuggageImg) package ludemes { import mx.core.*; public class Luggage_LuggageImg extends BitmapAsset { } }//package ludemes
Section 46
//OtherTrain (ludemes.OtherTrain) package ludemes { import org.flixel.*; public class OtherTrain extends FlxGroup { private var nWagons:int;// = 5 public function OtherTrain():void{ var _local2:Wagon; super(); this.width = (347 * nWagons); var _local1:int; while (_local1 < nWagons) { _local2 = new Wagon((347 * _local1), 0); this.add(_local2); _local1++; }; visible = false; } override public function update():void{ if (this.x < ((Globals.player.x - this.width) - 200)){ visible = false; active = false; }; super.update(); } } }//package ludemes
Section 47
//PauseScreen (ludemes.PauseScreen) package ludemes { import org.flixel.*; public class PauseScreen extends FlxGroup { public function PauseScreen(){ scrollFactor.x = 0; scrollFactor.y = 0; var _local1:uint = 250; var _local2:uint = 75; x = ((FlxG.width - _local1) / 2); y = 0; add(new FlxSprite().createGraphic(_local1, _local2, 3422552064, true), true); add(new FlxText(0, 0, _local1, "PAUSED").setFormat(null, 16, 0xFFFFFF, "center"), true); add(new ASD(15, 30, "A")); add(new FlxText(27, 26, 150, "Jump luggage")); add(new ASD(105, 30, "S")); add(new FlxText(117, 26, 150, "Shove doors")); add(new ASD(190, 30, "D")); add(new FlxText(204, 26, 50, "Slide")); } } }//package ludemes
Section 48
//People (ludemes.People) package ludemes { import org.flixel.*; public class People extends FlxSprite { private var PeopleGraphics:Class; private var nPeople:int;// = 4 private static var type:int = 0; public function People(_arg1:Number=0, _arg2:Number=0){ PeopleGraphics = People_PeopleGraphics; super(_arg1, _arg2); this.loadGraphic(PeopleGraphics, false, false, 25, 30); this.frame = People.type; People.type++; if (People.type == nPeople){ People.type = 0; //unresolved jump }; } override public function update():void{ if (this.x < Globals.player.x){ this.frame = (this.frame + nPeople); this.active = false; }; super.update(); } } }//package ludemes
Section 49
//People_PeopleGraphics (ludemes.People_PeopleGraphics) package ludemes { import mx.core.*; public class People_PeopleGraphics extends BitmapAsset { } }//package ludemes
Section 50
//PixelButton (ludemes.PixelButton) package ludemes { import org.flixel.*; public class PixelButton extends FlxButton { private var Img:Class; public function PixelButton(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Function):void{ var _local5:FlxSprite; var _local6:FlxSprite; Img = PixelButton_Img; super(_arg1, _arg2, _arg4); _local5 = new FlxSprite(0, 0); _local5.loadGraphic(Img, false, false, 70, 15); _local5.frame = (_arg3 * 2); _local6 = new FlxSprite(0, 0); _local6.loadGraphic(Img, false, false, 70, 15); _local6.frame = ((_arg3 * 2) + 1); loadGraphic(_local5, _local6); } override public function update():void{ super.update(); } } }//package ludemes
Section 51
//PixelButton_Img (ludemes.PixelButton_Img) package ludemes { import mx.core.*; public class PixelButton_Img extends BitmapAsset { } }//package ludemes
Section 52
//Player (ludemes.Player) package ludemes { import org.flixel.*; public class Player extends FlxSprite { private var PlayersImg:Class; private var _jump_power:int;// = 95 public var playingAnimation:String;// = "" public var moveSpeed:int;// = 0 public function Player(_arg1:Number, _arg2:Number):void{ PlayersImg = Player_PlayersImg; super(_arg1, _arg2); loadGraphic(PlayersImg, true, false, 24, 30); maxVelocity.x = 130; maxVelocity.y = 100; acceleration.y = 420; addAnimation("stopped", [0]); addAnimation("caught", [1]); addAnimation("rightLegJump", [13, 14], 2); addAnimation("leftLegJump", [18, 19], 2); addAnimation("run", [10, 11, 12, 13, 14, 15, 16, 17, 18, 19], 10); addAnimation("shove", [20, 21, 22, 23, 24, 24, 24, 26], 15, false); addAnimation("slide", [30, 31, 32, 33, 33, 34, 34, 35], 15, false); Globals.player = this; } override public function update():void{ if ((((((playingAnimation == "shove")) && ((_curFrame == (_curAnim.frames.length - 1))))) || ((((playingAnimation == "slide")) && ((_curFrame == (_curAnim.frames.length - 1))))))){ playingAnimation = "run"; }; velocity.x = (velocity.x + (moveSpeed * FlxG.elapsed)); if (((((FlxG.keys.justPressed("A")) && ((velocity.y == 0)))) && (!((velocity.x == 0))))){ velocity.y = -(_jump_power); }; if (((((((((FlxG.keys.justPressed("S")) && ((velocity.y == 0)))) && (!((velocity.x == 0))))) && ((Globals.mode > Globals.EASY)))) || ((playingAnimation == "shove")))){ play("shove"); playingAnimation = "shove"; } else { if (((((((((FlxG.keys.justPressed("D")) && ((velocity.y == 0)))) && (!((velocity.x == 0))))) && ((Globals.mode > Globals.NORMAL)))) || ((playingAnimation == "slide")))){ play("slide"); playingAnimation = "slide"; } else { if (velocity.y != 0){ if ((((frame >= 10)) && ((frame <= 14)))){ play("rightLegJump"); playingAnimation = "rightLegJump"; } else { play("leftLegJump"); playingAnimation = "leftLegJump"; }; } else { if (velocity.x == 0){ play("stopped"); playingAnimation = "stopped"; } else { play("run"); playingAnimation = "run"; }; }; }; }; super.update(); } } }//package ludemes
Section 53
//Player_PlayersImg (ludemes.Player_PlayersImg) package ludemes { import mx.core.*; public class Player_PlayersImg extends BitmapAsset { } }//package ludemes
Section 54
//ScoreText (ludemes.ScoreText) package ludemes { import org.flixel.*; public class ScoreText extends FlxGroup { private var txt1:FlxText; private var _score:int;// = 0 public function ScoreText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:String=null){ var _local5:String = ("Score: " + _score); scrollFactor = new FlxPoint(0, 0); txt1 = new FlxText(_arg1, _arg2, _arg3, _local5); txt1.shadow = 1; this.add(txt1, true); } public function set score(_arg1:int):void{ _score = _arg1; var _local2:String = ("Score: " + _score); txt1.text = _local2; } public function get score():int{ return (_score); } } }//package ludemes
Section 55
//SeatedPeople (ludemes.SeatedPeople) package ludemes { import org.flixel.*; public class SeatedPeople extends FlxSprite { private var PeopleGraphics:Class; private var nPeople:int;// = 5 private static var type:int = 0; public function SeatedPeople(_arg1:Number=0, _arg2:Number=0){ PeopleGraphics = SeatedPeople_PeopleGraphics; super(_arg1, _arg2); this.loadGraphic(PeopleGraphics, false, false, 40, 30); this.frame = SeatedPeople.type; SeatedPeople.type++; if (SeatedPeople.type == nPeople){ SeatedPeople.type = 0; //unresolved jump }; } override public function update():void{ if (this.x < Globals.player.x){ this.frame = (this.frame + nPeople); this.active = false; }; super.update(); } } }//package ludemes
Section 56
//SeatedPeople_PeopleGraphics (ludemes.SeatedPeople_PeopleGraphics) package ludemes { import mx.core.*; public class SeatedPeople_PeopleGraphics extends BitmapAsset { } }//package ludemes
Section 57
//StillInspector (ludemes.StillInspector) package ludemes { import org.flixel.*; import com.greensock.*; import states.*; public class StillInspector extends FlxSprite { private var InspectorImg:Class; private var slidedUnder:Boolean;// = false private var leg:StillInspectorLeg; public function StillInspector(_arg1:Number, _arg2:Number, _arg3:StillInspectorLeg){ InspectorImg = StillInspector_InspectorImg; super(_arg1, _arg2); this.leg = _arg3; this.loadGraphic(InspectorImg, false, false, 20, 30); } override public function update():void{ if (!slidedUnder){ if ((((this.x >= (Globals.player.x + 6))) && ((this.x <= (Globals.player.x + 12))))){ slidedUnder = true; if (Globals.player.playingAnimation != "slide"){ (FlxG.state as PlayState).createBalloon(3, this, 5); Globals.player.active = false; Globals.player.y = 21; Globals.player.frame = 1; TweenMax.delayedCall(4, (FlxG.state as PlayState).goToScores); } else { Globals.scoreText.score++; frame = 1; }; }; }; super.update(); if (this.x < (Globals.player.x - 30)){ this.active = false; }; } } }//package ludemes
Section 58
//StillInspector_InspectorImg (ludemes.StillInspector_InspectorImg) package ludemes { import mx.core.*; public class StillInspector_InspectorImg extends BitmapAsset { } }//package ludemes
Section 59
//StillInspectorLeg (ludemes.StillInspectorLeg) package ludemes { import org.flixel.*; public class StillInspectorLeg extends FlxSprite { private var InspectorLegImg:Class; public function StillInspectorLeg(_arg1:Number=0, _arg2:Number=0){ InspectorLegImg = StillInspectorLeg_InspectorLegImg; super(_arg1, _arg2); this.loadGraphic(InspectorLegImg, false, false, 20, 30); this.active = false; } } }//package ludemes
Section 60
//StillInspectorLeg_InspectorLegImg (ludemes.StillInspectorLeg_InspectorLegImg) package ludemes { import mx.core.*; public class StillInspectorLeg_InspectorLegImg extends BitmapAsset { } }//package ludemes
Section 61
//TCLogo (ludemes.TCLogo) package ludemes { import org.flixel.*; public class TCLogo extends FlxSprite { private var LogoImg:Class; public function TCLogo(_arg1:Number=0, _arg2:Number=0){ LogoImg = TCLogo_LogoImg; super(_arg1, _arg2, LogoImg); } } }//package ludemes
Section 62
//TCLogo_LogoImg (ludemes.TCLogo_LogoImg) package ludemes { import mx.core.*; public class TCLogo_LogoImg extends BitmapAsset { } }//package ludemes
Section 63
//TitleScreen (ludemes.TitleScreen) package ludemes { import org.flixel.*; public class TitleScreen extends FlxSprite { private var TitleImg:Class; public function TitleScreen():void{ TitleImg = TitleScreen_TitleImg; super(0, 0, TitleImg); } } }//package ludemes
Section 64
//TitleScreen_TitleImg (ludemes.TitleScreen_TitleImg) package ludemes { import mx.core.*; public class TitleScreen_TitleImg extends BitmapAsset { } }//package ludemes
Section 65
//Wagon (ludemes.Wagon) package ludemes { import org.flixel.*; public class Wagon extends FlxSprite { private var TileMap:Class; public function Wagon(_arg1:Number=0, _arg2:Number=0){ TileMap = Wagon_TileMap; super(_arg1, _arg2, TileMap); this.width = 347; this.height = 50; this.loadGraphic(TileMap, false, false, 347, 50); this.frame = 2; } } }//package ludemes
Section 66
//Wagon_TileMap (ludemes.Wagon_TileMap) package ludemes { import mx.core.*; public class Wagon_TileMap extends BitmapAsset { } }//package ludemes
Section 67
//WarningSign (ludemes.WarningSign) package ludemes { import org.flixel.*; public class WarningSign extends FlxSprite { private var LogoImg:Class; public function WarningSign(_arg1:Number=0, _arg2:Number=0){ LogoImg = WarningSign_LogoImg; super(_arg1, _arg2, LogoImg); } } }//package ludemes
Section 68
//WarningSign_LogoImg (ludemes.WarningSign_LogoImg) package ludemes { import mx.core.*; public class WarningSign_LogoImg extends BitmapAsset { } }//package ludemes
Section 69
//MochiBot (mochi.as3.MochiBot) package mochi.as3 { 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 mochi.as3
Section 70
//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 71
//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 72
//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 73
//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 74
//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 75
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; import flash.utils.*; import flash.system.*; 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 76
//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 77
//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 78
//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 79
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.5.0.12683"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } 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; } } }//package mx.core
Section 80
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 81
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.5.0.12683"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 82
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 83
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 84
//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 85
//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 86
//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 87
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 88
//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.5.0.12683"; 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 89
//FlxAnim (org.flixel.data.FlxAnim) package org.flixel.data { public class FlxAnim { public var delay:Number; public var frames:Array; public var looped:Boolean; public var name:String; public function FlxAnim(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true){ name = _arg1; delay = 0; if (_arg3 > 0){ delay = (1 / _arg3); }; frames = _arg2; looped = _arg4; } } }//package org.flixel.data
Section 90
//FlxConsole (org.flixel.data.FlxConsole) package org.flixel.data { import flash.display.*; import org.flixel.*; import flash.text.*; public class FlxConsole extends Sprite { protected const MAX_CONSOLE_LINES:uint = 0x0100; protected var _lines:Array; public var lastElapsed:Number; protected var _text:TextField; protected var _fpsUpdate:Boolean; protected var _console:Sprite; protected var _Y:Number; protected var _curFPS:uint; protected var _fps:Array; protected var _bx:int; protected var _by:int; protected var _fpsDisplay:TextField; protected var _YT:Number; protected var _byt:int; public function FlxConsole(_arg1:uint, _arg2:uint, _arg3:uint){ visible = false; x = (_arg1 * _arg3); _by = (_arg2 * _arg3); _byt = (_by - (FlxG.height * _arg3)); _YT = (_Y = (y = _byt)); var _local4:Bitmap = new Bitmap(new BitmapData((FlxG.width * _arg3), (FlxG.height * _arg3), true, 2130706432)); addChild(_local4); _fps = new Array(8); _curFPS = 0; _fpsUpdate = true; _text = new TextField(); _text.width = _local4.width; _text.height = _local4.height; _text.multiline = true; _text.wordWrap = true; _text.embedFonts = true; _text.antiAliasType = AntiAliasType.NORMAL; _text.gridFitType = GridFitType.PIXEL; _text.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF); addChild(_text); _fpsDisplay = new TextField(); _fpsDisplay.width = _local4.width; _fpsDisplay.height = 20; _fpsDisplay.multiline = true; _fpsDisplay.wordWrap = true; _fpsDisplay.embedFonts = true; _fpsDisplay.antiAliasType = AntiAliasType.NORMAL; _fpsDisplay.gridFitType = GridFitType.PIXEL; _fpsDisplay.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, true, null, null, null, null, "right"); addChild(_fpsDisplay); _lines = new Array(); } public function log(_arg1:String):void{ var _local2:String; var _local3:uint; if (_arg1 == null){ _arg1 = "NULL"; }; trace(_arg1); _lines.push(_arg1); if (_lines.length > MAX_CONSOLE_LINES){ _lines.shift(); _local2 = ""; _local3 = 0; while (_local3 < _lines.length) { _local2 = (_local2 + (_lines[_local3] + "\n")); _local3++; }; _text.text = _local2; } else { _text.appendText((_arg1 + "\n")); }; _text.scrollV = _text.height; } public function update():void{ var _local1:uint; var _local2:uint; if (visible){ _fps[_curFPS] = (1 / lastElapsed); if (++_curFPS >= _fps.length){ _curFPS = 0; }; _fpsUpdate = !(_fpsUpdate); if (_fpsUpdate){ _local1 = 0; _local2 = 0; while (_local2 < _fps.length) { _local1 = (_local1 + _fps[_local2]); _local2++; }; _fpsDisplay.text = (Math.floor((_local1 / _fps.length)) + " fps"); }; }; if (_Y < _YT){ _Y = (_Y + ((FlxG.height * 10) * FlxG.elapsed)); } else { if (_Y > _YT){ _Y = (_Y - ((FlxG.height * 10) * FlxG.elapsed)); }; }; if (_Y > _by){ _Y = _by; } else { if (_Y < _byt){ _Y = _byt; visible = false; }; }; y = Math.floor(_Y); } public function toggle():void{ if (_YT == _by){ _YT = _byt; } else { _YT = _by; visible = true; }; } } }//package org.flixel.data
Section 91
//FlxFade (org.flixel.data.FlxFade) package org.flixel.data { import org.flixel.*; public class FlxFade extends FlxSprite { protected var _delay:Number; protected var _complete:Function; public function FlxFade(){ createGraphic(FlxG.width, FlxG.height, 0, true); scrollFactor.x = 0; scrollFactor.y = 0; exists = false; } override public function update():void{ alpha = (alpha + (FlxG.elapsed / _delay)); if (alpha >= 1){ alpha = 1; if (_complete != null){ _complete(); }; }; } public function start(_arg1:uint=4278190080, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{ if (((!(_arg4)) && (exists))){ return; }; fill(_arg1); _delay = _arg2; _complete = _arg3; alpha = 0; exists = true; } public function stop():void{ exists = false; } } }//package org.flixel.data
Section 92
//FlxFlash (org.flixel.data.FlxFlash) package org.flixel.data { import org.flixel.*; public class FlxFlash extends FlxSprite { protected var _delay:Number; protected var _complete:Function; public function FlxFlash(){ createGraphic(FlxG.width, FlxG.height, 0, true); scrollFactor.x = 0; scrollFactor.y = 0; exists = false; } override public function update():void{ alpha = (alpha - (FlxG.elapsed / _delay)); if (alpha <= 0){ exists = false; if (_complete != null){ _complete(); }; }; } public function start(_arg1:uint=4294967295, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{ if (((!(_arg4)) && (exists))){ return; }; fill(_arg1); _delay = _arg2; _complete = _arg3; alpha = 1; exists = true; } public function stop():void{ exists = false; } } }//package org.flixel.data
Section 93
//FlxKeyboard (org.flixel.data.FlxKeyboard) package org.flixel.data { import flash.events.*; public class FlxKeyboard { protected const _t:uint = 0x0100; public var RIGHT:Boolean; public var LEFT:Boolean; public var FOUR:Boolean; public var TWO:Boolean; public var CONTROL:Boolean; public var A:Boolean; public var B:Boolean; public var C:Boolean; public var D:Boolean; public var E:Boolean; public var ONE:Boolean; public var G:Boolean; public var H:Boolean; public var I:Boolean; public var J:Boolean; public var K:Boolean; public var F:Boolean; public var N:Boolean; public var O:Boolean; public var Q:Boolean; public var R:Boolean; public var S:Boolean; public var T:Boolean; public var U:Boolean; public var MINUS:Boolean; public var Y:Boolean; public var L:Boolean; public var Z:Boolean; public var QUOTE:Boolean; public var V:Boolean; public var X:Boolean; public var P:Boolean; public var SHIFT:Boolean; public var SLASH:Boolean; public var BACKSPACE:Boolean; public var EIGHT:Boolean; public var W:Boolean; public var M:Boolean; public var THREE:Boolean; public var ESCAPE:Boolean; public var SEMICOLON:Boolean; public var CAPSLOCK:Boolean; protected var _lookup:Object; public var PLUS:Boolean; protected var _map:Array; public var ZERO:Boolean; public var DOWN:Boolean; public var F1:Boolean; public var F2:Boolean; public var F3:Boolean; public var F4:Boolean; public var F5:Boolean; public var F6:Boolean; public var F7:Boolean; public var NINE:Boolean; public var F9:Boolean; public var ALT:Boolean; public var F8:Boolean; public var DELETE:Boolean; public var LBRACKET:Boolean; public var UP:Boolean; public var ENTER:Boolean; public var FIVE:Boolean; public var SIX:Boolean; public var COMMA:Boolean; public var PERIOD:Boolean; public var BACKSLASH:Boolean; public var F10:Boolean; public var F11:Boolean; public var F12:Boolean; public var SEVEN:Boolean; public var SPACE:Boolean; public var RBRACKET:Boolean; public function FlxKeyboard(){ var _local1:uint; _lookup = new Object(); _map = new Array(_t); _local1 = 65; while (_local1 <= 90) { addKey(String.fromCharCode(_local1), _local1); _local1++; }; _local1 = 48; var _temp1 = _local1; _local1 = (_local1 + 1); addKey("ZERO", _temp1); var _temp2 = _local1; _local1 = (_local1 + 1); addKey("ONE", _temp2); var _temp3 = _local1; _local1 = (_local1 + 1); addKey("TWO", _temp3); var _temp4 = _local1; _local1 = (_local1 + 1); addKey("THREE", _temp4); var _temp5 = _local1; _local1 = (_local1 + 1); addKey("FOUR", _temp5); var _temp6 = _local1; _local1 = (_local1 + 1); addKey("FIVE", _temp6); var _temp7 = _local1; _local1 = (_local1 + 1); addKey("SIX", _temp7); var _temp8 = _local1; _local1 = (_local1 + 1); addKey("SEVEN", _temp8); var _temp9 = _local1; _local1 = (_local1 + 1); addKey("EIGHT", _temp9); var _temp10 = _local1; _local1 = (_local1 + 1); addKey("NINE", _temp10); _local1 = 1; while (_local1 <= 12) { addKey(("F" + _local1), (111 + _local1)); _local1++; }; addKey("ESCAPE", 27); addKey("MINUS", 189); addKey("PLUS", 187); addKey("DELETE", 46); addKey("BACKSPACE", 8); addKey("LBRACKET", 219); addKey("RBRACKET", 221); addKey("BACKSLASH", 220); addKey("CAPSLOCK", 20); addKey("SEMICOLON", 186); addKey("QUOTE", 222); addKey("ENTER", 13); addKey("SHIFT", 16); addKey("COMMA", 188); addKey("PERIOD", 190); addKey("SLASH", 191); addKey("CONTROL", 17); addKey("ALT", 18); addKey("SPACE", 32); addKey("UP", 38); addKey("DOWN", 40); addKey("LEFT", 37); addKey("RIGHT", 39); } public function handleKeyUp(_arg1:KeyboardEvent):void{ var _local2:Object = _map[_arg1.keyCode]; if (_local2 == null){ return; }; if (_local2.current > 0){ _local2.current = -1; } else { _local2.current = 0; }; this[_local2.name] = false; } public function pressed(_arg1:String):Boolean{ return (this[_arg1]); } public function justReleased(_arg1:String):Boolean{ return ((_map[_lookup[_arg1]].current == -1)); } public function handleKeyDown(_arg1:KeyboardEvent):void{ var _local2:Object = _map[_arg1.keyCode]; if (_local2 == null){ return; }; if (_local2.current > 0){ _local2.current = 1; } else { _local2.current = 2; }; this[_local2.name] = true; } public function reset():void{ var _local2:Object; var _local1:uint; while (_local1 < _t) { if (_map[_local1] == null){ } else { _local2 = _map[_local1]; this[_local2.name] = false; _local2.current = 0; _local2.last = 0; }; _local1++; }; } public function justPressed(_arg1:String):Boolean{ return ((_map[_lookup[_arg1]].current == 2)); } public function update():void{ var _local2:Object; var _local1:uint; while (_local1 < _t) { if (_map[_local1] == null){ } else { _local2 = _map[_local1]; if ((((_local2.last == -1)) && ((_local2.current == -1)))){ _local2.current = 0; } else { if ((((_local2.last == 2)) && ((_local2.current == 2)))){ _local2.current = 1; }; }; _local2.last = _local2.current; }; _local1++; }; } protected function addKey(_arg1:String, _arg2:uint):void{ _lookup[_arg1] = _arg2; _map[_arg2] = {name:_arg1, current:0, last:0}; } } }//package org.flixel.data
Section 94
//FlxKong (org.flixel.data.FlxKong) package org.flixel.data { import flash.events.*; import flash.display.*; import flash.net.*; public class FlxKong extends Sprite { public var API; public function FlxKong(){ API = null; } public function init():void{ var _local1:Object = LoaderInfo(root.loaderInfo).parameters; var _local2:String = ((_local1.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf")); var _local3:URLRequest = new URLRequest(_local2); var _local4:Loader = new Loader(); _local4.contentLoaderInfo.addEventListener(Event.COMPLETE, APILoaded); _local4.load(_local3); this.addChild(_local4); } protected function APILoaded(_arg1:Event):void{ API = _arg1.target.content; API.services.connect(); } } }//package org.flixel.data
Section 95
//FlxList (org.flixel.data.FlxList) package org.flixel.data { import org.flixel.*; public class FlxList { public var next:FlxList; public var object:FlxObject; public function FlxList(){ object = null; next = null; } } }//package org.flixel.data
Section 96
//FlxMouse (org.flixel.data.FlxMouse) package org.flixel.data { import flash.events.*; import org.flixel.*; public class FlxMouse { protected var ImgDefaultCursor:Class; protected var _out:Boolean; public var cursor:FlxSprite; public var screenY:int; protected var _last:int; public var x:int; public var y:int; protected var _current:int; public var screenX:int; public function FlxMouse(){ ImgDefaultCursor = FlxMouse_ImgDefaultCursor; super(); x = 0; y = 0; screenX = 0; screenY = 0; _current = 0; _last = 0; cursor = null; _out = false; } public function hide():void{ if (cursor != null){ cursor.visible = false; _out = false; }; } public function update(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):void{ screenX = _arg1; screenY = _arg2; x = (screenX - FlxU.floor(_arg3)); y = (screenY - FlxU.floor(_arg4)); if (cursor != null){ cursor.x = x; cursor.y = y; }; if ((((_last == -1)) && ((_current == -1)))){ _current = 0; } else { if ((((_last == 2)) && ((_current == 2)))){ _current = 1; }; }; _last = _current; } public function reset():void{ _current = 0; _last = 0; } public function justReleased():Boolean{ return ((_current == -1)); } public function handleMouseOver(_arg1:MouseEvent):void{ if (cursor != null){ cursor.visible = _out; }; } public function handleMouseDown(_arg1:MouseEvent):void{ if (_current > 0){ _current = 1; } else { _current = 2; }; } public function pressed():Boolean{ return ((_current > 0)); } public function justPressed():Boolean{ return ((_current == 2)); } public function load(_arg1:Class, _arg2:int=0, _arg3:int=0):void{ if (_arg1 == null){ _arg1 = ImgDefaultCursor; }; cursor = new FlxSprite(screenX, screenY, _arg1); cursor.offset.x = _arg2; cursor.offset.y = _arg3; } public function handleMouseUp(_arg1:MouseEvent):void{ if (_current > 0){ _current = -1; } else { _current = 0; }; } public function handleMouseOut(_arg1:MouseEvent):void{ if (cursor != null){ _out = cursor.visible; cursor.visible = false; }; } public function show(_arg1:Class=null, _arg2:int=0, _arg3:int=0):void{ _out = true; if (_arg1 != null){ load(_arg1, _arg2, _arg3); } else { if (cursor != null){ cursor.visible = true; } else { load(null); }; }; } public function unload():void{ if (cursor != null){ if (cursor.visible){ load(null); } else { cursor = null; }; }; } } }//package org.flixel.data
Section 97
//FlxMouse_ImgDefaultCursor (org.flixel.data.FlxMouse_ImgDefaultCursor) package org.flixel.data { import mx.core.*; public class FlxMouse_ImgDefaultCursor extends BitmapAsset { } }//package org.flixel.data
Section 98
//FlxPanel (org.flixel.data.FlxPanel) package org.flixel.data { import org.flixel.*; import flash.ui.*; public class FlxPanel extends FlxObject { protected var _close:FlxButton; protected var _digg:FlxButton; protected var _gameTitle:String; protected var _closed:Boolean; protected var _payPalID:String; protected var _donate:FlxButton; private var ImgClose:Class; protected var _topBar:FlxSprite; protected var _ty:Number; protected var _caption:FlxText; protected var _initialized:Boolean; protected var _twitter:FlxButton; protected var _delicious:FlxButton; protected var _stumble:FlxButton; private var ImgDelicious:Class; private var ImgTwitter:Class; protected var _mainBar:FlxSprite; protected var _gameURL:String; private var ImgStumble:Class; private var ImgReddit:Class; private var ImgDigg:Class; protected var _bottomBar:FlxSprite; protected var _payPalAmount:Number; protected var _s:Number; private var ImgDonate:Class; protected var _reddit:FlxButton; public function FlxPanel(){ ImgDonate = FlxPanel_ImgDonate; ImgStumble = FlxPanel_ImgStumble; ImgDigg = FlxPanel_ImgDigg; ImgReddit = FlxPanel_ImgReddit; ImgDelicious = FlxPanel_ImgDelicious; ImgTwitter = FlxPanel_ImgTwitter; ImgClose = FlxPanel_ImgClose; super(); y = -21; _ty = y; _closed = false; _initialized = false; _topBar = new FlxSprite(); _topBar.createGraphic(FlxG.width, 1, 2147483647); _topBar.scrollFactor.x = 0; _topBar.scrollFactor.y = 0; _mainBar = new FlxSprite(); _mainBar.createGraphic(FlxG.width, 19, 2130706432); _mainBar.scrollFactor.x = 0; _mainBar.scrollFactor.y = 0; _bottomBar = new FlxSprite(); _bottomBar.createGraphic(FlxG.width, 1, 2147483647); _bottomBar.scrollFactor.x = 0; _bottomBar.scrollFactor.y = 0; _donate = new FlxButton(3, 0, onDonate); _donate.loadGraphic(new FlxSprite(0, 0, ImgDonate)); _donate.scrollFactor.x = 0; _donate.scrollFactor.y = 0; _stumble = new FlxButton(((((((FlxG.width / 2) - 6) - 13) - 6) - 13) - 6), 0, onStumble); _stumble.loadGraphic(new FlxSprite(0, 0, ImgStumble)); _stumble.scrollFactor.x = 0; _stumble.scrollFactor.y = 0; _digg = new FlxButton(((((FlxG.width / 2) - 6) - 13) - 6), 0, onDigg); _digg.loadGraphic(new FlxSprite(0, 0, ImgDigg)); _digg.scrollFactor.x = 0; _digg.scrollFactor.y = 0; _reddit = new FlxButton(((FlxG.width / 2) - 6), 0, onReddit); _reddit.loadGraphic(new FlxSprite(0, 0, ImgReddit)); _reddit.scrollFactor.x = 0; _reddit.scrollFactor.y = 0; _delicious = new FlxButton((((FlxG.width / 2) + 7) + 6), 0, onDelicious); _delicious.loadGraphic(new FlxSprite(0, 0, ImgDelicious)); _delicious.scrollFactor.x = 0; _delicious.scrollFactor.y = 0; _twitter = new FlxButton((((((FlxG.width / 2) + 7) + 6) + 12) + 6), 0, onTwitter); _twitter.loadGraphic(new FlxSprite(0, 0, ImgTwitter)); _twitter.scrollFactor.x = 0; _twitter.scrollFactor.y = 0; _caption = new FlxText((FlxG.width / 2), 0, ((FlxG.width / 2) - 19), ""); _caption.alignment = "right"; _caption.scrollFactor.x = 0; _caption.scrollFactor.y = 0; _close = new FlxButton((FlxG.width - 16), 0, onClose); _close.loadGraphic(new FlxSprite(0, 0, ImgClose)); _close.scrollFactor.x = 0; _close.scrollFactor.y = 0; hide(); _s = 50; } public function onDelicious():void{ FlxU.openURL(((("http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=" + encodeURIComponent(_gameURL)) + "&amp;title=") + encodeURIComponent(_gameTitle))); } public function onTwitter():void{ FlxU.openURL(("http://twitter.com/home?status=Playing" + encodeURIComponent((((" " + _gameTitle) + " - ") + _gameURL)))); } public function setup(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:String):void{ _payPalID = _arg1; if (_payPalID.length <= 0){ _donate.visible = false; }; _payPalAmount = _arg2; _gameTitle = _arg3; _gameURL = _arg4; _caption.text = _arg5; _initialized = true; } public function onStumble():void{ FlxU.openURL(("http://www.stumbleupon.com/submit?url=" + encodeURIComponent(_gameURL))); } override public function render():void{ if (!_initialized){ return; }; if (_topBar.visible){ _topBar.render(); }; if (_mainBar.visible){ _mainBar.render(); }; if (_bottomBar.visible){ _bottomBar.render(); }; if (_donate.visible){ _donate.render(); }; if (_stumble.visible){ _stumble.render(); }; if (_digg.visible){ _digg.render(); }; if (_reddit.visible){ _reddit.render(); }; if (_delicious.visible){ _delicious.render(); }; if (_twitter.visible){ _twitter.render(); }; if (_caption.visible){ _caption.render(); }; if (_close.visible){ _close.render(); }; } public function onDigg():void{ FlxU.openURL(((("http://digg.com/submit?url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle))); } public function onReddit():void{ FlxU.openURL(("http://www.reddit.com/submit?url=" + encodeURIComponent(_gameURL))); } public function onDonate():void{ FlxU.openURL(((((("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + encodeURIComponent(_payPalID)) + "&item_name=") + encodeURIComponent(((_gameTitle + " Contribution (") + _gameURL))) + ")&currency_code=USD&amount=") + _payPalAmount)); } override public function update():void{ if (!_initialized){ return; }; if (_ty != y){ if (y < _ty){ y = (y + (FlxG.elapsed * _s)); if (y > _ty){ y = _ty; }; } else { y = (y - (FlxG.elapsed * _s)); if (y < _ty){ y = _ty; }; }; }; if ((((y <= -21)) || ((y > FlxG.height)))){ visible = false; }; _topBar.y = y; _mainBar.y = (y + 1); _bottomBar.y = (y + 20); _donate.y = (y + 4); _stumble.y = (y + 4); _digg.y = (y + 4); _reddit.y = (y + 4); _delicious.y = (y + 5); _twitter.y = (y + 4); _caption.y = (y + 4); _close.y = (y + 4); if (_donate.active){ _donate.update(); }; if (_stumble.active){ _stumble.update(); }; if (_digg.active){ _digg.update(); }; if (_reddit.active){ _reddit.update(); }; if (_delicious.active){ _delicious.update(); }; if (_twitter.active){ _twitter.update(); }; if (_caption.active){ _caption.update(); }; if (_close.active){ _close.update(); }; } public function show(_arg1:Boolean=true):void{ if (!_initialized){ FlxG.log("SUPPORT PANEL ERROR: Uninitialized.\nYou forgot to call FlxGame.setupSupportPanel()\nfrom your game constructor."); return; }; if (_closed){ return; }; if (_arg1){ y = -21; _ty = -1; } else { y = FlxG.height; _ty = (FlxG.height - 20); }; Mouse.show(); visible = true; } public function onClose():void{ _closed = true; hide(); } public function hide():void{ if (y < 0){ _ty = -21; } else { _ty = FlxG.height; }; Mouse.hide(); visible = false; } } }//package org.flixel.data
Section 99
//FlxPanel_ImgClose (org.flixel.data.FlxPanel_ImgClose) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgClose extends BitmapAsset { } }//package org.flixel.data
Section 100
//FlxPanel_ImgDelicious (org.flixel.data.FlxPanel_ImgDelicious) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgDelicious extends BitmapAsset { } }//package org.flixel.data
Section 101
//FlxPanel_ImgDigg (org.flixel.data.FlxPanel_ImgDigg) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgDigg extends BitmapAsset { } }//package org.flixel.data
Section 102
//FlxPanel_ImgDonate (org.flixel.data.FlxPanel_ImgDonate) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgDonate extends BitmapAsset { } }//package org.flixel.data
Section 103
//FlxPanel_ImgReddit (org.flixel.data.FlxPanel_ImgReddit) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgReddit extends BitmapAsset { } }//package org.flixel.data
Section 104
//FlxPanel_ImgStumble (org.flixel.data.FlxPanel_ImgStumble) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgStumble extends BitmapAsset { } }//package org.flixel.data
Section 105
//FlxPanel_ImgTwitter (org.flixel.data.FlxPanel_ImgTwitter) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgTwitter extends BitmapAsset { } }//package org.flixel.data
Section 106
//FlxPause (org.flixel.data.FlxPause) package org.flixel.data { import org.flixel.*; public class FlxPause extends FlxGroup { private var ImgKeyP:Class; private var ImgKey0:Class; private var ImgKeyPlus:Class; private var ImgKeyMinus:Class; public function FlxPause(){ var _local2:uint; ImgKeyMinus = FlxPause_ImgKeyMinus; ImgKeyPlus = FlxPause_ImgKeyPlus; ImgKey0 = FlxPause_ImgKey0; ImgKeyP = FlxPause_ImgKeyP; super(); scrollFactor.x = 0; scrollFactor.y = 0; var _local1:uint = 80; _local2 = 92; x = ((FlxG.width - _local1) / 2); y = ((FlxG.height - _local2) / 2); add(new FlxSprite().createGraphic(_local1, _local2, 2852126720, true), true); (add(new FlxText(0, 0, _local1, "this game is"), true) as FlxText).alignment = "center"; add(new FlxText(0, 10, _local1, "PAUSED").setFormat(null, 16, 0xFFFFFF, "center"), true); add(new FlxSprite(4, 36, ImgKeyP), true); add(new FlxText(16, 36, (_local1 - 16), "Pause Game"), true); add(new FlxSprite(4, 50, ImgKey0), true); add(new FlxText(16, 50, (_local1 - 16), "Mute Sound"), true); add(new FlxSprite(4, 64, ImgKeyMinus), true); add(new FlxText(16, 64, (_local1 - 16), "Sound Down"), true); add(new FlxSprite(4, 78, ImgKeyPlus), true); add(new FlxText(16, 78, (_local1 - 16), "Sound Up"), true); } } }//package org.flixel.data
Section 107
//FlxPause_ImgKey0 (org.flixel.data.FlxPause_ImgKey0) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKey0 extends BitmapAsset { } }//package org.flixel.data
Section 108
//FlxPause_ImgKeyMinus (org.flixel.data.FlxPause_ImgKeyMinus) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyMinus extends BitmapAsset { } }//package org.flixel.data
Section 109
//FlxPause_ImgKeyP (org.flixel.data.FlxPause_ImgKeyP) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyP extends BitmapAsset { } }//package org.flixel.data
Section 110
//FlxPause_ImgKeyPlus (org.flixel.data.FlxPause_ImgKeyPlus) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyPlus extends BitmapAsset { } }//package org.flixel.data
Section 111
//FlxQuake (org.flixel.data.FlxQuake) package org.flixel.data { import org.flixel.*; public class FlxQuake { public var y:int; protected var _timer:Number; protected var _intensity:Number; public var x:int; protected var _zoom:uint; public function FlxQuake(_arg1:uint){ _zoom = _arg1; start(0); } public function update():void{ if (_timer > 0){ _timer = (_timer - FlxG.elapsed); if (_timer <= 0){ _timer = 0; x = 0; y = 0; } else { x = (((((Math.random() * _intensity) * FlxG.width) * 2) - (_intensity * FlxG.width)) * _zoom); y = (((((Math.random() * _intensity) * FlxG.height) * 2) - (_intensity * FlxG.height)) * _zoom); }; }; } public function start(_arg1:Number=0.05, _arg2:Number=0.5):void{ stop(); _intensity = _arg1; _timer = _arg2; } public function stop():void{ x = 0; y = 0; _intensity = 0; _timer = 0; } } }//package org.flixel.data
Section 112
//FlxButton (org.flixel.FlxButton) package org.flixel { import flash.events.*; public class FlxButton extends FlxGroup { protected var _on:FlxSprite; protected var _offT:FlxText; protected var _initialized:Boolean; protected var _onT:FlxText; protected var _pressed:Boolean; protected var _callback:Function; protected var _off:FlxSprite; protected var _onToggle:Boolean; protected var _sf:FlxPoint; public function FlxButton(_arg1:int, _arg2:int, _arg3:Function){ x = _arg1; y = _arg2; width = 100; height = 20; _off = new FlxSprite().createGraphic(width, height, 4286545791); _off.solid = false; add(_off, true); _on = new FlxSprite().createGraphic(width, height, 4294967295); _on.solid = false; add(_on, true); _offT = null; _onT = null; _callback = _arg3; _onToggle = false; _pressed = false; _initialized = false; _sf = null; } protected function onMouseUp(_arg1:MouseEvent):void{ if (((((((((!(exists)) || (!(visible)))) || (!(active)))) || (!(FlxG.mouse.justReleased())))) || ((_callback == null)))){ return; }; if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){ _callback(); }; } override public function update():void{ if (!_initialized){ if (FlxG.stage != null){ FlxG.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); _initialized = true; }; }; super.update(); visibility(false); if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){ if (!FlxG.mouse.pressed()){ _pressed = false; } else { if (!_pressed){ _pressed = true; }; }; }; if (_onToggle){ visibility(_off.visible); }; } protected function visibility(_arg1:Boolean):void{ if (_arg1){ _off.visible = false; if (_offT != null){ _offT.visible = false; }; _on.visible = true; if (_onT != null){ _onT.visible = true; }; } else { _on.visible = false; if (_onT != null){ _onT.visible = false; }; _off.visible = true; if (_offT != null){ _offT.visible = true; }; }; } public function get on():Boolean{ return (_onToggle); } public function loadGraphic(_arg1:FlxSprite, _arg2:FlxSprite=null):FlxButton{ _off = (replace(_off, _arg1) as FlxSprite); if (_arg2 == null){ if (_on != _off){ remove(_on); }; _on = _off; } else { _on = (replace(_on, _arg2) as FlxSprite); }; _on.solid = (_off.solid = false); _off.scrollFactor = scrollFactor; _on.scrollFactor = scrollFactor; width = _off.width; height = _off.height; refreshHulls(); return (this); } public function loadText(_arg1:FlxText, _arg2:FlxText=null):FlxButton{ if (_arg1 != null){ if (_offT == null){ _offT = _arg1; add(_offT); } else { _offT = (replace(_offT, _arg1) as FlxText); }; }; if (_arg2 == null){ _onT = _offT; } else { if (_onT == null){ _onT = _arg2; add(_onT); } else { _onT = (replace(_onT, _arg2) as FlxText); }; }; _offT.scrollFactor = scrollFactor; _onT.scrollFactor = scrollFactor; return (this); } override public function destroy():void{ if (FlxG.stage != null){ FlxG.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); }; } public function set on(_arg1:Boolean):void{ _onToggle = _arg1; } } }//package org.flixel
Section 113
//FlxG (org.flixel.FlxG) package org.flixel { import flash.display.*; import flash.geom.*; import org.flixel.data.*; public class FlxG { public static var panel:FlxPanel; protected static var _mute:Boolean; public static var kong:FlxKong; public static var scores:Array; public static var music:FlxSound; public static var height:uint; protected static var _volume:Number; public static var buffer:BitmapData; public static var sounds:Array; public static var debug:Boolean; public static var LIBRARY_MINOR_VERSION:uint = 23; public static var LIBRARY_MAJOR_VERSION:uint = 2; public static var levels:Array; public static var fade:FlxFade; public static var timeScale:Number; protected static var _cache:Object; public static var level:int; public static var elapsed:Number; public static var score:int; public static var save:int; public static var saves:Array; protected static var _scrollTarget:Point; public static var mouse:FlxMouse; public static var followTarget:FlxObject; public static var followLead:Point; public static var LIBRARY_NAME:String = "flixel"; public static var width:uint; public static var followLerp:Number; public static var scroll:Point; protected static var _game:FlxGame; public static var quake:FlxQuake; public static var followMin:Point; public static var flash:FlxFlash; public static var followMax:Point; public static var keys:FlxKeyboard; protected static var _pause:Boolean; public static function get stage():Stage{ if (((!((_game._state == null))) && (!((_game._state.parent == null))))){ return (_game._state.parent.stage); }; return (null); } protected static function changeSounds():void{ var _local1:FlxSound; if (((!((music == null))) && (music.active))){ music.updateTransform(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { _local1 = (sounds[_local3] as FlxSound); if (((!((_local1 == null))) && (_local1.active))){ _local1.updateTransform(); }; _local3++; }; } public static function get mute():Boolean{ return (_mute); } public static function get volume():Number{ return (_volume); } static function doFollow():void{ if (followTarget != null){ _scrollTarget.x = ((((width >> 1) - followTarget.x) - (followTarget.width >> 1)) + (followTarget as FlxSprite).offset.x); _scrollTarget.y = ((((height >> 1) - followTarget.y) - (followTarget.height >> 1)) + (followTarget as FlxSprite).offset.y); if (((!((followLead == null))) && ((followTarget is FlxSprite)))){ _scrollTarget.x = (_scrollTarget.x - ((followTarget as FlxSprite).velocity.x * followLead.x)); _scrollTarget.y = (_scrollTarget.y - ((followTarget as FlxSprite).velocity.y * followLead.y)); }; scroll.x = (scroll.x + (((_scrollTarget.x - scroll.x) * followLerp) * FlxG.elapsed)); scroll.y = (scroll.y + (((_scrollTarget.y - scroll.y) * followLerp) * FlxG.elapsed)); if (followMin != null){ if (scroll.x > followMin.x){ scroll.x = followMin.x; }; if (scroll.y > followMin.y){ scroll.y = followMin.y; }; }; if (followMax != null){ if (scroll.x < followMax.x){ scroll.x = followMax.x; }; if (scroll.y < followMax.y){ scroll.y = followMax.y; }; }; }; } public static function getMuteValue():uint{ if (_mute){ return (0); }; return (1); } public static function addBitmap(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null):BitmapData{ var _local8:uint; var _local9:String; var _local10:BitmapData; var _local11:Matrix; var _local5:Boolean; var _local6:String = _arg4; if (_local6 == null){ _local6 = String(_arg1); if (((((_arg3) && (!((_cache[_local6] == undefined))))) && (!((_cache[_local6] == null))))){ _local8 = 0; do { var _temp1 = _local8; _local8 = (_local8 + 1); _local9 = (_local6 + _temp1); } while (((!((_cache[_local9] == undefined))) && (!((_cache[_local9] == null))))); _local6 = _local9; }; }; if (!checkBitmapCache(_local6)){ _cache[_local6] = new (_arg1).bitmapData; if (_arg2){ _local5 = true; }; }; var _local7:BitmapData = _cache[_local6]; if (((((!(_local5)) && (_arg2))) && ((_local7.width == new (_arg1).bitmapData.width)))){ _local5 = true; }; if (_local5){ _local10 = new BitmapData((_local7.width << 1), _local7.height, true, 0); _local10.draw(_local7); _local11 = new Matrix(); _local11.scale(-1, 1); _local11.translate(_local10.width, 0); _local10.draw(_local7, _local11); _local7 = _local10; }; return (_local7); } public static function set state(_arg1:FlxState):void{ _game.switchState(_arg1); } public static function set mute(_arg1:Boolean):void{ _mute = _arg1; changeSounds(); } public static function play(_arg1:Class, _arg2:Number=1, _arg3:Boolean=false):FlxSound{ var _local4:uint = sounds.length; var _local5:uint; while (_local5 < _local4) { if (!(sounds[_local5] as FlxSound).active){ break; }; _local5++; }; if (sounds[_local5] == null){ sounds[_local5] = new FlxSound(); }; var _local6:FlxSound = sounds[_local5]; _local6.loadEmbedded(_arg1, _arg3); _local6.volume = _arg2; _local6.play(); return (_local6); } public static function set volume(_arg1:Number):void{ _volume = _arg1; if (_volume < 0){ _volume = 0; } else { if (_volume > 1){ _volume = 1; }; }; changeSounds(); } static function setGameData(_arg1:FlxGame, _arg2:uint, _arg3:uint, _arg4:uint):void{ _game = _arg1; _cache = new Object(); width = _arg2; height = _arg3; _mute = false; _volume = 0.5; sounds = new Array(); mouse = new FlxMouse(); keys = new FlxKeyboard(); scroll = null; _scrollTarget = null; unfollow(); FlxG.levels = new Array(); FlxG.scores = new Array(); level = 0; score = 0; FlxU.seed = NaN; kong = null; pause = false; timeScale = 1; panel = new FlxPanel(); quake = new FlxQuake(_arg4); flash = new FlxFlash(); fade = new FlxFade(); FlxU.setWorldBounds(); } public static function playMusic(_arg1:Class, _arg2:Number=1):void{ if (music == null){ music = new FlxSound(); } else { if (music.active){ music.stop(); }; }; music.loadEmbedded(_arg1, true); music.volume = _arg2; music.survive = true; music.play(); } public static function createBitmap(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:String=null):BitmapData{ var _local7:uint; var _local8:String; var _local6:String = _arg5; if (_local6 == null){ _local6 = ((((_arg1 + "x") + _arg2) + ":") + _arg3); if (((((_arg4) && (!((_cache[_local6] == undefined))))) && (!((_cache[_local6] == null))))){ _local7 = 0; do { var _temp1 = _local7; _local7 = (_local7 + 1); _local8 = (_local6 + _temp1); } while (((!((_cache[_local8] == undefined))) && (!((_cache[_local8] == null))))); _local6 = _local8; }; }; if (!checkBitmapCache(_local6)){ _cache[_local6] = new BitmapData(_arg1, _arg2, true, _arg3); }; return (_cache[_local6]); } public static function log(_arg1:Object):void{ if (((!((_game == null))) && (!((_game._console == null))))){ _game._console.log(((_arg1)==null) ? "ERROR: null object" : _arg1.toString()); }; } public static function checkBitmapCache(_arg1:String):Boolean{ return (((!((_cache[_arg1] == undefined))) && (!((_cache[_arg1] == null))))); } static function updateSounds():void{ var _local1:FlxSound; if (((!((music == null))) && (music.active))){ music.update(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { _local1 = (sounds[_local3] as FlxSound); if (((!((_local1 == null))) && (_local1.active))){ _local1.update(); }; _local3++; }; } static function updateInput():void{ keys.update(); mouse.update(state.mouseX, state.mouseY, scroll.x, scroll.y); } public static function stream(_arg1:String, _arg2:Number=1, _arg3:Boolean=false):FlxSound{ var _local4:uint = sounds.length; var _local5:uint; while (_local5 < _local4) { if (!(sounds[_local5] as FlxSound).active){ break; }; _local5++; }; if (sounds[_local5] == null){ sounds[_local5] = new FlxSound(); }; var _local6:FlxSound = sounds[_local5]; _local6.loadStream(_arg1, _arg3); _local6.volume = _arg2; _local6.play(); return (_local6); } static function unfollow():void{ followTarget = null; followLead = null; followLerp = 1; followMin = null; followMax = null; if (scroll == null){ scroll = new Point(); } else { scroll.x = (scroll.y = 0); }; if (_scrollTarget == null){ _scrollTarget = new Point(); } else { _scrollTarget.x = (_scrollTarget.y = 0); }; } public static function get state():FlxState{ return (_game._state); } protected static function playSounds():void{ var _local1:FlxSound; if (((!((music == null))) && (music.active))){ music.play(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { _local1 = (sounds[_local3] as FlxSound); if (((!((_local1 == null))) && (_local1.active))){ _local1.play(); }; _local3++; }; } public static function followAdjust(_arg1:Number=0, _arg2:Number=0):void{ followLead = new Point(_arg1, _arg2); } public static function follow(_arg1:FlxObject, _arg2:Number=1):void{ followTarget = _arg1; followLerp = _arg2; _scrollTarget.x = ((((width >> 1) - followTarget.x) - (followTarget.width >> 1)) + (followTarget as FlxSprite).offset.x); _scrollTarget.y = ((((height >> 1) - followTarget.y) - (followTarget.height >> 1)) + (followTarget as FlxSprite).offset.y); scroll.x = _scrollTarget.x; scroll.y = _scrollTarget.y; doFollow(); } public static function resetInput():void{ keys.reset(); mouse.reset(); } public static function followBounds(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0, _arg5:Boolean=true):void{ followMin = new Point(-(_arg1), -(_arg2)); followMax = new Point((-(_arg3) + width), (-(_arg4) + height)); if (followMax.x > followMin.x){ followMax.x = followMin.x; }; if (followMax.y > followMin.y){ followMax.y = followMin.y; }; if (_arg5){ FlxU.setWorldBounds(-(_arg1), -(_arg2), (-(_arg1) + _arg3), (-(_arg2) + _arg4)); }; doFollow(); } protected static function pauseSounds():void{ var _local1:FlxSound; if (((!((music == null))) && (music.active))){ music.pause(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { _local1 = (sounds[_local3] as FlxSound); if (((!((_local1 == null))) && (_local1.active))){ _local1.pause(); }; _local3++; }; } static function destroySounds(_arg1:Boolean=false):void{ var _local2:FlxSound; if (sounds == null){ return; }; if (((!((music == null))) && (((_arg1) || (!(music.survive)))))){ music.destroy(); }; var _local3:uint = sounds.length; var _local4:uint; while (_local4 < _local3) { _local2 = (sounds[_local4] as FlxSound); if (((!((_local2 == null))) && (((_arg1) || (!(_local2.survive)))))){ _local2.destroy(); }; _local4++; }; } public static function set pause(_arg1:Boolean):void{ var _local2:Boolean = _pause; _pause = _arg1; if (_pause != _local2){ if (_pause){ _game.pauseGame(); pauseSounds(); } else { _game.unpauseGame(); playSounds(); }; }; } public static function get pause():Boolean{ return (_pause); } } }//package org.flixel
Section 114
//FlxGame (org.flixel.FlxGame) package org.flixel { import flash.events.*; import flash.display.*; import flash.geom.*; import org.flixel.data.*; import flash.text.*; import flash.utils.*; import flash.ui.*; public class FlxGame extends Sprite { const MAX_ELAPSED:Number = 0.0333; var _bmpFront:Bitmap; protected var SndFlixel:Class; var _state:FlxState; protected var SndBeep:Class; var _console:FlxConsole; var _created:Boolean; var _zoom:uint; var _gameXOffset:int; var _elapsed:Number; var _flipped:Boolean; var _total:uint; var _soundTrayBars:Array; public var useDefaultHotKeys:Boolean; protected var junk:String;// = "FlxGame_junk" var _zeroPoint:Point; var _bmpBack:Bitmap; var _iState:Class; var _paused:Boolean; var _gameYOffset:int; var _buffer:Sprite; var _soundTray:Sprite; var _frame:Class; var _r:Rectangle; public var pause:FlxGroup; var _soundTrayTimer:Number; public function FlxGame(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=2){ SndBeep = FlxGame_SndBeep; SndFlixel = FlxGame_SndFlixel; super(); Mouse.hide(); _zoom = _arg4; FlxState.bgColor = 4278190080; FlxG.setGameData(this, _arg1, _arg2, _arg4); _elapsed = 0; _total = 0; pause = new FlxPause(); _state = null; _iState = _arg3; _zeroPoint = new Point(); useDefaultHotKeys = true; _frame = null; _gameXOffset = 0; _gameYOffset = 0; _paused = false; _created = false; addEventListener(Event.ENTER_FRAME, onEnterFrame); } function pauseGame():void{ if (((!((x == 0))) || (!((y == 0))))){ x = 0; y = 0; }; if (!_flipped){ _bmpBack.bitmapData.copyPixels(_bmpFront.bitmapData, _r, _zeroPoint); } else { _bmpFront.bitmapData.copyPixels(_bmpBack.bitmapData, _r, _zeroPoint); }; Mouse.show(); _paused = true; stage.frameRate = 10; } function unpauseGame():void{ if (!FlxG.panel.visible){ Mouse.hide(); }; FlxG.resetInput(); _paused = false; stage.frameRate = 60; } protected function onFocus(_arg1:Event=null):void{ if (FlxG.pause){ FlxG.pause = false; }; } protected function onKeyUp(_arg1:KeyboardEvent):void{ var _local2:int; var _local3:String; if ((((_arg1.keyCode == 192)) || ((_arg1.keyCode == 220)))){ _console.toggle(); return; }; if (useDefaultHotKeys){ _local2 = _arg1.keyCode; _local3 = String.fromCharCode(_arg1.charCode); switch (_local2){ case 48: case 96: FlxG.mute = !(FlxG.mute); showSoundTray(); return; case 109: case 189: FlxG.mute = false; FlxG.volume = (FlxG.volume - 0.1); showSoundTray(); return; case 107: case 187: FlxG.mute = false; FlxG.volume = (FlxG.volume + 0.1); showSoundTray(); return; case 80: FlxG.pause = !(FlxG.pause); default: break; }; }; FlxG.keys.handleKeyUp(_arg1); } public function switchState(_arg1:FlxState):void{ FlxG.panel.hide(); FlxG.unfollow(); FlxG.resetInput(); FlxG.destroySounds(); FlxG.flash.stop(); FlxG.fade.stop(); FlxG.quake.stop(); _buffer.x = 0; _buffer.y = 0; _buffer.addChild(_arg1); if (_state != null){ _state.destroy(); _buffer.swapChildren(_arg1, _state); _buffer.removeChild(_state); }; _state = _arg1; _state.create(); } protected function addFrame(_arg1:Class, _arg2:uint, _arg3:uint):FlxGame{ _frame = _arg1; _gameXOffset = _arg2; _gameYOffset = _arg3; return (this); } protected function onEnterFrame(_arg1:Event):void{ var _local2:uint; var _local3:FlxSave; var _local5:String; var _local6:String; var _local7:Bitmap; var _local8:TextField; var _local9:uint; var _local10:uint; var _local11:Bitmap; var _local4:uint = getTimer(); _elapsed = ((_local4 - _total) / 1000); if (_created){ _console.lastElapsed = _elapsed; }; _total = _local4; FlxG.elapsed = _elapsed; if (FlxG.elapsed > MAX_ELAPSED){ FlxG.elapsed = MAX_ELAPSED; }; FlxG.elapsed = (FlxG.elapsed * FlxG.timeScale); if (_soundTray != null){ if (_soundTrayTimer > 0){ _soundTrayTimer = (_soundTrayTimer - _elapsed); } else { if (_soundTray.y > -(_soundTray.height)){ _soundTray.y = (_soundTray.y - ((_elapsed * FlxG.height) * 2)); if (_soundTray.y <= -(_soundTray.height)){ _soundTray.visible = false; _local3 = new FlxSave(); if (_local3.bind("flixel")){ if (_local3.data.sound == null){ _local3.data.sound = new Object(); }; _local3.data.mute = FlxG.mute; _local3.data.volume = FlxG.volume; _local3.forceSave(); }; }; }; }; }; if (_created){ FlxG.panel.update(); _console.update(); FlxG.updateInput(); FlxG.updateSounds(); if (_paused){ pause.update(); if (_flipped){ FlxG.buffer.copyPixels(_bmpFront.bitmapData, _r, _zeroPoint); } else { FlxG.buffer.copyPixels(_bmpBack.bitmapData, _r, _zeroPoint); }; pause.render(); } else { if (_flipped){ FlxG.buffer = _bmpFront.bitmapData; } else { FlxG.buffer = _bmpBack.bitmapData; }; FlxState.screen.unsafeBind(FlxG.buffer); _state.preProcess(); FlxG.doFollow(); _state.update(); if (FlxG.flash.exists){ FlxG.flash.update(); }; if (FlxG.fade.exists){ FlxG.fade.update(); }; FlxG.quake.update(); _buffer.x = FlxG.quake.x; _buffer.y = FlxG.quake.y; _state.render(); if (FlxG.flash.exists){ FlxG.flash.render(); }; if (FlxG.fade.exists){ FlxG.fade.render(); }; if (FlxG.panel.visible){ FlxG.panel.render(); }; if (FlxG.mouse.cursor != null){ if (FlxG.mouse.cursor.active){ FlxG.mouse.cursor.update(); }; if (FlxG.mouse.cursor.visible){ FlxG.mouse.cursor.render(); }; }; _state.postProcess(); _bmpBack.visible = !((_bmpFront.visible = _flipped)); _flipped = !(_flipped); }; } else { if (root != null){ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; stage.frameRate = 60; _buffer = new Sprite(); _buffer.scaleX = _zoom; _buffer.scaleY = _zoom; addChild(_buffer); _bmpBack = new Bitmap(new BitmapData(FlxG.width, FlxG.height, true, FlxState.bgColor)); _bmpBack.x = _gameXOffset; _bmpBack.y = _gameYOffset; _buffer.addChild(_bmpBack); _bmpFront = new Bitmap(new BitmapData(_bmpBack.width, _bmpBack.height, true, FlxState.bgColor)); _bmpFront.x = _bmpBack.x; _bmpFront.y = _bmpBack.y; _buffer.addChild(_bmpFront); _flipped = false; _r = new Rectangle(0, 0, _bmpFront.width, _bmpFront.height); _console = new FlxConsole(_gameXOffset, _gameYOffset, _zoom); addChild(_console); _local5 = ((((FlxG.LIBRARY_NAME + " v") + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION); if (FlxG.debug){ _local5 = (_local5 + " [debug]"); } else { _local5 = (_local5 + " [release]"); }; _local6 = ""; _local2 = 0; while (_local2 < (_local5.length + 32)) { _local6 = (_local6 + "-"); _local2++; }; FlxG.log(_local5); FlxG.log(_local6); stage.addEventListener(KeyboardEvent.KEY_DOWN, FlxG.keys.handleKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); stage.addEventListener(MouseEvent.MOUSE_DOWN, FlxG.mouse.handleMouseDown); stage.addEventListener(MouseEvent.MOUSE_UP, FlxG.mouse.handleMouseUp); stage.addEventListener(MouseEvent.MOUSE_OUT, FlxG.mouse.handleMouseOut); stage.addEventListener(MouseEvent.MOUSE_OVER, FlxG.mouse.handleMouseOver); stage.addEventListener(Event.DEACTIVATE, onFocusLost); stage.addEventListener(Event.ACTIVATE, onFocus); _soundTray = new Sprite(); _soundTray.visible = false; _soundTray.scaleX = 2; _soundTray.scaleY = 2; _local7 = new Bitmap(new BitmapData(80, 30, true, 2130706432)); _soundTray.x = (((_gameXOffset + (FlxG.width / 2)) * _zoom) - ((_local7.width / 2) * _soundTray.scaleX)); _soundTray.addChild(_local7); _local8 = new TextField(); _local8.width = _local7.width; _local8.height = _local7.height; _local8.multiline = true; _local8.wordWrap = true; _local8.selectable = false; _local8.embedFonts = true; _local8.antiAliasType = AntiAliasType.NORMAL; _local8.gridFitType = GridFitType.PIXEL; _local8.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center"); _soundTray.addChild(_local8); _local8.text = "VOLUME"; _local8.y = 16; _local9 = 10; _local10 = 14; _soundTrayBars = new Array(); _local2 = 0; while (_local2 < 10) { _local7 = new Bitmap(new BitmapData(4, (_local2 + 1), false, 0xFFFFFF)); _local7.x = _local9; _local7.y = _local10; _soundTrayBars.push(_soundTray.addChild(_local7)); _local9 = (_local9 + 6); _local10--; _local2++; }; addChild(_soundTray); if (_frame != null){ _local11 = new _frame(); _local11.scaleX = _zoom; _local11.scaleY = _zoom; addChild(_local11); }; _local3 = new FlxSave(); if (((_local3.bind("flixel")) && (!((_local3.data.sound == null))))){ if (_local3.data.volume != null){ FlxG.volume = _local3.data.volume; }; if (_local3.data.mute != null){ FlxG.mute = _local3.data.mute; }; }; _created = true; switchState(new _iState()); }; }; } public function showSoundTray(_arg1:Boolean=false):void{ if (!_arg1){ FlxG.play(SndBeep); }; _soundTrayTimer = 1; _soundTray.y = (_gameYOffset * _zoom); _soundTray.visible = true; var _local2:uint = Math.round((FlxG.volume * 10)); if (FlxG.mute){ _local2 = 0; }; var _local3:uint; while (_local3 < _soundTrayBars.length) { if (_local3 < _local2){ _soundTrayBars[_local3].alpha = 1; } else { _soundTrayBars[_local3].alpha = 0.5; }; _local3++; }; } protected function onFocusLost(_arg1:Event=null):void{ FlxG.pause = true; } } }//package org.flixel
Section 115
//FlxGame_junk (org.flixel.FlxGame_junk) package org.flixel { import mx.core.*; public class FlxGame_junk extends FontAsset { } }//package org.flixel
Section 116
//FlxGame_SndBeep (org.flixel.FlxGame_SndBeep) package org.flixel { import mx.core.*; public class FlxGame_SndBeep extends SoundAsset { } }//package org.flixel
Section 117
//FlxGame_SndFlixel (org.flixel.FlxGame_SndFlixel) package org.flixel { import mx.core.*; public class FlxGame_SndFlixel extends SoundAsset { } }//package org.flixel
Section 118
//FlxGroup (org.flixel.FlxGroup) package org.flixel { public class FlxGroup extends FlxObject { public var members:Array; protected var _first:Boolean; protected var _last:FlxPoint; public function FlxGroup(){ _group = true; solid = false; members = new Array(); _last = new FlxPoint(); _first = true; } public function getFirstExtant():FlxObject{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((!((_local1 == null))) && (_local1.exists))){ return (_local1); }; _local3++; }; return (null); } override public function destroy():void{ destroyMembers(); super.destroy(); } public function getFirstAlive():FlxObject{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((((!((_local1 == null))) && (_local1.exists))) && (!(_local1.dead)))){ return (_local1); }; _local3++; }; return (null); } public function remove(_arg1:FlxObject, _arg2:Boolean=false):FlxObject{ var _local3:int = members.indexOf(_arg1); if ((((_local3 < 0)) || ((_local3 >= members.length)))){ return (null); }; if (_arg2){ members.splice(_local3, 1); } else { members[_local3] = null; }; return (_arg1); } override public function update():void{ saveOldPosition(); updateMotion(); updateMembers(); updateFlickering(); } public function resetFirstAvail(_arg1:Number=0, _arg2:Number=0):Boolean{ var _local3:FlxObject = getFirstAvail(); if (_local3 == null){ return (false); }; _local3.reset(_arg1, _arg2); return (true); } override public function reset(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local6:FlxObject; saveOldPosition(); super.reset(_arg1, _arg2); var _local5:Boolean; if (((!((x == _last.x))) || (!((y == _last.y))))){ _local5 = true; _local3 = (x - _last.x); _local4 = (y - _last.y); }; var _local7:uint = members.length; var _local8:uint; while (_local8 < _local7) { _local6 = (members[_local8] as FlxObject); if (((!((_local6 == null))) && (_local6.exists))){ if (_local5){ if (_local6._group){ _local6.reset((_local6.x + _local3), (_local6.y + _local4)); } else { _local6.x = (_local6.x + _local3); _local6.y = (_local6.y + _local4); if (solid){ _local6.colHullX.width = (_local6.colHullX.width + ((_local3)>0) ? _local3 : -(_local3)); if (_local3 < 0){ _local6.colHullX.x = (_local6.colHullX.x + _local3); }; _local6.colHullY.x = x; _local6.colHullY.height = (_local6.colHullY.height + ((_local4)>0) ? _local4 : -(_local4)); if (_local4 < 0){ _local6.colHullY.y = (_local6.colHullY.y + _local4); }; _local6.colVector.x = (_local6.colVector.x + _local3); _local6.colVector.y = (_local6.colVector.y + _local4); }; }; }; }; _local8++; }; } protected function updateMembers():void{ var _local1:Number; var _local2:Number; var _local4:FlxObject; var _local3:Boolean; if (((!((x == _last.x))) || (!((y == _last.y))))){ _local3 = true; _local1 = (x - _last.x); _local2 = (y - _last.y); }; var _local5:uint = members.length; var _local6:uint; while (_local6 < _local5) { _local4 = (members[_local6] as FlxObject); if (((!((_local4 == null))) && (_local4.exists))){ if (_local3){ if (_local4._group){ _local4.reset((_local4.x + _local1), (_local4.y + _local2)); } else { _local4.x = (_local4.x + _local1); _local4.y = (_local4.y + _local2); }; }; if (_local4.active){ _local4.update(); }; if (((_local3) && (_local4.solid))){ _local4.colHullX.width = (_local4.colHullX.width + ((_local1)>0) ? _local1 : -(_local1)); if (_local1 < 0){ _local4.colHullX.x = (_local4.colHullX.x + _local1); }; _local4.colHullY.x = x; _local4.colHullY.height = (_local4.colHullY.height + ((_local2)>0) ? _local2 : -(_local2)); if (_local2 < 0){ _local4.colHullY.y = (_local4.colHullY.y + _local2); }; _local4.colVector.x = (_local4.colVector.x + _local1); _local4.colVector.y = (_local4.colVector.y + _local2); }; }; _local6++; }; } public function countDead():int{ var _local1:FlxObject; var _local2 = -1; var _local3:uint = members.length; var _local4:uint; while (_local4 < _local3) { _local1 = (members[_local4] as FlxObject); if (_local1 != null){ if (_local2 < 0){ _local2 = 0; }; if (_local1.dead){ _local2++; }; }; _local4++; }; return (_local2); } public function getFirstAvail():FlxObject{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((!((_local1 == null))) && (!(_local1.exists)))){ return (_local1); }; _local3++; }; return (null); } override public function render():void{ renderMembers(); } public function countLiving():int{ var _local1:FlxObject; var _local2 = -1; var _local3:uint = members.length; var _local4:uint; while (_local4 < _local3) { _local1 = (members[_local4] as FlxObject); if (_local1 != null){ if (_local2 < 0){ _local2 = 0; }; if (((_local1.exists) && (!(_local1.dead)))){ _local2++; }; }; _local4++; }; return (_local2); } public function countOnScreen():int{ var _local1:FlxObject; var _local2 = -1; var _local3:uint = members.length; var _local4:uint; while (_local4 < _local3) { _local1 = (members[_local4] as FlxObject); if (_local1 != null){ if (_local2 < 0){ _local2 = 0; }; if (_local1.onScreen()){ _local2++; }; }; _local4++; }; return (_local2); } protected function killMembers():void{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (_local1 != null){ _local1.kill(); }; _local3++; }; } override public function kill():void{ killMembers(); super.kill(); } public function getFirstNull():int{ var _local1:uint = members.length; var _local2:uint; while (_local2 < _local1) { if (members[_local2] == null){ return (_local2); }; _local2++; }; return (-1); } protected function renderMembers():void{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((((!((_local1 == null))) && (_local1.exists))) && (_local1.visible))){ _local1.render(); }; _local3++; }; } public function add(_arg1:FlxObject, _arg2:Boolean=false):FlxObject{ members.push(_arg1); if (_arg2){ _arg1.scrollFactor = scrollFactor; }; return (_arg1); } protected function saveOldPosition():void{ if (_first){ _first = false; _last.x = 0; _last.y = 0; return; }; _last.x = x; _last.y = y; } public function replace(_arg1:FlxObject, _arg2:FlxObject):FlxObject{ var _local3:int = members.indexOf(_arg1); if ((((_local3 < 0)) || ((_local3 >= members.length)))){ return (null); }; members[_local3] = _arg2; return (_arg2); } public function getRandom():FlxObject{ var _local1:uint; var _local2:FlxObject; var _local3:uint = members.length; var _local4:uint = uint((FlxU.random() * _local3)); while ((((_local2 == null)) && ((_local1 < members.length)))) { ++_local4; _local2 = (members[(_local4 % _local3)] as FlxObject); _local1++; }; return (_local2); } public function getFirstDead():FlxObject{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((!((_local1 == null))) && (_local1.dead))){ return (_local1); }; _local3++; }; return (null); } protected function destroyMembers():void{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (_local1 != null){ _local1.destroy(); }; _local3++; }; members.length = 0; } } }//package org.flixel
Section 119
//FlxObject (org.flixel.FlxObject) package org.flixel { import flash.geom.*; public class FlxObject extends FlxRect { public var acceleration:FlxPoint; public var angularAcceleration:Number; public var active:Boolean; public var collideBottom:Boolean; var _group:Boolean; protected var _point:FlxPoint; public var colHullX:FlxRect; protected var _flickerTimer:Number; public var colHullY:FlxRect; protected var _flashPoint:Point; public var colOffsets:Array; public var solid:Boolean; public var origin:FlxPoint; public var drag:FlxPoint; public var angularDrag:Number; public var collideTop:Boolean; protected var _flicker:Boolean; protected var _rect:FlxRect; public var moves:Boolean; public var angle:Number; public var thrust:Number; public var health:Number; public var velocity:FlxPoint; public var maxAngular:Number; public var angularVelocity:Number; public var maxVelocity:FlxPoint; public var exists:Boolean; public var collideLeft:Boolean; public var colVector:FlxPoint; public var maxThrust:Number; public var onFloor:Boolean; public var dead:Boolean; public var fixed:Boolean; public var visible:Boolean; public var scrollFactor:FlxPoint; public var collideRight:Boolean; protected static const _pZero:FlxPoint = new FlxPoint(); public function FlxObject(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ super(_arg1, _arg2, _arg3, _arg4); exists = true; active = true; visible = true; solid = true; fixed = false; moves = true; collideLeft = true; collideRight = true; collideTop = true; collideBottom = true; origin = new FlxPoint(); velocity = new FlxPoint(); acceleration = new FlxPoint(); drag = new FlxPoint(); maxVelocity = new FlxPoint(10000, 10000); angle = 0; angularVelocity = 0; angularAcceleration = 0; angularDrag = 0; maxAngular = 10000; thrust = 0; scrollFactor = new FlxPoint(1, 1); _flicker = false; _flickerTimer = -1; health = 1; dead = false; _point = new FlxPoint(); _rect = new FlxRect(); _flashPoint = new Point(); colHullX = new FlxRect(); colHullY = new FlxRect(); colVector = new FlxPoint(); colOffsets = new Array(new FlxPoint()); _group = false; } public function onScreen():Boolean{ getScreenXY(_point); if (((((((((_point.x + width) < 0)) || ((_point.x > FlxG.width)))) || (((_point.y + height) < 0)))) || ((_point.y > FlxG.height)))){ return (false); }; return (true); } public function kill():void{ exists = false; dead = true; } protected function updateFlickering():void{ if (flickering()){ if (_flickerTimer > 0){ _flickerTimer = (_flickerTimer - FlxG.elapsed); if (_flickerTimer == 0){ _flickerTimer = -1; }; }; if (_flickerTimer < 0){ flicker(-1); } else { _flicker = !(_flicker); visible = !(_flicker); }; }; } public function render():void{ } public function hitBottom(_arg1:FlxObject, _arg2:Number):void{ onFloor = true; if (!fixed){ velocity.y = _arg2; }; } public function overlaps(_arg1:FlxObject):Boolean{ var _local10:FlxSprite; var _local11:FlxSprite; getScreenXY(_point); var _local2:Number = _point.x; var _local3:Number = _point.y; var _local4:Number = width; var _local5:Number = height; if ((this is FlxSprite)){ _local10 = (this as FlxSprite); _local4 = _local10.frameWidth; _local5 = _local10.frameHeight; }; _arg1.getScreenXY(_point); var _local6:Number = _point.x; var _local7:Number = _point.y; var _local8:Number = _arg1.width; var _local9:Number = _arg1.height; if ((_arg1 is FlxSprite)){ _local11 = (_arg1 as FlxSprite); _local8 = _local11.frameWidth; _local9 = _local11.frameHeight; }; if ((((((((_local6 <= (_local2 - _local8))) || ((_local6 >= (_local2 + _local4))))) || ((_local7 <= (_local3 - _local9))))) || ((_local7 >= (_local3 + _local5))))){ return (false); }; return (true); } public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{ _arg1 = (_arg1 + FlxU.floor(FlxG.scroll.x)); _arg2 = (_arg2 + FlxU.floor(FlxG.scroll.y)); getScreenXY(_point); if ((((((((_arg1 <= _point.x)) || ((_arg1 >= (_point.x + width))))) || ((_arg2 <= _point.y)))) || ((_arg2 >= (_point.y + height))))){ return (false); }; return (true); } public function hurt(_arg1:Number):void{ if ((health = (health - _arg1)) <= 0){ kill(); }; } public function refreshHulls():void{ colHullX.x = x; colHullX.y = y; colHullX.width = width; colHullX.height = height; colHullY.x = x; colHullY.y = y; colHullY.width = width; colHullY.height = height; } public function preCollide(_arg1:FlxObject):void{ } public function hitLeft(_arg1:FlxObject, _arg2:Number):void{ if (!fixed){ velocity.x = _arg2; }; } public function collide(_arg1:FlxObject=null):Boolean{ return (FlxU.collide(this, ((_arg1)==null) ? this : _arg1)); } public function reset(_arg1:Number, _arg2:Number):void{ x = _arg1; y = _arg2; exists = true; dead = false; } public function update():void{ updateMotion(); updateFlickering(); } public function hitTop(_arg1:FlxObject, _arg2:Number):void{ if (!fixed){ velocity.y = _arg2; }; } protected function updateMotion():void{ var _local1:FlxPoint; var _local4:FlxPoint; var _local5:Number; if (!moves){ return; }; if (solid){ refreshHulls(); }; onFloor = false; angle = (angle + ((angularVelocity = FlxU.computeVelocity(angularVelocity, angularAcceleration, angularDrag, maxAngular)) * FlxG.elapsed)); if (thrust != 0){ _local1 = FlxU.rotatePoint(-(thrust), 0, 0, 0, angle); _local4 = FlxU.rotatePoint(-(maxThrust), 0, 0, 0, angle); _local5 = ((_local4.x)>0) ? _local4.x : -(_local4.x); if (_local5 > ((_local4.y)>0) ? _local4.y : -(_local4.y)){ _local4.y = _local5; } else { _local5 = ((_local4.y)>0) ? _local4.y : -(_local4.y); }; maxVelocity.x = (maxVelocity.y = ((_local5)>0) ? _local5 : -(_local5)); } else { _local1 = _pZero; }; velocity.x = FlxU.computeVelocity(velocity.x, (acceleration.x + _local1.x), drag.x, maxVelocity.x); velocity.y = FlxU.computeVelocity(velocity.y, (acceleration.y + _local1.y), drag.y, maxVelocity.y); var _local2:Number = (velocity.x * FlxG.elapsed); var _local3:Number = (velocity.y * FlxG.elapsed); x = (x + _local2); y = (y + _local3); if (!solid){ return; }; colVector.x = _local2; colVector.y = _local3; colHullX.width = (colHullX.width + ((colVector.x)>0) ? colVector.x : -(colVector.x)); if (colVector.x < 0){ colHullX.x = (colHullX.x + colVector.x); }; colHullY.x = x; colHullY.height = (colHullY.height + ((colVector.y)>0) ? colVector.y : -(colVector.y)); if (colVector.y < 0){ colHullY.y = (colHullY.y + colVector.y); }; } public function flickering():Boolean{ return ((_flickerTimer >= 0)); } public function hitRight(_arg1:FlxObject, _arg2:Number):void{ hitLeft(_arg1, _arg2); } public function destroy():void{ } public function getScreenXY(_arg1:FlxPoint=null):FlxPoint{ if (_arg1 == null){ _arg1 = new FlxPoint(); }; _arg1.x = (FlxU.floor((x + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.x * scrollFactor.x))); _arg1.y = (FlxU.floor((y + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.y * scrollFactor.y))); return (_arg1); } public function flicker(_arg1:Number=1):void{ _flickerTimer = _arg1; if (_flickerTimer < 0){ _flicker = false; visible = true; }; } } }//package org.flixel
Section 120
//FlxPoint (org.flixel.FlxPoint) package org.flixel { public class FlxPoint { public var x:Number; public var y:Number; public function FlxPoint(_arg1:Number=0, _arg2:Number=0){ x = _arg1; y = _arg2; } public function toString():String{ return (FlxU.getClassName(this, true)); } } }//package org.flixel
Section 121
//FlxPreloader (org.flixel.FlxPreloader) package org.flixel { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; import flash.utils.*; public class FlxPreloader extends MovieClip { protected var _height:uint; protected var _width:uint; protected var ImgLogoLight:Class; protected var _logo:Bitmap; protected var _text:TextField; protected var _buffer:Sprite; public var className:String; public var myURL:String; protected var _bmpBar:Bitmap; protected var ImgLogo:Class; protected var _init:Boolean; protected var ImgLogoCorners:Class; protected var _logoGlow:Bitmap; public function FlxPreloader(){ var tmp:Bitmap; var re:RegExp; var fmt:TextFormat; var txt:TextField; ImgLogo = FlxPreloader_ImgLogo; ImgLogoCorners = FlxPreloader_ImgLogoCorners; ImgLogoLight = FlxPreloader_ImgLogoLight; super(); stop(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; try { throw (new Error("Setting global debug flag...")); } catch(e:Error) { re = /\[.*:[0-9]+\]/; FlxG.debug = re.test(e.getStackTrace()); }; if (((((!(FlxG.debug)) && (!((myURL == null))))) && ((root.loaderInfo.url.indexOf(myURL) < 0)))){ tmp = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, true, 4294967295)); addChild(tmp); fmt = new TextFormat(); fmt.color = 0; fmt.size = 16; fmt.align = "center"; fmt.bold = true; fmt.font = "system"; txt = new TextField(); txt.width = (tmp.width - 16); txt.height = (tmp.height - 16); txt.y = 8; txt.multiline = true; txt.wordWrap = true; txt.embedFonts = true; txt.defaultTextFormat = fmt; txt.text = (("Hi there! It looks like somebody copied this game without my permission. Just click anywhere, or copy-paste this URL into your browser.\n\n" + myURL) + "\n\nto play the game at my site. Thanks, and have fun!"); addChild(txt); txt.addEventListener(MouseEvent.CLICK, goToMyURL); tmp.addEventListener(MouseEvent.CLICK, goToMyURL); return; }; _init = false; addEventListener(Event.ENTER_FRAME, onEnterFrame); } protected function update(_arg1:Number):void{ _bmpBar.scaleX = (_arg1 * (_width - 8)); _text.text = (((((("FLX v" + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION) + " ") + FlxU.floor((_arg1 * 100))) + "%"); _text.setTextFormat(_text.defaultTextFormat); if (_arg1 < 0.1){ _logoGlow.alpha = 0; _logo.alpha = 0; } else { if (_arg1 < 0.15){ _logoGlow.alpha = FlxU.random(false); _logo.alpha = 0; } else { if (_arg1 < 0.2){ _logoGlow.alpha = 0; _logo.alpha = 0; } else { if (_arg1 < 0.25){ _logoGlow.alpha = 0; _logo.alpha = FlxU.random(false); } else { if (_arg1 < 0.7){ _logoGlow.alpha = ((_arg1 - 0.45) / 0.45); _logo.alpha = 1; } else { if ((((_arg1 > 0.8)) && ((_arg1 < 0.9)))){ _logoGlow.alpha = (1 - ((_arg1 - 0.8) / 0.1)); _logo.alpha = 0; } else { if (_arg1 > 0.9){ _buffer.alpha = (1 - ((_arg1 - 0.9) / 0.1)); }; }; }; }; }; }; }; } private function goToMyURL(_arg1:MouseEvent=null):void{ navigateToURL(new URLRequest(("http://" + myURL))); } public function onEnterFrame(_arg1:Event):void{ var _local2:int; var _local3:Class; var _local4:Object; if (!_init){ if ((((stage.stageWidth <= 0)) || ((stage.stageHeight <= 0)))){ return; }; create(); _init = true; }; graphics.clear(); if (framesLoaded >= totalFrames){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); _local3 = Class(getDefinitionByName(className)); if (_local3){ _local4 = new (_local3); addChild((_local4 as DisplayObject)); }; removeChild(_buffer); } else { update((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal)); }; } protected function create():void{ var _local3:uint; _buffer = new Sprite(); _buffer.scaleX = 2; _buffer.scaleY = 2; addChild(_buffer); _width = (stage.stageWidth / _buffer.scaleX); _height = (stage.stageHeight / _buffer.scaleY); _buffer.addChild(new Bitmap(new BitmapData(_width, _height, false, 13406))); var _local1:Bitmap = new ImgLogoLight(); _local1.smoothing = true; _local1.width = (_local1.height = _height); _local1.x = ((_width - _local1.width) / 2); _buffer.addChild(_local1); _bmpBar = new Bitmap(new BitmapData(1, 7, false, 6253311)); _bmpBar.x = 4; _bmpBar.y = (_height - 11); _buffer.addChild(_bmpBar); _text = new TextField(); _text.defaultTextFormat = new TextFormat("system", 8, 6253311); _text.embedFonts = true; _text.selectable = false; _text.multiline = false; _text.x = 2; _text.y = (_bmpBar.y - 11); _text.width = 80; _buffer.addChild(_text); _logo = new ImgLogo(); _logo.scaleX = (_logo.scaleY = (_height / 8)); _logo.x = ((_width - _logo.width) / 2); _logo.y = ((_height - _logo.height) / 2); _buffer.addChild(_logo); _logoGlow = new ImgLogo(); _logoGlow.smoothing = true; _logoGlow.blendMode = "screen"; _logoGlow.scaleX = (_logoGlow.scaleY = (_height / 8)); _logoGlow.x = ((_width - _logoGlow.width) / 2); _logoGlow.y = ((_height - _logoGlow.height) / 2); _buffer.addChild(_logoGlow); _local1 = new ImgLogoCorners(); _local1.smoothing = true; _local1.width = _width; _local1.height = _height; _buffer.addChild(_local1); _local1 = new Bitmap(new BitmapData(_width, _height, false, 0xFFFFFF)); var _local2:uint; while (_local2 < _height) { _local3 = 0; while (_local3 < _width) { _local1.bitmapData.setPixel(_local3, _local2, 0); _local3++; }; _local2 = (_local2 + 2); }; _local1.blendMode = "overlay"; _local1.alpha = 0.25; _buffer.addChild(_local1); } } }//package org.flixel
Section 122
//FlxPreloader_ImgLogo (org.flixel.FlxPreloader_ImgLogo) package org.flixel { import mx.core.*; public class FlxPreloader_ImgLogo extends BitmapAsset { } }//package org.flixel
Section 123
//FlxPreloader_ImgLogoCorners (org.flixel.FlxPreloader_ImgLogoCorners) package org.flixel { import mx.core.*; public class FlxPreloader_ImgLogoCorners extends BitmapAsset { } }//package org.flixel
Section 124
//FlxPreloader_ImgLogoLight (org.flixel.FlxPreloader_ImgLogoLight) package org.flixel { import mx.core.*; public class FlxPreloader_ImgLogoLight extends BitmapAsset { } }//package org.flixel
Section 125
//FlxQuadTree (org.flixel.FlxQuadTree) package org.flixel { import org.flixel.data.*; public class FlxQuadTree extends FlxRect { protected var _sw:FlxQuadTree; protected var _mx:Number; protected var _my:Number; protected var _ne:FlxQuadTree; protected var _hh:Number; protected var _headA:FlxList; protected var _headB:FlxList; protected var _canSubdivide:Boolean; protected var _l:Number; protected var _hw:Number; protected var _nw:FlxQuadTree; protected var _se:FlxQuadTree; protected var _tailA:FlxList; protected var _r:Number; protected var _t:Number; protected var _tailB:FlxList; protected var _b:Number; public static const A_LIST:uint = 0; public static const MIN:Number = 48; public static const B_LIST:uint = 1; protected static var _ot:Number; protected static var _or:Number; protected static var _o:FlxObject; protected static var _oa:uint; protected static var _oc:Function; protected static var _ob:Number; protected static var _ol:Number; public function FlxQuadTree(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:FlxQuadTree=null){ var _local6:FlxList; var _local7:FlxList; super(_arg1, _arg2, _arg3, _arg4); _canSubdivide = (((_arg3 > MIN)) || ((_arg4 > MIN))); _headA = (_tailA = new FlxList()); _headB = (_tailB = new FlxList()); if (_arg5){ if (_arg5._headA.object != null){ _local6 = _arg5._headA; while (_local6 != null) { if (_tailA.object != null){ _local7 = _tailA; _tailA = new FlxList(); _local7.next = _tailA; }; _tailA.object = _local6.object; _local6 = _local6.next; }; }; if (_arg5._headB.object != null){ _local6 = _arg5._headB; while (_local6 != null) { if (_tailB.object != null){ _local7 = _tailB; _tailB = new FlxList(); _local7.next = _tailB; }; _tailB.object = _local6.object; _local6 = _local6.next; }; }; }; _nw = null; _ne = null; _se = null; _sw = null; _l = x; _r = (x + width); _hw = (width / 2); _mx = (_l + _hw); _t = y; _b = (y + height); _hh = (height / 2); _my = (_t + _hh); } protected function addObject():void{ if (((!(_canSubdivide)) || ((((((((_l >= _ol)) && ((_r <= _or)))) && ((_t >= _ot)))) && ((_b <= _ob)))))){ addToList(); return; }; if ((((_ol > _l)) && ((_or < _mx)))){ if ((((_ot > _t)) && ((_ob < _my)))){ if (_nw == null){ _nw = new FlxQuadTree(_l, _t, _hw, _hh, this); }; _nw.addObject(); return; }; if ((((_ot > _my)) && ((_ob < _b)))){ if (_sw == null){ _sw = new FlxQuadTree(_l, _my, _hw, _hh, this); }; _sw.addObject(); return; }; }; if ((((_ol > _mx)) && ((_or < _r)))){ if ((((_ot > _t)) && ((_ob < _my)))){ if (_ne == null){ _ne = new FlxQuadTree(_mx, _t, _hw, _hh, this); }; _ne.addObject(); return; }; if ((((_ot > _my)) && ((_ob < _b)))){ if (_se == null){ _se = new FlxQuadTree(_mx, _my, _hw, _hh, this); }; _se.addObject(); return; }; }; if ((((((((_or > _l)) && ((_ol < _mx)))) && ((_ob > _t)))) && ((_ot < _my)))){ if (_nw == null){ _nw = new FlxQuadTree(_l, _t, _hw, _hh, this); }; _nw.addObject(); }; if ((((((((_or > _mx)) && ((_ol < _r)))) && ((_ob > _t)))) && ((_ot < _my)))){ if (_ne == null){ _ne = new FlxQuadTree(_mx, _t, _hw, _hh, this); }; _ne.addObject(); }; if ((((((((_or > _mx)) && ((_ol < _r)))) && ((_ob > _my)))) && ((_ot < _b)))){ if (_se == null){ _se = new FlxQuadTree(_mx, _my, _hw, _hh, this); }; _se.addObject(); }; if ((((((((_or > _l)) && ((_ol < _mx)))) && ((_ob > _my)))) && ((_ot < _b)))){ if (_sw == null){ _sw = new FlxQuadTree(_l, _my, _hw, _hh, this); }; _sw.addObject(); }; } protected function addToList():void{ var _local1:FlxList; if (_oa == A_LIST){ if (_tailA.object != null){ _local1 = _tailA; _tailA = new FlxList(); _local1.next = _tailA; }; _tailA.object = _o; } else { if (_tailB.object != null){ _local1 = _tailB; _tailB = new FlxList(); _local1.next = _tailB; }; _tailB.object = _o; }; if (!_canSubdivide){ return; }; if (_nw != null){ _nw.addToList(); }; if (_ne != null){ _ne.addToList(); }; if (_se != null){ _se.addToList(); }; if (_sw != null){ _sw.addToList(); }; } public function overlap(_arg1:Boolean=true, _arg2:Function=null):Boolean{ var _local4:FlxList; _oc = _arg2; var _local3:Boolean; if (_arg1){ _oa = B_LIST; if (_headA.object != null){ _local4 = _headA; while (_local4 != null) { _o = _local4.object; if (((((_o.exists) && (_o.solid))) && (overlapNode()))){ _local3 = true; }; _local4 = _local4.next; }; }; _oa = A_LIST; if (_headB.object != null){ _local4 = _headB; while (_local4 != null) { _o = _local4.object; if (((_o.exists) && (_o.solid))){ if (((!((_nw == null))) && (_nw.overlapNode()))){ _local3 = true; }; if (((!((_ne == null))) && (_ne.overlapNode()))){ _local3 = true; }; if (((!((_se == null))) && (_se.overlapNode()))){ _local3 = true; }; if (((!((_sw == null))) && (_sw.overlapNode()))){ _local3 = true; }; }; _local4 = _local4.next; }; }; } else { if (_headA.object != null){ _local4 = _headA; while (_local4 != null) { _o = _local4.object; if (((((_o.exists) && (_o.solid))) && (overlapNode(_local4.next)))){ _local3 = true; }; _local4 = _local4.next; }; }; }; if (((!((_nw == null))) && (_nw.overlap(_arg1, _oc)))){ _local3 = true; }; if (((!((_ne == null))) && (_ne.overlap(_arg1, _oc)))){ _local3 = true; }; if (((!((_se == null))) && (_se.overlap(_arg1, _oc)))){ _local3 = true; }; if (((!((_sw == null))) && (_sw.overlap(_arg1, _oc)))){ _local3 = true; }; return (_local3); } public function add(_arg1:FlxObject, _arg2:uint):void{ var _local3:FlxObject; var _local4:Array; var _local5:uint; var _local6:uint; _oa = _arg2; if (_arg1._group){ _local4 = (_arg1 as FlxGroup).members; _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local3 = (_local4[_local6] as FlxObject); if (((!((_local3 == null))) && (_local3.exists))){ if (_local3._group){ add(_local3, _arg2); } else { if (_local3.solid){ _o = _local3; _ol = _o.x; _ot = _o.y; _or = (_o.x + _o.width); _ob = (_o.y + _o.height); addObject(); }; }; }; _local6++; }; }; if (_arg1.solid){ _o = _arg1; _ol = _o.x; _ot = _o.y; _or = (_o.x + _o.width); _ob = (_o.y + _o.height); addObject(); }; } protected function overlapNode(_arg1:FlxList=null):Boolean{ var _local3:FlxObject; var _local2:Boolean; var _local4:FlxList = _arg1; if (_local4 == null){ if (_oa == A_LIST){ _local4 = _headA; } else { _local4 = _headB; }; }; if (_local4.object != null){ while (_local4 != null) { _local3 = _local4.object; if ((((((((((((((((((_o === _local3)) || (!(_local3.exists)))) || (!(_o.exists)))) || (!(_local3.solid)))) || (!(_o.solid)))) || (((_o.x + _o.width) < (_local3.x + FlxU.roundingError))))) || (((_o.x + FlxU.roundingError) > (_local3.x + _local3.width))))) || (((_o.y + _o.height) < (_local3.y + FlxU.roundingError))))) || (((_o.y + FlxU.roundingError) > (_local3.y + _local3.height))))){ _local4 = _local4.next; } else { if (_oc == null){ _o.kill(); _local3.kill(); _local2 = true; } else { if (_oc(_o, _local3)){ _local2 = true; }; }; _local4 = _local4.next; }; }; }; return (_local2); } } }//package org.flixel
Section 126
//FlxRect (org.flixel.FlxRect) package org.flixel { public class FlxRect extends FlxPoint { public var width:Number; public var height:Number; public function FlxRect(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ super(_arg1, _arg2); width = _arg3; height = _arg4; } public function get bottom():Number{ return ((y + height)); } public function get top():Number{ return (y); } public function get left():Number{ return (x); } public function get right():Number{ return ((x + width)); } } }//package org.flixel
Section 127
//FlxSave (org.flixel.FlxSave) package org.flixel { import flash.net.*; public class FlxSave { protected var _so:SharedObject; public var data:Object; public var name:String; public function FlxSave(){ name = null; _so = null; data = null; } public function read(_arg1:String):Object{ if (_so == null){ FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.read()."); return (null); }; return (data[_arg1]); } public function forceSave(_arg1:uint=0):Boolean{ var MinFileSize = _arg1; if (_so == null){ FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.forceSave()."); return (false); }; var status:Object; try { status = _so.flush(MinFileSize); } catch(e:Error) { FlxG.log("WARNING: There was a problem flushing\nthe shared object data from FlxSave."); return (false); }; return ((status == SharedObjectFlushStatus.FLUSHED)); } public function bind(_arg1:String):Boolean{ var Name = _arg1; name = null; _so = null; data = null; name = Name; try { _so = SharedObject.getLocal(name); } catch(e:Error) { FlxG.log("WARNING: There was a problem binding to\nthe shared object data from FlxSave."); name = null; _so = null; data = null; return (false); }; data = _so.data; return (true); } public function erase(_arg1:uint=0):Boolean{ if (_so == null){ FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.erase()."); return (false); }; _so.clear(); return (forceSave(_arg1)); } public function write(_arg1:String, _arg2:Object, _arg3:uint=0):Boolean{ if (_so == null){ FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.write()."); return (false); }; data[_arg1] = _arg2; return (forceSave(_arg3)); } } }//package org.flixel
Section 128
//FlxSound (org.flixel.FlxSound) package org.flixel { import flash.events.*; import flash.media.*; import flash.net.*; public class FlxSound extends FlxObject { public var name:String; protected var _position:Number; protected var _fadeOutTotal:Number; protected var _fadeOutTimer:Number; protected var _sound:Sound; protected var _pauseOnFadeOut:Boolean; protected var _volumeAdjust:Number; public var playing:Boolean; protected var _radius:Number; protected var _volume:Number; protected var _point2:FlxPoint; protected var _fadeInTimer:Number; public var artist:String; protected var _channel:SoundChannel; protected var _fadeInTotal:Number; protected var _looped:Boolean; protected var _pan:Boolean; protected var _transform:SoundTransform; protected var _init:Boolean; public var survive:Boolean; protected var _core:FlxObject; public function FlxSound(){ _point2 = new FlxPoint(); _transform = new SoundTransform(); init(); fixed = true; } public function loadStream(_arg1:String, _arg2:Boolean=false):FlxSound{ stop(); init(); _sound = new Sound(); _sound.addEventListener(Event.ID3, gotID3); _sound.load(new URLRequest(_arg1)); _looped = _arg2; updateTransform(); active = true; return (this); } public function stop():void{ _position = 0; if (_channel != null){ _channel.stop(); stopped(); }; } public function loadEmbedded(_arg1:Class, _arg2:Boolean=false):FlxSound{ stop(); init(); _sound = new (_arg1); _looped = _arg2; updateTransform(); active = true; return (this); } public function get volume():Number{ return (_volume); } function updateTransform():void{ _transform.volume = (((FlxG.getMuteValue() * FlxG.volume) * _volume) * _volumeAdjust); if (_channel != null){ _channel.soundTransform = _transform; }; } public function fadeOut(_arg1:Number, _arg2:Boolean=false):void{ _pauseOnFadeOut = _arg2; _fadeInTimer = 0; _fadeOutTimer = _arg1; _fadeOutTotal = _fadeOutTimer; } public function play():void{ if (_position < 0){ return; }; if (_looped){ if (_position == 0){ if (_channel == null){ _channel = _sound.play(0, 9999, _transform); }; if (_channel == null){ active = false; }; } else { _channel = _sound.play(_position, 0, _transform); if (_channel == null){ active = false; } else { _channel.addEventListener(Event.SOUND_COMPLETE, looped); }; }; } else { if (_position == 0){ if (_channel == null){ _channel = _sound.play(0, 0, _transform); if (_channel == null){ active = false; } else { _channel.addEventListener(Event.SOUND_COMPLETE, stopped); }; }; } else { _channel = _sound.play(_position, 0, _transform); if (_channel == null){ active = false; }; }; }; playing = !((_channel == null)); _position = 0; } public function set volume(_arg1:Number):void{ _volume = _arg1; if (_volume < 0){ _volume = 0; } else { if (_volume > 1){ _volume = 1; }; }; updateTransform(); } protected function init():void{ _transform.pan = 0; _sound = null; _position = 0; _volume = 1; _volumeAdjust = 1; _looped = false; _core = null; _radius = 0; _pan = false; _fadeOutTimer = 0; _fadeOutTotal = 0; _pauseOnFadeOut = false; _fadeInTimer = 0; _fadeInTotal = 0; active = false; visible = false; solid = false; playing = false; name = null; artist = null; } protected function looped(_arg1:Event=null):void{ if (_channel == null){ return; }; _channel.removeEventListener(Event.SOUND_COMPLETE, looped); _channel = null; play(); } protected function updateSound():void{ var _local3:FlxPoint; var _local4:FlxPoint; var _local5:Number; var _local6:Number; var _local7:Number; if (_position != 0){ return; }; var _local1:Number = 1; var _local2:Number = 1; if (_core != null){ _local3 = new FlxPoint(); _local4 = new FlxPoint(); _core.getScreenXY(_local3); getScreenXY(_local4); _local5 = (_local3.x - _local4.x); _local6 = (_local3.y - _local4.y); _local1 = ((_radius - Math.sqrt(((_local5 * _local5) + (_local6 * _local6)))) / _radius); if (_local1 < 0){ _local1 = 0; }; if (_local1 > 1){ _local1 = 1; }; if (_pan){ _local7 = (-(_local5) / _radius); if (_local7 < -1){ _local7 = -1; } else { if (_local7 > 1){ _local7 = 1; }; }; _transform.pan = _local7; }; }; if (_fadeOutTimer > 0){ _fadeOutTimer = (_fadeOutTimer - FlxG.elapsed); if (_fadeOutTimer <= 0){ if (_pauseOnFadeOut){ pause(); } else { stop(); }; }; _local2 = (_fadeOutTimer / _fadeOutTotal); if (_local2 < 0){ _local2 = 0; }; } else { if (_fadeInTimer > 0){ _fadeInTimer = (_fadeInTimer - FlxG.elapsed); _local2 = (_fadeInTimer / _fadeInTotal); if (_local2 < 0){ _local2 = 0; }; _local2 = (1 - _local2); }; }; _volumeAdjust = (_local1 * _local2); updateTransform(); } public function fadeIn(_arg1:Number):void{ _fadeOutTimer = 0; _fadeInTimer = _arg1; _fadeInTotal = _fadeInTimer; play(); } override public function update():void{ super.update(); updateSound(); } protected function stopped(_arg1:Event=null):void{ if (!_looped){ _channel.removeEventListener(Event.SOUND_COMPLETE, stopped); } else { _channel.removeEventListener(Event.SOUND_COMPLETE, looped); }; _channel = null; active = false; playing = false; } protected function gotID3(_arg1:Event=null):void{ FlxG.log("got ID3 info!"); if (_sound.id3.songName.length > 0){ name = _sound.id3.songName; }; if (_sound.id3.artist.length > 0){ artist = _sound.id3.artist; }; _sound.removeEventListener(Event.ID3, gotID3); } public function pause():void{ if (_channel == null){ _position = -1; return; }; _position = _channel.position; _channel.stop(); if (_looped){ while (_position >= _sound.length) { _position = (_position - _sound.length); }; }; _channel = null; playing = false; } override public function destroy():void{ if (active){ stop(); }; } public function proximity(_arg1:Number, _arg2:Number, _arg3:FlxObject, _arg4:Number, _arg5:Boolean=true):FlxSound{ x = _arg1; y = _arg2; _core = _arg3; _radius = _arg4; _pan = _arg5; return (this); } } }//package org.flixel
Section 129
//FlxSprite (org.flixel.FlxSprite) package org.flixel { import flash.display.*; import flash.geom.*; import org.flixel.data.*; public class FlxSprite extends FlxObject { protected var _mtx:Matrix; protected var _caf:uint; public var finished:Boolean; protected var _animations:Array; protected var _ct:ColorTransform; public var offset:FlxPoint; protected var _callback:Function; protected var _curAnim:FlxAnim; protected var _framePixels:BitmapData; protected var _flipped:uint; public var scale:FlxPoint; protected var _pixels:BitmapData; protected var _bakedRotation:Number; public var blend:String; public var frameWidth:uint; protected var _flashRect2:Rectangle; protected var _alpha:Number; protected var _flashPointZero:Point; protected var _curFrame:uint; public var frameHeight:uint; protected var _flashRect:Rectangle; protected var _frameTimer:Number; protected var _facing:uint; public var antialiasing:Boolean; protected var _color:uint; public static const LEFT:uint = 0; public static const DOWN:uint = 3; public static const UP:uint = 2; public static const RIGHT:uint = 1; public function FlxSprite(_arg1:Number=0, _arg2:Number=0, _arg3:Class=null){ x = _arg1; y = _arg2; _flashRect = new Rectangle(); _flashRect2 = new Rectangle(); _flashPointZero = new Point(); if (_arg3 == null){ createGraphic(8, 8); } else { loadGraphic(_arg3); }; offset = new FlxPoint(); scale = new FlxPoint(1, 1); _alpha = 1; _color = 0xFFFFFF; blend = null; antialiasing = false; finished = false; _facing = RIGHT; _animations = new Array(); _flipped = 0; _curAnim = null; _curFrame = 0; _caf = 0; _frameTimer = 0; _mtx = new Matrix(); _callback = null; } protected function renderSprite():void{ getScreenXY(_point); _flashPoint.x = _point.x; _flashPoint.y = _point.y; if ((((((((((angle == 0)) || ((_bakedRotation > 0)))) && ((scale.x == 1)))) && ((scale.y == 1)))) && ((blend == null)))){ FlxG.buffer.copyPixels(_framePixels, _flashRect, _flashPoint, null, null, true); return; }; _mtx.identity(); _mtx.translate(-(origin.x), -(origin.y)); _mtx.scale(scale.x, scale.y); if (angle != 0){ _mtx.rotate(((Math.PI * 2) * (angle / 360))); }; _mtx.translate((_point.x + origin.x), (_point.y + origin.y)); FlxG.buffer.draw(_framePixels, _mtx, null, blend, null, antialiasing); } public function fill(_arg1:uint):void{ _pixels.fillRect(_flashRect2, _arg1); calcFrame(); } public function addAnimation(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true):void{ _animations.push(new FlxAnim(_arg1, _arg2, _arg3, _arg4)); } override public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{ _arg1 = (_arg1 - FlxU.floor(FlxG.scroll.x)); _arg2 = (_arg2 - FlxU.floor(FlxG.scroll.y)); getScreenXY(_point); if (_arg3){ return (_framePixels.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - _point.x), (_arg2 - _point.y)))); }; if ((((((((_arg1 <= _point.x)) || ((_arg1 >= (_point.x + frameWidth))))) || ((_arg2 <= _point.y)))) || ((_arg2 >= (_point.y + frameHeight))))){ return (false); }; return (true); } override public function render():void{ renderSprite(); } protected function calcFrame():void{ var _local1:uint = (_caf * frameWidth); var _local2:uint; var _local3:uint = (_flipped) ? _flipped : _pixels.width; if (_local1 >= _local3){ _local2 = (uint((_local1 / _local3)) * frameHeight); _local1 = (_local1 % _local3); }; if (((_flipped) && ((_facing == LEFT)))){ _local1 = (((_flipped << 1) - _local1) - frameWidth); }; _flashRect.x = _local1; _flashRect.y = _local2; _framePixels.copyPixels(_pixels, _flashRect, _flashPointZero); _flashRect.x = (_flashRect.y = 0); if (_ct != null){ _framePixels.colorTransform(_flashRect, _ct); }; if (_callback != null){ _callback(_curAnim.name, _curFrame, _caf); }; } function unsafeBind(_arg1:BitmapData):void{ _pixels = (_framePixels = _arg1); } public function loadGraphic(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:Boolean=false):FlxSprite{ _bakedRotation = 0; _pixels = FlxG.addBitmap(_arg1, _arg3, _arg6); if (_arg3){ _flipped = (_pixels.width >> 1); } else { _flipped = 0; }; if (_arg4 == 0){ if (_arg2){ _arg4 = _pixels.height; } else { if (_flipped > 0){ _arg4 = (_pixels.width / 2); } else { _arg4 = _pixels.width; }; }; }; width = (frameWidth = _arg4); if (_arg5 == 0){ if (_arg2){ _arg5 = width; } else { _arg5 = _pixels.height; }; }; height = (frameHeight = _arg5); resetHelpers(); return (this); } public function get pixels():BitmapData{ return (_pixels); } public function set facing(_arg1:uint):void{ var _local2 = !((_facing == _arg1)); _facing = _arg1; if (_local2){ calcFrame(); }; } protected function resetHelpers():void{ _flashRect.x = 0; _flashRect.y = 0; _flashRect.width = frameWidth; _flashRect.height = frameHeight; _flashRect2.x = 0; _flashRect2.y = 0; _flashRect2.width = _pixels.width; _flashRect2.height = _pixels.height; if ((((((_framePixels == null)) || (!((_framePixels.width == width))))) || (!((_framePixels.height == height))))){ _framePixels = new BitmapData(width, height); }; origin.x = (frameWidth / 2); origin.y = (frameHeight / 2); _framePixels.copyPixels(_pixels, _flashRect, _flashPointZero); _caf = 0; refreshHulls(); } override public function getScreenXY(_arg1:FlxPoint=null):FlxPoint{ if (_arg1 == null){ _arg1 = new FlxPoint(); }; _arg1.x = ((FlxU.floor((x + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.x * scrollFactor.x))) - offset.x); _arg1.y = ((FlxU.floor((y + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.y * scrollFactor.y))) - offset.y); return (_arg1); } public function set alpha(_arg1:Number):void{ if (_arg1 > 1){ _arg1 = 1; }; if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 == _alpha){ return; }; _alpha = _arg1; if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){ _ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha); } else { _ct = null; }; calcFrame(); } protected function updateAnimation():void{ var _local1:uint; var _local2:int; if (_bakedRotation){ _local1 = _caf; _local2 = (angle % 360); if (_local2 < 0){ _local2 = (_local2 + 360); }; _caf = (_local2 / _bakedRotation); if (_local1 != _caf){ calcFrame(); }; return; }; if (((((!((_curAnim == null))) && ((_curAnim.delay > 0)))) && (((_curAnim.looped) || (!(finished)))))){ _frameTimer = (_frameTimer + FlxG.elapsed); if (_frameTimer > _curAnim.delay){ _frameTimer = (_frameTimer - _curAnim.delay); if (_curFrame == (_curAnim.frames.length - 1)){ if (_curAnim.looped){ _curFrame = 0; }; finished = true; } else { _curFrame++; }; _caf = _curAnim.frames[_curFrame]; calcFrame(); }; }; } public function draw(_arg1:FlxSprite, _arg2:int=0, _arg3:int=0):void{ var _local4:BitmapData = _arg1._framePixels; if ((((((((((_arg1.angle == 0)) || ((_arg1._bakedRotation > 0)))) && ((_arg1.scale.x == 1)))) && ((_arg1.scale.y == 1)))) && ((_arg1.blend == null)))){ _flashPoint.x = _arg2; _flashPoint.y = _arg3; _flashRect2.width = _local4.width; _flashRect2.height = _local4.height; _pixels.copyPixels(_local4, _flashRect2, _flashPoint, null, null, true); _flashRect2.width = _pixels.width; _flashRect2.height = _pixels.height; calcFrame(); return; }; _mtx.identity(); _mtx.translate(-(_arg1.origin.x), -(_arg1.origin.y)); _mtx.scale(_arg1.scale.x, _arg1.scale.y); if (_arg1.angle != 0){ _mtx.rotate(((Math.PI * 2) * (_arg1.angle / 360))); }; _mtx.translate((_arg2 + _arg1.origin.x), (_arg3 + _arg1.origin.y)); _pixels.draw(_local4, _mtx, null, _arg1.blend, null, _arg1.antialiasing); calcFrame(); } public function loadRotatedGraphic(_arg1:Class, _arg2:uint=16, _arg3:int=-1, _arg4:Boolean=false, _arg5:Boolean=false):FlxSprite{ var _local12:uint; var _local13:uint; var _local14:uint; var _local15:uint; var _local16:uint; var _local17:uint; var _local6:uint = 4; var _local7:FlxSprite = new FlxSprite().loadGraphic(_arg1, (_arg3 >= 0)); if (_arg3 >= 0){ _local7.frame = _arg3; }; _local7.antialiasing = _arg4; var _local8:uint = _local7.width; if (_local7.height > _local8){ _local8 = _local7.height; }; if (_arg5){ _local8 = (_local8 * 1.5); }; var _local9:uint = Math.ceil((_arg2 / _local6)); width = (_local8 * _local9); height = (_local8 * _local6); var _local10:String = ((((((String(_arg1) + ":") + _arg3) + ":") + width) + "x") + height); var _local11:Boolean = FlxG.checkBitmapCache(_local10); createGraphic(width, height, 0, true, _local10); _bakedRotation = (360 / _arg2); if (!_local11){ _local14 = (_local7.width / 2); _local15 = (_local7.height / 2); _local16 = (_local8 / 2); _local17 = (_local8 / 2); _local12 = 0; while (_local12 < _local6) { _local13 = 0; while (_local13 < _local9) { draw(_local7, ((_local16 + (_local8 * _local13)) - _local14), (_local17 - _local15)); _local7.angle = (_local7.angle + _bakedRotation); _local13++; }; _local17 = (_local17 + _local8); _local12++; }; }; frameWidth = (frameHeight = (width = (height = _local8))); resetHelpers(); return (this); } public function set color(_arg1:uint):void{ _arg1 = (_arg1 & 0xFFFFFF); if (_color == _arg1){ return; }; _color = _arg1; if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){ _ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha); } else { _ct = null; }; calcFrame(); } override public function update():void{ updateMotion(); updateAnimation(); updateFlickering(); } public function onEmit():void{ } public function createGraphic(_arg1:uint, _arg2:uint, _arg3:uint=4294967295, _arg4:Boolean=false, _arg5:String=null):FlxSprite{ _bakedRotation = 0; _pixels = FlxG.createBitmap(_arg1, _arg2, _arg3, _arg4, _arg5); width = (frameWidth = _pixels.width); height = (frameHeight = _pixels.height); resetHelpers(); return (this); } public function play(_arg1:String, _arg2:Boolean=false):void{ if (((((!(_arg2)) && (!((_curAnim == null))))) && ((_arg1 == _curAnim.name)))){ return; }; _curFrame = 0; _caf = 0; _frameTimer = 0; var _local3:uint = _animations.length; var _local4:uint; while (_local4 < _local3) { if (_animations[_local4].name == _arg1){ _curAnim = _animations[_local4]; if (_curAnim.delay <= 0){ finished = true; } else { finished = false; }; _caf = _curAnim.frames[_curFrame]; calcFrame(); return; }; _local4++; }; } public function addAnimationCallback(_arg1:Function):void{ _callback = _arg1; } public function set pixels(_arg1:BitmapData):void{ _pixels = _arg1; width = (frameWidth = _pixels.width); height = (frameHeight = _pixels.height); resetHelpers(); } public function get alpha():Number{ return (_alpha); } public function get facing():uint{ return (_facing); } public function get color():uint{ return (_color); } public function set frame(_arg1:uint):void{ _curAnim = null; _caf = _arg1; calcFrame(); } public function get frame():uint{ return (_caf); } public function randomFrame():void{ _curAnim = null; _caf = int((FlxU.random() * (_pixels.width / frameWidth))); calcFrame(); } } }//package org.flixel
Section 130
//FlxState (org.flixel.FlxState) package org.flixel { import flash.display.*; public class FlxState extends Sprite { public var defaultGroup:FlxGroup; public static var screen:FlxSprite; public static var bgColor:uint; public function FlxState(){ defaultGroup = new FlxGroup(); if (screen == null){ screen = new FlxSprite(); screen.createGraphic(FlxG.width, FlxG.height, 0, true); screen.origin.x = (screen.origin.y = 0); screen.antialiasing = true; }; } public function add(_arg1:FlxObject):FlxObject{ return (defaultGroup.add(_arg1)); } public function preProcess():void{ screen.fill(bgColor); } public function collide():void{ defaultGroup.collide(); } public function render():void{ defaultGroup.render(); } public function update():void{ defaultGroup.update(); } public function destroy():void{ defaultGroup.destroy(); } public function create():void{ } public function postProcess():void{ } } }//package org.flixel
Section 131
//FlxText (org.flixel.FlxText) package org.flixel { import flash.display.*; import flash.text.*; public class FlxText extends FlxSprite { protected var _tf:TextField; protected var _regen:Boolean; protected var _shadow:uint; public function FlxText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:String=null){ super(_arg1, _arg2); createGraphic(_arg3, 1); if (_arg4 == null){ _arg4 = ""; }; _tf = new TextField(); _tf.width = _arg3; _tf.embedFonts = true; _tf.selectable = false; _tf.sharpness = 100; _tf.multiline = true; _tf.wordWrap = true; _tf.text = _arg4; var _local5:TextFormat = new TextFormat("system", 8, 0xFFFFFF); _tf.defaultTextFormat = _local5; _tf.setTextFormat(_local5); if (_arg4.length <= 0){ _tf.height = 1; } else { _tf.height = 10; }; _regen = true; _shadow = 0; solid = false; calcFrame(); } public function get shadow():uint{ return (_shadow); } public function get size():Number{ return ((_tf.defaultTextFormat.size as Number)); } override public function get color():uint{ return ((_tf.defaultTextFormat.color as uint)); } override public function set color(_arg1:uint):void{ var _local2:TextFormat = dtfCopy(); _local2.color = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); _regen = true; calcFrame(); } public function set shadow(_arg1:uint):void{ _shadow = _arg1; calcFrame(); } public function set size(_arg1:Number):void{ var _local2:TextFormat = dtfCopy(); _local2.size = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); _regen = true; calcFrame(); } public function get alignment():String{ return (_tf.defaultTextFormat.align); } protected function dtfCopy():TextFormat{ var _local1:TextFormat = _tf.defaultTextFormat; return (new TextFormat(_local1.font, _local1.size, _local1.color, _local1.bold, _local1.italic, _local1.underline, _local1.url, _local1.target, _local1.align)); } public function get text():String{ return (_tf.text); } public function get font():String{ return (_tf.defaultTextFormat.font); } public function set alignment(_arg1:String):void{ var _local2:TextFormat = dtfCopy(); _local2.align = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); calcFrame(); } public function set font(_arg1:String):void{ var _local2:TextFormat = dtfCopy(); _local2.font = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); _regen = true; calcFrame(); } override protected function calcFrame():void{ var _local3:uint; var _local4:uint; if ((((((_tf == null)) || ((_tf.text == null)))) || ((_tf.text.length <= 0)))){ _pixels.fillRect(_flashRect, 0); return; }; if (_regen){ _local3 = _tf.numLines; height = 0; _local4 = 0; while (_local4 < _local3) { height = (height + _tf.getLineMetrics(_local4).height); _local4++; }; height = (height + 4); _pixels = new BitmapData(width, height, true, 0); frameHeight = height; _tf.height = (height * 1.2); _flashRect.x = 0; _flashRect.y = 0; _flashRect.width = width; _flashRect.height = height; _regen = false; } else { _pixels.fillRect(_flashRect, 0); }; var _local1:TextFormat = _tf.defaultTextFormat; var _local2:TextFormat = _local1; _mtx.identity(); if ((((_local1.align == "center")) && ((_tf.numLines == 1)))){ _local2 = new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, "left"); _tf.setTextFormat(_local2); _mtx.translate(Math.floor(((width - _tf.getLineMetrics(0).width) / 2)), 0); }; if (_shadow > 0){ _tf.setTextFormat(new TextFormat(_local2.font, _local2.size, _shadow, null, null, null, null, null, _local2.align)); _mtx.translate(1, 1); _pixels.draw(_tf, _mtx, _ct); _mtx.translate(-1, -1); _tf.setTextFormat(new TextFormat(_local2.font, _local2.size, _local2.color, null, null, null, null, null, _local2.align)); }; _pixels.draw(_tf, _mtx, _ct); _tf.setTextFormat(new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, _local1.align)); _framePixels = new BitmapData(_pixels.width, _pixels.height, true, 0); _framePixels.copyPixels(_pixels, _flashRect, _flashPointZero); if (solid){ refreshHulls(); }; } public function setFormat(_arg1:String=null, _arg2:Number=8, _arg3:uint=0xFFFFFF, _arg4:String=null, _arg5:uint=0):FlxText{ if (_arg1 == null){ _arg1 = ""; }; var _local6:TextFormat = dtfCopy(); _local6.font = _arg1; _local6.size = _arg2; _local6.color = _arg3; _local6.align = _arg4; _tf.defaultTextFormat = _local6; _tf.setTextFormat(_local6); _shadow = _arg5; _regen = true; calcFrame(); return (this); } public function set text(_arg1:String):void{ _tf.text = _arg1; _regen = true; calcFrame(); } } }//package org.flixel
Section 132
//FlxTilemap (org.flixel.FlxTilemap) package org.flixel { import flash.display.*; import flash.geom.*; public class FlxTilemap extends FlxObject { protected var _tileWidth:uint; protected var _screenRows:uint; protected var _data:Array; public var startingIndex:uint; protected var _pixels:BitmapData; protected var _block:FlxObject; protected var _callbacks:Array; protected var _rects:Array; protected var _tileHeight:uint; public var totalTiles:uint; protected var _screenCols:uint; public var drawIndex:uint; public var auto:uint; protected var _flashRect:Rectangle; public var heightInTiles:uint; public var widthInTiles:uint; public var collideIndex:uint; public static const ALT:uint = 2; public static const AUTO:uint = 1; public static const OFF:uint = 0; public static var ImgAutoAlt:Class = FlxTilemap_ImgAutoAlt; public static var ImgAuto:Class = FlxTilemap_ImgAuto; public function FlxTilemap(){ auto = OFF; collideIndex = 1; startingIndex = 0; drawIndex = 1; widthInTiles = 0; heightInTiles = 0; totalTiles = 0; _data = null; _tileWidth = 0; _tileHeight = 0; _rects = null; _pixels = null; _block = new FlxObject(); _block.width = (_block.height = 0); _block.fixed = true; _callbacks = new Array(); fixed = true; } public function setTileByIndex(_arg1:uint, _arg2:uint, _arg3:Boolean=true):Boolean{ var _local5:uint; if (_arg1 >= _data.length){ return (false); }; var _local4:Boolean; _data[_arg1] = _arg2; if (!_arg3){ return (_local4); }; if (auto == OFF){ updateTile(_arg1); return (_local4); }; var _local6:int = (int((_arg1 / widthInTiles)) - 1); var _local7:int = (_local6 + 3); var _local8:int = ((_arg1 % widthInTiles) - 1); var _local9:int = (_local8 + 3); while (_local6 < _local7) { _local8 = (_local9 - 3); while (_local8 < _local9) { if ((((((((_local6 >= 0)) && ((_local6 < heightInTiles)))) && ((_local8 >= 0)))) && ((_local8 < widthInTiles)))){ _local5 = ((_local6 * widthInTiles) + _local8); autoTile(_local5); updateTile(_local5); }; _local8++; }; _local6++; }; return (_local4); } public function getTile(_arg1:uint, _arg2:uint):uint{ return (getTileByIndex(((_arg2 * widthInTiles) + _arg1))); } public function setCallback(_arg1:uint, _arg2:Function, _arg3:uint=1):void{ if (_arg3 <= 0){ return; }; var _local4:uint = _arg1; while (_local4 < (_arg1 + _arg3)) { _callbacks[_local4] = _arg2; _local4++; }; } override public function overlaps(_arg1:FlxObject):Boolean{ var _local2:uint; var _local3:uint; var _local4:uint; var _local5:uint; var _local6:Array = new Array(); var _local7:uint = Math.floor(((_arg1.x - x) / _tileWidth)); var _local8:uint = Math.floor(((_arg1.y - y) / _tileHeight)); var _local9:uint = (Math.ceil((_arg1.width / _tileWidth)) + 1); var _local10:uint = (Math.ceil((_arg1.height / _tileHeight)) + 1); var _local11:uint; while (_local11 < _local10) { if (_local11 >= heightInTiles){ break; }; _local3 = (((_local8 + _local11) * widthInTiles) + _local7); _local2 = 0; while (_local2 < _local9) { if (_local2 >= widthInTiles){ break; }; _local5 = (_data[(_local3 + _local2)] as uint); if (_local5 >= collideIndex){ _local6.push({x:(x + ((_local7 + _local2) * _tileWidth)), y:(y + ((_local8 + _local11) * _tileHeight)), data:_local5}); }; _local2++; }; _local11++; }; var _local12:uint = _local6.length; var _local13:Boolean; _local4 = 0; while (_local4 < _local12) { _block.x = _local6[_local4].x; _block.y = _local6[_local4].y; if (_block.overlaps(_arg1)){ return (true); }; _local4++; }; return (false); } public function loadMap(_arg1:String, _arg2:Class, _arg3:uint=0, _arg4:uint=0):FlxTilemap{ var _local5:uint; var _local6:Array; var _local9:uint; var _local7:Array = _arg1.split("\n"); heightInTiles = _local7.length; _data = new Array(); var _local8:uint; while (_local8 < heightInTiles) { _local6 = _local7[_local8].split(","); if (_local6.length <= 1){ heightInTiles--; } else { if (widthInTiles == 0){ widthInTiles = _local6.length; }; _local5 = 0; while (_local5 < widthInTiles) { _data.push(uint(_local6[_local5])); _local5++; }; }; _local8++; }; totalTiles = (widthInTiles * heightInTiles); if (auto > OFF){ collideIndex = (startingIndex = (drawIndex = 1)); _local9 = 0; while (_local9 < totalTiles) { autoTile(_local9); _local9++; }; }; _pixels = FlxG.addBitmap(_arg2); _tileWidth = _arg3; if (_tileWidth == 0){ _tileWidth = _pixels.height; }; _tileHeight = _arg4; if (_tileHeight == 0){ _tileHeight = _tileWidth; }; _block.width = _tileWidth; _block.height = _tileHeight; width = (widthInTiles * _tileWidth); height = (heightInTiles * _tileHeight); _rects = new Array(totalTiles); _local9 = 0; while (_local9 < totalTiles) { updateTile(_local9); _local9++; }; _screenRows = (Math.ceil((FlxG.height / _tileHeight)) + 1); if (_screenRows > heightInTiles){ _screenRows = heightInTiles; }; _screenCols = (Math.ceil((FlxG.width / _tileWidth)) + 1); if (_screenCols > widthInTiles){ _screenCols = widthInTiles; }; refreshHulls(); return (this); } public function ray(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:FlxPoint, _arg6:Number=1):Boolean{ var _local16:uint; var _local17:uint; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local7:Number = _tileWidth; if (_tileHeight < _tileWidth){ _local7 = _tileHeight; }; _local7 = (_local7 / _arg6); var _local8:Number = (_arg3 - _arg1); var _local9:Number = (_arg4 - _arg2); var _local10:Number = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); var _local11:uint = Math.ceil((_local10 / _local7)); var _local12:Number = (_local8 / _local11); var _local13:Number = (_local9 / _local11); var _local14:Number = (_arg1 - _local12); var _local15:Number = (_arg2 - _local13); var _local18:uint; while (_local18 < _local11) { _local14 = (_local14 + _local12); _local15 = (_local15 + _local13); if ((((((((_local14 < 0)) || ((_local14 > width)))) || ((_local15 < 0)))) || ((_local15 > height)))){ } else { _local16 = (_local14 / _tileWidth); _local17 = (_local15 / _tileHeight); if ((_data[((_local17 * widthInTiles) + _local16)] as uint) >= collideIndex){ _local16 = (_local16 * _tileWidth); _local17 = (_local17 * _tileHeight); _local19 = 0; _local20 = 0; _local22 = (_local14 - _local12); _local23 = (_local15 - _local13); _local21 = _local16; if (_local8 < 0){ _local21 = (_local21 + _tileWidth); }; _local19 = _local21; _local20 = (_local23 + (_local13 * ((_local21 - _local22) / _local12))); if ((((_local20 > _local17)) && ((_local20 < (_local17 + _tileHeight))))){ if (_arg5 == null){ _arg5 = new FlxPoint(); }; _arg5.x = _local19; _arg5.y = _local20; return (true); }; _local21 = _local17; if (_local9 < 0){ _local21 = (_local21 + _tileHeight); }; _local19 = (_local22 + (_local12 * ((_local21 - _local23) / _local13))); _local20 = _local21; if ((((_local19 > _local16)) && ((_local19 < (_local16 + _tileWidth))))){ if (_arg5 == null){ _arg5 = new FlxPoint(); }; _arg5.x = _local19; _arg5.y = _local20; return (true); }; return (false); }; }; _local18++; }; return (false); } override public function preCollide(_arg1:FlxObject):void{ var _local2:uint; var _local3:uint; colOffsets.length = 0; var _local4:int = FlxU.floor(((_arg1.x - x) / _tileWidth)); var _local5:int = FlxU.floor(((_arg1.y - y) / _tileHeight)); var _local6:uint = (FlxU.ceil((_arg1.width / _tileWidth)) + 1); var _local7:uint = (FlxU.ceil((_arg1.height / _tileHeight)) + 1); var _local8:uint; while (_local8 < _local7) { if (_local8 >= heightInTiles){ break; }; _local3 = (((_local5 + _local8) * widthInTiles) + _local4); _local2 = 0; while (_local2 < _local6) { if (_local2 >= widthInTiles){ break; }; if ((_data[(_local3 + _local2)] as uint) >= collideIndex){ colOffsets.push(new FlxPoint((x + ((_local4 + _local2) * _tileWidth)), (y + ((_local5 + _local8) * _tileHeight)))); }; _local2++; }; _local8++; }; } override public function render():void{ renderTilemap(); } protected function updateTile(_arg1:uint):void{ if (_data[_arg1] < drawIndex){ _rects[_arg1] = null; return; }; var _local2:uint = ((_data[_arg1] - startingIndex) * _tileWidth); var _local3:uint; if (_local2 >= _pixels.width){ _local3 = (uint((_local2 / _pixels.width)) * _tileHeight); _local2 = (_local2 % _pixels.width); }; _rects[_arg1] = new Rectangle(_local2, _local3, _tileWidth, _tileHeight); } override public function refreshHulls():void{ colHullX.x = 0; colHullX.y = 0; colHullX.width = _tileWidth; colHullX.height = _tileHeight; colHullY.x = 0; colHullY.y = 0; colHullY.width = _tileWidth; colHullY.height = _tileHeight; } public function setTile(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=true):Boolean{ if ((((_arg1 >= widthInTiles)) || ((_arg2 >= heightInTiles)))){ return (false); }; return (setTileByIndex(((_arg2 * widthInTiles) + _arg1), _arg3, _arg4)); } public function follow(_arg1:int=0):void{ FlxG.followBounds((x + (_arg1 * _tileWidth)), (y + (_arg1 * _tileHeight)), (width - (_arg1 * _tileWidth)), (height - (_arg1 * _tileHeight))); } protected function renderTilemap():void{ var _local5:uint; var _local6:uint; getScreenXY(_point); _flashPoint.x = _point.x; _flashPoint.y = _point.y; var _local1:int = Math.floor((-(_flashPoint.x) / _tileWidth)); var _local2:int = Math.floor((-(_flashPoint.y) / _tileHeight)); if (_local1 < 0){ _local1 = 0; }; if (_local1 > (widthInTiles - _screenCols)){ _local1 = (widthInTiles - _screenCols); }; if (_local2 < 0){ _local2 = 0; }; if (_local2 > (heightInTiles - _screenRows)){ _local2 = (heightInTiles - _screenRows); }; var _local3:int = ((_local2 * widthInTiles) + _local1); _flashPoint.x = (_flashPoint.x + (_local1 * _tileWidth)); _flashPoint.y = (_flashPoint.y + (_local2 * _tileHeight)); var _local4:int = _flashPoint.x; var _local7:uint; while (_local7 < _screenRows) { _local6 = _local3; _local5 = 0; while (_local5 < _screenCols) { var _temp1 = _local6; _local6 = (_local6 + 1); _flashRect = (_rects[_temp1] as Rectangle); if (_flashRect != null){ FlxG.buffer.copyPixels(_pixels, _flashRect, _flashPoint, null, null, true); }; _flashPoint.x = (_flashPoint.x + _tileWidth); _local5++; }; _local3 = (_local3 + widthInTiles); _flashPoint.x = _local4; _flashPoint.y = (_flashPoint.y + _tileHeight); _local7++; }; } protected function autoTile(_arg1:uint):void{ if (_data[_arg1] == 0){ return; }; _data[_arg1] = 0; if (((((_arg1 - widthInTiles) < 0)) || ((_data[(_arg1 - widthInTiles)] > 0)))){ _data[_arg1] = (_data[_arg1] + 1); }; if (((((_arg1 % widthInTiles) >= (widthInTiles - 1))) || ((_data[(_arg1 + 1)] > 0)))){ _data[_arg1] = (_data[_arg1] + 2); }; if (((((_arg1 + widthInTiles) >= totalTiles)) || ((_data[(_arg1 + widthInTiles)] > 0)))){ _data[_arg1] = (_data[_arg1] + 4); }; if (((((_arg1 % widthInTiles) <= 0)) || ((_data[(_arg1 - 1)] > 0)))){ _data[_arg1] = (_data[_arg1] + 8); }; if ((((auto == ALT)) && ((_data[_arg1] == 15)))){ if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) - 1)] <= 0)))){ _data[_arg1] = 1; }; if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) - 1)] <= 0)))){ _data[_arg1] = 2; }; if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) + 1)] <= 0)))){ _data[_arg1] = 4; }; if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) + 1)] <= 0)))){ _data[_arg1] = 8; }; }; _data[_arg1] = (_data[_arg1] + 1); } public function getTileByIndex(_arg1:uint):uint{ return ((_data[_arg1] as uint)); } public static function arrayToCSV(_arg1:Array, _arg2:int):String{ var _local3:uint; var _local4:uint; var _local5:String; var _local6:int = (_arg1.length / _arg2); _local3 = 0; while (_local3 < _local6) { _local4 = 0; while (_local4 < _arg2) { if (_local4 == 0){ if (_local3 == 0){ _local5 = (_local5 + _arg1[0]); } else { _local5 = (_local5 + ("\n" + _arg1[(_local3 * _arg2)])); }; } else { _local5 = (_local5 + (", " + _arg1[((_local3 * _arg2) + _local4)])); }; _local4++; }; _local3++; }; return (_local5); } public static function pngToCSV(_arg1:Class, _arg2:Boolean=false, _arg3:uint=1):String{ var _local4:Bitmap; var _local6:uint; var _local7:uint; var _local8:uint; var _local9:String; var _local12:Bitmap; var _local13:Matrix; if (_arg3 <= 1){ _local4 = new (_arg1); } else { _local12 = new (_arg1); _local4 = new Bitmap(new BitmapData((_local12.width * _arg3), (_local12.height * _arg3))); _local13 = new Matrix(); _local13.scale(_arg3, _arg3); _local4.bitmapData.draw(_local12, _local13); }; var _local5:BitmapData = _local4.bitmapData; var _local10:uint = _local4.width; var _local11:uint = _local4.height; _local6 = 0; while (_local6 < _local11) { _local7 = 0; while (_local7 < _local10) { _local8 = _local5.getPixel(_local7, _local6); if (((((_arg2) && ((_local8 > 0)))) || (((!(_arg2)) && ((_local8 == 0)))))){ _local8 = 1; } else { _local8 = 0; }; if (_local7 == 0){ if (_local6 == 0){ _local9 = (_local9 + _local8); } else { _local9 = (_local9 + ("\n" + _local8)); }; } else { _local9 = (_local9 + (", " + _local8)); }; _local7++; }; _local6++; }; return (_local9); } } }//package org.flixel
Section 133
//FlxTilemap_ImgAuto (org.flixel.FlxTilemap_ImgAuto) package org.flixel { import mx.core.*; public class FlxTilemap_ImgAuto extends BitmapAsset { } }//package org.flixel
Section 134
//FlxTilemap_ImgAutoAlt (org.flixel.FlxTilemap_ImgAutoAlt) package org.flixel { import mx.core.*; public class FlxTilemap_ImgAutoAlt extends BitmapAsset { } }//package org.flixel
Section 135
//FlxU (org.flixel.FlxU) package org.flixel { import flash.net.*; import flash.utils.*; public class FlxU { protected static var _originalSeed:Number; public static var quadTree:FlxQuadTree; protected static var _seed:Number; static var roundingError:Number = 1E-7; public static var quadTreeBounds:FlxRect; public static function random(_arg1:Boolean=true):Number{ var _local2:Number; if (((_arg1) && (!(isNaN(_seed))))){ _local2 = randomize(_seed); _seed = mutate(_seed, _local2); return (_local2); }; return (Math.random()); } public static function mutate(_arg1:Number, _arg2:Number):Number{ _arg1 = (_arg1 + _arg2); if (_arg1 > 1){ _arg1 = (_arg1 - int(_arg1)); }; return (_arg1); } public static function overlap(_arg1:FlxObject, _arg2:FlxObject, _arg3:Function=null):Boolean{ if ((((((((_arg1 == null)) || (!(_arg1.exists)))) || ((_arg2 == null)))) || (!(_arg2.exists)))){ return (false); }; quadTree = new FlxQuadTree(quadTreeBounds.x, quadTreeBounds.y, quadTreeBounds.width, quadTreeBounds.height); quadTree.add(_arg1, FlxQuadTree.A_LIST); if (_arg1 === _arg2){ return (quadTree.overlap(false, _arg3)); }; quadTree.add(_arg2, FlxQuadTree.B_LIST); return (quadTree.overlap(true, _arg3)); } public static function getClass(_arg1:String):Class{ return ((getDefinitionByName(_arg1) as Class)); } public static function openURL(_arg1:String):void{ navigateToURL(new URLRequest(_arg1), "_blank"); } public static function floor(_arg1:Number):Number{ var _local2:Number = int(_arg1); return (((_arg1)>0) ? _local2 : ((_local2)!=_arg1) ? (_local2 - 1) : _local2); } public static function solveYCollision(_arg1:FlxObject, _arg2:FlxObject):Boolean{ var _local5:Number; var _local7:Boolean; var _local14:uint; var _local15:uint; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local3:Number = _arg1.colVector.y; var _local4:Number = _arg2.colVector.y; if (_local3 == _local4){ return (false); }; _arg1.preCollide(_arg2); _arg2.preCollide(_arg1); var _local6:Boolean; var _local8 = (_local3 == 0); var _local9 = (_local3 < 0); var _local10 = (_local3 > 0); var _local11 = (_local4 == 0); var _local12 = (_local4 < 0); var _local13 = (_local4 > 0); var _local16:FlxRect = _arg1.colHullY; var _local17:FlxRect = _arg2.colHullY; var _local18:Array = _arg1.colOffsets; var _local19:Array = _arg2.colOffsets; var _local20:uint = _local18.length; var _local21:uint = _local19.length; _local7 = ((((((((((_local8) && (_local12))) || (((_local10) && (_local11))))) || (((_local10) && (_local12))))) || (((((_local9) && (_local12))) && ((((_local3)>0) ? _local3 : -(_local3) < ((_local4)>0) ? _local4 : -(_local4))))))) || (((((_local10) && (_local13))) && ((((_local3)>0) ? _local3 : -(_local3) > ((_local4)>0) ? _local4 : -(_local4)))))); if ((_local7) ? ((!(_arg1.collideBottom)) || (!(_arg2.collideTop))) : ((!(_arg1.collideTop)) || (!(_arg2.collideBottom)))){ return (false); }; _local14 = 0; while (_local14 < _local20) { _local22 = _local18[_local14].x; _local23 = _local18[_local14].y; _local16.x = (_local16.x + _local22); _local16.y = (_local16.y + _local23); _local15 = 0; while (_local15 < _local21) { _local24 = _local19[_local15].x; _local25 = _local19[_local15].y; _local17.x = (_local17.x + _local24); _local17.y = (_local17.y + _local25); if (((((((((_local16.x + _local16.width) < (_local17.x + roundingError))) || (((_local16.x + roundingError) > (_local17.x + _local17.width))))) || (((_local16.y + _local16.height) < (_local17.y + roundingError))))) || (((_local16.y + roundingError) > (_local17.y + _local17.height))))){ _local17.x = (_local17.x - _local24); _local17.y = (_local17.y - _local25); } else { if (_local7){ if (_local9){ _local26 = (_local16.y + _arg1.colHullX.height); } else { _local26 = (_local16.y + _local16.height); }; if (_local12){ _local27 = _local17.y; } else { _local27 = ((_local17.y + _local17.height) - _arg2.colHullX.height); }; } else { if (_local12){ _local26 = (-(_local17.y) - _arg2.colHullX.height); } else { _local26 = (-(_local17.y) - _local17.height); }; if (_local9){ _local27 = -(_local16.y); } else { _local27 = ((-(_local16.y) - _local16.height) + _arg1.colHullX.height); }; }; _local5 = (_local26 - _local27); if ((((((_local5 == 0)) || (((!(_arg1.fixed)) && ((((_local5)>0) ? _local5 : -(_local5) > (_local16.height * 0.8))))))) || (((!(_arg2.fixed)) && ((((_local5)>0) ? _local5 : -(_local5) > (_local17.height * 0.8))))))){ _local17.x = (_local17.x - _local24); _local17.y = (_local17.y - _local25); } else { _local6 = true; _local28 = _arg2.velocity.y; _local29 = _arg1.velocity.y; if (((!(_arg1.fixed)) && (_arg2.fixed))){ if (_arg1._group){ _arg1.reset(_arg1.x, (_arg1.y - _local5)); } else { _arg1.y = (_arg1.y - _local5); }; } else { if (((_arg1.fixed) && (!(_arg2.fixed)))){ if (_arg2._group){ _arg2.reset(_arg2.x, (_arg2.y + _local5)); } else { _arg2.y = (_arg2.y + _local5); }; } else { if (((!(_arg1.fixed)) && (!(_arg2.fixed)))){ _local5 = (_local5 / 2); if (_arg1._group){ _arg1.reset(_arg1.x, (_arg1.y - _local5)); } else { _arg1.y = (_arg1.y - _local5); }; if (_arg2._group){ _arg2.reset(_arg2.x, (_arg2.y + _local5)); } else { _arg2.y = (_arg2.y + _local5); }; _local28 = (_local28 / 2); _local29 = (_local29 / 2); }; }; }; if (_local7){ _arg1.hitBottom(_arg2, _local28); _arg2.hitTop(_arg1, _local29); } else { _arg1.hitTop(_arg2, _local28); _arg2.hitBottom(_arg1, _local29); }; if (((!(_arg1.fixed)) && (!((_local5 == 0))))){ if (_local7){ _local16.y = (_local16.y - _local5); if (((_arg2.fixed) && (_arg2.moves))){ _local28 = _arg2.colVector.x; _arg1.x = (_arg1.x + _local28); _local16.x = (_local16.x + _local28); _arg1.colHullX.x = (_arg1.colHullX.x + _local28); }; } else { _local16.y = (_local16.y - _local5); _local16.height = (_local16.height + _local5); }; }; if (((!(_arg2.fixed)) && (!((_local5 == 0))))){ if (_local7){ _local17.y = (_local17.y + _local5); _local17.height = (_local17.height - _local5); } else { _local17.height = (_local17.height + _local5); if (((_arg1.fixed) && (_arg1.moves))){ _local29 = _arg1.colVector.x; _arg2.x = (_arg2.x + _local29); _local17.x = (_local17.x + _local29); _arg2.colHullX.x = (_arg2.colHullX.x + _local29); }; }; }; _local17.x = (_local17.x - _local24); _local17.y = (_local17.y - _local25); }; }; _local15++; }; _local16.x = (_local16.x - _local22); _local16.y = (_local16.y - _local23); _local14++; }; return (_local6); } public static function ceil(_arg1:Number):Number{ var _local2:Number = int(_arg1); return (((_arg1)>0) ? ((_local2)!=_arg1) ? (_local2 + 1) : _local2 : _local2); } public static function getAngle(_arg1:Number, _arg2:Number):Number{ return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI)); } public static function setWorldBounds(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0):void{ if ((((((((_arg1 == 0)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){ _arg1 = (-128 * FlxG.width); _arg2 = (-128 * FlxG.height); _arg3 = (0x0100 * FlxG.width); _arg4 = (0x0100 * FlxG.height); }; if (quadTreeBounds == null){ quadTreeBounds = new FlxRect(); }; quadTreeBounds.x = _arg1; quadTreeBounds.y = _arg2; if (_arg3 != 0){ quadTreeBounds.width = _arg3; }; if (_arg4 != 0){ quadTreeBounds.height = _arg4; }; } public static function set seed(_arg1:Number):void{ _seed = _arg1; _originalSeed = _seed; } public static function getClassName(_arg1:Object, _arg2:Boolean=false):String{ var _local3:String = getQualifiedClassName(_arg1); _local3 = _local3.replace("::", "."); if (_arg2){ _local3 = _local3.substr((_local3.lastIndexOf(".") + 1)); }; return (_local3); } public static function randomize(_arg1:Number):Number{ return ((((69621 * int((_arg1 * 2147483647))) % 2147483647) / 2147483647)); } public static function abs(_arg1:Number):Number{ return (((_arg1)>0) ? _arg1 : -(_arg1)); } public static function computeVelocity(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=10000):Number{ var _local5:Number; if (_arg2 != 0){ _arg1 = (_arg1 + (_arg2 * FlxG.elapsed)); } else { if (_arg3 != 0){ _local5 = (_arg3 * FlxG.elapsed); if ((_arg1 - _local5) > 0){ _arg1 = (_arg1 - _local5); } else { if ((_arg1 + _local5) < 0){ _arg1 = (_arg1 + _local5); } else { _arg1 = 0; }; }; }; }; if (((!((_arg1 == 0))) && (!((_arg4 == 10000))))){ if (_arg1 > _arg4){ _arg1 = _arg4; } else { if (_arg1 < -(_arg4)){ _arg1 = -(_arg4); }; }; }; return (_arg1); } public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:FlxPoint=null):FlxPoint{ if (_arg6 == null){ _arg6 = new FlxPoint(); }; var _local7:Number = ((-(_arg5) / 180) * Math.PI); var _local8:Number = (_arg1 - _arg3); var _local9:Number = (_arg4 - _arg2); _arg6.x = ((_arg3 + (Math.cos(_local7) * _local8)) - (Math.sin(_local7) * _local9)); _arg6.y = (_arg4 - ((Math.sin(_local7) * _local8) + (Math.cos(_local7) * _local9))); return (_arg6); } public static function get seed():Number{ return (_originalSeed); } public static function solveXCollision(_arg1:FlxObject, _arg2:FlxObject):Boolean{ var _local5:Boolean; var _local6:Boolean; var _local7:Number; var _local9:Boolean; var _local16:uint; var _local17:uint; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local3:Number = _arg1.colVector.x; var _local4:Number = _arg2.colVector.x; if (_local3 == _local4){ return (false); }; _arg1.preCollide(_arg2); _arg2.preCollide(_arg1); var _local8:Boolean; var _local10 = (_local3 == 0); var _local11 = (_local3 < 0); var _local12 = (_local3 > 0); var _local13 = (_local4 == 0); var _local14 = (_local4 < 0); var _local15 = (_local4 > 0); var _local18:FlxRect = _arg1.colHullX; var _local19:FlxRect = _arg2.colHullX; var _local20:Array = _arg1.colOffsets; var _local21:Array = _arg2.colOffsets; var _local22:uint = _local20.length; var _local23:uint = _local21.length; _local9 = ((((((((((_local10) && (_local14))) || (((_local12) && (_local13))))) || (((_local12) && (_local14))))) || (((((_local11) && (_local14))) && ((((_local3)>0) ? _local3 : -(_local3) < ((_local4)>0) ? _local4 : -(_local4))))))) || (((((_local12) && (_local15))) && ((((_local3)>0) ? _local3 : -(_local3) > ((_local4)>0) ? _local4 : -(_local4)))))); if ((_local9) ? ((!(_arg1.collideRight)) || (!(_arg2.collideLeft))) : ((!(_arg1.collideLeft)) || (!(_arg2.collideRight)))){ return (false); }; _local16 = 0; while (_local16 < _local22) { _local24 = _local20[_local16].x; _local25 = _local20[_local16].y; _local18.x = (_local18.x + _local24); _local18.y = (_local18.y + _local25); _local17 = 0; while (_local17 < _local23) { _local26 = _local21[_local17].x; _local27 = _local21[_local17].y; _local19.x = (_local19.x + _local26); _local19.y = (_local19.y + _local27); if (((((((((_local18.x + _local18.width) < (_local19.x + roundingError))) || (((_local18.x + roundingError) > (_local19.x + _local19.width))))) || (((_local18.y + _local18.height) < (_local19.y + roundingError))))) || (((_local18.y + roundingError) > (_local19.y + _local19.height))))){ _local19.x = (_local19.x - _local26); _local19.y = (_local19.y - _local27); } else { if (_local9){ if (_local11){ _local28 = (_local18.x + _arg1.colHullY.width); } else { _local28 = (_local18.x + _local18.width); }; if (_local14){ _local29 = _local19.x; } else { _local29 = ((_local19.x + _local19.width) - _arg2.colHullY.width); }; } else { if (_local14){ _local28 = (-(_local19.x) - _arg2.colHullY.width); } else { _local28 = (-(_local19.x) - _local19.width); }; if (_local11){ _local29 = -(_local18.x); } else { _local29 = ((-(_local18.x) - _local18.width) + _arg1.colHullY.width); }; }; _local7 = (_local28 - _local29); if ((((((_local7 == 0)) || (((!(_arg1.fixed)) && ((((_local7)>0) ? _local7 : -(_local7) > (_local18.width * 0.8))))))) || (((!(_arg2.fixed)) && ((((_local7)>0) ? _local7 : -(_local7) > (_local19.width * 0.8))))))){ _local19.x = (_local19.x - _local26); _local19.y = (_local19.y - _local27); } else { _local8 = true; _local30 = _arg2.velocity.x; _local31 = _arg1.velocity.x; if (((!(_arg1.fixed)) && (_arg2.fixed))){ if (_arg1._group){ _arg1.reset((_arg1.x - _local7), _arg1.y); } else { _arg1.x = (_arg1.x - _local7); }; } else { if (((_arg1.fixed) && (!(_arg2.fixed)))){ if (_arg2._group){ _arg2.reset((_arg2.x + _local7), _arg2.y); } else { _arg2.x = (_arg2.x + _local7); }; } else { if (((!(_arg1.fixed)) && (!(_arg2.fixed)))){ _local7 = (_local7 / 2); if (_arg1._group){ _arg1.reset((_arg1.x - _local7), _arg1.y); } else { _arg1.x = (_arg1.x - _local7); }; if (_arg2._group){ _arg2.reset((_arg2.x + _local7), _arg2.y); } else { _arg2.x = (_arg2.x + _local7); }; _local30 = (_local30 / 2); _local31 = (_local31 / 2); }; }; }; if (_local9){ _arg1.hitRight(_arg2, _local30); _arg2.hitLeft(_arg1, _local31); } else { _arg1.hitLeft(_arg2, _local30); _arg2.hitRight(_arg1, _local31); }; if (((!(_arg1.fixed)) && (!((_local7 == 0))))){ if (_local9){ _local18.width = (_local18.width - _local7); } else { _local18.x = (_local18.x - _local7); _local18.width = (_local18.width + _local7); }; _arg1.colHullY.x = (_arg1.colHullY.x - _local7); }; if (((!(_arg2.fixed)) && (!((_local7 == 0))))){ if (_local9){ _local19.x = (_local19.x + _local7); _local19.width = (_local19.width - _local7); } else { _local19.width = (_local19.width + _local7); }; _arg2.colHullY.x = (_arg2.colHullY.x + _local7); }; _local19.x = (_local19.x - _local26); _local19.y = (_local19.y - _local27); }; }; _local17++; }; _local18.x = (_local18.x - _local24); _local18.y = (_local18.y - _local25); _local16++; }; return (_local8); } public static function collide(_arg1:FlxObject, _arg2:FlxObject):Boolean{ if ((((((((_arg1 == null)) || (!(_arg1.exists)))) || ((_arg2 == null)))) || (!(_arg2.exists)))){ return (false); }; quadTree = new FlxQuadTree(quadTreeBounds.x, quadTreeBounds.y, quadTreeBounds.width, quadTreeBounds.height); quadTree.add(_arg1, FlxQuadTree.A_LIST); var _local3 = (_arg1 === _arg2); if (!_local3){ quadTree.add(_arg2, FlxQuadTree.B_LIST); }; var _local4:Boolean = quadTree.overlap(!(_local3), solveXCollision); var _local5:Boolean = quadTree.overlap(!(_local3), solveYCollision); return (((_local4) || (_local5))); } } }//package org.flixel
Section 136
//IntroState (states.IntroState) package states { import flash.events.*; import org.flixel.*; import mochi.as3.*; import com.greensock.*; import ludemes.*; import flash.net.*; import flash.ui.*; public class IntroState extends FlxState { private var Dgroup:FlxGroup; private var Sgroup:FlxGroup; private var HardBtn:PixelButton; private var diffText:FlxText; private var NormalBtn:PixelButton; private var EasyBtn:PixelButton; private var Agroup:FlxGroup; private var titleGimme5Logo:Gimme5LogoBig; private var difficulty:int;// = 1 public static var LogoSound:Class = IntroState_LogoSound; public static var FlixelLogoSound:Class = IntroState_FlixelLogoSound; private static var titleScreen:Boolean = false; public static var ThemeMusic:Class = IntroState_ThemeMusic; override public function update():void{ if (((FlxG.keys.justPressed("RIGHT")) || (FlxG.keys.justPressed("DOWN")))){ if (Globals.mode == Globals.EASY){ chooseNormal(); } else { if (Globals.mode == Globals.NORMAL){ chooseHard(); }; }; }; if (((FlxG.keys.justPressed("LEFT")) || (FlxG.keys.justPressed("UP")))){ if (Globals.mode == Globals.NORMAL){ chooseEasy(); } else { if (Globals.mode == Globals.HARD){ chooseNormal(); }; }; }; if (((FlxG.keys.justPressed("ENTER")) || (FlxG.keys.justPressed("SPACE")))){ if (titleScreen){ TweenMax.killAll(); playMusicIfNot(); FlxG.state = new PlayState(); FlxG.stage.removeChild(titleGimme5Logo); titleGimme5Logo.removeEventListener(MouseEvent.CLICK, goToSite); } else { skipIntro(); }; }; super.update(); } public function chooseNormal(_arg1:MouseEvent=null):void{ Globals.mode = Globals.NORMAL; Sgroup.visible = true; Dgroup.visible = false; EasyBtn.on = false; NormalBtn.on = true; HardBtn.on = false; } public function chooseHard(_arg1:MouseEvent=null):void{ Globals.mode = Globals.HARD; Sgroup.visible = true; Dgroup.visible = true; EasyBtn.on = false; NormalBtn.on = false; HardBtn.on = true; } private function skipIntro():void{ var _local1:FlxSound; TweenMax.killAll(true); for each (_local1 in FlxG.sounds) { _local1.stop(); }; playMusicIfNot(); titleScreen = true; } private function goToSite(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.gimme5games.com?ref=ticketless_TITLE"), "_blank"); } public function chooseEasy(_arg1:MouseEvent=null):void{ Globals.mode = Globals.EASY; Sgroup.visible = false; Dgroup.visible = false; EasyBtn.on = true; NormalBtn.on = false; HardBtn.on = false; } override public function create():void{ var aGameBy:FlxText; FlxG.stage.addChild(Globals.adClip); MochiServices.connect("45e5575737f356ff", Globals.adClip); MochiBot.track(Globals.adClip, "f2a4b1e2"); titleScreen = false; Globals.secondRun = false; Globals.mode = difficulty; FlxG.mouse.hide(); Mouse.show(); aGameBy = new FlxText(75, 10, 100, "A Tiny game by"); aGameBy.alignment = "center"; aGameBy.alpha = 0; add(aGameBy); var logo:TCLogo = new TCLogo(107, 25); logo.alpha = 0; add(logo); var madeWith:FlxText = new FlxText(75, 15, 100, "Made with"); madeWith.alignment = "center"; madeWith.alpha = 0; add(madeWith); var flixelLogo:FlixelLogo = new FlixelLogo(125, 43); flixelLogo.scale = new FlxPoint(8, 8); flixelLogo.alpha = 0; add(flixelLogo); var title:TitleScreen = new TitleScreen(); title.alpha = 0; add(title); var controlsGroup:FlxGroup = new FlxGroup(); controlsGroup.visible = false; diffText = new FlxText(0, 48, 250, "Select a difficulty with the MOUSE, press ENTER to play"); diffText.color = 0x444444; diffText.alignment = "center"; controlsGroup.add(diffText); Agroup = new FlxGroup(); Sgroup = new FlxGroup(); Dgroup = new FlxGroup(); controlsGroup.add(Agroup); controlsGroup.add(Sgroup); controlsGroup.add(Dgroup); var vertPos = 77; EasyBtn = new PixelButton(10, (vertPos - 15), 0, chooseEasy); NormalBtn = new PixelButton(90, (vertPos - 15), 1, chooseNormal); HardBtn = new PixelButton(170, (vertPos - 15), 2, chooseHard); controlsGroup.add(EasyBtn); controlsGroup.add(NormalBtn); controlsGroup.add(HardBtn); Agroup.add(new ASD(10, (vertPos + 3), "A")); Agroup.add(new FlxText(22, vertPos, 150, "Jump luggage")); Sgroup.add(new ASD(100, (vertPos + 3), "S")); Sgroup.add(new FlxText(112, vertPos, 150, "Shove doors")); if (Globals.mode < 1){ Sgroup.visible = false; //unresolved jump }; Dgroup.add(new ASD(185, (vertPos + 3), "D")); Dgroup.add(new FlxText(197, vertPos, 50, "Slide")); if (Globals.mode < 2){ Dgroup.visible = false; //unresolved jump }; var controls2Group:FlxGroup = new FlxGroup(); (controls2Group.add(new FlxText(22, vertPos, 150, "Jump luggage")) as FlxText).color = 0x444444; (controls2Group.add(new FlxText(112, vertPos, 150, "Shove doors")) as FlxText).color = 0x444444; (controls2Group.add(new FlxText(197, vertPos, 50, "Slide")) as FlxText).color = 0x444444; controls2Group.visible = false; add(controls2Group); add(controlsGroup); titleGimme5Logo = new Gimme5LogoBig(); titleGimme5Logo.y = 6; titleGimme5Logo.x = 5; titleGimme5Logo.visible = false; titleGimme5Logo.addEventListener(MouseEvent.CLICK, goToSite, false, 0, true); titleGimme5Logo.useHandCursor = true; titleGimme5Logo.buttonMode = true; FlxG.stage.addChild(titleGimme5Logo); TweenMax.to(madeWith, 0.5, {alpha:1}); TweenMax.to(flixelLogo, 0.5, {alpha:1}); TweenMax.to(madeWith, 0.5, {alpha:0, delay:2}); TweenMax.to(flixelLogo, 0.5, {alpha:0, delay:2}); TweenMax.to(aGameBy, 0.5, {alpha:4, delay:3}); TweenMax.to(logo, 0.5, {alpha:1, delay:4}); TweenMax.to(aGameBy, 0.5, {alpha:0, delay:8}); TweenMax.to(logo, 0.5, {alpha:0, delay:8}); TweenMax.to(title, 0.5, {alpha:1, delay:9}); TweenMax.to(titleGimme5Logo, 0.5, {visible:true, delay:9}); TweenMax.to(controlsGroup, 0, {visible:true, delay:10.5}); TweenMax.to(controls2Group, 0, {visible:true, delay:10.5}); if (FlxG.music != null){ FlxG.music.stop(); }; FlxG.play(FlixelLogoSound); TweenMax.delayedCall(2, function ():void{ FlxG.play(LogoSound); }); TweenMax.delayedCall(9.5, playMusicIfNot); if (Globals.skipIntro){ skipIntro(); //unresolved jump }; } public static function playMusicIfNot():void{ titleScreen = true; if (FlxG.music != null){ if (!FlxG.music.playing){ FlxG.playMusic(ThemeMusic); }; } else { FlxG.playMusic(ThemeMusic); }; } } }//package states
Section 137
//IntroState_FlixelLogoSound (states.IntroState_FlixelLogoSound) package states { import mx.core.*; public class IntroState_FlixelLogoSound extends SoundAsset { } }//package states
Section 138
//IntroState_LogoSound (states.IntroState_LogoSound) package states { import mx.core.*; public class IntroState_LogoSound extends SoundAsset { } }//package states
Section 139
//IntroState_ThemeMusic (states.IntroState_ThemeMusic) package states { import mx.core.*; public class IntroState_ThemeMusic extends SoundAsset { } }//package states
Section 140
//PlayState (states.PlayState) package states { import flash.events.*; import org.flixel.*; import mochi.as3.*; import com.greensock.*; import ludemes.*; import flash.net.*; import SWFStats.*; import flash.ui.*; public class PlayState extends FlxState { public var lyrTrain:FlxGroup; public var lyrOtherTrain:FlxGroup; public var lyrSprites:FlxGroup; private var collisionMap:FlxTilemap; private var wagonPositions:Array; private var graphicsMap:FlxTilemap; private var diffText:FlxText; private var wagonElements:Array; private var BGMap:FlxTilemap; private var otherTrain:OtherTrain; private var TileMapGraphics:Class; private var scoreText:ScoreText; private var player:Player; private var initialWagon:Wagon; public var lyrFront:FlxGroup; public var lyrBG:FlxGroup; private var inspector:Inspector; public var lyrHUD:FlxGroup; private var TileMapText:Class; private var wagon:int;// = 0 private var gimme5Logo:Gimme5LogoSmall; public function PlayState(){ TileMapGraphics = PlayState_TileMapGraphics; TileMapText = PlayState_TileMapText; super(); } private function intro():void{ if (!Globals.secondRun){ TweenMax.to(initialWagon, 0.5, {alpha:0, delay:1}); TweenMax.delayedCall(3, function ():void{ createBalloon(0, inspector, 2.2); }); TweenMax.delayedCall(6, function ():void{ createBalloon(2, player, 1); }); TweenMax.delayedCall(7, function ():void{ player.moveSpeed = 50; }); TweenMax.delayedCall(7.5, function ():void{ inspector.moveSpeed = 50; }); TweenMax.to(scoreText, 0, {visible:true, delay:7}); } else { initialWagon.alpha = 0; player.moveSpeed = 50; TweenMax.delayedCall(0.5, function ():void{ inspector.moveSpeed = 50; }); scoreText.visible = true; }; Globals.secondRun = true; } override public function create():void{ Log.Play(); MochiEvents.startPlay(); Mouse.hide(); FlxG.mouse.hide(); IntroState.playMusicIfNot(); lyrTrain = new FlxGroup(); lyrOtherTrain = new FlxGroup(); lyrOtherTrain.scrollFactor = new FlxPoint(2, 0); lyrFront = new FlxGroup(); lyrSprites = new FlxGroup(); lyrHUD = new FlxGroup(); lyrHUD.scrollFactor = new FlxPoint(0, 0); lyrBG = new FlxGroup(); lyrBG.scrollFactor = new FlxPoint(0.3, 0); player = new Player(65, 20); lyrSprites.add(player); inspector = new Inspector(47, 20); lyrSprites.add(inspector); initialWagon = new Wagon(0, 0); lyrSprites.add(initialWagon); collisionMap = new FlxTilemap(); collisionMap.collideIndex = 1; collisionMap.setTile(wagon, 0, 1, true); collisionMap.loadMap(new TileMapText(), TileMapGraphics, 347, 50); graphicsMap = new FlxTilemap(); graphicsMap.drawIndex = 2; graphicsMap.loadMap(new TileMapText(), TileMapGraphics, 347, 50); graphicsMap.setTile(0, 0, 4, true); lyrTrain.add(graphicsMap); otherTrain = new OtherTrain(); lyrOtherTrain.add(otherTrain); BGMap = new FlxTilemap(); BGMap.drawIndex = 2; BGMap.loadMap(new TileMapText(), TileMapGraphics, 347, 50); BGMap.setTile(0, 0, 3, true); lyrBG.add(BGMap, true); scoreText = new ScoreText(0, 0, 200); scoreText.visible = false; Globals.scoreText = scoreText; lyrHUD.add(scoreText, true); this.add(lyrBG); this.add(lyrOtherTrain); this.add(lyrTrain); this.add(lyrFront); this.add(lyrSprites); this.add(lyrHUD); diffText = new FlxText(5, 50, 240, ""); lyrHUD.add(diffText); switch (Globals.mode){ case 0: diffText.text = "Easy: Jump luggage with A"; break; case 1: diffText.text = "Normal: Jump with A\nand break through doors with S"; break; case 2: diffText.text = "Hard: Jump with A, break through doors with S\nand slide under ticketmen with D"; break; }; wagonPositions = new Array(10, 80, 150, 220, 295); gimme5Logo = new Gimme5LogoSmall(); gimme5Logo.y = (300 - 25); gimme5Logo.x = (750 - 155); gimme5Logo.addEventListener(MouseEvent.CLICK, goToSite, false, 0, true); gimme5Logo.useHandCursor = true; gimme5Logo.buttonMode = true; FlxG.stage.addChild(gimme5Logo); intro(); } private function goToSite(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.gimme5games.com?ref=ticketless_INGAMELOGO"), "_blank"); } override public function update():void{ var _local1:Luggage; var _local2:People; var _local3:Door; var _local4:StillInspector; var _local5:StillInspectorLeg; var _local6:SeatedPeople; var _local7:WarningSign; var _local8:int; var _local9:int; var _local10:int; super.update(); if (FlxG.keys.justPressed("T")){ MochiEvents.endPlay(); FlxG.state = new IntroState(); return; }; collisionMap.collide(player); collisionMap.collide(inspector); if (player.x >= (wagon * 347)){ wagon++; FlxG.followBounds(0, 0, (347 * (wagon + 1)), 0); BGMap.setTile(wagon, 0, 3, true); _local2 = new People(((wagon * 347) + 35), 19); lyrTrain.add(_local2); _local8 = Math.floor((Math.random() * 2)); graphicsMap.setTile(wagon, 0, (4 + _local8), true); if (_local8 == 1){ switch (Globals.mode){ case Globals.EASY: wagonElements = ["l", "l", "", "dl", ""]; break; case Globals.NORMAL: if (Math.random() < 0.6){ wagonElements = ["", "d", "dl", "d", ""]; } else { wagonElements = ["dl", "l", "d", "", "d"]; }; break; case Globals.HARD: if (Math.random() < 0.6){ wagonElements = ["i", "l", "dl", "d", ""]; } else { wagonElements = ["l", "d", "i", "d", ""]; }; break; }; } else { switch (Globals.mode){ case Globals.EASY: wagonElements = ["l", "", "dl", "l", ""]; break; case Globals.NORMAL: if (Math.random() < 0.6){ wagonElements = ["l", "l", "", "d", "l"]; } else { wagonElements = ["l", "", "dl", "d", "d"]; }; break; case Globals.HARD: if (Math.random() < 0.6){ wagonElements = ["l", "i", "l", "d", ""]; } else { wagonElements = ["i", "d", "dl", "d", "i"]; }; break; }; _local6 = new SeatedPeople(((wagon * 347) + 174), 19); lyrTrain.add(_local6); _local6 = new SeatedPeople(((wagon * 347) + 134), 19); lyrTrain.add(_local6); }; _local9 = 0; while (_local9 < wagonPositions.length) { switch (wagonElements[_local9]){ case "l": _local1 = new Luggage(((wagon * 347) + wagonPositions[_local9]), 37); lyrFront.add(_local1); break; case "d": _local3 = new Door(((wagon * 347) + wagonPositions[_local9]), 0); lyrSprites.add(_local3); break; case "i": _local5 = new StillInspectorLeg(((wagon * 347) + wagonPositions[_local9]), 20); lyrTrain.add(_local5); _local4 = new StillInspector(((wagon * 347) + wagonPositions[_local9]), 20, _local5); lyrSprites.add(_local4); break; case "dl": _local1 = new Luggage(((wagon * 347) + wagonPositions[_local9]), 37); lyrFront.add(_local1); _local1 = new Luggage((((wagon * 347) + wagonPositions[_local9]) + 8), 37); lyrFront.add(_local1); break; }; switch (wagonElements[_local9]){ case "l": case "dl": _local10 = 1; if (wagon < 10){ _local7 = new WarningSign((((wagon * 347) + wagonPositions[_local9]) + _local10), 52); lyrFront.add(_local7); }; break; case "d": _local10 = -4; if (wagon < 10){ _local7 = new WarningSign((((wagon * 347) + wagonPositions[_local9]) + _local10), 52); lyrFront.add(_local7); }; break; case "i": _local10 = 5; if (wagon < 10){ _local7 = new WarningSign((((wagon * 347) + wagonPositions[_local9]) + _local10), 52); lyrFront.add(_local7); }; break; }; _local9++; }; if ((((((wagon - 1) % 10) == 0)) && (!((wagon == 0))))){ otherTrain.active = true; otherTrain.visible = true; otherTrain.reset((player.x + 300), 0); otherTrain.velocity.x = -500; FlxG.quake.start(0.01, 3); }; }; FlxG.follow(player, 0); } public function createBalloon(_arg1:int, _arg2:FlxSprite, _arg3:Number=2):void{ lyrSprites.add(new Balloon(_arg1, _arg2, _arg3)); } private function randomNum(_arg1:int, _arg2:int):int{ return ((_arg1 + Math.round((Math.random() * (_arg2 - _arg1))))); } public function goToScores():void{ MochiEvents.endPlay(); FlxG.state = new ScoresState(); FlxG.stage.removeChild(gimme5Logo); gimme5Logo.removeEventListener(MouseEvent.CLICK, goToSite); } } }//package states
Section 141
//PlayState_TileMapGraphics (states.PlayState_TileMapGraphics) package states { import mx.core.*; public class PlayState_TileMapGraphics extends BitmapAsset { } }//package states
Section 142
//PlayState_TileMapText (states.PlayState_TileMapText) package states { import mx.core.*; public class PlayState_TileMapText extends ByteArrayAsset { } }//package states
Section 143
//ScoresState (states.ScoresState) package states { import flash.events.*; import org.flixel.*; import ludemes.*; import flash.net.*; import flash.ui.*; public class ScoresState extends FlxState { private var scoreSubmitted:Boolean;// = false private var level:Number; private var hiScores:ZattikkaHiScores; private var scoreText:FlxText; private var boardId:String; private var scoresPanelShown:Boolean;// = false private var o:Object; private var playerScore:int; private var gimme5Logo:Gimme5LogoSmall; public function ScoresState(){ playerScore = Globals.scoreText.score; hiScores = new ZattikkaHiScores(); super(); } override public function update():void{ if (!scoresPanelShown){ if (FlxG.keys.justPressed("R")){ retry(); }; if (FlxG.keys.justPressed("T")){ Globals.skipIntro = true; goToTitle(); }; if (((FlxG.keys.justPressed("S")) && (!(scoreSubmitted)))){ showScoresPanel(); }; } else { Mouse.show(); }; super.update(); } private function goToTitle(_arg1:MouseEvent=null):void{ if (hiScores.stage != null){ FlxG.stage.removeChild(hiScores); }; FlxG.state = new IntroState(); FlxG.stage.removeChild(gimme5Logo); gimme5Logo.removeEventListener(MouseEvent.CLICK, goToSite); } private function showScoresPanel(_arg1:MouseEvent=null):void{ if (!scoresPanelShown){ scoresPanelShown = true; hiScores.x = 275; hiScores.y = 0; hiScores.height = 300; hiScores.scaleX = hiScores.scaleY; hiScores.setDetails(429, level, "ticketless", "SPheM3Vqvwy8ZDP", false, playerScore, String(playerScore), "points!", false); FlxG.stage.addChild(hiScores); }; } private function retry(_arg1:MouseEvent=null):void{ if (hiScores.stage != null){ FlxG.stage.removeChild(hiScores); }; FlxG.state = new PlayState(); FlxG.stage.removeChild(gimme5Logo); gimme5Logo.removeEventListener(MouseEvent.CLICK, goToSite); } private function goToSite(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.gimme5games.com?ref=ticketless_INGAMELOGO"), "_blank"); } override public function create():void{ FlxG.mouse.hide(); Mouse.show(); switch (Globals.mode){ case Globals.EASY: o = {n:[13, 10, 7, 12, 0, 4, 13, 4, 13, 7, 7, 2, 12, 3, 5, 13], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardId = o.f(0, ""); level = 0; break; case Globals.NORMAL: o = {n:[7, 15, 4, 13, 2, 4, 6, 7, 7, 15, 4, 13, 1, 3, 3, 1], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardId = o.f(0, ""); level = 1; break; case Globals.HARD: o = {n:[5, 15, 4, 4, 3, 6, 2, 15, 8, 9, 0, 8, 4, 5, 11, 3], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardId = o.f(0, ""); level = 2; break; }; var vertPos = 78; var retryBtn:PixelButton = new PixelButton(10, (vertPos - 15), 3, retry); var scoresBtn:PixelButton = new PixelButton(92, (vertPos - 15), 4, showScoresPanel); var titleBtn:PixelButton = new PixelButton(170, (vertPos - 15), 5, goToTitle); add(retryBtn); add(scoresBtn); add(titleBtn); var sadPlayer:FinalSadPlayer = new FinalSadPlayer(30, (vertPos - 45)); add(sadPlayer); gimme5Logo = new Gimme5LogoSmall(); gimme5Logo.y = (300 - 25); gimme5Logo.x = (750 - 155); gimme5Logo.addEventListener(MouseEvent.CLICK, goToSite, false, 0, true); gimme5Logo.useHandCursor = true; gimme5Logo.buttonMode = true; FlxG.stage.addChild(gimme5Logo); } } }//package states
Section 144
//Log (SWFStats.Log) package SWFStats { import flash.events.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.external.*; public final class Log { private static const PingR:Timer = new Timer(30000); private static const Random:Number = Math.random(); private static const PingF:Timer = new Timer(60000); public static var GUID:String = ""; private static var Plays:int = 0; private static var Enabled:Boolean = false; private static var FirstPing:Boolean = true; private static var Pings:int = 0; public static var SourceUrl:String; private static var HighestGoal:int = 0; public static var SWFID:int = 0; private static function GetCookie(_arg1:String):int{ var _local2:SharedObject = SharedObject.getLocal("swfstats"); if (_local2.data[_arg1] == undefined){ return (0); }; return (int(_local2.data[_arg1])); } private static function SaveCookie(_arg1:String, _arg2:int):void{ var _local3:SharedObject = SharedObject.getLocal("swfstats"); _local3.data[_arg1] = _arg2.toString(); _local3.flush(); } public static function View(_arg1:int=0, _arg2:String="", _arg3:String=""):void{ SWFID = _arg1; GUID = _arg2; Enabled = true; if ((((SWFID == 0)) || ((GUID == "")))){ Enabled = false; return; }; if (((((!((_arg3.indexOf("http://") == 0))) && (!((Security.sandboxType == "localWithNetwork"))))) && (!((Security.sandboxType == "localTrusted"))))){ Enabled = false; return; }; SourceUrl = GetUrl(_arg3); if ((((SourceUrl == null)) || ((SourceUrl == "")))){ Enabled = false; return; }; Security.allowDomain("http://tracker.swfstats.com/"); Security.allowInsecureDomain("http://tracker.swfstats.com/"); Security.loadPolicyFile("http://tracker.swfstats.com/crossdomain.xml"); Security.allowDomain("http://utils.swfstats.com/"); Security.allowInsecureDomain("http://utils.swfstats.com/"); Security.loadPolicyFile("http://utils.swfstats.com/crossdomain.xml"); var _local4:int = GetCookie("views"); _local4++; SaveCookie("views", _local4); Send("View", ("views=" + _local4)); PingF.addEventListener(TimerEvent.TIMER, PingServer); PingF.start(); } public static function LevelCounterMetric(_arg1:String, _arg2):void{ if (!Enabled){ return; }; Send("LevelMetric", ((("name=" + escape(_arg1)) + "&level=") + _arg2)); } private static function Send(_arg1:String, _arg2:String):void{ var _local3:URLLoader = new URLLoader(); _local3.addEventListener(IOErrorEvent.IO_ERROR, ErrorHandler); _local3.addEventListener(HTTPStatusEvent.HTTP_STATUS, StatusChange); _local3.addEventListener(SecurityErrorEvent.SECURITY_ERROR, ErrorHandler); _local3.load(new URLRequest(((((((((((("http://tracker.swfstats.com/Games/" + _arg1) + ".html?guid=") + GUID) + "&swfid=") + SWFID) + "&") + _arg2) + "&url=") + SourceUrl) + "&") + Random))); } public static function Play():void{ if (!Enabled){ return; }; Plays++; Send("Play", ("plays=" + Plays)); } private static function GetUrl(_arg1:String):String{ var url:String; var defaulturl = _arg1; if (ExternalInterface.available){ try { url = String(ExternalInterface.call("window.location.href.toString")); } catch(s:Error) { url = defaulturl; }; } else { if (defaulturl.indexOf("http://") == 0){ url = defaulturl; }; }; if ((((((url == null)) || ((url == "")))) || ((url == "null")))){ if ((((Security.sandboxType == "localWithNetwork")) || ((Security.sandboxType == "localTrusted")))){ url = "http://local-testing/"; } else { url = null; }; }; return (url); } private static function ErrorHandler(... _args):void{ Enabled = false; } public static function LevelRangedMetric(_arg1:String, _arg2, _arg3:int):void{ if (!Enabled){ return; }; Send("LevelMetricRanged", ((((("name=" + escape(_arg1)) + "&level=") + _arg2) + "&value=") + _arg3)); } private static function StatusChange(... _args):void{ } public static function Goal(_arg1:int, _arg2:String):void{ if (!Enabled){ return; }; if (HighestGoal >= _arg1){ return; }; HighestGoal = _arg1; Send("Goal", ((("goal=" + _arg1) + "&name=") + escape(_arg2))); } private static function PingServer(... _args):void{ if (!Enabled){ return; }; Pings++; Send("Ping", (((FirstPing) ? "&firstping=yes" : "" + "&pings=") + Pings)); if (FirstPing){ PingF.stop(); PingR.addEventListener(TimerEvent.TIMER, PingServer); PingR.start(); FirstPing = false; }; } public static function LevelAverageMetric(_arg1:String, _arg2, _arg3:int):void{ if (!Enabled){ return; }; Send("LevelMetricAverage", ((((("name=" + escape(_arg1)) + "&level=") + _arg2) + "&value=") + _arg3)); } public static function CustomMetric(_arg1:String, _arg2:String=null):void{ if (!Enabled){ return; }; if (_arg2 == null){ _arg2 = ""; }; Send("CustomMetric", ((("name=" + escape(_arg1)) + "&group=") + escape(_arg2))); } } }//package SWFStats
Section 145
//Gimme5Background (Gimme5Background) package { import flash.display.*; public dynamic class Gimme5Background extends MovieClip { } }//package
Section 146
//Gimme5LogoBig (Gimme5LogoBig) package { import flash.display.*; public dynamic class Gimme5LogoBig extends MovieClip { } }//package
Section 147
//Gimme5LogoSmall (Gimme5LogoSmall) package { import flash.display.*; public dynamic class Gimme5LogoSmall extends MovieClip { } }//package
Section 148
//Globals (Globals) package { import flash.display.*; import ludemes.*; public class Globals { public static var player:Player; public static var mode:int = 0; public static var NORMAL:int = 1; public static var HARD:int = 2; public static var skipIntro:Boolean = false; public static var secondRun:Boolean = false; public static var EASY:int = 0; public static var adClip:MovieClip; public static var inspector:Inspector; public static var scoreText:ScoreText; } }//package
Section 149
//LoadingBar (LoadingBar) package { import flash.display.*; import flash.text.*; public dynamic class LoadingBar extends MovieClip { public var movLoadingBar:MovieClip; public var txtPercent:TextField; } }//package
Section 150
//Preloader (Preloader) package { import flash.events.*; import flash.display.*; import org.flixel.*; import flash.net.*; import flash.utils.*; public class Preloader extends FlxPreloader { private var bg:Gimme5Background; private var splash:SplashScreen; private var bar:LoadingBar; private var mainClass:Class; public function Preloader():void{ } override protected function update(_arg1:Number):void{ bar.movLoadingBar.width = (_arg1 * 306); var _local2:int = Math.round((_arg1 * 100)); bar.txtPercent.text = (_local2 + "% loaded"); } private function onPlayPress(_arg1:MouseEvent):void{ var _local2:Object; removeChild(bg); removeChild(splash); splash.playBtn.removeEventListener(MouseEvent.CLICK, onPlayPress); splash.splashHitArea.removeEventListener(MouseEvent.CLICK, goToSite); if (mainClass){ _local2 = new mainClass(); addChild((_local2 as DisplayObject)); }; } private function goToSite(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.gimme5games.com?ref=ticketless_SPLASH"), "_blank"); } override public function onEnterFrame(_arg1:Event):void{ var _local2:int; if (!_init){ if ((((stage.stageWidth <= 0)) || ((stage.stageHeight <= 0)))){ return; }; create(); _init = true; }; graphics.clear(); if (framesLoaded >= totalFrames){ nextFrame(); mainClass = Class(getDefinitionByName("Ticketless")); removeEventListener(Event.ENTER_FRAME, onEnterFrame); removeChild(_buffer); addChild(splash); splash.play(); } else { update((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal)); }; } override protected function create():void{ bg = new Gimme5Background(); addChild(bg); var _local1:Shape = new Shape(); _local1.graphics.beginFill(0); _local1.graphics.drawRect(0, 0, 750, 300); _local1.graphics.endFill(); addChildAt(_local1, 0); splash = new SplashScreen(); splash.scaleX = (splash.scaleY = 0.65); splash.x = 280; splash.y = 20; splash.stop(); splash.playBtn.addEventListener(MouseEvent.CLICK, onPlayPress, false, 0, true); splash.playBtn.useHandCursor = true; splash.splashHitArea.addEventListener(MouseEvent.CLICK, goToSite, false, 0, true); splash.splashHitArea.useHandCursor = true; splash.splashHitArea.buttonMode = true; _buffer = new Sprite(); addChild(_buffer); bar = new LoadingBar(); bar.x = 220; bar.y = 150; bar.movLoadingBar.scaleX = 0; _buffer.addChild(bar); } } }//package
Section 151
//SplashScreen (SplashScreen) package { import flash.display.*; public dynamic class SplashScreen extends MovieClip { public var playBtn:SimpleButton; public var splashHitArea:MovieClip; public function SplashScreen(){ addFrameScript(109, frame110); } function frame110(){ stop(); } } }//package
Section 152
//Ticketless (Ticketless) package { import flash.events.*; import org.flixel.*; import flash.display.*; import ludemes.*; import states.*; import flash.ui.*; public class Ticketless extends FlxGame { public function Ticketless():void{ Globals.adClip = new MovieClip(); super(250, 100, IntroState, 3); this.pause = new PauseScreen(); } override protected function onFocus(_arg1:Event=null):void{ super.onFocus(_arg1); if (!(FlxG.state is PlayState)){ Mouse.show(); }; } override protected function onEnterFrame(_arg1:Event):void{ super.onEnterFrame(_arg1); this.y = 25; } override protected function onFocusLost(_arg1:Event=null):void{ super.onFocusLost(_arg1); this.y = 25; } } }//package
Section 153
//ZattikkaHiScores (ZattikkaHiScores) package { import flash.events.*; import flash.display.*; import flash.net.*; import com.hexagonstar.util.debug.*; import flash.external.*; public class ZattikkaHiScores extends MovieClip { private const EVENT_VIEW_HI_SCORE:String = "ViewHiScore="; private const MSG_SERVER_ERROR:String = "Could not contact server, please try again in a few minutes."; private const FB_ACTION:String = "/Facebook.action?"; private const HS_PLATFORM_WEB:int = 0; private const TEST_SERVER_URL:String = "http://api.staging.zattikka.com"; private const EVENT_SUBMIT_HI_SCORE:String = "SubmitHiScore="; private const EVENT_GET_HI_SCORES:String = "GetHiScores="; private const VERSION_NUM:String = "1.0.16 (AS3)"; private const EVENT_VIEW_HI_SCORES:String = "ViewHiScores="; private const TW_ACTION:String = "/Twitter.action?"; private const LIVE_SERVER_URL:String = "http://api.zattikka.com"; private const MSG_SUBMITTING_DETAILS:String = "Submitting hi-score details to the server, please wait."; private const GFTP_URL:String = "http://www.gamesfortheplanet.com"; private const MSG_PLEASE_ENTER_NICKNAME:String = "Please enter your nickname."; private const EVENT_PUBLISH_HI_SCORE_FEED_EXTERNAL:String = "PublishHiScoreFeedExternal="; private const EVENT_POST_TWEET:String = "PostTweet="; private const HS_PLATFORM_FACEBOOK:int = 1; private const HS_ACTION:String = "/HiScore.action?"; private const EVENT_PUBLISH_HI_SCORE_FEED:String = "PublishHiScoreFeed="; public var btnGFTP:SimpleButton; private var gameKey:String; private var SERVER_URL:String;// = "http://api.zattikka.com" private var g5UserExists:Boolean; private var entryScreen:MovieClip;// = null private var caller:Object; private var score:Number; private var g5User:Object; private var fbUser:Object; private var cxn:LocalConnection; private var lowIsBest:Boolean; private var gameId:Number; private var infoScreen:MovieClip;// = null private var levelId:Number; private var userManuallySet:Boolean;// = false private var fbSessionKey:String; public var movEntryScreen:MovieClip; private var msg1:String; private var msg2:String; private var fbUserExists:Boolean; public var movInfoScreen:MovieClip; private var gameCode:String; public function ZattikkaHiScores(){ debug((("[ZattikkaHiScores VERSION " + VERSION_NUM) + "]")); this.visible = false; } private function grabG5User():void{ this.g5User = ExternalInterface.call("getG5User"); this.g5UserExists = ((g5User == null)) ? false : !(isNaN(this.g5User[0])); debug(("[ZattikkaHiScores::grabG5User] " + (g5UserExists) ? ((("userId = " + this.g5User[0]) + ", userName = ") + this.g5User[1]) : "g5User is empty")); } private function grabFacebookUser():void{ this.fbUser = ExternalInterface.call("getFBUser"); this.fbUserExists = ((fbUser == null)) ? false : !(isNaN(this.fbUser[0])); this.fbSessionKey = ExternalInterface.call("getFBSessionKey"); debug(("[ZattikkaHiScores::grabFacebookUser] " + (fbUserExists) ? ((((("userId = " + this.fbUser[0]) + ", userName = ") + this.fbUser[1]) + ", sessionKey = ") + this.fbSessionKey) : "fbUser is empty")); } private function getRandomString(_arg1:int):String{ var _local2 = ""; var _local3:int; while (_local3 < _arg1) { _local2 = (_local2 + String.fromCharCode(getRandom(48, 122))); _local3++; }; return (_local2); } public function setFacebookUser(_arg1:String, _arg2:String, _arg3:String):void{ this.fbUser = new Array(_arg1, _arg2); this.fbSessionKey = _arg3; userManuallySet = true; debug(((("[ZattikkaHiScores::setFacebookUser] userId = " + this.fbUser[0]) + ", userName = ") + this.fbUser[1])); } public function showInfoMessage(_arg1:String, _arg2:Boolean):void{ infoScreen["txtInfo"].text = _arg1; infoScreen["btnBack"].visible = _arg2; infoScreen["btnView"].visible = ((!(_arg2)) && (!(fbUserExists))); infoScreen.visible = true; entryScreen.visible = false; } public function viewHiScores(_arg1:int, _arg2:Boolean=false):void{ debug(((("[ZattikkaHiScores::viewHiScores] gameId = " + _arg1) + ", testMode = ") + _arg2)); initServerURL(_arg2); var _local3:String = ((SERVER_URL + HS_ACTION) + EVENT_VIEW_HI_SCORES); _local3 = (_local3 + ("&gameId=" + _arg1)); navigateToURL(new URLRequest(_local3), "_blank"); } private function showEntryScreen():void{ entryScreen["txtMsg1"].text = msg1; entryScreen["txtMsg2"].text = msg2; entryScreen["movNameAuto"].visible = ((g5UserExists) || (fbUserExists)); entryScreen["movNameManual"].visible = ((!(g5UserExists)) && (!(fbUserExists))); entryScreen["movNameAuto"]["txtName"].text = (g5UserExists) ? this.g5User[1] : (fbUserExists) ? this.fbUser[1] : ""; entryScreen["movNameManual"]["txtName"].text = ""; entryScreen.visible = true; infoScreen.visible = false; } private function replaceAll(_arg1:String, _arg2:String, _arg3:String):String{ var _local4 = ""; var _local5:int; while (_local5 < _arg1.length) { if (_arg1.charAt(_local5) == _arg2){ _local4 = (_local4 + _arg3); } else { _local4 = (_local4 + _arg1.charAt(_local5)); }; _local5++; }; return (_local4); } private function xor(_arg1:String, _arg2:String, _arg3:Boolean):String{ var _local7:int; var _local4 = ""; var _local5:int; var _local6:int; while (_local5 < _arg1.length) { if (_local6 >= _arg2.length){ _local6 = 0; }; _local7 = ((_arg1.charCodeAt(_local5) ^ _arg2.charCodeAt(_local6)) + 1); if (_arg3){ debug(((("charCode = " + _local7) + " = ") + String.fromCharCode(_local7))); }; _local4 = (_local4 + String.fromCharCode(_local7)); _local5++; _local6++; }; return (_local4); } private function submitScore():void{ showInfoMessage(MSG_SUBMITTING_DETAILS, false); infoScreen.visible = true; entryScreen.visible = false; var _local1:int = (fbUserExists) ? HS_PLATFORM_FACEBOOK : HS_PLATFORM_WEB; var _local2 = ""; var _local3 = ""; if (fbUserExists){ _local3 = this.fbUser[0]; _local2 = this.fbUser[1]; } else { if (g5UserExists){ _local3 = this.g5User[0]; _local2 = this.g5User[1]; } else { _local2 = entryScreen["movNameManual"]["txtName"].text; }; }; var _local4:String = String(new Date().getTime()); var _local5:String = _local4.split("").reverse().join(""); var _local6:String = xor(_local5, this.gameKey, false); var _local7 = ""; _local7 = (_local7 + (this.gameId + ",")); _local7 = (_local7 + (this.levelId + ",")); _local7 = (_local7 + (_local1 + ",")); _local7 = (_local7 + (this.score + ",")); _local7 = (_local7 + (_local3 + ",")); _local7 = (_local7 + (replaceAll(_local2, ",", "") + ",")); _local7 = (_local7 + ","); _local7 = (_local7 + lowIsBest); var _local8:String = xor(_local7, _local6, false); debug(((("key [" + _local6.length) + "] = ") + _local6)); debug(((("plain [" + _local7.length) + "] = ") + _local7)); debug(((("cipher [" + _local8.length) + "] = ") + _local8)); _local8 = ((getRandomString(5) + _local8) + getRandomString(5)); var _local9:URLVariables = new URLVariables(); _local9.gameId = this.gameId; _local9.platformId = _local1; _local9.time = _local4; _local9.data = _local8; _local9.returnMessage = true; hitServer(HS_ACTION, EVENT_SUBMIT_HI_SCORE, _local9); } private function debug(_arg1:String):void{ trace(_arg1); Debug.trace(_arg1); } private function facebookFeedExternal():void{ var _local1:String = ((SERVER_URL + FB_ACTION) + EVENT_PUBLISH_HI_SCORE_FEED_EXTERNAL); _local1 = (_local1 + ("&gameId=" + this.gameId)); _local1 = (_local1 + ("&levelId=" + this.levelId)); _local1 = (_local1 + ("&score=" + this.score)); navigateToURL(new URLRequest(_local1), "_blank"); } public function setDetails(_arg1:int, _arg2:int, _arg3:String, _arg4:String, _arg5:Boolean, _arg6:Number, _arg7:String, _arg8:String, _arg9:Boolean=false):void{ var gameId = _arg1; var levelId = _arg2; var gameCode = _arg3; var gameKey = _arg4; var lowIsBest = _arg5; var score = _arg6; var msg1 = _arg7; var msg2 = _arg8; var testMode = _arg9; debug(((((((((((("[ZattikkaHiScores::setDetails] gameId = " + gameId) + ", levelId = ") + levelId) + ", gameCode = ") + gameCode) + ", lowIsBest = ") + lowIsBest) + ", score = ") + score) + ", testMode = ") + testMode)); initServerURL(testMode); entryScreen = this["movEntryScreen"]; infoScreen = this["movInfoScreen"]; entryScreen.visible = false; infoScreen.visible = false; this.gameId = gameId; this.levelId = levelId; this.gameCode = gameCode; this.gameKey = gameKey; this.lowIsBest = lowIsBest; this.score = score; this.msg1 = msg1; this.msg2 = msg2; if (!userManuallySet){ try { grabG5User(); if (!g5UserExists){ grabFacebookUser(); }; } catch(err:Error) { }; }; this["btnGFTP"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress); entryScreen["btnSubmit"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress); entryScreen["btnTwitter"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress); entryScreen["btnFacebook"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress); infoScreen["btnView"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress); infoScreen["btnBack"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress); if (fbUserExists){ btn_submitScore(); } else { showEntryScreen(); }; this.visible = true; } private function facebookFeed():void{ var _local1:URLVariables = new URLVariables(); _local1.gameId = this.gameId; _local1.levelId = this.levelId; _local1.score = this.score; _local1.sessionKey = this.fbSessionKey; _local1.returnMessage = true; hitServer(FB_ACTION, EVENT_PUBLISH_HI_SCORE_FEED, _local1); } public function loadHandler(_arg1:String, _arg2:Boolean, _arg3:Event):void{ var response:URLLoader; var xml:XML; var resCode:int; var stripesEvent = _arg1; var success = _arg2; var event = _arg3; debug(((((("[ZattikkaHiScores::loadHandler] stripesEvent = " + stripesEvent) + ", success = ") + success) + ", event = ") + event.toString())); if (!success){ if (stripesEvent == EVENT_GET_HI_SCORES){ caller.getHiScores_Error(); } else { showInfoMessage(MSG_SERVER_ERROR, true); }; } else { response = URLLoader(event.target); xml = new XML(response.data); resCode = xml.@code; switch (stripesEvent){ case EVENT_SUBMIT_HI_SCORE: showInfoMessage(xml.@msg, (resCode == -1)); if (((fbUserExists) && ((((resCode == 1)) || ((resCode == 2)))))){ try { ExternalInterface.call("refreshFBHiScores", this.score, this.levelId); ExternalInterface.call("streamPublish_FBConnect", this.msg1, this.levelId); } catch(err:Error) { }; }; break; case EVENT_PUBLISH_HI_SCORE_FEED: submitScore(); break; case EVENT_GET_HI_SCORES: caller.getHiScores_Callback(xml); break; }; }; } public function setG5User(_arg1:String, _arg2:String):void{ this.g5User = new Array(_arg1, _arg2); userManuallySet = true; debug(((("[ZattikkaHiScores::setG5User] userId = " + this.g5User[0]) + ", userName = ") + this.g5User[1])); } private function getRandom(_arg1:Number, _arg2:Number):Number{ return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1)); } private function hitServer(_arg1:String, _arg2:String, _arg3:URLVariables):void{ var stripesAction = _arg1; var stripesEvent = _arg2; var vars = _arg3; debug(((("[ZattikkaHiScores::hitServer] url = " + SERVER_URL) + stripesAction) + stripesEvent)); var request:URLRequest = new URLRequest(((SERVER_URL + stripesAction) + stripesEvent)); var loader:URLLoader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.BINARY; request.data = vars; request.method = URLRequestMethod.POST; request.requestHeaders = new Array(new URLRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")); loader.addEventListener(Event.COMPLETE, function (_arg1:Event):void{ loadHandler(stripesEvent, true, _arg1); }); loader.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:Event):void{ loadHandler(stripesEvent, false, _arg1); }); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function (_arg1:Event):void{ loadHandler(stripesEvent, false, _arg1); }); loader.load(request); } private function twitterTweet():void{ var _local1:String = ((SERVER_URL + TW_ACTION) + EVENT_POST_TWEET); _local1 = (_local1 + ("&gameId=" + this.gameId)); _local1 = (_local1 + ("&levelId=" + this.levelId)); _local1 = (_local1 + ("&score=" + this.score)); navigateToURL(new URLRequest(_local1), "_blank"); submitScore(); } public function onButtonPress(_arg1:MouseEvent):void{ switch (_arg1.target.name){ case "btnGFTP": navigateToURL(new URLRequest(GFTP_URL), "_blank"); break; case "btnSubmit": btn_submitScore(); break; case "btnTwitter": if (((((!(this.g5UserExists)) && (!(this.fbUserExists)))) && ((entryScreen["movNameManual"]["txtName"].text.length == 0)))){ showInfoMessage(MSG_PLEASE_ENTER_NICKNAME, true); } else { twitterTweet(); }; break; case "btnFacebook": if (this.fbUserExists){ facebookFeed(); } else { facebookFeedExternal(); }; break; case "btnView": viewScore(); break; case "btnBack": setDetails(this.gameId, this.levelId, this.gameCode, this.gameKey, this.lowIsBest, this.score, this.msg1, this.msg2); break; }; } public function viewScore():void{ var _local1:String = ((SERVER_URL + HS_ACTION) + EVENT_VIEW_HI_SCORE); _local1 = (_local1 + ("&gameId=" + this.gameId)); _local1 = (_local1 + ("&levelId=" + this.levelId)); _local1 = (_local1 + ("&platformId=" + HS_PLATFORM_WEB)); _local1 = (_local1 + ("&gameCode=" + this.gameCode)); if (this.g5UserExists){ _local1 = (_local1 + ("&userId=" + this.g5User[0])); } else { _local1 = (_local1 + ("&name=" + entryScreen["movNameManual"]["txtName"].text)); }; navigateToURL(new URLRequest(_local1), "_blank"); } private function btn_submitScore():void{ if (((((!(this.g5UserExists)) && (!(this.fbUserExists)))) && ((entryScreen["movNameManual"]["txtName"].text.length == 0)))){ showInfoMessage(MSG_PLEASE_ENTER_NICKNAME, true); } else { submitScore(); }; } public function getHiScores(_arg1:Object, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean, _arg6:Boolean=false):void{ debug(((((((((("[ZattikkaHiScores::getHiScores] gameId = " + _arg2) + ", levelId = ") + _arg3) + ", numRows = ") + _arg4) + ", lowIsBest = ") + _arg5) + ", testMode = ") + _arg6)); initServerURL(_arg6); this.caller = _arg1; var _local7:URLVariables = new URLVariables(); _local7.gameId = _arg2; _local7.levelId = _arg3; _local7.platformId = 0; _local7.viewPlatformId = 0; _local7.userId = ""; _local7.numRows = _arg4; _local7.lowIsBest = _arg5; hitServer(HS_ACTION, EVENT_GET_HI_SCORES, _local7); } public function initServerURL(_arg1:Boolean):void{ var params:Object; var fvSvrUrl:Object; var testMode = _arg1; if (testMode){ SERVER_URL = TEST_SERVER_URL; } else { try { params = LoaderInfo(this.root.loaderInfo).parameters; fvSvrUrl = params["svrUrl"]; if (((!((fvSvrUrl == null))) && ((fvSvrUrl.length > 0)))){ SERVER_URL = String(fvSvrUrl); }; } catch(err:Error) { }; }; debug(("[ZattikkaHiScores::initServerURL] SERVER_URL = " + SERVER_URL)); } } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip {Gimme5Background} [Gimme5Background]Uses:1
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:24
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:24
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:7Used by:24
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:24
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClipUses:11Used by:24
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClipUses:13Used by:24
Symbol 15 GraphicUsed by:19
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:19
Symbol 18 GraphicUsed by:19
Symbol 19 ButtonUses:15 17 18Used by:24
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClipUses:20Used by:24
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:22Used by:24
Symbol 24 MovieClip {SplashScreen} [SplashScreen]Uses:4 6 8 10 12 14 19 21 23
Symbol 25 GraphicUsed by:31
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:26Used by:31
Symbol 28 GraphicUsed by:31
Symbol 29 FontUsed by:30
Symbol 30 EditableTextUses:29Used by:31
Symbol 31 MovieClip {LoadingBar} [LoadingBar]Uses:25 27 28 30
Symbol 32 Sound {org.flixel.FlxGame_SndFlixel} [org.flixel.FlxGame_SndFlixel]
Symbol 33 Sound {org.flixel.FlxGame_SndBeep} [org.flixel.FlxGame_SndBeep]
Symbol 34 Bitmap {org.flixel.data.FlxMouse_ImgDefaultCursor}
Symbol 35 Bitmap {org.flixel.data.FlxPause_ImgKey0}
Symbol 36 Bitmap {org.flixel.FlxPreloader_ImgLogoLight}
Symbol 37 Bitmap {org.flixel.FlxPreloader_ImgLogoCorners}
Symbol 38 Bitmap {ludemes.FlixelLogo_LogoImg}
Symbol 39 Bitmap {org.flixel.data.FlxPanel_ImgStumble}
Symbol 40 Bitmap {org.flixel.data.FlxPanel_ImgClose}
Symbol 41 Bitmap {org.flixel.data.FlxPause_ImgKeyPlus}
Symbol 42 Bitmap {org.flixel.data.FlxPanel_ImgDonate}
Symbol 43 Bitmap {org.flixel.data.FlxPause_ImgKeyMinus}
Symbol 44 Bitmap {org.flixel.data.FlxPanel_ImgTwitter}
Symbol 45 Bitmap {org.flixel.data.FlxPause_ImgKeyP}
Symbol 46 Font {org.flixel.FlxGame_junk}
Symbol 47 Bitmap {org.flixel.data.FlxPanel_ImgDigg}
Symbol 48 Bitmap {org.flixel.data.FlxPanel_ImgReddit}
Symbol 49 Bitmap {org.flixel.data.FlxPanel_ImgDelicious}
Symbol 50 Sound {states.IntroState_ThemeMusic} [states.IntroState_ThemeMusic]
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClip {Gimme5LogoBig} [Gimme5LogoBig]Uses:51
Symbol 53 Sound {states.IntroState_FlixelLogoSound} [states.IntroState_FlixelLogoSound]
Symbol 54 Sound {states.IntroState_LogoSound} [states.IntroState_LogoSound]
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClip {Gimme5LogoSmall} [Gimme5LogoSmall]Uses:55
Symbol 57 GraphicUsed by:60
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClipUses:58Used by:60
Symbol 60 MovieClipUses:57 59Used by:98
Symbol 61 GraphicUsed by:82
Symbol 62 FontUsed by:63 64 76 94
Symbol 63 EditableTextUses:62Used by:82
Symbol 64 EditableTextUses:62Used by:82
Symbol 65 GraphicUsed by:66 67
Symbol 66 MovieClipUses:65Used by:67
Symbol 67 ButtonUses:66 65Used by:82
Symbol 68 GraphicUsed by:69 70
Symbol 69 MovieClipUses:68Used by:70
Symbol 70 ButtonUses:69 68Used by:82
Symbol 71 GraphicUsed by:72 73
Symbol 72 MovieClipUses:71Used by:73
Symbol 73 ButtonUses:72 71Used by:82
Symbol 74 GraphicUsed by:82
Symbol 75 GraphicUsed by:79
Symbol 76 EditableTextUses:62Used by:79 81
Symbol 77 FontUsed by:78 80
Symbol 78 TextUses:77Used by:79
Symbol 79 MovieClipUses:75 76 78Used by:82
Symbol 80 TextUses:77Used by:81
Symbol 81 MovieClipUses:76 80Used by:82
Symbol 82 MovieClipUses:61 63 64 67 70 73 74 79 81Used by:98
Symbol 83 GraphicUsed by:84 85
Symbol 84 MovieClipUses:83Used by:85
Symbol 85 ButtonUses:84 83Used by:95
Symbol 86 GraphicUsed by:90 91
Symbol 87 FontUsed by:88 89
Symbol 88 TextUses:87Used by:90 91
Symbol 89 TextUses:87Used by:90 91
Symbol 90 MovieClipUses:86 88 89Used by:91
Symbol 91 ButtonUses:90 86 88 89Used by:95
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClipUses:92Used by:95
Symbol 94 EditableTextUses:62Used by:95
Symbol 95 MovieClipUses:85 91 93 94Used by:98
Symbol 96 GraphicUsed by:97
Symbol 97 ButtonUses:96Used by:98
Symbol 98 MovieClip {ZattikkaHiScores} [ZattikkaHiScores]Uses:60 82 95 97
Symbol 99 Bitmap {ludemes.Player_PlayersImg}
Symbol 100 Bitmap {ludemes.Luggage_LuggageImg}
Symbol 101 Bitmap {ludemes.Balloon_BalloonImg}
Symbol 102 Bitmap {ludemes.ASD_ASDImg}
Symbol 103 Bitmap {ludemes.WarningSign_LogoImg}
Symbol 104 Bitmap {ludemes.Door_LuggageImg}
Symbol 105 Bitmap {ludemes.People_PeopleGraphics}
Symbol 106 Bitmap {ludemes.SeatedPeople_PeopleGraphics}
Symbol 107 Bitmap {ludemes.TCLogo_LogoImg}
Symbol 108 Bitmap {ludemes.Inspector_InspectorImg}
Symbol 109 Bitmap {ludemes.TitleScreen_TitleImg}
Symbol 110 Bitmap {ludemes.PixelButton_Img}
Symbol 111 Bitmap {ludemes.StillInspectorLeg_InspectorLegImg}
Symbol 112 BinaryData {states.PlayState_TileMapText}
Symbol 113 Bitmap {org.flixel.FlxTilemap_ImgAuto}
Symbol 114 Bitmap {ludemes.StillInspector_InspectorImg}
Symbol 115 Bitmap {ludemes.Wagon_TileMap}
Symbol 116 Bitmap {org.flixel.FlxTilemap_ImgAutoAlt}

Instance Names

"playBtn"Symbol 24 MovieClip {SplashScreen} [SplashScreen] Frame 1Symbol 19 Button
"splashHitArea"Symbol 24 MovieClip {SplashScreen} [SplashScreen] Frame 1Symbol 21 MovieClip
"movLoadingBar"Symbol 31 MovieClip {LoadingBar} [LoadingBar] Frame 1Symbol 27 MovieClip
"txtPercent"Symbol 31 MovieClip {LoadingBar} [LoadingBar] Frame 1Symbol 30 EditableText
"txtName"Symbol 79 MovieClip Frame 1Symbol 76 EditableText
"txtName"Symbol 81 MovieClip Frame 1Symbol 76 EditableText
"txtMsg1"Symbol 82 MovieClip Frame 1Symbol 63 EditableText
"txtMsg2"Symbol 82 MovieClip Frame 1Symbol 64 EditableText
"btnSubmit"Symbol 82 MovieClip Frame 1Symbol 67 Button
"btnTwitter"Symbol 82 MovieClip Frame 1Symbol 70 Button
"btnFacebook"Symbol 82 MovieClip Frame 1Symbol 73 Button
"txtMsg1"Symbol 82 MovieClip Frame 1Symbol 63 EditableText
"txtMsg2"Symbol 82 MovieClip Frame 1Symbol 64 EditableText
"movNameManual"Symbol 82 MovieClip Frame 1Symbol 79 MovieClip
"movNameAuto"Symbol 82 MovieClip Frame 1Symbol 81 MovieClip
"btnBack"Symbol 95 MovieClip Frame 1Symbol 85 Button
"btnView"Symbol 95 MovieClip Frame 1Symbol 91 Button
"txtInfo"Symbol 95 MovieClip Frame 1Symbol 94 EditableText
"movEntryScreen"Symbol 98 MovieClip {ZattikkaHiScores} [ZattikkaHiScores] Frame 1Symbol 82 MovieClip
"movInfoScreen"Symbol 98 MovieClip {ZattikkaHiScores} [ZattikkaHiScores] Frame 1Symbol 95 MovieClip
"btnGFTP"Symbol 98 MovieClip {ZattikkaHiScores} [ZattikkaHiScores] Frame 1Symbol 97 Button

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 2 as "Gimme5Background"
ExportAssets (56)Timeline Frame 1Symbol 24 as "SplashScreen"
ExportAssets (56)Timeline Frame 1Symbol 31 as "LoadingBar"
ExportAssets (56)Timeline Frame 1Symbol 32 as "org.flixel.FlxGame_SndFlixel"
ExportAssets (56)Timeline Frame 1Symbol 33 as "org.flixel.FlxGame_SndBeep"
ExportAssets (56)Timeline Frame 2Symbol 50 as "states.IntroState_ThemeMusic"
ExportAssets (56)Timeline Frame 2Symbol 52 as "Gimme5LogoBig"
ExportAssets (56)Timeline Frame 2Symbol 53 as "states.IntroState_FlixelLogoSound"
ExportAssets (56)Timeline Frame 2Symbol 54 as "states.IntroState_LogoSound"
ExportAssets (56)Timeline Frame 2Symbol 56 as "Gimme5LogoSmall"
ExportAssets (56)Timeline Frame 2Symbol 98 as "ZattikkaHiScores"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"Ticketless"Frame 2




http://swfchan.com/19/91132/info.shtml
Created: 28/3 -2019 02:24:34 Last modified: 28/3 -2019 02:24:34 Server time: 21/01 -2021 15:15:49