# Action Script problem?

**URL:** <https://forum.kirupa.com/t/action-script-problem/184788>\
**Category:** Uncategorized\
**Created:** [April 7, 2006, 6:52pm UTC](https://forum.kirupa.com/t/action-script-problem/184788 "2006-04-07T18:52:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)\
**Post date:** [April 7, 2006, 6:52pm UTC](https://forum.kirupa.com/t/action-script-problem/184788/1 "2006-04-07T18:52:01Z")

</div>

I am using the following code. Where \*\*list \*\*is an instance of a **ListBox.**

```auto

function displayDetails(c)
{
   trace("I am in displaydetails");
}
 
**list**.setChangeHandler("displayDetails");

```

The call to displayDetails function is NEVER done.  
Why?  
Any ideas, hints?  
PLEASE help.:hangover:  
Leo.

---

<div class="post-metadata">

**Author:** ![watcher](https://avatars.discourse-cdn.com/v4/letter/w/77aa72/32.png) [@watcher](https://forum.kirupa.com/u/watcher)\
**Post date:** [April 7, 2006, 7:19pm UTC](https://forum.kirupa.com/t/action-script-problem/184788/2 "2006-04-07T19:19:26Z")

</div>

> [@Leo75](#):
>
> I am using the following code. Where \*\*list \*\*is an instance of a **ListBox.**
> 
> ```auto
> 
> function displayDetails(c)
> {
> trace("I am in displaydetails");
> }
>  
> **list**.setChangeHandler("displayDetails");
> 
> ```
> 
> The call to displayDetails function is NEVER done.  
> Why?  
> Any ideas, hints?  
> PLEASE help.:hangover:  
> Leo.

setChangeHandler?

I dont see such event/method available in list class/listbox …

i see similiarity in event List.change maybe… What are you trying to do there? [maybe you can post FLA]

---

<div class="post-metadata">

**Author:** ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)\
**Post date:** [April 7, 2006, 7:53pm UTC](https://forum.kirupa.com/t/action-script-problem/184788/3 "2006-04-07T19:53:30Z")

</div>

Hey, i am trying to post the file here so u can check it up.  
But for some reason, the file is too big to b uploaded.  
Can i send it to ur email? Send me a private msg with ur email, pls.  
Thanks.  
Leo.

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [April 8, 2006, 12:04am UTC](https://forum.kirupa.com/t/action-script-problem/184788/4 "2006-04-08T00:04:08Z")

</div>

I think you are looking for something like this 🙂

```auto
function displayDetails(evtObj:Object):Void {
 trace(evtObj.target + " called displayDetails by broadcasting " + evtObj.type + ". The label of the selected item is " + evtObj.target.selectedItem.label + ".");
 trace(" __________________________________________________________________________");
}
list.addEventListener("change", displayDetails);

```
