# startDrag outside of boundries problem (with source code)

**URL:** <https://forum.kirupa.com/t/startdrag-outside-of-boundries-problem-with-source-code/207929>\
**Category:** flash\
**Created:** [November 22, 2006, 9:25pm UTC](https://forum.kirupa.com/t/startdrag-outside-of-boundries-problem-with-source-code/207929 "2006-11-22T21:25:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skyp](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/skyp/32/2681_2.png) [@skyp](https://forum.kirupa.com/u/skyp)\
**Post date:** [November 22, 2006, 9:25pm UTC](https://forum.kirupa.com/t/startdrag-outside-of-boundries-problem-with-source-code/207929/1 "2006-11-22T21:25:23Z")

</div>

trying to made a jigsaw puzzle, and using dynamic function to cut picture to pieces, but the pieces are not drag properly, except top-left coner one.

any one can help please.

ps:any good idea and suggestions on how to make a good jigsaw, please share with me, it’s my first game program in my life, i need your help.

sorry,file too big to upload,below is the code thanks in advance.:s:

```auto

for(i=1; i<10; i++){
    this.attachMovie("ad1", "pic"+i, 9+i, thumb);
    _root['pic'+i]._x = 5;
    _root['pic'+i]._y = 5;
    if(i>0 && i<4){
        _root['pic'+i].square._x=(i-1)*81;
        _root['pic'+i].square._y=0;
    }
    if(i>3 && i<7){
        _root['pic'+i].square._x=(i-4)*81;
        _root['pic'+i].square._y=81;
    }
    if(i>6 && i<10){
        _root['pic'+i].square._x=(i-7)*81;
        _root['pic'+i].square._y=162;
    }
    _root['pic'+i].onPress = function(){
        this.swapDepths(99);
        startDrag(this, false, 0, 0, 170, 170);//problems happends
    }
    _root['pic'+i].onRelease = function(){
        this.stopDrag();
    }
}

```
