2 Replies Latest reply on Feb 2, 2010 8:01 AM by Furash

    Transition effect not appearing for custom components

    Furash

      Hello!

       

      I've been working around transitions between states in Flex 4 and found that it won't work with custom components.

       

      What I have is an application with 2 different states. Each state contains one of the custom components.

      When I press the button to switch between states it just toggles my components, but does not any transition effects (crossfading here).

       

      Could anyone suggest my mistake?

       

      <fx:Declarations>
                 
            <s:CrossFade     id="crossfade" duration="1000" 
                             targets="{[LoginScreen, UserRegistrationForm]}"/>
                 
       </fx:Declarations>
            
       <s:states>
                 
            <s:State name="loginState"/>
            <s:State name="registerState"/>
                 
       </s:states>
                 
       <s:transitions>
                 
            <s:Transition id="transition" duration="1000" effect="{crossfade}"/>
                 
       </s:transitions>
             
       <s:Group   verticalCenter="0" horizontalCenter="0" height="419">
      
           <comp:LoginScreen     id="loginScreen_comp"
                                 y="176" x="0"
                                 includeIn="loginState"/>
                      
           <comp:UserRegistrationForm id="userRegistrationForm_comp" 
                                        y="176" x="0"
                                        includeIn="registerState"/>                    
       </s:Group>