0

如何将组(大小未知)添加到具有转换效果的 SkinnableContainer?

示例
首先,将 SkinnableContainer 平滑地调整为其最终大小,然后在 Group 中淡入淡出。

此处
的问题 Group-size 是通过将其添加到 SkinnableContainer 来确定的。这样做,SkinnableContainer 获得最终大小并显示组,而不播放过渡效果。

我发现的所有示例都是基于 MXML 和状态的。但我在这里需要一个仅限 Actionscript 的解决方案。

4

1 回答 1

0
 <fx:Declarations>
    <s:Parallel id="showEff">
        <s:Rotate3D angleYFrom="-90" angleYTo="0" duration="7000"/>
        <s:Fade alphaFrom="0.0" alphaTo="1.0" duration="7000" />
        <mx1:WipeRight duration="9000"/>
    </s:Parallel>

    <s:Parallel id="hideEff">
        <s:Rotate3D angleYFrom="0" angleYTo="-90" duration="4000" />
        <s:Fade alphaFrom="1.0" alphaTo="0.0"  duration="7000"/>
        <mx1:WipeRight duration="5000"/>
    </s:Parallel>
</fx:Declarations>


    <s:Button id="btn"
              label="Toggle Panel visibility"
              click="skinnableContainerPanel.visible =      !skinnableContainerPanel.visible;" />

 <s:Panel id="skinnableContainerPanel" title="Using SkinnableContainer" 
         width="500" height="300" showEffect="{showEff}"
         hideEffect="{hideEff}" >
    <s:layout>
        <s:VerticalLayout  gap="10" verticalAlign="middle" 
                           horizontalAlign="center"/>
    </s:layout>
<s:SkinnableContainer
    skinClass="com.SkinnableContainerSkin" 
    width="50%" height="50%" horizontalCenter="0"
    verticalCenter="0">
    <s:HGroup horizontalCenter="0" verticalCenter="0"  >
        <s:BorderContainer width="50" height="50"  
                           borderWeight="2"   color="0x323232" />
        <s:BorderContainer width="50" height="50"  
                           borderWeight="2" color="0x323232" />
        <s:BorderContainer width="50" height="50" 
                           borderWeight="2" color="0x323232" />
    </s:HGroup>
</s:SkinnableContainer>
</s:Panel>
于 2013-01-29T07:39:44.520 回答