# How to smooth an elastic effect

**URL:** <https://forum.kirupa.com/t/how-to-smooth-an-elastic-effect/211827>\
**Category:** Uncategorized\
**Created:** [January 5, 2007, 3:28pm UTC](https://forum.kirupa.com/t/how-to-smooth-an-elastic-effect/211827 "2007-01-05T15:28:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rosanna](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@rosanna](https://forum.kirupa.com/u/rosanna)\
**Post date:** [January 5, 2007, 3:28pm UTC](https://forum.kirupa.com/t/how-to-smooth-an-elastic-effect/211827/1 "2007-01-05T15:28:04Z")

</div>

I have a serie of movie clip parts from a menu. Each movie clip has an elastic effect on rollover with the following code.  
it is ok but not smooth enough I wonder how I could smooth the effect. Is there a function for this ?

[SIZE=1]monClip.onRollOver = function() {  
this.onEnterFrame = function() {  
if (this.\_xscale \>= 150) {  
this.\_xscale = this.\_yscale = 150;  
delete this.onEnterFrame;  
};  
this.\_xscale +=10;  
this.\_yscale +=10;  
};  
};  
monClip.onRollOut = function() {  
this.onEnterFrame = function() {  
if (this.\_xscale \<= 150) {  
this.\_xscale = this.\_yscale = 100;  
delete this.onEnterFrame;  
};  
this.\_xscale -=10;  
this.\_yscale -=10;  
};  
};[/SIZE]  
[SIZE=1][/SIZE]
