How to resize window from left and top in flash

Hello,

i am facing a problem in flash.

i want to resize a movie on mouse drag and drop(Just like in windows).

i have written the code but it resize window from right and bottom only, even if i dragging a window from left, it resize it in right , same case with top, it resize in bottom

the code is

resize = function () {
_root.square.fundo._width = _x;
_root.square.fundo._height = _y;
};
resize_int = setInterval(resize, 5);

plz tell me how to implement resizing from left and top.currently resize wors fine if i drag and drop from right and bottom side.:jail:

but it i drag from left or top, the code resize window from right and bottom only[:(]

Help me , its urgent:hangover: