home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2012 January / ME_2012_01.iso / Galileo-Video / system / ChromeLinux.swf / scripts / com / greensock / TweenMax.as < prev   
Encoding:
Text File  |  2010-11-16  |  30.4 KB  |  912 lines

  1. package com.greensock
  2. {
  3.    import com.greensock.core.*;
  4.    import com.greensock.events.TweenEvent;
  5.    import com.greensock.plugins.*;
  6.    import flash.display.*;
  7.    import flash.events.*;
  8.    import flash.utils.*;
  9.    
  10.    public class TweenMax extends TweenLite implements IEventDispatcher
  11.    {
  12.       public static const version:Number = 11.37;
  13.       
  14.       private static var _overwriteMode:int = OverwriteManager.enabled ? OverwriteManager.mode : OverwriteManager.init(2);
  15.       
  16.       public static var killTweensOf:Function = TweenLite.killTweensOf;
  17.       
  18.       public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
  19.       
  20.       TweenPlugin.activate([AutoAlphaPlugin,EndArrayPlugin,FramePlugin,RemoveTintPlugin,TintPlugin,VisiblePlugin,VolumePlugin,BevelFilterPlugin,BezierPlugin,BezierThroughPlugin,BlurFilterPlugin,ColorMatrixFilterPlugin,ColorTransformPlugin,DropShadowFilterPlugin,FrameLabelPlugin,GlowFilterPlugin,HexColorsPlugin,RoundPropsPlugin,ShortRotationPlugin,{}]);
  21.       
  22.       protected var _cyclesComplete:uint = 0;
  23.       
  24.       protected var _dispatcher:EventDispatcher;
  25.       
  26.       protected var _hasUpdateListener:Boolean;
  27.       
  28.       protected var _easeType:uint;
  29.       
  30.       protected var _repeatDelay:Number = 0;
  31.       
  32.       public var yoyo:Boolean;
  33.       
  34.       protected var _easePower:uint;
  35.       
  36.       protected var _repeat:int = 0;
  37.       
  38.       public function TweenMax(param1:Object, param2:Number, param3:Object)
  39.       {
  40.          super(param1,param2,param3);
  41.          if(TweenLite.version < 11.2)
  42.          {
  43.             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.");
  44.          }
  45.          this.yoyo = Boolean(this.vars.yoyo);
  46.          _repeat = !!this.vars.repeat ? int(this.vars.repeat) : 0;
  47.          _repeatDelay = !!this.vars.repeatDelay ? Number(this.vars.repeatDelay) : 0;
  48.          this.cacheIsDirty = true;
  49.          if(Boolean(this.vars.onCompleteListener) || Boolean(this.vars.onInitListener) || Boolean(this.vars.onUpdateListener) || Boolean(this.vars.onStartListener) || Boolean(this.vars.onRepeatListener) || Boolean(this.vars.onReverseCompleteListener))
  50.          {
  51.             initDispatcher();
  52.             if(param2 == 0 && _delay == 0)
  53.             {
  54.                _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
  55.                _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
  56.             }
  57.          }
  58.          if(Boolean(this.vars.timeScale) && !(this.target is TweenCore))
  59.          {
  60.             this.cachedTimeScale = this.vars.timeScale;
  61.          }
  62.       }
  63.       
  64.       public static function set globalTimeScale(param1:Number) : void
  65.       {
  66.          if(param1 == 0)
  67.          {
  68.             param1 = 0.0001;
  69.          }
  70.          if(TweenLite.rootTimeline == null)
  71.          {
  72.             TweenLite.to({},0,{});
  73.          }
  74.          var _loc2_:SimpleTimeline = TweenLite.rootTimeline;
  75.          var _loc3_:Number = getTimer() * 0.001;
  76.          _loc2_.cachedStartTime = _loc3_ - (_loc3_ - _loc2_.cachedStartTime) * _loc2_.cachedTimeScale / param1;
  77.          _loc2_ = TweenLite.rootFramesTimeline;
  78.          _loc3_ = TweenLite.rootFrame;
  79.          _loc2_.cachedStartTime = _loc3_ - (_loc3_ - _loc2_.cachedStartTime) * _loc2_.cachedTimeScale / param1;
  80.          TweenLite.rootFramesTimeline.cachedTimeScale = TweenLite.rootTimeline.cachedTimeScale = param1;
  81.       }
  82.       
  83.       public static function fromTo(param1:Object, param2:Number, param3:Object, param4:Object) : TweenMax
  84.       {
  85.          param4.startAt = param3;
  86.          if(param3.immediateRender)
  87.          {
  88.             param4.immediateRender = true;
  89.          }
  90.          return new TweenMax(param1,param2,param4);
  91.       }
  92.       
  93.       public static function allFromTo(param1:Array, param2:Number, param3:Object, param4:Object, param5:Number = 0, param6:Function = null, param7:Array = null) : Array
  94.       {
  95.          param4.startAt = param3;
  96.          if(param3.immediateRender)
  97.          {
  98.             param4.immediateRender = true;
  99.          }
  100.          return allTo(param1,param2,param4,param5,param6,param7);
  101.       }
  102.       
  103.       public static function pauseAll(param1:Boolean = true, param2:Boolean = true) : void
  104.       {
  105.          changePause(true,param1,param2);
  106.       }
  107.       
  108.       public static function getTweensOf(param1:Object) : Array
  109.       {
  110.          var _loc4_:int = 0;
  111.          var _loc5_:uint = 0;
  112.          var _loc2_:Array = masterList[param1];
  113.          var _loc3_:Array = [];
  114.          if(_loc2_)
  115.          {
  116.             _loc4_ = int(_loc2_.length);
  117.             _loc5_ = 0;
  118.             while(--_loc4_ > -1)
  119.             {
  120.                if(!_loc2_[_loc4_].gc)
  121.                {
  122.                   var _loc6_:*;
  123.                   _loc3_[_loc6_ = _loc5_++] = _loc2_[_loc4_];
  124.                }
  125.             }
  126.          }
  127.          return _loc3_;
  128.       }
  129.       
  130.       public static function get globalTimeScale() : Number
  131.       {
  132.          return TweenLite.rootTimeline == null ? 1 : TweenLite.rootTimeline.cachedTimeScale;
  133.       }
  134.       
  135.       public static function killChildTweensOf(param1:DisplayObjectContainer, param2:Boolean = false) : void
  136.       {
  137.          var _loc4_:Object = null;
  138.          var _loc5_:DisplayObjectContainer = null;
  139.          var _loc3_:Array = getAllTweens();
  140.          var _loc6_:int = int(_loc3_.length);
  141.          while(--_loc6_ > -1)
  142.          {
  143.             _loc4_ = _loc3_[_loc6_].target;
  144.             if(_loc4_ is DisplayObject)
  145.             {
  146.                _loc5_ = _loc4_.parent;
  147.                while(_loc5_)
  148.                {
  149.                   if(_loc5_ == param1)
  150.                   {
  151.                      if(param2)
  152.                      {
  153.                         _loc3_[_loc6_].complete(false);
  154.                      }
  155.                      else
  156.                      {
  157.                         _loc3_[_loc6_].setEnabled(false,false);
  158.                      }
  159.                   }
  160.                   _loc5_ = _loc5_.parent;
  161.                }
  162.             }
  163.          }
  164.       }
  165.       
  166.       public static function delayedCall(param1:Number, param2:Function, param3:Array = null, param4:Boolean = false) : TweenMax
  167.       {
  168.          return new TweenMax(param2,0,{
  169.             "delay":param1,
  170.             "onComplete":param2,
  171.             "onCompleteParams":param3,
  172.             "immediateRender":false,
  173.             "useFrames":param4,
  174.             "overwrite":0
  175.          });
  176.       }
  177.       
  178.       public static function isTweening(param1:Object) : Boolean
  179.       {
  180.          var _loc4_:TweenLite = null;
  181.          var _loc2_:Array = getTweensOf(param1);
  182.          var _loc3_:int = int(_loc2_.length);
  183.          while(--_loc3_ > -1)
  184.          {
  185.             _loc4_ = _loc2_[_loc3_];
  186.             if(_loc4_.active || _loc4_.cachedStartTime == _loc4_.timeline.cachedTime && _loc4_.timeline.active)
  187.             {
  188.                return true;
  189.             }
  190.          }
  191.          return false;
  192.       }
  193.       
  194.       public static function killAll(param1:Boolean = false, param2:Boolean = true, param3:Boolean = true) : void
  195.       {
  196.          var _loc5_:* = false;
  197.          var _loc4_:Array = getAllTweens();
  198.          var _loc6_:int = int(_loc4_.length);
  199.          while(--_loc6_ > -1)
  200.          {
  201.             _loc5_ = _loc4_[_loc6_].target == _loc4_[_loc6_].vars.onComplete;
  202.             if(_loc5_ == param3 || _loc5_ != param2)
  203.             {
  204.                if(param1)
  205.                {
  206.                   _loc4_[_loc6_].complete(false);
  207.                }
  208.                else
  209.                {
  210.                   _loc4_[_loc6_].setEnabled(false,false);
  211.                }
  212.             }
  213.          }
  214.       }
  215.       
  216.       private static function changePause(param1:Boolean, param2:Boolean = true, param3:Boolean = false) : void
  217.       {
  218.          var _loc5_:* = false;
  219.          var _loc4_:Array = getAllTweens();
  220.          var _loc6_:int = int(_loc4_.length);
  221.          while(--_loc6_ > -1)
  222.          {
  223.             _loc5_ = TweenLite(_loc4_[_loc6_]).target == TweenLite(_loc4_[_loc6_]).vars.onComplete;
  224.             if(_loc5_ == param3 || _loc5_ != param2)
  225.             {
  226.                TweenCore(_loc4_[_loc6_]).paused = param1;
  227.             }
  228.          }
  229.       }
  230.       
  231.       public static function from(param1:Object, param2:Number, param3:Object) : TweenMax
  232.       {
  233.          param3.runBackwards = true;
  234.          if(!("immediateRender" in param3))
  235.          {
  236.             param3.immediateRender = true;
  237.          }
  238.          return new TweenMax(param1,param2,param3);
  239.       }
  240.       
  241.       public static function allFrom(param1:Array, param2:Number, param3:Object, param4:Number = 0, param5:Function = null, param6:Array = null) : Array
  242.       {
  243.          param3.runBackwards = true;
  244.          if(!("immediateRender" in param3))
  245.          {
  246.             param3.immediateRender = true;
  247.          }
  248.          return allTo(param1,param2,param3,param4,param5,param6);
  249.       }
  250.       
  251.       public static function getAllTweens() : Array
  252.       {
  253.          var _loc4_:Array = null;
  254.          var _loc5_:int = 0;
  255.          var _loc1_:Dictionary = masterList;
  256.          var _loc2_:uint = 0;
  257.          var _loc3_:Array = [];
  258.          for each(_loc4_ in _loc1_)
  259.          {
  260.             _loc5_ = int(_loc4_.length);
  261.             while(--_loc5_ > -1)
  262.             {
  263.                if(!TweenLite(_loc4_[_loc5_]).gc)
  264.                {
  265.                   var _loc8_:*;
  266.                   _loc3_[_loc8_ = _loc2_++] = _loc4_[_loc5_];
  267.                }
  268.             }
  269.          }
  270.          return _loc3_;
  271.       }
  272.       
  273.       public static function resumeAll(param1:Boolean = true, param2:Boolean = true) : void
  274.       {
  275.          changePause(false,param1,param2);
  276.       }
  277.       
  278.       public static function to(param1:Object, param2:Number, param3:Object) : TweenMax
  279.       {
  280.          return new TweenMax(param1,param2,param3);
  281.       }
  282.       
  283.       public static function allTo(param1:Array, param2:Number, param3:Object, param4:Number = 0, param5:Function = null, param6:Array = null) : Array
  284.       {
  285.          var i:int = 0;
  286.          var varsDup:Object = null;
  287.          var p:String = null;
  288.          var onCompleteProxy:Function = null;
  289.          var onCompleteParamsProxy:Array = null;
  290.          var targets:Array = param1;
  291.          var duration:Number = param2;
  292.          var vars:Object = param3;
  293.          var stagger:Number = param4;
  294.          var onCompleteAll:Function = param5;
  295.          var onCompleteAllParams:Array = param6;
  296.          var l:uint = targets.length;
  297.          var a:Array = [];
  298.          var curDelay:Number = "delay" in vars ? Number(vars.delay) : 0;
  299.          onCompleteProxy = vars.onComplete;
  300.          onCompleteParamsProxy = vars.onCompleteParams;
  301.          var lastIndex:int = stagger <= 0 ? 0 : int(l - 1);
  302.          i = 0;
  303.          while(i < l)
  304.          {
  305.             varsDup = {};
  306.             for(p in vars)
  307.             {
  308.                varsDup[p] = vars[p];
  309.             }
  310.             varsDup.delay = curDelay;
  311.             if(i == lastIndex && onCompleteAll != null)
  312.             {
  313.                varsDup.onComplete = function():void
  314.                {
  315.                   if(onCompleteProxy != null)
  316.                   {
  317.                      onCompleteProxy.apply(null,onCompleteParamsProxy);
  318.                   }
  319.                   onCompleteAll.apply(null,onCompleteAllParams);
  320.                };
  321.             }
  322.             a[a.length] = new TweenMax(targets[i],duration,varsDup);
  323.             curDelay += stagger;
  324.             i++;
  325.          }
  326.          return a;
  327.       }
  328.       
  329.       public function dispatchEvent(param1:Event) : Boolean
  330.       {
  331.          return _dispatcher == null ? false : _dispatcher.dispatchEvent(param1);
  332.       }
  333.       
  334.       public function set timeScale(param1:Number) : void
  335.       {
  336.          if(param1 == 0)
  337.          {
  338.             param1 = 0.0001;
  339.          }
  340.          var _loc2_:Number = Boolean(_pauseTime) || _pauseTime == 0 ? _pauseTime : this.timeline.cachedTotalTime;
  341.          this.cachedStartTime = _loc2_ - (_loc2_ - this.cachedStartTime) * this.cachedTimeScale / param1;
  342.          this.cachedTimeScale = param1;
  343.          setDirtyCache(false);
  344.       }
  345.       
  346.       override public function renderTime(param1:Number, param2:Boolean = false, param3:Boolean = false) : void
  347.       {
  348.          var _loc6_:Boolean = false;
  349.          var _loc7_:Boolean = false;
  350.          var _loc8_:Boolean = false;
  351.          var _loc10_:Number = NaN;
  352.          var _loc11_:int = 0;
  353.          var _loc12_:int = 0;
  354.          var _loc13_:Number = NaN;
  355.          var _loc4_:Number = this.cacheIsDirty ? this.totalDuration : this.cachedTotalDuration;
  356.          var _loc5_:Number = this.cachedTime;
  357.          if(param1 >= _loc4_)
  358.          {
  359.             this.cachedTotalTime = _loc4_;
  360.             this.cachedTime = this.cachedDuration;
  361.             this.ratio = 1;
  362.             _loc6_ = true;
  363.             if(this.cachedDuration == 0)
  364.             {
  365.                if((param1 == 0 || _rawPrevTime < 0) && _rawPrevTime != param1)
  366.                {
  367.                   param3 = true;
  368.                }
  369.                _rawPrevTime = param1;
  370.             }
  371.          }
  372.          else if(param1 <= 0)
  373.          {
  374.             if(param1 < 0)
  375.             {
  376.                this.active = false;
  377.                if(this.cachedDuration == 0)
  378.                {
  379.                   if(_rawPrevTime > 0)
  380.                   {
  381.                      param3 = true;
  382.                      _loc6_ = true;
  383.                   }
  384.                   _rawPrevTime = param1;
  385.                }
  386.             }
  387.             this.cachedTotalTime = this.cachedTime = this.ratio = 0;
  388.             if(this.cachedReversed && _loc5_ != 0)
  389.             {
  390.                _loc6_ = true;
  391.             }
  392.          }
  393.          else
  394.          {
  395.             this.cachedTotalTime = this.cachedTime = param1;
  396.             _loc8_ = true;
  397.          }
  398.          if(_repeat != 0)
  399.          {
  400.             _loc10_ = this.cachedDuration + _repeatDelay;
  401.             if(_loc6_)
  402.             {
  403.                if(this.yoyo && Boolean(_repeat % 2))
  404.                {
  405.                   this.cachedTime = this.ratio = 0;
  406.                }
  407.             }
  408.             else if(param1 > 0)
  409.             {
  410.                _loc11_ = int(_cyclesComplete);
  411.                _cyclesComplete = int(this.cachedTotalTime / _loc10_);
  412.                if(_cyclesComplete == this.cachedTotalTime / _loc10_)
  413.                {
  414.                   --_cyclesComplete;
  415.                }
  416.                if(_loc11_ != _cyclesComplete)
  417.                {
  418.                   _loc7_ = true;
  419.                }
  420.                this.cachedTime = (this.cachedTotalTime / _loc10_ - _cyclesComplete) * _loc10_;
  421.                if(this.yoyo && Boolean(_cyclesComplete % 2))
  422.                {
  423.                   this.cachedTime = this.cachedDuration - this.cachedTime;
  424.                }
  425.                else if(this.cachedTime >= this.cachedDuration)
  426.                {
  427.                   this.cachedTime = this.cachedDuration;
  428.                   this.ratio = 1;
  429.                   _loc8_ = false;
  430.                }
  431.                if(this.cachedTime <= 0)
  432.                {
  433.                   this.cachedTime = this.ratio = 0;
  434.                   _loc8_ = false;
  435.                }
  436.             }
  437.          }
  438.          if(_loc5_ == this.cachedTime && !param3)
  439.          {
  440.             return;
  441.          }
  442.          if(!this.initted)
  443.          {
  444.             init();
  445.          }
  446.          if(!this.active && !this.cachedPaused)
  447.          {
  448.             this.active = true;
  449.          }
  450.          if(_loc8_)
  451.          {
  452.             if(_easeType)
  453.             {
  454.                _loc12_ = int(_easePower);
  455.                _loc13_ = this.cachedTime / this.cachedDuration;
  456.                if(_easeType == 2)
  457.                {
  458.                   this.ratio = _loc13_ = 1 - _loc13_;
  459.                   while(--_loc12_ > -1)
  460.                   {
  461.                      this.ratio = _loc13_ * this.ratio;
  462.                   }
  463.                   this.ratio = 1 - this.ratio;
  464.                }
  465.                else if(_easeType == 1)
  466.                {
  467.                   this.ratio = _loc13_;
  468.                   while(--_loc12_ > -1)
  469.                   {
  470.                      this.ratio = _loc13_ * this.ratio;
  471.                   }
  472.                }
  473.                else if(_loc13_ < 0.5)
  474.                {
  475.                   this.ratio = _loc13_ = _loc13_ * 2;
  476.                   while(--_loc12_ > -1)
  477.                   {
  478.                      this.ratio = _loc13_ * this.ratio;
  479.                   }
  480.                   this.ratio *= 0.5;
  481.                }
  482.                else
  483.                {
  484.                   this.ratio = _loc13_ = (1 - _loc13_) * 2;
  485.                   while(--_loc12_ > -1)
  486.                   {
  487.                      this.ratio = _loc13_ * this.ratio;
  488.                   }
  489.                   this.ratio = 1 - 0.5 * this.ratio;
  490.                }
  491.             }
  492.             else
  493.             {
  494.                this.ratio = _ease(this.cachedTime,0,1,this.cachedDuration);
  495.             }
  496.          }
  497.          if(_loc5_ == 0 && this.cachedTotalTime != 0 && !param2)
  498.          {
  499.             if(this.vars.onStart)
  500.             {
  501.                this.vars.onStart.apply(null,this.vars.onStartParams);
  502.             }
  503.             if(_dispatcher)
  504.             {
  505.                _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
  506.             }
  507.          }
  508.          var _loc9_:PropTween = this.cachedPT1;
  509.          while(_loc9_)
  510.          {
  511.             _loc9_.target[_loc9_.property] = _loc9_.start + this.ratio * _loc9_.change;
  512.             _loc9_ = _loc9_.nextNode;
  513.          }
  514.          if(_hasUpdate && !param2)
  515.          {
  516.             this.vars.onUpdate.apply(null,this.vars.onUpdateParams);
  517.          }
  518.          if(_hasUpdateListener && !param2)
  519.          {
  520.             _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
  521.          }
  522.          if(_loc6_)
  523.          {
  524.             if(_hasPlugins && Boolean(this.cachedPT1))
  525.             {
  526.                onPluginEvent("onComplete",this);
  527.             }
  528.             complete(true,param2);
  529.          }
  530.          else if(_loc7_ && !param2)
  531.          {
  532.             if(this.vars.onRepeat)
  533.             {
  534.                this.vars.onRepeat.apply(null,this.vars.onRepeatParams);
  535.             }
  536.             if(_dispatcher)
  537.             {
  538.                _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT));
  539.             }
  540.          }
  541.       }
  542.       
  543.       override public function set totalDuration(param1:Number) : void
  544.       {
  545.          if(_repeat == -1)
  546.          {
  547.             return;
  548.          }
  549.          this.duration = (param1 - _repeat * _repeatDelay) / (_repeat + 1);
  550.       }
  551.       
  552.       public function addEventListener(param1:String, param2:Function, param3:Boolean = false, param4:int = 0, param5:Boolean = false) : void
  553.       {
  554.          if(_dispatcher == null)
  555.          {
  556.             initDispatcher();
  557.          }
  558.          if(param1 == TweenEvent.UPDATE)
  559.          {
  560.             _hasUpdateListener = true;
  561.          }
  562.          _dispatcher.addEventListener(param1,param2,param3,param4,param5);
  563.       }
  564.       
  565.       protected function insertPropTween(param1:Object, param2:String, param3:Number, param4:*, param5:String, param6:Boolean, param7:PropTween) : PropTween
  566.       {
  567.          var _loc9_:Array = null;
  568.          var _loc10_:int = 0;
  569.          var _loc8_:PropTween = new PropTween(param1,param2,param3,typeof param4 == "number" ? param4 - param3 : Number(param4),param5,param6,param7);
  570.          if(param6 && param5 == "_MULTIPLE_")
  571.          {
  572.             _loc9_ = param1.overwriteProps;
  573.             _loc10_ = int(_loc9_.length);
  574.             while(--_loc10_ > -1)
  575.             {
  576.                this.propTweenLookup[_loc9_[_loc10_]] = _loc8_;
  577.             }
  578.          }
  579.          else
  580.          {
  581.             this.propTweenLookup[param5] = _loc8_;
  582.          }
  583.          return _loc8_;
  584.       }
  585.       
  586.       override protected function init() : void
  587.       {
  588.          var _loc1_:TweenMax = null;
  589.          var _loc2_:int = 0;
  590.          var _loc3_:String = null;
  591.          var _loc4_:* = null;
  592.          var _loc5_:Array = null;
  593.          var _loc6_:Object = null;
  594.          var _loc7_:PropTween = null;
  595.          var _loc8_:PropTween = null;
  596.          var _loc9_:int = 0;
  597.          if(this.vars.startAt)
  598.          {
  599.             this.vars.startAt.overwrite = 0;
  600.             this.vars.startAt.immediateRender = true;
  601.             _loc1_ = new TweenMax(this.target,0,this.vars.startAt);
  602.          }
  603.          if(_dispatcher)
  604.          {
  605.             _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.INIT));
  606.          }
  607.          super.init();
  608.          if(_ease in fastEaseLookup)
  609.          {
  610.             _easeType = fastEaseLookup[_ease][0];
  611.             _easePower = fastEaseLookup[_ease][1];
  612.          }
  613.          if(this.vars.roundProps != null && "roundProps" in TweenLite.plugins)
  614.          {
  615.             _loc5_ = this.vars.roundProps;
  616.             _loc9_ = int(_loc5_.length);
  617.             while(--_loc9_ > -1)
  618.             {
  619.                _loc3_ = _loc5_[_loc9_];
  620.                _loc8_ = this.cachedPT1;
  621.                while(_loc8_)
  622.                {
  623.                   if(_loc8_.name == _loc3_)
  624.                   {
  625.                      if(_loc8_.isPlugin)
  626.                      {
  627.                         _loc8_.target.round = true;
  628.                      }
  629.                      else
  630.                      {
  631.                         if(_loc6_ == null)
  632.                         {
  633.                            _loc6_ = new TweenLite.plugins.roundProps();
  634.                            _loc6_.add(_loc8_.target,_loc3_,_loc8_.start,_loc8_.change);
  635.                            _hasPlugins = true;
  636.                            this.cachedPT1 = _loc7_ = insertPropTween(_loc6_,"changeFactor",0,1,"_MULTIPLE_",true,this.cachedPT1);
  637.                         }
  638.                         else
  639.                         {
  640.                            _loc6_.add(_loc8_.target,_loc3_,_loc8_.start,_loc8_.change);
  641.                         }
  642.                         this.removePropTween(_loc8_);
  643.                         this.propTweenLookup[_loc3_] = _loc7_;
  644.                      }
  645.                   }
  646.                   else if(_loc8_.isPlugin && _loc8_.name == "_MULTIPLE_" && !_loc8_.target.round)
  647.                   {
  648.                      _loc4_ = " " + _loc8_.target.overwriteProps.join(" ") + " ";
  649.                      if(_loc4_.indexOf(" " + _loc3_ + " ") != -1)
  650.                      {
  651.                         _loc8_.target.round = true;
  652.                      }
  653.                   }
  654.                   _loc8_ = _loc8_.nextNode;
  655.                }
  656.             }
  657.          }
  658.       }
  659.       
  660.       public function removeEventListener(param1:String, param2:Function, param3:Boolean = false) : void
  661.       {
  662.          if(_dispatcher)
  663.          {
  664.             _dispatcher.removeEventListener(param1,param2,param3);
  665.          }
  666.       }
  667.       
  668.       public function setDestination(param1:String, param2:*, param3:Boolean = true) : void
  669.       {
  670.          var _loc4_:Object = {};
  671.          _loc4_[param1] = param2;
  672.          updateTo(_loc4_,!param3);
  673.       }
  674.       
  675.       public function willTrigger(param1:String) : Boolean
  676.       {
  677.          return _dispatcher == null ? false : _dispatcher.willTrigger(param1);
  678.       }
  679.       
  680.       public function hasEventListener(param1:String) : Boolean
  681.       {
  682.          return _dispatcher == null ? false : _dispatcher.hasEventListener(param1);
  683.       }
  684.       
  685.       protected function initDispatcher() : void
  686.       {
  687.          if(_dispatcher == null)
  688.          {
  689.             _dispatcher = new EventDispatcher(this);
  690.          }
  691.          if(this.vars.onInitListener is Function)
  692.          {
  693.             _dispatcher.addEventListener(TweenEvent.INIT,this.vars.onInitListener,false,0,true);
  694.          }
  695.          if(this.vars.onStartListener is Function)
  696.          {
  697.             _dispatcher.addEventListener(TweenEvent.START,this.vars.onStartListener,false,0,true);
  698.          }
  699.          if(this.vars.onUpdateListener is Function)
  700.          {
  701.             _dispatcher.addEventListener(TweenEvent.UPDATE,this.vars.onUpdateListener,false,0,true);
  702.             _hasUpdateListener = true;
  703.          }
  704.          if(this.vars.onCompleteListener is Function)
  705.          {
  706.             _dispatcher.addEventListener(TweenEvent.COMPLETE,this.vars.onCompleteListener,false,0,true);
  707.          }
  708.          if(this.vars.onRepeatListener is Function)
  709.          {
  710.             _dispatcher.addEventListener(TweenEvent.REPEAT,this.vars.onRepeatListener,false,0,true);
  711.          }
  712.          if(this.vars.onReverseCompleteListener is Function)
  713.          {
  714.             _dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE,this.vars.onReverseCompleteListener,false,0,true);
  715.          }
  716.       }
  717.       
  718.       public function set currentProgress(param1:Number) : void
  719.       {
  720.          if(_cyclesComplete == 0)
  721.          {
  722.             setTotalTime(this.duration * param1,false);
  723.          }
  724.          else
  725.          {
  726.             setTotalTime(this.duration * param1 + _cyclesComplete * this.cachedDuration,false);
  727.          }
  728.       }
  729.       
  730.       public function get totalProgress() : Number
  731.       {
  732.          return this.cachedTotalTime / this.totalDuration;
  733.       }
  734.       
  735.       public function set totalProgress(param1:Number) : void
  736.       {
  737.          setTotalTime(this.totalDuration * param1,false);
  738.       }
  739.       
  740.       protected function removePropTween(param1:PropTween) : Boolean
  741.       {
  742.          if(param1.nextNode)
  743.          {
  744.             param1.nextNode.prevNode = param1.prevNode;
  745.          }
  746.          if(param1.prevNode)
  747.          {
  748.             param1.prevNode.nextNode = param1.nextNode;
  749.          }
  750.          else if(this.cachedPT1 == param1)
  751.          {
  752.             this.cachedPT1 = param1.nextNode;
  753.          }
  754.          if(param1.isPlugin && Boolean(param1.target.onDisable))
  755.          {
  756.             param1.target.onDisable();
  757.             if(param1.target.activeDisable)
  758.             {
  759.                return true;
  760.             }
  761.          }
  762.          return false;
  763.       }
  764.       
  765.       public function get currentProgress() : Number
  766.       {
  767.          return this.cachedTime / this.duration;
  768.       }
  769.       
  770.       public function get repeat() : int
  771.       {
  772.          return _repeat;
  773.       }
  774.       
  775.       public function updateTo(param1:Object, param2:Boolean = false) : void
  776.       {
  777.          var _loc4_:String = null;
  778.          var _loc5_:Number = NaN;
  779.          var _loc6_:PropTween = null;
  780.          var _loc7_:Number = NaN;
  781.          var _loc3_:Number = this.ratio;
  782.          if(param2 && this.timeline != null && this.cachedStartTime < this.timeline.cachedTime)
  783.          {
  784.             this.cachedStartTime = this.timeline.cachedTime;
  785.             this.setDirtyCache(false);
  786.             if(this.gc)
  787.             {
  788.                this.setEnabled(true,false);
  789.             }
  790.             else
  791.             {
  792.                this.timeline.addChild(this);
  793.             }
  794.          }
  795.          for(_loc4_ in param1)
  796.          {
  797.             this.vars[_loc4_] = param1[_loc4_];
  798.          }
  799.          if(this.initted)
  800.          {
  801.             this.initted = false;
  802.             if(!param2)
  803.             {
  804.                init();
  805.                if(!param2 && this.cachedTime > 0 && this.cachedTime < this.cachedDuration)
  806.                {
  807.                   _loc5_ = 1 / (1 - _loc3_);
  808.                   _loc6_ = this.cachedPT1;
  809.                   while(_loc6_)
  810.                   {
  811.                      _loc7_ = _loc6_.start + _loc6_.change;
  812.                      _loc6_.change *= _loc5_;
  813.                      _loc6_.start = _loc7_ - _loc6_.change;
  814.                      _loc6_ = _loc6_.nextNode;
  815.                   }
  816.                }
  817.             }
  818.          }
  819.       }
  820.       
  821.       override public function set currentTime(param1:Number) : void
  822.       {
  823.          if(_cyclesComplete != 0)
  824.          {
  825.             if(this.yoyo && _cyclesComplete % 2 == 1)
  826.             {
  827.                param1 = this.duration - param1 + _cyclesComplete * (this.cachedDuration + _repeatDelay);
  828.             }
  829.             else
  830.             {
  831.                param1 += _cyclesComplete * (this.duration + _repeatDelay);
  832.             }
  833.          }
  834.          setTotalTime(param1,false);
  835.       }
  836.       
  837.       public function get repeatDelay() : Number
  838.       {
  839.          return _repeatDelay;
  840.       }
  841.       
  842.       public function killProperties(param1:Array) : void
  843.       {
  844.          var _loc2_:Object = {};
  845.          var _loc3_:int = int(param1.length);
  846.          while(--_loc3_ > -1)
  847.          {
  848.             _loc2_[param1[_loc3_]] = true;
  849.          }
  850.          killVars(_loc2_);
  851.       }
  852.       
  853.       public function set repeatDelay(param1:Number) : void
  854.       {
  855.          _repeatDelay = param1;
  856.          setDirtyCache(true);
  857.       }
  858.       
  859.       public function set repeat(param1:int) : void
  860.       {
  861.          _repeat = param1;
  862.          setDirtyCache(true);
  863.       }
  864.       
  865.       override public function complete(param1:Boolean = false, param2:Boolean = false) : void
  866.       {
  867.          super.complete(param1,param2);
  868.          if(!param2 && Boolean(_dispatcher))
  869.          {
  870.             if(this.cachedTotalTime == this.cachedTotalDuration && !this.cachedReversed)
  871.             {
  872.                _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
  873.             }
  874.             else if(this.cachedReversed && this.cachedTotalTime == 0)
  875.             {
  876.                _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE));
  877.             }
  878.          }
  879.       }
  880.       
  881.       override public function invalidate() : void
  882.       {
  883.          this.yoyo = Boolean(this.vars.yoyo == true);
  884.          _repeat = !!this.vars.repeat ? int(Number(this.vars.repeat)) : 0;
  885.          _repeatDelay = !!this.vars.repeatDelay ? Number(this.vars.repeatDelay) : 0;
  886.          _hasUpdateListener = false;
  887.          if(this.vars.onCompleteListener != null || this.vars.onUpdateListener != null || this.vars.onStartListener != null)
  888.          {
  889.             initDispatcher();
  890.          }
  891.          setDirtyCache(true);
  892.          super.invalidate();
  893.       }
  894.       
  895.       public function get timeScale() : Number
  896.       {
  897.          return this.cachedTimeScale;
  898.       }
  899.       
  900.       override public function get totalDuration() : Number
  901.       {
  902.          if(this.cacheIsDirty)
  903.          {
  904.             this.cachedTotalDuration = _repeat == -1 ? 999999999999 : this.cachedDuration * (_repeat + 1) + _repeatDelay * _repeat;
  905.             this.cacheIsDirty = false;
  906.          }
  907.          return this.cachedTotalDuration;
  908.       }
  909.    }
  910. }
  911.  
  912.