Why do some books crash or fail on export?

This is a real problem for ToolBook developers. It would seem like the problem is a faulty authoring tool, but as you will see, this is NOT the case.
WHY THIS HAPPENS?
It is important to understand the limits that the ToolBook authoring environment imposes.
Solutions
http://www.pgsoftwaretools.com/powerpac/assessments/xml_forumpost/index.html
The above example only needed a single line of Action code for the on load page event to load the XML file using XMLHttpRequest(). You can study the XML file to understand how this works. I've included a copy of it below. Notice the file instructs ToolBook to execute code and PowerPac functions when it loads AND it provides for functions, or methods, of objects so ToolBook can execute portions of the code where necessary. I've commented the XML to clarify the purpose of each section.
(NOTE: Some features in this XML file require PowerPac v13.x or greater for support.)
WHY THIS HAPPENS?
It is important to understand the limits that the ToolBook authoring environment imposes.
- You cannot have more than 32k of code assigned to any one object.
- The 32k code limitation is a combination of Action code and openScript.
- Everytime your add an Action to your book, the authoring system has to duplicate the Action by automatically adding openScript code to the same object on which the Action code is placed.
- Therefore, several long Action sequences can quickly fill up your resource limit in ToolBook and make the book unstable, or make it impossible to export successfully.
- If you have lots of objects on the page each with Action code attached, the instability of the book will increase.
- The use of many UMP (media play) objects can bring down your project. The PowerPac media players offer a more robust alternative and do not involve anything but a single line of action code.
Solutions
- REMOVE all instances of the UMP. It doesn't even work reliably in all modern browsers anyway. Instead, use PowerPac's media players for both sound and video.
- Optimize your Action code by using fewer lines to accomplish the same task.
- Spread out your Actions on several objects rather than on just the page, or background.
- Consider using XML files to offload your code to objects that get dynamically loaded outside of the ToolBook authoring environment. You can still fire clicks, triggers, or user events. And you can still be notified by XML objects when data is handled. Objects created by the PowerPac's XML Parser are not restricted by size, etc. XML created objects in ToolBook improve the performance and speed of the export of your book.
- Please examine the topics in the XML section of this forum for more information and examples.
http://www.pgsoftwaretools.com/powerpac/assessments/xml_forumpost/index.html
The above example only needed a single line of Action code for the on load page event to load the XML file using XMLHttpRequest(). You can study the XML file to understand how this works. I've included a copy of it below. Notice the file instructs ToolBook to execute code and PowerPac functions when it loads AND it provides for functions, or methods, of objects so ToolBook can execute portions of the code where necessary. I've commented the XML to clarify the purpose of each section.
(NOTE: Some features in this XML file require PowerPac v13.x or greater for support.)