useHandCursor, buttonMode and mouseChildren

To display the hand cursor for a displayObject with a dynamic textfield inside it (Suppose the textfield is on top of a shape):

mySprite.buttonMode = true;
//By default useHandCursor is true;
//mySprite.useHandCursor = true;
mySprite.mouseChildren = false;


18 Responses to “useHandCursor, buttonMode and mouseChildren”

  1. Gena Says:

    i did use the above code for my movieclip i made act as a button and it worked BUT when i put this movieclip button inside of another movieclip that’s inside of ANOTHER movieclip it broke!! help?!

    this is my setup on the main timeline….

    panel–>panelAnimation–> begin movieclip button

    what do i need to adjust on the parent movieclips to make the begin button work again. it wont attach any event listeners when its nested either. And i DON’t want the parent movieclips to behanve as buttons at all.


  2. Joe Says:

    Doesn’t work for me 😦

    If I put a dynamic textField within the sprite, the textField turns the hand cursor off when the mouse rolls over it.

    Any ideas? Thanks!

  3. Joe Says:

    Ah sorry – I was setting mouseChildren to TRUE instead of FALSE… *blush*

  4. jerome Says:

    Currently making the frustrating transition from AS2 to AS3 – you just saved me hours of hair pulling! Thanks for sharing (and the many other v useful posts on your blog)

  5. Lesiu Says:

    Thnx man! This small piece of code was exactly what I was looking for 🙂

  6. Justin Says:


  7. Matt Says:

    Silly mouse child!

  8. Gustavo Says:

    Thanks Dude!

  9. Pelle Says:

    Thanks a lot! Much appreciated!

  10. YEYEYEY Says:


  11. Miguel Palazzo Says:

    Exactly what I was looking for!!! Thanks a lot

  12. God Says:

    Thx. Great advice!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I bless you!!!!!

  13. Simon Says:

    Thanks!! If I ever have this issue again (cuz sometimes it seems to work), I’ll know what to do!

  14. Wesley Says:

    I know its a bit late, thanks so much! That advice helped me greatly!

  15. raph Says:

    Thx dude, you saved me some time. Good SEO by the way ;-).

  16. Vinod Says:

    Thx man, thats perfect, but I am running into an issue. I have a function within that movie clip, which I want to call from stage. But when i invoke that function I get
    TypeError: Error #1006: deactivateBG is not a function.
    at page_1_fla::content_1/onMouseOut()

    If i comment mouseChildren=false, then i dont get the error, as well as the cursor hand.

    Any help is much appreciated.
    Happy New Year!

  17. Vinod Says:

    😦 spoke too soon…I was calling the function using, rather than

    Never mind. Thx

  18. !演算子で表示・非表示を切り替える - log.SpecterAnt Says:

    […] /******************************************* //そんな訳で、解決法 *******************************************/ button.buttonMode = true; button.mouseChildren = false;   参考サイト ・TextFieldを含むSpriteをbuttonMode=trueにしてもカーソルが変わらない (Unknown Quality) ・useHandCursor, buttonMode and mouseChildren : maohao: […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: