# On rollover help

**URL:** https://forum.kirupa.com/t/on-rollover-help/113239
**Category:** Uncategorized
**Created:** [June 16, 2004, 6:51am UTC](https://forum.kirupa.com/t/on-rollover-help/113239 "2004-06-16T06:51:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Cloakendagger](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Cloakendagger](https://forum.kirupa.com/u/Cloakendagger)
#### Post date: [June 16, 2004, 6:51am UTC](https://forum.kirupa.com/t/on-rollover-help/113239/1 "2004-06-16T06:51:18Z")

</div>

HI  
I figured this question might be better helped in this forum.  
I have a button that plays a movie clip. that movie clip is a drop down menu.  
Is there a code that I can put on the button that will allow the viewer to rollover the button activate the menu and then when they roll off the “menu” part it plays the animation in revers.  
I made it already with very messy coding and placed a demo on this site. [www.deck-medics.com/DM-2.swf](http://www.deck-medics.com/DM-2.swf)

Im thinking I need to use something like this.

[font=Courier New]onClipEvent (enterFrame) {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
gotoandplay(2);  
} else {  
gptoandplay(3);  
}  
}[/font]

What do ya think?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2004, 7:29am UTC](https://forum.kirupa.com/t/on-rollover-help/113239/2 "2004-06-16T07:29:54Z")

</div>

you could do the reverse animation frame by frame and just instruct the button to go to the frame where the reversing begins.

sam

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2004, 9:40am UTC](https://forum.kirupa.com/t/on-rollover-help/113239/3 "2004-06-16T09:40:11Z")

</div>

Play the animation in reverse? How bout something like:  
gotoAndPlay(\_currentframe - 1)  
Not sure if it will work :-/

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2004, 9:44am UTC](https://forum.kirupa.com/t/on-rollover-help/113239/4 "2004-06-16T09:44:28Z")

</div>

this might have some ideas.

[http://www.kirupaforum.com/forums/showthread.php?t=11427](http://www.kirupaforum.com/forums/showthread.php?t=11427)
