# Hand cursor?

**URL:** <https://forum.kirupa.com/t/hand-cursor/262158>\
**Category:** flash\
**Created:** [June 3, 2008, 8:08pm UTC](https://forum.kirupa.com/t/hand-cursor/262158 "2008-06-03T20:08:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 3, 2008, 8:08pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/1 "2008-06-03T20:08:27Z")

</div>

```auto

mc.addEventListener(MouseEvent.CLICK,tween);

function tween(event:MouseEvent):void {
    trace("clicked");
}

```

it works but why is the hand cursor off?

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 3, 2008, 8:19pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/2 "2008-06-03T20:19:03Z")

</div>

I found buttonMode has to be set to true as well as useHandCursor…uhh shouldnt this be default for a button? I dont want to have to do that for everything with a CLICK event. How can I get around that?

---

<div class="post-metadata">

**Author:** ![Fidodo](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@Fidodo](https://forum.kirupa.com/u/Fidodo)\
**Post date:** [June 3, 2008, 8:25pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/3 "2008-06-03T20:25:51Z")

</div>

Is it a button? You don’t say what mc is declared as but I’m assuming you declared it as a MovieClip (thus the name mc). Try declaring it as a Button class and see if that works.

---

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [June 3, 2008, 8:42pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/4 "2008-06-03T20:42:31Z")

</div>

I think you converted it into a movie clip and not a button.

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 3, 2008, 9:03pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/5 "2008-06-03T21:03:17Z")

</div>

Eew, don’t use buttons, just declare [FONT=“Courier New”]buttonMode [/FONT]to [FONT=“Courier New”]true[/FONT].

---

<div class="post-metadata">

**Author:** ![snickelfritz](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@snickelfritz](https://forum.kirupa.com/u/snickelfritz)\
**Post date:** [June 3, 2008, 9:29pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/6 "2008-06-03T21:29:42Z")

</div>

i have question along these lines:  
How could I create and apply a custom external class that enables hand cursor for movieclips?  
Seems like this should be possible.

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 3, 2008, 9:51pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/7 "2008-06-03T21:51:09Z")

</div>

Yes it is a movie clip. I never made buttons by selecting button. I always made movie clips. Setting button mode to true seems like an extra line of code I am going to have to do for it to act like a button. Seems like this should have been something default…

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 3, 2008, 10:29pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/8 "2008-06-03T22:29:01Z")

</div>

You really don’t need to create a custom external class, the ‘buttonMode’ property already exists, Snickelfritz.

Mrwicked, although it’s an extra line of code, by default you don’t want all objects to be buttons.

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 3, 2008, 10:53pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/9 "2008-06-03T22:53:35Z")

</div>

pretty much anything I have ever set to click(or onRelease) I would have wanted it to have a hand cursor…oh well though i’ll live with it

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 3, 2008, 10:55pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/10 "2008-06-03T22:55:53Z")

</div>

Right, but there are typically far more clips that aren’t clickable - your background image, your borders, your text, that sort of thing. All the content.

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 3, 2008, 11:09pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/11 "2008-06-03T23:09:29Z")

</div>

I understand that more clips aren’t clickable, but what would you be doing setting your background image or border to a click event in the first place?

I guess it really doesn’t matter. It all depends on what the project is you are working on.

---

<div class="post-metadata">

**Author:** ![Fidodo](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@Fidodo](https://forum.kirupa.com/u/Fidodo)\
**Post date:** [June 3, 2008, 11:15pm UTC](https://forum.kirupa.com/t/hand-cursor/262158/12 "2008-06-03T23:15:28Z")

</div>

Well, anyways, if you want to create a button in ActionScript use the SimpleButton Class. I don’t like the button when used on the stage, but as a display class I don’t see anything wrong with it. It just extends DisplayObject, which makes it pretty simple. So here’s the code to display a button on screen.

```auto
package {
	import flash.display.SimpleButton;
	import flash.display.Sprite;

	public class Test extends Sprite {
		public function Test() {
			var button:SimpleButton = new SimpleButton();
			var sprite:Sprite = new Sprite();
			sprite.graphics.beginFill(0);
			sprite.graphics.drawCircle(300,200,50);
			sprite.graphics.endFill();

			button.upState = sprite;
			button.downState = sprite;
			button.overState = sprite;
			button.hitTestState = sprite;
			
			addChild(button);
		}
	}
}

```
