# Preloader/xml/multiple holders

**URL:** https://forum.kirupa.com/t/preloader-xml-multiple-holders/188818
**Category:** Uncategorized
**Created:** [May 11, 2006, 1:19am UTC](https://forum.kirupa.com/t/preloader-xml-multiple-holders/188818 "2006-05-11T01:19:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![friggingmick](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@friggingmick](https://forum.kirupa.com/u/friggingmick)
#### Post date: [May 11, 2006, 1:19am UTC](https://forum.kirupa.com/t/preloader-xml-multiple-holders/188818/1 "2006-05-11T01:19:55Z")

</div>

I have came across many preloader examples and couldn’t find one that will show how to construct a complex preloader that will calculate and preload multiple images and swfs that xml will load into various holders with different instance name (holder01, holder02, etc) at same time. Below’s a rough preloader I came up for a single holder, so is it possible to adapt the script related to my question? If not, what is another approach I should look into?

```auto
this.onEnterFrame = function() {
	holder01._alpha = 0;
	var amount:Number = holder01.getBytesLoaded() / holder01.getBytesTotal() *100;
	loader._xscale = amount;
	percent = int ( (holder.getBytesLoaded()/holder01.getBytesTotal()) * 100 )
         percentage.text = percent;
	if(amount == 100) {
		holder01._alpha = 100;
		loader._visible = false;
		percentage._visible = false;
	}
}

```

jace
