Xml photogallery dimensions problems

Using xml photogallery tutorial
http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm

Trying to load pictures that are not the same dimensions as those used in the tutorial so they appear outside the frame…is there a way to constrain the dimensions of the pictures i upload so they will automatically fit into the tutorial frame rectangle?