... ..

The EnterPage

The ToolBook Developer's Newsletter
April 17, 2002

Issue 5-03

... From Platte Canyon Multimedia Software Corporation.

In This Issue

TBCON 2002: Last Chance to Register at Early Bird Prices
TBCON 2002 Preview: Great Stuff for This Year
Click2learn ToolBook Design Awards at TBCON 2002
New Dates Available for ToolBook Training Classes
The Hitchhacker's Guide to TB-DHTML
The Mistake I Made With Instructor 8.5’s Simulation Object
Plug-In Pro Tool Spotlight: Edit Object Actions
CBT Creation Tip from Chris Bell: Björk’s New Toy
Expert Information from "Learning & Mastering..." Series
OpenScript Tip from Jeff Rhodes
Actions Editor Tip by Cindy Kessler
Coming in the Next Issue
Information on Subscriptions and Article Submissions


by Chris Bell

What a fun time it is around here! Things are buzzing as we get ready for the ToolBook® and VBTrain.Net™ User’s Conference! The sessions are all set and we’re just finalizing the T-shirts and other attendee giveaways. When we’re not working on the conference, we’re enjoying the newest version of Instructor 8.5! We love its nifty new simulation object. Great job, Click2learn!

This issue of The EnterPage has information about TBCON as well as a nice guest article by Peter Jackson (who will also be coming all the way from Australia to present at TBCON). You’ll also find all the normal columns with ToolBook tips and tricks that we hope you’ll find helpful.

Enjoy the newsletter. Hope to see you in Colorado Springs in June!

Back to Top


TBCON 2002: Last Chance to Register at Early Bird Price

Act now for early-bird rates at The ToolBook® and VBTrain.Net™ User’s Conference. Prices go up May 1.

Conference rates are available at

To register, please browse to

Back to Top


TBCON 2002 Preview: Great Stuff for This Year

The 2002 Version of The ToolBook® and VBTrain.Net™ User’s Conference looks to be the strongest ever. Many of the world’s best ToolBook developers will be on hand to give presentations, offer one-on-one help at the help-desk, and more.

