# \[MX\] listBox component

**URL:** <https://forum.kirupa.com/t/mx-listbox-component/43808>\
**Category:** flash\
**Created:** [February 26, 2004, 3:02am UTC](https://forum.kirupa.com/t/mx-listbox-component/43808 "2004-02-26T03:02:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![foochuck](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@foochuck](https://forum.kirupa.com/u/foochuck)\
**Post date:** [February 26, 2004, 3:02am UTC](https://forum.kirupa.com/t/mx-listbox-component/43808/1 "2004-02-26T03:02:26Z")

</div>

Hello,

I’m using this code to put an array into a listbox component in Flash MX

:battery:

```auto

stop;

campbellAry = new Array("charlie","chris","kate","kara","jack","kathy","kim","fiona","liam",
					   "cesar","kaylee","john","ken","sarah","reykah");

campbellAry.sort();

for (i=0; i<campbellAry.length; i++) {
	testListBox.addItem(campbellAry* /* + " campbell" */ );
}

```

I’m wondering how to give each item in the list a function? For example I’d like charlie to do something associated with the name of that item (ie loadMovie charlie.swf). How do I dynamically control each item’s onRelease method’s ?

Also, can I give the text a different look in the listBox somehow?

Thanks

:disco:
