# Btn disabled

**URL:** <https://forum.kirupa.com/t/btn-disabled/173000>\
**Category:** Uncategorized\
**Created:** [December 20, 2005, 7:41am UTC](https://forum.kirupa.com/t/btn-disabled/173000 "2005-12-20T07:41:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)\
**Post date:** [December 20, 2005, 7:41am UTC](https://forum.kirupa.com/t/btn-disabled/173000/1 "2005-12-20T07:41:51Z")

</div>

Hello everyone…

Ok I have 6 button call m1-m6…ok my problem is how to disabled button when one of the button being press…and also stt.text will display crrently selected button…coz currently when I press the button it never stated and also 'stt.text ’ also show nothing…any help would be appreciated…

tq again!

this is the code I’m using…

```auto

stop();

//-------loop through button---------//
for (var i = 1; i<7; i++) {
	this["m"+i].ivar = i;
	this["m"+i].onRollOver = overMe;
	this["m"+i].onRollOut = outMe;
	this["m"+i].onPress = selectMe;
}

function overMe(p) {
	this.gotoAndPlay(2);
	stt.text = "card type no :"+" "+this.ivar;
}

function outMe(q) {
	this.gotoAndPlay(1);
	stt.text ="";
}
function selectMe(r) {
	//trace(this.ivar);
	stt.text = "card type no :"+" "+this.ivar;
}

```
