xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal"
creationComplete="creationHandler();">
import mx.utils.ObjectUtil;
import mx.events.DragEvent;
import mx.collections.ArrayCollection;
private function creationHandler():void
{
var collection:ArrayCollection = new ArrayCollection( ['A', 'B', 'C'] );
contactList.dataProvider = collection;
}
private function dropHandler( evt:DragEvent ):void
{
var listItem:Object = evt.dragSource.dataForFormat( "items" );
var index:int = contactList.calculateDropIndex( evt );
ArrayCollection( contactList.dataProvider ).setItemAt(ObjectUtil.copy( listItem ), index );
}
width="200" height="200">
width="100%" height="100%"
dragEnabled="true"
dropEnabled="true"
dragMoveEnabled="false"
dragComplete="dropHandler(event);"
/>