3 Replies Latest reply on Aug 16, 2009 9:09 PM by Flex harUI

    identifying common parent/grandparent

    phil1943 Level 1

      Hello, I have a panel with a textInput and a button.


      I want to get a reference to the Panel as each of these two components is clicked.


      I can identify the Panel of the button easily via event.target.parent.


      However when I click on the textInput component the event.target returns the UITextField that is nested within the textInput, therfore 'event.target.parent' does not return the panel.


      Is there any way I can get a reference to the panel when I click on the textInput(UITextField child) component ?


      Is there a more elegant/efficient way than using something like 'event.target.parent.parent' ?


      Thanks for any help.