I'm creating a slider interaction to display an image. When the learner clicks the right or left arrow button, a new image displays and the learner hears a description. I'm not sure which object I should set as the variable: the button or the image. I've also added states to the images (visited/selected) but I'm obviously doing it wrong. Any assistance would be appreciated.
The button should increase or decrease the variable. Then when the variable changes, a new image should show: "Show Image #1 when Image_Number changes, if Image_Number = 1", etc.
You can show different images by changing their states to Normal or Hidden, but that can be a LOT of work writing triggers to know which one to hide. Far easier to to put them on layers, and show the one you want, and set it to hide all the others. Equally easy is to use states. You don't really want visited or selected for the images; they have their own functions that depend on the learner clicking the image. To use states, Create one image, and Edit its states. Copy the first image and name it One. Copy it, name it Two,delete the image, and paste in the second image, etc. Then the trigger looks like "Change state of image to Two if Image_Number = 2".
Layers would be the way to go with this, not states. Using states like this would mean it would not be possible to insert alt text for each image (since you can't provide alt text dependent on an object's state), so there would be no way to make this accessible using states.
3 Replies
The button should increase or decrease the variable. Then when the variable changes, a new image should show: "Show Image #1 when Image_Number changes, if Image_Number = 1", etc.
You can show different images by changing their states to Normal or Hidden, but that can be a LOT of work writing triggers to know which one to hide. Far easier to to put them on layers, and show the one you want, and set it to hide all the others. Equally easy is to use states. You don't really want visited or selected for the images; they have their own functions that depend on the learner clicking the image. To use states, Create one image, and Edit its states. Copy the first image and name it One. Copy it, name it Two,delete the image, and paste in the second image, etc. Then the trigger looks like "Change state of image to Two if Image_Number = 2".
Layers would be the way to go with this, not states. Using states like this would mean it would not be possible to insert alt text for each image (since you can't provide alt text dependent on an object's state), so there would be no way to make this accessible using states.
Thank you, Walt and Sally. I will revert to the layer option. When I asked my co-worker, she suggested using layers.
Best,
Nev
This discussion is closed. You can start a new discussion or contact Articulate Support.