home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2012 April / ME_04_2012.iso / Video-Tutorial / iPhoto / media / player.swf / scripts / mx / effects / Parallel.as < prev    next >
Encoding:
Text File  |  2011-11-11  |  1.2 KB  |  44 lines

  1. package mx.effects
  2. {
  3.    import mx.core.mx_internal;
  4.    import mx.effects.effectClasses.ParallelInstance;
  5.    
  6.    use namespace mx_internal;
  7.    
  8.    public class Parallel extends CompositeEffect
  9.    {
  10.       mx_internal static const VERSION:String = "4.5.0.20967";
  11.       
  12.       public function Parallel(param1:Object = null)
  13.       {
  14.          super(param1);
  15.          instanceClass = ParallelInstance;
  16.       }
  17.       
  18.       override public function get compositeDuration() : Number
  19.       {
  20.          var _loc3_:Number = NaN;
  21.          var _loc4_:Effect = null;
  22.          var _loc1_:Number = 0;
  23.          var _loc2_:int = 0;
  24.          while(_loc2_ < children.length)
  25.          {
  26.             _loc4_ = Effect(children[_loc2_]);
  27.             if(_loc4_ is CompositeEffect)
  28.             {
  29.                _loc3_ = CompositeEffect(_loc4_).compositeDuration;
  30.             }
  31.             else
  32.             {
  33.                _loc3_ = _loc4_.duration;
  34.             }
  35.             _loc3_ = _loc3_ * _loc4_.repeatCount + _loc4_.repeatDelay * (_loc4_.repeatCount - 1) + _loc4_.startDelay;
  36.             _loc1_ = Math.max(_loc1_,_loc3_);
  37.             _loc2_++;
  38.          }
  39.          return _loc1_;
  40.       }
  41.    }
  42. }
  43.  
  44.