What I love even more than doing animation, is doing challenging code-driven animation.
The line dynamics itself is just Hooke’s law stuff – basic physics. Took some experimentation to get a smooth curve drawn through a series of points (basicaly, the control points of your previous and next points need to be in line).
The cars follow one of the line’s points with differing elasticity and damping, but the real pain in the backside was drawing the dashed line via code, in crummy ActionScript. Luckily, I’m a persistent bastard 🙂 Read more about it on Bannerblog.