1 Reply Latest reply on Jul 21, 2006 3:47 AM by Antoni_H.

    Transitions

    Antoni_H.
      Ok it's me again,

      now a not so difficult Prob, but I don't know how to solve it. I tried the docs already and nothing happens.

      so here is my code

      quote:


      <mx:State name="information">
      <mx:SetStyle target="{extendedInfoPanel}" name="horizontalAlign" value="left"/>
      <mx:SetStyle target="{vbox5}" name="horizontalAlign" value="left"/>

      <mx:SetProperty target="{vbox5}" name="width" value="100%"/>
      <mx:SetProperty target="{extendedInfoPanel}" name="width" value="862" />

      <mx:RemoveChild target="{hbox1}"/>
      <mx:RemoveChild target="{linkbutton7}"/>
      <mx:RemoveChild target="{linkbutton3}"/>
      <mx:RemoveChild target="{linkbutton4}"/>
      <mx:RemoveChild target="{linkbutton2}"/>
      <mx:RemoveChild target="{linkbutton1}"/>
      <mx:RemoveChild target="{linkbutton8}"/>
      <mx:RemoveChild target="{label1}"/>

      <mx:AddChild relativeTo="{vbox5}" position="before">
      <mx:LinkButton label="Back" id="linkbutton10" click="currentState=&quot;&quot;"/>
      </mx:AddChild>
      <mx:AddChild relativeTo="{vbox5}" position="lastChild">
      <mx:HBox width="100%" height="100%">
      <mx:Spacer height="100%" width="140"/>
      </mx:HBox>
      </mx:AddChild>

      </mx:State>
      </mx:states>

      <mx:Transition id="toInformation" fromState="*" toState="information">
      <mx:Sequence targets="{[hbox1, linkbutton7, linkbutton3, linkbutton4, linkbutton2, linkbutton1, linkbutton8, label1, vbox5, extendedInfoPanel]}">
      <mx:RemoveChildAction />
      <mx:SetStyleAction target="{extendedInfoPanel}" name="horizontalAlign" />
      <mx:SetStyleAction target="vbox5" name="width" />
      <mx:SetPropertyAction target="extendedInfoPanel" name="width" />
      <mx:Resize target="extendedInfoPanel" duration="600"/>
      </mx:Sequence>
      </mx:Transition>




      The Problem is, that the transition effect is not playing. What am I doing wrong?
      thx
        • 1. Re: Transitions
          Antoni_H. Level 1
          Ok i figured it out:

          First my new code lines:
          <mx:transitions>
          <mx:Transition id="toInformation" fromState="*" toState="information">
          <mx:Sequence targets="{[hbox1, linkbutton7, linkbutton3, linkbutton4, linkbutton2, linkbutton1, linkbutton8, label1, vbox5, extendedInfoPanel]}">
          <mx:RemoveChildAction />

          <mx:SetStyleAction target="{extendedInfoPanel}" name="horizontalAlign" />
          <mx:SetStyleAction target="{vbox5}" name="horizontalAlign" />

          <mx:AddChildAction targets="{[linkbutton10,hbox99]}" />

          <mx:Parallel duration="600" targets="{[extendedInfoPanel, vbox5]}">
          <mx:Resize />
          </mx:Parallel>

          <mx:SetPropertyAction target="{extendedInfoPanel}" name="width" />
          <mx:SetPropertyAction target="{vbox5}" name="width" />

          </mx:Sequence>
          </mx:Transition>
          </mx:transitions>


          The Problem was in the code. I didn't know that you have to code erverything explicit. Also the Resize-Effect has to be placed in the right row, otherwise you want see it.

          Maybe the Flex Dev Team could make this a little more uncomplicated, but the possibilities are great.

          so thanks to me. :P