By popular demand, I’ve updated my CaptivateController to work with Adobe Captivate 5 (CP5). Since this is an open-source project, there’s no upgrade fee. (What? “Adobe” and “no upgrade fee” in the same paragraph?!) I kid, I kid… I’m a kidder.
As you may have heard, Adobe Captivate 5 is a complete re-write of the Adobe Captivate application. As such, there are a few significant changes under-the-hood. For example, Adobe Captivate 5 does not support ActionScript 2, and will only publish to ActionScript 3. The Captivate developers eliminated a few of the old system variables while adding a few new ones. Showing and hiding the playbar now works very reliably (yay!). Most notably, the developers added extra ExternalInterface support via the cpEIGetValue
and cpEISetValue
callback functions while eliminating the cpSetValue
callback, which explains why the previous version of the CaptivateController didn’t work with CP5 SWFs.
As for the updated CaptivateController, it works the same as the previous version. Most of the changes were under-the-hood, so you shouldn’t need to edit any of your code, and should be able to drop this new version on top of your old one. No system restart required!
Download the updated CaptivateControllerThe CaptivateController is now hosted on GitHub!- CaptivateController documentation
- View the test suite
- Complete list of variables for Adobe Captivate 5
If you encounter any bugs, please let me know by posting in the comments. I’d also be happy to hear any success stories you may have.
Comments
Todd Haynes wrote on August 24, 2010 at 7:24 am:
Philip, once again you come through. Thank you for your efforts.
Rissella Weiss wrote on August 31, 2010 at 12:19 pm:
This tool looks very appropriate for what we are trying to do, which is get and set variables to and from Captivate 5 project files and on to the LMS.
Is there any documentation on how to use the tool, and how the test suite works? couldn't find any by browsing around the website. Thank you!
philip wrote on August 31, 2010 at 12:45 pm:
@Rissella There is basic documentation at https://pipwerks.com/2009/06/07/introducing-the-captivatecontroller/. The <a href="http://lab.pipwerks.com/captivate/CaptivateController/testsuite/" rel="nofollow ugc">test suite</a> serves a dual purpose: to ensure the script works as expected when I test it, and to provide sample implementations for people to copy. Files in the test suite aren't meant to be the simplest or easiest examples to follow. The most basic implementations are shown on the documentation page. For example:
<pre>
//Assuming your SWF is already embedded and has the ID "myID"
var myMovie = CaptivateController("myID");
var author = myMovie.query("cpInfoAuthor");
</pre>It's a very simple system, there really isn't much to it.
Rissella Weiss wrote on September 2, 2010 at 12:56 pm:
Thank you Philip for the quick answer. Would the Controller work with assigning values to user-defined variables as well? If Query is the method to get a value out, what would it be to get a value in?
Thank you!
philip wrote on September 10, 2010 at 11:48 pm:
@Rissella it's not designed to assign values to user-defined variables (I've never tested setting a custom value), but if you're using CP5, you can try assigning a value using
<pre>
//Assuming your SWF is already embedded and has the ID "myID"
var myMovie = CaptivateController("myID");
myMovie.cpSetValue("customvariablename", valuetoassign);
</pre>
no guarantees…
Chuck wrote on January 3, 2011 at 7:56 pm:
Any word on whether this worked?
Also, I've just had success in pulling out a custom Variable name and Custom Score using the controller for casual evaluation of Click Boxes and buttons (which don't seem to output to the cpQuizInfo variables properly).
philip wrote on January 4, 2011 at 8:55 am:
Yup, it works.
Karlson wrote on January 8, 2011 at 12:25 pm:
You wrote that this works:
var myMovie = CaptivateController("myID");
myMovie.cpSetValue("customvariablename", valuetoassign);This does not work for me (Capt 5).
Any idea what I am doing wrong?
I need to pass a variable into Captivate.I read a custom var and then I try to pass a new value to Capt5.
And I have another issue. How do I tell an aggregator file to 'gotoSlideAndPlay'?
Inside the aggregator file are three movies. The first is played and I try to goto slide 5.Any ideas
philip wrote on January 10, 2011 at 10:47 am:
1) I believe you have to create the variable inside CP5 before you can assign it any values using CaptivateController.
2) I never tested CaptivateController with the aggregator, sorry. Using the aggregator will add extra depth to the MovieClip paths, which could cause CaptivateController to fail.
Erika wrote on January 13, 2011 at 3:12 am:
Hi,
I am trying to get Captivate 5 to send an email if the person passes saying the name of the person who did the course. The inbuilt functionality doesn't work so have searched and found your site. One of your other postings seemed to tell me how to do it with versions 2/3 but that with version 5 I should use the Controller so I have downloaded it but now have no idea of how to get it to work. The controller is a js file but I dont know really how to make it do anything – please have you got some more instructions.
Thanks very much
philip wrote on January 13, 2011 at 4:42 pm:
@erika there are probably 2 or 3 ways to handle your situation. i suggest posting on the <a href="http://groups.google.com/group/elearning-technology-and-development" rel="nofollow ugc">eLearning Technology and Development Google Group</a>, it's better for this kind of discussion.
Jean-Philippe wrote on January 19, 2011 at 6:28 pm:
hi,
I found your script and I'm really glad… but I have always a false response when I test my Captivate 5 movie with
var myMovie = CaptivateController("myID");
var author = myMovie.query("cpInfoAuthor");
I'm sure it's a problem with my implementation of HTML/Javascript because the controller works fine when I use your "test suite" (automated.js) with my movie. Do you have an example of a simple implemetation of HTML/Javascript?thanks for your great work!
philip wrote on January 19, 2011 at 8:53 pm:
@jean-philippe try this one: http://lab.pipwerks.com/captivate/CaptivateController/testsuite/query-CP4-uservar.html
Jean-Philippe wrote on January 20, 2011 at 4:40 am:
this works fine, thanks!
Jean-Philippe wrote on January 20, 2011 at 11:18 am:
I retrieve variables but I have a Flash error window:
TypeError: Error #1010: Un terme n'est pas défini et n'a pas de propriété.
at captivate.veela_as3::CaptivateMainTimeline/cpEIGetValue()
at captivate.veela_as3::CaptivateMainTimeline/cpGetValue()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at flash.external::ExternalInterface$/_callIn()
at ()I'm with Captivate 5, Win 7, FF 3.6, Flash 10.0 and no error with the movie
philip wrote on January 20, 2011 at 11:33 am:
@jp Those errors are stating that Captivate's cpEIGetValue and cpGetValue functions don't exist. They're harmless errors that are a byproduct of how CaptivateController detects which communication method to use (Adobe changed Captivate's communication methods several times, so CaptivateController has to sniff out which one is available for your particular SWF).
All of the error messages should be suppressed in the browser. I'm guessing you're using the debug version of Flash Player. Do you see any error messages when you view the content in a web browser using the standard (non-debug) version of Flash Player? If so, can you share a link for me to test?
Jean-Philippe wrote on January 22, 2011 at 8:28 am:
Hi Philip
I don't have any error message in a browser, or javascript console, only in this Flash window.
Is there a way to transmit variables directly from HTML to Captivate's SWF like an usual SWF (via flashvars or GET, etc.)
jpl
philip wrote on January 23, 2011 at 4:56 pm:
i don't think there's a reliable way to send values from HTML to a CP5 SWF's user-defined variables. however, you can send values to CP5's system variables very easily (that's how the CaptivateController works). it's all due to how Captivate exposes the user-defined variables to JavaScript. there may be a widget out there that can be used as a proxy for passing values. for widgets, <a href="http://www.infosemantics.com.au/adobe-captivate-widgets" rel="nofollow ugc">tristan's blog</a> is a good place to start.
John Bradley wrote on March 9, 2011 at 1:58 pm:
Philip, thanks so much for the CaptivateController! I was just about to create a much lamer version when I came across your site. 🙂
I did encounter one head-scratcher, though. I develop in Captivate 4 & use Jim Leichliter's Captivate 4 widget to customize the look of the TOC expander button (http://captivatedev.com/2010/02/06/captivate-4-widget-customize-toc-expander-button/).
If this widget is present in my project, I cannot set any Captivate variables using CaptivateController. I *can* query some Captivate variables such as cpInfoCurrentSlide but methods like captivateVersion() don't work.
FWIW, the widget is set to display at 0.1 seconds, for rest of slide. I've tried moving it from Slide 1 to Slide 2 and changing the layer order of the widget but nothing seems to help. Only by deleting the widget was I able to use CaptivateController without issue.
For my needs, it's a small sacrifice to lose the widget but thought you might be interested that some widgets apparently cause a conflict in CP4.
Thanks again,
John
philip wrote on March 9, 2011 at 8:06 pm:
@john thanks for the info.
The CaptivateController requires a specific movieclip structure to be present, which establishes the route the CaptivateController takes to request variables from the main Captivate movieclip. Adding other movieclips to the mix (nesting the main Captivate SWF) can potentially create a scenario where the CaptivateController can't find the main Captivate SWF and therefore can't return the variables. The TOC and aggregator sometimes cause issues with the CaptivateController. Widgets may potentially do it too, though I haven't run across it myself.
Philip, once again you come through. Thank you for your efforts.
This tool looks very appropriate for what we are trying to do, which is get and set variables to and from Captivate 5 project files and on to the LMS.
Is there any documentation on how to use the tool, and how the test suite works? couldn’t find any by browsing around the website. Thank you!
@Rissella There is basic documentation at https://pipwerks.com/2009/06/07/introducing-the-captivatecontroller/. The test suite serves a dual purpose: to ensure the script works as expected when I test it, and to provide sample implementations for people to copy. Files in the test suite aren’t meant to be the simplest or easiest examples to follow. The most basic implementations are shown on the documentation page. For example:
It’s a very simple system, there really isn’t much to it.
Thank you Philip for the quick answer. Would the Controller work with assigning values to user-defined variables as well? If Query is the method to get a value out, what would it be to get a value in?
Thank you!
@Rissella it’s not designed to assign values to user-defined variables (I’ve never tested setting a custom value), but if you’re using CP5, you can try assigning a value using
no guarantees…
Any word on whether this worked?
Also, I’ve just had success in pulling out a custom Variable name and Custom Score using the controller for casual evaluation of Click Boxes and buttons (which don’t seem to output to the cpQuizInfo variables properly).
Yup, it works.
You wrote that this works:
var myMovie = CaptivateController(“myID”);
myMovie.cpSetValue(“customvariablename”, valuetoassign);
This does not work for me (Capt 5).
Any idea what I am doing wrong?
I need to pass a variable into Captivate.
I read a custom var and then I try to pass a new value to Capt5.
And I have another issue. How do I tell an aggregator file to ‘gotoSlideAndPlay’?
Inside the aggregator file are three movies. The first is played and I try to goto slide 5.
Any ideas
1) I believe you have to create the variable inside CP5 before you can assign it any values using CaptivateController.
2) I never tested CaptivateController with the aggregator, sorry. Using the aggregator will add extra depth to the MovieClip paths, which could cause CaptivateController to fail.
Hi,
I am trying to get Captivate 5 to send an email if the person passes saying the name of the person who did the course. The inbuilt functionality doesn’t work so have searched and found your site. One of your other postings seemed to tell me how to do it with versions 2/3 but that with version 5 I should use the Controller so I have downloaded it but now have no idea of how to get it to work. The controller is a js file but I dont know really how to make it do anything – please have you got some more instructions.
Thanks very much
@erika there are probably 2 or 3 ways to handle your situation. i suggest posting on the eLearning Technology and Development Google Group, it’s better for this kind of discussion.
hi,
I found your script and I’m really glad… but I have always a false response when I test my Captivate 5 movie with
var myMovie = CaptivateController(“myID”);
var author = myMovie.query(“cpInfoAuthor”);
I’m sure it’s a problem with my implementation of HTML/Javascript because the controller works fine when I use your “test suite” (automated.js) with my movie. Do you have an example of a simple implemetation of HTML/Javascript?
thanks for your great work!
@jean-philippe try this one: http://lab.pipwerks.com/captivate/CaptivateController/testsuite/query-CP4-uservar.html
this works fine, thanks!
I retrieve variables but I have a Flash error window:
TypeError: Error #1010: Un terme n’est pas défini et n’a pas de propriété.
at captivate.veela_as3::CaptivateMainTimeline/cpEIGetValue()
at captivate.veela_as3::CaptivateMainTimeline/cpGetValue()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at flash.external::ExternalInterface$/_callIn()
at ()
I’m with Captivate 5, Win 7, FF 3.6, Flash 10.0 and no error with the movie
@jp Those errors are stating that Captivate’s cpEIGetValue and cpGetValue functions don’t exist. They’re harmless errors that are a byproduct of how CaptivateController detects which communication method to use (Adobe changed Captivate’s communication methods several times, so CaptivateController has to sniff out which one is available for your particular SWF).
All of the error messages should be suppressed in the browser. I’m guessing you’re using the debug version of Flash Player. Do you see any error messages when you view the content in a web browser using the standard (non-debug) version of Flash Player? If so, can you share a link for me to test?
Hi Philip
I don’t have any error message in a browser, or javascript console, only in this Flash window.
Is there a way to transmit variables directly from HTML to Captivate’s SWF like an usual SWF (via flashvars or GET, etc.)
jpl
i don’t think there’s a reliable way to send values from HTML to a CP5 SWF’s user-defined variables. however, you can send values to CP5’s system variables very easily (that’s how the CaptivateController works). it’s all due to how Captivate exposes the user-defined variables to JavaScript. there may be a widget out there that can be used as a proxy for passing values. for widgets, tristan’s blog is a good place to start.
Philip, thanks so much for the CaptivateController! I was just about to create a much lamer version when I came across your site. 🙂
I did encounter one head-scratcher, though. I develop in Captivate 4 & use Jim Leichliter’s Captivate 4 widget to customize the look of the TOC expander button (http://captivatedev.com/2010/02/06/captivate-4-widget-customize-toc-expander-button/).
If this widget is present in my project, I cannot set any Captivate variables using CaptivateController. I *can* query some Captivate variables such as cpInfoCurrentSlide but methods like captivateVersion() don’t work.
FWIW, the widget is set to display at 0.1 seconds, for rest of slide. I’ve tried moving it from Slide 1 to Slide 2 and changing the layer order of the widget but nothing seems to help. Only by deleting the widget was I able to use CaptivateController without issue.
For my needs, it’s a small sacrifice to lose the widget but thought you might be interested that some widgets apparently cause a conflict in CP4.
Thanks again,
John
@john thanks for the info.
The CaptivateController requires a specific movieclip structure to be present, which establishes the route the CaptivateController takes to request variables from the main Captivate movieclip. Adding other movieclips to the mix (nesting the main Captivate SWF) can potentially create a scenario where the CaptivateController can’t find the main Captivate SWF and therefore can’t return the variables. The TOC and aggregator sometimes cause issues with the CaptivateController. Widgets may potentially do it too, though I haven’t run across it myself.