# Making an object drag-able

**URL:** <https://forum.kirupa.com/t/making-an-object-drag-able/42353>\
**Category:** Uncategorized\
**Created:** [February 8, 2004, 7:04am UTC](https://forum.kirupa.com/t/making-an-object-drag-able/42353 "2004-02-08T07:04:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanc](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@seanc](https://forum.kirupa.com/u/seanc)\
**Post date:** [February 8, 2004, 7:04am UTC](https://forum.kirupa.com/t/making-an-object-drag-able/42353/1 "2004-02-08T07:04:09Z")

</div>

how to i make a object or graphic drag-able?

---

<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:** [February 8, 2004, 7:07am UTC](https://forum.kirupa.com/t/making-an-object-drag-able/42353/2 "2004-02-08T07:07:49Z")

</div>

```auto

on(press){
startDrag(this,true)
}
on(release){
stopDrag()
}

```

---

<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:** [February 8, 2004, 7:38am UTC](https://forum.kirupa.com/t/making-an-object-drag-able/42353/3 "2004-02-08T07:38:37Z")

</div>

for some reason when i try to drag the object with that script on it, the entire scene drags around (other objects, etc.) any idea?:-/

---

<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:** [February 8, 2004, 9:43am UTC](https://forum.kirupa.com/t/making-an-object-drag-able/42353/4 "2004-02-08T09:43:13Z")

</div>

that means you have the script on the frame, not the object, so it drags \_root.

---

<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:** [February 8, 2004, 10:46am UTC](https://forum.kirupa.com/t/making-an-object-drag-able/42353/5 "2004-02-08T10:46:32Z")

</div>

:thumb:

---

<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:** [February 8, 2004, 11:34am UTC](https://forum.kirupa.com/t/making-an-object-drag-able/42353/6 "2004-02-08T11:34:19Z")

</div>

> \*Originally posted by radicaljugnu \*  
> \*\*

```auto

on(press){
startDrag(this,true)
}
on(release){
stopDrag()
}

```

\*\*

include releaseOutside too

```auto

on(press){
startDrag(this,false)
}
on(release, releaseOutside){
stopDrag()
}

```
