Highlighted

JS vs Advanced/Shared Action

Engaged ,
Jun 14, 2019

Copy link to clipboard

Copied

Hi there

I would like to hear opinions about the advantages and disadvantages of using JS vs Advanced/Shared actions.

It is not about Shared vs Advanced where Shared should always be preferred when possible.

It is about the implications of using JS instead of Advanced actions.

For me, it is easier to use the JS since I can type faster but would be good to hear thoughts. I am using a number of commands like

cp.changeState

cp.SubmitInteractions

cp.enable/disable

cp.hide/show

cp.clickHandler

I know JS is quite comprehensive but what other "basic" ones are there?


Thanks in advance.Bobby

PS. In other words, why would I use the left one and not the right one?

123456789.png

Views

183

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

JS vs Advanced/Shared Action

Engaged ,
Jun 14, 2019

Copy link to clipboard

Copied

Hi there

I would like to hear opinions about the advantages and disadvantages of using JS vs Advanced/Shared actions.

It is not about Shared vs Advanced where Shared should always be preferred when possible.

It is about the implications of using JS instead of Advanced actions.

For me, it is easier to use the JS since I can type faster but would be good to hear thoughts. I am using a number of commands like

cp.changeState

cp.SubmitInteractions

cp.enable/disable

cp.hide/show

cp.clickHandler

I know JS is quite comprehensive but what other "basic" ones are there?


Thanks in advance.Bobby

PS. In other words, why would I use the left one and not the right one?

123456789.png

Views

184

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 14, 2019 0
Most Valuable Participant ,
Jun 14, 2019

Copy link to clipboard

Copied

All depends on your jobs. Since I am mostly debugging files, or adding more complicated workflows, for clients I prefer Advanced/Shared actions for the most. Reason: much easier to understand and explain to the client than a script in JS. If they want to do some small edits, I it is perfectly possible with a clearly explained workflow.

I do use JS when necessary. Some examples: random numbers, formatting of numbers/dates, use of arrays. For the most part those will be embedded in a shared or advanced action.

Second type of jobs for me are personalized trainings. It is way easier to introduce trainees to the point-and-click actions in Captivate than having to explain JS and debugging of it

TLCMediaDesign will tell the contrary, which is very understandable because his situation is totally different. Will leave it to David to explain.

I do type very quickly (my former secretary in college complained, she fet ashamed), but that is not the real core of the choice. You always need debugging, which can be hard in any programming language (used programming probably before you were born ).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 2
Engaged ,
Jun 14, 2019

Copy link to clipboard

Copied

Thanks Lieve, it is easier for me to type/correct the lines in the JS code.

But my question would rather be - is there any difference in terms of weight of the project?

I guess using 50 JS codes for OnEnter instead of 50 Advanced actions would be lighter?

I know you would say to use Shared actions and I do that but the questions is rather if JS adds to the weight ...

Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Most Valuable Participant ,
Jun 14, 2019

Copy link to clipboard

Copied

I never did test the effect on file size. BTW for JS I always use Brackets to create the script, but they'll be much more complciated that the very simple example you showed. Forgot to tell about anohter use case: when I need breaking out of a condition.

This should be tested. I tested the difference between duplicate advanced actions and shared actions, and there I found a clear difference in file size. No idea what happens when replaced by JS.  As I wrote, use mostly Execute JS in an advanced or shared action, never as a standalone script (would never do it for your simple example.

Would love to see an easier way to add  JS functions to the default files (without having to do all the explanations to clients) and call them from within Captivate. That would make life lot easier.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Engaged ,
Jun 14, 2019

Copy link to clipboard

Copied

Well, I would use it

OnEnter

To disable a number of objects

To hide the next button

OnClick of buttons

To show a container object

Change the state of a container object

Change the state of the clicked object

So it adds up to the bill. Doing this in an action is choosing every time a dropdown etc while in the JS code I substitue the names of the object

Thanks Lieve

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Adobe Community Professional ,
Jun 14, 2019

Copy link to clipboard

Copied

I think the other thing you should consider is the maintenance of this project AFTER you complete it.  If you are the only person that will ever need to do any work on the functionality then that's not likely to be a problem.  But some other basic user who doesn't have your JS skills is going to be maintaining the project at a later date then they could end up with a big headache, and your client might not be happy with the way you have built the project then.  Just a thought.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 2
Most Valuable Participant ,
Jun 14, 2019

Copy link to clipboard

Copied

Indeed, Rod, that is another argument.

Bobby, I think you ignore the use of ffltering in dropdown lists... was added with CP6 which is a long time ago. Choosing an item in a list is a breeze.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Engaged ,
Jun 14, 2019

Copy link to clipboard

Copied

Thanks Rod

That is a minor issue

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Engaged ,
Jun 14, 2019

Copy link to clipboard

Copied

A breeze.

Let me give you an example why would I use the JS

You have 6 smart shape buttons and a smart shape container with 6 states.

When you click on button one the container changes to state 1, when you click on button two the container changes to state 2, etc.

Now, in one of the states there is not only text but also a hyperlink.

This is easy with JS. I can have a clickbox hidden onenter and then show the box when the user clicks the respective button.

Shared actions would not work since there will be an additional condition for only this particular button.

Advanced actions for each is not an option. Too heavy

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Advocate ,
Jun 14, 2019

Copy link to clipboard

Copied

I am like you.

I used to use advanced actions exclusively but then I happened across a project that was much more complex. While I believe the end result would be achievable using only advanced actions - I felt it simply became too cumbersome with all the clicking, naming, conditional tab checkboxing, and the thing that constantly drove me nuts which was when I wanted to tweak something related to a variable and other parts of the statement would force me to click through and update them.

Everything was so disjointed and spread across different tabs that it became difficult to "see" what was happening.

I found that neatly placing my commands in the javascript window was not only faster but easier to follow and update. Now if they can just make that window so we can resize it.

I work for a private company where I create lots of interactive modules that mimic menu navigation through our equipment. Since the outcome of the button presses depends on where you are in the menu, there are lots of variables to track location within the menu with tons of conditionals and nested conditionals. Much easier for me to figure this out through Notepad++ and JavaScript than all the actions it would need. It eventually seeped into my use of more simple workflows.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 2