There is a newer list of variables available, which includes new Captivate 4 variables.
A recent post [link no longer available] in the elearning development forum [link no longer available] reminded me that I forgot to post some unpublished Captivate variables I dug up a while back.
These were gathered from the class file captivate.monalisa.rdMovie.as
. Anything marked with a (?) means I don’t know what this variable does. 🙂
For this table, “containerMC” refers to whatever Flash movieclip you’ve loaded the Captivate SWF into.
Variable | What it does (or best guess) |
---|---|
Captivate Functions (commands) | |
containerMC.rdcmndResume = 1; | resume() |
containerMC.rdcmndPause = 1; | pause() |
containerMC.rdcmndPrevious = 1; | gotoPreviousSlide() |
containerMC.rdcmndNextSlide = 1; | gotoNextSlide() |
containerMC.rdcmndRewindAndStop = 1; | rewindAndPause() |
containerMC.rdcmndRewindAndPlay = 1; | rewindAndPlay() |
containerMC.rdcmndExit = 1; | exit() |
containerMC.rdcmndInfo = 1; | showInfo() |
containerMC.rdcmndCC = 1; | showCC() |
containerMC.rdcmndMute = 1; | mute() |
Captivate Functions (queries) | |
containerMC.rdinfoFrameCount; | getFrameCount() returns number |
containerMC.rdinfoSlidesInProject; | getSlidesInProject() returns number |
containerMC.rdinfoCurrentFrame; | getCurrentFrame() returns number |
containerMC.rdinfoCurrentSlide; | getCurrentSlide() returns number |
containerMC.rdinfoSlideCount; | getMovieSlideCount() returns number |
containerMC.rdinfoHasPlaybar; | hasPlaybar() returns boolean |
containerMC.rdinfoFPS; | getFrameRate() returns number |
containerMC.CaptivateVersion; | getVersion() returns number (?) |
Assorted properties (variables) | |
containerMC.rdinfocurrFrame; | Stores current frame number |
containerMC.rdinfostate; | “State” of movie (?) |
containerMC.rdinfoCurrentSlideInProject; | Stores index # of current slide |
containerMC.rdinfoCurrentSlide; | Stores index # of current slide |
containerMC.rdcmndPlaybarMoved | Boolean (1 or 0) indicating whether playbar has moved |
containerMC.isWaiting() | Returns boolean indicating playback state (?) |
containerMC.rdIsPreview | Returns boolean indicating if SWF is a preview (?) |
containerMC.info_mc.playInfo(); | (?) |
containerMC.m_Sub_mc_array | Array containing info for nested MCs (?) |
Assorted properties (commands) | |
containerMC.rdcmndGotoFrame = num; | Jumps to specified frame # |
containerMC.rdcmndGotoSlide = num; | Jumps to specified slide # |
containerMC.rdcmndGotoFrameAndResume = num; | Jumps to specified frame and resumes play (?) |
containerMC.rdcmndNext = 0; | Same as next slide, or is next frame (?) |
containerMC.endMovieFunction(); | Used by Captivate to select appropriate end of movie action |
Question pool props | |
containerMC.m_quizPoolColl[slideInfo.selectedPoolName]; | var quizPoolData = … |
containerMC.cpQuestionPoolsInitialized; | Boolean indicating whether cpQuestionPools is ready |
Standard MC props are also available: _width, _height, _xscale, _yscale, etc.
Another unpublished but useful variable is rdcmndHidePlaybar.
You can see the official list of Captivate 3 variables here (page 201 in PDF link), and you can also see Paul’s famous list of Captivate variables here.
Comments
Mark Chrisman wrote on July 17, 2008 at 4:41 pm:
I am working on a Captivate project and would like to display the running total score on each frame as the user proceeds. Do you know the variable for score or raw score? I would like to build a .SWF code widget to display this info.
Philip Hutchison wrote on July 17, 2008 at 5:26 pm:
Hi Mark
Sorry, I don't know the variable for score; as far as I know, it isn't a public variable, and may not even be accessible.
If you find out, please let me know. 🙂
Todd Slaughter wrote on October 15, 2009 at 4:19 pm:
Wonderful site!
Philip, my company has been using Captivate 3 for some time. We import the published SWFs at runtime into our own course player, built with AS2 and published to Flash 8. We publish our Captivate movies to the same specs. Our latest challenge is to simulate a three-monitor system on the learners' single-monitor computers. So there's a bit of zooming and panning and masking going on. And I've run into a bit of trouble. I hope you can point me in the right direction.
A click <em>outside</em> the masked Captivate still triggers a click as far as Captivate is concerned, and it throws up a "that's incorrect" message. Specifically, it only happens when you click in a spot that has masked Captivate "behind" it. For example, if I'm zoomed in on the top-left corner, I can click on player elements above and to the left of the corner without triggering anything, but clicking on player elements below or to the right of the mask will trigger an <em>incorrect</em> response in Captivate.
Is there a way to make Captivate ignore mouse clicks outside of the mask? I think it must be responding to Mouse.onMouseDown() since normally a masked object won't respond to clicks outside the mask.
philip wrote on October 16, 2009 at 11:37 pm:
The easiest that comes to mind is to make your mask a clickable movieclip in Flash; just give it no action to take when clicked. It becomes a poor-man's modal, preventing click-throughs to anything underneath it, whether they're Captivate SWFs or anything else.
Todd Slaughter wrote on October 19, 2009 at 9:29 am:
Philip, I appreciate your suggestion. I had already tried that though. It doesn't work the way you'd think. Do you have any other suggestions? I've put together a small test file to demonstrate exactly what's happening, and I've posted it here:
http://www.tbgprod.com/_experiments/captivatemasktest/captivatemasktest.swf
I've also uploaded the .fla file if you'd like to see it. It's ony 50kb and it's available here:
http://www.tbgprod.com/_experiments/captivatemasktest/MaskTest01.fla
You'll also need the Captivate .swf file if you want to test locally. Here's the direct link. Right-click and save target as:
http://www.tbgprod.com/_experiments/captivatemasktest/DisplayProperties.swf
I'm happy to have any suggestions at this point. If you don't have a solution, can you recommend another place to post this question?
philip wrote on October 19, 2009 at 9:52 am:
@todd
Unfortunately I don't have the time to check it out right now (trying to finish a big project), but I recommend posting the issue on the <a href="http://groups.google.com/group/elearning-technology-and-development" rel="nofollow ugc">E-Learning Technology and Development Google Group</a> or the <a href="http://forums.adobe.com" rel="nofollow ugc">Adobe forums</a>.
Todd Slaughter wrote on October 19, 2009 at 10:16 am:
Thanks, Philip! I'll post there.
Todd Slaughter wrote on October 19, 2009 at 3:23 pm:
The conversation has moved here:
http://forums.adobe.com/thread/508867
If anyone can help, please dive in!
Danny Houk wrote on December 8, 2009 at 2:28 pm:
Howdy Philip! Question about these variables, I've managed to create a "player" swf in Flash using buttons that control the Captivate swf that gets loaded into it. For instance, if the Captivate swf is loaded into an empty movie clip called "capSWF" and I make it play/resume using this code on my button: capSWF.rdcmndResume = 1;
Now, can I do a similar feat by importing a Flash swf into Captivate (I'm using Captivate 3, so I'd use the Import > Animation option)? For instance, the Flash swf has a button that executes the code _root.rdcmndResume = 1; (I'm assuming that _root would target the Captivate swf). However, this isn't working. Also, I've tried referencing the Captivate swf using a relative path like this._parent._parent.rdcmndResume = 1; and still can't seem to affect it.
So, in summary can I control a Captivate swf "from within" using a child swf, or only "from without" using a parent container swf?
philip wrote on December 8, 2009 at 4:03 pm:
Yes, you can control a Captivate SWF from within using an imported SWF. However, that reference will break once you import the Captivate SWF into a Flash SWF.
Why? _root refers to the absolute bottom timeline… the parent of all parents.
If you're only working in Captivate, _root will refer to the Captivate SWF's main timeline. However, once you import that exact same Captivate SWF into a Flash SWF, _root will now refer to the Flash SWF's main timeline.
Using references to _parent in Captivate is tough because you can't really know for sure how deep the movieclip is nested. It will work in some cases and fail in others.
See here for more details:
<a href="https://pipwerks.com/lab/adobe-captivate/devlearn-2007/" rel="nofollow ugc">https://pipwerks.com/lab/adobe-captivate/devlearn-2007/</a>
Danny Houk wrote on December 9, 2009 at 8:18 am:
Thanks Philip, makes sense. I my case, I was using my Captivate SWF as the container, so _root should have been targeting it. I read through your devlearn article (many times) and it was very helpful.
Yet, I'm still getting stuck because in my imported Flash SWF I'm making the call _root.rdcmndResume = 1; and it's not resuming the containing Captivate SWF as it should. Of course, don't want you to do my troubleshooting for me, but any other thoughts why this wouldn't be working?
Danny Houk wrote on December 10, 2009 at 2:34 pm:
Hey Philip, just to help fill out your chart here, I experimented with info_mc.playInfo(); (which you have a ? for currently). I wanted to report that it's a command that pops up the information window in your Captivate swf, same as pressing the "i" information button in Captivate's stock playbar.
Danny wrote on August 18, 2010 at 9:34 am:
To Philip and any reader who may be coming here for help…
As you can see from my previous comments, I was trying to communicate from an imported swf animation directly up to the containing Captivate swf (versus Philips preferred method of wrapping the containing Captivate swf in another Flash swf container and making calls to that containing swf down to the Captivate swf). Basically, I'm writing small Flash swfs in AS3 to communicate with Captivate 5 projects.
You can't do this with root, you must find the right path to the container swf, and it is parent.parent.parent.parent. If you add the Captivate function from the above list to the end of four parents, you can communicate directly with the Captivate swf in that way. Just an FYI since I spent a fair amount of time trying to target it.
Thanks,
Danny
philip wrote on August 18, 2010 at 9:39 am:
@danny thanks for the info (and reminding me i need to update my page!)
BTW, if your Captivate file uses a skin, it adds another layer of depth. Something to keep an eye on.
I am working on a Captivate project and would like to display the running total score on each frame as the user proceeds. Do you know the variable for score or raw score? I would like to build a .SWF code widget to display this info.
Hi Mark
Sorry, I don’t know the variable for score; as far as I know, it isn’t a public variable, and may not even be accessible.
If you find out, please let me know. 🙂
Wonderful site!
Philip, my company has been using Captivate 3 for some time. We import the published SWFs at runtime into our own course player, built with AS2 and published to Flash 8. We publish our Captivate movies to the same specs. Our latest challenge is to simulate a three-monitor system on the learners’ single-monitor computers. So there’s a bit of zooming and panning and masking going on. And I’ve run into a bit of trouble. I hope you can point me in the right direction.
A click outside the masked Captivate still triggers a click as far as Captivate is concerned, and it throws up a “that’s incorrect” message. Specifically, it only happens when you click in a spot that has masked Captivate “behind” it. For example, if I’m zoomed in on the top-left corner, I can click on player elements above and to the left of the corner without triggering anything, but clicking on player elements below or to the right of the mask will trigger an incorrect response in Captivate.
Is there a way to make Captivate ignore mouse clicks outside of the mask? I think it must be responding to Mouse.onMouseDown() since normally a masked object won’t respond to clicks outside the mask.
The easiest that comes to mind is to make your mask a clickable movieclip in Flash; just give it no action to take when clicked. It becomes a poor-man’s modal, preventing click-throughs to anything underneath it, whether they’re Captivate SWFs or anything else.
Philip, I appreciate your suggestion. I had already tried that though. It doesn’t work the way you’d think. Do you have any other suggestions? I’ve put together a small test file to demonstrate exactly what’s happening, and I’ve posted it here:
http://www.tbgprod.com/_experiments/captivatemasktest/captivatemasktest.swf
I’ve also uploaded the .fla file if you’d like to see it. It’s ony 50kb and it’s available here:
http://www.tbgprod.com/_experiments/captivatemasktest/MaskTest01.fla
You’ll also need the Captivate .swf file if you want to test locally. Here’s the direct link. Right-click and save target as:
http://www.tbgprod.com/_experiments/captivatemasktest/DisplayProperties.swf
I’m happy to have any suggestions at this point. If you don’t have a solution, can you recommend another place to post this question?
@todd
Unfortunately I don’t have the time to check it out right now (trying to finish a big project), but I recommend posting the issue on the E-Learning Technology and Development Google Group or the Adobe forums.
Thanks, Philip! I’ll post there.
The conversation has moved here:
http://forums.adobe.com/thread/508867
If anyone can help, please dive in!
Howdy Philip! Question about these variables, I’ve managed to create a “player” swf in Flash using buttons that control the Captivate swf that gets loaded into it. For instance, if the Captivate swf is loaded into an empty movie clip called “capSWF” and I make it play/resume using this code on my button: capSWF.rdcmndResume = 1;
Now, can I do a similar feat by importing a Flash swf into Captivate (I’m using Captivate 3, so I’d use the Import > Animation option)? For instance, the Flash swf has a button that executes the code _root.rdcmndResume = 1; (I’m assuming that _root would target the Captivate swf). However, this isn’t working. Also, I’ve tried referencing the Captivate swf using a relative path like this._parent._parent.rdcmndResume = 1; and still can’t seem to affect it.
So, in summary can I control a Captivate swf “from within” using a child swf, or only “from without” using a parent container swf?
Yes, you can control a Captivate SWF from within using an imported SWF. However, that reference will break once you import the Captivate SWF into a Flash SWF.
Why? _root refers to the absolute bottom timeline… the parent of all parents.
If you’re only working in Captivate, _root will refer to the Captivate SWF’s main timeline. However, once you import that exact same Captivate SWF into a Flash SWF, _root will now refer to the Flash SWF’s main timeline.
Using references to _parent in Captivate is tough because you can’t really know for sure how deep the movieclip is nested. It will work in some cases and fail in others.
See here for more details:
https://pipwerks.com/lab/adobe-captivate/devlearn-2007/
Thanks Philip, makes sense. I my case, I was using my Captivate SWF as the container, so _root should have been targeting it. I read through your devlearn article (many times) and it was very helpful.
Yet, I’m still getting stuck because in my imported Flash SWF I’m making the call _root.rdcmndResume = 1; and it’s not resuming the containing Captivate SWF as it should. Of course, don’t want you to do my troubleshooting for me, but any other thoughts why this wouldn’t be working?
Hey Philip, just to help fill out your chart here, I experimented with info_mc.playInfo(); (which you have a ? for currently). I wanted to report that it’s a command that pops up the information window in your Captivate swf, same as pressing the “i” information button in Captivate’s stock playbar.
To Philip and any reader who may be coming here for help…
As you can see from my previous comments, I was trying to communicate from an imported swf animation directly up to the containing Captivate swf (versus Philips preferred method of wrapping the containing Captivate swf in another Flash swf container and making calls to that containing swf down to the Captivate swf). Basically, I’m writing small Flash swfs in AS3 to communicate with Captivate 5 projects.
You can’t do this with root, you must find the right path to the container swf, and it is parent.parent.parent.parent. If you add the Captivate function from the above list to the end of four parents, you can communicate directly with the Captivate swf in that way. Just an FYI since I spent a fair amount of time trying to target it.
Thanks,
Danny
@danny thanks for the info (and reminding me i need to update my page!)
BTW, if your Captivate file uses a skin, it adds another layer of depth. Something to keep an eye on.