xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
import mx.events.ColorPickerEvent;
import mx.events.DropdownEvent;
public function openEvt(event:DropdownEvent):void {
descriptBox.text="";
}
public function changeEvt(event:ColorPickerEvent):void {
descriptBox.text=event.currentTarget.selectedItem.cName + ": " + event.currentTarget.selectedItem.cDescript;
}
.myStyle { swatchWidth:25; swatchHeight:25; textFieldWidth:95; }
colorField="cVal" change="changeEvt(event)" open="openEvt(event)"
swatchPanelStyleName="myStyle" editable="false">
cDescript="A bright, light color." />
cDescript="It's HOT!" />
cDescript="Goes well with warm colors." />
cDescript="The conservative favorite." />
cDescript="Great outdoorsy look." />
cDescript="An old reliable." />