Dear all,
I turn again to your expertise for a Javascript item.
I’m trying to come up with a code (for AP6) to make a button which on click would move the user 10 seconds back on the current slide. If time on current slide is less than 10 seconds it would restart slide from 0.
but I can’t seem to find the Time() information _ I saw it is .time() in AP7 and tried Prez.Time() and Prez.Session.Time() but it did not work.
Goal is to have something like
if(slide.time < 10000)
Prez.Restart(Prez.Session.SlideIndex,0)
else
Prez.Restart(Prez.Session.SlideIndex,slide.time - 10000)
any clue how to get the time information and if the above could work with that?
FYI - this is again linked to SCORM test mode - as you cannot manage the timeline/go back - we need something so that the user can rehear something he missed.
var time = Prez.GetSlide().ts - 10000;
if (time < 0)
time = 0;
// Prez.Session.SlideIndex is zero based, but Prez.ShowSlide requires 1 based index, so add 1
Prez.ShowSlide(Prez.Session.SlideIndex + 1, time);
Hi Toanis,
I’m trying to convert this code to AP7 JS but I’m struggling with the
“Prez.GetSlide().ts” part…
I tried . prez.currentSlide().time() and various other combinations but to no avail.
Can this still be done in AP7?
as a side note - I managed to convert most other items from AP6 to 7.
But found 2 issues/confusing points in the manual:
Page 213 : pause(paused) is in fact pause(!paused) or even pause(!prez.paused)
Page 213: restart(slideIndex, time) starts in fact from index 0 [at least with a presentation created initially in AP6 and now saved in AP7] at not at index 1.
can I use the same code in AP8?
We also need a button where you can go back for 10 secons so the user can resee something he missed or miss understood in the video.