# List.change help!

**URL:** <https://forum.kirupa.com/t/list-change-help/181354>\
**Category:** flash\
**Created:** [March 8, 2006, 4:12pm UTC](https://forum.kirupa.com/t/list-change-help/181354 "2006-03-08T16:12:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rebelsoul2005](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rebelsoul2005](https://forum.kirupa.com/u/rebelsoul2005)\
**Post date:** [March 8, 2006, 4:12pm UTC](https://forum.kirupa.com/t/list-change-help/181354/1 "2006-03-08T16:12:56Z")

</div>

hi, my problem is this:

I have on my stage some dynamic textboxes and a list box. The listbox is populated by an XML file of music artists names. What i would like to do is create a function so that when the artist is selected in the listbox, the dynamic textboxes display the relevant information.

The code i have so far is this:

```auto
//Declare variable to act as start of XML playlist
_global.i = 0;

//Create the XML object "Playlist"
playlist = new XML();
playlist.onLoad = loadXML;
playlist.ignoreWhite = true;
playlist.load("music.xml");

_root.createEmptyMovieClip("artwork_mc",_root.getNextHighestDepth());
artwork_mc._x = 10;
artwork_mc._y = 100;

var songlist_lb:mx.controls.List;

//Create function to check if XML is loaded, and if it is populate the listbox
//instance on the stage

function loadXML(loaded){
	if(loaded){
		var songArray:Array = playlist.firstChild.childNodes;
		for(i=0; i<songArray.length; i++){
			songlist_lb.addItem({label:songArray*.childNodes[0].firstChild.nodeValue})
			}
			var songlistListener:Object = new Object();
			songlistListener.change = function() {
				//here is where i get stuck!!
			}
	}
	songlist_lb.addEventListener("change", songlistListener);
}

```

I have no clue as to how to get this to work. The names of the textboxes are as follows:

artist\_display.text  
era\_display.text  
album\_display.text  
track\_display.text

Any help from anyone would be helpful!!

Thanx
