CaptivateController Updated to Support Adobe Captivate 5

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!

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.

New SCORM ebook coming soon!

I'm writing an ebook explaining how to build an HTML-based SCORM course. Subscribe to be notified when it's ready, as well as receive early bird pricing and some free goodies!

No spam, no sharing your email address, unsubscribe at any time. Powered by ConvertKit
Advertisements

21 Replies to “CaptivateController Updated to Support Adobe Captivate 5”

  1. 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!

    1. @Rissella There is basic documentation at http://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:

      //Assuming your SWF is already embedded and has the ID "myID"
      var myMovie = CaptivateController("myID");
      var author = myMovie.query("cpInfoAuthor");
      

      It’s a very simple system, there really isn’t much to it.

  2. 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!

  3. @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

    //Assuming your SWF is already embedded and has the ID "myID"
    var myMovie = CaptivateController("myID");
    myMovie.cpSetValue("customvariablename", valuetoassign);
    

    no guarantees…

  4. 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).

  5. 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. 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.

  6. 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

  7. 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!

  8. 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

  9. @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?

  10. 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

  11. 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.

  12. 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

  13. @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.