Complex Button RollOver/RollOut Effects Trouble

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

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 !!