How do you drag objects in the list into the canvas?

Question: How do you drag an object from a list onto the canvas? Approach The ability to drag an object from a list straight onto the canvas is something you often need in a scene editor. You put a List on screen, each item corresponds to a building, and the user can drag the building into the scene. It works the same way as dragging things from the Flash library onto the stage. We can store the ClassName corresponding to each item in that item; when dragging starts, we create an instance of it and let it follow the mouse. Only when the mouse is released over a valid area of the canvas do we add it to the new DisplayObjectContainer.

Flash