# Constraining startDrag() to trapezoid shape

**URL:** <https://forum.kirupa.com/t/constraining-startdrag-to-trapezoid-shape/326625>\
**Category:** flash\
**Created:** [December 30, 2011, 6:34pm UTC](https://forum.kirupa.com/t/constraining-startdrag-to-trapezoid-shape/326625 "2011-12-30T18:34:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joptionpane](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@joptionpane](https://forum.kirupa.com/u/joptionpane)\
**Post date:** [December 30, 2011, 6:34pm UTC](https://forum.kirupa.com/t/constraining-startdrag-to-trapezoid-shape/326625/1 "2011-12-30T18:34:42Z")

</div>

hei guys… how can i constrain the dragging of my movieClip inside the shape of a trapezoid?

here’s the code…

```auto
pamato.onPress = function() 
{
    startDrag(this, false, 1000, 270, 130, 605);
};

pamato.onRelease = function() 
{
    stopDrag();
    
    if(this.hitTest(_root.circle))
    {
        this._x = 620;
        this._y = 561;
    }
};

```

when i test the movie… its a rectangle… please help! thanks!
