post header image for AudioBook Organiser v1.3.0 - Drag'n'Drop

AudioBook Organiser v1.3.0 - Drag'n'Drop

12th January 2010
actionscript
audiobook
drag-drop
flex
itunes
programming
projects
utility

Well I was just doing some audio book organising and realised that it would be great if I could drag and drop a folder straight from my AIR into iTunes ready for upload to my iPhone.

Anyways after a little searching through the docs I came up with this little ditty:

var cp : Clipboard = new Clipboard(); cp.setData(ClipboardFormats.FILE_LIST_FORMAT, [new File(book.url)], false); NativeDragManager.doDrag(null,cp);

Which gets fired by my DataGrid in the view:
itemEditEnd="{dispatchEvent(new BooksEvent(BooksEvent.PROPERTY_CHANGED));}"
dragEnabled="true"
dragStart="{dispatchEvent(new BooksEvent(BooksEvent.BOOK_BEGIN_DRAG, AudioBookModel(event.currentTarget.selectedItem)))}">
Its pretty cool.
Anyways, the latest version and the source is below:

SUBSCRIBE TO FUTURE POSTS

COMMENT