Disable button at frame

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.



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