Restarting a slide

Hi everybody.
I have a question for you all.
If in a project is not possible to use the ActivePresenter player with all its options, then you have to make your own player.
I would like to have a button which restarts a slide.
I used “On click” “Go to Slide” “name or title of the slide”, but unfortunately you have to repeat this for every slide and it’s time consuming.
Is there an option or a best practice for “copy and paste” the player whithout modifying the script on every button?
Thank you in advance to those who wil have an idea.

Hi Stefano,

You can add a button to the slide master or a slide layout so that it will appear on all slides or slides have that layout. For more information about slide master, please see this tutorial: https://atomisystems.com/tutorials/ap7/use-slide-masters-in-activepresenter-7/

To restart the current slide, you can add Execute JavaScript action with the following code:

prez.showSlideAt(prez.currentSlideIndex());

Please note that the script above doesn’t reset user answers and attempts on the slide.

Regards

Thank you very much.
Yes, now that i have the right script i can put the button on the slide master.
I’m going to try it right now
Stefano