Posted Wednesday, January 02, 2008 9:27:58 AM by Derrick Ypenburg
Something that had me quite frustrated for some time was a dynamic textfield in a button interfering with a mouse click. The buttons were added to the application dynamically when needed and the dynamic textfield was populated with the name for the button when added. Yes, I had the textfield's selectable property set to false but it was still a problem if the button's buttonMode and useHandCursor properties were set to true. The text field blocked any kind of mouse event through to the button. The solution was simple but poorly documented. I did not see this property in the help menu so here you go:
textfieldName.mouseEnabled = false;
Set this property before setting the selectable property to false and away you go. I hope this saves you some hair-pulling and you found this easy enough if you've been searching for a solution to this problem.
Category tags: Flash
See Community MX content by Derrick Ypenburg