Help with Javascript

Hi!

I am developing a distance learning course with step by step interaction with the user.
What I need is:
When the student does one of the steps they are being asked to be marked on the list.
I even managed to do it and it is working however for a course with many slides is impossible to use this way.
I’m using the slide master

Follow the example: https://mega.nz/#!dpVRgCSL!dmnC9m8M7yzwDBYJHxZ0VqHFeaZH1P9NiuFCEPCgn6A

I would like to do this with javascript to speed up the process.
Sorry my english, I’m using translate…

Thanks!

Hi,

You can add the following script to On Load event of master slide to change checkbox state:

var currentSlideIndex = prez.currentSlideIndex();
var i;
for (i = 1; i < currentSlideIndex; ++i) {
    var visitedCheckBox = prez.object('check_' + i);
    if (visitedCheckBox)
        visitedCheckBox.state('Estado certo');
}

Slides inserted after that will inherit this On Load event-action.
For existing slides, you must copy this event-action and paste to each slide event-action.
Please see this attached sample: Teste.approj (2.8 MB)

Regards

Hi,

Thank you so much, it was exactly what you needed.