# Trouble getting a box to resize

**URL:** <https://forum.kirupa.com/t/trouble-getting-a-box-to-resize/107645>\
**Category:** Uncategorized\
**Created:** [April 17, 2004, 2:57pm UTC](https://forum.kirupa.com/t/trouble-getting-a-box-to-resize/107645 "2004-04-17T14:57:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reginald](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@Reginald](https://forum.kirupa.com/u/Reginald)\
**Post date:** [April 17, 2004, 2:57pm UTC](https://forum.kirupa.com/t/trouble-getting-a-box-to-resize/107645/1 "2004-04-17T14:57:53Z")

</div>

Hi. I want to be able to press down on the Mouse, then a box appears that i can resive depending on where the mouse is. Think any strategy game, where u press down and drag a box around some units.

Im having some trouble however, and i cant get it to resize.

Heres the code i have so far

```php
var i;
_root.onMouseDown = function() {
	sel = attachMovie("sel", sel+i, i);
	startx = _xmouse;
	starty = _ymouse;
	sel._x = startx;
	sel._y = starty;
	x = startx - _xmouse
	sel._xscale = startx-_xmouse;
	i++;
};
_root.onMouseUp = function() {
	removeMovieClip(sel);
}; 

```

Thanks
