PDA

View Full Version : Getting a box to resize



Reginald
April 17th, 2004, 11:46 AM
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


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