Set registration point of a MovieClip to its center in AS3

Posted by Mirko on Stack Overflow See other posts from Stack Overflow or by Mirko
Published on 2010-03-28T10:52:05Z Indexed on 2010/03/28 10:53 UTC
Read the original article Hit count: 536

Filed under:

Can I set the registration point of a MovieClip (or other Display Object) to its center upon creation in AS3?

the following

var myClip:MovieClip  = new MovieClip();

sets the registration point of myClip to its top left corner by default. Using Flash CS4 to set it to its center is just a couple of clicks, so I am wondering how I can perform the same action only with code.

© Stack Overflow or respective owner

Related posts about as3-actionscript