目次 |
---|
・VSliderとは ・VSliderのソース ・VSliderのサンプル |
<?xml version="1.0"?> <!-- Simple example to demonstrate the VSlider control. --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ private var imageWidth:Number=0; private var imageHeight:Number=0; private function onChange():void { phoneImage.width=uint(imageWidth*hSlider.value/100); phoneImage.height=uint(imageHeight*hSlider.value/100); } ]]> </mx:Script> <mx:HBox width="50%"> <mx:VSlider id="hSlider" minimum="0" maximum="200" value="100" snapInterval="1" tickInterval="10" labels="['0%','100%','200%']" allowTrackClick="true" liveDragging="true" change="onChange();"/> <mx:Image id="phoneImage" source="@Embed('call_green_white_124x52.png')" creationComplete="imageWidth=phoneImage.width; imageHeight=phoneImage.height;" /> </mx:HBox> </mx:Application>