# AS2.0-StopDrag();

**URL:** https://forum.kirupa.com/t/as2-0-stopdrag/285919
**Category:** flash
**Created:** [April 7, 2009, 8:16pm UTC](https://forum.kirupa.com/t/as2-0-stopdrag/285919 "2009-04-07T20:16:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![neonreel](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@neonreel](https://forum.kirupa.com/u/neonreel)
#### Post date: [April 7, 2009, 8:16pm UTC](https://forum.kirupa.com/t/as2-0-stopdrag/285919/1 "2009-04-07T20:16:09Z")

</div>

Hi All,

```
I have a window that is dragable, but I want it to stop draging not only on the release but when it hits a certin x and y cord. Here is my function:

```

```auto
function windowDragon()
{
    _root.partners_container_resize.partners_container.vidWin_Panasonic.vidWinheader_panasonic.onPress = function()
    {
        _root.partners_container_resize.partners_container.vidWin_Panasonic.startDrag();
    }
    _root.partners_container_resize.partners_container.vidWin_Panasonic.vidWinheader_panasonic.onRelease = function()
    {
        _root.partners_container_resize.partners_container.vidWin_Panasonic.stopDrag();
    }
}

```

If any one could point me in the right direction I would be grateful.

Thanks in advance,  
neonreel
