# Disabled button

**URL:** https://forum.kirupa.com/t/disabled-button/438
**Category:** flash
**Created:** [July 17, 2002, 5:33pm UTC](https://forum.kirupa.com/t/disabled-button/438 "2002-07-17T17:33:27Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![indojepang](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/indojepang/32/39_2.png) [@indojepang](https://forum.kirupa.com/u/indojepang)
#### Post date: [July 17, 2002, 5:33pm UTC](https://forum.kirupa.com/t/disabled-button/438/1 "2002-07-17T17:33:27Z")

</div>

I have these buttons in my movieclip.

After I release a button and do an action, I want to make the button disable (keep on over position) and ignore all action.

How can I do that? Cause in Director it seems easy.

---

<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: [July 17, 2002, 6:20pm UTC](https://forum.kirupa.com/t/disabled-button/438/2 "2002-07-17T18:20:25Z")

</div>

```auto
this.onPress = function () {
       // do whatever
       this.onPress = null ;
}

```

I think that if you use clips as buttons, you can use the setEnabled method too. Not sure it works with buttons though.

pom :asian:

---

<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: [July 19, 2002, 4:37pm UTC](https://forum.kirupa.com/t/disabled-button/438/3 "2002-07-19T16:37:16Z")

</div>

I didn’t able to follow your last instruction on the last action…

this.onPress = null ;  
}

(in normal mode) forgive me I’m a beginner in flash…

but I did try this :

on (release) {  
tellTarget ("\_root") {  
gotoAndStop(“portfolio”, “tes”);  
}  
}  
on (release) {  
gd1.enabled=false;  
}

I make it!!! but the button don’t stay at over position…

thank u…

---

<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: [July 19, 2002, 6:40pm UTC](https://forum.kirupa.com/t/disabled-button/438/4 "2002-07-19T18:40:42Z")

</div>

You’d better switch to Expert mode. So much better…  
Your way is better, by the way 🙂

pom :asian:

---

<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: [July 19, 2002, 6:54pm UTC](https://forum.kirupa.com/t/disabled-button/438/5 "2002-07-19T18:54:22Z")

</div>

I’ll try that… Thank u very much…
