I am new to AS3 and have a doubt on Registration point for
Movie clip / Sprite. Please help me the sample code for this
I simply draw a line using AS3 in flash environment. but i
used graphics.moveTo for center. but if i run this it is simply
taking x,y axis 0,0 and move around the stage. I want to move this
from center of the stage. please help.
below is my code
var line:Sprite = new Sprite()
var cx:Number = stage.stageWidth/2;
var cy:Number = stage.stageHeight/2;
to appear to control the registration point of line, make it
a child or an empty display object and offset it by -x,-y where x,y
is your choice for the apparent registration point. you can then
control the parent object and it will behave like your line with
changed registration point.