[Tweener] using count
Zeh Fernando
zeh at zehfernando.com
Sun Mar 8 08:11:25 PDT 2009
Well, just use a conditional.
if (i == 9) {
Tweener.addTween(square, {width:930, time:1, transition:"easeOutBack",
delay:delayNum, onComplete:doSomething });
} else {
Tweener.addTween(square, {width:930, time:1, transition:"easeOutBack",
delay:delayNum });
}
count is for addCaller().
Zeh
On Sun, Mar 8, 2009 at 11:11 AM, Ross Hulford <ross at welovethedesign.com>wrote:
> 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 });
>
>
>
>
>
>
> }
>
> }
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20090308/275d40e5/attachment.htm>
More information about the Tweener
mailing list