Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7582573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:28:05+00:00 2026-05-30T18:28:05+00:00

I have a component with 2 states and I have added transitions for switching

  • 0

I have a component with 2 states and I have added transitions for switching between the states, where 2 Move affects are applied to 2 different objects. This all works fine, however, after the transition from the first state to the second has completed the second state doesn not render correctly. It contains a TextInput control which is not visible, and a Button with a custom skin that is only sometimes visible and vanishes if you click on it. I have tried called invalidateDisplayList() and validateNow() after loading the second state but that has done nothing. I also have a VBox with a cornerRadius property set, strangely this does not seem to apply anymore and the corners are square, where they displayed correctly before I added the transition in. Does anyone have any ideas?

Thank you!

Here is the code for my states and their transitions:

<!-- different states of this component -->
<mx:states>
    <s:State name="useForFree"
             enterState="renderState()"/>
    <s:State name="enterLicence"
             enterState="renderState()"/>
</mx:states>


<!-- transitions between different states -->
<mx:transitions>

    <!-- transition from useForFree to enterLicence state -->
    <s:Transition id="toEnterLicence"
                  fromState="useForFree"
                  toState="enterLicence">
        <s:Parallel id="p1"
                    targets="{[freeBtn, _enterLicenceMask]}">               
            <s:Move yFrom="250"
                    yTo="0"
                    duration="500"
                    targets="{[freeBtn]}"/>
            <s:Move yFrom="289"
                    yTo="39"
                    duration="500"
                    targets="{[_enterLicenceMask]}"/>
        </s:Parallel>       
    </s:Transition>

    <!-- transition from enterLicence to useForFree state -->
    <s:Transition id="toUseForFree"
                  fromState="enterLicence"
                  toState="useForFree">
        <s:Parallel id="p2"
                    targets="{[enterLicenceBtn, _useForFreeMask]}">             
            <s:Move yFrom="0"
                    yTo="240"
                    duration="500"
                    targets="{[enterLicenceBtn]}"/>
            <s:Move yFrom="-250"
                    yTo="0"
                    duration="500"
                    targets="{[_useForFreeMask]}"/>
        </s:Parallel>       
    </s:Transition>
</mx:transitions>

and here is the code for my layout:

<mx:Canvas id="freeStateCanvas"
           width="100%">

    <mx:VBox width="100%"
             horizontalAlign="center"
             top="0"
             mask="{_useForFreeMask}">

        <mx:VBox id="freeBox"
                 includeIn="useForFree">
            <s:Label text="some text"/>
            <s:Spacer height="20"/>
            <s:Image source="image path"/>
            <s:Spacer height="20"/>
            <mx:Button id="connectBtn"/>
            <s:Spacer height="10"/>
            <mx:HBox >
                <s:Label text="some text"/>/>
            </mx:HBox>
        </mx:VBox>

        <s:Label text="some text"
                 includeIn="useForFree"/>           
    </mx:VBox>

        <mx:Button id="enterLicenceBtn"
                   includeIn="useForFree"/>

</mx:Canvas>

<!-- enter licence state -->

<mx:Canvas id="enterLicenceStateCanvas"
           width="100%">

        <mx:VBox id="enterLicenceBox"                    
                 mask="{_enterLicenceMask}"
                 includeIn="enterLicence">

            <s:Label text="some text"/>
            <s:Spacer height="20"/>
            <s:TextInput id="licenceInput"
                         width="200"
                         height="30"/>
            <s:Spacer height="20"/>
            <mx:Button id="registerBtn"/>
            <s:Spacer height="10"/>
            <mx:HBox>
                <s:Label text="some text"/>
                <s:Label text="some more text"/>
            </mx:HBox>
        </mx:VBox>

        <mx:Button id="freeBtn"
                   includeIn="enterLicence"/>

</mx:Canvas>

where the variables being set as masks are UIComponent instances where I have used their graphics property to draw a rectangle.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:28:06+00:00Added an answer on May 30, 2026 at 6:28 pm

    Okay, so I found what the problem was, but thanks for trying to help shaunhusain.

    In my code you can see I have 2 VBox containers called “freeBox” and “enterLicenceBox” and these actually had a white background and rounded corners, and a DropShadowFilter applied to them (I removed these properties when putting up the code as I felt they were irrelevant, that was a mistake).

    This DropShadowFilter was the cause of all my problems and on removing it, the transitions worked fine and all content was rendered correctly. I assume this is just a strange Flex bug, and I didn’t find a workaround, I just used images as the box backgrounds for a quick fix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a component with different states, when i assign some value in another
i have this source in flex - easy program which switch between two states..in
I have a flex component with 2 states - (ie no name / default)
foreword: I have a component, lets call it IView. This component is implemented by
I have an application in which I need to create mx.states.State objects on the
I have a component screen which has 2 states: show and hide. When I
A pretty normal case: We have a 'portlet' composite component that has two states:
I have a GUI tool that manages state sequences. One component is a class
I have: @Component class MyDecorator{ private Cache cache; /* some wrapped methods like get
Please consider such scenerio: I have component called TMenuItemSelector which has two published properties:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.