Wednesday, February 2, 2011

buttonMode & TextFields

We have some kind of like Sprite/MovieClip. We're creating our own button or item that should be click-able. So we set buttonMode, add event listener, and everything is ok till we add some text. And here comes problem. Hand cursor disappears when we roll over on the text.

best solution is to use mouseChildren property.

this.buttonMode = true;
this.mouseChildren = false;
this.addEventListener(MouseEvent.MOUSE_UP, _handleMouseRelease);

All objects added as child won't be mouse enabled

No comments:

Post a Comment