Here's an example:
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
var textfield:TextField;
var handle:Sprite;
textfield = new TextField();
textfield.wordWrap = true;
textfield.border = true;
textfield.background = true;
textfield.text = "lorem ipsum dolor sit amet"
handle = new Sprite();
handle.graphics.beginFill(0x000000);
handle.graphics.drawRect(0, 0, 10, 10);
handle.graphics.endFill();
handle.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
handle.x = textfield.x + textfield.width;
handle.y = textfield.y + textfield.height;
addChild(textfield);
addChild(handle);
function mouseDownHandler(event:MouseEvent):void
{
handle.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
handle.addEventListener(Event.ENTER_FRAME, frameHandler);
handle.startDrag(false);
}
function mouseUpHandler(event:MouseEvent):void
{
handle.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
handle.removeEventListener(Event.ENTER_FRAME, frameHandler);
handle.stopDrag();
}
function frameHandler(event:Event):void
{
textfield.width = handle.x - textfield.x;
textfield.height = handle.y - textfield.y;
}