Various width in thumnails scroller

Hi
I used this http://www.kirupa.com/developer/mx2004/thumbnails.htm tutorial to ad thumbnails to my photogallery working with a XML file. It workes fine except that I have pictures with different width. The scroller works only with pictures that are the same width. In my scroller pictures are shown on top off each other.
I think the problem is here:

 
function thumbnails_fn(k) { 
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth()); 
tlistener = new Object(); 
tlistener.onLoadInit = function(target_mc) { 
target_mc._x = hit_left._x+(target_mc._width+5)*k; 
target_mc.pictureValue = k; 
target_mc.onRelease = function() { 
p = this.pictureValue-1; 
nextImage();
};

Can I change this?
Thanks in advance!