I have worked with drag-and-drop with several of the List-based components in Flex, but have not experienced any issues with CPU capacity overload or application freezes. I would suggest running a profile in Flex Builder to see what's using up all that CPU and/or memory, and working to resolve that.
As for drag-and-drop, I've always leaned towards creating my own drag-and-drop functionality, so that I can do what I want with the data, and create my own proxy image. Here's how I start the drag in a Tree component:
override protected function mouseDownHandler(event:MouseEvent):void
{
var eventPoint:Point = new Point(event.localX, event.localY);
var eventPointGlobal:Point = super.localToGlobal(eventPoint);
mouseDownPoint = super.globalToLocal(eventPointGlobal);
super.mouseDownHandler(event);
}
// MouseMove Handler for manually initiating Drag functionality
override protected function mouseMoveHandler(event:MouseEvent):void
{
super.mouseMoveHandler(event);
if (!event.buttonDown || DragManager.isDragging)
return;
/* Create a point relative to this component from the mouse
cursor location. */
var eventPoint:Point = new Point(event.stageX, event.stageY);
var dragPoint:Point = super.globalToLocal(eventPoint);
if (!mouseDownPoint)
return;
if (Math.abs(mouseDownPoint.x - dragPoint.x) <= 4
|| Math.abs(mouseDownPoint.y - dragPoint.y) <= 4)
return;
if (!event.target is UITextField)
return;
if (selectedItems.length == 0)
return;
var dragSource:DragSource = new DragSource();
var dragProxy:DragProxyContainer = new DragProxyContainer(); // This is my custom Drag Proxy Image that I reuse throughout my application (see below)
dragProxy.setLabelText([selectedItem]);
// Initiate the Drag Event
DragManager.doDrag(this, dragSource, event, dragProxy,
-dragPoint.x+event.localX, -dragPoint.y+event.localY, 0.8);
}
package view
{
import mx.containers.VBox;
import mx.core.UITextField;
[Bindable]
public class DragProxyContainer extends VBox
{
private var textField:UITextField = new UITextField();
public function DragProxyContainer()
{
super();
minWidth = 150;
addChild(textField);
}
public function setLabelText(items:Array, labelField:String = "label"):void
{
var labelText:String;
var numItems:int = items.length;
if (numItems > 1)
{
labelText = numItems.toString() + " items";
}
else
{
var firstItem:Object = items[0];
labelText = firstItem[labelField];
}
textField.text = labelText;
}
}
}