December 8, 2020
Adding Advanced action to layered multi-state object
Comments
(6)
December 8, 2020
Adding Advanced action to layered multi-state object
Newbie 3 posts
Followers: 0 people
(6)

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?

6 Comments
2020-12-09 13:04:33
2020-12-09 13:04:33

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…

  1. You are using a button that reveals the next state of your character
  2. Your character has the name  myCharacter
  3. Your continue button has the name  contBtn
  4. The continue button is hidden at publish
  5. 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.

Like
(4)
2020-12-09 06:42:53
2020-12-09 06:42:53

Thank you! I will check out these resources. I knew it had to be possible.

Like
(4)
(1)
>
kpozza
's comment
2020-12-09 08:21:35
2020-12-09 08:21:35
>
kpozza
's comment

You’re welcome! Success.

Like
(3)
2020-12-08 10:54:50
2020-12-08 10:54:50

For the Shared actions workflow, with an extra counter variable:

http://blog.lilybiri.com/tips-and-tricks-advanced-to-shared-action-intermediate

 

Like
(4)
2020-12-08 10:51:39
2020-12-08 10:51:39

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.

Like
(3)
2020-12-08 10:33:41
2020-12-08 10:33:41

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!

Like
(3)
Add Comment