# Enabling buttons through MovieClip.Prototype

**URL:** <https://forum.kirupa.com/t/enabling-buttons-through-movieclip-prototype/84041>\
**Category:** flash\
**Created:** [March 24, 2005, 4:31am UTC](https://forum.kirupa.com/t/enabling-buttons-through-movieclip-prototype/84041 "2005-03-24T04:31:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aam](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@aam](https://forum.kirupa.com/u/aam)\
**Post date:** [March 24, 2005, 4:31am UTC](https://forum.kirupa.com/t/enabling-buttons-through-movieclip-prototype/84041/1 "2005-03-24T04:31:28Z")

</div>

I’m trying to make this script work which has a function to enable buttons.

// This script is on a seperate layer frame:  
// webnav, iden, adv, mult are instances of MCs

btns = [webnav, iden, adv, mult];  
MovieClip.prototype.enableBtns = function(btns) {  
for (i=0; i\<btns.length; i++) {  
btns\*.enabled = true;  
}  
}

// This is on the MC itself  
//partial code …within onClipEvent handler

\_root.navbtns\_mc.webnav.onRelease = function() {  
\_root.navbtns\_mc.webnav.enabled = false;  
enableBtns(\_root.btns);  
}

The buttons disable but just don’t enable again when other buttons are clicked.

The button instances are on the path: \_root.navbtns\_mc.
