# Please help, my preloader and the xml (similar to the image slideshow) issues with PL

**URL:** <https://forum.kirupa.com/t/please-help-my-preloader-and-the-xml-similar-to-the-image-slideshow-issues-with-pl/176272>\
**Category:** Uncategorized\
**Created:** [January 22, 2006, 7:28am UTC](https://forum.kirupa.com/t/please-help-my-preloader-and-the-xml-similar-to-the-image-slideshow-issues-with-pl/176272 "2006-01-22T07:28:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [January 22, 2006, 7:28am UTC](https://forum.kirupa.com/t/please-help-my-preloader-and-the-xml-similar-to-the-image-slideshow-issues-with-pl/176272/1 "2006-01-22T07:28:10Z")

</div>

Can anyone help me out please, I require a preloader each time i click the next button, I basically need it to check to see if the image, or rather information has been loaded if so set the visibility of the prelaoder to false.

I have a preloader ready, very basic for the time being, but a little confused as to getting it working.

Any help would be good, many thanks

trev

my code for xml.

```auto

//xml and array containers
var x:XML = new XML();
x.ignoreWhite = true;

var images:Array = new Array(); //store all images into an array
var companys:Array = new Array(); //store all companys into an array
var involvements:Array = new Array(); //store all involvements into an array
var descriptions:Array = new Array(); //store all descriptions into an array
var urls:Array = new Array();

//keep track of which image is on
var whichClient:Number;

x.onLoad = function(loaded) {
	
	if (loaded) {
	//get us to the root element, which is childNode
	var client:Array = this.firstChild.childNodes;	
	for (i=0;i<client.length;i++) {		
		//push - array command (tag it onto the end of the array)
		images.push(client*.attributes.image);
		companys.push(client*.attributes.company);
		involvements.push(client*.attributes.involvement);
		descriptions.push(client*.attributes.description);
		urls.push(client*.attributes.url);
	}		
	
	//loads a clip at the start
	holder.loadMovie(images[0]);
	company.text = companys[0];
	involvement.text = involvements[0];
	description.text = descriptions[0];
	url.text = urls[0];
	whichClient = 0;

	} else {
	
	error.text = "xml not found or does not exist";
  
  }
}

x.load("clients.xml");

//previous button funtion
previous.onRelease = function() {
		if (whichClient > 0) {
			whichClient--; //subtract by 1
			holder.loadMovie(images[whichClient]);
			company.text = companys[whichClient];
			involvement.text = involvements[whichClient];
			description.text = descriptions[whichClient];
			url.text = urls[whichClient];
		}
}
		
//next button funtion
next.onRelease = function() {
	if (whichClient < images.length-1) {
			whichClient++; //add by 1
			holder.loadMovie(images[whichClient]);
			company.text = companys[whichClient];
			involvement.text = involvements[whichClient];
			description.text = descriptions[whichClient];
			url.text = urls[whichClient];
		}
}

```
