AIR and drag and drop

I’m working on an AIR application that uses not only the ability to drag and drop external files into the application but also to drag and drop objects internally. More specifically I’m using Ely Greenfield component in order to display some pictures. The component worked perfectly when included in a Flex application running in the Flash player and Firefox but when included in the AIR application everything was messed up. After digging into the code, I finally noticed that by default AIR uses a different implementation for drag and drop than the Flex application (NativeDragManagerImpl vs DragManagerImpl).

I was not able to make the component working at all with NativeDragManagerImpl. And, just  when I thought that I was stuck I’ve found this bug on Adobe JIRA, together with a workaround. The workaround works; it is not very elegant but that’s it.

After playing a little bit more with the NativeDragManagerImpl I believe that the only decent solution is to use the described workaround if you plan to use AIR and internal drag and drop (also it seems that you cannot control the alpha level when using it).. and wait for Flex4 in order to have the bug fixed.

3 Responses to “AIR and drag and drop”

  1. AIR and drag and drop « Prasadsambari’s Blog Says:

    [...] Comment! AIR and drag and drop [...]

  2. Saiskumar Says:

    Hi,

    I need the same functionality of Ely Greenfield component for my application in Abobe AIR. can u help me if u have any other example with similar functionality.

    Regards,
    Sasi

  3. cornel Says:

    Hi Saiskumar,

    Why can’t you use Ely component? I’ve uploaded some files at http://cornelcreanga.com/docs/air-drag-and-drop/sample.zip so you can take a look on how to use the workaround.

Leave a Reply