To do that, you really do need to understand the concept of a variable, like a variable in programming. So think of a variable as a container, like a bucket. Your bucket can contain a variety of things. You could put juice in it, and then pour the juice out, and replace it with water. You could pour the water out and you could put rocks in your bucket. Then you could get rid of your rocks and you could put fish in your bucket. The point is that if you can get a hold of the bucket, then you also have access to whatever is inside the bucket. And it's the same thing with variables.
So, I will choose Text Entry Box, and we get it on the stage. I'm going to get rid of the Submit button because we're already using our Go button, and I'm just going to move this and resize this so it looks nice, and I'm actually going to fix my Timeline because it bugs me that it messed up the Timeline, so, when you add a text entry box, Captivate assigns it a variable by default to track whatever it is that a user types into this box, so with the text entry box selected, if you look over in the Properties, you can see about halfway down, there's this Variable heading.
Let's go to the Project menu, and then choose Variables. Now if you look at the System Variables, these are all the variables that exist within each and every Captivate project. They're available for you to use. There's commands and variables, so things like cpCmndGotoFrame, cpCmndGotoSlide, or Mute the volume, Go to the next Slide and so on. If you look at the bottom. Here we're into the variables that talk about the quizzes. What was the number of points that the user got on their quiz? And so on.
Let's focus on cpCmndShowPlaybar, right here. So if we read the description of this, it shows or hides the playbar in the Adobe Captivate movie. Set the value to 1 to show the playbar. Set the value to 0 to hide the playbar, and you can use this command in your Advanced Actions to do exactly that. So, cpCmndShowPlaybar exists in Captivate. Now if you look at the documentation, you can look all day. And I guarantee you that you're not going to see anything about cpCmndShowPlaybar here.
And that's because you should think of this as kind of shortcuts to the commands and functions that the engineers at Adobe decided were the ones that should be put into the Common JS Interface. Basically, if there's a command that you know exists in Captivate, but you don't see it documented here on how to use it, you still can use it, you just have to figure out how to call it. So using cpCmndShowPlaybar, we're going to use that with setVariableValue. Let's see how. So I'm going to go back to Captivate and here's our Go button.
So here we are. Our project dimensions are actually a little too big. Here's the playbar down at the bottom. I'm going to go ahead and type something in. I'm going to click Go. We are taken to Slide 2, and indeed, the playbar has been hidden. So you can see that you really do have access to all the commands that exist within Captivate. It's really just a matter of knowing how to call them using the Common JS Interface. Now, as you continue to work with the Common JS Interface, you'll probably also start to be interested in using the Event Emitter, which is talked about a little bit down here.
- Creating timed activities
- Adding an element of chance with a random number generator
- Using random question slides
- Tracking activity and score with advanced actions
- Utilizing Captivate 9's new knowledge check questions