3 Replies Latest reply on Jun 24, 2008 10:59 AM by matthew horn

    StateChangeEvent and events in general

      Hello All,

      I'm still fairly new to flex and despite some success I'm still having lots of trouble with Events.

      my application has 2 states.

      I want to catch an event which occurs when the state changes from one state to the other.

      What I've tried to do is use addEventListener:
      addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, stateTransitionEventHandler);

      and deal with the events in the function stateTransitionEventHandler but I never seem to catch any events.

      I've also tried using FlexEvent.ENTER_STATE with the same problem.

      There are sure to be other ways to solve my problem but I really want to do it with Events so I can get to grips with them.

      Any help appreciated