How what is the AS2 code I need to do this?

I've tried the following:

onClipEvent(enterFrame){
if(this.hitTest(_root.otherObject)){
gotoAndStop(2); //Yes I know using the frame numbers is bad.
}
}