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 9100851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:58:15+00:00 2026-06-17T00:58:15+00:00

Can someone explain how the new states work in flex 4 im migrating from

  • 0

Can someone explain how the new states work in flex 4 im migrating from flex 3 to flex 4 and i got an error in the states code:

<s:states>

        <s:State name="login"/>
        <mx:RemoveChild target="{viewStack}" />
        <mx:RemoveChild target="{header}" />
        <mx:RemoveChild target="{footer}" />
        <mx:SetStyle target="{login}" name="verticalAlign" value="middle" />

        <s:State name="menu"/>
        <mx:RemoveChild target="{login}" />
        <mx:AddChild relativeTo="{null}" >
            <search:Drawer title="{resourceManager.getString('locale','mySearch')}" 
                           dockSide="left" 
                           backgroundAlpha="0.9" 
                           backgroundColor="#ccccff">
                <search:SearchContent />
            </search:Drawer>
        </mx:AddChild>

    </s:states>

If u need the “target” code just tell here.

  • 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-06-17T00:58:16+00:00Added an answer on June 17, 2026 at 12:58 am

    The code you show is a little too short to give you the exact code, but it should look something like this:

    <s:states>
        <s:State name="login"/>
        <s:State name="menu"/>
    </s:states>
    
    <mx:ViewStack id="viewStack" excludFrom="login" 
                  paddingTop="15" width="100%" height="100%"/>
    
    <s:HGroup id="header" excludeFrom="login" width="100%"/>
    <s:HGroup id="footer" excludeFrom="login" width="100%" verticalAlign="bottom"/>
    
    <mx:Box id="login" includeIn="login" width="100%" height="100%"
            horizontalAlign="center" verticalAlign="middle"/>
    
    <search:Drawer includeIn="menu" ... />
    

    Basically, you use the includeIn and excludeFrom special attributes instead of the old RemoveChild and AddChild tags. Note that since there are only 2 states, includeIn="menu" and excludeFrom="login" have the exact same effect.
    There’s also the possibility of setting properties according to the current state, e.g.:

    <v:MyComp left.login="0" left.menu="25"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone explain how New works with the With keyword in this example from
Can someone explain to me how can I open a new tab from a
Can someone explain to me this code new Object[]{PLease,Help}; Ive never seen code like
Can someone explain to me why the following code does not work? public class
Can someone explain why this does not work ? StringTemplate query = new StringTemplate(hello
Can someone explain what the following does? private HashSet nodes[]; nodes = new HashSet[21];
I'm new to liquibase (I'm using Spring Liquibase )... Can someone please explain whether
Would someone please explain states to me? For instance, with the history.js plugin. History.pushState({state:1},
But I'm having trouble with a new user registration form. Can someone explain this
Saw this post at CodeProject for FCKEditor. Can someone explain what about the new

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.