1 Reply Latest reply on Nov 14, 2008 12:24 PM by Newsgroup_User

    bubbling question

    phil1943 Level 1
      just to clarify, I understand that in Flex, a parent can only detect a bubbled event from a child if it is an event that both understand ie. a parent VBox container could not detect a bubbled Event.CHANGE from a child textInput component.

      The way to overcome this would be to dispatch a custom event from the child textInput and then register it with the parent VBox.
      Is this correct ?


        • 1. Re: bubbling question
          Level 7

          "phil1943" <webforumsuser@macromedia.com> wrote in message
          news:gfkkfv$kn1$1@forums.macromedia.com...
          > just to clarify, I understand that in Flex, a parent can only detect a
          > bubbled
          > event from a child if it is an event that both understand ie. a parent
          > VBox
          > container could not detect a bubbled TextEvent.CHANGE from a child
          > textBox.
          >
          > The way to overcome this would be to dispatch a custom event from the
          > child
          > textBox and then register it with the parent
          > Is this correct ?

          nope. You should be able to do something like

          myTextBox.addEventListener(TextEvent.CHANGE, someFunction), as long as
          myTextBox is in the same scope as the script containing this code.

          HTH;

          Amy