[Flashcoders] Distance: mouse to MC's edge (not regpoint)

2005-11-30 Thread Mendelsohn, Michael
Hi list...

I have an odd shaped MC on the stage.  I'd like to find the distance
between the mouse and the MC, simple enough -- but not to the MC's
registration point, but to the *edge* of the MC.  And to boot, it's an
odd-shaped MC.  Can you determine the MC's closest point on its edge to
the mouse?

//something like...

Math.sqrt(Math.pow((_root._xmouse -
closestMCedge_x),2)+Math.pow((_root._ymouse - closestMCedge_y),2));

Thanks,
- Michael M.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Distance: mouse to MC's edge (not regpoint)

2005-11-30 Thread Lanny McNie
look into getBounds()

On 11/30/05, Mendelsohn, Michael [EMAIL PROTECTED] wrote:

 Hi list...

 I have an odd shaped MC on the stage.  I'd like to find the distance
 between the mouse and the MC, simple enough -- but not to the MC's
 registration point, but to the *edge* of the MC.  And to boot, it's an
 odd-shaped MC.  Can you determine the MC's closest point on its edge to
 the mouse?

 //something like...

 Math.sqrt(Math.pow((_root._xmouse -
 closestMCedge_x),2)+Math.pow((_root._ymouse - closestMCedge_y),2));

 Thanks,
 - Michael M.

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--
-
Lanny McNie
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders