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

Can I send a resume command from a click in an HTML5 animation?

Guest
Oct 27, 2015 Oct 27, 2015

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

240
Translate
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

correct answers 1 Correct answer

Deleted User
Oct 28, 2015 Oct 28, 2015

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

...
Translate
Guest
Oct 28, 2015 Oct 28, 2015
LATEST

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.

Translate
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