flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-33596) Tween.stop can stop some other Tween object after Tween has ended
Date Mon, 24 Jun 2013 09:14:20 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13691812#comment-13691812
] 

Justin Mclean commented on FLEX-33596:
--------------------------------------

Here's a slightly better example to show the issue:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init(event)">
	<mx:Script>
		<![CDATA[
			import mx.effects.Tween;
			import mx.events.FlexEvent;
			
			private var tweenA:Tween;
			private var tweenB:Tween;
			
			protected function init(event:FlexEvent):void
			{
				tweenA = new Tween({onTweenUpdate:onTweenUpdateA, onTweenEnd:onTweenEndA}, 1, 100, 1000);
				tweenB = new Tween({onTweenUpdate:onTweenUpdateB, onTweenEnd:onTweenEndB}, 1, 100, 5000);
				
				var timer:Timer = new Timer(1500, 1);
				timer.addEventListener(TimerEvent.TIMER_COMPLETE, stopTween);
				timer.start();
			}
			
			private function stopTween(evt:TimerEvent):void
			{
				tweenA.stop(); // not this is called after the tween duration has expired
				tweenA = null;
			}
			
			private function onTweenUpdateA(value:Object):void
			{
				trace("onTweenUpdate A: " + value);
			}
			
			private function onTweenUpdateB(value:Object):void
			{
				trace("onTweenUpdate B: " + value);
			}
			
			private function onTweenEndA(value:Object):void
			{
				trace("onTweenEnd A: " + value);
			}
			
			private function onTweenEndB(value:Object):void
			{
				trace("onTweenEnd B: " + value);
			}
		]]>
	</mx:Script>
	
</mx:Application>


                
> Tween.stop can stop some other Tween object after Tween has ended
> -----------------------------------------------------------------
>
>                 Key: FLEX-33596
>                 URL: https://issues.apache.org/jira/browse/FLEX-33596
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Effects
>    Affects Versions: Adobe Flex SDK 3.5 (Release), Adobe Flex SDK 4.6 (Release)
>            Reporter: Vikas Saurabh
>         Attachments: TestTween.mxml
>
>
> Calling Tween.stop (or endTween) can end some other un-related Tween object.
> The issue is essentially that Tween object keep an 'id' to refer to index into static
activeTweens array. This field isn't assigned an invalid value (NaN/-1???) on removeTween.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message