Its that last part frying me - sometimes it works as expected, other times,
it decides to rotate the long way around :/

thanks all.


On 11/1/05, Helen Triolo <[EMAIL PROTECTED]> wrote:
>
> Assuming your circle has a center registration point:
>
> import mx.transitions.Tween;
> import mx.transitions.easing.*;
>
> function rotation(dx:Number, dy:Number):Number {
> return Math.atan2(dy, dx) * 180/Math.PI;
> }
> circle.onRelease = function() {
> new Tween(this, "_rotation", Strong.easeOut, this._rotation,
> rotation(_xmouse - this._x, _ymouse-this._y), 1, true);
> };
>
> I added it to the bottom of this page:
> http://flash-creations.com/notes/asclass_math.php
>
> The only thing is you're at the mercy of the Tween class to determine
> which way the rotation will go, so you might need to modify it some.
>
> Helen
>
> eric dolecki wrote:
>
> >I have a math question. Lets say I have a circular movieclip on the
> stage.
> >It has a directional marker on it so you know which direction its rotated
> >to.
> >
> >click on the circle, now with easing (even just linear), rotate to the
> >movieclip from its current rotation to the destination angle (where the
> >movieclip was clicked on). To work in full 360 degrees.
> >
> >Anyone have any good suggestions on the best way to code this, or an
> example
> >to boot?
> >
> >Thanks,
> >e.dolecki
> >
> >
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to