Converting AS2 to AS3 prevframe CS3

Hey… I’m trying to convert this little piece of code into AS3… It plays the movie clip on rollOver and reverses it on rollOut but from wherever it played to… can anyone help??
Happy Holidays!!! here’s the code i have in AS2

onClipEvent (enterFrame) {
 if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
 this.nextFrame();
 } else {
 this.prevFrame();
 }
}