Forum Discussion
DavidSmith-1b8d
8 months agoCommunity Member
Help cycling through images
Hi all,
Basically, I want to have a two buttons, one labeled next and the other labeled previous. There will be 10 images, and when the user selects "next" I want it to go to the next one, and wit...
WaltHamilton
8 months agoSuper Hero
Have you tried using states? Keep track of where you are, and change the state when the button is clicked.
Add 1 to variable currentGraphic when user clicks Next if currentGraphic is < 10 (subtract if Previous and > 1).
Change state of [object] to state 1 when currentGraphic changes if currentGraphic = 1, etc.