Help with X,Y coords

How can I change this so I can specifically set the X and Y coordinates but allow the X value to always remain centered on the stage?


X = (X == undefined || X == "center") ? Stage.width/2-W/2 : X;
Y = (Y == undefined || Y == "center") ? Stage.height/2-H/2 : Y;