Copy link to clipboard
Copied
I hope I am missing something simple. I have 2 buttons: play_nav and pause_nav. Play_nav is hidden. Both buttons, when clicked call the same javascript function. The function hides the calling button and shows the other. The function is supposed to pause or play the movie.
But...
I can only get the movie to pause, nothing I do will make the movie play again. Below is my code, you can see all the commented out parts are different ways I have tried to make the player start again, but nothing seems to work.
I am using Captivate 2017 on a Mac.
Any ideas would be a great help!
function PLaD_pausePlay(theButton){
if(theButton=="pause"){
console.log("**** pause button clicked ****");
cp.show("play_nav");
cp.hide("pause_nav");
cp.movie.pause(cp.ReasonForPause.PLAYBAR_ACTION);
}else{
console.log("**** play button clicked ****");
// cpCmndPause = false;
//cp.movie.paused=false;
//window.cpCmndResume=1;
//cpAPIInterface.setVariableValue("cpCmndResume",1);
// cp.actionChoiceContinueMovie();
//window.cpAPIInterface.play();
//cp.playPause(cp.ReasonForPlay.PLAYBAR_ACTION);
cp.movie.play(cp.ReasonForPlay.PLAYBAR_ACTION);
cp.hide("play_nav");
cp.show("pause_nav");
}
Make sure you select the, "continue playing the project" check box for your Play button.
You can then just use:
cp.movie.play();
Copy link to clipboard
Copied
I always use advanced actions and a multistate button to toggle but if you want JS, what is wrong with:
window.cpAPIInterface.play();
window.cpAPIInterface.pause();
Copy link to clipboard
Copied
Make sure you select the, "continue playing the project" check box for your Play button.
You can then just use:
cp.movie.play();
Copy link to clipboard
Copied
Well, poop. That solved it. That is rather counter-intuitive, if I am explicitly calling cp.movie.play(); it ought to play.
With "continue playing the project" check box checked, you don't even need to call cp.movie.play(); The movie will continue to play because of the checked box.
I think I will file a bug report.
Thanks!
Copy link to clipboard
Copied
I was thinking exactly the same thing after posting this. I didn't test whether the "Continue playing...." was the only trigger it needed to fire.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more