I wanted to see what I could do with flash’s Point class and I seem to have gotten stuck on what seemed to be an easy task.
I have two points and a line that connects them, what I want to do it have a textbox in the middle of these two points. I figuired to easiest way to find the middle point between these two points was to just create a new polar point that projectected from the first point at an angle between the two points and at a range of the distance between the two points divided by two.
Anyway, it made sense in my head, here’s what I mean :
var distance:Number = Point.distance(pointOne,pointTwo);
var newPoint:Point = Point.polar(distance / 2,Math.atan2(pointTwo.y - pointOne.y,pointTwo.x - pointOne.x));
but that gives me something funky. Maybe I just misunderstand the method. Oh and what does interpolate do? Here’ the [URL=“http://teamimpulse9.com/experiment.fla”]source if you want to look at everything.