2 Replies Latest reply on Mar 27, 2010 11:19 PM by Flex harUI

    How to handle events between two custom components?

    balureddy

      Hi ,

           i want to handle events between two custom components, example if an event is generated in one custom component ,and i want to handle it any where in the application.....can any one suggest me any tutorial or meterial in this concept...

       

       

       

      thanks

        • 1. Re: How to handle events between two custom components?
          Nyeski

          Events don't really go sideways in ActionScript by default. They bubble upward. If you want to send an event sideways, you will probably have to coordinate with something higher up in the event hierarchy. You can send the event to a common ancestor, and then pass it down the hierarchy as a method argument.

           

          Another option is to use a framework that supports Injection. There are a number around these days. The one I'm most familiar with is Mate, which allows you to handle events and inject data in MXML. Mate is meant to be used as an MVC framework, and you may want to look into it if your application is complex, but you can also use it to coordinate global event handling if you don't need that level of structure.

          • 2. Re: How to handle events between two custom components?
            Flex harUI Adobe Employee

            This gets discussed often on the forums.  Try searching for prior threads