Adobe Captivate 4: Gimme Some Space!

by Lori Smith

If you have played around with Captivate 4's Advanced Actions features, you have surely discovered that you can add two items together such as myCount := myCount + 1 or myBossSalary := mySalary + mikeSalary.

But, did you know that you can also add words together (concatenate)? You can certainly have an assignment statement of the type: fullName := firstName + lastName.

If your student inputs Biff and Bifferson to firstName and lastName in a couple of text entry boxes, your fullName will end up being the sum of those two. Cool, yes? Well, only if you like your fullName to be displayed as BiffBifferson. Gee, that's a bit annoying… it's one long name and hard to read. You might try to add a space in the middle by doing something like:

fullName = firstName +   <space>

fullName = fullName + lastName.

But I can tell you right now, that it won't work.  Try adding slashes, single or double quotes… still a no go.

I have a little trick I call the Spacer object. The Spacer object is a Text Entry Box that contains a space character.

First, create a variable named spacer (via Project > Actions > Variables).

New variable called Spacer.

Next, create a text entry box on the first slide of your project and stick it up in a corner so no one can click it or fill it in by accident.  Then, set the initial value to a blank space and check the retain value field.

Text entry box with initial value set to a blank space.

Associate the variable spacer with the text entry box.

Associate the variable spacer with the text entry box.

On the Options tab, set the rest of the text entry box's settings as shown below:

Text entry box options

Now that you have a space handy, you can go back to your action and enter the following:

fullName := firstName + spacer

fullName := fullName + lastName

The result when fullName is displayed via a Text Caption will appropriately be "Biff Bifferson."

This is just a little something I like to have handy when I'm working with advanced actions in Captivate. Like this little tip? Want to learn more about Captivate's Advanced Actions? Join me online as I lead you through a 3-hour course focusing on Captivate's Advanced Actions.

***

About the Author: Lori Smith is IconLogic's lead programmer and Adobe Certified Expert (ACE) in Adobe Captivate. Lori has a Bachelor's degree in electrical engineering from MIT as well as a Master's in electrical engineering from George Mason University.  She has been working in the field of software engineering for more than 20 years. Lori will be teaching our Adobe Captivate 4: Advanced Actions online, instructor-led class.

***

Need to learn the basics of Adobe Captivate 4 fast? Attend a live, instructor-led online training class. Click here for more information. Looking for more Advanced Captivate 4 training? We've got you covered. Click here for more information.

Worried about your class canceling? You'll be happy to hear that IconLogic never, ever cancels classes (even if there's just one student registered).

Leave a Reply

Discover more from The Logical Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading