Problem
Ever had to embed a file in ToolBook which was dependant on other files?
Frustrated when trying to get it to work when the ToolBook content is exported to HTML?
Common examples are
- When a Flash file reference another Flash file or a Flash Video file
- Embedding Captivate content in ToolBook (essentially the same as above)
- Embedding a HTML file which itself has links to other files (.js, graphics etc)
Before we go to the solution let’s look at an example to understand why this happens – as this will help us understand how to fix the problem.
An example:
A flash file (a.swf) has some media controls which controls the playback of two external FLV - flash video files (b.flv and c.flv).
To embed those files into ToolBook one would link to a.swf in a media player
When you test this in Author It’ll work just fine.
When you publish to web, ToolBook will copy any media file directly used by a ToolBook object into the Media directory of the ToolBook Web export directory
In the above example Toolbook cannot “see inside” a.swf to learn that b.flv and c.flv should be copied to the media directory, hence when you test the HTML the a.swf will look for b.flv and c.flv but will not be able to find them as they are not copied by ToolBook.
An obvious solution to this problem is to manually copy b.flv and c.flv to the Media directory, however there is a problem with that:
As this is a manual process which needs to be repeated every time the ToolBook file is published to web - there is always the risk of forgetting.
In addition even though the file is now be present in the media directory there is a risk it still doesn’t work when launched through an LMS.
The reason for this is that the files b.flv and c.flv are not referenced in the IMSmanifest.xml file generated by ToolBook.
Again off course one can manually add the references in the manifest file - but one might forget or make mistakes.
So here the trick
Create a button on page in your ToolBook file (page 1 springs to mind as easy to find – but any page will do)
Now create an on Click action that looks like this.
On Click
Display Document b.flv
Display Document c.flv
Doing so will not only copy the files to the media directory but will also add them to the imsmanifest.xml.
Now hide the button (set the visible property to false) to ensure that the code we just created is never executed. We just want the lines of code to ensure that ToolBook has a link to the file so it can copy it during the export.
IMPORTANT: In the Publish HTML Settings make sure the option “Rename media files to guarantee uniqueness” is unchecked – otherwise ToolBook will rename the files and a.swf will not be able to find them.
I hope you have enjoyed this article, comments and suggests are welcome.