I am having 3 movie Clips named point1_mc, point2_mc, point3_mc in the
stage. They are arranged  in such a way to form a triangle...
Now how can i get those 3 angles and sides formed by these points.?

Sides are given by the lengths of the vectors between the points (eg: x = point1_mc._x - point2_mc._x, y = point1_mc._y - point2_mc._y, so side length =sqrt(x*x + y*y) )

Once you have these sides, you can use the cosine rule to find the angles: If you know the three sides a,b,c, the angle A between the sides b and c is given by a*a = b*b + c*c - 2*b*c*cosA.

To get acos(A), you need to use atan(A): acos(A)=atan(A/sqrt(1 - A*A))

Best
Danny
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to