1
votes

I just noticed what seems to be a flaw in Flash Professional rotation tweens. A movie clip with a rotation tween does not rotate consistently from frame to frame. When the rotation is slow, it seems to rotate noticably every 4th or 5th frame, and then either not at all or very minutely over the next 3 or 4 frames. This is not noticeable unless rotating very slowly. One might think that it is not worth worrying about, but it becomes a problem when trying to do subtle animation effects, such as a cartoon character's slight head movement - it looks jittery.

I made a flash movie to demonstrate the problem - it is here. Can anything be done to mitigate this?

1

1 Answers

0
votes

It rather complicates things, but if you use the object's transformation matrix to rotate it instead, the animation is smoother. I can only guess there is some sort of optimisation for regular animation that gets bypassed when you're doing it manually.

private var box:Sprite = new Sprite();
private var boxAngle:Number = 0; // In radians
private var boxPosition:Point = new Point(); 
private var boxMatrix:Matrix = new Matrix();

private function updateBox():void {
    boxMatrix.identity();
    boxMatrix.rotate(boxAngle);
    boxMatrix.translate(boxPosition.x, boxPosition.y);
    box.transform.matrix = boxMatrix;
}