Wednesday, March 12, 2008

Access an ovelapped Button in flex

If you have a component which is overlapping a button, you will not able to access that button. To access a mouse event on that button, you should have to set the mouse children property of the above component to false.

For example:

myabovecomponent.mouseChildren = false;

Removing Focus from any flex Component

Days are gone when we use _focusrect in flash to remove the ugly yellow focus from focussed movieclip/buttons. In flex we can remove focus from particular component by setting its focusalpha style to 0.

For example suppose you want to remove focus from TextArea component you can use:

mytextareainstance.setStyle("focusAlpha",0);

Hope this will help.