Skip to main content
Inspiring
September 6, 2018
Question

Communication from Animate .oam file to Captivate broken when exported as SWF

  • September 6, 2018
  • 0 replies
  • 213 views

I'm working on a Captivate project and unfortunately it needs to be published as a .swf file (still haven't completely converted everything over to HTML). I have created multiple interactions in Animate before and exported them as .oam files to be used in my Captivate projects, so I'm familiar with the workflow, but my other Captivate projects were all exported as HTML. In those instances, all the communication between my .oam files and Captivate works well (things such as jumping around slides, etc.)

In my current project though, when I publish it out as .swf and test it in Internet Explorer, the .oam files show up, but none of the interactivity to Captivate is working. Does anyone have any insight into this?

My code in Animate I grabbed from this blog post - Goto slide by slide name & goto slide containing shape with name in javascript - eLearning

So this is the main chunk of what grabs the slide names:

function gotoSlideNamed(aName) {

   var cpObjectList = Object.getOwnPropertyNames(window.parent.window.cp.D);   // get all of the captivate-defined objects

   var findSlideLabels = function ( acc, val ) {   //  extract objects that have slide names

         if ( typeof window.parent.window.cp.D[val].lb == "undefined" || window.parent.window.cp.D[val].lb == "" ) return acc;

          acc[window.parent.window.cp.D[val].lb ] = window.parent.window.cp.D[val].from ;   // pick up the frame number

          return acc

          }

   var cpSlideObjects = cpObjectList.reduce ( findSlideLabels , {} )   // run the function on all of the captivate objects

   window.parent.window.cpCmndGotoFrameAndResume = cpSlideObjects[aName];  // set the "next frame" variable to the start frame of the object

   return ;

}

Then my functions for going to the slides look like this:

function JumpOne(){

gotoSlideNamed("SlideOne");

slideTL.reverse();

menuOpen = false;

}

function JumpTwo() {

gotoSlideNamed("SlideTwo");

slideTL.reverse();

menuOpen = false;

}

(I have some stuff in there for some GSAP timelines).

Any advice is much appreciated!

This topic has been closed for replies.