6 Replies Latest reply on Feb 25, 2010 10:16 AM by seaneyefi

    Native Drag and Drop with Windows

    seaneyefi

      Hi all,

       

      I'm developing a HTML/JavaScript AIR application and I'm having some difficulty allowing users drop files into my application on Windows. When the user tries to drag files into the application on Windows, their cursor turns from the pointer avatar to the 'denied' avatar. The end result is that the user cannot drop files from their explorer or desktop into my AIR application.

       

      My body tag in my main HTML file looks like this:

       

      <body ondragenter="doDragEnter(event)"

      ondragover ="doDragOver(event)"

      ondragleave="doDragLeave(event)"

      ondrop="doDrop(event)"

      ondragend="doDragEnd(event)">

       

      My doDrop function just iterates through the list of files in the event:

       

      doDrop = function(evt) {

      evt.dataTransfer.getData("application/x-vnd.adobe.air.file-list");

      },

       

      However, as the user is getting the 'denied' avatar, this doDrop function is not even being invoked.

       

      Is there any way to change this cursor to allow files be dropped by default into the application? Do I have to change anything in my application.xml file to specify what types of files are allowed to be dropped into the application?

       

      This exact same code is working fine on mac.

       

      Sean

       

      PS this is with Adobe AIR 1.5.3