# Button-problems

**URL:** <https://forum.kirupa.com/t/button-problems/13229>\
**Category:** Uncategorized\
**Created:** [February 10, 2003, 4:16pm UTC](https://forum.kirupa.com/t/button-problems/13229 "2003-02-10T16:16:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maw\_webdesign](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@maw\_webdesign](https://forum.kirupa.com/u/maw_webdesign)\
**Post date:** [February 10, 2003, 4:16pm UTC](https://forum.kirupa.com/t/button-problems/13229/1 "2003-02-10T16:16:48Z")

</div>

Hi there again…

I found the elastic code I was looking for.

But…

When I’m on a button and move the mouse to the bottom (The mouse has left the .swf) my button hangs…

Can anyone help me solve this problem?

[http://www.flyersonline.nl/menu-test.html](http://www.flyersonline.nl/menu-test.html)

Thanx…

This is the code I use:

====================  
onClipEvent (load) {  
this.\_y = 101;  
closedy = 101;  
openy = 52;  
movey = 0;  
}  
onClipEvent (enterFrame) {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
movey += (openy-this.\_y)/3;  
movey \*= 0.8;  
this.\_y += movey;  
} else {  
movey += (closedy-this.\_y)/1;  
movey \*= 0.2;  
this.\_y += movey;  
}  
}

---

<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 10, 2003, 5:03pm UTC](https://forum.kirupa.com/t/button-problems/13229/2 "2003-02-10T17:03:03Z")

</div>

Welcome.  
[http://www.kirupaforum.com/showthread.php?s=&threadid=7457](http://www.kirupaforum.com/showthread.php?s=&threadid=7457)
