Captivate 4 variables gone wild

Update (August 2010): I have published a new list of Captivate variables that are specific to Adobe Captivate 5. Check it out.

The folks at Adobe recently published a list of Captivate 4 variables. While it’s a solid list, it’s not really a complete list.

Here is a list of variables I dug up while combing through Captivate 4’s source AS files. I tried to add descriptions where I could, and will continue to revise this list as I get more information. Kudos to Michael at www.cpguru.com for posting his helpful list, too.

Notes:

  • I’ve tested each of these variables in JavaScript to ensure they exist and are accessible, and have weeded out variables that return errors.
  • I’ve also included Captivate 3 variables at the bottom of this page.

Update: Kurt Melander was kind enough to clean up this list and convert it to PDF format for those who’d like to print it out. Download PDF version.

Captivate 4 Variables

Functional variables (perform an action)

Variable Returns Default values Description (if available)
cpAutoPlay boolean true Toggles auto-play on (true) or off (false). Movie auto-plays by default.
cpCmndCC number 0 Toggles closed captioning on (1) or off (0). Replaces rdcmndCC.
cpCmndFastForward number 0 Setting to 1 increases speed of playback.
cpCmndGotoFrameAndResume number -1 Jumps to the specified frame number (NOT slide number) and resumes playback.

Replaces rdcmndGotoFrameAndResume.

cpCmndMute boolean false Toggles audio. Setting to true mutes the audio, setting to false unmutes the audio.

Replaces rdcmndMute.

cpCmndNext number 0 Setting value to 1 will jump to the next slide in project.

Replaces rdcmndNext

cpCmndShowPlaybar number 1 Toggles playbar visibility. Setting to 0 will hide the playbar, setting to 1 will restore it.

Replaces rdcmndHidePlaybar.

cpCmndVolume number 100 Sets audio volume (if applicable). Range is 0-100, where 0 is off and 100 is full volume. Querying cpCmndVolume will return the current volume level.
rdcmndGotoSlide number -1 Jumps to the specified slide number. Takes slide number (0-based index) as argument.
rdcmndPlaybarMoved boolean false

Informational variables (retrieve or set data)

Variable Returns Sample values Description (if available)
CaptivateVersion string 4.0.0 Returns version of Captivate that published the SWF.
cpCmndPlaybarMoved boolean false Replaces rdcmndPlaybarMoved.
cpHasSkinSWF boolean false Returns boolean indicating whether the movie is using a SWF-based skin.
cpInfoAuthor string Philip Hutchison Returns the project author’s name, if available.
cpInfoCompany string pipwerks Returns the project company’s name, if available.
cpInfoCopyright number 2009 Returns the project’s copyright notice, if available.
cpInfoCurrentDate string 11 Returns the day of the month using the client’s system clock.

String(now.getDate())

cpInfoCurrentDateString string 5/11/2009 Returns the calendar date in mm/dd/yyyy format using the client’s system clock.

Returns (now.getMonth() + 1 + “/” + now.getDate() + “/” + now.getFullYear());

cpInfoCurrentDay string 2 Returns the numerical day of the week using the client’s system clock (Sunday is day 1).

Returns String(now.getDay()+ 1);

cpInfoCurrentHour string 19 Returns the current hour using the client’s system clock.

Returns String(now.getHours());

cpInfoCurrentMinutes string 59 Returns the current minute using the client’s system clock.

Returns String(now.getMinutes());

cpInfoCurrentMonth string 5 Returns the numerical month using the client’s system clock (January is 1).

Returns String(now.getMonth() + 1);

cpInfoCurrentSlide number 1 Returns the current slide number. Unlike rdinfoCurrentSlide, cpInfoCurrentSlide uses 1-based indexing, so slide 1 of the project will return 1.

Returns (rdinfoCurrentSlide + 1);

cpInfoCurrentSlideLabel string SlideLabel:0 Returns the label of the slide, if available.
cpInfoCurrentSlideType string NormalSlide Returns a string indicating the current slide’s type. There are currently three possible results: “NormalSlide”, “QuestionSlide”, and “RandomQuestionSlide”
cpInfoCurrentTime string 19:59:27 Returns the current time in HH:MM:SS format using the client’s system clock. Note: uses 24-hour clock.

Returns (now.getHours() + “:” + now.getMinutes() + “:” + now.getSeconds());