This year’s addition of sessions on VBTrain.Net™ offers another dimension for developers to explore. As we have said other places: Simply put, ToolBook is the best CBT and WBT authoring package in the world (we think Visual Basic .NET is the new #2). Come to the conference to learn how Microsoft’s new .NET initiative can be used to create powerful Rich-Client or Web Based Training.

For a list of sessions and descriptions, browse to:

For a list of presenters, browse to:

We will also have time for goofing off! On Monday evening, there will be the traditional conference social featuring the amazing Dave Frisk on guitar and good beer, wine, and soft drinks. While Monday is focused on socializing and meeting the key ToolBook developers, Tuesday’s social will have more of a talent-show theme. Participants in “The Hack-Ack,” a fun-focused contest, will present their projects for audience judging. Not only will the winners of the light-hearted Hack-Ack contest be announced, but so will the winners of the more serious Click2learn ToolBook Design Awards (see the article below on how to enter). Interspersed with these presentations and awards will be Karaoke numbers by conference participants. So, come ready to create great stuff for the Hack-Ack, and get your singing voices ready as well!

Back to Top


Click2learn ToolBook Design Awards at TBCON 2002

Have you written a ToolBook application that you think ranks up there with the best of the best? You'll have a unique opportunity to showcase your ToolBook application AND enter to win a Handspring Visor Deluxe, courtesy of Click2learn! Click2learn applauds the imagination and ingenuity required to write a great ToolBook application, and wants to recognize those efforts. We'll be looking for the best original ToolBook application in each of the following categories:

Best ToolBook Online Training
We are looking for an exceptional ToolBook application, deployed in DHTML, that embodies the principle of learning by doing.

Most Creative Use of ToolBook
If you've built an amazingly unique ToolBook application, native or DHTML, let us know so we can share it with the world!

How to Enter
Complete the official entry form by June 15, 2002. The form is available at:

Please complete a separate form for each application you are entering in the contest.

Bring It With You or Send It In
Please bring the application(s) you are entering with you to the conference, preloaded on a laptop if at all possible. Please also bring the application with you on CD. If you cannot attend the conference, please send a CD with your application to the Platte Canyon offices by June 15. If you will not be present to demonstrate your application, please include a brief printed set of instructions for the evaluator to walk through your application (e.g. "click on lesson 1, then choose the far left option ...") Click2learn will notify you prior to the conference on the exact day and time your application will be reviewed.

Applications will be reviewed by Click2learn's ToolBook Development team onsite at the conference.
The winners will be announced at the conference on Tuesday evening, June 25, 2002. The winner in each category will receive a prize of a Handspring Visor Deluxe, courtesy of Click2learn.

Only applications created with either ToolBook Instructor or ToolBook Assistant will be considered. Please enter content which you can release for reuse on the Click2learn web site or in other Click2learn marketing efforts. Please get approval from your employer/customer before submitting your entry. If you need to prepare a specially edited version of the application for public consumption, you may do so. See http://www.tbcon.com/awards.aspx for the complete rules and restrictions.

Please email Scott Anderson (scott.anderson@click2learn.com) with any questions.

Back to Top


New Dates Available for ToolBook Training Classes

Platte Canyon’s courses are consistently rated as “one of the best” software training classes students have taken. Check out the newly expanded schedule at Platte Canyon’s dedicated training site:

Back to Top


The Hitchhacker's Guide to TB-DHTML

by Peter Jackson


When building ToolBook applications that are deployed via the web we may need to incorporate JavaScript to build additional functions. After a few hundred times of inserting the JavaScript reference into the index.html file, I decided to build a tool that would do it for me. Knowing that fellow ToolBook users might find this tool helpful I have made it available as a Developer's Exchange Tool. Information on accessing the tool is at the end of this article.

We often need to pass ToolBook data to our JavaScript and back again. During the export process our ToolBook variable names are obfuscated and become $d, $e, $f, etc. An easy way to find which ${alpha} is our original ToolBook global variable is to assign a known initial value, say the variable name, like POST_URL = "POST_URL". After we export we can open the global.js and look for the string POST_URL and we may see:
…var $f=0; var $g="POST_URL"; var $…

Now we know that the JavaScript variable name is $g. Using this information we now need to change our JavaScript source to use $g - simple?

This method has a number of flaws, the main one being that there is no guarantee that the name will always be $g as this can change as you develop your application and add/delete global variables. This means that you need to check that the name is still $g after each export and if it is not still $g then you must change your JavaScript so that it is referencing the correct variable name. Another flaw is that you may have a suite of applications like lessons in a course and you want to have a single JavaScript file, something like a ToolBook system book. In this case then there is no way to ensure that $g will be the same for each application, which means that you need multiple JavaScript files. - Yuk.

So we need a fool-proof non-hack method to be able to safely determine the obfuscated variable name and what do we do if we want multiple variables. Enter the Action system global array variable!

Whilst global arrays are also obfuscated the actual element names are not, so if we have a global array called TB_JavaScript[] in ToolBook it may be $e[] in the global.js file. However, when we assign a value like:

TB_JavaScript["POST_URL"] = "POST_URL"

We then see:

in our global.js file.

Using an array will allow us to have multiple variables (elements) with only one unknown reference. So, how do we find this unknown reference? We know that the variable will be ${alpha} starting from d. Therefore, all we need to do is check if

$d["POST_URL"] = "POST_URL", then $e…

The following JavaScript code can be used to find the unknown variable name. Note that I use the ToolBook global array TB_JavaScript[] and assign an element and value using this same name, as follows:

_JavaScript["TB_JavaScript"] = "TB_JavaScript"

Looks a bit funny, but it works

This function will find the global array TB_JavaScript[]
In TB we MUST assign an element of this array as follows:

	TB_JavaScript["TB_JavaScript"] = "TB_JavaScript"
var TB_JavaScript = '';
function findTB_JavaScript(){
	var varName = '';
		var varName = '$' + String.fromCharCode(i)

Note how we assign the unknown variable name to a JavaScript global variable called TB_JavaScript. So assuming that we find:

$e["TB_JavaScript"] = "TB_JavaScript"

Then TB_JavaScript will contain $e as a string. For example "$e"

We can now use the JavaScript function eval() to extract/insert data. The next 2 functions provide a simple way to do just that.

// This function will set the TB_JavaScript array to the new value
// Syntax: getTB_JavaScript("POST_URL",POST_URL);
function setTB_JavaScript(ElementName, newValue){
	eval(TB_JavaScript)[ElementName] = newValue;
// This function will get the value from TB_JavaScript array
// Syntax: var POST_URL = getTB_JavaScript("POST_URL");
function getTB_JavaScript(ElementName){
	return eval(TB_JavaScript)[ElementName];

Using these two functions we now have access to our ToolBook variables in both ToolBook and in our JavaScript.
If we have a number of applications that need to HTTP Post to a single ASP then we need a method to obtain the URL for the ASP, you may have a test site and a live site. We don't want to have to change the URL in each book then re-export once for the test site and then again for the live site.

Putting It All Together

We only need to call the findTB_JavaScript() once, so we need a simple system to do this. The following Actions and subsequent JavaScript functions will show how to implement this method:


Button "Submit"
Action On click
If TB_JavaScript["POST_URL"] = ""
	Display URL: javascript:getPostURL()
End if
Set HTTP Post parameter "SessionID" to TB_JavaScript["SessionID"]
Set HTTP Post parameter "CourseID" to TB_JavaScript["CourseID"]
Set HTTP Post parameter "Score" to TB_JavaScript["Score"]
HTTP Post to: TB_JavaScript["POST_URL"]; store return value in PostError
If PostError <> ""
	Comment: Handle error returned from the ASP
End if

JavaScript Functions

// This function will get the HTTP Post URL and load the
// value into TB_JavaScript array
function getPostURL(){
	if (TB_JavaScript=="") findTB_JavaScript();
	var ServerPath = document.URL.substring(0,document.URL.indexOf('index.html'));
	var POST_URL = getParentURL(ServerPath,2) + "TB_POST.asp";

Please note that if you do not "Obfuscate JavaScript exported from Actions Editor" in version 8.5, the above will not work as the variable names change from ${alpha} to the original names with a prefix of _AXF_{original name}. So we would see: _AXF_TB_JavaScript["POST_URL"] = "POST_URL" when we are looking for: $e["POST_URL"] = "POST_URL" in our global.js file.

Tool to Add a JavaScript reference to your exported index.html file
Name: AddJS.tbk
Title: Add JavaScript to INDEX.HTML files
Description: JavaScript used to add functionality to web-exported Toolbook files must be referenced in the index.html file for the program. This utility will create a reference in the index.html file (for both ie4 and ns4) to any specified *.js file. This tool will make linking your TB-DHTML files with the JavaScript source file easy.

You can access the tool from either the Platte Canyon Website at:
http://www.plattecanyon.com/downloads.aspx (look for Peter Jackson's tools)
Or from the ToolBook developer exchange at:

Back to Top


The Mistake I Made With Instructor 8.5’s Simulation Object

by Chris Bell

The minute I got Instructor 8.5 in the mail, I ripped open the package and immediately installed it. (To be honest, after ripping open the package, I first thumbed through the included Platte Canyon catalog and THEN installed the software). After installing, the first thing I did was try out the much talked-about Simulation Object. This little object opens up a whole new way of creating software simulations in ToolBook. AND, these simulations may be exported to the web.

I dragged on a field and a push button from the catalog and was ready to set up a teeny simulation. I named my objects, set the activated property of the field so users can type in it and opened up the simulation object’s extended properties editor. I added a step under the steps tab. I navigated to the Evaluated Objects and clicked Add. To my surprise, I couldn’t see my button in the list of possible evaluated objects. I saw my text field, but not my button. Hmm, why not? I deleted the button and created a new one. Same problem. I changed the border style to checkbox and it suddenly appeared in the list. Then I changed it back to pushbutton and it wasn’t there.

After thorough testing, I decided that there was a bug in this brand new simulation object. (It certainly couldn’t be anything *I* was doing!) I fired off a message to one of the Click2learn team, gently breaking the bad news that they had a bug. Quickly I got a message back explaining, ever so gently, that it was actually my THINKING that had a bug. Pushbuttons cannot be evaluated objects because they have only one state (ready to be pushed). Check boxes and radio buttons may be evaluated because they have multiple states. Fields may be evaluated because a user may type in them.

What I was really trying to do was make the button be a trigger. That was my mistake. The minute I came to understand the difference between trigger objects and evaluated objects, the whole Simulation Object came clear.


Plug-In Pro Tool Spotlight: Edit Object Actions

At Platte Canyon, we love ToolBook’s Actions Editor. It gives a large amount of programming capabilities that work inside of ToolBook AND when exported. But when it comes to creating complex interactions on a page, we found ourselves spending too much time clicking around to various objects and trying to get to the correct event. In typical Platte Canyon fashion, when we don’t like something, we create a tool to fix it (after all, we’re all about “Improving lives…”). We created the Edit Object Actions tool, a new feature of Plug-In Pro 6.

When clicking the Edit Object Actions button in Plug-In Pro, you get a list of all objects on the page with actions. Click on the object name on the left and see a list of all handled events on the right. Double click on any of these and up pops the Actions Editor with that object and event already loaded.

This handy feature has saved us tons of time while editing actions. A favorite among developers is the ability to quickly see a list of all handled events for an object.

More information on Plug-In Pro is available at:

$495 Plug-In Pro
$165 Plug-In Pro upgrade from Plug-In Pro 5
$330 Plug-In Pro upgrade from Version 4 and older

Back to Top


CBT Creation Tip from Chris Bell: Björk’s New Toy

Before she became talk of the town last year wearing a swan dress to the 2001 Oscars, Björk was a singer. Her vocal performance with the Icelandic pop group Sugarcubes and later her solo career has established her as a superstar among the electronic dance music crowd … even if her singing cannot usually be described as melodic. How does Björk’s singing career relate to creating e-Learning? Well I did say she does “electronic” dance music.

In a recent interview in Wired magazine, Björk mentioned that her favorite new toy is a MOTU 828. She likes it because, “it’s a firewire rack that replaces the soundcard, which means I can plug my microphone straight into my laptop, and it’s got the best recording quality there is.” Whoa! And I thought she could only make a splash in music, movies, or TV. Now she’s hit the big-time with the e-Learning crowd as well! The MOTU 828 sounds like a great device for those of us doing voice-overs. No more recording onto an intermediate machine like DAT decks or digital camcorders first and then transferring the files to the computer. We can record high quality sound straight into the computer! MOTU 828 avoids all the noise of computer innards (such as fans) and gives us pristine sound without needing to go to any other medium first. More information on MOTU 828 is available at http://www.motu.com.

Another exciting related device is the Sound Blaster Extigy. This external sound card looks to offer some connectivity (albeit through the lowly USB port rather than the glitzy firewire port). One key difference here is that while the Extigy looks to have a Mic Input, the MOTU 828 is set up for professional studio mics and other inputs requiring balanced or unbalanced inputs and possibly needing phantom microphone power. It is yet to be seen if the Extigy’s inputs can be noise-free as the MOTU 828 allows.

Price wise, the Extigy comes in at a reasonable $150 while the MOTU 828 sells for $795. With such a difference in price, the Extigy may be worth considering before jumping to the MOTU 828. Either way, with this new crop of recording options, the old methods of recording to an intermediate medium seem to be singing their swan song.

Back to Top


Expert Information from "Learning & Mastering ToolBook Instructor"

from Jeff Rhodes

Question Object Tips

Although the question objects are fairly robust and self-explanatory, here are a few tips that might be helpful.

  1. When you are building a multiple choice question with more than one correct answer, you first need to check the "multiple choice/multiple correct" box on the Answers tab. You then must assign a NEGATIVE score to any of the wrong answers on the Score tab. Otherwise, if your user selects all the correct ones AND some wrong ones, the question will still be scored as correct.
  2. How do you make each answer count as a "try" without showing any feedback until the question is locked? On the "Immediate Feedback" tab, click the "Select All Incorrect" button and then send the message: ASYM_playSummaryFeedback. Don't have any feedback text. Make sure that there is no "Delayed Feedback" assigned. Each time the user selects a wrong answer, there will no feedback but it will count as a try toward locking the question. Thanks to John Hall of the Arizona Health Sciences Center (and moderator of the ToolBook List) for this tip.
  3. When you create a "Definable Arrange Object" question where there are several "check marks" and "x's" that you drag to the right location, you will have more than one check mark object. Each can go to any of the "check mark" locations. To set this up, you first check the "Look for multiple objects with same name" box on the Answers tab. Then name all your check marks with the same name.
  4. When you use a definable multiple choice question, its default behavior is to draw a green and blue rectangle around each selection. If you want different behavior (and you are NOT publishing to DHTML), you'll need to edit the shared script [ASYM_WID_DefMultiChoice] of the object as shown below. Once you have your revised object working, add it to your catalog to use later.
to handle ASYM_WID_Chosen obj, mode
	if mode
		-- edit script below for different behavior
		bnds = bounds of obj
		if _lineRef of obj <> NULL
			select _lineRef of obj
			draw angledline from 0,0 to 0,0
		x = item 1 of syspageunitsperpixel * 3
		y = item 2 of syspageunitsperpixel * 3
		pop bnds into x1; pop bnds into y1; pop bnds into x2; pop bnds into y2
		vertices of selection = x1-x,y1-y,x2+x,y1-y,x2+x,y2+y,x1-x,y2+y,x1-x,y1-y
		linestyle of selection = dotted
		strokecolor of selection = green
		fillcolor of selection = blue
		_lineRef of obj = selection
		if _lineRef of obj <> NULL
			select _lineRef of obj
			if selection <> NULL
				send clear
			clear _lineRef of obj

Back to Top


OpenScript Tip from Jeff Rhodes

Working with Rich Text Format (RTF) Files

Although the Find Object tool is a welcome addition to Instructor, sometimes it is more efficient to find AND change an object at the same time. In this case, the getObjectList() function is usually the "weapon" of choice. The code below (to be run in the Command Window) searches the entire book for hotwords named "Librarian" (referring to the now-defunct Click2learn Librarian product). It then changes both the name and text of the hotword to be the name of the replacement product, Ingenium. I’ll be needing to use this function again in the next “Learning and Mastering” version to replace “Ingenium” with “Aspen.”

numChanged = 0
step num from 1 to pageCount of this book
	pageID = page num
	hotList = getObjectList(pageID, "hotword",
	while hotList <> null
		pop hotList
		hotText = text of it
		if name of it = "Librarian"
			name of it = "Ingenium"
			text of it = "Ingenium"
			increment numChanged
		end if
	end while
end step
request numChanged
Back to Top 


Actions Editor Tip by Cindy Kessler

Creating Navigation Paths

[Note: an example of this application is available at:

This example shows how to use the Actions Editor to provide two different navigation paths through training.

The first page the user sees has two buttons: "Beginner" and "Advanced." The user can select either "path."

There are two hidden fields on the page, each corresponding to one of the path buttons. Each field holds a comma-delimited list of numbers corresponding to the pages for that path. (The pages in this training are named "training 1," "training 2," etc., and the fields contain lists such as 1,2,4,5 etc.)

Both "path" buttons have one action sequence:

-- On click... --
Execute Shared Actions "BuildNavPath"
Execute Shared Actions "GoBackOrNext"

When one of the buttons is clicked, "BuildNavPath" is called with the text of the field corresponding to the button as the pathPageNums parameter. The "BuildNavPath" shared action then parses the list into a global "navPath" array and sets the global "numPages" variable:

-- Shared Actions "BuildNavPath" --
Set pathList to pathPageNums
Set numPages to 0
Loop while pathList <> ""
  Set numPages to numPages + 1
  Set commaOffset to offset(",",pathList)
  If commaOffset > 0
    Set pageNum to characters 1 to (commaOffset - 1) of pathList
    Set pathList to characters (commaOffset + 1) to charCount(pathList) of pathList
    Set pageNum to pathList
    Set pathList to ""
  End if
  Set navPath[numPages] to pageNum
End conditional loop

After calling "BuildNavPath," the next action in the button's "On Click" event is a call to "GoBackOrNext" with a value of "Next" as the "direction" parameter. The "GoBackOrNext" shared action determines the navPath array index by incrementing or decrementing a global "pageIndex" variable. It stores the navPath array value in "num" and calls the shared action "GoToPageNum" with "num" as the parameter.

-- Shared Actions "GoBackOrNext" --
If direction = "Next"
  Set pageIndex to pageIndex + 1
  Set num to navPath[pageIndex]
  Set pageIndex to pageIndex - 1
  Set num to navPath[pageIndex]
End if
Execute Shared Actions "GoToPageNum"

The shared action "GoToPageNum" simply goes to the appropriate page based on the num parameter:

-- Shared Actions "GoToPageNum" --
If num = 1
  Go to page "training 1"
Else if num = 2
  Go to page "training 2"
Else if num = 3
  Go to page "training 3"
Else if num = 4
  Go to page "training 4"
  Go to page "training 5"
End if

The background for the training pages has "Back" and "Next" buttons. Each button calls the "GoBackOrNext" shared action shown above, passing in its own name as the "direction" parameter:

-- On click... --
Execute Shared Actions "GoBackOrNext"

The "Back" and "Next" buttons are enabled or disabled in the "load page" event of the background:

-- On load page... --
Set enabled of Button "Back" to pageIndex > 1
Set enabled of Button "Next" to pageIndex < numPages

The background also has a "New Path" button that hyperlinks to page 1. This allows the user to select a different path.

The only thing left to do is make sure we reset the necessary global variables on page 1. This is done on "load page":

-- On load page... --
Define local variable "resetArray" (Initial value: "")

Set numPages to 0
Set pageIndex to 0
Set navPath to resetArray

Note that resetArray is a local array that has no values. We set navPath to resetArray in order to clear and re-dimension navPath.

That's it for our basic example. There are many variations on this theme, such as using page names as array indices and creating menus from the navPaths. Take it from here!

Back to Top


Coming in the Next Issue of the EnterPage

  • TBCON 2002 Follow Up Report
  • OnLine Learning 2002 Preview
  • Another Plug-In Pro Tool Spotlight
  • More CBT Creation Tips from Chris Bell
  • More OpenScript Tips from Jeff Rhodes
  • More Actions Editor Tips from Cindy Kessler
  • ToolBook Tip (from Learning and Mastering ToolBook Series)
  • More

Back to Top


Information on Subscriptions and Article Submissions

The EnterPage is distributed 4 times a year, with occasional special issues. Individuals who have expressed interest in Platte Canyon Multimedia Software Corporation or its products receive The EnterPage. If you do not wish to receive future issues, send an email message to EP@plattecanyon.com with the word "unsubscribe" in the subject line. New subscriptions are available by sending an email message to EP@plattecanyon.com with the word "subscribe" in the subject line and the person's name and company in the text of the message.  Suggestions for articles or proposals for article submissions are welcome. Send information to EP@plattecanyon.com. Back issues of the EnterPage are available at http://www.plattecanyon.com/enterpage.aspx.

Back to Top

This page was created by Platte Canyon Multimedia Software Corporation.

n .. Copyright © 2002 Platte Canyon Multimedia Software Corporation