pipwerks: home

pipwerks

Standards-friendy eLearning and Web development (HTML 5 version)

Unpublished Captivate variables

There is a newer list of variables available, which includes new Captivate 4 variables.

A recent post in the elearning development forum 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.

Like what you see? Why not share it!

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • LinkedIn
  • StumbleUpon
  • Tumblr
  • Twitter

Related posts:

  1. Introducing the CaptivateController
  2. Captivate 4 variables gone wild
  3. Introducing the pipwerks Captivate Controller JavaScript utility
  4. Thoughts on using JavaScript in Adobe Captivate
  5. Making Actionscript calls from Adobe Captivate

What others are saying... (12 comments so far)

Mark Chrisman

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

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

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.

philip

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

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

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

Todd Slaughter

Thanks, Philip! I’ll post there.

Todd Slaughter

The conversation has moved here:

http://forums.adobe.com/thread/508867

If anyone can help, please dive in!

Danny Houk

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

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:
http://pipwerks.com/lab/adobe-captivate/devlearn-2007/

Danny Houk

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

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.

Want a gravatar? They're easy and free! Just sign up at gravatar.com

Add your two cents!

You can use the following HTML tags in your comment: <a> <abbr> <b> <blockquote> <cite> <code> <em> <i> <q> <strike> <strong> <pre>

The anti-spam code is my LAST NAME, and can be found in the page footer.
Be careful not to misspell it.

I'm currently moderating comments. Please don't submit your comment twice; it will appear as soon as I can approve it.