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)

VariableReturnsDefault valuesDescription (if available)
cpAutoPlaybooleantrueToggles auto-play on (true) or off (false). Movie auto-plays by default.
cpCmndCCnumber0Toggles closed captioning on (1) or off (0). Replaces rdcmndCC.
cpCmndFastForwardnumber0Setting to 1 increases speed of playback.
cpCmndGotoFrameAndResumenumber-1Jumps to the specified frame number (NOT slide number) and resumes playback.

 

Replaces rdcmndGotoFrameAndResume.

cpCmndMutebooleanfalseToggles audio. Setting to true mutes the audio, setting to false unmutes the audio.

 

Replaces rdcmndMute.

cpCmndNextnumber0Setting value to 1 will jump to the next slide in project.

 

Replaces rdcmndNext

cpCmndShowPlaybarnumber1Toggles playbar visibility. Setting to 0 will hide the playbar, setting to 1 will restore it.

 

Replaces rdcmndHidePlaybar.

cpCmndVolumenumber100Sets 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.
rdcmndGotoSlidenumber-1Jumps to the specified slide number. Takes slide number (0-based index) as argument.
rdcmndCCnumber0Deprecated. Replaced by cpCmndCC (see above)
rdcmndMutebooleanfalseDeprecated. Replaced by cpCmndMute (see above)
rdcmndNextbooleanfalseDeprecated. Replaced by cpCmndNext (see above)
rdcmndPlaybarMovedbooleanfalse 

Informational variables (retrieve or set data)

VariableReturnsSample valuesDescription (if available)
CaptivateVersionstring4.0.0Returns version of Captivate that published the SWF.
cpCmndPlaybarMovedbooleanfalseReplaces rdcmndPlaybarMoved.
cpHasSkinSWFbooleanfalseReturns boolean indicating whether the movie is using a SWF-based skin.
cpInfoAuthorstringPhilip HutchisonReturns the project author’s name, if available.
cpInfoCompanystringpipwerksReturns the project company’s name, if available.
cpInfoCopyrightnumber2009Returns the project’s copyright notice, if available.
cpInfoCurrentDatestring11Returns the day of the month using the client’s system clock.

 

String(now.getDate())

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

 

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

cpInfoCurrentDaystring2Returns the numerical day of the week using the client’s system clock (Sunday is day 1).

 

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

cpInfoCurrentHourstring19Returns the current hour using the client’s system clock.

 

Returns String(now.getHours());

cpInfoCurrentMinutesstring59Returns the current minute using the client’s system clock.

 

Returns String(now.getMinutes());

cpInfoCurrentMonthstring5Returns the numerical month using the client’s system clock (January is 1).

 

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

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

 

Returns (rdinfoCurrentSlide + 1);

cpInfoCurrentSlideLabelstringSlideLabel:0Returns the label of the slide, if available.
cpInfoCurrentSlideTypestringNormalSlideReturns a string indicating the current slide’s type. There are currently three possible results: “NormalSlide”, “QuestionSlide”, and “RandomQuestionSlide”
cpInfoCurrentTimestring19:59:27Returns 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());

cpInfoCurrentYearstring2009Returns the current year in YYYY format using the client’s system clock.

 

Returns String(now.getFullYear());

cpInfoDescriptionstringThis demonstration will teach you the…Returns the project description, if available.
cpInfoElapsedTimeMSnumber1537Returns the amount of time (in milliseconds) that has elapsed since the movie began playing.

 

Returns (cpInfoEpochMS – movie.m_StartTime)

cpInfoEmailstringhello@world.orgReturns the project author’s email address, if available.
cpInfoEpochMSnumber1242097167686Per 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();

