<?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"
viewSourceURL="srcview/index.html"
width="250" height="150">
<s:HGroup left="5">
<s:VGroup>
<s:Group>
<s:Label text="Width:" baseline="15"/>
<s:TextInput id="widthInput" text="100" x="50" width="30" baseline="15"/>
</s:Group>
<s:Group>
<s:Label text="Height:" baseline="15"/>
<s:TextInput id="heightInput" text="80" x="50" width="30" baseline="15"/>
</s:Group>
<s:DropDownList id="fillModeInput" width="80" selectedItem="scale">
<s:dataProvider>
<s:ArrayCollection>
<fx:String>scale</fx:String>
<fx:String>clip</fx:String>
<fx:String>repeat</fx:String>
</s:ArrayCollection>
</s:dataProvider>
</s:DropDownList>
<s:CheckBox id="smoothInput" label="Smooth" selected="true"
enabled="{fillModeInput.selectedItem == 'scale'}"/>
</s:VGroup>
<s:Group>
<s:BitmapImage source="@Embed(source='images/Bridge.jpg')"
smooth="{smoothInput.selected}"
fillMode="{fillModeInput.selectedItem}"
width="{Number(widthInput.text)}"
height="{Number(heightInput.text)}"/>
<s:Rect left="0" top="0" right="0" bottom="0">
<s:stroke>
<s:SolidColorStroke color="black"/>
</s:stroke>
</s:Rect>
</s:Group>
</s:HGroup>
</s:Application>