You could access the parent's currentState by using the following:

<mx:Button label="back" click="outerDocument.currentState='step1'"/>

I believe that this type of reference comes from Flash.

-TH

--- In [email protected], Ethan Miller <[EMAIL PROTECTED]> wrote:
>
> Greetings -
>
> Say I have a document (itself a custom component) called
wizard.mxml. 
> This document contains a pair of buttons for navigating steps in

> wizard like this:
>
> <mx:Button label="back" click="currentState='step1'"/>
> <mx:Button label="next" click="currentState='step3'"/>
>
> (Also in wizard.mxml are the states 'step1' and 'step3').
>
> Buttons work fine when all are in the same document. However, if

> move the buttons to a custom component, the return errors saying 
> "Unknown State: 'step1'", etc.
>
> Seems I need to reference the component that the the states are
in. 
> I've tried changing the click action in the buttons ala:
>
> <mx:Button label="back" click="currentState='wizard.step1'"/>
>
> To no avail. So, question, how do I control states in one custom 
> component from another?
>
> thanks, ethan
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to