cpInfoCurrentYear string 2009 Returns the current year in YYYY format using the client’s system clock.

Returns String(now.getFullYear());

cpInfoDescription string This demonstration will teach you the… Returns the project description, if available.
cpInfoElapsedTimeMS number 1537 Returns the amount of time (in milliseconds) that has elapsed since the movie began playing.

Returns (cpInfoEpochMS – movie.m_StartTime)

cpInfoEmail string hello@world.org Returns the project author’s email address, if available.
cpInfoEpochMS number 1242097167686 Per Adobe [link no longer available]: “returns the number of milliseconds since midnight January 1, 1970, universal time, for the specified Date object. Use this method to represent a specific instant in time when comparing two or more Date objects.”

Returns now.getTime();

cpInfoHasPlaybar number 1 Returns a boolean (in number format) indicating whether the Captivate file was published with playback controls (a playbar).
cpInfoIsStandalone number 0
cpInfoLastVisitedSlide number 0 Returns the index number of the last visited slide. Uses zero-based numbering (0 = slide 1, 1 = slide 2).
cpInfoPercentage number 0
cpInfoPrevSlide number -1 Returns the index number of the slide that comes before the current slide. Uses zero-based numbering (0 = slide 1, 1 = slide 2).
cpInfoProjectName string CaptivateController Returns the project name, if available.
cpInfoWebsite string www.pipwerks.com Returns the website listed in the project properties, if available.
cpMovieHeight number 432 Returns the movie’s original height, regardless of how it has been sized via HTML or CSS.
CPMovieType number 1
cpMovieWidth number 551 Returns the movie’s original width, regardless of how it has been sized via HTML or CSS.
cpQuizInfoAnswerChoice string
cpQuizInfoAttempts number 1
cpQuizInfoLastSlidePointScored number 0
cpQuizInfoMaxAttemptsOnCurrentQuestion number 0
cpQuizInfoNoQuestionsPerQuiz number 0
cpQuizInfoPointsPerQuestionSlide number 0
cpQuizInfoPointsscored number 0
cpQuizInfoQuestionSlideTiming number 0
cpQuizInfoQuestionSlideType string choice
cpQuizInfoQuizPassPercent number 0
cpQuizInfoQuizPassPoints number 0
cpQuizInfoTotalCorrectAnswers number 0
cpQuizInfoTotalProjectPoints number 0
cpQuizInfoTotalQuestionsPerProject number 0
cpQuizInfoTotalQuizPoints number 0
cpQuizInfoTotalUnansweredQuestions number 0
inAutoPlayState boolean false
isCPMovie boolean true Returns a boolean indicating whether this movie was published using Adobe Captivate.
isPreview number 0 Returns a boolean (in number format) indicating whether this is a preview. Primarily used internally by Captivate when previewing a project. Replaces rdIsPreview.
isPreviewSkin number 0 Returns a boolean (in number format) indicating whether this is a skin for a preview. Primarily used internally by Captivate when previewing a project.
loadedFromAggregator boolean false Returns a boolean indicating whether the SWF has been loaded by Captivate’s aggregator.
LocalConnectionInUse boolean false Returns a boolean indicating whether the movie is using LocalConnection. This is primarily used internally by Captivate.
NoOfTOCEntries number -1 Returns a count of entries in the Table of Contents, if available.
pbcBtnTips object [array] Rewind, Back, Play,
Pause, Forward,
Closed Captioning,
Audio On, Audio Off,
Exit, Information,
Dummy for slider,
Table Of Contents,
2x Fast Forward Speed,
4x Fast Forward Speed,
Normal Speed, Print
Returns the label values used in the playback controller’s tool tips.
playbarHeight number 31 Returns the height of the playbar in pixels, if applicable.
playbarPosition number 3 Returns the position of the playbar in pixels, if applicable.
rdIsPreview boolean false Deprecated. Replaced by isPreview.
rdinfoCurrentFrame number 41 Returns the number of the current frame (NOT slide), counting from the beginning of the movie’s timeline.
rdinfoCurrentSlide number 0 Deprecated. Replaced by cpInfoCurrentSlide.
rdinfoCurrentSlideInProject number 0
rdinfoFPS number 30 Returns the SWF’s frames per second rate.
rdinfoFrameCount number 90 Returns the number of frames in the entire SWF.
rdinfoSlideCount number 1
rdinfoSlidesInProject number 1 Returns the number of slides in the project.
rdinfocurrFrame number 2
swfCmtAutoPlay boolean false Returns boolean indicating whether SWF commenting auto-play is enabled. This is only used by the SWF Commenting AIR application.
swfCommenting boolean false Returns boolean indicating whether SWF commenting auto-play is enabled. This is only used by the SWF Commenting AIR application.
tocInitDone boolean true Returns boolean indicating whether the Table of Contents has finished initializing.

