It depends where the registration point of your clip is. If it's at
top-left or centre, then the calculation is simple - see all the other
posts in the thread.

If it's unpredictable, use getBounds() - do something like this:

var bounds:Object=myClipToCentre.getBounds(this);
myClipToCentre._x=_xmouse+(bounds.xMin+bounds.xMax)/2;
myClipToCentre._y=_ymouse+(bounds.yMin+bounds.yMax)/2;

HTH,
 Ian

On 3/1/07, [p e r c e p t i c o n] <[EMAIL PROTECTED]> wrote:
good people,

how do i move a moviClip to center itself at (_xmouse, _ymouse)...i have the
onPress part down...i just need to center it on those coordinates
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to