Does anyone know a way to center a jpg whose size will not be known at design time?

My current code:
loadMovie(FileList[whichPic], "square");
square._x = (750/2) - (square._width/2);


I guess it doesn't work because the new pic isn't loaded when the centering happens. square._width is returning the width of the previous pic.

thanks