June 3, 2019
I’m having difficulty with using advanced actions and increments
Comments
(7)
June 3, 2019
I’m having difficulty with using advanced actions and increments
Newbie 1 posts
Followers: 0 people
(7)

I am trying to create a slide with 4 check boxes and a hidden next button, that shows only after the learner clicks all of the boxes.Upon doing so, it would allow the learner to see the next button and continue.I set up the smart shapes with an additional state of a check mark,  variables with the value of zero, hid the smart shape of the next button. I want to add the statement to increment the smart shape to 1, change the state to “check”, and then show “next”.When I try to add the “increment” variable of the smart shape, and add the literal value of 1, and updates the script, it updates and shows as successful, but when I go back to if or else, the variable shows an empty drop down. Is this a script error, or is it something else?

I appreciate your help.

7 Comments
2019-06-04 11:51:14
2019-06-04 11:51:14

My 2¢… I would use only a single variable for this.
You have four check boxes that need to be checked…
Suppose my single variable is called  varChecked

When the user clicks on a box, we do three things…
1. Increment varChecked
2. Change the state of the checkbox to have a check
3. Look to see if all the boxes are checked. If they are – show the next button – if not, do nothing.

For number three above, we simply say

if varChecked is equal to 4 – show the next button

This method doesn’t matter what order they are checked.
If you do require a particular order – I would suggest something slightly different.

Like
(4)
>
Greg Stager
's comment
2019-06-04 11:56:37
2019-06-04 11:56:37
>
Greg Stager
's comment

Greg, what happens if the learner clicks the same click box several times? How can you solve that with only one variable? Sorry, but have answered this same question so many times in the forums. The only way to be able to use only one variable (a counter) is when you force the sequence of clicking and/or disable an already clicked object to avoid more clicks on it.

 

Like
>
Lieve Weymeis
's comment
2019-06-04 12:09:43
2019-06-04 12:09:43
>
Lieve Weymeis
's comment

Ahh, yes…

If the box needs no further interaction – I would include a disable button action as you mentioned.

If the user is allowed to uncheck the box as well, I would probably add a check/uncheck flag and then have the varChecked variable increment or decrement based on the state of the box.

Like
>
Greg Stager
's comment
2019-06-04 12:44:13
2019-06-04 12:44:13
>
Greg Stager
's comment

The simplest solution is the one I explained in that post. Your solution is only in a minority of the use cases valid, because it does cripple the control of the learner, which is rarely what a developer wants. Maybe I am too much talking from my view point as teacher.

Like
>
Lieve Weymeis
's comment
2019-06-04 13:15:55
2019-06-04 13:15:55
>
Lieve Weymeis
's comment

To be fair – the only thing I know that the developer (original poster) wants in this case is to have a hidden button appear after four boxes have been checked.

At this point, we do not know if the developer wants to direct the flow or leave it open. It seems to me that we have provided multiple ways for the OP to consider the task at hand. Both of my thoughts would allow the learner to click the boxes in whatever order they want with one disabling that box once checked and the other leaving it completely open to uncheck as well. The end goal has the hidden next button appear. I guess I missed where he needs to track the total number of clicks. All I got was tracking four specific clicks.

That said – are we missing the real question? Seems like their own solution to this ends up with a variable increment action where the variable gets ejected. I don’t have a ready answer for that other than to suggest that something is not getting saved properly.

Like
2019-06-04 07:36:26
2019-06-04 07:36:26

Here is the link with a comparison of two workflows for a non-responsive proejct:

https://elearning.adobe.com/2018/07/force-clicking-hotspots-comparison-2-workflows/

You cannot use increment in this use case, unless you  force the sequence of clicking the hotspots. You need to create and use Boolean variables to track the clicks.

Like
2019-06-04 07:32:23
2019-06-04 07:32:23

I have more than 10 years of experience with advanced actions, maybe you need some training?

In this portal I have blogged about that solution multiple times. Will post links in a separate comment (moderation waiting time possible). You don’t mention which version you are using, but from the screenshot I detect it is either CP2017 or CP2019.

Like
Add Comment