I have been working on a project where I get to enjoy using the Drag and Drop features of flex 2. I started my learning by playing around a little bit with having two list controls that I could drag stuff back and forth with. Then I created my own drag and drop enabled controls. Well really i just used the one in the documentation, but I “felt” like I built my own.

Then I started playing with my real goal. Using contents from a HorizontalList control and dragging those onto a custom component. This was actually very simple. All I had to do was tell my HorizontalList to be dragEnabled=”true”. For the drop portion of the adventure i just implemented dragEnter and dragDrop event handlers on my custom component.

My problem came with this. I have other events like rollOver that fire when an item is dragged over them. And I need to know if something is being dragged so I can have them not fire off. Luckily the DragManager class as a boolean property called “isDragging”. From the docs “Read-only property that returns true if a drag is in progress.” Hurray! That sounds like exactly what I needed. So i added that to my event listener and ran my code again. Of course I was shocked to see that my code ran even though i was dragging items around. So I added a label and I bound it to the DragManager.isDragging and ran my app one more time. No matter what I do that is always false.

So here it is. What do I have to do to make DragManager.isDragging be true? Its a read-only property so something has to enable it. What is it that I am missing.

As it stands I just added an isDragging property to my ModelLocator so that I can continue with the project. But I am very curious what causes this property to be true.