ActionScript: Move object with smooth acceleration and deceleration with inertia

Today a simple sample of code to create an inertia effect in ActionScript 3.0.

The character will start to move with smooth acceleration if you press an arrow key.

You can download the source code here : Flash_acceleration_benoifreslon.com.fla

1 thought on “ActionScript: Move object with smooth acceleration and deceleration with inertia

  1. Thanks dude
    it was very helpful
    I had my own version of smooth moving but this one better
    and the reason is I got that using switch is much more faster than if
    I don’t what is the reason of different speed of executing code in both ways
    if you had any idea give me feedback

Leave a Comment