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:
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.