# Disabling Buttons?

**URL:** <https://forum.kirupa.com/t/disabling-buttons/246455>\
**Category:** flash\
**Created:** [December 11, 2007, 10:40am UTC](https://forum.kirupa.com/t/disabling-buttons/246455 "2007-12-11T10:40:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpixel](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@jpixel](https://forum.kirupa.com/u/jpixel)\
**Post date:** [December 11, 2007, 10:40am UTC](https://forum.kirupa.com/t/disabling-buttons/246455/1 "2007-12-11T10:40:06Z")

</div>

Ok so I have a website, and each section fades in and fades out. The problem is the hidden sections (alpha=0) still have their buttons active…you can click them

and I don’t use buttons, they are movieclips with actionscript in frame 1…

How would you make sure these are disabled?

What I tried was to create a variable sectionFlag:Number=1;

this would have a different number 1,2,3,4 depending on the current section

and then if (sectionFlag==4){ execute code }

however, the sob just wouldn’t work, it would execute the code anyway!
