# The circle will stick to the line

**URL:** <https://forum.kirupa.com/t/the-circle-will-stick-to-the-line/57938>\
**Category:** Uncategorized\
**Created:** [July 18, 2004, 12:30am UTC](https://forum.kirupa.com/t/the-circle-will-stick-to-the-line/57938 "2004-07-18T00:30:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![karena](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@karena](https://forum.kirupa.com/u/karena)\
**Post date:** [July 18, 2004, 12:30am UTC](https://forum.kirupa.com/t/the-circle-will-stick-to-the-line/57938/1 "2004-07-18T00:30:53Z")

</div>

i hav a line and a circle.  
i want wherever i drag the line,the circle which is on the line will follow it.  
How can i do that?  
please drop me an example or actionscript…  
thankx

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 12:24am UTC](https://forum.kirupa.com/t/the-circle-will-stick-to-the-line/57938/2 "2004-07-19T00:24:25Z")

</div>

would something like:  
\_root.circle.\_x = \_root.line.\_x+10;  
\_root.circle.\_y = \_root.line.\_y+10;  
work for you?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 2:58am UTC](https://forum.kirupa.com/t/the-circle-will-stick-to-the-line/57938/3 "2004-07-19T02:58:55Z")

</div>

i not able 2 achieve that…  
here is my attachment…please help me

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 4:39am UTC](https://forum.kirupa.com/t/the-circle-will-stick-to-the-line/57938/4 "2004-07-19T04:39:55Z")

</div>

Something like this?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 4:56am UTC](https://forum.kirupa.com/t/the-circle-will-stick-to-the-line/57938/5 "2004-07-19T04:56:40Z")

</div>

yes!!!thanku…  
but if i want move my line upwards…the circle will slowly and slighty move to the right?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 9:17pm UTC](https://forum.kirupa.com/t/the-circle-will-stick-to-the-line/57938/6 "2004-07-19T21:17:54Z")

</div>

you just need to change the x and y coordinates
