Skip to main content
Known Participant
January 4, 2016
Answered

where can I read about using increment in advanced actions?

  • January 4, 2016
  • 1 reply
  • 830 views

I'm working on an interaction that is way out of my league, and I'd like to try experimenting with increment in an advanced action, but can't seem to find any introductory posts about how to use it. anyone know of a good place to start?

    This topic has been closed for replies.
    Correct answer Lilybiri

    If you had really explained why you wanted to use increment, you should have gotten an answer immediately.

    Here is a possible work flow:

    1. create a user variable for each button with a default value of 0 (will be treated as a Boolean); will label them v_test, v_questions and v_resources
    2. do not use Increment (has no sense) but Assign to toggle that variable to 1 when the button is clicked; that means it will not be incremented at all, but will always be 1 when the button has been clicked, whatever the number of clicks
    3. summarize the three variables with the same action in a fourth user variable v_sum
    4. add decisions to see which state has to be applied.

    This means you'll need a conditional action for the buttons, something like this (didn't test it out, sorry)

    Decision 1 'Always' (mimicked standard action)

        IF 1 is equal to 1

              Assign v_test with 1

              Expression v_sum = v_test + v_resources

              Expression v_sum = v_sum + v_questions

              .....  whatever you want to do like 'Show'

    Decision 2 'CheckFirst'

        IF v_sum is equal to 1   

              Change state of arrow to .....

    Decision 3 'CheckSecond'

        IF v_sum is equal to 2  

              Change state of arrow to .....

    Decision 4 'CheckThird'

        IF v_sum is equal to 3 

              Change state of arrow to .....


    If you are navigating away from this slide with the buttons, use a standard action for the buttons (like the first decision), and put the 3 other decisions in a conditional action that you trigger by the On Enter event of the slide.


    1 reply

    Lilybiri
    Legend
    January 4, 2016

    I have several examples on my blog where increment or decrement (sometimes a better choice) are used. Here some links

    Matchstick Game - shared actions - Captivate blog

    Dropdown Interaction - tips - Captivate blog

    Captivate 8 - First Adventures - Captivate blog

    This old one would be the easiest, but you have to 'translate' because the Increment command was not yet available in that version.

    Blog after Posterous? - ClickClick - Captivate blog

    Replace the statement:

         "Expression  v_click = v_click + 1"   by

         "Increment v_click by 1"

    Known Participant
    January 5, 2016

    Thank you for sharing those. Unfortunately, I can't seem to use any information from them in what i'm trying to do. Maybe increment isn't the right action.

    I'm trying to create a "slider" (black triangle in lower right hand corner) that will move up a bit as the user clicks on each button (I have created 3 additional states for the slider, so really the action would just be the slider changing states)

    The challenge I'm running into is that I want the slider to change states only the first time the user clicks each button. If the user clicks each button multiple times, I don't want the slider to move for those subsequent clicks.

    I have this slide set up so far to include a toggle attached to each button that shows different content in the blank box. I'd like to add another action to each button to change the state of the slider as well. Any ideas?

    Lilybiri
    LilybiriCorrect answer
    Legend
    January 5, 2016

    If you had really explained why you wanted to use increment, you should have gotten an answer immediately.

    Here is a possible work flow:

    1. create a user variable for each button with a default value of 0 (will be treated as a Boolean); will label them v_test, v_questions and v_resources
    2. do not use Increment (has no sense) but Assign to toggle that variable to 1 when the button is clicked; that means it will not be incremented at all, but will always be 1 when the button has been clicked, whatever the number of clicks
    3. summarize the three variables with the same action in a fourth user variable v_sum
    4. add decisions to see which state has to be applied.

    This means you'll need a conditional action for the buttons, something like this (didn't test it out, sorry)

    Decision 1 'Always' (mimicked standard action)

        IF 1 is equal to 1

              Assign v_test with 1

              Expression v_sum = v_test + v_resources

              Expression v_sum = v_sum + v_questions

              .....  whatever you want to do like 'Show'

    Decision 2 'CheckFirst'

        IF v_sum is equal to 1   

              Change state of arrow to .....

    Decision 3 'CheckSecond'

        IF v_sum is equal to 2  

              Change state of arrow to .....

    Decision 4 'CheckThird'

        IF v_sum is equal to 3 

              Change state of arrow to .....


    If you are navigating away from this slide with the buttons, use a standard action for the buttons (like the first decision), and put the 3 other decisions in a conditional action that you trigger by the On Enter event of the slide.