speed = 0; // Acceleration speed. accel = .1; // Every frame execute the following code. this.onEnterFrame = function(){ // Increment speed by the acceleration. speed = Math.round((speed + accel)*100)/100; // Rotate the shape by the current spin speed. _rotation += speed; }