Who is afraid of ... Shared Actions - Crash course Introduction

For any Captivate user, new, intermediate or advanced.

Even if you are very new to Captivate, continue reading!

Contrary to Advanced Actions and JavaScript, Shared actions can be USED without needing to write out or edit scripts, nor to create variables. You don't need to be able to assemble an engine for your car to be able to drive, isn't it? What do you need?

  1. One or more shared actions created by a friend/colleague who is more advanced with Captivate
  2. To understand what a  'parameter' is (new term in your personal Captivate glossary)
  3. To learn how to add shared actions to your project, slides and interactive objects. Description and name of the shared action will help you (contrary to advanced actions).
  4. To choose the parameter values based on their descriptions. Automatic filtering by Captivate is a big help.

You read the introduction to a short ourse for adventurous newbies, including:

  1. A demo project with 4 useful interactions. All interactions can be realized using shared actions without having to create variables nor scripts.
  2. Explanation of the term 'parameter'

The course for newbies has TWO lessons. Each lesson comes in two 'flavors' to adapt to your taste:

  • Short video
  • Step-by-step text

To facilitate your learning/understanding, you'll get a start project  to practice the workflow.  You will also be able to use your personal project for the second lesson.  Both lessons are about one of the 4 interactions in the Demo project (see below). Depending on the 'welcome' by the community, may repeat this workflow for the other interactions or even for a game like  MatchStick game

Demo project

Watch this project, which includes 4 typical interactions:
  • Dashboard interaction (menu going to 4 chapters)
  • Slideshow
  • Click/Reveal
  • Toggle buttons

I used design elements from the new Quick Start Project ‘Diverse’. You can open the demo project using this link:

UsingSharedActions

Or watch it below  (fixed resolution):



What is a Parameter (in shared actions)?

This is my definition: a parameter is an ‘item’  replaceable by another item when you (re)use the shared action either in the same or in another project. That ‘item’ doesn’t always have a fixed type! It depends on the used command. Look at a some examples for clarification:
  1. Command Jump to slide: needs one parameter which is the slide. It is clear that you cannot change to another type of item than a slide.
  2. Command Change State of…: needs two parameters, first is the multistate object, second is the state you want to show. The first parameter has to be a multistate object of any type: shape, caption, button (for custom states), image, video, animation… Second parameter needs to be a state of that multistate object.
  3. Commands Hide/Show: need one parameter. Anything that can be shown or hidden is possible: shape, caption, button (for custom states), image, video. But also groups are possible! Look at the practice session below to see how this extends shared action functionality beyond what you are used to.

You may skip the explanation about the two types of parameters and go directly to the first lesson if you don’t like definition texts. Knowing the differences between parameters is not so important in this crash course, . BTW: the terms ‘compulsory’ and ‘candidate’ are just my personal choice, not official terms.

Compulsory parameters

All the items mentioned in the previous examples are compulsory: you will always have to choose them in any shared action.  Even though some will be the same in all instances of that shared action.

Candidate parameters

You probably know the command ‘Assign’ to store a value in a user variable or a system variable of the category ‘Movie Control’. A variable when used in a shared action can be a parameter, but it is not compulsory. If it is not a parameter, here is a rather unknown secret: importing the shared action in a new project will automatically create that variable, with the same name, description and value as designed originally. 
In some circumstances it is necessary to define the variable as parameter. You will see an example in the practice session for the toggle action.

In a conditional action you can have another candidate parameter, the ‘literal‘. Example: you want to limit a number of attempts by the learner to a maximum of 5. If you want to be able to edit that maximum number, you could define the literal as a parameter. This can be a bit tricky, but is beyond the scope of this basic blog.

Advanced to Shared Action: Step-By-Step (micro-navigation showcase)

Intro 

