0 Replies Latest reply on Jun 6, 2010 1:36 PM by Mainmanian

    How to pass a parameter during state change

    Mainmanian Level 1

      Is there a way I can pass a parameter to a class that is called during a change state?


      For instance, in my code, based on a user input, I execute the following line


      if (userInput) {

           this.parentApplication.currentState = "newState";



      in my main application, I have a enterState event handler for "newState" that executes the following:


      private function enterNewState(): void {

           var newStateClass:NewStateClass = new NewStateClass();




      However, I want to send the userInput to the newStateClass. I am wonderign if there is a straightforward method of passign the input.


      Thanks, Ramesh