Jump to content

button - next previous


Caligo

Recommended Posts

What would the actionscript be if I wanted to do a next and previous button, where the next button would be likeon (press) { gotoAndStop (+1);}where the '+1' means go to the next frame, or in the case of previous, '-1'and how would I make it so it would loop, or would it do it automatically?

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

_currentframe can do the trick.

////////// NEXT BUTTON //////////on (press){	 _root.gotoAndStop (_root._currentframe + 1);}////////// BACK BUTTON //////////on (press){	 _root.gotoAndStop (_root._currentframe - 1);}

Or, you can use a less efficient but easier method, prevFrame() and nextFrame().

////////// NEXT BUTTON //////////on (press){	 _root.nextFrame ();}////////// BACK BUTTON //////////on (press){	 _root.prevFrame ();}

Shi Sha!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...