overwrite

Availability

AS2 and AS3.

Usage

... overwrite:value, ...

Parameters

value:Boolean — Whether or not the new tween will overwrite other activate tweens that are applied to the same object, on the same property, and which overlap the time the new tween will take. Enabling this simply removes the existing tweens. Disabling this may work, but the two existing tweens will run in parallel - the newest tween taking priority in setting the final property values - and may lead to undesirable results. The default value for this parameter (when omitted) is defined by the static property autoOverwrite.

Examples

// Default behavior: a tween is overwritten
Tweener.addTween(myBox, {x:400, time:4, transition:"linear"});
Tweener.addTween(myBox, {x:100, time:2, transition:"linear"});
// Tween is not overwritten anymore
Tweener.addTween(myBox, {x:400, time:4, transition:"linear"});
Tweener.addTween(myBox, {x:100, time:2, transition:"linear", overwrite:false});

See also

addTween, autoOverwrite