Reset a combo box AS3

You can set selectedIndex to 0 and it will just reset the combo box to the first selectable item in the list…

myComboBox.selectedIndex = 0;

However if you define the prompt property, then setting selectedIndex to zero won’t get you what you want. instead do this and it will be just like when you first started:

myComboBox.selectedItem = myComboBox.prompt;

2 Responses to “Reset a combo box AS3”

  1. Thangaraj Says:
    December 6, 2011 at 5:51 am

    Thank you very much

  2. thnx very much big time

Leave a Reply