Highlighted

Preventing Learner from Continuing to the Next Slide

Explorer ,
May 06, 2020

Copy link to clipboard

Copied

Hi All,

I want to show the progress bar, but disable users from being able to use it to jump to other slides. I did find some Javascript from

https://medium.com/@barsh/adobe-captivate-javascript-hacks-to-disable-playbar-slider-mark-all-slides...

that seemed to work, but when QAing in browsers like Firefox, old Edge, etc it doesn't seem to work and users can jump slides with the progress bar. The script does seem to work in Chromium based browsers like Chrome, new Edge, and also IE. Any thoughts? Thanks.

I've solved my own problem, by adding addtional lines.

 

// hide the slider thumbnail
var thumbEl=document.getElementsByClassName('playbarSliderThumb')[0]
thumbEl.style.display='none'


// disable drag and click slider navigation
if (!cp.playbar.mainMovie._jumpToFrame) {
cp.playbar.mainMovie._jumpToFrame =
cp.playbar.mainMovie.jumpToFrame
cp.playbar.mainMovie.jumpToFrame = function(a) {
var stack = new Error().stack
var callerIsNotPlaybar =
stack.indexOf('HTMLCanvasElement.moveSlider') == -1
&& stack.indexOf('PlayBarSlider.moveSlider') == -1
if (callerIsNotPlaybar)
cp.playbar.mainMovie._jumpToFrame.call(cp.playbar.mainMovie, a)
}
}

 

pbs = document.getElementById("playbarSlider")
pbs.onclick = function() {}

Topics

Advanced, Advanced actions

Views

340

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Preventing Learner from Continuing to the Next Slide

Explorer ,
May 06, 2020

Copy link to clipboard

Copied

Hi All,

I want to show the progress bar, but disable users from being able to use it to jump to other slides. I did find some Javascript from

https://medium.com/@barsh/adobe-captivate-javascript-hacks-to-disable-playbar-slider-mark-all-slides...

that seemed to work, but when QAing in browsers like Firefox, old Edge, etc it doesn't seem to work and users can jump slides with the progress bar. The script does seem to work in Chromium based browsers like Chrome, new Edge, and also IE. Any thoughts? Thanks.

I've solved my own problem, by adding addtional lines.

 

// hide the slider thumbnail
var thumbEl=document.getElementsByClassName('playbarSliderThumb')[0]
thumbEl.style.display='none'


// disable drag and click slider navigation
if (!cp.playbar.mainMovie._jumpToFrame) {
cp.playbar.mainMovie._jumpToFrame =
cp.playbar.mainMovie.jumpToFrame
cp.playbar.mainMovie.jumpToFrame = function(a) {
var stack = new Error().stack
var callerIsNotPlaybar =
stack.indexOf('HTMLCanvasElement.moveSlider') == -1
&& stack.indexOf('PlayBarSlider.moveSlider') == -1
if (callerIsNotPlaybar)
cp.playbar.mainMovie._jumpToFrame.call(cp.playbar.mainMovie, a)
}
}

 

pbs = document.getElementById("playbarSlider")
pbs.onclick = function() {}

Topics

Advanced, Advanced actions

Views

341

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
May 08, 2020

Copy link to clipboard

Copied

I've solved my own problem, by adding addtional lines.

 

// hide the slider thumbnail
var thumbEl=document.getElementsByClassName('playbarSliderThumb')[0]
thumbEl.style.display='none'


// disable drag and click slider navigation
if (!cp.playbar.mainMovie._jumpToFrame) {
cp.playbar.mainMovie._jumpToFrame =
cp.playbar.mainMovie.jumpToFrame
cp.playbar.mainMovie.jumpToFrame = function(a) {
var stack = new Error().stack
var callerIsNotPlaybar =
stack.indexOf('HTMLCanvasElement.moveSlider') == -1
&& stack.indexOf('PlayBarSlider.moveSlider') == -1
if (callerIsNotPlaybar)
cp.playbar.mainMovie._jumpToFrame.call(cp.playbar.mainMovie, a)
}
}

 

pbs = document.getElementById("playbarSlider")
pbs.onclick = function() {}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
Captivate User Guide
New Group