Skip to main content
TLCMediaDesign
Inspiring
January 17, 2017
Question

Make WebObjects Interactive when using UseWidget7

  • January 17, 2017
  • 2 replies
  • 1955 views

I know there has been a ton of discussion on how to have your Widgets/WebObjects/HTML5 Animations follow the stacking order by using UseWidget7 in the AdobeCaptivate.ini file.

Unfortunately in Chrome, sometimes in IE you lose all interactivity when setting UseWidget7 to 1.

Well I finally had a project where this became a serious issue as well, so I decided to dedicate a Saturday to solving this issue.

And here it is. Insert this JavaScript in the head of your index.html or the index.html template and it will automatically restore the interactivity of any WebObject while keeping the stacking order.

interfaceObj, eventEmitterObj, interval;

window.addEventListener( 'moduleReadyEvent', function ( e )
{
interfaceObj = e.Data;
eventEmitterObj = interfaceObj.getEventEmitter();
initializeEventListeners();
});

function initializeEventListeners()

if ( interfaceObj )
{
  if ( eventEmitterObj )
  {
   eventEmitterObj.addEventListener( 'CPAPI_SLIDEENTER', function ( e )
   {        
    interval = setInterval( checkExists, 100, e )
   });
  }
}
}

function checkExists( e )
{
if ( cp.model.data.project_main.useWidgetVersion7 == true )
{
  var getFrame = document.getElementsByTagName( 'iframe' );
 
  if ( getFrame.length > 0 )
  {
   clearInterval( interval );
   interval = null;
 
   var myFrame = getFrame[ 0 ].id;
   var str = myFrame.substring( myFrame.indexOf( '_' ) + 1 );
   var frameCover = str.substring( 0, str.length - 1 );
  
   if ( frameCover )
   {
    document.getElementById( str.substring( 0, str.length - 1 ) ).style.visibility = 'hidden';
    document.getElementById( str.substring( 0, str.length - 1 ) ).style.pointerEvents = 'none';
   }
  }
}
else
{
  clearInterval( interval );
  interval = null;
}
}

    This topic has been closed for replies.

    2 replies

    Participating Frequently
    April 24, 2018

    Hi,

    I've been trying to come up with a solution for this for awhile, I tried placing this code into the index.html file and my WebObject still remains inactive. I've removed all the other objects and images from the slides, just to test it and that does not appear to work either. Any advice?

    TLCMediaDesign
    Inspiring
    April 24, 2018

    Did you put the code between <script></script> tags?

    Can you open the console and see if there are any errors thrown?

    TLCMediaDesign
    Inspiring
    April 25, 2017

    An update to this:

    If you have an image behind the web object, it will block user interaction also. We had a video inserted as an html5 animation with an image behind covering the content area. Users could not interaction with the video controls and they would not appear on hover.

    We needed to execute the following JavaScript on slide enter for each slide where this anomaly occurred.

    document.getElementById( 'Image_100' ).style.pointerEvents = 'none';

    document.getElementById( 'Image_100c' ).style.pointerEvents = 'none';

    document.getElementById( 're-Image_100c' ).style.pointerEvents = 'none';

    January 11, 2018

    Hi David,

    I am embedding an iframe video in as a WebObject publishing in HTML5 format loading to an AICC LMS.

    I set 'UseWidget7 = 1' and the WebObject 'goes to the back' but I lose control over the video.

    Am I right in understanding  that the above code inserted in the index.html file of the published course will return the the ability to interact with the video controls?

    If so, am I right in assuming that UseWidget7 should still be set to 1?

    Is there a way to set 'UseWidget7 = 1' in the index file instead of having to change it in the .ini file?

    Thanks