Uh, you don't need fancy shit here at all, and you should be using the OnDrag handlers. After you stop moving, your frame should be anchored (NOT PARENTED) to UIParent
If you want your subframe to be draggable, but anchor to the parent, you're going to have to grab both frame's positions, clear points on the subframe, and reanchor it when the drag ends.
<script src="http://gist.github.com/31390.js"></script>
If you want your subframe to be draggable, but anchor to the parent, you're going to have to grab both frame's positions, clear points on the subframe, and reanchor it when the drag ends.