This content has been marked as final. Show 3 replies
The startDrag method takes up to 5 parameters, where 4 of them can define a bounding box for the dragging:
lungs_mc.startDrag(false, LEFT, TOP, RIGHT, BOTTOM)
You can insert the values for the dragging borders there. The values are relative to the dragged MC's parent, so keep that in mind. If lungs_mc is inside dragArea_mc, you could use
lungs_mc.startDrag(false, 0, 0, dragArea_mc._width, dragArea_mc._height)
that works like a treat
i saw something like this in an earlier post but it wasnt explained too well and i was getting silly results.
yours works perfect
In addition to the top code example you can also set the start position to be the x and y cord. of the dragArea_mc if the area is correctly positioned with the top left corner placed on the registration mark.
lungs_mc.startDrag(false, dragArea_mc._x, dragArea_mc._y, dragArea_mc._width, dragArea_mc._height)