Template for reusing script?

Since we are now in version 11 (2019), free templates are no longer available. It is not necessary anymore to have a template for reusing variables and advanced actions since the appearance of shared actions and the possibility to copy/paste an object with an attached advanced action.

Intro

If you are familiar with creating advanced actions, you will certainly have been frustrated by the fact that you cannot re-use the actions you carefully constructed and tested out. There is no way to export/import them in another project, even just printing them is a lot of trouble. And I'm dreaming about the possibility of having a library of actions available all the time, with an easy way to edit and adapt them to the specific ID's of the objects in a new project. OK, I already hear the Widget Kings, Princes and Wizards calling out: create widgets... but you have to learn ActionScript and be familiar with Flash which is certainly not the case for all Captivate-users that I try to convince to have a look at advanced actions to enhance their projects. From the success of my last posting (Controlling the score slide) I deduct that I'm not the only non-Flash expert around that wants more control :-)
 
Being a woman I do trust my intuition, and so I tried out this idea: creating a template with advanced actions, while providing an easy way to edit objects, could enable re-using those actions. And one of the recurring questions on the user forum provided me with an example: 'How can I display a checkmark or/and grey out the menu item when it is completed?'

Goal

The template has a menu slide with buttons to navigate to 5 other slides that represent 5 menu items. After visiting an item the user can navigate back to the menu slide with a simple button. The 7th slide is an End slide.
 
For this example I worked out two possible use cases:

  1. When returning to the menu slide the visited item will be dimmed, have a checkmark and the button will be disabled; this means that the user can only visit each item once; when all items have been visited the user is navigated automatically to the End slide.
  2. When returning to the menu slide the visited item will be dimmed, have a checkmark but the button will not be disabled; the user can visit the item multiple times; when all items have been visited at least once an End button will appear on the menu slide that allows the user to get to the End slide.

You can play these SWF's to have an idea of the workflow. Both have been based on the template, but with different lay-out. I will explain editing possibilities later.
 


Variables - actions

I created 5 user variables, one for each menu item, labeled v_item1, v_item2, v_item3, v_item4, v_item5. Originally they have a value=0 but will get the value=1 when an item has been clicked.
 
When a button on the Menu slide is clicked, a simple standard action is executed that changes the value of the user variable and jumps to the proper slide.
 
On entering the Menu slide two possible conditional actions can be assigned, corresponding with the use cases:

  1. EnterMenu for the first use case, will dim and add a checkmark to the items that have been visited, button will be disabled; if all items have been viewed will jump to the end slide.
  2. EnterMenuRetry for the second use case, will dim and add a checkmark to the items that have been visited; if all items have been viewed at least once will show the End button.

Depending on which use case you want, assign the appropriate action. 

 
Changing Layout

I used a master slide that has the background and is applied to all slides, so this is easy to change.
Example: first SWF has the original master slide, in the second one I applied another background image and added some lines.
 
It is important that the ID's of the objects that are referred to in the advanced actions do not change to avoid issues. Have a look at the timeline of the menu slide. From top to bottom you will see these objects that are in the advanced actions, so be sure not to change their labels:

  • 5 images, labeled Done1... Done5 (highlighted in green); those are the checkmarks, and all instances of one image in the library; if you want another image, use the option "Edit with...' from the library and after saving in the image processing app all instances will be updated automatically. For those using the eLearning Suite: you can of course use the option Edit Source file.
    Example: for the second SWF I used Edit Source file to change the color of the checkmark
  • 3 objects for each item 'button' (highlighted in yellow for the button for item 1): a transparent button (Bt1), a rectangle (Rc1) that serves as background for the button before dimming and a second rectangle (RcDim1) that is behind the first one and has a text in it 'Item 1' to make it possible to change the color of the text after dimming. You can edit: the text on the buttons Bt (formatting inc.), the color and rounding of both rectangles and the text on the second rectangle (formatting inc.)
    Example:  I changed colors and corner rounding for the rectangles, changed text color of the buttons by changing the default button style.

  


Limitations

The template was created in a resolution 640x480.
There are only 5 menu items: you can easily delete decisions in the advanced conditional actions EnterMenu and EnterMenuEntry, creating more items will be a little bit more work.
I did not provide the possibility to have only checkmarks or only dimming for the moment, but would also be simple to achieve.

 
Offer

This week my 6-months young (old?) blog passed the milestone of 25000 hits, which is incredible! I cannot offer you a cake or chocolate (Belgian of course) to celebrate, but want to offer you this template to play with. If you send me an e-mail address by Direct Message with Twitter (@Lilybiri) or post it using a Private message on the Captivate user forums (the thread I'm referring to is http://forums.adobe.com/thread/806123?tstart=0) and I will be glad to send you the link to this template. You can also post a comment, but I do want to avoid you having spam! With the blog service I'm using for the moment I do not see another way, sorry.
And please, let me know what you think about this idea of using templates?


Update

Kevin Siegel published a great tip today: you can turn a project into a template by simply changing the extension from cptl to cptx. This is the link: http://iconlogic.blogs.com/weblog/2011/05/adobe-captivate-5-one-quick-way-to-a-project-template.html

I did check it out and that can be an easy way to exchange advanced actions between projects:

  • Duplicate the project from which you want to export the advanced actions
  • Rename the extension for the duplicate from cptx to cptl
  • Create a new project from template and navigate to the just renamed file
  • A new project, labeled 'Untitled' is created and it has all advanced actions in it

 In Captivate 6 you can finally publish an existing file as a template, which makes the workflow even easier.