• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Javascript changes in Captivate 12.x

Community Beginner ,
Oct 31, 2024 Oct 31, 2024

Copy link to clipboard

Copied

I want to add a "Rewind 30 seconds" to a slide containing a slide video.  While I have found some sample Javascript that looks like it might work, I have not been able to get it to work yet.  I saw someplace that getCurrentFrame was deprecated under Captivate 12.x.  The broader question would be, does anyone know where there is a reference manual for the objects, methods, and properties associated with the Javascript implementation in the new Captivate?  The more specific question would be if anyone has seen code that might get me in the ballpark for this "Rewind 30 seconds" Javascript.  Thank you!

TOPICS
Advanced , Advanced actions

Views

70

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
community guidelines
Community Beginner ,
Oct 31, 2024 Oct 31, 2024

Copy link to clipboard

Copied

LATEST

Here is a simplified version of the Javascript I was using.  This should rewind the timeline by 3 seconds.

 

// Get the current slide using the Common JavaScript Interface
var currentSlide = window.cpAPIInterface.getVariableValue("cpInfoCurrentSlide");

 

// Get the current frame
var currentFrame = window.cpAPIInterface.getVariableValue("cpInfoCurrentFrame");

currentFrame = currentFrame - 90;

 

// Use the undocumented cpCmndGotoFrame variable to set the frame
window.cpAPIInterface.cpCmndGotoFrameAndResume(currentSlide, targetFrame);

Votes

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
community guidelines
Resources
Help resources