Skip to main content
Inspiring
November 21, 2016
Answered

Newbie needs help with actions

  • November 21, 2016
  • 1 reply
  • 273 views

I am hoping for some advice, which will go a long way in helping me resolve some issues.  Here's the scenario:

4 buttons on a slide.

4 text fields on a slide (each corresponding to one of the buttons), all grouped and group set to not visible.

1 "continue" button on the slide, set to not visible.

Each time a button is clicked, it hides the group and then shows the appropriate text field.  Once all four buttons are clicked, the continue button should be shown.

I set up a variable that should only increment by 1 for each button, regardless of how many times the button is clicked.  Just want the user to click each button before continuing.

The action to set this all up is confusing.  My background is in Actionscript.  If I can get this working, I can get a bunch of stuff working(!)...

Much appreciation!

Captivate 9

    This topic has been closed for replies.
    Correct answer Lilybiri

    I'm not a native English speaker, have bit of problems with your terminology.

    You have buttons: normal buttons or shape buttons?

    What do you mean by a 'text field'? Is that a text container (caption or shape used as text container) or are you talking about a Text Entry Box, which is an interactive object whereas the text containers are non-interactive. In my perception a 'field', which is not a native Captivate word, is a Text Entry Box, but I have seen many users who think it is just a text container. This is an important difference. From the rest of the question I suspect that you mean a simple text container (probably a caption).

    If this is a group of text captions (or shapes), from which you want to show only one out of the group when clicking the (shape?) buttons, this could be a work flow:

    1. Make sure that the pausing point of the four (shape) buttons is at the same moment (check the Timeline or the Timing Properties panel)
    2. Create user variables: v_one, v_two, v_three, v_four (I use this as example, you can give other names of course); you may define a default value of  but it is not necessary, they'll act as Boolean variables
    3. Create the Continue button, it needs a pausing point that is either at the same moment as the four buttons or later. That button has to be hidden initially. You can do this either by clicking the eye icon in its Properties panel, or by using the On Enter event of the slide with the command 'Hide Bt_Continue'.
    4. Create an advanced conditional action, with two decisions
      1. First decision 'Always' is a mimicked standard action, will always be done:
        IF 1 is equal to 1
            Assign v_one with 1
            Hide Gr_Text
            Show Tx_one
      2. Second decision 'Checkit'
           IF v_one is equal to 1 AND
               v_two is equal to 1  AND 
               v_three is equal to 1 AND
        v_four is equal to 1 AND
        Show Bt_Continue
        Enable Bt_Continue

    I added the command Enable, because for HTML output and shape buttons, the button is not always enabled automatically when it is shown.

    1 reply

    Lilybiri
    LilybiriCorrect answer
    Legend
    November 21, 2016

    I'm not a native English speaker, have bit of problems with your terminology.

    You have buttons: normal buttons or shape buttons?

    What do you mean by a 'text field'? Is that a text container (caption or shape used as text container) or are you talking about a Text Entry Box, which is an interactive object whereas the text containers are non-interactive. In my perception a 'field', which is not a native Captivate word, is a Text Entry Box, but I have seen many users who think it is just a text container. This is an important difference. From the rest of the question I suspect that you mean a simple text container (probably a caption).

    If this is a group of text captions (or shapes), from which you want to show only one out of the group when clicking the (shape?) buttons, this could be a work flow:

    1. Make sure that the pausing point of the four (shape) buttons is at the same moment (check the Timeline or the Timing Properties panel)
    2. Create user variables: v_one, v_two, v_three, v_four (I use this as example, you can give other names of course); you may define a default value of  but it is not necessary, they'll act as Boolean variables
    3. Create the Continue button, it needs a pausing point that is either at the same moment as the four buttons or later. That button has to be hidden initially. You can do this either by clicking the eye icon in its Properties panel, or by using the On Enter event of the slide with the command 'Hide Bt_Continue'.
    4. Create an advanced conditional action, with two decisions
      1. First decision 'Always' is a mimicked standard action, will always be done:
        IF 1 is equal to 1
            Assign v_one with 1
            Hide Gr_Text
            Show Tx_one
      2. Second decision 'Checkit'
           IF v_one is equal to 1 AND
               v_two is equal to 1  AND 
               v_three is equal to 1 AND
        v_four is equal to 1 AND
        Show Bt_Continue
        Enable Bt_Continue

    I added the command Enable, because for HTML output and shape buttons, the button is not always enabled automatically when it is shown.

    Inspiring
    November 21, 2016

    First, my apologies for terminology.  I'm not a native Captivate user  : )   (not yet, anyway)

    I did mean text captions.

    I will try this out.  Many thanks for your generous time.  I am also perusing your blog, among with many other resources.

    Lilybiri
    Legend
    November 21, 2016

    Terminology is always a problem. My intuition was correct

    You'll find this example multiple times on my blog, but not 'standalone', mostly in other use cases. Amazing how most CP-users find my blog, although it is not responsive.

    One difference in advanced/shared actions with normal Actionscript is that all commands are always executed, from top to bottom, and from left to right (for decisions). There is no way to stop the execution of an action, to get out of it when a condition results in True.