This content has been marked as final. Show 3 replies
When you use tween.continueTo() the onMotionFinished event will fire again. And using tween.stop() will immediately stop the tween without waiting for the tween.continueTo();
Without reading the posted code extensively, I think you want something like this:
var atween:Tween=new Tween(text1_txt,"_alpha",null,0,100,2.5,true);
var btween:Tween=new Tween(text2_txt,"_alpha",null,0,100,2.5,true);
var ctween:Tween=new Tween(text1_txt,"_alpha",null,100,0,2.5,true);
Oh, and you can of course use easing on the tweens, I just use null to save typing.
Thank you for your reply, and I did learn something new! Specifically that when I use .continueTo() it removes the .onMotionFinished() true setting. That seems obvious now - I was stuck thinking that the continue was not a new tween motion but part of the first one and the flag would not change. Thank you very much. If you have any ideas on what I could have done (de-bug wise) to discover this it would be greatly appreciated. When I tried to trace the property of the tween I got an error saying that it changed (or something like that - it was very late last night :-)
Debug-wise. Well, when working with event listeners the trace command can solve things quickly. If you used a trace in the onMotionFinished handler you would have seen immediately that the event fired twice.