Controlling externally loaded swf's

hey.
i’m having a bit of a problem that hope someone might be able to help me with.
i had made a image gallery using xml in flash MX 2004. some of the images are jpgs and some are swfs. i’m trying to get it so that once the external file, be it jpg or swf, is loaded, it would recenter itself in the middle of the page.
so i attached the following code to the container clip that the files were loaded into:

onClipEvent(load){
this._x = ((304 - this._width)/2);
this._y = ((304 - this._height)/2);
}

this coding works fine for the loaded jpgs, but not the swfs. then just for laughs, i put a button on the page that had basicly the same code attached to it:

on(press){
this._x = ((304 - this._width)/2);
this._y = ((304 - this._height)/2);
}

and that works on the swfs as well as the jpgs.

so basicly i would like to get this to work without having to press a button to center the image. any thoughts?