The TextField
instances are the only objects occupying space in the Sprite
. Therefore, the hand cursor only appears when they are hovered. What you need to do is define the width and height of your Sprite
to the maximum space occupied by your objects inside it (or greater than that, if you want), then apply buttonMode = true
:
var mySprite:Sprite = new Sprite();
mySprite.addChild(textField1);
mySprite.addChild(textField2);
mySprite.width = textField1.width + textField2.width + Math.abs(mySprite.textField2.x - mySprite.textField1.x);
mySprite.height = (textField1.height > textField2.height) ? textField1.height : textField2.height;
mySprite.buttonMode = true;
If that doesn't work, you can check out the documentation:
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Sprite.html#buttonMode