Captivate 3 Variables

Functional variables (perform an action)

Variable Returns Default values Description (if available)
rdcmndCC string 0 Toggles closed captioning on (1) or off (0).
rdcmndGotoSlide string -1 Jumps to the specified slide number. Takes slide number (0-based index) as argument.
rdcmndMute string 0 Toggles audio. Setting to 1 mutes the audio, setting to 0 unmutes the audio.
rdcmndNext string 0 Setting value to 1 will jump to the next slide in project.
rdcmndHidePlaybar string 0 Toggles playbar’s visibility

Informational variables (retrieve or set data)

Variable Returns Sample values Description (if available)
CaptivateVersion string 2.0.0 Returns version of Captivate that published the SWF.
rdIsPreview string 0 Returns a boolean (in number format) indicating whether this is a preview. Primarily used internally by Captivate when previewing a project.
rdinfoCurrentFrame string 1 Returns the number of the current frame (NOT slide), counting from the beginning of the movie’s timeline.
rdinfoCurrentSlide string 1 Returns the current slide number using zero-based indexing (slide 1 of the project will return 0).
rdinfoCurrentSlideInProject string 1
rdinfoFPS string 24 Returns the SWF’s frames per second rate.
rdinfoFrameCount string 2889 Returns the number of frames in the entire SWF.
rdinfoHasPlaybar string 1 Returns a boolean (in number format) indicating whether the Captivate file was published with playback controls (a playbar).
rdinfoSlideCount string 13
rdinfoSlidesInProject string 13 Returns the number of slides in the project.
rdinfocurrFrame string 0
rdcmndPlaybarMoved string 0

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

