We have custom previous and next buttons in our module. Our client want to deactivate the next button until the end user finishes the slide and then have it active once they've viewed it. Plus, have their LMS remember each users location in order to continue at a later time. Has anyone figured out a solution? If so, could you please share?
For the first question, have a look at:
Second question is difficult. If you are sure that the learner will use the same system, you could store a variable (tracking if slide has been viewed) in Local Storage and retrieve it in a next session.
Lily, I have multiple slides that this needs to be applied on. Is there a quick way (shared action) that this can be implemented?
Unfortunately, I can't skip ahead a number of seconds per slide. I have voice over narration for each slide. Scratching my head on this one.
I had the same issue - just created a second 3-sec slide with all objects visible, no voiceover or other animations that only is seen if the first (full) version had been viewed. If the first version is viewed, jump to the short static version. I also included a button to "replay" the first version if wanted, which reset the "slide_x_viewed" variable to 0 so the system would think it was indeed the first time through.
Not the most elegant way, I admit, but it works if the micronavigation can't do the trick for you.
Do yolu want to hear the narration also on revisiting? In that case: do you need CC? If CC is not necessary, replace the slide audio by either an Audio object or by the command Play Audio triggered on Enter. You can have the audio played in that case at all visits and have the Next button displayed using the shared action.
The next button in the script is "next_btn".
Create a Captivate variable called myProgress and set it's value to 0
var slideData = null;
if ( window.cpInfoCurrentFrame > slideData.to - 5 )
if (slideData.slideNumber !== window.cpInfoSlideCount )
window.myProgress = slideData.slideNumber;
David, I am sure you have a perfect solution there. If it is easier eepends on the developer's skill. You know that I am telling this with a smile. In a consultancy job I prefer advanced/shared actions because they can be handled by the company in an easier way than a JS file. If this is a solution to be used in one company, certainly would go for your solution.
As a user recently commented... I prefer to 'learn to fish' over 'provding a meal'.
I understand, but it is easy to copy and paste!
I love my projects to have 0 advanced actions, you can execute anything on slide enter if need be.
Sure, David, agree about that. And an easier way to inttegrate external JS files... You are the JS expert, I don't like to offer copy/paste solutions myself, but that is my teacher history.
I usually just copy and paste custom navigation button on each slide, and I know when I do it that way, Captivate won't let me name them the same, because it treats it as a variable, right? I know this is not the most efficient. If I put the custom next button in the master slide with this script, will it "grab" it every time for lack of a better term.
What I do is put the next button on the first slide and display for the rest of the project. If you name it 'next_btn' the code I posted will work. The name of the button becomes an ID, not a variable.
If not, the code would need to be modified to find the next button on every slide as long as there is something common in their names.
So if you called the first next button 'next_btn_100' and the copy and pasted it, just the number would increment and each of them could easily be found.
If you paste this JS just above the function checkSlide(e) line in the code:
var d = document.getElementsByTagName('DIV');
var nextID = null;
Array.prototype.forEach.call( d, function( elem )
if ( elem.id.indexOf( 'next_btn_' ) === 0 )
nextID = elem.id;
then in the cp.show() and cp.hide() statements make them:
cp.show( nextID ); and cp.hide( nextId ); ( 3 places in the code)
You can paste the name of your next button in where the Bold text 'next_btn_) is, just use the name of your buttons that is common, not the numbers.
nextID is a variable that contains the ID of the next button.
I'll read up on that!
Thanks for the quick reply.