Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks. What about for SWFs?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hello! Is there a reason why cp.hide('group_name'); doesnt work? It works on objects, but not groups of objects. At the same time hiding and showing groups using advanced actions works perfectly fine.
Thanks!
Copy link to clipboard
Copied
In HTML5 there are no groups. When you show or hide a group with advanced actions, the JavaScript shows and hides each individual member of the group. Groups are really only in the IDE.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you as always!