flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [11/51] [abbrv] git commit: [flex-asjs] [refs/heads/mavenfolders] - move effects folders
Date Wed, 03 Feb 2016 17:41:14 GMT
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c99bd398/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Tween.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Tween.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Tween.as
new file mode 100644
index 0000000..3b9415e
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Tween.as
@@ -0,0 +1,665 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IEffectTimer;
+import org.apache.flex.core.ValuesManager;
+import org.apache.flex.events.ValueEvent;
+import org.apache.flex.events.Event;
+import org.apache.flex.events.EventDispatcher;
+
+/**
+ *  Tween is the underlying animation class for the effects in FlexJS.
+ * 
+ *  The Tween class defines a tween, a property animation performed
+ *  on a target object over a period of time.
+ *  That animation can be a change in position, such as performed by
+ *  the Move effect; a change in size, as performed by the Resize or
+ *  Zoom effects; a change in visibility, as performed by the Fade or
+ *  Dissolve effects; or other types of animations.
+ *
+ *  <p>A Tween instance accepts the <code>startValue</code>,
+ *  <code>endValue</code>, and <code>duration</code> properties,

+ *  and an optional easing function to define the animation.</p> 
+ *
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10.2
+ *  @playerversion AIR 2.6
+ *  @productversion FlexJS 0.0
+ */
+public class Tween extends Effect
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 *  The <code>Tween.TWEEN_END</code> constant defines the value of the 
+	 *  event object's <code>type</code> property for a <code>tweenEnd</code>
event. 
+	 *
+	 *  <p>The properties of the event object have the following values:</p>
+	 *  <table class="innertable">
+	 *     <tr><th>Property</th><th>Value</th></tr>
+	 *     <tr><td><code>bubbles</code></td><td>false</td></tr>
+	 *     <tr><td><code>cancelable</code></td><td>false</td></tr>
+	 *     <tr><td><code>currentTarget</code></td><td>The
Object that defines the 
+	 *       event listener that handles the event. For example, if you use 
+	 *       <code>myButton.addEventListener()</code> to register an event listener,

