?
转载自 http://blog.sina.com.cn/s/blog_6d0dc2a90100o3a9.html

tips:设置bmp.smoothing = true 后,图片缩放没有锯齿了,
??? allowTrackClick表示可以在滑动条上面点击;
??? tickInterval设置刻度的间距;
??? label 是指起始值和结束值;
??? snapInterval可以设置一次移动的距离;
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
?<mx:Script>
??<![CDATA[
???import mx.controls.Alert;
???public var w:Number;
???public var h:Number;
???private function loadImg(e:Event):void{
????//使缩放时没有锯齿;
????var bmp:Bitmap = e.target.content as Bitmap
????bmp.smoothing = true;
????w = plane.width;
????h = plane.height;
????//Alert.show(w.toString());
???}
???private function changeSize():void{???
????plane.width = hslider.value * w / 100;
????plane.height = hslider.value * w / 100;
???}
???
??]]>
?</mx:Script>
?
?<mx:Panel title="HSlider" height="260" paddingTop="20" paddingBottom="20" paddingLeft="20" paddingRight="20" horizontalAlign="center" verticalAlign="bottom">
??<mx:Image id="plane" source="@Embed('images/plane.png')" creationComplete="loadImg(event)" />
??<mx:HSlider id="hslider" change="changeSize()" minimum="10" maximum="100" value="100" allowTrackClick="true" tickInterval="10" labels="[10%,100%]" />
??<!-- snapInterval="10"属性可以指定当用户移动滑块时滑块的增值 -->?</mx:Panel>?</mx:Application>