AS2 Help

I tried this code for the character to go to the next frame when it touches it

onClipEvent(enterFrame){
if(_root.char.hitTest(this)){
_root.nextFrame();
}
}

but it doesn’t do anything