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

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

a_1295357417188.akhara_xda_pump.swf

This is the info page for
Flash #94035

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


ActionScript [AS3]
Section 1
//PropTween (com.greensock.core.PropTween) package com.greensock.core { public class PropTween { public var start:Number; public var name:String; public var prevNode:PropTween; public var change:Number; public var target:Object; public var priority:int; public var property:String; public var nextNode:PropTween; public var isPlugin:Boolean; public function PropTween(target:Object, property:String, start:Number, change:Number, name:String, isPlugin:Boolean, nextNode:PropTween=null, priority:int=0){ super(); this.target = target; this.property = property; this.start = start; this.change = change; this.name = name; this.isPlugin = isPlugin; if (nextNode){ nextNode.prevNode = this; this.nextNode = nextNode; }; this.priority = priority; } } }//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(vars:Object=null){ super(0, vars); } override public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ var tween:TweenCore; var dur:Number; var next:TweenCore; tween = _firstChild; this.cachedTotalTime = time; this.cachedTime = time; while (tween) { next = tween.nextNode; if (((tween.active) || ((((((time >= tween.cachedStartTime)) && (!(tween.cachedPaused)))) && (!(tween.gc)))))){ if (!tween.cachedReversed){ tween.renderTime(((time - tween.cachedStartTime) * tween.cachedTimeScale), suppressEvents, false); } else { dur = (tween.cacheIsDirty) ? tween.totalDuration : tween.cachedTotalDuration; tween.renderTime((dur - ((time - tween.cachedStartTime) * tween.cachedTimeScale)), suppressEvents, false); }; }; tween = next; }; } public function addChild(tween:TweenCore):void{ if (((!(tween.cachedOrphan)) && (tween.timeline))){ tween.timeline.remove(tween, true); }; tween.timeline = this; if (tween.gc){ tween.setEnabled(true, true); }; if (_firstChild){ _firstChild.prevNode = tween; }; tween.nextNode = _firstChild; _firstChild = tween; tween.prevNode = null; tween.cachedOrphan = false; } public function get rawTime():Number{ return (this.cachedTotalTime); } public function remove(tween:TweenCore, skipDisable:Boolean=false):void{ if (tween.cachedOrphan){ return; }; if (!skipDisable){ tween.setEnabled(false, true); }; if (tween.nextNode){ tween.nextNode.prevNode = tween.prevNode; } else { if (_lastChild == tween){ _lastChild = tween.prevNode; }; }; if (tween.prevNode){ tween.prevNode.nextNode = tween.nextNode; } else { if (_firstChild == tween){ _firstChild = tween.nextNode; }; }; tween.cachedOrphan = true; } } }//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 cachedReversed:Boolean; public var nextNode:TweenCore; public var cachedTime:Number; protected var _rawPrevTime:Number;// = -1 public var vars:Object; public var cachedTotalTime:Number; public var data; public var timeline:SimpleTimeline; public var cachedOrphan:Boolean; public var cachedStartTime:Number; public var prevNode:TweenCore; public var cachedDuration:Number; public var gc:Boolean; public var cachedPauseTime:Number; public var cacheIsDirty:Boolean; public var cachedPaused:Boolean; public var cachedTimeScale:Number; public var cachedTotalDuration:Number; public static const version:Number = 1.391; protected static var _classInitted:Boolean; public function TweenCore(duration:Number=0, vars:Object=null){ var tl:SimpleTimeline; _rawPrevTime = -1; super(); this.vars = ((vars)!=null) ? vars : {}; this.cachedDuration = (this.cachedTotalDuration = duration); _delay = (this.vars.delay) ? Number(this.vars.delay) : 0; this.cachedTimeScale = (this.vars.timeScale) ? Number(this.vars.timeScale) : 1; this.active = Boolean((((((duration == 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; }; }; tl = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline; this.cachedStartTime = (tl.cachedTotalTime + _delay); tl.addChild(this); if (this.vars.reversed){ this.cachedReversed = true; }; if (this.vars.paused){ this.paused = true; }; } public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ } public function get delay():Number{ return (_delay); } public function get duration():Number{ return (this.cachedDuration); } public function set reversed(b:Boolean):void{ if (b != this.cachedReversed){ this.cachedReversed = b; setTotalTime(this.cachedTotalTime, true); }; } public function set startTime(n:Number):void{ var adjust:Boolean; adjust = Boolean(((!((this.timeline == null))) && (((!((n == this.cachedStartTime))) || (this.gc))))); this.cachedStartTime = n; if (adjust){ this.timeline.addChild(this); }; } public function set delay(n:Number):void{ this.startTime = (this.startTime + (n - _delay)); _delay = n; } 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(n:Number):void{ this.cachedDuration = (this.cachedTotalDuration = n); setDirtyCache(false); } public function invalidate():void{ } public function restart(includeDelay:Boolean=false, suppressEvents:Boolean=true):void{ this.reversed = false; this.paused = false; this.setTotalTime((includeDelay) ? -(_delay) : 0, suppressEvents); } public function complete(skipRender:Boolean=false, suppressEvents:Boolean=false):void{ if (!skipRender){ renderTime(this.totalDuration, suppressEvents, false); return; }; if (this.timeline.autoRemoveChildren){ this.setEnabled(false, false); } else { this.active = false; }; if (!suppressEvents){ if (((((this.vars.onComplete) && ((this.cachedTotalTime == this.cachedTotalDuration)))) && (!(this.cachedReversed)))){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); } else { if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){ this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams); }; }; }; } public function get totalTime():Number{ return (this.cachedTotalTime); } public function get startTime():Number{ return (this.cachedStartTime); } public function get reversed():Boolean{ return (this.cachedReversed); } public function set currentTime(n:Number):void{ setTotalTime(n, false); } protected function setDirtyCache(includeSelf:Boolean=true):void{ var tween:TweenCore; tween = (includeSelf) ? this : this.timeline; while (tween) { tween.cacheIsDirty = true; tween = tween.timeline; }; } public function reverse(forceResume:Boolean=true):void{ this.reversed = true; if (forceResume){ this.paused = false; } else { if (this.gc){ this.setEnabled(true, false); }; }; } public function set paused(b:Boolean):void{ if (((!((b == this.cachedPaused))) && (this.timeline))){ if (b){ this.cachedPauseTime = this.timeline.rawTime; } else { this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - this.cachedPauseTime)); this.cachedPauseTime = NaN; setDirtyCache(false); }; this.cachedPaused = b; this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); }; if (((!(b)) && (this.gc))){ this.setTotalTime(this.cachedTotalTime, false); this.setEnabled(true, false); }; } public function kill():void{ setEnabled(false, false); } public function set totalTime(n:Number):void{ setTotalTime(n, false); } public function get currentTime():Number{ return (this.cachedTime); } protected function setTotalTime(time:Number, suppressEvents:Boolean=false):void{ var tlTime:Number; var dur:Number; if (this.timeline){ tlTime = (((this.cachedPauseTime) || ((this.cachedPauseTime == 0)))) ? this.cachedPauseTime : this.timeline.cachedTotalTime; if (this.cachedReversed){ dur = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; this.cachedStartTime = (tlTime - ((dur - time) / this.cachedTimeScale)); } else { this.cachedStartTime = (tlTime - (time / this.cachedTimeScale)); }; if (!this.timeline.cacheIsDirty){ setDirtyCache(false); }; if (this.cachedTotalTime != time){ renderTime(time, suppressEvents, false); }; }; } public function pause():void{ this.paused = true; } public function set totalDuration(n:Number):void{ this.duration = n; } public function get totalDuration():Number{ return (this.cachedTotalDuration); } public function setEnabled(enabled:Boolean, ignoreTimeline:Boolean=false):Boolean{ this.gc = !(enabled); if (enabled){ this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); if (((!(ignoreTimeline)) && (this.cachedOrphan))){ this.timeline.addChild(this); }; } else { this.active = false; if (((!(ignoreTimeline)) && (!(this.cachedOrphan)))){ this.timeline.remove(this, true); }; }; return (false); } } }//package com.greensock.core
Section 4
//Bounce (com.greensock.easing.Bounce) package com.greensock.easing { public class Bounce { public function Bounce(){ super(); } public static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{ t = (t / d); if (t < (1 / 2.75)){ return (((c * ((7.5625 * t) * t)) + b)); }; if (t < (2 / 2.75)){ t = (t - (1.5 / 2.75)); return (((c * (((7.5625 * t) * t) + 0.75)) + b)); }; if (t < (2.5 / 2.75)){ t = (t - (2.25 / 2.75)); return (((c * (((7.5625 * t) * t) + 0.9375)) + b)); }; t = (t - (2.625 / 2.75)); return (((c * (((7.5625 * t) * t) + 0.984375)) + b)); } public static function easeIn(t:Number, b:Number, c:Number, d:Number):Number{ return (((c - easeOut((d - t), 0, c, d)) + b)); } public static function easeInOut(t:Number, b:Number, c:Number, d:Number):Number{ if (t < (d * 0.5)){ return (((easeIn((t * 2), 0, c, d) * 0.5) + b)); }; return ((((easeOut(((t * 2) - d), 0, c, d) * 0.5) + (c * 0.5)) + b)); } } }//package com.greensock.easing
Section 5
//Expo (com.greensock.easing.Expo) package com.greensock.easing { public class Expo { public function Expo(){ super(); } public static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{ return (((t)==d) ? (b + c) : ((c * (-(Math.pow(2, ((-10 * t) / d))) + 1)) + b)); } public static function easeIn(t:Number, b:Number, c:Number, d:Number):Number{ return (((t)==0) ? b : (((c * Math.pow(2, (10 * ((t / d) - 1)))) + b) - (c * 0.001))); } public static function easeInOut(t:Number, b:Number, c:Number, d:Number):Number{ if (t == 0){ return (b); }; if (t == d){ return ((b + c)); }; t = (t / (d * 0.5)); if (t < 1){ return ((((c * 0.5) * Math.pow(2, (10 * (t - 1)))) + b)); }; --t; return ((((c * 0.5) * (-(Math.pow(2, (-10 * t))) + 2)) + b)); } } }//package com.greensock.easing
Section 6
//TweenEvent (com.greensock.events.TweenEvent) package com.greensock.events { import flash.events.*; public class TweenEvent extends Event { public static const COMPLETE:String = "complete"; public static const START:String = "start"; public static const UPDATE:String = "change"; public static const REVERSE_COMPLETE:String = "reverseComplete"; public static const INIT:String = "init"; public static const VERSION:Number = 1.1; public static const REPEAT:String = "repeat"; public function TweenEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){ super(type, bubbles, cancelable); } override public function clone():Event{ return (new TweenEvent(this.type, this.bubbles, this.cancelable)); } } }//package com.greensock.events
Section 7
//AutoAlphaPlugin (com.greensock.plugins.AutoAlphaPlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; public class AutoAlphaPlugin extends TweenPlugin { protected var _ignoreVisible:Boolean; protected var _target:Object; public static const API:Number = 1; public function AutoAlphaPlugin(){ super(); this.propName = "autoAlpha"; this.overwriteProps = ["alpha", "visible"]; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ _target = target; addTween(target, "alpha", target.alpha, value, "alpha"); return (true); } override public function killProps(lookup:Object):void{ super.killProps(lookup); _ignoreVisible = Boolean(("visible" in lookup)); } override public function set changeFactor(n:Number):void{ updateTweens(n); if (!_ignoreVisible){ _target.visible = Boolean(!((_target.alpha == 0))); }; } } }//package com.greensock.plugins
Section 8
//BevelFilterPlugin (com.greensock.plugins.BevelFilterPlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; 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(){ super(); this.propName = "bevelFilter"; this.overwriteProps = ["bevelFilter"]; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ _target = target; _type = BevelFilter; initFilter(value, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((value.quality) || (2))), _propNames); return (true); } } }//package com.greensock.plugins
Section 9
//BezierPlugin (com.greensock.plugins.BezierPlugin) package com.greensock.plugins { import com.greensock.*; public class BezierPlugin extends TweenPlugin { protected var _future:Object; protected var _orientData:Array; protected var _orient:Boolean; protected var _beziers:Object; protected var _target:Object; public static const API:Number = 1; protected static const _RAD2DEG:Number = 57.2957795130823; public function BezierPlugin(){ _future = {}; super(); this.propName = "bezier"; this.overwriteProps = []; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ if (!(value is Array)){ return (false); }; init(tween, (value as Array), false); return (true); } protected function init(tween:TweenLite, beziers:Array, through:Boolean):void{ var enumerables:Object; var props:Object; var i:int; var p:String; var killVarsLookup:Object; _target = tween.target; enumerables = ((tween.vars.isTV)==true) ? tween.vars.exposedVars : tween.vars; if (enumerables.orientToBezier == true){ _orientData = [["x", "y", "rotation", 0, 0.01]]; _orient = true; } else { if ((enumerables.orientToBezier is Array)){ _orientData = enumerables.orientToBezier; _orient = true; }; }; props = {}; i = 0; while (i < beziers.length) { for (p in beziers[i]) { if (props[p] == undefined){ props[p] = [tween.target[p]]; }; if (typeof(beziers[i][p]) == "number"){ props[p].push(beziers[i][p]); } else { props[p].push((tween.target[p] + Number(beziers[i][p]))); }; }; i = (i + 1); }; for (p in props) { this.overwriteProps[this.overwriteProps.length] = p; if (enumerables[p] != undefined){ if (typeof(enumerables[p]) == "number"){ props[p].push(enumerables[p]); } else { props[p].push((tween.target[p] + Number(enumerables[p]))); }; killVarsLookup = {}; killVarsLookup[p] = true; tween.killVars(killVarsLookup, false); delete enumerables[p]; }; }; _beziers = parseBeziers(props, through); } override public function killProps(lookup:Object):void{ var p:String; for (p in _beziers) { if ((p in lookup)){ delete _beziers[p]; }; }; super.killProps(lookup); } override public function set changeFactor(n:Number):void{ var i:int; var p:String; var b:Object; var t:Number; var segments:int; var val:Number; var curVals:Object; var dx:Number; var dy:Number; var cotb:Array; var toAdd:Number; var oldTarget:Object; var oldRound:Boolean; _changeFactor = n; if (n == 1){ for (p in _beziers) { i = (_beziers[p].length - 1); _target[p] = _beziers[p][i][2]; }; } else { for (p in _beziers) { segments = _beziers[p].length; if (n < 0){ i = 0; } else { if (n >= 1){ i = (segments - 1); } else { i = ((segments * n) >> 0); }; }; t = ((n - (i * (1 / segments))) * segments); b = _beziers[p][i]; if (this.round){ val = (b[0] + (t * (((2 * (1 - t)) * (b[1] - b[0])) + (t * (b[2] - b[0]))))); if (val > 0){ _target[p] = ((val + 0.5) >> 0); } else { _target[p] = ((val - 0.5) >> 0); }; } else { _target[p] = (b[0] + (t * (((2 * (1 - t)) * (b[1] - b[0])) + (t * (b[2] - b[0]))))); }; }; }; if (_orient){ i = _orientData.length; curVals = {}; while (i--) { cotb = _orientData[i]; curVals[cotb[0]] = _target[cotb[0]]; curVals[cotb[1]] = _target[cotb[1]]; }; oldTarget = _target; oldRound = this.round; _target = _future; this.round = false; _orient = false; i = _orientData.length; while (i--) { cotb = _orientData[i]; this.changeFactor = (n + ((cotb[4]) || (0.01))); toAdd = ((cotb[3]) || (0)); dx = (_future[cotb[0]] - curVals[cotb[0]]); dy = (_future[cotb[1]] - curVals[cotb[1]]); oldTarget[cotb[2]] = ((Math.atan2(dy, dx) * _RAD2DEG) + toAdd); }; _target = oldTarget; this.round = oldRound; _orient = true; }; } public static function parseBeziers(props:Object, through:Boolean=false):Object{ var i:int; var a:Array; var b:Object; var p:String; var all:Object; all = {}; if (through){ for (p in props) { a = props[p]; b = []; all[p] = b; if (a.length > 2){ b[b.length] = [a[0], (a[1] - ((a[2] - a[0]) / 4)), a[1]]; i = 1; while (i < (a.length - 1)) { b[b.length] = [a[i], (a[i] + (a[i] - b[(i - 1)][1])), a[(i + 1)]]; i = (i + 1); }; } else { b[b.length] = [a[0], ((a[0] + a[1]) / 2), a[1]]; }; }; } else { for (p in props) { a = props[p]; b = []; all[p] = b; if (a.length > 3){ b[b.length] = [a[0], a[1], ((a[1] + a[2]) / 2)]; i = 2; while (i < (a.length - 2)) { b[b.length] = [b[(i - 2)][2], a[i], ((a[i] + a[(i + 1)]) / 2)]; i = (i + 1); }; b[b.length] = [b[(b.length - 1)][2], a[(a.length - 2)], a[(a.length - 1)]]; } else { if (a.length == 3){ b[b.length] = [a[0], a[1], a[2]]; } else { if (a.length == 2){ b[b.length] = [a[0], ((a[0] + a[1]) / 2), a[1]]; }; }; }; }; }; return (all); } } }//package com.greensock.plugins
Section 10
//BezierThroughPlugin (com.greensock.plugins.BezierThroughPlugin) package com.greensock.plugins { import com.greensock.*; public class BezierThroughPlugin extends BezierPlugin { public static const API:Number = 1; public function BezierThroughPlugin(){ super(); this.propName = "bezierThrough"; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ if (!(value is Array)){ return (false); }; init(tween, (value as Array), true); return (true); } } }//package com.greensock.plugins
Section 11
//BlurFilterPlugin (com.greensock.plugins.BlurFilterPlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; 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(){ super(); this.propName = "blurFilter"; this.overwriteProps = ["blurFilter"]; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ _target = target; _type = BlurFilter; initFilter(value, new BlurFilter(0, 0, ((value.quality) || (2))), _propNames); return (true); } } }//package com.greensock.plugins
Section 12
//ColorMatrixFilterPlugin (com.greensock.plugins.ColorMatrixFilterPlugin) package com.greensock.plugins { 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(){ super(); this.propName = "colorMatrixFilter"; this.overwriteProps = ["colorMatrixFilter"]; } override public function set changeFactor(n:Number):void{ _matrixTween.changeFactor = n; ColorMatrixFilter(_filter).matrix = _matrix; super.changeFactor = n; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ var cmf:Object; var endMatrix:Array; _target = target; _type = ColorMatrixFilter; cmf = value; initFilter({remove:value.remove, index:value.index, addFilter:value.addFilter}, new ColorMatrixFilter(_idMatrix.slice()), _propNames); _matrix = ColorMatrixFilter(_filter).matrix; endMatrix = []; if (((!((cmf.matrix == null))) && ((cmf.matrix is Array)))){ endMatrix = cmf.matrix; } else { if (cmf.relative == true){ endMatrix = _matrix.slice(); } else { endMatrix = _idMatrix.slice(); }; endMatrix = setBrightness(endMatrix, cmf.brightness); endMatrix = setContrast(endMatrix, cmf.contrast); endMatrix = setHue(endMatrix, cmf.hue); endMatrix = setSaturation(endMatrix, cmf.saturation); endMatrix = setThreshold(endMatrix, cmf.threshold); if (!isNaN(cmf.colorize)){ endMatrix = colorize(endMatrix, cmf.colorize, cmf.amount); }; }; _matrixTween = new EndArrayPlugin(); _matrixTween.init(_matrix, endMatrix); return (true); } public static function setSaturation(m:Array, n:Number):Array{ var inv:Number; var r:Number; var g:Number; var b:Number; var temp:Array; if (isNaN(n)){ return (m); }; inv = (1 - n); r = (inv * _lumR); g = (inv * _lumG); b = (inv * _lumB); temp = [(r + n), g, b, 0, 0, r, (g + n), b, 0, 0, r, g, (b + n), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(temp, m)); } public static function setHue(m:Array, n:Number):Array{ var c:Number; var s:Number; var temp:Array; if (isNaN(n)){ return (m); }; n = (n * (Math.PI / 180)); c = Math.cos(n); s = Math.sin(n); temp = [((_lumR + (c * (1 - _lumR))) + (s * -(_lumR))), ((_lumG + (c * -(_lumG))) + (s * -(_lumG))), ((_lumB + (c * -(_lumB))) + (s * (1 - _lumB))), 0, 0, ((_lumR + (c * -(_lumR))) + (s * 0.143)), ((_lumG + (c * (1 - _lumG))) + (s * 0.14)), ((_lumB + (c * -(_lumB))) + (s * -0.283)), 0, 0, ((_lumR + (c * -(_lumR))) + (s * -((1 - _lumR)))), ((_lumG + (c * -(_lumG))) + (s * _lumG)), ((_lumB + (c * (1 - _lumB))) + (s * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; return (applyMatrix(temp, m)); } public static function setContrast(m:Array, n:Number):Array{ var temp:Array; if (isNaN(n)){ return (m); }; n = (n + 0.01); temp = [n, 0, 0, 0, (128 * (1 - n)), 0, n, 0, 0, (128 * (1 - n)), 0, 0, n, 0, (128 * (1 - n)), 0, 0, 0, 1, 0]; return (applyMatrix(temp, m)); } public static function applyMatrix(m:Array, m2:Array):Array{ var temp:Array; var i:int; var z:int; var y:int; var x:int; if (((!((m is Array))) || (!((m2 is Array))))){ return (m2); }; temp = []; i = 0; z = 0; y = 0; while (y < 4) { x = 0; while (x < 5) { if (x == 4){ z = m[(i + 4)]; } else { z = 0; }; temp[(i + x)] = (((((m[i] * m2[x]) + (m[(i + 1)] * m2[(x + 5)])) + (m[(i + 2)] * m2[(x + 10)])) + (m[(i + 3)] * m2[(x + 15)])) + z); x = (x + 1); }; i = (i + 5); y = (y + 1); }; return (temp); } public static function setThreshold(m:Array, n:Number):Array{ var temp:Array; if (isNaN(n)){ return (m); }; temp = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * n), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * n), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * n), 0, 0, 0, 1, 0]; return (applyMatrix(temp, m)); } public static function colorize(m:Array, color:Number, amount:Number=1):Array{ var r:Number; var g:Number; var b:Number; var inv:Number; var temp:Array; if (isNaN(color)){ return (m); }; if (isNaN(amount)){ amount = 1; }; r = (((color >> 16) & 0xFF) / 0xFF); g = (((color >> 8) & 0xFF) / 0xFF); b = ((color & 0xFF) / 0xFF); inv = (1 - amount); temp = [(inv + ((amount * r) * _lumR)), ((amount * r) * _lumG), ((amount * r) * _lumB), 0, 0, ((amount * g) * _lumR), (inv + ((amount * g) * _lumG)), ((amount * g) * _lumB), 0, 0, ((amount * b) * _lumR), ((amount * b) * _lumG), (inv + ((amount * b) * _lumB)), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(temp, m)); } public static function setBrightness(m:Array, n:Number):Array{ if (isNaN(n)){ return (m); }; n = ((n * 100) - 100); return (applyMatrix([1, 0, 0, 0, n, 0, 1, 0, 0, n, 0, 0, 1, 0, n, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], m)); } } }//package com.greensock.plugins
Section 13
//ColorTransformPlugin (com.greensock.plugins.ColorTransformPlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; import flash.geom.*; public class ColorTransformPlugin extends TintPlugin { public static const API:Number = 1; public function ColorTransformPlugin(){ super(); this.propName = "colorTransform"; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ var end:ColorTransform; var p:String; var ratio:Number; if (!(target is DisplayObject)){ return (false); }; end = target.transform.colorTransform; for (p in value) { if ((((p == "tint")) || ((p == "color")))){ if (value[p] != null){ end.color = int(value[p]); }; } else { if ((((((p == "tintAmount")) || ((p == "exposure")))) || ((p == "brightness")))){ } else { end[p] = value[p]; }; }; }; if (!isNaN(value.tintAmount)){ ratio = (value.tintAmount / (1 - (((end.redMultiplier + end.greenMultiplier) + end.blueMultiplier) / 3))); end.redOffset = (end.redOffset * ratio); end.greenOffset = (end.greenOffset * ratio); end.blueOffset = (end.blueOffset * ratio); end.redMultiplier = (end.greenMultiplier = (end.blueMultiplier = (1 - value.tintAmount))); } else { if (!isNaN(value.exposure)){ end.redOffset = (end.greenOffset = (end.blueOffset = (0xFF * (value.exposure - 1)))); end.redMultiplier = (end.greenMultiplier = (end.blueMultiplier = 1)); } else { if (!isNaN(value.brightness)){ end.redOffset = (end.greenOffset = (end.blueOffset = Math.max(0, ((value.brightness - 1) * 0xFF)))); end.redMultiplier = (end.greenMultiplier = (end.blueMultiplier = (1 - Math.abs((value.brightness - 1))))); }; }; }; _ignoreAlpha = Boolean(((!((tween.vars.alpha == undefined))) && ((value.alphaMultiplier == undefined)))); init((target as DisplayObject), end); return (true); } } }//package com.greensock.plugins
Section 14
//DropShadowFilterPlugin (com.greensock.plugins.DropShadowFilterPlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; 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(){ super(); this.propName = "dropShadowFilter"; this.overwriteProps = ["dropShadowFilter"]; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ _target = target; _type = DropShadowFilter; initFilter(value, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((value.quality) || (2)), value.inner, value.knockout, value.hideObject), _propNames); return (true); } } }//package com.greensock.plugins
Section 15
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin) package com.greensock.plugins { import com.greensock.*; public class EndArrayPlugin extends TweenPlugin { protected var _info:Array; protected var _a:Array; public static const API:Number = 1; public function EndArrayPlugin(){ _info = []; super(); this.propName = "endArray"; this.overwriteProps = ["endArray"]; } public function init(start:Array, end:Array):void{ var i:int; _a = start; i = end.length; while (i--) { if (((!((start[i] == end[i]))) && (!((start[i] == null))))){ _info[_info.length] = new ArrayTweenInfo(i, _a[i], (end[i] - _a[i])); }; }; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ if (((!((target is Array))) || (!((value is Array))))){ return (false); }; init((target as Array), value); return (true); } override public function set changeFactor(n:Number):void{ var i:int; var ti:ArrayTweenInfo; var val:Number; i = _info.length; if (this.round){ while (i--) { ti = _info[i]; val = (ti.start + (ti.change * n)); if (val > 0){ _a[ti.index] = ((val + 0.5) >> 0); } else { _a[ti.index] = ((val - 0.5) >> 0); }; }; } else { while (i--) { ti = _info[i]; _a[ti.index] = (ti.start + (ti.change * n)); }; }; } } }//package com.greensock.plugins class ArrayTweenInfo { public var change:Number; public var index:uint; public var start:Number; private function ArrayTweenInfo(index:uint, start:Number, change:Number){ super(); this.index = index; this.start = start; this.change = change; } }
Section 16
//FilterPlugin (com.greensock.plugins.FilterPlugin) package com.greensock.plugins { import com.greensock.core.*; import com.greensock.*; import flash.display.*; import flash.filters.*; public class FilterPlugin extends TweenPlugin { protected var _index:int; protected var _filter:BitmapFilter; protected var _type:Class; protected var _remove:Boolean; protected var _target:Object; public static const VERSION:Number = 2.03; public static const API:Number = 1; public function FilterPlugin(){ super(); } public function onCompleteTween():void{ var filters:Array; var i:int; if (_remove){ filters = _target.filters; if (!(filters[_index] is _type)){ i = filters.length; while (i--) { if ((filters[i] is _type)){ filters.splice(i, 1); break; }; }; } else { filters.splice(_index, 1); }; _target.filters = filters; }; } protected function initFilter(props:Object, defaultFilter:BitmapFilter, propNames:Array):void{ var filters:Array; var p:String; var i:int; var colorTween:HexColorsPlugin; var extras:Object; filters = _target.filters; extras = ((props is BitmapFilter)) ? {} : props; _index = -1; if (extras.index != null){ _index = extras.index; } else { i = filters.length; while (i--) { if ((filters[i] is _type)){ _index = i; break; }; }; }; if ((((((_index == -1)) || ((filters[_index] == null)))) || ((extras.addFilter == true)))){ _index = ((extras.index)!=null) ? extras.index : filters.length; filters[_index] = defaultFilter; _target.filters = filters; }; _filter = filters[_index]; if (extras.remove == true){ _remove = true; this.onComplete = onCompleteTween; }; i = propNames.length; while (i--) { p = propNames[i]; if ((((p in props)) && (!((_filter[p] == props[p]))))){ if ((((((p == "color")) || ((p == "highlightColor")))) || ((p == "shadowColor")))){ colorTween = new HexColorsPlugin(); colorTween.initColor(_filter, p, _filter[p], props[p]); _tweens[_tweens.length] = new PropTween(colorTween, "changeFactor", 0, 1, p, false); } else { if ((((((((p == "quality")) || ((p == "inner")))) || ((p == "knockout")))) || ((p == "hideObject")))){ _filter[p] = props[p]; } else { addTween(_filter, p, _filter[p], props[p], p); }; }; }; }; } override public function set changeFactor(n:Number):void{ var i:int; var ti:PropTween; var filters:Array; i = _tweens.length; filters = _target.filters; while (i--) { ti = _tweens[i]; ti.target[ti.property] = (ti.start + (ti.change * n)); }; if (!(filters[_index] is _type)){ i = (_index = filters.length); while (i--) { if ((filters[i] is _type)){ _index = i; break; }; }; }; filters[_index] = _filter; _target.filters = filters; } } }//package com.greensock.plugins
Section 17
//FrameLabelPlugin (com.greensock.plugins.FrameLabelPlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; public class FrameLabelPlugin extends FramePlugin { public static const API:Number = 1; public function FrameLabelPlugin(){ super(); this.propName = "frameLabel"; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ var labels:Array; var label:String; var endFrame:int; var i:int; if ((!(tween.target) is MovieClip)){ return (false); }; _target = (target as MovieClip); this.frame = _target.currentFrame; labels = _target.currentLabels; label = value; endFrame = _target.currentFrame; i = labels.length; while (i--) { if (labels[i].name == label){ endFrame = labels[i].frame; break; }; }; if (this.frame != endFrame){ addTween(this, "frame", this.frame, endFrame, "frame"); }; return (true); } } }//package com.greensock.plugins
Section 18
//FramePlugin (com.greensock.plugins.FramePlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; public class FramePlugin extends TweenPlugin { public var frame:int; protected var _target:MovieClip; public static const API:Number = 1; public function FramePlugin(){ super(); this.propName = "frame"; this.overwriteProps = ["frame", "frameLabel"]; this.round = true; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ if (((!((target is MovieClip))) || (isNaN(value)))){ return (false); }; _target = (target as MovieClip); this.frame = _target.currentFrame; addTween(this, "frame", this.frame, value, "frame"); return (true); } override public function set changeFactor(n:Number):void{ updateTweens(n); _target.gotoAndStop(this.frame); } } }//package com.greensock.plugins
Section 19
//GlowFilterPlugin (com.greensock.plugins.GlowFilterPlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; 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(){ super(); this.propName = "glowFilter"; this.overwriteProps = ["glowFilter"]; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ _target = target; _type = GlowFilter; initFilter(value, new GlowFilter(0xFFFFFF, 0, 0, 0, ((value.strength) || (1)), ((value.quality) || (2)), value.inner, value.knockout), _propNames); return (true); } } }//package com.greensock.plugins
Section 20
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin) package com.greensock.plugins { import com.greensock.*; public class HexColorsPlugin extends TweenPlugin { protected var _colors:Array; public static const API:Number = 1; public function HexColorsPlugin(){ super(); this.propName = "hexColors"; this.overwriteProps = []; _colors = []; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ var p:String; for (p in value) { initColor(target, p, uint(target[p]), uint(value[p])); }; return (true); } override public function killProps(lookup:Object):void{ var i:int; i = (_colors.length - 1); while (i > -1) { if (lookup[_colors[i][1]] != undefined){ _colors.splice(i, 1); }; i--; }; super.killProps(lookup); } public function initColor(target:Object, propName:String, start:uint, end:uint):void{ var r:Number; var g:Number; var b:Number; if (start != end){ r = (start >> 16); g = ((start >> 8) & 0xFF); b = (start & 0xFF); _colors[_colors.length] = [target, propName, r, ((end >> 16) - r), g, (((end >> 8) & 0xFF) - g), b, ((end & 0xFF) - b)]; this.overwriteProps[this.overwriteProps.length] = propName; }; } override public function set changeFactor(n:Number):void{ var i:int; var a:Array; i = (_colors.length - 1); while (i > -1) { a = _colors[i]; a[0][a[1]] = ((((a[2] + (n * a[3])) << 16) | ((a[4] + (n * a[5])) << 8)) | (a[6] + (n * a[7]))); i--; }; } } }//package com.greensock.plugins
Section 21
//RemoveTintPlugin (com.greensock.plugins.RemoveTintPlugin) package com.greensock.plugins { public class RemoveTintPlugin extends TintPlugin { public static const API:Number = 1; public function RemoveTintPlugin(){ super(); this.propName = "removeTint"; } } }//package com.greensock.plugins
Section 22
//RoundPropsPlugin (com.greensock.plugins.RoundPropsPlugin) package com.greensock.plugins { public class RoundPropsPlugin extends TweenPlugin { public static const API:Number = 1; public function RoundPropsPlugin(){ super(); this.propName = "roundProps"; this.overwriteProps = []; this.round = true; } public function add(object:Object, propName:String, start:Number, change:Number):void{ addTween(object, propName, start, (start + change), propName); this.overwriteProps[this.overwriteProps.length] = propName; } } }//package com.greensock.plugins
Section 23
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin) package com.greensock.plugins { import com.greensock.*; public class ShortRotationPlugin extends TweenPlugin { public static const API:Number = 1; public function ShortRotationPlugin(){ super(); this.propName = "shortRotation"; this.overwriteProps = []; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ var p:String; if (typeof(value) == "number"){ return (false); }; for (p in value) { initRotation(target, p, target[p], ((typeof(value[p]))=="number") ? Number(value[p]) : (target[p] + Number(value[p]))); }; return (true); } public function initRotation(target:Object, propName:String, start:Number, end:Number):void{ var dif:Number; dif = ((end - start) % 360); if (dif != (dif % 180)){ dif = ((dif)<0) ? (dif + 360) : (dif - 360); }; addTween(target, propName, start, (start + dif), propName); this.overwriteProps[this.overwriteProps.length] = propName; } } }//package com.greensock.plugins
Section 24
//TintPlugin (com.greensock.plugins.TintPlugin) package com.greensock.plugins { import com.greensock.core.*; import com.greensock.*; import flash.display.*; 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(){ super(); this.propName = "tint"; this.overwriteProps = ["tint"]; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ var end:ColorTransform; if (!(target is DisplayObject)){ return (false); }; end = new ColorTransform(); if (((!((value == null))) && (!((tween.vars.removeTint == true))))){ end.color = uint(value); }; _ignoreAlpha = true; init((target as DisplayObject), end); return (true); } public function init(target:DisplayObject, end:ColorTransform):void{ var i:int; var p:String; _transform = target.transform; _ct = _transform.colorTransform; i = _props.length; while (i--) { p = _props[i]; if (_ct[p] != end[p]){ _tweens[_tweens.length] = new PropTween(_ct, p, _ct[p], (end[p] - _ct[p]), "tint", false); }; }; } override public function set changeFactor(n:Number):void{ var ct:ColorTransform; updateTweens(n); if (_ignoreAlpha){ ct = _transform.colorTransform; _ct.alphaMultiplier = ct.alphaMultiplier; _ct.alphaOffset = ct.alphaOffset; }; _transform.colorTransform = _ct; } } }//package com.greensock.plugins
Section 25
//TweenPlugin (com.greensock.plugins.TweenPlugin) package com.greensock.plugins { import com.greensock.core.*; import com.greensock.*; public class TweenPlugin { public var activeDisable:Boolean; public var onEnable:Function; public var round:Boolean; public var onDisable:Function; public var propName:String; protected var _tweens:Array; public var priority:int;// = 0 public var overwriteProps:Array; public var onComplete:Function; protected var _changeFactor:Number;// = 0 public static const VERSION:Number = 1.32; public static const API:Number = 1; public function TweenPlugin(){ priority = 0; _tweens = []; _changeFactor = 0; super(); } public function set changeFactor(n:Number):void{ updateTweens(n); _changeFactor = n; } protected function addTween(object:Object, propName:String, start:Number, end, overwriteProp:String=null):void{ var change:Number; if (end != null){ change = ((typeof(end))=="number") ? (Number(end) - start) : Number(end); if (change != 0){ _tweens[_tweens.length] = new PropTween(object, propName, start, change, ((overwriteProp) || (propName)), false); }; }; } protected function updateTweens(changeFactor:Number):void{ var i:int; var pt:PropTween; var val:Number; i = _tweens.length; if (this.round){ while (--i > -1) { pt = _tweens[i]; val = (pt.start + (pt.change * changeFactor)); if (val > 0){ pt.target[pt.property] = ((val + 0.5) >> 0); } else { pt.target[pt.property] = ((val - 0.5) >> 0); }; }; } else { while (--i > -1) { pt = _tweens[i]; pt.target[pt.property] = (pt.start + (pt.change * changeFactor)); }; }; } public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ addTween(target, this.propName, target[this.propName], value, this.propName); return (true); } public function get changeFactor():Number{ return (_changeFactor); } public function killProps(lookup:Object):void{ var i:int; i = this.overwriteProps.length; while (--i > -1) { if ((this.overwriteProps[i] in lookup)){ this.overwriteProps.splice(i, 1); }; }; i = _tweens.length; while (--i > -1) { if ((PropTween(_tweens[i]).name in lookup)){ _tweens.splice(i, 1); }; }; } public static function activate(plugins:Array):Boolean{ var i:int; var instance:Object; TweenLite.onPluginEvent = TweenPlugin.onTweenEvent; i = plugins.length; while (i--) { if (plugins[i].hasOwnProperty("API")){ instance = new ((plugins[i] as Class)); TweenLite.plugins[instance.propName] = plugins[i]; }; }; return (true); } private static function onTweenEvent(type:String, tween:TweenLite):Boolean{ var pt:PropTween; var changed:Boolean; var tweens:Array; var i:int; pt = tween.cachedPT1; if (type == "onInit"){ tweens = []; while (pt) { tweens[tweens.length] = pt; pt = pt.nextNode; }; tweens.sortOn("priority", (Array.NUMERIC | Array.DESCENDING)); i = tweens.length; while (i--) { PropTween(tweens[i]).nextNode = tweens[(i + 1)]; PropTween(tweens[i]).prevNode = tweens[(i - 1)]; }; tween.cachedPT1 = tweens[0]; } else { while (pt) { if (((pt.isPlugin) && (pt.target[type]))){ if (pt.target.activeDisable){ changed = true; }; var _local7 = pt.target; _local7[type](); }; pt = pt.nextNode; }; }; return (changed); } } }//package com.greensock.plugins
Section 26
//VisiblePlugin (com.greensock.plugins.VisiblePlugin) package com.greensock.plugins { import com.greensock.*; import flash.display.*; public class VisiblePlugin extends TweenPlugin { protected var _tween:TweenLite; protected var _visible:Boolean; protected var _target:Object; protected var _initVal:Boolean; public static const API:Number = 1; public function VisiblePlugin(){ super(); this.propName = "visible"; this.overwriteProps = ["visible"]; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ _target = target; _tween = tween; _initVal = _target.visible; _visible = Boolean(value); return (true); } override public function set changeFactor(n:Number):void{ if ((((n == 1)) && ((((_tween.cachedDuration == _tween.cachedTime)) || ((_tween.cachedTime == 0)))))){ _target.visible = _visible; } else { _target.visible = _initVal; }; } } }//package com.greensock.plugins
Section 27
//VolumePlugin (com.greensock.plugins.VolumePlugin) package com.greensock.plugins { import com.greensock.*; import flash.media.*; public class VolumePlugin extends TweenPlugin { protected var _st:SoundTransform; protected var _target:Object; public static const API:Number = 1; public function VolumePlugin(){ super(); this.propName = "volume"; this.overwriteProps = ["volume"]; } override public function onInitTween(target:Object, value, tween:TweenLite):Boolean{ if (((((isNaN(value)) || (target.hasOwnProperty("volume")))) || (!(target.hasOwnProperty("soundTransform"))))){ return (false); }; _target = target; _st = _target.soundTransform; addTween(_st, "volume", _st.volume, value, "volume"); return (true); } override public function set changeFactor(n:Number):void{ updateTweens(n); _target.soundTransform = _st; } } }//package com.greensock.plugins
Section 28
//OverwriteManager (com.greensock.OverwriteManager) package com.greensock { import com.greensock.core.*; public class OverwriteManager { public static const ALL_ONSTART:int = 4; public static const CONCURRENT:int = 3; public static const ALL_IMMEDIATE:int = 1; public static const PREEXISTING:int = 5; public static const AUTO:int = 2; public static const version:Number = 6.03; public static const NONE:int = 0; public static var enabled:Boolean; public static var mode:int; public function OverwriteManager(){ super(); } public static function getGlobalPaused(tween:TweenCore):Boolean{ var paused:Boolean; while (tween) { if (tween.cachedPaused){ paused = true; break; }; tween = tween.timeline; }; return (paused); } public static function init(defaultMode:int=2):int{ if (TweenLite.version < 11.1){ 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 = defaultMode; enabled = true; return (mode); } public static function manageOverwrites(tween:TweenLite, props:Object, targetTweens:Array, mode:uint):Boolean{ var i:int; var changed:Boolean; var curTween:TweenLite; var startTime:Number; var overlaps:Array; var cousins:Array; var cCount:uint; var oCount:uint; var l:uint; var combinedTimeScale:Number; var combinedStartTime:Number; var cousin:TweenCore; var cousinStartTime:Number; var timeline:SimpleTimeline; if (mode >= 4){ l = targetTweens.length; i = 0; while (i < l) { curTween = targetTweens[i]; if (curTween != tween){ if (curTween.setEnabled(false, false)){ changed = true; }; } else { if (mode == 5){ break; }; }; i++; }; return (changed); }; startTime = (tween.cachedStartTime + 1E-10); overlaps = []; cousins = []; cCount = 0; oCount = 0; i = targetTweens.length; while (--i > -1) { curTween = targetTweens[i]; if ((((curTween == tween)) || (curTween.gc))){ } else { if (curTween.timeline != tween.timeline){ if (!getGlobalPaused(curTween)){ var _temp1 = cCount; cCount = (cCount + 1); var _local19 = _temp1; cousins[_local19] = curTween; }; } else { if ((((((curTween.cachedStartTime <= startTime)) && ((((curTween.cachedStartTime + curTween.totalDuration) + 1E-10) > startTime)))) && (!(getGlobalPaused(curTween))))){ var _temp2 = oCount; oCount = (oCount + 1); _local19 = _temp2; overlaps[_local19] = curTween; }; }; }; }; if (cCount != 0){ combinedTimeScale = tween.cachedTimeScale; combinedStartTime = startTime; timeline = tween.timeline; while (timeline) { combinedTimeScale = (combinedTimeScale * timeline.cachedTimeScale); combinedStartTime = (combinedStartTime + timeline.cachedStartTime); timeline = timeline.timeline; }; startTime = (combinedTimeScale * combinedStartTime); i = cCount; while (--i > -1) { cousin = cousins[i]; combinedTimeScale = cousin.cachedTimeScale; combinedStartTime = cousin.cachedStartTime; timeline = cousin.timeline; while (timeline) { combinedTimeScale = (combinedTimeScale * timeline.cachedTimeScale); combinedStartTime = (combinedStartTime + timeline.cachedStartTime); timeline = timeline.timeline; }; cousinStartTime = (combinedTimeScale * combinedStartTime); if ((((cousinStartTime <= startTime)) && ((((((cousinStartTime + (cousin.totalDuration * combinedTimeScale)) + 1E-10) > startTime)) || ((cousin.cachedDuration == 0)))))){ var _temp3 = oCount; oCount = (oCount + 1); _local19 = _temp3; overlaps[_local19] = cousin; }; }; }; if (oCount == 0){ return (changed); }; i = oCount; if (mode == 2){ while (--i > -1) { curTween = overlaps[i]; if (curTween.killVars(props)){ changed = true; }; if ((((curTween.cachedPT1 == null)) && (curTween.initted))){ curTween.setEnabled(false, false); }; }; } else { while (--i > -1) { if (TweenLite(overlaps[i]).setEnabled(false, false)){ changed = true; }; }; }; return (changed); } } }//package com.greensock
Section 29
//TweenLite (com.greensock.TweenLite) package com.greensock { import com.greensock.core.*; import flash.events.*; import flash.display.*; import com.greensock.plugins.*; import flash.utils.*; public class TweenLite extends TweenCore { public var target:Object; public var ratio:Number;// = 0 protected var _overwrite:int; protected var _notifyPluginsOfEnabled:Boolean; protected var _hasPlugins:Boolean; public var cachedPT1:PropTween; protected var _overwrittenProps:Object; public var propTweenLookup:Object; protected var _ease:Function; public static const version:Number = 11.39; 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, onInit:1, onInitParams: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(target:Object, duration:Number, vars:Object){ var a:Array; var sibling:TweenLite; ratio = 0; super(duration, vars); this.target = target; if ((((this.target is TweenCore)) && (this.vars.timeScale))){ this.cachedTimeScale = 1; }; propTweenLookup = {}; _ease = defaultEase; _overwrite = (((!((Number(vars.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((vars.overwrite > 1)))))) ? overwriteManager.mode : int(vars.overwrite); a = masterList[target]; if (!a){ masterList[target] = [this]; } else { if (_overwrite == 1){ for each (sibling in a) { if (!sibling.gc){ sibling.setEnabled(false, false); }; }; masterList[target] = [this]; } else { a[a.length] = this; }; }; if (((this.active) || (this.vars.immediateRender))){ renderTime(0, false, true); }; } override public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ var isComplete:Boolean; var prevTime:Number; var pt:PropTween; prevTime = this.cachedTime; if (time >= this.cachedDuration){ this.cachedTotalTime = (this.cachedTime = this.cachedDuration); this.ratio = 1; isComplete = true; if (this.cachedDuration == 0){ if ((((((time == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == time))))){ force = true; }; _rawPrevTime = time; }; } else { if (time <= 0){ this.cachedTotalTime = (this.cachedTime = (this.ratio = 0)); if (time < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ force = true; isComplete = true; }; _rawPrevTime = time; }; }; if (((this.cachedReversed) && (!((prevTime == 0))))){ isComplete = true; }; } else { this.cachedTotalTime = (this.cachedTime = time); this.ratio = _ease(time, 0, 1, this.cachedDuration); }; }; if ((((this.cachedTime == prevTime)) && (!(force)))){ return; }; if (!this.initted){ init(); if (((!(isComplete)) && (this.cachedTime))){ this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; if ((((((((prevTime == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(suppressEvents)))){ this.vars.onStart.apply(null, this.vars.onStartParams); }; pt = this.cachedPT1; while (pt) { pt.target[pt.property] = (pt.start + (this.ratio * pt.change)); pt = pt.nextNode; }; if (((_hasUpdate) && (!(suppressEvents)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (isComplete){ if (((_hasPlugins) && (this.cachedPT1))){ onPluginEvent("onComplete", this); }; complete(true, suppressEvents); }; } protected function init():void{ var p:String; var i:int; var plugin:*; var prioritize:Boolean; var siblings:Array; var pt:PropTween; if (this.vars.onInit){ this.vars.onInit.apply(null, this.vars.onInitParams); }; 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 (p in this.vars) { if ((((p in _reservedProps)) && (!((((p == "timeScale")) && ((this.target is TweenCore))))))){ } else { if ((((p in plugins)) && (new ((plugins[p] as Class)).onInitTween(this.target, this.vars[p], this)))){ this.cachedPT1 = new PropTween(plugin, "changeFactor", 0, 1, ((plugin.overwriteProps.length)==1) ? plugin.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1); if (this.cachedPT1.name == "_MULTIPLE_"){ i = plugin.overwriteProps.length; while (--i > -1) { this.propTweenLookup[plugin.overwriteProps[i]] = this.cachedPT1; }; } else { this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1; }; if (plugin.priority){ this.cachedPT1.priority = plugin.priority; prioritize = true; }; if (((plugin.onDisable) || (plugin.onEnable))){ _notifyPluginsOfEnabled = true; }; _hasPlugins = true; } else { this.cachedPT1 = new PropTween(this.target, p, Number(this.target[p]), ((typeof(this.vars[p]))=="number") ? (Number(this.vars[p]) - this.target[p]) : Number(this.vars[p]), p, false, this.cachedPT1); this.propTweenLookup[p] = this.cachedPT1; }; }; }; if (prioritize){ onPluginEvent("onInit", this); }; if (this.vars.runBackwards){ pt = this.cachedPT1; while (pt) { pt.start = (pt.start + pt.change); pt.change = -(pt.change); pt = pt.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]))) && ((siblings.length > 1)))){ if (overwriteManager.manageOverwrites(this, this.propTweenLookup, siblings, _overwrite)){ init(); }; }; this.initted = true; } protected function easeProxy(t:Number, b:Number, c:Number, d:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } override public function invalidate():void{ if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){ onPluginEvent("onDisable", this); }; this.cachedPT1 = null; _overwrittenProps = null; _hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false))); this.propTweenLookup = {}; } public function killVars(vars:Object, permanent:Boolean=true):Boolean{ var p:String; var pt:PropTween; var changed:Boolean; if (_overwrittenProps == null){ _overwrittenProps = {}; }; for (p in vars) { if ((p in propTweenLookup)){ pt = propTweenLookup[p]; if (((pt.isPlugin) && ((pt.name == "_MULTIPLE_")))){ pt.target.killProps(vars); if (pt.target.overwriteProps.length == 0){ pt.name = ""; }; }; if (pt.name != "_MULTIPLE_"){ if (pt.nextNode){ pt.nextNode.prevNode = pt.prevNode; }; if (pt.prevNode){ pt.prevNode.nextNode = pt.nextNode; } else { if (this.cachedPT1 == pt){ this.cachedPT1 = pt.nextNode; }; }; if (((pt.isPlugin) && (pt.target.onDisable))){ pt.target.onDisable(); if (pt.target.activeDisable){ changed = true; }; }; delete propTweenLookup[p]; }; }; if (((permanent) && (!((vars == _overwrittenProps))))){ _overwrittenProps[p] = 1; }; }; return (changed); } override public function setEnabled(enabled:Boolean, ignoreTimeline:Boolean=false):Boolean{ var a:Array; if (enabled){ a = TweenLite.masterList[this.target]; if (!a){ TweenLite.masterList[this.target] = [this]; } else { a[a.length] = this; }; }; super.setEnabled(enabled, ignoreTimeline); if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){ return (onPluginEvent((enabled) ? "onEnable" : "onDisable", this)); }; return (false); } public static function initClass():void{ rootFrame = 0; rootTimeline = new SimpleTimeline(null); rootFramesTimeline = new SimpleTimeline(null); rootTimeline.cachedStartTime = (getTimer() * 0.001); rootFramesTimeline.cachedStartTime = rootFrame; rootTimeline.autoRemoveChildren = true; rootFramesTimeline.autoRemoveChildren = true; _shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; } public static function killTweensOf(target:Object, complete:Boolean=false, vars:Object=null):void{ var a:Array; var i:int; var tween:TweenLite; if ((target in masterList)){ a = masterList[target]; i = a.length; while (--i > -1) { tween = a[i]; if (!tween.gc){ if (complete){ tween.complete(false, false); }; if (vars != null){ tween.killVars(vars); }; if ((((vars == null)) || ((((tween.cachedPT1 == null)) && (tween.initted))))){ tween.setEnabled(false, false); }; }; }; if (vars == null){ delete masterList[target]; }; }; } public static function from(target:Object, duration:Number, vars:Object):TweenLite{ vars.runBackwards = true; if (!("immediateRender" in vars)){ vars.immediateRender = true; }; return (new TweenLite(target, duration, vars)); } protected static function easeOut(t:Number, b:Number, c:Number, d:Number):Number{ t = (1 - (t / d)); return ((1 - (t * t))); } public static function delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array=null, useFrames:Boolean=false):TweenLite{ return (new TweenLite(onComplete, 0, {delay:delay, onComplete:onComplete, onCompleteParams:onCompleteParams, immediateRender:false, useFrames:useFrames, overwrite:0})); } protected static function updateAll(e:Event=null):void{ var ml:Dictionary; var tgt:Object; var a:Array; var i:int; rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false); rootFrame = (rootFrame + 1); rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false); if (!(rootFrame % 60)){ ml = masterList; for (tgt in ml) { a = ml[tgt]; i = a.length; while (--i > -1) { if (TweenLite(a[i]).gc){ a.splice(i, 1); }; }; if (a.length == 0){ delete ml[tgt]; }; }; }; } public static function to(target:Object, duration:Number, vars:Object):TweenLite{ return (new TweenLite(target, duration, vars)); } } }//package com.greensock
Section 30
//TweenMax (com.greensock.TweenMax) package com.greensock { import com.greensock.core.*; import flash.events.*; import flash.display.*; import com.greensock.plugins.*; import com.greensock.events.*; import flash.utils.*; public class TweenMax extends TweenLite implements IEventDispatcher { protected var _easePower:int; protected var _dispatcher:EventDispatcher; protected var _hasUpdateListener:Boolean; protected var _easeType:int; public var yoyo:Boolean; protected var _repeat:int;// = 0 protected var _cyclesComplete:int;// = 0 protected var _repeatDelay:Number;// = 0 public static const version:Number = 11.391; 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(target:Object, duration:Number, vars:Object){ _repeat = 0; _repeatDelay = 0; _cyclesComplete = 0; super(target, duration, vars); if (TweenLite.version < 11.2){ 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 = uint(this.vars.repeat); _repeatDelay = (this.vars.repeatDelay) ? Number(this.vars.repeatDelay) : 0; this.cacheIsDirty = true; if (((((((((((this.vars.onCompleteListener) || (this.vars.onInitListener))) || (this.vars.onUpdateListener))) || (this.vars.onStartListener))) || (this.vars.onRepeatListener))) || (this.vars.onReverseCompleteListener))){ initDispatcher(); if ((((duration == 0)) && ((_delay == 0)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); }; }; if (((this.vars.timeScale) && (!((this.target is TweenCore))))){ this.cachedTimeScale = this.vars.timeScale; }; } override protected function init():void{ var startTween:TweenMax; var prop:String; var multiProps:String; var rp:Array; var plugin:Object; var ptPlugin:PropTween; var pt:PropTween; var i:int; if (this.vars.startAt){ this.vars.startAt.overwrite = 0; this.vars.startAt.immediateRender = true; startTween = new TweenMax(this.target, 0, this.vars.startAt); }; if (_dispatcher){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.INIT)); }; super.init(); if ((_ease in fastEaseLookup)){ _easeType = fastEaseLookup[_ease][0]; _easePower = fastEaseLookup[_ease][1]; }; if (((!((this.vars.roundProps == null))) && (("roundProps" in TweenLite.plugins)))){ rp = this.vars.roundProps; i = rp.length; while (--i > -1) { prop = rp[i]; pt = this.cachedPT1; while (pt) { if (pt.name == prop){ if (pt.isPlugin){ pt.target.round = true; } else { if (plugin == null){ plugin = new TweenLite.plugins.roundProps(); plugin.add(pt.target, prop, pt.start, pt.change); _hasPlugins = true; ptPlugin = insertPropTween(plugin, "changeFactor", 0, 1, "_MULTIPLE_", true, this.cachedPT1); this.cachedPT1 = ptPlugin; } else { plugin.add(pt.target, prop, pt.start, pt.change); }; this.removePropTween(pt); this.propTweenLookup[prop] = ptPlugin; }; } else { if (((((pt.isPlugin) && ((pt.name == "_MULTIPLE_")))) && (!(pt.target.round)))){ multiProps = ((" " + pt.target.overwriteProps.join(" ")) + " "); if (multiProps.indexOf(((" " + prop) + " ")) != -1){ pt.target.round = true; }; }; }; pt = pt.nextNode; }; }; }; } public function updateTo(vars:Object, resetDuration:Boolean=false):void{ var curRatio:Number; var p:String; var inv:Number; var pt:PropTween; var endValue:Number; curRatio = this.ratio; if (((((resetDuration) && (!((this.timeline == null))))) && ((this.cachedStartTime < this.timeline.cachedTime)))){ this.cachedStartTime = this.timeline.cachedTime; this.setDirtyCache(false); if (this.gc){ this.setEnabled(true, false); } else { this.timeline.addChild(this); }; }; for (p in vars) { this.vars[p] = vars[p]; }; if (this.initted){ this.initted = false; if (!resetDuration){ init(); if (((((!(resetDuration)) && ((this.cachedTime > 0)))) && ((this.cachedTime < this.cachedDuration)))){ inv = (1 / (1 - curRatio)); pt = this.cachedPT1; while (pt) { endValue = (pt.start + pt.change); pt.change = (pt.change * inv); pt.start = (endValue - pt.change); pt = pt.nextNode; }; }; }; }; } public function set repeat(n:int):void{ _repeat = n; setDirtyCache(true); } override public function complete(skipRender:Boolean=false, suppressEvents:Boolean=false):void{ super.complete(skipRender, suppressEvents); if (((!(suppressEvents)) && (_dispatcher))){ if ((((this.cachedTotalTime == this.cachedTotalDuration)) && (!(this.cachedReversed)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); } else { if (((this.cachedReversed) && ((this.cachedTotalTime == 0)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE)); }; }; }; } public function set totalProgress(n:Number):void{ setTotalTime((this.totalDuration * n), false); } override public function invalidate():void{ this.yoyo = Boolean((this.vars.yoyo == true)); _repeat = (this.vars.repeat) ? Number(this.vars.repeat) : 0; _repeatDelay = (this.vars.repeatDelay) ? Number(this.vars.repeatDelay) : 0; _hasUpdateListener = false; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); }; setDirtyCache(true); super.invalidate(); } public function killProperties(names:Array):void{ var v:Object; var i:int; v = {}; i = names.length; while (--i > -1) { v[names[i]] = true; }; killVars(v); } public function dispatchEvent(e:Event):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(e)); } protected function insertPropTween(target:Object, property:String, start:Number, end, name:String, isPlugin:Boolean, nextNode:PropTween):PropTween{ var pt:PropTween; var op:Array; var i:int; pt = new PropTween(target, property, start, ((typeof(end))=="number") ? (end - start) : Number(end), name, isPlugin, nextNode); if (((isPlugin) && ((name == "_MULTIPLE_")))){ op = target.overwriteProps; i = op.length; while (--i > -1) { this.propTweenLookup[op[i]] = pt; }; } else { this.propTweenLookup[name] = pt; }; return (pt); } public function setDestination(property:String, value, adjustStartValues:Boolean=true):void{ var vars:Object; vars = {}; vars[property] = value; updateTo(vars, !(adjustStartValues)); } public function set repeatDelay(n:Number):void{ _repeatDelay = n; setDirtyCache(true); } public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{ if (_dispatcher){ _dispatcher.removeEventListener(type, listener, useCapture); }; } public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if (type == TweenEvent.UPDATE){ _hasUpdateListener = true; }; _dispatcher.addEventListener(type, listener, useCapture, priority, useWeakReference); } public function get timeScale():Number{ return (this.cachedTimeScale); } override public function renderTime(time:Number, suppressEvents:Boolean=false, force:Boolean=false):void{ var totalDur:Number; var prevTime:Number; var isComplete:Boolean; var repeated:Boolean; var setRatio:Boolean; var pt:PropTween; var cycleDuration:Number; var prevCycles:int; var power:int; var val:Number; totalDur = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; prevTime = this.cachedTime; if (time >= totalDur){ this.cachedTotalTime = totalDur; this.cachedTime = this.cachedDuration; this.ratio = 1; isComplete = true; if (this.cachedDuration == 0){ if ((((((time == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == time))))){ force = true; }; _rawPrevTime = time; }; } else { if (time <= 0){ if (time < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ force = true; isComplete = true; }; _rawPrevTime = time; }; }; this.cachedTotalTime = (this.cachedTime = (this.ratio = 0)); if (((this.cachedReversed) && (!((prevTime == 0))))){ isComplete = true; }; } else { this.cachedTotalTime = (this.cachedTime = time); setRatio = true; }; }; if (_repeat != 0){ cycleDuration = (this.cachedDuration + _repeatDelay); if (isComplete){ if (((this.yoyo) && ((_repeat % 2)))){ this.cachedTime = (this.ratio = 0); }; } else { if (time > 0){ prevCycles = _cyclesComplete; _cyclesComplete = ((this.cachedTotalTime / cycleDuration) >> 0); if (_cyclesComplete == (this.cachedTotalTime / cycleDuration)){ _cyclesComplete--; }; if (prevCycles != _cyclesComplete){ repeated = true; }; this.cachedTime = (((this.cachedTotalTime / cycleDuration) - _cyclesComplete) * cycleDuration); if (((this.yoyo) && ((_cyclesComplete % 2)))){ this.cachedTime = (this.cachedDuration - this.cachedTime); } else { if (this.cachedTime >= this.cachedDuration){ this.cachedTime = this.cachedDuration; this.ratio = 1; setRatio = false; }; }; if (this.cachedTime <= 0){ this.cachedTime = (this.ratio = 0); setRatio = false; }; }; }; }; if ((((prevTime == this.cachedTime)) && (!(force)))){ return; }; if (!this.initted){ init(); }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; if (setRatio){ if (_easeType){ power = _easePower; val = (this.cachedTime / this.cachedDuration); if (_easeType == 2){ val = (1 - val); this.ratio = val; while (--power > -1) { this.ratio = (val * this.ratio); }; this.ratio = (1 - this.ratio); } else { if (_easeType == 1){ this.ratio = val; while (--power > -1) { this.ratio = (val * this.ratio); }; } else { if (val < 0.5){ val = (val * 2); this.ratio = val; while (--power > -1) { this.ratio = (val * this.ratio); }; this.ratio = (this.ratio * 0.5); } else { val = ((1 - val) * 2); this.ratio = val; while (--power > -1) { this.ratio = (val * this.ratio); }; this.ratio = (1 - (0.5 * this.ratio)); }; }; }; } else { this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if ((((((prevTime == 0)) && (!((this.cachedTotalTime == 0))))) && (!(suppressEvents)))){ if (this.vars.onStart){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (_dispatcher){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); }; }; pt = this.cachedPT1; while (pt) { pt.target[pt.property] = (pt.start + (this.ratio * pt.change)); pt = pt.nextNode; }; if (((_hasUpdate) && (!(suppressEvents)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (((_hasUpdateListener) && (!(suppressEvents)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); }; if (isComplete){ if (((_hasPlugins) && (this.cachedPT1))){ onPluginEvent("onComplete", this); }; complete(true, suppressEvents); } else { if (((repeated) && (!(suppressEvents)))){ if (this.vars.onRepeat){ this.vars.onRepeat.apply(null, this.vars.onRepeatParams); }; if (_dispatcher){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT)); }; }; }; } public function willTrigger(type:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(type)); } public function get totalProgress():Number{ return ((this.cachedTotalTime / this.totalDuration)); } protected function removePropTween(propTween:PropTween):Boolean{ if (propTween.nextNode){ propTween.nextNode.prevNode = propTween.prevNode; }; if (propTween.prevNode){ propTween.prevNode.nextNode = propTween.nextNode; } else { if (this.cachedPT1 == propTween){ this.cachedPT1 = propTween.nextNode; }; }; if (((propTween.isPlugin) && (propTween.target.onDisable))){ propTween.target.onDisable(); if (propTween.target.activeDisable){ return (true); }; }; return (false); } public function get repeatDelay():Number{ return (_repeatDelay); } public function set currentProgress(n:Number):void{ if (_cyclesComplete == 0){ setTotalTime((this.duration * n), false); } else { setTotalTime(((this.duration * n) + (_cyclesComplete * this.cachedDuration)), false); }; } public function get repeat():int{ return (_repeat); } public function get currentProgress():Number{ return ((this.cachedTime / this.duration)); } override public function set currentTime(n:Number):void{ if (_cyclesComplete == 0){ } else { if (((this.yoyo) && (((_cyclesComplete % 2) == 1)))){ n = ((this.duration - n) + (_cyclesComplete * (this.cachedDuration + _repeatDelay))); } else { n = (n + (_cyclesComplete * (this.duration + _repeatDelay))); }; }; setTotalTime(n, false); } protected function initDispatcher():void{ if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); }; if ((this.vars.onInitListener is Function)){ _dispatcher.addEventListener(TweenEvent.INIT, this.vars.onInitListener, false, 0, true); }; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); _hasUpdateListener = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; if ((this.vars.onRepeatListener is Function)){ _dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true); }; if ((this.vars.onReverseCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true); }; } public function hasEventListener(type:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(type)); } override public function set totalDuration(n:Number):void{ if (_repeat == -1){ return; }; this.duration = ((n - (_repeat * _repeatDelay)) / (_repeat + 1)); } override public function get totalDuration():Number{ if (this.cacheIsDirty){ this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat)); this.cacheIsDirty = false; }; return (this.cachedTotalDuration); } public function set timeScale(n:Number):void{ var tlTime:Number; if (n == 0){ n = 0.0001; }; tlTime = (((this.cachedPauseTime) || ((this.cachedPauseTime == 0)))) ? this.cachedPauseTime : this.timeline.cachedTotalTime; this.cachedStartTime = (tlTime - (((tlTime - this.cachedStartTime) * this.cachedTimeScale) / n)); this.cachedTimeScale = n; setDirtyCache(false); } public static function set globalTimeScale(n:Number):void{ var tl:SimpleTimeline; var curTime:Number; if (n == 0){ n = 0.0001; }; if (TweenLite.rootTimeline == null){ TweenLite.to({}, 0, {}); }; tl = TweenLite.rootTimeline; curTime = (getTimer() * 0.001); tl.cachedStartTime = (curTime - (((curTime - tl.cachedStartTime) * tl.cachedTimeScale) / n)); tl = TweenLite.rootFramesTimeline; curTime = TweenLite.rootFrame; tl.cachedStartTime = (curTime - (((curTime - tl.cachedStartTime) * tl.cachedTimeScale) / n)); TweenLite.rootFramesTimeline.cachedTimeScale = (TweenLite.rootTimeline.cachedTimeScale = n); } public static function fromTo(target:Object, duration:Number, fromVars:Object, toVars:Object):TweenMax{ toVars.startAt = fromVars; if (fromVars.immediateRender){ toVars.immediateRender = true; }; return (new TweenMax(target, duration, toVars)); } public static function allFromTo(targets:Array, duration:Number, fromVars:Object, toVars:Object, stagger:Number=0, onCompleteAll:Function=null, onCompleteAllParams:Array=null):Array{ toVars.startAt = fromVars; if (fromVars.immediateRender){ toVars.immediateRender = true; }; return (allTo(targets, duration, toVars, stagger, onCompleteAll, onCompleteAllParams)); } public static function pauseAll(tweens:Boolean=true, delayedCalls:Boolean=true):void{ changePause(true, tweens, delayedCalls); } public static function getTweensOf(target:Object):Array{ var a:Array; var toReturn:Array; var i:int; var cnt:int; a = masterList[target]; toReturn = []; if (a){ i = a.length; cnt = 0; while (--i > -1) { if (!TweenLite(a[i]).gc){ var _temp1 = cnt; cnt = (cnt + 1); var _local6 = _temp1; toReturn[_local6] = a[i]; }; }; }; return (toReturn); } public static function get globalTimeScale():Number{ return (((TweenLite.rootTimeline)==null) ? 1 : TweenLite.rootTimeline.cachedTimeScale); } public static function killChildTweensOf(parent:DisplayObjectContainer, complete:Boolean=false):void{ var a:Array; var curTarget:Object; var curParent:DisplayObjectContainer; var i:int; a = getAllTweens(); i = a.length; while (--i > -1) { curTarget = a[i].target; if ((curTarget is DisplayObject)){ curParent = curTarget.parent; while (curParent) { if (curParent == parent){ if (complete){ a[i].complete(false); } else { a[i].setEnabled(false, false); }; }; curParent = curParent.parent; }; }; }; } public static function delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array=null, useFrames:Boolean=false):TweenMax{ return (new TweenMax(onComplete, 0, {delay:delay, onComplete:onComplete, onCompleteParams:onCompleteParams, immediateRender:false, useFrames:useFrames, overwrite:0})); } public static function isTweening(target:Object):Boolean{ var a:Array; var i:int; var tween:TweenLite; a = getTweensOf(target); i = a.length; while (--i > -1) { tween = a[i]; if (((tween.active) || ((((tween.cachedStartTime == tween.timeline.cachedTime)) && (tween.timeline.active))))){ return (true); }; }; return (false); } public static function killAll(complete:Boolean=false, tweens:Boolean=true, delayedCalls:Boolean=true):void{ var a:Array; var isDC:Boolean; var i:int; a = getAllTweens(); i = a.length; while (--i > -1) { isDC = (a[i].target == a[i].vars.onComplete); if ((((isDC == delayedCalls)) || (!((isDC == tweens))))){ if (complete){ a[i].complete(false); } else { a[i].setEnabled(false, false); }; }; }; } private static function changePause(pause:Boolean, tweens:Boolean=true, delayedCalls:Boolean=false):void{ var a:Array; var isDC:Boolean; var i:int; a = getAllTweens(); i = a.length; while (--i > -1) { isDC = (TweenLite(a[i]).target == TweenLite(a[i]).vars.onComplete); if ((((isDC == delayedCalls)) || (!((isDC == tweens))))){ TweenCore(a[i]).paused = pause; }; }; } public static function from(target:Object, duration:Number, vars:Object):TweenMax{ vars.runBackwards = true; if (!("immediateRender" in vars)){ vars.immediateRender = true; }; return (new TweenMax(target, duration, vars)); } public static function allFrom(targets:Array, duration:Number, vars:Object, stagger:Number=0, onCompleteAll:Function=null, onCompleteAllParams:Array=null):Array{ vars.runBackwards = true; if (!("immediateRender" in vars)){ vars.immediateRender = true; }; return (allTo(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams)); } public static function getAllTweens():Array{ var ml:Dictionary; var cnt:int; var toReturn:Array; var a:Array; var i:int; ml = masterList; cnt = 0; toReturn = []; for each (a in ml) { i = a.length; while (--i > -1) { if (!TweenLite(a[i]).gc){ var _temp1 = cnt; cnt = (cnt + 1); var _local8 = _temp1; toReturn[_local8] = a[i]; }; }; }; return (toReturn); } public static function resumeAll(tweens:Boolean=true, delayedCalls:Boolean=true):void{ changePause(false, tweens, delayedCalls); } public static function to(target:Object, duration:Number, vars:Object):TweenMax{ return (new TweenMax(target, duration, vars)); } public static function allTo(targets:Array, duration:Number, vars:Object, stagger:Number=0, onCompleteAll:Function=null, onCompleteAllParams:Array=null):Array{ var i:int; var varsDup:Object; var p:String; var l:int; var a:Array; var curDelay:Number; var onCompleteProxy:Function; var onCompleteParamsProxy:Array; var lastIndex:int; var targets = targets; var duration = duration; var vars = vars; var stagger = stagger; var onCompleteAll = onCompleteAll; var onCompleteAllParams = onCompleteAllParams; l = targets.length; a = []; curDelay = (("delay" in vars)) ? Number(vars.delay) : 0; onCompleteProxy = vars.onComplete; onCompleteParamsProxy = vars.onCompleteParams; lastIndex = ((stagger)<=0) ? 0 : (l - 1); i = 0; while (i < l) { varsDup = {}; for (p in vars) { varsDup[p] = vars[p]; }; varsDup.delay = curDelay; if ((((i == lastIndex)) && (!((onCompleteAll == null))))){ varsDup.onComplete = function ():void{ if (onCompleteProxy != null){ onCompleteProxy.apply(null, onCompleteParamsProxy); }; onCompleteAll.apply(null, onCompleteAllParams); }; }; a[a.length] = new TweenMax(targets[i], duration, varsDup); curDelay = (curDelay + stagger); i = (i + 1); }; return (a); } TweenPlugin.activate([AutoAlphaPlugin, EndArrayPlugin, FramePlugin, RemoveTintPlugin, TintPlugin, VisiblePlugin, VolumePlugin, BevelFilterPlugin, BezierPlugin, BezierThroughPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, ColorTransformPlugin, DropShadowFilterPlugin, FrameLabelPlugin, GlowFilterPlugin, HexColorsPlugin, RoundPropsPlugin, ShortRotationPlugin, {}]); } }//package com.greensock
Section 31
//MainTimeline (xxDa_Pump_fla.MainTimeline) package xxDa_Pump_fla { import com.greensock.*; import flash.events.*; import flash.display.*; import com.greensock.easing.*; public dynamic class MainTimeline extends MovieClip { public var xxxx; public var ump:MovieClip; public var pup:Boolean; public var eye:MovieClip; public var help:MovieClip; public var eyee:Number; public var umpMax:Number; public var umpMin:Number; public var xxx:MovieClip; public var roo:MovieClip; public var mul; public var y0:Number; public var drop:SimpleButton; public function MainTimeline(){ super(); addFrameScript(0, frame1); } function frame1(){ xxx.addEventListener(MouseEvent.MOUSE_DOWN, pump00); xxx.addEventListener(MouseEvent.MOUSE_MOVE, pump); xxx.addEventListener(Event.ENTER_FRAME, up); drop.addEventListener(MouseEvent.CLICK, drp); umpMin = ump.y; umpMax = (umpMin + 60); mul = 1; y0 = -1; pup = true; eyee = 1; xxxx = 100; TweenMax.to(help, 2, {autoAlpha:0, ease:Expo.easeIn}); roo.stop(); eye.stop(); } public function pump00(p:MouseEvent){ y0 = p.localY; } public function pump(p:MouseEvent){ var dt:*; var pup0:Boolean; if (!p.buttonDown){ return; }; if (y0 == -1){ y0 = p.localY; return; }; dt = (ump.y + ((p.localY - y0) / 2)); if ((p.localY - y0) > 0){ xxxx = 100; if (eyee > 0){ TweenMax.to(eye, 0.5, {frame:(eyee * 16)}); eyee = 0; }; }; y0 = p.localY; if (dt > umpMax){ dt = umpMax; }; if (dt < umpMin){ dt = umpMin; }; ump.y = dt; pup0 = (dt < (umpMin + 20)); if (((!((pup0 == pup))) && (!(pup)))){ TweenMax.to(roo, 1, {frame:(roo.currentFrame + 10), ease:Expo.easeOut}); }; pup = pup0; } public function drp(p:MouseEvent){ TweenMax.to(roo, 1, {frame:1, ease:Bounce.easeOut}); } public function up(p){ var dt:*; dt = (ump.y - ((20 * (((ump.y - umpMin) / 1) / (umpMax - umpMin))) * (((ump.y - umpMin) / 1) / (umpMax - umpMin)))); if (dt < umpMin){ dt = umpMin; }; ump.y = dt; if (xxxx < 0){ if (eyee == 0){ TweenMax.to(eye, 0.5, {frame:(eyee * 16)}); eyee = 1; }; } else { xxxx = (xxxx - 5); }; } } }//package xxDa_Pump_fla

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClipUses:1Used by:Timeline
Symbol 3 GraphicUsed by:Timeline
Symbol 4 GraphicUsed by:77
Symbol 5 GraphicUsed by:77
Symbol 6 GraphicUsed by:77
Symbol 7 GraphicUsed by:77
Symbol 8 GraphicUsed by:77
Symbol 9 GraphicUsed by:77
Symbol 10 GraphicUsed by:77
Symbol 11 GraphicUsed by:77
Symbol 12 GraphicUsed by:77
Symbol 13 GraphicUsed by:77
Symbol 14 GraphicUsed by:77
Symbol 15 GraphicUsed by:77
Symbol 16 GraphicUsed by:77
Symbol 17 GraphicUsed by:77
Symbol 18 GraphicUsed by:77
Symbol 19 GraphicUsed by:77
Symbol 20 GraphicUsed by:77
Symbol 21 GraphicUsed by:77
Symbol 22 GraphicUsed by:77
Symbol 23 GraphicUsed by:77
Symbol 24 GraphicUsed by:77
Symbol 25 GraphicUsed by:77
Symbol 26 GraphicUsed by:77
Symbol 27 GraphicUsed by:77
Symbol 28 GraphicUsed by:77
Symbol 29 GraphicUsed by:77
Symbol 30 GraphicUsed by:77
Symbol 31 GraphicUsed by:77
Symbol 32 GraphicUsed by:77
Symbol 33 GraphicUsed by:77
Symbol 34 GraphicUsed by:77
Symbol 35 GraphicUsed by:77
Symbol 36 GraphicUsed by:77
Symbol 37 GraphicUsed by:77
Symbol 38 GraphicUsed by:77
Symbol 39 GraphicUsed by:77
Symbol 40 GraphicUsed by:77
Symbol 41 GraphicUsed by:77
Symbol 42 GraphicUsed by:77
Symbol 43 GraphicUsed by:77
Symbol 44 GraphicUsed by:77
Symbol 45 GraphicUsed by:77
Symbol 46 GraphicUsed by:77
Symbol 47 GraphicUsed by:77
Symbol 48 GraphicUsed by:77
Symbol 49 GraphicUsed by:77
Symbol 50 GraphicUsed by:77
Symbol 51 GraphicUsed by:77
Symbol 52 GraphicUsed by:77
Symbol 53 GraphicUsed by:77
Symbol 54 GraphicUsed by:77
Symbol 55 GraphicUsed by:77
Symbol 56 GraphicUsed by:77
Symbol 57 GraphicUsed by:77
Symbol 58 GraphicUsed by:77
Symbol 59 GraphicUsed by:77
Symbol 60 GraphicUsed by:77
Symbol 61 GraphicUsed by:77
Symbol 62 GraphicUsed by:77
Symbol 63 GraphicUsed by:77
Symbol 64 GraphicUsed by:77
Symbol 65 GraphicUsed by:77
Symbol 66 GraphicUsed by:77
Symbol 67 GraphicUsed by:77
Symbol 68 GraphicUsed by:77
Symbol 69 GraphicUsed by:77
Symbol 70 GraphicUsed by:77
Symbol 71 GraphicUsed by:77
Symbol 72 GraphicUsed by:77
Symbol 73 GraphicUsed by:77
Symbol 74 GraphicUsed by:77
Symbol 75 GraphicUsed by:77
Symbol 76 GraphicUsed by:77
Symbol 77 MovieClipUses:4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76Used by:Timeline
Symbol 78 GraphicUsed by:87
Symbol 79 GraphicUsed by:87
Symbol 80 GraphicUsed by:87
Symbol 81 GraphicUsed by:87
Symbol 82 GraphicUsed by:87
Symbol 83 GraphicUsed by:87
Symbol 84 GraphicUsed by:87
Symbol 85 GraphicUsed by:87
Symbol 86 GraphicUsed by:87
Symbol 87 MovieClipUses:78 79 80 81 82 83 84 85 86Used by:Timeline
Symbol 88 GraphicUsed by:89
Symbol 89 MovieClipUses:88Used by:Timeline
Symbol 90 GraphicUsed by:Timeline
Symbol 91 GraphicUsed by:96
Symbol 92 GraphicUsed by:96
Symbol 93 GraphicUsed by:96
Symbol 94 GraphicUsed by:96
Symbol 95 GraphicUsed by:96
Symbol 96 ButtonUses:91 92 93 94 95Used by:Timeline
Symbol 97 GraphicUsed by:98
Symbol 98 MovieClipUses:97Used by:Timeline

Instance Names

"xxx"Frame 1Symbol 2 MovieClip
"roo"Frame 1Symbol 77 MovieClip
"eye"Frame 1Symbol 87 MovieClip
"ump"Frame 1Symbol 89 MovieClip
"drop"Frame 1Symbol 96 Button
"help"Frame 1Symbol 98 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.
Protect (24)Timeline Frame 131 bytes "..$1$9x$Qk49tyTp04EgDg3761LRm0."
EnableDebugger2 (64)Timeline Frame 131 bytes "..$1$Nk$nuea07KnznBd9VkSh6ZlR/."




http://swfchan.com/19/94035/info.shtml
Created: 26/3 -2019 09:48:28 Last modified: 26/3 -2019 09:48:28 Server time: 27/04 -2024 03:11:36