Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 520
  • Last Modified:

Problem with useHandCursor on a movieclip

I am trying to make an animated button I could use in Flex using Flash CS4. I have also attached the sample .FLA file I am referring to here.

I have a movieclip named "button". If you look in the actionscript on the very first layer of the main timeline, I have:

button.useHandCursor = true;
button.buttonMode = true;

This changes the cursor to a hand cursor when you hover your mouse over the movieclip. The problem is that this movieclip also has a text field. When you hover your mouse within the perimeter of this text field, the cursor changes into the I-cursor instead of the handcursor.

If you run the attached .fla file, you will see what I mean. My goal is to have the cursor change into the handcursor anywhere within the perimeter of the "button" movieclip.

Can anyone show me how to do this?

Thanks.

 AnimatedFlashButton.fla
0
elepil
Asked:
elepil
2 Solutions
 
Antonio EstradaCommented:
Your textfield must have the selectable property set to true (it's the default), look in your library, locate the textfield and in the properties panel, click on the "A" button, that's the one that sets it selectable or not.

If you'd like more precise instructions I can provide that.

Good Luck!

-V
0
 
blue-genieCommented:
all you need to do is to add the following line of code

button.mouseChildren = false;


the default value is true which means when you mouse over each item inside the object triggers the events too.
0
 
elepilAuthor Commented:
Thank you both for responding.

Blue-genie, your answer was right on the mark. Thank you.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now