Flex的顏色拾取負荷顏色我有我想要從外部XML加載自己的顏色的顏色拾取,我的XML看起來像這樣從XML
<colors>
<color label="Aqua" colorHex="0xFFFFCC"/>
<color label="Forest Green" colorHex="0xCCFF00"/>
<color label="Kelly Green" colorHex="0xCCFF00"/>
<color label="Royal Blue" colorHex="0xCCFF00"/>
<color label="Columbia Blue" colorHex="0xCCFF00"/>
<color label="Navy Blue" colorHex="0xCCFF00"/>
<color label="Purple" colorHex="0xCCFF00"/>
<color label="Maroon" colorHex="0xCCFF00"/>
<color label="Cardinal" colorHex="0xCCFF00"/>
<color label="Garnet" colorHex="0xCCFF00"/>
<color label="Red" colorHex="0xCCFF00"/>
<color label="Orange" colorHex="0xCCFF00"/>
<color label="Texas Orange" colorHex="0xCCFF00"/>
<color label="Light Gold" colorHex="0xCCFF00"/>
<color label="Vega Gold" colorHex="0xCCFF00"/>
<color label="Brown" colorHex="0xCCFF00"/>
<color label="Black" colorHex="0xCCFF00"/>
<color label="Silver" colorHex="0xCCFF00"/>
<color label="White" colorHex="0xCCFF00"/>
<color label="Pink" colorHex="0xCCFF00"/>
</colors>
所以我加載XML,加入到與綁定變量XML類型和添加對ColorPicker的這樣
[Bindable] private var colorsDp:XML;
colorsDP = XML(loader.data);// the loader is an object that has the xml loaded
<mx:ColorPicker id="cp" dataProvider="{colorsDp}" labelField="label" colorField="colorHex" editable="false"/>
的文檔說,我可以使用爲數據提供器爲XML,數組,ArrayCollection的,xmlListColletion等的dateprovider,由於DataProvider轉換爲數據的ICollectionView ,但不起作用,爲什麼?
你確定它確實正在加載? – 2010-02-02 23:32:03