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

Advanced Actions editor - can you help a despairing coder out??

Community Beginner ,
Aug 27, 2017 Aug 27, 2017

Hi guys,

I've got loads of elearning to build..... loads and loads.

By trade I am a Microsoft stack developer and love nothing more than handwriting out beautiful code. I have started using "Advanced Actions" in Captivate 2017 and have a couple of questions.

  • Can I write my own uncompiled advanced actions without the GUI?? I find dropdowns, and "helpful" logical panels really painful. I guess it is in my blood, but I like to roll my own on these kind of things
  • Do variables values persist across slides? i.e. if I were to create a set of buttons and then variables var_1 to var_4, would those var_ values reset or go out of context on the next slide? To explain, I will be creating these variables as a boolean representation of the button state (clicked state or normal state). When a button is clicked, the var_  for that button will be set to 1 and that will be checked by the submit code to validate of the correct button is clicked. The other 3 buttons will have their var_ values set to 0 at that point too. Now I hate writing more than I have to, so can I setup one 4 button logical script and just call it slide to slide, or if the values persist do I need to reset upon form load or create a complete new set per slide?

Many thanks

253
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
Community Expert ,
Aug 27, 2017 Aug 27, 2017

Advanced actions are converted on runtime to JavaScript (HTML5 output) or ActionScript (SWF output). I would recommend you have also a look at shared actions, ot only advanced actions.

As for (shape) buttons, since you are using CP2017, why bother about a Boolean to show a Visited state which is already built in?

I often see this: programmers make it too complicated, instead of using built in functionality of Captivate. Maybe it is also useful to know that shape buttons can be used on master slides, and also timed for the rest of the project.

You can use Javascript if you hate the Advanced actions that much.

The logic of the advanced actions is the same as for any programming language. If you change the value of a variable, it will keep that value until you change it again or leave the course. To recover the value when restarting the course you can use local storage (by JS).

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 ,
Aug 28, 2017 Aug 28, 2017

Hi iainiov,

I can relate to your pain!

In Captivate, you can code your workflow entirely in Js+jQuery. Just keep in mind that the variables' values will reset ONLY if user closes the course or browser session storage is drained. However, if the course will be rendered through a LMS you can pick the last values from the SCORM dump. Refer to Storing variables in LMS after the user resumes the module for more on reusing LMS dump.

/best

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
Community Beginner ,
Aug 29, 2017 Aug 29, 2017

Thanks for the replies. Lilybiri​ I have four buttons, when one is clicked I change its state (to highlight it) and change the other three buttons back to their original non highlighted state. This is to give the impression of a group set of buttons that allow only one selection at a time. I have created an advanced action that does that quite - nicely, I will certainly look at shared actions.

I am very proficient with js/jquery so interested in using that here. I ran through the guidance on the captivate pages, does js work ok across all implementations of SCORMS?

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
Community Expert ,
Aug 29, 2017 Aug 29, 2017
LATEST

OK, will leave you to the JS experts. Since I have been using advanced and shared actions since over 8 years, I prefer only to switch to JS for functionality that is not available with advanced/shared actions (arrays, random numbers, formatting numbers, more complicated calculations...). One of the reasons is my laziness (did program too much in the past, starting with punched cards and paper rolls many years ago), another one is that it is easier for clients to manage shared actions (or advanced when shared are not possible) without needing programming skills. Maintaining JS files if not accessible to everyone.

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