I have solved this problem in the past will a little bit of
ActionScript.  You will need to know a little bit about what your
components are named beforehand.

I have not written this up for AS3 yet, but this is how you would do
it in AS2.  (I am not sure if '_parent' is still the right param to
the the parent instance name or not ... it might just be 'parent') 

You want:
mouseTarger = contianer1.myBox1

But you are getting:
mouseTarget = container1.myBox1.label123.textfield456

if(mouseTarget.indexOf("textfield") != -1){
   mouseTarget = mouseTarget._parent._parent;
} else if (mouseTarget.indexOf("label") != -1){
  moustTarget = mouseTarget._parent.
}


good luck

--jason



--- In flexcoders@yahoogroups.com, "Tom Bray" <[EMAIL PROTECTED]> wrote:
>
> Say you have a custom component called MyBox and it has label inside it.
> You create lots of nested boxes and you want to be able to right
click on
> each box and have it be the mouseTarget for your contextMenu event.  The
> problem is that if you right click on the label that's inside the
box, your
> mouseTarget contains the label component and the textfield that's
inside the
> Label.  For example:
> 
> container1.myBox1.label123.textfield456
> 
> when what you want is:
> 
> contianer1.myBox1
> 
> Is there a way to make it so that the Label is ignored and I just get a
> reference for the box I'm interested in?
> 
> Thanks,
> 
> Tom
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to