Centering display groups?

I’m adding my main background to a display group and then trying to center it on the screen. This is the code I’ve used to try to center it.

lanesGroup.x = (display.contentWidth/2) - (lanesGroup.width/2)

Instead of having a centered display group it ends up even further to the left so that part of the display group is off the screen on the left side.  Not sure what I’m doing wrong here.

Possibly because anchoring in groups has to be turned on (set anchorChildren property to true) - then just anchor it to the middle as usual ?

I’ve tried the following as well with the same results.

lanesGroup.anchorX = (display.contentWidth/2) - (lanesGroup.width/2) lanesGroup.anchorChildren = true

Additionally I tried to just position the group manually since I know what my total width should be; in case the display groups are always being sized as powers of 2 or something like that for optimization.

lanesGroup.x = -60

This also isn’t working correctly.  I have only been testing on a simulator; I’m assuming this will work the same though on a real device?

I think group.anchorX,anchorY are set to 0-1 as usual and the group is positioned with x,y - like any other display object.

Possibly because anchoring in groups has to be turned on (set anchorChildren property to true) - then just anchor it to the middle as usual ?

I’ve tried the following as well with the same results.

lanesGroup.anchorX = (display.contentWidth/2) - (lanesGroup.width/2) lanesGroup.anchorChildren = true

Additionally I tried to just position the group manually since I know what my total width should be; in case the display groups are always being sized as powers of 2 or something like that for optimization.

lanesGroup.x = -60

This also isn’t working correctly.  I have only been testing on a simulator; I’m assuming this will work the same though on a real device?

I think group.anchorX,anchorY are set to 0-1 as usual and the group is positioned with x,y - like any other display object.