How to make a different width image carousel?

I create the horizontal image carousel and mod the code from

http://www.republicofcode.com/tutorials/flash/as3gridgallery/4.php

In this page, they show how to add space between each image. However, I have a different size of width of images so I wonder how can I align all the image with equally spaces between each.

Here is the code to add space;

function callThumbs():void{
for (var i:Number = 0; i < my_total; i++){

  var thumb_url = my_images*.@THUMB;;
  var thumb_loader = new Loader();
  thumb_loader.load(new URLRequest(thumb_url));

thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);

thumb_loader.x = my_thumb_width*i;

  }
  }

=======================================================
By the way, right now all the images load from XML file and have the same width from the parent node. How could I disable that to 0 and use each image width instead. Then add some space both left and right with AS3?

Any Ideas?