# Different connected lines version

**URL:** <https://forum.kirupa.com/t/different-connected-lines-version/225441>\
**Category:** design\
**Created:** [May 11, 2007, 7:40pm UTC](https://forum.kirupa.com/t/different-connected-lines-version/225441 "2007-05-11T19:40:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![s\_blended](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@s\_blended](https://forum.kirupa.com/u/s_blended)\
**Post date:** [May 11, 2007, 7:40pm UTC](https://forum.kirupa.com/t/different-connected-lines-version/225441/1 "2007-05-11T19:40:17Z")

</div>

Hello to everyone!

I have followed the Connected Lines tutorial for an idea that i have in my mind and i want to use it in my website.

Thing goes like that.

I have 6 small circles which move freely in the stage. I want the lines to connect and follow the circles. The only thing I managed to do is connect the circles with the lines but when the circles move the lines stay still!

Any suggestions?

```auto
    function init() {

    this.createEmptyMovieClip("line", -1);
    drawLine();
    this.onMouseMove = function() {

    drawLine();
    }
    }

    init();
    //
    function drawLine() {

    line.clear();
    line.lineStyle(3, 0xFFFFFF);
    //5->4
    line.moveTo(circle._x, circle._y);
    line.lineTo(circle1._x, circle1._y);
    //4->3
    line.moveTo(circle1._x, circle1._y);
    line.lineTo(circle._x, circle._y);
    updateAfterEvent();
    }

```