29 Replies to “Captivate 4 variables gone wild”

  1. Do you know of a command/variable to open/close the TOC (table of contents)? Captivate 4 now has this button within the playbar, but I’m not discovering any command available to trigger it. Thx, Todd.

  2. I’ve been working on the variables list (I’ll be adding more shortly), but have yet to find a cmnd for toggling the TOC. Sorry. Seems like a no-brainer, huh?

  3. Philip, I did some experimenting, and came up with a solution to toggle the TOC using your Captivate JS utility. I added these to your .js file. Couple of issues to clean up: it’s specific to the position of the TOC (left, right). Also, there is no open/close transition effect like using the TOC button in the default Captivate playbar. If I had more time I’d look into triggering the function:TocOverlayBtnInitialize() in the Captivate AS with arguments.

    break;case”showtocpanel”:d=”TOCContainer_mc._visible”;e=1;/*display main toc panel */
    break;case”showtocclosebtn”:d=”ShowHideTocLeft_mc._visible”;e=1; /*display close button for toc panel */
    break;case”showtocopenbtn”:d=”ShowHideTocRight_mc._visible”;e=1; /*hide open button for toc panel */
    break;case”hidetocpanel”:d=”TOCContainer_mc._visible”;e=0;/*display main toc panel */
    break;case”hidetocclosebtn”:d=”ShowHideTocLeft_mc._visible”;e=0; /*display close button for toc panel */
    break;case”hidetocopenbtn”:d=”ShowHideTocRight_mc._visible”;e=0; /*hide open button for toc panel */

  4. cool, thanks for the tip.

    i’m in the middle of a major overhaul of the JS controller and will look into adding show/hide TOC functionality.

    the new controller is much more robust and can handle CP2, CP3 and CP4 (as2 and as3). i just haven’t released it because of a bazillion bugs i’m finding with Captivate’s variable handling. i’ll write it up in a blog when i’m done.

  5. Philip, I just noticed that using these commands I’ve listed to open the table of contents has 1 problem: the Captivate buttons to open/close the table of contents do not recognize the status of the toc as being open/closed when they are opened/closed using the JS controller. Therefore, we’ll also need to somehow pass the status of the toc as open/closed using a js command too.

    I cannot get the gotoandplay slide# command to work from the js controller version 1.0 in a Cap4 movie published as AS2 or AS3. Do you know of any issue that could prevent the communication? Your example seems to work perfectly for that command.

  6. Finding information on something as simple as displaying the TOC from with in captivate is hard enough. Currently looking at the possibility of utilizing Javascript from within captivate to perform the TOCContainer_mc._visible that is hinted at above but with no luck. Any tips or sample that could get me on the right path to toggle it on and off with from with in captivate? Perhaps through SWF inserted into the captivate that runs action script on the parent that exposes the object through parent ?? I dont know the correlation between the javascript variables and the actual swf objects.

    Thanks for the closest thing yet..

    McQ

  7. Hey

    Is it not possible to acces the TOCEntries label name.
    I can get the TOCEntries and acces them like TOCEntries[1] – but i can’t get the name or label.

    Does anyone know a way of doing this ??

    I am tring to use AS2 and as KCWebPlaza says above it’s possible to turn on/off the TOCContainer_mc.

    But i can’t find that moveclip – i assume it would possible to acces som varibles inside that movieclip.

    It would be great if someone could help

  8. Hello Again

    If you decompile a movie you get all the classes and all variables.
    The TOC Objects consist of the following.

    TOCEntry1 = new Object();
    TOCEntry1.caption = “testTOC”;
    TOCEntry1.duration = 3;
    TOCEntry1.targetSlide = 0;
    TOCEntry1.level = 0;
    TOCEntry1.expanded = true;
    TOCEntry1.isFolder = false;

    so to acces the label name you can do TOCEntries[0].caption

    Hope somebody can use this info
    /Dennis

  9. The table you created is very useful. However, there are some nebulous areas. If you would add lines to divide the cells, it would be much clearer for me to read.

  10. in Captivate 4 the command rdcmndGotoSlide did not work for me. it worked as cpCmndGotoSlide.
    Great work Philip, your information has helped me so much, thanks.

  11. If you want to control the TOC (toggle it back and forth) from another location other then the playbar controls, I was able to do it from an externally loaded swf file in the captivate environment with this call:

    _root.cpPbcBar_mc.pbcBar_mc.onPBCBtnClick(“TOC”);

    The TOC button in the stock controls references this function call:

    onPBCBtnClick(“TOC”);

    I just did some pathing analysis with the good old targetPath() call to find the scope of the function.

  12. Does anyone know how to enable and disable the forward button within the same slide ie forced interaction where I would like my student to have to watch the video before being able to progress forward.

    Please help!!

    Thanks,
    Alex

    1. You can use system variables in Captivate 4 to show/hide the entire playbar, but I don’t think you can disable the play button by itself.

  13. Does anyone know how to change to position or size of the closed caption window? I’m not using a skin, but have made a button in Flash that uses the cpCmndCC variable to show the window. The problem I’m having is that the CC window pops up over my custom navigation bar. It seems like there should be a property for position, width, height, etc for the CC popup window.

    Have a great day!

    James

  14. Do you know how i can show a course duration time? I mean:
    I have two timers,, one that shows what time are compared to the total and one that shows the total time period. I don’t have the TOC (i don’t want to use it). Do I have to use the system variables?

    Cna you help me?

  15. I’m using random question slides from a quesionpool and need to capture anddisplay the question and correct answer to display in a summary slide. There is a great example on how to create the summary with “You answered Question 1 with …” but I don’t see how to displaythe question or the correct answer. Does anyone know how to capture the question and correct answer (choice) in a variable?

    Thanks!!

  16. What are the variables for the last slide of a captivate document?

    For example the PERCENT. It’s not cpInfoPercentage because I tried this variable several times it only records the score for the quiz slide but not for the objects that you add to a slide like a CLICK box.

  17. Looking for suggestions: I have created a content reviewer tool (similar to the one with Captivate 4) and am trying to connect it up with Captivate. To do this I need to create a Captivate wrapper that will poll the Captivate project and dump the current slide (and potential other info) into a javascript variable. I have no need to to control the project, but do need to be able to determine the current slide/location in the captivate project and know the current location in the project when a user advances to the next slide (so I can display notes associated with that page). Ideas???

  18. When I add a textbox using variables, I preview the slide and it is faded out. Have you experienced this before? If so, do you know what needs to be done to fix it?

Comments are closed.