sstauross
sstauross

Reputation: 2680

flex smooth transition between states

i have the states defined below:

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

Each of them fires a component to appear, what should i do to achieve a smooth transition between them no matter the fromState and toState? maybe a fadeOut-fadeIn effect or so??

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

Upvotes: 1

Views: 1413

Answers (1)

sstauross
sstauross

Reputation: 2680

i used the transition below

<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>

its like slide in/out..

Upvotes: 1

Related Questions