AS3: Controlling Registration Points Programmatically

The SpriteRegPoint Class is designed to mimic this feature in flash:

Registration Point Window

For those of you who use Flex or FlashDevelop to do all of your flash development and would like to control registration points similarly to the flash IDE, this is the class for you.

Download the Source File
View the Documentation

These are the options you can set:

  • TL - Top Left
  • TC - Top Center
  • TR - Top Right
  • CL - Center Left
  • C - Center
  • CR - Center Right
  • BL - Bottom Left
  • BC - Bottom Center
  • BR - Bottom Right
  • x/y - x/y coordinates


var squareBox:Sprite = new Sprite();;,0,100,100);  
var centeredSprite:Sprite = new SpriteRegPoint("C");  
centeredSprite.rotation = 45;