Copy link to clipboard
Copied
Hi, I'm starting to move into producing HTML5 content and trying to get my brain around the Javascript API, but hitting a bit of a brick wall on something that hoped would be simple...
What I want to do is: pause my Captivate slide (using the on enter slide 'pause' action) then run an animation (created in Edge) with 'click' interactions. At the end of the animation I want to then un-pause the Captivate slide/jump to the next (either automatically or with another click).
From what I've read so far I need to call 'cpAPIInterface' which will enable me to tell captivate to play?
So I've put a button at the end of my animation, gone to put an action on it (in Edge) and tried a lot of variations of function without any success... the closest I think I've worked out is 'window.cpAPIInterface.play();' but I've got a feeling I'm missing something at the start of this...
I used to be able to do this in actionscript with the line in a function; 'root.parent.root.rdcmndResume = 1;' but just cannot get my brain around the right way to code this in JS based on what I've been able to find online. Any help you can give would solve a big headache for me, and give me a major breakthrough on my current project!
Thanks in advance...
Richard
After a long morning of trying out different options I've managed to answer my own question!
It's as simple as changing 'window.' to 'parent.' in the edge animation.
So in Edge Animate, add an action to the item that is being clicked (the {} button on the items time line) in the script window choose 'click' and then enter your code: 'parent.cpAPIInterface.play();'.
Publish the file, add to your captivate project on a slide as HTML animation (Captivate 8), preview the project and fingers crossed it
...Copy link to clipboard
Copied
After a long morning of trying out different options I've managed to answer my own question!
It's as simple as changing 'window.' to 'parent.' in the edge animation.
So in Edge Animate, add an action to the item that is being clicked (the {} button on the items time line) in the script window choose 'click' and then enter your code: 'parent.cpAPIInterface.play();'.
Publish the file, add to your captivate project on a slide as HTML animation (Captivate 8), preview the project and fingers crossed it does the job.