That is because it is what you have told flash to do and not what you want flash to do!
So the first part of the answer is that you have forgotten (or perhaps never knew) the onReleaseOutside event. Many programers forget to define this event. It is one of the things that I look at when I want to access someones knowledge and skill in programming flash.
So where you have
you could do
or you can define a completely different function for the onReleaseOutside event if you want to do so. This is also really important when you are constraining your drag to a certain area of the stage because the pointer is very likely to "move off" the clip and then there won't be a release event just a release outside event.
As for the other part of your question, yes. You can use swapDepths() to change the stacking order of clips. On one level swapdepths is very simple. But on another people seem to get very confused. I recommend that you read this tutorial:
There are many approaches as to how best to manipulate depths and design your interaction to make this work. So I can't just give you a, "here...do this" kind of answer on that front.
I just tried adding onReleaseOutside and it works perfectly. Thank you so much. And thanks for the link to the swapDepth tutorial. I've been wanting to learn about the various ways you can handle changing object depths.
Glad that worked out for you.