Flash Photography Gallery - Centered Images

Hi Guys,

Kirupa had written this fantastic tutorial:

about creating a flash gallery using xml as the way of sorting the images and text for each.
I was wondering if anyone has any idea how to make it so flash takes any image and centers it in the masking area (for when using a vertical image with slightly different measurements).

Thank you so much,