# Connector class

**URL:** <https://forum.kirupa.com/t/connector-class/232315>\
**Category:** flash\
**Created:** [July 12, 2007, 7:02pm UTC](https://forum.kirupa.com/t/connector-class/232315 "2007-07-12T19:02:10Z")\
**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 12, 2007, 7:02pm UTC](https://forum.kirupa.com/t/connector-class/232315/1 "2007-07-12T19:02:10Z")

</div>

_ **update: Connector is finished and here to download:** _  
To see a working example:  
[http://www.sammyjoeosborne.com/FlashTests/connectorExample.swf](http://www.sammyjoeosborne.com/FlashTests/connectorExample.swf)

Hey everyone,  
I’m wanting to write a Connector class for my first jump into AS3. A Connector object would take two display objects as parameters, and it would draw a connecting line between them.  
Whenever either object moved, the Connector would keep track of that and update the connecting line appropriatly.

var connector:Connector = new Connector(sprite1, sprite2);

Is this a possible implemenation? Will Connector be able to register itself as a listener for when sprite1 and sprite2 move or does that have to be done outside of the Connector class?

If I sound idiotic I apologize…I’m trying to get my mind wrapped around events so I wasn’t sure if this was a possible implementation or not.
