Please clarify: You want to set the entityID on the fly?  Or is it 
already set and you want to be able to retrieve it when a person 
selects one of the item in the combobox?

I'm guessing you meant the 2nd and if you are, then you can just 
create an event handler for "change":

function comboBoxSelect(event:ListEvent):void {
  var obj:Object = event.currentTarget.selectedItem;
  trace(obj.entityID + "");
}

--- In [email protected], "Nate Pearson" <[EMAIL PROTECTED]> 
wrote:
>
> I have a combo box that has a data provider
> 
> The data looks like this.
> myEntityArray:
> entityName
> entityID
> 
> 
> My combobox looks like this:
> <mx:ComboBox dataProvider="{myEntityArray}" 
labelField="entityName"/>
> 
> 
> When this data loads I want to set the selected combobox value to an
> entityID.  I.E.  I'll want to set the entityID to 234.  
> 
> Note: EntityID != selectedIndex
> 
> Any ideas?
> 
> Thanks!
> 
> Nate
>


Reply via email to