Using the speed of a layer to drive an effect

Author: 
Malex

Problem : you want to use the speed/velocity of a layer's movement in space to drive, say, an effect