Skip to main content
Participating Frequently
August 13, 2020
Question

Conditional Advanced Actions - Show and Hide Objects when other buttons are selected

  • August 13, 2020
  • 3 replies
  • 1492 views

Hello,

I'm new to Captivate and I'm trying to figure out the Advanced Actions. I think it's something really simple, but I can't figure it out or find any tutorials similar enough to follow.

I have 7 buttons and when 1 button is selected, an object appears. I want that first object to "hide" when the second button is selected. How can I make all this happen? Thanks!

    This topic has been closed for replies.

    3 replies

    Lilybiri
    Brainiac
    August 14, 2020

    I am really sad now that I didn't step away when this thread became more and more confusing to a newbie. My answers were focussed on this original question, which I (maybe wrongly) understood like this - using a metaphor:

     

    Thinking about lighting in your home. You have 7 buttons, each of them is lighting one bulb. That is rather simple, but you want something extra: you want only one light bulb to shine at any moment. That means that each button not only has to light one bulb, but has also to cut off all the other bulbs. I didn't see anything more required: not an imposed sequence, not a so-called 'Forced view', which means in eLearning that the learner is required to press all the buttons before he will be able to continue. Your idea was to use Show and Hide, which seems logical for a newbie and that would indeed have required an Advanced action to be triggered by each button. I showed that approach in the first link which I posted. Group all the bulbs to make the action reduce to: 'Hide Group', followed by 'Show that specific information (bulb). That is an approach which is correct, but has some disadvantages, on which I'll not expand here (is in the blog).

    Alternative is not to 'group' the bulbs but to have all of them in ONE multistate object. That multistate object is NOT interactive like the buttons but has 8 states:

    • Normal state is an empty shape which is invisible by setting its Stroke to 0 and Opacity as well to 0.
    • 7 custom states: each of those states has the necessary information required for each of buttons. That information can be text in the shape (which can be resized to fit the text) but also have audio and graphics as state objects added. 

     

    For easier understanding, I will use these labels:

    • Multi for the static multistate object with the 8 states. That object will have a blue timeline in the Timeline panel when it is not selected. Keep the default setup, where the option 'Retain state....' is NOT selected.
    • Button1, Button2....Button7 for the 7 buttons. Those buttons (in your case the hexagon shape buttons) have a green timeline in the Timeline panel, and will have a pausing point (default) at 1.5seconds. It is OK to keep that default setup.
    • State1, State2..... State3: for the states in the object Multi

    Warning about your buttons: looking at your recent screenshot I see that the bounding boxes of your buttons are overlapping. If these are shape buttons, not SVGs you will have serious problems. The click area for shape buttons is the bounding box.  This has nothing to do with your question, but important to know. For SVGs it is possible to limit the click area to the image itself, let me know if these are SVGs

     

    When you have set up the Multistate object and corrected the setup of the buttons, you do NOT need advanced actions, nor variables, nor Shared actions and you will not need a Reset action to have everything in place when revisiting the slide. Important as well (would be needed if you use Show/Hide).

     

    What to do:

    For each button you use the Success event (you only have that event if Infinite Attempts is used)  to trigger a simple action from the dropdown list. Look at this screenshot as reference. It is VERY important to 'uncheck' the option 'Continue Playing the project' which will keep the play head paused at the pausing points of the buttons. Use a similar setup for all the buttons, this screenshot is for Button1:

     

    Stagprime2687219
    Brainiac
    August 13, 2020

    Are these meant to be done in order?

    Select 1

    Select 2 - Hide 1

    Select 3 - Hide 2

    Select 4 - Hide 3

    Etc?

    Do the previous buttons need to reappear at some point? Are learners allowed to review the objects multiple times?
    Are all 7 visible to start with?

    What happens if the learner starts with button 4?

    Depending on some of these answers - I would suggest something a bit different.

     

    cara84Author
    Participating Frequently
    August 13, 2020

    Hello!

    All 7 buttons are visible to begin with.

    They can select them in any order and can re-visit as many times as they'd like.

    I would like the buttons to remain visible (in their "Normal" state) even after they have been visited.

     

    Hopefully that answers all your questions. I think I have most of the AA created but I don't know how to say "when Button 1 is selected, hide button 2's object." I have the hide part in there but don't know how to reflect that I've selected the button.

     

    cara84Author
    Participating Frequently
    August 13, 2020

    Only for the InBuilt states of interactive objects the sizes are locked for the interactive part, but even in that case you can add state objects outside of that interactive part. That is NOT the case for any other multi-state object. You can increase the size of the text container in any state  even to cover the complete state... Multistate objects are used a lot in the added Quick Start Projects, not always in the best way, but you can see examples there. 

    Have also a look at :

    http://blog.lilybiri.com/click-slash-reveal-interactions-back-to-basics

    Look at the Object state panel screenshot: you'll see that the custom state takes up a lot more space than the Normal state.

    There is no reason whatsoever to go back to outdated workflows (Show/Hide). Maybe my blogs are not clear enough? Moreover if you ever want to use responsive projects, you will need to use multistate objects, because stacking is not allowed.

    Here another example: two states, second one has a much larger shape as text container:


    I had a look again and I still don't see how the text I need will fit in the Answer/visited state. Here is a screenshot of what I'm trying to do (blacking out most info, as it's confidential). All that text in the Answer is exactly the text I need to display and I think the font size is too small. I could not find a way to alter the position of the text, I can only change the size and colours.

     

    If you look closely at the slide, you can see the size I *would like* to have as a show/hide for the expanded text. I'm not sure this idea is going to work, which is unfortunate because this training is not going to be any better than PowerPoint if I can't do these simple things 😞

    Edited to add: I saw your post above about the larger container. I think the issue is that my Object/button is 150x125 and can't be much larger, or the 7 items wont fit on the slide nicely. So I think the text container that is available is just too small and there's too much text.

     

    Lilybiri
    Brainiac
    August 13, 2020

    Have several tutorials but find the Show/Hide approach rather outdated. A better alternative if to put the objects in different states of a multi-state object. That way the only command you need for each of the buttons is 'Change state of...'.  When a state switches, objects onthe other states automatically disappear. It has the extra advantage that you don't need an On Enter action for the slide to hide everything.

    Make the Normal state empty. One of the most recent blogs in the portal (need to publish on my personal blog):

    https://elearning.adobe.com/2020/07/why-use-an-empty-normal-state/

    You'll find some more links in that post as well.