Posted By

Lindsey on 06/17/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

thastyle


Advanced AutoComplete Script


 / Published in: ActionScript 3
 

  1. private var autoCompleteDropDownShown:Boolean = false;
  2.  
  3. /**
  4. * Removes filters on the dataprovider so that the whole list can be shown when the AutoComplete
  5. * component is clicked. showDropDown on the AdvancedAutoComplete component is called.
  6. * If clicked again, hideDropDown is called.
  7. */
  8. public function onClickAutoComplete():void
  9. {
  10. if ( organizationList != null )
  11. {
  12. organizationList.filterFunction = null;
  13. organizationList.refresh();
  14.  
  15. if ( !autoCompleteDropDownShown )
  16. {
  17. orgAutoComplete.showDropDown();
  18. autoCompleteDropDownShown = true;
  19. }
  20. else
  21. {
  22. orgAutoComplete.hideDropDown();
  23. autoCompleteDropDownShown = false;
  24. }
  25. }
  26. }

Report this snippet  

You need to login to post a comment.