# Disable button at frame 2

**URL:** <https://forum.kirupa.com/t/disable-button-at-frame-2/78005>\
**Category:** Uncategorized\
**Created:** [February 1, 2005, 11:35am UTC](https://forum.kirupa.com/t/disable-button-at-frame-2/78005 "2005-02-01T11:35:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![soopachick](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@soopachick](https://forum.kirupa.com/u/soopachick)\
**Post date:** [February 1, 2005, 11:35am UTC](https://forum.kirupa.com/t/disable-button-at-frame-2/78005/1 "2005-02-01T11:35:08Z")

</div>

Hi Everyone~

I have my prevButton that I would like to disable when it reaches a certain frame of my movie…

I thought a simple if statement would do… but i’m new at actionscripts and it doesn’t seem to work…:hurt:

Right now, I’m applying this to my prevButton

if(mygallery.frame=2){  
this.enabled = false;  
}

does this look right? If you can spare a moment, I would really appreciate your help!

Thankyouverymuch.