After the introduction to Micro-Navigation I explained how to use it for forcing the first view of a slide, and for playing an audio file on first visit. When looking at the resulting advanced actions they are pretty similar in both posts. Moreover you probably will want to use the action on multiple slides in the course, and maybe also in future courses. That sounds like a perfect scenario for conversion of the action to a Shared action. I have been blogging already several times about Shared actions. In the present article I try to explain how to reflect on the use of parameters. Static objects need to be parameters as are states and groups, I label them as 'compulsory'. But Variables and Literals are 'candidate parameters', a well-founded choice for change them in parameters,  can save you lot of time later on. Consider it a good practice example.

Analysis

When comparing the two advanced actions created in the mentioned articles, there is a small difference: the first decision (which is a standard action) has one command extra in the second advanced action (for Audio). For the ForceAct, the number of seconds to be jumped over is directly entered in the Expression command, for the SkipSlideAudio, Assign is used to store the number of seconds in the user variable v_skip. Both versions work well, but personally for a shared action I prefer the one with the extra Assign command.

What are the parameters for the shared action?

For the first decision (labeled Always in both advanced actions):

  •  'Assign v_skip with 16.5': this first command has two candidate parameters, the variable v_skip and the literal 16.5. The variable can be reused on each slide where the action is needed. Both advanced actions used the same variable in the interactive movie. There is no need to promote that variable to a parameter in that case. However the literal '16.5'  is the number of seconds to be jumped, will have a unique value on each slide, it has to be promoted to a parameter. Parameter 1 = literal. You have to be careful with literals: double-check that the same numerical value is not used anywhere else in the action. In this example there is a second literal '1' in the second decision, Increment command. It has to be different from the first parameter, which is the case.

  • 'Expression v_skip = v_skip * cpInfoFPS': the user variable v_skip is no parameter (see above). The system variable cpInfoFPS has never to be replaced by another variable, will be no parameter neither.

  • 'Increment v_visit by 1': the user variable v_visit has to be unique for each slide, as you can see in the action SkipSlideAufio where another variable has been used. This means that we have to promote that variable to a parameter, parameter 2. The literal '1' however will always be the same, no need to turn it into a parameter. We already double-checked that the literal in the first decision was different from 1.

The second decision is conditional:

  • 'IF v_visit is greater than 1': has two candidate parameters as well. We already indicated that v_visit is a parameter. The literal in this case will always be 1, will never be changed and need not to be a parameter.

  • 'Expression cpCmndGotoFrameAnd Resume = cpInfoCurrentFrame + v_skip': has 3 candidate parameters. Above was already decided that v_skip can be reused on each slide, and the system variables will always be the same.

Shared action Skip_Frames

When you choose to save any of the advanced actions used to skip frames as a Shared Action you'll see that all possible parameters are marked as OK. The reason is that there is no compulsory parameter in this action:

As a result of the analysis above, we need to mark to items as parameters: the tracking variable and the number of seconds to be jumped on later visits. The result will look like this. It is important to give a good description not only for the shared action but also for the marked parameters:

You can assign the shared action to all the slides where you want to jump frames on a later visit. You only have to define a tracking variable and estimate the number of seconds to be jumped. Here is one example setup for the slide where audio had to be jumped on later visits:

You can check in the Library for the Usage of the Shared action, much easier than for advanced actions.

Using Skip_Frames in future projects

Want to reuse this action in other projects? The workflow is described in an older blog post. Short summary:

  1. Use File, Import, External Library and point to the project where you created the shared action.
  2. Library will be opened in a floating panel. Look for 'Skip_Frames' in the Shared Actions subfolder and drag it to the Library of the new project.
  3. Because v_skip is not a parameter in the shared action, it will be created automatically, including the description.
  4. You have to create a tracking variable for each slide to which you want to assign the shared action, and define the duration in seconds to be skipped. Ready!








Internal and External Libraries

Intro

