Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Captivate-specific JavaScript questions

Contributor ,
Mar 10, 2016 Mar 10, 2016

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!

660
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 10, 2016 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 10, 2016 Mar 10, 2016

Thanks. What about for SWFs?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 10, 2016 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 15, 2016 Jun 15, 2016

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 15, 2016 Jun 15, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 15, 2016 Jun 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 15, 2016 Jun 15, 2016
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 15, 2016 Jun 15, 2016
LATEST

Thank you as always!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources