1

我有以下定义的状态:

<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如何,我应该怎么做才能实现它们之间的平滑过渡?也许是一个淡出淡入效果左右?

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

1 回答 1

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>

它就像滑入/滑出..

于 2012-05-11T11:06:57.303 回答