title: AS3, how to trigger a search function when item is selected in combobox?
body: <p>I have a combobox that act as autosuggestion for a search application. Search function is getting triggered by a search button. I also want to trigger the search function either when the item in combobox is double or single clicked. Code:</p>
  
  <pre><code> //for triggering search function from combobox(search_complex) it will be   
     something like that but i am not sure 
     search_complex.addEventListener(Event.CHANGE, search);
     search(event:Event):void{//something will come hereto use "selctedItem" to
     trigger search function}
  
  
   //search function which is working fine by pressing search button
   bt_search.addEventListener(MouseEvent.CLICK, search);
   function search(MouseEvent):void{
   currentUserbase = [];
   for (var n:int = 0; n&lt;allUserbase.length; n++)
   { 
   for (var k:int = 0; k&lt;allUserbase[n].complex.length; k++)
   {
   if ((allUserbase[n].complex[k].value.toLowerCase() == 
   search_complex.text.toLowerCase() || search_complex.text==""))
   {   
   currentUserbase.push(allUserbase[n]);
   }
   }
   }
   updateList();
   }//end search
  </code></pre>