Blog blurb

This blog is the resting place of my various projects. It's a place to find out about my various commercial and personal projects. Some of them are quite geeky and some of them are more arts based.

RSS Get updates by subscribing to the RSS feed.

Getting the cursor hand to appear over MovieClips containing text in Flash

07 December 2007

I've been making an animated button using a MovieClip in Flash using ActionScript 3. The problem I had was making the hand cursor appear over it, firstly at all and then when my button had text in it.

To make a MovieClip behave like a button and use the hand cursor set the following properties for the MovieClip.

clip.buttonMode = true;
clip.useHandCursor = true;

Next, if your MovieClip contains a TextField set the following property for the TextField.

clip.labelText.mouseEnabled = false;

This means that the button underneath deals with the mouse, so the cursor will behave in the way that the button tells it to. In the example in this post, Button 1 has the mouseEnabled set to the default true value and Button 2 sets it to false.

I have an ActionScript Class file linked to the button that does all this to keep my main movie code clean.

Richard Garside Richard Garside (gravatar)

0 Comments

leave your own
Your Information

email saved for notifications but never distributed

your comment