Revision: 13976
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 14, 2009 10:12 by sidneydekoning
Initial Code
import flash.desktop.NativeDragManager; import flash.events.NativeDragEvent; import flash.desktop.ClipboardFormats; this.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER,onDragEnter); this.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER,onDragDrop); function onDragEnter (e:NativeDragEvent):void { var fa:Object = e.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT); if (fa[0].extension == "jpg") { NativeDragManager.acceptDragDrop(this); } } function onDragDrop (e:NativeDragEvent):void { var fa:Object = e.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT); uildr.source = fa[0].url; }
Initial URL
Initial Description
Initial Title
Drag and Drop in AIR
Initial Tags
Initial Language
ActionScript 3