# Button larger when roll over and smaller when roll out

**URL:** <https://forum.kirupa.com/t/button-larger-when-roll-over-and-smaller-when-roll-out/2990>\
**Category:** flash\
**Created:** [February 19, 2002, 9:45pm UTC](https://forum.kirupa.com/t/button-larger-when-roll-over-and-smaller-when-roll-out/2990 "2002-02-19T21:45:07Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [February 19, 2002, 9:45pm UTC](https://forum.kirupa.com/t/button-larger-when-roll-over-and-smaller-when-roll-out/2990/1 "2002-02-19T21:45:07Z")

</div>

Hi! All,  
Recently I just want to design a button when the mouse roll over the button will gradually become larger (to a fixed size) and gradually comes to the originally size when roll out. I try to use “Adding Buttons to Movie Clips” method, ie, one MC with two layers, an amimation MC (tween from small to big and then big to small) and a button. Add script as follows:  
on the first frame:  
if (Playing eq “True”) {  
&nbsp &nbsp &nbsp &nbsp play ();  
} else {  
&nbsp &nbsp &nbsp &nbsp stop ();  
}

on the button:  
on (rollOver, dragOver) {  
&nbsp &nbsp &nbsp &nbsp Playing = “True”;  
&nbsp &nbsp &nbsp &nbsp play ();  
}  
on (rollOut, dragOut) {  
&nbsp &nbsp &nbsp &nbsp Playing = “False”;  
}  
When I roll over the MC tween small to big and big to small and when roll out the MC gradually small. What I want is when I roll over the MC tween small to big and keep it is except when I roll out. Somebody can tell me how to acheive it. Thanks.

---

<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:** [February 19, 2002, 11:26pm UTC](https://forum.kirupa.com/t/button-larger-when-roll-over-and-smaller-when-roll-out/2990/2 "2002-02-19T23:26:39Z")

</div>

I figured out now. The script is much simple as follows:  
on (rollOver, dragOver) {  
gotoandplay (2);  
}  
on (rollOut, dragOut) {  
gotoandplay (16);  
}  
and put stop(); on the frames 1st, 15th and the last.
