2 Replies Latest reply on Oct 21, 2010 4:23 PM by GordonSmith

    Event handling order

    istrasci Level 1

      As simply as possible, I am trying to find out if events are guaranteed to be handled in the order they are dispatched.  Let's say I have the following, simple code:


      private function handler1(e:Event):void { .. processing ..}
      private function handler2(e:Event):void { .. processing ..}
      private function handler3(e:Event):void { .. processing ..}
      <SomeComponent myEvent1="handler1(event)" myEvent2="handler2(event)" myEvent3="handler3(event)" ... />


      If somewhere in my application (either from within the component itself or another place with the component instantiated), if I dispatch those events in the order of 1, 2, 3, like:


      dispatchEvent(new Event('myEvent1'));

      dispatchEvent(new Event('myEvent2'));

      dispatchEvent(new Event('myEvent3'));


      Are those handlers guaranteed to fire in the same order (i.e., handler1, handler2, handler3)...?  Anything I search the internet (read: Google) for concerning "adobe event processing order" or anything similar just refers to the event lifecycle.  I cannot find anything on this specific nuiance though.  Any help is greatly appreciated.


          - Ian