4 Replies Latest reply on Dec 19, 2007 12:03 AM by MayLam18

    What is DispatchEvent used for ?

    MayLam18
      Hi Everyone,

      What is the DispatchEvent used for? If possible, please give me an example with code. Thanks a lot in advance.

      May
        • 1. Re: What is DispatchEvent used for ?
          Gregory Lafrance Level 6
          DispatchEvent can be used to, well, dispatch events in your code. This is often done with custom components but can be useful at other times as well. See these FB help topics:
          Dispatching an event
          Defining a custom effect trigger
          Manually dispatching events
          Dispatching custom events
          Creating custom events
          • 2. Re: What is DispatchEvent used for ?
            MayLam18 Level 1
            Hi Greg,

            What does "dispatch" mean? Sorry my English is not good at all.

            thanks,
            may

            quote:

            Originally posted by: Greg Lafrance
            DispatchEvent can be used to, well, dispatch events in your code. This is often done with custom components but can be useful at other times as well. See these FB help topics:
            Dispatching an event
            Defining a custom effect trigger
            Manually dispatching events
            Dispatching custom events
            Creating custom events


            • 3. Re: What is DispatchEvent used for ?
              Gregory Lafrance Level 6
              In this case "dispatch" means "to send out". So when you "dispatch" an event, you kind of "send out a notice" that something happened. Events are central to Flex, such that clicking on a Button automatically dispatches a MouseEvent whose "type" is the constant CLICK. See this help topic:

              Using Events
              • 4. Re: What is DispatchEvent used for ?
                MayLam18 Level 1
                Thanks Greg.

                Have a nice day.

                may

                quote:

                Originally posted by: Greg Lafrance
                In this case "dispatch" means "to send out". So when you "dispatch" an event, you kind of "send out a notice" that something happened. Events are central to Flex, such that clicking on a Button automatically dispatches a MouseEvent whose "type" is the constant CLICK. See this help topic:

                Using Events