# Complex Button Rollover Tutorial Question

**URL:** https://forum.kirupa.com/t/complex-button-rollover-tutorial-question/196446
**Category:** flash
**Created:** [August 8, 2006, 1:58pm UTC](https://forum.kirupa.com/t/complex-button-rollover-tutorial-question/196446 "2006-08-08T13:58:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pete9507](https://avatars.discourse-cdn.com/v4/letter/p/9fc29f/32.png) [@pete9507](https://forum.kirupa.com/u/pete9507)
#### Post date: [August 8, 2006, 1:58pm UTC](https://forum.kirupa.com/t/complex-button-rollover-tutorial-question/196446/1 "2006-08-08T13:58:59Z")

</div>

Hi I’m working on the Complex Button Rollover/ Rollout Effects tutorial with Flash 8(here is the link: [http://kirupa.com/developer/mx2004/button\_effect.htm](http://kirupa.com/developer/mx2004/button_effect.htm)

In the tutorial the button opens a new window for a web page. I’m trying to get that button to go to a frame label within my flash movie, but the gotoAndPlay method doesn’t seem to be working for me.

This is the code from the tutorial:

```auto

[FONT=Arial][SIZE=2] //stop(); this.onEnterFrame = function(){ [/SIZE][/FONT][FONT=Arial][SIZE=2] if(rewind == true){ [/SIZE][/FONT][FONT=Arial][SIZE=2] prevFrame(); [/SIZE][/FONT][FONT=Arial][SIZE=2] } [/SIZE][/FONT][FONT=Arial][SIZE=2] } this.onRollOver = function(){ [/SIZE][/FONT][FONT=Arial][SIZE=2] rewind = false; play(); [/SIZE][/FONT][FONT=Arial][SIZE=2] } this.onRollOut = function(){ [/SIZE][/FONT][FONT=Arial][SIZE=2] rewind = true; [/SIZE][/FONT][FONT=Arial][SIZE=2] } this.onRelease = function(){ [/SIZE][/FONT][FONT=Arial][SIZE=2] getURL("http://www.kirupa.com","_blank"); [/SIZE][/FONT][FONT=Arial][SIZE=2] } [/SIZE][/FONT][FONT=Arial][SIZE=2] [/SIZE][/FONT]
 

```

And the following is how I edited the code:

```auto
stop();
this.onEnterFrame = function(){

if(rewind == true){

prevFrame();

}

}
 
this.onRollOver = function(){

rewind = false;
play();

}
 
this.onRollOut = function(){

rewind = true;

}
 
 this.onRelease = function(){
gotoAndStop("Scene 1", "pgtwo");

}

```

Can someone tell me how to do this? Also here is a link to the actual .fla  
[http://www.patsanders.com/rollover.fla](http://www.patsanders.com/rollover.fla)
