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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:37:09+00:00 2026-05-10T22:37:09+00:00

Every now and then I get an error when I set up states in

  • 0

Every now and then I get an error when I set up states in an MXML file. The error I get says that mx:states could not be resolved to a component implementation.

I read, at the following url, that this issue is caused by extending components – that somehow throws off the compiler’s ability to resolve mx:states. I don’t see why this should be the case, but I don’t have any answer of my own. I also can’t necessarily make this approach work with all of my extended components.

http://life.neophi.com/danielr/2007/01/could_not_resolve_to_a_compone.html

The workaround I’ve come up with is to not use any namespace. So, my code then looks like this:

<states>...</states> 

rather than:

<mx:states>...</mx:states> 

Making this stranger (at least, to me) is the fact that the children of the tag – – does not have this issue. mx:states can not be resolved, but its child mx:State can. And mx:SetProperty – a child of mx:State – is also resolved.

Can anyone explain this, and/or offer a better solution to the problem than what I’ve come up with?

Incidentally, I see the same issue with mx:transitions.

  • 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. 2026-05-10T22:37:09+00:00Added an answer on May 10, 2026 at 10:37 pm

    If you have a custom component, you’ll probably have it in a namespace other than mx. You’re on the right track by removing the namespace, but you don’t have to do that. Consider the following example

    <example:MyComponent xmlns:mx='http://www.adobe.com/2006/mxml'     xmlns:example='com.example.*'> </example:MyComponent> 

    In that code, we have a custom component named MyComponent in the com.example package. Now, how do we add custom states? It’s easy!

    <example:MyComponent xmlns:mx='http://www.adobe.com/2006/mxml'     xmlns:example='com.example.*'>      <example:states>         <mx:State name='CustomState'>         </mx:State>     </example:states>  </example:MyComponent> 

    Properties of a component, like states, transitions, or even label on a Button can be created as child elements. Those properties must use the same namespace as the component instance. It doesn’t matter where the property comes from in the inheritance chain. Even if com.example.MyComponent extends mx.containers.Canvas, the states property will use the XML namespace in which MyComponent is defined.

    In short, don’t think of the states property as mx:states because the mx: prefix of a property is merely inherited from the component. However, we do have to use mx: when we define the actual state itself because that’s a class (not a property) and that class is defined in the mx namespace.

    To go a step further in the explanation, you can change the http://www.adobe.com/2006/mxml namespace to be something other than mx.

    <zzz:VBox xmlns:zzz='http://www.adobe.com/2006/mxml'>     <zzz:states>     </zzz:states> </zzz:VBox> 

    In that example, we change mx to zzz. Now, the states property has to be prefixed with zzz: instead of mx:.

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

Sidebar

Ask A Question

Stats

  • Questions 58k
  • Answers 58k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Yes, assuming you added the chevrons deliberately and you really… May 11, 2026 at 8:49 am
  • added an answer I have used DevExpress PRO It's very complete.. All components… May 11, 2026 at 8:49 am
  • added an answer I decided to write my own ReadLine parser-ish kinda thing.… May 11, 2026 at 8:49 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

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.