Reusability in Captivate is one of this tool's most amazing features,  but a lot of the (often time-saving) possibilities are not well known by (starting) users. When I mention the word  'external library' in a presentation I see a lot of confused eyes among the participants.  Even recently, based on an answer on the forums, someone sent me a message: 'What are you talking about, never heard about external libraries in Captivate, where can I find them?'. Time for a short blog post, with some efficiency tips about using the Library. Contrary to the Timeline panel which is hidden in the newbie UI (I consider this a great mistake), the Library panel has a big button on the Big Button Bar in the newbie UI. I'll take you on an overview of that panel.

The Help documentation is very concise about Library: https://helpx.adobe.com/captivate/using/captivate-library.html It has a description of the columns in the Library panel, which I will not repeat in this post.

Internal Library


Each project has its Library, I use the term 'internal' for the Library which is created with each project. In that Library several assets will be stored automatically in different folders when you insert them in a project (on the stage) or import them directly to the Library. Even when you delete the items from slides (stage), they will remain in the Library and can be reused. These are the default Library folders:
  • Audio: will have all audio clips, whether imported or recorded in Captivate; whenever you edit an existing clip, the original and edit clip will be in this folder. If you import a (compressed)mp3 file it will automatically be converted to a 'raw' wav-file which will also be in this folder. It is recommended whenever possible to import a wav file, when published it will be compressed to mp3 by Captivate.
  • Backgrounds: backgrounds used in project, master slides or created when recording a software simulation.
  • Equations: only for the versions that have MathMagic included (if you see it still in CP2017, which has no longer MathMagic, this is a bug). That folder will store the images created with MathMagic.
  • Images: has all used bitmap images of any format; exception are the images created from layers in an imported Photoshop file. When importing such a file an individual folder will be created (under the root, not under Images), with the same name as the PS-file, and having all the layers converted to PNG images. If you insert Characters (Media button) they will appear in this folder as well. Later on in this article you'll find a screenshot with an imported Photoshop file.
  • Media: will store video, animations...
  • Shared Actions: contrary to advanced actions, shared actions are in their dedicated folder in the Library, and they have all the possibilities offered to all assets.
  • SVG: stores all SVG (Scalable Vector Graphic) images
  • Web: for web objects
Under the Preview part, you'll find a Control panel with these 9 buttons:
  1. Open Library: is an alternative for File, Import, External Library (see sbelow)
  2. Import: you cannot import folders, but you can select multiple assets to import in one action. They will be placed in the folder for their type. You cannot import layers from a Photoshop file with this button, you need to use the menu File, Import, Photoshop File.
  3. Export: it is possible to export a number of assets to one location. Each will get its appropriate extension. If you never used shared actions, know that the extension 'cpaa' will be added for them. 
  4. Edit (CTRL-U): If you have associated an application for the asset, using this button will open the asset in the associated application. Examples in my situation: audio clip will open in Auditon,  SVG' in Illustrator, bitmap images in Photoshop. Alternative is using the right-click menu (but you'll have to use two clicks in that case), Edit with....If you have the asset Properties window open, you'll find an Edit button as well (see screenshot below)
  5. Properties: will open a window with asset properties; I almost never use that button but will double-click on the name of the asset (see Properties in the screenshot below). 
  6. Usage (CTRL-ALT-U): there is a column 'Use Count' as well, but this button opens immediately a list with all the locations where the asset is used. Alternative is option Usage in the right-click menu on the asset, or the Usage button in the Properties window (see screenshot below). In the screenshot you see that Usage counts also images used in object states.
  7. Update: if source files have been changed externally, you can update the assets in Captivate with this button. Need for updating is visible in the column 'Status' (red bullet)
  8. Select Unused Items: contrary to what some people 'believe' deleting unused items will only decrease the file size of the raw cptx file, not the file size of the published file. I prefer not deleting unused items until the project is finished.
  9. Delete

