Trigger timeline action in Hype from Captivate

I’m an Adobe Edge Animate transplant that is still relatively new to Hype Pro and looking for some guidance in rebuilding my interactions. I’m also an eLearning developer with extensive experience and knowledge working with Adobe Captivate. I’ve used Edge Animate in the past to build custom eLearning interactions and then insert them into Captivate for the learner to interact with. To make this happen, I would also have to write the 2-way communication needed using both Edge Animate’s and Captivate’s JavaScript API’s.

The most important piece to make this happen, is within the compostionReady window in Edge Animate, I could stuff the parent window with the stage object, allowing for easier access in Captivate.

window.parenet.edge2stage = sym.getComposition().getStage();

Then in Captivate, using a Captivate button, if I wanted the timeline to play in reverse, all I needed to do was run this JavaScript code in using “Execute JavaScript” action attached to the button:


In Hype Pro, within the “On Scene Load” section, I’m executing a JavaScript function called sectionInfo()

Within that function is this code:

window.parent.hype2stage = hypeDocument.documentName().currentSceneName().currentLayoutName();

When I then try to then play the timeline in reverse from a Captivate button, nothing happens:

hype2stage.startTimelineNamed('Main Timeline', hypeDocument.kDirectionReverse);

Any idea of what I am doing wrong? (531.1 KB)

In the parent page you want.

HYPE.documents[hype2stage].startTimelineNamed('Main Timeline',HYPE.documents[hype2stage].kDirectionReverse);

In the Hype function you want.

window.hype2stage = hypeDocument.documentName()

Have a look at

Also you should read the documentation on the Hype API which will tell you what each API does and returns.

And you may then understand why you cannot chain in the way you were trying…

Note I do not have nor have used Captivate.