I have 2 spark lists with items, drag&drop enabled (mxml application, flash builder 4). Everything works fine, I can drag and drop items from the one list to the other. I’ve been searching a lot but I can’t find it (probably because I’m using the wrong keywords).
Let’s say that I want to ‘handle’ when an Item changes from list. So
LIST 1 LIST 2
item1 item 2
item 3
It works fine when I drag Item 3 to List 1, but how can I handle this event? I want to ‘save’ the changes. I think about looping the whole list when there’s a ‘change’, but I’m not sure if that’s the right way.
Can someone give me more advice or help me out?
Thanks a lot!
(And sorry if this question has already been asked)
You can handle by listening the event
CollectionEvent.COLLECTION_CHANGE:That will fire an
event.kind == CollectionEventKind.*(see here) each time you make some change, so you can save the changes as you want.Also there is the option by listening
DragEvent.DRAG_COMPLETEevent:Which
event.dragSourcehas the data being dragged.