Make your own free website on


_rotation is in the unit of degree. When we want to implement trigonomy functions in Math, we need to make the _rotation to the unito of rad by a factor of (Math.PI/180);

The value of _rotation is between -180 to 180; In fact, there when the rotation is just -180, it is convert to 180;

_rotation=360; trace(_rotation); The output is 0;

Becareful, _rotation is a circular value. Usually, it does not make sense to compare two angle to get the "larger" angle. It make sense only if we know what we are doing.

Because it is circular not lineal, addition, aubstraction, multiply and division should be careful. Human interprete rotation animation by illusion. When we make _rotation+=270, the human eyes will interpret it as _rotation-=90;

If we want to multiply or divide an angle, we need to know the result might not be what we want.

Sometimes, we need to convert angles value of -180 ~ 180 to 0~360; Sometimes, we need to do the reverse things. I wont discuss further about this.

Here is one point we need to know:

The internal unit of _rotation

The real _rotation unit Flash uses to draw onto the screen is 0.25 degrees; When we set _rotation=1.20378, the result is the same as _rotation=1; When we set _rotation=1.25898, the result is the same as _rotation=1.25; 

When the radius is very long, the quantum refresh phenomenon will be obvious and the animation looks like a jump. It looks the second hand in the Clock that jumps for some degrees. 

This also causes some in-accuracy when we use localToGlobal and globalToLocal function to replace the real trigonomy calculations.