main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <!-- http://blog.flexexamples.com/2007/09/23/creating-drop-shadows-on-the-flex-textarea-control/ -->
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <mx:ApplicationControlBar dock="true">
- <mx:Form>
- <mx:FormItem label="dropShadowEnabled:">
- <mx:CheckBox id="checkBox" selected="true" />
- </mx:FormItem>
- <mx:FormItem label="dropShadowColor:">
- <mx:ColorPicker id="colorPicker" />
- </mx:FormItem>
- <mx:FormItem label="shadowDirection:">
- <mx:ComboBox id="comboBox" selectedIndex="1">
- <mx:dataProvider>
- <mx:Array>
- <mx:Object label="left" />
- <mx:Object label="center" />
- <mx:Object label="right" />
- </mx:Array>
- </mx:dataProvider>
- </mx:ComboBox>
- </mx:FormItem>
- <mx:FormItem label="shadowDistance:">
- <mx:HSlider id="slider"
- minimum="-10"
- maximum="10"
- value="0"
- labels="[-10,-5,0,5,10]"
- liveDragging="true"
- snapInterval="1"
- tickInterval="2" />
- </mx:FormItem>
- </mx:Form>
- </mx:ApplicationControlBar>
- <mx:TextArea id="textArea"
- dropShadowEnabled="{checkBox.selected}"
- dropShadowColor="{colorPicker.selectedColor}"
- shadowDistance="{slider.value}"
- shadowDirection="{comboBox.selectedItem.label}"
- width="320"
- height="120" />
- </mx:Application>