怎么才能得到 combox 下拉框中的值

  [color=darkred]<?xml version="1.0" encoding="utf-8"?>



mx:ArrayCollection


/mx:ArrayCollection
/mx:ComboBox
mx:Script
<![CDATA[
import mx.controls.Alert;
import flash.events.Event;
public function myTestDispaly(event:flash.events.Event):void{
mx.controls.Alert.show();
}

    public function init():void{
        combox.addEventListener(flash.events.Event.CHANGE,myTestDispaly);
    }
    ]]>
</mx:Script>

/mx:Application[/color]

怎么在这个方法中 public function myTestDispaly(event:flash.events.Event):void{
mx.controls.Alert.show();
}
得到 combox 中的值?

各位 谢谢了

看看datachange的API

[code="java"]dataChange Event

Event Object Type: mx.events.FlexEvent
property FlexEvent.type = mx.events.FlexEvent.DATA_CHANGE
Dispatched when the data property changes.

When you use a component as an item renderer, the data property contains an item from the dataProvider. You can listen for this event and update the component when the data property changes.

The FlexEvent.DATA_CHANGE constant defines the value of the type property of the event object for a dataChange event.
The properties of the event object have the following values:

Property Value
bubbles false
cancelable false
currentTarget The Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
target The Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.[/code]

我觉得这样应该可以

[code="java"]public function myTestDispaly(event:flash.events.Event):void{
mx.controls.Alert.show();
event.currentTarget.selectedItem.label + " " +
event.currentTarget.selectedIndex;
}
[/code]