# Pre load xml attributes before appearing

**URL:** <https://forum.kirupa.com/t/pre-load-xml-attributes-before-appearing/220291>\
**Category:** Uncategorized\
**Created:** [March 24, 2007, 8:25pm UTC](https://forum.kirupa.com/t/pre-load-xml-attributes-before-appearing/220291 "2007-03-24T20:25:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vibetribe](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vibetribe](https://forum.kirupa.com/u/vibetribe)\
**Post date:** [March 24, 2007, 8:25pm UTC](https://forum.kirupa.com/t/pre-load-xml-attributes-before-appearing/220291/1 "2007-03-24T20:25:48Z")

</div>

So I have this code… can anyone suggest some augmentation on the code so that I can have a condition that tests that all the attributes are loaded before showing all of them at the same time…

```auto
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
	var nodes = this.firstChild.childNodes;
	numOfItems = nodes.length;
	for (var i = 0; i<numOfItems; i++) {
		var t = home.attachMovie("item", "item"+i, i+1);
		t.icon.inner.loadMovie(nodes*.attributes.image);
		t.r.inner.loadMovie(nodes*.attributes.image);
    }
}

```

Thanks in advance…
