# How to keep a button in "ACTIVE" state

**URL:** <https://forum.kirupa.com/t/how-to-keep-a-button-in-active-state/261151>\
**Category:** flash\
**Created:** [May 23, 2008, 3:19pm UTC](https://forum.kirupa.com/t/how-to-keep-a-button-in-active-state/261151 "2008-05-23T15:19:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Designophobia](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Designophobia](https://forum.kirupa.com/u/Designophobia)\
**Post date:** [May 23, 2008, 3:19pm UTC](https://forum.kirupa.com/t/how-to-keep-a-button-in-active-state/261151/1 "2008-05-23T15:19:01Z")

</div>

I have built a site in flash with animated nav buttons. I want each button to stay in the ACTIVE state or MOUSEOVER state when the corresponding page is showing.

Here’s my code in the actionscript layer:

```auto
 
about_mc.onEnterFrame = function() {
if (mouse_over_about_mc) {
about_mc.nextFrame();
} else {
about_mc.prevFrame();
}
}; 
samples_mc.onEnterFrame = function() {
if (mouse_over_samples_mc) {
samples_mc.nextFrame();
} else {
samples_mc.prevFrame();
}
}; 
contact_mc.onEnterFrame = function() {
if (mouse_over_contact_mc) {
contact_mc.nextFrame();
} else {
contact_mc.prevFrame();
}
}; 

```

Here’s my code for the invisible button overlaying the movie clip:

```auto
 
on (rollOver) {
mouse_over_about_mc = true;
} on (rollOut) {
mouse_over_about_mc = fstartlse;
}

```

I’m sure it’s an easy solution, but I haven’t found it yet.

Any help is appreciated!
