flex 3 component using x y as center, not topleft
问题 How can I extend components like buttons to use x and y value as the center of the component, not the top left? 回答1: It's pretty easy in Flex 4 :). They have a transformAround method in the UIComponent, that allows you to transform the position/scale/rotation of a component around any arbitrary pivot. So you could do this: override public function set x(value:Number):void { var pivot:Vector3D = new Vector3D(this.width/2, this.height/2, 0); var translation:Vector3D = new Vector3D(value, this.y