<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
viewSourceURL="srcview/index.html"
width="300" height="195">
<s:VGroup x="10" y="5">
<s:Group>
<s:Label text="Start:" baseline="15"/>
<mx:ColorPicker id="startColor" selectedColor="0x080808"
width="30" x="60"/>
</s:Group>
<s:Group>
<s:Label text="End:" baseline="15"/>
<mx:ColorPicker id="endColor" selectedColor="0x808080"
width="30" x="60"/>
</s:Group>
<s:Group>
<s:Label text="Rotation:" baseline="15"/>
<s:TextInput id="rotationInput" text="0" width="30"
x="60" baseline="15"/>
</s:Group>
<s:Group>
<s:Label text="x, y:" baseline="15"/>
<s:TextInput id="xInput" text="0" width="30"
baseline="15" x="25"/>
<s:TextInput id="yInput" text="0" width="30"
baseline="15" x="60"/>
</s:Group>
<s:Group>
<s:Label text="scaleX:" baseline="15"/>
<s:TextInput id="scaleXInput" text="{rect.width}" width="30"
baseline="15" x="60"/>
</s:Group>
<s:Label text="Spread Method:"/>
<s:DropDownList id="spreadMethodInput" selectedItem="cap"
width="90">
<s:dataProvider>
<s:ArrayCollection>
<fx:String>cap</fx:String>
<fx:String>repeat</fx:String>
<fx:String>reflect</fx:String>
</s:ArrayCollection>
</s:dataProvider>
</s:DropDownList>
</s:VGroup>
<s:Group x="110" y="5">
<s:Rect id="rect" width="180" height="180">
<s:stroke>
<s:SolidColorStroke color="black"/>
</s:stroke>
<s:fill>
<s:LinearGradient rotation="{Number(rotationInput.text)}"
x="{Number(xInput.text)}" y="{Number(yInput.text)}"
scaleX="{Number(scaleXInput.text)}"
spreadMethod="{spreadMethodInput.selectedItem}">
<s:GradientEntry color="{startColor.selectedColor}"/>
<s:GradientEntry color="{endColor.selectedColor}"/>
</s:LinearGradient>
</s:fill>
</s:Rect>
</s:Group>
</s:Application>