I have a regular control in my code with several items.
<mx:List id='myList'> <mx:String>Item 1</mx:String> <mx:String>Item 2</mx:String> </mx:List>
I have some other code which runs and populates the list. How do I select the first item in the newly populated list using code?
That would be
myList.selectedItem, if you have a reference to the object you would like to select, ormyList.selectedIndex, if you have an index into the data source. Both properties are inherited from the ListBase class. They’re documented in the ActionScript 3.0 Language Reference.