I have an MC which is rotating constantly controlled by an onEnterFrame action. Every frame, the MC rotates by the value of outerspinerate.
onClipEvent(enterFrame) {
curr_outer_rot = this._rotation;
this._rotation = curr_outer_rot + _root.dynamo.outerspinrate;
trace(curr_outer_rot);
}
I noticed in the trace that the rotation values in flash are translated into the range of -180 to +180.
I want the MC rotation to slow to a stop at zero _rotation value when certain events become true (it’s for a preloader).
I want this to happen gradually over at least half a rotation, so i’m using something like
if (allbytesloaded && theMC._rotation == -174) {
decrease the variable ‘outerspinrate’ so that ‘theMC’ slows down gradually to stop at or very near zero _rotation;
I’m rather scatterbrained at devising logic so can someone help me with this? I’m going to be doing this with 3 clips at once, and one of them will be spinning the opposite way, but explaining it once should enable me to finish the rest. thank you!
-andy