Something has to draw onto every pixel, otherwise the mouse hit passes through 
to underneath.  You can set the alpha to 0 and it will still work.  You can 
also set background=true and pick a backgroundColor on the TextField and not 
have to draw the fill.

On 9/6/11 2:18 AM, "Nick Middleweek" <> wrote:

OK, well I've settled with the white background for now...

On 5 September 2011 11:36, Nick Middleweek <> wrote:

We're using Flex 4 and have an Item Renderer that extends UIComponent.

We're adding a TextField that's added in createChildren().

In the Constructor(), I'm adding the listener:

           this.addEventListener(MouseEvent.MOUSE_OVER, this_onMouseOver);

...And in the listener function, I'm adding a button:

           indicator = new Button();
            indicator.width = 20;
            indicator.height = 20;
            indicator.label = "...";


The problem is that the MouseOver event is ONLY firing when I mouse over the 
TextField and not the 'background' of the IR.

If I draw a rectangle in updateDisplayList:

           // draw rect
  , 1);
  , 0, unscaledWidth, unscaledHeight);

... the MouseOver event DOES fire on the red background.

Is there a way of achieving this without drawing a rectangle? I did think of 
setting the rect to white but this doesn't seem like the correct approach.

Thanks for any help...


Alex Harui
Flex SDK Team
Adobe System, Inc.

Reply via email to