Use Slider to control the image width, height and alpha
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:VBox x="0" y="0" height="100%" horizontalAlign="center">
<mx:ComboBox id="imageUrl">
<mx:Array>
<mx:Object label="A" data="a.jpg" />
<mx:Object label="B" data="logo.jpg" />
</mx:Array>
</mx:ComboBox>
<mx:Canvas width="160" height="120">
<mx:Image id="image" alpha="0"
maintainAspectRatio="false" />
</mx:Canvas>
<mx:Label text="Alpha"/>
<mx:HSlider id="imageAlpha" minimum="0" maximum="1" value="1" liveDragging="true" />
<mx:Label text="Width"/>
<mx:HSlider id="imageWidth" minimum="0" maximum="160" value="60" liveDragging="true" />
<mx:Label text="Height"/>
<mx:HSlider id="imageHeight" minimum="0" maximum="120" value="20" liveDragging="true" />
</mx:VBox>
<mx:Binding source="imageAlpha.value" destination="image.alpha" />
<mx:Binding source="imageWidth.value" destination="image.width" />
<mx:Binding source="imageHeight.value" destination="image.height" />
<mx:Binding source="imageUrl.value" destination="image.source" />
</mx:Application>
Related examples in the same category