4 Replies Latest reply on May 2, 2011 4:32 PM by Teriath

    Weird bugs when using transitions


      I'm trying to use a transition to do a simple collapse/uncollapse of a component and I'm getting some weird issues. The main problem is that every time the animation finishes it resets to the y coordinates that it started at for some reason and I can't figure out how to make it stop. Here's the code I'm using to animate. Just for reference, the current values of _openY is -73 and _closedY is -13. So after the animation finishes every time it ends up back at -13 for some reason.



           <s:State name="closed"/>
           <s:State name="open"/>
           <!-- Transitions from the closed to open state, animating it shrinking and the icon rotating to point downwards -->
           <s:Transition fromState="*" toState="open">
                <s:Parallel duration="300">
                  <s:Move yFrom="{_closedY}" yTo="{_openY}" target="{this}" />
           <!-- Transitions from the open to closed state, animating it growing and the icon rotating to point upwards -->
           <s:Transition fromState="*" toState="closed">
                <s:Parallel duration="300">
                     <s:Move yFrom="{_openY}" yTo="{_closedY}" target="{this}"/>



      So does anyone have any idea how to fix this? I'm hoping there's something simple I'm missing here.