Ok so basically I have the codes I need to make my project work but the problem is when I put my drag and drop code with my swap depth on hittest code my drag code stops working heeres the codes:
code for swap depth on a hit test:
Actionscript Code:newDepth = 2;
Object.swapDepths(newDepth);
Code for drag and drop:
Actionscript Code:object.onPress = function(){
object.startDrag();
}
object.onRelease = function(){
object.stopDrag();
}