If you are using AS2:
onClipEvent (enterFrame) {
if (!this.hitTest(_root.[instance name of one of the movieclips])) {
_root.gotoAndStop(1);
}
}
The "!" basically makes the code do the opposite of what it would do without the "!". You can switch _root.gotoAndStop(1); to what you want to happen when the two objects don't hit.
With AS3, if you are using it,
this page should inform you of what to do. (I don't know anything about AS3).