Try this:
 
<mx:states>
  <mx:State name="Login"/>
    <mx:AddChild position="LastChild">
      <view:Login id="login"/>
    </mx:AddChild>
  </mx:State>
</mx:states>
 
~randy


   _____  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of simonjpalmer
Sent: Monday, January 21, 2008 8:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using a custom component inside of a state



that doesn't look right, shouldn't you be adding your component as a
child in the new state. 

I find the best way to code states is in the flex builder design tool,
it is too easy to get the syntax wrong. Switch to your "login" state
and add your custom control and you'll get exactly the code you need
generated for you.

--- In HYPERLINK
"mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED],
"d_cypress" <[EMAIL PROTECTED]> wrote:
>
> This is the code I am using:
> <mx:states>
> <mx:State name="Login"->
> <view:Login id="login" />
> </mx:State>
> </mx:states>
> 
> This is the error I am receiving:
> In initializer for 'overrides': type view.Login is not assignable to
target type Array or target 
> element type
> 
> I did find an example which does appear to address the issue but I'm
not entirely clear on 
> how I should go about resolving the issue.
> 
> Example where a custom component is used:
>
HYPERLINK
"http://livedocs.adobe.com/labs/flex3/html/help.html?content=using_states_8.
html"http://livedocs.-adobe.com/-labs/flex3/-html/help.-html?content=-using_
states_-8.html
> 
> -Clayton
>



 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.516 / Virus Database: 269.19.7/1234 - Release Date: 1/20/2008
2:15 PM
 

Reply via email to