I use the following code to set position of a DisplayObject to center.

```
obj.x = (screen_width - obj.width) / 2;

```

or

```
obj.x = (parentObj.width - obj.width) / 2;

```

And I use the following code to show 2 objects vertically.

```
obj2.x = obj1.width + interval

```

And I use the following code to show 2 objects vertically and set the position of them to center.

```
var obj3:Sprite = new Sprite;

obj3.addChild(obj1);
obj3.addChild(obj2);

obj2.x = obj1.width + interval;
obj3.x (screen_width - obj3.width) / 2;

```

Are the above codes a good way to manage positions of DisplayObjects?  

Are there better and simple ways to do that?