2 Replies Latest reply on Sep 27, 2006 10:51 PM by Dauntless

    Sequence isn't working?

    Dauntless
      Hi,

      I have something weird going on here... I followed the 'login demo' code ( http://livedocs.macromedia.com/flex/2/langref/mx/effects/SetPropertyAction.html) but mine isn't working right. In the example, you can see that it resizes first and then it adds the new children. I tried to do this, but no luck...

      This is my code:

      [code]<mx:states>
      <mx:State name="Register">
      <mx:AddChild relativeTo="{pwdText}" position="after">
      <mx:target>
      <mx:FormItem id="confirm" label="Confirm:">
      <mx:TextInput />
      </mx:FormItem>
      </mx:target>
      </mx:AddChild>

      <!-- Rememberme verwijderen -->
      <mx:RemoveChild target="{rememberCheckbox}" />

      <!-- Titel aanpassen -->
      <mx:SetProperty target="{loginPanel}" name="title" value="Register" />

      <!-- Text van register-knop aanpassen -->
      <mx:SetProperty target="{register_btn}" name="label" value="Return to login" />

      <!-- Text van login-button aanpassen -->
      <mx:SetProperty target="{loginBtn}" name="label" value="Register" />

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

      <!-- Een mooie overgang -->
      <mx:transitions>
      <mx:Transition id="toRegister" fromState="*" toState="Register">
      <mx:Sequence targets="{new Array(rememberCheckbox, loginPanel, register_btn, loginBtn)}">
      <mx:RemoveChildAction />

      <mx:SetPropertyAction target="{loginPanel}" name="title" />
      <mx:SetPropertyAction target="{loginBtn}" name="label" />

      <mx:Resize target="{loginPanel}" />
      <mx:AddChildAction />

      </mx:Sequence>
      </mx:Transition>
      </mx:transitions>[/code]

      And you can see my code in action here:
      http://www.dauntless.be/Flex/Calendar

      Does anyone know why my login-window doesn't resize first and THEN add the new input box ?