# FMX04 Help with extending reverse frames script

**URL:** https://forum.kirupa.com/t/fmx04-help-with-extending-reverse-frames-script/137108
**Category:** Uncategorized
**Created:** [February 11, 2005, 8:00am UTC](https://forum.kirupa.com/t/fmx04-help-with-extending-reverse-frames-script/137108 "2005-02-11T08:00:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DDD](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@DDD](https://forum.kirupa.com/u/DDD)
#### Post date: [February 11, 2005, 8:00am UTC](https://forum.kirupa.com/t/fmx04-help-with-extending-reverse-frames-script/137108/1 "2005-02-11T08:00:55Z")

</div>

Almost 2 years ago I asked this question about reversing frames on mouseOut. But now I need a lil help on extending its function. Lets say my animation is 50 frames. Between 1-25 the clip is tweening down. So if a mouseOut occurs any where between 1-24 the clip reverses (which works with the script GParis hooked me up with 2 years ago). But now if the clip reaches 25 I want the clip to stop there then on a mouseOut from that point play the second half of my animation (the clip tweening back up) the at the end ill have a gotoAndStop on frame 1, to await another mouseOver. So basically anything from 25 on I dont want it to reverse frames. Here is the script I have been using for quite sometime. (unfortunately all other skills have advanced except AS)

Help greatly appreciated.

```auto
onClipEvent (load) { 
    stop(); 
} 
onClipEvent (mouseMove) { 
    if (hitTest(_root._xmouse, _root._ymouse, true)) { 
        hit=true; 
    } else { 
        hit=false; 
    } 
} 
onClipEvent (enterFrame) { 
    if (hit) { 
        gotoAndStop (this._currentFrame+1); 
    } else { 
        gotoAndStop (this._currentFrame-1); 
    } 
} 

```
