# Spacing between multiple loaded movies

**URL:** https://forum.kirupa.com/t/spacing-between-multiple-loaded-movies/206687
**Category:** flash
**Created:** [November 10, 2006, 12:28pm UTC](https://forum.kirupa.com/t/spacing-between-multiple-loaded-movies/206687 "2006-11-10T12:28:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![adt100](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@adt100](https://forum.kirupa.com/u/adt100)
#### Post date: [November 10, 2006, 12:28pm UTC](https://forum.kirupa.com/t/spacing-between-multiple-loaded-movies/206687/1 "2006-11-10T12:28:41Z")

</div>

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! 🙂

```auto
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();

```
