Skip to main content
Inspiring
May 16, 2009
Answered

Show/Hide

  • May 16, 2009
  • 1 reply
  • 1456 views

Hi. I'm trying to create an interaction in a single frame in Captivate 4.

I have 3 buttons, each time you click a button it shows a graphic.  I've done a simple test, click on button 1 and i use 'multiple actions' and it shows graphic 1,  hides graphic 2 and 3.  For button 2, i show graphic 2 and hide graphic 1 and 3 etc.

The graphics are initially set to invisible and seems to work, until i click a few times.

It would work fine apart from when I click on either of the buttons it starts the timeline and then moves onto the next page eventually. I double click the frame and set the properties for 'on slide exit' to 'no action' but it still moves on.

The show/hide feature would be useful if after pressing the button it wouldnt move on all the time !

The only way I can 'kinda' get it to work is to add lots of staggered hotspots, so when i click on 1 2 or 3 it moves the playhead but just to the next hotspot which is set to pause.

Is there a way to add some sort of interaction or command to say to Captivate 'dont move onto the next frame unless i click on the Next button' ?

    This topic has been closed for replies.
    Correct answer Captiv8r

    Hi there

    I'm thinking you will need to change your approach. Instead of simply programming the buttons to hide and show the objects in the button actions, define your actions using the Actions dialog.

    I was able to accomplish this using the following approach.

    1. Click Project > Actions... to open the Actions dialog.
    2. Click the Advanced Actions tab.
    3. Click the drop-down and choose Create a new Action...
    4. Type the name for the action. I used Image1.
    5. Click once on the Add Statement line to place focus there. Then press the Spacebar.
    6. Press the Spacebar again and a drop-down should appear. Choose Standard Action and press Enter.
    7. Choose Show and press Enter.
    8. Choose the desired image and press Enter.
    9. Rinse and repeat until you have configured showing and hiding the images as you did with the button.

    At this point you will have seemed to have expended way more effort than you did with just the button. You may be wondering why you are here if you could accomplish this easier using the button! Just hang onto your hat. It's gonna get interesting.

    You now need something to make the slide pause. There is a variable that is documented in the help for this. The name is rdcmndPause. According to the help, you are supposed to see that the slide pauses if you configure the value of the variable to 1. I tried and tried in many different ways and was unable to make it work. So moments ago I submitted a bug to report it to Adobe.

    However, it's always been my experience that where there's a will, there's often a way! So here's how I managed to work past things and make the slide pause.

    The Buttons themselves normally pause the slide, no? I know you can turn off the pause, but most of the time we want the pause enabled. And in your case I'd imagine it is because you are citing things fall apart after clicking the buttons a few times.

    Fortunately there is another command we can call upon. The name is rdcmndGotoFrame. And most fortunately this one seems to work! Basically you configure the command so it transports the playhead to a specific frame and it dutifully carries out the instruction. The issue is, how do you figure out which frame to point it to?

    So here's what I did. I inserted a caption on the slide. I inserted a variable into the caption. The variable was rdinfoCurrentFrame. So when the slide paused the caption showed me what frame it was pausing on.

    tmp2.png

    Knowing the buttons should pause playback, I figured I could simply configure the rdcmndGotoFrame with a frame number reasonably near the pause. I changed the value to what I saw in the caption, subtracted about 4 frames. And bingo!

    So in your Advanced Actions, you add the action at the end of the actions of hiding and showing the images:

    tmp1.png

    Hopefully this will help you sort it!

    Cheers... Rick

    1 reply

    Captiv8r
    Captiv8rCorrect answer
    Legend
    May 16, 2009

    Hi there

    I'm thinking you will need to change your approach. Instead of simply programming the buttons to hide and show the objects in the button actions, define your actions using the Actions dialog.

    I was able to accomplish this using the following approach.

    1. Click Project > Actions... to open the Actions dialog.
    2. Click the Advanced Actions tab.
    3. Click the drop-down and choose Create a new Action...
    4. Type the name for the action. I used Image1.
    5. Click once on the Add Statement line to place focus there. Then press the Spacebar.
    6. Press the Spacebar again and a drop-down should appear. Choose Standard Action and press Enter.
    7. Choose Show and press Enter.
    8. Choose the desired image and press Enter.
    9. Rinse and repeat until you have configured showing and hiding the images as you did with the button.

    At this point you will have seemed to have expended way more effort than you did with just the button. You may be wondering why you are here if you could accomplish this easier using the button! Just hang onto your hat. It's gonna get interesting.

    You now need something to make the slide pause. There is a variable that is documented in the help for this. The name is rdcmndPause. According to the help, you are supposed to see that the slide pauses if you configure the value of the variable to 1. I tried and tried in many different ways and was unable to make it work. So moments ago I submitted a bug to report it to Adobe.

    However, it's always been my experience that where there's a will, there's often a way! So here's how I managed to work past things and make the slide pause.

    The Buttons themselves normally pause the slide, no? I know you can turn off the pause, but most of the time we want the pause enabled. And in your case I'd imagine it is because you are citing things fall apart after clicking the buttons a few times.

    Fortunately there is another command we can call upon. The name is rdcmndGotoFrame. And most fortunately this one seems to work! Basically you configure the command so it transports the playhead to a specific frame and it dutifully carries out the instruction. The issue is, how do you figure out which frame to point it to?

    So here's what I did. I inserted a caption on the slide. I inserted a variable into the caption. The variable was rdinfoCurrentFrame. So when the slide paused the caption showed me what frame it was pausing on.

    tmp2.png

    Knowing the buttons should pause playback, I figured I could simply configure the rdcmndGotoFrame with a frame number reasonably near the pause. I changed the value to what I saw in the caption, subtracted about 4 frames. And bingo!

    So in your Advanced Actions, you add the action at the end of the actions of hiding and showing the images:

    tmp1.png

    Hopefully this will help you sort it!

    Cheers... Rick

    P_SJAuthor
    Inspiring
    May 17, 2009

    Wow ! Thanks so much !

    Havent done much with advanced actions, have to learn more about that as it works very well.  I see what you mean about finding out the frame number as before i guessed and it wasnt working properly, extended the timeline a fraction and it works great, i can see the playhead does not move on despite clicking so many times on the various objects.

    Excellent stuff, makes Captivate more powerful an interaction like that which is very useful

    Thanks

    -----------

    Update - Does work very well BUT sometimes the playhead still seems to go on, its not one particular sequence, if i'm clicking for ages, click on one 3 times, then another one, then a different one 'sometimes' the playhead then moves on automatically.

    I dont think its a huge issue as with 4 clickable graphics you wont get people going 'click happy' for ages but theres still a slight issue there.  But i'm very happy with it, as i said i need to get into advanced actions more as this works very well

    May 18, 2009

    PMed you asking for your help.

    The show/hide advanced action works fine, if i do the same method again for another slide.  It works fine when i preview from that slide.  If i start the course however, slide 1 has the show/hide advanced action which works fine, i get to slide 3 with the other show/hide advanced action and 'bam' it goes back to the beginning whatever i click on !

    Would rdcmndGotoFrameAndResume be the problem ?  It still seems to think it should jump back to slide 1 not stay on 3 ?