Flash image gallery with xml

Hi there I’ve been following this tutorial (http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm) and everything works great. however all my images are different sizes and dimensions so when the images load, they are positioned at different places on the stage because of where the anchor point is. Can anyone tell me how I can load the images in the centre of the stage regardless of what dimensions they have? Please help! thanks.