IT기술/Flex

flex 8 Bindable

dobbby 2008. 11. 20. 10:00
반응형



ColorPickerTest.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
 <mx:Script>
  <![CDATA[
   [Bindable]
   var nc:uint;
   public function changed():void{
    nc = cp.selectedColor;
   }
  ]]>
 </mx:Script>
 <mx:Panel width="250" height="248" layout="absolute" horizontalCenter="0" verticalCenter="0" backgroundColor="{nc}" title="colorpicker test">
  <mx:ColorPicker horizontalCenter="94" verticalCenter="-83" id="cp" change="changed();"/>
 </mx:Panel>
 <mx:Text text="colorpicker에서 원하는 색상을 선택하면 panel 색상이 바뀝니다." horizontalCenter="0" color="#FFFFFF" fontSize="15" verticalCenter="-150"/>
</mx:Application>
반응형