<mx:Canvas id = "container"> <mx:Button id="btn" x="{(container.width - btn.width) / 2}"> </mx:Canvas>