Copy link to clipboard
Copied
Greetings all!
Is there a way to turn on/off or disable the NEXT and BACK buttons on the skin? I am creating some custom assessment simulations and there are times I do not want the student to be able to go backwards using the BACK button. I know I can turn those off and create custom buttons, but I would prefer to use the skin objects so as to not interefere with the simulation screens with non-application objects.
THANKS in advance for any assistance.
Cheers Russ
Copy link to clipboard
Copied
You can only turn them off for all slides, not for individual slides, using Project, Skin Editor. You need custom Next/Back buttons, but you can put them on the first slide timed for the rest of the project. That will allow to hide them with the On Enter event when you don't want them.
Copy link to clipboard
Copied
You can disable the back and next using the following JavaScript. On slides where you want the buttons to be disabled, set the slide title(s) to "disable". Execute this JS on slide enter of the first slide in the project.
if ( window.cpInfoLastVisitedSlide === 1 )
{
window.cpAPIEventEmitter.addEventListener( 'CPAPI_SLIDEENTER', enterSlide, false );
}
function enterSlide( e )
{
var bck = document.getElementById( 'Backward' );
var fwd = document.getElementById( 'Forward' );
if ( e.Data.lb === "disable" )
{
bck.style.opacity = .5;
bck.style.cursor = 'default';
bck.style.pointerEvents = "none";
fwd.style.opacity = .5;
fwd.style.cursor = 'default';
fwd.style.pointerEvents = "none";
}
else
{
bck.style.opacity = 1;
bck.style.cursor = 'pointer';
bck.style.pointerEvents = "auto";
fwd.style.opacity = 1;
fwd.style.cursor = 'pointer';
fwd.style.pointerEvents = "auto";
}
}