# How to code advanced buttons propertly?

**URL:** <https://forum.kirupa.com/t/how-to-code-advanced-buttons-propertly/194812>\
**Category:** flash\
**Created:** [July 26, 2006, 2:30pm UTC](https://forum.kirupa.com/t/how-to-code-advanced-buttons-propertly/194812 "2006-07-26T14:30:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![geko781](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@geko781](https://forum.kirupa.com/u/geko781)\
**Post date:** [July 26, 2006, 2:30pm UTC](https://forum.kirupa.com/t/how-to-code-advanced-buttons-propertly/194812/1 "2006-07-26T14:30:39Z")

</div>

Hello everyone,

I am running into few issues with my site and would really appreciate any input. First question is I have a navigation bar with a series of buttons on it. When you rollover any other these buttons there is and action on them saying :

on (rollOver) {  
this.gotoAndPlay(“over”);  
}  
on (rollOut) {  
this.gotoAndPlay(“out”);

on (press) {  
\_root.main\_menu\_mc.features\_button\_mc.enabled=false;  
this.gotoAndStop(“out”)  
}

Now I want to create some AS that when a button is click and disabled and then the user clicks on another button all buttons will reset themselves and play “out” if they were previously clicked (enabled=false)

So in the end I am just looking to say "Hey flash if a button 1 is clicked and disbaled and then button 2 is click then button 1 needs to enabled itself and play “out”.

I am open to any clean proper ways of coding this. I am trying to become more clean and intuitive with my AS so any suggestion would be great. THANKS!
