# Play backwards with script, but no stop();

**URL:** https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089
**Category:** Uncategorized
**Created:** [October 28, 2003, 2:32am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089 "2003-10-28T02:32:03Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![mucho](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@mucho](https://forum.kirupa.com/u/mucho)
#### Post date: [October 28, 2003, 2:32am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/1 "2003-10-28T02:32:03Z")

</div>

Helloooo everyone,

so I’m using this script to play a menu backwards and it works, but when clicking the button to do so…it plays the whole darn thing back and does not stop at my stop actions…do I have to write the action like this now? ;()pots ?!! 😉

ideas, thoughts???

thx,  
m.

–

onClipEvent (enterFrame) {  
if (\_root.direction == “forwards”) {  
this.gotoAndStop(this.\_currentframe+1);  
}  
if (\_root.direction == “backwards”) {  
this.gotoAndStop(this.\_currentframe-1);  
}  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 2:33am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/2 "2003-10-28T02:33:37Z")

</div>

why dont you try using frame labels instead of numbers and have it stop at the frame labels

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 2:34am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/3 "2003-10-28T02:34:25Z")

</div>

I’m actually using labels…but how’s is that gonna work…  
can I tell to play backwards until that label???

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 2:36am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/4 "2003-10-28T02:36:48Z")

</div>

hmmm you got me there im not too keen on AS but it was jsut a thought :-\

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 2:40am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/5 "2003-10-28T02:40:33Z")

</div>

Althought I am not quite sure what you are trying to accomplish, you could use \_currentframe to determine where you’d like it to stop

if(this.\_currentframe==){  
stop();  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 2:51am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/6 "2003-10-28T02:51:58Z")

</div>

hmm…let’s try… the movie I’m trying to play backwards is a navigation, so when pressed back, the menue should go back to its original position…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 2:57am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/7 "2003-10-28T02:57:59Z")

</div>

this is how it looks now…but it WON’T stop!!!

onClipEvent (enterFrame) {  
if (\_root.direction == “forwards”) {  
this.gotoAndStop(this.\_currentframe+1);  
}  
if (\_root.direction == “backwards”) {  
this.gotoAndStop(this.\_currentframe-1)  
this.\_currentframe=16; {  
stop();  
}

```
}

```

}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 3:24am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/8 "2003-10-28T03:24:42Z")

</div>

ok…screw it! anyone knows how to play a mc BACKWARDS to a specific label, frame number or action…

thx,

m.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 28, 2003, 4:22am UTC](https://forum.kirupa.com/t/play-backwards-with-script-but-no-stop/34089/9 "2003-10-28T04:22:54Z")

</div>

I’ve always had much better luck if I just make the MC twice as long and essentially duplicate the “foward” phase, but then reverse it in a matter of speaking, as a “reverse” phase. Twice as many frames in the MC, but much more successful and your stop()s will work. There’s my 2 cents.
