# Arranging imported content

**URL:** <https://forum.kirupa.com/t/arranging-imported-content/232212>\
**Category:** flash\
**Created:** [July 11, 2007, 10:33pm UTC](https://forum.kirupa.com/t/arranging-imported-content/232212 "2007-07-11T22:33:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaymondP](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@RaymondP](https://forum.kirupa.com/u/RaymondP)\
**Post date:** [July 11, 2007, 10:33pm UTC](https://forum.kirupa.com/t/arranging-imported-content/232212/1 "2007-07-11T22:33:26Z")

</div>

ive got a confusing one here im importing movieclips via xml for design reasons i have to have lots of movieclips trust me on this one so ive got

\_level0.Sideplane.Content.SideplaneTile0.Tile.Importer

Now that looks mad ill try to explain Sideplane is a movieclip allready there Content is dynamicly generated

then we have SideplaneTile its a movieclip that i attach in xml inside we have 2 movieclips Background and Importer all those two do is import the swf based on a variable set by the xml and background is set to the same size as the imported mc because the msc will be of different sizes .

So im trying to get around the fact that theyre different sizes . i need a way of getting the imported mcs to arrange virticly normaly id just set the icon.y = itemcount \* 32 but the size changes so i have a problem

I need a way of getting around this can anyone help

heres the code

> var item\_count = 0;  
> var test\_Content:MovieClip = this.createEmptyMovieClip(“Sidebar\_Content”, this.getNextHighestDepth());

function CreateMenu(test){  
var items = test.firstChild.firstChild.childNodes;  
for (var i=0; i\<items.length; i++) {  
if (items\*.attributes.type == “item”) {

```
		var Name = items*.firstChild;
		var Link = items*.childNodes[1];
		var Height = items*.childNodes[3];
		
		var Tile = test_Content.attachMovie("item","item"+item_count, item_count);
		Tile._y = Math.floor(i/1)*32; // changes so im stuck
		Tile._x = 0;
		
		item_count++;
		
		item.item.Link = Link.firstChild.nodeValue;
		item.item.Name = Name.firstChild.nodeValue;
		
	}
}

```

}

var XAML = new XML();  
XAML.ignoreWhite = true;  
XAML.onLoad = function(success){  
if (success) CreateMenu(this);  
else trace(“Error loading XML file”);  
}  
XAML.load(“test.xml”);
