zeh / tweener

Automatically exported from code.google.com/p/tweener
3 stars 4 forks source link

Multiple objects tween enchancements #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Basically, so that it will not get lost in the ML.

http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/2008-
May/000914.html (an option to suppress all but one handlers)

http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/2008-
May/000916.html (support for multiple values for multiple objects)

Original issue reported on code.google.com by makc.the...@gmail.com on 27 May 2008 at 1:28

GoogleCodeExporter commented 9 years ago
When I use something like this:

Tweener.addTween([tituMain, contCV, patitasMC], {_alpha:100, time:tiempoTween,
transition:tipoTween, onComplete:someFunction});

The someFunction() is executed three times... Shouldn't be executed only one 
time?

Thanks.

Mario Mey
mariomey@gmail.com

Original comment by mario...@gmail.com on 2 Nov 2009 at 5:12

GoogleCodeExporter commented 9 years ago
well, as you see this is not fixed after a year and a half, also with 
http://zehfernando.com/2009/tweener-4-years-later-a-post-mortem/ in mind, I 
don't 
think it ever will be.

Original comment by makc.the...@gmail.com on 4 Nov 2009 at 8:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
@mariomey, makc.the.great: Just to clarify (not sure why I even found this 
today), there's no "fix", it's how it was designed to work. It's actually 
creating 3 different tweens, instead of one tween that is applied to 3 
different target objects. Therefore the callbacks are called once for every 
object.

Whether it's the best way or not is debatable, but changing the way it is now 
would require a re-thinking of the whole structure when doing tweens on 
multiple objects, and breaking functionality as it is now.

Original comment by zisfor...@gmail.com on 28 May 2012 at 4:06

GoogleCodeExporter commented 9 years ago
well, the fix could be as easy as creating 3 + 1 tweens, where 4th tween is 
like Tweener.addTween({_alpha:0}, blah) - specially for onComplete function to 
fire... the only odd thing about this that I can think of would be that 
cancelling tweens for these three objects listed in original call would not 
cancel onComplete.

Original comment by makc.the...@gmail.com on 28 May 2012 at 4:12