Repeat current slide

Hello,
I’m trying to find a way to add a button to repeat current slide - I want to use this for the SCORM export so the user can repeat a slide when he reaches the end of it.
I added a button with an:

  • execute java
    and then
  • continue presentation

The execute java is:
Prez.ShowPreviousSlide()
Prez.ShowNextSlide()
(i’m using version 6)

this works fine for all slide but the first one (as there is no previous).
Any idea how to make this work for all slides?

I tried using ShowSlide and GetSlide but the first wants an integer and the second returns an object.
Any suggestions?

Best regards and thanks in advance,
Michael

1 Like

Hi Michael,

For version 6, you can use the script below to repeat the current slide:

Prez.ShowSlide(Prez.Session.SlideIndex + 1);

Regards

1 Like

Hi Toanls,

This works perfectly - thank you so much. Great!

Also, if you could use your expertise to assist me with another problem, I would really appreciate it:

I’m struggling with a pause/resume button

Thanks again!

Best regards,
Michael

I’ve answered that question, please check it.

Hello everybody,

i have the same concern, but in AP7. Currently i am using for a custom repeat button the following code for On Click: Execute JavaScript:

prez.previousSlide(0);
prez.nextSlide(0);

I would like to use

prez.showSlideAt(currentSlideIndex(),0);

but i have no idea how to get the index number of the current slide. Could you provide me with a reasonable solution?

Many thanks in advance and BR
Marcel

Hi,

With ActivePresenter 7, you can get current slide index via:

prez.currentSlideIndex()

The index starts from 1.

More details can be found in the User Manual page 212.

Regards,

Hi dangle,

thanks for the prompt reply, great support again!

I forgot the ‘prez.’ part inside the brackets. The following code works perfectly:

prez.showSlideAt(prez.currentSlideIndex());

Regards,