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

    Sequence isn't working?


      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:

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

      <!-- 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" />


      <!-- Een mooie overgang -->
      <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 />


      And you can see my code in action here:

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