# How do I drag along a circle?

**URL:** https://forum.kirupa.com/t/how-do-i-drag-along-a-circle/18818
**Category:** flash
**Created:** [April 21, 2003, 4:53pm UTC](https://forum.kirupa.com/t/how-do-i-drag-along-a-circle/18818 "2003-04-21T16:53:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Panda](https://avatars.discourse-cdn.com/v4/letter/p/71c47a/32.png) [@Panda](https://forum.kirupa.com/u/Panda)
#### Post date: [April 21, 2003, 4:53pm UTC](https://forum.kirupa.com/t/how-do-i-drag-along-a-circle/18818/1 "2003-04-21T16:53:55Z")

</div>

[SIZE=3]How do I drag along a circle?[/SIZE]

I’m trying to figure out how to drag something along a circle. Well, I know how to do it along a straight line but I’d like to do it along a circle!!! Please help!!! Anyways, this is how I did it for a straight line (if there’s anyone who’d like to tell me how to do the same thing for a circle I would be VERY happy. (-: ):

this.ratio = 0;  
dragger.onPress = function() {  
this.startDrag(true, 0, 0, line.\_width, 0);  
this.onEnterFrame = function() {  
ratio = Math.round(this.\_x);  
};  
};  
dragger.onRelease = dragger.onreleaseOutside=stopDrag;

PS. Isn’t there some easier way to link an object to any kind of line so you can drag it along the line without having to come up with \_x and \_y and \_cos and \_sin coordinates?? I mean, when you can create motion guides - creating a drag-along-a-line-object should be a piece of cake, right???

PPS. You are welcome to take a look at my .fla!!! THANKS!!!

---

<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: [April 21, 2003, 5:40pm UTC](https://forum.kirupa.com/t/how-do-i-drag-along-a-circle/18818/2 "2003-04-21T17:40:47Z")

</div>

maybe if you specify the diameter of the circle which is 360 degrees it will work or something like that i dont know youre doing this via code if it was a motion guide it would be cake

---

<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: [April 21, 2003, 8:39pm UTC](https://forum.kirupa.com/t/how-do-i-drag-along-a-circle/18818/3 "2003-04-21T20:39:52Z")

</div>

GREAT… How would you make it work with a motion guide??? I would love to know how - but I’m kinda lost… Please help me. 🙂

ThANks. :chinaman:
