Skip to content

Instantly share code, notes, and snippets.

@Fintan
Created October 2, 2012 11:59
Show Gist options
  • Save Fintan/3818462 to your computer and use it in GitHub Desktop.
Save Fintan/3818462 to your computer and use it in GitHub Desktop.
prev and next snippet
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