# Adjusting the width of a movieclip

**URL:** https://forum.kirupa.com/t/adjusting-the-width-of-a-movieclip/32947
**Category:** flash
**Created:** [October 13, 2003, 4:22pm UTC](https://forum.kirupa.com/t/adjusting-the-width-of-a-movieclip/32947 "2003-10-13T16:22:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sharvan11](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sharvan11](https://forum.kirupa.com/u/sharvan11)
#### Post date: [October 13, 2003, 4:22pm UTC](https://forum.kirupa.com/t/adjusting-the-width-of-a-movieclip/32947/1 "2003-10-13T16:22:29Z")

</div>

I need to read two image locations from a file and join it together.  
For this i used the following code.

Part A:

//this reads from the file images.txt and puts in an array “images”  
//the size of the array “images” is 2  
//  
m = new LoadVars();  
m.onLoad = function(ok) {  
if (ok) {  
images = this.Images.split("|");  
Trace(images.length);  
Buildmovie();  
}  
};  
m.load(‘images.txt’, this);

Partb:  
//

var count = 0;  
\_root.createEmptyMovieClip(‘preloader’, 10);

function BuildMovie() {  
\_root.preloader.createEmptyMovieClip(‘holder’,count);  
\_root.preloader.holder.loadmovie(images[count]);

setproperty ("\_root.preloader.holder", \_x, 20);  
setproperty ("\_root.preloader.holder", \_y, 20);

count++;  
\_root.preloader.createEmptyMovieClip(‘holder\_1’,count);  
\_root.preloader.holder\_1.loadmovie(images[count]);

setproperty ("\_root.preloader.holder\_1", \_x, 20+ \_root.preloader.holder.\_width);  
setproperty ("\_root.preloader.holder\_1", \_y, 20);

}

With this code I can load two images but I can’t adjust the position of the second image with respect to first i.e: iam unable to capture the width of the first image.

Help needed!! 🙂
