# Drag and lock

**URL:** <https://forum.kirupa.com/t/drag-and-lock/237949>\
**Category:** Uncategorized\
**Created:** [September 5, 2007, 7:41pm UTC](https://forum.kirupa.com/t/drag-and-lock/237949 "2007-09-05T19:41:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)\
**Post date:** [September 5, 2007, 7:41pm UTC](https://forum.kirupa.com/t/drag-and-lock/237949/1 "2007-09-05T19:41:08Z")

</div>

Hello there,

I’m trying to figure out how to drag and lock an item to a movie clip. I have 4 different items that are going to be draggable to a movie clip area called “basket\_mc”. Once they hit the movie clip area, these 4 items will be lock to that. I was able to drag them to the area, but I also want them to lock as well. any ideas please?

```auto

stop();

tv_mc.onPress = function () {
    startDrag ("tv_mc");
}
tv_mc.onRelease = function () {
    stopDrag ();
    if (tv_mc._droptarget == "/tv_mc") {
        basket_mc.gotoandStop("tv_mc");
    }
}

mobile_mc.onPress = function () {
    startDrag ("mobile_mc");
}
mobile_mc.onRelease = function () {
    stopDrag ();
    if (mobile_mc._droptarget == "/mobile_mc") {
        basket_mc.gotoandStop("mobile_mc");
    }
}

mouse_mc.onPress = function () {
    startDrag ("mouse_mc");
}
mouse_mc.onRelease = function () {
    stopDrag ();
    if (mouse_mc._droptarget == "/mouse_mc") {
        basket_mc.gotoandStop("mouse_mc");
    }
}

phone_mc.onPress = function () {
    startDrag ("phone_mc");
}
phone_mc.onRelease = function () {
    stopDrag ();
    if (phone_mc._droptarget == "/phone_mc") {
        basket_mc.gotoandStop("phone_mc");
    }
}

```
