# Rollover problem

**URL:** <https://forum.kirupa.com/t/rollover-problem/160382>\
**Category:** Uncategorized\
**Created:** [August 25, 2005, 3:10pm UTC](https://forum.kirupa.com/t/rollover-problem/160382 "2005-08-25T15:10:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DKusz](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DKusz](https://forum.kirupa.com/u/DKusz)\
**Post date:** [August 25, 2005, 3:10pm UTC](https://forum.kirupa.com/t/rollover-problem/160382/1 "2005-08-25T15:10:56Z")

</div>

I used this code to make my menu, but when I roll over the buttons very fast, the alpha gets stuck in place, sometimes they will get stuck at a different alpha percentage, and they wont go back to the normal state, is there something wrong in my coding?

on (rollOver) {  
this.onEnterFrame = function() {  
if (testbutton\_btn3.\_alpha\>75) {  
testbutton\_btn3.\_alpha -= 60;  
} else {  
//testbutton\_btn4.\_alpha = 20; //just to be sure but maybe not necessary  
this.onEnterFrame = null;  
}  
};  
}  
on (rollOut) {  
this.onEnterFrame = function() {  
if (testbutton\_btn3.\_alpha\<100) {  
testbutton\_btn3.\_alpha += 11;  
} else {  
this.onEnterFrame = null;  
}  
};  
}
