Loading consecutive JPEGS problem/question - from SENOCULAR.COM source fla file

I would like to load consecutive JPEGS (that are different widths) horizontally with no spacing in between each JPEG so that each JPEG loads right next to the previous one. I’m really no actionscript guru, but I know it must involve communicating between the previous array to determine the width/_xscale of the JPEG to set the _x position of next one.

P.S. thanks goes out to Senocular and his website (http://www.senocular.com) for his AS I am trying to learn from/use.


would be much appreciated

var baseurl = _url.substr(0,_url.lastIndexOf("/")+1);
h_spacing = 0; // horizontal spacing
v_spacing = 0; // vertical spacing
h_count = 64; // number of thumbnails horizontally
v_count = 1; // number of thumbnails vertically
h_pos = -533; // starting horizontal position of grid
v_pos = 25; // starting vertical position of grid
count = 0; // counts clips added in the grid when created and for loading
thumb_clips = new Array(); // movieclips to contain thumbs
thumb_graphics = new Array(); // urls of the jpgs to be loaded as thumbs

for (i=1; i<=12; i++) thumb_graphics.push(baseurl + "background/home"+i+".jpg"); // populate thumb_graphics with jpg urls

// CreateThumbContainers creates the grid of thumb_clips
function CreateThumbContainers(){
	var x, y, initObj, curr;
	for (y=0; y<v_count; y++){
		for (x=0; x<h_count; x++){
			initObj = {_x: h_pos + x*h_spacing, _y: v_pos + y*v_spacing};
			curr = this.attachMovie("thumb_container", "tc"+count+"_mc", count, initObj);
			curr.progress_mc._xscale = 0;
// ThumbLoadingEnterFrame is the onEnterFrame handler to be used
// for preloading each thumbnail and driving the progress bar
function ThumbLoadingEnterFrame(){
	var lod = this.loader_mc.getBytesLoaded();
	var tot = this.loader_mc.getBytesTotal();
	if (lod && tot){
		var percent_loaded = lod/tot;
		this.progress_mc._xscale = 100 * percent_loaded;
		if (percent_loaded == 1){
			delete this.onEnterFrame;
// LoadNextThumb, called by ThumbLoadingEnterFrame, loads the next
// thumbnail in the thumb_clips list when the current one is complete
function LoadNextThumb(){
	if (count >= thumb_graphics.length) return false;
	var imgURL = thumb_graphics[count];
	thumb_clips[count].onEnterFrame = ThumbLoadingEnterFrame;

// create grid
// reset count
count = 0;
// initiate loading of thumbs