Tutorial-create a photo gallery

I’m learning this great tutorial on creating a photo gallery. I even understood most of the actionscript.
http://www.kirupa.com/developer/mx/photogallery.htm
The tutorial is using pics of all the same size. What about pics of different size being always positioned in the center of the movie?
I was thinking of something like to find the x of each pics by deducing the width of the pic of the width of the container divided by 2. Would it work? How to traduce that in as? And add it to the codes of the above photo gallery?
:h: