You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2020/10/06 20:35:53 UTC

[royale-asjs] 01/03: Emulate effect in Transition

This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit fc3e69a13dfdf1711594a98642cf1eb7a129d640
Author: Yishay Weiss <yi...@yell.com>
AuthorDate: Tue Oct 6 18:19:03 2020 +0100

    Emulate effect in Transition
---
 .../MXRoyale/src/main/royale/mx/states/Transition.as     | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/states/Transition.as b/frameworks/projects/MXRoyale/src/main/royale/mx/states/Transition.as
index 5766ac3..358614b 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/states/Transition.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/states/Transition.as
@@ -20,7 +20,7 @@
 package mx.states
 {
 
-//import mx.effects.IEffect;
+import mx.effects.IEffect;
 import org.apache.royale.states.Transition;
 
 [DefaultProperty("effect")]
@@ -132,7 +132,19 @@ public class Transition extends org.apache.royale.states.Transition
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    //public var effect:IEffect;
+     public function set effect(value:IEffect):void
+     {
+	if (!effects)
+	{
+		effects = [];
+	}
+	effects[0] = value;
+     }
+
+     public function get effect():IEffect
+     {
+	return effects && effects.length > 0 ? effects[0] as IEffect : null;
+     }
 
     //----------------------------------
     //  fromState