# MX 2004 ListBox Component Not Working

**URL:** <https://forum.kirupa.com/t/mx-2004-listbox-component-not-working/224294>\
**Category:** flash\
**Created:** [May 1, 2007, 12:00am UTC](https://forum.kirupa.com/t/mx-2004-listbox-component-not-working/224294 "2007-05-01T00:00:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imvain2](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/imvain2/32/620_2.png) [@imvain2](https://forum.kirupa.com/u/imvain2)\
**Post date:** [May 1, 2007, 12:00am UTC](https://forum.kirupa.com/t/mx-2004-listbox-component-not-working/224294/1 "2007-05-01T00:00:26Z")

</div>

Working off the the tutorial here: [http://www.kirupa.com/developer/mx/listbox.htm](http://www.kirupa.com/developer/mx/listbox.htm), I’m unable to get the onchangehandler working for the list component in MX 2004.

I have just the basics and its still not working. I have a listbox named photolist, and I can fill it just fine but the onchangehandler isn’t working.

Below is the basic code that I have that isn’t even tracing for the onchangehandler.

```auto

function displayDetails(c){
	trace("Working");
//	trace(c.getSelectedItem().data);
}

_root.photolist.addItem("asdsad",22);
_root.photolist.addItem("444",66);
_root.photolist.setChangeHandler("displayDetails");
stop();

```
