mwmitchell
04-11-2006, 05:34 AM
Hi,
I've been trying for quite a while now to get an event handler attached to a list component, list item. I can't seem to get it working at all. So, hoping someone here could help? :)
My goal:
click on item in list
drag item (ghost of item appears) to any location
release: ghost goes back to list item and is then removed
I can pretty much handle all of that and the code needed to handle the drop, but I need to handle the initial event first. Here is what I have now. content_mc seems to be a container for all of the list items?
for(i in list1.content_mc){
var item:Object = list1.content_mc[i];
item.addEventListener('click', function(){ trace('click'); });
}
Thanks!
I've been trying for quite a while now to get an event handler attached to a list component, list item. I can't seem to get it working at all. So, hoping someone here could help? :)
My goal:
click on item in list
drag item (ghost of item appears) to any location
release: ghost goes back to list item and is then removed
I can pretty much handle all of that and the code needed to handle the drop, but I need to handle the initial event first. Here is what I have now. content_mc seems to be a container for all of the list items?
for(i in list1.content_mc){
var item:Object = list1.content_mc[i];
item.addEventListener('click', function(){ trace('click'); });
}
Thanks!