First, in your button (this assumes that your arrow has the instance name 'arrow'):
Now in the Object actions of your 'arrow' movie clip:Code:on (release) { if (!_root.arrow.spinning) { _root.arrow.spinning = 1; _root.arrow.speed = (math.random()*20)+30; } }
You can fiddle with the 'speed' and 'friction' values to change how fast it starts rotating and how quickly it slows down.Code:onClipEvent (load) { friction = 1.1; rot = 0; } onClipEvent (enterFrame) { if (spinning) { rot += speed; this._rotation = rot; speed /= friction; if (speed <= .1 && spinning) { spinning = 0; // *** Your actions for when the arrow stops spinning go here *** } } }
[Edited by Stickman on 07-05-2001 at 09:16 AM]




Reply With Quote