setsolid
07-15-2005, 08:03 PM
Hello,
I was taking that tweening tutorial and got stuck on the easing part.
The errors are always in the Math.something part of the code. Once
I removed all Math aspects of the code I still had tweening but of
course no easing. I copied the code straight from the tut.
Math.square = function (n){
return n*n;
}
var currentFrame = 0;
ball_mc.onEnterFrame = function(){
ball_mc._x = 50 + Math.square(currentFrame/10) * 450;
if (++currentFrame > 10) delete this.onEnterFrame;
}
I was taking that tweening tutorial and got stuck on the easing part.
The errors are always in the Math.something part of the code. Once
I removed all Math aspects of the code I still had tweening but of
course no easing. I copied the code straight from the tut.
Math.square = function (n){
return n*n;
}
var currentFrame = 0;
ball_mc.onEnterFrame = function(){
ball_mc._x = 50 + Math.square(currentFrame/10) * 450;
if (++currentFrame > 10) delete this.onEnterFrame;
}