# Connector Class

**URL:** <https://forum.kirupa.com/t/connector-class/232580>\
**Category:** open source\
**Created:** [July 16, 2007, 6:03am UTC](https://forum.kirupa.com/t/connector-class/232580 "2007-07-16T06:03:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![slopps](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@slopps](https://forum.kirupa.com/u/slopps)\
**Post date:** [July 16, 2007, 6:03am UTC](https://forum.kirupa.com/t/connector-class/232580/1 "2007-07-16T06:03:18Z")

</div>

**update:to get the class file go here**

> **[Connector class](https://www.kirupa.com/forum/showthread.php?t=268245)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

Draws a connection between two objects diagram style. Check it out:  
[http://www.sammyjoeosborne.com/Flash…torExample.swf](http://www.sammyjoeosborne.com/FlashTests/ConnectorExample.swf)

Just create a new connector, send it two displayObjects, and it’ll connect’em. IE:  
var myConnector:Connector = new Connector(square1, square2);

Can have childs of childs, etc.  
Can turn on/off the pointer arrow, change line color, change line thickness, reverse the direction, change the parent, or change the child.  
You would use these things in the follow way:  
myConnector.lineThickness = 4;  
myConnector.lineColor = 0xff0000;  
myConnector.reverse();  
myConnector.usePointer = false;  
myConnector.setChild(square2);  
myConnector.setParent(square5);

May add a feature to round corners soon…dunno.

Hopefully this is useful to someone. Would be good for diagramming of some sort. Wrote it as part of a larger program I plan on making for creating Family Trees.
