1 Reply Latest reply on Jun 27, 2006 11:22 AM by Newsgroup_User

    Transition Logic

    leotemp Level 1
      Well, im not having problems activating or inserting transitions but i am having problems understanding some basic concepts behind them. Ill try to formulate my questions in a way that doesn't sound like I'm channeling crazy dead people.

      When your create a state i assume you must have any children you want to animate in your transition present in your targeted state, that being said lets say i want to move a label left 100 pixels. Setting the transition to move the label from its current x value to the new one that is 100 pixels less then the original value works just fine, the animation is smooth and tasty but when it finishes the label appears where it was before the animation started :( Now if i set the label in the state itself to the position i want it to end at when the transition finishes(makes more sense) the animation also works but now i see the label in its ending position for a split second before the transition begins and using any sequential transitions would mean i would see it in its ending position until the sequence occurs that animates it. Right now im just using Parallel for everything but this can be real clunky and still doesnt resolve the issue just kind of masks it :(

      Now this is a little more complex, lets say i have 2 labels, label01 and label02. In my targeted state I have both labels visible but i would like my transition to sequentialy blur them in from 100 blured to 0, first label01 then label02, my problem is that if i use sequence like this:

      <mx:Sequence>
      <mx:Blur target="{label01}" blurXFrom="100" blurXTo="0" blurYFrom="100" blurYTo="0" duration="1000"/>
      <mx:Blur target="{label02}" blurXFrom="100" blurXTo="0" blurYFrom="100" blurYTo="0" duration="1000"/>
      </mx:Sequence>

      label02 will be completly visible and not blured while label01 blurs in.

      I have considered that i may have to blur the labels in the targeted state itself but then they will return to their blurred effect state after the transition animation finishes :(

      Am i supposed to create 2 states one that reflects how the transition looks when starting and then when the transition ends somehow move the state to a second that relfects what i want after the transition ends? This seems wrong.. help!


      leo
        • 1. Re: Transition Logic
          Level 7
          Hi Leo,

          Take a look at <mx:SetPropertyAction>, and also perhaps <mx:AddChildAction>,
          <mx:RemoveChildAction>, <mx:SetStyleAction>. These are specifically intended
          to help with the kind of situation you are describing. They let you control
          the timing of certain parts of the transition relative to certain parts of the
          state change.

          --
          Mike Morearty
          Developer, Flex Builder team
          http://www.morearty.com/blog