# Disabling button

**URL:** https://forum.kirupa.com/t/disabling-button/311523
**Category:** Uncategorized
**Created:** [July 8, 2010, 11:21pm UTC](https://forum.kirupa.com/t/disabling-button/311523 "2010-07-08T23:21:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![baung\_lee](https://avatars.discourse-cdn.com/v4/letter/b/3ec8ea/32.png) [@baung\_lee](https://forum.kirupa.com/u/baung_lee)
#### Post date: [July 8, 2010, 11:21pm UTC](https://forum.kirupa.com/t/disabling-button/311523/1 "2010-07-08T23:21:59Z")

</div>

hi,  
i’m a newbie and i need help on actionscripting. i need to disable prev/next buttons while the mc is playing. after finishing, the buttons are enabled.how to detect that the mc has finished playing? i’m so useless when it comes to scripting. (i’m using as 3).

here’s what i’ve got so far:

function NextClick(e:Event = null)  
{

```
        previousBtn.alpha = 1;
        if(thisFrame &lt; maxFrames)
        {
            
            thisFrame++;
            content1.gotoAndStop(thisFrame);
            
            
        }
        else
            nextBtn.alpha = 0;
            Finish();
        }
    }
    
    function PrevClick(e:Event = null)
    {
        nextBtn.alpha = 1;
        if(thisFrame &gt; 1)
            thisFrame--;
            content1.gotoAndStop(thisFrame);
            if(thisFrame &lt;= 1)
                previousBtn.alpha = 0;
        }
        else
        {
            previousBtn.alpha = 0;
        }
    }

```

:puzzle:  
help appreciated. thanks.
