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
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.
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?
@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
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”);
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.
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.
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.
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”);
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é.
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?
Is there a way to transmit variables directly from HTML to Captivate’s SWF like an usual SWF (via flashvars or GET, etc.)
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.
@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.
Comments are closed.