Jump to content
Caligo

button - next previous

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?

Share this post


Link to post
Share on other sites

If you want it for each frame:For going to the next frame AND playing the rest of the frames after.

on(press) {	 gotoAndPlay(_currentframe + 1);}

Share this post


Link to post
Share on other sites

_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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...