Forum Discussion
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 with "previous" go to the previous one.
I've tried using layers, but I have an embedded web file on the left side of the screen that I want to be static and not reload between clicks (which happens when I change layers).
Does anyone have a solution for this? The embedded file really throws a wrench in this.
Best,
David Smith
- SamHillSuper Hero
Hi David, is the embedded file on the BASE slide and not repeated on the layers?
- WaltHamiltonSuper 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.