2 Replies Latest reply on Jul 7, 2006 12:12 PM by Flex harUI

    controlling viewstack

    Thijs
      I have an application with a viewstack. In this viewstack there are 2 "mxml canvas" files linked to it.

      <mx:ViewStack id="stack">
      <login id="Login"></login>
      <main id="Main"></main>
      </mx:ViewStack>

      with login.mxml and main.mxml

      How can I switch the ViewStack in the login.mxml file?

      When I use the code: stack.selectedChild=Main, the flex builder doesn't find the object stack because this object is an element of the main mxml file and not of the login.mxml file. How can I pass to the login.mxml file the object "stack"?

      Thanks