弯曲状态之间的平滑过渡

时间:2012-05-10 10:55:01

标签: flex fade effects transitions states

我的状态定义如下:

<s:states>      
    <s:State name="DoorState"/>
    <s:State name="TvState"/>
    <s:State name="LightsState"/>
    <s:State name="BlindsState"/>
    <s:State name="BedState"/>              
</s:states>

每个都会触发一个组件出现,无论fromState和toState,我应该如何实现它们之间的平滑过渡?也许是fadeOut -fadeIn效果左右??

<s:transitions>
    <s:Transition fromState="*" toState="*">
        ???
    </s:Transition>
</s:transitions>

1 个答案:

答案 0 :(得分:1)

我使用了下面的过渡

<s:transitions>
    <s:Transition fromState="*" toState="DoorState">
            <s:Move xFrom="1366" xTo="0" duration="500" target="{doorComponent}"/>
    </s:Transition>
    <s:Transition fromState="*" toState="LightsState">
        <s:Move xFrom="1366" xTo="0" duration="500" target="{lightsComponent}"/>
    </s:Transition>
    <s:Transition fromState="*" toState="BedState">
        <s:Move xFrom="1366" xTo="0" duration="500" target="{bedComponent}"/>
    </s:Transition>
    <s:Transition fromState="*" toState="BlindsState">
        <s:Move xFrom="1366" xTo="0" duration="500" target="{blindsComponent}"/>
    </s:Transition>
    <s:Transition fromState="*" toState="TvState">
        <s:Parallel>                
            <s:Move xFrom="1366" xTo="0" duration="500" target="{tvComponent}"/>
        </s:Parallel>
    </s:Transition>
</s:transitions>

就像滑入/滑出......