Skip to main content
Jefferbob12055564
Inspiring
March 10, 2016
Question

Captivate-specific JavaScript questions

  • March 10, 2016
  • 2 replies
  • 845 views

General question: Is there any reference or documentation available showing what objects and collections are available in Captivate that are accessible through JavaScript? Any links would be helpful.

Specific questions:

1. I know variables are accessible, but are specific named objects on slides accessible? For example, the ability to hide/show an image? (Just an example - I know that can be done with actions.)

2. Are collections of Captivate objects on slides available, such as captions, images, etc.? If so, are there collections per slide, or just per project?

Using Captivate 9.0.1, but any relatively current reference would be helpful. Thanks!

This topic has been closed for replies.

2 replies

Inspiring
June 15, 2016

Hm, somehow I assumed it would be treated as a regular HTML5 object that includes all it's children as an array of objects or something like that, especially since

var GroupTest = $("#group_name");

console.log(GroupTest);

actually returns GroupTest as an object.

Could you suggest what would be a clever way to use Captivate's JS window to hide/show a group?  Individually hide/show all objects inside the group?

TLCMediaDesign
Inspiring
June 15, 2016
Inspiring
June 15, 2016

Thank you as always!

TLCMediaDesign
Inspiring
March 10, 2016

This only goes for HTML5, but everything in your project that has a name is accessible.

cp.show( 'next_btn' );

cp.hide( 'next_btn' );

Sometimes you may have to append a 'c' for canvas onto the end of the object name, but It genrally works with the standard object name.

cp.hide( 'Text_Caption_1 ')

cp.hide( 'Text_Caption_1c' )

You can also get the actual node and manipulate them with css and jQuery animations.

Jefferbob12055564
Inspiring
March 10, 2016

Thanks. What about for SWFs?

TLCMediaDesign
Inspiring
March 10, 2016

For swf you are pretty much limited to variables with JavaScript.

There are many more things exposed if you use AS3 Widgets, but there is zero documentation from Adobe. Everything I've found is from hunt and pecking the objects, parents. There are some useful tidbits here and there, but for the most part it's a treasure hunt.