3 Replies Latest reply on Oct 13, 2011 2:25 PM by skd11

    Drag and drop does not work in Exported release build

    skd11

      I am using the built in DragManager class to handle some drag and drop functionality in an application.  When running from flex builder, It runs exactly as expected, but when I export the project to a release build, Dragging only works in the vertical direction.  How is this possible?  What might be causing such strange behavior.

       

      Any help would be much appreciated.

        • 1. Re: Drag and drop does not work in Exported release build
          Flex harUI Adobe Employee

          I’m not sure what that means.  Does it mean you can only start a drag by moving the mouse vertically?  Or once the item dragged it can only move vertically?  Or you are dragging in a TileList and can only drop above or below something?

          • 2. Re: Drag and drop does not work in Exported release build
            skd11 Level 1

            Sorry, I will try to be more clear.  I am using drag and drop simply to move items around on a Canvas.  This works perfectly when running from flex builder, but when i export a release build it starts behaving strangely.

             

            I can drag items up or down on the canvas no problem, but as soon as I try to drag items left or right, there is no response.  On a windows machine, it gives me the black circle with a slash through it icon, implying that the drag is not accepted.  On Mac, there is no icon, it simply will not drag. 

             

            Hope that clarifies it, I could really use some help figuring this issue out.

             

            Update:

            I can confirm that the call to DragManager.acceptDragDrop is being reached in both cases, but the DragEvent.DRAG_DROP event is not being handled in the release build, (it is reached when run from flex builder)

            • 3. Re: Drag and drop does not work in Exported release build
              skd11 Level 1

              So i figured it out, turns out it was a combination of two issues.  First, the background color needed to be set to ensure the drop events were received correctly.  Not sure why it worked from flash builder though!

               

              Second was that the AIR drag manager was not updating the mouseX property that we were relying on for some positioning logic, so had to update it to store the required mouseX value.