I am using Flash CS3 with AS2 and I have made a drag and drop. Everything works fine, but I don’t know how to make my movie clips snap to their targets. I have searched the forums, but I can’t find anything that will help me with what I already have going. Any help is appreciated.
Here is my actionscripting so far for one of the movieclips:
mangrove_mc.onPress = function() {
startDrag(this);
reply_txt.text = "";
//this next line brings the selected object to the top
this.swapDepths(this.getNextHighestDepth());
};
mangrove_mc.onRelease = function() {
stopDrag();
if (eval(this._droptarget) == mangroveTarget_mc) {
reply_txt.text = "Yes, that's correct!";
//this next line makes the object unmoveable after it has been placed in the right place.
this.enabled = false;
} else {
reply_txt.text = "No, keep trying!";
}
};