Stage.onResize problems

Hey everyone.

Clicky.

Basically, I am using Stage.onResize (after adding a listener to the stage) to position elements.

So, basically:


stageWidth = 750;
stageHeight = 500;
Stage.scaleMode = "noScale";
var resizeListener:Object = new Object();
resizeListener.onResize = function() {
    VpositionElements();
    HpositionElements();
    mainContentsStuff();
    stageDimensions();
};
VpositionElements();
HpositionElements();
mainContentsStuff();
stageDimensions();

I call the functions when the .swf loads. However, it isn’t working. Notice that you have to resize your browser to get those functions to start.

Also, you can see that if you resize the stage really quickly, the functions pretty much get screwed up and don’t work properly (click somewhere on the main contents and then resize the stage).

Is this a problem with the function in Flash or am I not doing it right?

Thanks