I'm new to Flex development and having trouble with a particular problem.
I'm after placing 4 lists on a particular form and allowing drag and drop on each list. However list one can only drag onto list two and vice versa and list three can only drop onto list four and vice versa. My problem is that I cant figure out how to limit what each list can accept from other lists. I've tried created dragEnter and dragDrop events but am having difficulties. Any help would be much appreciated.
<mx:List id="listTotalsBy" dragEnter="doDragEnter(event);" mouseDown="setDragInitator(event, 'listTotalsBy');" />
private var dropInitiator:String
public function setDragInitator(event:MouseEvent, id:String):void
dropInitiator = id;
* this method will call while drag & drop will start & used to set initial parameters for drag & drop
public function doDragEnter(event:DragEvent):void
var dropTarget:List = List(event.currentTarget);
if(dropInitiator == "listTotalsBy" && (dropTarget.id == "listSelectedTotalsBy" || dropTarget.id == "listTotalsBy" ))/*here u can make a choice*/
Alert.show("error : " + error.getStackTrace());