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.

 

31 responses
Thank you for the template and guidance! It helped me tremendously.
@ccrte Glad this could be of some help? Was it easy to customise the template? Do you have suggestions for improving, extending this template or for new ones?
Yes; it was very easy to customize!  I don't have any suggestions on improving it.
Thanks for the template! I've been using it as a guide to self-teach myself to work with advanced actions and it's going fairly well.

I've run into one snag though: I feel like I've replicated everything in your template, but my checkmarks and "Done" button are showing up every time I enter the "Menu" slide even though my other buttons are dimming and working as I expected. Am I missing something obvious here?

Bit difficult to guess what is going wrong without seeing your file. Could you post it somewhere and send me the link, using a private message on the Captivate user forum?
Thanks for the response, but I've resolved the issue. It WAS something simple - I hadn't uncheked the "Visable" box for those items.

Thanks again for the great template!

HI Lilibiri,
It looks like the private post is closed and I'm having difficulty building the Advanced Actions without a little more guidance. I'd like to request the template if that will help me see how to construct the advanced actions.

what would you suggest?

Thank you for this post!

Sally, I'm talking about the privafe messages on the user forum - http://forums.adobe.com/community/adobe_captivate?view=overview or a direct mesaage on Twitter. I do need an e-mail address.
Your example worked perfectly for my own project, Lilybiri. Thank you!

I had a "problem" when I tried to build on the same idea within one slide--my problem was that I didn't know _exactly_ what words / phrases to search for, because of course, I'm not reinventing the wheel. Since then, however, problem solved and I'm ready to use variables and advanced actions again and again.

Thank you SO much for this template it is by far the best explanation of Advance actions for Captivate! This worked perfectly and really furthered my presentation.

Thank you for all your efforts!

Thank you, I love your blog!... I would love to get this template from you, so I'd like to send you my email address privately. However, I can't figure out how to send a direct/private message...Twitter apparently doesn't do it unless both parties follow each other, and I don't see how to do it on the Adobe forum... help? :-)
Thanks for being a 'fan'. I just followed you on Twitter, you can DM me. In the Adobe forums: open my profile by clicking on my avatar, and you'll be able to send a private message.
Goofy question... Why is there only an IF statement for v_item1 in EnterMenuRetry?

The other checkmarks still appear, but it seems odd that the slide is only checking v_item 1 on entry.

Thanks!

Miles, I do check every item in this advanced action, both in EnterMenu and in EnterMenuRetry. There are two kinds of conditional actions: the most known one is a one-condtion with only two branching possibilities (Then and Else). But CP5/5.5 allows to have multiple 'decisions', condtions that will be checked from left to right, which allows for multiple branching possibilities. Those particular advanced actions have a decision for each item, I even labeled them item1, item2,....item5. And there is a 6th decision 'End' that checks if all items have been taken. To understand this kind of conditional action with multiple decisions, I published a video tutorial, that you can watch in this article: http://kb2.adobe.com/community/publishing/858/cpsid_85847.html
Anyway, I'm more interested in the 2nd case because it's more appropriate. So I'd like to see an example file of that case. Really appreciate this post! Been trying to find ways to do this.
@Elinur: I didn't approve your comment with the mail address to avoid having it exposed publicly. Will send you the template, but can you let me know which one: for version 5.0 or 5.5?
I'm using version 5.5. Thank you so much!
I was hoping if you have received my latest reply on the Captivate Version that I'm using? I'm currently using Adobe Captivate 5.5, do send me the template to my email soon? Thanks Lieve!
@Elinur, so sorry, I did send the template right away, but there was a typo in your email address, just tried again.
@Lilybiri Hi! I came across your blog. Can you please send me this template: http://blog.lilybiri.com/template-for-reusing-s.... This is from the forum: http://forums.adobe.com/thread/806123?tstart=0. Thanks!
Those templates were for Captivate 5/5.5. I didn't create them for later versions, we are now on CP9.
You´re the best!. Thanks a ton!
9 visitors upvoted this post.