# Movie clip buttons

**URL:** <https://forum.kirupa.com/t/movie-clip-buttons/27115>\
**Category:** Uncategorized\
**Created:** [July 30, 2003, 8:22am UTC](https://forum.kirupa.com/t/movie-clip-buttons/27115 "2003-07-30T08:22:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kobrakai](https://avatars.discourse-cdn.com/v4/letter/k/8491ac/32.png) [@kobrakai](https://forum.kirupa.com/u/kobrakai)\
**Post date:** [July 30, 2003, 8:22am UTC](https://forum.kirupa.com/t/movie-clip-buttons/27115/1 "2003-07-30T08:22:35Z")

</div>

Hi everyone …

just one question … Im fairly handy with flash MX but ive been having problems with using movie clips as buttons. what im trying to do is make a button do the following:

When user rolls over, play frame 1  
when user rolls off, play frame 20  
if user clicks button, play frame 30

ive tried a lot of tutorials and searched a few forums so far, but it keeps acting wierd, most of the time it rolls over fine, but is i rollover, then rolloff before it reaches frame 20, it stops @ frame 20 and whatever i do doesnt react anymore…

help would really be appreciated, even if its a link to a good tutorial ,and im even willing to buy a book if it covers the topic well …

thanks a lot

---

<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:** [July 30, 2003, 8:31am UTC](https://forum.kirupa.com/t/movie-clip-buttons/27115/2 "2003-07-30T08:31:06Z")

</div>

If you are trying to achieve a rollover/rollout effect, check the file.

---

<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:** [July 30, 2003, 8:42am UTC](https://forum.kirupa.com/t/movie-clip-buttons/27115/3 "2003-07-30T08:42:02Z")

</div>

thanks a lot but actually thats a bit too complicated … when the user rolls off, i want the animation to begin at frame 20, no matter how long the user has been hovering on the button, very much like the buttons of the right side of [http://www.shiver7.com/](http://www.shiver7.com/)

thanks again claudio

---

<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:** [July 30, 2003, 8:52am UTC](https://forum.kirupa.com/t/movie-clip-buttons/27115/4 "2003-07-30T08:52:10Z")

</div>

```auto
effect.onEnterFrame = function() { //the action is triggered continually at the frame rate of the movie
if (OK) {//if OK is true (assigned when you rollover the button)
effect.nextFrame(); //tell effect mc to play its next frame
} else { //if OK is false (assigned when you rollout the button)
effect.prevFrame(); //tell effect mc to play its previous frame
}
};

```
