csk0921 / tweener

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

remove tween by index #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
theres a public function to remove a teen by index and this is like the
most needed feature! how can u add several tweens on one object and remove
just one of them... currently you cant, you can only remove all!? When
addTween is called, why isnt the tweenIndex being returned instead of a
boolean?

Original issue reported on code.google.com by nore...@gmail.com on 5 Dec 2007 at 3:34

GoogleCodeExporter commented 8 years ago
You remove individual tweens by removing them from specific properties of 
specific
objects.

Tweener.addTween(myobject, {_x:10, _y:20, time:1});
Tweener.removeTween(myobject, "_x"); // removes from _x only

addTween returns whether or not it was successfully added. The reason why it 
doesn't
return a "reference" to the tweening is because a reference shouldn't be 
needed; we
take a different approach with tweenings.

In the future it will indeed return references to tweenings with a few 
additional
features. This will be a big change. But for now one can pause, resume, and 
remove
tweenings by simply referring to the property name.

Original comment by zisfor...@gmail.com on 5 Dec 2007 at 3:43

GoogleCodeExporter commented 8 years ago
i just combed through the Tweener class (AS 2.0 and AS 3.0) and there is no
removeTween function anywhere... is this not included in the AS versions?

Original comment by nore...@gmail.com on 5 Dec 2007 at 4:00

GoogleCodeExporter commented 8 years ago
It's just a typo, it's removeTweens(). Check the documentation.

Original comment by zisfor...@gmail.com on 5 Dec 2007 at 11:38