private function startResize():void
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, resize);
resizeIcon.addEventListener(MouseEvent.MOUSE_UP, stopResize);
resizeIcon.addEventListener(MouseEvent.ROLL_OUT, stopResize);
resizeIcon.startDrag();
}
private function stopResize(mouseEvent:MouseEvent):void
{
resizeIcon.removeEventListener(MouseEvent.MOUSE_UP, stopResize);
resizeIcon.removeEventListener(MouseEvent.ROLL_OUT, stopResize);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, resize);
resizeIcon.stopDrag();
}
private function resize(mouseEvent:MouseEvent):void
{
this.explicitHeight = resizeIcon.y + resizeIcon.height + 10;
this.explicitWidth = resizeIcon.x + resizeIcon.width + 10;
}