Created
October 2, 2012 11:59
-
-
Save Fintan/3818462 to your computer and use it in GitHub Desktop.
prev and next snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var slideCount:Int; | |
var currentSlide:Int; | |
function getNextIndex():Int | |
{ | |
return currentSlide < slideCount ? ++currentSlide : slideCount; | |
} | |
function getPreviousIndex():Int | |
{ | |
return currentSlide > 1 ? --currentSlide : 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment