<?xml version="1.0" encoding="utf-8"?> <!--- Spark Image Sample --> <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" xmlns:component = "jp.taiga.component.*" fontSize = "25" fontWeight = "bold" viewSourceURL="srcview/index.html"> <fx:Script> <![CDATA[ protected function buttonSamllClickHandler():void { var url_:String = "http://farm5.static.flickr.com/4022/4384453886_06fb17824f_m.jpg"; image.source = new URLRequest(url_); } protected function buttonMediumClickHandler():void { var url_:String = "http://farm5.static.flickr.com/4022/4384453886_06fb17824f_z.jpg"; image.source = new URLRequest(url_); } protected function buttoLargeClickHandler():void { var url_:String = "http://farm5.static.flickr.com/4022/4384453886_ea6a8723ff_o.jpg"; image.source = new URLRequest(url_); } protected function buttonDummyClickHandler():void { var url_:String = "invalidURL"; image.source = new URLRequest(url_); } ]]> </fx:Script> <s:VGroup width="100%" height="100%" gap="10" paddingTop="10" paddingBottom="10" horizontalAlign="center" verticalAlign="middle"> <s:HGroup> <s:Button width="200" height="50" label="240 x 180" click="buttonSamllClickHandler()" /> <s:Button width="200" height="50" label="640 x 480" click="buttonMediumClickHandler()" /> <s:Button width="200" height="50" label="1200 x 900" click="buttoLargeClickHandler()" /> <s:Button width="200" height="50" label="Dummy URL" click="buttonDummyClickHandler()" /> </s:HGroup> <component:CustomImage id = "image" width = "100%" height = "100%" backgroundAlpha = "1" backgroundColor = "#990000" skinClass = "jp.taiga.component.skin.SparkImageAssetSkin" smooth = "true" smoothingQuality = "{checkBox.selected ? 'high' : 'default'}" /> <s:CheckBox id = "checkBox" label = "{checkBox.selected ? 'smoothingQuality : high' : 'smoothingQuality : default'}" skinClass = "jp.taiga.component.skin.CustomCheckBoxSkin" /> </s:VGroup> </s:Application>