Home > adobe air > Learning Employee Directory 3.3 Component

Learning Employee Directory 3.3 Component

February 13th, 2008

Return to table of contents
1. CustomAutoComplete

This component can be very useful. It pops up a list of suggestions based on characters entered by the user. This is a very simple example on how to use it:

<controls:CustomAutoComplete id="searchInput"
dataProvider="{ searchResults }"

And below is the the script part of the main mxml file I used to test this component.

   import mx.controls.Alert;

   import mx.collections.ArrayCollection;

   private var searchResults:ArrayCollection  = new ArrayCollection();
   private var all:ArrayCollection  = new ArrayCollection();
   private function init():void
    all.addItem({displayName:"abc", name:"Jack Smith"});
    all.addItem({displayName:"abd", name:"John Win"});
    all.addItem({displayName:"abe", name:"Bob XC"});
    all.addItem({displayName:"acd", name:"LIN Bobby"});
    all.addItem({displayName:"efg", name:"xie iix"});
    all.addItem({displayName:"efv", name:"xfe abc"});
    all.addItem({displayName:"hik", name:"45 65"});
   private function onTextChange():void
    var ii:int;
     if (all[ii].displayName.indexOf(searchInput.typedText) != -1)
   private function onSelectionChange():void
Author: Xu Cui Categories: adobe air Tags:
Try Stork, a research tool we developed

Stork is a publication alert app developed by us at Stanford. As a researcher we often forget to follow up important publications - and it's practically impossible to search many keywords or researchers' names everyday. Stork can help us to search everyday and notifies us when there are new publications/grants. How Stork helped me?

About the author:

Xu Cui is a human brain research scientist in Stanford University. He lives in the Bay Area in the United States. He is also the founder of Stork (smart publication alert app), PaperBox and BizGenius.


He was born in He'nan province, China. He received education in Beijing University(BS), University of Tennessee (Knoxville) (MS), Baylor College of Medicine (PhD) and Stanford University (PostDoc). Read more ...
  1. No comments yet.