0
我正在學習Adobe Air,並希望獲得我創建的微調列表中的當前選定項目,但是每次使用selectedItem無論我選擇什麼選項,我都會一直得到相同的值。我試圖讓該劇本的應用程序,和本我SpinnerList代碼:如何使用微調列表訪問Adobe Air中的選定項目?
<s:SpinnerListContainer x="10" y="279" width="325" height="266">
<s:SpinnerList width="69" height="100%" enabled="true" labelField="data" selectedIndex="1" id="From">
<s:ArrayList>
<fx:Object data="Time"></fx:Object>
<fx:Object data="KM"></fx:Object>
<fx:Object data="Miles"></fx:Object>
</s:ArrayList>
</s:SpinnerList>
</s:SpinnerListContainer>
不管是什麼,「KM」是始終顯示爲所選項目時,它不是。這是我的腳本標記:
var selected = From.selectedItem;
我怎樣才能解決這個問題? 謝謝