# Complex Button RollOver/RollOut Effects Trouble

**URL:** <https://forum.kirupa.com/t/complex-button-rollover-rollout-effects-trouble/228489>\
**Category:** flash\
**Created:** [June 8, 2007, 7:06am UTC](https://forum.kirupa.com/t/complex-button-rollover-rollout-effects-trouble/228489 "2007-06-08T07:06:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitantardero](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@Nitantardero](https://forum.kirupa.com/u/Nitantardero)\
**Post date:** [June 8, 2007, 7:06am UTC](https://forum.kirupa.com/t/complex-button-rollover-rollout-effects-trouble/228489/1 "2007-06-08T07:06:18Z")

</div>

Hello, sorry if my english is not to good:wasted: , I´m having a problem with this tutorial.

[http://www.kirupa.com/developer/mx2004/button\_effect.htm](http://www.kirupa.com/developer/mx2004/button_effect.htm)

I used the code and works fine, the problems is that when I change the last chunk of the code to go to a frame, the animation resets. The code I´m using is the next one:

stop();  
this.onEnterFrame = function() {  
if (rewind == true) {  
prevFrame();  
}  
}  
this.onRollOver = function () {  
rewind = false;  
play();

}  
this.onRollOut = function(){  
rewind = true;  
}  
this.onRelease = function(){  
gotoAndPlay (“home”);

}

If anyone sees the problem, pleaaaaaaaaaase let me know. Thanks !!
