# Elastic Button HELP!

**URL:** <https://forum.kirupa.com/t/elastic-button-help/177625>\
**Category:** Uncategorized\
**Created:** [February 3, 2006, 4:38pm UTC](https://forum.kirupa.com/t/elastic-button-help/177625 "2006-02-03T16:38:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericlarson007](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@ericlarson007](https://forum.kirupa.com/u/ericlarson007)\
**Post date:** [February 3, 2006, 4:38pm UTC](https://forum.kirupa.com/t/elastic-button-help/177625/1 "2006-02-03T16:38:20Z")

</div>

I’m trying to get this button to bounce in and out when rolled over. The script works in one document but I can’t get it to work when I copy it to another. Any advice?

MovieClip.prototype.jumpSkale = function(obj, rush, friction) {  
this.tempo += (obj - this.\_xscale) \* rush;  
this.tempo \*= friction;  
this.\_xscale = this.\_yscale += this.tempo;  
};

for (var i = 1; i \<= 3; i++) {  
this[“MC” + i].onEnterFrame = function() {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.jumpSkale(400, .9, .6);  
} else {  
this.jumpSkale(100, .6, .5);  
}  
};  
this.onEnterFrame = function() {  
this.\_xscale = this.\_yscale = \_root[“MC” + this.nr].\_xscale;  
};  
}
