Try:
// movie_mc is the instance name of the movieClip
// you want to center on the mouse coords.
movie_mc._x = _xmouse - (movie_mc._width/2);
movie_mc._y = _ymouse - (movie_mc._height/2);
If the movieClip size doesn't change you can optimize this by
precalculating the (movie_mc._width/2) and (movie_mc._height/2) parts so
you aren't constantly doing it.
-- JOR
[p e r c e p t i c o n] 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
thanks
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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