# Converting AS2 to AS3 prevframe CS3

**URL:** <https://forum.kirupa.com/t/converting-as2-to-as3-prevframe-cs3/302239>\
**Category:** flash\
**Created:** [December 24, 2009, 3:18am UTC](https://forum.kirupa.com/t/converting-as2-to-as3-prevframe-cs3/302239 "2009-12-24T03:18:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![almondo](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@almondo](https://forum.kirupa.com/u/almondo)\
**Post date:** [December 24, 2009, 3:18am UTC](https://forum.kirupa.com/t/converting-as2-to-as3-prevframe-cs3/302239/1 "2009-12-24T03:18:59Z")

</div>

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

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

```
