import mx.collections.ArrayCollection;
import mx.core.*;
import mx.managers.DragManager;
import mx.events.DragEvent;
[Bindable]
private var targetData:ArrayCollection = new ArrayCollection();
private function dragTest(initiator:Label, myData:String, event:MouseEvent, format:String):void
{
var ds:DragSource = new DragSource();
ds.addData(myData, format);
DragManager.doDrag(initiator, ds, event);
}
private function listDragEnter(evt:DragEvent, format:String):void
{
DragManager.acceptDragDrop(IUIComponent(evt.target));
}
private function listDragDrop(evt:DragEvent, format:String):void
{
var myData:Object = new Object();
myData = evt.dragSource.dataForFormat(format);
myList.dataProvider.addItem(myData);
}
dataProvider="{targetData}"
dragEnter="listDragEnter(event, 'stringFormat')"
dragDrop="listDragDrop(event, 'stringFormat')" />