Overwriting tweens in TweenLite
Posted: February 13th, 2009 | Author: Janice | Filed under: Uncategorized | Tags: as3, flash, tweenlite | No Comments »You can choose to overwrite tweens:
1 2 | TweenLite.to(mc, 1, {x:100, y:200}); TweenLite.to(mc, 1, {x:300, overwrite:2}); //only overwrites the "x" property in the previous tween |
you can pass 0, 1, 2, or 3 to overwrite.
According to GreenSock’s site:
0 (NONE): No tweens are overwritten. This is the fastest mode, but you need to be careful not to create any tweens with overlapping properties, otherwise they’ll conflict with each other.
1 (ALL): (this is the default unless OverwriteManager.init() has been called) All tweens of the same object are completely overwritten immediately when the tween is created.
2 (AUTO): (used by default if OverwriteManager.init() has been called) Searches for and overwrites only individual overlapping properties in tweens that are active when the tween begins.
3 (CONCURRENT): Overwrites all tweens of the same object that are active when the tween begins.
Leave a Reply