+	 *       myButton is the value of the <code>currentTarget</code>. </td></tr>
+	 *     <tr><td><code>target</code></td><td>The Object
that dispatched the event; 
+	 *       it is not always the Object listening for the event. 
+	 *       Use the <code>currentTarget</code> property to always access the 
+	 *       Object listening for the event.</td></tr>
+	 *     <tr><td><code>value</code></td><td>The value
passed to the 
+	 *       <code>onTweenEnd()</code> method.</td></tr>
+	 *  </table>
+	 *
+	 *  @see org.apache.flex.effects.Effect
+	 *  @see org.apache.flex.effects.TweenEffect 
+	 *  @see org.apache.flex.events.EffectEvent
+	 *  @eventType tweenEnd 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const TWEEN_END:String = "tweenEnd";
+	
+	/**
+	 *  The <code>Tween.TWEEN_START</code> constant defines the value of the 
+	 *  event object's <code>type</code> property for a <code>tweenStart</code>
event. 
+	 *
+	 *  <p>The properties of the event object have the following values:</p>
+	 *  <table class="innertable">
+	 *     <tr><th>Property</th><th>Value</th></tr>
+	 *     <tr><td><code>bubbles</code></td><td>false</td></tr>
+	 *     <tr><td><code>cancelable</code></td><td>false</td></tr>
+	 *     <tr><td><code>currentTarget</code></td><td>The
Object that defines the 
+	 *       event listener that handles the event. For example, if you use 
+	 *       <code>myButton.addEventListener()</code> to register an event listener,

+	 *       myButton is the value of the <code>currentTarget</code>. </td></tr>
+	 *     <tr><td><code>target</code></td><td>The Object
that dispatched the event; 
+	 *       it is not always the Object listening for the event. 
+	 *       Use the <code>currentTarget</code> property to always access the 
+	 *       Object listening for the event.</td></tr>
+	 *     <tr><td><code>value</code></td><td>The value
passed to the 
+	 *       <code>onTweenUpdate()</code> method.</td></tr>
+	 *  </table>
+	 *
+	 *  @eventType tweenStart
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const TWEEN_START:String = "tweenStart";
+	
+	/**
+	 *  The <code>Tween.TWEEN_UPDATE</code> constant defines the value of the 
+	 *  event object's <code>type</code> property for a <code>tweenUpdate</code>
event. 
+	 *
+	 *  <p>The properties of the event object have the following values:</p>
+	 *  <table class="innertable">
+	 *     <tr><th>Property</th><th>Value</th></tr>
+	 *     <tr><td><code>bubbles</code></td><td>false</td></tr>
+	 *     <tr><td><code>cancelable</code></td><td>false</td></tr>
+	 *     <tr><td><code>currentTarget</code></td><td>The
Object that defines the 
+	 *       event listener that handles the event. For example, if you use 
+	 *       <code>myButton.addEventListener()</code> to register an event listener,

+	 *       myButton is the value of the <code>currentTarget</code>. </td></tr>
+	 *     <tr><td><code>target</code></td><td>The Object
that dispatched the event; 
+	 *       it is not always the Object listening for the event. 
+	 *       Use the <code>currentTarget</code> property to always access the 
+	 *       Object listening for the event.</td></tr>
+	 *     <tr><td><code>value</code></td><td>The value
passed to the 
+	 *       <code>onTweenUpdate()</code> method.</td></tr>
+	 *  </table>
+	 *
+	 *  @eventType tweenUpdate
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public static const TWEEN_UPDATE:String = "tweenUpdate";
+	
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The list of tweens that are currently playing.
+     */
+    public static var activeTweens:Object = {};
+    
+	private static var timer:IEffectTimer;
+	
+	private static var currentID:int = 1;
+        
+    //--------------------------------------------------------------------------
+    //
+    //  Class properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  currentTime
+    //----------------------------------
+
+    /**
+     *  Used by effects to get the current effect time tick.
+     */
+    public static var currentTime:Number = NaN;
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static function addTween(tween:Tween):void
+    {
+        tween.id = currentID++;
+        
+        activeTweens[tween.id] = tween;
+        
+        if (!timer)
+        {
+            timer = ValuesManager.valuesImpl.newInstance(tween, "iEffectTimer") as IEffectTimer;
+            timer.addEventListener("update", updateHandler);
+		}
+        currentTime = timer.start();
+		
+        tween.startTime = tween.previousUpdateTime = currentTime;
+    }
+
+
+    /**
+     *  @private
+     */
+    private static function removeTween(tween:Tween):void
+    {
+		delete activeTweens[tween.id];
+		if (activeTweens.length == 0)
+			timer.stop();
+    }
+
+    /**
+     *  @private
+     */
+    private static function updateHandler(event:ValueEvent):void
+    {
+        var oldTime:Number = currentTime;
+		
+		// the IEFfectTimer can control the current time
+		// if it wants.  This can be useful for automated
+		// testing.
+        currentTime = event.value as Number;
+
+        for (var id:String in activeTweens)
+        {
+            var tween:Tween = Tween(activeTweens[id]);
+            tween.update();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function Tween()
+    {        
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var id:int = -1;
+    
+    /**
+     *  @private
+     */
+    private var _doSeek:Boolean = false;
+    
+    /**
+     *  @private
+     */
+    private var _isPlaying:Boolean = true;
+    
+    /**
+     *  @private
+     */
+    private var _doReverse:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var startTime:Number;
+    
+    /**
+     *  @private
+     */
+    private var previousUpdateTime:Number;
+    
+    /**
+     *  @private
+     */
+    private var userEquation:Function;
+        
+    /**
+     *  Final value of the animation.
+     */
+    public var endValue:Number;
+    
+    /**
+     *  Initial value of the animation.
+     */
+    public var startValue:Number;
+    
+    /**
+     *  @private
+     */
+    private var started:Boolean = false;
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+    
+    //----------------------------------
+    //  listener
+    //----------------------------------
+
+    /**
+     *  Object that is notified at each interval of the animation. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var listener:Object;
+    
+    //----------------------------------
+    //  playheadTime
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the playheadTime property.
+     */
+    private var _playheadTime:Number = 0;
+    
+    /**
+     *  @private
+     *  The current millisecond position in the tween.
+     *  This value is between 0 and duration. 
+     *  Use the seek() method to change the position of the tween.
+     */
+    private function get playheadTime():Number
+    {
+        return _playheadTime;
+    }
+    
+    //----------------------------------
+    //  playReversed
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the playReversed property.
+     */
+    private var _invertValues:Boolean = false;
+    
+    /**
+     *  @private
+     *  Starts playing reversed from start of tween.
+     *  Setting this property to <code>true</code>
+     *  inverts the values returned by the tween.
+     *  Using reverse inverts the values and only plays
+     *  for as much time that has already elapsed. 
+     */
+    private function get playReversed():Boolean
+    {
+        return _invertValues;
+    }
+
+    /**
+     *  @private 
+     */
+    private function set playReversed(value:Boolean):void
+    {
+        _invertValues = value;
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+
+    /**
+     *  Sets the easing function for the animation.
+     *  The easing function is used to interpolate between
+     *  the <code>startValue</code> value and the <code>endValue</code>.
+     *  A trivial easing function does linear interpolation,
+     *  but more sophisticated easing functions create the illusion of
+     *  acceleration and deceleration, which makes the animation seem
+     *  more natural.
+     *
+     *  <p>If no easing function is specified, an easing function based
+     *  on the <code>Math.sin()</code> method is used.</p>
+     *
+     *  <p>The easing function follows the function signature
+     *  popularized by Robert Penner.
+     *  The function accepts four arguments.
+     *  The first argument is the "current time",
+     *  where the animation start time is 0.
+     *  The second argument is a the initial value
+     *  at the beginning of the animation (a Number).
+     *  The third argument is the ending value
+     *  minus the initial value.
+     *  The fourth argument is the duration of the animation.
+     *  The return value is the interpolated value for the current time
+     *  (usually a value between the initial value and the ending value).</p>
+     *
+     *  <p>Flex includes a set of easing functions
+     *  in the mx.effects.easing package.</p>
+     *
+     *  @param easingFunction Function that implements the easing equation. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set easingFunction(value:Function):void
+    {   
+        userEquation = value;
+    }   
+    
+    /**
+     *  Interrupt the tween, jump immediately to the end of the tween, 
+     *  and invoke the <code>onTweenEnd()</code> callback function.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function endTween():void
+    {
+        var event:ValueEvent = new ValueEvent(Tween.TWEEN_END);
+        var value:Object = getCurrentValue(duration);
+
+        event.value = value;
+        
+        dispatchEvent(event);
+        
+        listener.onTweenEnd(value);
+
+        dispatchEvent(new Event(Effect.EFFECT_END));
+        
+        // If tween has been added, id >= 0
+        // but if duration = 0, this might not be the case.
+        if (id >= 0) {
+            Tween.removeTween(this);
+			id = -1;
+		}
+    }
+
+    /**
+     *  @private
+     *  Returns true if the tween has ended.
+     */
+    protected function update():Boolean
+    {
+        var tweenEnded:Boolean = false;
+        
+        // If user specified a minimum frames per second, we can't guarantee
+        // that we'll be called often enough to satisfy that request.
+        // However, we can avoid skipping over part of the animation.
+        // If this callback arrives too late, adjust the animation startTime,
+        // so that the animation starts up 'maxDelay' milliseconds
+        // after its last update.
+        /*
+        if (intervalTime - previousUpdateTime > maxDelay)
+        {
+            startTime += intervalTime - previousUpdateTime - maxDelay;
+        }
+        */
+        previousUpdateTime = currentTime;
+        
+        if (_isPlaying || _doSeek)
+        {
+            
+            var elapsedTime:Number = currentTime - startTime;
+            _playheadTime = elapsedTime;
+            
+            var currentValue:Object =
+                getCurrentValue(elapsedTime);
+
+            if (elapsedTime >= duration && !_doSeek)
+            {
+                endTween();
+                tweenEnded = true;
+            }
+            else
+            {
+                if (!started)
+                {
+                    var startEvent:ValueEvent = new ValueEvent(Tween.TWEEN_START);
+                    dispatchEvent(startEvent);
+                    started = true;
+                }
+            
+                var event:ValueEvent =
+                    new ValueEvent(Tween.TWEEN_UPDATE);
+                event.value = currentValue;
+                
+                dispatchEvent(event);
+                
+                listener.onTweenUpdate(currentValue);
+            }
+            
+            _doSeek = false;
+        }
+        return tweenEnded;
+    }
+
+    /**
+     *  @private
+     */
+    protected function getCurrentValue(currentTime:Number):Object
+    {
+        if (duration == 0)
+        {
+            return endValue;
+        }
+    
+        if (_invertValues)
+            currentTime = duration - currentTime;
+    
+        return userEquation(currentTime, startValue,
+                                endValue - startValue,
+                                duration);
+    }
+    
+    /**
+     *  @private
+     */
+    private function defaultEasingFunction(t:Number, b:Number,
+                                           c:Number, d:Number):Number
+    {
+        return c / 2 * (Math.sin(Math.PI * (t / d - 0.5)) + 1) + b;
+    }
+    
+    /**
+     *  Advances the tween effect to the specified position. 
+     *
+     *  @param playheadTime The position, in milliseconds, between 0
+     *  and the value of the <code>duration</code> property.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */ 
+    public function seek(playheadTime:Number):void
+    {
+        // Set value between 0 and duration
+        //playheadTime = Math.min(Math.max(playheadTime, 0), duration);
+        
+        var clockTime:Number = currentTime;
+        
+        // Reset the previous update time
+        previousUpdateTime = clockTime;
+        
+        // Reset the start time
+        startTime = clockTime - playheadTime;
+        
+        _doSeek = true;
+        
+        update();
+    }
+    
+    /**
+     *  Plays the effect in reverse,
+     *  starting from the current position of the effect.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function reverse():void
+    {
+        if (_isPlaying)
+        {
+            _doReverse = false;
+            seek(duration - _playheadTime);
+            _invertValues = !_invertValues;
+        }
+        else
+        {
+            _doReverse = !_doReverse;
+        }
+    }
+    
+    /**
+     *  Pauses the effect until you call the <code>resume()</code> method.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function pause():void
+    {
+        _isPlaying = false;
+    }
+
+	/**
+	 *  Stops the tween, ending it without dispatching an event or calling
+	 *  the Tween's endFunction or <code>onTweenEnd()</code>. 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+    override public function play():void
+	{
+		if (userEquation == null)
+			userEquation = defaultEasingFunction;
+		Tween.addTween(this);
+	}
+	
+    /**
+     *  Stops the tween, ending it without dispatching an event or calling
+     *  the Tween's endFunction or <code>onTweenEnd()</code>. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function stop():void
+    {
+        if (id >= 0) {
+            Tween.removeTween(this);
+			id = -1;
+		}
+    }
+    
+    /**
+     *  Resumes the effect after it has been paused 
+     *  by a call to the <code>pause()</code> method. 
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function resume():void
+    {
+        _isPlaying = true;
+        
+        startTime = currentTime - _playheadTime;
+        if (_doReverse)
+        {
+            reverse();
+            _doReverse = false;
+        }
+    }   
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c99bd398/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Wipe.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Wipe.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Wipe.as
new file mode 100644
index 0000000..fe83935
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Wipe.as
@@ -0,0 +1,156 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+import org.apache.flex.geom.Rectangle;
+
+/**
+ *  The Fade effect animates a UI component's alpha or opacity.
+ * 
+ *  @langversion 3.0
+ *  @playerversion Flash 10.2
+ *  @playerversion AIR 2.6
+ *  @productversion FlexJS 0.0
+ */
+public class Wipe extends Tween implements IDocument
+{
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param target Object ID or reference to an object that will
+	 *  have its x and/or y property animated.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function Wipe(target:IUIBase = null)
+    {
+        super();
+
+		this.actualTarget = target;
+        
+		listener = this;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  The document.
+	 */
+	private var document:Object;
+
+	/**
+	 *  @private
+	 *  The target.
+	 */
+	private var actualTarget:IUIBase;
+    
+    /**
+     *  The target as the String id 
+     *  of a widget in an MXML Document.
+     */
+    public var target:String;
+    
+	/**
+	 *  The direction of the Wipe.  "up" means the top will be the last
+     *  part to disappear. "down" will reveal from the top down.
+     */
+    public var direction:String;
+    	
+    private var wiper:PlatformWiper = new PlatformWiper();	
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+	public function setDocument(document:Object, id:String = null):void
+	{
+		this.document = document;	
+	}
+	
+	/**
+	 *  @private
+	 */
+	override public function play():void
+	{
+        if (target != null)
+            actualTarget = document[target];
+        
+		
+        wiper.target = actualTarget;
+        if (direction == "up")
+        {
+            startValue = actualTarget.height;
+            endValue = 0;
+        }
+        else
+        {
+            startValue = 0;
+            endValue = actualTarget.height;
+            // WipeDown makes something appear
+            actualTarget.visible = true;
+            wiper.visibleRect = new Rectangle(0, 0, actualTarget.width, 0);
+        }
+        
+		super.play();
+	}
+
+	public function onTweenUpdate(value:Number):void
+	{
+        trace(actualTarget, value);
+		wiper.visibleRect = new Rectangle(0, 0, actualTarget.width, value);
+	}
+	
+	public function onTweenEnd(value:Number):void
+	{
+        // WipeUp makes something disappear
+        if (direction == "up")
+            actualTarget.visible = false;
+        wiper.target = null;
+	}
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c99bd398/frameworks/projects/Effects/src/main/flex/org/apache/flex/states/Transition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/states/Transition.as
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/states/Transition.as
new file mode 100644
index 0000000..3469417
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/states/Transition.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.states
+{
+	
+    [DefaultProperty("effects")]
+    
+	/**
+	 *  The Transition class holds information describing what to do when
+     *  changing from one state to another.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Transition
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Transition()
+		{
+			super();
+		}
+		
+		/**
+		 *  The state or states from which the view is leaving.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public var fromState:String;
+        
+        /**
+         *  The state or states to which the view is going.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public var toState:String;
+		
+		
+        /**
+         *  The list of effects to play
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public var effects:Array;
+        
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c99bd398/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/basic-manifest.xml b/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..64a6c26
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+    <component id="Fade" class="org.apache.flex.effects.Fade"/>
+    <component id="Move" class="org.apache.flex.effects.Move"/>
+    <component id="Resize" class="org.apache.flex.effects.Resize"/>
+    <component id="Wipe" class="org.apache.flex.effects.Wipe"/>
+    <component id="Sequence" class="org.apache.flex.effects.Sequence"/>
+    <component id="Parallel" class="org.apache.flex.effects.Parallel"/>
+    <component id="Transition" class="org.apache.flex.states.Transition" />
+
+</componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c99bd398/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..8f64d55
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,79 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path>
+            <!-- asjscompc won't 'link' these classes in, but will list their requires
+             if these swcs are on the external-library-path then their requires
+             will not be listed -->
+            <path-element>../../externs/Core.swc</path-element>
+        </library-path>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+        </source-path>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+    </include-file>
+
+    <include-classes>
+        <class>EffectsClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c99bd398/frameworks/projects/Effects/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/compile-config.xml b/frameworks/projects/Effects/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..a07b904
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/resources/compile-config.xml
@@ -0,0 +1,78 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../libs/Core.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/basic</uri>
+                <manifest>basic-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>as/src</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>js/out/*</name>
+        <path>js/out/*</path>
+    </include-file>
+
+    <include-classes>
+        <class>EffectsClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/basic</uri>
+    </include-namespaces>  
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>


Mime
View raw message