Help with editing AS2 from a tutorial

I was using this tutorial:
http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm
and I was wondering if there’s a way to make the image appear with it’s middle aligned with the empty movie clip instead of the upper left hand corner.
I’m learning action script and i think i know how to do it, I just don’t know how to implement it in the code.
I was thinking that you could have it find out the width and height of the image and divide each of those by two and have it appear at those coordinates on the empty movie clip.

P.S. Sorry if this is the wrong forum, I couldn’t find a Q&A one.