# Peer review:Motion

**URL:** <https://forum.kirupa.com/t/peer-review-motion/172796>\
**Category:** flash\
**Created:** [December 18, 2005, 1:49am UTC](https://forum.kirupa.com/t/peer-review-motion/172796 "2005-12-18T01:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![2F0x4](https://avatars.discourse-cdn.com/v4/letter/2/c68b51/32.png) [@2F0x4](https://forum.kirupa.com/u/2F0x4)\
**Post date:** [December 18, 2005, 1:49am UTC](https://forum.kirupa.com/t/peer-review-motion/172796/1 "2005-12-18T01:49:46Z")

</div>

Hey everyone who’s interested: I’m working on a penner esque motion equation. Sure he’s already done it, but I’d like to hammer this out anyways. Please contribute!

So:

```auto
 
function rocker(a:Number, b:Number, t:Number):Number {
return Math.exp(-a*t) * Math.sin(b*t); 
} 
 
this.myMov_onRollOver = function(){
var t:Number = 1;
onEnterFrame = function(){
		 t++;
		 var mover:Number = rocker(.03, .3, t);
		 myMov_mc._rotation = mover*100;
		 if(t == 120){
			 t = 1;
			 delete onEnterFrame;
		 }
	 }
}

```

So for those of you who don’t know… place all of this stuff on the 1st frame of your main timeline. Make any movieclip object called myMov\_mc. (don’t use a perfect circle).

a is the dampening effect, b is the frequency(speed), t is the incrementing value.

I don’t like my trigger to delete the onEnterFrame. Can someone give me an idea of a test that will have the object end in it original position and delete. I think it’s harder than it sounds. Also, I’m looking for the most effective way to have the first rotation start in the direction of the push.

myMov\_mc.\_rotation = mover\*100;

If I create some sort of conditional that makes mover \* 100 start with a negative value, it should accomplish this. Is that the right way to think about the problem. (by right I mean, Kirupa thought level.)

Help away my friends.
