all groups > flash actionscript > july 2005 >
You're in the

flash actionscript

group:

Simulating a compass needle


Simulating a compass needle me.spriteNum = tired
7/15/2005 11:25:09 PM
flash actionscript:
The background for my interface contains an antique compass. I have 4 buttons
that follow the outside arch of that compass. Perhaps the idea is clich?, but I
would love to see a compass needle follow the mouse when it is over those
buttons. I think in order for the effect to work the compass needle needs to
"float" to the mouse, in other words ease into the mouse position, possibly
pass its position and then drift back (does that make sense). Just think of how
a real compass needle moves. When the mouse is no where near any of the 4
buttons, the compass needle could drift back around to some designated position.

Unfortunately, this involves a bit of math which is out of my league. If
anyone has any ideas on how to make this effect work I would really appreciate
it.

Kind Regards,
David Scott
Re: Simulating a compass needle mpetty
7/16/2005 12:00:00 AM
Actually such a thing nearly already exists in the help files. You could
easily start with what's here, and modify the event handlers to add in the
effects.

<program installation> \Samples\HelpExamples\DialComponent
AddThis Social Bookmark Button