【问题标题】:flex: how to Make two resize effect at the same timeflex:如何同时制作两个调整大小的效果
【发布时间】:2010-06-12 14:46:05
【问题描述】:

喂,

是否可以在 Accordion 大小更改的同时调整应用程序的大小,以使调整大小与最后一个与应用程序的调整大小同步?

在我的代码中,应用程序在 Accordion 调整大小完成后调整大小:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                layout="absolute" minWidth="400" minHeight="300" backgroundColor="white" horizontalScrollPolicy="off" verticalScrollPolicy="off" mouseDown="stage.nativeWindow.startMove()">



    <mx:Resize id="expand" target="{application}" heightTo="{acc01.height}"/>
    <mx:Accordion id="acc01" x="0" y="0" resizeToContent="true" resize="expand.play();" horizontalScrollPolicy="off" verticalScrollPolicy="off">
        <mx:VBox label="Accordion Pane 1" width="100%" height="100%">            
            <mx:Label text="hello"/>
            <mx:Label text="hello"/>
            <mx:Label text="hello"/>
            <mx:Label text="hello"/>
        </mx:VBox>
        <mx:VBox label="Panel 2" width="100%" height="100%">
            <mx:Label text="hello"/>
            <mx:Label text="hello"/>
        </mx:VBox>
        <mx:VBox label="Panel 3" width="100%" height="100%">
               <mx:Label text="hello"/>
            <mx:Label text="hello"/>
        </mx:VBox>
        <mx:VBox label="Panel 4" width="100%" height="100%">
               <mx:Label text="hello"/>
            <mx:Label text="hello"/>
        </mx:VBox>
    </mx:Accordion>
</mx:Application>

【问题讨论】:

    标签: apache-flex animation flex3 flex-mx


    【解决方案1】:

    看看http://livedocs.adobe.com/flex/3/langref/mx/effects/Parallel.html,它可能会满足您的需求。

    【讨论】:

    • 这个类不能同时作用于一个对象。我需要对两个对象异步运行效果。
    • Resize 效果有一个 targets 属性,该属性接受一个对象数组来并行执行转换。
    猜你喜欢
    • 2011-10-08
    • 2011-05-22
    • 2014-06-03
    • 2021-12-26
    • 1970-01-01
    • 1970-01-01
    • 2016-02-23
    • 1970-01-01
    • 2012-01-17
    相关资源
    最近更新 更多