Spacing between multiple loaded movies

Hiya,

I’m trying to load multiple .swf’s into a horizontally expandable flash page (it’s for a portfolio). The problem is, being a bit of novice when it comes to actionscript, I can’t work out how to create the correct spacing for my images.

I’ve got the code below but obviously the x position is simply a fixed amount (210px) which is no good as some images are much wider than others. I’ve tried to use _width to make the spacing dependent on the swf width but nothing seems to work. Any help very greatfully received! :slight_smile:

myMCL = new MovieClipLoader();      

function initClips(){
	for (i=1; i<=4; i++){
		this.attachMovie("img","img"+i,i);
		this["img"+i]._x = i*210;
		myMCL.loadClip("0" + i + ".swf" , this["img"+i]);
		}
}

initClips();