TIPS

  • Captivate users tend to insert assets one by one on slides using the Media Button. An alternative way is to import first (all) assets to the Library. From the Library you can drag them to the stage (or to an object). For audio clips, when dragging to the stage you'll have it inserted as slide audio, dragging to an object will create object audio. Same is valid for shared actions: dragging a shared action to the slide will create an On Enter action for the slide, dragging a shared action to an interactive object will create a Success action for that object.
  • You are not limited to the default folders described above. It is perfectly possible to create folders under the root and to create subfolders under existing folders. For complicated projects with lots of assets, I sometimes set up folders for each slide or slide group. Another approach if you take advantage of the great roundtripping possibility with Photoshop is to keep image assets for a slide or slide group in one Photoshop file. In that case I'm only talking about the bitmap images of course. For large, complicated projects both work flows will help to manage assets when the clients is asking for (last minute) changes. In the screenshot above Tips, you see an imported Photoshop file (Libraries_Small.psd), where I indicated 4 layers which have been converted to PNG-images
  • Even if you don't use custom folders/subfolders think about labeling assets that got generic names. A relevant example are audio clips generated by TTS. 

External Library

The Library of any project (has to be closed in Captivate) can be opened as a floating Library panel in a new project. You can open multiple libraries. You have two work flows to open such an external library:
  1. Use the first button in the Control panel of the Library panel (see above) and browse to the project (cptx)where the Library you want to use is stored.
  2. Use the menu File, Import, External Library and point to the project (cptx).
Opened External Libraries will appear in a dropdown list under the Open Library button:

In the screenshot below you see such a floating External Library to the left of the docked Internal Library. If you are using the Newbie UI you'll not be able to dock that External Library in any docking station (always recommend to switch to Expert UI). Its layout is totally similar to the Internal Library. The only way to recognize it as external, is the name of the Captivate file from which it was opened, and the presence of that same name in the dropdown list under Open Library button.


If you are not used to floating panels because you are in the Newbie UI, here are some warnings. 

  • Do not reset the Classic workspace while an external library is opened, or you'll lose it.
  • External libraries do not appear in the Window menu where you find most of the default panels. Only the internal Library (CTRL-ALT-L) can be switched on/off using that Window menu. 
  • The only way to close an external Library is with the Close button. That button is in the top right corner of the panel and pretty tiny, moreover the colors are grey on black which is not a very good combination for tired eyes:

You can use an external library (or multiple external libraries) exactly in the same way a the internal library: drag an asset to a slide, or to an object (for audio clips). However I will offer one recommendation for Shared actions (see more details in this blog post): I prefer to drag those actions first to the Internal Library, instead of attaching them directly to a slide (On Enter) or an interactive object (Success event). As you probably know, if a shared action is using a variable, this variable will automatically be created when using that action in a new project. To avoid problems with duplicate variables follow the recommendation of that mentioned article.

For all the copy/paste lovers: believe me, using assets from an external library is a much safer work flow than copy/paste objects between projects (one of the causes of corruption). 

Using external libraries can save time and help to achieve design consistency. For much used shared actions (like the toggle action described in this post) I have a dedicated project ready which I open as External Library in any new project. Images and SVG's, which I use all the time, are stored in another Libarry. I have an external library with sound clips that are useful. If you are a developer in a company, you see the advantage of using external libraries for sure!

(CC Libraries) 

This last part is 'wishful thinking': if you are a CC user like me, it would be a relief if we got access in Captivate to the CC Libraries. It would make the transfer of assets created with Adobe Color, Photoshop, Audition, Illustrator, Animate, Adobe mobile apps.. so much easier. Same is valid for managing Adobe stock assets, which can be inserted in CP. 

Captivate Draft has access to the CC Libraries, and could be used as an intermediate player: use it to retrieve custom color palettes, image and other assets. Once the Draft project is exported to Captivate, you'll have them in the Internal Library. But if you don't have an iPad, this work flow is impossible. Same when you don't use Draft for storyboarding but another application.

Please, log a feature request to support (one of) my Captivate dream(s)!