How do you reset an AS3 list component so that nothing is selected (NOT selectedIndex=0)
-
06-07-2019 - |
Question
I have a list component on the stage in an AS3 movie. I populate it with values at runtime and the user can select multiple values.
When a button is clicked I want the list to reset to a state where nothing is selected, all I can figure out is to set the selected index to 0 and have the first position on the list either blank or reading "choose from the list" and make the code ignore this if it is selected.
Is there a way to reset list (and combobox components) to nothing selected.
thanks
Solution
OK I found it: selectedIndex = -1
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow