Dragging DisplayObject's only works once

If any of you are aware, I am making a visual editor, Open Fledit, to help make your lives easier. However, I’m having a problem with dragging objects.

The following file from lines 39-61 involves the operation of dragging and interacting with any display object of any type. The code works once, i.e. You can drag the DisplayObject once, but releasing the mouse button removes the reference to the supposedly _selectedObject which references a DisplayObject in an array.

The reference does update its location as shown in the following screenshot:

But clicking on the Text Field after releasing does not give me the trace, which assumes that the object’s location was not updated in the array when you try to select it again. Any clues as to how to resolve this? Thanks!

This may be something with local coordinates, also, depending on whether mouseChildren is set, you may get coordinates from some child object inside the click object, which isn’t what you want.

Could you look at “HandlingMouseEvents”, it has mouse drag code that I think works pretty well?