Skip to main content
Participating Frequently
November 12, 2020
Answered

Runtime event communication between Animate and Captivate

  • November 12, 2020
  • 4 replies
  • 1290 views

Is there documentation I'm missing on this subject? 


For example a button in the Animate animation that tells the Captivate slide to continue? I don't think I can callback from within the iframe.

 

Or a button in Captivate at the end of the animation? I tried but it is hidden by the animation when I publish, even though it is on a higher layer. The only workaround I've found is to make the animation background transparent but this is obviously not ideal. And when I try to set the z-index of the animation (.cp-WebObject) to -1 it is covered in white by the button layer.

    This topic has been closed for replies.
    Correct answer TLCMediaDesign

    Since the web object is in an iFrame, to access CP you need to preface any cp commands with window.parent in JavaScript. Here is documentation on JS in Captivate.

     

    https://helpx.adobe.com/captivate/using/common-js-interface.html

     

    To honor the stacking or you need to change UseWidget7 = 0 to UseWidget7 = 1 in the AdobeCaptivate.ini file located here:

     

    C:\Program Files\Adobe\Adobe Captivate 2019 x64\

    4 replies

    Widget King
    Inspiring
    November 20, 2020

    This is the sort of thing that the newly released CpMate plugin is supposed to assist with.

    For example, Captivate has the system variable cpCmndPause which allows you to pause the movie by assigning it with 1.

     

    With CpMate installed, you can use it's javascript api to read/write Captivate variables such as cpCmndPause

    X.captivate.variables.cpCmndPause = 1

     

    CpMate and CpExtra go hand in hand. With CpExtra installed you can create the xcmndHide and xcmndShow variable which can be used to hide and show objects in Captivate.

    Say you had a button in Captivate called Button_1 which you want to show at a certain point in your animation. You could do so from Adobe Animate with the following Javascript:

    X.captivate.variables.xcmndShow = "Button_1";

     

    From your question it seems you may want Captivate to influence what kind of animation will play. This is possible using CpMate's bound movie clips.

    Participant
    November 20, 2020

    I have not enough ablilty about codes. Please contact and help me. I am in serious trouble. ozgur.uyar@gsi.com.tr

    TLCMediaDesign
    TLCMediaDesignCorrect answer
    Inspiring
    November 12, 2020

    Since the web object is in an iFrame, to access CP you need to preface any cp commands with window.parent in JavaScript. Here is documentation on JS in Captivate.

     

    https://helpx.adobe.com/captivate/using/common-js-interface.html

     

    To honor the stacking or you need to change UseWidget7 = 0 to UseWidget7 = 1 in the AdobeCaptivate.ini file located here:

     

    C:\Program Files\Adobe\Adobe Captivate 2019 x64\

    Participating Frequently
    November 19, 2020

    Great, I got it working, thanks. Documentation doesn't mention that you need to add "parent" in your Animate code, for example

    window.parent.cpAPIInterface.pause();

    rather than 

    window.cpAPIInterface.pause();

     

    TLCMediaDesign
    Inspiring
    November 19, 2020

    That's because they are not mentioning anything about code that is runnning in an iFrame.

    Lilybiri
    Legend
    November 12, 2020

    You will need to program this with JS. There is no easy collaboration between Animate animations and Captivate like was possible with SWF animations.