Tutorial: Adobe Captivate 5 hosted in the cloud

0

I recently worked on a project for a client that wanted to host his Captivate files on one server and use an HTML file on several different servers to let users access the project.

Basically the content files were to be hosted in the cloud and then he would just upload the standard Captivate generated HTML file with updated links on several other servers.

The benefit of this approach is that hosting the content in the cloud provided a very flexible and powerful delivery method and when it came to updating the content this would only need to be done in one place even though the project could potentially be accessed from a hundred different domains.

Now – hosting the Captivate SWF and standard.js files on one domain and accessing these through an HTML file on a different domain require a bit of editing and groundwork before it will work.

Crossdomain.xml

The first thing you need to take care of is to set up a Crossdomain policy on the domain that hosts the content files. Adobe Flash Player uses some security rules to prevent content from doing bad things to your computer. One of these rules is know as the crossdomain policy. Basically this means that if you have a Flash file on one domain that is being executed or requires files from another domain then Flash needs to know that this is ok.

This is done by creating a Crossdomain.xml file that the Flash Player will read first to see if everything is ok.

A crossdomain.xml file is a relatively simple file that you need to place in the root directory of your domain/server hosting the content files.

This is an example of a Crossdomain.xml file that will allow access to your content from all other domains. The wildcard characther “*” has been used meaning that all domains can access it. You could also specify the domains specifically if you prefer that approach.

1
<!--?xml version="1.0"?-->

Now that our crossdomain policy is in place then we need to add one more thing in the HTML file that Adobe Captivate 5 generates.

Allow script access

Since our standard.js file is hosted on a different server than our HTML file that loads the content we need to specify that script access for this content is ok. This is done by adding a parameter to the SWFObject that loads your Captivate Swf.

1
so.addParam('allowscriptaccess', 'always');

The above parameters states that script access is always allowed. This is what you need to use if you are hosting your content on a different server than the HTML file. Other values for the parameter is “sameDomain” and “never” but these are not useful in this scenario.

Changing the links

The last thing you need to do if of course to edit the links that specifies where the HTML file should get the content from.

In the standard Adobe Captivate generated HTML file you would have two lines similar to this:

1
2
3
<script src="standard.js" type="text/javascript"></script>
 
var so = new SWFObject("mySwf.swf", "Captivate", "641", "512", "10", "#CCCCCC");

You would need to change the URLs to reflect their new hosting location

1
2
3
 <script src="https://www.cpguru.com/standard.js" type="text/javascript"></script>

var so = new SWFObject("https://www.cpguru.com/mySwf.swf", "Captivate", "641", "512", "10", "#CCCCCC");

That’s all you need to do. Once you have followed these instructions you can host your content files on one domain/server and host HTML files on any amount of other domains you want to.

/Michael

Share.

Comments are closed.