flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Don't let event listeners stack up.
Date Tue, 31 Jan 2017 07:18:59 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 6ef4bedaf -> fe3fc18cd


Don't let event listeners stack up.


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

Branch: refs/heads/develop
Commit: fe3fc18cdb65c67f37e0d397b7476d7dffd4d11a
Parents: 6ef4bed
Author: yishayw <yishayjobs@hotmail.com>
Authored: Tue Jan 31 09:18:47 2017 +0200
Committer: yishayw <yishayjobs@hotmail.com>
Committed: Tue Jan 31 09:18:47 2017 +0200

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/effects/beads/ParallelPlayBead.as    | 2 ++
 .../main/flex/org/apache/flex/effects/beads/ParallelReverseBead.as | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fe3fc18c/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelPlayBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelPlayBead.as
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelPlayBead.as
index 9b2768b..94d1089 100644
--- a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelPlayBead.as
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelPlayBead.as
@@ -25,6 +25,7 @@ package org.apache.flex.effects.beads
 	import org.apache.flex.effects.ICompoundEffect;
 	import org.apache.flex.effects.IEffect;
 	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
 	
 	public class ParallelPlayBead implements IBead
 	{
@@ -62,6 +63,7 @@ package org.apache.flex.effects.beads
 		
 		private function effectEndHandler(event:Event):void
 		{
+			(event.target as IEventDispatcher).removeEventListener(Effect.EFFECT_END, effectEndHandler);
 			current++;
 			if (current >= host.numChildren)
 				host.dispatchEvent(new Event(Effect.EFFECT_END));

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fe3fc18c/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelReverseBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelReverseBead.as
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelReverseBead.as
index 505230e..73ec2fe 100644
--- a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelReverseBead.as
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/ParallelReverseBead.as
@@ -25,6 +25,7 @@ package org.apache.flex.effects.beads
 	import org.apache.flex.effects.ICompoundEffect;
 	import org.apache.flex.effects.IEffect;
 	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
 	
 	public class ParallelReverseBead implements IBead
 	{
@@ -62,6 +63,7 @@ package org.apache.flex.effects.beads
 		
 		private function effectEndHandler(event:Event):void
 		{
+			(event.target as IEventDispatcher).removeEventListener(Effect.EFFECT_END, effectEndHandler);
 			current++;
 			if (current >= host.numChildren)
 				host.dispatchEvent(new Event(Effect.EFFECT_END));


Mime
View raw message