> In 1.2, the DOM element slides to 500, alerts 'tween_1 complete',
> slides to 100, and alerts 'tween 2 complete.'  In 1.3, the DOM element
> slides to 500, alerts 'tween_1 complete', slides to 100, alerts
> 'tween_1 complete' then alerts 'tween_2 complete' and then gets stuck
> in a loop.  It appears that when I'm calling $('item').set('tween') it
> is appending the onComplete function instead of replacing it.  Is this
> intended behavior or is it a bug?


It's not a bug. You need to remove the old onComplete event first, else,
it's going to stack them up - you can have unlimited callbacks per event,
it's not 1 size fits all (in the style of element.onclick = ... 

This applies to element events as well. 

Just do this.removeEvents("complete") as the last line of the first
complete event before you add the new one (making sure `this` is bound
to the Fx instance) 

else, you can do
el.get("tween").removeEvents("complete").addEvent("complete",...); as
the second tween

Regards,
-- 
Dimitar Christoff <[email protected]> 

blog: http://fragged.org/  twitter: @D_mitar 

Reply via email to