<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
//Import the event classes.
import flash.events.Event;
public function openEvt(event:Event):void {
forChange.text="打开";
}
public function changeEvt(event:Event):void {
forChange.text="所选项目: " +
event.target.selectedItem + "所选指针: " +
event.target.selectedIndex;
}
]]>
</mx:Script>
<mx:Panel title="调色盘控件示例" height="75%" width="75%"
paddingTop="10" paddingBottom="10"
paddingLeft="10" paddingRight="10">
<mx:TextArea id="forChange" width="150"/>
<mx:ColorPicker id="cp" open="openEvt(event);" change="changeEvt(event);"/>
</mx:Panel>
</mx:Application>