Centering loaded content

ok here’s my problem,

I have an index.swf that it’s dimensions are 1020x610, now when I load content in a container in the index.swf it will be centered using an onResize stage listener, that works fine but only if the loaded content is 1020x610, I’ve also used an onEnterFrame that checks if the width and height are !=0 so that way it waits for it to load before centering the content.

What should I do to always keep my content centered. Lets say I want to load a swf that is smaller (ie the 1st frame only contains 1 element that is smaller than the stage dimensions) I’m not sure if I’m explaining this well…