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

CP9 How to list all objects in a Group using Java?

Engaged ,
Mar 08, 2018 Mar 08, 2018

CP9

HTML5 only

My Question

How to I get the names of all the objects in a Group using Javascript.

(The Java will be used in an external library, not in the little window provided by captivate.)

Why I want this

I want to Hide/Show a Group using Java.

However, after reading the forum I am aware that this cannot be done using java.

But, a solution would be to individually Hide/Show each item in the Group.

If this was for a single Group I could hard code it, but it will be for many different Groups, so the Java will need to be flexible.

What I think I need

I think I need something like this, but I'm not sure of the syntax.

for x = each group('my_group_name').object {

cp.show(x);

next x

}

(As you can see, I doubt I will get a job programming at NASA!)

Thank you.

Peter

272
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
Engaged ,
Mar 08, 2018 Mar 08, 2018
LATEST

I have found this code in the forum.

I thought it would identify all objects on the slide with the word 'doctor' in their name, and then hide them, but it did not work.

Any help much appreciated.

var slideElems = e.Data.si; 

 

for ( var i = 0; i < slideElems.length; i++ ) 

   { 

    if ( cp.model.data[ slideElems[ i ].n ].mdi.indexOf( 'doctor' ) != -1 ) 

    {  

     cp.hide(cp.model.data[ slideElems[ i ].n ].mdi) 

    } 

   } 

Peter

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