# Spacing with an XML MC

**URL:** <https://forum.kirupa.com/t/spacing-with-an-xml-mc/171957>\
**Category:** flash\
**Created:** [December 9, 2005, 3:37pm UTC](https://forum.kirupa.com/t/spacing-with-an-xml-mc/171957 "2005-12-09T15:37:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![misterpatrick](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@misterpatrick](https://forum.kirupa.com/u/misterpatrick)\
**Post date:** [December 9, 2005, 3:37pm UTC](https://forum.kirupa.com/t/spacing-with-an-xml-mc/171957/1 "2005-12-09T15:37:42Z")

</div>

Hello all,

I have a quick question. I am a block of text and an image using XML. I am then placing it in a scroller. Right now the spacing is equidistant between all of the mc’s. Is there any way to set it up so that the distance is determined off the height of the text and not the holder mc I have. Here’s the code:

```auto

function createCopy() {
	this.createEmptyMovieClip("holder_mc", this.getNextHighestDepth());
	holder_mc._x = 10;
	holder_mc._y = 10;
	for (n=0; n<text_obj.numNodes; n++) {
		holder_mc.attachMovie("textholder", "text_"+n, n, {_x:0, _y:n*100});
		holder_mc["text_"+n].Photo_mc.loadMovie(_global.ImagePath+text_obj.photo[n]);
		holder_mc["text_"+n].line1_txt.text = text_obj.line1[n];

	}
	
}

```

As you can see, holder\_mc contains an empty mc that gets a photo and a dynamic text box called line\_1\_txt. Some of the text being brought in is three lines, some is up to five.

Right now, the height is determined with the \_y:n\*100}. Would an autoSize thing work? Thanks in advance!
