# Double clicking buttons

**URL:** https://forum.kirupa.com/t/double-clicking-buttons/113113
**Category:** Uncategorized
**Created:** [June 15, 2004, 3:24am UTC](https://forum.kirupa.com/t/double-clicking-buttons/113113 "2004-06-15T03:24:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Skinny\_T](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Skinny\_T](https://forum.kirupa.com/u/Skinny_T)
#### Post date: [June 15, 2004, 3:24am UTC](https://forum.kirupa.com/t/double-clicking-buttons/113113/1 "2004-06-15T03:24:04Z")

</div>

Are they possible and if so, how are they done?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2004, 8:06am UTC](https://forum.kirupa.com/t/double-clicking-buttons/113113/2 "2004-06-18T08:06:57Z")

</div>

> [@amanuo](#):
>
> a funny way to do it is to make an MC as button (check other threats how to do that)

I maybe be stupid but I’m not that stupid! jk.

I still cant figure out how to make this work? Any other ideas?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2004, 8:29am UTC](https://forum.kirupa.com/t/double-clicking-buttons/113113/3 "2004-06-18T08:29:50Z")

</div>

Ah, got it! found a tut elsewhere. Heres the code, all you have to to is place it inside an MC and it acts as a button.

onClipEvent (load) {  
delay = 250;  
}

onClipEvent (mouseDown) {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
//do action 1  
if ((getTimer() - firstClick) \< delay) {  
//do action2  
}  
firstClick = getTimer();  
}  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2004, 10:21am UTC](https://forum.kirupa.com/t/double-clicking-buttons/113113/4 "2004-06-18T10:21:10Z")

</div>

thats practicly the same as my idea…

And i never called you stupid. it’s just that most of the times, other viewers start posting things like: how do you make an mc work like a button?

got it? 😉

peace,  
amanuo

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2004, 11:32am UTC](https://forum.kirupa.com/t/double-clicking-buttons/113113/5 "2004-06-18T11:32:28Z")

</div>

> [@amanuo](#):
>
> And i never called you stupid. it’s just that most of the times, other viewers start posting things like: how do you make an mc work like a button?

If that was my problem thats what I would have posted. And the code I posted is a better way of going about it.
