[web] flash listbox problem
I am trying to get the selectIndex of the listbox but it always come up undefined.
Heres what I have. I have two list boxs on the left, and a button that moves the list box contents to the one on the right. I am trying to get the selected index of the first one because thats the option to move all the items over. Also its not returning the length of the list box. I have a function in the frame declaration that I call when the button is released. By the way I have only used flash for a couple of weeks. Thanks for the help.
I have the same problem, but have been using FLash for years, so dont worry!
I am trying to delete items from a listbox component, although my listbox is a special PPC component for exporting flash to PDA's. Here is the code for my delete button
//----delete button
delete_Listener = new Object();
delete_Listener.click = function ()
{
delete_item = item_list.selectedIndex
trace(delete_item)
item_list.removeItemAt(delete_item);
}
btn_delete.addEventListener("click", delete_Listener);
delete_item is always undefined, so "item_list.selectedIndex" is obviously not doing what it is supposed to.
Can anyone help?
-David Ball
davidball@Silktide.com
I am trying to delete items from a listbox component, although my listbox is a special PPC component for exporting flash to PDA's. Here is the code for my delete button
//----delete button
delete_Listener = new Object();
delete_Listener.click = function ()
{
delete_item = item_list.selectedIndex
trace(delete_item)
item_list.removeItemAt(delete_item);
}
btn_delete.addEventListener("click", delete_Listener);
delete_item is always undefined, so "item_list.selectedIndex" is obviously not doing what it is supposed to.
Can anyone help?
-David Ball
davidball@Silktide.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement