# Roll in/out buttons

**URL:** https://forum.kirupa.com/t/roll-in-out-buttons/157328
**Category:** flash
**Created:** [August 1, 2005, 6:12am UTC](https://forum.kirupa.com/t/roll-in-out-buttons/157328 "2005-08-01T06:12:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![2wo](https://avatars.discourse-cdn.com/v4/letter/2/96bed5/32.png) [@2wo](https://forum.kirupa.com/u/2wo)
#### Post date: [August 1, 2005, 6:12am UTC](https://forum.kirupa.com/t/roll-in-out-buttons/157328/1 "2005-08-01T06:12:12Z")

</div>

```php

```

So ive created Roll in/out buttons, similar to the tutorial here, and im wondering how i can have it so that when they are pressed it will proceed to a certain frame. ive tried the gotoAndPlay() command but no success. my current script looks like this and im wondering how i can modify it so it will work:

```auto

So ive created Roll in/out buttons, similar to the tutorial here, and im wondering how i can have it so that when they are pressed it will proceed to a certain frame. ive tried the gotoAndPlay() command but no success. my current script looks like this and im wondering how i can modify it so it will work: <as>
 //stop();
  
 this.onEnterFrame = function(){
 
 if(rewind == true){
 
 prevFrame();
 
 }
 
 }
  
 this.onRollOver = function(){
 
 rewind = false;
 play();
 
 }
  
 this.onRollOut = function(){
 
 rewind = true;
 
 }
  
 this.onRelease = function(){
 
 getURL("home.html","_blank");
 
 }
 </as>

```
