Hi,

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 = "...";
            this.addChild(indicator);

            this.invalidateDisplayList();


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
            this.graphics.beginFill(0xFF0000, 1);
            this.graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
            this.graphics.endFill();

... 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...

Nick


-- 
Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774
035 5424 } );

Reply via email to