views:

459

answers:

2

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.

A: 
myClip.x-= myClip.width/2;
myClip.y-= myClip.height/2;
anne
This moves its position not its center though...
Mirko
+1  A: 

Check this article.

Jorge
Nice find, I will look at it...
Mirko