# Again disabling buttons

**URL:** https://forum.kirupa.com/t/again-disabling-buttons/193177
**Category:** Uncategorized
**Created:** [July 4, 2006, 11:19pm UTC](https://forum.kirupa.com/t/again-disabling-buttons/193177 "2006-07-04T23:19:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flash\_legend](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@flash\_legend](https://forum.kirupa.com/u/flash_legend)
#### Post date: [July 4, 2006, 11:19pm UTC](https://forum.kirupa.com/t/again-disabling-buttons/193177/1 "2006-07-04T23:19:40Z")

</div>

good day members of Kirupa

i am not good in action script but i will tell you my idea

i have 6 buttons each button inside a movie clip which have animation onRollover  
and onRollout.

now my question is

when i press the button, the button animation start from frame 2 inside the movie clip  
and stop for instance frame 8  
then it will be disable until i press another button  
so the previouse button will be enabled and it will continue the animation

basically i put the code in the time line on the stage here it is

```auto

for (i=1; i<6; i++) {
	this["mc"+i].onRollOver = overMe;
	this["mc"+i].onRollOut = outMe;
	this["mc"+i].onPress = selectMe;
}
function overMe() {
	this.gotoAndPlay(2);
}
function outMe() {
	this.gotoAndPlay(8);
}
function selectMe() {
	this["mc"+i].enabled=true;
}

```

i tried my best to solve it , but no way

any help guys to fininsh it

file is attached

note :

i am using flash professional 8
