If you drag the blue square towards the orange square, you'll see that hitTest detects a collision as soon as the two squares touch. Whereas _droptarget doesn't detect a collision until the two objects are significantly overlapping. _droptarget is good for Flash jigsaw puzzles, where you want it to 'count' only when a puzzle piece is almost completely where it should be. It's also good for dragging things into a trashcan, etc.
So that the text boxes can continuously show the current value of _droptarget and hitTest as you drag the blue square, the code includes use of the setInterval command, which in this case calls a function every tenth of a second to update the text boxes.
Note that if you drag the blue square over the text boxes, _droptarget displays the instance names of the text boxes.
stop();
movable_square_mc.onPress = function() {
startDrag(this, true);
setInterval(showDropTarget,100);
};
function showDropTarget() {
textbox1_txt.text = movable_square_mc._droptarget;
textbox2_txt.text = movable_square_mc.hitTest(square_mc);
}
movable_square_mc.onRelease = function() {
stopDrag();
};