PDA

View Full Version : height being drawn in a triangle



ditti
May 16th, 2005, 08:35 AM
I have this triangle drawn (see fla)(Got it from this forum).
Now I want a height being drawn as well.
I want a height from point A beeing drawn to BC
The angle at BC must be 90 degrees of course and the height drawn must alter when I drag the points B and C.
Is this possible to do in flash, I have seen it done in JAVA

stryke
May 16th, 2005, 05:38 PM
Of course that is possible. Just look how u can get the the point where the height "drop" on the hypothenuse (the longest side, don't know if i spell it right). Then use moveTo and lineTo to draw from point A to that calculatet point. And most important: try code for yourself :)

ditti
May 16th, 2005, 10:29 PM
Thank yoy stryke, belive it or not but I succeded to cod for a height to be drawn!
I am so proud, you encouraged me to try.

stryke
May 17th, 2005, 03:26 AM
Thank yoy stryke, belive it or not but I succeded to cod for a height to be drawn!
I am so proud, you encouraged me to try.

Very cool. Congratulations :)