Play backwards with script, but no stop();

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 ?!! :wink:

ideas, thoughts???

thx,
m.

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

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

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

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

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();
}

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…

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();
}

}

}

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

thx,

m.

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.