# Rollover, Rollout Button, Action problems

**URL:** <https://forum.kirupa.com/t/rollover-rollout-button-action-problems/189869>\
**Category:** Uncategorized\
**Created:** [June 6, 2006, 8:25pm UTC](https://forum.kirupa.com/t/rollover-rollout-button-action-problems/189869 "2006-06-06T20:25:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![helious](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@helious](https://forum.kirupa.com/u/helious)\
**Post date:** [June 6, 2006, 8:25pm UTC](https://forum.kirupa.com/t/rollover-rollout-button-action-problems/189869/1 "2006-06-06T20:25:20Z")

</div>

Hi. I followed at guide on how to make a rollover animations, which rewinds it self, when you roll out…

My problem is, that the Action Script when you press the button links to the beginning of the movie… How do i change this to a Scene and Frame ?  
I tried to insert (“Scene 2”, 1) at the end in gotoandplay, but nothing seems to work…

Here is the Actionscript.

stop();  
this.onEnterFrame = function() {  
if (rewind == true) {  
prevFrame();  
}  
};  
this.onRollOver = function() {  
rewind = false;  
play();  
};  
this.onRollOut = function() {  
rewind = true;  
};  
this.onRelease = function() {  
\_root.gotoAndPlay(1);  
};

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [June 6, 2006, 8:26pm UTC](https://forum.kirupa.com/t/rollover-rollout-button-action-problems/189869/2 "2006-06-06T20:26:55Z")

</div>

use frame labels instead - give the frame you want to go to a frame label. Then in your code use

```auto
gotoAndPlay("framelabel")

```

doesn’t matter what scene 🙂

---

<div class="post-metadata">

**Author:** ![helious](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@helious](https://forum.kirupa.com/u/helious)\
**Post date:** [June 6, 2006, 9:24pm UTC](https://forum.kirupa.com/t/rollover-rollout-button-action-problems/189869/3 "2006-06-06T21:24:23Z")

</div>

Thankyou… That Worked! 😃

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [June 6, 2006, 9:41pm UTC](https://forum.kirupa.com/t/rollover-rollout-button-action-problems/189869/4 "2006-06-06T21:41:58Z")

</div>

:thumb:
