I don't know about actually doing proper 'selection' (although doing a hit test between the outline you draw and any other objects on stage would be a partial solution) but this code will do the outline drawing for you:
//set up event handlers
this.onMouseDown = startBox;
this.onMouseUp = endBox;
function startBox() {
//set box start point at mouse location
var startX = _xmouse;
var startY = _ymouse;
//create selection box (attach from library)
this.attachMovie('selectionBox', 'box', 100, {_x:startX, _y:startY});
this.onEnterFrame = function() {
//do dragging effect
box._xscale = _xmouse-startX;
box._yscale = _ymouse-startY;
};
}
function endBox() {
//'freeze' selection outline
this.onEnterFrame = null;
}
You'll need to have a movieclip in the library with its linkage property set to 'selectionBox' which must be a square sized 100 pixels to a side so that the code will scale the outline properly.
Alternatively you could use virtually the same code to draw lines using the new drawing functions in MX.