# \[FMX04\]Need help on complex rollover button with transitions script

**URL:** https://forum.kirupa.com/t/fmx04-need-help-on-complex-rollover-button-with-transitions-script/197178
**Category:** flash
**Created:** [August 14, 2006, 2:39pm UTC](https://forum.kirupa.com/t/fmx04-need-help-on-complex-rollover-button-with-transitions-script/197178 "2006-08-14T14:39:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Vinyl\_Burn](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@Vinyl\_Burn](https://forum.kirupa.com/u/Vinyl_Burn)
#### Post date: [August 14, 2006, 2:39pm UTC](https://forum.kirupa.com/t/fmx04-need-help-on-complex-rollover-button-with-transitions-script/197178/1 "2006-08-14T14:39:01Z")

</div>

[FMX04]Need help on complex rollover button and transition script

Ok I tried to merge 2 tutorials together the “Complex Button RollOver/RollOut Effects” with the “Transitions Between External SWFs” tutorial. For some reason I can’t seem to get the buttons to function properly. I keep getting a mouse over error I’m sure it’s something really small that I’m overlooking.

Please Help

//all this code is inside the complex button so you can stick as many as you want  
//on the stage and all will work… they all will have this code in it…

stop(); // stop the movie clip from playing (stop button from growing, we want that when the mouse rolls over only

this.onEnterFrame = function(){  
if(rewind == true){ //if rewind switch is set to true play backwards  
prevFrame(); // play backwards  
}  
}

this.onRollOver = function(){  
rewind = false; //set variable (or switch) that decides wether ot not to play backwards…  
play(); // play this movie clip… (grow the button(tween));  
}

this.onRollOut = function(){  
rewind = true; //set or rewind switch to true so it will play backwards…  
}

this.onRelease = function(){  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “section1”;  
container.loadMovie(“section1.swf”);  
} else if (\_root.currMovie != “section1”) {  
if (container.\_currentframe \>= container.midframe) {  
\_root.currMovie = “section1”;  
container.play();  
}  
}  
}
