Content Not Centering on First Load (FBF)

I’ve got a full browser flash project I’m having some problems with.

I’ve got a main movie that loads a background image (that gets stretched to fill the browser window) then it loads up a header and content box.

The problem is, the content box does not load in the center when the page is first loaded. If I resize my browser, it then calculates and centers it.

At first all I did was took the AS that calculated and placed the movie at the center of the screen and placed it on an onClipEvent (load) handler right on the empty movie clip that loads in the content but that’s not working anymore for some reason.

Here’s my AS:

Stage.scaleMode = "noscale";
Stage.align = "TL";

loadMovie("dh_mainContent.swf","mainContent_mc");
loadMovie("header.swf","mainHeader_mc");

stageListener = new Object();

stageListener.onResize = function () {
    var stageXCenter = Stage.width * .5;
    var stageYCenter = Stage.height * .5;
    
    stageXCenter = stageXCenter  - (_root.mainContent_mc._width * .5);
    stageYCenter = stageYCenter  - (_root.mainContent_mc._height * .5);

    _root.mainContent_mc._x = stageXCenter;
    _root.mainContent_mc._y = stageYCenter;
}

Stage.addListener(stageListener);

bg.onResize = function() {
    var imageAspectRatio = this._width/this._height;
    var stageAspectRatio = Stage.width/Stage.height;
    if (stageAspectRatio>=imageAspectRatio) {
        this._width = Stage.width;
        this._height = Stage.width/imageAspectRatio;
    } else {
        this._height = Stage.height;
        this._width = Stage.height*imageAspectRatio;
    }
    this._x = Stage.width/2;
    this._y = Stage.height/2;
}

Stage.addListener(bg);
bg.onResize();

Any ideas?