2 Replies Latest reply on Feb 26, 2008 12:40 PM by Shirak76

    Handling states within selfmade components

    pabera
      Hey folks,

      I have got a tiny problem. I have made a program that contains saveral states, two of them are "Login" and "Board".
      In the Login state I refer to the "compLogin" Component. There, the user has to login and afterwords the program has to switch to the state "Board" like this (all included in the compLogin component!).

      public function checkLoginData(evt:ResultEvent):void {
      ....
      currentState = "Board";
      ....
      }

      But I get an error. The component I want to access does not exist. But the "Board" state is not in component, it is in the main.mxml. How can I access my state now?

      I konw I probably have to call the state with its exact name, but I dont know the syntax. It must be something like this.currentState="Board" or currentState="main.Board" :) both of them did not work.

      Maybe somebody can help me out.
      Thanks and take care

      pat