continuous rotation

18 views
Skip to first unread message

_philip_

unread,
Mar 27, 2009, 5:46:33 AM3/27/09
to Tweensy
hi, anyone know why this aint working?

<code>
var timeline:TweensyTimeline = Tweensy.to(tSpinner, {rotation: 360},
1);
timeline.repeatType = TweensyTimeline.LOOP;
timeline.smartRotate = false;
</code>

Hans Philip

Shane McCartney

unread,
Mar 27, 2009, 6:25:58 AM3/27/09
to twe...@googlegroups.com
This should do what you are after,

package {
import fl.motion.easing.Linear;

import com.flashdynamix.motion.Tweensy;
import com.flashdynamix.motion.TweensyTimeline;

import flash.display.Sprite;

/**
* @author FlashDynamix
*/
public class TweensySmartRotate extends Sprite {

public var box : Sprite;

public function TweensySmartRotate() {
loop();
}

public function loop() : void {
var timeline : TweensyTimeline = Tweensy.to(box, {rotation:"-180"},
1, Linear.easeNone);
timeline.onComplete = loop;
Reply all
Reply to author
Forward
0 new messages