This should give you an idea of what you want to accomplish:
tileList = new TileList();
tileList.allowMultipleSelection = true;
tileList.addEventListener(MouseEvent.MOUSE_DOWN, startSelecting);
tileList.addEventListener(MouseEvent.MOUSE_UP, stopSelecting);
function startSelecting(e:MouseEvent):void
{
tileList.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
if (CellRenderer(e.target))
{
CellRenderer(e.target).selected = true;
}
}
function onMouseMove(e:MouseEvent):void
{
if (CellRenderer(e.target))
{
CellRenderer(e.target).selected = true;
}
}
function stopSelecting(e:MouseEvent):void
{
tileList.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
}
You'll definitely want to customize this to suit your needs, but basically it adds a few mouse event listeners to the tile list and selects any tile that has been rolled over while the mouse button is pressed.