You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/06/24 11:24:19 UTC

git commit: [flex-sdk] [refs/heads/develop] - FLEX-33596 When stopping a tween set the id to -1 so that other tweens are not accidentally stopped on future calls.

Updated Branches:
  refs/heads/develop c1df40b0a -> f67fb1563


FLEX-33596 When stopping a tween set the id to -1 so that other tweens are not accidentally stopped on future calls.


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

Branch: refs/heads/develop
Commit: f67fb156334aa7ac1f3f899066dbe05d6bddb044
Parents: c1df40b
Author: Justin Mclean <jm...@apache.org>
Authored: Mon Jun 24 19:16:05 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Mon Jun 24 19:16:05 2013 +1000

----------------------------------------------------------------------
 frameworks/projects/framework/src/mx/effects/Tween.as | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f67fb156/frameworks/projects/framework/src/mx/effects/Tween.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/effects/Tween.as b/frameworks/projects/framework/src/mx/effects/Tween.as
index 81b6ac7..bc226d6 100644
--- a/frameworks/projects/framework/src/mx/effects/Tween.as
+++ b/frameworks/projects/framework/src/mx/effects/Tween.as
@@ -176,6 +176,7 @@ public class Tween extends EventDispatcher
     mx_internal static function removeTween(tween:Tween):void
     {
         removeTweenAt(tween.id);
+		tween.id = -1;
     }
 
     /**
@@ -575,8 +576,10 @@ public class Tween extends EventDispatcher
 
         // If tween has been added, id >= 0
         // but if duration = 0, this might not be the case.
-        if (id >= 0)
+        if (id >= 0) {
             Tween.removeTweenAt(id);
+			id = -1;
+		}
     }
 
     /**
@@ -759,8 +762,10 @@ public class Tween extends EventDispatcher
      */
     public function stop():void
     {
-        if (id >= 0)
+        if (id >= 0) {
             Tween.removeTweenAt(id);
+			id = -1;
+		}
     }
     
     /**