# (when pressed) button question

**URL:** <https://forum.kirupa.com/t/when-pressed-button-question/198023>\
**Category:** flash\
**Created:** [August 21, 2006, 9:00pm UTC](https://forum.kirupa.com/t/when-pressed-button-question/198023 "2006-08-21T21:00:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamikeo](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@benjamikeo](https://forum.kirupa.com/u/benjamikeo)\
**Post date:** [August 21, 2006, 9:00pm UTC](https://forum.kirupa.com/t/when-pressed-button-question/198023/1 "2006-08-21T21:00:41Z")

</div>

I am trying to creating buttons using movie clips (so I can have rollOver/rollOut animation) in a Flash website and I was curious to know how to make a button, when pressed, stay that shape or color until another section of the page is visited. An example is at: [www.fluidesign.com](http://www.fluidesign.com).

I know how to create Rollover/Rollout animation using:

stop();

this.onEnterFrame = function(){  
if(rewind == true){  
prevFrame();  
}  
}

this.onRollOver = function(){  
rewind = false;  
play();  
}

this.onRollOut = function(){  
rewind = true;  
}

But again, I want to have the shape or color of the button, when pressed, stay that way until another section of the page is accessed. Can anyone lend a hand?
