# Disable button at frame

**URL:** <https://forum.kirupa.com/t/disable-button-at-frame/180590>\
**Category:** Uncategorized\
**Created:** [March 1, 2006, 7:20pm UTC](https://forum.kirupa.com/t/disable-button-at-frame/180590 "2006-03-01T19:20:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Debbie\_H](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@Debbie\_H](https://forum.kirupa.com/u/Debbie_H)\
**Post date:** [March 1, 2006, 7:20pm UTC](https://forum.kirupa.com/t/disable-button-at-frame/180590/1 "2006-03-01T19:20:59Z")

</div>

Hi,

I’m trying to disable a button at a certain frame only. It works  
with the script below but the problem is that it stays disabled for the  
rest of the movie. Would anybody know what I should add? Thanks a lot.

```auto

if (_currentframe == 20) {
			ex._alpha = 50;
			ex.enabled = false;
		} else {
			ex._alpha = 100;
			ex.enabled = true;
		}

```
