home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / caurina / transitions / TweenListObj.as < prev   
Encoding:
Text File  |  2010-06-23  |  9.3 KB  |  301 lines

  1. package caurina.transitions
  2. {
  3.    public class TweenListObj
  4.    {
  5.       public var hasStarted:Boolean;
  6.       
  7.       public var onUpdate:Function;
  8.       
  9.       public var useFrames:Boolean;
  10.       
  11.       public var count:Number;
  12.       
  13.       public var onOverwriteParams:Array;
  14.       
  15.       public var timeStart:Number;
  16.       
  17.       public var timeComplete:Number;
  18.       
  19.       public var onStartParams:Array;
  20.       
  21.       public var onUpdateScope:Object;
  22.       
  23.       public var rounded:Boolean;
  24.       
  25.       public var onUpdateParams:Array;
  26.       
  27.       public var properties:Object;
  28.       
  29.       public var onComplete:Function;
  30.       
  31.       public var transitionParams:Object;
  32.       
  33.       public var updatesSkipped:Number;
  34.       
  35.       public var onStart:Function;
  36.       
  37.       public var onOverwriteScope:Object;
  38.       
  39.       public var skipUpdates:Number;
  40.       
  41.       public var onStartScope:Object;
  42.       
  43.       public var scope:Object;
  44.       
  45.       public var isCaller:Boolean;
  46.       
  47.       public var timePaused:Number;
  48.       
  49.       public var transition:Function;
  50.       
  51.       public var onCompleteParams:Array;
  52.       
  53.       public var onError:Function;
  54.       
  55.       public var timesCalled:Number;
  56.       
  57.       public var onErrorScope:Object;
  58.       
  59.       public var onOverwrite:Function;
  60.       
  61.       public var isPaused:Boolean;
  62.       
  63.       public var waitFrames:Boolean;
  64.       
  65.       public var onCompleteScope:Object;
  66.       
  67.       public function TweenListObj(param1:Object, param2:Number, param3:Number, param4:Boolean, param5:Function, param6:Object)
  68.       {
  69.          super();
  70.          this.scope = param1;
  71.          this.timeStart = param2;
  72.          this.timeComplete = param3;
  73.          this.useFrames = param4;
  74.          this.transition = param5;
  75.          this.transitionParams = param6;
  76.          this.properties = new Object();
  77.          this.isPaused = false;
  78.          this.timePaused = undefined;
  79.          this.isCaller = false;
  80.          this.updatesSkipped = 0;
  81.          this.timesCalled = 0;
  82.          this.skipUpdates = 0;
  83.          this.hasStarted = false;
  84.       }
  85.       
  86.       public static function makePropertiesChain(param1:Object) : Object
  87.       {
  88.          var _loc3_:Object = null;
  89.          var _loc4_:Object = null;
  90.          var _loc5_:Object = null;
  91.          var _loc6_:Number = NaN;
  92.          var _loc7_:Number = NaN;
  93.          var _loc8_:Number = NaN;
  94.          var _loc2_:Object = param1.base;
  95.          if(_loc2_)
  96.          {
  97.             _loc3_ = {};
  98.             if(_loc2_ is Array)
  99.             {
  100.                _loc4_ = [];
  101.                _loc8_ = 0;
  102.                while(_loc8_ < _loc2_.length)
  103.                {
  104.                   _loc4_.push(_loc2_[_loc8_]);
  105.                   _loc8_++;
  106.                }
  107.             }
  108.             else
  109.             {
  110.                _loc4_ = [_loc2_];
  111.             }
  112.             _loc4_.push(param1);
  113.             _loc6_ = Number(_loc4_.length);
  114.             _loc7_ = 0;
  115.             while(_loc7_ < _loc6_)
  116.             {
  117.                if(_loc4_[_loc7_]["base"])
  118.                {
  119.                   _loc5_ = AuxFunctions.concatObjects(makePropertiesChain(_loc4_[_loc7_]["base"]),_loc4_[_loc7_]);
  120.                }
  121.                else
  122.                {
  123.                   _loc5_ = _loc4_[_loc7_];
  124.                }
  125.                _loc3_ = AuxFunctions.concatObjects(_loc3_,_loc5_);
  126.                _loc7_++;
  127.             }
  128.             if(_loc3_["base"])
  129.             {
  130.                delete _loc3_["base"];
  131.             }
  132.             return _loc3_;
  133.          }
  134.          return param1;
  135.       }
  136.       
  137.       public function clone(param1:Boolean) : TweenListObj
  138.       {
  139.          var _loc3_:String = null;
  140.          var _loc2_:TweenListObj = new TweenListObj(this.scope,this.timeStart,this.timeComplete,this.useFrames,this.transition,this.transitionParams);
  141.          _loc2_.properties = new Array();
  142.          for(_loc3_ in this.properties)
  143.          {
  144.             _loc2_.properties[_loc3_] = this.properties[_loc3_].clone();
  145.          }
  146.          _loc2_.skipUpdates = this.skipUpdates;
  147.          _loc2_.updatesSkipped = this.updatesSkipped;
  148.          if(!param1)
  149.          {
  150.             _loc2_.onStart = this.onStart;
  151.             _loc2_.onUpdate = this.onUpdate;
  152.             _loc2_.onComplete = this.onComplete;
  153.             _loc2_.onOverwrite = this.onOverwrite;
  154.             _loc2_.onError = this.onError;
  155.             _loc2_.onStartParams = this.onStartParams;
  156.             _loc2_.onUpdateParams = this.onUpdateParams;
  157.             _loc2_.onCompleteParams = this.onCompleteParams;
  158.             _loc2_.onOverwriteParams = this.onOverwriteParams;
  159.             _loc2_.onStartScope = this.onStartScope;
  160.             _loc2_.onUpdateScope = this.onUpdateScope;
  161.             _loc2_.onCompleteScope = this.onCompleteScope;
  162.             _loc2_.onOverwriteScope = this.onOverwriteScope;
  163.             _loc2_.onErrorScope = this.onErrorScope;
  164.          }
  165.          _loc2_.rounded = this.rounded;
  166.          _loc2_.isPaused = this.isPaused;
  167.          _loc2_.timePaused = this.timePaused;
  168.          _loc2_.isCaller = this.isCaller;
  169.          _loc2_.count = this.count;
  170.          _loc2_.timesCalled = this.timesCalled;
  171.          _loc2_.waitFrames = this.waitFrames;
  172.          _loc2_.hasStarted = this.hasStarted;
  173.          return _loc2_;
  174.       }
  175.       
  176.       public function toString() : String
  177.       {
  178.          var _loc3_:String = null;
  179.          var _loc1_:* = "\n[TweenListObj ";
  180.          _loc1_ += "scope:" + String(this.scope);
  181.          _loc1_ += ", properties:";
  182.          var _loc2_:Boolean = true;
  183.          for(_loc3_ in this.properties)
  184.          {
  185.             if(!_loc2_)
  186.             {
  187.                _loc1_ += ",";
  188.             }
  189.             _loc1_ += "[name:" + this.properties[_loc3_].name;
  190.             _loc1_ += ",valueStart:" + this.properties[_loc3_].valueStart;
  191.             _loc1_ += ",valueComplete:" + this.properties[_loc3_].valueComplete;
  192.             _loc1_ += "]";
  193.             _loc2_ = false;
  194.          }
  195.          _loc1_ += ", timeStart:" + String(this.timeStart);
  196.          _loc1_ += ", timeComplete:" + String(this.timeComplete);
  197.          _loc1_ += ", useFrames:" + String(this.useFrames);
  198.          _loc1_ += ", transition:" + String(this.transition);
  199.          _loc1_ += ", transitionParams:" + String(this.transitionParams);
  200.          if(this.skipUpdates)
  201.          {
  202.             _loc1_ += ", skipUpdates:" + String(this.skipUpdates);
  203.          }
  204.          if(this.updatesSkipped)
  205.          {
  206.             _loc1_ += ", updatesSkipped:" + String(this.updatesSkipped);
  207.          }
  208.          if(Boolean(this.onStart))
  209.          {
  210.             _loc1_ += ", onStart:" + String(this.onStart);
  211.          }
  212.          if(Boolean(this.onUpdate))
  213.          {
  214.             _loc1_ += ", onUpdate:" + String(this.onUpdate);
  215.          }
  216.          if(Boolean(this.onComplete))
  217.          {
  218.             _loc1_ += ", onComplete:" + String(this.onComplete);
  219.          }
  220.          if(Boolean(this.onOverwrite))
  221.          {
  222.             _loc1_ += ", onOverwrite:" + String(this.onOverwrite);
  223.          }
  224.          if(Boolean(this.onError))
  225.          {
  226.             _loc1_ += ", onError:" + String(this.onError);
  227.          }
  228.          if(this.onStartParams)
  229.          {
  230.             _loc1_ += ", onStartParams:" + String(this.onStartParams);
  231.          }
  232.          if(this.onUpdateParams)
  233.          {
  234.             _loc1_ += ", onUpdateParams:" + String(this.onUpdateParams);
  235.          }
  236.          if(this.onCompleteParams)
  237.          {
  238.             _loc1_ += ", onCompleteParams:" + String(this.onCompleteParams);
  239.          }
  240.          if(this.onOverwriteParams)
  241.          {
  242.             _loc1_ += ", onOverwriteParams:" + String(this.onOverwriteParams);
  243.          }
  244.          if(this.onStartScope)
  245.          {
  246.             _loc1_ += ", onStartScope:" + String(this.onStartScope);
  247.          }
  248.          if(this.onUpdateScope)
  249.          {
  250.             _loc1_ += ", onUpdateScope:" + String(this.onUpdateScope);
  251.          }
  252.          if(this.onCompleteScope)
  253.          {
  254.             _loc1_ += ", onCompleteScope:" + String(this.onCompleteScope);
  255.          }
  256.          if(this.onOverwriteScope)
  257.          {
  258.             _loc1_ += ", onOverwriteScope:" + String(this.onOverwriteScope);
  259.          }
  260.          if(this.onErrorScope)
  261.          {
  262.             _loc1_ += ", onErrorScope:" + String(this.onErrorScope);
  263.          }
  264.          if(this.rounded)
  265.          {
  266.             _loc1_ += ", rounded:" + String(this.rounded);
  267.          }
  268.          if(this.isPaused)
  269.          {
  270.             _loc1_ += ", isPaused:" + String(this.isPaused);
  271.          }
  272.          if(this.timePaused)
  273.          {
  274.             _loc1_ += ", timePaused:" + String(this.timePaused);
  275.          }
  276.          if(this.isCaller)
  277.          {
  278.             _loc1_ += ", isCaller:" + String(this.isCaller);
  279.          }
  280.          if(this.count)
  281.          {
  282.             _loc1_ += ", count:" + String(this.count);
  283.          }
  284.          if(this.timesCalled)
  285.          {
  286.             _loc1_ += ", timesCalled:" + String(this.timesCalled);
  287.          }
  288.          if(this.waitFrames)
  289.          {
  290.             _loc1_ += ", waitFrames:" + String(this.waitFrames);
  291.          }
  292.          if(this.hasStarted)
  293.          {
  294.             _loc1_ += ", hasStarted:" + String(this.hasStarted);
  295.          }
  296.          return _loc1_ + "]\n";
  297.       }
  298.    }
  299. }
  300.  
  301.