# Flash MX2004, blinking on a rollon/rollout button

**URL:** <https://forum.kirupa.com/t/flash-mx2004-blinking-on-a-rollon-rollout-button/165118>\
**Category:** flash\
**Created:** [October 7, 2005, 9:34pm UTC](https://forum.kirupa.com/t/flash-mx2004-blinking-on-a-rollon-rollout-button/165118 "2005-10-07T21:34:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mishmash](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mishmash](https://forum.kirupa.com/u/mishmash)\
**Post date:** [October 7, 2005, 9:34pm UTC](https://forum.kirupa.com/t/flash-mx2004-blinking-on-a-rollon-rollout-button/165118/1 "2005-10-07T21:34:19Z")

</div>

I have made a rollon / rollout button using the techinque described in the tutorals section under “complex buttons” which works fine except for when i use the button the goto or play frames in which case it appears to blink.

I think that what is happening is that the click is causing the button to reset to a non rolled over state, then it realises that the mouse is infact over it and so it plays again.

This is the action script that im using…

stop();

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

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

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

Does anybody know a way around this, perhaps a way to insert an “on press” or “on release” state to the button? Or even a different technique to achieve the same effect.

Thanks very much
