# HELP with onEnterFrame & springing

**URL:** <https://forum.kirupa.com/t/help-with-onenterframe-springing/227751>\
**Category:** flash\
**Created:** [June 1, 2007, 6:54pm UTC](https://forum.kirupa.com/t/help-with-onenterframe-springing/227751 "2007-06-01T18:54:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tckober](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tckober/32/3687_2.png) [@tckober](https://forum.kirupa.com/u/tckober)\
**Post date:** [June 1, 2007, 6:54pm UTC](https://forum.kirupa.com/t/help-with-onenterframe-springing/227751/1 "2007-06-01T18:54:23Z")

</div>

I am trying to apply a springing formula (AS2) to 3 objects on the stage.  
The function works, if i only apply it to one object on the first frame, but it “stutters” if i apply the same function to the other 2 objects as well.  
Each object is supposed to come in a few frames apart.

What am i missing? - it’s driving me nuts.  
Here is the code:

var spring:Number = 0.2;  
var friction:Number = 0.8;  
var startScale = 1;  
var vx:Number = 0;  
var targetScale = 100;  
mc1.\_xscale = mc1.\_yscale = startScale;  
mc1.onEnterFrame = mover;

function mover(){  
var ax:Number = (targetScale - this.\_xscale)\*spring;  
vx += ax;  
vx \*= friction;  
this.\_xscale = this.\_yscale += vx;  
}

i want the same effect for “mc2” and “mc3”.

fla is attached

Thanks a lot in advance!!!
