本文主要是介绍flex resize,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
<?xml version="1.0"?>
<!-- controls\image\ImageResize.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"><mx:Script><![CDATA[private var hideFlag:Boolean = true;private function resizeF():void {if(!hideFlag) {up.play();} else {down.play();}hideFlag=!hideFlag;}]]></mx:Script><mx:Resize id="resizeBig" widthFrom="20" widthTo="200" heightFrom="30" heightTo="300"/><mx:Resize id="resizeSmall" widthFrom="200" widthTo="20" heightFrom="300" heightTo="30"/><!--第二种方式--><mx:Resize id="up"duration="500"target="{img1}"heightTo="0"></mx:Resize><mx:Resize id="down"duration="500"target="{img1}"heightTo="23"></mx:Resize><mx:HBox><mx:Image width="22" height="27"source="@Embed('assets/left1.png')" rollOverEffect="{resizeBig}" rollOutEffect="{resizeSmall}"/><mx:Image id="img1" source="@Embed('assets/left1.png')"/><mx:Button click="resizeF()" label="Resize"/></mx:HBox></mx:Application>
这篇关于flex resize的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!