[Tweener] RE : Tweening along the circle

Yvan Touzeau (Intl Vendor) v-yvtouz at microsoft.com
Wed May 14 11:23:37 PDT 2008


Awesome !
Thanks for sharing it :)

________________________________________
De : tweener-bounces at lists.caurinauebi.com [tweener-bounces at lists.caurinauebi.com] de la part de Makc [makc.the.great at gmail.com]
Date d'envoi : mercredi 14 mai 2008 16:19
À : tweener at lists.caurinauebi.com
Objet : [Tweener] Tweening along the circle

Hello list,

I actually tried today what I had in mind half of year ago
http://lists.caurinauebi.com/htdig.cgi/tweener-caurinauebi.com/2007-November/000399.html
and it worked :)

Just to share with anyone interested, here goes the code/swf:

import flash.display.*
import caurina.transitions.*

function circleTween (mc:DisplayObject, xC:Number, yC:Number,
r:Number, t:Number, d:Number = 0):void {
        mc.x = xC + r;
        Tweener.addTween (mc, { x: xC - r, time: 0.5 * t, delay: d,
transition: "easeInOutSine" });
        Tweener.addTween (mc, { x: xC + r, time: 0.5 * t, delay: d + 0.5 * t,
transition: "easeInOutSine" });
        mc.y = yC;
        Tweener.addTween (mc, { y: yC - r, time: 0.25 * t, delay: d,
transition: "easeOutSine" });
        Tweener.addTween (mc, { y: yC + r, time: 0.5 * t, delay: d + 0.25 *
t, transition: "easeInOutSine" });
        Tweener.addTween (mc, { y: yC, time: 0.25 * t, delay: d + 0.75 * t,
transition: "easeInSine" });
}

circleTween (ball, 95, 145, 45, 4);
circleTween (ball, 95, 145, 45, 3, 4);
circleTween (ball, 95, 145, 45, 2, 7);
circleTween (ball, 95, 145, 45, 1, 9);


More information about the Tweener mailing list