# Resize onDrag

**URL:** <https://forum.kirupa.com/t/resize-ondrag/204861>\
**Category:** flash\
**Created:** [October 24, 2006, 4:07am UTC](https://forum.kirupa.com/t/resize-ondrag/204861 "2006-10-24T04:07:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbailey](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jbailey/32/2380_2.png) [@jbailey](https://forum.kirupa.com/u/jbailey)\
**Post date:** [October 24, 2006, 4:07am UTC](https://forum.kirupa.com/t/resize-ondrag/204861/1 "2006-10-24T04:07:10Z")

</div>

Does anyone know how to resize an item (a vector square or such) on drag? In other words, I want to click a side and drag that side having it resize. Sort of like WACK ([http://products.coma2.de/wack/index.php](http://products.coma2.de/wack/index.php)).

THANKS!!!

---

<div class="post-metadata">

**Author:** ![jbailey](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jbailey/32/2380_2.png) [@jbailey](https://forum.kirupa.com/u/jbailey)\
**Post date:** [October 24, 2006, 4:34am UTC](https://forum.kirupa.com/t/resize-ondrag/204861/2 "2006-10-24T04:34:01Z")

</div>

Ok, I’m getting somewhere…

```auto

draggerShell.onPress = function(){
    startDrag(this,false);
    this.onMouseMove = function() {
        if(draggerShell._x > holder._x){
            box._width += 10;
            holder._x += 2;
        }
        else if (draggerShell._x < holder._x){
            box._width -= 10;
            holder._x -= 2;
        }
        if(draggerShell._y > holder._y){
            box._height += 10;
            holder._y += 2;
        }
        else if (draggerShell._y < holder._y){
            box._height -= 10;
            holder._y -= 2;
        }
        
    }
}
draggerShell.onMouseUp = function() {
    holder._x = draggerShell._x;
    holder._y = draggerShell._y;
      stopDrag();
      delete this.onMouseMove;
}

```

However, this doesn’t seem to be a practical way of resizing a square
