# Onclick stay highlighted flash button

**URL:** https://forum.kirupa.com/t/onclick-stay-highlighted-flash-button/98189
**Category:** Uncategorized
**Created:** [January 4, 2004, 12:31pm UTC](https://forum.kirupa.com/t/onclick-stay-highlighted-flash-button/98189 "2004-01-04T12:31:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)
#### Post date: [January 4, 2004, 12:31pm UTC](https://forum.kirupa.com/t/onclick-stay-highlighted-flash-button/98189/1 "2004-01-04T12:31:53Z")

</div>

I have developed a flash navigation for a particular web site. I created the button effect using a movie clip and some flash action script. The script I used for the buttons was something like below and adjusted to suit eaach button, five in total.

[AS]

buttonOne.onRollOver = function() {  
OK1 = true;  
};  
buttonOne.onRollOut = function() {  
OK1 = false;  
};  
effectOne.onEnterFrame = function() {  
if (OK1) {  
effectOne.nextFrame();  
} else {  
effectOne.prevFrame();  
}  
};

[/AS]

The script works great. However I need to button highlighted when say the user is on home. And then when the user click the next button find out more, I wish for that button then to remain highlighted. My action script knowledge is very limited, so I would appreciate any directions people can shed light on.

If anyone can help please add your recomendations to this thread. Thanks

Trevor Saint
