View Full Version : child label and MouseEvents
AlexWD
February 28th, 2010, 08:56 PM
When I have a Label on a Sprite for example, it doesn't respond to MouseEvents, or at least not correctly. For example, if I set buttonMode = true on the Sprite, the label won't have the clicking cursor. Is there a work around for this? Other than stacking another Sprite on top of it which seems very inefficient.
BoppreH
February 28th, 2010, 10:45 PM
If you want to hide the "text" cursor when the mouse is over a text field, use
textFieldName.selectable = false
AlexWD
February 28th, 2010, 11:28 PM
That's not the problem. If have a Label on a Sprite and the Mouse in on the Label the MouseEvent isn't passed to the Sprite.
BoppreH
March 1st, 2010, 06:49 AM
That's not the problem. If have a Label on a Sprite and the Mouse in on the Label the MouseEvent isn't passed to the Sprite.
Try setting
labelName.mouseEnabled = false
labelName.mouseChildren = false
This should make the label unable to receive any mouse event, and thus trigger the listeners from the object behind it.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.