# Playing with Points

**URL:** <https://forum.kirupa.com/t/playing-with-points/239823>\
**Category:** flash\
**Created:** [September 26, 2007, 10:54am UTC](https://forum.kirupa.com/t/playing-with-points/239823 "2007-09-26T10:54:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![substance](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@substance](https://forum.kirupa.com/u/substance)\
**Post date:** [September 26, 2007, 10:54am UTC](https://forum.kirupa.com/t/playing-with-points/239823/1 "2007-09-26T10:54:00Z")

</div>

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 :

```php
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](http://teamimpulse9.com/experiment.swf) if you want to look at everything.
