Good day!
In my project I have a layered character that I have made into a multi-state object. I wish for the continue button to show only when the last state is shown. I have only been able to be successful at making the whole multi-state object the trigger, not a specific state itself. This must be possible. Any suggestions?
For the sake of variety… or for any other readers who may be curious… here is a pretty simple JavaScript example.
First a few assumptions…
- You are using a button that reveals the next state of your character
- Your character has the name myCharacter
- Your continue button has the name contBtn
- The continue button is hidden at publish
- The last state of your character has the name lastState
The on Success action for the button would be Execute Javascript
The following code placed on the button would advance the character state and check the state of myCharacter to reveal the continue button when the state named lastState is displayed.
cp.goToNextState(“myCharacter”);
if (cp.getCurrentStateNameForSlideItem(“myCharacter”)==”lastState”) {
cp.show(“contBtn”);
}
Of course, you can change the names to be whatever you want but you would simply need to change the names in the code to match.
For the Shared actions workflow, with an extra counter variable:
http://blog.lilybiri.com/tips-and-tricks-advanced-to-shared-action-intermediate
You don’t tell how you trigger the State change? I have two blog posts comparing Shown/Hide workflows with Multistate changes, both in a Forced View scenario like you want. If you use the Go to Next State workflow, you’ll need a counter variable and one advanced. If you use Change State to, with a specific state, you will need a user variable for each state (eventually a counter variable, which makes it much easier to create a shared action). Here is the link to one of the first blog posts I mentioned. For the workflow with the Shared action, I have another blog, but that is for intermediate users:
Force Clicking Hotspots: Comparison 2 Workflows – eLearning (adobe.com)
The second one is for a responsive project, you’ll be able to find it.
It’s a little tricky to get the conditional actions logic right in the first try. When I got stuck doing a similar activity, I found Paul Wilson’s video on the topic really helpful.
https://www.youtube.com/watch?v=BZhASnzcNCQ
Take a look at the workflow. Maybe this will solve your problem. Thanks!
You must be logged in to post a comment.