I'm not sure what problem you're having with hitTestObject.  If the
objects are visible (not masked) they should be hittable.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of toofah_gm
Sent: Friday, January 25, 2008 10:45 AM
To: [email protected]
Subject: [flexcoders] Re: getRect returns rectangle that includes
children's bounds, is there an alter

 

I was hoping to take advantage of the translation to the
targetCoordinateSpace that is being done underneath the covers of
getRect()...if I need to use the width/height of the parent component,
I will need to do this translation myself. I can do this, but was
hoping that I was just missing something here.

Any idea how this problem relates to the hitTestObject() matches?

Thanks again for your quick response!!!

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Properly designed UIComponent subclasses report a measuredWidth/Height
> (and measuredMinWidth/MinHeight) via the measure() method, and are
> subsequently given a size by their parent which may not be those sizes
> in updateDisplayList() where they draw graphics and/or size place
> children. Those children may extend outside the bounds and may be
> masked if needed. However, the width and height properties of the
> UIComponent will be the size given by the parent while getRect will
> return the bounding box of the children
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of toofah_gm
> Sent: Friday, January 25, 2008 10:29 AM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] getRect returns rectangle that includes
children's
> bounds, is there an alternate
> 
> 
> 
> I want to use getRect to get the bounds of my UIComponent.
> 
> I just noticed that if my UIComponent has children that extend beyond
> the X/Y/Width/Height of my parent UIComponent, the rect returned
> extends to the boundaries of the largest child.
> 
> Is there an alternate method that I could use? My hack to get around
> this is to override getRect and have it use another child that I force
> to be the size of the parent, whose size I am interested in.
> 
> Thanks!
> 
> Another problem that I see seems related. The hitTestObject method
> seems to have the same problem. It seems to be finding matches even
> though the parent UIComponent is clearly not a match. It must also be
> using boundaries of the children.
> 
> Any thoughts?
> 
> Thanks!
>

 

Reply via email to