Diagram: http://i.stack.imgur.com/gpL0P.png
Summary: How do I find the coordinates of the blue point in the diagram so I can calculate the positions of the red points adjacent to it and draw my triangle?
Details of problem: I am trying to make a tail on a drag-able tool-tip balloon for a map application I am making. I would like the the tail to be drawn from the location where the balloon is placed (point 0,0 of the sprite containing both balloon and tail) to the edge of the balloon, with the base of the tail always being the same arbitrary width width it connects to the balloon. The tail would be redrawn at the new coordinates every frame.
I would prefer not to hide part of the tail underneath the balloon, as I intend to use some transparency on it.
If the path were a circle or ellipse, I could use the angleToProgress method (along with some trig) of the CirclePath2D class of greensock's motion path library I could place a hidden path follower and get it's xy... However I am using a roundedRectangle... So I was thinking a better method would be some kind of collision detection between a line and wherever it crosses a path drawn around the perimeter of the balloon. However, I can't find any collision functions that return the xy of the collision.
So I'm stumped. I'm thinking what I want to do may not be easily doable in AS3 using the built in collision methods. Is there a collision library that will let me do this, or, perhaps preferably, some math that is eluding me? Because this seems like I'm over thinking it and it shouldn't be this hard.
[Note: I can't insert the diagram because I don't have enough reputation.]