Repository: flex-asjs
Updated Branches:
  refs/heads/develop 2cc5ca1a7 -> ee4fa779d


Parallel is now derived from CompoundEffect


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ee4fa779
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ee4fa779
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ee4fa779

Branch: refs/heads/develop
Commit: ee4fa779d504e7e471a28b133a2a2ad94f5c9891
Parents: 2cc5ca1
Author: yishayw <[email protected]>
Authored: Sun Jan 29 17:15:05 2017 +0200
Committer: yishayw <[email protected]>
Committed: Sun Jan 29 17:15:05 2017 +0200

----------------------------------------------------------------------
 .../flex/org/apache/flex/effects/Parallel.as    | 153 ++++---------------
 1 file changed, 29 insertions(+), 124 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ee4fa779/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as
index ea68f2d..57e63d3 100644
--- 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as
+++ 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as
@@ -19,134 +19,39 @@
 
 package org.apache.flex.effects
 {
-
-import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IUIBase;
-import org.apache.flex.events.Event;
-
-[DefaultProperty("children")]
-
-/**
- *  The Parallel effect animates set of effects at the
- *  same time.
- * 
- *  @langversion 3.0
- *  @playerversion Flash 10.2
- *  @playerversion AIR 2.6
- *  @productversion FlexJS 0.0
- */
-public class Parallel extends Effect implements IDocument
-{
-
-    
//--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    
//--------------------------------------------------------------------------
-
-    /**
-     *  Constructor.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function Parallel()
-    {
-        super();
-    }
-
-    
//--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    
//--------------------------------------------------------------------------
-
-       /**
-        *  @private
-        *  The document.
-        */
-       private var document:Object;
-
-       /**
-        *  @private
-        *  The target.
-        */
-       private var target:IUIBase;
-    
-       /**
-        *  The children.
-        */
-       public var children:Array;
+       import org.apache.flex.effects.beads.ParallelPlayBead;
        
        
-    
-    
//--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    
//--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override public function set duration(value:Number):void
-    {
-        var n:int = children ? children.length : 0;
-        for (var i:int = 0; i < n; i++)
-        {
-            children[i].duration = value;
-        }
-        super.duration = value;
-    }
-    
-    
//--------------------------------------------------------------------------
-    //
-    //  Methods
-    //
-    
//--------------------------------------------------------------------------
-
-       public function setDocument(document:Object, id:String = null):void
-       {
-               this.document = document;       
-       }
-       
-    public function addChild(child:IEffect):void
-    {
-        if (!children)
-            children = [ child ];
-        else
-            children.push(child);    
-    }
-    
        /**
-        *  @private
+        *  The Parallel effect animates set of effects at the
+        *  same time.
+        * 
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
         */
-       override public function play():void
+       public class Parallel extends CompoundEffect
        {
-        dispatchEvent(new Event(Effect.EFFECT_START));
-        current = 0;
-        var n:int = children.length;
-        for (var i:int = 0; i < n; i++)          
-            playChildEffect(i);
+               
+               
//--------------------------------------------------------------------------
+               //
+               //  Constructor
+               //
+               
//--------------------------------------------------------------------------
+               
+               /**
+                *  Constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 9
+                *  @playerversion AIR 1.1
+                *  @productversion Flex 3
+                */
+               public function Parallel()
+               {
+                       super();
+                       beads = [new ParallelPlayBead()];
+               }
        }
-    
-    private var current:int;
-    
-    private function playChildEffect(index:int):void
-    {
-        var child:IEffect = children[index];
-        child.addEventListener(Effect.EFFECT_END, effectEndHandler);
-        child.play();   
-    }
-    
-    private function effectEndHandler(event:Event):void
-    {
-        current++;
-        if (current >= children.length)
-            dispatchEvent(new Event(Effect.EFFECT_END));
-    }
-}
-
 }

Reply via email to