Action Script problem?

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


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]

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.

I think you are looking for something like this :slight_smile:

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);