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

  • Home
  • SEARCH
  • 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
  • 1 View
  • 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

Related Questions

Every now and then we get this error from some of our old ASP
Every now and then, I bump into syntax that I've seen before, but never
Every now and then I receive a Word Document that I have to display
I have a Windows application, it crashes every now and then and not reroducibly.
For the 10+ years I've been using VB6, every now and then I get
Every now and then (ahem...) my code crashes on some system; quite often, my
Every now and then I need to call new[] for built-in types (usually char
Every now and then I have a problem with SVN inside eclipse folder gets
Every now and then I run into a situation when I need to email
Every now and then Elastic Load Balancer (ELB) kicks out one of my servers

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.