cpInfoHasPlaybarnumber1Returns a boolean (in number format) indicating whether the Captivate file was published with playback controls (a playbar).
cpInfoIsStandalonenumber0 
cpInfoLastVisitedSlidenumber0Returns the index number of the last visited slide. Uses zero-based numbering (0 = slide 1, 1 = slide 2).
cpInfoPercentagenumber0 
cpInfoPrevSlidenumber-1Returns the index number of the slide that comes before the current slide. Uses zero-based numbering (0 = slide 1, 1 = slide 2).
cpInfoProjectNamestringCaptivateControllerReturns the project name, if available.
cpInfoWebsitestringwww.pipwerks.comReturns the website listed in the project properties, if available.
cpMovieHeightnumber432Returns the movie’s original height, regardless of how it has been sized via HTML or CSS.
CPMovieTypenumber1 
cpMovieWidthnumber551Returns the movie’s original width, regardless of how it has been sized via HTML or CSS.
cpQuizInfoAnswerChoicestring 
cpQuizInfoAttemptsnumber1 
cpQuizInfoLastSlidePointScorednumber0 
cpQuizInfoMaxAttemptsOnCurrentQuestionnumber0 
cpQuizInfoNoQuestionsPerQuiznumber0 
cpQuizInfoPointsPerQuestionSlidenumber0 
cpQuizInfoPointsscorednumber0 
cpQuizInfoQuestionSlideTimingnumber0 
cpQuizInfoQuestionSlideTypestringchoice 
cpQuizInfoQuizPassPercentnumber0 
cpQuizInfoQuizPassPointsnumber0 
cpQuizInfoTotalCorrectAnswersnumber0 
cpQuizInfoTotalProjectPointsnumber0 
cpQuizInfoTotalQuestionsPerProjectnumber0 
cpQuizInfoTotalQuizPointsnumber0 
cpQuizInfoTotalUnansweredQuestionsnumber0 
inAutoPlayStatebooleanfalse 
isCPMoviebooleantrueReturns a boolean indicating whether this movie was published using Adobe Captivate.
isPreviewnumber0Returns a boolean (in number format) indicating whether this is a preview. Primarily used internally by Captivate when previewing a project. Replaces rdIsPreview.
isPreviewSkinnumber0Returns a boolean (in number format) indicating whether this is a skin for a preview. Primarily used internally by Captivate when previewing a project.
loadedFromAggregatorbooleanfalseReturns a boolean indicating whether the SWF has been loaded by Captivate’s aggregator.
LocalConnectionInUsebooleanfalseReturns a boolean indicating whether the movie is using LocalConnection. This is primarily used internally by Captivate.
NoOfTOCEntriesnumber-1Returns a count of entries in the Table of Contents, if available.
pbcBtnTipsobject [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.
playbarHeightnumber31Returns the height of the playbar in pixels, if applicable.
playbarPositionnumber3Returns the position of the playbar in pixels, if applicable.
rdIsPreviewbooleanfalseDeprecated. Replaced by isPreview.
rdinfoCurrentFramenumber41Returns the number of the current frame (NOT slide), counting from the beginning of the movie’s timeline.
rdinfoCurrentSlidenumber0Deprecated. Replaced by cpInfoCurrentSlide.
rdinfoCurrentSlideInProjectnumber0 
rdinfoFPSnumber30Returns the SWF’s frames per second rate.
rdinfoFrameCountnumber90Returns the number of frames in the entire SWF.
rdinfoSlideCountnumber1 
rdinfoSlidesInProjectnumber1Returns the number of slides in the project.
rdinfocurrFramenumber2 
swfCmtAutoPlaybooleanfalseReturns boolean indicating whether SWF commenting auto-play is enabled. This is only used by the SWF Commenting AIR application.
swfCommentingbooleanfalseReturns boolean indicating whether SWF commenting auto-play is enabled. This is only used by the SWF Commenting AIR application.
tocInitDonebooleantrueReturns boolean indicating whether the Table of Contents has finished initializing.

Captivate 3 Variables

Functional variables (perform an action)

VariableReturnsDefault valuesDescription (if available)
rdcmndCCstring0Toggles closed captioning on (1) or off (0).
rdcmndGotoSlidestring-1Jumps to the specified slide number. Takes slide number (0-based index) as argument.
rdcmndMutestring0Toggles audio. Setting to 1 mutes the audio, setting to 0 unmutes the audio.
rdcmndNextstring0Setting value to 1 will jump to the next slide in project.
rdcmndHidePlaybarstring0Toggles playbar’s visibility

Informational variables (retrieve or set data)

VariableReturnsSample valuesDescription (if available)
CaptivateVersionstring2.0.0Returns version of Captivate that published the SWF.
rdIsPreviewstring0Returns a boolean (in number format) indicating whether this is a preview. Primarily used internally by Captivate when previewing a project.
rdinfoCurrentFramestring1Returns the number of the current frame (NOT slide), counting from the beginning of the movie’s timeline.
rdinfoCurrentSlidestring1Returns the current slide number using zero-based indexing (slide 1 of the project will return 0).
rdinfoCurrentSlideInProjectstring1 
rdinfoFPSstring24Returns the SWF’s frames per second rate.
rdinfoFrameCountstring2889Returns the number of frames in the entire SWF.
rdinfoHasPlaybarstring1Returns a boolean (in number format) indicating whether the Captivate file was published with playback controls (a playbar).
rdinfoSlideCountstring13 
rdinfoSlidesInProjectstring13Returns the number of slides in the project.
rdinfocurrFramestring0 
rdcmndPlaybarMovedstring0 

Similar Posts

25 Comments

  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.