Highlighted

Problem getting captivate project height

Community Beginner ,
Jan 29, 2020

Copy link to clipboard

Copied

Hi,

 

We are loading a 2019 captivate project in our website via iFrame. Is there any javascript event we can listen on parent page (where iframe is located) to understand when captivate has finished loading.  The problem is that the iframe height needs to be resized to match captivate project height and we dont know when it completes loading.

Adobe Community Professional
Correct answer by TLCMediaDesign | Adobe Community Professional

This script will let you know:

 

var iframe = document.getElementById('myFrame');

iframe.contentWindow.addEventListener( 'moduleReadyEvent', function ( e )
{
console.log("loaded");
});

TOPICS
Advanced

Views

785

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Problem getting captivate project height

Community Beginner ,
Jan 29, 2020

Copy link to clipboard

Copied

Hi,

 

We are loading a 2019 captivate project in our website via iFrame. Is there any javascript event we can listen on parent page (where iframe is located) to understand when captivate has finished loading.  The problem is that the iframe height needs to be resized to match captivate project height and we dont know when it completes loading.

Adobe Community Professional
Correct answer by TLCMediaDesign | Adobe Community Professional

This script will let you know:

 

var iframe = document.getElementById('myFrame');

iframe.contentWindow.addEventListener( 'moduleReadyEvent', function ( e )
{
console.log("loaded");
});

TOPICS
Advanced

Views

786

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 29, 2020 0
Contributor ,
Jan 29, 2020

Copy link to clipboard

Copied

Hello !...

Maybe I miss something in your question... But as I use also iFrame to load Cpt projects in html pages, I don't know why your iframe height needs to be resized as you can put the sizes you want in the line of command of the iFrame.

Here is what I used :

<p align=”center”><iframe src=”Your_Folder_Project/index.html” frameborder=”0″ width=”Width_Of_Your_Project″ height=”Height_Of_Your_Project″></iframe></p>

(See also here an example : https://elearning.adobe.com/2020/01/small-menu-flash-vs-captivate/)

Happy Captivating !...

😉

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 29, 2020 0
Community Beginner ,
Jan 29, 2020

Copy link to clipboard

Copied

Hi,

 

Thanks for your reply.  The problem is that when the project loads it is not loading properly.  It is squeezing up to a small portion of the iframe.  So we provide a button to resize and then it fits correctly.  So initially it is not loading to the width that we are setting.  We found that once the project loads if we trigger a refresh at that point then it will load and we can remove the mnaual button for this purpose.  It is not very intuitive for our students and if they dont click the button it is squished up to the top of the iframe.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 29, 2020 0
Contributor ,
Jan 29, 2020

Copy link to clipboard

Copied

Strange that it doesn't load properly ?

See here an example on this page :

http://soutien67.fr/math/activites/frises/frises_01.htm

The project on top is loading via iFrame.

Do you use a "starting image", same size of your project to replace the grey starting buton of Captivate ?  

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 29, 2020 1
Adobe Community Professional ,
Jan 29, 2020

Copy link to clipboard

Copied

This script will let you know:

 

var iframe = document.getElementById('myFrame');

iframe.contentWindow.addEventListener( 'moduleReadyEvent', function ( e )
{
console.log("loaded");
});

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 29, 2020 0
toddr1 LATEST
Community Beginner ,
Feb 06, 2020

Copy link to clipboard

Copied

thank you!  This did the trick!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 06, 2020 0