notalower - your correction makes sense. You want to keep spinning in the same direction, but the rate of change in the spin comes down.
Now to answer your last question, how to stop at a particular spot...
Lemme noodle on this one...
[edit]
Mebbe something like this? This won't look all that natural, but it does what you described.
I'm assuming the stopping position is _rotation == 0.
code:
// set this to slowest (final) speed
_root.mc.minRate = 1;
// set this to control the initial acceleration
_root.mc.deccel = 0.5;
_root.mc.curRate = 20;
_root.mc.onEnterFrame=function()
{
// slow down until we hit a speed of 1
if (this.curRate > this.minRate)
{
this.curRate -= this.deccel;
}
this._rotation += this.curRate;
// are we there yet?
if (Math.round(this._rotation) == 0)
{
// yep, we're there.
this._rotation = 0;
delete this.onEnterFrame;
}
}




Reply With Quote