Adobe Connect User Community
Menu

#1 2010-12-13 18:20:39

**_jlampitt_**

Publishing Captivate

Good afternoon all,

My apologies if this is in the wrong forum, but I think my questions are more relevant to this group than the Captivate group.

I have the disadvantage of NOT having access to a Connect Pro environment. I am a Flash/Flex/Web developer caught between a third-party creating several Captivate modules and another group that owns/controls the Connect Pro environment. I've been tasked at a late hour (relative to the project timeline) to create a custom HTML wrapper for the Captivate content (swf's).

My client is asking me to inject some custom javascript in the HTML wrapper to 1) resize the window upon launch and 2) perform some other custom functions such as popping a survey window when the student/viewer closes the module window.

All of this functionality has to match Articulate content that's already published to the Connect Pro server. I've tried "borrowing" some of the code from the Articulate generated wrappers (index_lms.html and player.html) but things aren't working.

So, I feel like I'm missing a block of information about 1) how Connect Pro launches content, 2) how to correctly resize the window, and 3) what "controls" are available within the Connect Pro server environment that might be able to do some of this work for me.

I've Googled till my fingers turned blue, but since I don't know what I don't know, it's a bit like looking for a needle in a haystack.

Any information would be greatly appreciated. Please let me know if I can clarify my request/questions in any way.

Thank you,

JL

Offline

#2 2010-12-14 00:05:31

**_Purnima_**

Re: Publishing Captivate

I am unsure if Connect can let you resize the Meeting/Pod by some code. They block any code that tries to access _root i.e meeting swf that actually loads Connect Meeting/training room.

As far as popping up a quiz is concerned, again I see same problem.  I have myself never tried this but all the training content do have quiz at the end. And we usually do that by using either Presenter or Captivate. Presenter had Quiz capability almost at par with Articulate.

If this doesn't help, let me know how you plan to user Connect for training? Through Virtual classrooms or Course and curriculum? Which Connect Version are you using?
May be Connect SDK can help you.

Offline

#3 2010-12-14 09:29:01

**_AChemey_**

Re: Publishing Captivate

jlampitt,

To resize, add this code (though you'll want to modify for your needs) to the HTM launch file created by Captivate when publishing:

function resizeWindow()
{
    top.window.moveTo(0,0);
    if (document.all)
    {
        top.window.resizeTo(screen.availWidth,screen.availHeight);
    } else if (document.layers || document.getElementById) {
        if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth)
        {
            top.window.outerHeight = top.screen.availHeight;
            top.window.outerWidth = top.screen.availWidth;
        }
    }
}
setTimeout(resizeWindow, 1000);



To handle a new window when the content window is closed, just add a function call to "beforeOnUnload" call in the body tag to open a new window.  Pop-up blockers would have to be disabled.  You could also add a method to the Captivate file to open a new browser/window/url when the content is finished.

Regards,

Andrew

Offline

#4 2010-12-14 10:30:28

**_jlampitt_**

Re: Publishing Captivate

Hello Andrew!

Thanks for the reply. I do have one question though...

From examples I've previewed in Firefox (using Firebug), it looks like the Connect Pro server "wraps" any content (HTML, SWF) into it's own HTML frameset. That frameset contains it's own "resizeWin(x,y)" javascript function that executes onload.

Is there any way to disable that?

Offline

#5 2010-12-14 10:40:50

**_AChemey_**

Re: Publishing Captivate

JL,

If Connect is on a hosted server, I am not aware of any way to disable the frameset code as you are requesting.  If Connect is on a licensed server, you can modify the launcher on the server. 

The code snippet I provided does handle the resizeWin call made by Connect, by waiting a second (hopefully after the resizeWin was called) to resize the window again. 

Regards,

Andrew

Offline

#6 2010-12-14 10:48:26

**_jlampitt_**

Re: Publishing Captivate

Wonderful! Thank you so much for the information. It's greatly appreciated!!

Offline

#7 2010-12-14 11:11:10

**_Purnima_**

Re: Publishing Captivate

Thanks Andrew!

I never did this. This is gr8 information.

Offline

#8 2010-12-16 18:10:16

**_jlampitt_**

Re: Publishing Captivate

Hey all,

Well, I ran into a wrinkle... which leaves me hunting for a bit more information.

The resize script above works just fine. BUT the default wrapper and frameset generated by the Connect Pro server has an onload handler attached to it. So while the script above executes just fine, the onload handler for the frameset it's sitting in fires AFTER the entire Captivate file has downloaded... which then resizes the window to the wrong dimension.

Is there some kind of manifest file I can put together to tell the Connect Pro server how to configure the wrapper it's generating?

I'm stuffing all my content and support files into a .zip archive and uploading to the Connect server that way.


I've tried things like trying to disable the parent frameset onload handler and a variety of other tactics. It would seem like the key is to get the connect pro server to properly generate the wrapper file in the first place.

Offline

#9 2010-12-17 09:21:13

**_AChemey_**

Re: Publishing Captivate

jlampitt,

I haven't looked (call me lazy) to see whether it's possible to externalize the "breeze-manifest.xml" from Captivate.  If so, you could modify the size of the browser in that file after publish.

You could also add a Flash file into the first frame of your file which calls ExternalInterface (or otherwise calls your JS function to resize the window).

Regards,

Andrew

Offline

#10 2010-12-18 09:02:44

**_pointblank_**

Re: Publishing Captivate

wow..that great. good job.

Offline

#11 2010-12-21 12:43:15

**_jlampitt_**

Re: Publishing Captivate

Hello all,

I wanted to follow up on this thread after doing some additional Googling...

There are several threads in various spots around the web for resizing the window using a javascript timeout in a custom-made HTML wrapper (generally a modified version of what Captivate publishes... we'll call this the Captivate wrapper). That's fine and dandy except that using a timeout as a solution doesn't really work because of the frameset that the Connect Pro server generates. This frameset has it's own onload handler that executes when the frame content has finished loading.

So, what you end up with is something of the following sequence...

-Launch from Connect Pro
-Captivate wrapper executes a window resize while Captivate content is still loading
-Captivate content finishes loading and triggers the Connect Pro generated frameset onload event, resizing the window to the ?default? 800 x 600 size.

So, unless there's some way to disable the Connect Pro generated frameset onload event, I'm not sure how folks are getting the original proposed solution to work?

For now, I've had to settle with modifying the breeze-manifest.xml file and waiting for the frameset onload event to execute. Ugly, but it works.

Just curious if anyone might have some additional thoughts?

Offline

#12 2011-01-11 01:55:32

**_CampervanChCh_**

Re: Publishing Captivate

AChemey wrote:

jlampitt,

To resize, add this code (though you'll want to modify for your needs) to the HTM launch file created by Captivate when publishing:

function resizeWindow()
{
    top.window.moveTo(0,0);
    if (document.all)
    {
        top.window.resizeTo(screen.availWidth,screen.availHeight);
    } else if (document.layers || document.getElementById) {
        if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth)
        {
            top.window.outerHeight = top.screen.availHeight;
            top.window.outerWidth = top.screen.availWidth;
        }
    }
}
setTimeout(resizeWindow, 1000);



To handle a new window when the content window is closed, just add a function call to "beforeOnUnload" call in the body tag to open a new window.  Pop-up blockers would have to be disabled.  You could also add a method to the Captivate file to open a new browser/window/url when the content is finished.

Regards,

Andrew

Thanks. Lots of help.

Offline

Board footer