[Tweener] using count
Ross Hulford
ross at welovethedesign.com
Sun Mar 8 07:11:22 PDT 2009
Hi,
I am using tweener with the code below the problem is I do not know
when the last square is tweened. Can someone suggest a way to
determine when box 10 has finished so I can use onComplete.
I could use a if i=10 at the bottom but thought there may be a better
way with Tweener's in-built features like count.
thanks.
function createWhiteBox():void {
for (var i:uint=0; i<10; i++) {
var square:Sprite = new Sprite();
square.graphics.beginFill(0xffffff, 0.9);
square.graphics.drawRect(0,0,0.1,60);
square.graphics.endFill();
square.y = i * 60;
whiteBox.addChild(square);
var delayNum = i/4;
Tweener.addTween(square, {width:930, time:1,
transition:"easeOutBack", delay:delayNum });
}
}
More information about the Tweener
mailing list