Adobe Captivate 5 system variables

8

Adobe Captivate 5 gives you access to the same system variables as with Adobe Captivate 4 as well as three new ones. These variables allows the Captivate developer to add extra functionality to their projects. The system variables in Adobe Captivate 5 have been assigned to some different groups than in Captivate 4 so here is a new updated list of the available variables and their function.

The layout of this site isn’t handling tables very well so the complete list of Adobe Captivate 5 system variables and examples of how to use in Adobe Flash can be downloaded as a PDF at the bottom of this post.

The System Variables in Adobe Captivate 5 are divided into different groups:

MovieControl lists variables for events that control the movie like pause, resume, previous, next slide, and so on.

MovieInformation lists variables related to the movie such as variables for the current slide, current frame, and so on.

MovieMetaData lists variables that provide information about the project such as project name, author, and company.

SystemInformation lists variables that can be picked up from your computer such as current date and current time.

Quizzing lists variables related to quizzing, such as the variables that capture the number of attempts and the percentage of questions answered correctly.

MovieControl Variables:

These variables can be manipulated through Advanced Actions, Flash animations and Widgets.

Variable nameDefault valueDescription
cpCmndCC0Enable/disable closed captioning (CC). Set value to 1 to display closed captions.
cpCmndGotoSlide-1Assign the slide number that the movie should move to before pausing. Index begins with zero
cpCmndMute0Mute the audio. set 1 to mute and 0 to unmute
cpCmndPlaybarMoved0Set to 1 if the playbar has moved
cpCmndShowPlaybar1Provides info about the visibility of the playbar. Returns 1 if the playbar is visible, and O if not visible
cpCmndVolume50Control the movie’s volume. Value can range from 0 to 100
rdcmndExit0Exit the movie. set 1 to exit
rdcmndGotoFrameAssign the frame number the frame should jump to before pausing. Index begins with zero.
rdcmndGotoFrameAndResumeAssign to this variable the frame number to jump to and play. Index begins with zero
rdcmndInfo0Display information about Adobe Captivate
rdcmndNextSlide0Go to the next slide. Set 1 to jump to next slide
rdcmndPause0Pause the movie. Set 1 to pause
rdcmndPrevious0Go to the previous slide. Set 1 to jump to previous slide
rdcmndResume0Resume playing the movie. Set 1 to resume.
cpLockTOC0Enables/disables user interaction on TOC

MovieInformation variables:

These variables can be accessed from Advanced Actions, Flash animations, Widgets and can be inserted in Text Captions to display their value.

Variable nameDefault valueDescription
cpInfoCurrentSlideCurrent slide number. Index begins with 1
cpInfoCurrentSlideLabelName of the Current Slide
cpInfoCurrentSlideTypeType of slide playing currently. (Slide type can be Normal Slide, Question Slide, or Random Question Slide)
cpInfoHasPlaybarInformation about presence of playbar. Returns 1 if visible and 0 if not
cpInfoIsStandaloneUsed to detect if the movie is playing back as a stand-alone Windows (*.exe) or Mac (*.app) executable rather than as a SWF embedded in a web page. Default is 0. Returns a 1 when playing back as an *.exe. (Thanks James!)
cpInfoLastVisitedSlide0Last visited slide. Index begins with zero
rdinfoCurrentFrameCurrent frame number. Index begins with zero
rdinfoCurrentSlideCurrent slide number. Index begins with zero
rdinfoFPS30Frame rate of the movie in fps
rdinfoFrameCountTotal number of frames in the project
rdinfoSlideCountTotal number of slides in the project
cpInfoElapsedTimeMS0Time elapsed, in milliseconds, since the movie started playing
cpInfoPrevSlideSlide Previously playing before current slide
CaptivateVersion5.0.0Shows the Captivate version

MovieMetaData variables:

These variables can be accessed from Advanced Actions, Flash animations, Widgets and can be inserted in Text Captions to display their value.

Variable nameDefault valueDescription
cpInfoAuthorauthorName of the author
cpInfoCompanycompanyName of the company
cpInfoCopyrightcopyrightCopyright Info
cpInfoCourseID (new)-1No idea where this comes from
cpInfoCourseName (new)Course NameNo idea where this comes from
cpInfoDescriptionproject descriptionDescription of the project
cpInfoEmailauthor@company.come-mail address
cpInfoProjectNameName of the Adobe Captivate project
cpInfoWebsitewww.company.comURL of the company website in the format www.companyaddress.com

SystemInformation variables:

These variables can be accessed from Advanced Actions, Flash animations, Widgets and can be inserted in Text Captions to display their value.

Variable nameDefault valueDescription
cpInfoCurrentDateddCurrent Date: The date as set on the user’s computer
cpInfoCurrentDateStringmm/dd/yyyyCurrent Date as set on the user’s computer in the mm/dd/yyyy format
cpInfoCurrentDayDay of the week as set on the user’s computer. Values range from 1-7 starting with Sunday. Sunday=1, Monday=2, and so on)
cpInfoCurrentHourhhCurrent hour: The hour set as on the user’s computer
cpInfoCurrentMinutesmmCurrent minutes: The hour set as on the user’s computer
cpInfoCurrentMonthmmCurrent month: The month as set on the user’s computer
cpInfoCurrentTimehh:mm:ssCurrent time as set on the user’s computer in the hh:mm:ss format
cpInfoCurrentYearyyyyCurrent year as set on the user’s computer
cpInfoEpochMSTime elapsed, in milliseconds, since Januar 01, 1970

