MATH! Distance to a line from a point

Hi Guys,

Does anyone know a function/formula for getting the distance from a point to a line (i.e. the closest point on the LINEAR line to the point).

It’s really driving me nuts! I’ve found heaps of Math functions on the net, but I’m just not sure how to apply them in Flash…

Any help you wizards can provide would be awesome!

Thanks,

Lars