Hi Kobe, If you're asking how to change the current state of main.mxml from inside a custom component, here are a few ways:
* The simplest way, is to use parentDocument.currentState = "myBaseStateName". For more deeply nested components, you can also chain these like: parentDocument.parentDocument.parentDocument.currentState = "myBaseStateName". * If main.mxml is the application class, you could also use mx.core.Application.application.currentState = "myBaseStateName". * For a more loosely coupled approach, you could dispatch an event from the component, that is listened for in main.mxml. When the event listener hears the event, change the currentState in the handler function. * Another way, is to bind a model variable to the currentState. This is most commonly done in an MVC application. There are other ways to access a components parent, but these should handle the mojority of use cases. -TH or, for itemRenderers use outerDocument. --- In flexcoders@yahoogroups.com, Ingo Stoecker <[EMAIL PROTECTED]> wrote: > > hello, > > I put some custom components in view states. The components have functions to change the currentstate to base view. But it doesnt work. Hhow can I switch views (from the main.mxml) in these functions? > > greets, > > Kobe > > > > __________________________________________________________ > Gesendet von Yahoo! Mail. > Dem pfiffigeren Posteingang. > http://de.overview.mail.yahoo.com >