Caligo Posted August 23, 2006 Share Posted August 23, 2006 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 More sharing options...
iyeru42 Posted September 11, 2006 Share Posted September 11, 2006 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);} Link to comment Share on other sites More sharing options...
Snubby Posted October 10, 2006 Share Posted October 10, 2006 _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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now