[Tweener] Tweening along the circle
Makc
makc.the.great at gmail.com
Wed May 14 07:19:54 PDT 2008
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: circle.swf
Type: application/x-shockwave-flash
Size: 12616 bytes
Desc: not available
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20080514/711c67cc/attachment.swf>
More information about the Tweener
mailing list