July 29, 2020
Help with Javascript / advanced action to avoid parameter input every time
Comments
(2)
July 29, 2020
Help with Javascript / advanced action to avoid parameter input every time
Newbie 1 posts
Followers: 0 people
(2)

For every slide, I have a layer named “circle_number” and a layer named “error_number” where “number” is assigned by Captivate. Let’s say there is a clickbox on the stage: “click_box_number”, again “number” assigned by Captivate.

Is there a way to implement an advanced/shared action or javascript so that I do not have to fill out parameters on each and every slide?

For example, in English-script (I don’t know javascript)

var MyCircle = circle_number;

var MyError = error_number;

var MyClickbox = click_box_number;

if MyClickbox is hit (

show “MyCircle” and “MyError”

);

Thanks!

2 Comments
2020-08-03 21:20:00
2020-08-03 21:20:00

Without more information really hard to help you. Since you talk about ‘click boxes’ I may suspect that you are busy with a non-responsive project because click boxes are not compatible with fluid boxes. You talk about ‘parameters’ but I don’t think you mean the parameter as defined in shared actions?

Most seemingly complicated workflows can be simplified if you think out of the box. You want to ‘show’ two items (circle and text).  However that can be replaced by changing the state in a multistate object, where each state has both the circle and the text.  You can time that multistate object for the rest of the project, so that it is available on each slide.  Have no idea how the variable is defined for each slide, or is it a random number? If you ever could post answers to those questions… there may be a very easy way to achieve your goal.

Like
2020-07-30 01:46:51
2020-07-30 01:46:51

One of the advantages of shared actions is that you can copy and paste slides that contain them and end up with uniquely renamed variables, and advanced actions. I use this all the time to copy one of my custom question slides into a new project. Everything comes over but the magic really only works from one project to another. Duplicating slides tend to reuse the same variables and messes things up. Your example is a little vague so I’m sorry if that doesn’t answer the question for you.

Like
Add Comment