Quizzing variables:

These variables can be accessed from Advanced Actions, Flash animations, Widgets and can be inserted in Text Captions to display their value.

Variable nameDefault valueDescription
cpQuizInfoAnswerChoiceChosen Answer
cpQuizInfoAttemptsNumber of times the quiz has been attempted
cpQuizInfoLastSlidePointScoredScore for last quiz slide
cpQuizInfoMaxAttemptsOnCurrentQuestionMaximum attempts on the current question
cpQuizInfoPassFail (new)1Will return 1 for a passed quiz and 0 for a failed quiz.
cpQuizInfoPointsPerQuestionSlidePoints for the question slide
cpQuizInfoPointsscoredPoints scored in the project
cpQuizInfoQuestionSlideTimingTime limit in seconds for current question
cpQuizInfoQuestionSlideTypeQuestion slide type(Multiple-Choice/True-False/..etc)
cpQuizInfoQuizPassPercentPassing percentage for the quiz
cpQuizInfoQuizPassPointsPassing points for the quiz
cpQuizInfoTotalCorrectAnswersNumber of correct answers
cpQuizInfoTotalProjectPointsTotal project points
cpQuizInfoTotalQuestionsPerProjectNumber of questions per project
cpQuizInfoTotalQuizPointsFinal quiz score
cpQuizInfoTotalUnansweredQuestionsTotal number of unanswered questions
cpInfoPercentageScoring in percentage

Accessing variables in Adobe Captivate 5:

The majority of the variables can be used in Text Captions to display their value. They can also be used in Advanced Actions to perform an action based on the value of the variable. From Advanced Actions it is also possible to manipulate the Movie Control variables.

Accessing variables from Flash in Adobe Captivate 5:

In Adobe Captivate 5 the runtime structure have been changed  a bit so you now have to access the “root” through a proxy. Furthermore Adobe Captivate 5 only uses ActionScript 3.0 (AS3) so the way you access variables are a bit different from Captivate 4.

In short this is how you can access variables from a Flash Animation inserted into Adobe Captivate 5:

1
2
3
var myRoot:MovieClip = MovieClip(root);
var mainmov:MovieClip = MovieClip(myRoot.parent.root);
mainmov.theVariableName = theActionYouWantToPerform;

For example this would pause your Adobe Captivate SWF:

1
2
3
var myRoot:MovieClip = MovieClip(root);
var mainmov:MovieClip = MovieClip(myRoot.parent.root);
mainmov.rdcmndPause = 1;

I haven’t tested all the variables with Adobe Captivate 5 yet. In Adobe Captivate 4 some of the variables were not accessible on the main root. They were contained within a movieclip called “movie”. I’m not sure if this is the case here but I will update the post once I have confirmed it.

You can download the list of variables as a handy PDF file here:

Adobe Captivate 5 System Variables

Share.

8 Comments

  1. Hello CPGuru,

    Thanks for posting the Captivate variables! I tried to add a CLICK box to be included in the quiz report but unfortunately it score is not being recorded in the captivate quiz variables. I think that quiz variables only works for objects created using the quiz slides but does not work for objects that you add to a slide. Like a click box or buttons. Is there any captivate variables that records the score of a CLICK box or Buttons?

    Thanks

  2. Hi Abao,

    The system variables are for the most part only available to the Captivate system for reading and writing. However, you can create your own user defined variables in Captivate 5 and use that for your purpose.

    /Michael

  3. Hi Michael. I did a quick test and determined that cpInfoIsStandalone is used to detect if the movie is playing back as a stand-alone Windows (*.exe) or Mac (*.app) executable rather than as a SWF embedded in a web page. Default is 0. Returns a 1 when playing back as an *.exe. I haven’t tested it on my Mac yet. But it worked on Cp5 on WinXP.

  4. Hi,I am looking to edit the certificate widget so it takes the system time information and inputs the date for the date the course was taken. But also to include the expiry date of two years from that date. Can captivate widgets handle that? This would be in the course duration section.

    thank you

    Regards,
    Colin

  5. @Colin,

    Captivate widgets can pretty much handle everything and what you describe wouldn’t be a big problem to implement in the Certificate widget.

    /Michael

  6. @Colin or @Michael –

    I am looking to edit the certificate widget for the same reason! But I do not know how to edit or customize the widget file and how to implement this. Do I need to edit the certificate.fla file? If so, how? What tool is required to edit?

    I need to get rid of the Course Duration option all together. Please help!

    Thanks,
    Jay

  7. @Jay – yes you need to edit the certificate.fla file and that is done with Adobe Flash. You can download a 30-day free trial of Flash from Adobes website, but if you haven’t used Flash before then you are going to have a hard time modifying the widget since it’s not as easy as one would think.

    /Michael