Using javascript to jump to last slide of project (not by slide number).
Hi there, I’m wondering if anyone knows a way to use javascript to jump to the last slide of the project if you don’t know the amount of slides in the project? Obviously I can look at how long the project is everytime and put in the slide index number like –
window.cpCmndGotoSlide = 15;
but I’m wondering if there isn’t some way to identify the last slide of the project, so that if the number of slides changes I don’t have to go back and change my code?
Any help is much appreciated.
Thanks.
Here are some good references:
Adobe Captivate variables
Learn about the Common JavaScript interface for Adobe Captivate
The slide numbers are zero indexed. That means if you have 10 slides – your last slide is slide number 9. So – using the cpInfoSlideCount variable we can subtract 1 from that. I used this on a button and it worked.
window.cpCmndGotoSlide = (cpInfoSlideCount-1);
It should always track the total number of slides and by subtracting 1 bring you to the end.
You must be logged in to post a comment.