Triggering effects when a container is resized


The following example uses a resizeEffect effect along with a Resize tween effect (<mx:Resize />) to create a smooth tween effect whenever the panel is resized
<?xmlversion="1.0"encoding="utf-8"?>
<!--http://blog.flexexamples.com/2007/09/23/triggering-effects-when-a-container-is-resized/-->
<mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml"
layout
="vertical"
verticalAlign
="middle"
backgroundColor
="white">

<mx:Script>
<![CDATA[
privatefunctionsizePanel(w:uint,h:uint):void{
panel.width=w;
panel.height=h;
}
]]>
</mx:Script>

<mx:Resizeid="resize"/>

<mx:ApplicationControlBardock="true">
<mx:Buttonlabel="160x160"
click
="sizePanel(160,160);"/>
<mx:Buttonlabel="240x160"
click
="sizePanel(240,160);"/>
<mx:Buttonlabel="160x240"
click
="sizePanel(160,240);"/>
<mx:Buttonlabel="320x240"
click
="sizePanel(320,240);"/>

<mx:Spacerwidth="100%"/>

<mx:Labeltext="w:{panel.width},h:{panel.height}"/>
</mx:ApplicationControlBar>

<mx:Panelid="panel"
title
="title"
status
="status"
width
="320"
height
="240"
resizeEffect
="{resize}">
<mx:Accordionid="accordion"
historyManagementEnabled
="false"
width
="100%"
height
="100%">
<mx:VBoxlabel="ShippingInformation"/>
<mx:VBoxlabel="BillingInformation"/>
</mx:Accordion>
<mx:ControlBarid="cb">
<mx:Button/>
</mx:ControlBar>
</mx:Panel>

</mx:Application>

优质内容筛选与推荐>>
1、2008工作计划
2、AX2012预览
3、Objective-C基础知识
4、draw sin
5、201521123059 《Java程序设计》第十一周学习总结


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号