# Delete frame on stop();

**URL:** https://forum.kirupa.com/t/delete-frame-on-stop/282771
**Category:** Uncategorized
**Created:** [February 26, 2009, 8:36am UTC](https://forum.kirupa.com/t/delete-frame-on-stop/282771 "2009-02-26T08:36:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![iamnaz](https://avatars.discourse-cdn.com/v4/letter/i/dfb087/32.png) [@iamnaz](https://forum.kirupa.com/u/iamnaz)
#### Post date: [February 26, 2009, 8:36am UTC](https://forum.kirupa.com/t/delete-frame-on-stop/282771/1 "2009-02-26T08:36:52Z")

</div>

Hi there, I have a simple script that rewinds a movieclip I made. In the movieclip there are two stops. The movie plays fine and stops at my \*\*stop();\*\*s when it’s going forward. But when it moves backwards, it doesn’t respond. What do I need to ad to make this stop at my \*\*stop();\*\*s?

```auto

function playBackwards(mc){
 mc.onEnterFrame = function() {
    if (this._currentframe != 1) {
        this.prevFrame();
    }
    else {
        delete this.onEnterFrame;
    }
 };
}

```

Something like, _if (stop(); ) = stop();_ …you get my pointC:-)

Thanks!
