Execute Javascript action to show/hide all objects and shapes matching criteria
I'm currently trying to build a button that will toggle hints (in the form of SmartShapes) and highlights that match a certain criteria from hidden to shown. Because the file is so big (over 600 slides), my current (attempted) approach has two parts.
First part is an Action on Enter for the first slide to Execute Javascript and find every item (highlights and smartshapes with text) that has "Anton_Resources_" in its name and creates a string with the names.
My second step was to create a button that I could drop on each page of the click through to toggle the hints on if needed. I hoped to do this by having a button that executes a javascript to loop through the string and show the objects in the list. (And then another script on exit of page to hide these objects again if the user still has more hints to use before going to "Beginner version" with all the hints and highlights shown for the rest of the simulation.)
These objects and shapes are scattered throughout the project on different pages. They are all named with the same naming convention (Hints are Hint_Anton_Resources_#### and Highlights are Highlight_Anton_Resources_####) so the only thing that changes is the number at the end (though they're not always consistent numbers due to copy and paste or edits along the way).
Ideally this code would work when published to my computer (to be able to confirm it works before sending to LMS). I am using Captivate 2017.
I've tried to find information on how to use cp.D or cp.model.data or even e.Data.si to put something together, but have had no luck and found no comprehensive source of information about how to use these. That said, at this point I just need to get a code that works!
