Skip to main content
Inspiring
September 19, 2023
Answered

How to use on button to first cycle through states of an object and then continue to next slide?

  • September 19, 2023
  • 1 reply
  • 480 views

I need to create a slide that will show a box with an itemized list and a button.

(Akin to a powerpoint slide) by pressing the button, the list will add one item after the other until the list is complete.

Then the next button press continues to the next slide.

My approach is multi state (each state is one more item on the list).

A. Is there an easier way?

B. Is it best done using an advanced action with:
if "state" equals "list full" then "continue"?

How do I get the state as a variable...? I cannot remember.

C. Can I use the same button to continue once the list is complete?

Thank you in advance!

    This topic has been closed for replies.
    Correct answer Lilybiri

    I hope you are not using version 12? If you are on a previous version, I would indeed use that multistate object.

    • Define a user variable v_counter
    • Use the On Enter event of the slide to Hide the Next button, and to assign a value equal to the number of states - 1
    • Create an advanced action with two decisions:
      • First decision non conditional 'Always' with two commands
           Decrement v_counter by 1
           Go to Next State   xxx      
      • Second decision conditional
            If v_counter is equal to 0
                 Show Next button

    If you need this action multiple times, I would convert it to a shared action, only the multistate object and the Next button will be parameters. If you transfer this shared action to another project, the variable v_counter will be created automatically. The assignment with the On Enter action allows you to use this shared action for any number of items in the list (states - 1)

    1 reply

    Lilybiri
    LilybiriCorrect answer
    Legend
    September 19, 2023

    I hope you are not using version 12? If you are on a previous version, I would indeed use that multistate object.

    • Define a user variable v_counter
    • Use the On Enter event of the slide to Hide the Next button, and to assign a value equal to the number of states - 1
    • Create an advanced action with two decisions:
      • First decision non conditional 'Always' with two commands
           Decrement v_counter by 1
           Go to Next State   xxx      
      • Second decision conditional
            If v_counter is equal to 0
                 Show Next button

    If you need this action multiple times, I would convert it to a shared action, only the multistate object and the Next button will be parameters. If you transfer this shared action to another project, the variable v_counter will be created automatically. The assignment with the On Enter action allows you to use this shared action for any number of items in the list (states - 1)

    Inspiring
    September 19, 2023

    Thanks a lot!

    This is very helpful.

    Lilybiri
    Legend
    September 19, 2023

    Did you try it out? Please let me know if you have problems with this workflow.